Documentation
¶
Index ¶
- Constants
- type Key
- func (k Key) Address() ids.Address
- func (k Key) AsKey() string
- func (k Key) Bytes() []byte
- func (k Key) Clone() Key
- func (k Key) Equal(b Key) bool
- func (k Key) GoString() string
- func (k Key) IsAddress(addr ids.Address) bool
- func (k Key) Kind() Kind
- func (k Key) MarshalCBOR() ([]byte, error)
- func (k Key) MarshalJSON() ([]byte, error)
- func (k Key) MarshalText() ([]byte, error)
- func (k Key) Ptr() *Key
- func (k Key) String() string
- func (k *Key) UnmarshalCBOR(data []byte) error
- func (k *Key) UnmarshalJSON(b []byte) error
- func (k *Key) UnmarshalText(b []byte) error
- func (k Key) Valid() error
- func (k Key) ValidOrEmpty() error
- func (k Key) Verify(digestHash []byte, sigs Sigs) bool
- type Keys
- func (ks Keys) Clone() Keys
- func (ks Keys) FindKeyOrAddr(addr ids.Address) Key
- func (ks Keys) Has(key Key) bool
- func (ks Keys) HasAddress(addr ids.Address) bool
- func (ks Keys) HasKeys(keys Keys, threshold uint16) bool
- func (ks Keys) Valid() error
- func (ks Keys) Verify(digestHash []byte, sigs Sigs, threshold uint16) bool
- func (ks Keys) VerifyPlus(digestHash []byte, sigs Sigs, threshold uint16) bool
- type Kind
- type Sig
- func (s Sig) AsKey() string
- func (s Sig) Bytes() []byte
- func (s Sig) Clone() Sig
- func (s Sig) Equal(b Sig) bool
- func (s Sig) FindKey(digestHash []byte, keys ...Key) int
- func (s Sig) GoString() string
- func (s Sig) Kind() Kind
- func (s Sig) MarshalCBOR() ([]byte, error)
- func (s Sig) MarshalJSON() ([]byte, error)
- func (s Sig) MarshalText() ([]byte, error)
- func (s Sig) Ptr() *Sig
- func (s Sig) String() string
- func (s *Sig) UnmarshalCBOR(data []byte) error
- func (s *Sig) UnmarshalJSON(b []byte) error
- func (s *Sig) UnmarshalText(b []byte) error
- func (s Sig) Valid() error
- type Signer
- type Sigs
Constants ¶
View Source
const DigestLength = 32
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key []byte
func (Key) MarshalCBOR ¶
func (Key) MarshalJSON ¶
func (Key) MarshalText ¶
func (*Key) UnmarshalCBOR ¶
func (*Key) UnmarshalJSON ¶
func (*Key) UnmarshalText ¶
func (Key) ValidOrEmpty ¶
type Sig ¶
type Sig []byte
func (Sig) MarshalCBOR ¶
func (Sig) MarshalJSON ¶
func (Sig) MarshalText ¶
func (*Sig) UnmarshalCBOR ¶
func (*Sig) UnmarshalJSON ¶
func (*Sig) UnmarshalText ¶
type Signer ¶
type Signer interface { Kind() Kind Key() Key PrivateSeed() []byte SignHash(digestHash []byte) (Sig, error) SignData(message []byte) (Sig, error) Sign(message []byte) (Sig, error) }
func BLS12381From ¶
func Ed25519From ¶
func NewBLS12381 ¶
func NewEd25519 ¶
func NewSecp256k1 ¶
func Secp256k1From ¶
Click to show internal directories.
Click to hide internal directories.