@t2000/sdk 10.37.2 → 10.38.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.
@@ -1591,8 +1591,16 @@ declare function buildRefundJobTx(jobId: string, v2: {
1591
1591
  }): Transaction;
1592
1592
  /** Seller posts the delivery commitment (hex hash) before the deadline. */
1593
1593
  declare function buildDeliverJobTx(jobId: string, deliveryHash: string): Transaction;
1594
- /** Buyer accepts (or anyone, once the review window lapsed) → funds to seller. */
1595
- declare function buildReleaseJobTx(jobId: string): Transaction;
1594
+ /** Buyer accepts (or anyone, once the review window lapsed) → funds to
1595
+ * seller. S.1192: settles through `reputation::release_v2` — the
1596
+ * SELLER's score (derive with `deriveAgentScoreId`) rides along so a
1597
+ * board-claimed job frees its active seat with the money. Hire jobs pass
1598
+ * the same score; the contract's `ClaimedJobKey` marker decides whether
1599
+ * a decrement lands. A scoreless seller needs the `create_empty_score`
1600
+ * precursor first (same hop as reject/refund since S.1063). */
1601
+ declare function buildReleaseJobTx(jobId: string, v2: {
1602
+ sellerScoreId: string;
1603
+ }): Transaction;
1596
1604
  /** Fetch + parse a `Job` shared object. Throws `RPC_ERROR` when the id
1597
1605
  * doesn't resolve to an a2a_escrow Job. */
1598
1606
  declare function getJob(client: SuiCoreClient, jobId: string): Promise<Job>;
