Documentation ¶
Index ¶
- type EthereumWallet
- func (w *EthereumWallet) Address() common.Address
- func (w *EthereumWallet) PersonalSign(data []byte) ([]byte, error)
- func (w *EthereumWallet) PersonalSignString(s string) ([]byte, error)
- func (w *EthereumWallet) PrivateKey() *ecdsa.PrivateKey
- func (w *EthereumWallet) PublicKey() ecdsa.PublicKey
- func (w *EthereumWallet) Sign(data []byte) ([]byte, error)
- type HDWallet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EthereumWallet ¶
type EthereumWallet struct {
// contains filtered or unexported fields
}
EthereumWallet is a wallet with ethereum private key
func NewEthereumWalletFromHDWallet ¶
func NewEthereumWalletFromHDWallet(hdWallet *HDWallet) (*EthereumWallet, error)
func NewEthereumWalletFromKey ¶
func NewEthereumWalletFromKey(key *bip32.Key) (*EthereumWallet, error)
func (*EthereumWallet) Address ¶
func (w *EthereumWallet) Address() common.Address
Address the address of this ethereum wallet
func (*EthereumWallet) PersonalSign ¶
func (w *EthereumWallet) PersonalSign(data []byte) ([]byte, error)
PersonalSign use personal sign to sign any data
func (*EthereumWallet) PersonalSignString ¶
func (w *EthereumWallet) PersonalSignString(s string) ([]byte, error)
PersonalSignString use personal sign to sign a custom string message
func (*EthereumWallet) PrivateKey ¶
func (w *EthereumWallet) PrivateKey() *ecdsa.PrivateKey
PrivateKey the private key of this ethereum wallet
func (*EthereumWallet) PublicKey ¶
func (w *EthereumWallet) PublicKey() ecdsa.PublicKey
PublicKey the public key of this ethereum wallet
type HDWallet ¶
type HDWallet struct {
// contains filtered or unexported fields
}
HDWallet represents a Hierarchical deterministic wallet
func NewHDWallet ¶
NewHDWallet creates a HDWallet with specified mnemonic and a passphrase
func NewHDWalletPassphrase ¶
NewHDWalletPassphrase creates a HDWallet with specified mnemonic and a passphrase
func (*HDWallet) KeyForCoin ¶
KeyForCoin derive a private key from coin, account, change and address index.
func (*HDWallet) KeyForDeriveParams ¶
KeyForDeriveParams derive a private key from specified DerivePathParams.
func (*HDWallet) KeyForDerivePath ¶
KeyForDerivePath derive a private key from specified DerivePath.