https://github.com/SamDelaney/CIP_102_Reference
Reference Implementation for CIP-0102
https://github.com/SamDelaney/CIP_102_Reference
Last synced: 3 months ago
JSON representation
Reference Implementation for CIP-0102
- Host: GitHub
- URL: https://github.com/SamDelaney/CIP_102_Reference
- Owner: SamDelaney
- License: other
- Created: 2024-06-28T01:32:24.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-08-09T00:07:03.000Z (10 months ago)
- Last Synced: 2024-08-09T02:22:27.641Z (10 months ago)
- Language: TypeScript
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-aiken - CIP 102 Reference Implementation - Official examples for implementing CIP-102 based royalties, made by the CIP's author. (Tutorials/Examples)
README
# The Official CIP 102 Reference Implementation
A reference implementation for [CIP-0102](https://cips.cardano.org/cip/CIP-0102) royalties, written in Lucid (offchain) and Aiken (onchain).
In this reference implementation you'll find examples of:
- Minting a CIP 102 compliant NFT with royalties
- Validators for storing royalty metadata
- Always Fails (royalty cannot be modified)
- Reducible (royalty cannot be increased, but can be decreased)
- Reading a CIP 102 NFT’s royalties off chain
- Reading and validating against CIP 102 NFT royalties on chain## Use & Structure
This repository is divided into two parts: offchain (transaction building) & onchain (transaction validation).
The `offchain-reference` subdirectory is written in Typescript, making heavy use of the [Lucid](https://github.com/spacebudz/lucid) offchain transaction building library.
The `onchain-reference` subdirectory is written in [Aiken](https://aiken-lang.org/), a Cardano-specific onchain transaction validation language.
Both sub-directories have instructions for use in their own README files at their own roots.
## Disclaimers
This code has not been audited and is NOT INTENDED FOR PRODUCTION, but to provide code examples of expected behavior.
Several solutions are done in slightly suboptimal ways for clarity's or labor efficiency's sake. Feedback & contributions (in the form of Issues or Pull Requests) are very welcome :)