Documentation ¶
Index ¶
- Constants
- Variables
- func ActSigType(typ types.KeyType) crypto.SigType
- type Default
- type Key
- type LocalWallet
- 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
- type MultiWallet
- 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)
Constants ¶
View Source
const ( KNamePrefix = "wallet-" KTrashPrefix = "trash-" KDefault = "default" )
Variables ¶
View Source
var NilDefault nilDefault
Functions ¶
Types ¶
type LocalWallet ¶
type LocalWallet struct {
// contains filtered or unexported fields
}
func KeyWallet ¶
func KeyWallet(keys ...*Key) *LocalWallet
func (*LocalWallet) Get ¶
func (w *LocalWallet) Get() api.WalletAPI
func (*LocalWallet) GetDefault ¶
func (w *LocalWallet) GetDefault(ctx context.Context) (address.Address, error)
func (*LocalWallet) SetDefault ¶
func (w *LocalWallet) SetDefault(ctx context.Context, a address.Address) error
func (*LocalWallet) WalletDelete ¶
func (w *LocalWallet) WalletDelete(ctx context.Context, addr address.Address) error
func (*LocalWallet) WalletExport ¶
func (*LocalWallet) WalletHas ¶
func (w *LocalWallet) WalletHas(ctx context.Context, addr address.Address) (bool, error)
func (*LocalWallet) WalletImport ¶
func (*LocalWallet) WalletList ¶
func (w *LocalWallet) WalletList(ctx context.Context) ([]address.Address, error)
func (*LocalWallet) WalletNewFromSeed ¶
func (w *LocalWallet) WalletNewFromSeed(typ types.KeyType, seed []byte) (address.Address, error)
type MemKeyStore ¶
type MemKeyStore struct {
// contains filtered or unexported fields
}
func NewMemKeyStore ¶
func NewMemKeyStore() *MemKeyStore
func (*MemKeyStore) Delete ¶
func (mks *MemKeyStore) Delete(k string) error
Delete removes a key from keystore
func (*MemKeyStore) Get ¶
func (mks *MemKeyStore) Get(k string) (types.KeyInfo, error)
Get gets a key out of keystore and returns KeyInfo corresponding to named key
func (*MemKeyStore) List ¶
func (mks *MemKeyStore) List() ([]string, error)
List lists all the keys stored in the KeyStore
type MultiWallet ¶
type MultiWallet struct { fx.In // "constructed" with fx.In instead of normal constructor Local *LocalWallet `optional:"true"` Remote *remotewallet.RemoteWallet `optional:"true"` Ledger *ledgerwallet.LedgerWallet `optional:"true"` }
func (MultiWallet) WalletDelete ¶
func (m MultiWallet) WalletDelete(ctx context.Context, address address.Address) error
func (MultiWallet) WalletExport ¶
func (MultiWallet) WalletHas ¶
func (m MultiWallet) WalletHas(ctx context.Context, address address.Address) (bool, error)
func (MultiWallet) WalletImport ¶
func (MultiWallet) WalletList ¶
func (m MultiWallet) WalletList(ctx context.Context) ([]address.Address, error)
Click to show internal directories.
Click to hide internal directories.