Skip to content

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.

Cert

the certificate to get the subnet ID from

Uint8Array

the root key to use to get the subnet ID

Principal

the subnet ID