Versions in this module Expand all Collapse all v0 v0.1.0 May 8, 2026 Changes in this version + const AppBIP39 + const AppBase64 + const AppBase85 + const AppDice + const AppHex + const AppRSA + const AppWIF + const AppXPRV + const Base64MaxLen + const Base64MinLen + const Base85MaxLen + const Base85MinLen + const DiceMaxSides + const DiceMinSides + const GPGCreationTimestamp + const HexMaxBytes + const HexMinBytes + const LangChineseSimplified + const LangChineseTraditional + const LangCzech + const LangEnglish + const LangFrench + const LangItalian + const LangJapanese + const LangKorean + const LangPortuguese + const LangSpanish + const RSAMaxBits + const RSAMinBits + var ErrCorruptedWordlist = errors.New("bip85: corrupted BIP39 wordlist (SHA256 mismatch)") + var ErrEmptyKeyMaterial = errors.New("bip85: empty key material") + var ErrIncompletePath = errors.New("bip85: incomplete derivation path") + var ErrInvalidDiceRolls = errors.New("bip85: invalid dice rolls") + var ErrInvalidDiceSides = errors.New("bip85: invalid dice sides") + var ErrInvalidHMACKey = errors.New("bip85: HMAC key must not be nil or empty") + var ErrInvalidKey = errors.New("bip85: invalid extended key") + var ErrInvalidKeyRange = errors.New("bip85: derived key out of valid range, try next index") + var ErrInvalidLanguage = errors.New("bip85: invalid language code") + var ErrInvalidLength = errors.New("bip85: invalid length parameter") + var ErrInvalidPath = errors.New("bip85: invalid derivation path") + var ErrInvalidWordCount = errors.New("bip85: invalid word count") + var ErrNilKey = errors.New("bip85: nil key") + var ErrNonHardenedComponent = errors.New("bip85: all path components must be hardened") + var ErrPostProcessorShort = errors.New("bip85: post-processor must return at least 64 bytes") + var ErrPublicKeyNotAllowed = errors.New("bip85: private extended key required, got public key") + func DecodeWIF(wif string, net *chaincfg.Params) (key []byte, compressed bool, err error) + func DeriveBIP39(entropy []byte, language uint32, words int) (string, error) + func DeriveBase64(entropy []byte, pwdLen int) (string, error) + func DeriveBase85(entropy []byte, pwdLen int) (string, error) + func DeriveDice(entropy []byte, sides uint32, rolls int) (values []int, formatted string, err error) + func DeriveEntropy(key *hdkeychain.ExtendedKey, path Path, opts ...Option) ([]byte, error) + func DeriveEntropyFromString(xprv string, path Path, opts ...Option) ([]byte, error) + func DeriveHex(entropy []byte, numBytes int) (string, error) + func DeriveKeyAndEntropy(key *hdkeychain.ExtendedKey, path Path, opts ...Option) (derivedKey, entropy []byte, err error) + func DeriveRolls(entropy []byte, sides uint32, rolls int) ([]int, error) + func DeriveWIF(entropy []byte, net *chaincfg.Params) (string, error) + func DeriveXPRV(entropy []byte, net *chaincfg.Params) (string, error) + func EntropyFromRawKey(privateKey []byte, opts ...Option) ([]byte, error) + func FormatRolls(rollValues []int, sides uint32) string + func ParseKey(xprv string) (*hdkeychain.ExtendedKey, error) + func ValidateSecp256k1Key(key []byte) error + func ZeroBytes(buf []byte) + type DRNG struct + func NewDRNG(entropy []byte) *DRNG + func (d *DRNG) Read(p []byte) (int, error) + type Option func(*derivationConfig) + func WithCustomDeriver(fn func(root *hdkeychain.ExtendedKey, path Path) ([]byte, error)) Option + func WithEntropyPostProcessor(fn func(entropy []byte) ([]byte, error)) Option + func WithHMACKey(key []byte) Option + type Path struct + func BIP39Path(language, words, index uint32) Path + func Base64Path(pwdLen, index uint32) Path + func Base85Path(pwdLen, index uint32) Path + func CorePath(appCode, index uint32) Path + func DicePath(sides, rolls, index uint32) Path + func HexPath(numBytes, index uint32) Path + func ParsePath(s string) (Path, error) + func RSAPath(keyBits, keyIndex uint32) Path + func WIFPath(index uint32) Path + func XPRVPath(index uint32) Path + func (p Path) Components() []uint32 + func (p Path) Len() int + func (p Path) String() string