Skip to main content

EVM Operations (sdk.evm)

createPublicClient

Create a public client for interacting with an EVM chain.

Parameters

  • chainId (Int): The chain ID (e.g., 1 for Ethereum mainnet, 137 for Polygon)

Returns

  • EvmPublicClient: Public client for the chain

Example

getGasPrice

Get the current gas price for a chain.

Returns

  • BigInteger: Current gas price in Wei

Example

sendTransaction

Send a transaction on an EVM chain.

Parameters

  • transaction (EthereumTransaction): Transaction details
  • wallet (BaseWallet): The wallet to send from

Returns

  • String: Transaction hash

Example

sendSponsoredTransaction

Send a gas-sponsored transaction on an EVM chain. The relayer pays the gas; see EVM Gas Sponsorship.

Parameters

  • calls (List<EvmSponsoredCall>): The calls to execute atomically, each with target, data, and value
  • wallet (BaseWallet): The wallet to send from

Returns

  • String: Transaction hash

Example

isGasSponsorshipEnabled

Check whether EVM gas sponsorship is enabled for the current environment and wallet.

Returns

  • Boolean: true when the environment can sponsor EVM transactions

erc20Allowance

Read the ERC-20 allowance an owner granted a spender.

Parameters

  • token (String): The ERC-20 contract address
  • owner (String): The wallet address that granted the allowance
  • spender (String): The address allowed to spend
  • chainId (Int): The chain to query

Returns

  • BigInteger: The current allowance in raw token units

signEthereumTransaction

Sign a transaction without sending it. This is an extension on sdk.wallets, so it requires an import.

Parameters

  • walletId (String): The ID of the wallet to sign with
  • transaction (EthereumTransaction): Transaction to sign

Returns

  • String: Signed transaction

Example

writeContract

Write to a smart contract (call a contract function).

Parameters

  • wallet (BaseWallet): The wallet to call from
  • input (WriteContractInput): Contract call parameters

Returns

  • String: Transaction hash

Example

Solana Operations (sdk.solana)

Building Solana transactions and fetching a blockhash use the sol4k library bundled via solana-web3.aar. Signing and sending go through sdk.solana.

createConnection (sol4k)

Create a connection to a Solana network using sol4k.

Example

signMessage

Sign a message with a Solana wallet via the wallets module.

Parameters

  • wallet (BaseWallet): The Solana wallet to sign with
  • message (String): The message to sign

Returns

  • String: The signature

Example

signTransaction

Sign a Solana transaction (base64 encoded).

Parameters

  • base64Transaction (String): Base64 encoded transaction
  • wallet (BaseWallet): The Solana wallet to sign with

Returns

  • String: Signed transaction

Example

signAndSendTransaction

Sign and send a Solana transaction.

Parameters

  • transaction (String): Base64 encoded transaction
  • wallet (BaseWallet): The Solana wallet to sign with
  • transactionType (SolanaTransactionType, optional): Transaction encoding type, defaults to VERSIONED
  • sponsorshipMode (SolanaSponsorshipMode?, optional): Overrides the project’s SVM gas sponsorship for this transaction. AUTO follows the project setting, OFF always pays the fee from the wallet, REQUIRED fails when sponsorship is unavailable.

Returns

  • String: Transaction signature

Example

Network Management (sdk.networks)

Available Networks

Get lists of available EVM, Solana, SUI, and Bitcoin networks.

Example

Data Types

EthereumTransaction

WriteContractInput

EstimatedFeesPerGas

GenericNetwork

Last modified on October 26, 2026