Documentation ¶
Index ¶
- func AddSignature(mSig *signing.MultiSignatureData, sig signing.SignatureData, index int)
- func AddSignatureFromPubKey(mSig *signing.MultiSignatureData, sig signing.SignatureData, ...) error
- func AddSignatureV2(mSig *signing.MultiSignatureData, sig signing.SignatureV2, keys []types.PubKey) error
- func NewMultisig(n int) *signing.MultiSignatureData
- type AminoMultisignature
- type GetSignBytesFunc
- type PubKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSignature ¶
func AddSignature(mSig *signing.MultiSignatureData, sig signing.SignatureData, index int)
AddSignature adds a signature to the multisig, at the corresponding index. If the signature already exists, replace it.
func AddSignatureFromPubKey ¶
func AddSignatureFromPubKey(mSig *signing.MultiSignatureData, sig signing.SignatureData, pubkey types.PubKey, keys []types.PubKey) error
AddSignatureFromPubKey adds a signature to the multisig, at the index in keys corresponding to the provided pubkey.
func AddSignatureV2 ¶
func AddSignatureV2(mSig *signing.MultiSignatureData, sig signing.SignatureV2, keys []types.PubKey) error
func NewMultisig ¶
func NewMultisig(n int) *signing.MultiSignatureData
NewMultisig returns a new MultiSignatureData
Types ¶
type AminoMultisignature ¶
type AminoMultisignature struct { BitArray *types.CompactBitArray Sigs [][]byte }
AminoMultisignature is used to represent amino multi-signatures for StdTx's. It is assumed that all signatures were made with SIGN_MODE_LEGACY_AMINO_JSON. Sigs is a list of signatures, sorted by corresponding index.
type GetSignBytesFunc ¶
GetSignBytesFunc defines a function type which returns sign bytes for a given SignMode or an error. It will generally be implemented as a closure which wraps whatever signable object signatures are being verified against.
type PubKey ¶
type PubKey interface { types.PubKey // VerifyMultisignature verifies the provide multi-signature represented by MultiSignatureData // using getSignBytes to retrieve the sign bytes to verify against for the provided mode. VerifyMultisignature(getSignBytes GetSignBytesFunc, sig *signing.MultiSignatureData) error // GetPubKeys returns the types.PubKey's nested within the multi-sig PubKey GetPubKeys() []types.PubKey // GetThreshold returns the threshold number of signatures that must be obtained to verify a signature. GetThreshold() uint }
PubKey defines a type which supports multi-signature verification via MultiSignatureData which supports multiple SignMode's.