signing

package
v0.0.0-...-7657fe4 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignatureDataToProto

func SignatureDataToProto(data SignatureData) *signingv1beta1.SignatureDescriptor_Data

SignatureDataToProto converts a SignatureData to SignatureDescriptor_Data. SignatureDescriptor_Data is considered an encoding type whereas SignatureData is used for business logic.

Types

type MultiSignatureData

type MultiSignatureData struct {
	// BitArray is a compact way of indicating which signers from the multisig key
	// have signed
	BitArray *multisigv1beta1.CompactBitArray

	// Signatures is the nested SignatureData's for each signer
	Signatures []SignatureData
}

MultiSignatureData represents the nested SignatureData of a multisig signature

type SignatureData

type SignatureData interface {
	// contains filtered or unexported methods
}

SignatureData represents either a *SingleSignatureData or *MultiSignatureData. It is a convenience type that is easier to use in business logic than the encoded protobuf ModeInfo's and raw signatures.

func SignatureDataFromProto

func SignatureDataFromProto(descData *signingv1beta1.SignatureDescriptor_Data) SignatureData

SignatureDataFromProto converts a SignatureDescriptor_Data to SignatureData. SignatureDescriptor_Data is considered an encoding type whereas SignatureData is used for business logic.

type SignatureV2

type SignatureV2 struct {
	// PubKey is the public key to use for verifying the signature
	PubKey *anypb.Any

	// Data is the actual data of the signature which includes SignMode's and
	// the signatures themselves for either single or multi-signatures.
	Data SignatureData

	// Sequence is the sequence of this account. Only populated in
	// SIGN_MODE_DIRECT.
	Sequence uint64
}

SignatureV2 is a convenience type that is easier to use in application logic than the protobuf SignerInfo's and raw signature bytes. It goes beyond the first sdk.Signature types by supporting sign modes and explicitly nested multi-signatures. It is intended to be used for both building and verifying signatures.

type SingleSignatureData

type SingleSignatureData struct {
	// SignMode represents the SignMode of the signature
	SignMode signingv1beta1.SignMode

	// SignMode represents the SignMode of the signature
	Signature []byte
}

SingleSignatureData represents the signature and SignMode of a single (non-multisig) signer

Jump to

Keyboard shortcuts

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