buildTransaction

Description

Transforms a generic transaction request into a blockchain-specific transaction with all necessary parameters populated for the target network.

What this endpoint does:

  • Validates transaction data against the specified blockchain network

  • Converts generic amounts to blockchain-native units (e.g., 0.1 SUI → 100000000 MIST)

  • Calculates and populates network-specific parameters (gas price, gas budget, nonce)

  • Transforms generic transaction types to chain-specific types (TRANSFER → SUI_TRANSFER)

  • Returns a structured transaction request ready for confirmation and execution

Supported transaction types:

  • Native transfers:\ Send blockchain's native currency (ETH, SUI, MATIC, etc.)

  • Token transfers:\ Send ERC-20 or equivalent tokens

  • NFT transfers:\ Transfer ERC-721/ERC-1155 or equivalent NFTs

  • Contract execution:\ Call smart contract functions

  • Multi-transfers:\ Batch multiple operations (Hedera only)

public buildTransaction(reqParams: VyBuildTransactionRequestBase) : VyPromise<VyTransactionRequestBase>

Parameters

reqParams

Request data for the operation

Returns

VyPromise<VyTransactionRequestBase> Transaction prepared for a specific chain successfully.

Last updated