Documentation ¶
Overview ¶
This work is licensed and released under GNU GPL v3 or any other later versions. The full text of the license is below/ found at <http://www.gnu.org/licenses/>
(c) 2023 Rocket Pool Pty Ltd. Modified under GNU GPL v3. [1.0.0]
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
This work is licensed and released under GNU GPL v3 or any other later versions. The full text of the license is below/ found at <http://www.gnu.org/licenses/>
(c) 2023 Rocket Pool Pty Ltd. Modified under GNU GPL v3. [1.0.0]
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
This work is licensed and released under GNU GPL v3 or any other later versions. The full text of the license is below/ found at <http://www.gnu.org/licenses/>
(c) 2023 Rocket Pool Pty Ltd. Modified under GNU GPL v3. [1.0.0]
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- Constants
- type ValidatorKey
- type Wallet
- func (w *Wallet) AddKeystore(name string, ks keystore.Keystore)
- func (w *Wallet) CreateValidatorKey() (*eth2types.BLSPrivateKey, error)
- func (w *Wallet) CreateValidatorKeyFromIndex(index uint) (*eth2types.BLSPrivateKey, error)
- func (w *Wallet) Delete() error
- func (w *Wallet) DeleteValidatorStores() 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) GetNodePrivateKey() (*ecdsa.PrivateKey, error)
- func (w *Wallet) GetNodePrivateKeyBytes() ([]byte, error)
- func (w *Wallet) GetValidatorKeyAt(index uint) (*eth2types.BLSPrivateKey, error)
- func (w *Wallet) GetValidatorKeyByPubkey(pubkey stadertypes.ValidatorPubkey) (*eth2types.BLSPrivateKey, error)
- func (w *Wallet) GetValidatorKeyCount() (uint, error)
- func (w *Wallet) GetValidatorKeys(startIndex uint, length uint) ([]ValidatorKey, 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 stadertypes.ValidatorPubkey, startIndex uint) (uint, error)
- func (w *Wallet) Reload() error
- func (w *Wallet) Save() error
- func (w *Wallet) SaveValidatorKey(key ValidatorKey) error
- func (w *Wallet) Sign(serializedTx []byte) ([]byte, error)
- func (w *Wallet) SignMessage(message string) ([]byte, error)
- func (w *Wallet) StoreValidatorKey(key *eth2types.BLSPrivateKey, path string) error
- func (w *Wallet) String() (string, error)
- func (w *Wallet) TestRecoverValidatorKey(pubkey stadertypes.ValidatorPubkey, startIndex uint) (uint, error)
- func (w *Wallet) TestRecovery(derivationPath string, walletIndex uint, mnemonic string) error
Constants ¶
const ( ValidatorKeyPath string = "m/12381/3600/%d/0/0" MaxValidatorKeyRecoverAttempts uint = 1000 )
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 ValidatorKey ¶
type ValidatorKey struct { PublicKey types.ValidatorPubkey PrivateKey *eth2types.BLSPrivateKey DerivationPath string WalletIndex uint }
A validator private/public key pair
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) AddKeystore ¶
Add a keystore to the wallet
func (*Wallet) CreateValidatorKey ¶
func (w *Wallet) CreateValidatorKey() (*eth2types.BLSPrivateKey, error)
Create a new validator key
func (*Wallet) CreateValidatorKeyFromIndex ¶
func (w *Wallet) CreateValidatorKeyFromIndex(index uint) (*eth2types.BLSPrivateKey, error)
func (*Wallet) DeleteValidatorStores ¶
Deletes all of the keystore directories and persistent VC storage
func (*Wallet) GetInitialized ¶
Attempt to initialize the wallet if not initialized and return status
func (*Wallet) GetNextValidatorKey ¶
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) GetNodePrivateKey ¶
func (w *Wallet) GetNodePrivateKey() (*ecdsa.PrivateKey, error)
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 stadertypes.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) GetValidatorKeys ¶
func (w *Wallet) GetValidatorKeys(startIndex uint, length uint) ([]ValidatorKey, error)
Recover a set of validator keys by their public key
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 stadertypes.ValidatorPubkey, startIndex uint) (uint, error)
Recover a validator key by public key
func (*Wallet) SaveValidatorKey ¶
func (w *Wallet) SaveValidatorKey(key ValidatorKey) error
Save a validator key
func (*Wallet) SignMessage ¶
Signs an arbitrary message using the wallet's private key
func (*Wallet) StoreValidatorKey ¶
func (w *Wallet) StoreValidatorKey(key *eth2types.BLSPrivateKey, path string) error
func (*Wallet) TestRecoverValidatorKey ¶
func (w *Wallet) TestRecoverValidatorKey(pubkey stadertypes.ValidatorPubkey, startIndex uint) (uint, error)
Test recovery of a validator key by public key
Directories ¶
Path | Synopsis |
---|---|
This work is licensed and released under GNU GPL v3 or any other later versions.
|
This work is licensed and released under GNU GPL v3 or any other later versions. |
lighthouse
This work is licensed and released under GNU GPL v3 or any other later versions.
|
This work is licensed and released under GNU GPL v3 or any other later versions. |
nimbus
This work is licensed and released under GNU GPL v3 or any other later versions.
|
This work is licensed and released under GNU GPL v3 or any other later versions. |
prysm
This work is licensed and released under GNU GPL v3 or any other later versions.
|
This work is licensed and released under GNU GPL v3 or any other later versions. |
teku
This work is licensed and released under GNU GPL v3 or any other later versions.
|
This work is licensed and released under GNU GPL v3 or any other later versions. |