Documentation ¶
Index ¶
- type KeystoreType
- type SoftWallet
- func (w *SoftWallet) Delete(address common.Address, password string) error
- func (w *SoftWallet) Derive(path types.DerivationPath, pin bool) (common.Address, error)
- func (w *SoftWallet) GetPublicKey(address common.Address) (*crypto.PublicKey, error)
- func (w *SoftWallet) ID() string
- func (w *SoftWallet) IsUnlocked(address common.Address) bool
- func (w *SoftWallet) List() ([]common.Address, error)
- func (w *SoftWallet) Lock(address common.Address) error
- func (w *SoftWallet) NewKey(password string) (common.Address, error)
- func (w *SoftWallet) Sign(address common.Address, txrlp common.Bytes) (*crypto.Signature, error)
- func (w *SoftWallet) Status() (string, error)
- func (w *SoftWallet) Unlock(address common.Address, password string, derivationPath types.DerivationPath) error
- func (w *SoftWallet) UpdatePassword(address common.Address, oldPassword, newPassword string) error
- type UnlockedKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeystoreType ¶
type KeystoreType int
const ( KeystoreTypeEncrypted KeystoreType = iota KeystoreTypePlain )
type SoftWallet ¶
type SoftWallet struct {
// contains filtered or unexported fields
}
func NewSoftWallet ¶
func NewSoftWallet(keysDirPath string, kstype KeystoreType) (*SoftWallet, error)
func (*SoftWallet) Delete ¶
func (w *SoftWallet) Delete(address common.Address, password string) error
Delete deletes a key from disk permanently
func (*SoftWallet) Derive ¶
func (w *SoftWallet) Derive(path types.DerivationPath, pin bool) (common.Address, error)
Derive is not supported for SoftWallet
func (*SoftWallet) GetPublicKey ¶
GetPublicKey returns the public key of the address if the address has been unlocked
func (*SoftWallet) IsUnlocked ¶
func (w *SoftWallet) IsUnlocked(address common.Address) bool
IsUnlocked indicates whether a key is unlocked
func (*SoftWallet) List ¶
func (w *SoftWallet) List() ([]common.Address, error)
List returns the addresses of all the keys
func (*SoftWallet) Lock ¶
func (w *SoftWallet) Lock(address common.Address) error
Lock locks an unlocked key
func (*SoftWallet) NewKey ¶
func (w *SoftWallet) NewKey(password string) (common.Address, error)
NewKey creates a new key
func (*SoftWallet) Sign ¶
Sign signs the transaction bytes for an address if the address has been unlocked
func (*SoftWallet) Status ¶
func (w *SoftWallet) Status() (string, error)
Status returns the status of the wallet
func (*SoftWallet) Unlock ¶
func (w *SoftWallet) Unlock(address common.Address, password string, derivationPath types.DerivationPath) error
Unlock unlocks a key if the password is correct
func (*SoftWallet) UpdatePassword ¶
func (w *SoftWallet) UpdatePassword(address common.Address, oldPassword, newPassword string) error
UpdatePassword updates the password for a key
type UnlockedKey ¶
Click to show internal directories.
Click to hide internal directories.