wallet

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKey

func NewKey() (*ecdsa.PrivateKey, error)

Types

type Wallet

type Wallet struct {
	ApiKey    string
	PublicKey common.Address
	// contains filtered or unexported fields
}

func NewWalletFromKey

func NewWalletFromKey(storage *iTypes.IWalletStorage, apiKey string, key *ecdsa.PrivateKey) (*Wallet, error)

func NewWalletFromStorage

func NewWalletFromStorage(storage *iTypes.IWalletStorage, apiKey string, address common.Address) (*Wallet, error)

func NewWalletFromString

func NewWalletFromString(storage *iTypes.IWalletStorage, apiKey string, key string) (*Wallet, error)

func (*Wallet) FromSerializable

func (w *Wallet) FromSerializable(ws *iTypes.WalletSerializable) error

func (*Wallet) GetTxOpts

func (w *Wallet) GetTxOpts(chainId *big.Int) (*bind.TransactOpts, error)

func (*Wallet) ReplaceKey

func (w *Wallet) ReplaceKey(newApiKey string) error

func (*Wallet) Sign

func (w *Wallet) Sign(data []byte) ([]byte, error)

func (*Wallet) SignTX

func (w *Wallet) SignTX(tx *types.Transaction, chainId *big.Int) (*types.Transaction, error)

func (*Wallet) ToSerializable

func (w *Wallet) ToSerializable() *iTypes.WalletSerializable

type WalletManager

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

func NewWalletManager

func NewWalletManager(client *ethclient.Client, config *config.WalletManagerConfig) (*WalletManager, error)

func (*WalletManager) GetByAddress

func (wm *WalletManager) GetByAddress(apiKey string, address common.Address) (*Wallet, error)

func (*WalletManager) New

func (wm *WalletManager) New(apiKey string) (*Wallet, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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