Marketplace has launched, further enabling blockchain developers! Learn more

Contents

avax.getAtomicTx RPC method

The API credit value for this method is 1 . To learn more about API credits and each method's value, visit the API Credits page.

Parameters:

  1. txID - String - The transaction ID. It should be in cb58 format.
  2. encoding - String - (optional) The encoding format to use. Can be either cb58 or hex. Defaults to cb58.

Returns:

  1. tx - String - The transaction encoded to encoding.
  2. encoding - String - The encoding format.
  3. blockHeight - String - The height of the block which the transaction was included in.

Code Examples:

const ethers = require("ethers");

(async () => {
  const provider = new ethers.providers.JsonRpcProvider(
    "http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ext/bc/C/avax"
  );
  const params = {
    "txID": "217PBxjVznQaoPuQT8zEB86FnwoDsq6jeb2yfBgtjwYHD1RPC3",
    "encoding": "cb58",
  };
  const result = await provider.send("avax.getAtomicTx", params);
  console.log(result);
})();
Ready to get started? Create a free account