From 2e0259ec3e1698cb2024a317d90865a3cd4adc77 Mon Sep 17 00:00:00 2001 From: lash Date: Sun, 5 Mar 2023 19:29:08 +0000 Subject: [PATCH] Add bundle files --- .gitignore | 1 - Makefile | 4 ++-- bundle.py | 6 +++--- dist/cic.json | 1 + dist/voucher.json | 1 + test_tx.rdf | 2 +- test_voucher.rdf | 2 +- 7 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 dist/cic.json create mode 100644 dist/voucher.json diff --git a/.gitignore b/.gitignore index f7c61bf..1e79a01 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ cic.json -out diff --git a/Makefile b/Makefile index 3a3a034..0193acb 100644 --- a/Makefile +++ b/Makefile @@ -5,5 +5,5 @@ build: test: build - check-jsonschema --schemafile out/cic.json test_valid.json - check-jsonschema --schemafile out/voucher.json test_valid.json + check-jsonschema --schemafile dist/cic.json test_valid.json + check-jsonschema --schemafile dist/voucher.json test_valid.json diff --git a/bundle.py b/bundle.py index eb6c199..fbb73cc 100644 --- a/bundle.py +++ b/bundle.py @@ -35,9 +35,9 @@ for k in o_nft['properties'].keys(): o['properties'][k] = p -os.makedirs('out', exist_ok=True) +os.makedirs('dist', exist_ok=True) -fp = os.path.join('out', 'cic.json') +fp = os.path.join('dist', 'cic.json') f = open(fp, 'w') json.dump(o, f) f.close() @@ -51,7 +51,7 @@ for k in o_voucher['properties'].keys(): p[v] = o_voucher['properties'][k][v] o['properties'][k] = p -fp = os.path.join('out', 'voucher.json') +fp = os.path.join('dist', 'voucher.json') f = open(fp, 'w') json.dump(o, f) f.close() diff --git a/dist/cic.json b/dist/cic.json new file mode 100644 index 0000000..10cc27a --- /dev/null +++ b/dist/cic.json @@ -0,0 +1 @@ +{"$schema": "https://json-schema.org/draft/2020-12/schema", "title": "CIC core metadata container", "$id": "/cic/core", "type": "object", "properties": {"version": {"type": "integer"}, "attachments": {"type": "array", "items": {"$ref": "/mime"}}, "certifications": {"type": "array", "items": {"type": "string", "format": "uri"}, "minItems": 1}, "image_data": {"type": "string", "description": "Raw SVG image data, if you want to generate images on the fly (not recommended). Only use this if you're not including the image parameter.", "contentEncoding": "base64", "contentMediaType": "image/svg+xml"}, "image": {"type": "string", "description": "A URI pointing to a resource with mime type image/* representing the asset to which this NFT represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive.", "format": "uri"}, "external_url": {"type": "string", "description": "This is the URL that will appear below the asset's image on OpenSea and will allow users to leave OpenSea and view the item on your site.", "format": "uri"}, "attributes": {"type": "array", "description": "These are the attributes for the item, which will show up on the OpenSea page for the item. (see below)", "items": {"type": "object", "properties": {"trait_type": {"type": "string"}, "value": {"oneOf": [{"type": "string"}, {"type": "number"}]}, "display_type": {"type": "string"}}, "required": ["trait_type", "value"]}}, "animation_url": {"type": "string", "description": "Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.", "format": "uri"}, "name": {"type": "string", "description": "Identifies the asset to which this NFT represents"}, "description": {"type": "string", "description": "Describes the asset to which this NFT represents"}}, "required": ["version", "attachments", "attributes"], "mime": {"$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "/mime", "title": "A single generic attachment for documenting any asset", "type": "object", "properties": {"contentType": {"type": "string", "$comment": "valid mime type"}, "contentTransferEncoding": {"type": "string", "enum": ["BASE64", "QUOTED-PRINTABLE", "8BIT", "7BIT"]}, "subject": {"type": "string", "$comment": "utf-8"}, "body": {"type": "string", "$comment": "uri including dataurl"}, "ref": {"type": "string", "format": "uri"}}, "required": ["contentType", "subject"], "oneOf": [{"required": ["body"]}, {"required": ["ref"]}]}, "oneOf": [{"required": ["image"]}, {"required": ["image_data"]}]} \ No newline at end of file diff --git a/dist/voucher.json b/dist/voucher.json new file mode 100644 index 0000000..09644c5 --- /dev/null +++ b/dist/voucher.json @@ -0,0 +1 @@ +{"$schema": "https://json-schema.org/draft/2020-12/schema", "title": "CIC core metadata container", "$id": "/cic/core", "type": "object", "properties": {"version": {"type": "integer"}, "attachments": {"type": "array", "items": {"$ref": "/mime"}}, "certifications": {"type": "array", "items": {"type": "string", "format": "uri"}, "minItems": 1}, "image_data": {"type": "string", "description": "Raw SVG image data, if you want to generate images on the fly (not recommended). Only use this if you're not including the image parameter.", "contentEncoding": "base64", "contentMediaType": "image/svg+xml"}, "image": {"type": "string", "description": "A URI pointing to a resource with mime type image/* representing the asset to which this NFT represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive.", "format": "uri"}, "external_url": {"type": "string", "description": "This is the URL that will appear below the asset's image on OpenSea and will allow users to leave OpenSea and view the item on your site.", "format": "uri"}, "attributes": {"type": "array", "description": "These are the attributes for the item, which will show up on the OpenSea page for the item. (see below)", "items": {"type": "object", "properties": {"trait_type": {"type": "string"}, "value": {"oneOf": [{"type": "string"}, {"type": "number"}]}, "display_type": {"type": "string"}}, "required": ["trait_type", "value"]}}, "animation_url": {"type": "string", "description": "Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.", "format": "uri"}, "name": {"type": "string", "description": "Identifies the asset to which this NFT represents"}, "description": {"type": "string", "description": "Describes the asset to which this NFT represents"}, "unitOfAccount": {"type": "string"}, "issuerName": {"type": "string"}, "namespace": {"type": "string"}}, "required": ["version", "attachments", "attributes"], "mime": {"$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "/mime", "title": "A single generic attachment for documenting any asset", "type": "object", "properties": {"contentType": {"type": "string", "$comment": "valid mime type"}, "contentTransferEncoding": {"type": "string", "enum": ["BASE64", "QUOTED-PRINTABLE", "8BIT", "7BIT"]}, "subject": {"type": "string", "$comment": "utf-8"}, "body": {"type": "string", "$comment": "uri including dataurl"}, "ref": {"type": "string", "format": "uri"}}, "required": ["contentType", "subject"], "oneOf": [{"required": ["body"]}, {"required": ["ref"]}]}, "oneOf": [{"required": ["image"]}, {"required": ["image_data"]}]} \ No newline at end of file diff --git a/test_tx.rdf b/test_tx.rdf index 2bd5ef9..609263e 100644 --- a/test_tx.rdf +++ b/test_tx.rdf @@ -6,4 +6,4 @@ evm:tx:6f4ed36c11345a9a48353cd2f93f1f92958c96df15f3112a192bc994250e8d03 cic:agent evm:address:eb3907ecad74a0013c259d5874ae7f22dcbcc95c ; redcross:interest ge:foodforest ; - ge:rewardRatio 0.3 . + ge:impactRatio 0.3 . diff --git a/test_voucher.rdf b/test_voucher.rdf index 4c1646d..ba97618 100644 --- a/test_voucher.rdf +++ b/test_voucher.rdf @@ -8,7 +8,7 @@ cic:fungibleToken:3cd2f93f1f92958c96df15f3112a192bc994250e8 cic:validFrom "2023-03-05T19:04:40+00:00"^^ ; cic:validUntil "2024-03-05T19:04:40+00:00"^^ ; foaf:name "John Doe" ; - cic:humanDescriptino . + cic:humanDescription . cic:fungibleToken:f93f1f92958c96df15f3112a192bc994250e8defe