A reference implementation of the Covenant Attested Token (CAT)
protocol on BTC signet and Fractal, where OP_CAT
is re-activated.
There are three major packages implementing the protocol and tools for CAT
out of the box.
packages
├── cli
├── common
├── smartcontracts
└── tracker
smartcontracts
Smart contracts implementing the CAT
protocol written in sCrypt.
tracker
A tracker
service that keeps track of CAT
related UTXOs, including minter and token. It exposes them as REST APIs for application integration.
cli
A Command Line Interface (CLI)
tool that can deploy
/ mint
/ transfer
CAT
protocol tokens.
Make sure you have Node.js
>=20 and yarn
installed.
You can follow the guide here to install Node.js
.
Also, you can check its version use this command:
node -v
Use this command to install yarn
if it's not installed:
npm i -g yarn
You can install and run the above two components on your own or follow the instructions here in tracker
package to start them in docker containers.
⚠️ Warning: Please only use Taproot address (starting with
bc1p
) for all CAT protocol transactions, including fee inputs, change outputs, and token owner address. Failing to do so may result in loss of funds.
Run this command under the project's root directory to build the whole project:
yarn install && yarn build
tracker
serviceFollow the instructions here to setup and start the tracker
service.
CLI
commandsAfter the tracker
syncs up to the latest block, you can execute all kinds of commands provided by the cli
package to interact with CAT
protocol tokens. Refer to this document to see more details.
Run this command under the root directory to run all tests from these packages:
turbo test