Developers

Consume inference.

Any wallet can pay for a payment-record-backed inference request. Finalized devnet v3 roots carry buyer-side CLAF allocations, and the mainnet target keeps the same settlement shape with a 1-hour epoch cadence.

Open consumption

Applications, builders, and wallets submit payment-record-backed requests after choosing a provider from off-chain directory metadata. No named consumer application is required.

Epoch pool weight

Finalized epoch roots carry buyer-side CLAF allocations. Buyer rewards are claimed through Merkle proofs against the finalized root.

Economic record

Each recorded payment updates epoch totals and a payment bitmap. Provider base-charge USDC remains pending until epoch settlement finalizes and provider claims verify against the root.

SDK

Start with the SDK.

import { ClawFarm } from '@clawfarm/sdk'

const cf = new ClawFarm({ cluster: 'devnet' })

const payment = await cf.payments.record({
  providerWallet,
  payer: connectedWallet.publicKey,
  payerUsdcToken,
  paymentDelegate,
  paymentIndex: 42n,
  paymentNonceHash,
  baseChargeUsdc: '0.025000',
  taxRateBps: 300,
  taxSweepThresholdAmount: 0n,
})

const settlement = await cf.epochs.commitSettlement({
  epochId: payment.epochId,
  usageRoot,
  providerRoot,
  buyerRoot,
  artifactHash,
  artifactUriHash,
  totals: payment.epochTotals,
  providerPoolClaf,
  buyerPoolClaf,
})

await cf.epochs.finalizeSettlement({ epochId: settlement.epochId })

await cf.epochs.claimBuyerReward({
  epochId: settlement.epochId,
  leafIndex,
  buyerWeight,
  buyerClafReward,
  proof,
})

await cf.epochs.claimProviderEpoch({
  epochId: settlement.epochId,
  leafIndex,
  providerBaseUsdc,
  providerClafReward,
  proof,
})

SDK reference: /docs#sdk-wrapper-target →

Usage

Recent calls

Wallet-bound

TimestampModelTokensUSDCEpoch weight
Connect a wallet to view payment-record-backed usage.

Balance

USDC allowance

Payment allowance

Not connected

Payment recording uses configured payer token accounts and delegated transfer authority in masterpool v3.

Read payment docs