@t2000/cli 10.1.0 → 10.1.2
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/{chunk-HGOJTYD2.js → chunk-KYPSLUUW.js} +12 -1
- package/dist/{chunk-HGOJTYD2.js.map → chunk-KYPSLUUW.js.map} +1 -1
- package/dist/{dist-55NHJBLJ.js → dist-I27FW5PV.js} +13 -2
- package/dist/{dist-55NHJBLJ.js.map → dist-I27FW5PV.js.map} +1 -1
- package/dist/{dist-SCHDNWY6.js → dist-LX227YY4.js} +2 -2
- package/dist/index.js +3 -3
- package/package.json +3 -3
- /package/dist/{dist-SCHDNWY6.js.map → dist-LX227YY4.js.map} +0 -0
|
@@ -144205,6 +144205,7 @@ async function payWithMpp(args) {
|
|
|
144205
144205
|
{ payTo: requirements.payTo, priceUsdc: price, escrow }
|
|
144206
144206
|
);
|
|
144207
144207
|
}
|
|
144208
|
+
assertNotSelfPayment(signer.getAddress(), requirements.payTo);
|
|
144208
144209
|
const result = await payViaX402({ signer, client, options, reqInit, requirements });
|
|
144209
144210
|
await reportDirectPayment(result, options.url);
|
|
144210
144211
|
return result;
|
|
@@ -144218,6 +144219,7 @@ async function payWithMpp(args) {
|
|
|
144218
144219
|
{ dialect: "mpp-header", signerKind: "zklogin" }
|
|
144219
144220
|
);
|
|
144220
144221
|
}
|
|
144222
|
+
assertNotSelfPayment(signer.getAddress(), headerChallenge.recipient);
|
|
144221
144223
|
const result = await payViaMppHeader({ signer, client, options });
|
|
144222
144224
|
await reportDirectPayment(result, options.url);
|
|
144223
144225
|
return result;
|
|
@@ -144364,6 +144366,15 @@ async function payViaMppHeader(args) {
|
|
|
144364
144366
|
receipt: paymentDigest ? { reference: paymentDigest, timestamp: (/* @__PURE__ */ new Date()).toISOString() } : void 0
|
|
144365
144367
|
};
|
|
144366
144368
|
}
|
|
144369
|
+
function assertNotSelfPayment(payer, payTo) {
|
|
144370
|
+
if (normalizeSuiAddress(payer) === normalizeSuiAddress(payTo)) {
|
|
144371
|
+
throw new T2000Error(
|
|
144372
|
+
"FACILITATOR_REJECTION",
|
|
144373
|
+
"This endpoint pays YOUR OWN wallet \u2014 a self-payment nets a zero balance change, so the seller will not serve it. Nothing was paid. Test your endpoint from a different wallet (e.g. the t2 CLI wallet).",
|
|
144374
|
+
{ payer, payTo }
|
|
144375
|
+
);
|
|
144376
|
+
}
|
|
144377
|
+
}
|
|
144367
144378
|
function assertWithinMaxPrice(price, maxPrice) {
|
|
144368
144379
|
if (maxPrice !== void 0 && price > maxPrice) {
|
|
144369
144380
|
throw new T2000Error(
|
|
@@ -147188,7 +147199,7 @@ CRITICAL: When the user asks to use any external or paid API, names a provider (
|
|
|
147188
147199
|
The wallet also trades on the t2 AGENT ECONOMY (agents.t2000.ai). It can HIRE other agents: browse structured fixed-price agent services with t2000_browse, fund an on-chain USDC escrow job with t2000_job_create, track it with t2000_jobs, settle with t2000_job_settle, and rate the seller with t2000_job_review (escrow protects both sides \u2014 no delivery means an automatic refund path). It can EARN too: list what THIS agent sells with t2000_service_create (no server or endpoint needed), watch incoming jobs with t2000_jobs (role: seller), and deliver with t2000_job_deliver \u2014 the escrow pays this wallet on release.
|
|
147189
147200
|
|
|
147190
147201
|
Spending is the user's own USDC and every t2000_pay call is bounded by maxPrice; t2000_job_create locks the listed service price in escrow. For larger or multi-step spends, state the estimated cost first and proceed once the user is happy. Use t2000_balance to check funds. The v4 wallet is payments-only \u2014 there is no savings / lending surface.`;
|
|
147191
|
-
var PKG_VERSION = "10.1.
|
|
147202
|
+
var PKG_VERSION = "10.1.2";
|
|
147192
147203
|
console.log = (...args) => console.error("[log]", ...args);
|
|
147193
147204
|
console.warn = (...args) => console.error("[warn]", ...args);
|
|
147194
147205
|
async function startMcpServer(opts) {
|
|
@@ -147274,4 +147285,4 @@ mime-types/index.js:
|
|
|
147274
147285
|
@scure/bip39/index.js:
|
|
147275
147286
|
(*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)
|
|
147276
147287
|
*/
|
|
147277
|
-
//# sourceMappingURL=dist-
|
|
147288
|
+
//# sourceMappingURL=dist-I27FW5PV.js.map
|