Versions in this module Expand all Collapse all v1 v1.0.0 Aug 15, 2021 Changes in this version + const KDefault + const KNamePrefix + const KTrashPrefix + var NilDefault nilDefault + func ActSigType(typ types.KeyType) crypto.SigType + type Default interface + GetDefault func(ctx context.Context) (address.Address, error) + SetDefault func(ctx context.Context, a address.Address) error + type Key struct + Address address.Address + PublicKey []byte + func GenerateKey(typ types.KeyType) (*Key, error) + func GenerateKeyFromSeed(typ types.KeyType, seed []byte) (*Key, error) + func NewKey(keyinfo types.KeyInfo) (*Key, error) + type LocalWallet struct + func KeyWallet(keys ...*Key) *LocalWallet + func NewWallet(keystore types.KeyStore) (*LocalWallet, error) + func (w *LocalWallet) Get() api.WalletAPI + func (w *LocalWallet) GetDefault(ctx context.Context) (address.Address, error) + func (w *LocalWallet) SetDefault(ctx context.Context, a address.Address) error + func (w *LocalWallet) WalletDelete(ctx context.Context, addr address.Address) error + func (w *LocalWallet) WalletExport(ctx context.Context, addr address.Address) (*types.KeyInfo, error) + func (w *LocalWallet) WalletHas(ctx context.Context, addr address.Address) (bool, error) + func (w *LocalWallet) WalletImport(ctx context.Context, ki *types.KeyInfo) (address.Address, error) + func (w *LocalWallet) WalletList(ctx context.Context) ([]address.Address, error) + func (w *LocalWallet) WalletNew(ctx context.Context, typ types.KeyType) (address.Address, error) + func (w *LocalWallet) WalletNewFromSeed(typ types.KeyType, seed []byte) (address.Address, error) + func (w *LocalWallet) WalletSign(ctx context.Context, addr address.Address, msg []byte, meta api.MsgMeta) (*crypto.Signature, error) + type MemKeyStore struct + func NewMemKeyStore() *MemKeyStore + func (mks *MemKeyStore) Delete(k string) error + func (mks *MemKeyStore) Get(k string) (types.KeyInfo, error) + func (mks *MemKeyStore) List() ([]string, error) + func (mks *MemKeyStore) Put(k string, ki types.KeyInfo) error + type MultiWallet struct + Ledger *ledgerwallet.LedgerWallet + Local *LocalWallet + Remote *remotewallet.RemoteWallet + func (m MultiWallet) WalletDelete(ctx context.Context, address address.Address) error + func (m MultiWallet) WalletExport(ctx context.Context, address address.Address) (*types.KeyInfo, error) + func (m MultiWallet) WalletHas(ctx context.Context, address address.Address) (bool, error) + func (m MultiWallet) WalletImport(ctx context.Context, info *types.KeyInfo) (address.Address, error) + func (m MultiWallet) WalletList(ctx context.Context) ([]address.Address, error) + func (m MultiWallet) WalletNew(ctx context.Context, keyType types.KeyType) (address.Address, error) + func (m MultiWallet) WalletSign(ctx context.Context, signer address.Address, toSign []byte, meta api.MsgMeta) (*crypto.Signature, error)