@@ -1633,8 +1641,10 @@ declare function verifyJobForSeller({ client, jobId, seller, minAmountUsdc, minR
1633
1641
  * target the LATEST published id — the original id (types, Job verbs) is
1634
1642
  * unchanged.
1635
1643
  */
1636
- /** The LATEST published `a2a_escrow` package id on MAINNET (v9 upgrade
1637
- * 2026-08-15, S.1064review on REJECTED, additive; v8 = outcome
1644
+ /** The LATEST published `a2a_escrow` package id on MAINNET (v10 upgrade
1645
+ * 2026-08-24, S.1192seller levels + active caps, VERSION 6 cutover:
1646
+ * claim_v2/claim_proven_v2/create_open_v2/release_v2;
1647
+ * v9 = S.1064 review on REJECTED, additive; v8 = outcome
1638
1648
  * counters (S.1063); v7 = distinct buyers (S.1062);
1639
1649
  * v6 = S.1054 — `reputation` module + `opening::claim_proven`;
1640
1650
  * v5 locked open reject at 10000 (S.1019); v4 added amount bounds
@@ -1647,9 +1657,9 @@ declare function verifyJobForSeller({ client, jobId, seller, minAmountUsdc, minR
1647
1657
  * upgrade + `migrate` cutover is a ONE-VALUE change here. The original id
1648
1658
  * (`MAINNET_A2A_ESCROW_PACKAGE_ID` in job.ts) remains the anchor for type
1649
1659
  * strings, event filters, and object-type queries — those never move. */
1650
- declare const MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "0x7a9332e167d19e7442fb30740d31a536047da10ab00715402c6fff9e80ae604d";
1660
+ declare const MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "0x5c90ec07da01bf885a4e65247ce98b75ab8a042cd965d30d7213856d579c4afa";
1651
1661
  /** Back-compat name for the latest id (pre-S.981 consumers import this). */
1652
- declare const MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID = "0x7a9332e167d19e7442fb30740d31a536047da10ab00715402c6fff9e80ae604d";
1662
+ declare const MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID = "0x5c90ec07da01bf885a4e65247ce98b75ab8a042cd965d30d7213856d579c4afa";
1653
1663
  /** Env-overridable latest id for testnet/dev (NOT a trust anchor). A fresh
1654
1664
  * dev publish has original == latest, so `A2A_ESCROW_PACKAGE_ID` alone is
1655
1665
  * honored as the fallback override. */
@@ -1686,6 +1696,12 @@ declare const A2A_ESCROW_PACKAGE_V7_ID = "0x4249f0b242c47c7baf0c37304365bc4bbe76
1686
1696
  * RejectedAfterDeliveryKey/NoDeliveryKey/AsBuyerRejectedKey DF key types.
1687
1697
  * A DEFINING-id anchor like V2/V3/V6/V7 — never moves again. */
1688
1698
  declare const A2A_ESCROW_PACKAGE_V8_ID = "0x1595b80bc05a03607f3908702c866ca63cf961025b4263b5ecbe419e07f8ff31";
1699
+ /** v10 (S.1192, upgrade 1Am9J7H5… 2026-08-24) — defining id for the
1700
+ * seller-level surface: the ActiveSellerJobsChanged/OpeningCreatedV2
1701
+ * events and the ActiveSellerJobsKey/MinSellerLevelKey/TierActiveCapKey/
1702
+ * ClaimedJobKey DF key types. A DEFINING-id anchor like V2/V3/V6/V7/V8 —
1703
+ * never moves again, even when LATEST does. */
1704
+ declare const A2A_ESCROW_PACKAGE_V10_ID: string;
1689
1705
  /** Default claim policy: any ACTIVE registered Agent ID ($0 claim, FCFS). */
1690
1706
  declare const OPENING_CLAIM_POLICY_ANY_ACTIVE = 0;
1691
1707
  /** S.1054 — Proven: claimer needs ≥ PROVEN_MIN_REVIEWS on-chain reviews
@@ -1714,6 +1730,11 @@ interface OpeningTerms {
1714
1730
  * 2 Proven · 4★+. Never changes HOW a claim works: still FCFS, still
1715
1731
  * $0. 3+ aborts on-chain until defined. */
1716
1732
  claimPolicy?: number;
1733
+ /** S.1192 — minimum EFFECTIVE seller level to claim: 0 none (default),
1734
+ * 1..4 (Level floor, independent of claimPolicy — a post can require
1735
+ * Proven · 4★+ AND Level 2+, or either alone). Stored as a DF on the
1736
+ * Opening, enforced on-chain at claim. */
1737
+ minSellerLevel?: number;
1717
1738
  }
1718
1739
  /** Every claim policy `create_open` accepts (S.1054). */
1719
1740
  declare const OPENING_CLAIM_POLICIES: readonly [0, 1, 2];
@@ -1735,15 +1756,21 @@ declare function buildCreateOpeningTx({ client, buyer, terms, }: {
1735
1756
  * `registryId` = the shared `agent_id::registry::Registry` object
1736
1757
  * (callers pass `AGENT_ID_REGISTRY_ID` from `@t2000/id` — single source).
1737
1758
  *
1738
- * S.1054: for a PROVEN opening (`claimPolicy` 1/2) pass `scoreId` the
1739
- * claimer's own `AgentScore` (compute with `deriveAgentScoreId`) — and the
1740
- * call routes to `claim_proven`, which reads it immutably. Omitting it on
1741
- * a Proven opening aborts on-chain; preflight with `meetsClaimPolicy`
1742
- * first for an English refusal. */
1743
- declare function buildClaimOpeningTx({ openingId, registryId, scoreId, }: {
1759
+ * S.1192: EVERY claim policy 0 included passes `scoreId`, the
1760
+ * claimer's own `AgentScore` (compute with `deriveAgentScoreId`): the
1761
+ * active-cap + level-floor gates read it and the in-flight counter
1762
+ * writes to it. A claimer with no score yet runs the permissionless
1763
+ * `buildCreateEmptyScoreTx` as its own PRECURSOR tx first (a shared
1764
+ * object cannot be created and used in one tx — the S.1063 sponsored
1765
+ * precursor hop; an empty score grants nothing and reads as Level 1).
1766
+ * `claimPolicy` (the OPENING's policy, from the board row or
1767
+ * `getOpening`) routes 0 → `claim_v2`, 1/2 → `claim_proven_v2`.
1768
+ * Preflight with `preflightClaimOpening` first for English refusals. */
1769
+ declare function buildClaimOpeningTx({ openingId, registryId, scoreId, claimPolicy, }: {
1744
1770
  openingId: string;
1745
1771
  registryId: string;
1746
- scoreId?: string;
1772
+ scoreId: string;
1773
+ claimPolicy?: number;
1747
1774
  }): Transaction;
1748
1775
  /** Buyer withdraws an unclaimed opening — fee-free, any time. */
1749
1776
  declare function buildCancelOpeningTx(openingId: string): Transaction;
@@ -1761,6 +1788,10 @@ interface Opening {
1761
1788
  reviewWindowMs: number;
1762
1789
  rejectSplitBps: number;
1763
1790
  claimPolicy: number;
1791
+ /** S.1192 — minimum EFFECTIVE seller level to claim (0 = none; DF read,
1792
+ * best-effort: 0 for every pre-S.1192 opening, when the V10 pin isn't
1793
+ * set yet, or on a read hiccup — Move is the enforcement). */
1794
+ minSellerLevel: number;
1764
1795
  createdAtMs: number;
1765
1796
  }
1766
1797
  /** Read one Opening by object id (null = gone: claimed/cancelled/refunded). */
@@ -1801,6 +1832,20 @@ declare const PROVEN_MIN_AVG_STARS_X10 = 40;
1801
1832
  /** Star bounds on a review. */
1802
1833
  declare const REVIEW_MIN_STARS = 1;
1803
1834
  declare const REVIEW_MAX_STARS = 5;
1835
+ /** A seller's capacity label, 1-indexed (buyer copy: "Level 1"…"Level 4").
1836
+ * Separate from claim policy — an opening can require both. */
1837
+ type SellerLevel = 1 | 2 | 3 | 4;
1838
+ /** Default in-flight claimed-job caps per level (index = level − 1).
1839
+ * Package defaults — the LIVE values are AdminCap-tunable FeeConfig DFs;
1840
+ * the chain is the enforcement, these feed display + preflight. */
1841
+ declare const SELLER_LEVEL_ACTIVE_CAPS: readonly number[];
1842
+ /** `noDelivery >= floor` regresses the EFFECTIVE level to 1 (default;
1843
+ * AdminCap-tunable on-chain). */
1844
+ declare const NO_DELIVERY_REGRESSION_FLOOR = 3;
1845
+ /** Level 4 additionally needs ≥ this many reviews… */
1846
+ declare const LEVEL4_MIN_REVIEWS = 20;
1847
+ /** …and ≤ this many no-delivery outcomes. */
1848
+ declare const LEVEL4_MAX_NO_DELIVERY = 2;
1804
1849
  /** Compute the deterministic `AgentScore` object id for an agent — pure
1805
1850
  * local math (`sui::derived_object`), no RPC. The object may not exist
1806
1851
  * yet: no score object ⇔ zero on-chain reviews. */
@@ -1822,6 +1867,9 @@ interface AgentScore {
1822
1867
  rejectedAfterDelivery: number;
1823
1868
  noDelivery: number;
1824
1869
  asBuyerRejected: number;
1870
+ /** S.1192 — live board-claimed jobs in flight (funded + delivered).
1871
+ * 0 when the DF is absent (soft start) or pre-V10-pin. */
1872
+ activeSellerJobs: number;
1825
1873
  }
1826
1874
  /** Read an agent's score (null = no reviews yet — the lazy-create means the
1827
1875
  * object simply doesn't exist). */
@@ -1846,6 +1894,35 @@ declare function claimPolicyLabel(claimPolicy: number): string;
1846
1894
  /** One English sentence for a Proven refusal — CLI/MCP/prepare all reuse
1847
1895
  * this instead of surfacing a raw Move abort. */
1848
1896
  declare function claimPolicyRequirement(claimPolicy: number): string;
1897
+ /** Computed Level 1..4 from on-chain aggregates (`null` score = Level 1,
1898
+ * the empty-score default). Reuses the SAME predicates the claim
1899
+ * policies read — one SSOT for every threshold. */
1900
+ declare function sellerLevel(score: AgentScore | null): SellerLevel;
1901
+ /** The level capacity actually gates on: `noDelivery >= floor` regresses
1902
+ * to Level 1 regardless of stars (reliability caps capacity without
1903
+ * touching star math). Uses the package-default floor — the live value
1904
+ * is an AdminCap DF; the chain is the enforcement. */
1905
+ declare function effectiveSellerLevel(score: AgentScore | null): SellerLevel;
1906
+ /** Default active-job cap for a level (the live cap is AdminCap-tunable
1907
+ * on-chain; this feeds display + preflight). */
1908
+ declare function activeCapForLevel(level: SellerLevel): number;
1909
+ /** Whether this seller clears an opening's `minSellerLevel` floor — on
1910
+ * the EFFECTIVE level, matching the Move gate. */
1911
+ declare function meetsMinSellerLevel(score: AgentScore | null, minLevel: number): boolean;
1912
+ /** Human label — every surface uses this, never the raw number. */
1913
+ declare function sellerLevelLabel(level: number): string;
1914
+ /** English preflight for a claim (S.1192) — refuse BEFORE the sponsored
1915
+ * rail instead of surfacing a raw Move abort. Checks, in gate order:
1916
+ * claim policy (S.1054), the active-job cap on the claimer's effective
1917
+ * level, then the opening's level floor. Capacity language, not ban
1918
+ * language — a capped seller finishes work and claims again. */
1919
+ declare function preflightClaimOpening(score: AgentScore | null, opening: {
1920
+ claimPolicy: number;
1921
+ minSellerLevel?: number;
1922
+ }): {
1923
+ valid: boolean;
1924
+ error?: string;
1925
+ };
1849
1926
  /** Review a released job when the seller ALREADY has a score object —
1850
1927
  * also the star-EDIT path (same buyer re-rating the same job). */
1851
1928
  declare function buildSubmitReviewTx({ scoreId, jobId, stars, }: {
@@ -1960,4 +2037,4 @@ declare function putJobSpec(base: string, content: string): Promise<string>;
1960
2037
  * the store is untrusted; the chain hash is the authority). */
1961
2038
  declare function getJobSpec(base: string, hash: string): Promise<string>;
1962
2039
 
1963
- export { type SendAssetClass 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, type OverlayFeeConfig as F, GAS_RESERVE_MIN as G, PREFLIGHT_OK 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, PREFLIGHT_MAX_AMOUNT as P, PROVEN_MIN_AVG_STARS_X10 as Q, PROVEN_MIN_REVIEWS as R, type PayOptions as S, type PayResult as T, type PreflightResult as U, REVIEW_MAX_STARS as V, REVIEW_MIN_STARS as W, STABLE_ASSETS as X, SUI_DECIMALS as Y, SUI_TYPE as Z, SUPPORTED_ASSETS as _, A2A_ESCROW_PACKAGE_ID as a, mapWalletError as a$, type SendResult as a0, type ServiceListing as a1, type SimulationResult as a2, type StableAsset as a3, type SuiHolding as a4, type SuiRpcTxBlock as a5, type SupportedAsset as a6, type SwapRouteResult as a7, T2000Error as a8, type T2000ErrorCode as a9, claimPolicyLabel as aA, claimPolicyRequirement as aB, classifyAction as aC, classifyLabel as aD, classifySendAsset as aE, classifyTransaction as aF, deriveAgentScoreId as aG, executeTx as aH, extractAllUserLegs as aI, extractTransferDetails as aJ, extractTxCommands as aK, extractTxSender as aL, fallbackLabel as aM, fetchService as aN, findSwapRoute as aO, formatAssetAmount as aP, formatSui as aQ, formatUsd as aR, getAgentScore as aS, getDecimals as aT, getDecimalsForCoinType as aU, getJob as aV, getJobSpec as aW, invalidSendAssetMessage as aX, jobActionsFor as aY, listServices as aZ, mapMoveAbortCode as a_, type T2000ErrorData as aa, T2000_OVERLAY_FEE_WALLET as ab, TOKEN_MAP as ac, type TransactionLeg as ad, type TransactionRecord as ae, type TransactionSigner as af, type TxDirection as ag, USDC_DECIMALS as ah, USDC_TYPE as ai, USDE_TYPE as aj, USDSUI_TYPE as ak, USDT_TYPE as al, WAL_TYPE as am, WBTC_TYPE as an, type X402ActivityPayload as ao, type ZkLoginProof as ap, ZkLoginSigner as aq, buildCreateJobTx as ar, buildDeliverJobTx as as, buildRefundJobTx as at, buildRejectJobTx as au, buildReleaseJobTx as av, buildSendTx as aw, buildSwapTx as ax, checkPositiveAmount as ay, checkSuiAddress as az, type ActivityReportConfig as b, assertBuyerRequirements as b$, meetsClaimPolicy as b0, mistToSui as b1, parseSuiRpcTx as b2, payWithX402 as b3, preflightCreateJob as b4, preflightFail as b5, preflightPay as b6, preflightSend as b7, preflightSwap as b8, putJobSpec as b9, A2A_ESCROW_PACKAGE_V7_ID as bA, A2A_ESCROW_PACKAGE_V8_ID as bB, A2A_SCORE_BOARD_ID as bC, type ApiRouteListing as bD, CETUS_USDC_SUI_POOL as bE, type CoinPage as bF, DEFAULT_GRPC_URL as bG, GASLESS_MIN_STABLE_AMOUNT as bH, GASLESS_STABLE_TYPES as bI, MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID as bJ, MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID as bK, MAINNET_A2A_ESCROW_PACKAGE_ID as bL, MAINNET_A2A_SCORE_BOARD_ID as bM, MAX_OPEN_WINDOW_MS as bN, OPERATION_ASSETS as bO, type Opening as bP, type OpeningTerms as bQ, type Operation as bR, SENDABLE_ASSETS as bS, type SelectAndSplitResult as bT, type SerializedCetusRoutePath as bU, type SerializedRouterDataV3 as bV, type ServicesRail as bW, type ServicesRow as bX, addSendToTx as bY, addSwapToTx as bZ, assertAllowedAsset as b_, rawToStable as ba, rawToUsdc as bb, refineLendingLabel as bc, reportX402Activity as bd, resolveSymbol as be, resolveTokenType as bf, stableToRaw as bg, suiToMist as bh, truncateAddress as bi, usdcToRaw as bj, validateAddress as bk, verifyJobForSeller as bl, type T2000Options as bm, type X402Probe as bn, type SerializedCetusRoute as bo, type SwapResult as bp, type SwapQuoteResult as bq, type PaymentRequest as br, type SuiCoreClient as bs, type SponsoredCoinMergeCache as bt, type SendableAsset as bu, A2A_ESCROW_LATEST_PACKAGE_ID as bv, A2A_ESCROW_OPENING_PACKAGE_ID as bw, A2A_ESCROW_PACKAGE_V2_ID as bx, A2A_ESCROW_PACKAGE_V3_ID as by, A2A_ESCROW_PACKAGE_V6_ID as bz, type AgentScore as c, buildCancelOpeningTx as c0, buildClaimOpeningTx as c1, buildCreateEmptyScoreTx as c2, buildCreateOpeningTx as c3, buildDeclineJobTx as c4, buildRefundUnclaimedTx as c5, buildSubmitFirstReviewTx as c6, buildSubmitReviewTx as c7, deserializeCetusRoute as c8, fetchAllCoins as c9, getCoinMeta as ca, getOpening as cb, getSuiClient as cc, getSuiGrpcClient as cd, isAllowedAsset as ce, isCetusRouteFresh as cf, isInRegistry as cg, normalizeAsset as ch, normalizeCoinType as ci, preflightCreateOpening as cj, probeX402 as ck, queryHistory as cl, queryTransaction as cm, selectAndSplitCoin as cn, selectSuiCoin as co, serializeCetusRoute as cp, simulateTransaction as cq, throwIfSimulationFailed as cr, verifyCetusRouteCoinMatch as cs, 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, LOFI_TYPE as q, MAX_DELIVER_HORIZON_MS as r, MAX_JOB_USDC as s, MAX_REVIEW_WINDOW_MS as t, MIN_JOB_USDC as u, MIST_PER_SUI as v, OPENING_CLAIM_POLICY_ANY_ACTIVE as w, OPENING_CLAIM_POLICY_PROVEN as x, OPENING_CLAIM_POLICY_PROVEN_4STAR as y, OVERLAY_FEE_RATE as z };
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 };
package/dist/index.cjs CHANGED
@@ -2986,7 +2986,7 @@ init_coinSelection();
2986
2986
  init_errors();
2987
2987
  init_token_registry();
2988
2988
  init_coinSelection();
2989
- var MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "0x7a9332e167d19e7442fb30740d31a536047da10ab00715402c6fff9e80ae604d";
2989
+ var MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "0x5c90ec07da01bf885a4e65247ce98b75ab8a042cd965d30d7213856d579c4afa";
2990
2990
  var MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID = MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID;
2991
2991
  var A2A_ESCROW_LATEST_PACKAGE_ID = process.env.A2A_ESCROW_OPENING_PACKAGE_ID ?? process.env.A2A_ESCROW_PACKAGE_ID ?? MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID;
2992
2992
  var A2A_ESCROW_OPENING_PACKAGE_ID = A2A_ESCROW_LATEST_PACKAGE_ID;
@@ -2995,6 +2995,7 @@ var A2A_ESCROW_PACKAGE_V3_ID = "0x69ad93c555519de520a5c7f7f2963ad6f8b91cefc098fc
2995
2995
  var A2A_ESCROW_PACKAGE_V6_ID = "0xb065033b6f72c4899055a0b3afac28f09dc7b0b7b491eada793157de20000618";
2996
2996
  var A2A_ESCROW_PACKAGE_V7_ID = "0x4249f0b242c47c7baf0c37304365bc4bbe769bcedf11f3525e84682d59a3b23e";
2997
2997
  var A2A_ESCROW_PACKAGE_V8_ID = "0x1595b80bc05a03607f3908702c866ca63cf961025b4263b5ecbe419e07f8ff31";
2998
+ var A2A_ESCROW_PACKAGE_V10_ID = process.env.A2A_ESCROW_PACKAGE_V10_ID ?? "0x5c90ec07da01bf885a4e65247ce98b75ab8a042cd965d30d7213856d579c4afa";
2998
2999
  var CLOCK_ID2 = "0x6";
2999
3000
  var MODULE = "opening";
3000
3001
  var SHA256_HEX_RE = /^(0x)?[0-9a-fA-F]{64}$/;
@@ -3069,6 +3070,14 @@ function preflightCreateOpening(terms) {
3069
3070
  error: "claimPolicy must be 0 (Anyone), 1 (Proven) or 2 (Proven \xB7 4\u2605+) \u2014 anything else aborts on-chain."
3070
3071
  };
3071
3072
  }
3073
+ const minLevel = terms.minSellerLevel ?? 0;
3074
+ if (!Number.isInteger(minLevel) || minLevel < 0 || minLevel > 4) {
3075
+ return {
3076
+ valid: false,
3077
+ code: "INVALID_INPUT",
3078
+ error: "minSellerLevel must be 0 (no floor) or 1\u20134 (Level 1\u20134) \u2014 anything else aborts on-chain (S.1192)."
3079
+ };
3080
+ }
3072
3081
  return { valid: true };
3073
3082
  }
3074
3083
  async function buildCreateOpeningTx({
@@ -3084,7 +3093,9 @@ async function buildCreateOpeningTx({
3084
3093
  allowSwapAll: false
3085
3094
  });
3086
3095
  tx.moveCall({
3087
- target: `${A2A_ESCROW_OPENING_PACKAGE_ID}::${MODULE}::create_open`,
3096
+ // S.1192: create_open is a dead abort stub after the v10 migrate —
3097
+ // every post rides v2 (adds the min_seller_level DF write).
3098
+ target: `${A2A_ESCROW_OPENING_PACKAGE_ID}::${MODULE}::create_open_v2`,
3088
3099
  typeArguments: [exports.USDC_TYPE],
3089
3100
  arguments: [
3090
3101
  coin,
@@ -3094,6 +3105,7 @@ async function buildCreateOpeningTx({
3094
3105
  tx.pure.u64(terms.reviewWindowMs),
3095
3106
  tx.pure.u64(terms.rejectSplitBps),
3096
3107
  tx.pure.u8(terms.claimPolicy ?? OPENING_CLAIM_POLICY_ANY_ACTIVE),
3108
+ tx.pure.u8(terms.minSellerLevel ?? 0),
3097
3109
  feeConfigArg(tx),
3098
3110
  tx.object(CLOCK_ID2)
3099
3111
  ]
@@ -3103,23 +3115,26 @@ async function buildCreateOpeningTx({
3103
3115
  function buildClaimOpeningTx({
3104
3116
  openingId,
3105
3117
  registryId,
3106
- scoreId
3118
+ scoreId,
3119
+ claimPolicy = OPENING_CLAIM_POLICY_ANY_ACTIVE
3107
3120
  }) {
3121
+ if (!scoreId) {
3122
+ throw new exports.T2000Error(
3123
+ "INVALID_INPUT",
3124
+ "Claiming needs the claimer's own AgentScore id (S.1192 \u2014 every claim moves the active-job counter). Derive it with deriveAgentScoreId; create it first with buildCreateEmptyScoreTx when it does not exist yet."
3125
+ );
3126
+ }
3127
+ const proven = claimPolicy !== OPENING_CLAIM_POLICY_ANY_ACTIVE;
3108
3128
  const tx = new transactions.Transaction();
3109
3129
  tx.moveCall({
3110
- target: `${A2A_ESCROW_OPENING_PACKAGE_ID}::${MODULE}::${scoreId ? "claim_proven" : "claim"}`,
3130
+ target: `${A2A_ESCROW_OPENING_PACKAGE_ID}::${MODULE}::${proven ? "claim_proven_v2" : "claim_v2"}`,
3111
3131
  typeArguments: [exports.USDC_TYPE],
3112
- arguments: scoreId ? [
3132
+ arguments: [
3113
3133
  tx.object(openingId),
3114
3134
  tx.object(registryId),
3115
3135
  tx.object(scoreId),
3116
3136
  feeConfigArg(tx),
3117
3137
  tx.object(CLOCK_ID2)
3118
- ] : [
3119
- tx.object(openingId),
3120
- tx.object(registryId),
3121
- feeConfigArg(tx),
3122
- tx.object(CLOCK_ID2)
3123
3138
  ]
3124
3139
  });
3125
3140
  return tx;
@@ -3139,6 +3154,24 @@ function buildCancelOpeningTx(openingId) {
3139
3154
  function buildRefundUnclaimedTx(openingId) {
3140
3155
  return openingCall(openingId, "refund_unclaimed");
3141
3156
  }
3157
+ async function readMinSellerLevelDf(client, openingId) {
3158
+ if (!A2A_ESCROW_PACKAGE_V10_ID) return 0;
3159
+ try {
3160
+ const fieldId = utils.deriveDynamicFieldID(
3161
+ openingId,
3162
+ `${A2A_ESCROW_PACKAGE_V10_ID}::${MODULE}::MinSellerLevelKey`,
3163
+ new Uint8Array([0])
3164
+ );
3165
+ const resp = await client.core.getObject({
3166
+ objectId: fieldId,
3167
+ include: { json: true }
3168
+ });
3169
+ const json = resp?.object?.json;
3170
+ return Number(json?.value ?? 0);
3171
+ } catch {
3172
+ return 0;
3173
+ }
3174
+ }
3142
3175
  function bytesToHex(bytes) {
3143
3176
  return `0x${Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join("")}`;
3144
3177
  }
@@ -3149,6 +3182,7 @@ async function getOpening(client, openingId) {
3149
3182
  if (!json || !objType.includes(`::${MODULE}::Opening<`)) {
3150
3183
  return null;
3151
3184
  }
3185
+ const minSellerLevel = await readMinSellerLevelDf(client, openingId);
3152
3186
  return {
3153
3187
  id: openingId,
3154
3188
  buyer: String(json.buyer),
@@ -3160,6 +3194,7 @@ async function getOpening(client, openingId) {
3160
3194
  reviewWindowMs: Number(json.review_window_ms),
3161
3195
  rejectSplitBps: Number(json.reject_split_bps),
3162
3196
  claimPolicy: Number(json.claim_policy ?? 0),
3197
+ minSellerLevel,
3163
3198
  createdAtMs: Number(json.created_at_ms ?? 0)
3164
3199
  };
3165
3200
  }
@@ -3289,15 +3324,6 @@ function buildDeclineJobTx(jobId) {
3289
3324
  });
3290
3325
  return tx;
3291
3326
  }
3292
- function jobCall(jobId, fn) {
3293
- const tx = new transactions.Transaction();
3294
- tx.moveCall({
3295
- target: `${A2A_ESCROW_LATEST_PACKAGE_ID}::${MODULE2}::${fn}`,
3296
- typeArguments: [exports.USDC_TYPE],
3297
- arguments: [tx.object(jobId), feeConfigArg2(tx), tx.object(CLOCK_ID3)]
3298
- });
3299
- return tx;
3300
- }
3301
3327
  function buildRejectJobTx(jobId, v2) {
3302
3328
  const tx = new transactions.Transaction();
3303
3329
  tx.moveCall({
@@ -3348,8 +3374,19 @@ function buildDeliverJobTx(jobId, deliveryHash) {
3348
3374
  });
3349
3375
  return tx;
3350
3376
  }
3351
- function buildReleaseJobTx(jobId) {
3352
- return jobCall(jobId, "release");
3377
+ function buildReleaseJobTx(jobId, v2) {
3378
+ const tx = new transactions.Transaction();
3379
+ tx.moveCall({
3380
+ target: `${A2A_ESCROW_LATEST_PACKAGE_ID}::reputation::release_v2`,
3381
+ typeArguments: [exports.USDC_TYPE],
3382
+ arguments: [
3383
+ tx.object(jobId),
3384
+ tx.object(v2.sellerScoreId),
3385
+ feeConfigArg2(tx),
3386
+ tx.object(CLOCK_ID3)
3387
+ ]
3388
+ });
3389
+ return tx;
3353
3390
  }
3354
3391
  async function getJob(client, jobId) {
3355
3392
  const resp = await client.core.getObject({ objectId: jobId, include: { json: true } }).catch((e) => {
@@ -3438,6 +3475,10 @@ var PROVEN_MIN_REVIEWS = 3;
3438
3475
  var PROVEN_MIN_AVG_STARS_X10 = 40;
3439
3476
  var REVIEW_MIN_STARS = 1;
3440
3477
  var REVIEW_MAX_STARS = 5;
3478
+ var SELLER_LEVEL_ACTIVE_CAPS = [4, 10, 20, 30];
3479
+ var NO_DELIVERY_REGRESSION_FLOOR = 3;
3480
+ var LEVEL4_MIN_REVIEWS = 20;
3481
+ var LEVEL4_MAX_NO_DELIVERY = 2;
3441
3482
  function boardIdOrThrow(boardId) {
3442
3483
  const id = boardId ?? A2A_SCORE_BOARD_ID;
3443
3484
  if (!id) {
@@ -3483,11 +3524,12 @@ async function getAgentScore(client, agent, boardId) {
3483
3524
  }
3484
3525
  const reviewCount = Number(json.review_count ?? 0);
3485
3526
  const starsSum = Number(json.stars_sum ?? 0);
3486
- const [distinctBuyers, rejectedAfterDelivery, noDelivery, asBuyerRejected] = await Promise.all([
3527
+ const [distinctBuyers, rejectedAfterDelivery, noDelivery, asBuyerRejected, activeSellerJobs] = await Promise.all([
3487
3528
  readCounterDf(client, scoreId, A2A_ESCROW_PACKAGE_V7_ID, "DistinctCountKey"),
3488
3529
  readCounterDf(client, scoreId, A2A_ESCROW_PACKAGE_V8_ID, "RejectedAfterDeliveryKey"),
3489
3530
  readCounterDf(client, scoreId, A2A_ESCROW_PACKAGE_V8_ID, "NoDeliveryKey"),
3490
- readCounterDf(client, scoreId, A2A_ESCROW_PACKAGE_V8_ID, "AsBuyerRejectedKey")
3531
+ readCounterDf(client, scoreId, A2A_ESCROW_PACKAGE_V8_ID, "AsBuyerRejectedKey"),
3532
+ readCounterDf(client, scoreId, A2A_ESCROW_PACKAGE_V10_ID, "ActiveSellerJobsKey")
3491
3533
  ]);
3492
3534
  return {
3493
3535
  id: scoreId,
@@ -3498,7 +3540,8 @@ async function getAgentScore(client, agent, boardId) {
3498
3540
  distinctBuyers,
3499
3541
  rejectedAfterDelivery,
3500
3542
  noDelivery,
3501
- asBuyerRejected
3543
+ asBuyerRejected,
3544
+ activeSellerJobs
3502
3545
  };
3503
3546
  }
3504
3547
  function buildCreateEmptyScoreTx({
@@ -3543,6 +3586,51 @@ function claimPolicyRequirement(claimPolicy) {
3543
3586
  }
3544
3587
  return "Anyone can claim (active Agent ID required).";
3545
3588
  }
3589
+ function sellerLevel(score) {
3590
+ if (!score) return 1;
3591
+ const provenAvg = score.distinctBuyers >= PROVEN_MIN_REVIEWS && score.starsSum * 10 >= score.reviewCount * PROVEN_MIN_AVG_STARS_X10;
3592
+ if (provenAvg) {
3593
+ return score.reviewCount >= LEVEL4_MIN_REVIEWS && score.noDelivery <= LEVEL4_MAX_NO_DELIVERY ? 4 : 3;
3594
+ }
3595
+ return score.distinctBuyers >= PROVEN_MIN_REVIEWS ? 2 : 1;
3596
+ }
3597
+ function effectiveSellerLevel(score) {
3598
+ if (!score) return 1;
3599
+ if (score.noDelivery >= NO_DELIVERY_REGRESSION_FLOOR) return 1;
3600
+ return sellerLevel(score);
3601
+ }
3602
+ function activeCapForLevel(level) {
3603
+ return SELLER_LEVEL_ACTIVE_CAPS[level - 1];
3604
+ }
3605
+ function meetsMinSellerLevel(score, minLevel) {
3606
+ if (minLevel <= 0) return true;
3607
+ return effectiveSellerLevel(score) >= minLevel;
3608
+ }
3609
+ function sellerLevelLabel(level) {
3610
+ return level >= 1 && level <= 4 ? `Level ${level}` : `Level ? (${level})`;
3611
+ }
3612
+ function preflightClaimOpening(score, opening) {
3613
+ if (!meetsClaimPolicy(score, opening.claimPolicy)) {
3614
+ return { valid: false, error: claimPolicyRequirement(opening.claimPolicy) };
3615
+ }
3616
+ const level = effectiveSellerLevel(score);
3617
+ const cap = activeCapForLevel(level);
3618
+ const active = score?.activeSellerJobs ?? 0;
3619
+ if (active >= cap) {
3620
+ return {
3621
+ valid: false,
3622
+ error: `Active: ${active}/${cap} \u2014 ${sellerLevelLabel(level)} caps in-flight claimed jobs at ${cap}. Finish (deliver + settle) a job or wait for a deadline refund, then claim again.`
3623
+ };
3624
+ }
3625
+ const minLevel = opening.minSellerLevel ?? 0;
3626
+ if (!meetsMinSellerLevel(score, minLevel)) {
3627
+ return {
3628
+ valid: false,
3629
+ error: `This opening needs ${sellerLevelLabel(minLevel)}+ \u2014 this wallet is ${sellerLevelLabel(level)}. Level 2 = reviews from ${PROVEN_MIN_REVIEWS}+ distinct buyers; Level 3 adds a 4.0\u2605 average; reliability (no-shows) can regress a level. Earn it on openings without a floor first.`
3630
+ };
3631
+ }
3632
+ return { valid: true };
3633
+ }
3546
3634
  function assertStars(stars) {
3547
3635
  if (!Number.isInteger(stars) || stars < REVIEW_MIN_STARS || stars > REVIEW_MAX_STARS) {
3548
3636
  throw new exports.T2000Error("INVALID_INPUT", "Stars must be an integer 1-5.");
@@ -4809,6 +4897,7 @@ exports.A2A_ESCROW_FEE_CONFIG_ID = A2A_ESCROW_FEE_CONFIG_ID;
4809
4897
  exports.A2A_ESCROW_LATEST_PACKAGE_ID = A2A_ESCROW_LATEST_PACKAGE_ID;
4810
4898
  exports.A2A_ESCROW_OPENING_PACKAGE_ID = A2A_ESCROW_OPENING_PACKAGE_ID;
4811
4899
  exports.A2A_ESCROW_PACKAGE_ID = A2A_ESCROW_PACKAGE_ID;
4900
+ exports.A2A_ESCROW_PACKAGE_V10_ID = A2A_ESCROW_PACKAGE_V10_ID;
4812
4901
  exports.A2A_ESCROW_PACKAGE_V2_ID = A2A_ESCROW_PACKAGE_V2_ID;
4813
4902
  exports.A2A_ESCROW_PACKAGE_V3_ID = A2A_ESCROW_PACKAGE_V3_ID;
4814
4903
  exports.A2A_ESCROW_PACKAGE_V6_ID = A2A_ESCROW_PACKAGE_V6_ID;
@@ -4836,6 +4925,8 @@ exports.JOB_STATES = JOB_STATES;
4836
4925
  exports.KNOWN_TARGETS = KNOWN_TARGETS;
4837
4926
  exports.KeypairSigner = KeypairSigner;
4838
4927
  exports.LABEL_PATTERNS = LABEL_PATTERNS;
4928
+ exports.LEVEL4_MAX_NO_DELIVERY = LEVEL4_MAX_NO_DELIVERY;
4929
+ exports.LEVEL4_MIN_REVIEWS = LEVEL4_MIN_REVIEWS;
4839
4930
  exports.LimitEnforcer = LimitEnforcer;
4840
4931
  exports.LimitExceededError = LimitExceededError;
4841
4932
  exports.MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID;
@@ -4850,6 +4941,7 @@ exports.MAX_SLUG_LENGTH = MAX_SLUG_LENGTH;
4850
4941
  exports.MAX_TIER_BASE_LENGTH = MAX_TIER_BASE_LENGTH;
4851
4942
  exports.MIN_JOB_USDC = MIN_JOB_USDC;
4852
4943
  exports.MIST_PER_SUI = MIST_PER_SUI;
4944
+ exports.NO_DELIVERY_REGRESSION_FLOOR = NO_DELIVERY_REGRESSION_FLOOR;
4853
4945
  exports.OPENING_CLAIM_POLICIES = OPENING_CLAIM_POLICIES;
4854
4946
  exports.OPENING_CLAIM_POLICY_ANY_ACTIVE = OPENING_CLAIM_POLICY_ANY_ACTIVE;
4855
4947
  exports.OPENING_CLAIM_POLICY_PROVEN = OPENING_CLAIM_POLICY_PROVEN;
@@ -4860,6 +4952,7 @@ exports.PROVEN_MIN_AVG_STARS_X10 = PROVEN_MIN_AVG_STARS_X10;
4860
4952
  exports.PROVEN_MIN_REVIEWS = PROVEN_MIN_REVIEWS;
4861
4953
  exports.REVIEW_MAX_STARS = REVIEW_MAX_STARS;
4862
4954
  exports.REVIEW_MIN_STARS = REVIEW_MIN_STARS;
4955
+ exports.SELLER_LEVEL_ACTIVE_CAPS = SELLER_LEVEL_ACTIVE_CAPS;
4863
4956
  exports.SENDABLE_ASSETS = SENDABLE_ASSETS;
4864
4957
  exports.SERVICE_SLUG_RE = SERVICE_SLUG_RE;
4865
4958
  exports.SERVICE_TIERS = SERVICE_TIERS;
@@ -4877,6 +4970,7 @@ exports.T2000_OVERLAY_FEE_WALLET = T2000_OVERLAY_FEE_WALLET;
4877
4970
  exports.USDC_DECIMALS = USDC_DECIMALS;
4878
4971
  exports.WRITE_APPENDER_REGISTRY = WRITE_APPENDER_REGISTRY;
4879
4972
  exports.ZkLoginSigner = ZkLoginSigner;
4973
+ exports.activeCapForLevel = activeCapForLevel;
4880
4974
  exports.addSendToTx = addSendToTx;
4881
4975
  exports.addSwapToTx = addSwapToTx;
4882
4976
  exports.agentResolveUrl = agentResolveUrl;
@@ -4923,6 +5017,7 @@ exports.deriveAgentScoreId = deriveAgentScoreId;
4923
5017
  exports.deriveAllowedAddressesFromPtb = deriveAllowedAddressesFromPtb;
4924
5018
  exports.deserializeCetusRoute = deserializeCetusRoute;
4925
5019
  exports.displayHandle = displayHandle;
5020
+ exports.effectiveSellerLevel = effectiveSellerLevel;
4926
5021
  exports.endpointIssueLines = endpointIssueLines;
4927
5022
  exports.ensureCategory = ensureCategory;
4928
5023
  exports.executeTx = executeTx;
@@ -4973,6 +5068,7 @@ exports.looksLikeSuiNs = looksLikeSuiNs;
4973
5068
  exports.mapMoveAbortCode = mapMoveAbortCode;
4974
5069
  exports.mapWalletError = mapWalletError;
4975
5070
  exports.meetsClaimPolicy = meetsClaimPolicy;
5071
+ exports.meetsMinSellerLevel = meetsMinSellerLevel;
4976
5072
  exports.mistToSui = mistToSui;
4977
5073
  exports.normalizeAddressInput = normalizeAddressInput;
4978
5074
  exports.normalizeAsset = normalizeAsset;
@@ -4986,6 +5082,7 @@ exports.parseSuiRpcTx = parseSuiRpcTx;
4986
5082
  exports.payWithX402 = payWithX402;
4987
5083
  exports.planPackage = planPackage;
4988
5084
  exports.postOpenJob = postOpenJob;
5085
+ exports.preflightClaimOpening = preflightClaimOpening;
4989
5086
  exports.preflightCreateJob = preflightCreateJob;
4990
5087
  exports.preflightCreateOpening = preflightCreateOpening;
4991
5088
  exports.preflightFail = preflightFail;
@@ -5018,6 +5115,8 @@ exports.saveBech32 = saveBech32;
5018
5115
  exports.saveKey = saveKey;
5019
5116
  exports.selectAndSplitCoin = selectAndSplitCoin;
5020
5117
  exports.selectSuiCoin = selectSuiCoin;
5118
+ exports.sellerLevel = sellerLevel;
5119
+ exports.sellerLevelLabel = sellerLevelLabel;
5021
5120
  exports.serializeCetusRoute = serializeCetusRoute;
5022
5121
  exports.serviceChallengeMessage = serviceChallengeMessage;
5023
5122
  exports.servicePayloadSha256 = servicePayloadSha256;
package/dist/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { EventEmitter } from 'eventemitter3';
2
2
  import { SuiGrpcClient } from '@mysten/sui/grpc';
3
3
  import { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519';
4
- import { a8 as T2000Error, bm as T2000Options, af as TransactionSigner, S as PayOptions, bn as X402Probe, T as PayResult, bo as SerializedCetusRoute, bp as SwapResult, bq as SwapQuoteResult, a0 as SendResult, B as BalanceResponse, ae as TransactionRecord, j as DepositInfo, br as PaymentRequest, ap as ZkLoginProof, bs as SuiCoreClient, F as OverlayFeeConfig, bt as SponsoredCoinMergeCache, a6 as SupportedAsset, a7 as SwapRouteResult, bu as SendableAsset } from './commerce-gDWVYXP8.cjs';
5
- export { A as A2A_ESCROW_FEE_CONFIG_ID, bv as A2A_ESCROW_LATEST_PACKAGE_ID, bw as A2A_ESCROW_OPENING_PACKAGE_ID, a as A2A_ESCROW_PACKAGE_ID, bx as A2A_ESCROW_PACKAGE_V2_ID, by as A2A_ESCROW_PACKAGE_V3_ID, bz as A2A_ESCROW_PACKAGE_V6_ID, bA as A2A_ESCROW_PACKAGE_V7_ID, bB as A2A_ESCROW_PACKAGE_V8_ID, bC as A2A_SCORE_BOARD_ID, b as ActivityReportConfig, c as AgentScore, bD as ApiRouteListing, bE as CETUS_USDC_SUI_POOL, C as CLOCK_ID, d as COIN_REGISTRY, e as ClassifyBalanceChange, f as ClassifyResult, g as CoinMeta, bF as CoinPage, D as DEFAULT_ACTIVITY_REPORT_URL, h as DEFAULT_COMMERCE_API_BASE, bG as DEFAULT_GRPC_URL, i as DEFAULT_NETWORK, E as ETH_TYPE, k as ExtractedTransfer, bH as GASLESS_MIN_STABLE_AMOUNT, bI as GASLESS_STABLE_TYPES, G as GAS_RESERVE_MIN, I as IKA_TYPE, J as JOB_STATES, l as Job, m as JobState, n as JobTerms, o as JobVerification, K as KNOWN_TARGETS, p as KeypairSigner, L as LABEL_PATTERNS, q as LOFI_TYPE, bJ as MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID, bK as MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID, bL as MAINNET_A2A_ESCROW_PACKAGE_ID, bM as MAINNET_A2A_SCORE_BOARD_ID, M as MANIFEST_TYPE, r as MAX_DELIVER_HORIZON_MS, s as MAX_JOB_USDC, bN as MAX_OPEN_WINDOW_MS, t as MAX_REVIEW_WINDOW_MS, u as MIN_JOB_USDC, v as MIST_PER_SUI, N as NAVX_TYPE, O as OPENING_CLAIM_POLICIES, w as OPENING_CLAIM_POLICY_ANY_ACTIVE, x as OPENING_CLAIM_POLICY_PROVEN, y as OPENING_CLAIM_POLICY_PROVEN_4STAR, bO as OPERATION_ASSETS, z as OVERLAY_FEE_RATE, bP as Opening, bQ as OpeningTerms, bR as Operation, P as PREFLIGHT_MAX_AMOUNT, H as PREFLIGHT_OK, Q as PROVEN_MIN_AVG_STARS_X10, R as PROVEN_MIN_REVIEWS, U as PreflightResult, V as REVIEW_MAX_STARS, W as REVIEW_MIN_STARS, bS as SENDABLE_ASSETS, X as STABLE_ASSETS, Y as SUI_DECIMALS, Z as SUI_TYPE, _ as SUPPORTED_ASSETS, bT as SelectAndSplitResult, $ as SendAssetClass, bU as SerializedCetusRoutePath, bV as SerializedRouterDataV3, a1 as ServiceListing, bW as ServicesRail, bX as ServicesRow, a2 as SimulationResult, a3 as StableAsset, a4 as SuiHolding, a5 as SuiRpcTxBlock, a9 as T2000ErrorCode, aa as T2000ErrorData, ab as T2000_OVERLAY_FEE_WALLET, ac as TOKEN_MAP, ad as TransactionLeg, ag as TxDirection, ah as USDC_DECIMALS, ai as USDC_TYPE, aj as USDE_TYPE, ak as USDSUI_TYPE, al as USDT_TYPE, am as WAL_TYPE, an as WBTC_TYPE, ao as X402ActivityPayload, aq as ZkLoginSigner, bY as addSendToTx, bZ as addSwapToTx, b_ as assertAllowedAsset, b$ as assertBuyerRequirements, c0 as buildCancelOpeningTx, c1 as buildClaimOpeningTx, c2 as buildCreateEmptyScoreTx, ar as buildCreateJobTx, c3 as buildCreateOpeningTx, c4 as buildDeclineJobTx, as as buildDeliverJobTx, at as buildRefundJobTx, c5 as buildRefundUnclaimedTx, au as buildRejectJobTx, av as buildReleaseJobTx, aw as buildSendTx, c6 as buildSubmitFirstReviewTx, c7 as buildSubmitReviewTx, ax as buildSwapTx, ay as checkPositiveAmount, az as checkSuiAddress, aA as claimPolicyLabel, aB as claimPolicyRequirement, aC as classifyAction, aD as classifyLabel, aE as classifySendAsset, aF as classifyTransaction, aG as deriveAgentScoreId, c8 as deserializeCetusRoute, aH as executeTx, aI as extractAllUserLegs, aJ as extractTransferDetails, aK as extractTxCommands, aL as extractTxSender, aM as fallbackLabel, c9 as fetchAllCoins, aN as fetchService, aO as findSwapRoute, aP as formatAssetAmount, aQ as formatSui, aR as formatUsd, aS as getAgentScore, ca as getCoinMeta, aT as getDecimals, aU as getDecimalsForCoinType, aV as getJob, aW as getJobSpec, cb as getOpening, cc as getSuiClient, cd as getSuiGrpcClient, aX as invalidSendAssetMessage, ce as isAllowedAsset, cf as isCetusRouteFresh, cg as isInRegistry, aY as jobActionsFor, aZ as listServices, a_ as mapMoveAbortCode, a$ as mapWalletError, b0 as meetsClaimPolicy, b1 as mistToSui, ch as normalizeAsset, ci as normalizeCoinType, b2 as parseSuiRpcTx, b3 as payWithX402, b4 as preflightCreateJob, cj as preflightCreateOpening, b5 as preflightFail, b6 as preflightPay, b7 as preflightSend, b8 as preflightSwap, ck as probeX402, b9 as putJobSpec, cl as queryHistory, cm as queryTransaction, ba as rawToStable, bb as rawToUsdc, bc as refineLendingLabel, bd as reportX402Activity, be as resolveSymbol, bf as resolveTokenType, cn as selectAndSplitCoin, co as selectSuiCoin, cp as serializeCetusRoute, cq as simulateTransaction, bg as stableToRaw, bh as suiToMist, cr as throwIfSimulationFailed, bi as truncateAddress, bj as usdcToRaw, bk as validateAddress, cs as verifyCetusRouteCoinMatch, bl as verifyJobForSeller } from './commerce-gDWVYXP8.cjs';
4
+ import { ad as T2000Error, bx as T2000Options, ak as TransactionSigner, V as PayOptions, by as X402Probe, W as PayResult, bz as SerializedCetusRoute, bA as SwapResult, bB as SwapQuoteResult, a5 as SendResult, B as BalanceResponse, aj as TransactionRecord, j as DepositInfo, bC as PaymentRequest, au as ZkLoginProof, bD as SuiCoreClient, Q as OverlayFeeConfig, bE as SponsoredCoinMergeCache, ab as SupportedAsset, ac as SwapRouteResult, bF as SendableAsset } from './commerce-D14qzqAV.cjs';
5
+ export { A as A2A_ESCROW_FEE_CONFIG_ID, bG as A2A_ESCROW_LATEST_PACKAGE_ID, bH as A2A_ESCROW_OPENING_PACKAGE_ID, a as A2A_ESCROW_PACKAGE_ID, bI as A2A_ESCROW_PACKAGE_V10_ID, bJ as A2A_ESCROW_PACKAGE_V2_ID, bK as A2A_ESCROW_PACKAGE_V3_ID, bL as A2A_ESCROW_PACKAGE_V6_ID, bM as A2A_ESCROW_PACKAGE_V7_ID, bN as A2A_ESCROW_PACKAGE_V8_ID, bO as A2A_SCORE_BOARD_ID, b as ActivityReportConfig, c as AgentScore, bP as ApiRouteListing, bQ as CETUS_USDC_SUI_POOL, C as CLOCK_ID, d as COIN_REGISTRY, e as ClassifyBalanceChange, f as ClassifyResult, g as CoinMeta, bR as CoinPage, D as DEFAULT_ACTIVITY_REPORT_URL, h as DEFAULT_COMMERCE_API_BASE, bS as DEFAULT_GRPC_URL, i as DEFAULT_NETWORK, E as ETH_TYPE, k as ExtractedTransfer, bT as GASLESS_MIN_STABLE_AMOUNT, bU as GASLESS_STABLE_TYPES, G as GAS_RESERVE_MIN, I as IKA_TYPE, J as JOB_STATES, l as Job, m as JobState, n as JobTerms, o as JobVerification, K as KNOWN_TARGETS, p as KeypairSigner, L as LABEL_PATTERNS, q as LEVEL4_MAX_NO_DELIVERY, r as LEVEL4_MIN_REVIEWS, s as LOFI_TYPE, bV as MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID, bW as MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID, bX as MAINNET_A2A_ESCROW_PACKAGE_ID, bY as MAINNET_A2A_SCORE_BOARD_ID, M as MANIFEST_TYPE, t as MAX_DELIVER_HORIZON_MS, u as MAX_JOB_USDC, bZ as MAX_OPEN_WINDOW_MS, v as MAX_REVIEW_WINDOW_MS, w as MIN_JOB_USDC, x as MIST_PER_SUI, N as NAVX_TYPE, y as NO_DELIVERY_REGRESSION_FLOOR, O as OPENING_CLAIM_POLICIES, z as OPENING_CLAIM_POLICY_ANY_ACTIVE, F as OPENING_CLAIM_POLICY_PROVEN, H as OPENING_CLAIM_POLICY_PROVEN_4STAR, b_ as OPERATION_ASSETS, P as OVERLAY_FEE_RATE, b$ as Opening, c0 as OpeningTerms, c1 as Operation, R as PREFLIGHT_MAX_AMOUNT, S as PREFLIGHT_OK, T as PROVEN_MIN_AVG_STARS_X10, U as PROVEN_MIN_REVIEWS, X as PreflightResult, Y as REVIEW_MAX_STARS, Z as REVIEW_MIN_STARS, _ as SELLER_LEVEL_ACTIVE_CAPS, c2 as SENDABLE_ASSETS, $ as STABLE_ASSETS, a0 as SUI_DECIMALS, a1 as SUI_TYPE, a2 as SUPPORTED_ASSETS, c3 as SelectAndSplitResult, a3 as SellerLevel, a4 as SendAssetClass, c4 as SerializedCetusRoutePath, c5 as SerializedRouterDataV3, a6 as ServiceListing, c6 as ServicesRail, c7 as ServicesRow, a7 as SimulationResult, a8 as StableAsset, a9 as SuiHolding, aa as SuiRpcTxBlock, ae as T2000ErrorCode, af as T2000ErrorData, ag as T2000_OVERLAY_FEE_WALLET, ah as TOKEN_MAP, ai as TransactionLeg, al as TxDirection, am as USDC_DECIMALS, an as USDC_TYPE, ao as USDE_TYPE, ap as USDSUI_TYPE, aq as USDT_TYPE, ar as WAL_TYPE, as as WBTC_TYPE, at as X402ActivityPayload, av as ZkLoginSigner, aw as activeCapForLevel, c8 as addSendToTx, c9 as addSwapToTx, ca as assertAllowedAsset, cb as assertBuyerRequirements, cc as buildCancelOpeningTx, cd as buildClaimOpeningTx, ce as buildCreateEmptyScoreTx, ax as buildCreateJobTx, cf as buildCreateOpeningTx, cg as buildDeclineJobTx, ay as buildDeliverJobTx, az as buildRefundJobTx, ch as buildRefundUnclaimedTx, aA as buildRejectJobTx, aB as buildReleaseJobTx, aC as buildSendTx, ci as buildSubmitFirstReviewTx, cj as buildSubmitReviewTx, aD as buildSwapTx, aE as checkPositiveAmount, aF as checkSuiAddress, aG as claimPolicyLabel, aH as claimPolicyRequirement, aI as classifyAction, aJ as classifyLabel, aK as classifySendAsset, aL as classifyTransaction, aM as deriveAgentScoreId, ck as deserializeCetusRoute, aN as effectiveSellerLevel, aO as executeTx, aP as extractAllUserLegs, aQ as extractTransferDetails, aR as extractTxCommands, aS as extractTxSender, aT as fallbackLabel, cl as fetchAllCoins, aU as fetchService, aV as findSwapRoute, aW as formatAssetAmount, aX as formatSui, aY as formatUsd, aZ as getAgentScore, cm as getCoinMeta, a_ as getDecimals, a$ as getDecimalsForCoinType, b0 as getJob, b1 as getJobSpec, cn as getOpening, co as getSuiClient, cp as getSuiGrpcClient, b2 as invalidSendAssetMessage, cq as isAllowedAsset, cr as isCetusRouteFresh, cs as isInRegistry, b3 as jobActionsFor, b4 as listServices, b5 as mapMoveAbortCode, b6 as mapWalletError, b7 as meetsClaimPolicy, b8 as meetsMinSellerLevel, b9 as mistToSui, ct as normalizeAsset, cu as normalizeCoinType, ba as parseSuiRpcTx, bb as payWithX402, bc as preflightClaimOpening, bd as preflightCreateJob, cv as preflightCreateOpening, be as preflightFail, bf as preflightPay, bg as preflightSend, bh as preflightSwap, cw as probeX402, bi as putJobSpec, cx as queryHistory, cy as queryTransaction, bj as rawToStable, bk as rawToUsdc, bl as refineLendingLabel, bm as reportX402Activity, bn as resolveSymbol, bo as resolveTokenType, cz as selectAndSplitCoin, cA as selectSuiCoin, bp as sellerLevel, bq as sellerLevelLabel, cB as serializeCetusRoute, cC as simulateTransaction, br as stableToRaw, bs as suiToMist, cD as throwIfSimulationFailed, bt as truncateAddress, bu as usdcToRaw, bv as validateAddress, cE as verifyCetusRouteCoinMatch, bw as verifyJobForSeller } from './commerce-D14qzqAV.cjs';
6
6
  import { TransactionObjectArgument, Transaction } from '@mysten/sui/transactions';
7
7
  import { SuinsClient } from '@mysten/suins';
8
8
  import '@mysten/sui/client';
@@ -552,6 +552,9 @@ interface OpenJobRow {
552
552
  * (render with `claimPolicyLabel`, never the raw number). Absent on
553
553
  * pre-S.1054 rows = 0. */
554
554
  claimPolicy?: number;
555
+ /** S.1192 — minimum EFFECTIVE seller level to claim (render with
556
+ * `sellerLevelLabel`). Absent on pre-S.1192 rows = 0 (no floor). */
557
+ minSellerLevel?: number;
555
558
  createdAtMs: number;
556
559
  updatedAtMs: number;
557
560
  }
@@ -595,6 +598,9 @@ declare function postOpenJob(base: string, signer: TransactionSigner, input: {
595
598
  openHours?: number;
596
599
  /** S.1054 — 0 Anyone (default), 1 Proven, 2 Proven · 4★+. */
597
600
  claimPolicy?: number;
601
+ /** S.1192 — minimum EFFECTIVE seller level to claim: 0 none
602
+ * (default), 1..4. Independent of claimPolicy. */
603
+ minSellerLevel?: number;
598
604
  }): Promise<string>;
599
605
  /** Review a settled job you bought — RELEASED or REJECTED (S.1064),
600
606
  * always with a real delivery — writes the STARS ON-CHAIN (S.1054: