Back to Home
Shared IDL & Interfacesv0.1.0
@tidepay/types
Shared Anchor IDL, account interfaces, error enumerations, and PDA seed constants used across the dashboard, API, and crank bots.
1. Program Constants
TIDEPAY_PROGRAM_IDDfAycPzXuSu4EzqfAprZ11S8oQZ6nucuRniFNrNaK5CQ
PLAN_SEED"plan"
SUBSCRIPTION_SEED"subscription"
AUTH_SEED"tidepay_auth"
2. Account Types
MerchantPlan
export interface MerchantPlan {
merchant: string;
tokenMint: string;
merchantTokenAccount: string;
amount: bigint;
intervalSeconds: bigint;
planId: string;
protocolFeeBps: number;
crankBountyAmount: bigint;
isActive: boolean;
bump: number;
}SubscriptionRecord
export interface SubscriptionRecord {
plan: string;
subscriber: string;
subscriberTokenAccount: string;
startTimestamp: bigint;
lastEpochTimestamp: bigint;
nextEpochTimestamp: bigint;
cycleCount: bigint;
isActive: boolean;
bump: number;
}3. Anchor IDL Integration
The package includes the full Anchor IDL JSON so frontend applications and crank bots can instantiate Anchor programs without compiling Rust binaries locally:
import { Program, AnchorProvider } from "@coral-xyz/anchor";
import { TIDEPAY_IDL, TIDEPAY_PROGRAM_ID } from "@tidepay/types";
const program = new Program(TIDEPAY_IDL as any, provider);Source Repository
Types on GitHub Inspect the complete IDL specification and TypeScript type declarations.