Move core context variables from nft json to core rdf

This commit is contained in:
lash 2023-03-05 19:11:39 +00:00
parent 4d1b6733fa
commit 1306c0a39a
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
6 changed files with 75 additions and 66 deletions

View File

@ -8,35 +8,20 @@
"version": {
"type": "integer"
},
"validFrom": {
"type": "string",
"format": "date-time"
},
"validUntil": {
"type": "string",
"format": "date-time"
},
"targets": {
"type": "array",
"items": {
"type": "string",
"pattern": "^(0x)?[a-fA-F0-9]{40}"
}
},
"txs": {
"type": "array",
"items": {
"type": "string",
"pattern": "^(0x)?[a-fA-F0-9]{64}"
}
},
"attachments": {
"type": "array",
"items": {
"$ref": "/mime"
}
},
"certifications": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"minItems": 1
}
},
"required": ["targets", "attachments", "txs", "validFrom"]
"required": ["version", "attachments"]
}

View File

@ -1,25 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Enjin NFT metadata extension",
"$id": "/enjin",
"type": "object",
"properties": {
"simple_property": "example value",
"rich_property": {
"name": "Name",
"value": "123",
"display_value": "123 Example Value",
"class": "emphasis",
"css": {
"color": "#ffffff",
"font-weight": "bold",
"text-decoration": "underline"
}
},
"array_property": {
"name": "Name",
"value": [1,2,3,4],
"class": "emphasis"
}
}

View File

@ -22,8 +22,31 @@
"format": "uri"
},
"attributes": {
"type": "object",
"description": "These are the attributes for the item, which will show up on the OpenSea page for the item. (see below)"
"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",

9
test_tx.rdf Normal file
View File

@ -0,0 +1,9 @@
@prefix evm: <https://defalsify.org/rdf-eth/0.1/> .
@prefix cic: <https://grassrootseconomics.net/rdf/0.1/cic#> .
@prefix ge: <https://grassrootseconomics.net/rdf/0.1/ge#> .
@prefix redcross: <https://redcross.com/cic-def/0.1/> .
evm:tx:6f4ed36c11345a9a48353cd2f93f1f92958c96df15f3112a192bc994250e8d03
cic:agent evm:address:eb3907ecad74a0013c259d5874ae7f22dcbcc95c ;
redcross:interest ge:foodforest ;
ge:rating 0.3 .

View File

@ -1,23 +1,25 @@
{
"version": 0,
"name": "foo",
"description": "bar",
"targets": [
"0xabcdef0123456789abcdef0123456789abcdef00",
"abcdef0123456789abcdef0123456789abcdef00"
"attributes": [
{
"trait_type": "Rating",
"value": 2.2
},
{
"trait_type": "Swag",
"value": "smooth"
},
{
"trait_type": "Serial",
"value": 42
}
],
"validFrom": "2023-03-05T10:46:05+00:00",
"validUntil": "2024-03-05T10:46:05+00:00",
"unitOfAccount": "wampum",
"issuerName": "John Doe",
"txs": [
"0xabcdef0123456789abcdef0123456789abcdef00abcdef0123456789abcdef00",
"abcdef0123456789abcdef0123456789abcdef00abcdef0123456789abcdef00"
"certifications": [
"sha256:"
],
"attributes": {
"trait_type": "Rating",
"value": 2.2
},
"namespace": "schmame",
"attachments": [
{
"contentType": "text/plain",

15
test_voucher.rdf Normal file
View File

@ -0,0 +1,15 @@
@prefix evm: <https://defalsify.org/rdf-eth/0.1/> .
@prefix cic: <https://grassrootseconomics.net/rdf/0.1/cic#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
cic:fungibleToken:3cd2f93f1f92958c96df15f3112a192bc994250e8
cic:unitOfAccount cic:ref:wampum ;
cic:validFrom "2023-03-05T19:04:40+00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
cic:validUntil "2024-03-05T19:04:40+00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
foaf:name "John Doe" .
cic:fungibleToken:f93f1f92958c96df15f3112a192bc994250e8defe
cic:unitOfAccount "seashells" ;
cic:validFrom "2023-03-04T09:34:33+00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
foaf:name "Busy Bee" .