@patchworkdev/pdk
Version:
Patchwork Development Kit
97 lines (96 loc) • 3.49 kB
JSON
{
"$id": "https://patchwork.dev/schema/patchwork-metadata.schema.json",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "Patchwork Metadata",
"type": "object",
"required": ["name", "symbol"],
"properties": {
"name": {
"type": "string",
"description": "Model name"
},
"symbol": {
"type": "string",
"description": "NFT Symbol"
},
"schemaURI": {
"type": "string",
"description": "URI of schema"
},
"imageURI": {
"type": "string",
"description": "URI of image (use {tokenID} to substitute)"
},
"fields": {
"type": "array",
"items": {
"type": "object",
"required": ["id", "key", "type", "slot", "offset"],
"properties": {
"id": {
"type": "number",
"description": "Field slot (unique) 1 index"
},
"permissionId": {
"type": "number",
"description": "Field permissions ID (unique) 1 index (0 means none)"
},
"key": {
"type": "string",
"description": "Human-readable field key"
},
"description": {
"type": "string",
"description": "Human-readable field description"
},
"type": {
"type": "string",
"description": "Field type",
"enum": [
"bool",
"int8",
"int16",
"int32",
"int64",
"int128",
"int256",
"uint8",
"uint16",
"uint32",
"uint64",
"uint128",
"uint256",
"char8",
"char16",
"char32",
"char64",
"bytes8",
"bytes16",
"bytes32",
"literef",
"address",
"string"
]
},
"arrayLength": {
"type": "number",
"description": "Array length (0=dynamic, 1=no array, 2+=static array)"
},
"visibility": {
"type": "string",
"description": "Field visibility",
"enum": ["public", "private"]
},
"slot": {
"type": "number",
"description": "The metadata storage slot this field occupies"
},
"offset": {
"type": "number",
"description": "The offset in the metadata storage slot"
}
}
}
}
}
}