@t2000/sdk 10.38.2 → 10.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1577,17 +1577,29 @@ declare function buildDeclineJobTx(jobId: string): Transaction;
1577
1577
  * the protocol outcome lands on the seller's score. Score ids derive
1578
1578
  * locally (`deriveAgentScoreId`); pass `buyerScoreId` exactly when the
1579
1579
  * buyer is a registered agent — the contract refuses a mismatched
1580
- * variant, so a registered buyer can't dodge its own counter. */
1580
+ * variant, so a registered buyer can't dodge its own counter.
1581
+ *
1582
+ * S.1202: a batch-origin Job (has `BatchOriginKey` — read it with
1583
+ * `getJobBatchOrigin`) MUST pass `batchId` so the PTB targets
1584
+ * `batch::batch_reject`/`batch_reject_agent_buyer` and frees the per-wave
1585
+ * hold with the money; the bare reputation door aborts `EUseBatchSettle`
1586
+ * on origin Jobs. */
1581
1587
  declare function buildRejectJobTx(jobId: string, v2: {
1582
1588
  sellerScoreId: string;
1583
1589
  registryId: string;
1584
1590
  buyerScoreId?: string;
1591
+ batchId?: string;
1585
1592
  }): Transaction;
1586
1593
  /** Deadline refund (no delivery) — S.1063: settles through
1587
1594
  * `reputation::refund_v2` so `no_delivery` lands on the seller's score.
1588
- * Still permissionless: funds only ever return to the buyer. */
1595
+ * Still permissionless: funds only ever return to the buyer.
1596
+ *
1597
+ * S.1202: pass `batchId` for a batch-origin Job (see `getJobBatchOrigin`)
1598
+ * — the crank must attach the origin wave (`batch::batch_refund`), and a
1599
+ * wrong wave aborts `EWrongBatch` on-chain. */
1589
1600
  declare function buildRefundJobTx(jobId: string, v2: {
1590
1601
  sellerScoreId: string;
1602
+ batchId?: string;
1591
1603
  }): Transaction;
1592
1604
  /** Seller posts the delivery commitment (hex hash) before the deadline. */
1593
1605
  declare function buildDeliverJobTx(jobId: string, deliveryHash: string): Transaction;
@@ -1597,13 +1609,37 @@ declare function buildDeliverJobTx(jobId: string, deliveryHash: string): Transac
1597
1609
  * board-claimed job frees its active seat with the money. Hire jobs pass
1598
1610
  * the same score; the contract's `ClaimedJobKey` marker decides whether
1599
1611
  * a decrement lands. A scoreless seller needs the `create_empty_score`
1600
- * precursor first (same hop as reject/refund since S.1063). */
1612
+ * precursor first (same hop as reject/refund since S.1063).
1613
+ *
1614
+ * S.1202: a batch-origin Job MUST pass `batchId` (read it with
1615
+ * `getJobBatchOrigin`) so the release targets `batch::batch_release` and
1616
+ * frees the per-wave hold in the same tx — bare `release_v2` aborts
1617
+ * `EUseBatchSettle` on origin Jobs. Applies to all three release shapes
1618
+ * (buyer accept, buyer goodwill, permissionless timeout crank). */
1601
1619
  declare function buildReleaseJobTx(jobId: string, v2: {
1602
1620
  sellerScoreId: string;
1621
+ batchId?: string;
1603
1622
  }): Transaction;
1604
1623
  /** Fetch + parse a `Job` shared object. Throws `RPC_ERROR` when the id
1605
1624
  * doesn't resolve to an a2a_escrow Job. */
1606
1625
  declare function getJob(client: SuiCoreClient, jobId: string): Promise<Job>;
1626
+ /** Type-name suffix of the S.1202 origin marker DF on a batch-claimed
1627
+ * Job. Matched as a SUFFIX so reads never depend on the V12 defining
1628
+ * package id (fillable only after the cutover) — the parent Job is
1629
+ * already authenticated by `getJob`/object-type checks, and only our
1630
+ * package can attach DFs to it. */
1631
+ declare const BATCH_ORIGIN_KEY_TYPE_SUFFIX: "::escrow::BatchOriginKey";
1632
+ /**
1633
+ * The `BatchOpening` id a Job was batch-claimed from, or null for
1634
+ * single-opening / hire Jobs (S.1202 — reads the `BatchOriginKey` DF).
1635
+ *
1636
+ * Every settle/reject/refund prepare MUST call this first: an origin Job
1637
+ * settles only through the batch doors (`batchId` on the builders), and
1638
+ * the bare v2 doors abort `EUseBatchSettle` on it. Errors propagate —
1639
+ * a "couldn't read, assume non-batch" fallback would build a PTB that
1640
+ * aborts on-chain anyway, with a worse message.
1641
+ */
1642
+ declare function getJobBatchOrigin(client: SuiCoreClient, jobId: string): Promise<string | null>;
1607
1643
  /** What `caller` can do to `job` right now — drives `t2 job watch` (the
1608
1644
  * ACP-style "available action" readout) and any host UI. */
1609
1645
  declare function jobActionsFor(job: Job, caller: string, nowMs?: number): string[];
