avax.issueTx

Send a signed transaction to the network.

📘

Supported on Avalanche C-Chain (mainnet) only.

Parameters

  • tx- string - The signed transaction (typically signed with a library, using your private key).
  • encoding- string (optional) - Specifies the format of the signed transaction. Can only be hex when a value is provided.

Returns

  • txID- string - The transaction hash, or the zero hash if the transaction is not yet available.

API Endpoint

The format of an Avalanche C-Chain API endpoint is
https://open-platform.nodereal.io/{{apiKey}}/avalanche-c/ext/bc/C/rpc - for RPC API
https://open-platform.nodereal.io/{{apiKey}}/avalanche-c/ext/bc/C/avax - for AVAX API

Here is an example:
https://open-platform.nodereal.io/4c0a1c23661a4e26bcbcwed461e34ea9/avalanche-c/ext/bc/C/rpc
https://open-platform.nodereal.io/4c0a1c23661a4e26bcbcwed461e34ea9/avalanche-c/ext/bc/C/avax

Example

Request

curl --location --request POST https://open-platform.nodereal.io/{{apiKey}}/avalanche-c/ext/bc/C/avax \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc":"2.0",
    "id"     : 1,
    "method" :"avax.issueTx",
    "params" :{
        "tx":"0x00000009de31b4d8b22991d51aa6aa1fc733f23a851a8c9400000000000186a0000000005f041280000000005f9ca900000030390000000000000001fceda8f90fcb5d30614b99d79fc4baa29307762668f16eb0259a57c2d3b78c875c86ec2045792d4df2d926c40f829196e0bb97ee697af71f5b0a966dabff749634c8b729855e937715b0e44303fd1014daedc752006011b730",
        "encoding": "hex"
    }
}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "txID": "NUPLwbt2hsYxpQg4H2o451hmTWQ4JZx2zMzM4SinwtHgAdX1JLPHXvWSXEnpecStLj"
  }
}