hdwallet

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package hdwallet implements SLIP-0010 hierarchical deterministic key derivation for Ed25519. Solana uses hardened-only derivation paths of the form m/44'/501'/0'/0'.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	PrivateKey []byte
	ChainCode  []byte
}

Key holds an Ed25519 private key and its chain code as produced by SLIP-0010 derivation.

func CKDPriv

func CKDPriv(key Key, index uint32) Key

CKDPriv performs SLIP-0010 hardened child key derivation. index must have the hardened bit set (index >= 1<<31).

func CreateMasterKey

func CreateMasterKey(seed []byte) Key

CreateMasterKey derives the master key from a BIP39 seed using the SLIP-0010 Ed25519 domain string "ed25519 seed".

func Derived

func Derived(path string, seed []byte) (Key, error)

Derived derives a child key from seed following path. path must be of the form m/44'/501'/0'/0' (all components hardened). Returns an error if the path is malformed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL