# fees:verify-claim — Ammora SDK 0.3.8 npm run fees:verify-claim -- [index] Read-only, including when AMMORA_SEND=1. Never loads a signer or constructs a new transaction. This command covers direct beneficiary claims; use the LP verifier for LP/delegate receipts. [Read in Docs](https://docs.ammora.org/examples?command=fees%3Averify-claim) · [Detailed guide](https://docs.ammora.org/guides/fee-sharing) · [Local setup](https://docs.ammora.org/guides/example-setup) ## Context and execution GIWA Sepolia 91342. Public SDK 0.3.8, Math 0.3.0. Source revision: `a9b3fd798fa51495e8defec99a25de59e4d70672`. Install the SDK in your app, or prepare the example project using the local setup guide for its npm commands. Review the entry source and guide for required arguments, roles and deployment selection. `AMMORA_SEND=0` does not turn send-only commands into previews. Never put CLI keys in a browser or resend an uncertain transaction. Command: `npm run fees:verify-claim -- ` (`tsx src/fees/verify-claim.ts`). Omit `--` and arguments when the source accepts none. ## Entry file: `src/fees/verify-claim.ts` ```typescript /** npm run fees:verify-claim -- [index] * Read-only, including when AMMORA_SEND=1. Never loads a signer or constructs a new transaction. * This command covers direct beneficiary claims; use the LP verifier for LP/delegate receipts. */ import { ammoraLaunchFactoryV4Abi, ammoraAFSVaultAbi } from "@ammora-protocol/sdk"; import { parseAbi, type Hash } from "viem"; import { address, deployment, reader, v4Deployment } from "../shared/env.js"; import { integer, printJson } from "../shared/input.js"; import { main } from "../shared/run.js"; import { verifyFeePayment } from "../shared/fee-payment.js"; main(async () => { const [kind, hash, vaultArg, tokenArg, beneficiaryArg, payoutArg, indexArg] = process.argv.slice(2); if (kind !== "launch" && kind !== "dfs") throw new Error("kind must be launch or dfs"); if (!/^0x[0-9a-fA-F]{64}$/.test(hash ?? "")) throw new Error("hash must be a submitted transaction hash"); const vault = address("FEE_VAULT", vaultArg), token = address("FEE_TOKEN", tokenArg); const beneficiary = address("BENEFICIARY", beneficiaryArg), payout = address("PAYOUT", payoutArg); const index = kind === "dfs" ? integer(indexArg ?? "", "recipientIndex", 0, 255) : undefined; const client = await reader(); const receipt = await client.getTransactionReceipt({ hash: hash as Hash }); const blockNumber = receipt.blockNumber; // Provenance is checked at the claim block, never inferred from untrusted event addresses. if (kind === "launch") { const reviewed = await client.readContract({ address: v4Deployment().contracts.launch.factory, abi: ammoraLaunchFactoryV4Abi, functionName: "feeVault", blockNumber }); if (reviewed.toLowerCase() !== vault.toLowerCase()) throw new Error("Vault differs from reviewed launch factory"); } else { const registered = await client.readContract({ address: deployment().contracts.feeSharing.factory, abi: parseAbi(["function isVault(address) view returns (bool)"]), functionName: "isVault", args: [vault], blockNumber }); if (!registered) throw new Error("Reviewed DFS factory did not create this vault"); const actualToken = await client.readContract({ address: vault, abi: ammoraAFSVaultAbi, functionName: "token", blockNumber }); if (actualToken.toLowerCase() !== token.toLowerCase()) throw new Error("Token differs from DFS vault token"); } printJson(await verifyFeePayment(client, { kind, hash: hash as Hash, vault, token, beneficiary, payout, index })); }); ``` ## Supporting files Keep relative paths intact. Local imports are listed recursively; JSON templates are choices to review, not approved inputs. Runtime-selected files and wallet/environment setup still follow the detailed guide. - [src/shared/env.ts](https://docs.ammora.org/examples/source/src/shared/env.ts.txt) - [src/shared/fee-payment.ts](https://docs.ammora.org/examples/source/src/shared/fee-payment.ts.txt) - [src/shared/input.ts](https://docs.ammora.org/examples/source/src/shared/input.ts.txt) - [src/shared/retry.ts](https://docs.ammora.org/examples/source/src/shared/retry.ts.txt) - [src/shared/rpc.ts](https://docs.ammora.org/examples/source/src/shared/rpc.ts.txt) - [src/shared/run.ts](https://docs.ammora.org/examples/source/src/shared/run.ts.txt) - [src/fees/batch.example.json](https://docs.ammora.org/examples/source/src/fees/batch.example.json.txt) - [package.json](https://docs.ammora.org/examples/source/package.json.txt) - [package-lock.json](https://docs.ammora.org/examples/source/package-lock.json.txt) - [tsconfig.json](https://docs.ammora.org/examples/source/tsconfig.json.txt) - [.env.giwa.example](https://docs.ammora.org/examples/source/file.env.giwa.example.txt) - [.nvmrc](https://docs.ammora.org/examples/source/file.nvmrc.txt) ## AI implementation checklist Use the actual SDK exports and parameter types in the linked files. Start with reads and unsigned plans where supported. Use a connected wallet for browser signing. Preserve raw integer units, exact approvals, caller authority, deadlines and receipt reconciliation. Report local checks separately from live-chain verification.