Narval | Docs
GithubHome
  • Narval Connect
    • Overview
    • Getting Started
  • Security Overview
  • Providers
    • Providers
      • Anchorage
      • BitGo
      • Fireblocks
  • Guide
    • ConnectClient
    • Connect Widget
      • initiateConnect
      • completeConnect
    • Using a Connection
      • listWallets
      • getWalletById
      • listAccounts
      • getAccountById
      • listAddresses
      • getAddressById
      • listKnownDestinations
      • sendTransfer
      • getTransfer
      • EVM Transactions
        • sendTransaction
        • getTransactionById
        • signMessage
        • getSignMessageById
        • signTypedData
        • getTypedDataById
      • Staking
        • Ethereum (ETH)
        • Polygon (POL)
        • Solana (SOL)
        • Sui (SUI)
      • Raw Signing
        • signRaw
        • getRawSignRequest
    • Manage Connections
      • listConnections
      • getConnection
      • revokeConnection
  • API Reference
    • REST API
      • Authorization
      • Connect Widget
      • Networks & Assets
      • Wallets, Accounts, Addresses
      • Known Destinations
      • Transfer
      • Stake
        • Ethereum
        • Polygon
        • Solana
        • Sui
      • Transactions
        • Ethereum (EVM)
      • Raw Signing
      • Transit Encryption Key
      • Manage Connections
Powered by GitBook
On this page
  1. Guide
  2. Using a Connection
  3. EVM Transactions

sendTransaction

connectClient.evm.sendTransaction(params) ⇒

Sends an EVM transaction using a provider connection.

Kind: instance method of ConnectClient Returns: Promise with the transaction response Throws:

  • ArmorySdkException If there's an error sending the transaction

Param
Description

params

Parameters for sending the transaction

params.connectionId

Unique identifier of the provider connection

params.accessToken

Optional access token for authentication

params.data

Transaction request data

params.data.transactionRequest

The transaction to send

params.data.transactionRequest.to

Recipient address (hexstring)

params.data.transactionRequest.value

Transaction value in wei (hexstring)

params.data.transactionRequest.data

Transaction call data (hexstring)

params.data.transactionRequest.gasLimit

Maximum gas allowed (hexstring)

params.data.transactionRequest.gasPrice

Gas price for legacy transactions (hexstring)

params.data.transactionRequest.maxFeePerGas

Maximum fee per gas for EIP-1559 transactions (hexstring)

params.data.transactionRequest.maxPriorityFeePerGas

Maximum priority fee for EIP-1559 transactions (hexstring)

params.data.transactionRequest.nonce

Transaction nonce (number)

params.data.transactionRequest.type

Transaction type ('0', '1', or '2')

params.data.transactionRequest.type

Transaction type ('0', '1', or '2')

params.data.transactionId

Optional transaction identifier for tracking

params.data.source

Source of the transaction request

params.data.source.type

Type of source ('account' or 'address')

params.data.source.id

Identifier of the source account or address

params.data.idempotenceId

Unique identifier to ensure idempotence

params.data.providerSpecific

Optional provider-specific parameters

Example

const txResponse = await connectClient.evm.sendTransaction({
  connectionId: "conn-123",
  data: {
    transactionRequest: {
      to: "0x1234567890123456789012345678901234567890",
      value: "0x0",
      data: "0xa9059cbb0000000000000000000000001234567890123456789012345678901234567890000000000000000000000000000000000000000000000000000000000000000a",
      gasLimit: "0x5208",
      maxFeePerGas: "0x3b9aca00",
      maxPriorityFeePerGas: "0x3b9aca00",
      type: "2"
    },
    source: {
      type: "account",
      id: "acc-456"
    },
    idempotenceId: "idem-789"
  }
});
PreviousEVM TransactionsNextgetTransactionById

Last updated 29 days ago