Skip to content

#Bitcoin #Fractal #CAT721 #Protocol CLI: This is a reference implementation of the Covenant Attested Token (CAT721) protocol.

Notifications You must be signed in to change notification settings

solguru310/bitcoin-cat721-cli

Repository files navigation

bitcoin-cat-721-cli

#Bitcoin #Fractal #CAT721 #Protocol CLI: This is a reference implementation of the Covenant Attested Token (CAT721) protocol.

Clone

git clone https://github.com/solguru310/bitcoin-cat721-cli
cd bitcoin-cat721-cli

cli requires a synced tracker, run it from the beginning or follow this guide to upgrade.

Installation

yarn install

Build

yarn build

Usage

  1. Copy config.example.json as config.json. Update config.json with your own configuration.

All commands use the config.json in the current working directory by default. You can also specify a customized configuration file with --config=your.json.

  1. Create a wallet
yarn cli wallet create

You should see an output similar to:

? What is the mnemonic value of your account? (default: generate a new mnemonic) ********
Your wallet mnemonic is:  ********
exporting address to the RPC node ... 
successfully.
  1. Show address
yarn cli wallet address

You should see an output similar to:

Your address is bc1plf*******************
  1. Fund your address

Deposit some satoshis to your address.

  1. Show nfts
yarn cli wallet balances -i c1a1a777a52f76******************************************f574f82_0

You should see an output similar to:

┌────────────────────────────────────────────────────────────────────────┬────────┐
│ nft                                                                    │ symbol │
┼────────────────────────────────────────────────────────────────────────┼────────┤
│ 'c1a1a777a52f76*******************************************f574f82_0:1' │ 'LCAT' │
│ 'c1a1a777a52f76*******************************************f574f82_0:0' │ 'LCAT' │
┴────────────────────────────────────────────────────────────────────────┴────────┘
  1. Deploy a collection
  • deploy with a metadata json:
yarn cli deploy --metadata=metadata.json

metadata.json:

  • closed mint:
{
    "name": "LCAT",
    "symbol": "LCAT",
    "description": "this is a cat721 nft collection",
    "max": "10"
}
  • open mint:
{
    "name": "LCAT",
    "symbol": "LCAT",
    "description": "this is a cat721 nft collection",
    "premine": "0",
    "max": "10"
}
  • deploy with command line options:

  • closed mint

yarn cli deploy --name=LCAT --symbol=LCAT --max=10
  • parallel closed mint:
yarn cli deploy --name=LCAT --symbol=LCAT --max=10 --parallel
  • open mint
yarn cli deploy --name=LCAT --symbol=LCAT --max=10 --premine=0 --openMint

You should see an output similar to:

Nft collection LCAT has been deployed.
CollectionId: c1a1a777a52f76*****************************************f574f82_0
Genesis txid: c1a1a777a52f76*****************************************19f574f82
Reveal txid: d7871b55f885*******************************************db5b51265
  1. Mint nft
yarn cli mint -i [collectionId]

You should see an output similar to:

Minting LCAT NFT in txid: ef9d98eeae21***************************************6f95f5cb ...
  1. Send nft
yarn cli send -i [collectionId] -l [localId] [receiver]

You should see an output similar to:

Sending LCAT:0 nft  to bc1ppresf**********************************************rqvm9k07 
in txid: 277eb0198b*********************************************8c24ef52

FeeRate

deploy, mint, and send commands can all specify a fee rate via option --fee-rate.

About

#Bitcoin #Fractal #CAT721 #Protocol CLI: This is a reference implementation of the Covenant Attested Token (CAT721) protocol.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published