2024-07-01 14:01:27 +00:00
|
|
|
package beacon
|
2024-05-17 17:22:23 +00:00
|
|
|
|
|
|
|
import "github.com/protolambda/zrnt/eth2/beacon/common"
|
|
|
|
|
|
|
|
type VersionedHash = common.Bytes32
|
|
|
|
|
2024-07-01 14:01:27 +00:00
|
|
|
// HeadEvent represents a "head" event from the Blobscan API
|
2024-05-17 17:22:23 +00:00
|
|
|
type HeadEvent struct {
|
|
|
|
Slot common.Slot `json:"slot"`
|
|
|
|
Block common.Root `json:"block"`
|
|
|
|
State common.Root `json:"state"`
|
|
|
|
CurrentDutyDependentRoot common.Root `json:"current_duty_dependent_root"`
|
|
|
|
PreviousDutyDependentRoot common.Root `json:"previous_duty_dependent_root"`
|
|
|
|
EpochTransition bool `json:"epoch_transition"`
|
|
|
|
ExecutionOptimistic bool `json:"execution_optimistic"`
|
|
|
|
}
|
|
|
|
|
2024-07-01 14:01:27 +00:00
|
|
|
// BlobSidecarEvent represents a "blob_sidecar" event from the Blobscan API
|
2024-05-17 17:22:23 +00:00
|
|
|
type BlobSidecarEvent struct {
|
|
|
|
BlockRoot common.Root `json:"block_root"`
|
|
|
|
Index string `json:"index"`
|
|
|
|
Slot common.Slot `json:"slot"`
|
|
|
|
KzgCommitment common.KZGCommitment `json:"kzg_commitment"`
|
|
|
|
VersionedHash VersionedHash `json:"versioned_hash"`
|
|
|
|
}
|
|
|
|
|
2024-07-01 14:01:27 +00:00
|
|
|
// BlobSidecarsResponse represents a response from the Blobscan API blob_sidecars endpoint
|
2024-05-17 17:22:23 +00:00
|
|
|
type BlobSidecarsResponse struct {
|
|
|
|
Data []BlobSidecar `json:"data"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type BlobSidecar struct {
|
|
|
|
Index string `json:"index"`
|
|
|
|
Blob string `json:"blob"`
|
|
|
|
KzgCommitment common.KZGCommitment `json:"kzg_commitment"`
|
|
|
|
KzgProof string `json:"kzg_proof"`
|
|
|
|
SignedBlockHeader common.SignedBeaconBlockHeader `json:"signed_block_header"`
|
|
|
|
KzgCommitmentInclusionProof []string `json:"kzg_commitment_inclusion_proof"`
|
|
|
|
}
|