hd_wallet

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package hd_wallet HD钱包

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HDWallet

type HDWallet struct {
	// contains filtered or unexported fields
}

func NewHDWalletFromMnemonic

func NewHDWalletFromMnemonic(mnemonic string, password string) (*HDWallet, error)

Function NewWalletFromMnemonic 通过种子创建钱包

func NewHDWalletFromSeed

func NewHDWalletFromSeed(seed []byte) *HDWallet

Function NewHDWalletFromSeed 通过种子创建HD钱包

func (*HDWallet) GetAddress

func (Sef *HDWallet) GetAddress(path string, addressType common.AddressType, args any) (string, error)

Function GetAddress 获取地址

func (*HDWallet) GetBalance

func (Self *HDWallet) GetBalance(chainType common.ChainType, address string, token string) (float64, error)

Function GetBalance 查询余额

func (*HDWallet) GetCurrentHeight

func (Self *HDWallet) GetCurrentHeight(chainType common.ChainType) (uint64, error)

Function GetCurrentHeight 获取当前高度

func (*HDWallet) GetPrivateKey

func (Self *HDWallet) GetPrivateKey() ([]byte, error)

Function GetPrivateKey 获取根私钥

func (*HDWallet) GetPrivateKeyByPath

func (Self *HDWallet) GetPrivateKeyByPath(path string) ([]byte, error)

Function GetPrivateKeyByPath 获取子私钥

func (*HDWallet) GetTransaction

func (Self *HDWallet) GetTransaction(chainType common.ChainType, txHash string) (*types.Transaction, error)

Function GetTransaction 查询交易

func (*HDWallet) NewClient

func (Self *HDWallet) NewClient(chainType common.ChainType, args any) error

Function NewClient 创建客户端

func (*HDWallet) Seed

func (Self *HDWallet) Seed() []byte

Function Seed 种子

func (*HDWallet) Transfer

func (Self *HDWallet) Transfer(chainType common.ChainType, privateKey []byte, to string, token string, value float64) (string, error)

Function Transfer 转账

Jump to

Keyboard shortcuts

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