mnemonics

package
v0.0.0-...-e8a7bc5 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeriveKey

func DeriveKey(masterKey *bip32.Key, path string) (*ecdsa.PrivateKey, error)

deriveKey derives a key from the master key using the specified path

func GetAddressFromKey

func GetAddressFromKey(key *ecdsa.PrivateKey) common.Address

getAddressFromKey generates an Ethereum address from the private key

func Loop

func Loop()

Types

type Mnemonic

type Mnemonic struct {
	MasterKey *bip32.Key
}

func NewFromSN

func NewFromSN(SN string) (*Mnemonic, error)

func (*Mnemonic) GetAddresses

func (d *Mnemonic) GetAddresses(path_format string, start_from int, count int) ([]common.Address, []string, error)

func (Mnemonic) Sign

func (d Mnemonic) Sign(msg *bus.Message, data []byte, path string) (string, error)

func (Mnemonic) SignTx

func (d Mnemonic) SignTx(chain_id int64, tx *types.Transaction, path string) (*types.Transaction, error)

func (Mnemonic) SignTypedData

func (d Mnemonic) SignTypedData(msg *bus.Message, typedData apitypes.TypedData, path string) (string, error)

Jump to

Keyboard shortcuts

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