Skip to Content
TachyonTachyon SDKIntroduction

Tachyon SDK

The Tachyon SDK is a TypeScript/JavaScript library that provides a simple interface to interact with the Tachyon API. It allows you to relay transactions, check their status, and manage account information across multiple blockchain networks.

Features

  • Transaction Relay: Submit transactions to be executed on various blockchain networks
  • Status Tracking: Monitor transaction execution status in real-time
  • Multi-Chain Support: Works with 20+ blockchain networks including Ethereum, Arbitrum, Base, and more
  • Account Management: Check account balances and information
  • Type Safety: Full TypeScript support with comprehensive type definitions
  • Async/Await: Modern promise-based API

Quick Start

Installation

npm install @rathfi/tachyon # or yarn add @rathfi/tachyon # or pnpm add @rathfi/tachyon

Basic Usage

import { Tachyon, ChainId } from '@rathfi/tachyon'; // Initialize the SDK const tachyon = new Tachyon({ apiKey: 'your-api-key', }); // Submit a transaction const txId = await tachyon.relay({ chainId: ChainId.BASE, to: '0x742d35cc6634C0532925a3b8D1C9b53e6aC3', value: '1', // 1 wei callData: '0x', label: 'My Transaction' // Optional label for tracking }); // Check transaction status const status = await tachyon.getRelayStatus(txId); console.log('Transaction status:', status); // Wait for execution const executedTx = await tachyon.waitForExecutionHash(txId); console.log('Execution hash:', executedTx.executionTxHash);

Next Steps

Last updated on