Outline
What is metadata?
"Metadata" is all the stuff we can't see in the outward facing content of a computer file. Every photo you take on a digital camera, for example, includes metadata that is separate from the image itself. My iPhone keeps metadata about the date, time and place, as well as the camera parameters, for every photo I take. I'm not thinking about this data when I look at my photos, but I can see it any time in the details.
In a Cardano transaction, metadata is separate from the actual value that is sent in the transaction. Metadata is stored on the permanent ledger, and might tell a story about the value that was exchanged, but has no impact on the outcome of a transaction (except that it increases the fee by a little bit).
Video Bookmark: What is Metadata?
Metadata on the Cardano blockchain
- Video Bookmark: Metadata on the Cardano blockchain
- Where is the metadata stored? In transactions! Learn about UTxO Model
- IOHK Blog Post: Getting to grips with metadata on Cardano
- IOHK TxMetadata Documentation
Thinking in JSON
- Video Bookmark: Thinking in JSON
- Video Bookmark: Testnet
- Video Bookmark: Dandelion: GraphQL
{ "key": "value" }
- Distinguishing between arrays
[]
and objects{}
- You can have an array of objects:
[{...}, {...}, {...}]
- And an object can be an array:
{ "key": [1, 2, 3] }
We can consume data with Dandelion
- Video Bookmark: Dandelion: PostgREST
mainnet
andtestnet
- PostgREST and GraphQL
- Using metadata to conditionally render a front-end
- What about authentication and security?
We can post data with LIFT Wallet
- Video Bookmark: Posting Metadata with LIFT Wallet
- Release
0.2.0
is hardcoded for experimentation ontestnet
Example: Let's post the responses from CSK 001 as metadata
- Video Bookmark: Example Part 1: Adding data (with live troubleshooting)
- Video Bookmark: Example Part 2: Custom rendering of metadata
Additional Links
Building Background Knowledge:
- Primer on JSON
- Learn about JSON at MDN Web Docs or check out Free Code Camp's JavaScript Algorithms and Data Structures
- Learn about Next.js
Go Deeper
- Check out Coding on Chain
- Explore all Dandelion APIs
Self-Guided Project Ideas:
- Use LIFT to post metadata to Cardano Testnet, then build a simple front end to consume and show that data.
- Read A Journey into Bitcoin Metadata. Are there any projects that we should tackle on Cardano?
Next Steps
- In our next CSK, we'll provide the an overview of tokens, including minting the first two limited edition tokens for Cole and for Juan!
- Let's learn as much as we can about metadata and tokens, so that we can be prepared for smart contracts -- we've got a few months to learn. Join us on Discord if you'd like to get involved.