Installation

The TIX Protocol TypeScript SDK provides a complete interface for interacting with the on-chain program.

Installation

npm

npm install @tixprotocol/sdk

yarn

yarn add @tixprotocol/sdk

Dependencies

The SDK requires the following peer dependencies:

{
  "@solana/web3.js": "^1.87.0",
  "@solana/spl-token": "^0.3.0"
}

Install them if not already in your project:

npm install @solana/web3.js @solana/spl-token

Basic Setup

Configuration

Program ID

The SDK uses a constant PROGRAM_ID. Ensure it matches the deployed program:

USDC Mint

Configure the USDC mint for your network:

Quick Start Example

Error Handling

Next Steps

Last updated