Marketplace has launched, further enabling blockchain developers! Learn more

Contents

platform.getRewardUtxOs 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 ID of the staking or delegating transaction.
  2. encoding - string - Specifies the format for the returned UTXOs. Can be either "cb58" or "hex" and defaults to "cb58".

Returns:

  1. numFetched - uint64 - The number of returned UTXOs
  2. utxos - []string - The array of encoded reward UTXOs
  3. encoding - string - Specifies the format for the returned UTXOs. Can be either "cb58" or "hex" and defaults to "cb58".

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/P"
  );
  const params = {
    "txID": "2nmH8LithVbdjaXsxVQCQfXtzN9hBbmebrsaEYnLM9T32Uy2Y4",
    "encoding": "hex",
  };
  const result = await provider.send("platform.getRewardUTXOs", params);
  console.log(result);
})();
Ready to get started? Create a free account