2023-07-24 22:16:45 +00:00
|
|
|
package validator
|
|
|
|
|
2023-09-01 10:51:27 +00:00
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
|
|
|
|
"github.com/prysmaticlabs/prysm/v4/beacon-chain/rpc/eth/shared"
|
|
|
|
)
|
2023-07-24 22:16:45 +00:00
|
|
|
|
|
|
|
type AggregateAttestationResponse struct {
|
2023-08-14 14:56:36 +00:00
|
|
|
Data *shared.Attestation `json:"data"`
|
2023-07-24 22:16:45 +00:00
|
|
|
}
|
2023-07-31 17:32:39 +00:00
|
|
|
|
|
|
|
type SubmitContributionAndProofsRequest struct {
|
2023-08-08 22:54:04 +00:00
|
|
|
Data []*shared.SignedContributionAndProof `json:"data" validate:"required,dive"`
|
2023-08-03 22:24:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type SubmitAggregateAndProofsRequest struct {
|
2023-08-08 22:54:04 +00:00
|
|
|
Data []*shared.SignedAggregateAttestationAndProof `json:"data" validate:"required,dive"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type SubmitSyncCommitteeSubscriptionsRequest struct {
|
|
|
|
Data []*shared.SyncCommitteeSubscription `json:"data" validate:"required,dive"`
|
2023-07-31 17:32:39 +00:00
|
|
|
}
|
2023-08-10 18:00:19 +00:00
|
|
|
|
|
|
|
type SubmitBeaconCommitteeSubscriptionsRequest struct {
|
|
|
|
Data []*shared.BeaconCommitteeSubscription `json:"data" validate:"required,dive"`
|
|
|
|
}
|
2023-08-14 14:56:36 +00:00
|
|
|
|
|
|
|
type GetAttestationDataResponse struct {
|
|
|
|
Data *shared.AttestationData `json:"data"`
|
|
|
|
}
|
2023-08-17 10:01:24 +00:00
|
|
|
|
|
|
|
type ProduceSyncCommitteeContributionResponse struct {
|
|
|
|
Data *shared.SyncCommitteeContribution `json:"data"`
|
|
|
|
}
|
2023-09-01 10:51:27 +00:00
|
|
|
|
2023-09-12 13:57:04 +00:00
|
|
|
type GetAttesterDutiesRequest struct {
|
|
|
|
ValidatorIndices []string `json:"validator_indices"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type GetAttesterDutiesResponse struct {
|
|
|
|
DependentRoot string `json:"dependent_root"`
|
|
|
|
ExecutionOptimistic bool `json:"execution_optimistic"`
|
|
|
|
Data []*AttesterDuty `json:"data"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type AttesterDuty struct {
|
|
|
|
Pubkey string `json:"pubkey"`
|
|
|
|
ValidatorIndex string `json:"validator_index"`
|
|
|
|
CommitteeIndex string `json:"committee_index"`
|
|
|
|
CommitteeLength string `json:"committee_length"`
|
|
|
|
CommitteesAtSlot string `json:"committees_at_slot"`
|
|
|
|
ValidatorCommitteeIndex string `json:"validator_committee_index"`
|
|
|
|
Slot string `json:"slot"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type GetProposerDutiesResponse struct {
|
|
|
|
DependentRoot string `json:"dependent_root"`
|
|
|
|
ExecutionOptimistic bool `json:"execution_optimistic"`
|
|
|
|
Data []*ProposerDuty `json:"data"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type ProposerDuty struct {
|
|
|
|
Pubkey string `json:"pubkey"`
|
|
|
|
ValidatorIndex string `json:"validator_index"`
|
|
|
|
Slot string `json:"slot"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type GetSyncCommitteeDutiesRequest struct {
|
|
|
|
ValidatorIndices []string `json:"validator_indices"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type GetSyncCommitteeDutiesResponse struct {
|
|
|
|
ExecutionOptimistic bool `json:"execution_optimistic"`
|
|
|
|
Data []*SyncCommitteeDuty `json:"data"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type SyncCommitteeDuty struct {
|
|
|
|
Pubkey string `json:"pubkey"`
|
|
|
|
ValidatorIndex string `json:"validator_index"`
|
|
|
|
ValidatorSyncCommitteeIndices []string `json:"validator_sync_committee_indices"`
|
|
|
|
}
|
|
|
|
|
2023-09-01 10:51:27 +00:00
|
|
|
// ProduceBlockV3Response is a wrapper json object for the returned block from the ProduceBlockV3 endpoint
|
|
|
|
type ProduceBlockV3Response struct {
|
|
|
|
Version string `json:"version"`
|
|
|
|
ExecutionPayloadBlinded bool `json:"execution_payload_blinded"`
|
|
|
|
ExecutionPayloadValue string `json:"execution_payload_value"`
|
|
|
|
Data json.RawMessage `json:"data"` // represents the block values based on the version
|
|
|
|
}
|