Skip to content

Commit

Permalink
Add schema definition files
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdi-aouadi committed Apr 17, 2023
1 parent 1dc5dfc commit 2531e52
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,21 @@
"200" : {
"description" : "Request successful",
"content" : {
"application/octet-stream" : {
"application/json" : {
"schema" : {
"type" : "string",
"format" : "binary"
"description" : "Request successful",
"type" : "object",
"oneOf" : [ {
"$ref" : "#/components/schemas/ProduceBlockV2Response"
}, {
"$ref" : "#/components/schemas/ProduceBlockBlockContentsResponse"
} ]
}
},
"application/json" : {
"application/octet-stream" : {
"schema" : {
"$ref" : "#/components/schemas/ProduceBlockV2Response"
"type" : "string",
"format" : "binary"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"title" : "BlobSidecar",
"type" : "object",
"required" : [ "block_root", "index", "slot", "block_parent_root", "proposer_index", "blob", "kzg_commitment", "kzg_proof" ],
"properties" : {
"block_root" : {
"type" : "string",
"description" : "Bytes32 hexadecimal",
"example" : "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
"format" : "byte"
},
"index" : {
"type" : "string",
"description" : "unsigned 64 bit integer",
"example" : "1",
"format" : "uint64"
},
"slot" : {
"type" : "string",
"description" : "unsigned 64 bit integer",
"example" : "1",
"format" : "uint64"
},
"block_parent_root" : {
"type" : "string",
"description" : "Bytes32 hexadecimal",
"example" : "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
"format" : "byte"
},
"proposer_index" : {
"type" : "string",
"description" : "unsigned 64 bit integer",
"example" : "1",
"format" : "uint64"
},
"blob" : {
"type" : "string",
"pattern" : "^0x[a-fA-F0-9]{2,}$",
"description" : "SSZ hexadecimal",
"format" : "bytes"
},
"kzg_commitment" : {
"type" : "string",
"pattern" : "^0x[a-fA-F0-9]{2,}$",
"description" : "Bytes48 hexadecimal",
"format" : "bytes"
},
"kzg_proof" : {
"type" : "string",
"pattern" : "^0x[a-fA-F0-9]{2,}$",
"description" : "Bytes48 hexadecimal",
"format" : "bytes"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"title" : "BlobSidecars",
"type" : "object",
"required" : [ "blob_sidecars" ],
"properties" : {
"blob_sidecars" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/BlobSidecar"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"title" : "BlockContents",
"type" : "object",
"required" : [ "beacon_block", "blob_sidecars" ],
"properties" : {
"beacon_block" : {
"$ref" : "#/components/schemas/BeaconBlockDeneb"
},
"blob_sidecars" : {
"$ref" : "#/components/schemas/BlobSidecars"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"title" : "ProduceBlockBlockContentsResponse",
"type" : "object",
"required" : [ "data", "version" ],
"properties" : {
"data" : {
"title" : "BlockContents",
"type" : "object",
"oneOf" : [ {
"$ref" : "#/components/schemas/BlockContents"
} ]
},
"version" : {
"type" : "string",
"enum" : [ "phase0", "altair", "bellatrix", "capella", "deneb" ]
}
}
}

0 comments on commit 2531e52

Please sign in to comment.