Instructions

Complete reference for TIX Protocol on-chain instructions.

Integrator Instructions

update_integrator_authority

Rotates an integrator's signing authority.

Parameters:

Name
Type
Description

integrator_identity

Pubkey

Integrator identifier

new_integrator_authority

Pubkey

New authority public key

Accounts:

Name
Type
Description

protocol_config

Account<ProtocolConfig>

Protocol config

integrator

Account<Integrator>

Integrator PDA

authority_signer

Signer

Current or protocol authority

payer

Signer

Transaction fee payer

Constraints:

  • Signer must be current integrator authority or protocol authority


withdraw_integrator_treasury

Withdraws funds from the integrator's treasury to a destination token account.

Parameters:

Name
Type
Description

integrator_identity

Pubkey

Integrator identifier

amount

u64

Amount to withdraw (USDC minor units)

Accounts:

Name
Type
Description

protocol_config

Account<ProtocolConfig>

Protocol config

integrator

Account<Integrator>

Integrator PDA

integrator_authority

Signer

Integrator authority

integrator_treasury

Account<TokenAccount>

Integrator's USDC treasury

destination

Account<TokenAccount>

Destination token account

token_program

Program

SPL Token program

Constraints:

  • Signer must be integrator authority

  • Amount must be > 0

  • Destination must be USDC token account


Event Instructions

register_event

Creates a new event with supply and royalty configuration.

Parameters:

Name
Type
Description

event_id

u64

Unique event identifier

total_supply

u64

Maximum ticket count

royalty_bps

u16

Royalty percentage (basis points)

min_royalty_floor

u64

Minimum royalty (minor units)

royalty_recipients

Vec<RoyaltyRecipient>

Up to 3 recipients

Accounts:

Name
Type
Description

protocol_config

Account<ProtocolConfig>

Protocol config

event

Account<Event>

PDA: [b"event", event_id]

integrator

Account<Integrator>

Integrator PDA

integrator_identity

UncheckedAccount

Integrator identity pubkey

integrator_authority

Signer

Integrator authority

integrator_treasury

Account<TokenAccount>

Integrator's USDC ATA

fee_vault

Account<TokenAccount>

Protocol fee vault

token_program

Program

SPL Token program

system_program

Program

System program

payer

Signer

Transaction fee payer

Constraints:

  • Integrator must be Active

  • Recipient BPS must sum to royalty_bps

  • Max 3 royalty recipients

  • Event created with transfers and resale enabled by default


update_event_controls

Updates an event's transfer and resale settings.

Parameters:

Name
Type
Description

event_id

u64

Event identifier

transfers_enabled

bool

Whether transfers are allowed

resale_enabled

bool

Whether resale listings allowed

Accounts:

Name
Type
Description

event

Account<Event>

Event PDA

integrator

Account<Integrator>

Integrator PDA

integrator_authority

Signer

Integrator authority

Constraints:

  • Signer must be event's integrator authority


update_ticket_type_config

Sets the maximum resale price for a specific ticket type within an event.

Parameters:

Name
Type
Description

event_id

u64

Event identifier

ticket_type_id

u32

Ticket type identifier

max_resale_price_minor

Option<u64>

Max resale price (USDC minor units)

Accounts:

Name
Type
Description

event

Account<Event>

Event PDA

integrator

Account<Integrator>

Integrator PDA

integrator_authority

Signer

Integrator authority

ticket_type_config

Account<TicketTypeConfig>

PDA: [b"ticket_type", event, ticket_type_id]

system_program

Program

System program

Constraints:

  • Signer must be event's integrator authority

  • Pass None or 0 to remove price cap


close_event

Closes an event and reclaims rent from permit pages. Used after an event is complete.

Parameters:

Name
Type
Description

event_id

u64

Event identifier

Accounts:

Name
Type
Description

event

Account<Event>

Event PDA (will be closed)

integrator

Account<Integrator>

Integrator PDA

integrator_identity

UncheckedAccount

Integrator identity

integrator_authority

Signer

Integrator authority

remaining_accounts

Vec<AccountInfo>

Permit pages to close

Constraints:

  • Signer must be event's integrator authority

  • All permit pages must belong to the event

  • Rent is returned to integrator authority


