@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.
- package/dist/browser.cjs +370 -8
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +356 -9
- package/dist/{commerce-D14qzqAV.d.cts → commerce-3ztE5Gg3.d.cts} +178 -8
- package/dist/{commerce-D14qzqAV.d.ts → commerce-3ztE5Gg3.d.ts} +178 -8
- package/dist/index.cjs +322 -1
- package/dist/index.d.cts +43 -4
- package/dist/index.d.ts +43 -4
- package/dist/index.js +302 -2
- package/package.json +2 -2
package/dist/index.d.ts
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 {
|
|
5
|
-
export { A as A2A_ESCROW_FEE_CONFIG_ID,
|
|
4
|
+
import { al as T2000Error, bO as T2000Options, as as TransactionSigner, a0 as PayOptions, bP as X402Probe, a1 as PayResult, bQ as SerializedCetusRoute, bR as SwapResult, bS as SwapQuoteResult, ad as SendResult, f as BalanceResponse, ar as TransactionRecord, o as DepositInfo, bT as PaymentRequest, aC as ZkLoginProof, bU as SuiCoreClient, X as OverlayFeeConfig, bV as SponsoredCoinMergeCache, aj as SupportedAsset, ak as SwapRouteResult, bW as SendableAsset } from './commerce-3ztE5Gg3.js';
|
|
5
|
+
export { A as A2A_ESCROW_FEE_CONFIG_ID, bX as A2A_ESCROW_LATEST_PACKAGE_ID, bY as A2A_ESCROW_OPENING_PACKAGE_ID, a as A2A_ESCROW_PACKAGE_ID, bZ as A2A_ESCROW_PACKAGE_V10_ID, b_ as A2A_ESCROW_PACKAGE_V11_ID, b$ as A2A_ESCROW_PACKAGE_V12_ID, c0 as A2A_ESCROW_PACKAGE_V2_ID, c1 as A2A_ESCROW_PACKAGE_V3_ID, c2 as A2A_ESCROW_PACKAGE_V6_ID, c3 as A2A_ESCROW_PACKAGE_V7_ID, c4 as A2A_ESCROW_PACKAGE_V8_ID, c5 as A2A_SCORE_BOARD_ID, b as ActivityReportConfig, c as AgentScore, c6 as ApiRouteListing, B as BATCH_ABORT_CODES, d as BATCH_OPENING_TYPE_MARKER, e as BATCH_ORIGIN_KEY_TYPE_SUFFIX, g as BatchOpening, h as BatchOpeningTerms, c7 as CETUS_USDC_SUI_POOL, C as CLOCK_ID, i as COIN_REGISTRY, j as ClassifyBalanceChange, k as ClassifyResult, l as CoinMeta, c8 as CoinPage, D as DEFAULT_ACTIVITY_REPORT_URL, m as DEFAULT_COMMERCE_API_BASE, c9 as DEFAULT_GRPC_URL, n as DEFAULT_NETWORK, E as ESCROW_ABORT_CODES, p as ETH_TYPE, q as ExtractedTransfer, ca as GASLESS_MIN_STABLE_AMOUNT, cb as GASLESS_STABLE_TYPES, G as GAS_RESERVE_MIN, I as IKA_TYPE, J as JOB_STATES, r as Job, s as JobState, t as JobTerms, u as JobVerification, K as KNOWN_TARGETS, v as KeypairSigner, L as LABEL_PATTERNS, w as LEVEL4_MAX_NO_DELIVERY, x as LEVEL4_MIN_REVIEWS, y as LOFI_TYPE, cc as MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID, cd as MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID, ce as MAINNET_A2A_ESCROW_PACKAGE_ID, cf as MAINNET_A2A_SCORE_BOARD_ID, M as MANIFEST_TYPE, z as MAX_BATCH_SLOTS_DEFAULT, F as MAX_DELIVER_HORIZON_MS, H as MAX_JOB_USDC, cg as MAX_OPEN_WINDOW_MS, N as MAX_REVIEW_WINDOW_MS, O as MIN_JOB_USDC, P as MIST_PER_SUI, Q as NAVX_TYPE, R as NO_DELIVERY_REGRESSION_FLOOR, S as OPENING_CLAIM_POLICIES, T as OPENING_CLAIM_POLICY_ANY_ACTIVE, U as OPENING_CLAIM_POLICY_PROVEN, V as OPENING_CLAIM_POLICY_PROVEN_4STAR, ch as OPERATION_ASSETS, W as OVERLAY_FEE_RATE, ci as Opening, cj as OpeningTerms, ck as Operation, Y as PREFLIGHT_MAX_AMOUNT, Z as PREFLIGHT_OK, _ as PROVEN_MIN_AVG_STARS_X10, $ as PROVEN_MIN_REVIEWS, a2 as PreflightResult, a3 as REPUTATION_ABORT_CODES, a4 as REVIEW_MAX_STARS, a5 as REVIEW_MIN_STARS, a6 as SELLER_LEVEL_ACTIVE_CAPS, cl as SENDABLE_ASSETS, a7 as STABLE_ASSETS, a8 as SUI_DECIMALS, a9 as SUI_TYPE, aa as SUPPORTED_ASSETS, cm as SelectAndSplitResult, ab as SellerLevel, ac as SendAssetClass, cn as SerializedCetusRoutePath, co as SerializedRouterDataV3, ae as ServiceListing, cp as ServicesRail, cq as ServicesRow, af as SimulationResult, ag as StableAsset, ah as SuiHolding, ai as SuiRpcTxBlock, am as T2000ErrorCode, an as T2000ErrorData, ao as T2000_OVERLAY_FEE_WALLET, ap as TOKEN_MAP, aq as TransactionLeg, at as TxDirection, au as USDC_DECIMALS, av as USDC_TYPE, aw as USDE_TYPE, ax as USDSUI_TYPE, ay as USDT_TYPE, az as WAL_TYPE, aA as WBTC_TYPE, aB as X402ActivityPayload, aD as ZkLoginSigner, aE as activeCapForLevel, cr as addSendToTx, cs as addSwapToTx, ct as assertAllowedAsset, cu as assertBuyerRequirements, aF as buildBatchClaimTx, aG as buildCancelBatchOpeningTx, cv as buildCancelOpeningTx, cw as buildClaimOpeningTx, aH as buildCreateBatchOpeningTx, cx as buildCreateEmptyScoreTx, aI as buildCreateJobTx, cy as buildCreateOpeningTx, cz as buildDeclineJobTx, aJ as buildDeliverJobTx, aK as buildRefundBatchExpiredTx, aL as buildRefundJobTx, cA as buildRefundUnclaimedTx, aM as buildRejectJobTx, aN as buildReleaseJobTx, aO as buildSendTx, cB as buildSubmitFirstReviewTx, cC as buildSubmitReviewTx, aP as buildSwapTx, aQ as checkPositiveAmount, aR as checkSuiAddress, aS as claimPolicyLabel, aT as claimPolicyRequirement, aU as classifyAction, aV as classifyLabel, aW as classifySendAsset, aX as classifyTransaction, aY as deriveAgentScoreId, cD as deserializeCetusRoute, aZ as effectiveSellerLevel, a_ as executeTx, a$ as extractAllUserLegs, b0 as extractTransferDetails, b1 as extractTxCommands, b2 as extractTxSender, b3 as fallbackLabel, cE as fetchAllCoins, b4 as fetchService, b5 as findSwapRoute, b6 as formatAssetAmount, b7 as formatSui, b8 as formatUsd, b9 as getAgentScore, ba as getBatchClaimsByAgent, bb as getBatchOpening, cF as getCoinMeta, bc as getDecimals, bd as getDecimalsForCoinType, be as getJob, bf as getJobBatchOrigin, bg as getJobSpec, cG as getOpening, cH as getSuiClient, cI as getSuiGrpcClient, bh as invalidSendAssetMessage, cJ as isAllowedAsset, cK as isCetusRouteFresh, cL as isInRegistry, bi as jobActionsFor, bj as listServices, bk as mapMoveAbortCode, bl as mapWalletError, bm as meetsClaimPolicy, bn as meetsMinSellerLevel, bo as mistToSui, cM as normalizeAsset, cN as normalizeCoinType, bp as parseSuiRpcTx, bq as payWithX402, br as preflightBatchClaim, bs as preflightClaimOpening, bt as preflightCreateBatchOpening, bu as preflightCreateJob, cO as preflightCreateOpening, bv as preflightFail, bw as preflightPay, bx as preflightSend, by as preflightSwap, cP as probeX402, bz as putJobSpec, cQ as queryHistory, cR as queryTransaction, bA as rawToStable, bB as rawToUsdc, bC as refineLendingLabel, bD as reportX402Activity, bE as resolveSymbol, bF as resolveTokenType, cS as selectAndSplitCoin, cT as selectSuiCoin, bG as sellerLevel, bH as sellerLevelLabel, cU as serializeCetusRoute, cV as simulateTransaction, bI as stableToRaw, bJ as suiToMist, cW as throwIfSimulationFailed, bK as truncateAddress, bL as usdcToRaw, bM as validateAddress, cX as verifyCetusRouteCoinMatch, bN as verifyJobForSeller } from './commerce-3ztE5Gg3.js';
|
|
6
6
|
import { TransactionObjectArgument, Transaction } from '@mysten/sui/transactions';
|
|
7
7
|
import { SuinsClient } from '@mysten/suins';
|
|
8
8
|
import '@mysten/sui/client';
|
|
@@ -535,7 +535,9 @@ interface OpenJobRow {
|
|
|
535
535
|
briefPreview?: string | null;
|
|
536
536
|
maxUsdc: number;
|
|
537
537
|
slaMinutes: number;
|
|
538
|
-
|
|
538
|
+
/** S.1193 adds `filled` — a batch row whose every slot is claimed
|
|
539
|
+
* (terminal; the escrow moved onto the slot Jobs, never refunded). */
|
|
540
|
+
status: 'open' | 'claimed' | 'cancelled' | 'refunded' | 'expired' | 'filled';
|
|
539
541
|
openUntilMs: number;
|
|
540
542
|
seller: string | null;
|
|
541
543
|
sellerAgent: {
|
|
@@ -555,6 +557,16 @@ interface OpenJobRow {
|
|
|
555
557
|
/** S.1192 — minimum EFFECTIVE seller level to claim (render with
|
|
556
558
|
* `sellerLevelLabel`). Absent on pre-S.1192 rows = 0 (no floor). */
|
|
557
559
|
minSellerLevel?: number;
|
|
560
|
+
/** S.1193 — row kind: absent or "single" = one Opening; "batch" = a
|
|
561
|
+
* wave (ONE row for the whole batch — never N duplicate rows). */
|
|
562
|
+
kind?: 'single' | 'batch';
|
|
563
|
+
/** S.1193 — wave size (batch rows only). */
|
|
564
|
+
slotsTotal?: number;
|
|
565
|
+
/** S.1193 — unclaimed slots left (batch rows only; a batch row is
|
|
566
|
+
* claimable while status is open AND slotsRemaining > 0). */
|
|
567
|
+
slotsRemaining?: number;
|
|
568
|
+
/** S.1193 — slots one agent may claim of this wave (batch rows only). */
|
|
569
|
+
maxClaimsPerAgent?: number;
|
|
558
570
|
createdAtMs: number;
|
|
559
571
|
updatedAtMs: number;
|
|
560
572
|
}
|
|
@@ -626,6 +638,33 @@ declare function cancelOpenJob(base: string, signer: TransactionSigner, openingI
|
|
|
626
638
|
/** Permissionless refund crank for an opening past `open_until` — funds can
|
|
627
639
|
* only ever go back to the buyer. */
|
|
628
640
|
declare function refundOpenJob(base: string, signer: TransactionSigner, openingId: string): Promise<string>;
|
|
641
|
+
/** S.1193 — post a WAVE: N homogeneous slots, one tx, one escrow of
|
|
642
|
+
* `slots × maxUsdc`. Each claimed slot becomes a normal Job. `maxUsdc`
|
|
643
|
+
* is PER SLOT (the live job bounds apply per slot); the wave total is
|
|
644
|
+
* bounded by your wallet, not the protocol. */
|
|
645
|
+
declare function postBatchOpenJob(base: string, signer: TransactionSigner, input: {
|
|
646
|
+
title: string;
|
|
647
|
+
brief: string;
|
|
648
|
+
/** PER-SLOT budget in USDC. */
|
|
649
|
+
maxUsdc: number;
|
|
650
|
+
/** Slots in the wave (1..live max, default max 250). */
|
|
651
|
+
slots: number;
|
|
652
|
+
slaMinutes?: number;
|
|
653
|
+
openHours?: number;
|
|
654
|
+
claimPolicy?: number;
|
|
655
|
+
minSellerLevel?: number;
|
|
656
|
+
/** Slots one agent may claim of this wave (default 1). */
|
|
657
|
+
maxClaimsPerAgent?: number;
|
|
658
|
+
}): Promise<string>;
|
|
659
|
+
/** S.1193 — claim ONE slot of a wave (v1 lock: one claim per tx; a
|
|
660
|
+
* `maxClaimsPerAgent > 1` wave means calling this again). Same $0 FCFS
|
|
661
|
+
* and the same Phase C gates as a single claim. */
|
|
662
|
+
declare function claimBatchOpenJob(base: string, signer: TransactionSigner, batchId: string): Promise<string>;
|
|
663
|
+
/** S.1193 — withdraw a wave's UNCLAIMED remainder — fee-free, any time.
|
|
664
|
+
* Already-claimed slots are normal Jobs and are untouched. */
|
|
665
|
+
declare function cancelBatchOpenJob(base: string, signer: TransactionSigner, batchId: string): Promise<string>;
|
|
666
|
+
/** S.1193 — permissionless remainder refund once the wave expires. */
|
|
667
|
+
declare function refundBatchOpenJob(base: string, signer: TransactionSigner, batchId: string): Promise<string>;
|
|
629
668
|
|
|
630
669
|
interface CommerceClientOptions {
|
|
631
670
|
/** The seller's signer — a keypair (`KeypairSigner`) or zkLogin Passport. */
|
|
@@ -1459,4 +1498,4 @@ declare function fullHandle(label: string, parentName?: string): string;
|
|
|
1459
1498
|
*/
|
|
1460
1499
|
declare function displayHandle(label: string, parentName?: string): string;
|
|
1461
1500
|
|
|
1462
|
-
export { AGENT_CATEGORIES, AUDRIC_PARENT, AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, type AgentCategory, type AgentProfile, type AgentRef, type ApiModel, type AppenderContext, BalanceResponse, type BuildAddLeafParams, type BuildRevokeLeafParams, type ChatMessage, type ChatParams, type ChatResult, type ChatUsage, CommerceClient, type CommerceClientOptions, type ComposeTxOptions, type ComposeTxResult, type CreatePackageInput, type CreatePackageResult, DEFAULT_API_BASE, type DailySpend, DepositInfo, ESCROW_JOB_TYPE_MARKER, type EndpointIssue, type EndpointListing, type EndpointRoute, InvalidAddressError, type LabelValidationResult, type LimitAssertInput, LimitEnforcer, LimitExceededError, type LimitKind, type LimitOperation, type LimitsConfig, type LimitsFile, MAX_SLUG_LENGTH, MAX_TIER_BASE_LENGTH, type NormalizedAddress, OPENING_TYPE_MARKER, type OpenJobFilter, type OpenJobRow, type OpenJobsPage, OverlayFeeConfig, type PackageTierInput, PayOptions, PayResult, PaymentRequest, type ProfileUpdateInput, type RegisterResult, SERVICE_SLUG_RE, SERVICE_TIERS, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SendResult, type SendTransferInput, SendableAsset, SerializedCetusRoute, type ServiceTier, type ServiceUpsertInput, type ServiceWriteResult, type SponsoredTxGuard, type StepPreview, SuinsNotRegisteredError, type SuinsParent, SuinsRpcError, SupportedAsset, type SwapExecuteInput, SwapQuoteResult, SwapResult, SwapRouteResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, WRITE_APPENDER_REGISTRY, type WriteStep, type WriteToolName, X402Probe, ZkLoginProof, agentResolveUrl, approxUsdValue, assertLimitConfig, buildAddLeafTx, buildRevokeLeafTx, cancelOpenJob, canonicalizeRecipientInput, chatCompletion, chatCompletionStream, claimOpenJob, clearLimits, composeTx, createPackage, customHireEnvelope, dailySpentToday, deriveAllowedAddressesFromPtb, displayHandle, endpointIssueLines, ensureCategory, exportPrivateKey, fetchChallengeNonce, fullHandle, generateKeypair, getAddress, getAgentProfile, getLimits, getOpenJob, getSponsoredSwapProviders, getSwapQuote, hasLimits, isCustomHireEnvelope, keypairFromPrivateKey, listEndpoint, listModels, listOpenJobs, loadKey, looksLikeSuiNs, normalizeAddressInput, packageBaseFromName, packageBaseSlug, packageTierSlugs, parseAgentCategory, parseServiceTierSlug, planPackage, postOpenJob, profileChallengeMessage, queryBalance, readLimitsFile, recordDailySpend, refundOpenJob, registerAgent, removeEndpoint, resolveAddressToSuinsViaRpc, resolveAgentRef, resolveCreatedObjectId, resolveSuinsViaRpc, retireService, saveBech32, saveKey, serviceChallengeMessage, servicePayloadSha256, serviceUpsertPayload, setLimits, setSponsoredTxGuard, signChallenge, slugify, slugifyLoner, slugifyUnbounded, submitJobReview, trimDashes, updateProfile, upsertService, validateLabel, walletExists, writeLimitsFile };
|
|
1501
|
+
export { AGENT_CATEGORIES, AUDRIC_PARENT, AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, type AgentCategory, type AgentProfile, type AgentRef, type ApiModel, type AppenderContext, BalanceResponse, type BuildAddLeafParams, type BuildRevokeLeafParams, type ChatMessage, type ChatParams, type ChatResult, type ChatUsage, CommerceClient, type CommerceClientOptions, type ComposeTxOptions, type ComposeTxResult, type CreatePackageInput, type CreatePackageResult, DEFAULT_API_BASE, type DailySpend, DepositInfo, ESCROW_JOB_TYPE_MARKER, type EndpointIssue, type EndpointListing, type EndpointRoute, InvalidAddressError, type LabelValidationResult, type LimitAssertInput, LimitEnforcer, LimitExceededError, type LimitKind, type LimitOperation, type LimitsConfig, type LimitsFile, MAX_SLUG_LENGTH, MAX_TIER_BASE_LENGTH, type NormalizedAddress, OPENING_TYPE_MARKER, type OpenJobFilter, type OpenJobRow, type OpenJobsPage, OverlayFeeConfig, type PackageTierInput, PayOptions, PayResult, PaymentRequest, type ProfileUpdateInput, type RegisterResult, SERVICE_SLUG_RE, SERVICE_TIERS, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SendResult, type SendTransferInput, SendableAsset, SerializedCetusRoute, type ServiceTier, type ServiceUpsertInput, type ServiceWriteResult, type SponsoredTxGuard, type StepPreview, SuinsNotRegisteredError, type SuinsParent, SuinsRpcError, SupportedAsset, type SwapExecuteInput, SwapQuoteResult, SwapResult, SwapRouteResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, WRITE_APPENDER_REGISTRY, type WriteStep, type WriteToolName, X402Probe, ZkLoginProof, agentResolveUrl, approxUsdValue, assertLimitConfig, buildAddLeafTx, buildRevokeLeafTx, cancelBatchOpenJob, cancelOpenJob, canonicalizeRecipientInput, chatCompletion, chatCompletionStream, claimBatchOpenJob, claimOpenJob, clearLimits, composeTx, createPackage, customHireEnvelope, dailySpentToday, deriveAllowedAddressesFromPtb, displayHandle, endpointIssueLines, ensureCategory, exportPrivateKey, fetchChallengeNonce, fullHandle, generateKeypair, getAddress, getAgentProfile, getLimits, getOpenJob, getSponsoredSwapProviders, getSwapQuote, hasLimits, isCustomHireEnvelope, keypairFromPrivateKey, listEndpoint, listModels, listOpenJobs, loadKey, looksLikeSuiNs, normalizeAddressInput, packageBaseFromName, packageBaseSlug, packageTierSlugs, parseAgentCategory, parseServiceTierSlug, planPackage, postBatchOpenJob, postOpenJob, profileChallengeMessage, queryBalance, readLimitsFile, recordDailySpend, refundBatchOpenJob, refundOpenJob, registerAgent, removeEndpoint, resolveAddressToSuinsViaRpc, resolveAgentRef, resolveCreatedObjectId, resolveSuinsViaRpc, retireService, saveBech32, saveKey, serviceChallengeMessage, servicePayloadSha256, serviceUpsertPayload, setLimits, setSponsoredTxGuard, signChallenge, slugify, slugifyLoner, slugifyUnbounded, submitJobReview, trimDashes, updateProfile, upsertService, validateLabel, walletExists, writeLimitsFile };
|
package/dist/index.js
CHANGED
|
@@ -2999,7 +2999,7 @@ init_coinSelection();
|
|
|
2999
2999
|
init_errors();
|
|
3000
3000
|
init_token_registry();
|
|
3001
3001
|
init_coinSelection();
|
|
3002
|
-
var MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "
|
|
3002
|
+
var MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "0x1f88ca77b1980e3d0750e83d1363c6025cd677c2f420cae51a86d4a0bddf93c5";
|
|
3003
3003
|
var MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID = MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID;
|
|
3004
3004
|
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;
|
|
3005
3005
|
var A2A_ESCROW_OPENING_PACKAGE_ID = A2A_ESCROW_LATEST_PACKAGE_ID;
|
|
@@ -3009,6 +3009,8 @@ var A2A_ESCROW_PACKAGE_V6_ID = "0xb065033b6f72c4899055a0b3afac28f09dc7b0b7b491ea
|
|
|
3009
3009
|
var A2A_ESCROW_PACKAGE_V7_ID = "0x4249f0b242c47c7baf0c37304365bc4bbe769bcedf11f3525e84682d59a3b23e";
|
|
3010
3010
|
var A2A_ESCROW_PACKAGE_V8_ID = "0x1595b80bc05a03607f3908702c866ca63cf961025b4263b5ecbe419e07f8ff31";
|
|
3011
3011
|
var A2A_ESCROW_PACKAGE_V10_ID = process.env.A2A_ESCROW_PACKAGE_V10_ID ?? "0x5c90ec07da01bf885a4e65247ce98b75ab8a042cd965d30d7213856d579c4afa";
|
|
3012
|
+
var A2A_ESCROW_PACKAGE_V11_ID = process.env.A2A_ESCROW_PACKAGE_V11_ID ?? "0x2a928916c859a159e6d6f4841073a31397d01336c1ea689ce74344e456463c8d";
|
|
3013
|
+
var A2A_ESCROW_PACKAGE_V12_ID = process.env.A2A_ESCROW_PACKAGE_V12_ID ?? "0x1f88ca77b1980e3d0750e83d1363c6025cd677c2f420cae51a86d4a0bddf93c5";
|
|
3012
3014
|
var CLOCK_ID2 = "0x6";
|
|
3013
3015
|
var MODULE = "opening";
|
|
3014
3016
|
var SHA256_HEX_RE = /^(0x)?[0-9a-fA-F]{64}$/;
|
|
@@ -3339,6 +3341,29 @@ function buildDeclineJobTx(jobId) {
|
|
|
3339
3341
|
}
|
|
3340
3342
|
function buildRejectJobTx(jobId, v2) {
|
|
3341
3343
|
const tx = new Transaction();
|
|
3344
|
+
if (v2.batchId) {
|
|
3345
|
+
tx.moveCall({
|
|
3346
|
+
target: `${A2A_ESCROW_LATEST_PACKAGE_ID}::batch::${v2.buyerScoreId ? "batch_reject_agent_buyer" : "batch_reject"}`,
|
|
3347
|
+
typeArguments: [USDC_TYPE],
|
|
3348
|
+
arguments: v2.buyerScoreId ? [
|
|
3349
|
+
tx.object(v2.batchId),
|
|
3350
|
+
tx.object(jobId),
|
|
3351
|
+
tx.object(v2.sellerScoreId),
|
|
3352
|
+
tx.object(v2.buyerScoreId),
|
|
3353
|
+
tx.object(v2.registryId),
|
|
3354
|
+
feeConfigArg2(tx),
|
|
3355
|
+
tx.object(CLOCK_ID3)
|
|
3356
|
+
] : [
|
|
3357
|
+
tx.object(v2.batchId),
|
|
3358
|
+
tx.object(jobId),
|
|
3359
|
+
tx.object(v2.sellerScoreId),
|
|
3360
|
+
tx.object(v2.registryId),
|
|
3361
|
+
feeConfigArg2(tx),
|
|
3362
|
+
tx.object(CLOCK_ID3)
|
|
3363
|
+
]
|
|
3364
|
+
});
|
|
3365
|
+
return tx;
|
|
3366
|
+
}
|
|
3342
3367
|
tx.moveCall({
|
|
3343
3368
|
target: `${A2A_ESCROW_LATEST_PACKAGE_ID}::reputation::${v2.buyerScoreId ? "reject_v2_agent_buyer" : "reject_v2"}`,
|
|
3344
3369
|
typeArguments: [USDC_TYPE],
|
|
@@ -3361,6 +3386,20 @@ function buildRejectJobTx(jobId, v2) {
|
|
|
3361
3386
|
}
|
|
3362
3387
|
function buildRefundJobTx(jobId, v2) {
|
|
3363
3388
|
const tx = new Transaction();
|
|
3389
|
+
if (v2.batchId) {
|
|
3390
|
+
tx.moveCall({
|
|
3391
|
+
target: `${A2A_ESCROW_LATEST_PACKAGE_ID}::batch::batch_refund`,
|
|
3392
|
+
typeArguments: [USDC_TYPE],
|
|
3393
|
+
arguments: [
|
|
3394
|
+
tx.object(v2.batchId),
|
|
3395
|
+
tx.object(jobId),
|
|
3396
|
+
tx.object(v2.sellerScoreId),
|
|
3397
|
+
feeConfigArg2(tx),
|
|
3398
|
+
tx.object(CLOCK_ID3)
|
|
3399
|
+
]
|
|
3400
|
+
});
|
|
3401
|
+
return tx;
|
|
3402
|
+
}
|
|
3364
3403
|
tx.moveCall({
|
|
3365
3404
|
target: `${A2A_ESCROW_LATEST_PACKAGE_ID}::reputation::refund_v2`,
|
|
3366
3405
|
typeArguments: [USDC_TYPE],
|
|
@@ -3389,6 +3428,20 @@ function buildDeliverJobTx(jobId, deliveryHash) {
|
|
|
3389
3428
|
}
|
|
3390
3429
|
function buildReleaseJobTx(jobId, v2) {
|
|
3391
3430
|
const tx = new Transaction();
|
|
3431
|
+
if (v2.batchId) {
|
|
3432
|
+
tx.moveCall({
|
|
3433
|
+
target: `${A2A_ESCROW_LATEST_PACKAGE_ID}::batch::batch_release`,
|
|
3434
|
+
typeArguments: [USDC_TYPE],
|
|
3435
|
+
arguments: [
|
|
3436
|
+
tx.object(v2.batchId),
|
|
3437
|
+
tx.object(jobId),
|
|
3438
|
+
tx.object(v2.sellerScoreId),
|
|
3439
|
+
feeConfigArg2(tx),
|
|
3440
|
+
tx.object(CLOCK_ID3)
|
|
3441
|
+
]
|
|
3442
|
+
});
|
|
3443
|
+
return tx;
|
|
3444
|
+
}
|
|
3392
3445
|
tx.moveCall({
|
|
3393
3446
|
target: `${A2A_ESCROW_LATEST_PACKAGE_ID}::reputation::release_v2`,
|
|
3394
3447
|
typeArguments: [USDC_TYPE],
|
|
@@ -3438,6 +3491,26 @@ async function getJob(client, jobId) {
|
|
|
3438
3491
|
createdAtMs: Number(json.created_at_ms)
|
|
3439
3492
|
};
|
|
3440
3493
|
}
|
|
3494
|
+
var BATCH_ORIGIN_KEY_TYPE_SUFFIX = "::escrow::BatchOriginKey";
|
|
3495
|
+
async function getJobBatchOrigin(client, jobId) {
|
|
3496
|
+
let cursor = null;
|
|
3497
|
+
do {
|
|
3498
|
+
const page = await client.core.listDynamicFields({
|
|
3499
|
+
parentId: jobId,
|
|
3500
|
+
cursor: cursor ?? void 0
|
|
3501
|
+
});
|
|
3502
|
+
for (const field of page.dynamicFields) {
|
|
3503
|
+
if (!field.name.type.endsWith(BATCH_ORIGIN_KEY_TYPE_SUFFIX)) continue;
|
|
3504
|
+
const resp = await client.core.getDynamicField({
|
|
3505
|
+
parentId: jobId,
|
|
3506
|
+
name: field.name
|
|
3507
|
+
});
|
|
3508
|
+
return bcs.Address.parse(resp.dynamicField.value.bcs);
|
|
3509
|
+
}
|
|
3510
|
+
cursor = page.hasNextPage ? page.cursor : null;
|
|
3511
|
+
} while (cursor);
|
|
3512
|
+
return null;
|
|
3513
|
+
}
|
|
3441
3514
|
function jobActionsFor(job, caller, nowMs = Date.now()) {
|
|
3442
3515
|
const me = validateAddress(caller);
|
|
3443
3516
|
const isBuyer = me === job.buyer;
|
|
@@ -3477,6 +3550,11 @@ async function verifyJobForSeller({
|
|
|
3477
3550
|
return { ok: problems.length === 0, job, problems };
|
|
3478
3551
|
}
|
|
3479
3552
|
|
|
3553
|
+
// src/wallet/batch.ts
|
|
3554
|
+
init_errors();
|
|
3555
|
+
init_token_registry();
|
|
3556
|
+
init_coinSelection();
|
|
3557
|
+
|
|
3480
3558
|
// src/wallet/reputation.ts
|
|
3481
3559
|
init_errors();
|
|
3482
3560
|
init_token_registry();
|
|
@@ -3690,6 +3768,210 @@ function buildSubmitFirstReviewTx({
|
|
|
3690
3768
|
return tx;
|
|
3691
3769
|
}
|
|
3692
3770
|
|
|
3771
|
+
// src/wallet/batch.ts
|
|
3772
|
+
var MODULE4 = "batch";
|
|
3773
|
+
var CLOCK_ID5 = "0x6";
|
|
3774
|
+
var MAX_BATCH_SLOTS_DEFAULT = 250;
|
|
3775
|
+
var BATCH_OPENING_TYPE_MARKER = "::batch::BatchOpening<";
|
|
3776
|
+
var BATCH_ABORT_CODES = {
|
|
3777
|
+
/** At your wave cap RIGHT NOW — min(buyer ceiling, level cap) active
|
|
3778
|
+
* holds. Settle one to reclaim; never "lifetime". */
|
|
3779
|
+
EMaxClaimsReached: 12,
|
|
3780
|
+
/** Pre-S.1202 wave — lifetime rows never free, so new claims refuse.
|
|
3781
|
+
* The wave's cancel / expired-refund still work. */
|
|
3782
|
+
ELegacyBatch: 22,
|
|
3783
|
+
/** The Job passed to a batch settle door has no BatchOriginKey. */
|
|
3784
|
+
ENotBatchJob: 23,
|
|
3785
|
+
/** The attached wave is not this Job's origin batch. */
|
|
3786
|
+
EWrongBatch: 24,
|
|
3787
|
+
EWrongSellerScore: 25,
|
|
3788
|
+
EWrongBuyerScore: 26,
|
|
3789
|
+
/** Registered Agent-ID buyer must reject via the agent-buyer variant. */
|
|
3790
|
+
EBuyerIsAgent: 27,
|
|
3791
|
+
EBuyerNotAgent: 28
|
|
3792
|
+
};
|
|
3793
|
+
var REPUTATION_ABORT_CODES = {
|
|
3794
|
+
/** A bare v2 door (release_v2 / reject_v2 variants / refund_v2) on a
|
|
3795
|
+
* batch-origin Job — the client must attach the batch and settle via
|
|
3796
|
+
* the batch doors. */
|
|
3797
|
+
EUseBatchSettle: 9
|
|
3798
|
+
};
|
|
3799
|
+
var ESCROW_ABORT_CODES = {
|
|
3800
|
+
/** Stale package flow (FeeConfig VERSION moved) — update @t2000/*. */
|
|
3801
|
+
EWrongVersion: 13,
|
|
3802
|
+
/** Second wave-hold free on one Job (unreachable via the doors). */
|
|
3803
|
+
EBatchHoldReleased: 23
|
|
3804
|
+
};
|
|
3805
|
+
function preflightCreateBatchOpening(terms) {
|
|
3806
|
+
const single = preflightCreateOpening(terms);
|
|
3807
|
+
if (!single.valid) return single;
|
|
3808
|
+
if (!Number.isInteger(terms.slots) || terms.slots < 1 || terms.slots > MAX_BATCH_SLOTS_DEFAULT) {
|
|
3809
|
+
return {
|
|
3810
|
+
valid: false,
|
|
3811
|
+
code: "INVALID_INPUT",
|
|
3812
|
+
error: `slots must be an integer 1\u2013${MAX_BATCH_SLOTS_DEFAULT} (the live max is AdminCap-tunable on-chain).`
|
|
3813
|
+
};
|
|
3814
|
+
}
|
|
3815
|
+
const maxClaims = terms.maxClaimsPerAgent ?? 1;
|
|
3816
|
+
if (!Number.isInteger(maxClaims) || maxClaims < 1 || maxClaims > terms.slots) {
|
|
3817
|
+
return {
|
|
3818
|
+
valid: false,
|
|
3819
|
+
code: "INVALID_INPUT",
|
|
3820
|
+
error: "maxClaimsPerAgent must be an integer \u22651 and \u2264 slots."
|
|
3821
|
+
};
|
|
3822
|
+
}
|
|
3823
|
+
return { valid: true };
|
|
3824
|
+
}
|
|
3825
|
+
async function buildCreateBatchOpeningTx({
|
|
3826
|
+
client,
|
|
3827
|
+
buyer,
|
|
3828
|
+
terms
|
|
3829
|
+
}) {
|
|
3830
|
+
const pf = preflightCreateBatchOpening(terms);
|
|
3831
|
+
if (!pf.valid) throw new T2000Error(pf.code ?? "INVALID_INPUT", pf.error ?? "Invalid batch.");
|
|
3832
|
+
const perSlotRaw = BigInt(Math.floor(terms.amountUsdc * 10 ** USDC_DECIMALS));
|
|
3833
|
+
const totalRaw = perSlotRaw * BigInt(terms.slots);
|
|
3834
|
+
const tx = new Transaction();
|
|
3835
|
+
const { coin } = await selectAndSplitCoin(
|
|
3836
|
+
tx,
|
|
3837
|
+
client,
|
|
3838
|
+
validateAddress(buyer),
|
|
3839
|
+
USDC_TYPE,
|
|
3840
|
+
totalRaw,
|
|
3841
|
+
{ allowSwapAll: false }
|
|
3842
|
+
);
|
|
3843
|
+
tx.moveCall({
|
|
3844
|
+
target: `${A2A_ESCROW_OPENING_PACKAGE_ID}::${MODULE4}::create_batch_open`,
|
|
3845
|
+
typeArguments: [USDC_TYPE],
|
|
3846
|
+
arguments: [
|
|
3847
|
+
coin,
|
|
3848
|
+
tx.pure.u64(terms.slots),
|
|
3849
|
+
tx.pure.vector("u8", hexToBytes3(terms.specHash)),
|
|
3850
|
+
tx.pure.u64(terms.openUntilMs),
|
|
3851
|
+
tx.pure.u64(terms.slaMs),
|
|
3852
|
+
tx.pure.u64(terms.reviewWindowMs),
|
|
3853
|
+
tx.pure.u64(terms.rejectSplitBps),
|
|
3854
|
+
tx.pure.u8(terms.claimPolicy ?? OPENING_CLAIM_POLICY_ANY_ACTIVE),
|
|
3855
|
+
tx.pure.u8(terms.minSellerLevel ?? 0),
|
|
3856
|
+
tx.pure.u8(terms.maxClaimsPerAgent ?? 1),
|
|
3857
|
+
feeConfigArg(tx),
|
|
3858
|
+
tx.object(CLOCK_ID5)
|
|
3859
|
+
]
|
|
3860
|
+
});
|
|
3861
|
+
return tx;
|
|
3862
|
+
}
|
|
3863
|
+
function buildBatchClaimTx({
|
|
3864
|
+
batchId,
|
|
3865
|
+
registryId,
|
|
3866
|
+
scoreId
|
|
3867
|
+
}) {
|
|
3868
|
+
if (!scoreId) {
|
|
3869
|
+
throw new T2000Error(
|
|
3870
|
+
"INVALID_INPUT",
|
|
3871
|
+
"Claiming needs the claimer's own AgentScore id (derive with deriveAgentScoreId; create it first with buildCreateEmptyScoreTx when missing)."
|
|
3872
|
+
);
|
|
3873
|
+
}
|
|
3874
|
+
const tx = new Transaction();
|
|
3875
|
+
tx.moveCall({
|
|
3876
|
+
target: `${A2A_ESCROW_OPENING_PACKAGE_ID}::${MODULE4}::batch_claim`,
|
|
3877
|
+
typeArguments: [USDC_TYPE],
|
|
3878
|
+
arguments: [
|
|
3879
|
+
tx.object(batchId),
|
|
3880
|
+
tx.object(registryId),
|
|
3881
|
+
tx.object(scoreId),
|
|
3882
|
+
feeConfigArg(tx),
|
|
3883
|
+
tx.object(CLOCK_ID5)
|
|
3884
|
+
]
|
|
3885
|
+
});
|
|
3886
|
+
return tx;
|
|
3887
|
+
}
|
|
3888
|
+
function batchCall(batchId, fn) {
|
|
3889
|
+
const tx = new Transaction();
|
|
3890
|
+
tx.moveCall({
|
|
3891
|
+
target: `${A2A_ESCROW_OPENING_PACKAGE_ID}::${MODULE4}::${fn}`,
|
|
3892
|
+
typeArguments: [USDC_TYPE],
|
|
3893
|
+
arguments: [tx.object(batchId), feeConfigArg(tx), tx.object(CLOCK_ID5)]
|
|
3894
|
+
});
|
|
3895
|
+
return tx;
|
|
3896
|
+
}
|
|
3897
|
+
function buildCancelBatchOpeningTx(batchId) {
|
|
3898
|
+
return batchCall(batchId, "cancel_batch_open");
|
|
3899
|
+
}
|
|
3900
|
+
function buildRefundBatchExpiredTx(batchId) {
|
|
3901
|
+
return batchCall(batchId, "refund_batch_expired");
|
|
3902
|
+
}
|
|
3903
|
+
function bytesToHex3(bytes) {
|
|
3904
|
+
return `0x${Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join("")}`;
|
|
3905
|
+
}
|
|
3906
|
+
function hexToBytes3(hex) {
|
|
3907
|
+
const clean = hex.replace(/^0x/, "");
|
|
3908
|
+
const bytes = [];
|
|
3909
|
+
for (let i = 0; i < clean.length; i += 2) {
|
|
3910
|
+
bytes.push(Number.parseInt(clean.slice(i, i + 2), 16));
|
|
3911
|
+
}
|
|
3912
|
+
return bytes;
|
|
3913
|
+
}
|
|
3914
|
+
async function getBatchOpening(client, batchId) {
|
|
3915
|
+
const resp = await client.core.getObject({ objectId: batchId, include: { json: true } }).catch(() => null);
|
|
3916
|
+
const objType = resp?.object?.type ?? "";
|
|
3917
|
+
const json = resp?.object?.json;
|
|
3918
|
+
if (!json || !objType.includes(BATCH_OPENING_TYPE_MARKER)) {
|
|
3919
|
+
return null;
|
|
3920
|
+
}
|
|
3921
|
+
const table = json.claims_by_agent;
|
|
3922
|
+
return {
|
|
3923
|
+
id: batchId,
|
|
3924
|
+
buyer: String(json.buyer),
|
|
3925
|
+
amountUsdc: Number(json.amount) / 10 ** USDC_DECIMALS,
|
|
3926
|
+
slotsTotal: Number(json.slots_total),
|
|
3927
|
+
slotsRemaining: Number(json.slots_remaining),
|
|
3928
|
+
feeBps: Number(json.fee_bps ?? 0),
|
|
3929
|
+
specHash: bytesToHex3(json.spec_hash ?? []),
|
|
3930
|
+
openUntilMs: Number(json.open_until_ms),
|
|
3931
|
+
slaMs: Number(json.sla_ms),
|
|
3932
|
+
reviewWindowMs: Number(json.review_window_ms),
|
|
3933
|
+
rejectSplitBps: Number(json.reject_split_bps),
|
|
3934
|
+
claimPolicy: Number(json.claim_policy ?? 0),
|
|
3935
|
+
minSellerLevel: Number(json.min_seller_level ?? 0),
|
|
3936
|
+
maxClaimsPerAgent: Number(json.max_claims_per_agent ?? 1),
|
|
3937
|
+
claimsTableId: table?.id ? String(table.id) : null,
|
|
3938
|
+
createdAtMs: Number(json.created_at_ms ?? 0)
|
|
3939
|
+
};
|
|
3940
|
+
}
|
|
3941
|
+
async function getBatchClaimsByAgent(client, batch, agent) {
|
|
3942
|
+
if (!batch.claimsTableId) return 0;
|
|
3943
|
+
try {
|
|
3944
|
+
const fieldId = deriveDynamicFieldID(
|
|
3945
|
+
batch.claimsTableId,
|
|
3946
|
+
"address",
|
|
3947
|
+
bcs.Address.serialize(validateAddress(agent)).toBytes()
|
|
3948
|
+
);
|
|
3949
|
+
const resp = await client.core.getObject({
|
|
3950
|
+
objectId: fieldId,
|
|
3951
|
+
include: { json: true }
|
|
3952
|
+
});
|
|
3953
|
+
const json = resp?.object?.json;
|
|
3954
|
+
return Number(json?.value ?? 0);
|
|
3955
|
+
} catch {
|
|
3956
|
+
return 0;
|
|
3957
|
+
}
|
|
3958
|
+
}
|
|
3959
|
+
function preflightBatchClaim(score, batch, myClaims) {
|
|
3960
|
+
if (batch.slotsRemaining <= 0) {
|
|
3961
|
+
return {
|
|
3962
|
+
valid: false,
|
|
3963
|
+
error: "No slots left on this batch \u2014 every slot is claimed. Find open waves on the board."
|
|
3964
|
+
};
|
|
3965
|
+
}
|
|
3966
|
+
if (myClaims >= batch.maxClaimsPerAgent) {
|
|
3967
|
+
return {
|
|
3968
|
+
valid: false,
|
|
3969
|
+
error: `This wave allows ${batch.maxClaimsPerAgent} slot${batch.maxClaimsPerAgent === 1 ? "" : "s"} per agent and this wallet already holds ${myClaims}. Deliver what you claimed; other waves on the board are open.`
|
|
3970
|
+
};
|
|
3971
|
+
}
|
|
3972
|
+
return preflightClaimOpening(score, batch);
|
|
3973
|
+
}
|
|
3974
|
+
|
|
3693
3975
|
// src/commerce.ts
|
|
3694
3976
|
var DEFAULT_COMMERCE_API_BASE = "https://api.t2000.ai/v1";
|
|
3695
3977
|
async function commerceFetchJson(url, init) {
|
|
@@ -3965,6 +4247,24 @@ function refundOpenJob(base, signer, openingId) {
|
|
|
3965
4247
|
openingId: openingId.trim()
|
|
3966
4248
|
});
|
|
3967
4249
|
}
|
|
4250
|
+
function postBatchOpenJob(base, signer, input) {
|
|
4251
|
+
return sponsoredOpeningVerb(base, signer, "batch-open-create", input);
|
|
4252
|
+
}
|
|
4253
|
+
function claimBatchOpenJob(base, signer, batchId) {
|
|
4254
|
+
return sponsoredOpeningVerb(base, signer, "batch-open-claim", {
|
|
4255
|
+
batchId: batchId.trim()
|
|
4256
|
+
});
|
|
4257
|
+
}
|
|
4258
|
+
function cancelBatchOpenJob(base, signer, batchId) {
|
|
4259
|
+
return sponsoredOpeningVerb(base, signer, "batch-open-cancel", {
|
|
4260
|
+
batchId: batchId.trim()
|
|
4261
|
+
});
|
|
4262
|
+
}
|
|
4263
|
+
function refundBatchOpenJob(base, signer, batchId) {
|
|
4264
|
+
return sponsoredOpeningVerb(base, signer, "batch-open-refund", {
|
|
4265
|
+
batchId: batchId.trim()
|
|
4266
|
+
});
|
|
4267
|
+
}
|
|
3968
4268
|
|
|
3969
4269
|
// src/commerce/endpoint.ts
|
|
3970
4270
|
init_errors();
|
|
@@ -4906,4 +5206,4 @@ function displayHandle(label, parentName = AUDRIC_PARENT_NAME) {
|
|
|
4906
5206
|
// src/index.ts
|
|
4907
5207
|
init_preflight();
|
|
4908
5208
|
|
|
4909
|
-
export { A2A_ESCROW_FEE_CONFIG_ID, A2A_ESCROW_LATEST_PACKAGE_ID, A2A_ESCROW_OPENING_PACKAGE_ID, A2A_ESCROW_PACKAGE_ID, A2A_ESCROW_PACKAGE_V10_ID, A2A_ESCROW_PACKAGE_V2_ID, A2A_ESCROW_PACKAGE_V3_ID, A2A_ESCROW_PACKAGE_V6_ID, A2A_ESCROW_PACKAGE_V7_ID, A2A_ESCROW_PACKAGE_V8_ID, A2A_SCORE_BOARD_ID, AGENT_CATEGORIES, AUDRIC_PARENT, AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, CETUS_USDC_SUI_POOL, CLOCK_ID, COIN_REGISTRY, CommerceClient, DEFAULT_ACTIVITY_REPORT_URL, DEFAULT_API_BASE, DEFAULT_COMMERCE_API_BASE, DEFAULT_GRPC_URL, DEFAULT_NETWORK, ESCROW_JOB_TYPE_MARKER, ETH_TYPE, GASLESS_MIN_STABLE_AMOUNT, GASLESS_STABLE_TYPES, GAS_RESERVE_MIN, IKA_TYPE, InvalidAddressError, JOB_STATES, KNOWN_TARGETS, KeypairSigner, LABEL_PATTERNS, LEVEL4_MAX_NO_DELIVERY, LEVEL4_MIN_REVIEWS, LOFI_TYPE, LimitEnforcer, LimitExceededError, MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID, MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID, MAINNET_A2A_ESCROW_PACKAGE_ID, MAINNET_A2A_SCORE_BOARD_ID, MANIFEST_TYPE, MAX_DELIVER_HORIZON_MS, MAX_JOB_USDC, MAX_OPEN_WINDOW_MS, MAX_REVIEW_WINDOW_MS, MAX_SLUG_LENGTH, MAX_TIER_BASE_LENGTH, MIN_JOB_USDC, MIST_PER_SUI, NAVX_TYPE, NO_DELIVERY_REGRESSION_FLOOR, OPENING_CLAIM_POLICIES, OPENING_CLAIM_POLICY_ANY_ACTIVE, OPENING_CLAIM_POLICY_PROVEN, OPENING_CLAIM_POLICY_PROVEN_4STAR, OPENING_TYPE_MARKER, OPERATION_ASSETS, OVERLAY_FEE_RATE, PREFLIGHT_MAX_AMOUNT, PREFLIGHT_OK, PROVEN_MIN_AVG_STARS_X10, PROVEN_MIN_REVIEWS, REVIEW_MAX_STARS, REVIEW_MIN_STARS, SELLER_LEVEL_ACTIVE_CAPS, SENDABLE_ASSETS, SERVICE_SLUG_RE, SERVICE_TIERS, SPONSORED_PYTH_DEPENDENT_PROVIDERS, STABLE_ASSETS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SUI_DECIMALS, SUI_TYPE, SUPPORTED_ASSETS, SuinsNotRegisteredError, SuinsRpcError, T2000, T2000Error, T2000_OVERLAY_FEE_WALLET, TOKEN_MAP, USDC_DECIMALS, USDC_TYPE, USDE_TYPE, USDSUI_TYPE, USDT_TYPE, WAL_TYPE, WBTC_TYPE, WRITE_APPENDER_REGISTRY, ZkLoginSigner, activeCapForLevel, addSendToTx, addSwapToTx, agentResolveUrl, approxUsdValue, assertAllowedAsset, assertBuyerRequirements, assertLimitConfig, buildAddLeafTx, buildCancelOpeningTx, buildClaimOpeningTx, buildCreateEmptyScoreTx, buildCreateJobTx, buildCreateOpeningTx, buildDeclineJobTx, buildDeliverJobTx, buildRefundJobTx, buildRefundUnclaimedTx, buildRejectJobTx, buildReleaseJobTx, buildRevokeLeafTx, buildSendTx, buildSubmitFirstReviewTx, buildSubmitReviewTx, buildSwapTx, cancelOpenJob, canonicalizeRecipientInput, chatCompletion, chatCompletionStream, checkPositiveAmount, checkSuiAddress, claimOpenJob, claimPolicyLabel, claimPolicyRequirement, classifyAction, classifyLabel, classifySendAsset, classifyTransaction, clearLimits, composeTx, createPackage, customHireEnvelope, dailySpentToday, deriveAgentScoreId, deriveAllowedAddressesFromPtb, deserializeCetusRoute, displayHandle, effectiveSellerLevel, endpointIssueLines, ensureCategory, executeTx, exportPrivateKey, extractAllUserLegs, extractTransferDetails, extractTxCommands, extractTxSender, fallbackLabel, fetchAllCoins, fetchChallengeNonce, fetchService, findSwapRoute, formatAssetAmount, formatSui, formatUsd, fullHandle, generateKeypair, getAddress, getAgentProfile, getAgentScore, getCoinMeta, getDecimals, getDecimalsForCoinType, getJob, getJobSpec, getLimits, getOpenJob, getOpening, getSponsoredSwapProviders, getSuiClient, getSuiGrpcClient, getSwapQuote, hasLimits, invalidSendAssetMessage, isAllowedAsset, isCetusRouteFresh, isCustomHireEnvelope, isInRegistry, jobActionsFor, keypairFromPrivateKey, listEndpoint, listModels, listOpenJobs, listServices, loadKey, looksLikeSuiNs, mapMoveAbortCode, mapWalletError, meetsClaimPolicy, meetsMinSellerLevel, mistToSui, normalizeAddressInput, normalizeAsset, normalizeCoinType, packageBaseFromName, packageBaseSlug, packageTierSlugs, parseAgentCategory, parseServiceTierSlug, parseSuiRpcTx, payWithX402, planPackage, postOpenJob, preflightClaimOpening, preflightCreateJob, preflightCreateOpening, preflightFail, preflightPay, preflightSend, preflightSwap, probeX402, profileChallengeMessage, putJobSpec, queryBalance, queryHistory, queryTransaction, rawToStable, rawToUsdc, readLimitsFile, recordDailySpend, refineLendingLabel, refundOpenJob, registerAgent, removeEndpoint, reportX402Activity, resolveAddressToSuinsViaRpc, resolveAgentRef, resolveCreatedObjectId, resolveSuinsViaRpc, resolveSymbol, resolveTokenType, retireService, saveBech32, saveKey, selectAndSplitCoin, selectSuiCoin, sellerLevel, sellerLevelLabel, serializeCetusRoute, serviceChallengeMessage, servicePayloadSha256, serviceUpsertPayload, setLimits, setSponsoredTxGuard, signChallenge, simulateTransaction, slugify, slugifyLoner, slugifyUnbounded, stableToRaw, submitJobReview, suiToMist, throwIfSimulationFailed, trimDashes, truncateAddress, updateProfile, upsertService, usdcToRaw, validateAddress, validateLabel, verifyCetusRouteCoinMatch, verifyJobForSeller, walletExists, writeLimitsFile };
|
|
5209
|
+
export { A2A_ESCROW_FEE_CONFIG_ID, A2A_ESCROW_LATEST_PACKAGE_ID, A2A_ESCROW_OPENING_PACKAGE_ID, A2A_ESCROW_PACKAGE_ID, A2A_ESCROW_PACKAGE_V10_ID, A2A_ESCROW_PACKAGE_V11_ID, A2A_ESCROW_PACKAGE_V12_ID, A2A_ESCROW_PACKAGE_V2_ID, A2A_ESCROW_PACKAGE_V3_ID, A2A_ESCROW_PACKAGE_V6_ID, A2A_ESCROW_PACKAGE_V7_ID, A2A_ESCROW_PACKAGE_V8_ID, A2A_SCORE_BOARD_ID, AGENT_CATEGORIES, AUDRIC_PARENT, AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, BATCH_ABORT_CODES, BATCH_OPENING_TYPE_MARKER, BATCH_ORIGIN_KEY_TYPE_SUFFIX, CETUS_USDC_SUI_POOL, CLOCK_ID, COIN_REGISTRY, CommerceClient, DEFAULT_ACTIVITY_REPORT_URL, DEFAULT_API_BASE, DEFAULT_COMMERCE_API_BASE, DEFAULT_GRPC_URL, DEFAULT_NETWORK, ESCROW_ABORT_CODES, ESCROW_JOB_TYPE_MARKER, ETH_TYPE, GASLESS_MIN_STABLE_AMOUNT, GASLESS_STABLE_TYPES, GAS_RESERVE_MIN, IKA_TYPE, InvalidAddressError, JOB_STATES, KNOWN_TARGETS, KeypairSigner, LABEL_PATTERNS, LEVEL4_MAX_NO_DELIVERY, LEVEL4_MIN_REVIEWS, LOFI_TYPE, LimitEnforcer, LimitExceededError, MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID, MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID, MAINNET_A2A_ESCROW_PACKAGE_ID, MAINNET_A2A_SCORE_BOARD_ID, MANIFEST_TYPE, MAX_BATCH_SLOTS_DEFAULT, MAX_DELIVER_HORIZON_MS, MAX_JOB_USDC, MAX_OPEN_WINDOW_MS, MAX_REVIEW_WINDOW_MS, MAX_SLUG_LENGTH, MAX_TIER_BASE_LENGTH, MIN_JOB_USDC, MIST_PER_SUI, NAVX_TYPE, NO_DELIVERY_REGRESSION_FLOOR, OPENING_CLAIM_POLICIES, OPENING_CLAIM_POLICY_ANY_ACTIVE, OPENING_CLAIM_POLICY_PROVEN, OPENING_CLAIM_POLICY_PROVEN_4STAR, OPENING_TYPE_MARKER, OPERATION_ASSETS, OVERLAY_FEE_RATE, PREFLIGHT_MAX_AMOUNT, PREFLIGHT_OK, PROVEN_MIN_AVG_STARS_X10, PROVEN_MIN_REVIEWS, REPUTATION_ABORT_CODES, REVIEW_MAX_STARS, REVIEW_MIN_STARS, SELLER_LEVEL_ACTIVE_CAPS, SENDABLE_ASSETS, SERVICE_SLUG_RE, SERVICE_TIERS, SPONSORED_PYTH_DEPENDENT_PROVIDERS, STABLE_ASSETS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SUI_DECIMALS, SUI_TYPE, SUPPORTED_ASSETS, SuinsNotRegisteredError, SuinsRpcError, T2000, T2000Error, T2000_OVERLAY_FEE_WALLET, TOKEN_MAP, USDC_DECIMALS, USDC_TYPE, USDE_TYPE, USDSUI_TYPE, USDT_TYPE, WAL_TYPE, WBTC_TYPE, WRITE_APPENDER_REGISTRY, ZkLoginSigner, activeCapForLevel, addSendToTx, addSwapToTx, agentResolveUrl, approxUsdValue, assertAllowedAsset, assertBuyerRequirements, assertLimitConfig, buildAddLeafTx, buildBatchClaimTx, buildCancelBatchOpeningTx, buildCancelOpeningTx, buildClaimOpeningTx, buildCreateBatchOpeningTx, buildCreateEmptyScoreTx, buildCreateJobTx, buildCreateOpeningTx, buildDeclineJobTx, buildDeliverJobTx, buildRefundBatchExpiredTx, buildRefundJobTx, buildRefundUnclaimedTx, buildRejectJobTx, buildReleaseJobTx, buildRevokeLeafTx, buildSendTx, buildSubmitFirstReviewTx, buildSubmitReviewTx, buildSwapTx, cancelBatchOpenJob, cancelOpenJob, canonicalizeRecipientInput, chatCompletion, chatCompletionStream, checkPositiveAmount, checkSuiAddress, claimBatchOpenJob, claimOpenJob, claimPolicyLabel, claimPolicyRequirement, classifyAction, classifyLabel, classifySendAsset, classifyTransaction, clearLimits, composeTx, createPackage, customHireEnvelope, dailySpentToday, deriveAgentScoreId, deriveAllowedAddressesFromPtb, deserializeCetusRoute, displayHandle, effectiveSellerLevel, endpointIssueLines, ensureCategory, executeTx, exportPrivateKey, extractAllUserLegs, extractTransferDetails, extractTxCommands, extractTxSender, fallbackLabel, fetchAllCoins, fetchChallengeNonce, fetchService, findSwapRoute, formatAssetAmount, formatSui, formatUsd, fullHandle, generateKeypair, getAddress, getAgentProfile, getAgentScore, getBatchClaimsByAgent, getBatchOpening, getCoinMeta, getDecimals, getDecimalsForCoinType, getJob, getJobBatchOrigin, getJobSpec, getLimits, getOpenJob, getOpening, getSponsoredSwapProviders, getSuiClient, getSuiGrpcClient, getSwapQuote, hasLimits, invalidSendAssetMessage, isAllowedAsset, isCetusRouteFresh, isCustomHireEnvelope, isInRegistry, jobActionsFor, keypairFromPrivateKey, listEndpoint, listModels, listOpenJobs, listServices, loadKey, looksLikeSuiNs, mapMoveAbortCode, mapWalletError, meetsClaimPolicy, meetsMinSellerLevel, mistToSui, normalizeAddressInput, normalizeAsset, normalizeCoinType, packageBaseFromName, packageBaseSlug, packageTierSlugs, parseAgentCategory, parseServiceTierSlug, parseSuiRpcTx, payWithX402, planPackage, postBatchOpenJob, postOpenJob, preflightBatchClaim, preflightClaimOpening, preflightCreateBatchOpening, preflightCreateJob, preflightCreateOpening, preflightFail, preflightPay, preflightSend, preflightSwap, probeX402, profileChallengeMessage, putJobSpec, queryBalance, queryHistory, queryTransaction, rawToStable, rawToUsdc, readLimitsFile, recordDailySpend, refineLendingLabel, refundBatchOpenJob, refundOpenJob, registerAgent, removeEndpoint, reportX402Activity, resolveAddressToSuinsViaRpc, resolveAgentRef, resolveCreatedObjectId, resolveSuinsViaRpc, resolveSymbol, resolveTokenType, retireService, saveBech32, saveKey, selectAndSplitCoin, selectSuiCoin, sellerLevel, sellerLevelLabel, serializeCetusRoute, serviceChallengeMessage, servicePayloadSha256, serviceUpsertPayload, setLimits, setSponsoredTxGuard, signChallenge, simulateTransaction, slugify, slugifyLoner, slugifyUnbounded, stableToRaw, submitJobReview, suiToMist, throwIfSimulationFailed, trimDashes, truncateAddress, updateProfile, upsertService, usdcToRaw, validateAddress, validateLabel, verifyCetusRouteCoinMatch, verifyJobForSeller, walletExists, writeLimitsFile };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@t2000/sdk",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.40.0",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20"
|
|
6
6
|
},
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@phala/dcap-qvl": "^0.5.2",
|
|
57
57
|
"bn.js": "^5.2.1",
|
|
58
58
|
"eventemitter3": "^5",
|
|
59
|
-
"@t2000/sui-x402": "10.
|
|
59
|
+
"@t2000/sui-x402": "10.40.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/bn.js": "^5.1.5",
|