Skip to main content

Installation

SDK Coming Soon

The @runner-protocol/sdk package is not yet publicly available. It will be published to npm once the protocol launches on mainnet. In the meantime, you can interact with the protocol through the Indexer API for reading state, or use the Runner Protocol app to participate in auctions.

Install the SDK (Preview)

Once published, the SDK will be installed via:

npm install @runner-protocol/sdk @solana/web3.js

Peer Dependencies

The SDK will require @solana/web3.js version ^1.90.0 as a peer dependency.

PackageVersion
@solana/web3.js^1.90.0

TypeScript Setup

The SDK ships with TypeScript declarations (.d.ts files). No additional @types/ packages will be required.

Your tsconfig.json should include:

{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"esModuleInterop": true,
"strict": true
}
}
note

The SDK uses BigInt extensively for on-chain numeric types (u64, u128, U256). Your TypeScript target must be ES2020 or later to support BigInt natively.

Basic Import

import {
// Program IDs
CCA_V2_PROGRAM_ID,
LAUNCHPAD_PROGRAM_ID,

// PDA derivation
findAuctionConfigPda,
findBidPda,
deriveCcaPdas,
deriveLaunchPdas,

// Instruction builders
buildPlaceBidInstruction,
buildClaimTokensInstruction,
buildExitBidInstruction,

// Q96 math
encodeQ96,
decodeQ96,
decodeQ96ToString,

// ATA helpers
getAssociatedTokenAddress,
createAssociatedTokenAccountIdempotentInstruction,

// Types
type AuctionConfig,
type Bid,
CheckpointStatus,
} from "@runner-protocol/sdk";