wallet

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RetrieveAddress

func RetrieveAddress(pkStr string) (*common.Address, error)

Types

type Wallet

type Wallet interface {
	// Address returns the pubkey Address of the wallet
	Address() common.Address
	// SignTransaction returns a signed transaction
	SignTransaction(tx types.TxData) (*types.Transaction, error)
	SignTransactionForChainID(tx types.TxData, chainID *big.Int) (*types.Transaction, error)

	// SetNonce overrides the current nonce
	// The GetTransactionCount is expected to be the next nonce to use in a transaction, not the current account GetTransactionCount
	SetNonce(nonce uint64)
	// GetNonceAndIncrement atomically increments the nonce by one and returns the previous value
	GetNonceAndIncrement() uint64
	GetNonce() uint64
	ChainID() *big.Int

	// PrivateKey returns the wallets private key
	PrivateKey() *ecdsa.PrivateKey
}

func NewInMemoryWalletFromConfig

func NewInMemoryWalletFromConfig(pkStr string, l1ChainID int64, logger gethlog.Logger) Wallet

func NewInMemoryWalletFromPK

func NewInMemoryWalletFromPK(chainID *big.Int, pk *ecdsa.PrivateKey, logger gethlog.Logger) Wallet

Jump to

Keyboard shortcuts

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