Documentation ¶
Index ¶
- Constants
- Variables
- func ABIOpenFile(ctx context.Context, abiFile string) (*abi.ABI, error)
- func ForceDirToEthSigningDirLocation() string
- func GetEphemeralForkVersion(ctx context.Context) (*spec.Version, error)
- func GetForkVersion(ctx context.Context, beacon string) (*spec.Version, error)
- func MultiplyEtherUnit(mul int64, unit *big.Int) *big.Int
- func PrintJSONSlice(p filepaths.Path, dpParamSlice []*DepositDataParams, network string)
- func ValidateAndReturnBLSPubkeyBytes(blsPubKey string) ([]byte, error)
- func ValidateAndReturnEcdsaPubkeyBytes(ecdsaWithdrawalKey string) ([]byte, error)
- type DepositDataJSON
- type DepositDataParams
- type ExtendedDepositParams
- type GenesisData
- type ValidatorDepositGenerationParams
- func (vd *ValidatorDepositGenerationParams) DerivedKey(ctx context.Context, path string) (*types.BLSPrivateKey, error)
- func (vd *ValidatorDepositGenerationParams) EthDepositEncryptionAndAddMetadata(ctx context.Context, path string) (map[string]interface{}, error)
- func (vd *ValidatorDepositGenerationParams) GenerateAndEncryptValidatorKeysFromSeedAndPath(ctx context.Context, network string) error
- func (vd *ValidatorDepositGenerationParams) GenerateDerivedWithdrawalKeys(ctx context.Context) ([]string, error)
- func (vd *ValidatorDepositGenerationParams) GeneratePaddedBytesDefaultDerivedBLSWithdrawalKey(ctx context.Context) ([]byte, error)
- type ValidatorDepositParams
- type ValidatorDepositSlice
- type Web3SignerClient
- func (w *Web3SignerClient) GenerateDepositData(ctx context.Context, blsSigner bls_signer.EthBLSAccount, ...) (*DepositDataParams, error)
- func (w *Web3SignerClient) GenerateDepositDataWithDefaultWd(ctx context.Context, vdg ValidatorDepositGenerationParams, fv *spec.Version) ([]*DepositDataParams, error)
- func (w *Web3SignerClient) GenerateEphemeryDepositDataWithDefaultWd(ctx context.Context, vdg ValidatorDepositGenerationParams) ([]*DepositDataParams, error)
- func (w *Web3SignerClient) SignValidatorDepositTxToBroadcast(ctx context.Context, depositParams *DepositDataParams) (*types.Transaction, error)
Constants ¶
View Source
const ( EphemeralDepositContractAddr = "0x4242424242424242424242424242424242424242" EphemeralBeacon = "https://eth.ephemeral.zeus.fyi" BeaconGenesisPath = "/eth/v1/beacon/genesis" BeaconForkPath = "/eth/v1/beacon/states/head/fork" )
Variables ¶
View Source
var ( Gwei = big.NewInt(1e9) Szabo = big.NewInt(1e12) Finney = big.NewInt(1e15) Ether = big.NewInt(1e18) OneHundred = big.NewInt(100) ThirtyTwo = big.NewInt(32) ValidatorDeposit32Eth = big.NewInt(1).Mul(Ether, ThirtyTwo) ValidatorDeposit32EthInGweiUnits = big.NewInt(1).Mul(Gwei, ThirtyTwo) )
Functions ¶
func ForceDirToEthSigningDirLocation ¶
func ForceDirToEthSigningDirLocation() string
func GetEphemeralForkVersion ¶
func GetForkVersion ¶
func PrintJSONSlice ¶
func PrintJSONSlice(p filepaths.Path, dpParamSlice []*DepositDataParams, network string)
func ValidateAndReturnBLSPubkeyBytes ¶
ValidateAndReturnBLSPubkeyBytes is borrowed from https://github.com/wealdtech/ethdo
func ValidateAndReturnEcdsaPubkeyBytes ¶
ValidateAndReturnEcdsaPubkeyBytes is borrowed from https://github.com/wealdtech/ethdo
Types ¶
type DepositDataJSON ¶
type DepositDataJSON struct { Pubkey string `json:"pubkey"` WithdrawalCredentials string `json:"withdrawal_credentials"` Signature string `json:"signature"` Amount int `json:"amount"` DepositDataRoot string `json:"deposit_data_root"` DepositMessageRoot string `json:"deposit_message_root"` ForkVersion string `json:"fork_version"` }
type DepositDataParams ¶
type DepositDataParams struct { *spec.DepositData DepositDataRoot [32]byte DepositMessageRoot [32]byte ForkVersion *spec.Version }
func (*DepositDataParams) FormatJSON ¶
func (dd *DepositDataParams) FormatJSON() DepositDataJSON
func (*DepositDataParams) GetValidatorDepositParamsStringValues ¶
func (dd *DepositDataParams) GetValidatorDepositParamsStringValues() ValidatorDepositParams
type ExtendedDepositParams ¶
type GenesisData ¶
type ValidatorDepositGenerationParams ¶
type ValidatorDepositGenerationParams struct { Fp filepaths.Path Mnemonic, Pw string ValidatorIndexOffset, NumValidators int // used for looping derivations WithdrawalKeyIndexOffset, NumWithdrawalKeys int }
func (*ValidatorDepositGenerationParams) DerivedKey ¶
func (vd *ValidatorDepositGenerationParams) DerivedKey(ctx context.Context, path string) (*types.BLSPrivateKey, error)
func (*ValidatorDepositGenerationParams) EthDepositEncryptionAndAddMetadata ¶
func (*ValidatorDepositGenerationParams) GenerateAndEncryptValidatorKeysFromSeedAndPath ¶
func (vd *ValidatorDepositGenerationParams) GenerateAndEncryptValidatorKeysFromSeedAndPath(ctx context.Context, network string) error
func (*ValidatorDepositGenerationParams) GenerateDerivedWithdrawalKeys ¶
func (vd *ValidatorDepositGenerationParams) GenerateDerivedWithdrawalKeys(ctx context.Context) ([]string, error)
func (*ValidatorDepositGenerationParams) GeneratePaddedBytesDefaultDerivedBLSWithdrawalKey ¶
func (vd *ValidatorDepositGenerationParams) GeneratePaddedBytesDefaultDerivedBLSWithdrawalKey(ctx context.Context) ([]byte, error)
type ValidatorDepositParams ¶
type ValidatorDepositSlice ¶
type ValidatorDepositSlice []ExtendedDepositParams
type Web3SignerClient ¶
type Web3SignerClient struct {
web3_actions.Web3Actions
}
func NewWeb3Client ¶
func NewWeb3Client(nodeUrl string, acc *accounts.Account) Web3SignerClient
func (*Web3SignerClient) GenerateDepositData ¶
func (w *Web3SignerClient) GenerateDepositData(ctx context.Context, blsSigner bls_signer.EthBLSAccount, withdrawalAddress []byte, forkVersion *spec.Version) (*DepositDataParams, error)
func (*Web3SignerClient) GenerateDepositDataWithDefaultWd ¶
func (w *Web3SignerClient) GenerateDepositDataWithDefaultWd(ctx context.Context, vdg ValidatorDepositGenerationParams, fv *spec.Version) ([]*DepositDataParams, error)
func (*Web3SignerClient) GenerateEphemeryDepositDataWithDefaultWd ¶
func (w *Web3SignerClient) GenerateEphemeryDepositDataWithDefaultWd(ctx context.Context, vdg ValidatorDepositGenerationParams) ([]*DepositDataParams, error)
func (*Web3SignerClient) SignValidatorDepositTxToBroadcast ¶
func (w *Web3SignerClient) SignValidatorDepositTxToBroadcast(ctx context.Context, depositParams *DepositDataParams) (*types.Transaction, error)
Click to show internal directories.
Click to hide internal directories.