eth-blob-indexer/pkg/blobscan/models.go

34 lines
1.1 KiB
Go
Raw Permalink Normal View History

package blobscan
import "github.com/protolambda/zrnt/eth2/beacon/common"
type VersionedHash = common.Bytes32
// BlobscanBlock represents an EL block from the Blobscan API
type BlobscanBlock struct {
Slot common.Slot `json:"slot"`
Hash common.Root `json:"hash"`
Number uint64 `json:"number"`
Transactions []BlobscanBlockTransaction `json:"transactions"`
Timestamp string `json:"timestamp"`
}
// BlobscanBlockTransaction represents a transaction within a block from the Blobscan API
type BlobscanBlockTransaction struct {
Hash common.Root `json:"hash"`
Blobs []struct {
Index uint64 `json:"index"`
VersionedHash VersionedHash `json:"versionedHash"`
} `json:"blobs"`
Rollup string `json:"rollup"`
}
// BlobscanBlob represents a blob from the Blobscan API
type BlobscanBlob struct {
Commitment common.KZGCommitment `json:"commitment"`
Proof string `json:"proof"`
Size int `json:"size"`
VersionedHash VersionedHash `json:"versionedHash"`
Data string `json:"data"`
}