Documentation ¶
Index ¶
- func BalanceEth(balance float64) *big.Int
- func BalanceHuman(balance *big.Int) float64
- type Wallet
- func (w *Wallet) AccountString() string
- func (w *Wallet) Address() common.Address
- func (w *Wallet) AesKey(peerPub ed25519.PublicKey) (key []byte, err error)
- func (w *Wallet) AesKey2(peerId account.BeatleAddress) (key []byte, err error)
- func (w *Wallet) BalanceOf(force bool) (float64, error)
- func (w *Wallet) BalanceOfGas(accPoint string) (float64, error)
- func (w *Wallet) BtlAddress() account.BeatleAddress
- func (w *Wallet) BtlPeerDecrypt(peerPub ed25519.PublicKey, cipherBytes []byte) (plainBytes []byte, err error)
- func (w *Wallet) BtlPeerDecrypt2(peerId account.BeatleAddress, cipherBytes []byte) (plainBytes []byte, err error)
- func (w *Wallet) BtlPeerEncrypt(peerPub ed25519.PublicKey, plainBytes []byte) (cipherBytes []byte, err error)
- func (w *Wallet) BtlPeerEncrypt2(peerId account.BeatleAddress, plainBytes []byte) (cipherBytes []byte, err error)
- func (w *Wallet) BtlSign(data []byte) []byte
- func (w *Wallet) BtlVerifySig(data, sig []byte) bool
- func (w *Wallet) CheckReceipt(sendMeAddr common.Address, txHash common.Hash) (float64, error)
- func (w *Wallet) CheckReceiptWithNonce(sendMeAddr common.Address, txHash common.Hash, nonce uint64) (float64, error)
- func (w *Wallet) ExportWallet() (string, error)
- func (w *Wallet) Gas() (float64, float64, error)
- func (w *Wallet) Load(auth string) error
- func (w *Wallet) Nonce() (uint64, error)
- func (w *Wallet) PrivKey() *ecdsa.PrivateKey
- func (w *Wallet) RecoverEthAccount(hexString, auth string) error
- func (w *Wallet) RecoverWallet(walletString, auth string) error
- func (w *Wallet) Save(auth string) error
- func (w *Wallet) SendTo(to common.Address, balance float64) (*common.Hash, error)
- func (w *Wallet) SendToWithNonce(to common.Address, balance float64, nonce uint64, gas float64) (*common.Hash, error)
- func (w *Wallet) String(auth string) (string, error)
- type WalletIntf
- func CreateProtectWallet(walletSavePath string, remoteEthServer string, protect func(fd int32) bool, ...) WalletIntf
- func CreateWallet(walletSavePath string, remoteEthServer string) WalletIntf
- func NewWallet(walletSavePath string, remoteEthServer string) WalletIntf
- func RecoverWallet(walletSavePath, remoteEthServer, auth string) (WalletIntf, error)
- type WalletSaveJson
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BalanceEth ¶
func BalanceHuman ¶
Types ¶
type Wallet ¶
type Wallet struct { SavePath string RemoteEthServer string // contains filtered or unexported fields }
func (*Wallet) AccountString ¶
func (*Wallet) AesKey2 ¶
func (w *Wallet) AesKey2(peerId account.BeatleAddress) (key []byte, err error)
func (*Wallet) BtlAddress ¶
func (w *Wallet) BtlAddress() account.BeatleAddress
func (*Wallet) BtlPeerDecrypt ¶
func (*Wallet) BtlPeerDecrypt2 ¶
func (*Wallet) BtlPeerEncrypt ¶
func (*Wallet) BtlPeerEncrypt2 ¶
func (*Wallet) BtlVerifySig ¶
func (*Wallet) CheckReceipt ¶
func (*Wallet) CheckReceiptWithNonce ¶
func (*Wallet) ExportWallet ¶
func (*Wallet) PrivKey ¶
func (w *Wallet) PrivKey() *ecdsa.PrivateKey
func (*Wallet) RecoverEthAccount ¶
func (*Wallet) RecoverWallet ¶
func (*Wallet) SendToWithNonce ¶
type WalletIntf ¶
type WalletIntf interface { BalanceOf(force bool) (float64, error) BalanceOfGas(accPoint string) (float64, error) SendTo(to common.Address, balance float64) (*common.Hash, error) SendToWithNonce(to common.Address, balance float64, nonce uint64, gas float64) (*common.Hash, error) Nonce() (uint64, error) Gas() (float64, float64, error) Address() common.Address AccountString() string BtlAddress() account.BeatleAddress CheckReceipt(sendMeAddr common.Address, txHash common.Hash) (float64, error) CheckReceiptWithNonce(sendMeAddr common.Address, txHash common.Hash, nonce uint64) (float64, error) Save(auth string) error Load(auth string) error BtlSign(data []byte) []byte BtlVerifySig(data, sig []byte) bool BtlPeerEncrypt(peerPub ed25519.PublicKey, plainBytes []byte) (cipherBytes []byte, err error) BtlPeerEncrypt2(peerId account.BeatleAddress, plainBytes []byte) (cipherBytes []byte, err error) BtlPeerDecrypt(peerPub ed25519.PublicKey, cipherBytes []byte) (plainBytes []byte, err error) BtlPeerDecrypt2(peerId account.BeatleAddress, cipherBytes []byte) (plainBytes []byte, err error) AesKey(peerPub ed25519.PublicKey) (key []byte, err error) AesKey2(peerId account.BeatleAddress) (key []byte, err error) RecoverEthAccount(hexString, auth string) error ExportWallet() (string, error) RecoverWallet(walletString, auth string) error String(auth string) (string, error) PrivKey() *ecdsa.PrivateKey }
func CreateProtectWallet ¶
func CreateWallet ¶
func CreateWallet(walletSavePath string, remoteEthServer string) WalletIntf
func NewWallet ¶
func NewWallet(walletSavePath string, remoteEthServer string) WalletIntf
func RecoverWallet ¶
func RecoverWallet(walletSavePath, remoteEthServer, auth string) (WalletIntf, error)
type WalletSaveJson ¶
Click to show internal directories.
Click to hide internal directories.