@t2000/sdk 10.35.0 → 10.36.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 +12 -3
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +12 -3
- package/dist/{commerce-GI4hcxKU.d.cts → commerce-C0B4y1uP.d.cts} +41 -9
- package/dist/{commerce-GI4hcxKU.d.ts → commerce-C0B4y1uP.d.ts} +41 -9
- package/dist/index.cjs +12 -3
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +12 -3
- package/package.json +2 -2
package/dist/browser.cjs
CHANGED
|
@@ -1332,7 +1332,7 @@ init_coinSelection();
|
|
|
1332
1332
|
init_errors();
|
|
1333
1333
|
init_token_registry();
|
|
1334
1334
|
init_coinSelection();
|
|
1335
|
-
var MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "
|
|
1335
|
+
var MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "0x7a9332e167d19e7442fb30740d31a536047da10ab00715402c6fff9e80ae604d";
|
|
1336
1336
|
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;
|
|
1337
1337
|
var A2A_ESCROW_PACKAGE_V7_ID = "0x4249f0b242c47c7baf0c37304365bc4bbe769bcedf11f3525e84682d59a3b23e";
|
|
1338
1338
|
var A2A_ESCROW_PACKAGE_V8_ID = "0x1595b80bc05a03607f3908702c866ca63cf961025b4263b5ecbe419e07f8ff31";
|
|
@@ -1719,15 +1719,24 @@ async function listServices(base, filter = {}) {
|
|
|
1719
1719
|
if (filter.agent) params.set("agent", filter.agent);
|
|
1720
1720
|
if (filter.query) params.set("q", filter.query);
|
|
1721
1721
|
if (filter.category) params.set("category", filter.category);
|
|
1722
|
+
if (filter.rail) params.set("rail", filter.rail);
|
|
1722
1723
|
if (filter.limit !== void 0) params.set("limit", String(filter.limit));
|
|
1723
1724
|
if (filter.offset !== void 0) params.set("offset", String(filter.offset));
|
|
1724
1725
|
const qs = params.size > 0 ? `?${params.toString()}` : "";
|
|
1725
1726
|
const json = await commerceFetchJson(`${base}/services${qs}`);
|
|
1726
1727
|
const services = json.services ?? [];
|
|
1727
|
-
return {
|
|
1728
|
+
return {
|
|
1729
|
+
total: json.total ?? services.length,
|
|
1730
|
+
hireTotal: json.hireTotal,
|
|
1731
|
+
apiTotal: json.apiTotal,
|
|
1732
|
+
services
|
|
1733
|
+
};
|
|
1728
1734
|
}
|
|
1729
1735
|
async function fetchService(base, agent, slug) {
|
|
1730
|
-
const { services
|
|
1736
|
+
const { services } = await listServices(base, { agent });
|
|
1737
|
+
const rows = services.filter(
|
|
1738
|
+
(o) => o.kind !== "api"
|
|
1739
|
+
);
|
|
1731
1740
|
const match = rows.find((o) => o.slug === slug.trim().toLowerCase());
|
|
1732
1741
|
if (!match) {
|
|
1733
1742
|
const live = rows.filter((o) => !o.retired).map((o) => o.slug);
|
package/dist/browser.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as A2A_ESCROW_FEE_CONFIG_ID, a as A2A_ESCROW_PACKAGE_ID, b as ActivityReportConfig, c as AgentScore, B as BalanceResponse, C as CLOCK_ID, d as COIN_REGISTRY, e as ClassifyBalanceChange, f as ClassifyResult, g as CoinMeta, D as DEFAULT_ACTIVITY_REPORT_URL, h as DEFAULT_COMMERCE_API_BASE, i as DEFAULT_NETWORK, j as DepositInfo, E as ETH_TYPE, k as ExtractedTransfer, 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, M as MANIFEST_TYPE, r as MAX_DELIVER_HORIZON_MS, s as MAX_JOB_USDC, 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, z as OVERLAY_FEE_RATE, F as OverlayFeeConfig, P as PREFLIGHT_MAX_AMOUNT, H as PREFLIGHT_OK, Q as PROVEN_MIN_AVG_STARS_X10, R as PROVEN_MIN_REVIEWS, S as PayOptions, T as PayResult, U as PreflightResult, V as REVIEW_MAX_STARS, W as REVIEW_MIN_STARS, X as STABLE_ASSETS, Y as SUI_DECIMALS, Z as SUI_TYPE, _ as SUPPORTED_ASSETS, $ as SendAssetClass, a0 as SendResult, a1 as ServiceListing, a2 as SimulationResult, a3 as StableAsset, a4 as SuiHolding, a5 as SuiRpcTxBlock, a6 as SupportedAsset, a7 as SwapRouteResult, a8 as T2000Error, a9 as T2000ErrorCode, aa as T2000ErrorData, ab as T2000_OVERLAY_FEE_WALLET, ac as TOKEN_MAP, ad as TransactionLeg, ae as TransactionRecord, af as TransactionSigner, 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, ap as ZkLoginProof, aq as ZkLoginSigner, ar as buildCreateJobTx, as as buildDeliverJobTx, at as buildRefundJobTx, au as buildRejectJobTx, av as buildReleaseJobTx, aw as buildSendTx, 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, aH as executeTx, aI as extractAllUserLegs, aJ as extractTransferDetails, aK as extractTxCommands, aL as extractTxSender, aM as fallbackLabel, aN as fetchService, aO as findSwapRoute, aP as formatAssetAmount, aQ as formatSui, aR as formatUsd, aS as getAgentScore, aT as getDecimals, aU as getDecimalsForCoinType, aV as getJob, aW as getJobSpec, aX as invalidSendAssetMessage, aY as jobActionsFor, aZ as listServices, a_ as mapMoveAbortCode, a$ as mapWalletError, b0 as meetsClaimPolicy, b1 as mistToSui, b2 as parseSuiRpcTx, b3 as payWithX402, b4 as preflightCreateJob, b5 as preflightFail, b6 as preflightPay, b7 as preflightSend, b8 as preflightSwap, b9 as putJobSpec, ba as rawToStable, bb as rawToUsdc, bc as refineLendingLabel, bd as reportX402Activity, be as resolveSymbol, bf as resolveTokenType, bg as stableToRaw, bh as suiToMist, bi as truncateAddress, bj as usdcToRaw, bk as validateAddress, bl as verifyJobForSeller } from './commerce-
|
|
1
|
+
export { A as A2A_ESCROW_FEE_CONFIG_ID, a as A2A_ESCROW_PACKAGE_ID, b as ActivityReportConfig, c as AgentScore, B as BalanceResponse, C as CLOCK_ID, d as COIN_REGISTRY, e as ClassifyBalanceChange, f as ClassifyResult, g as CoinMeta, D as DEFAULT_ACTIVITY_REPORT_URL, h as DEFAULT_COMMERCE_API_BASE, i as DEFAULT_NETWORK, j as DepositInfo, E as ETH_TYPE, k as ExtractedTransfer, 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, M as MANIFEST_TYPE, r as MAX_DELIVER_HORIZON_MS, s as MAX_JOB_USDC, 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, z as OVERLAY_FEE_RATE, F as OverlayFeeConfig, P as PREFLIGHT_MAX_AMOUNT, H as PREFLIGHT_OK, Q as PROVEN_MIN_AVG_STARS_X10, R as PROVEN_MIN_REVIEWS, S as PayOptions, T as PayResult, U as PreflightResult, V as REVIEW_MAX_STARS, W as REVIEW_MIN_STARS, X as STABLE_ASSETS, Y as SUI_DECIMALS, Z as SUI_TYPE, _ as SUPPORTED_ASSETS, $ as SendAssetClass, a0 as SendResult, a1 as ServiceListing, a2 as SimulationResult, a3 as StableAsset, a4 as SuiHolding, a5 as SuiRpcTxBlock, a6 as SupportedAsset, a7 as SwapRouteResult, a8 as T2000Error, a9 as T2000ErrorCode, aa as T2000ErrorData, ab as T2000_OVERLAY_FEE_WALLET, ac as TOKEN_MAP, ad as TransactionLeg, ae as TransactionRecord, af as TransactionSigner, 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, ap as ZkLoginProof, aq as ZkLoginSigner, ar as buildCreateJobTx, as as buildDeliverJobTx, at as buildRefundJobTx, au as buildRejectJobTx, av as buildReleaseJobTx, aw as buildSendTx, 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, aH as executeTx, aI as extractAllUserLegs, aJ as extractTransferDetails, aK as extractTxCommands, aL as extractTxSender, aM as fallbackLabel, aN as fetchService, aO as findSwapRoute, aP as formatAssetAmount, aQ as formatSui, aR as formatUsd, aS as getAgentScore, aT as getDecimals, aU as getDecimalsForCoinType, aV as getJob, aW as getJobSpec, aX as invalidSendAssetMessage, aY as jobActionsFor, aZ as listServices, a_ as mapMoveAbortCode, a$ as mapWalletError, b0 as meetsClaimPolicy, b1 as mistToSui, b2 as parseSuiRpcTx, b3 as payWithX402, b4 as preflightCreateJob, b5 as preflightFail, b6 as preflightPay, b7 as preflightSend, b8 as preflightSwap, b9 as putJobSpec, ba as rawToStable, bb as rawToUsdc, bc as refineLendingLabel, bd as reportX402Activity, be as resolveSymbol, bf as resolveTokenType, bg as stableToRaw, bh as suiToMist, bi as truncateAddress, bj as usdcToRaw, bk as validateAddress, bl as verifyJobForSeller } from './commerce-C0B4y1uP.cjs';
|
|
2
2
|
import '@mysten/sui/keypairs/ed25519';
|
|
3
3
|
import '@mysten/sui/grpc';
|
|
4
4
|
import '@mysten/sui/client';
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as A2A_ESCROW_FEE_CONFIG_ID, a as A2A_ESCROW_PACKAGE_ID, b as ActivityReportConfig, c as AgentScore, B as BalanceResponse, C as CLOCK_ID, d as COIN_REGISTRY, e as ClassifyBalanceChange, f as ClassifyResult, g as CoinMeta, D as DEFAULT_ACTIVITY_REPORT_URL, h as DEFAULT_COMMERCE_API_BASE, i as DEFAULT_NETWORK, j as DepositInfo, E as ETH_TYPE, k as ExtractedTransfer, 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, M as MANIFEST_TYPE, r as MAX_DELIVER_HORIZON_MS, s as MAX_JOB_USDC, 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, z as OVERLAY_FEE_RATE, F as OverlayFeeConfig, P as PREFLIGHT_MAX_AMOUNT, H as PREFLIGHT_OK, Q as PROVEN_MIN_AVG_STARS_X10, R as PROVEN_MIN_REVIEWS, S as PayOptions, T as PayResult, U as PreflightResult, V as REVIEW_MAX_STARS, W as REVIEW_MIN_STARS, X as STABLE_ASSETS, Y as SUI_DECIMALS, Z as SUI_TYPE, _ as SUPPORTED_ASSETS, $ as SendAssetClass, a0 as SendResult, a1 as ServiceListing, a2 as SimulationResult, a3 as StableAsset, a4 as SuiHolding, a5 as SuiRpcTxBlock, a6 as SupportedAsset, a7 as SwapRouteResult, a8 as T2000Error, a9 as T2000ErrorCode, aa as T2000ErrorData, ab as T2000_OVERLAY_FEE_WALLET, ac as TOKEN_MAP, ad as TransactionLeg, ae as TransactionRecord, af as TransactionSigner, 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, ap as ZkLoginProof, aq as ZkLoginSigner, ar as buildCreateJobTx, as as buildDeliverJobTx, at as buildRefundJobTx, au as buildRejectJobTx, av as buildReleaseJobTx, aw as buildSendTx, 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, aH as executeTx, aI as extractAllUserLegs, aJ as extractTransferDetails, aK as extractTxCommands, aL as extractTxSender, aM as fallbackLabel, aN as fetchService, aO as findSwapRoute, aP as formatAssetAmount, aQ as formatSui, aR as formatUsd, aS as getAgentScore, aT as getDecimals, aU as getDecimalsForCoinType, aV as getJob, aW as getJobSpec, aX as invalidSendAssetMessage, aY as jobActionsFor, aZ as listServices, a_ as mapMoveAbortCode, a$ as mapWalletError, b0 as meetsClaimPolicy, b1 as mistToSui, b2 as parseSuiRpcTx, b3 as payWithX402, b4 as preflightCreateJob, b5 as preflightFail, b6 as preflightPay, b7 as preflightSend, b8 as preflightSwap, b9 as putJobSpec, ba as rawToStable, bb as rawToUsdc, bc as refineLendingLabel, bd as reportX402Activity, be as resolveSymbol, bf as resolveTokenType, bg as stableToRaw, bh as suiToMist, bi as truncateAddress, bj as usdcToRaw, bk as validateAddress, bl as verifyJobForSeller } from './commerce-
|
|
1
|
+
export { A as A2A_ESCROW_FEE_CONFIG_ID, a as A2A_ESCROW_PACKAGE_ID, b as ActivityReportConfig, c as AgentScore, B as BalanceResponse, C as CLOCK_ID, d as COIN_REGISTRY, e as ClassifyBalanceChange, f as ClassifyResult, g as CoinMeta, D as DEFAULT_ACTIVITY_REPORT_URL, h as DEFAULT_COMMERCE_API_BASE, i as DEFAULT_NETWORK, j as DepositInfo, E as ETH_TYPE, k as ExtractedTransfer, 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, M as MANIFEST_TYPE, r as MAX_DELIVER_HORIZON_MS, s as MAX_JOB_USDC, 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, z as OVERLAY_FEE_RATE, F as OverlayFeeConfig, P as PREFLIGHT_MAX_AMOUNT, H as PREFLIGHT_OK, Q as PROVEN_MIN_AVG_STARS_X10, R as PROVEN_MIN_REVIEWS, S as PayOptions, T as PayResult, U as PreflightResult, V as REVIEW_MAX_STARS, W as REVIEW_MIN_STARS, X as STABLE_ASSETS, Y as SUI_DECIMALS, Z as SUI_TYPE, _ as SUPPORTED_ASSETS, $ as SendAssetClass, a0 as SendResult, a1 as ServiceListing, a2 as SimulationResult, a3 as StableAsset, a4 as SuiHolding, a5 as SuiRpcTxBlock, a6 as SupportedAsset, a7 as SwapRouteResult, a8 as T2000Error, a9 as T2000ErrorCode, aa as T2000ErrorData, ab as T2000_OVERLAY_FEE_WALLET, ac as TOKEN_MAP, ad as TransactionLeg, ae as TransactionRecord, af as TransactionSigner, 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, ap as ZkLoginProof, aq as ZkLoginSigner, ar as buildCreateJobTx, as as buildDeliverJobTx, at as buildRefundJobTx, au as buildRejectJobTx, av as buildReleaseJobTx, aw as buildSendTx, 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, aH as executeTx, aI as extractAllUserLegs, aJ as extractTransferDetails, aK as extractTxCommands, aL as extractTxSender, aM as fallbackLabel, aN as fetchService, aO as findSwapRoute, aP as formatAssetAmount, aQ as formatSui, aR as formatUsd, aS as getAgentScore, aT as getDecimals, aU as getDecimalsForCoinType, aV as getJob, aW as getJobSpec, aX as invalidSendAssetMessage, aY as jobActionsFor, aZ as listServices, a_ as mapMoveAbortCode, a$ as mapWalletError, b0 as meetsClaimPolicy, b1 as mistToSui, b2 as parseSuiRpcTx, b3 as payWithX402, b4 as preflightCreateJob, b5 as preflightFail, b6 as preflightPay, b7 as preflightSend, b8 as preflightSwap, b9 as putJobSpec, ba as rawToStable, bb as rawToUsdc, bc as refineLendingLabel, bd as reportX402Activity, be as resolveSymbol, bf as resolveTokenType, bg as stableToRaw, bh as suiToMist, bi as truncateAddress, bj as usdcToRaw, bk as validateAddress, bl as verifyJobForSeller } from './commerce-C0B4y1uP.js';
|
|
2
2
|
import '@mysten/sui/keypairs/ed25519';
|
|
3
3
|
import '@mysten/sui/grpc';
|
|
4
4
|
import '@mysten/sui/client';
|
package/dist/browser.js
CHANGED
|
@@ -1330,7 +1330,7 @@ init_coinSelection();
|
|
|
1330
1330
|
init_errors();
|
|
1331
1331
|
init_token_registry();
|
|
1332
1332
|
init_coinSelection();
|
|
1333
|
-
var MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "
|
|
1333
|
+
var MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "0x7a9332e167d19e7442fb30740d31a536047da10ab00715402c6fff9e80ae604d";
|
|
1334
1334
|
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;
|
|
1335
1335
|
var A2A_ESCROW_PACKAGE_V7_ID = "0x4249f0b242c47c7baf0c37304365bc4bbe769bcedf11f3525e84682d59a3b23e";
|
|
1336
1336
|
var A2A_ESCROW_PACKAGE_V8_ID = "0x1595b80bc05a03607f3908702c866ca63cf961025b4263b5ecbe419e07f8ff31";
|
|
@@ -1717,15 +1717,24 @@ async function listServices(base, filter = {}) {
|
|
|
1717
1717
|
if (filter.agent) params.set("agent", filter.agent);
|
|
1718
1718
|
if (filter.query) params.set("q", filter.query);
|
|
1719
1719
|
if (filter.category) params.set("category", filter.category);
|
|
1720
|
+
if (filter.rail) params.set("rail", filter.rail);
|
|
1720
1721
|
if (filter.limit !== void 0) params.set("limit", String(filter.limit));
|
|
1721
1722
|
if (filter.offset !== void 0) params.set("offset", String(filter.offset));
|
|
1722
1723
|
const qs = params.size > 0 ? `?${params.toString()}` : "";
|
|
1723
1724
|
const json = await commerceFetchJson(`${base}/services${qs}`);
|
|
1724
1725
|
const services = json.services ?? [];
|
|
1725
|
-
return {
|
|
1726
|
+
return {
|
|
1727
|
+
total: json.total ?? services.length,
|
|
1728
|
+
hireTotal: json.hireTotal,
|
|
1729
|
+
apiTotal: json.apiTotal,
|
|
1730
|
+
services
|
|
1731
|
+
};
|
|
1726
1732
|
}
|
|
1727
1733
|
async function fetchService(base, agent, slug) {
|
|
1728
|
-
const { services
|
|
1734
|
+
const { services } = await listServices(base, { agent });
|
|
1735
|
+
const rows = services.filter(
|
|
1736
|
+
(o) => o.kind !== "api"
|
|
1737
|
+
);
|
|
1729
1738
|
const match = rows.find((o) => o.slug === slug.trim().toLowerCase());
|
|
1730
1739
|
if (!match) {
|
|
1731
1740
|
const live = rows.filter((o) => !o.retired).map((o) => o.slug);
|
|
@@ -1618,7 +1618,7 @@ declare function verifyJobForSeller({ client, jobId, seller, minAmountUsdc, minR
|
|
|
1618
1618
|
/**
|
|
1619
1619
|
* Open door — client for `a2a_escrow::opening` (SPEC_T2_AGENTS_OPEN_ONCHAIN,
|
|
1620
1620
|
* Phase 3 escrow-at-post). Posting an open job escrows USDC on-chain
|
|
1621
|
-
* immediately in a shared `Opening<USDC>`; the first ACTIVE registered
|
|
1621
|
+
* immediately in a shared `Opening<USDC>`; the first ACTIVE registered seller
|
|
1622
1622
|
* to claim mints a normal `escrow::Job` (deliver/settle with the job verbs).
|
|
1623
1623
|
* No claim by `open_until` → `refund_unclaimed` (permissionless, fee-free);
|
|
1624
1624
|
* the buyer can `cancel_open` any time while unclaimed.
|
|
@@ -1627,8 +1627,9 @@ declare function verifyJobForSeller({ client, jobId, seller, minAmountUsdc, minR
|
|
|
1627
1627
|
* target the LATEST published id — the original id (types, Job verbs) is
|
|
1628
1628
|
* unchanged.
|
|
1629
1629
|
*/
|
|
1630
|
-
/** The LATEST published `a2a_escrow` package id on MAINNET (
|
|
1631
|
-
* 2026-08-15, S.
|
|
1630
|
+
/** The LATEST published `a2a_escrow` package id on MAINNET (v9 upgrade
|
|
1631
|
+
* 2026-08-15, S.1064 — review on REJECTED, additive; v8 = outcome
|
|
1632
|
+
* counters (S.1063); v7 = distinct buyers (S.1062);
|
|
1632
1633
|
* v6 = S.1054 — `reputation` module + `opening::claim_proven`;
|
|
1633
1634
|
* v5 locked open reject at 10000 (S.1019); v4 added amount bounds
|
|
1634
1635
|
* (S.981); v3 added `escrow::decline`; v2 the `opening` module).
|
|
@@ -1640,9 +1641,9 @@ declare function verifyJobForSeller({ client, jobId, seller, minAmountUsdc, minR
|
|
|
1640
1641
|
* upgrade + `migrate` cutover is a ONE-VALUE change here. The original id
|
|
1641
1642
|
* (`MAINNET_A2A_ESCROW_PACKAGE_ID` in job.ts) remains the anchor for type
|
|
1642
1643
|
* strings, event filters, and object-type queries — those never move. */
|
|
1643
|
-
declare const MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "
|
|
1644
|
+
declare const MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "0x7a9332e167d19e7442fb30740d31a536047da10ab00715402c6fff9e80ae604d";
|
|
1644
1645
|
/** Back-compat name for the latest id (pre-S.981 consumers import this). */
|
|
1645
|
-
declare const MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID = "
|
|
1646
|
+
declare const MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID = "0x7a9332e167d19e7442fb30740d31a536047da10ab00715402c6fff9e80ae604d";
|
|
1646
1647
|
/** Env-overridable latest id for testnet/dev (NOT a trust anchor). A fresh
|
|
1647
1648
|
* dev publish has original == latest, so `A2A_ESCROW_PACKAGE_ID` alone is
|
|
1648
1649
|
* honored as the fallback override. */
|
|
@@ -1696,7 +1697,7 @@ interface OpeningTerms {
|
|
|
1696
1697
|
specHash: string;
|
|
1697
1698
|
/** Epoch-ms the opening stays claimable until (≤ 30d out). */
|
|
1698
1699
|
openUntilMs: number;
|
|
1699
|
-
/** Delivery window the claiming
|
|
1700
|
+
/** Delivery window the claiming seller gets: deliver_by = claim + sla. */
|
|
1700
1701
|
slaMs: number;
|
|
1701
1702
|
reviewWindowMs: number;
|
|
1702
1703
|
/** v5 (S.1019): MUST be 10000 — open-board reject pays the buyer in
|
|
@@ -1723,7 +1724,7 @@ declare function buildCreateOpeningTx({ client, buyer, terms, }: {
|
|
|
1723
1724
|
buyer: string;
|
|
1724
1725
|
terms: OpeningTerms;
|
|
1725
1726
|
}): Promise<Transaction>;
|
|
1726
|
-
/** Claim an opening (
|
|
1727
|
+
/** Claim an opening (seller side) — consumes it and mints the funded Job.
|
|
1727
1728
|
* `registryId` = the shared `agent_id::registry::Registry` object
|
|
1728
1729
|
* (callers pass `AGENT_ID_REGISTRY_ID` from `@t2000/id` — single source).
|
|
1729
1730
|
*
|
|
@@ -1857,6 +1858,8 @@ declare function buildSubmitFirstReviewTx({ jobId, stars, boardId, }: {
|
|
|
1857
1858
|
declare const DEFAULT_COMMERCE_API_BASE = "https://api.t2000.ai/v1";
|
|
1858
1859
|
/** The shape the API returns from GET /v1/services. */
|
|
1859
1860
|
interface ServiceListing {
|
|
1861
|
+
/** Row discriminator (S.1084) — hire rows; absent on pre-S.1084 servers. */
|
|
1862
|
+
kind?: 'hire';
|
|
1860
1863
|
agent: string;
|
|
1861
1864
|
agentName: string | null;
|
|
1862
1865
|
agentNumericId: number | null;
|
|
@@ -1880,6 +1883,31 @@ interface ServiceListing {
|
|
|
1880
1883
|
/** Seller lifetime settled (released-escrow) USDC — the organic rank key. */
|
|
1881
1884
|
settledUsdc: number;
|
|
1882
1885
|
}
|
|
1886
|
+
/** One live pay-per-call x402 route (S.1084 — `kind: "api"` rows from
|
|
1887
|
+
* GET /v1/services?rail=api|all). Paid with `t2 pay` / `agent.pay` at
|
|
1888
|
+
* `url` — NEVER hired (no slug, no SLA, no escrow fields). Ranked by the
|
|
1889
|
+
* seller's paid-call volume, never escrow settledUsdc. */
|
|
1890
|
+
interface ApiRouteListing {
|
|
1891
|
+
kind: 'api';
|
|
1892
|
+
agent: string;
|
|
1893
|
+
agentName: string | null;
|
|
1894
|
+
agentNumericId: number | null;
|
|
1895
|
+
method: string;
|
|
1896
|
+
path: string;
|
|
1897
|
+
/** Absolute endpoint URL (origin + path) — what `t2 pay` takes. */
|
|
1898
|
+
url: string;
|
|
1899
|
+
priceUsdc: number;
|
|
1900
|
+
summary: string | null;
|
|
1901
|
+
category: string | null;
|
|
1902
|
+
probeOk: boolean;
|
|
1903
|
+
paidCalls?: number;
|
|
1904
|
+
paidVolumeUsdc?: number;
|
|
1905
|
+
}
|
|
1906
|
+
type ServicesRow = ServiceListing | ApiRouteListing;
|
|
1907
|
+
/** Rail selector for listServices (S.1084): omitted = hire only (the
|
|
1908
|
+
* compat default old callers rely on) · api = pay-per-call routes ·
|
|
1909
|
+
* all = both blocks, hire first, kind-discriminated. */
|
|
1910
|
+
type ServicesRail = 'hire' | 'api' | 'all';
|
|
1883
1911
|
/** Browse / list agent services. Market browse (no `agent`) is RANKED
|
|
1884
1912
|
* Featured → seller settled USDC → newest — not newest-first; `agent`
|
|
1885
1913
|
* returns that seller's full catalog (retired included, newest-first).
|
|
@@ -1890,11 +1918,15 @@ declare function listServices(base: string, filter?: {
|
|
|
1890
1918
|
agent?: string;
|
|
1891
1919
|
query?: string;
|
|
1892
1920
|
category?: string;
|
|
1921
|
+
/** S.1084: omit = hire only (compat); 'api' = x402 routes; 'all' = both. */
|
|
1922
|
+
rail?: ServicesRail;
|
|
1893
1923
|
limit?: number;
|
|
1894
1924
|
offset?: number;
|
|
1895
1925
|
}): Promise<{
|
|
1896
1926
|
total: number;
|
|
1897
|
-
|
|
1927
|
+
hireTotal?: number;
|
|
1928
|
+
apiTotal?: number;
|
|
1929
|
+
services: ServicesRow[];
|
|
1898
1930
|
}>;
|
|
1899
1931
|
/** Fetch one agent's live service by slug (the buy-path resolver). */
|
|
1900
1932
|
declare function fetchService(base: string, agent: string, slug: string): Promise<ServiceListing>;
|
|
@@ -1921,4 +1953,4 @@ declare function putJobSpec(base: string, content: string): Promise<string>;
|
|
|
1921
1953
|
* the store is untrusted; the chain hash is the authority). */
|
|
1922
1954
|
declare function getJobSpec(base: string, hash: string): Promise<string>;
|
|
1923
1955
|
|
|
1924
|
-
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,
|
|
1956
|
+
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 };
|
|
@@ -1618,7 +1618,7 @@ declare function verifyJobForSeller({ client, jobId, seller, minAmountUsdc, minR
|
|
|
1618
1618
|
/**
|
|
1619
1619
|
* Open door — client for `a2a_escrow::opening` (SPEC_T2_AGENTS_OPEN_ONCHAIN,
|
|
1620
1620
|
* Phase 3 escrow-at-post). Posting an open job escrows USDC on-chain
|
|
1621
|
-
* immediately in a shared `Opening<USDC>`; the first ACTIVE registered
|
|
1621
|
+
* immediately in a shared `Opening<USDC>`; the first ACTIVE registered seller
|
|
1622
1622
|
* to claim mints a normal `escrow::Job` (deliver/settle with the job verbs).
|
|
1623
1623
|
* No claim by `open_until` → `refund_unclaimed` (permissionless, fee-free);
|
|
1624
1624
|
* the buyer can `cancel_open` any time while unclaimed.
|
|
@@ -1627,8 +1627,9 @@ declare function verifyJobForSeller({ client, jobId, seller, minAmountUsdc, minR
|
|
|
1627
1627
|
* target the LATEST published id — the original id (types, Job verbs) is
|
|
1628
1628
|
* unchanged.
|
|
1629
1629
|
*/
|
|
1630
|
-
/** The LATEST published `a2a_escrow` package id on MAINNET (
|
|
1631
|
-
* 2026-08-15, S.
|
|
1630
|
+
/** The LATEST published `a2a_escrow` package id on MAINNET (v9 upgrade
|
|
1631
|
+
* 2026-08-15, S.1064 — review on REJECTED, additive; v8 = outcome
|
|
1632
|
+
* counters (S.1063); v7 = distinct buyers (S.1062);
|
|
1632
1633
|
* v6 = S.1054 — `reputation` module + `opening::claim_proven`;
|
|
1633
1634
|
* v5 locked open reject at 10000 (S.1019); v4 added amount bounds
|
|
1634
1635
|
* (S.981); v3 added `escrow::decline`; v2 the `opening` module).
|
|
@@ -1640,9 +1641,9 @@ declare function verifyJobForSeller({ client, jobId, seller, minAmountUsdc, minR
|
|
|
1640
1641
|
* upgrade + `migrate` cutover is a ONE-VALUE change here. The original id
|
|
1641
1642
|
* (`MAINNET_A2A_ESCROW_PACKAGE_ID` in job.ts) remains the anchor for type
|
|
1642
1643
|
* strings, event filters, and object-type queries — those never move. */
|
|
1643
|
-
declare const MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "
|
|
1644
|
+
declare const MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "0x7a9332e167d19e7442fb30740d31a536047da10ab00715402c6fff9e80ae604d";
|
|
1644
1645
|
/** Back-compat name for the latest id (pre-S.981 consumers import this). */
|
|
1645
|
-
declare const MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID = "
|
|
1646
|
+
declare const MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID = "0x7a9332e167d19e7442fb30740d31a536047da10ab00715402c6fff9e80ae604d";
|
|
1646
1647
|
/** Env-overridable latest id for testnet/dev (NOT a trust anchor). A fresh
|
|
1647
1648
|
* dev publish has original == latest, so `A2A_ESCROW_PACKAGE_ID` alone is
|
|
1648
1649
|
* honored as the fallback override. */
|
|
@@ -1696,7 +1697,7 @@ interface OpeningTerms {
|
|
|
1696
1697
|
specHash: string;
|
|
1697
1698
|
/** Epoch-ms the opening stays claimable until (≤ 30d out). */
|
|
1698
1699
|
openUntilMs: number;
|
|
1699
|
-
/** Delivery window the claiming
|
|
1700
|
+
/** Delivery window the claiming seller gets: deliver_by = claim + sla. */
|
|
1700
1701
|
slaMs: number;
|
|
1701
1702
|
reviewWindowMs: number;
|
|
1702
1703
|
/** v5 (S.1019): MUST be 10000 — open-board reject pays the buyer in
|
|
@@ -1723,7 +1724,7 @@ declare function buildCreateOpeningTx({ client, buyer, terms, }: {
|
|
|
1723
1724
|
buyer: string;
|
|
1724
1725
|
terms: OpeningTerms;
|
|
1725
1726
|
}): Promise<Transaction>;
|
|
1726
|
-
/** Claim an opening (
|
|
1727
|
+
/** Claim an opening (seller side) — consumes it and mints the funded Job.
|
|
1727
1728
|
* `registryId` = the shared `agent_id::registry::Registry` object
|
|
1728
1729
|
* (callers pass `AGENT_ID_REGISTRY_ID` from `@t2000/id` — single source).
|
|
1729
1730
|
*
|
|
@@ -1857,6 +1858,8 @@ declare function buildSubmitFirstReviewTx({ jobId, stars, boardId, }: {
|
|
|
1857
1858
|
declare const DEFAULT_COMMERCE_API_BASE = "https://api.t2000.ai/v1";
|
|
1858
1859
|
/** The shape the API returns from GET /v1/services. */
|
|
1859
1860
|
interface ServiceListing {
|
|
1861
|
+
/** Row discriminator (S.1084) — hire rows; absent on pre-S.1084 servers. */
|
|
1862
|
+
kind?: 'hire';
|
|
1860
1863
|
agent: string;
|
|
1861
1864
|
agentName: string | null;
|
|
1862
1865
|
agentNumericId: number | null;
|
|
@@ -1880,6 +1883,31 @@ interface ServiceListing {
|
|
|
1880
1883
|
/** Seller lifetime settled (released-escrow) USDC — the organic rank key. */
|
|
1881
1884
|
settledUsdc: number;
|
|
1882
1885
|
}
|
|
1886
|
+
/** One live pay-per-call x402 route (S.1084 — `kind: "api"` rows from
|
|
1887
|
+
* GET /v1/services?rail=api|all). Paid with `t2 pay` / `agent.pay` at
|
|
1888
|
+
* `url` — NEVER hired (no slug, no SLA, no escrow fields). Ranked by the
|
|
1889
|
+
* seller's paid-call volume, never escrow settledUsdc. */
|
|
1890
|
+
interface ApiRouteListing {
|
|
1891
|
+
kind: 'api';
|
|
1892
|
+
agent: string;
|
|
1893
|
+
agentName: string | null;
|
|
1894
|
+
agentNumericId: number | null;
|
|
1895
|
+
method: string;
|
|
1896
|
+
path: string;
|
|
1897
|
+
/** Absolute endpoint URL (origin + path) — what `t2 pay` takes. */
|
|
1898
|
+
url: string;
|
|
1899
|
+
priceUsdc: number;
|
|
1900
|
+
summary: string | null;
|
|
1901
|
+
category: string | null;
|
|
1902
|
+
probeOk: boolean;
|
|
1903
|
+
paidCalls?: number;
|
|
1904
|
+
paidVolumeUsdc?: number;
|
|
1905
|
+
}
|
|
1906
|
+
type ServicesRow = ServiceListing | ApiRouteListing;
|
|
1907
|
+
/** Rail selector for listServices (S.1084): omitted = hire only (the
|
|
1908
|
+
* compat default old callers rely on) · api = pay-per-call routes ·
|
|
1909
|
+
* all = both blocks, hire first, kind-discriminated. */
|
|
1910
|
+
type ServicesRail = 'hire' | 'api' | 'all';
|
|
1883
1911
|
/** Browse / list agent services. Market browse (no `agent`) is RANKED
|
|
1884
1912
|
* Featured → seller settled USDC → newest — not newest-first; `agent`
|
|
1885
1913
|
* returns that seller's full catalog (retired included, newest-first).
|
|
@@ -1890,11 +1918,15 @@ declare function listServices(base: string, filter?: {
|
|
|
1890
1918
|
agent?: string;
|
|
1891
1919
|
query?: string;
|
|
1892
1920
|
category?: string;
|
|
1921
|
+
/** S.1084: omit = hire only (compat); 'api' = x402 routes; 'all' = both. */
|
|
1922
|
+
rail?: ServicesRail;
|
|
1893
1923
|
limit?: number;
|
|
1894
1924
|
offset?: number;
|
|
1895
1925
|
}): Promise<{
|
|
1896
1926
|
total: number;
|
|
1897
|
-
|
|
1927
|
+
hireTotal?: number;
|
|
1928
|
+
apiTotal?: number;
|
|
1929
|
+
services: ServicesRow[];
|
|
1898
1930
|
}>;
|
|
1899
1931
|
/** Fetch one agent's live service by slug (the buy-path resolver). */
|
|
1900
1932
|
declare function fetchService(base: string, agent: string, slug: string): Promise<ServiceListing>;
|
|
@@ -1921,4 +1953,4 @@ declare function putJobSpec(base: string, content: string): Promise<string>;
|
|
|
1921
1953
|
* the store is untrusted; the chain hash is the authority). */
|
|
1922
1954
|
declare function getJobSpec(base: string, hash: string): Promise<string>;
|
|
1923
1955
|
|
|
1924
|
-
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,
|
|
1956
|
+
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 };
|
package/dist/index.cjs
CHANGED
|
@@ -3328,7 +3328,7 @@ init_coinSelection();
|
|
|
3328
3328
|
init_errors();
|
|
3329
3329
|
init_token_registry();
|
|
3330
3330
|
init_coinSelection();
|
|
3331
|
-
var MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "
|
|
3331
|
+
var MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "0x7a9332e167d19e7442fb30740d31a536047da10ab00715402c6fff9e80ae604d";
|
|
3332
3332
|
var MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID = MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID;
|
|
3333
3333
|
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;
|
|
3334
3334
|
var A2A_ESCROW_OPENING_PACKAGE_ID = A2A_ESCROW_LATEST_PACKAGE_ID;
|
|
@@ -3952,15 +3952,24 @@ async function listServices(base, filter = {}) {
|
|
|
3952
3952
|
if (filter.agent) params.set("agent", filter.agent);
|
|
3953
3953
|
if (filter.query) params.set("q", filter.query);
|
|
3954
3954
|
if (filter.category) params.set("category", filter.category);
|
|
3955
|
+
if (filter.rail) params.set("rail", filter.rail);
|
|
3955
3956
|
if (filter.limit !== void 0) params.set("limit", String(filter.limit));
|
|
3956
3957
|
if (filter.offset !== void 0) params.set("offset", String(filter.offset));
|
|
3957
3958
|
const qs = params.size > 0 ? `?${params.toString()}` : "";
|
|
3958
3959
|
const json = await commerceFetchJson(`${base}/services${qs}`);
|
|
3959
3960
|
const services = json.services ?? [];
|
|
3960
|
-
return {
|
|
3961
|
+
return {
|
|
3962
|
+
total: json.total ?? services.length,
|
|
3963
|
+
hireTotal: json.hireTotal,
|
|
3964
|
+
apiTotal: json.apiTotal,
|
|
3965
|
+
services
|
|
3966
|
+
};
|
|
3961
3967
|
}
|
|
3962
3968
|
async function fetchService(base, agent, slug) {
|
|
3963
|
-
const { services
|
|
3969
|
+
const { services } = await listServices(base, { agent });
|
|
3970
|
+
const rows = services.filter(
|
|
3971
|
+
(o) => o.kind !== "api"
|
|
3972
|
+
);
|
|
3964
3973
|
const match = rows.find((o) => o.slug === slug.trim().toLowerCase());
|
|
3965
3974
|
if (!match) {
|
|
3966
3975
|
const live = rows.filter((o) => !o.retired).map((o) => o.slug);
|
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-
|
|
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 CETUS_USDC_SUI_POOL, C as CLOCK_ID, d as COIN_REGISTRY, e as ClassifyBalanceChange, f as ClassifyResult, g as CoinMeta,
|
|
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-C0B4y1uP.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-C0B4y1uP.cjs';
|
|
6
6
|
import { TransactionObjectArgument, Transaction } from '@mysten/sui/transactions';
|
|
7
7
|
import { SuinsClient } from '@mysten/suins';
|
|
8
8
|
import '@mysten/sui/client';
|
|
@@ -589,7 +589,7 @@ declare function isCustomHireEnvelope(text: string): boolean;
|
|
|
589
589
|
|
|
590
590
|
/** The public row shape /v1/open-jobs returns — the indexer read-model of
|
|
591
591
|
* on-chain Openings. `id` is the Opening OBJECT id (0x…). Buyer addresses
|
|
592
|
-
* never appear (registered-agent buyers surface by id); the claiming
|
|
592
|
+
* never appear (registered-agent buyers surface by id); the claiming seller
|
|
593
593
|
* is public. Title + brief are public by design. */
|
|
594
594
|
/** A host-installed veto on sponsored open-board transactions (S.930).
|
|
595
595
|
*
|
|
@@ -646,7 +646,7 @@ declare function listOpenJobs(base: string, filter?: OpenJobFilter): Promise<Ope
|
|
|
646
646
|
* during the Phase 2 drain window). */
|
|
647
647
|
declare function getOpenJob(base: string, id: string): Promise<OpenJobRow>;
|
|
648
648
|
/** Post an open job — THE BUDGET ESCROWS ON-CHAIN NOW. `title` + `brief`
|
|
649
|
-
* are PUBLIC (every
|
|
649
|
+
* are PUBLIC (every seller on the board reads them; they become the funded
|
|
650
650
|
* job's spec verbatim). Returns the tx digest; the Opening object id
|
|
651
651
|
* resolves from the digest (see the CLI/MCP helpers) or the board. */
|
|
652
652
|
declare function postOpenJob(base: string, signer: TransactionSigner, input: {
|
|
@@ -660,7 +660,8 @@ declare function postOpenJob(base: string, signer: TransactionSigner, input: {
|
|
|
660
660
|
/** S.1054 — 0 Anyone (default), 1 Proven, 2 Proven · 4★+. */
|
|
661
661
|
claimPolicy?: number;
|
|
662
662
|
}): Promise<string>;
|
|
663
|
-
/** Review a
|
|
663
|
+
/** Review a settled job you bought — RELEASED or REJECTED (S.1064),
|
|
664
|
+
* always with a real delivery — writes the STARS ON-CHAIN (S.1054:
|
|
664
665
|
* the one public score SSOT; `a2a_escrow::reputation`). Same sponsored
|
|
665
666
|
* rail as every job verb; the server resolves whether this is the
|
|
666
667
|
* seller's first review (lazy score create) or an update/edit. Rare race
|
|
@@ -673,7 +674,7 @@ declare function submitJobReview(base: string, signer: TransactionSigner, input:
|
|
|
673
674
|
/** Integer 1-5. Re-submitting edits your stars in place. */
|
|
674
675
|
stars: number;
|
|
675
676
|
}): Promise<string>;
|
|
676
|
-
/** Claim an open job (
|
|
677
|
+
/** Claim an open job (seller side) — first claim wins ON-CHAIN and mints the
|
|
677
678
|
* funded Job immediately; work starts now. Requires an active registered
|
|
678
679
|
* Agent ID. Returns the claim tx digest. */
|
|
679
680
|
declare function claimOpenJob(base: string, signer: TransactionSigner, openingId: string): Promise<string>;
|
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 { 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-
|
|
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 CETUS_USDC_SUI_POOL, C as CLOCK_ID, d as COIN_REGISTRY, e as ClassifyBalanceChange, f as ClassifyResult, g as CoinMeta,
|
|
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-C0B4y1uP.js';
|
|
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-C0B4y1uP.js';
|
|
6
6
|
import { TransactionObjectArgument, Transaction } from '@mysten/sui/transactions';
|
|
7
7
|
import { SuinsClient } from '@mysten/suins';
|
|
8
8
|
import '@mysten/sui/client';
|
|
@@ -589,7 +589,7 @@ declare function isCustomHireEnvelope(text: string): boolean;
|
|
|
589
589
|
|
|
590
590
|
/** The public row shape /v1/open-jobs returns — the indexer read-model of
|
|
591
591
|
* on-chain Openings. `id` is the Opening OBJECT id (0x…). Buyer addresses
|
|
592
|
-
* never appear (registered-agent buyers surface by id); the claiming
|
|
592
|
+
* never appear (registered-agent buyers surface by id); the claiming seller
|
|
593
593
|
* is public. Title + brief are public by design. */
|
|
594
594
|
/** A host-installed veto on sponsored open-board transactions (S.930).
|
|
595
595
|
*
|
|
@@ -646,7 +646,7 @@ declare function listOpenJobs(base: string, filter?: OpenJobFilter): Promise<Ope
|
|
|
646
646
|
* during the Phase 2 drain window). */
|
|
647
647
|
declare function getOpenJob(base: string, id: string): Promise<OpenJobRow>;
|
|
648
648
|
/** Post an open job — THE BUDGET ESCROWS ON-CHAIN NOW. `title` + `brief`
|
|
649
|
-
* are PUBLIC (every
|
|
649
|
+
* are PUBLIC (every seller on the board reads them; they become the funded
|
|
650
650
|
* job's spec verbatim). Returns the tx digest; the Opening object id
|
|
651
651
|
* resolves from the digest (see the CLI/MCP helpers) or the board. */
|
|
652
652
|
declare function postOpenJob(base: string, signer: TransactionSigner, input: {
|
|
@@ -660,7 +660,8 @@ declare function postOpenJob(base: string, signer: TransactionSigner, input: {
|
|
|
660
660
|
/** S.1054 — 0 Anyone (default), 1 Proven, 2 Proven · 4★+. */
|
|
661
661
|
claimPolicy?: number;
|
|
662
662
|
}): Promise<string>;
|
|
663
|
-
/** Review a
|
|
663
|
+
/** Review a settled job you bought — RELEASED or REJECTED (S.1064),
|
|
664
|
+
* always with a real delivery — writes the STARS ON-CHAIN (S.1054:
|
|
664
665
|
* the one public score SSOT; `a2a_escrow::reputation`). Same sponsored
|
|
665
666
|
* rail as every job verb; the server resolves whether this is the
|
|
666
667
|
* seller's first review (lazy score create) or an update/edit. Rare race
|
|
@@ -673,7 +674,7 @@ declare function submitJobReview(base: string, signer: TransactionSigner, input:
|
|
|
673
674
|
/** Integer 1-5. Re-submitting edits your stars in place. */
|
|
674
675
|
stars: number;
|
|
675
676
|
}): Promise<string>;
|
|
676
|
-
/** Claim an open job (
|
|
677
|
+
/** Claim an open job (seller side) — first claim wins ON-CHAIN and mints the
|
|
677
678
|
* funded Job immediately; work starts now. Requires an active registered
|
|
678
679
|
* Agent ID. Returns the claim tx digest. */
|
|
679
680
|
declare function claimOpenJob(base: string, signer: TransactionSigner, openingId: string): Promise<string>;
|
package/dist/index.js
CHANGED
|
@@ -3322,7 +3322,7 @@ init_coinSelection();
|
|
|
3322
3322
|
init_errors();
|
|
3323
3323
|
init_token_registry();
|
|
3324
3324
|
init_coinSelection();
|
|
3325
|
-
var MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "
|
|
3325
|
+
var MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID = "0x7a9332e167d19e7442fb30740d31a536047da10ab00715402c6fff9e80ae604d";
|
|
3326
3326
|
var MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID = MAINNET_A2A_ESCROW_LATEST_PACKAGE_ID;
|
|
3327
3327
|
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;
|
|
3328
3328
|
var A2A_ESCROW_OPENING_PACKAGE_ID = A2A_ESCROW_LATEST_PACKAGE_ID;
|
|
@@ -3946,15 +3946,24 @@ async function listServices(base, filter = {}) {
|
|
|
3946
3946
|
if (filter.agent) params.set("agent", filter.agent);
|
|
3947
3947
|
if (filter.query) params.set("q", filter.query);
|
|
3948
3948
|
if (filter.category) params.set("category", filter.category);
|
|
3949
|
+
if (filter.rail) params.set("rail", filter.rail);
|
|
3949
3950
|
if (filter.limit !== void 0) params.set("limit", String(filter.limit));
|
|
3950
3951
|
if (filter.offset !== void 0) params.set("offset", String(filter.offset));
|
|
3951
3952
|
const qs = params.size > 0 ? `?${params.toString()}` : "";
|
|
3952
3953
|
const json = await commerceFetchJson(`${base}/services${qs}`);
|
|
3953
3954
|
const services = json.services ?? [];
|
|
3954
|
-
return {
|
|
3955
|
+
return {
|
|
3956
|
+
total: json.total ?? services.length,
|
|
3957
|
+
hireTotal: json.hireTotal,
|
|
3958
|
+
apiTotal: json.apiTotal,
|
|
3959
|
+
services
|
|
3960
|
+
};
|
|
3955
3961
|
}
|
|
3956
3962
|
async function fetchService(base, agent, slug) {
|
|
3957
|
-
const { services
|
|
3963
|
+
const { services } = await listServices(base, { agent });
|
|
3964
|
+
const rows = services.filter(
|
|
3965
|
+
(o) => o.kind !== "api"
|
|
3966
|
+
);
|
|
3958
3967
|
const match = rows.find((o) => o.slug === slug.trim().toLowerCase());
|
|
3959
3968
|
if (!match) {
|
|
3960
3969
|
const live = rows.filter((o) => !o.retired).map((o) => o.slug);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@t2000/sdk",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.36.0",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20"
|
|
6
6
|
},
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@phala/dcap-qvl": "^0.5.2",
|
|
56
56
|
"bn.js": "^5.2.1",
|
|
57
57
|
"eventemitter3": "^5",
|
|
58
|
-
"@t2000/sui-x402": "10.
|
|
58
|
+
"@t2000/sui-x402": "10.36.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/bn.js": "^5.1.5",
|