Documentation ¶
Index ¶
- Constants
- func HashAny(v any) ([32]byte, error)
- func PublicBLSKeyFromDER(der []byte) (*bls.PublicKey, error)
- func PublicBLSKeyToDER(publicKey []byte) ([]byte, error)
- func PublicED25519KeyFromDER(der []byte) (*ed25519.PublicKey, error)
- func RepresentationIndependentHash(m []KeyValuePair) ([32]byte, error)
- func VerifyCertificate(certificate Certificate, canisterID principal.Principal, rootPublicKey []byte) error
- func VerifyCertifiedData(certificate Certificate, canisterID principal.Principal, rootPublicKey []byte, ...) error
- func VerifySubnetCertificate(certificate Certificate, subnetID principal.Principal, rootPublicKey []byte) error
- type CanisterRange
- type CanisterRanges
- type Certificate
- type Delegation
- type KeyValuePair
Constants ¶
View Source
const ( // RootKey is the root key of IC main net. RootKey = "" /* 266-byte string literal not displayed */ // RootSubnetID is the subnet ID of the (NNS) root subnet. RootSubnetID = "tdb26-jop6k-aogll-7ltgs-eruif-6kk7m-qpktf-gdiqx-mxtrf-vb5e6-eqe" )
Variables ¶
This section is empty.
Functions ¶
func PublicBLSKeyFromDER ¶ added in v0.5.0
func PublicBLSKeyToDER ¶ added in v0.5.0
func PublicED25519KeyFromDER ¶ added in v0.5.0
func RepresentationIndependentHash ¶ added in v0.5.0
func RepresentationIndependentHash(m []KeyValuePair) ([32]byte, error)
RepresentationIndependentHash computes the hash of a map in a representation-independent way. https://internetcomputer.org/docs/current/references/ic-interface-spec/#hash-of-map
func VerifyCertificate ¶ added in v0.4.5
func VerifyCertificate( certificate Certificate, canisterID principal.Principal, rootPublicKey []byte, ) error
func VerifyCertifiedData ¶ added in v0.4.5
func VerifySubnetCertificate ¶ added in v0.5.0
func VerifySubnetCertificate( certificate Certificate, subnetID principal.Principal, rootPublicKey []byte, ) error
Types ¶
type CanisterRange ¶ added in v0.5.0
func (*CanisterRange) UnmarshalCBOR ¶ added in v0.5.0
func (c *CanisterRange) UnmarshalCBOR(bytes []byte) error
type CanisterRanges ¶ added in v0.5.0
type CanisterRanges []CanisterRange
type Certificate ¶
type Certificate struct { // Tree is the certificate tree. Tree hashtree.HashTree `cbor:"tree"` // Signature is the signature of the certificate tree. Signature []byte `cbor:"signature"` // Delegation is the delegation of the certificate. Delegation *Delegation `cbor:"delegation"` }
Certificate is a certificate gets returned by the IC.
func (Certificate) VerifyTime ¶ added in v0.5.0
func (c Certificate) VerifyTime(ingressExpiry time.Duration) error
VerifyTime verifies the time of a certificate.
type Delegation ¶
type Delegation struct { // SubnetId is the subnet ID of the delegation. SubnetId principal.Principal `cbor:"subnet_id"` // The nested certificate typically does not itself again contain a // delegation, although there is no reason why agents should enforce that // property. Certificate Certificate `cbor:"certificate"` }
Delegation is a delegation of a certificate.
func (*Delegation) UnmarshalCBOR ¶
func (d *Delegation) UnmarshalCBOR(bytes []byte) error
UnmarshalCBOR unmarshals a delegation.
type KeyValuePair ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.