Permit Instructions

issue_permit

Issues a single permit to a buyer.

Parameters:

Name
Type
Description

buyer

Pubkey

Buyer's wallet

ticket_id

u64

Ticket identifier

page_idx

u64

Page index for storage

ticket_type_id

u32

Ticket type identifier

Accounts:

Name
Type
Description

protocol_config

Account<ProtocolConfig>

Protocol config

event

Account<Event>

Event PDA

permit_page

Account<PermitPage>

PDA: [b"permit_page", event, page]

integrator

Account<Integrator>

Integrator PDA

integrator_identity

UncheckedAccount

Integrator identity

integrator_authority

Signer

Integrator authority

integrator_treasury

Account<TokenAccount>

Integrator's USDC ATA

fee_vault

Account<TokenAccount>

Protocol fee vault

token_program

Program

SPL Token program

system_program

Program

System program

payer

Signer

Transaction fee payer

Constraints:

  • Integrator must be Active

  • ticket_id < total_supply

  • page_idx == ticket_id / 128

  • Slot must be empty (not already minted)

  • Treasury must have sufficient USDC for permit fee


transfer_permit

Transfers permit ownership.

Parameters:

Name
Type
Description

event_id

u64

Event identifier

ticket_id

u64

Ticket identifier

page_idx

u64

Page index

Accounts:

Name
Type
Description

protocol_config

Account<ProtocolConfig>

Protocol config

event

Account<Event>

Event PDA

permit_page

Account<PermitPage>

Permit storage page

integrator

Account<Integrator>

Integrator PDA

integrator_treasury

Account<TokenAccount>

Integrator's USDC ATA

fee_vault

Account<TokenAccount>

Protocol fee vault

current_owner

AccountInfo

Current owner (signer if owner transfer)

new_owner

UncheckedAccount

New owner wallet

integrator_authority

AccountInfo

Integrator authority (optional signer)

token_program

Program

SPL Token program

remaining_accounts

Vec<AccountInfo>

Optional: listing account

Constraints:

  • Event must have transfers enabled (TransfersDisabled error)

  • Permit must be Active

  • Permit must not be locked (or listing expired)

  • Signer must be owner or integrator authority


mark_used

Marks a permit as redeemed.

Parameters:

Name
Type
Description

ticket_id

u64

Ticket identifier

page_idx

u64

Page index

Accounts:

Name
Type
Description

event

Account<Event>

Event PDA

permit_page

Account<PermitPage>

Permit storage page

integrator

Account<Integrator>

Integrator PDA

integrator_identity

UncheckedAccount

Integrator identity

integrator_authority

Signer

Integrator authority

Constraints:

  • Permit must be Active

  • Only integrator authority can call

  • Sets permit status to Used (1)


mark_void

Marks a permit as cancelled/void.

Parameters:

Name
Type
Description

ticket_id

u64

Ticket identifier

page_idx

u64

Page index

Accounts:

Same as mark_used

Constraints:

  • Permit must be Active

  • Only integrator authority can call

  • Sets permit status to Void (2)


Listing Instructions

list_ticket

Lists a ticket for sale on the secondary market.

Parameters:

Name
Type
Description

event_id

u64

Event identifier

ticket_id

u64

Ticket identifier

ask_price_minor

u64

Sale price (USDC minor units)

buyer_allow

Pubkey

Buyer restriction (or default)

expires_at

i64

Expiration timestamp

Accounts:

Name
Type
Description

protocol_config

Account<ProtocolConfig>

Protocol config

event

Account<Event>

Event PDA

permit_page

Account<PermitPage>

Permit storage page

listing

Account<Listing>

PDA: [b"listing", event_id, ticket_id]

listing_integrator

Account<Integrator>

Integrator facilitating the listing

listing_integrator_identity

UncheckedAccount

Listing integrator identity

listing_integrator_treasury

Account<TokenAccount>

Listing integrator's treasury

seller

Signer

Current owner

fee_payer

Signer

Transaction fee payer

payout_ata

Account<TokenAccount>

Seller's payout ATA or integrator treasury

system_program

Program

System program

remaining_accounts

