From 2d1f6932129c47b0866b68b06678dd22c50b4d83 Mon Sep 17 00:00:00 2001 From: Marcin Mazurek Date: Fri, 21 Apr 2023 12:27:48 +0200 Subject: [PATCH] Allow to express longer metadata URLs as an array of strings --- CIP-0072/README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/CIP-0072/README.md b/CIP-0072/README.md index 67a937de1f..03145e6867 100644 --- a/CIP-0072/README.md +++ b/CIP-0072/README.md @@ -107,11 +107,18 @@ The on-chain dApp registration certificate MUST follow canonical JSON and be ser }, "metadata": { "type": "array", + "description": "An array of valid URLs pointing to off-chain CIP-72 compatible metadata document. If an individual URL is longer than 64 characters, it must be expressed as an array of strings (where each string may contain at most 64 characters).", "items": { - "type": "string", - "description": "A valid url pointing to off-chain CIP-72 compatible metadata document.", - "pattern": "(https?:\/\/(?:www\\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^\\s]{2,}|www\\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^\\s]{2,}|https?:\/\/(?:www\\.|(?!www))[a-zA-Z0-9]+\\.[^\\s]{2,}|www\\.[a-zA-Z0-9]+\\.[^\\s]{2,})" - } + "anyOf": [{ + "type": "string", + }, { + "type": "array", + "items": { + "type": "string", + } + }], + "examples": ["https://raw.githubusercontent.com/org/repo/offchain.json", ["https://raw.githubusercontent.com/long-org-name", "long-repo-name/offchain.json"], "ipfs://QmbQDvKJeo2NgGcGdnUiUFibTzuKNK5Uij7jzmK8ZccmWp", ["ipfs://QmbQDvKJeo2NgGcGdnUiaAdADA", "UFibTzuKNKc0jA390alDAD5Uij7jzmK8ZccmWp"]] + }, }, "version": { "type": "string",