Documentation ¶
Index ¶
- Constants
- type Wallet
- func (w *Wallet) AddFeeRecipientManager(name string, fm fees.FeeRecipientManager)
- func (w *Wallet) AddKeystore(name string, ks keystore.Keystore)
- func (w *Wallet) CheckFeeRecipientFile(feeRecipient common.Address) (bool, bool, error)
- func (w *Wallet) CreateValidatorKey() (*eth2types.BLSPrivateKey, error)
- func (w *Wallet) GetChainID() *big.Int
- func (w *Wallet) GetInitialized() (bool, error)
- func (w *Wallet) GetNextValidatorKey() (*eth2types.BLSPrivateKey, error)
- func (w *Wallet) GetNodeAccount() (accounts.Account, error)
- func (w *Wallet) GetNodeAccountTransactor() (*bind.TransactOpts, error)
- func (w *Wallet) GetNodePrivateKeyBytes() ([]byte, error)
- func (w *Wallet) GetValidatorKeyAt(index uint) (*eth2types.BLSPrivateKey, error)
- func (w *Wallet) GetValidatorKeyByPubkey(pubkey rptypes.ValidatorPubkey) (*eth2types.BLSPrivateKey, error)
- func (w *Wallet) GetValidatorKeyCount() (uint, error)
- func (w *Wallet) Initialize(derivationPath string, walletIndex uint) (string, error)
- func (w *Wallet) IsInitialized() bool
- func (w *Wallet) Recover(derivationPath string, walletIndex uint, mnemonic string) error
- func (w *Wallet) RecoverValidatorKey(pubkey rptypes.ValidatorPubkey) error
- func (w *Wallet) Reload() error
- func (w *Wallet) Save() error
- func (w *Wallet) Sign(serializedTx []byte) ([]byte, error)
- func (w *Wallet) StoreValidatorKey(key *eth2types.BLSPrivateKey, path string) error
- func (w *Wallet) String() (string, error)
- func (w *Wallet) TestRecoverValidatorKey(pubkey rptypes.ValidatorPubkey) error
- func (w *Wallet) TestRecovery(derivationPath string, walletIndex uint, mnemonic string) error
- func (w *Wallet) UpdateFeeRecipientFile(feeRecipient common.Address) error
Constants ¶
const ( ValidatorKeyPath = "m/12381/3600/%d/0/0" MaxValidatorKeyRecoverAttempts = 100 )
Config
const ( EntropyBits = 256 FileMode = 0600 DefaultNodeKeyPath = "m/44'/60'/0'/0/%d" LedgerLiveNodeKeyPath = "m/44'/60'/%d/0/0" MyEtherWalletNodeKeyPath = "m/44'/60'/0'/%d" )
Config
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
Wallet
func NewWallet ¶
func NewWallet(walletPath string, chainId uint, maxFee *big.Int, maxPriorityFee *big.Int, gasLimit uint64, passwordManager *passwords.PasswordManager) (*Wallet, error)
Create new wallet
func (*Wallet) AddFeeRecipientManager ¶ added in v1.5.0
func (w *Wallet) AddFeeRecipientManager(name string, fm fees.FeeRecipientManager)
Add a fee recipient manager to the wallet
func (*Wallet) AddKeystore ¶
Add a keystore to the wallet
func (*Wallet) CheckFeeRecipientFile ¶ added in v1.5.0
Check if the fee recipient file for this wallet's validators exists, and has the correct address as the default Note: only call this after the merge contracts have been deployed! Use shared/utils/rp.IsMergeUpdateDeployed() to check.
func (*Wallet) CreateValidatorKey ¶
func (w *Wallet) CreateValidatorKey() (*eth2types.BLSPrivateKey, error)
Create a new validator key
func (*Wallet) GetChainID ¶ added in v1.1.0
Gets the wallet's chain ID
func (*Wallet) GetInitialized ¶
Attempt to initialize the wallet if not initialized and return status
func (*Wallet) GetNextValidatorKey ¶ added in v1.0.0
func (w *Wallet) GetNextValidatorKey() (*eth2types.BLSPrivateKey, error)
Returns the next validator key that will be generated without saving it
func (*Wallet) GetNodeAccount ¶
Get the node account
func (*Wallet) GetNodeAccountTransactor ¶
func (w *Wallet) GetNodeAccountTransactor() (*bind.TransactOpts, error)
Get a transactor for the node account
func (*Wallet) GetNodePrivateKeyBytes ¶
Get the node account private key bytes
func (*Wallet) GetValidatorKeyAt ¶
func (w *Wallet) GetValidatorKeyAt(index uint) (*eth2types.BLSPrivateKey, error)
Get a validator key by index
func (*Wallet) GetValidatorKeyByPubkey ¶
func (w *Wallet) GetValidatorKeyByPubkey(pubkey rptypes.ValidatorPubkey) (*eth2types.BLSPrivateKey, error)
Get a validator key by public key
func (*Wallet) GetValidatorKeyCount ¶
Get the number of validator keys recorded in the wallet
func (*Wallet) Initialize ¶
Initialize the wallet from a random seed
func (*Wallet) IsInitialized ¶
Check if the wallet has been initialized
func (*Wallet) RecoverValidatorKey ¶
func (w *Wallet) RecoverValidatorKey(pubkey rptypes.ValidatorPubkey) error
Recover a validator key by public key
func (*Wallet) StoreValidatorKey ¶ added in v1.4.3
func (w *Wallet) StoreValidatorKey(key *eth2types.BLSPrivateKey, path string) error
func (*Wallet) TestRecoverValidatorKey ¶ added in v1.4.3
func (w *Wallet) TestRecoverValidatorKey(pubkey rptypes.ValidatorPubkey) error
Test recovery of a validator key by public key
func (*Wallet) TestRecovery ¶ added in v1.3.1
Recover a wallet from a mnemonic - only used for testing mnemonics
func (*Wallet) UpdateFeeRecipientFile ¶ added in v1.5.0
Store the fee recipient file for this wallet's validators Note: only call this after the merge contracts have been deployed! Use shared/utils/rp.IsMergeUpdateDeployed() to check.