Documentation
¶
Overview ¶
Code generated by fastssz. DO NOT EDIT.
Index ¶
- Constants
- func PublicKeyHashesToMultisigHash(pubkeys [][20]byte, numNeeded uint64) [20]byte
- type Multipub
- func (m *Multipub) Copy() *Multipub
- func (m *Multipub) Hash() ([20]byte, error)
- func (m *Multipub) HashTreeRoot() ([32]byte, error)
- func (m *Multipub) HashTreeRootWith(hh *ssz.Hasher) (err error)
- func (m *Multipub) Marshal() ([]byte, error)
- func (m *Multipub) MarshalSSZ() ([]byte, error)
- func (m *Multipub) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (m *Multipub) SizeSSZ() (size int)
- func (m *Multipub) ToBech32() (string, error)
- func (m *Multipub) Unmarshal(b []byte) error
- func (m *Multipub) UnmarshalSSZ(buf []byte) error
- type Multisig
- func (m *Multisig) Copy() *Multisig
- func (m *Multisig) GetPublicKey() (*Multipub, error)
- func (m *Multisig) HashTreeRoot() ([32]byte, error)
- func (m *Multisig) HashTreeRootWith(hh *ssz.Hasher) (err error)
- func (m *Multisig) Marshal() ([]byte, error)
- func (m *Multisig) MarshalSSZ() ([]byte, error)
- func (m *Multisig) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (m *Multisig) Sign(secKey *bls.SecretKey, msg []byte) error
- func (m *Multisig) SizeSSZ() (size int)
- func (m *Multisig) Unmarshal(b []byte) error
- func (m *Multisig) UnmarshalSSZ(buf []byte) error
- func (m *Multisig) Verify(msg []byte) bool
Constants ¶
const ( // MaxMultipubSize is the maximum amount of bytes a Multipub key can contain. 32 public keys. MaxMultipubSize = (32 * 48) + 8 // MaxMultisigSize is the maximum amount of bytes a Multisig can contain. 32 public keys and 32 signatures. MaxMultisigSize = MaxMultipubSize + (96 * 32) + 5 + 8 )
Variables ¶
This section is empty.
Functions ¶
func PublicKeyHashesToMultisigHash ¶
PublicKeyHashesToMultisigHash returns the hash of multiple publickey hashes
Types ¶
type Multipub ¶
Multipub represents multiple public keys that can be signed by some subset numNeeded.
func NewMultipub ¶
NewMultipub constructs a new multi-pubkey.
func (*Multipub) HashTreeRoot ¶
HashTreeRoot ssz hashes the Multipub object
func (*Multipub) HashTreeRootWith ¶
HashTreeRootWith ssz hashes the Multipub object with a hasher
func (*Multipub) MarshalSSZ ¶
MarshalSSZ ssz marshals the Multipub object
func (*Multipub) MarshalSSZTo ¶
MarshalSSZTo ssz marshals the Multipub object to a target array
func (*Multipub) UnmarshalSSZ ¶
UnmarshalSSZ ssz unmarshals the Multipub object
type Multisig ¶
type Multisig struct { PublicKey *Multipub Signatures [][96]byte `ssz-max:"32"` KeysSigned bitfield.Bitlist `ssz:"bitlist" ssz-max:"32"` }
Multisig represents an m-of-n multisig.
func NewMultisig ¶
NewMultisig creates a new blank multisig.
func (*Multisig) GetPublicKey ¶
GetPublicKey gets the public key included in the signature.
func (*Multisig) HashTreeRoot ¶
HashTreeRoot ssz hashes the Multisig object
func (*Multisig) HashTreeRootWith ¶
HashTreeRootWith ssz hashes the Multisig object with a hasher
func (*Multisig) MarshalSSZ ¶
MarshalSSZ ssz marshals the Multisig object
func (*Multisig) MarshalSSZTo ¶
MarshalSSZTo ssz marshals the Multisig object to a target array
func (*Multisig) UnmarshalSSZ ¶
UnmarshalSSZ ssz unmarshals the Multisig object