wallet

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TxID

type TxID = string

type Wallet

type Wallet interface {
	SendTransaction(ctx context.Context, tx *types.Transaction) (TxID, error)
	GetTransactionReceipt(ctx context.Context, txID TxID) (*types.Receipt, error)
	// SenderAddress returns the address of the wallet
	SenderAddress(ctx context.Context) (common.Address, error)
}

Wallet is an interface for signing and sending transactions to the network This interface is used to abstract the process of sending transactions to the Ethereum network For example, for an MPC signer, the transaction would be broadcasted via an external API endpoint and the status is tracked via another external endpoint instead of being broadcasted and retrieved via an Ethereum client.

func GetLocalGetWallet

func GetLocalGetWallet(
	privateKeyStorePath string,
	ethClient eth.Client,
	chainID *big.Int,
	logger log.Logger,
) (Wallet, gethcommon.Address, error)

func GetLocalGetWalletByPrivateKey

func GetLocalGetWalletByPrivateKey(
	privateKey *ecdsa.PrivateKey,
	ethClient eth.Client,
	chainID *big.Int, logger log.Logger,
) (Wallet, gethcommon.Address, error)

func NewPrivateKeyWallet

func NewPrivateKeyWallet(
	ethClient eth.Client,
	signer signerv2.SignerFn,
	signerAddress common.Address,
	logger log.Logger,
) (Wallet, error)

Jump to

Keyboard shortcuts

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