Address Derivation
The SDK provides helper functions to derive Program Derived Addresses (PDAs) for all TIX Protocol accounts.
Overview
All TIX Protocol state is stored in PDAs, which are deterministic addresses derived from seeds. The SDK provides functions to compute these addresses locally.
Protocol Config PDA
The protocol configuration account.
import { protocolConfigPda } from "@tixprotocol/sdk";
const [pda, bump] = protocolConfigPda();
console.log(`Protocol Config: ${pda.toBase58()}`);Seeds: [b"protocol_config"]
Integrator PDA
Integrator account for a marketplace/venue.
import { integratorPda } from "@tixprotocol/sdk";
const integratorIdentity = new PublicKey("...");
const [pda, bump] = integratorPda(integratorIdentity);
console.log(`Integrator: ${pda.toBase58()}`);Seeds: [b"integrator", integrator_identity]
Event PDA
Event account containing supply and royalty configuration.
Seeds: [b"event", event_id (u64 LE)]
Permit Page PDA
Storage page for permits (128 per page).
Seeds: [b"permit_page", event_pubkey, page_idx (u64 LE)]
Page Calculation Helper
Listing PDA
Secondary market listing account.
Seeds: [b"listing", event_id (u64 LE), ticket_id (u64 LE)]
Associated Token Account (ATA)
For USDC treasury and payout accounts, use SPL Token helpers:
Complete Example
Low-Level Derivation
If you need to derive PDAs manually:
Seed Reference
ProtocolConfig
[b"protocol_config"]
Integrator
[b"integrator", identity_pubkey]
Event
[b"event", event_id_le_bytes]
PermitPage
[b"permit_page", event_pubkey, page_idx_le_bytes]
Listing
[b"listing", event_id_le_bytes, ticket_id_le_bytes]
Last updated