Documentation ¶
Index ¶
- Constants
- type Key
- type MemKeyStore
- type Wallet
- func (w *Wallet) Export(addr address.Address) (*types.KeyInfo, error)
- func (w *Wallet) GenerateKey(typ string) (address.Address, error)
- func (w *Wallet) GetDefault() (address.Address, error)
- func (w *Wallet) HasKey(addr address.Address) (bool, error)
- func (w *Wallet) Import(ki *types.KeyInfo) (address.Address, error)
- func (w *Wallet) ListAddrs() ([]address.Address, error)
- func (w *Wallet) SetDefault(a address.Address) error
- func (w *Wallet) Sign(ctx context.Context, addr address.Address, msg []byte) (*types.Signature, error)
Constants ¶
View Source
const ( KNamePrefix = "wallet-" KDefault = "default" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
func GenerateKey ¶
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
Click to show internal directories.
Click to hide internal directories.