Vec<AccountInfo>

Optional: ticket type config

Constraints:

  • Event must have resale enabled (ResaleDisabled error)

  • Listing integrator must be Active

  • Permit must be Active

  • Permit must not be locked

  • Seller must be owner

  • expires_at must be in the future

  • If ticket type has price cap, ask_price_minor must not exceed it (ResalePriceExceedsMax error)

  • Payout ATA must be owned by seller or be the listing integrator's treasury


accept_offer

Executes a secondary sale purchase.

Parameters:

Name
Type
Description

event_id

u64

Event identifier

ticket_id

u64

Ticket identifier

buyer_pubkey

Pubkey

Buyer's wallet

Accounts:

Name
Type
Description

protocol_config

Account<ProtocolConfig>

Protocol config

event

Account<Event>

Event PDA

permit_page

Account<PermitPage>

Permit storage page

listing

Account<Listing>

Listing PDA

integrator

Account<Integrator>

Event's integrator PDA

integrator_treasury

Account<TokenAccount>

Integrator's USDC ATA

fee_vault

Account<TokenAccount>

Protocol fee vault

integrator_authority

Signer

Integrator authority

payer

Signer

Payment signer (integrator or buyer)

payer_usdc

Account<TokenAccount>

Payer's USDC ATA

seller_payout

Account<TokenAccount>

Seller's payout ATA

token_program

Program

SPL Token program

remaining_accounts

Vec<AccountInfo>

Royalty recipient ATAs, ticket type config

Constraints:

  • Event must have resale enabled (ResaleDisabled error)

  • Listing must be active

  • Listing must not be expired

  • Permit version must match listing version

  • Buyer must be allowed (if restriction set)

  • Payer must have sufficient USDC

  • If ticket type has price cap, listing price must not exceed it

  • Seller payout must match the listing's payout_ata


cancel_listing

Cancels an active listing.

Parameters:

Name
Type
Description

event_id

u64

Event identifier

ticket_id

u64

Ticket identifier

Accounts:

Name
Type
Description

protocol_config

Account<ProtocolConfig>

Protocol config

event

Account<Event>

Event PDA

permit_page

Account<PermitPage>

Permit storage page

listing

Account<Listing>

Listing PDA

canceller

Signer

Authorized canceller

Constraints:

  • Listing must be active (or expired)

  • Signer must be:

    • Seller (listing creator)

    • Event's integrator authority

    • Protocol authority

  • If listing is active and not expired, seller must still own the permit


Error Codes

Error
Description

Unauthorized

Signer lacks permission for this action

SupplyExceeded

Ticket ID exceeds event total supply

InvalidPage

Page index doesn't match ticket ID

InvalidEvent

Event mismatch or invalid event account

InvalidPermitPage

Invalid permit page account

InvalidTicket

Ticket ID mismatch or invalid

PermitNotActive

Permit is used or voided

InvalidRoyaltyDest

Royalty destination account invalid

InvalidMint

Token mint mismatch

InvalidResaleFeeBps

Resale fee BPS exceeds 10,000

InvalidMintDecimals

USDC mint has fewer than 2 decimals

Overflow

Arithmetic overflow

Underflow

Arithmetic underflow

IntegratorSuspended

Integrator is not active

IntegratorMismatch

Integrator doesn't match event

AlreadyInitialized

Protocol already initialized

IntegratorAlreadyExists

Integrator already registered

ListingActive

Listing is active, cannot transfer

ListingExpired

Listing has expired

ListingNotActive

Listing is not active

ListingLocked

Listing is locked by another owner

ListingVersionMismatch

Permit changed since listing created

BuyerNotAllowed

Buyer not on allowlist

InvalidListing

Listing account invalid

TransfersDisabled

Transfers are disabled for this event

ResaleDisabled

Resale is disabled for this event

ResalePriceExceedsMax

Ask price exceeds ticket type's max resale price

TooManyRoyaltyRecipients

More than 3 royalty recipients

RoyaltyBpsMismatch

Recipient BPS don't sum to royalty_bps

TicketAlreadyMinted

Ticket slot already has a permit

InvalidAmount

Amount must be greater than 0

Last updated