AptosAptos Network's breakthrough technology and seamless user experience are now available on QuickNode.

Start building today!     

Contents

platform.getSubnets 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. ids - []string - The ids of the subnets to get information about.

Returns:

  1. id - string - The id of the subnet.
  2. controlKeys - []string - key values.
  3. threshold - string - threshold signatures from addresses in controlKeys are needed to add a validator to the subnet.

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 = {
    "ids": ["BE5Nv8objSftNwxzcxkZGwCfVs3FPdJBio4DBwCF2A5i7RasU"],
  };
  const result = await provider.send("platform.getSubnets", params);
  console.log(result);
})();
Ready to get started? Create a free account