getSubnetIdFromCertificate
getSubnetIdFromCertificate(
certificate,rootKey):Principal
Defined in: packages/core/src/agent/certificate.ts:1054
Get the subnet ID from a certificate If the certificate has a delegation, it returns the subnet ID from the delegation. If the certificate has no delegation, it returns the root subnet ID.
Parameters
Section titled “Parameters”certificate
Section titled “certificate”the certificate to get the subnet ID from
rootKey
Section titled “rootKey”Uint8Array
the root key to use to get the subnet ID
Returns
Section titled “Returns”the subnet ID