Documentation
¶
Index ¶
- Constants
- func GetConsTimeout() time.Duration
- func GetDebugLevel() uint64
- func GetDomain() string
- func GetExecTimeout() time.Duration
- func GetFinalizedDay(ctx context.Context, address string) (uint64, error)
- func GetHeadDay(ctx context.Context, address string) (uint64, error)
- func GetValidators(ctx context.Context, client *ethHttp.Service, stateID string) (map[phase0.ValidatorIndex]*v1.Validator, error)
- func SetBeaconchainApiKey(apiKey string)
- func SetConsTimeout(dur time.Duration)
- func SetDebugLevel(lvl uint64)
- func SetDomain(domain string)
- func SetExecTimeout(dur time.Duration)
- type BeaconchainApiClient
- func (c *BeaconchainApiClient) ConsolidationRequests(ctx context.Context, network string, slot uint64) (*BeaconchainConsolidationRequestsResponse, error)
- func (c *BeaconchainApiClient) DepositRequests(ctx context.Context, network string, slot uint64) (*BeaconchainDepositRequestsResponse, error)
- func (c *BeaconchainApiClient) GetApiKey() string
- func (c *BeaconchainApiClient) GetDomain() string
- func (c *BeaconchainApiClient) HttpReq(ctx context.Context, method, url string, headers map[string]string, ...) error
- func (c *BeaconchainApiClient) SetApiKey(apiKey string)
- func (c *BeaconchainApiClient) SetDomain(domain string)
- type BeaconchainConsolidationRequest
- type BeaconchainConsolidationRequestsResponse
- type BeaconchainDepositRequest
- type BeaconchainDepositRequestsResponse
- type BlockData
- type Day
- type HttpReqError
- type Ratelimiter
- type TxReceipt
- type Validator
Constants ¶
View Source
const RECEIPTS_MODE_BATCH = 0
View Source
const RECEIPTS_MODE_SINGLE = 1
Variables ¶
This section is empty.
Functions ¶
func GetConsTimeout ¶
func GetDebugLevel ¶
func GetDebugLevel() uint64
func GetExecTimeout ¶
func GetValidators ¶
func SetBeaconchainApiKey ¶
func SetBeaconchainApiKey(apiKey string)
func SetConsTimeout ¶
func SetDebugLevel ¶
func SetDebugLevel(lvl uint64)
func SetExecTimeout ¶
Types ¶
type BeaconchainApiClient ¶
type BeaconchainApiClient struct {
// contains filtered or unexported fields
}
func NewBeaconchainApiClient ¶
func NewBeaconchainApiClient() *BeaconchainApiClient
func (*BeaconchainApiClient) ConsolidationRequests ¶
func (c *BeaconchainApiClient) ConsolidationRequests(ctx context.Context, network string, slot uint64) (*BeaconchainConsolidationRequestsResponse, error)
func (*BeaconchainApiClient) DepositRequests ¶
func (c *BeaconchainApiClient) DepositRequests(ctx context.Context, network string, slot uint64) (*BeaconchainDepositRequestsResponse, error)
func (*BeaconchainApiClient) GetApiKey ¶
func (c *BeaconchainApiClient) GetApiKey() string
func (*BeaconchainApiClient) GetDomain ¶
func (c *BeaconchainApiClient) GetDomain() string
func (*BeaconchainApiClient) SetApiKey ¶
func (c *BeaconchainApiClient) SetApiKey(apiKey string)
func (*BeaconchainApiClient) SetDomain ¶
func (c *BeaconchainApiClient) SetDomain(domain string)
type BeaconchainConsolidationRequest ¶
type BeaconchainConsolidationRequest struct {
AmountConsolidated int64 `json:"amount_consolidated"`
BlockRoot string `json:"block_root"`
BlockSlot uint64 `json:"block_slot"`
RequestIndex uint64 `json:"request_index"`
SourceIndex uint64 `json:"source_index"`
TargetIndex uint64 `json:"target_index"`
}
type BeaconchainConsolidationRequestsResponse ¶
type BeaconchainConsolidationRequestsResponse struct {
Status string `json:"status"`
Data []BeaconchainConsolidationRequest `json:"data"`
}
type BeaconchainDepositRequest ¶
type BeaconchainDepositRequest struct {
Amount int64 `json:"amount"`
BlockRoot string `json:"block_root"`
BlockSlot uint64 `json:"block_slot"`
Pubkey string `json:"pubkey"`
RequestIndex uint64 `json:"request_index"`
Signature string `json:"signature"`
WithdrawalCredentials string `json:"withdrawal_credentials"`
}
type BeaconchainDepositRequestsResponse ¶
type BeaconchainDepositRequestsResponse struct {
Status string `json:"status"`
Data []BeaconchainDepositRequest `json:"data"`
}
type BlockData ¶
type BlockData struct {
Version spec.DataVersion
ProposerIndex phase0.ValidatorIndex
Transactions []bellatrix.Transaction
BaseFeePerGas *big.Int
Deposits []*phase0.Deposit
GasUsed uint64
GasLimit uint64
Withdrawals []*capella.Withdrawal
BlockNumber uint64
}
func GetBlockData ¶
func GetBlockData(block *spec.VersionedSignedBeaconBlock) (*BlockData, error)
type Day ¶
type Day struct {
Day decimal.Decimal `json:"day"`
DayTime time.Time `json:"dayTime"`
Apr decimal.Decimal `json:"apr"`
Validators decimal.Decimal `json:"validators"`
StartEpoch decimal.Decimal `json:"startEpoch"`
EffectiveBalanceGwei decimal.Decimal `json:"effectiveBalanceGwei"`
StartBalanceGwei decimal.Decimal `json:"startBalanceGwei"`
EndBalanceGwei decimal.Decimal `json:"endBalanceGwei"`
DepositsSumGwei decimal.Decimal `json:"depositsSumGwei"`
WithdrawalsSumGwei decimal.Decimal `json:"withdrawalsSumGwei"`
ConsensusRewardsGwei decimal.Decimal `json:"consensusRewardsGwei"`
TxFeesSumWei decimal.Decimal `json:"txFeesSumWei"`
TotalRewardsWei decimal.Decimal `json:"totalRewardsWei"`
}
type HttpReqError ¶
func (HttpReqError) Error ¶
func (e HttpReqError) Error() string
type Ratelimiter ¶
type Ratelimiter struct {
// contains filtered or unexported fields
}
func NewRatelimiter ¶
func NewRatelimiter(reqPerSec float64) *Ratelimiter
func (*Ratelimiter) GetRate ¶
func (rl *Ratelimiter) GetRate() float64
func (*Ratelimiter) SetRate ¶
func (rl *Ratelimiter) SetRate(reqPerSec float64)
func (*Ratelimiter) Wait ¶
func (rl *Ratelimiter) Wait()
type TxReceipt ¶
type TxReceipt struct {
BlockHash *common.Hash `json:"blockHash"`
BlockNumber *hexutil.Big `json:"blockNumber"`
ContractAddress *common.Address `json:"contractAddress,omitempty"`
CumulativeGasUsed hexutil.Uint64 `json:"cumulativeGasUsed"`
EffectiveGasPrice *hexutil.Big `json:"effectiveGasPrice"`
From *common.Address `json:"from,omitempty"`
GasUsed hexutil.Uint64 `json:"gasUsed"`
LogsBloom hexutil.Bytes `json:"logsBloom"`
Status hexutil.Uint64 `json:"status"`
To *common.Address `json:"to,omitempty"`
TransactionHash *common.Hash `json:"transactionHash"`
TransactionIndex hexutil.Uint64 `json:"transactionIndex"`
Type hexutil.Uint64 `json:"type"`
}
Click to show internal directories.
Click to hide internal directories.
