Documentation ¶
Index ¶
Constants ¶
View Source
const ( // FirstHardenedIndex is the index of the first hardened key (2^31). // https://youtu.be/2HrMlVr1QX8?t=390 FirstHardenedIndex = uint32(0x80000000) )
Variables ¶
View Source
var ( ErrInvalidPath = fmt.Errorf("invalid derivation path") ErrNoPublicDerivation = fmt.Errorf("no public derivation for ed25519") )
Functions ¶
func IsValidPath ¶
IsValidPath check whether or not the path has valid segments.
Types ¶
type Node ¶
type Node interface { Derive(i uint32) (Node, error) Keypair() (ed25519.PublicKey, ed25519.PrivateKey) PrivateKey() []byte PublicKeyWithPrefix() []byte RawSeed() []byte }
func DeriveForPath ¶
DeriveForPath derives key for a path in BIP-44 format and a seed. Ed25119 derivation operated on hardened keys only.
func NewMasterNode ¶
NewMasterNode generates a new master key from seed.
Click to show internal directories.
Click to hide internal directories.