Documentation ¶
Index ¶
- Constants
- func ActSigType(typ string) crypto.SigType
- type Key
- type MemKeyStore
- type Wallet
- func (w *Wallet) DeleteKey(addr address.Address) error
- func (w *Wallet) Export(addr address.Address) (*types.KeyInfo, error)
- func (w *Wallet) GenerateKey(typ crypto.SigType) (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) (*crypto.Signature, error)
Constants ¶
View Source
const ( KNamePrefix = "wallet-" KTrashPrefix = "trash-" KDefault = "default" KTBLS = "bls" KTSecp256k1 = "secp256k1" )
Variables ¶
This section is empty.
Functions ¶
func ActSigType ¶ added in v0.3.0
Types ¶
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 Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
func (*Wallet) GenerateKey ¶
func (*Wallet) GetDefault ¶
func (*Wallet) SetDefault ¶
Click to show internal directories.
Click to hide internal directories.