-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added metadata schema for amulet-20210221, first pass (#18)
* added metadata schema for amulet-20210221, first pass * fixing typo in amulet rarities * fixes to amulet schema, added 20280228 version * a few fixes to the tests for amulet schema * removed amulet 20210228 version * cleaning up removal of amulet-20210228, oops * added string type to carbonOffsetURL in amulet schema Co-authored-by: Robin Sloan <robin@robinsloan.com>
- Loading branch information
1 parent
45f5a47
commit a4dbda5
Showing
5 changed files
with
171 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{ | ||
"description": "This schema describes version 20210221 of the metadata standard for the amulet poem format, designed for the Zora protocol.", | ||
"title": "Amulet20210221", | ||
"$id": "http://text.bargains/schema.json", | ||
"type": "object", | ||
"properties": { | ||
"carbonOffsetURL": { | ||
"description": "An HTTPS link to the carbon offset purchased in this poem's name. This is not required in this metadata version, but if it is not specified in this field, it should be included in the `description` field.", | ||
"examples": [ | ||
"https://dashboard.cloverly.com/receipt/20210223-9e38b918ecfd9bfb051287bf71556736" | ||
], | ||
"type": "string" | ||
}, | ||
"description": { | ||
"description": "The description of the amulet. You can feel free to have fun & be evocative with this; including a link to the current formal definition is probably wise, but not required.", | ||
"examples": [ | ||
"This is an amulet, a short poem with a lucky SHA-256 hash, explained here: https://text.bargains/ This poem's rarity is COMMON. Here is this poem's carbon offset: https://dashboard.cloverly.com/receipt/20210223-9e38b918ecfd9bfb051287bf71556736" | ||
], | ||
"type": "string" | ||
}, | ||
"mimeType": { | ||
"description": "The mimeType of the amulet. This will always be text/plain.", | ||
"examples": [ | ||
"text/plain" | ||
], | ||
"type": "string", | ||
"enum": ["text/plain"] | ||
}, | ||
"name": { | ||
"description": "The title of the amulet.", | ||
"examples": [ | ||
"morning amulet" | ||
], | ||
"type": "string" | ||
}, | ||
"poemText": { | ||
"description": "The text of the amulet. You should include this if possible, but, in this metadata version, it's not formally required. The text at the contentURI in the Zora NFT is considered the canonical version.", | ||
"examples": [ | ||
"DON'T WORRY." | ||
], | ||
"type": "string" | ||
}, | ||
"rarity": { | ||
"description": "The rarity level of the amulet.", | ||
"examples": [ | ||
"common" | ||
], | ||
"type": "string", | ||
"enum": ["common", "uncommon", "rare", "epic", "legendary", "mythic", "beyond mythic"] | ||
}, | ||
"version": { | ||
"description": "The calendar version of the schema.", | ||
"const": "amulet-20210221", | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"examples": [ | ||
{ | ||
"description": "This is an amulet, a short poem with a lucky SHA-256 hash, explained here: https://text.bargains/ This poem's rarity is COMMON. Here is this poem's carbon offset: https://dashboard.cloverly.com/receipt/20210223-9e38b918ecfd9bfb051287bf71556736", | ||
"mimeType": "text/plain", | ||
"name": "morning amulet", | ||
"poemText": "DON'T WORRY.", | ||
"rarity": "common", | ||
"version": "amulet-20210221" | ||
} | ||
], | ||
"required": [ | ||
"description", | ||
"mimeType", | ||
"name", | ||
"rarity", | ||
"version" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* tslint:disable */ | ||
/** | ||
* This file was automatically generated by json-schema-to-typescript. | ||
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, | ||
* and run json-schema-to-typescript to regenerate this file. | ||
*/ | ||
|
||
/** | ||
* This schema describes version 20210221 of the metadata standard for the amulet poem format, designed for the Zora protocol. | ||
*/ | ||
export interface Amulet20210221 { | ||
/** | ||
* An HTTPS link to the carbon offset purchased in this poem's name. This is not required in this metadata version, but if it is not specified in this field, it should be included in the `description` field. | ||
*/ | ||
carbonOffsetURL?: string; | ||
/** | ||
* The description of the amulet. You can feel free to have fun & be evocative with this; including a link to the current formal definition is probably wise, but not required. | ||
*/ | ||
description: string; | ||
/** | ||
* The mimeType of the amulet. This will always be text/plain. | ||
*/ | ||
mimeType: "text/plain"; | ||
/** | ||
* The title of the amulet. | ||
*/ | ||
name: string; | ||
/** | ||
* The text of the amulet. You should include this if possible, but, in this metadata version, it's not formally required. The text at the contentURI in the Zora NFT is considered the canonical version. | ||
*/ | ||
poemText?: string; | ||
/** | ||
* The rarity level of the amulet. | ||
*/ | ||
rarity: "common" | "uncommon" | "rare" | "epic" | "legendary" | "mythic" | "beyond mythic"; | ||
/** | ||
* The calendar version of the schema. | ||
*/ | ||
version: "amulet-20210221"; | ||
[k: string]: unknown; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import { Zora20210101 } from './zora/20210101'; | ||
import { Catalog20210202 } from './catalog/20210202'; | ||
import { Amulet20210221 } from './amulet/20210221'; | ||
|
||
export { Zora20210101 } | ||
export { Catalog20210202 } | ||
export type MetadataLike = Zora20210101 | Catalog20210202; | ||
export { Amulet20210221 } | ||
export type MetadataLike = Zora20210101 | Catalog20210202 | Amulet20210221 ; |