For the complete documentation index, see llms.txt. This page is also available as Markdown.
getNextTxn
Retrieves the raw transaction data for the next pending step in the transaction sequence. The response format varies based on the blockchain network:
interfaceTransactionDataParams{routeId:string;// Route ID from createTransactionstepId:string;// Step ID from the transaction steps array}//Example implementationconstnextTxn=awaitgetNextTxn({routeId:transaction.routeId,stepId:transaction.steps[0].id,});// Example Response (shortened){"status": "success","data": {"routeId":"01J2WB1NY6MD3F25CJTTB01D8F","stepId":"01J2WB1NY64MKVCM8FM994WMZV","networkType":"evm","txnData":{"txnType":"on-chain"|"sign-typed"|"sign-untyped""txnEvm": {"to":"0x...","value":"420000000000000000", // ... other transaction details}}}}
Transaction Types
The SDK supports multiple transaction types that are automatically handled based on the protocol and requirements:
On-chain Transactions (txnType: "on-chain"):
Regular blockchain transactions that require gas fees
Used for standard token transfers and swaps
EIP-712 Typed Data Signing (txnType: "sign-typed"):
Implements EIP-712 for structured data signing on EVM chains
Used for permit-style approvals and meta-transactions (for gasless)
Used for protocols like Meson.fi that require message signing
Supports cross-chain message verification
The transaction type is automatically determined based on the quote and protocol being used. The SDK handles all the necessary signing logic internally, including:
Proper formatting of typed and untyped data
Chain-specific signature requirements
Protocol-specific message formatting
Gasless transaction handling
Transaction Data Response Examples
Send txnEvm or txnSol or txnCosmos to the appropriate wallet/provider based on the networkType and get the transaction hash to monitor the status of the transaction.