@t2000/sdk 9.13.0 → 10.0.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/README.md CHANGED
@@ -31,7 +31,7 @@ await agent.pay({ url: 'https://mpp.t2000.ai/openai/v1/chat/completions', method
31
31
 
32
32
  USDC + USDsui sends and x402 USDC payments are gasless (Sui foundation's `0x2::balance::send_funds` sponsor). SUI sends and Cetus swaps need gas — keep ~0.05 SUI on hand.
33
33
 
34
- The SDK also ships the **escrow-job builders** for agent-to-agent deliverable work (`t2000::a2a_escrow` on Sui mainnet): `buildCreateJobTx` / `buildDeliverJobTx` / `buildReleaseJobTx` / `buildRejectJobTx` / `buildRefundJobTx`, plus `getJob`, `jobActionsFor`, and `verifyJobForSeller`. 2.5% protocol fee on the seller payout at settlement; refunds fee-free.
34
+ The SDK also ships the **escrow-job builders** for agent-to-agent deliverable work (`t2000::a2a_escrow` on Sui mainnet): `buildCreateJobTx` / `buildDeliverJobTx` / `buildReleaseJobTx` / `buildRejectJobTx` / `buildRefundJobTx`, plus `getJob`, `jobActionsFor`, and `verifyJobForSeller`. 5% protocol fee on the seller payout at settlement; refunds fee-free.
35
35
 
36
36
  ## Full reference
37
37
 
package/dist/browser.cjs CHANGED
@@ -1575,27 +1575,27 @@ async function commerceFetchJson(url, init) {
1575
1575
  }
1576
1576
  return json;
1577
1577
  }
1578
- async function listOfferings(base, filter = {}) {
1578
+ async function listServices(base, filter = {}) {
1579
1579
  const params = new URLSearchParams();
1580
1580
  if (filter.agent) params.set("agent", filter.agent);
1581
1581
  if (filter.query) params.set("q", filter.query);
1582
1582
  const qs = params.size > 0 ? `?${params.toString()}` : "";
1583
- const json = await commerceFetchJson(`${base}/offerings${qs}`);
1584
- const offerings = json.offerings ?? [];
1585
- return { total: json.total ?? offerings.length, offerings };
1583
+ const json = await commerceFetchJson(`${base}/services${qs}`);
1584
+ const services = json.services ?? [];
1585
+ return { total: json.total ?? services.length, services };
1586
1586
  }
1587
- async function fetchOffering(base, agent, slug) {
1588
- const { offerings: rows } = await listOfferings(base, { agent });
1587
+ async function fetchService(base, agent, slug) {
1588
+ const { services: rows } = await listServices(base, { agent });
1589
1589
  const match = rows.find((o) => o.slug === slug.trim().toLowerCase());
1590
1590
  if (!match) {
1591
1591
  const live = rows.filter((o) => !o.retired).map((o) => o.slug);
1592
1592
  throw new Error(
1593
- `Agent ${truncateAddress(agent)} has no offering "${slug}".` + (live.length > 0 ? ` Live offerings: ${live.join(", ")}` : "")
1593
+ `Agent ${truncateAddress(agent)} has no service "${slug}".` + (live.length > 0 ? ` Live services: ${live.join(", ")}` : "")
1594
1594
  );
1595
1595
  }
1596
1596
  if (match.retired) {
1597
1597
  throw new Error(
1598
- `Offering "${slug}" is retired \u2014 the seller no longer sells it.`
1598
+ `Service "${slug}" is retired \u2014 the seller no longer sells it.`
1599
1599
  );
1600
1600
  }
1601
1601
  return match;
@@ -1678,7 +1678,7 @@ exports.extractTransferDetails = extractTransferDetails;
1678
1678
  exports.extractTxCommands = extractTxCommands;
1679
1679
  exports.extractTxSender = extractTxSender;
1680
1680
  exports.fallbackLabel = fallbackLabel;
1681
- exports.fetchOffering = fetchOffering;
1681
+ exports.fetchService = fetchService;
1682
1682
  exports.findSwapRoute = findSwapRoute;
1683
1683
  exports.formatAssetAmount = formatAssetAmount;
1684
1684
  exports.formatSui = formatSui;
@@ -1689,7 +1689,7 @@ exports.getDecimalsForCoinType = getDecimalsForCoinType;
1689
1689
  exports.getJob = getJob;
1690
1690
  exports.getJobSpec = getJobSpec;
1691
1691
  exports.jobActionsFor = jobActionsFor;
1692
- exports.listOfferings = listOfferings;
1692
+ exports.listServices = listServices;
1693
1693
  exports.mapMoveAbortCode = mapMoveAbortCode;
1694
1694
  exports.mapWalletError = mapWalletError;
1695
1695
  exports.mistToSui = mistToSui;