diff --git a/allowlist.json b/allowlist.json index 2da1c37..aa6ec06 100644 --- a/allowlist.json +++ b/allowlist.json @@ -1,4 +1,5 @@ { + "$schema": "./allowlist.schema.json", "allowlist": { "ethereum": [ { diff --git a/allowlist.schema.json b/allowlist.schema.json new file mode 100644 index 0000000..89370e3 --- /dev/null +++ b/allowlist.schema.json @@ -0,0 +1,81 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$ref": "#/definitions/root", + "definitions": { + "root": { + "type": "object", + "additionalProperties": false, + "properties": { + "allowlist": { + "$ref": "#/definitions/Allowlist" + }, + "$schema": { + "type": "string" + } + }, + "required": [ + "allowlist", + "$schema" + ], + "title": "root" + }, + "Allowlist": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/definitions/Dapp" + } + }, + "title": "Allowlist" + }, + "Dapp": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "token": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "contracts": { + "type": "array", + "items": { + "$ref": "#/definitions/Contract" + } + } + }, + "required": [ + "contracts", + "domain", + "name", + "token" + ], + "title": "Dapp" + }, + "Contract": { + "type": "object", + "additionalProperties": false, + "properties": { + "address": { + "type": "string" + } + }, + "required": [ + "address" + ], + "title": "Contract" + } + } +} \ No newline at end of file