Skip to content

Commit

Permalink
Revert all changes of 0.9.0
Browse files Browse the repository at this point in the history
Reverted the following commits:
- 43c45a3
- cb73865
- 8ecb477
- 790d25d
- 39d75e7
- 4652ae2
- db192d2
  • Loading branch information
il3ven committed Dec 5, 2022
1 parent 43c45a3 commit 93e7214
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 249 deletions.
10 changes: 0 additions & 10 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
# Changelog

## 0.9.0

- (breaking changes) Add array `track.er721.tokens` with the following fields
and requirements:
- Move `track.erc721.tokenId` to `track.erc721.tokens[n].id`
- Move `track.erc721.tokenURI` to `track.erc721.tokens[n].uri`
- Add and require `track.erc721.tokens[n].minting` object containing
`minting.transactionHash` and `minting.from`.
- Add `track.artist.address` as a non-mandatory field

## 0.8.1

- Add `headers` prop to ipfs and arweave message
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@neume-network/schema",
"version": "0.9.0",
"version": "0.8.1",
"description": "A JSON schema for music.",
"main": "./src/schema.mjs",
"directories": {
Expand Down
54 changes: 8 additions & 46 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
},
"name": {
"type": "string"
},
"address": {
"type": "string",
"pattern": "0x[a-fA-F0-9]{40}"
}
},
"required": [
Expand Down Expand Up @@ -74,47 +70,12 @@
"type": "string",
"pattern": "0x[a-fA-F0-9]{40}"
},
"tokens": {
"type": "array",
"items": {
"type": "object",
"properties": {
"minting": {
"type": "object",
"properties": {
"transactionHash": {
"type": "string",
"pattern": "0x[a-fA-F0-9]{64}",
"$comment": "The transaction hash that mints the NFT."
},
"from": {
"type": "string",
"pattern": "0x[a-fA-F0-9]{40}",
"$comment": "The address (`from`) that signed the transaction responsible for minting an NFT."
}
},
"required": [
"transactionHash",
"from"
]
},
"id": {
"type": "string",
"$comment": "The id of an NFT, often referred to as `tokenId`."
},
"uri": {
"type": "string",
"format": "uri",
"$comment": "The uri of an NFT, often referred to as `tokenURI`."
}
},
"required": [
"id",
"uri",
"minting"
]
},
"minItems": 1
"tokenId": {
"type": "string"
},
"tokenURI": {
"type": "string",
"format": "uri"
},
"metadata": {
"type": "object",
Expand All @@ -141,7 +102,8 @@
"version",
"createdAt",
"address",
"tokens",
"tokenId",
"tokenURI",
"metadata",
"owner"
]
Expand Down
71 changes: 20 additions & 51 deletions src/schema.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const https = {
url: {
type: "string",
format: "uri",
pattern: "^(https|http)://",
pattern: "https://",
},
method: { type: "string" },
body: { type: "string" },
Expand Down Expand Up @@ -61,7 +61,7 @@ export const graphql = {
url: {
type: "string",
format: "uri",
pattern: "^(https|http)://",
pattern: "^https://",
},
body: { type: "string" },
headers: { type: "object" },
Expand Down Expand Up @@ -101,7 +101,7 @@ export const jsonrpc = {
url: {
type: "string",
format: "uri",
pattern: "^(https|http)://",
pattern: "^https://",
},
},
required: ["url"],
Expand Down Expand Up @@ -149,7 +149,7 @@ export const ipfs = {
gateway: {
type: "string",
format: "uri",
pattern: "^(https|http)?://[^/]+/(ip[fn]s)/",
pattern: "^https?://[^/]+/(ip[fn]s)/",
$comment:
"Must equate to a regular IPFS path gateway. We had initially considered supporting subdomain gateways too, but a lack of expressing their URIs generically lead us ignore their support.",
},
Expand Down Expand Up @@ -195,7 +195,7 @@ export const arweave = {
gateway: {
type: "string",
format: "uri",
pattern: "^(https|http)://",
pattern: "^https://",
},
headers: { type: "object" },
},
Expand Down Expand Up @@ -301,45 +301,6 @@ export const ERC721Metadata = {
required: ["name", "description", "image"],
};

export const token = {
type: "object",
properties: {
minting: {
type: "object",
properties: {
transactionHash: {
type: "string",
pattern: "0x[a-fA-F0-9]{64}",
$comment: "The transaction hash that mints the NFT.",
},
from: {
type: "string",
pattern: "0x[a-fA-F0-9]{40}",
$comment:
"The address (`from`) that signed the transaction responsible for minting an NFT.",
},
},
required: ["transactionHash", "from"],
},
id: {
type: "string",
$comment: "The id of an NFT, often referred to as `tokenId`.",
},
uri: {
type: "string",
format: "uri",
$comment: "The uri of an NFT, often referred to as `tokenURI`.",
},
},
required: ["id", "uri", "minting"],
};

export const tokens = {
type: "array",
items: token,
minItems: 1,
};

export const ERC721 = {
type: "object",
properties: {
Expand All @@ -358,14 +319,26 @@ export const ERC721 = {
type: "string",
pattern: "0x[a-fA-F0-9]{40}",
},
tokens: {
...tokens,
tokenId: {
type: "string",
},
tokenURI: {
type: "string",
format: "uri",
},
metadata: {
...ERC721Metadata,
},
},
required: ["version", "createdAt", "address", "tokens", "metadata", "owner"],
required: [
"version",
"createdAt",
"address",
"tokenId",
"tokenURI",
"metadata",
"owner",
],
};

export const artist = {
Expand All @@ -375,10 +348,6 @@ export const artist = {
name: {
type: "string",
},
address: {
type: "string",
pattern: "0x[a-fA-F0-9]{40}",
},
},
required: ["version", "name"],
};
Expand Down
Loading

0 comments on commit 93e7214

Please sign in to comment.