Documentation ¶
Index ¶
- type ApiClient
- type ServiceRequester
- func (r *ServiceRequester) ClientStatus() (*types.ApiResponse[api.ServiceClientStatusData], error)
- func (r *ServiceRequester) GetConfig() (*types.ApiResponse[api.ServiceGetConfigData], error)
- func (r *ServiceRequester) GetContext() client.IRequesterContext
- func (r *ServiceRequester) GetName() string
- func (r *ServiceRequester) GetRoute() string
- func (r *ServiceRequester) RestartContainer(container string) (*types.ApiResponse[types.SuccessData], error)
- func (r *ServiceRequester) TerminateDataFolder() (*types.ApiResponse[api.ServiceTerminateDataFolderData], error)
- func (r *ServiceRequester) Version() (*types.ApiResponse[api.ServiceVersionData], error)
- type TxRequester
- func (r *TxRequester) GetContext() client.IRequesterContext
- func (r *TxRequester) GetName() string
- func (r *TxRequester) GetRoute() string
- func (r *TxRequester) SignTx(txSubmission *eth.TransactionSubmission, nonce *big.Int, maxFee *big.Int, ...) (*types.ApiResponse[api.TxSignTxData], error)
- func (r *TxRequester) SignTxBatch(txSubmissions []*eth.TransactionSubmission, firstNonce *big.Int, ...) (*types.ApiResponse[api.TxBatchSignTxData], error)
- func (r *TxRequester) SubmitTx(txSubmission *eth.TransactionSubmission, nonce *big.Int, maxFee *big.Int, ...) (*types.ApiResponse[api.TxData], error)
- func (r *TxRequester) SubmitTxBatch(txSubmissions []*eth.TransactionSubmission, firstNonce *big.Int, ...) (*types.ApiResponse[api.BatchTxData], error)
- func (r *TxRequester) WaitForTransaction(txHash common.Hash) (*types.ApiResponse[types.SuccessData], error)
- type UtilsRequester
- type WalletRequester
- func (r *WalletRequester) Balance() (*types.ApiResponse[api.WalletBalanceData], error)
- func (r *WalletRequester) DeletePassword() (*types.ApiResponse[types.SuccessData], error)
- func (r *WalletRequester) Export() (*types.ApiResponse[api.WalletExportData], error)
- func (r *WalletRequester) ExportEthKey() (*types.ApiResponse[api.WalletExportEthKeyData], error)
- func (r *WalletRequester) GenerateValidatorKey(path string) (*types.ApiResponse[api.WalletGenerateValidatorKeyData], error)
- func (r *WalletRequester) GetContext() client.IRequesterContext
- func (r *WalletRequester) GetName() string
- func (r *WalletRequester) GetRoute() string
- func (r *WalletRequester) Initialize(derivationPath *string, index *uint64, saveWallet bool, password string, ...) (*types.ApiResponse[api.WalletInitializeData], error)
- func (r *WalletRequester) Masquerade(address common.Address) (*types.ApiResponse[types.SuccessData], error)
- func (r *WalletRequester) Recover(derivationPath *string, mnemonic string, index *uint64, password string, ...) (*types.ApiResponse[api.WalletRecoverData], error)
- func (r *WalletRequester) RestoreAddress() (*types.ApiResponse[types.SuccessData], error)
- func (r *WalletRequester) SearchAndRecover(mnemonic string, address common.Address, password string, save bool) (*types.ApiResponse[api.WalletSearchAndRecoverData], error)
- func (r *WalletRequester) Send(amount *big.Int, token string, recipient common.Address) (*types.ApiResponse[api.WalletSendData], error)
- func (r *WalletRequester) SendMessage(message []byte, address common.Address) (*types.ApiResponse[types.TxInfoData], error)
- func (r *WalletRequester) SetEnsName(name string) (*types.ApiResponse[api.WalletSetEnsNameData], error)
- func (r *WalletRequester) SetPassword(password string, save bool) (*types.ApiResponse[types.SuccessData], error)
- func (r *WalletRequester) SignMessage(message []byte) (*types.ApiResponse[api.WalletSignMessageData], error)
- func (r *WalletRequester) SignTx(message []byte) (*types.ApiResponse[api.WalletSignTxData], error)
- func (r *WalletRequester) Status() (*types.ApiResponse[api.WalletStatusData], error)
- func (r *WalletRequester) TestRecover(derivationPath *string, mnemonic string, index *uint64) (*types.ApiResponse[api.WalletRecoverData], error)
- func (r *WalletRequester) TestSearchAndRecover(mnemonic string, address common.Address) (*types.ApiResponse[api.WalletSearchAndRecoverData], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiClient ¶
type ApiClient struct { Service *ServiceRequester Tx *TxRequester Utils *UtilsRequester Wallet *WalletRequester // contains filtered or unexported fields }
Binder for the Hyperdrive daemon API server
func NewApiClient ¶
Creates a new API client instance
type ServiceRequester ¶
type ServiceRequester struct {
// contains filtered or unexported fields
}
func NewServiceRequester ¶
func NewServiceRequester(context client.IRequesterContext) *ServiceRequester
func (*ServiceRequester) ClientStatus ¶
func (r *ServiceRequester) ClientStatus() (*types.ApiResponse[api.ServiceClientStatusData], error)
Gets the status of the configured Execution and Beacon clients
func (*ServiceRequester) GetConfig ¶
func (r *ServiceRequester) GetConfig() (*types.ApiResponse[api.ServiceGetConfigData], error)
Gets the Hyperdrive configuration
func (*ServiceRequester) GetContext ¶
func (r *ServiceRequester) GetContext() client.IRequesterContext
func (*ServiceRequester) GetName ¶
func (r *ServiceRequester) GetName() string
func (*ServiceRequester) GetRoute ¶
func (r *ServiceRequester) GetRoute() string
func (*ServiceRequester) RestartContainer ¶
func (r *ServiceRequester) RestartContainer(container string) (*types.ApiResponse[types.SuccessData], error)
Restarts a Docker container
func (*ServiceRequester) TerminateDataFolder ¶
func (r *ServiceRequester) TerminateDataFolder() (*types.ApiResponse[api.ServiceTerminateDataFolderData], error)
Deletes the data folder including the wallet file, password file, and all validator keys. Don't use this unless you have a very good reason to do it (such as switching from Prater to Mainnet).
func (*ServiceRequester) Version ¶
func (r *ServiceRequester) Version() (*types.ApiResponse[api.ServiceVersionData], error)
Gets the version of the daemon
type TxRequester ¶
type TxRequester struct {
// contains filtered or unexported fields
}
func NewTxRequester ¶
func NewTxRequester(context client.IRequesterContext) *TxRequester
func (*TxRequester) GetContext ¶
func (r *TxRequester) GetContext() client.IRequesterContext
func (*TxRequester) GetName ¶
func (r *TxRequester) GetName() string
func (*TxRequester) GetRoute ¶
func (r *TxRequester) GetRoute() string
func (*TxRequester) SignTx ¶
func (r *TxRequester) SignTx(txSubmission *eth.TransactionSubmission, nonce *big.Int, maxFee *big.Int, maxPriorityFee *big.Int) (*types.ApiResponse[api.TxSignTxData], error)
Use the node private key to sign a transaction without submitting it
func (*TxRequester) SignTxBatch ¶
func (r *TxRequester) SignTxBatch(txSubmissions []*eth.TransactionSubmission, firstNonce *big.Int, maxFee *big.Int, maxPriorityFee *big.Int) (*types.ApiResponse[api.TxBatchSignTxData], error)
Use the node private key to sign a batch of transactions without submitting them
func (*TxRequester) SubmitTx ¶
func (r *TxRequester) SubmitTx(txSubmission *eth.TransactionSubmission, nonce *big.Int, maxFee *big.Int, maxPriorityFee *big.Int) (*types.ApiResponse[api.TxData], error)
Submit a transaction
func (*TxRequester) SubmitTxBatch ¶
func (r *TxRequester) SubmitTxBatch(txSubmissions []*eth.TransactionSubmission, firstNonce *big.Int, maxFee *big.Int, maxPriorityFee *big.Int) (*types.ApiResponse[api.BatchTxData], error)
Submit a batch of transactions
func (*TxRequester) WaitForTransaction ¶
func (r *TxRequester) WaitForTransaction(txHash common.Hash) (*types.ApiResponse[types.SuccessData], error)
Wait for a transaction
type UtilsRequester ¶
type UtilsRequester struct {
// contains filtered or unexported fields
}
func NewUtilsRequester ¶
func NewUtilsRequester(context client.IRequesterContext) *UtilsRequester
func (*UtilsRequester) GetContext ¶
func (r *UtilsRequester) GetContext() client.IRequesterContext
func (*UtilsRequester) GetName ¶
func (r *UtilsRequester) GetName() string
func (*UtilsRequester) GetRoute ¶
func (r *UtilsRequester) GetRoute() string
func (*UtilsRequester) ResolveEns ¶
func (r *UtilsRequester) ResolveEns(address common.Address, name string) (*types.ApiResponse[api.UtilsResolveEnsData], error)
Resolves an ENS name or reserve resolves an address
type WalletRequester ¶
type WalletRequester struct {
// contains filtered or unexported fields
}
func NewWalletRequester ¶
func NewWalletRequester(context client.IRequesterContext) *WalletRequester
func (*WalletRequester) Balance ¶
func (r *WalletRequester) Balance() (*types.ApiResponse[api.WalletBalanceData], error)
Get the node address's ETH balance
func (*WalletRequester) DeletePassword ¶
func (r *WalletRequester) DeletePassword() (*types.ApiResponse[types.SuccessData], error)
Delete the wallet keystore's password from disk
func (*WalletRequester) Export ¶
func (r *WalletRequester) Export() (*types.ApiResponse[api.WalletExportData], error)
Export wallet
func (*WalletRequester) ExportEthKey ¶
func (r *WalletRequester) ExportEthKey() (*types.ApiResponse[api.WalletExportEthKeyData], error)
Export the wallet in encrypted ETH key format
func (*WalletRequester) GenerateValidatorKey ¶
func (r *WalletRequester) GenerateValidatorKey(path string) (*types.ApiResponse[api.WalletGenerateValidatorKeyData], error)
Generate a validator key derived from the node wallet's seed
func (*WalletRequester) GetContext ¶
func (r *WalletRequester) GetContext() client.IRequesterContext
func (*WalletRequester) GetName ¶
func (r *WalletRequester) GetName() string
func (*WalletRequester) GetRoute ¶
func (r *WalletRequester) GetRoute() string
func (*WalletRequester) Initialize ¶
func (r *WalletRequester) Initialize(derivationPath *string, index *uint64, saveWallet bool, password string, savePassword bool) (*types.ApiResponse[api.WalletInitializeData], error)
Initialize the wallet with a new key
func (*WalletRequester) Masquerade ¶
func (r *WalletRequester) Masquerade(address common.Address) (*types.ApiResponse[types.SuccessData], error)
Set the node address to an arbitrary address
func (*WalletRequester) Recover ¶
func (r *WalletRequester) Recover(derivationPath *string, mnemonic string, index *uint64, password string, save bool) (*types.ApiResponse[api.WalletRecoverData], error)
Recover wallet
func (*WalletRequester) RestoreAddress ¶
func (r *WalletRequester) RestoreAddress() (*types.ApiResponse[types.SuccessData], error)
Set the node address back to the wallet address
func (*WalletRequester) SearchAndRecover ¶
func (r *WalletRequester) SearchAndRecover(mnemonic string, address common.Address, password string, save bool) (*types.ApiResponse[api.WalletSearchAndRecoverData], error)
Search and recover wallet
func (*WalletRequester) Send ¶
func (r *WalletRequester) Send(amount *big.Int, token string, recipient common.Address) (*types.ApiResponse[api.WalletSendData], error)
Send tokens from the wallet to an address
func (*WalletRequester) SendMessage ¶
func (r *WalletRequester) SendMessage(message []byte, address common.Address) (*types.ApiResponse[types.TxInfoData], error)
Sends a zero-value message with a payload
func (*WalletRequester) SetEnsName ¶
func (r *WalletRequester) SetEnsName(name string) (*types.ApiResponse[api.WalletSetEnsNameData], error)
Set an ENS reverse record to a name
func (*WalletRequester) SetPassword ¶
func (r *WalletRequester) SetPassword(password string, save bool) (*types.ApiResponse[types.SuccessData], error)
Sets the wallet keystore's password
func (*WalletRequester) SignMessage ¶
func (r *WalletRequester) SignMessage(message []byte) (*types.ApiResponse[api.WalletSignMessageData], error)
Use the node private key to sign an arbitrary message
func (*WalletRequester) SignTx ¶
func (r *WalletRequester) SignTx(message []byte) (*types.ApiResponse[api.WalletSignTxData], error)
Use the node private key to sign a transaction
func (*WalletRequester) Status ¶
func (r *WalletRequester) Status() (*types.ApiResponse[api.WalletStatusData], error)
Get wallet status
func (*WalletRequester) TestRecover ¶
func (r *WalletRequester) TestRecover(derivationPath *string, mnemonic string, index *uint64) (*types.ApiResponse[api.WalletRecoverData], error)
Recover wallet in test-mode so none of the artifacts are saved
func (*WalletRequester) TestSearchAndRecover ¶
func (r *WalletRequester) TestSearchAndRecover(mnemonic string, address common.Address) (*types.ApiResponse[api.WalletSearchAndRecoverData], error)
Search for and recover the wallet in test-mode so none of the artifacts are saved