cosmos-sdk: Index | Files | Directories

package signing

import ""


Package Files

handler_map.go sig_verifiable_tx.go sign_mode_handler.go verify.go

func VerifySignature Uses

func VerifySignature(pubKey crypto.PubKey, signerData SignerData, sigData signing.SignatureData, handler SignModeHandler, tx sdk.Tx) error

VerifySignature verifies a transaction signature contained in SignatureData abstracting over different signing modes and single vs multi-signatures.

type SigFeeMemoTx Uses

type SigFeeMemoTx interface {

SigFeeMemoTx defines an interface for transactions that support all standard message, signature, fee and memo interfaces.

type SigVerifiableTx Uses

type SigVerifiableTx interface {
    GetSigners() []types.AccAddress
    GetPubKeys() []crypto.PubKey // If signer already has pubkey in context, this list will have nil in its place
    GetSignatures() [][]byte
    GetSignaturesV2() ([]signing.SignatureV2, error)

SigVerifiableTx defines a Tx interface for all signature verification decorators

type SignModeHandler Uses

type SignModeHandler interface {
    // DefaultMode is the default mode that is to be used with this handler if no
    // other mode is specified. This can be useful for testing and CLI usage
    DefaultMode() signing.SignMode

    // Modes is the list of modes supporting by this handler
    Modes() []signing.SignMode

    // GetSignBytes returns the sign bytes for the provided SignMode, SignerData and Tx,
    // or an error
    GetSignBytes(mode signing.SignMode, data SignerData, tx sdk.Tx) ([]byte, error)

SignModeHandler defines a interface to be implemented by types which will handle SignMode's by generating sign bytes from a Tx and SignerData

type SignModeHandlerMap Uses

type SignModeHandlerMap struct {
    // contains filtered or unexported fields

SignModeHandlerMap is SignModeHandler that aggregates multiple SignModeHandler's into a single handler

func NewSignModeHandlerMap Uses

func NewSignModeHandlerMap(defaultMode signing.SignMode, handlers []SignModeHandler) SignModeHandlerMap

NewSignModeHandlerMap returns a new SignModeHandlerMap with the provided defaultMode and handlers

func (SignModeHandlerMap) DefaultMode Uses

func (h SignModeHandlerMap) DefaultMode() signing.SignMode

DefaultMode implements SignModeHandler.DefaultMode

func (SignModeHandlerMap) GetSignBytes Uses

func (h SignModeHandlerMap) GetSignBytes(mode signing.SignMode, data SignerData, tx sdk.Tx) ([]byte, error)

DefaultMode implements SignModeHandler.GetSignBytes

func (SignModeHandlerMap) Modes Uses

func (h SignModeHandlerMap) Modes() []signing.SignMode

Modes implements SignModeHandler.Modes

type SignerData Uses

type SignerData struct {
    // ChainID is the chain that this transaction is targeted
    ChainID string

    // AccountNumber is the account number of the signer
    AccountNumber uint64

    // AccountSequence is the account sequence number of the signer that is used
    // for replay protection
    AccountSequence uint64

SignerData is the specific information needed to sign a transaction that generally isn't included in the transaction body itself



Package signing imports 5 packages (graph) and is imported by 9 packages. Updated 2020-08-05. Refresh now. Tools for package owners.