Marketplace has launched, further enabling blockchain developers! Learn more

Contents

platform.getStake 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. addresses - []string - An array of address strings.

Returns:

  1. staked - string - The amount staked.
  2. stakedOutputs - []string - An array of the amount staked per address.
  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 = {
    "addresses": ["P-avax1tnuesf6cqwnjw7fxjyk7lhch0vhf0v95wj5jvy"],
    "encoding": "hex",
  };
  const result = await provider.send("platform.getStake", params);
  console.log(result);
})();
Ready to get started? Create a free account