cosmossdk.io/client/v2@v2.0.0-beta.1/autocli/keyring/interface.go (about)

     1  package keyring
     2  
     3  import (
     4  	signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1"
     5  
     6  	cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
     7  )
     8  
     9  // Keyring is an interface used for signing transactions.
    10  // It aims to be simplistic and easy to use.
    11  type Keyring interface {
    12  	// List returns the names of all keys stored in the keyring.
    13  	List() ([]string, error)
    14  
    15  	// LookupAddressByKeyName returns the address of the key with the given name.
    16  	LookupAddressByKeyName(name string) ([]byte, error)
    17  
    18  	// GetPubKey returns the public key of the key with the given name.
    19  	GetPubKey(name string) (cryptotypes.PubKey, error)
    20  
    21  	// Sign signs the given bytes with the key with the given name.
    22  	Sign(name string, msg []byte, signMode signingv1beta1.SignMode) ([]byte, error)
    23  }