Documentation ¶
Index ¶
- Constants
- Variables
- type LegacyAminoPubKey
- func (m *LegacyAminoPubKey) Address() cryptotypes.Address
- func (m *LegacyAminoPubKey) Bytes() []byte
- func (*LegacyAminoPubKey) Descriptor() ([]byte, []int)
- func (m *LegacyAminoPubKey) Equals(key cryptotypes.PubKey) bool
- func (m *LegacyAminoPubKey) GetPubKeys() []cryptotypes.PubKey
- func (m *LegacyAminoPubKey) GetThreshold() uint
- func (m *LegacyAminoPubKey) Marshal() (dAtA []byte, err error)
- func (m LegacyAminoPubKey) MarshalAminoJSON() (tmMultisig, error)
- func (m *LegacyAminoPubKey) MarshalTo(dAtA []byte) (int, error)
- func (m *LegacyAminoPubKey) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LegacyAminoPubKey) ProtoMessage()
- func (m *LegacyAminoPubKey) Reset()
- func (m *LegacyAminoPubKey) Size() (n int)
- func (m *LegacyAminoPubKey) String() string
- func (m *LegacyAminoPubKey) Type() string
- func (m *LegacyAminoPubKey) Unmarshal(dAtA []byte) error
- func (m *LegacyAminoPubKey) UnmarshalAminoJSON(tmPk tmMultisig) error
- func (m *LegacyAminoPubKey) UnpackInterfaces(unpacker types.AnyUnpacker) error
- func (m *LegacyAminoPubKey) VerifyMultisignature(getSignBytes multisigtypes.GetSignBytesFunc, sig *signing.MultiSignatureData) error
- func (m *LegacyAminoPubKey) VerifySignature(msg []byte, sig []byte) bool
- func (m *LegacyAminoPubKey) XXX_DiscardUnknown()
- func (m *LegacyAminoPubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LegacyAminoPubKey) XXX_Merge(src proto.Message)
- func (m *LegacyAminoPubKey) XXX_Size() int
- func (m *LegacyAminoPubKey) XXX_Unmarshal(b []byte) error
Constants ¶
const (
PubKeyAminoRoute = "tendermint/PubKeyMultisigThreshold"
)
TODO: Figure out API for others to either add their own pubkey types, or to make verify / marshal accept a AminoCdc.
Variables ¶
var ( ErrInvalidLengthKeys = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowKeys = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupKeys = fmt.Errorf("proto: unexpected end of group") )
var AminoCdc = codec.NewLegacyAmino()
nolint Deprecated: Amino is being deprecated in the SDK. But even if you need to use Amino for some reason, please use `codec/legacy.Cdc` instead.
Functions ¶
This section is empty.
Types ¶
type LegacyAminoPubKey ¶
type LegacyAminoPubKey struct { Threshold uint32 `protobuf:"varint,1,opt,name=threshold,proto3" json:"threshold,omitempty" yaml:"threshold"` PubKeys []*types.Any `protobuf:"bytes,2,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty" yaml:"pubkeys"` }
LegacyAminoPubKey specifies a public key type which nests multiple public keys and a threshold, it uses legacy amino address rules.
func NewLegacyAminoPubKey ¶
func NewLegacyAminoPubKey(k int, pubKeys []cryptotypes.PubKey) *LegacyAminoPubKey
NewLegacyAminoPubKey returns a new LegacyAminoPubKey. Panics if len(pubKeys) < k or 0 >= k.
func (*LegacyAminoPubKey) Address ¶
func (m *LegacyAminoPubKey) Address() cryptotypes.Address
Address implements cryptotypes.PubKey Address method
func (*LegacyAminoPubKey) Bytes ¶
func (m *LegacyAminoPubKey) Bytes() []byte
Bytes returns the proto encoded version of the LegacyAminoPubKey
func (*LegacyAminoPubKey) Descriptor ¶
func (*LegacyAminoPubKey) Descriptor() ([]byte, []int)
func (*LegacyAminoPubKey) Equals ¶
func (m *LegacyAminoPubKey) Equals(key cryptotypes.PubKey) bool
Equals returns true if m and other both have the same number of keys, and all constituent keys are the same, and in the same order.
func (*LegacyAminoPubKey) GetPubKeys ¶
func (m *LegacyAminoPubKey) GetPubKeys() []cryptotypes.PubKey
GetPubKeys implements the PubKey.GetPubKeys method
func (*LegacyAminoPubKey) GetThreshold ¶
func (m *LegacyAminoPubKey) GetThreshold() uint
GetThreshold implements the PubKey.GetThreshold method
func (*LegacyAminoPubKey) Marshal ¶
func (m *LegacyAminoPubKey) Marshal() (dAtA []byte, err error)
func (LegacyAminoPubKey) MarshalAminoJSON ¶
func (m LegacyAminoPubKey) MarshalAminoJSON() (tmMultisig, error)
MarshalAminoJSON overrides amino JSON unmarshaling.
func (*LegacyAminoPubKey) MarshalTo ¶
func (m *LegacyAminoPubKey) MarshalTo(dAtA []byte) (int, error)
func (*LegacyAminoPubKey) MarshalToSizedBuffer ¶
func (m *LegacyAminoPubKey) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LegacyAminoPubKey) ProtoMessage ¶
func (*LegacyAminoPubKey) ProtoMessage()
func (*LegacyAminoPubKey) Reset ¶
func (m *LegacyAminoPubKey) Reset()
func (*LegacyAminoPubKey) Size ¶
func (m *LegacyAminoPubKey) Size() (n int)
func (*LegacyAminoPubKey) String ¶
func (m *LegacyAminoPubKey) String() string
func (*LegacyAminoPubKey) Type ¶
func (m *LegacyAminoPubKey) Type() string
Type returns multisig type
func (*LegacyAminoPubKey) Unmarshal ¶
func (m *LegacyAminoPubKey) Unmarshal(dAtA []byte) error
func (*LegacyAminoPubKey) UnmarshalAminoJSON ¶
func (m *LegacyAminoPubKey) UnmarshalAminoJSON(tmPk tmMultisig) error
UnmarshalAminoJSON overrides amino JSON unmarshaling.
func (*LegacyAminoPubKey) UnpackInterfaces ¶
func (m *LegacyAminoPubKey) UnpackInterfaces(unpacker types.AnyUnpacker) error
UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (*LegacyAminoPubKey) VerifyMultisignature ¶
func (m *LegacyAminoPubKey) VerifyMultisignature(getSignBytes multisigtypes.GetSignBytesFunc, sig *signing.MultiSignatureData) error
VerifyMultisignature implements the multisigtypes.PubKey VerifyMultisignature method
func (*LegacyAminoPubKey) VerifySignature ¶
func (m *LegacyAminoPubKey) VerifySignature(msg []byte, sig []byte) bool
VerifySignature implements cryptotypes.PubKey VerifySignature method, it panics because it can't handle MultiSignatureData cf. https://github.com/cosmos/cosmos-sdk/issues/7109#issuecomment-686329936
func (*LegacyAminoPubKey) XXX_DiscardUnknown ¶
func (m *LegacyAminoPubKey) XXX_DiscardUnknown()
func (*LegacyAminoPubKey) XXX_Marshal ¶
func (m *LegacyAminoPubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LegacyAminoPubKey) XXX_Merge ¶
func (m *LegacyAminoPubKey) XXX_Merge(src proto.Message)
func (*LegacyAminoPubKey) XXX_Size ¶
func (m *LegacyAminoPubKey) XXX_Size() int
func (*LegacyAminoPubKey) XXX_Unmarshal ¶
func (m *LegacyAminoPubKey) XXX_Unmarshal(b []byte) error