wallet

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSeedPhrase = "test test test test test test test test test test test junk"

Variables

This section is empty.

Functions

This section is empty.

Types

type BundlerWalletDetails

type BundlerWalletDetails struct {
	Beneficiary       common.Address
	Mnemonic          string
	EntryPointAddress common.Address
}

BundlerWalletDetails contains the details of the bundler wallet

type DevAccount

type DevAccount struct {
	Address       common.Address
	PublicKey     *ecdsa.PublicKey
	PrivateKey    *ecdsa.PrivateKey
	PrivateKeyHex string
	Balance       *big.Int
}

DevAccount contains the details of the default development account

func GenerateAccountsFromSeed

func GenerateAccountsFromSeed(seedPhrase string, numAccounts int) ([]DevAccount, error)

generateAccountsFromSeed generates a number of accounts from a seed phrase

type PreDeployedContracts

type PreDeployedContracts struct {
	EntryPointAddress           common.Address
	SimpleAccountFactoryAddress common.Address
	GlobalCounterAddress        common.Address
}

PreDeployedContracts contains the pre-deployed contracts

type Wallet

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

Wallet contains the details of the wallet for Betsy

func NewWallet

func NewWallet(ctx context.Context, ethNodePort string, coinbaseKeystoreFile string) (*Wallet, error)

NewWallet creates a new wallet for Betsy

func (*Wallet) GetBundlerWalletDetails

func (w *Wallet) GetBundlerWalletDetails() BundlerWalletDetails

GetBundlerWalletDetails returns the details of the bundler wallet

func (*Wallet) GetDevAccounts

func (w *Wallet) GetDevAccounts(ctx context.Context) ([]DevAccount, error)

GetDevAccounts returns the default development accounts

func (*Wallet) GetEthClient

func (w *Wallet) GetEthClient() *ethclient.Client

GetEthClient returns the Ethereum client

func (*Wallet) GetGethClient

func (w *Wallet) GetGethClient() *gethclient.Client

GetGethClient returns the Geth client

func (*Wallet) GetKeyStoreAccounts

func (w *Wallet) GetKeyStoreAccounts() []common.Address

GetKeyStoreAccounts returns all the accounts in the keystore

func (*Wallet) GetPreDeployedContracts

func (w *Wallet) GetPreDeployedContracts() PreDeployedContracts

GetPreDeployedContracts returns the pre-deployed contracts

Jump to

Keyboard shortcuts

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