agentcash 0.4.1 → 0.4.3
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/cjs/run-server.cjs +184 -233
- package/dist/esm/chunk-77BBSEYX.js +48 -0
- package/dist/esm/chunk-77BBSEYX.js.map +1 -0
- package/dist/esm/{chunk-DCP6SZGV.js → chunk-7EFFVT75.js} +3 -3
- package/dist/esm/{chunk-7DEM3OEU.js → chunk-HHZMUAUM.js} +9 -5
- package/dist/esm/{chunk-7DEM3OEU.js.map → chunk-HHZMUAUM.js.map} +1 -1
- package/dist/esm/chunk-I2B7IMZG.js +118 -0
- package/dist/esm/chunk-I2B7IMZG.js.map +1 -0
- package/dist/esm/{chunk-7LPATNAW.js → chunk-ODPRAJOO.js} +2 -2
- package/dist/esm/{chunk-TRGCJSV2.js → chunk-OT7CX4QI.js} +6 -4
- package/dist/esm/{chunk-TRGCJSV2.js.map → chunk-OT7CX4QI.js.map} +1 -1
- package/dist/esm/{chunk-SHAJ42CH.js → chunk-RBBAPXT5.js} +3 -111
- package/dist/esm/chunk-RBBAPXT5.js.map +1 -0
- package/dist/esm/{chunk-EO4BIJAO.js → chunk-TRPO7BKD.js} +32 -54
- package/dist/esm/chunk-TRPO7BKD.js.map +1 -0
- package/dist/esm/{commands-WXPPIUX3.js → commands-DOUM3W6U.js} +12 -9
- package/dist/esm/{commands-WXPPIUX3.js.map → commands-DOUM3W6U.js.map} +1 -1
- package/dist/esm/{fund-3DJLQ6CN.js → fund-34STW6AQ.js} +5 -4
- package/dist/esm/{fund-3DJLQ6CN.js.map → fund-34STW6AQ.js.map} +1 -1
- package/dist/esm/index.js +9 -9
- package/dist/esm/{install-N5BZ677Y.js → install-36NUKANM.js} +8 -6
- package/dist/esm/{install-N5BZ677Y.js.map → install-36NUKANM.js.map} +1 -1
- package/dist/esm/lib.js +2 -4
- package/dist/esm/{server-PMG7V6KQ.js → server-T5JCB7MM.js} +18 -14
- package/dist/esm/{server-PMG7V6KQ.js.map → server-T5JCB7MM.js.map} +1 -1
- package/dist/esm/shared/operations/index.js +19 -6
- package/dist/esm/shared/operations/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/esm/chunk-2CFQ7ILC.js +0 -22
- package/dist/esm/chunk-2CFQ7ILC.js.map +0 -1
- package/dist/esm/chunk-EO4BIJAO.js.map +0 -1
- package/dist/esm/chunk-SHAJ42CH.js.map +0 -1
- /package/dist/esm/{chunk-DCP6SZGV.js.map → chunk-7EFFVT75.js.map} +0 -0
- /package/dist/esm/{chunk-7LPATNAW.js.map → chunk-ODPRAJOO.js.map} +0 -0
package/dist/cjs/run-server.cjs
CHANGED
|
@@ -62864,10 +62864,6 @@ init_cjs_shims();
|
|
|
62864
62864
|
// src/shared/log.ts
|
|
62865
62865
|
init_cjs_shims();
|
|
62866
62866
|
|
|
62867
|
-
// src/shared/neverthrow/fs/index.ts
|
|
62868
|
-
init_cjs_shims();
|
|
62869
|
-
var import_promises = require("fs/promises");
|
|
62870
|
-
|
|
62871
62867
|
// ../../internal/neverthrow/dist/index.js
|
|
62872
62868
|
init_cjs_shims();
|
|
62873
62869
|
|
|
@@ -63375,6 +63371,8 @@ function err2(type4, surface2, error48) {
|
|
|
63375
63371
|
}
|
|
63376
63372
|
|
|
63377
63373
|
// src/shared/neverthrow/fs/index.ts
|
|
63374
|
+
init_cjs_shims();
|
|
63375
|
+
var import_promises = require("fs/promises");
|
|
63378
63376
|
var errorType = "fs";
|
|
63379
63377
|
var fsErr = (surface2, error48) => err2(errorType, surface2, error48);
|
|
63380
63378
|
var fsResultFromPromise = (surface2, promise3, error48) => resultFromPromise(errorType, surface2, promise3, error48);
|
|
@@ -63431,14 +63429,17 @@ function migrateFromLegacy() {
|
|
|
63431
63429
|
);
|
|
63432
63430
|
}
|
|
63433
63431
|
}
|
|
63434
|
-
|
|
63435
|
-
|
|
63436
|
-
|
|
63437
|
-
migrateFromLegacy();
|
|
63438
|
-
var configFile = (name) => {
|
|
63432
|
+
var initialized = false;
|
|
63433
|
+
function ensureBaseDir() {
|
|
63434
|
+
if (initialized) return;
|
|
63439
63435
|
if (!fs.existsSync(BASE_DIRECTORY)) {
|
|
63440
63436
|
fs.mkdirSync(BASE_DIRECTORY, { recursive: true });
|
|
63441
63437
|
}
|
|
63438
|
+
migrateFromLegacy();
|
|
63439
|
+
initialized = true;
|
|
63440
|
+
}
|
|
63441
|
+
var configFile = (name) => {
|
|
63442
|
+
ensureBaseDir();
|
|
63442
63443
|
const filePath = (0, import_path.join)(BASE_DIRECTORY, name);
|
|
63443
63444
|
return filePath;
|
|
63444
63445
|
};
|
|
@@ -63453,7 +63454,22 @@ function isVerbose() {
|
|
|
63453
63454
|
}
|
|
63454
63455
|
|
|
63455
63456
|
// src/shared/log.ts
|
|
63456
|
-
var
|
|
63457
|
+
var logFile;
|
|
63458
|
+
function getLogFile() {
|
|
63459
|
+
if (logFile === void 0) {
|
|
63460
|
+
const result = resultFromThrowable(
|
|
63461
|
+
"log",
|
|
63462
|
+
"log",
|
|
63463
|
+
() => configFile("mcp.log"),
|
|
63464
|
+
(e) => ({
|
|
63465
|
+
cause: "log_init",
|
|
63466
|
+
message: e instanceof Error ? e.message : String(e)
|
|
63467
|
+
})
|
|
63468
|
+
);
|
|
63469
|
+
logFile = result.isOk() ? result.value : null;
|
|
63470
|
+
}
|
|
63471
|
+
return logFile;
|
|
63472
|
+
}
|
|
63457
63473
|
function format(args) {
|
|
63458
63474
|
return args.map(
|
|
63459
63475
|
(a) => typeof a === "object" && a !== null ? JSON.stringify(a) : String(a)
|
|
@@ -63463,7 +63479,8 @@ function write(level, msg, args) {
|
|
|
63463
63479
|
const formatted = args.length ? `${msg} ${format(args)}` : msg;
|
|
63464
63480
|
const line = `[${(/* @__PURE__ */ new Date()).toISOString()}] [${level}] ${formatted}
|
|
63465
63481
|
`;
|
|
63466
|
-
|
|
63482
|
+
const file3 = getLogFile();
|
|
63483
|
+
if (file3) safeAppendFile("log", file3, line);
|
|
63467
63484
|
if (isVerbose()) {
|
|
63468
63485
|
console.error(`[agentcash] ${formatted}`);
|
|
63469
63486
|
}
|
|
@@ -63472,7 +63489,9 @@ var log = {
|
|
|
63472
63489
|
info: (msg, ...args) => write("INFO", msg, args),
|
|
63473
63490
|
error: (msg, ...args) => write("ERROR", msg, args),
|
|
63474
63491
|
debug: (msg, ...args) => isVerbose() && write("DEBUG", msg, args),
|
|
63475
|
-
path
|
|
63492
|
+
get path() {
|
|
63493
|
+
return getLogFile();
|
|
63494
|
+
}
|
|
63476
63495
|
};
|
|
63477
63496
|
|
|
63478
63497
|
// src/server/index.ts
|
|
@@ -88775,19 +88794,19 @@ var ExactEvmScheme = class {
|
|
|
88775
88794
|
}
|
|
88776
88795
|
};
|
|
88777
88796
|
|
|
88778
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
88797
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/client/index.js
|
|
88779
88798
|
init_cjs_shims();
|
|
88780
88799
|
|
|
88781
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
88800
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/Expires.js
|
|
88782
88801
|
init_cjs_shims();
|
|
88783
88802
|
function minutes(n) {
|
|
88784
88803
|
return new Date(Date.now() + n * 60 * 1e3).toISOString();
|
|
88785
88804
|
}
|
|
88786
88805
|
|
|
88787
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
88806
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/client/Methods.js
|
|
88788
88807
|
init_cjs_shims();
|
|
88789
88808
|
|
|
88790
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
88809
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/Credential.js
|
|
88791
88810
|
init_cjs_shims();
|
|
88792
88811
|
|
|
88793
88812
|
// ../../../node_modules/.pnpm/ox@0.12.1_typescript@5.9.3_zod@4.3.6/node_modules/ox/_esm/index.js
|
|
@@ -91210,7 +91229,7 @@ function verify3(options) {
|
|
|
91210
91229
|
// ../../../node_modules/.pnpm/ox@0.12.1_typescript@5.9.3_zod@4.3.6/node_modules/ox/_esm/index.js
|
|
91211
91230
|
init_Withdrawal();
|
|
91212
91231
|
|
|
91213
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
91232
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/Challenge.js
|
|
91214
91233
|
var Challenge_exports = {};
|
|
91215
91234
|
__export(Challenge_exports, {
|
|
91216
91235
|
Schema: () => Schema,
|
|
@@ -91224,27 +91243,27 @@ __export(Challenge_exports, {
|
|
|
91224
91243
|
});
|
|
91225
91244
|
init_cjs_shims();
|
|
91226
91245
|
|
|
91227
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
91246
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/PaymentRequest.js
|
|
91228
91247
|
init_cjs_shims();
|
|
91229
91248
|
function deserialize(encoded) {
|
|
91230
91249
|
const json3 = Base64_exports.toString(encoded);
|
|
91231
91250
|
return JSON.parse(json3);
|
|
91232
91251
|
}
|
|
91233
|
-
function fromIntent(
|
|
91234
|
-
return
|
|
91252
|
+
function fromIntent(method, request) {
|
|
91253
|
+
return method.schema.request.parse(request);
|
|
91235
91254
|
}
|
|
91236
91255
|
function serialize(request) {
|
|
91237
91256
|
const json3 = JSON.stringify(request);
|
|
91238
91257
|
return Base64_exports.fromString(json3, { pad: false, url: true });
|
|
91239
91258
|
}
|
|
91240
91259
|
|
|
91241
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
91260
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/zod.js
|
|
91242
91261
|
init_cjs_shims();
|
|
91243
91262
|
|
|
91244
91263
|
// ../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/mini/index.js
|
|
91245
91264
|
init_cjs_shims();
|
|
91246
91265
|
|
|
91247
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
91266
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/zod.js
|
|
91248
91267
|
function amount() {
|
|
91249
91268
|
return external_exports2.string().check(external_exports2.regex(/^\d+(\.\d+)?$/, "Invalid amount"));
|
|
91250
91269
|
}
|
|
@@ -91257,13 +91276,8 @@ function hash4() {
|
|
|
91257
91276
|
function signature() {
|
|
91258
91277
|
return external_exports2.string().check(external_exports2.regex(/^0x[0-9a-fA-F]+$/, "Invalid signature"));
|
|
91259
91278
|
}
|
|
91260
|
-
function unwrapOptional(schema) {
|
|
91261
|
-
if (schema._zod.def.type === "optional")
|
|
91262
|
-
return schema._zod.def.innerType;
|
|
91263
|
-
return schema;
|
|
91264
|
-
}
|
|
91265
91279
|
|
|
91266
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
91280
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/Challenge.js
|
|
91267
91281
|
var Schema = object({
|
|
91268
91282
|
/** Optional human-readable description of the payment. */
|
|
91269
91283
|
description: optional(string2()),
|
|
@@ -91298,15 +91312,15 @@ function from9(parameters, options) {
|
|
|
91298
91312
|
...expires && { expires }
|
|
91299
91313
|
});
|
|
91300
91314
|
}
|
|
91301
|
-
function fromIntent2(
|
|
91302
|
-
const {
|
|
91315
|
+
function fromIntent2(method, parameters) {
|
|
91316
|
+
const { name: methodName, intent } = method;
|
|
91303
91317
|
const { description, digest, expires, id, realm, secretKey } = parameters;
|
|
91304
|
-
const request = fromIntent(
|
|
91318
|
+
const request = fromIntent(method, parameters.request);
|
|
91305
91319
|
return from9({
|
|
91306
91320
|
...id ? { id } : { secretKey },
|
|
91307
91321
|
realm,
|
|
91308
|
-
method,
|
|
91309
|
-
intent
|
|
91322
|
+
method: methodName,
|
|
91323
|
+
intent,
|
|
91310
91324
|
request,
|
|
91311
91325
|
description,
|
|
91312
91326
|
digest,
|
|
@@ -91387,7 +91401,7 @@ function constantTimeEqual(a, b) {
|
|
|
91387
91401
|
return result === 0;
|
|
91388
91402
|
}
|
|
91389
91403
|
|
|
91390
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
91404
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/Credential.js
|
|
91391
91405
|
function serialize3(credential) {
|
|
91392
91406
|
const wire = {
|
|
91393
91407
|
challenge: {
|
|
@@ -91402,11 +91416,19 @@ function serialize3(credential) {
|
|
|
91402
91416
|
return `Payment ${encoded}`;
|
|
91403
91417
|
}
|
|
91404
91418
|
|
|
91405
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
91406
|
-
init_cjs_shims();
|
|
91407
|
-
|
|
91408
|
-
// ../../../node_modules/.pnpm/mppx@0.1.1_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_405dfb80e1c7f6ab13ff44820fe9b86a/node_modules/mppx/dist/Intent.js
|
|
91419
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/Method.js
|
|
91409
91420
|
init_cjs_shims();
|
|
91421
|
+
function from10(method) {
|
|
91422
|
+
return method;
|
|
91423
|
+
}
|
|
91424
|
+
function toClient(method, options) {
|
|
91425
|
+
const { context: context2, createCredential } = options;
|
|
91426
|
+
return {
|
|
91427
|
+
...method,
|
|
91428
|
+
context: context2,
|
|
91429
|
+
createCredential
|
|
91430
|
+
};
|
|
91431
|
+
}
|
|
91410
91432
|
|
|
91411
91433
|
// ../../../node_modules/.pnpm/viem@2.46.1_bufferutil@4.1.0_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_esm/index.js
|
|
91412
91434
|
init_cjs_shims();
|
|
@@ -93274,9 +93296,9 @@ function watchContractEvent(client, parameters) {
|
|
|
93274
93296
|
if (fromBlock !== void 0)
|
|
93275
93297
|
previousBlockNumber = fromBlock - 1n;
|
|
93276
93298
|
let filter;
|
|
93277
|
-
let
|
|
93299
|
+
let initialized2 = false;
|
|
93278
93300
|
const unwatch = poll(async () => {
|
|
93279
|
-
if (!
|
|
93301
|
+
if (!initialized2) {
|
|
93280
93302
|
try {
|
|
93281
93303
|
filter = await getAction(client, createContractEventFilter, "createContractEventFilter")({
|
|
93282
93304
|
abi,
|
|
@@ -93288,7 +93310,7 @@ function watchContractEvent(client, parameters) {
|
|
|
93288
93310
|
});
|
|
93289
93311
|
} catch {
|
|
93290
93312
|
}
|
|
93291
|
-
|
|
93313
|
+
initialized2 = true;
|
|
93292
93314
|
return;
|
|
93293
93315
|
}
|
|
93294
93316
|
try {
|
|
@@ -93321,7 +93343,7 @@ function watchContractEvent(client, parameters) {
|
|
|
93321
93343
|
emit.onLogs([log2]);
|
|
93322
93344
|
} catch (err3) {
|
|
93323
93345
|
if (filter && err3 instanceof InvalidInputRpcError)
|
|
93324
|
-
|
|
93346
|
+
initialized2 = false;
|
|
93325
93347
|
emit.onError?.(err3);
|
|
93326
93348
|
}
|
|
93327
93349
|
}, {
|
|
@@ -94780,7 +94802,7 @@ var SignatureErc8010_exports = {};
|
|
|
94780
94802
|
__export(SignatureErc8010_exports, {
|
|
94781
94803
|
InvalidWrappedSignatureError: () => InvalidWrappedSignatureError,
|
|
94782
94804
|
assert: () => assert7,
|
|
94783
|
-
from: () =>
|
|
94805
|
+
from: () => from11,
|
|
94784
94806
|
magicBytes: () => magicBytes,
|
|
94785
94807
|
suffixParameters: () => suffixParameters,
|
|
94786
94808
|
unwrap: () => unwrap,
|
|
@@ -94799,7 +94821,7 @@ function assert7(value) {
|
|
|
94799
94821
|
} else
|
|
94800
94822
|
assert6(value.authorization);
|
|
94801
94823
|
}
|
|
94802
|
-
function
|
|
94824
|
+
function from11(value) {
|
|
94803
94825
|
if (typeof value === "string")
|
|
94804
94826
|
return unwrap(value);
|
|
94805
94827
|
return value;
|
|
@@ -95120,7 +95142,7 @@ var SignatureErc6492_exports = {};
|
|
|
95120
95142
|
__export(SignatureErc6492_exports, {
|
|
95121
95143
|
InvalidWrappedSignatureError: () => InvalidWrappedSignatureError2,
|
|
95122
95144
|
assert: () => assert8,
|
|
95123
|
-
from: () =>
|
|
95145
|
+
from: () => from12,
|
|
95124
95146
|
magicBytes: () => magicBytes2,
|
|
95125
95147
|
universalSignatureValidatorAbi: () => universalSignatureValidatorAbi,
|
|
95126
95148
|
universalSignatureValidatorBytecode: () => universalSignatureValidatorBytecode,
|
|
@@ -95181,7 +95203,7 @@ function assert8(wrapped) {
|
|
|
95181
95203
|
if (slice(wrapped, -32) !== magicBytes2)
|
|
95182
95204
|
throw new InvalidWrappedSignatureError2(wrapped);
|
|
95183
95205
|
}
|
|
95184
|
-
function
|
|
95206
|
+
function from12(wrapped) {
|
|
95185
95207
|
if (typeof wrapped === "string")
|
|
95186
95208
|
return unwrap2(wrapped);
|
|
95187
95209
|
return wrapped;
|
|
@@ -96000,116 +96022,10 @@ init_getAddress2();
|
|
|
96000
96022
|
init_toFunctionSelector();
|
|
96001
96023
|
init_formatUnits();
|
|
96002
96024
|
|
|
96003
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
96004
|
-
function from12(intent) {
|
|
96005
|
-
return intent;
|
|
96006
|
-
}
|
|
96007
|
-
var charge = from12({
|
|
96008
|
-
name: "charge",
|
|
96009
|
-
schema: {
|
|
96010
|
-
request: pipe(
|
|
96011
|
-
object({
|
|
96012
|
-
amount: amount(),
|
|
96013
|
-
currency: string2(),
|
|
96014
|
-
decimals: number2(),
|
|
96015
|
-
description: optional(string2()),
|
|
96016
|
-
expires: _default2(datetime4(), () => minutes(5)),
|
|
96017
|
-
externalId: optional(string2()),
|
|
96018
|
-
recipient: optional(string2())
|
|
96019
|
-
}),
|
|
96020
|
-
// Note: Since the spec states we must have `amount` as a base unit, we
|
|
96021
|
-
// will transform the amount to decimal units based on `decimals`.
|
|
96022
|
-
transform(({ amount: amount2, decimals: decimals2, ...rest }) => ({
|
|
96023
|
-
...rest,
|
|
96024
|
-
amount: parseUnits(amount2, decimals2).toString()
|
|
96025
|
-
}))
|
|
96026
|
-
)
|
|
96027
|
-
}
|
|
96028
|
-
});
|
|
96029
|
-
var session = from12({
|
|
96030
|
-
name: "session",
|
|
96031
|
-
schema: {
|
|
96032
|
-
request: pipe(object({
|
|
96033
|
-
amount: amount(),
|
|
96034
|
-
unitType: string2(),
|
|
96035
|
-
currency: string2(),
|
|
96036
|
-
decimals: number2(),
|
|
96037
|
-
recipient: optional(string2()),
|
|
96038
|
-
suggestedDeposit: optional(amount())
|
|
96039
|
-
}), transform(({ amount: amount2, decimals: decimals2, suggestedDeposit, ...rest }) => ({
|
|
96040
|
-
...rest,
|
|
96041
|
-
amount: parseUnits(amount2, decimals2).toString(),
|
|
96042
|
-
...suggestedDeposit ? { suggestedDeposit: parseUnits(suggestedDeposit, decimals2).toString() } : {}
|
|
96043
|
-
})))
|
|
96044
|
-
}
|
|
96045
|
-
});
|
|
96046
|
-
function shapeOf(intent) {
|
|
96047
|
-
const { request } = intent.schema;
|
|
96048
|
-
if ("shape" in request)
|
|
96049
|
-
return request.shape;
|
|
96050
|
-
return request._zod.def.in.shape;
|
|
96051
|
-
}
|
|
96052
|
-
|
|
96053
|
-
// ../../../node_modules/.pnpm/mppx@0.1.1_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_405dfb80e1c7f6ab13ff44820fe9b86a/node_modules/mppx/dist/MethodIntent.js
|
|
96054
|
-
function fromIntent3(intent, options) {
|
|
96055
|
-
const { name } = intent;
|
|
96056
|
-
const { method, schema } = options;
|
|
96057
|
-
const requestShape = shapeOf(intent);
|
|
96058
|
-
const methodDetails = schema.request?.methodDetails;
|
|
96059
|
-
const requires = schema.request?.requires ?? [];
|
|
96060
|
-
const requestInputShape = {};
|
|
96061
|
-
for (const [key, field] of Object.entries(requestShape)) {
|
|
96062
|
-
if (requires.includes(key))
|
|
96063
|
-
requestInputShape[key] = unwrapOptional(field);
|
|
96064
|
-
else
|
|
96065
|
-
requestInputShape[key] = field;
|
|
96066
|
-
}
|
|
96067
|
-
const methodDetailsKeys = [];
|
|
96068
|
-
if (methodDetails)
|
|
96069
|
-
for (const [key, field] of Object.entries(methodDetails.shape)) {
|
|
96070
|
-
requestInputShape[key] = field;
|
|
96071
|
-
methodDetailsKeys.push(key);
|
|
96072
|
-
}
|
|
96073
|
-
const intentRequest = intent.schema.request;
|
|
96074
|
-
const hasPipe = !("shape" in intentRequest);
|
|
96075
|
-
const request = pipe(object(requestInputShape), transform((input) => {
|
|
96076
|
-
const transformed = hasPipe ? intentRequest.parse(input) : input;
|
|
96077
|
-
const result = {};
|
|
96078
|
-
const details = {};
|
|
96079
|
-
for (const [key, value] of Object.entries(transformed)) {
|
|
96080
|
-
result[key] = value;
|
|
96081
|
-
}
|
|
96082
|
-
for (const key of methodDetailsKeys) {
|
|
96083
|
-
const value = input[key];
|
|
96084
|
-
if (value !== void 0)
|
|
96085
|
-
details[key] = value;
|
|
96086
|
-
}
|
|
96087
|
-
if (Object.keys(details).length > 0)
|
|
96088
|
-
result.methodDetails = details;
|
|
96089
|
-
return result;
|
|
96090
|
-
}));
|
|
96091
|
-
return {
|
|
96092
|
-
method,
|
|
96093
|
-
name,
|
|
96094
|
-
schema: {
|
|
96095
|
-
credential: { payload: schema.credential.payload },
|
|
96096
|
-
request
|
|
96097
|
-
}
|
|
96098
|
-
};
|
|
96099
|
-
}
|
|
96100
|
-
function toClient(intent, options) {
|
|
96101
|
-
const { context: context2, createCredential } = options;
|
|
96102
|
-
return {
|
|
96103
|
-
...intent,
|
|
96104
|
-
context: context2,
|
|
96105
|
-
createCredential
|
|
96106
|
-
};
|
|
96107
|
-
}
|
|
96108
|
-
|
|
96109
|
-
// ../../../node_modules/.pnpm/mppx@0.1.1_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_405dfb80e1c7f6ab13ff44820fe9b86a/node_modules/mppx/dist/tempo/client/MethodIntents.js
|
|
96025
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/client/index.js
|
|
96110
96026
|
init_cjs_shims();
|
|
96111
96027
|
|
|
96112
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
96028
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/client/Charge.js
|
|
96113
96029
|
init_cjs_shims();
|
|
96114
96030
|
|
|
96115
96031
|
// ../../../node_modules/.pnpm/viem@2.46.1_bufferutil@4.1.0_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_esm/actions/index.js
|
|
@@ -102330,7 +102246,7 @@ async function updateSync(client, parameters) {
|
|
|
102330
102246
|
return { receipt };
|
|
102331
102247
|
}
|
|
102332
102248
|
|
|
102333
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
102249
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/viem/Account.js
|
|
102334
102250
|
init_cjs_shims();
|
|
102335
102251
|
|
|
102336
102252
|
// ../../../node_modules/.pnpm/viem@2.46.1_bufferutil@4.1.0_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_esm/accounts/index.js
|
|
@@ -102493,7 +102409,7 @@ function privateKeyToAccount(privateKey, options = {}) {
|
|
|
102493
102409
|
// ../../../node_modules/.pnpm/viem@2.46.1_bufferutil@4.1.0_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_esm/accounts/index.js
|
|
102494
102410
|
init_parseAccount();
|
|
102495
102411
|
|
|
102496
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
102412
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/viem/Account.js
|
|
102497
102413
|
function getResolver(parameters = {}) {
|
|
102498
102414
|
const { account: defaultAccount } = parameters;
|
|
102499
102415
|
return (client, { account: override } = {}) => {
|
|
@@ -102507,7 +102423,7 @@ function getResolver(parameters = {}) {
|
|
|
102507
102423
|
};
|
|
102508
102424
|
}
|
|
102509
102425
|
|
|
102510
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
102426
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/viem/Client.js
|
|
102511
102427
|
init_cjs_shims();
|
|
102512
102428
|
function getResolver2(parameters) {
|
|
102513
102429
|
const { chain: chain2, getClient, rpcUrl: rpcUrl2 } = parameters;
|
|
@@ -102527,7 +102443,7 @@ function getResolver2(parameters) {
|
|
|
102527
102443
|
};
|
|
102528
102444
|
}
|
|
102529
102445
|
|
|
102530
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
102446
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/Attribution.js
|
|
102531
102447
|
init_cjs_shims();
|
|
102532
102448
|
var tag = Hex_exports.slice(Hash_exports.keccak256(Bytes_exports.fromString("mpp"), { as: "Hex" }), 0, 4);
|
|
102533
102449
|
var version6 = 1;
|
|
@@ -102548,10 +102464,23 @@ function encode5(parameters) {
|
|
|
102548
102464
|
return Hex_exports.fromBytes(buf);
|
|
102549
102465
|
}
|
|
102550
102466
|
|
|
102551
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
102467
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/internal/defaults.js
|
|
102468
|
+
init_cjs_shims();
|
|
102469
|
+
var rpcUrl = {
|
|
102470
|
+
4217: "https://rpc.tempo.xyz",
|
|
102471
|
+
42431: "https://rpc.moderato.tempo.xyz"
|
|
102472
|
+
};
|
|
102473
|
+
var escrowContract = {
|
|
102474
|
+
4217: "0x0901aED692C755b870F9605E56BAA66C35BEfF69",
|
|
102475
|
+
42431: "0x542831e3E4Ace07559b7C8787395f4Fb99F70787"
|
|
102476
|
+
};
|
|
102477
|
+
var decimals = 6;
|
|
102478
|
+
|
|
102479
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/Methods.js
|
|
102552
102480
|
init_cjs_shims();
|
|
102553
|
-
var
|
|
102554
|
-
|
|
102481
|
+
var charge = from10({
|
|
102482
|
+
name: "tempo",
|
|
102483
|
+
intent: "charge",
|
|
102555
102484
|
schema: {
|
|
102556
102485
|
credential: {
|
|
102557
102486
|
payload: discriminatedUnion("type", [
|
|
@@ -102559,36 +102488,51 @@ var charge2 = fromIntent3(charge, {
|
|
|
102559
102488
|
object({ signature: signature(), type: literal("transaction") })
|
|
102560
102489
|
])
|
|
102561
102490
|
},
|
|
102562
|
-
request: {
|
|
102563
|
-
|
|
102564
|
-
|
|
102565
|
-
|
|
102566
|
-
|
|
102567
|
-
|
|
102568
|
-
|
|
102569
|
-
|
|
102491
|
+
request: pipe(object({
|
|
102492
|
+
amount: amount(),
|
|
102493
|
+
chainId: optional(number2()),
|
|
102494
|
+
currency: string2(),
|
|
102495
|
+
decimals: number2(),
|
|
102496
|
+
description: optional(string2()),
|
|
102497
|
+
expires: _default2(datetime4(), () => minutes(5)),
|
|
102498
|
+
externalId: optional(string2()),
|
|
102499
|
+
feePayer: optional(pipe(union([boolean2(), custom()]), transform((v) => typeof v === "object" ? true : v))),
|
|
102500
|
+
memo: optional(hash4()),
|
|
102501
|
+
recipient: optional(string2())
|
|
102502
|
+
}), transform(({ amount: amount2, chainId, decimals: decimals2, feePayer, memo, ...rest }) => ({
|
|
102503
|
+
...rest,
|
|
102504
|
+
amount: parseUnits(amount2, decimals2).toString(),
|
|
102505
|
+
...chainId !== void 0 || feePayer !== void 0 || memo !== void 0 ? {
|
|
102506
|
+
methodDetails: {
|
|
102507
|
+
...chainId !== void 0 && { chainId },
|
|
102508
|
+
...feePayer !== void 0 && { feePayer },
|
|
102509
|
+
...memo !== void 0 && { memo }
|
|
102510
|
+
}
|
|
102511
|
+
} : {}
|
|
102512
|
+
})))
|
|
102570
102513
|
}
|
|
102571
102514
|
});
|
|
102572
|
-
var
|
|
102573
|
-
|
|
102515
|
+
var session = from10({
|
|
102516
|
+
name: "tempo",
|
|
102517
|
+
intent: "session",
|
|
102574
102518
|
schema: {
|
|
102575
102519
|
credential: {
|
|
102576
102520
|
payload: discriminatedUnion("action", [
|
|
102577
102521
|
object({
|
|
102578
102522
|
action: literal("open"),
|
|
102579
|
-
type: literal("transaction"),
|
|
102580
|
-
channelId: hash4(),
|
|
102581
|
-
transaction: signature(),
|
|
102582
102523
|
authorizedSigner: optional(string2()),
|
|
102524
|
+
channelId: hash4(),
|
|
102583
102525
|
cumulativeAmount: amount(),
|
|
102584
|
-
signature: signature()
|
|
102526
|
+
signature: signature(),
|
|
102527
|
+
transaction: signature(),
|
|
102528
|
+
type: literal("transaction")
|
|
102585
102529
|
}),
|
|
102586
102530
|
object({
|
|
102587
102531
|
action: literal("topUp"),
|
|
102588
|
-
|
|
102532
|
+
additionalDeposit: amount(),
|
|
102589
102533
|
channelId: hash4(),
|
|
102590
102534
|
transaction: signature(),
|
|
102591
|
-
|
|
102535
|
+
type: literal("transaction")
|
|
102592
102536
|
}),
|
|
102593
102537
|
object({
|
|
102594
102538
|
action: literal("voucher"),
|
|
@@ -102604,33 +102548,37 @@ var session2 = fromIntent3(session, {
|
|
|
102604
102548
|
})
|
|
102605
102549
|
])
|
|
102606
102550
|
},
|
|
102607
|
-
request: {
|
|
102608
|
-
|
|
102609
|
-
|
|
102610
|
-
|
|
102611
|
-
|
|
102612
|
-
|
|
102613
|
-
|
|
102614
|
-
|
|
102615
|
-
|
|
102616
|
-
|
|
102551
|
+
request: pipe(object({
|
|
102552
|
+
amount: amount(),
|
|
102553
|
+
chainId: optional(number2()),
|
|
102554
|
+
channelId: optional(hash4()),
|
|
102555
|
+
currency: string2(),
|
|
102556
|
+
decimals: number2(),
|
|
102557
|
+
escrowContract: optional(string2()),
|
|
102558
|
+
feePayer: optional(pipe(union([boolean2(), custom()]), transform((v) => typeof v === "object" ? true : v))),
|
|
102559
|
+
minVoucherDelta: optional(amount()),
|
|
102560
|
+
recipient: optional(string2()),
|
|
102561
|
+
suggestedDeposit: optional(amount()),
|
|
102562
|
+
unitType: string2()
|
|
102563
|
+
}), transform(({ amount: amount2, chainId, channelId, decimals: decimals2, escrowContract: escrowContract2, feePayer, minVoucherDelta, suggestedDeposit, ...rest }) => ({
|
|
102564
|
+
...rest,
|
|
102565
|
+
amount: parseUnits(amount2, decimals2).toString(),
|
|
102566
|
+
...suggestedDeposit ? {
|
|
102567
|
+
suggestedDeposit: parseUnits(suggestedDeposit, decimals2).toString()
|
|
102568
|
+
} : {},
|
|
102569
|
+
methodDetails: {
|
|
102570
|
+
escrowContract: escrowContract2,
|
|
102571
|
+
...channelId !== void 0 && { channelId },
|
|
102572
|
+
...minVoucherDelta !== void 0 && { minVoucherDelta },
|
|
102573
|
+
...chainId !== void 0 && { chainId },
|
|
102574
|
+
...feePayer !== void 0 && { feePayer }
|
|
102575
|
+
}
|
|
102576
|
+
})))
|
|
102617
102577
|
}
|
|
102618
102578
|
});
|
|
102619
102579
|
|
|
102620
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
102621
|
-
|
|
102622
|
-
var rpcUrl = {
|
|
102623
|
-
4217: "https://rpc.tempo.xyz",
|
|
102624
|
-
42431: "https://rpc.moderato.tempo.xyz"
|
|
102625
|
-
};
|
|
102626
|
-
var escrowContract = {
|
|
102627
|
-
4217: "0x0901aED692C755b870F9605E56BAA66C35BEfF69",
|
|
102628
|
-
42431: "0x542831e3E4Ace07559b7C8787395f4Fb99F70787"
|
|
102629
|
-
};
|
|
102630
|
-
var decimals = 6;
|
|
102631
|
-
|
|
102632
|
-
// ../../../node_modules/.pnpm/mppx@0.1.1_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_405dfb80e1c7f6ab13ff44820fe9b86a/node_modules/mppx/dist/tempo/client/Charge.js
|
|
102633
|
-
function charge3(parameters = {}) {
|
|
102580
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/client/Charge.js
|
|
102581
|
+
function charge2(parameters = {}) {
|
|
102634
102582
|
const { clientId } = parameters;
|
|
102635
102583
|
const getClient = getResolver2({
|
|
102636
102584
|
chain: tempo,
|
|
@@ -102638,7 +102586,7 @@ function charge3(parameters = {}) {
|
|
|
102638
102586
|
rpcUrl
|
|
102639
102587
|
});
|
|
102640
102588
|
const getAccount = getResolver({ account: parameters.account });
|
|
102641
|
-
return toClient(
|
|
102589
|
+
return toClient(charge, {
|
|
102642
102590
|
context: object({
|
|
102643
102591
|
account: optional(custom())
|
|
102644
102592
|
}),
|
|
@@ -102672,10 +102620,13 @@ function charge3(parameters = {}) {
|
|
|
102672
102620
|
});
|
|
102673
102621
|
}
|
|
102674
102622
|
|
|
102675
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
102623
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/client/Methods.js
|
|
102624
|
+
init_cjs_shims();
|
|
102625
|
+
|
|
102626
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/client/Session.js
|
|
102676
102627
|
init_cjs_shims();
|
|
102677
102628
|
|
|
102678
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
102629
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/stream/Voucher.js
|
|
102679
102630
|
init_cjs_shims();
|
|
102680
102631
|
var DOMAIN_NAME = "Tempo Stream Channel";
|
|
102681
102632
|
var DOMAIN_VERSION = "1";
|
|
@@ -102715,13 +102666,13 @@ async function signVoucher(client, account, message, escrowContract2, chainId, a
|
|
|
102715
102666
|
return signature2;
|
|
102716
102667
|
}
|
|
102717
102668
|
|
|
102718
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
102669
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/client/ChannelOps.js
|
|
102719
102670
|
init_cjs_shims();
|
|
102720
102671
|
|
|
102721
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
102672
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/stream/Chain.js
|
|
102722
102673
|
init_cjs_shims();
|
|
102723
102674
|
|
|
102724
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
102675
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/stream/escrow.abi.js
|
|
102725
102676
|
init_cjs_shims();
|
|
102726
102677
|
var escrowAbi = [
|
|
102727
102678
|
{
|
|
@@ -103483,7 +103434,7 @@ var escrowAbi = [
|
|
|
103483
103434
|
}
|
|
103484
103435
|
];
|
|
103485
103436
|
|
|
103486
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
103437
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/stream/Chain.js
|
|
103487
103438
|
var UINT128_MAX = 2n ** 128n - 1n;
|
|
103488
103439
|
async function getOnChainChannel(client, escrowContract2, channelId) {
|
|
103489
103440
|
return readContract(client, {
|
|
@@ -103496,7 +103447,7 @@ async function getOnChainChannel(client, escrowContract2, channelId) {
|
|
|
103496
103447
|
var escrowOpenSelector = /* @__PURE__ */ toFunctionSelector(getAbiItem({ abi: escrowAbi, name: "open" }));
|
|
103497
103448
|
var escrowTopUpSelector = /* @__PURE__ */ toFunctionSelector(getAbiItem({ abi: escrowAbi, name: "topUp" }));
|
|
103498
103449
|
|
|
103499
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
103450
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/stream/Channel.js
|
|
103500
103451
|
init_cjs_shims();
|
|
103501
103452
|
function computeId2(parameters) {
|
|
103502
103453
|
const encoded = AbiParameters_exports.encode(AbiParameters_exports.from([
|
|
@@ -103519,7 +103470,7 @@ function computeId2(parameters) {
|
|
|
103519
103470
|
return Hash_exports.keccak256(encoded);
|
|
103520
103471
|
}
|
|
103521
103472
|
|
|
103522
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
103473
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/client/ChannelOps.js
|
|
103523
103474
|
function resolveEscrow(challenge2, chainId, escrowContractOverride) {
|
|
103524
103475
|
const challengeEscrow = challenge2.request.methodDetails?.escrowContract;
|
|
103525
103476
|
const escrow = challengeEscrow ?? escrowContractOverride ?? escrowContract[chainId];
|
|
@@ -103615,7 +103566,7 @@ async function tryRecoverChannel(client, escrowContract2, channelId, chainId) {
|
|
|
103615
103566
|
return void 0;
|
|
103616
103567
|
}
|
|
103617
103568
|
|
|
103618
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
103569
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/client/Session.js
|
|
103619
103570
|
var streamContextSchema = object({
|
|
103620
103571
|
account: optional(custom()),
|
|
103621
103572
|
action: optional(_enum2(["open", "topUp", "voucher", "close"])),
|
|
@@ -103628,7 +103579,7 @@ var streamContextSchema = object({
|
|
|
103628
103579
|
additionalDepositRaw: optional(string2()),
|
|
103629
103580
|
depositRaw: optional(string2())
|
|
103630
103581
|
});
|
|
103631
|
-
function
|
|
103582
|
+
function session2(parameters = {}) {
|
|
103632
103583
|
const { decimals: decimals2 = decimals } = parameters;
|
|
103633
103584
|
const getClient = getResolver2({
|
|
103634
103585
|
chain: tempo,
|
|
@@ -103802,7 +103753,7 @@ function session3(parameters = {}) {
|
|
|
103802
103753
|
}
|
|
103803
103754
|
return serializeCredential(challenge2, payload, chainId, account);
|
|
103804
103755
|
}
|
|
103805
|
-
return toClient(
|
|
103756
|
+
return toClient(session, {
|
|
103806
103757
|
context: streamContextSchema,
|
|
103807
103758
|
async createCredential({ challenge: challenge2, context: context2 }) {
|
|
103808
103759
|
const chainId = challenge2.request.methodDetails?.chainId ?? 0;
|
|
@@ -103817,10 +103768,10 @@ function session3(parameters = {}) {
|
|
|
103817
103768
|
});
|
|
103818
103769
|
}
|
|
103819
103770
|
|
|
103820
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
103771
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/client/SessionManager.js
|
|
103821
103772
|
init_cjs_shims();
|
|
103822
103773
|
|
|
103823
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
103774
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/client/internal/Fetch.js
|
|
103824
103775
|
init_cjs_shims();
|
|
103825
103776
|
var originalFetch;
|
|
103826
103777
|
function from19(config2) {
|
|
@@ -103831,9 +103782,9 @@ function from19(config2) {
|
|
|
103831
103782
|
if (response.status !== 402)
|
|
103832
103783
|
return response;
|
|
103833
103784
|
const challenge2 = fromResponse(response);
|
|
103834
|
-
const mi = methods.find((m) => m.
|
|
103785
|
+
const mi = methods.find((m) => m.name === challenge2.method && m.intent === challenge2.intent);
|
|
103835
103786
|
if (!mi)
|
|
103836
|
-
throw new Error(`No method
|
|
103787
|
+
throw new Error(`No method found for "${challenge2.method}.${challenge2.intent}". Available: ${methods.map((m) => `${m.name}.${m.intent}`).join(", ")}`);
|
|
103837
103788
|
const onChallengeCredential = onChallenge ? await onChallenge(challenge2, {
|
|
103838
103789
|
createCredential: async (overrideContext) => resolveCredential(challenge2, mi, overrideContext ?? context2)
|
|
103839
103790
|
}) : void 0;
|
|
@@ -103862,14 +103813,14 @@ async function resolveCredential(challenge2, mi, context2) {
|
|
|
103862
103813
|
return mi.createCredential(parsedContext !== void 0 ? { challenge: challenge2, context: parsedContext } : { challenge: challenge2 });
|
|
103863
103814
|
}
|
|
103864
103815
|
|
|
103865
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
103816
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/stream/Receipt.js
|
|
103866
103817
|
init_cjs_shims();
|
|
103867
103818
|
function deserializeStreamReceipt(encoded) {
|
|
103868
103819
|
const json3 = Base64_exports.toString(encoded);
|
|
103869
103820
|
return JSON.parse(json3);
|
|
103870
103821
|
}
|
|
103871
103822
|
|
|
103872
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
103823
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/stream/Sse.js
|
|
103873
103824
|
init_cjs_shims();
|
|
103874
103825
|
function parseEvent(raw) {
|
|
103875
103826
|
let eventType = "message";
|
|
@@ -103898,13 +103849,13 @@ function parseEvent(raw) {
|
|
|
103898
103849
|
}
|
|
103899
103850
|
}
|
|
103900
103851
|
|
|
103901
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
103852
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/client/SessionManager.js
|
|
103902
103853
|
function sessionManager(parameters) {
|
|
103903
103854
|
const fetchFn = parameters.fetch ?? globalThis.fetch;
|
|
103904
103855
|
let channel = null;
|
|
103905
103856
|
let lastChallenge = null;
|
|
103906
103857
|
let lastUrl = null;
|
|
103907
|
-
const method =
|
|
103858
|
+
const method = session2({
|
|
103908
103859
|
account: parameters.account,
|
|
103909
103860
|
authorizedSigner: parameters.authorizedSigner,
|
|
103910
103861
|
getClient: parameters.client ? () => parameters.client : parameters.getClient,
|
|
@@ -104073,16 +104024,16 @@ function sessionManager(parameters) {
|
|
|
104073
104024
|
return self2;
|
|
104074
104025
|
}
|
|
104075
104026
|
|
|
104076
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
104027
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/tempo/client/Methods.js
|
|
104077
104028
|
function tempo2(parameters = {}) {
|
|
104078
|
-
return [
|
|
104029
|
+
return [charge2(parameters), session2(parameters)];
|
|
104079
104030
|
}
|
|
104080
104031
|
(function(tempo3) {
|
|
104081
|
-
tempo3.charge =
|
|
104032
|
+
tempo3.charge = charge2;
|
|
104082
104033
|
tempo3.session = sessionManager;
|
|
104083
104034
|
})(tempo2 || (tempo2 = {}));
|
|
104084
104035
|
|
|
104085
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
104036
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/client/Mppx.js
|
|
104086
104037
|
var Mppx_exports = {};
|
|
104087
104038
|
__export(Mppx_exports, {
|
|
104088
104039
|
create: () => create4,
|
|
@@ -104090,7 +104041,7 @@ __export(Mppx_exports, {
|
|
|
104090
104041
|
});
|
|
104091
104042
|
init_cjs_shims();
|
|
104092
104043
|
|
|
104093
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
104044
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/client/Transport.js
|
|
104094
104045
|
init_cjs_shims();
|
|
104095
104046
|
function from20(transport) {
|
|
104096
104047
|
return transport;
|
|
@@ -104112,7 +104063,7 @@ function http2() {
|
|
|
104112
104063
|
});
|
|
104113
104064
|
}
|
|
104114
104065
|
|
|
104115
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
104066
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/client/Mppx.js
|
|
104116
104067
|
function create4(config2) {
|
|
104117
104068
|
const { onChallenge, polyfill: polyfill2 = true, transport = http2() } = config2;
|
|
104118
104069
|
const methods = config2.methods.flat();
|
|
@@ -104131,9 +104082,9 @@ function create4(config2) {
|
|
|
104131
104082
|
transport,
|
|
104132
104083
|
async createCredential(response, context2) {
|
|
104133
104084
|
const challenge2 = transport.getChallenge(response);
|
|
104134
|
-
const mi = methods.find((m) => m.
|
|
104085
|
+
const mi = methods.find((m) => m.name === challenge2.method && m.intent === challenge2.intent);
|
|
104135
104086
|
if (!mi)
|
|
104136
|
-
throw new Error(`No method
|
|
104087
|
+
throw new Error(`No method found for "${challenge2.method}.${challenge2.intent}". Available: ${methods.map((m) => `${m.name}.${m.intent}`).join(", ")}`);
|
|
104137
104088
|
const parsedContext = mi.context && context2 !== void 0 ? mi.context.parse(context2) : void 0;
|
|
104138
104089
|
return mi.createCredential(parsedContext !== void 0 ? { challenge: challenge2, context: parsedContext } : { challenge: challenge2 });
|
|
104139
104090
|
}
|
|
@@ -108594,10 +108545,10 @@ var safeCreateSIWxPayload = (surface2, serverInfo, signer) => {
|
|
|
108594
108545
|
// src/shared/neverthrow/mpp/index.ts
|
|
108595
108546
|
init_cjs_shims();
|
|
108596
108547
|
|
|
108597
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
108548
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/index.js
|
|
108598
108549
|
init_cjs_shims();
|
|
108599
108550
|
|
|
108600
|
-
// ../../../node_modules/.pnpm/mppx@0.
|
|
108551
|
+
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_2055ce1beed0a0f15156c43d7650f636/node_modules/mppx/dist/Receipt.js
|
|
108601
108552
|
var Receipt_exports = {};
|
|
108602
108553
|
__export(Receipt_exports, {
|
|
108603
108554
|
Schema: () => Schema2,
|
|
@@ -110827,7 +110778,7 @@ var import_path2 = require("path");
|
|
|
110827
110778
|
var import_url = require("url");
|
|
110828
110779
|
function getVersion2() {
|
|
110829
110780
|
if (true) {
|
|
110830
|
-
return "0.4.
|
|
110781
|
+
return "0.4.3";
|
|
110831
110782
|
}
|
|
110832
110783
|
const __dirname3 = (0, import_path2.dirname)((0, import_url.fileURLToPath)(importMetaUrl));
|
|
110833
110784
|
const pkg = JSON.parse(
|
|
@@ -111567,7 +111518,7 @@ var import_path3 = require("path");
|
|
|
111567
111518
|
var import_url2 = require("url");
|
|
111568
111519
|
function getVersion3() {
|
|
111569
111520
|
if (true) {
|
|
111570
|
-
return "0.4.
|
|
111521
|
+
return "0.4.3";
|
|
111571
111522
|
}
|
|
111572
111523
|
const __dirname3 = (0, import_path3.dirname)((0, import_url2.fileURLToPath)(importMetaUrl));
|
|
111573
111524
|
const pkg = JSON.parse(
|