# partner:claims — Ammora SDK 0.3.8 Check the source for arguments and transaction requirements. [Read in Docs](https://docs.ammora.org/examples?command=partner%3Aclaims) · [Detailed guide](https://docs.ammora.org/guides/src-partner-readme) · [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 partner:claims -- ` (`tsx src/partner/claims.ts`). Omit `--` and arguments when the source accepts none. ## Entry file: `src/partner/claims.ts` ```typescript import type { PartnerSdkHandleV2 } from "@ammora-protocol/sdk/partner"; import type { Address } from "viem"; import { createPartnerFixture, fixtureActors, fixtureToken } from "./fixture.js"; import { createReviewedCatalog } from "./catalog.js"; import { isMain, runOffline } from "./runtime.js"; /** Planning alone does not grant authority. Simulate the exact beneficiary request. */ export const preparePartnerClaim = async (handle: PartnerSdkHandleV2<"custody">, asset: Address, beneficiary: Address) => { if (handle.kind !== "pool-rights-v1") throw new Error("Expected pool rights family"); const plan = await handle.client.planClaim(asset, beneficiary); const simulation = await handle.client.simulateAction(plan); return { plan, simulation, automaticExecution: false as const, payoutVerified: false as const }; }; export const createClaimExample = async (settings: Parameters[0] = {}) => { const fixture = createPartnerFixture(settings), catalog = createReviewedCatalog([fixture.entry]); const request = { purpose: "custody", asset: { kind: "erc20", address: fixtureToken } } as const; const selection = catalog.select({ ...request, chainId: "31337", genesisHash: fixture.profile.genesisHash, source: fixture.entry.manifest.source }); if (selection.status !== "selected") throw new Error("Reviewed custody entry unavailable"); const handle = catalog.open(selection.reference, request); if (handle.kind !== "pool-rights-v1") throw new Error("Expected pool rights family"); return { fixture, handle, planClaim: (beneficiary: Address = fixtureActors.beneficiary) => preparePartnerClaim(handle, fixtureToken, beneficiary) }; }; export const previewClaim = async () => { const example = await createClaimExample(); return { scope: example.fixture.scope, ...await example.planClaim(), note: "Unsigned module custody claim, not an ARL NFT claim or C2 source manual claim. This module binds payout to the claiming beneficiary; no alternate recipient is invented. Simulation proves neither a positive payment nor a real deployment." }; }; if (isMain(import.meta.url)) void runOffline(previewClaim); ``` ## 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/partner/catalog.ts](https://docs.ammora.org/examples/source/src/partner/catalog.ts.txt) - [src/partner/fixture.ts](https://docs.ammora.org/examples/source/src/partner/fixture.ts.txt) - [src/partner/runtime.ts](https://docs.ammora.org/examples/source/src/partner/runtime.ts.txt) - [src/shared/input.ts](https://docs.ammora.org/examples/source/src/shared/input.ts.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.