hdpath

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const HardenedSymbol = "'"

Variables

This section is empty.

Functions

This section is empty.

Types

type Path

type Path string

func MustParse

func MustParse(s string) Path

func Parse

func Parse(s string) (Path, error)

func (Path) Child

func (p Path) Child(i uint32) Path

func (Path) Indexes

func (p Path) Indexes() []PathIndex

Indexes returns the derivation indexes corresponding to this path.

The following paths are valid:

"" (root key) "m" (root key) "/" (root key) "m/0'" (hardened child #0 of the root key) "/0'" (hardened child #0 of the root key) "0'" (hardened child #0 of the root key) "m/44'/1'/2'" (BIP44 testnet account #2) "/44'/1'/2'" (BIP44 testnet account #2) "44'/1'/2'" (BIP44 testnet account #2) "m/schema:1'" (Muun schema path)

The following paths are invalid:

"m / 0 / 1" (contains spaces) "m/b/c" (alphabetical characters instead of numerical indexes) "m/1.2^3" (contains illegal characters)

func (Path) IndexesFrom

func (p Path) IndexesFrom(parentPath Path) []PathIndex

IndexesFrom returns the indexes starting from the given parent path.

func (Path) NamedChild

func (p Path) NamedChild(name string, i uint32) Path

func (Path) String

func (p Path) String() string

type PathIndex

type PathIndex struct {
	Index    uint32
	Hardened bool
	Name     string
}

Jump to

Keyboard shortcuts

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