-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from independenceee/feature/documents
develop: write document mint opensource dynamic asset
- Loading branch information
Showing
3 changed files
with
62 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,60 @@ | ||
# cip68generator | ||
# CIP68 Generator | ||
|
||
CIP-68 is an open-source standard designed for creating and managing NFTs on the Cardano blockchain. It introduces advanced features for flexible and scalable token management, allowing developers to mint, burn, update, and remove NFTs with enhanced security and efficiency. | ||
|
||
## Features | ||
|
||
- [x] **Mint**: Create new NFTs with customizable metadata, adhering to Cardano standards. | ||
- [x] **Burn**: Permanently remove NFTs from circulation, controlling supply. | ||
- [x] **Update**: Modify the metadata of existing NFTs without changing their identity. | ||
- [x] **Remove**: Change metadata to retire NFTs from active use without destroying them. | ||
|
||
We primarily use two main SDKs, Mesh and Blockfrost, to efficiently retrieve information and execute transactions on the blockchain. Additionally, Mesh provides the flexibility to use other providers beyond Blockfrost (such as Koios ...). | ||
|
||
- [x] **Blockfrost**: use [Blockfrost](https://blockfrost.io) to query data | ||
- [x] **Mesh**: use [Mesh](https://meshjs.dev) join blockfrost to make transactions and work with Wallets simply | ||
|
||
## Install | ||
|
||
- npm: `npm i @independenceee/cip68generator` | ||
- yarn: `yarn add @independenceee/cip68generator` | ||
|
||
## Create `BlockfrostProvider` and `MeshTxBuilder` to efficiently retrieve information and execute transactions. | ||
|
||
```ts | ||
import { BlockfrostProvider, MeshTxBuilder } from "@meshsdk/core"; | ||
|
||
const blockfrostProvider: BlockfrostProvider = new BlockfrostProvider("<Your-Api-Key>"); | ||
|
||
const meshTxBuilder: MeshTxBuilder = new MeshTxBuilder({ | ||
fetcher: blockfrostProvider, | ||
evaluator: blockfrostProvider, | ||
submitter: blockfrostProvider, | ||
}); | ||
``` | ||
|
||
## Mint: Create new NFTs with customizable metadata, adhering to Cardano standards. | ||
|
||
```ts | ||
import { Cip68Contract } from "@independenceee/cip68generator"; | ||
|
||
const cip68Contract: Cip68Contract = new Cip68Contract({ | ||
wallet: wallet, | ||
fetcher: blockfrostProvider, | ||
meshTxBuilder: meshTxBuilder, | ||
}); | ||
|
||
const unsignedTx = await cip68Contract.mint({ | ||
assetName: "CIP68 Generator", | ||
quantity: "1", | ||
metadata: { | ||
name: "CIP68 Generator", | ||
image: "ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua", | ||
mediaType: "image/jpg", | ||
description: "Open source dynamic assets (Token/NFT) generator (CIP68)", | ||
}, | ||
}); | ||
|
||
const signedTx = await wallet.signTx(unsignedTx, true); | ||
const txHash = await wallet.submitTx(signedTx); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters