hdwallet

package
v0.1.43 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenPrivKeyFromSecret

func GenPrivKeyFromSecret(seed []byte, c PolySignature) (interface{}, error)

func GetPublicKeyFromSeed

func GetPublicKeyFromSeed(seed []byte, c PolySignature, compressed bool) ([]byte, error)

func NewMnemonic

func NewMnemonic(wordCount int, lang string) (string, error)

func RawPubKeyToETHAddress added in v0.1.39

func RawPubKeyToETHAddress(concat []byte) common.Address

Types

type PolyAddressExport

type PolyAddressExport struct {
	Path string `json:",omitempty"`
	// contains filtered or unexported fields
}

type PolySignature

type PolySignature int
const (
	SignatureSecp256k1 PolySignature = iota
	SignatureEd25519
	SignatureSr25519
)

type PolyWallet

type PolyWallet struct {
	Mnemonic   string
	Passphrase string
	// contains filtered or unexported fields
}

func NewPolyWallet

func NewPolyWallet(mnemonic, password string) (*PolyWallet, error)

func NewPolyWalletFromSeed

func NewPolyWalletFromSeed(seed []byte) (*PolyWallet, error)

func (*PolyWallet) ExportHDAddresses

func (p *PolyWallet) ExportHDAddresses(count int) (*PolyWalletExport, error)

func (*PolyWallet) ExportRootAddress

func (p *PolyWallet) ExportRootAddress() (*PolyWalletExport, error)

func (*PolyWallet) GetKey

func (p *PolyWallet) GetKey() (*bip32.Key, error)

func (*PolyWallet) GetKeyForPath

func (p *PolyWallet) GetKeyForPath(inputPath string) (*bip32.Key, error)

func (*PolyWallet) SetIterations

func (p *PolyWallet) SetIterations(iterations uint) error

func (*PolyWallet) SetPath

func (p *PolyWallet) SetPath(path string) error

func (*PolyWallet) SetUseRawEntropy

func (p *PolyWallet) SetUseRawEntropy(e bool) error

type PolyWalletExport

type PolyWalletExport struct {
	RootKey           string               `json:",omitempty"`
	Seed              string               `json:",omitempty"`
	Mnemonic          string               `json:",omitempty"`
	Passphrase        string               `json:",omitempty"`
	DerivationPath    string               `json:",omitempty"`
	AccountPublicKey  string               `json:",omitempty"`
	AccountPrivateKey string               `json:",omitempty"`
	BIP32PublicKey    string               `json:",omitempty"`
	BIP32PrivateKey   string               `json:",omitempty"`
	Addresses         []*PolyAddressExport `json:",omitempty"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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