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

     1  package keyring
     2  
     3  import (
     4  	"errors"
     5  
     6  	signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1"
     7  
     8  	cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
     9  )
    10  
    11  var _ Keyring = NoKeyring{}
    12  
    13  var errNoKeyring = errors.New("no keyring configured")
    14  
    15  type NoKeyring struct{}
    16  
    17  func (k NoKeyring) List() ([]string, error) {
    18  	return nil, errNoKeyring
    19  }
    20  
    21  func (k NoKeyring) LookupAddressByKeyName(name string) ([]byte, error) {
    22  	return nil, errNoKeyring
    23  }
    24  
    25  func (k NoKeyring) GetPubKey(name string) (cryptotypes.PubKey, error) {
    26  	return nil, errNoKeyring
    27  }
    28  
    29  func (k NoKeyring) Sign(name string, msg []byte, signMode signingv1beta1.SignMode) ([]byte, error) {
    30  	return nil, errNoKeyring
    31  }