Documentation ¶
Index ¶
- Constants
- Variables
- type Default
- type LocalWallet
- func (w *LocalWallet) Get() api.Wallet
- func (w *LocalWallet) GetDefault() (address.Address, error)
- func (w *LocalWallet) SetDefault(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) 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, addr 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 ¶
This section is empty.
Types ¶
type LocalWallet ¶ added in v0.9.1
type LocalWallet struct {
// contains filtered or unexported fields
}
func KeyWallet ¶
func KeyWallet(keys ...*key.Key) *LocalWallet
func (*LocalWallet) Get ¶ added in v0.10.1
func (w *LocalWallet) Get() api.Wallet
func (*LocalWallet) GetDefault ¶ added in v0.9.1
func (w *LocalWallet) GetDefault() (address.Address, error)
func (*LocalWallet) SetDefault ¶ added in v0.9.1
func (w *LocalWallet) SetDefault(a address.Address) error
func (*LocalWallet) WalletDelete ¶ added in v0.9.1
func (w *LocalWallet) WalletDelete(ctx context.Context, addr address.Address) error
func (*LocalWallet) WalletExport ¶ added in v0.9.1
func (*LocalWallet) WalletHas ¶ added in v0.9.1
func (w *LocalWallet) WalletHas(ctx context.Context, addr address.Address) (bool, error)
func (*LocalWallet) WalletImport ¶ added in v0.9.1
func (*LocalWallet) WalletList ¶ added in v0.9.1
func (w *LocalWallet) WalletList(ctx context.Context) ([]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 ¶ added in v0.10.1
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 ¶ added in v0.10.1
func (m MultiWallet) WalletDelete(ctx context.Context, address address.Address) error
func (MultiWallet) WalletExport ¶ added in v0.10.1
func (MultiWallet) WalletHas ¶ added in v0.10.1
func (m MultiWallet) WalletHas(ctx context.Context, address address.Address) (bool, error)
func (MultiWallet) WalletImport ¶ added in v0.10.1
func (MultiWallet) WalletList ¶ added in v0.10.1
func (m MultiWallet) WalletList(ctx context.Context) ([]address.Address, error)
Click to show internal directories.
Click to hide internal directories.