Documentation ¶
Overview ¶
Package derivation provides functions for ed25519 key derivation as described in: https://github.com/satoshilabs/slips/blob/master/slip-0010.md
Index ¶
Constants ¶
View Source
const ( // HcnetAccountPrefix is a prefix for Hcnet key pairs derivation. HcnetAccountPrefix = "m/44'/148'" // HcnetPrimaryAccountPath is a derivation path of the primary account. HcnetPrimaryAccountPath = "m/44'/148'/0'" // HcnetAccountPathFormat is a path format used for Hcnet key pair // derivation as described in SEP-00XX. Use with `fmt.Sprintf` and `DeriveForPath`. HcnetAccountPathFormat = "m/44'/148'/%d'" // FirstHardenedIndex is the index of the first hardened key. FirstHardenedIndex = uint32(0x80000000) )
Variables ¶
View Source
var ( ErrInvalidPath = errors.New("Invalid derivation path") ErrNoPublicDerivation = errors.New("No public derivation for ed25519") )
Functions ¶
This section is empty.
Types ¶
type Key ¶
func DeriveForPath ¶
DeriveForPath derives key for a path in BIP-44 format and a seed. Ed25119 derivation operated on hardened keys only.
func NewMasterKey ¶
NewMasterKey generates a new master key from seed.
Click to show internal directories.
Click to hide internal directories.