Instructions
init_user_pda
Creates the on-chain account for a Twitter user. Safe to call multiple times (idempotent).
Accounts: user_pda, fee_payer (signer), system_program
Args: twitter_id: String
Anyone can call this. The Claimr backend handles it automatically during withdrawals.
withdraw
Transfers funds from a PDA to a destination. Requires a valid oracle signature.
Accounts: user_pda, config, destination, treasury, withdraw_record, fee_payer (signer), instructions_sysvar, system_program
Args: twitter_id: String, destination: Pubkey, amount: u64 (0 = max), nonce: u64
The transaction must include an Ed25519Program instruction with the oracle's signature before this instruction.
Admin
update_oracle
new_oracle: Pubkey
Change signer key
update_treasury
new_treasury: Pubkey
Change fee recipient
update_fee
new_fee_bps: u16
Change fee (basis points)
Require protocol authority signature.
Last updated