Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIP-0048? | NFT metadata references and payloads #249

Closed
wants to merge 37 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
05f7c34
Introducing CIP-0048? Extended 721 metadata
Jack-0 Apr 21, 2022
01bce73
added forum post
Jack-0 Apr 21, 2022
a2fe0d4
amendments to specification reserved keywords
Jack-0 Apr 21, 2022
c476add
added pseudo code usage example
Jack-0 Apr 21, 2022
3d1b4f4
added external keyword
Jack-0 Apr 21, 2022
c41d545
added external char shortcut
Jack-0 Apr 21, 2022
56bcda6
added comment on references
Jack-0 Apr 21, 2022
07d87d1
proof read changes
Jack-0 Apr 21, 2022
c1988c3
updated CIP-0048.md
Jack-0 Apr 23, 2022
91ce437
updated CIP-0048.md to include fallback option
Jack-0 Apr 23, 2022
2706144
updated CIP-0048.md to include note on duplication
Jack-0 Apr 23, 2022
921e8eb
added a comment on references
Jack-0 Apr 23, 2022
fe506e1
updated CIP-0048.md to use policy and txhash
Jack-0 May 8, 2022
d8d5a30
updated CIP-0048.md grammar
Jack-0 May 8, 2022
2e7420a
Merge branch 'cardano-foundation:master' into master
Jack-0 Aug 27, 2022
827ca7b
refactored CIP48 into two CIPs
Sep 28, 2022
450812c
updated example
Sep 28, 2022
fc06058
CIP48 and CIP49 are seperate CIPs
Oct 2, 2022
6c9bada
reimplemented CIP48 -_-
Oct 2, 2022
2465815
updated CIP48
Oct 2, 2022
594400b
renamed CIP-0048/CIP-0048.md -> CIP-0048/README.md
Oct 2, 2022
aec50fc
updated README.md header
Oct 2, 2022
09b3b10
ammendments
Oct 2, 2022
54b0c63
ammendments
Oct 2, 2022
bc0906a
amendments
Oct 2, 2022
dc16d71
amendments to example
Oct 2, 2022
b7c36ac
merge
Oct 2, 2022
e4a6509
amendments
Oct 2, 2022
2364e8a
amendments
Oct 2, 2022
edf147b
amendments
Oct 2, 2022
4911949
amendments
Oct 2, 2022
b99a0aa
example update
Oct 2, 2022
c0d2aee
updates to handle image tag usage in CIP25
Oct 2, 2022
7bf0859
updates to handle files tag usage in CIP25
Oct 2, 2022
11eedf3
removed files in CIP48
Oct 2, 2022
404279a
behavior duplicated files in CIP25 if multiple refs are defined
Oct 2, 2022
7480cce
noticed txhashes should be an array
Oct 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added pseudo code usage example
  • Loading branch information
Jack-0 committed Apr 21, 2022
commit c476add238d779de15df1581ca0ec9c35603c381
24 changes: 23 additions & 1 deletion CIP-0048/CIP-0048.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Specifically, this proposal aims to solve for the following:
4. Given a nft find there references
5. Concatenate the data for all given references
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is "concatenate" defined here? What if the data isn't text or bytes?


In example
### In example
```
nft 0 has the payload "p":{"0":""Hello","1":"World" } and the references "r":[0,1]
nft 0 == "HELLOWORLD"
Expand All @@ -82,6 +82,28 @@ nft 2 has no payload and the references [1,0] (note the order)
nft 2 == "WORLDHELLO"
```

### pseudo code
for all txs in policy
```
if metadatum tag is '721'
if 'payload' or 'p' in json['721][<POLICY_ID>]
for payloads in ['721][<POLICY_ID>]['p']
for refrenceName, data in payload
add data with referencename to datastructure
```


for a given nft
```
refs = json['721'][<POLICY_ID>][<NFT_NAME>]['references']['src']
dataType = json['721'][<POLICY_ID>][<NFT_NAME>]['references']['data']

for ref in refs
nft data += data from datastrucure indexed with ref
```

payload

# backwards compatibility
Used the version tag described

Expand Down