Socket
Book a DemoInstallSign in
Socket

@cat-protocol/cat-sdk-v2

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cat-protocol/cat-sdk-v2

CAT protocol SDK.

2.0.3
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
2
Weekly downloads
 
Created
Source

CAT Protocol SDK

This SDK package is designed for applications built on the CAT protocol. Since the entire CAT protocol is based on the Bitcoin UTXO module and intricate underlying Bitcoin script, this SDK simplifies the integration of CAT20 & CAT721 tokens into developers’ products.

Usage

The SDK offers three distinct layers of abstraction that developers can utilize to construct their own applications, tailored to meet their specific requirements.

Features

On a high level, this SDK offers some fundamental functionalities to interact with CAT20 and CAT721 protocol tokens, including Deploy, Mint, Transfer, and Burn. These APIs can be found in the src/features folder.

Covenants

On a middle level, this SDK introduces an abstraction called the Covenant, which merges the capabilities of the underlying smart contracts and Taproot technology. These covenants are meticulously designed to be modular and composable, enabling the creation of arbitrary transactions to implement customized logic. They can be compared to the building blocks that constitute a feature.

Contracts

On a fundamental level, this SDK offers all the essential smart contracts written in the sCrypt DSL, which can be compiled into Bitcoin scripts and utilized in covenants. If you’re interested in learning how to create your own on-chain smart contracts, you should thoroughly examine these contracts in the src/contracts folder.

Installation

npm i @cat-protocol/cat-sdk-v2

Build Locally

yarn install && yarn build

Testing Locally

yarn test

Sample Transactions

Sample token contract address is bc1p2dxw0fux0wzga0udvlrpn40v3ap8ggu6c9kqaf6h2ahjhuhkzess266xgf

CAT Token Transaction Limits

For a CAT Token protocol transaction, the maximum number of inputs is 6, and the maximum number of outputs is also 6.

Since we need to calculate the txid of the previous transaction, we must ensure the previous transaction’s data is within 520 bytes.

This is because the maximum byte limit for an element on the Bitcoin Virtual Machine (BVM) stack is 520. The corresponding constant name is MAX_SCRIPT_ELEMENT_SIZE.

CAT Protocol

FAQs

Package last updated on 19 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.