# Fund once. Let each recipient claim.

Prepay a fixed list of rewards, rebates or refunds. Each listed recipient claims their own allocation independently before the deadline.

## Commit the complete allocation

`claim_distribution_v1` locks one fungible asset for 1-64 unique Ed25519 wallet recipient addresses. Every allocation is a positive exact amount; their sum must equal the fully funded opening amount. The funder cannot be a recipient. Recipients, amounts, array order, asset and expiry are immutable and public.

For example, fund 1,000 USDL as 300 for Alice and 700 for Bob. Bob can claim his 700 first. Alice's 300 remains available until she claims or the deadline passes. Neither recipient needs the funder to sign another payment.

## Claim or recover the remainder

1.  The funder opens the distribution, locking all allocations and paying the live native opening fee within the signed `maxFeeAtomic` cap. This fee is additional to the distributed asset.
2.  Strictly before expiry, the listed recipient signs a claim for their zero-based `claimIndex`. One transaction pays that exact allocation and records it as claimed. Allocations can be claimed in any order, once each.
3.  The final claim completes the distribution. At or after expiry, only the funder may recover all unclaimed funds. Prior claims remain final.

Claims and refunds are fee-free. Each action consumes its signer's nonce for the actual distribution asset. No automatic transfer or refund occurs at expiry. There is no early cancellation, partial allocation claim, top-up, redirection or change of recipients.

Live records include `allocations` with claimed flags, `claimedAllocations`, `claimedAmount`, `remainingAmount`, and `refundedAmount`. Claimed plus remaining plus refunded always equals the opening amount. Status is `open`, `completed` or `refunded`.

A fixed recipient claim

Only the listed recipient can claim, and the payout cannot be redirected. Transfer-only BIP340 addresses cannot claim and are rejected at opening. There are no secret-bearing claims or Merkle proofs in this version. Distribution data is public. Agree on a reasonable claim deadline before funding.

## Review and sign in your wallet

Create distributions in Utilities. Share the Explorer contract link so recipients can connect their own wallet and claim. The funder uses that same page to recover unclaimed funds after expiry. The extension and Web Wallet review canonical recipients, amounts, progress, account, network, deadline and opening fee before signing locally.

The typed wallet SDK methods are `openClaimDistribution`, `claimClaimDistribution`, and `refundClaimDistribution`. Claims and refunds require the full original `openPayloadHash`. This binds the exact opening terms rather than trusting caller-provided replacement amounts.

Code example

```
import { openClaimDistribution } from "@ldgr/wallet-sdk/browser";

const receipt = await openClaimDistribution({
  asset: exactAssetCode,
  amount: "1000",
  allocations: [
    { to: aliceAddress, amount: "300" },
    { to: bobAddress, amount: "700" },
  ],
  expiresAt: futureExpiryMillis,
  maxFeeAtomic: reviewedNativeFeeCap,
});
// Link receipt.transactionHash as the settled receipt.
// Share receipt.contractId for independent recipient claims.
```

## Caller-signed API

`@ldgr/client` exposes `getClaimDistribution` plus caller-signed mutations. The HTTP base is `/api/v1/contracts/claim-distributions`: POST opens, GET `/:contractId` reads live terms, and POST `/:contractId/claim` or `/:contractId/refund` settles.

Signed actions are `claim_distribution_open`, `claim_distribution_claim` and `claim_distribution_refund`. Include version, chain, ledgerId, template, exact asset, signer, nonce and timestamp. Opening adds allocations, total amount, expiry and native fee cap. Claim/refund bind contractId and openPayloadHash; a claim also includes numeric claimIndex.

HTTP amounts, including nested allocations, are exact decimal strings using the asset's precision. Protocol amounts are bigint atomic units. Nonces, times and native atomic fee caps are integer strings. Use the returned transaction hash as the receipt.

Wallets reread canonical terms and eligibility immediately before signing. If submission has an unknown outcome, retain the identical signed envelope and retry delivery. Do not create a newly signed spend as a blind retry. Opening requires an active asset; settlement permits a known inactive asset so recipients and the funder can still retrieve escrow.

[Create a distribution →](/utilities/contracts)[Contract catalog →](/docs/guides/contracts)[Developer recipes →](/docs/developers/cookbook)
