Documentation
¶
Index ¶
- Constants
- func PublicKeyFromDER(der []byte) (*bls.PublicKey, error)
- func PublicKeyToDER(publicKey []byte) ([]byte, error)
- func VerifyCertificate(certificate Certificate, canisterID principal.Principal, rootPublicKey []byte) error
- func VerifyCertifiedData(certificate Certificate, canisterID principal.Principal, rootPublicKey []byte, ...) error
- type Certificate
- type Delegation
Constants ¶
View Source
const RootKey = "" /* 266-byte string literal not displayed */
RootKey is the root key of IC main net.
Variables ¶
This section is empty.
Functions ¶
func PublicKeyToDER ¶ added in v0.4.5
func VerifyCertificate ¶ added in v0.4.5
func VerifyCertificate( certificate Certificate, canisterID principal.Principal, rootPublicKey []byte, ) error
func VerifyCertifiedData ¶ added in v0.4.5
Types ¶
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.
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.
Click to show internal directories.
Click to hide internal directories.