Accounts

User PDA

One per Twitter account. Holds SOL and is controlled by the Claimr program.

Seeds: ["claimr", twitter_id_bytes]

Derive via API or locally:

const [pda] = PublicKey.findProgramAddressSync(
  [Buffer.from('claimr'), Buffer.from(twitterId)],
  CLAIMR_PROGRAM_ID
);

ClaimrConfig

Global configuration account, one per program instance.

Seeds: ["config"]

Contains the protocol authority, oracle public key, treasury address, fee rate, and aggregate statistics. Direct reads are not typically necessary for integrations.

WithdrawRecord

Created for each withdrawal to prevent replay attacks.

Seeds: ["withdraw", twitter_id_bytes, nonce_bytes]

Reusing a nonce causes account initialization to fail because the record already exists.

Last updated