avm.issueTx - AVAX

Example code for the avm.issueTx JSON-RPC method. Complete guide on how to use avm.issueTx JSON-RPC in GetBlock Web3 documentation.

Broadcasts a signed X-Chain transaction to the network. The transaction must be constructed and signed offline (typically via AvalancheJS) and submitted as an encoded blob.

Parameters

Parameter
Type
Required
Description

tx

string

Yes

Signed transaction blob

encoding

string

No

Encoding — "hex" (default) or "cb58"

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/ext/bc/X' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "avm.issueTx",
    "params": {
        "tx": "0x0000000000000003000000000000000000000000000000000000000000000000000000000000000000000000...",
        "encoding": "hex"
    },
    "id": "getblock.io"
}'

Response Example

Response Parameters

Field
Type
Description

result.txID

string

Transaction ID — use avm.getTxStatus to track inclusion

Use Cases

  • Broadcasting X-Chain asset transfers

  • Creating new native assets on Avalanche

  • Atomic cross-chain operations from X-Chain

Error Handling

Status Code
Error Message
Cause

404

Not Found

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

429

Too Many Requests

Rate limit exceeded for your plan

-32000

Invalid transaction

Signature invalid, malformed body, or insufficient funds

SDK Integration

Last updated

Was this helpful?