@@ -1641,8 +1677,14 @@ declare function verifyJobForSeller({ client, jobId, seller, minAmountUsdc, minR
1641
1677
  * target the LATEST published id — the original id (types, Job verbs) is
1642
1678
  * unchanged.
1643
1679
  */
1644
- /** The LATEST published `a2a_escrow` package id on MAINNET (v10 upgrade
1645
- * 2026-08-24, S.1192seller levels + active caps, VERSION 6 cutover:
1680
+ /** The LATEST published `a2a_escrow` package id on MAINNET (v12 upgrade
1681
+ * 2026-08-26, S.1202batch ACTIVE per-wave claims + batch-aware settle,
1682
+ * FeeConfig VERSION 6→7 cutover with immediate migrate: origin-stamped
1683
+ * batch Jobs settle via `batch::batch_release`/`batch_reject*`/
1684
+ * `batch_refund`, and every v11-and-earlier entry aborts EWrongVersion;
1685
+ * v11 = S.1193 — batch openings, additive, NO migrate:
1686
+ * `batch` module + `set_max_batch_slots`;
1687
+ * v10 = S.1192 seller levels + active caps, VERSION 6 cutover:
1646
1688
  * claim_v2/claim_proven_v2/create_open_v2/release_v2;
1647
1689
  * v9 = S.1064 review on REJECTED, additive; v8 = outcome
1648
1690
  * counters (S.1063); v7 = distinct buyers (S.1062);
@@ -1657,9 +1699,9 @@ declare function verifyJobForSeller({ client, jobId, seller, minAmountUsdc, minR
1657
1699
  * upgrade + `migrate` cutover is a ONE-VALUE change here. The original id
1658
1700
  * (`MAINNET_A2A_ESCROW_PACKAGE_ID` in job.ts) remains the anchor for type
1659
1701
  * strings, event filters, and object-type queries — those never move. */
1660
- declare const MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "0x5c90ec07da01bf885a4e65247ce98b75ab8a042cd965d30d7213856d579c4afa";
1702
+ declare const MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "0x1f88ca77b1980e3d0750e83d1363c6025cd677c2f420cae51a86d4a0bddf93c5";
1661
1703
  /** Back-compat name for the latest id (pre-S.981 consumers import this). */
1662
- declare const MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID = "0x5c90ec07da01bf885a4e65247ce98b75ab8a042cd965d30d7213856d579c4afa";
1704
+ declare const MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID = "0x1f88ca77b1980e3d0750e83d1363c6025cd677c2f420cae51a86d4a0bddf93c5";
1663
1705
  /** Env-overridable latest id for testnet/dev (NOT a trust anchor). A fresh
1664
1706
  * dev publish has original == latest, so `A2A_ESCROW_PACKAGE_ID` alone is
1665
1707
  * honored as the fallback override. */
@@ -1702,6 +1744,19 @@ declare const A2A_ESCROW_PACKAGE_V8_ID = "0x1595b80bc05a03607f3908702c866ca63cf9
1702
1744
  * ClaimedJobKey DF key types. A DEFINING-id anchor like V2/V3/V6/V7/V8 —
1703
1745
  * never moves again, even when LATEST does. */
1704
1746
  declare const A2A_ESCROW_PACKAGE_V10_ID: string;
1747
+ /** v11 (S.1193, upgrade 2y3g17rv… 2026-08-25) — defining id for the batch
1748
+ * surface: the BatchOpeningCreated/BatchSlotClaimed/BatchOpeningCancelled/
1749
+ * BatchOpeningRefunded events and the BatchOpening object type. A
1750
+ * DEFINING-id anchor like V2/V3/V6/V7/V8/V10 — never moves again, even
1751
+ * when LATEST does. */
1752
+ declare const A2A_ESCROW_PACKAGE_V11_ID: string;
1753
+ /** v12 (S.1202, upgrade AGYachnt… 2026-08-26) — defining id for the batch
1754
+ * active-claims surface: the `BatchSlotHoldReleased` event and the
1755
+ * BatchOriginKey/BatchHoldReleasedKey/ActiveClaimsSemanticsKey DF key
1756
+ * types. A DEFINING-id anchor like V2…V11 — never moves again, even when
1757
+ * LATEST does. (Job-side origin reads may still suffix-match the type
1758
+ * name — `BATCH_ORIGIN_KEY_TYPE_SUFFIX` in wallet/job.ts.) */
1759
+ declare const A2A_ESCROW_PACKAGE_V12_ID: string;
1705
1760
  /** Default claim policy: any ACTIVE registered Agent ID ($0 claim, FCFS). */
1706
1761
  declare const OPENING_CLAIM_POLICY_ANY_ACTIVE = 0;
1707
1762
  /** S.1054 — Proven: claimer needs ≥ PROVEN_MIN_REVIEWS on-chain reviews
@@ -1939,6 +1994,121 @@ declare function buildSubmitFirstReviewTx({ jobId, stars, boardId, }: {
1939
1994
  boardId?: string;
1940
1995
  }): Transaction;
1941
1996
 
1997
+ /** Mirror of the Move package default for slots per wave. The LIVE value
1998
+ * is an AdminCap FeeConfig DF (`config_max_batch_slots`) — the chain is
1999
+ * the SSOT and may be retuned between npm releases (same class as
2000
+ * `MAX_JOB_USDC`); this mirror feeds the preflight's English only. */
2001
+ declare const MAX_BATCH_SLOTS_DEFAULT = 250;
2002
+ /** Object-type marker for `resolveCreatedObjectId` digest walks. */
2003
+ declare const BATCH_OPENING_TYPE_MARKER: "::batch::BatchOpening<";
2004
+ /** S.1202 abort codes clients map to English (transcribed from
2005
+ * `contracts/a2a_escrow` — the runbook's abort-code map is the SSOT).
2006
+ * Grouped by the aborting MODULE, because Move abort codes are only
2007
+ * unique per module. */
2008
+ declare const BATCH_ABORT_CODES: {
2009
+ /** At your wave cap RIGHT NOW — min(buyer ceiling, level cap) active
2010
+ * holds. Settle one to reclaim; never "lifetime". */
2011
+ readonly EMaxClaimsReached: 12;
2012
+ /** Pre-S.1202 wave — lifetime rows never free, so new claims refuse.
2013
+ * The wave's cancel / expired-refund still work. */
2014
+ readonly ELegacyBatch: 22;
2015
+ /** The Job passed to a batch settle door has no BatchOriginKey. */
2016
+ readonly ENotBatchJob: 23;
2017
+ /** The attached wave is not this Job's origin batch. */
2018
+ readonly EWrongBatch: 24;
2019
+ readonly EWrongSellerScore: 25;
2020
+ readonly EWrongBuyerScore: 26;
2021
+ /** Registered Agent-ID buyer must reject via the agent-buyer variant. */
2022
+ readonly EBuyerIsAgent: 27;
2023
+ readonly EBuyerNotAgent: 28;
2024
+ };
2025
+ declare const REPUTATION_ABORT_CODES: {
2026
+ /** A bare v2 door (release_v2 / reject_v2 variants / refund_v2) on a
2027
+ * batch-origin Job — the client must attach the batch and settle via
2028
+ * the batch doors. */
2029
+ readonly EUseBatchSettle: 9;
2030
+ };
2031
+ declare const ESCROW_ABORT_CODES: {
2032
+ /** Stale package flow (FeeConfig VERSION moved) — update @t2000/*. */
2033
+ readonly EWrongVersion: 13;
2034
+ /** Second wave-hold free on one Job (unreachable via the doors). */
2035
+ readonly EBatchHoldReleased: 23;
2036
+ };
2037
+ interface BatchOpeningTerms extends OpeningTerms {
2038
+ /** Slots in the wave (1..live max; default live max 250). `amountUsdc`
2039
+ * is PER SLOT — total escrow = `slots × amountUsdc`. */
2040
+ slots: number;
2041
+ /** Slots one agent may claim of THIS wave (≥1; default 1). */
2042
+ maxClaimsPerAgent?: number;
2043
+ }
2044
+ /** Client-side preflight — the single-opening rules on the PER-SLOT terms
2045
+ * plus the wave bounds. */
2046
+ declare function preflightCreateBatchOpening(terms: BatchOpeningTerms): {
2047
+ valid: boolean;
2048
+ code?: 'INVALID_AMOUNT' | 'INVALID_INPUT';
2049
+ error?: string;
2050
+ };
2051
+ /** Build the wave post: split `slots × amount` USDC → `create_batch_open`. */
2052
+ declare function buildCreateBatchOpeningTx({ client, buyer, terms, }: {
2053
+ client: SuiCoreClient;
2054
+ buyer: string;
2055
+ terms: BatchOpeningTerms;
2056
+ }): Promise<Transaction>;
2057
+ /** Claim ONE slot — same score plumbing as `buildClaimOpeningTx`
2058
+ * (claimer's own AgentScore always; `create_empty_score` precursor when
2059
+ * it doesn't exist yet). Unlike singles there is no policy-based entry
2060
+ * split: `batch_claim` handles every policy internally. */
2061
+ declare function buildBatchClaimTx({ batchId, registryId, scoreId, }: {
2062
+ batchId: string;
2063
+ registryId: string;
2064
+ scoreId: string;
2065
+ }): Transaction;
2066
+ /** Buyer withdraws the unclaimed remainder — fee-free, any time. */
2067
+ declare function buildCancelBatchOpeningTx(batchId: string): Transaction;
2068
+ /** Permissionless remainder refund once `open_until` lapses. */
2069
+ declare function buildRefundBatchExpiredTx(batchId: string): Transaction;
2070
+ /** On-chain view of one BatchOpening. */
2071
+ interface BatchOpening {
2072
+ id: string;
2073
+ buyer: string;
2074
+ /** PER-SLOT escrow in display USDC. */
2075
+ amountUsdc: number;
2076
+ slotsTotal: number;
2077
+ slotsRemaining: number;
2078
+ feeBps: number;
2079
+ specHash: string;
2080
+ openUntilMs: number;
2081
+ slaMs: number;
2082
+ reviewWindowMs: number;
2083
+ rejectSplitBps: number;
2084
+ claimPolicy: number;
2085
+ minSellerLevel: number;
2086
+ maxClaimsPerAgent: number;
2087
+ /** Object id of the on-chain `claims_by_agent` Table (per-agent counts
2088
+ * live as its dynamic fields — see `getBatchClaimsByAgent`). */
2089
+ claimsTableId: string | null;
2090
+ createdAtMs: number;
2091
+ }
2092
+ /** Read one BatchOpening by object id (null = not a batch / gone). A
2093
+ * drained or cancelled batch still resolves (`slotsRemaining: 0`) — the
2094
+ * object persists in v1; existence is NOT the state. */
2095
+ declare function getBatchOpening(client: SuiCoreClient, batchId: string): Promise<BatchOpening | null>;
2096
+ /** Slots `agent` already claimed of this batch — best-effort read of the
2097
+ * on-chain Table entry (0 on miss/hiccup; Move enforces the real limit). */
2098
+ declare function getBatchClaimsByAgent(client: SuiCoreClient, batch: BatchOpening, agent: string): Promise<number>;
2099
+ /** English preflight for a batch claim — the wave gates first (slots,
2100
+ * per-agent limit), then the exact single-claim stack (policy → active
2101
+ * cap → level floor via `preflightClaimOpening`). */
2102
+ declare function preflightBatchClaim(score: AgentScore | null, batch: {
2103
+ claimPolicy: number;
2104
+ minSellerLevel?: number;
2105
+ slotsRemaining: number;
2106
+ maxClaimsPerAgent: number;
2107
+ }, myClaims: number): {
2108
+ valid: boolean;
2109
+ error?: string;
2110
+ };
2111
+
1942
2112
  declare const DEFAULT_COMMERCE_API_BASE = "https://api.t2000.ai/v1";
1943
2113
  /** The shape the API returns from GET /v1/services. */
1944
2114
  interface ServiceListing {
@@ -2037,4 +2207,4 @@ declare function putJobSpec(base: string, content: string): Promise<string>;
2037
2207
  * the store is untrusted; the chain hash is the authority). */
2038
2208
  declare function getJobSpec(base: string, hash: string): Promise<string>;
2039
2209
 
2040
- export { STABLE_ASSETS as $, A2A_ESCROW_FEE_CONFIG_ID as A, type BalanceResponse as B, CLOCK_ID as C, DEFAULT_ACTIVITY_REPORT_URL as D, ETH_TYPE as E, OPENING_CLAIM_POLICY_PROVEN as F, GAS_RESERVE_MIN as G, OPENING_CLAIM_POLICY_PROVEN_4STAR as H, IKA_TYPE as I, JOB_STATES as J, KNOWN_TARGETS as K, LABEL_PATTERNS as L, MANIFEST_TYPE as M, NAVX_TYPE as N, OPENING_CLAIM_POLICIES as O, OVERLAY_FEE_RATE as P, type OverlayFeeConfig as Q, PREFLIGHT_MAX_AMOUNT as R, PREFLIGHT_OK as S, PROVEN_MIN_AVG_STARS_X10 as T, PROVEN_MIN_REVIEWS as U, type PayOptions as V, type PayResult as W, type PreflightResult as X, REVIEW_MAX_STARS as Y, REVIEW_MIN_STARS as Z, SELLER_LEVEL_ACTIVE_CAPS as _, A2A_ESCROW_PACKAGE_ID as a, getDecimalsForCoinType as a$, SUI_DECIMALS as a0, SUI_TYPE as a1, SUPPORTED_ASSETS as a2, type SellerLevel as a3, type SendAssetClass as a4, type SendResult as a5, type ServiceListing as a6, type SimulationResult as a7, type StableAsset as a8, type SuiHolding as a9, buildRejectJobTx as aA, buildReleaseJobTx as aB, buildSendTx as aC, buildSwapTx as aD, checkPositiveAmount as aE, checkSuiAddress as aF, claimPolicyLabel as aG, claimPolicyRequirement as aH, classifyAction as aI, classifyLabel as aJ, classifySendAsset as aK, classifyTransaction as aL, deriveAgentScoreId as aM, effectiveSellerLevel as aN, executeTx as aO, extractAllUserLegs as aP, extractTransferDetails as aQ, extractTxCommands as aR, extractTxSender as aS, fallbackLabel as aT, fetchService as aU, findSwapRoute as aV, formatAssetAmount as aW, formatSui as aX, formatUsd as aY, getAgentScore as aZ, getDecimals as a_, type SuiRpcTxBlock as aa, type SupportedAsset as ab, type SwapRouteResult as ac, T2000Error as ad, type T2000ErrorCode as ae, type T2000ErrorData as af, T2000_OVERLAY_FEE_WALLET as ag, TOKEN_MAP as ah, type TransactionLeg as ai, type TransactionRecord as aj, type TransactionSigner as ak, type TxDirection as al, USDC_DECIMALS as am, USDC_TYPE as an, USDE_TYPE as ao, USDSUI_TYPE as ap, USDT_TYPE as aq, WAL_TYPE as ar, WBTC_TYPE as as, type X402ActivityPayload as at, type ZkLoginProof as au, ZkLoginSigner as av, activeCapForLevel as aw, buildCreateJobTx as ax, buildDeliverJobTx as ay, buildRefundJobTx as az, type ActivityReportConfig as b, type Opening as b$, getJob as b0, getJobSpec as b1, invalidSendAssetMessage as b2, jobActionsFor as b3, listServices as b4, mapMoveAbortCode as b5, mapWalletError as b6, meetsClaimPolicy as b7, meetsMinSellerLevel as b8, mistToSui as b9, type SwapResult as bA, type SwapQuoteResult as bB, type PaymentRequest as bC, type SuiCoreClient as bD, type SponsoredCoinMergeCache as bE, type SendableAsset as bF, A2A_ESCROW_LATEST_PACKAGE_ID as bG, A2A_ESCROW_OPENING_PACKAGE_ID as bH, A2A_ESCROW_PACKAGE_V10_ID as bI, A2A_ESCROW_PACKAGE_V2_ID as bJ, A2A_ESCROW_PACKAGE_V3_ID as bK, A2A_ESCROW_PACKAGE_V6_ID as bL, A2A_ESCROW_PACKAGE_V7_ID as bM, A2A_ESCROW_PACKAGE_V8_ID as bN, A2A_SCORE_BOARD_ID as bO, type ApiRouteListing as bP, CETUS_USDC_SUI_POOL as bQ, type CoinPage as bR, DEFAULT_GRPC_URL as bS, GASLESS_MIN_STABLE_AMOUNT as bT, GASLESS_STABLE_TYPES as bU, MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID as bV, MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID as bW, MAINNET_A2A_ESCROW_PACKAGE_ID as bX, MAINNET_A2A_SCORE_BOARD_ID as bY, MAX_OPEN_WINDOW_MS as bZ, OPERATION_ASSETS as b_, parseSuiRpcTx as ba, payWithX402 as bb, preflightClaimOpening as bc, preflightCreateJob as bd, preflightFail as be, preflightPay as bf, preflightSend as bg, preflightSwap as bh, putJobSpec as bi, rawToStable as bj, rawToUsdc as bk, refineLendingLabel as bl, reportX402Activity as bm, resolveSymbol as bn, resolveTokenType as bo, sellerLevel as bp, sellerLevelLabel as bq, stableToRaw as br, suiToMist as bs, truncateAddress as bt, usdcToRaw as bu, validateAddress as bv, verifyJobForSeller as bw, type T2000Options as bx, type X402Probe as by, type SerializedCetusRoute as bz, type AgentScore as c, type OpeningTerms as c0, type Operation as c1, SENDABLE_ASSETS as c2, type SelectAndSplitResult as c3, type SerializedCetusRoutePath as c4, type SerializedRouterDataV3 as c5, type ServicesRail as c6, type ServicesRow as c7, addSendToTx as c8, addSwapToTx as c9, selectSuiCoin as cA, serializeCetusRoute as cB, simulateTransaction as cC, throwIfSimulationFailed as cD, verifyCetusRouteCoinMatch as cE, assertAllowedAsset as ca, assertBuyerRequirements as cb, buildCancelOpeningTx as cc, buildClaimOpeningTx as cd, buildCreateEmptyScoreTx as ce, buildCreateOpeningTx as cf, buildDeclineJobTx as cg, buildRefundUnclaimedTx as ch, buildSubmitFirstReviewTx as ci, buildSubmitReviewTx as cj, deserializeCetusRoute as ck, fetchAllCoins as cl, getCoinMeta as cm, getOpening as cn, getSuiClient as co, getSuiGrpcClient as cp, isAllowedAsset as cq, isCetusRouteFresh as cr, isInRegistry as cs, normalizeAsset as ct, normalizeCoinType as cu, preflightCreateOpening as cv, probeX402 as cw, queryHistory as cx, queryTransaction as cy, selectAndSplitCoin as cz, COIN_REGISTRY as d, type ClassifyBalanceChange as e, type ClassifyResult as f, type CoinMeta as g, DEFAULT_COMMERCE_API_BASE as h, DEFAULT_NETWORK as i, type DepositInfo as j, type ExtractedTransfer as k, type Job as l, type JobState as m, type JobTerms as n, type JobVerification as o, KeypairSigner as p, LEVEL4_MAX_NO_DELIVERY as q, LEVEL4_MIN_REVIEWS as r, LOFI_TYPE as s, MAX_DELIVER_HORIZON_MS as t, MAX_JOB_USDC as u, MAX_REVIEW_WINDOW_MS as v, MIN_JOB_USDC as w, MIST_PER_SUI as x, NO_DELIVERY_REGRESSION_FLOOR as y, OPENING_CLAIM_POLICY_ANY_ACTIVE as z };
2210
+ export { PROVEN_MIN_REVIEWS as $, A2A_ESCROW_FEE_CONFIG_ID as A, BATCH_ABORT_CODES as B, CLOCK_ID as C, DEFAULT_ACTIVITY_REPORT_URL as D, ESCROW_ABORT_CODES as E, MAX_DELIVER_HORIZON_MS as F, GAS_RESERVE_MIN as G, MAX_JOB_USDC as H, IKA_TYPE as I, JOB_STATES as J, KNOWN_TARGETS as K, LABEL_PATTERNS as L, MANIFEST_TYPE as M, MAX_REVIEW_WINDOW_MS as N, MIN_JOB_USDC as O, MIST_PER_SUI as P, NAVX_TYPE as Q, NO_DELIVERY_REGRESSION_FLOOR as R, OPENING_CLAIM_POLICIES as S, OPENING_CLAIM_POLICY_ANY_ACTIVE as T, OPENING_CLAIM_POLICY_PROVEN as U, OPENING_CLAIM_POLICY_PROVEN_4STAR as V, OVERLAY_FEE_RATE as W, type OverlayFeeConfig as X, PREFLIGHT_MAX_AMOUNT as Y, PREFLIGHT_OK as Z, PROVEN_MIN_AVG_STARS_X10 as _, A2A_ESCROW_PACKAGE_ID as a, extractAllUserLegs as a$, type PayOptions as a0, type PayResult as a1, type PreflightResult as a2, REPUTATION_ABORT_CODES as a3, REVIEW_MAX_STARS as a4, REVIEW_MIN_STARS as a5, SELLER_LEVEL_ACTIVE_CAPS as a6, STABLE_ASSETS as a7, SUI_DECIMALS as a8, SUI_TYPE as a9, WBTC_TYPE as aA, type X402ActivityPayload as aB, type ZkLoginProof as aC, ZkLoginSigner as aD, activeCapForLevel as aE, buildBatchClaimTx as aF, buildCancelBatchOpeningTx as aG, buildCreateBatchOpeningTx as aH, buildCreateJobTx as aI, buildDeliverJobTx as aJ, buildRefundBatchExpiredTx as aK, buildRefundJobTx as aL, buildRejectJobTx as aM, buildReleaseJobTx as aN, buildSendTx as aO, buildSwapTx as aP, checkPositiveAmount as aQ, checkSuiAddress as aR, claimPolicyLabel as aS, claimPolicyRequirement as aT, classifyAction as aU, classifyLabel as aV, classifySendAsset as aW, classifyTransaction as aX, deriveAgentScoreId as aY, effectiveSellerLevel as aZ, executeTx as a_, SUPPORTED_ASSETS as aa, type SellerLevel as ab, type SendAssetClass as ac, type SendResult as ad, type ServiceListing as ae, type SimulationResult as af, type StableAsset as ag, type SuiHolding as ah, type SuiRpcTxBlock as ai, type SupportedAsset as aj, type SwapRouteResult as ak, T2000Error as al, type T2000ErrorCode as am, type T2000ErrorData as an, T2000_OVERLAY_FEE_WALLET as ao, TOKEN_MAP as ap, type TransactionLeg as aq, type TransactionRecord as ar, type TransactionSigner as as, type TxDirection as at, USDC_DECIMALS as au, USDC_TYPE as av, USDE_TYPE as aw, USDSUI_TYPE as ax, USDT_TYPE as ay, WAL_TYPE as az, type ActivityReportConfig as b, A2A_ESCROW_PACKAGE_V12_ID as b$, extractTransferDetails as b0, extractTxCommands as b1, extractTxSender as b2, fallbackLabel as b3, fetchService as b4, findSwapRoute as b5, formatAssetAmount as b6, formatSui as b7, formatUsd as b8, getAgentScore as b9, rawToStable as bA, rawToUsdc as bB, refineLendingLabel as bC, reportX402Activity as bD, resolveSymbol as bE, resolveTokenType as bF, sellerLevel as bG, sellerLevelLabel as bH, stableToRaw as bI, suiToMist as bJ, truncateAddress as bK, usdcToRaw as bL, validateAddress as bM, verifyJobForSeller as bN, type T2000Options as bO, type X402Probe as bP, type SerializedCetusRoute as bQ, type SwapResult as bR, type SwapQuoteResult as bS, type PaymentRequest as bT, type SuiCoreClient as bU, type SponsoredCoinMergeCache as bV, type SendableAsset as bW, A2A_ESCROW_LATEST_PACKAGE_ID as bX, A2A_ESCROW_OPENING_PACKAGE_ID as bY, A2A_ESCROW_PACKAGE_V10_ID as bZ, A2A_ESCROW_PACKAGE_V11_ID as b_, getBatchClaimsByAgent as ba, getBatchOpening as bb, getDecimals as bc, getDecimalsForCoinType as bd, getJob as be, getJobBatchOrigin as bf, getJobSpec as bg, invalidSendAssetMessage as bh, jobActionsFor as bi, listServices as bj, mapMoveAbortCode as bk, mapWalletError as bl, meetsClaimPolicy as bm, meetsMinSellerLevel as bn, mistToSui as bo, parseSuiRpcTx as bp, payWithX402 as bq, preflightBatchClaim as br, preflightClaimOpening as bs, preflightCreateBatchOpening as bt, preflightCreateJob as bu, preflightFail as bv, preflightPay as bw, preflightSend as bx, preflightSwap as by, putJobSpec as bz, type AgentScore as c, A2A_ESCROW_PACKAGE_V2_ID as c0, A2A_ESCROW_PACKAGE_V3_ID as c1, A2A_ESCROW_PACKAGE_V6_ID as c2, A2A_ESCROW_PACKAGE_V7_ID as c3, A2A_ESCROW_PACKAGE_V8_ID as c4, A2A_SCORE_BOARD_ID as c5, type ApiRouteListing as c6, CETUS_USDC_SUI_POOL as c7, type CoinPage as c8, DEFAULT_GRPC_URL as c9, buildRefundUnclaimedTx as cA, buildSubmitFirstReviewTx as cB, buildSubmitReviewTx as cC, deserializeCetusRoute as cD, fetchAllCoins as cE, getCoinMeta as cF, getOpening as cG, getSuiClient as cH, getSuiGrpcClient as cI, isAllowedAsset as cJ, isCetusRouteFresh as cK, isInRegistry as cL, normalizeAsset as cM, normalizeCoinType as cN, preflightCreateOpening as cO, probeX402 as cP, queryHistory as cQ, queryTransaction as cR, selectAndSplitCoin as cS, selectSuiCoin as cT, serializeCetusRoute as cU, simulateTransaction as cV, throwIfSimulationFailed as cW, verifyCetusRouteCoinMatch as cX, GASLESS_MIN_STABLE_AMOUNT as ca, GASLESS_STABLE_TYPES as cb, MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID as cc, MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID as cd, MAINNET_A2A_ESCROW_PACKAGE_ID as ce, MAINNET_A2A_SCORE_BOARD_ID as cf, MAX_OPEN_WINDOW_MS as cg, OPERATION_ASSETS as ch, type Opening as ci, type OpeningTerms as cj, type Operation as ck, SENDABLE_ASSETS as cl, type SelectAndSplitResult as cm, type SerializedCetusRoutePath as cn, type SerializedRouterDataV3 as co, type ServicesRail as cp, type ServicesRow as cq, addSendToTx as cr, addSwapToTx as cs, assertAllowedAsset as ct, assertBuyerRequirements as cu, buildCancelOpeningTx as cv, buildClaimOpeningTx as cw, buildCreateEmptyScoreTx as cx, buildCreateOpeningTx as cy, buildDeclineJobTx as cz, BATCH_OPENING_TYPE_MARKER as d, BATCH_ORIGIN_KEY_TYPE_SUFFIX as e, type BalanceResponse as f, type BatchOpening as g, type BatchOpeningTerms as h, COIN_REGISTRY as i, type ClassifyBalanceChange as j, type ClassifyResult as k, type CoinMeta as l, DEFAULT_COMMERCE_API_BASE as m, DEFAULT_NETWORK as n, type DepositInfo as o, ETH_TYPE as p, type ExtractedTransfer as q, type Job as r, type JobState as s, type JobTerms as t, type JobVerification as u, KeypairSigner as v, LEVEL4_MAX_NO_DELIVERY as w, LEVEL4_MIN_REVIEWS as x, LOFI_TYPE as y, MAX_BATCH_SLOTS_DEFAULT as z };
@@ -1577,17 +1577,29 @@ declare function buildDeclineJobTx(jobId: string): Transaction;
1577
1577
  * the protocol outcome lands on the seller's score. Score ids derive
1578
1578
  * locally (`deriveAgentScoreId`); pass `buyerScoreId` exactly when the
1579
1579
  * buyer is a registered agent — the contract refuses a mismatched
1580
- * variant, so a registered buyer can't dodge its own counter. */
1580
+ * variant, so a registered buyer can't dodge its own counter.
1581
+ *
1582
+ * S.1202: a batch-origin Job (has `BatchOriginKey` — read it with
1583
+ * `getJobBatchOrigin`) MUST pass `batchId` so the PTB targets
1584
+ * `batch::batch_reject`/`batch_reject_agent_buyer` and frees the per-wave
1585
+ * hold with the money; the bare reputation door aborts `EUseBatchSettle`
1586
+ * on origin Jobs. */
1581
1587
  declare function buildRejectJobTx(jobId: string, v2: {
1582
1588
  sellerScoreId: string;
1583
1589
  registryId: string;
1584
1590
  buyerScoreId?: string;
1591
+ batchId?: string;
1585
1592
  }): Transaction;
1586
1593
  /** Deadline refund (no delivery) — S.1063: settles through
1587
1594
  * `reputation::refund_v2` so `no_delivery` lands on the seller's score.
1588
- * Still permissionless: funds only ever return to the buyer. */
1595
+ * Still permissionless: funds only ever return to the buyer.
1596
+ *
1597
+ * S.1202: pass `batchId` for a batch-origin Job (see `getJobBatchOrigin`)
1598
+ * — the crank must attach the origin wave (`batch::batch_refund`), and a
1599
+ * wrong wave aborts `EWrongBatch` on-chain. */
1589
1600
  declare function buildRefundJobTx(jobId: string, v2: {
1590
1601
  sellerScoreId: string;
1602
+ batchId?: string;
1591
1603
  }): Transaction;
1592
1604
  /** Seller posts the delivery commitment (hex hash) before the deadline. */
1593
1605
  declare function buildDeliverJobTx(jobId: string, deliveryHash: string): Transaction;
@@ -1597,13 +1609,37 @@ declare function buildDeliverJobTx(jobId: string, deliveryHash: string): Transac
1597
1609
  * board-claimed job frees its active seat with the money. Hire jobs pass
1598
1610
  * the same score; the contract's `ClaimedJobKey` marker decides whether
1599
1611
  * a decrement lands. A scoreless seller needs the `create_empty_score`
1600
- * precursor first (same hop as reject/refund since S.1063). */
1612
+ * precursor first (same hop as reject/refund since S.1063).
1613
+ *
1614
+ * S.1202: a batch-origin Job MUST pass `batchId` (read it with
1615
+ * `getJobBatchOrigin`) so the release targets `batch::batch_release` and
1616
+ * frees the per-wave hold in the same tx — bare `release_v2` aborts
1617
+ * `EUseBatchSettle` on origin Jobs. Applies to all three release shapes
1618
+ * (buyer accept, buyer goodwill, permissionless timeout crank). */
1601
1619
  declare function buildReleaseJobTx(jobId: string, v2: {
1602
1620
  sellerScoreId: string;
1621
+ batchId?: string;
1603
1622
  }): Transaction;
1604
1623
  /** Fetch + parse a `Job` shared object. Throws `RPC_ERROR` when the id
1605
1624
  * doesn't resolve to an a2a_escrow Job. */
1606
1625
  declare function getJob(client: SuiCoreClient, jobId: string): Promise<Job>;
1626
+ /** Type-name suffix of the S.1202 origin marker DF on a batch-claimed
1627
+ * Job. Matched as a SUFFIX so reads never depend on the V12 defining
1628
+ * package id (fillable only after the cutover) — the parent Job is
1629
+ * already authenticated by `getJob`/object-type checks, and only our
1630
+ * package can attach DFs to it. */
1631
+ declare const BATCH_ORIGIN_KEY_TYPE_SUFFIX: "::escrow::BatchOriginKey";
1632
+ /**
1633
+ * The `BatchOpening` id a Job was batch-claimed from, or null for
1634
+ * single-opening / hire Jobs (S.1202 — reads the `BatchOriginKey` DF).
1635
+ *
1636
+ * Every settle/reject/refund prepare MUST call this first: an origin Job
1637
+ * settles only through the batch doors (`batchId` on the builders), and
1638
+ * the bare v2 doors abort `EUseBatchSettle` on it. Errors propagate —
1639
+ * a "couldn't read, assume non-batch" fallback would build a PTB that
1640
+ * aborts on-chain anyway, with a worse message.
1641
+ */
1642
+ declare function getJobBatchOrigin(client: SuiCoreClient, jobId: string): Promise<string | null>;
1607
1643
  /** What `caller` can do to `job` right now — drives `t2 job watch` (the
1608
1644
  * ACP-style "available action" readout) and any host UI. */
1609
1645
  declare function jobActionsFor(job: Job, caller: string, nowMs?: number): string[];
@@ -1641,8 +1677,14 @@ declare function verifyJobForSeller({ client, jobId, seller, minAmountUsdc, minR
1641
1677
  * target the LATEST published id — the original id (types, Job verbs) is
1642
1678
  * unchanged.
1643
1679
  */
1644
- /** The LATEST published `a2a_escrow` package id on MAINNET (v10 upgrade
1645
- * 2026-08-24, S.1192seller levels + active caps, VERSION 6 cutover:
1680
+ /** The LATEST published `a2a_escrow` package id on MAINNET (v12 upgrade
1681
+ * 2026-08-26, S.1202batch ACTIVE per-wave claims + batch-aware settle,
1682
+ * FeeConfig VERSION 6→7 cutover with immediate migrate: origin-stamped
1683
+ * batch Jobs settle via `batch::batch_release`/`batch_reject*`/
1684
+ * `batch_refund`, and every v11-and-earlier entry aborts EWrongVersion;
1685
+ * v11 = S.1193 — batch openings, additive, NO migrate:
1686
+ * `batch` module + `set_max_batch_slots`;
1687
+ * v10 = S.1192 seller levels + active caps, VERSION 6 cutover:
1646
1688
  * claim_v2/claim_proven_v2/create_open_v2/release_v2;
1647
1689
  * v9 = S.1064 review on REJECTED, additive; v8 = outcome
1648
1690
  * counters (S.1063); v7 = distinct buyers (S.1062);
@@ -1657,9 +1699,9 @@ declare function verifyJobForSeller({ client, jobId, seller, minAmountUsdc, minR
1657
1699
  * upgrade + `migrate` cutover is a ONE-VALUE change here. The original id
1658
1700
  * (`MAINNET_A2A_ESCROW_PACKAGE_ID` in job.ts) remains the anchor for type
1659
1701
  * strings, event filters, and object-type queries — those never move. */
1660
- declare const MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "0x5c90ec07da01bf885a4e65247ce98b75ab8a042cd965d30d7213856d579c4afa";
1702
+ declare const MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "0x1f88ca77b1980e3d0750e83d1363c6025cd677c2f420cae51a86d4a0bddf93c5";
1661
1703
  /** Back-compat name for the latest id (pre-S.981 consumers import this). */
1662
- declare const MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID = "0x5c90ec07da01bf885a4e65247ce98b75ab8a042cd965d30d7213856d579c4afa";
1704
+ declare const MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID = "0x1f88ca77b1980e3d0750e83d1363c6025cd677c2f420cae51a86d4a0bddf93c5";
1663
1705
  /** Env-overridable latest id for testnet/dev (NOT a trust anchor). A fresh
1664
1706
  * dev publish has original == latest, so `A2A_ESCROW_PACKAGE_ID` alone is
1665
1707
  * honored as the fallback override. */
@@ -1702,6 +1744,19 @@ declare const A2A_ESCROW_PACKAGE_V8_ID = "0x1595b80bc05a03607f3908702c866ca63cf9
1702
1744
  * ClaimedJobKey DF key types. A DEFINING-id anchor like V2/V3/V6/V7/V8 —
1703
1745
  * never moves again, even when LATEST does. */
1704
1746
  declare const A2A_ESCROW_PACKAGE_V10_ID: string;
1747
+ /** v11 (S.1193, upgrade 2y3g17rv… 2026-08-25) — defining id for the batch
1748
+ * surface: the BatchOpeningCreated/BatchSlotClaimed/BatchOpeningCancelled/
1749
+ * BatchOpeningRefunded events and the BatchOpening object type. A
1750
+ * DEFINING-id anchor like V2/V3/V6/V7/V8/V10 — never moves again, even
1751
+ * when LATEST does. */
1752
+ declare const A2A_ESCROW_PACKAGE_V11_ID: string;
1753
+ /** v12 (S.1202, upgrade AGYachnt… 2026-08-26) — defining id for the batch
1754
+ * active-claims surface: the `BatchSlotHoldReleased` event and the
1755
+ * BatchOriginKey/BatchHoldReleasedKey/ActiveClaimsSemanticsKey DF key
1756
+ * types. A DEFINING-id anchor like V2…V11 — never moves again, even when
1757
+ * LATEST does. (Job-side origin reads may still suffix-match the type
1758
+ * name — `BATCH_ORIGIN_KEY_TYPE_SUFFIX` in wallet/job.ts.) */
1759
+ declare const A2A_ESCROW_PACKAGE_V12_ID: string;
1705
1760
  /** Default claim policy: any ACTIVE registered Agent ID ($0 claim, FCFS). */
1706
1761
  declare const OPENING_CLAIM_POLICY_ANY_ACTIVE = 0;
1707
1762
  /** S.1054 — Proven: claimer needs ≥ PROVEN_MIN_REVIEWS on-chain reviews
@@ -1939,6 +1994,121 @@ declare function buildSubmitFirstReviewTx({ jobId, stars, boardId, }: {
1939
1994
  boardId?: string;
1940
1995
  }): Transaction;
1941
1996
 
1997
+ /** Mirror of the Move package default for slots per wave. The LIVE value
1998
+ * is an AdminCap FeeConfig DF (`config_max_batch_slots`) — the chain is
1999
+ * the SSOT and may be retuned between npm releases (same class as
2000
+ * `MAX_JOB_USDC`); this mirror feeds the preflight's English only. */
2001
+ declare const MAX_BATCH_SLOTS_DEFAULT = 250;
2002
+ /** Object-type marker for `resolveCreatedObjectId` digest walks. */
2003
+ declare const BATCH_OPENING_TYPE_MARKER: "::batch::BatchOpening<";
2004
+ /** S.1202 abort codes clients map to English (transcribed from
2005
+ * `contracts/a2a_escrow` — the runbook's abort-code map is the SSOT).
2006
+ * Grouped by the aborting MODULE, because Move abort codes are only
2007
+ * unique per module. */
2008
+ declare const BATCH_ABORT_CODES: {
2009
+ /** At your wave cap RIGHT NOW — min(buyer ceiling, level cap) active
2010
+ * holds. Settle one to reclaim; never "lifetime". */
2011
+ readonly EMaxClaimsReached: 12;
2012
+ /** Pre-S.1202 wave — lifetime rows never free, so new claims refuse.
2013
+ * The wave's cancel / expired-refund still work. */
2014
+ readonly ELegacyBatch: 22;
2015
+ /** The Job passed to a batch settle door has no BatchOriginKey. */
2016
+ readonly ENotBatchJob: 23;
2017
+ /** The attached wave is not this Job's origin batch. */
2018
+ readonly EWrongBatch: 24;
2019
+ readonly EWrongSellerScore: 25;
2020
+ readonly EWrongBuyerScore: 26;
2021
+ /** Registered Agent-ID buyer must reject via the agent-buyer variant. */
2022
+ readonly EBuyerIsAgent: 27;
2023
+ readonly EBuyerNotAgent: 28;
2024
+ };
2025
+ declare const REPUTATION_ABORT_CODES: {
2026
+ /** A bare v2 door (release_v2 / reject_v2 variants / refund_v2) on a
2027
+ * batch-origin Job — the client must attach the batch and settle via
2028
+ * the batch doors. */
2029
+ readonly EUseBatchSettle: 9;
2030
+ };
2031
+ declare const ESCROW_ABORT_CODES: {
2032
+ /** Stale package flow (FeeConfig VERSION moved) — update @t2000/*. */
2033
+ readonly EWrongVersion: 13;
2034
+ /** Second wave-hold free on one Job (unreachable via the doors). */
2035
+ readonly EBatchHoldReleased: 23;
2036
+ };
2037
+ interface BatchOpeningTerms extends OpeningTerms {
2038
+ /** Slots in the wave (1..live max; default live max 250). `amountUsdc`
2039
+ * is PER SLOT — total escrow = `slots × amountUsdc`. */
2040
+ slots: number;
2041
+ /** Slots one agent may claim of THIS wave (≥1; default 1). */
2042
+ maxClaimsPerAgent?: number;
2043
+ }
2044
+ /** Client-side preflight — the single-opening rules on the PER-SLOT terms
2045
+ * plus the wave bounds. */
2046
+ declare function preflightCreateBatchOpening(terms: BatchOpeningTerms): {
2047
+ valid: boolean;
2048
+ code?: 'INVALID_AMOUNT' | 'INVALID_INPUT';
2049
+ error?: string;
2050
+ };
2051
+ /** Build the wave post: split `slots × amount` USDC → `create_batch_open`. */
2052
+ declare function buildCreateBatchOpeningTx({ client, buyer, terms, }: {
2053
+ client: SuiCoreClient;
2054
+ buyer: string;
2055
+ terms: BatchOpeningTerms;
2056
+ }): Promise<Transaction>;
2057
+ /** Claim ONE slot — same score plumbing as `buildClaimOpeningTx`
2058
+ * (claimer's own AgentScore always; `create_empty_score` precursor when
2059
+ * it doesn't exist yet). Unlike singles there is no policy-based entry
2060
+ * split: `batch_claim` handles every policy internally. */
2061
+ declare function buildBatchClaimTx({ batchId, registryId, scoreId, }: {
2062
+ batchId: string;
2063
+ registryId: string;
2064
+ scoreId: string;
2065
+ }): Transaction;
2066
+ /** Buyer withdraws the unclaimed remainder — fee-free, any time. */
2067
+ declare function buildCancelBatchOpeningTx(batchId: string): Transaction;
2068
+ /** Permissionless remainder refund once `open_until` lapses. */
2069
+ declare function buildRefundBatchExpiredTx(batchId: string): Transaction;
2070
+ /** On-chain view of one BatchOpening. */
2071
+ interface BatchOpening {
2072
+ id: string;
2073
+ buyer: string;
2074
+ /** PER-SLOT escrow in display USDC. */
2075
+ amountUsdc: number;
2076
+ slotsTotal: number;
2077
+ slotsRemaining: number;
2078
+ feeBps: number;
2079
+ specHash: string;
2080
+ openUntilMs: number;
2081
+ slaMs: number;
2082
+ reviewWindowMs: number;
2083
+ rejectSplitBps: number;
2084
+ claimPolicy: number;
2085
+ minSellerLevel: number;
2086
+ maxClaimsPerAgent: number;
2087
+ /** Object id of the on-chain `claims_by_agent` Table (per-agent counts
2088
+ * live as its dynamic fields — see `getBatchClaimsByAgent`). */
2089
+ claimsTableId: string | null;
2090
+ createdAtMs: number;
2091
+ }
2092
+ /** Read one BatchOpening by object id (null = not a batch / gone). A
2093
+ * drained or cancelled batch still resolves (`slotsRemaining: 0`) — the
2094
+ * object persists in v1; existence is NOT the state. */
2095
+ declare function getBatchOpening(client: SuiCoreClient, batchId: string): Promise<BatchOpening | null>;
2096
+ /** Slots `agent` already claimed of this batch — best-effort read of the
2097
+ * on-chain Table entry (0 on miss/hiccup; Move enforces the real limit). */
2098
+ declare function getBatchClaimsByAgent(client: SuiCoreClient, batch: BatchOpening, agent: string): Promise<number>;
2099
+ /** English preflight for a batch claim — the wave gates first (slots,
2100
+ * per-agent limit), then the exact single-claim stack (policy → active
2101
+ * cap → level floor via `preflightClaimOpening`). */
2102
+ declare function preflightBatchClaim(score: AgentScore | null, batch: {
2103
+ claimPolicy: number;
2104
+ minSellerLevel?: number;
2105
+ slotsRemaining: number;
2106
+ maxClaimsPerAgent: number;
2107
+ }, myClaims: number): {
2108
+ valid: boolean;
2109
+ error?: string;
2110
+ };
2111
+
1942
2112
  declare const DEFAULT_COMMERCE_API_BASE = "https://api.t2000.ai/v1";
1943
2113
  /** The shape the API returns from GET /v1/services. */
1944
2114
  interface ServiceListing {
@@ -2037,4 +2207,4 @@ declare function putJobSpec(base: string, content: string): Promise<string>;
2037
2207
  * the store is untrusted; the chain hash is the authority). */
2038
2208
  declare function getJobSpec(base: string, hash: string): Promise<string>;
2039
2209
 
2040
- export { STABLE_ASSETS as $, A2A_ESCROW_FEE_CONFIG_ID as A, type BalanceResponse as B, CLOCK_ID as C, DEFAULT_ACTIVITY_REPORT_URL as D, ETH_TYPE as E, OPENING_CLAIM_POLICY_PROVEN as F, GAS_RESERVE_MIN as G, OPENING_CLAIM_POLICY_PROVEN_4STAR as H, IKA_TYPE as I, JOB_STATES as J, KNOWN_TARGETS as K, LABEL_PATTERNS as L, MANIFEST_TYPE as M, NAVX_TYPE as N, OPENING_CLAIM_POLICIES as O, OVERLAY_FEE_RATE as P, type OverlayFeeConfig as Q, PREFLIGHT_MAX_AMOUNT as R, PREFLIGHT_OK as S, PROVEN_MIN_AVG_STARS_X10 as T, PROVEN_MIN_REVIEWS as U, type PayOptions as V, type PayResult as W, type PreflightResult as X, REVIEW_MAX_STARS as Y, REVIEW_MIN_STARS as Z, SELLER_LEVEL_ACTIVE_CAPS as _, A2A_ESCROW_PACKAGE_ID as a, getDecimalsForCoinType as a$, SUI_DECIMALS as a0, SUI_TYPE as a1, SUPPORTED_ASSETS as a2, type SellerLevel as a3, type SendAssetClass as a4, type SendResult as a5, type ServiceListing as a6, type SimulationResult as a7, type StableAsset as a8, type SuiHolding as a9, buildRejectJobTx as aA, buildReleaseJobTx as aB, buildSendTx as aC, buildSwapTx as aD, checkPositiveAmount as aE, checkSuiAddress as aF, claimPolicyLabel as aG, claimPolicyRequirement as aH, classifyAction as aI, classifyLabel as aJ, classifySendAsset as aK, classifyTransaction as aL, deriveAgentScoreId as aM, effectiveSellerLevel as aN, executeTx as aO, extractAllUserLegs as aP, extractTransferDetails as aQ, extractTxCommands as aR, extractTxSender as aS, fallbackLabel as aT, fetchService as aU, findSwapRoute as aV, formatAssetAmount as aW, formatSui as aX, formatUsd as aY, getAgentScore as aZ, getDecimals as a_, type SuiRpcTxBlock as aa, type SupportedAsset as ab, type SwapRouteResult as ac, T2000Error as ad, type T2000ErrorCode as ae, type T2000ErrorData as af, T2000_OVERLAY_FEE_WALLET as ag, TOKEN_MAP as ah, type TransactionLeg as ai, type TransactionRecord as aj, type TransactionSigner as ak, type TxDirection as al, USDC_DECIMALS as am, USDC_TYPE as an, USDE_TYPE as ao, USDSUI_TYPE as ap, USDT_TYPE as aq, WAL_TYPE as ar, WBTC_TYPE as as, type X402ActivityPayload as at, type ZkLoginProof as au, ZkLoginSigner as av, activeCapForLevel as aw, buildCreateJobTx as ax, buildDeliverJobTx as ay, buildRefundJobTx as az, type ActivityReportConfig as b, type Opening as b$, getJob as b0, getJobSpec as b1, invalidSendAssetMessage as b2, jobActionsFor as b3, listServices as b4, mapMoveAbortCode as b5, mapWalletError as b6, meetsClaimPolicy as b7, meetsMinSellerLevel as b8, mistToSui as b9, type SwapResult as bA, type SwapQuoteResult as bB, type PaymentRequest as bC, type SuiCoreClient as bD, type SponsoredCoinMergeCache as bE, type SendableAsset as bF, A2A_ESCROW_LATEST_PACKAGE_ID as bG, A2A_ESCROW_OPENING_PACKAGE_ID as bH, A2A_ESCROW_PACKAGE_V10_ID as bI, A2A_ESCROW_PACKAGE_V2_ID as bJ, A2A_ESCROW_PACKAGE_V3_ID as bK, A2A_ESCROW_PACKAGE_V6_ID as bL, A2A_ESCROW_PACKAGE_V7_ID as bM, A2A_ESCROW_PACKAGE_V8_ID as bN, A2A_SCORE_BOARD_ID as bO, type ApiRouteListing as bP, CETUS_USDC_SUI_POOL as bQ, type CoinPage as bR, DEFAULT_GRPC_URL as bS, GASLESS_MIN_STABLE_AMOUNT as bT, GASLESS_STABLE_TYPES as bU, MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID as bV, MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID as bW, MAINNET_A2A_ESCROW_PACKAGE_ID as bX, MAINNET_A2A_SCORE_BOARD_ID as bY, MAX_OPEN_WINDOW_MS as bZ, OPERATION_ASSETS as b_, parseSuiRpcTx as ba, payWithX402 as bb, preflightClaimOpening as bc, preflightCreateJob as bd, preflightFail as be, preflightPay as bf, preflightSend as bg, preflightSwap as bh, putJobSpec as bi, rawToStable as bj, rawToUsdc as bk, refineLendingLabel as bl, reportX402Activity as bm, resolveSymbol as bn, resolveTokenType as bo, sellerLevel as bp, sellerLevelLabel as bq, stableToRaw as br, suiToMist as bs, truncateAddress as bt, usdcToRaw as bu, validateAddress as bv, verifyJobForSeller as bw, type T2000Options as bx, type X402Probe as by, type SerializedCetusRoute as bz, type AgentScore as c, type OpeningTerms as c0, type Operation as c1, SENDABLE_ASSETS as c2, type SelectAndSplitResult as c3, type SerializedCetusRoutePath as c4, type SerializedRouterDataV3 as c5, type ServicesRail as c6, type ServicesRow as c7, addSendToTx as c8, addSwapToTx as c9, selectSuiCoin as cA, serializeCetusRoute as cB, simulateTransaction as cC, throwIfSimulationFailed as cD, verifyCetusRouteCoinMatch as cE, assertAllowedAsset as ca, assertBuyerRequirements as cb, buildCancelOpeningTx as cc, buildClaimOpeningTx as cd, buildCreateEmptyScoreTx as ce, buildCreateOpeningTx as cf, buildDeclineJobTx as cg, buildRefundUnclaimedTx as ch, buildSubmitFirstReviewTx as ci, buildSubmitReviewTx as cj, deserializeCetusRoute as ck, fetchAllCoins as cl, getCoinMeta as cm, getOpening as cn, getSuiClient as co, getSuiGrpcClient as cp, isAllowedAsset as cq, isCetusRouteFresh as cr, isInRegistry as cs, normalizeAsset as ct, normalizeCoinType as cu, preflightCreateOpening as cv, probeX402 as cw, queryHistory as cx, queryTransaction as cy, selectAndSplitCoin as cz, COIN_REGISTRY as d, type ClassifyBalanceChange as e, type ClassifyResult as f, type CoinMeta as g, DEFAULT_COMMERCE_API_BASE as h, DEFAULT_NETWORK as i, type DepositInfo as j, type ExtractedTransfer as k, type Job as l, type JobState as m, type JobTerms as n, type JobVerification as o, KeypairSigner as p, LEVEL4_MAX_NO_DELIVERY as q, LEVEL4_MIN_REVIEWS as r, LOFI_TYPE as s, MAX_DELIVER_HORIZON_MS as t, MAX_JOB_USDC as u, MAX_REVIEW_WINDOW_MS as v, MIN_JOB_USDC as w, MIST_PER_SUI as x, NO_DELIVERY_REGRESSION_FLOOR as y, OPENING_CLAIM_POLICY_ANY_ACTIVE as z };
2210
+ export { PROVEN_MIN_REVIEWS as $, A2A_ESCROW_FEE_CONFIG_ID as A, BATCH_ABORT_CODES as B, CLOCK_ID as C, DEFAULT_ACTIVITY_REPORT_URL as D, ESCROW_ABORT_CODES as E, MAX_DELIVER_HORIZON_MS as F, GAS_RESERVE_MIN as G, MAX_JOB_USDC as H, IKA_TYPE as I, JOB_STATES as J, KNOWN_TARGETS as K, LABEL_PATTERNS as L, MANIFEST_TYPE as M, MAX_REVIEW_WINDOW_MS as N, MIN_JOB_USDC as O, MIST_PER_SUI as P, NAVX_TYPE as Q, NO_DELIVERY_REGRESSION_FLOOR as R, OPENING_CLAIM_POLICIES as S, OPENING_CLAIM_POLICY_ANY_ACTIVE as T, OPENING_CLAIM_POLICY_PROVEN as U, OPENING_CLAIM_POLICY_PROVEN_4STAR as V, OVERLAY_FEE_RATE as W, type OverlayFeeConfig as X, PREFLIGHT_MAX_AMOUNT as Y, PREFLIGHT_OK as Z, PROVEN_MIN_AVG_STARS_X10 as _, A2A_ESCROW_PACKAGE_ID as a, extractAllUserLegs as a$, type PayOptions as a0, type PayResult as a1, type PreflightResult as a2, REPUTATION_ABORT_CODES as a3, REVIEW_MAX_STARS as a4, REVIEW_MIN_STARS as a5, SELLER_LEVEL_ACTIVE_CAPS as a6, STABLE_ASSETS as a7, SUI_DECIMALS as a8, SUI_TYPE as a9, WBTC_TYPE as aA, type X402ActivityPayload as aB, type ZkLoginProof as aC, ZkLoginSigner as aD, activeCapForLevel as aE, buildBatchClaimTx as aF, buildCancelBatchOpeningTx as aG, buildCreateBatchOpeningTx as aH, buildCreateJobTx as aI, buildDeliverJobTx as aJ, buildRefundBatchExpiredTx as aK, buildRefundJobTx as aL, buildRejectJobTx as aM, buildReleaseJobTx as aN, buildSendTx as aO, buildSwapTx as aP, checkPositiveAmount as aQ, checkSuiAddress as aR, claimPolicyLabel as aS, claimPolicyRequirement as aT, classifyAction as aU, classifyLabel as aV, classifySendAsset as aW, classifyTransaction as aX, deriveAgentScoreId as aY, effectiveSellerLevel as aZ, executeTx as a_, SUPPORTED_ASSETS as aa, type SellerLevel as ab, type SendAssetClass as ac, type SendResult as ad, type ServiceListing as ae, type SimulationResult as af, type StableAsset as ag, type SuiHolding as ah, type SuiRpcTxBlock as ai, type SupportedAsset as aj, type SwapRouteResult as ak, T2000Error as al, type T2000ErrorCode as am, type T2000ErrorData as an, T2000_OVERLAY_FEE_WALLET as ao, TOKEN_MAP as ap, type TransactionLeg as aq, type TransactionRecord as ar, type TransactionSigner as as, type TxDirection as at, USDC_DECIMALS as au, USDC_TYPE as av, USDE_TYPE as aw, USDSUI_TYPE as ax, USDT_TYPE as ay, WAL_TYPE as az, type ActivityReportConfig as b, A2A_ESCROW_PACKAGE_V12_ID as b$, extractTransferDetails as b0, extractTxCommands as b1, extractTxSender as b2, fallbackLabel as b3, fetchService as b4, findSwapRoute as b5, formatAssetAmount as b6, formatSui as b7, formatUsd as b8, getAgentScore as b9, rawToStable as bA, rawToUsdc as bB, refineLendingLabel as bC, reportX402Activity as bD, resolveSymbol as bE, resolveTokenType as bF, sellerLevel as bG, sellerLevelLabel as bH, stableToRaw as bI, suiToMist as bJ, truncateAddress as bK, usdcToRaw as bL, validateAddress as bM, verifyJobForSeller as bN, type T2000Options as bO, type X402Probe as bP, type SerializedCetusRoute as bQ, type SwapResult as bR, type SwapQuoteResult as bS, type PaymentRequest as bT, type SuiCoreClient as bU, type SponsoredCoinMergeCache as bV, type SendableAsset as bW, A2A_ESCROW_LATEST_PACKAGE_ID as bX, A2A_ESCROW_OPENING_PACKAGE_ID as bY, A2A_ESCROW_PACKAGE_V10_ID as bZ, A2A_ESCROW_PACKAGE_V11_ID as b_, getBatchClaimsByAgent as ba, getBatchOpening as bb, getDecimals as bc, getDecimalsForCoinType as bd, getJob as be, getJobBatchOrigin as bf, getJobSpec as bg, invalidSendAssetMessage as bh, jobActionsFor as bi, listServices as bj, mapMoveAbortCode as bk, mapWalletError as bl, meetsClaimPolicy as bm, meetsMinSellerLevel as bn, mistToSui as bo, parseSuiRpcTx as bp, payWithX402 as bq, preflightBatchClaim as br, preflightClaimOpening as bs, preflightCreateBatchOpening as bt, preflightCreateJob as bu, preflightFail as bv, preflightPay as bw, preflightSend as bx, preflightSwap as by, putJobSpec as bz, type AgentScore as c, A2A_ESCROW_PACKAGE_V2_ID as c0, A2A_ESCROW_PACKAGE_V3_ID as c1, A2A_ESCROW_PACKAGE_V6_ID as c2, A2A_ESCROW_PACKAGE_V7_ID as c3, A2A_ESCROW_PACKAGE_V8_ID as c4, A2A_SCORE_BOARD_ID as c5, type ApiRouteListing as c6, CETUS_USDC_SUI_POOL as c7, type CoinPage as c8, DEFAULT_GRPC_URL as c9, buildRefundUnclaimedTx as cA, buildSubmitFirstReviewTx as cB, buildSubmitReviewTx as cC, deserializeCetusRoute as cD, fetchAllCoins as cE, getCoinMeta as cF, getOpening as cG, getSuiClient as cH, getSuiGrpcClient as cI, isAllowedAsset as cJ, isCetusRouteFresh as cK, isInRegistry as cL, normalizeAsset as cM, normalizeCoinType as cN, preflightCreateOpening as cO, probeX402 as cP, queryHistory as cQ, queryTransaction as cR, selectAndSplitCoin as cS, selectSuiCoin as cT, serializeCetusRoute as cU, simulateTransaction as cV, throwIfSimulationFailed as cW, verifyCetusRouteCoinMatch as cX, GASLESS_MIN_STABLE_AMOUNT as ca, GASLESS_STABLE_TYPES as cb, MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID as cc, MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID as cd, MAINNET_A2A_ESCROW_PACKAGE_ID as ce, MAINNET_A2A_SCORE_BOARD_ID as cf, MAX_OPEN_WINDOW_MS as cg, OPERATION_ASSETS as ch, type Opening as ci, type OpeningTerms as cj, type Operation as ck, SENDABLE_ASSETS as cl, type SelectAndSplitResult as cm, type SerializedCetusRoutePath as cn, type SerializedRouterDataV3 as co, type ServicesRail as cp, type ServicesRow as cq, addSendToTx as cr, addSwapToTx as cs, assertAllowedAsset as ct, assertBuyerRequirements as cu, buildCancelOpeningTx as cv, buildClaimOpeningTx as cw, buildCreateEmptyScoreTx as cx, buildCreateOpeningTx as cy, buildDeclineJobTx as cz, BATCH_OPENING_TYPE_MARKER as d, BATCH_ORIGIN_KEY_TYPE_SUFFIX as e, type BalanceResponse as f, type BatchOpening as g, type BatchOpeningTerms as h, COIN_REGISTRY as i, type ClassifyBalanceChange as j, type ClassifyResult as k, type CoinMeta as l, DEFAULT_COMMERCE_API_BASE as m, DEFAULT_NETWORK as n, type DepositInfo as o, ETH_TYPE as p, type ExtractedTransfer as q, type Job as r, type JobState as s, type JobTerms as t, type JobVerification as u, KeypairSigner as v, LEVEL4_MAX_NO_DELIVERY as w, LEVEL4_MIN_REVIEWS as x, LOFI_TYPE as y, MAX_BATCH_SLOTS_DEFAULT as z };