legacy_multisig

package
v0.0.0-...-eab7081 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 16 Imported by: 3

Documentation

Index

Constants

View Source
const (
	MERKLE_ROOT_OFFSET    = 0
	MERKLE_INDEX_OFFSET   = 32
	ORIGIN_MAILBOX_OFFSET = 36
	MERKLE_PROOF_OFFSET   = 68
	THRESHOLD_OFFSET      = 1092
	SIGNATURES_OFFSET     = 1093
	SIGNATURE_LENGTH      = 65
)

Legacy metadata

Variables

View Source
var (
	ErrInvalidLengthLegacyMultisig        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLegacyMultisig          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLegacyMultisig = fmt.Errorf("proto: unexpected end of group")
)

Functions

func Digest

func Digest(origin uint32, originMailbox []byte, root []byte, index uint32) []byte

func DomainHash

func DomainHash(origin uint32, originMailbox []byte) []byte

func Index

func Index(metadata []byte) uint32

func OriginMailbox

func OriginMailbox(metadata []byte) []byte

func Proof

func Proof(metadata []byte) []byte

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers the LegacyMultiSig implementations and interfaces.

func Root

func Root(metadata []byte) []byte

func SignatureAt

func SignatureAt(metadata []byte, index uint32) []byte

func Threshold

func Threshold(metadata []byte) uint8

func VerifyMerkleProof

func VerifyMerkleProof(metadata []byte, message []byte) bool

Types

type LegacyMultiSig

type LegacyMultiSig struct {
	// Validator pub keys
	ValidatorPubKeys []string `protobuf:"bytes,1,rep,name=validator_pub_keys,json=validatorPubKeys,proto3" json:"validator_pub_keys,omitempty"`
	// number of validators required
	Threshold uint32 `protobuf:"varint,2,opt,name=threshold,proto3" json:"threshold,omitempty"`
}

LegacyMultiSig ISM for a specific origin

func (*LegacyMultiSig) CustomIsmEvent

func (i *LegacyMultiSig) CustomIsmEvent(index uint32) sdk.Event

func (*LegacyMultiSig) DefaultIsmEvent

func (i *LegacyMultiSig) DefaultIsmEvent(origin uint32) sdk.Event

func (*LegacyMultiSig) Descriptor

func (*LegacyMultiSig) Descriptor() ([]byte, []int)

func (*LegacyMultiSig) Marshal

func (m *LegacyMultiSig) Marshal() (dAtA []byte, err error)

func (*LegacyMultiSig) MarshalTo

func (m *LegacyMultiSig) MarshalTo(dAtA []byte) (int, error)

func (*LegacyMultiSig) MarshalToSizedBuffer

func (m *LegacyMultiSig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LegacyMultiSig) ProtoMessage

func (*LegacyMultiSig) ProtoMessage()

func (*LegacyMultiSig) Reset

func (m *LegacyMultiSig) Reset()

func (*LegacyMultiSig) Size

func (m *LegacyMultiSig) Size() (n int)

func (*LegacyMultiSig) String

func (m *LegacyMultiSig) String() string

func (*LegacyMultiSig) Unmarshal

func (m *LegacyMultiSig) Unmarshal(dAtA []byte) error

func (*LegacyMultiSig) Validate

func (i *LegacyMultiSig) Validate() error

func (*LegacyMultiSig) Verify

func (i *LegacyMultiSig) Verify(metadata []byte, message []byte) (bool, error)

func (*LegacyMultiSig) VerifyValidatorSignatures

func (i *LegacyMultiSig) VerifyValidatorSignatures(metadata []byte, message []byte) bool

func (*LegacyMultiSig) XXX_DiscardUnknown

func (m *LegacyMultiSig) XXX_DiscardUnknown()

func (*LegacyMultiSig) XXX_Marshal

func (m *LegacyMultiSig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LegacyMultiSig) XXX_Merge

func (m *LegacyMultiSig) XXX_Merge(src proto.Message)

func (*LegacyMultiSig) XXX_Size

func (m *LegacyMultiSig) XXX_Size() int

func (*LegacyMultiSig) XXX_Unmarshal

func (m *LegacyMultiSig) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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