addresspath

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPath = errors.New("the key path is invalid")

ErrInvalidPath describes an error in which the key path is invalid.

Functions

func Harden added in v1.11.0

func Harden[T constraints.Integer](i T) uint32

Harden hardens the integer value 'i' by adding 0x80000000 (2^31) to it. This function does not check if 'i' is already hardened.

func UnHarden added in v1.11.0

func UnHarden[T constraints.Integer](i T) uint32

UnHarden unhardens the integer value 'i' by subtracting 0x80000000 (2^31) from it. This function does not check if 'i' is already non-hardened.

Types

type CoinType added in v1.11.0

type CoinType uint32
const (
	CoinTypePactusMainnet CoinType = 21888
	CoinTypePactusTestnet CoinType = 21777
)

type Path

type Path []uint32

func FromString added in v1.1.0

func FromString(str string) (Path, error)

func NewPath

func NewPath(indexes ...uint32) Path

func (Path) AddressIndex added in v0.18.0

func (p Path) AddressIndex() uint32

func (Path) AddressType

func (p Path) AddressType() crypto.AddressType

func (Path) CoinType added in v0.18.0

func (p Path) CoinType() CoinType

func (Path) Purpose added in v0.18.0

func (p Path) Purpose() Purpose

func (Path) String

func (p Path) String() string

type Purpose added in v1.11.0

type Purpose uint32
const (
	PurposeBLS12381         Purpose = 12381
	PurposeBIP44            Purpose = 44
	PurposeImportPrivateKey Purpose = 65535
)

Jump to

Keyboard shortcuts

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