Complete reference for all BridgeSDK methods available through sdk.bridge, along with their request and response type definitions.
Core methods for cross-chain bridging of TAO and Alpha assets between Bittensor and EVM chains.
| Method | Description | Parameters | Return Type |
|---|
bridge(payload) | Initiate a bridge transaction. Handles EVM burn requests and Bittensor batch transaction preparation. | payload: BridgeSwapRequest | Promise<BridgeSwapResponse> |
getBridgeFeeEstimate(params) | Estimate fees and the recipient amount for a bridge operation. | params: BridgeFeeEstimateRequest | Promise<BridgeFeeEstimateResponse> |
Methods for routing transactions (Swap, Bridge, CCIP) through the unified router.
| Method | Description | Parameters | Return Type |
|---|
routeSwap(payload) | Route a token swap (e.g. wTAO → wALPHA). | payload: RouteSwapRequest | Promise<RouteTransactionResponse> |
routeBridge(payload) | Route a bridge operation via the router. | payload: RouteBridgeRequest | Promise<RouteTransactionResponse> |
routeCcip(payload) | Route a Cross-Chain Interoperability Protocol (CCIP) operation. | payload: RouteCcipRequest | Promise<RouteTransactionResponse> |
getRouterSwapFeeEstimate(params) | Estimate fees for router-based operations (Swap, Bridge, or CCIP). | params: RouterSwapFeeEstimateRequest | Promise<RouterSwapFeeEstimateResponse> |
Methods for tracking and managing in-flight transactions.
| Method | Description | Parameters | Return Type |
|---|
getRecentTransactions(page, limit) | Fetch a paginated list of recent transactions for the current tenant. | page?: number, limit?: number | Promise<ApiTransactionsResponse> |
cancelBridgeSwap(params) | Cancel a pending bridge operation. | params: CancelBridgeSwapRequest | Promise<CancelOperationResponse> |
cancelRouterSwap(params) | Cancel a pending router swap. | params: CancelRouterSwapRequest | Promise<CancelOperationResponse> |
cancelCcipRoute(params) | Cancel a pending CCIP route operation. | params: CancelCcipRequest | Promise<CancelOperationResponse> |
Methods for manually validating or confirming transactions when automatic indexing is insufficient.
| Method | Description | Parameters | Return Type |
|---|
validateBurnTransaction(params) | Manually validate an EVM burn transaction hash if the automatic indexer misses it. | params: ValidateBurnRequest | Promise<ValidateBurnResponse> |
confirmCcipTransaction(params) | Manually confirm a CCIP transaction after on-chain finality. | params: CcipTxConfirmationRequest | Promise<CcipTxConfirmationResponse> |
| Property | Type | Required | Description |
|---|
fromWallet | string | ✅ | Sender wallet address. |
toWallet | string | ✅ | Recipient wallet address on the destination chain. |
fromToken | string | ✅ | Source token symbol — must be lowercase (e.g. wtao). |
toToken | string | ✅ | Destination token symbol — must be lowercase (e.g. tao). |
fromChain | string | ✅ | Source chain ID (e.g. ethereum). |
toChain | string | ✅ | Destination chain ID (e.g. bittensor). |
amount | number | ✅ | Amount to bridge. |
subnetId | number | ⚠️ Conditional | Required for Bittensor bridging. Use 0 for TAO, or the subnet ID for Alpha. |
| Property | Type | Description |
|---|
identifier | string | Unique transaction identifier. |
toAddress | string (optional) | Destination address (Bridge Hot Wallet) for the transfer. |
encodedData | string (optional) | ABI-encoded data for EVM burn transactions. |
signature | string (optional) | Signature for EVM burn transactions. |
evmTransaction | object (optional) | Prepared EVM transaction object containing to, data, and value. |
subnetDestinationHotkey | string (optional) | Hotkey for Alpha subnet stake transfers. |
| Property | Type | Required | Description |
|---|
fromToken | string | ✅ | Source token symbol. |
toToken | string | ✅ | Destination token symbol. |
amount | number | ✅ | Amount to bridge. |
| Property | Type | Description |
|---|
fee | string | Estimated total fee for the bridge operation. |
recipientAmount | string | Estimated amount the recipient will receive after fees. |
tenantFee | string | Portion of the fee collected by the tenant/integrator. |
| Property | Type | Required | Description |
|---|
operationType | 'SWAP' | ✅ | Must be the literal string 'SWAP'. |
originAssetId | number | ✅ | ID of the source asset. |
destinationAssetId | number | ✅ | ID of the destination asset. |
fromAddress | string | ✅ | Sender address. |
toAddress | string | ✅ | Recipient address. |
amount | number | ✅ | Amount to swap. |
| Property | Type | Required | Description |
|---|
operationType | 'BRIDGE' | ✅ | Must be the literal string 'BRIDGE'. |
fromChain | string | ✅ | Source chain ID. |
toChain | string | ✅ | Destination chain ID. |
fromToken | string | ✅ | Source token symbol. |
toToken | string | ✅ | Destination token symbol. |
fromWallet | string | ✅ | Sender wallet address. |
toWallet | string | ✅ | Recipient wallet address. |
amount | number | ✅ | Amount to bridge. |
subnetId | number | ⚠️ Conditional | Required for Alpha bridging. |
| Property | Type | Required | Description |
|---|
operationType | 'CCIP' | ✅ | Must be the literal string 'CCIP'. |
originAssetId | number | ✅ | Source asset ID. |
destinationAssetId | number | ✅ | Destination asset ID. |
fromAddress | string | ✅ | Sender address. |
toAddress | string | ✅ | Recipient address on the destination chain. |
amount | number | ✅ | Amount to transfer. |
| Property | Type | Description |
|---|
success | boolean | Whether the routing request was successful. |
identifier | string | Unique transaction identifier for tracking. |
data | object | Contains to, data, value, and chainId for EVM execution. |
ccipFee | string (optional) | Estimated CCIP protocol fee, if applicable. |
| Property | Type | Required | Description |
|---|
originAssetId | number | ✅ | Source asset ID. |
destinationAssetId | number | ✅ | Destination asset ID. |
amount | number | ✅ | Amount to swap or bridge. |
operationType | RouteOperationType | ✅ | One of 'SWAP', 'BRIDGE', or 'CCIP'. |
toAddress | string | ✅ | Recipient address. |
| Property | Type | Description |
|---|
swapAmount | string | Estimated output amount the recipient will receive. |
totalFee | string | Total combined fee. |
platformFee | string | VoidAI platform fee component. |
ccipFee | string | Chainlink CCIP protocol fee component. |
tenantFee | string | Fee collected by the tenant/integrator. |
| Property | Type | Description |
|---|
items | ApiTransactionItem[] | Paginated list of transaction records. |
page | number | Current page number. |
limit | number | Number of items per page. |
totalItems | number | Total number of transactions. |
totalPages | number | Total number of pages. |
| Property | Type | Required | Description |
|---|
fromToken | string | ✅ | Source token symbol. |
toToken | string | ✅ | Destination token symbol. |
uuid | string | ✅ | Transaction UUID to cancel. |
| Property | Type | Required | Description |
|---|
uuid | string | ✅ | Transaction UUID to cancel. |
| Property | Type | Required | Description |
|---|
operationType | 'CCIP' | ✅ | Must be the literal string 'CCIP'. |
fromToken | string | ✅ | Source token symbol. |
toToken | string | ✅ | Destination token symbol. |
uuid | string | ✅ | Transaction UUID to cancel. |
| Property | Type | Description |
|---|
success | boolean | Whether the cancellation was successful. |
message | string | Human-readable status message. |
| Property | Type | Required | Description |
|---|
transactionHash | string | ✅ | On-chain hash of the EVM burn transaction. |
identifier | string | ✅ | Transaction identifier returned by the original bridge call. |
| Property | Type | Description |
|---|
success | boolean | Whether the validation was successful. |
message | string | Human-readable status message. |
identifier | string | Confirmed transaction identifier. |
burnDetails | object | Parsed details of the on-chain burn event. |
| Property | Type | Required | Description |
|---|
transactionId | string | ✅ | VoidAI Transaction ID (from the original routeCcip response). |
txnHash | string | ✅ | On-chain transaction hash from the source chain. |
operationType | string | ✅ | Operation type — use 'ccipBridge' for CCIP transfers. |
txnStatus | string | ✅ | Current status code (e.g. 'CCIP_SOURCE_INITIATED'). |
| Property | Type | Description |
|---|
success | boolean | Whether the confirmation was accepted. |
message | string (optional) | Human-readable status message. |