bip32

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DriveFrom

func DriveFrom(key *DrivedKey, path string) ([]byte, error)

DriveFrom driver key from path

Types

type DrivedKey

type DrivedKey struct {
	Param      KeyParam
	PublicKey  []byte // 33 bytes
	PrivateKey []byte // 32 bytes
	ChainCode  []byte // 32 bytes
}

DrivedKey .

func FromMnemonic

func FromMnemonic(param KeyParam, mnemonic string, password string) (*DrivedKey, error)

FromMnemonic .

func NewMasterKey

func NewMasterKey(seed []byte, param KeyParam) (*DrivedKey, error)

NewMasterKey create new master key from seed

func (*DrivedKey) ChildKey

func (key *DrivedKey) ChildKey(index bip44.Number) (*DrivedKey, error)

ChildKey get child key

type KeyParam

type KeyParam interface {
	// PrivateToPublic(privateKey []byte) []byte
	Curve() elliptic.Curve
}

KeyParam .

type PublicKeyF

type PublicKeyF func(privateKey []byte) []byte

PublicKeyF .

Jump to

Keyboard shortcuts

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