Documentation
¶
Index ¶
- Variables
- type NDWallet
- func (wallet *NDWallet) AccountByID(id uuid.UUID) (core.ValidatorAccount, error)
- func (wallet *NDWallet) AccountByPublicKey(pubKey string) (core.ValidatorAccount, error)
- func (wallet *NDWallet) Accounts() []core.ValidatorAccount
- func (wallet *NDWallet) AddValidatorAccount(account core.ValidatorAccount) error
- func (wallet *NDWallet) CreateValidatorAccount(seed []byte, indexPointer *int) (core.ValidatorAccount, error)
- func (wallet *NDWallet) DeleteAccountByPublicKey(pubKey string) error
- func (wallet *NDWallet) GetNextAccountIndex() int
- func (wallet *NDWallet) ID() uuid.UUID
- func (wallet *NDWallet) MarshalJSON() ([]byte, error)
- func (wallet *NDWallet) SetContext(ctx *core.WalletContext)
- func (wallet *NDWallet) Type() core.WalletType
- func (wallet *NDWallet) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAccountNotFound is the error when account not found ErrAccountNotFound = errors.New("account not found") )
Predefined errors
Functions ¶
This section is empty.
Types ¶
type NDWallet ¶
type NDWallet struct {
// contains filtered or unexported fields
}
an hierarchical deterministic wallet
func NewNDWallet ¶
func NewNDWallet(context *core.WalletContext) *NDWallet
func (*NDWallet) AccountByID ¶
AccountByID provides a nd account from the wallet given its ID. This will error if the account is not found.
func (*NDWallet) AccountByPublicKey ¶
func (wallet *NDWallet) AccountByPublicKey(pubKey string) (core.ValidatorAccount, error)
AccountByPublicKey provides a nd account from the wallet given its public key. This will error if the account is not found.
func (*NDWallet) Accounts ¶
func (wallet *NDWallet) Accounts() []core.ValidatorAccount
Accounts provides all accounts in the wallet.
func (*NDWallet) AddValidatorAccount ¶
func (wallet *NDWallet) AddValidatorAccount(account core.ValidatorAccount) error
func (*NDWallet) CreateValidatorAccount ¶
func (wallet *NDWallet) CreateValidatorAccount(seed []byte, indexPointer *int) (core.ValidatorAccount, error)
CreateValidatorKey creates a new validation (validator) key pair in the wallet.
func (*NDWallet) DeleteAccountByPublicKey ¶
func (*NDWallet) GetNextAccountIndex ¶
GetNextAccountIndex provides next index to create account at.
func (*NDWallet) MarshalJSON ¶
func (*NDWallet) SetContext ¶
func (wallet *NDWallet) SetContext(ctx *core.WalletContext)
func (*NDWallet) Type ¶
func (wallet *NDWallet) Type() core.WalletType
Type provides the type of the wallet.
func (*NDWallet) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.