multisig

package
v0.41.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
var (
	ErrInvalidLengthKeys        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowKeys          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupKeys = fmt.Errorf("proto: unexpected end of group")
)
View Source
var AminoCdc = codec.NewLegacyAmino()

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) 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) 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/JaTochNietDan/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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL