From e0b8da2323d44b3370985e8984d3a361ca31b0d6 Mon Sep 17 00:00:00 2001 From: Kier Borromeo Date: Wed, 27 Nov 2024 21:06:10 +0800 Subject: [PATCH] fix: schema --- src/agents/clara/echo.json | 2 +- src/agents/derp/echo.json | 1 + src/agents/hal/echo.json | 1 + src/echo.schema.json | 63 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 66 insertions(+), 1 deletion(-) diff --git a/src/agents/clara/echo.json b/src/agents/clara/echo.json index 953b743..2ea067d 100644 --- a/src/agents/clara/echo.json +++ b/src/agents/clara/echo.json @@ -1,5 +1,5 @@ { - "$schema": "../echo.schema.json", + "$schema": "../../echo.schema.json", "creator": "Echos", "echoToken": { "symbol": "CLARA", diff --git a/src/agents/derp/echo.json b/src/agents/derp/echo.json index d41b7ba..92f36df 100644 --- a/src/agents/derp/echo.json +++ b/src/agents/derp/echo.json @@ -1,4 +1,5 @@ { + "$schema": "../../echo.schema.json", "creator": "Echos", "echoToken": { "symbol": "DERP", diff --git a/src/agents/hal/echo.json b/src/agents/hal/echo.json index 42ba3c0..cdcae90 100644 --- a/src/agents/hal/echo.json +++ b/src/agents/hal/echo.json @@ -1,4 +1,5 @@ { + "$schema": "../../echo.schema.json", "creator": "Echos", "echoToken": { "symbol": "HAL", diff --git a/src/echo.schema.json b/src/echo.schema.json index e69de29..c5e6261 100644 --- a/src/echo.schema.json +++ b/src/echo.schema.json @@ -0,0 +1,63 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": ["creator", "echoToken", "id", "metadata", "name", "verified"], + "properties": { + "id": { + "type": "string", + "description": "Contract address of the echo", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, + "creator": { + "type": "string", + "description": "Creator of the echo" + }, + "echoToken": { + "type": "object", + "required": ["symbol", "address"], + "properties": { + "symbol": { + "type": "string", + "description": "Token symbol" + }, + "address": { + "type": "string", + "description": "Token contract address", + "pattern": "^0x[a-fA-F0-9]{40}$" + } + } + }, + "metadata": { + "type": "object", + "required": ["description", "image"], + "properties": { + "description": { + "type": "string", + "description": "A short description about the echo" + }, + "image": { + "type": "string", + "description": "IPFS hash of the echo's image" + }, + "telegram": { + "type": "string", + "description": "Telegram group URL", + "format": "uri" + }, + "twitter": { + "type": "string", + "description": "Twitter/X profile URL", + "format": "uri" + } + } + }, + "name": { + "type": "string", + "description": "Name of the echo" + }, + "verified": { + "type": "boolean", + "description": "Verification status of the echo" + } + } +}