Skip to content

Commit

Permalink
Merge pull request #3 from eseiker/amend-planet-schema
Browse files Browse the repository at this point in the history
Amend schema to align with current planet registry
  • Loading branch information
eseiker authored Dec 3, 2024
2 parents cc3f8f1 + f81c791 commit 8f3ed4d
Show file tree
Hide file tree
Showing 2 changed files with 140 additions and 0 deletions.
10 changes: 10 additions & 0 deletions NineChronicles/2024-12/PlanetRegistry.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$id": "https://planetarium.github.io/json-schema/NineChronicles/2024-12/PlanetRegistry.schema.json",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "PlanetRegistry",
"type": "array",
"items": {
"$ref": "PlanetSpec.schema.json"
},
"additionalProperties": false
}
130 changes: 130 additions & 0 deletions NineChronicles/2024-12/PlanetSpec.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
{
"$id": "https://planetarium.github.io/json-schema/NineChronicles/2024-12/PlanetSpec.schema.json",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "PlanetSpec",
"type": "object",
"required": [
"id",
"name",
"rpcEndpoints"
],
"properties": {
"id": {
"description": "The unique identifier for the planet",
"type": "string",
"pattern": "^0x[a-fA-F0-9]{12}$"
},
"name": {
"description": "The human-readable name for the planet",
"type": "string"
},
"genesisHash": {
"description": "The block hash of the genesis block for the planet",
"type": "string",
"pattern": "^[a-fA-F0-9]{64}$"
},
"genesisUri": {
"description": "The URI for fetching the genesis block content",
"type": "string",
"format": "uri"
},
"9cscanUrl": {
"description": "The URI to 9cscan for the planet",
"type": "string",
"format": "uri"
},
"rpcEndpoints": {
"description": "The list of rpc endpoints for the planet",
"type": "object",
"required": [
"headless.gql",
"headless.grpc"
],
"properties": {
"headless.gql": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
},
"headless.grpc": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
},
"dp.gql": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
},
"world-boss.rest": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
},
"patrol-reward.gql": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
},
"market.rest": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
},
"9cscan.rest": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
},
"arena.gql": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
}
},
"additionalProperties": false
},
"bridges": {
"description": "The bridge addresses bound to other planets",
"type": "object",
"patternProperties": {
"^0x[a-fA-F0-9]{12}$": {
"type": "object",
"required": [
"agent",
"avatar"
],
"properties": {
"agent": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{40}$"
},
"avatar": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{40}$"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}

0 comments on commit 8f3ed4d

Please sign in to comment.