Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultDerivationPath = "m/44'/60'/0'/0/%d"
DefaultDerivationPath is the default derivation path used
Functions ¶
func CreateDerivationPath ¶
func CreateDerivationPath(index int) (accounts.DerivationPath, error)
CreateDerivationPath creates a derivation path from an index using DefaultDerivationPath
func ParseDerivationPath ¶
func ParseDerivationPath(path string) (accounts.DerivationPath, error)
ParseDerivationPath parses the provided derivation path
Types ¶
type Derived ¶
type Derived struct { ExtendedKey *hd.ExtendedKey Address common.Address PrivateKey *ecdsa.PrivateKey PublicKey ecdsa.PublicKey }
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
func NewFromSeed ¶
NewFromSeed creates a new Wallet instance from a seed
func (*Wallet) Derive ¶
func (w *Wallet) Derive(path accounts.DerivationPath) (*Derived, error)
Derive derives an extended key from the masterKey using the provided derivation path. It also derives the corresponding private key, public key, and address at that path
func (*Wallet) MasterKey ¶
func (w *Wallet) MasterKey() *hd.ExtendedKey
MasterKey returns the master key
Click to show internal directories.
Click to hide internal directories.