Marketplace has launched, further enabling blockchain developers! Learn more

Contents

platform.getMaxStakeAmount 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. subnetID - String - A Buffer or cb58 string representing a subnet.
  2. nodeID - String - A string representing ID of the node whose stake amount is required during the given duration
  3. startTime - int - A big number denoting start time of the duration during which stake amount of the node is required.
  4. endTime - int - A big number denoting end time of the duration during which stake amount of the node is required.

Returns:

  1. amount - uint64

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 = {
    "subnetID": "11111111111111111111111111111111LpoYY",
    "nodeID": "NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg",
    "startTime": 1644240334,
    "endTime": 1644240634,
  };
  const result = await provider.send("platform.getMaxStakeAmount", params);
  console.log(result);
})();
Ready to get started? Create a free account