{"address":"HmVEqQkhXa3RJS2J7zco6PG8Kb8teqrrEAj1Z5XvAZ53","metadata":{"name":"sospeso_verifier","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"claim_sospeso","docs":["A beneficiary (or a relayer paying rent on their behalf) claims `amount`","lamports from the pool. The ClaimReceipt PDA is `init`-ed here, so a","second claim by the same beneficiary fails at account creation -- the","receipt's existence is the double-claim guard.","","Because the Sospeso PDA carries data, lamports cannot leave it through a","System transfer; we move them by directly mutating both accounts'","lamports (the escrow stays above its rent floor since only the","claimable `lamports_remaining` is ever debited)."],"discriminator":[206,175,40,85,52,228,74,31],"accounts":[{"name":"payer","docs":["Pays for the ClaimReceipt rent. May be the beneficiary itself or a","relayer fronting the rent (Octane pattern). Must sign."],"writable":true,"signer":true},{"name":"beneficiary","docs":["The wallet credited with the claimed lamports and bound into the","receipt seeds. Not required to sign (a relayer can claim on its behalf),","but it is the identity the per-beneficiary double-claim guard keys on.","is read from or written to this account."],"writable":true},{"name":"sospeso","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,111,115,112,101,115,111]},{"kind":"account","path":"sospeso.sponsor","account":"Sospeso"},{"kind":"account","path":"sospeso.nonce","account":"Sospeso"}]}},{"name":"claim_receipt","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,108,97,105,109]},{"kind":"account","path":"sospeso"},{"kind":"account","path":"beneficiary"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"create_sospeso","docs":["Sponsor opens a sospeso pool and funds it with `amount` lamports.","","The PDA is created rent-exempt; `amount` is transferred on top of rent","via a System Program CPI (sponsor signs). `lamports_total` /","`lamports_remaining` track only the claimable balance (rent stays in the","account forever and is never handed out to beneficiaries)."],"discriminator":[11,202,95,160,0,153,169,34],"accounts":[{"name":"sponsor","writable":true,"signer":true},{"name":"sospeso","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,111,115,112,101,115,111]},{"kind":"account","path":"sponsor"},{"kind":"arg","path":"nonce"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"nonce","type":"u64"},{"name":"amount","type":"u64"},{"name":"max_per_claim","type":"u64"},{"name":"max_claims","type":"u32"},{"name":"expiry_ts","type":"i64"},{"name":"new_wallet_only","type":"bool"}]},{"name":"reclaim","docs":["After expiry, the sponsor reclaims the entire remaining (claimable)","balance. Rent stays in the PDA. Uses direct lamport math for the same","data-bearing-PDA reason as `claim_sospeso`."],"discriminator":[44,177,236,249,145,109,163,186],"accounts":[{"name":"sponsor","writable":true,"signer":true,"relations":["sospeso"]},{"name":"sospeso","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,111,115,112,101,115,111]},{"kind":"account","path":"sospeso.sponsor","account":"Sospeso"},{"kind":"account","path":"sospeso.nonce","account":"Sospeso"}]}}],"args":[]},{"name":"top_up","docs":["Sponsor adds more lamports to an existing, non-expired pool."],"discriminator":[236,225,96,9,60,106,77,208],"accounts":[{"name":"sponsor","writable":true,"signer":true,"relations":["sospeso"]},{"name":"sospeso","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,111,115,112,101,115,111]},{"kind":"account","path":"sospeso.sponsor","account":"Sospeso"},{"kind":"account","path":"sospeso.nonce","account":"Sospeso"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]}],"accounts":[{"name":"ClaimReceipt","discriminator":[223,233,11,229,124,165,207,28]},{"name":"Sospeso","discriminator":[142,102,106,55,215,250,16,252]}],"events":[{"name":"SospesoClaimed","discriminator":[153,47,209,77,42,154,40,159]},{"name":"SospesoCreated","discriminator":[14,162,72,20,225,113,143,187]},{"name":"SospesoReclaimed","discriminator":[152,183,138,212,154,112,98,71]},{"name":"SospesoToppedUp","discriminator":[110,246,129,91,132,150,235,179]}],"errors":[{"code":6000,"name":"Expired","msg":"The sospeso pool has expired"},{"code":6001,"name":"ClaimCapReached","msg":"The pool has reached its maximum number of claims"},{"code":6002,"name":"InsufficientFunds","msg":"Not enough lamports remaining in the pool"},{"code":6003,"name":"AmountTooLarge","msg":"Requested amount exceeds the per-claim cap (or the initial deposit)"},{"code":6004,"name":"NotExpiredYet","msg":"The pool has not expired yet; reclaim is unavailable"},{"code":6005,"name":"Unauthorized","msg":"Signer is not authorized for this sospeso"},{"code":6006,"name":"ZeroAmount","msg":"Amount must be greater than zero"},{"code":6007,"name":"ZeroMaxClaims","msg":"max_claims must be greater than zero"},{"code":6008,"name":"ZeroMaxPerClaim","msg":"max_per_claim must be greater than zero"},{"code":6009,"name":"Overflow","msg":"Arithmetic overflow"}],"types":[{"name":"ClaimReceipt","docs":["Proof that a given beneficiary has already claimed from a given sospeso.","","PDA: seeds `[b\"claim\", sospeso, beneficiary]`. Created (`init`) inside","`claim_sospeso`; its existence alone makes a second claim by the same","beneficiary fail, so it is the on-chain double-claim guard."],"type":{"kind":"struct","fields":[{"name":"beneficiary","docs":["The wallet that claimed."],"type":"pubkey"},{"name":"amount","docs":["Lamports granted in the (single) claim."],"type":"u64"},{"name":"ts","docs":["Unix timestamp of the claim."],"type":"i64"},{"name":"bump","docs":["PDA bump."],"type":"u8"}]}},{"name":"Sospeso","docs":["A suspended-gas escrow pool opened by a sponsor.","","PDA: seeds `[b\"sospeso\", sponsor, nonce.to_le_bytes()]`.","","Actual lamports held by the account = rent-exempt minimum + `lamports_remaining`.","`lamports_total` is the cumulative amount ever funded (create + top_ups); it is","informational and never decreases on claim."],"type":{"kind":"struct","fields":[{"name":"sponsor","docs":["Wallet that opened and funds the pool; the only party allowed to top up or reclaim."],"type":"pubkey"},{"name":"lamports_total","docs":["Cumulative lamports funded into the pool (create + all top_ups). Informational."],"type":"u64"},{"name":"lamports_remaining","docs":["Lamports still claimable. Debited on each claim, zeroed on reclaim."],"type":"u64"},{"name":"max_per_claim","docs":["Hard cap on a single claim."],"type":"u64"},{"name":"claims_count","docs":["Number of successful claims so far."],"type":"u32"},{"name":"max_claims","docs":["Maximum number of claims the pool will ever honour."],"type":"u32"},{"name":"expiry_ts","docs":["Unix timestamp after which claims are rejected and reclaim becomes possible."],"type":"i64"},{"name":"new_wallet_only","docs":["If true, off-chain eligibility (relayer) should restrict claims to new wallets.","Enforced off-chain by the relayer; stored on-chain so the policy is auditable."],"type":"bool"},{"name":"nonce","docs":["Sponsor-chosen nonce allowing many concurrent pools per sponsor."],"type":"u64"},{"name":"bump","docs":["PDA bump."],"type":"u8"}]}},{"name":"SospesoClaimed","type":{"kind":"struct","fields":[{"name":"sospeso","type":"pubkey"},{"name":"beneficiary","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"claims_count","type":"u32"},{"name":"lamports_remaining","type":"u64"},{"name":"ts","type":"i64"}]}},{"name":"SospesoCreated","type":{"kind":"struct","fields":[{"name":"sospeso","type":"pubkey"},{"name":"sponsor","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"max_per_claim","type":"u64"},{"name":"max_claims","type":"u32"},{"name":"expiry_ts","type":"i64"},{"name":"new_wallet_only","type":"bool"},{"name":"nonce","type":"u64"}]}},{"name":"SospesoReclaimed","type":{"kind":"struct","fields":[{"name":"sospeso","type":"pubkey"},{"name":"sponsor","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"SospesoToppedUp","type":{"kind":"struct","fields":[{"name":"sospeso","type":"pubkey"},{"name":"sponsor","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"lamports_remaining","type":"u64"}]}}]}