GET
/
v1
/
networks
/
{network}
/
subnets
/
{subnetId}
import { AvaCloudSDK } from "@avalabs/avacloud-sdk";

const avaCloudSDK = new AvaCloudSDK({
  chainId: "43114",
  network: "mainnet",
});

async function run() {
  const result = await avaCloudSDK.data.primaryNetwork.getSubnetById({
    network: "mainnet",
    subnetId: "11111111111111111111111111111111LpoYY",
  });

  // Handle the result
  console.log(result);
}

run();
{
  "createBlockTimestamp": 123,
  "createBlockIndex": "<string>",
  "subnetId": "<string>",
  "ownerAddresses": [
    "<string>"
  ],
  "threshold": 123,
  "locktime": 123,
  "subnetOwnershipInfo": {
    "locktime": 0,
    "threshold": 1,
    "addresses": [
      "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"
    ]
  },
  "isL1": true,
  "l1ConversionTransactionHash": "<string>",
  "l1ValidatorManagerDetails": {
    "blockchainId": "<string>",
    "contractAddress": "<string>"
  },
  "blockchains": [
    {
      "blockchainId": "<string>"
    }
  ]
}

Authorizations

x-glacier-api-key
string
header
required

Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.

Path Parameters

network
enum<string>
required

Either mainnet or testnet/fuji.

Available options:
mainnet,
fuji,
testnet,
devnet
subnetId
string
required

Subnet ID to fetch details for

Response

200
application/json
Successful response
createBlockTimestamp
number
required
createBlockIndex
string
required
subnetId
string
required
ownerAddresses
string[]
requireddeprecated

This field is deprecated. Use subnetOwnershipInfo instead.

threshold
number
requireddeprecated

This field is deprecated. Use subnetOwnershipInfo instead.

locktime
number
requireddeprecated

This field is deprecated. Use subnetOwnershipInfo instead.

subnetOwnershipInfo
object
required

Latest subnet owner details for this Subnet.

isL1
boolean
required

Whether the subnet is an L1 or not.

blockchains
object[]
required
l1ConversionTransactionHash
string

Transaction hash of ConvertSubnetToL1Tx which converted this Subnet to L1.

l1ValidatorManagerDetails
object

L1 validator manager details.