Documentation
¶
Overview ¶
Package hd_wallet HD钱包
Index ¶
- type HDWallet
- func (Sef *HDWallet) GetAddress(path string, addressType common.AddressType, args any) (string, error)
- func (Self *HDWallet) GetBalance(chainType common.ChainType, address string, token string) (float64, error)
- func (Self *HDWallet) GetCurrentHeight(chainType common.ChainType) (uint64, error)
- func (Self *HDWallet) GetPrivateKey() ([]byte, error)
- func (Self *HDWallet) GetPrivateKeyByPath(path string) ([]byte, error)
- func (Self *HDWallet) GetTransaction(chainType common.ChainType, txHash string) (*types.Transaction, error)
- func (Self *HDWallet) NewClient(chainType common.ChainType, args any) error
- func (Self *HDWallet) Seed() []byte
- func (Self *HDWallet) Transfer(chainType common.ChainType, privateKey []byte, to string, token string, ...) (string, error)
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 ¶
Function NewWalletFromMnemonic 通过种子创建钱包
func NewHDWalletFromSeed ¶
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 ¶
Function GetCurrentHeight 获取当前高度
func (*HDWallet) GetPrivateKey ¶
Function GetPrivateKey 获取根私钥
func (*HDWallet) GetPrivateKeyByPath ¶
Function GetPrivateKeyByPath 获取子私钥
func (*HDWallet) GetTransaction ¶
func (Self *HDWallet) GetTransaction(chainType common.ChainType, txHash string) (*types.Transaction, error)
Function GetTransaction 查询交易
Click to show internal directories.
Click to hide internal directories.