agentcash 0.4.2 → 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 +78 -59
- 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-ZHELH6AF.js → chunk-HHZMUAUM.js} +9 -5
- package/dist/esm/{chunk-ZHELH6AF.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-KQZSZS7X.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-4GFBYNRG.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-LLSVIODO.js → commands-DOUM3W6U.js} +12 -9
- package/dist/esm/{commands-LLSVIODO.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-SAXO5RA4.js → install-36NUKANM.js} +8 -6
- package/dist/esm/{install-SAXO5RA4.js.map → install-36NUKANM.js.map} +1 -1
- package/dist/esm/lib.js +2 -4
- package/dist/esm/{server-BNARILZR.js → server-T5JCB7MM.js} +18 -14
- package/dist/esm/{server-BNARILZR.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 +1 -1
- package/dist/esm/chunk-4GFBYNRG.js.map +0 -1
- package/dist/esm/chunk-EO4BIJAO.js.map +0 -1
- package/dist/esm/chunk-NJYETKE3.js +0 -22
- package/dist/esm/chunk-NJYETKE3.js.map +0 -1
- /package/dist/esm/{chunk-DCP6SZGV.js.map → chunk-7EFFVT75.js.map} +0 -0
- /package/dist/esm/{chunk-KQZSZS7X.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.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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,7 +91243,7 @@ __export(Challenge_exports, {
|
|
|
91224
91243
|
});
|
|
91225
91244
|
init_cjs_shims();
|
|
91226
91245
|
|
|
91227
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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);
|
|
@@ -91238,13 +91257,13 @@ function serialize(request) {
|
|
|
91238
91257
|
return Base64_exports.fromString(json3, { pad: false, url: true });
|
|
91239
91258
|
}
|
|
91240
91259
|
|
|
91241
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
}
|
|
@@ -91258,7 +91277,7 @@ function signature() {
|
|
|
91258
91277
|
return external_exports2.string().check(external_exports2.regex(/^0x[0-9a-fA-F]+$/, "Invalid signature"));
|
|
91259
91278
|
}
|
|
91260
91279
|
|
|
91261
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
91262
91281
|
var Schema = object({
|
|
91263
91282
|
/** Optional human-readable description of the payment. */
|
|
91264
91283
|
description: optional(string2()),
|
|
@@ -91382,7 +91401,7 @@ function constantTimeEqual(a, b) {
|
|
|
91382
91401
|
return result === 0;
|
|
91383
91402
|
}
|
|
91384
91403
|
|
|
91385
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
91386
91405
|
function serialize3(credential) {
|
|
91387
91406
|
const wire = {
|
|
91388
91407
|
challenge: {
|
|
@@ -91397,7 +91416,7 @@ function serialize3(credential) {
|
|
|
91397
91416
|
return `Payment ${encoded}`;
|
|
91398
91417
|
}
|
|
91399
91418
|
|
|
91400
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
91401
91420
|
init_cjs_shims();
|
|
91402
91421
|
function from10(method) {
|
|
91403
91422
|
return method;
|
|
@@ -93277,9 +93296,9 @@ function watchContractEvent(client, parameters) {
|
|
|
93277
93296
|
if (fromBlock !== void 0)
|
|
93278
93297
|
previousBlockNumber = fromBlock - 1n;
|
|
93279
93298
|
let filter;
|
|
93280
|
-
let
|
|
93299
|
+
let initialized2 = false;
|
|
93281
93300
|
const unwatch = poll(async () => {
|
|
93282
|
-
if (!
|
|
93301
|
+
if (!initialized2) {
|
|
93283
93302
|
try {
|
|
93284
93303
|
filter = await getAction(client, createContractEventFilter, "createContractEventFilter")({
|
|
93285
93304
|
abi,
|
|
@@ -93291,7 +93310,7 @@ function watchContractEvent(client, parameters) {
|
|
|
93291
93310
|
});
|
|
93292
93311
|
} catch {
|
|
93293
93312
|
}
|
|
93294
|
-
|
|
93313
|
+
initialized2 = true;
|
|
93295
93314
|
return;
|
|
93296
93315
|
}
|
|
93297
93316
|
try {
|
|
@@ -93324,7 +93343,7 @@ function watchContractEvent(client, parameters) {
|
|
|
93324
93343
|
emit.onLogs([log2]);
|
|
93325
93344
|
} catch (err3) {
|
|
93326
93345
|
if (filter && err3 instanceof InvalidInputRpcError)
|
|
93327
|
-
|
|
93346
|
+
initialized2 = false;
|
|
93328
93347
|
emit.onError?.(err3);
|
|
93329
93348
|
}
|
|
93330
93349
|
}, {
|
|
@@ -96003,10 +96022,10 @@ init_getAddress2();
|
|
|
96003
96022
|
init_toFunctionSelector();
|
|
96004
96023
|
init_formatUnits();
|
|
96005
96024
|
|
|
96006
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
96007
96026
|
init_cjs_shims();
|
|
96008
96027
|
|
|
96009
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
96010
96029
|
init_cjs_shims();
|
|
96011
96030
|
|
|
96012
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
|
|
@@ -102227,7 +102246,7 @@ async function updateSync(client, parameters) {
|
|
|
102227
102246
|
return { receipt };
|
|
102228
102247
|
}
|
|
102229
102248
|
|
|
102230
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
102231
102250
|
init_cjs_shims();
|
|
102232
102251
|
|
|
102233
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
|
|
@@ -102390,7 +102409,7 @@ function privateKeyToAccount(privateKey, options = {}) {
|
|
|
102390
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
|
|
102391
102410
|
init_parseAccount();
|
|
102392
102411
|
|
|
102393
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
102394
102413
|
function getResolver(parameters = {}) {
|
|
102395
102414
|
const { account: defaultAccount } = parameters;
|
|
102396
102415
|
return (client, { account: override } = {}) => {
|
|
@@ -102404,7 +102423,7 @@ function getResolver(parameters = {}) {
|
|
|
102404
102423
|
};
|
|
102405
102424
|
}
|
|
102406
102425
|
|
|
102407
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
102408
102427
|
init_cjs_shims();
|
|
102409
102428
|
function getResolver2(parameters) {
|
|
102410
102429
|
const { chain: chain2, getClient, rpcUrl: rpcUrl2 } = parameters;
|
|
@@ -102424,7 +102443,7 @@ function getResolver2(parameters) {
|
|
|
102424
102443
|
};
|
|
102425
102444
|
}
|
|
102426
102445
|
|
|
102427
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
102428
102447
|
init_cjs_shims();
|
|
102429
102448
|
var tag = Hex_exports.slice(Hash_exports.keccak256(Bytes_exports.fromString("mpp"), { as: "Hex" }), 0, 4);
|
|
102430
102449
|
var version6 = 1;
|
|
@@ -102445,7 +102464,7 @@ function encode5(parameters) {
|
|
|
102445
102464
|
return Hex_exports.fromBytes(buf);
|
|
102446
102465
|
}
|
|
102447
102466
|
|
|
102448
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
102449
102468
|
init_cjs_shims();
|
|
102450
102469
|
var rpcUrl = {
|
|
102451
102470
|
4217: "https://rpc.tempo.xyz",
|
|
@@ -102457,7 +102476,7 @@ var escrowContract = {
|
|
|
102457
102476
|
};
|
|
102458
102477
|
var decimals = 6;
|
|
102459
102478
|
|
|
102460
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
102461
102480
|
init_cjs_shims();
|
|
102462
102481
|
var charge = from10({
|
|
102463
102482
|
name: "tempo",
|
|
@@ -102558,7 +102577,7 @@ var session = from10({
|
|
|
102558
102577
|
}
|
|
102559
102578
|
});
|
|
102560
102579
|
|
|
102561
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
102562
102581
|
function charge2(parameters = {}) {
|
|
102563
102582
|
const { clientId } = parameters;
|
|
102564
102583
|
const getClient = getResolver2({
|
|
@@ -102601,13 +102620,13 @@ function charge2(parameters = {}) {
|
|
|
102601
102620
|
});
|
|
102602
102621
|
}
|
|
102603
102622
|
|
|
102604
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
102605
102624
|
init_cjs_shims();
|
|
102606
102625
|
|
|
102607
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
102608
102627
|
init_cjs_shims();
|
|
102609
102628
|
|
|
102610
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
102611
102630
|
init_cjs_shims();
|
|
102612
102631
|
var DOMAIN_NAME = "Tempo Stream Channel";
|
|
102613
102632
|
var DOMAIN_VERSION = "1";
|
|
@@ -102647,13 +102666,13 @@ async function signVoucher(client, account, message, escrowContract2, chainId, a
|
|
|
102647
102666
|
return signature2;
|
|
102648
102667
|
}
|
|
102649
102668
|
|
|
102650
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
102651
102670
|
init_cjs_shims();
|
|
102652
102671
|
|
|
102653
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
102654
102673
|
init_cjs_shims();
|
|
102655
102674
|
|
|
102656
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
102657
102676
|
init_cjs_shims();
|
|
102658
102677
|
var escrowAbi = [
|
|
102659
102678
|
{
|
|
@@ -103415,7 +103434,7 @@ var escrowAbi = [
|
|
|
103415
103434
|
}
|
|
103416
103435
|
];
|
|
103417
103436
|
|
|
103418
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
103419
103438
|
var UINT128_MAX = 2n ** 128n - 1n;
|
|
103420
103439
|
async function getOnChainChannel(client, escrowContract2, channelId) {
|
|
103421
103440
|
return readContract(client, {
|
|
@@ -103428,7 +103447,7 @@ async function getOnChainChannel(client, escrowContract2, channelId) {
|
|
|
103428
103447
|
var escrowOpenSelector = /* @__PURE__ */ toFunctionSelector(getAbiItem({ abi: escrowAbi, name: "open" }));
|
|
103429
103448
|
var escrowTopUpSelector = /* @__PURE__ */ toFunctionSelector(getAbiItem({ abi: escrowAbi, name: "topUp" }));
|
|
103430
103449
|
|
|
103431
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
103432
103451
|
init_cjs_shims();
|
|
103433
103452
|
function computeId2(parameters) {
|
|
103434
103453
|
const encoded = AbiParameters_exports.encode(AbiParameters_exports.from([
|
|
@@ -103451,7 +103470,7 @@ function computeId2(parameters) {
|
|
|
103451
103470
|
return Hash_exports.keccak256(encoded);
|
|
103452
103471
|
}
|
|
103453
103472
|
|
|
103454
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
103455
103474
|
function resolveEscrow(challenge2, chainId, escrowContractOverride) {
|
|
103456
103475
|
const challengeEscrow = challenge2.request.methodDetails?.escrowContract;
|
|
103457
103476
|
const escrow = challengeEscrow ?? escrowContractOverride ?? escrowContract[chainId];
|
|
@@ -103547,7 +103566,7 @@ async function tryRecoverChannel(client, escrowContract2, channelId, chainId) {
|
|
|
103547
103566
|
return void 0;
|
|
103548
103567
|
}
|
|
103549
103568
|
|
|
103550
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
103551
103570
|
var streamContextSchema = object({
|
|
103552
103571
|
account: optional(custom()),
|
|
103553
103572
|
action: optional(_enum2(["open", "topUp", "voucher", "close"])),
|
|
@@ -103749,10 +103768,10 @@ function session2(parameters = {}) {
|
|
|
103749
103768
|
});
|
|
103750
103769
|
}
|
|
103751
103770
|
|
|
103752
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
103753
103772
|
init_cjs_shims();
|
|
103754
103773
|
|
|
103755
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
103756
103775
|
init_cjs_shims();
|
|
103757
103776
|
var originalFetch;
|
|
103758
103777
|
function from19(config2) {
|
|
@@ -103794,14 +103813,14 @@ async function resolveCredential(challenge2, mi, context2) {
|
|
|
103794
103813
|
return mi.createCredential(parsedContext !== void 0 ? { challenge: challenge2, context: parsedContext } : { challenge: challenge2 });
|
|
103795
103814
|
}
|
|
103796
103815
|
|
|
103797
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
103798
103817
|
init_cjs_shims();
|
|
103799
103818
|
function deserializeStreamReceipt(encoded) {
|
|
103800
103819
|
const json3 = Base64_exports.toString(encoded);
|
|
103801
103820
|
return JSON.parse(json3);
|
|
103802
103821
|
}
|
|
103803
103822
|
|
|
103804
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
103805
103824
|
init_cjs_shims();
|
|
103806
103825
|
function parseEvent(raw) {
|
|
103807
103826
|
let eventType = "message";
|
|
@@ -103830,7 +103849,7 @@ function parseEvent(raw) {
|
|
|
103830
103849
|
}
|
|
103831
103850
|
}
|
|
103832
103851
|
|
|
103833
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
103834
103853
|
function sessionManager(parameters) {
|
|
103835
103854
|
const fetchFn = parameters.fetch ?? globalThis.fetch;
|
|
103836
103855
|
let channel = null;
|
|
@@ -104005,7 +104024,7 @@ function sessionManager(parameters) {
|
|
|
104005
104024
|
return self2;
|
|
104006
104025
|
}
|
|
104007
104026
|
|
|
104008
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
104009
104028
|
function tempo2(parameters = {}) {
|
|
104010
104029
|
return [charge2(parameters), session2(parameters)];
|
|
104011
104030
|
}
|
|
@@ -104014,7 +104033,7 @@ function tempo2(parameters = {}) {
|
|
|
104014
104033
|
tempo3.session = sessionManager;
|
|
104015
104034
|
})(tempo2 || (tempo2 = {}));
|
|
104016
104035
|
|
|
104017
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
104018
104037
|
var Mppx_exports = {};
|
|
104019
104038
|
__export(Mppx_exports, {
|
|
104020
104039
|
create: () => create4,
|
|
@@ -104022,7 +104041,7 @@ __export(Mppx_exports, {
|
|
|
104022
104041
|
});
|
|
104023
104042
|
init_cjs_shims();
|
|
104024
104043
|
|
|
104025
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
104026
104045
|
init_cjs_shims();
|
|
104027
104046
|
function from20(transport) {
|
|
104028
104047
|
return transport;
|
|
@@ -104044,7 +104063,7 @@ function http2() {
|
|
|
104044
104063
|
});
|
|
104045
104064
|
}
|
|
104046
104065
|
|
|
104047
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
104048
104067
|
function create4(config2) {
|
|
104049
104068
|
const { onChallenge, polyfill: polyfill2 = true, transport = http2() } = config2;
|
|
104050
104069
|
const methods = config2.methods.flat();
|
|
@@ -108526,10 +108545,10 @@ var safeCreateSIWxPayload = (surface2, serverInfo, signer) => {
|
|
|
108526
108545
|
// src/shared/neverthrow/mpp/index.ts
|
|
108527
108546
|
init_cjs_shims();
|
|
108528
108547
|
|
|
108529
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
108530
108549
|
init_cjs_shims();
|
|
108531
108550
|
|
|
108532
|
-
// ../../../node_modules/.pnpm/mppx@0.2.0_@modelcontextprotocol+sdk@1.26.0_zod@4.3.6__express@5.2.1_hono@4.11.
|
|
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
|
|
108533
108552
|
var Receipt_exports = {};
|
|
108534
108553
|
__export(Receipt_exports, {
|
|
108535
108554
|
Schema: () => Schema2,
|
|
@@ -110759,7 +110778,7 @@ var import_path2 = require("path");
|
|
|
110759
110778
|
var import_url = require("url");
|
|
110760
110779
|
function getVersion2() {
|
|
110761
110780
|
if (true) {
|
|
110762
|
-
return "0.4.
|
|
110781
|
+
return "0.4.3";
|
|
110763
110782
|
}
|
|
110764
110783
|
const __dirname3 = (0, import_path2.dirname)((0, import_url.fileURLToPath)(importMetaUrl));
|
|
110765
110784
|
const pkg = JSON.parse(
|
|
@@ -111499,7 +111518,7 @@ var import_path3 = require("path");
|
|
|
111499
111518
|
var import_url2 = require("url");
|
|
111500
111519
|
function getVersion3() {
|
|
111501
111520
|
if (true) {
|
|
111502
|
-
return "0.4.
|
|
111521
|
+
return "0.4.3";
|
|
111503
111522
|
}
|
|
111504
111523
|
const __dirname3 = (0, import_path3.dirname)((0, import_url2.fileURLToPath)(importMetaUrl));
|
|
111505
111524
|
const pkg = JSON.parse(
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
safeFetchJson
|
|
3
|
+
} from "./chunk-TRPO7BKD.js";
|
|
4
|
+
|
|
5
|
+
// src/shared/utils.ts
|
|
6
|
+
import open from "open";
|
|
7
|
+
var getBaseUrl = (dev) => {
|
|
8
|
+
return dev ? "http://localhost:3000" : "https://x402scan.com";
|
|
9
|
+
};
|
|
10
|
+
var getDepositLink = (address, flags) => {
|
|
11
|
+
return `${getBaseUrl(flags.dev)}/mcp/deposit/${address}`;
|
|
12
|
+
};
|
|
13
|
+
var openDepositLink = async (address, flags) => {
|
|
14
|
+
const depositLink = getDepositLink(address, flags);
|
|
15
|
+
await open(depositLink);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// src/shared/balance.ts
|
|
19
|
+
import z from "zod";
|
|
20
|
+
var getBalance = async ({
|
|
21
|
+
address,
|
|
22
|
+
flags,
|
|
23
|
+
surface
|
|
24
|
+
}) => {
|
|
25
|
+
const url = `${getBaseUrl(flags.dev)}/api/rpc/balance/${address}`;
|
|
26
|
+
const res = await safeFetchJson(
|
|
27
|
+
surface,
|
|
28
|
+
new Request(url, {
|
|
29
|
+
method: "GET",
|
|
30
|
+
headers: {
|
|
31
|
+
accept: "application/json"
|
|
32
|
+
}
|
|
33
|
+
}),
|
|
34
|
+
z.object({
|
|
35
|
+
chain: z.number(),
|
|
36
|
+
balance: z.coerce.number()
|
|
37
|
+
})
|
|
38
|
+
);
|
|
39
|
+
return res;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
getBaseUrl,
|
|
44
|
+
getDepositLink,
|
|
45
|
+
openDepositLink,
|
|
46
|
+
getBalance
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=chunk-77BBSEYX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shared/utils.ts","../../src/shared/balance.ts"],"sourcesContent":["import open from 'open';\n\nimport type { GlobalFlags } from '@/types';\n\nexport const getBaseUrl = (dev: boolean) => {\n return dev ? 'http://localhost:3000' : 'https://x402scan.com';\n};\n\nexport const getDepositLink = (address: string, flags: GlobalFlags) => {\n return `${getBaseUrl(flags.dev)}/mcp/deposit/${address}`;\n};\n\nexport const openDepositLink = async (address: string, flags: GlobalFlags) => {\n const depositLink = getDepositLink(address, flags);\n await open(depositLink);\n};\n","import z from 'zod';\n\nimport { getBaseUrl } from '@/shared/utils';\nimport { safeFetchJson } from '@/shared/neverthrow/fetch';\n\nimport type { Address } from 'viem';\nimport type { GlobalFlags } from '@/types';\n\ninterface GetBalanceProps {\n address: Address;\n flags: GlobalFlags;\n surface: string;\n}\n\nexport const getBalance = async ({\n address,\n flags,\n surface,\n}: GetBalanceProps) => {\n const url = `${getBaseUrl(flags.dev)}/api/rpc/balance/${address}`;\n\n const res = await safeFetchJson(\n surface,\n new Request(url, {\n method: 'GET',\n headers: {\n accept: 'application/json',\n },\n }),\n z.object({\n chain: z.number(),\n balance: z.coerce.number(),\n })\n );\n\n return res;\n};\n"],"mappings":";;;;;AAAA,OAAO,UAAU;AAIV,IAAM,aAAa,CAAC,QAAiB;AAC1C,SAAO,MAAM,0BAA0B;AACzC;AAEO,IAAM,iBAAiB,CAAC,SAAiB,UAAuB;AACrE,SAAO,GAAG,WAAW,MAAM,GAAG,CAAC,gBAAgB,OAAO;AACxD;AAEO,IAAM,kBAAkB,OAAO,SAAiB,UAAuB;AAC5E,QAAM,cAAc,eAAe,SAAS,KAAK;AACjD,QAAM,KAAK,WAAW;AACxB;;;ACfA,OAAO,OAAO;AAcP,IAAM,aAAa,OAAO;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AACF,MAAuB;AACrB,QAAM,MAAM,GAAG,WAAW,MAAM,GAAG,CAAC,oBAAoB,OAAO;AAE/D,QAAM,MAAM,MAAM;AAAA,IAChB;AAAA,IACA,IAAI,QAAQ,KAAK;AAAA,MACf,QAAQ;AAAA,MACR,SAAS;AAAA,QACP,QAAQ;AAAA,MACV;AAAA,IACF,CAAC;AAAA,IACD,EAAE,OAAO;AAAA,MACP,OAAO,EAAE,OAAO;AAAA,MAChB,SAAS,EAAE,OAAO,OAAO;AAAA,IAC3B,CAAC;AAAA,EACH;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
DEFAULT_NETWORK,
|
|
3
3
|
getChainName,
|
|
4
4
|
redeemInviteCode
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OT7CX4QI.js";
|
|
6
6
|
import {
|
|
7
7
|
getDepositLink
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-77BBSEYX.js";
|
|
9
9
|
|
|
10
10
|
// src/cli/lib/deposit.ts
|
|
11
11
|
import chalk from "chalk";
|
|
@@ -111,4 +111,4 @@ export {
|
|
|
111
111
|
wait,
|
|
112
112
|
promptDeposit
|
|
113
113
|
};
|
|
114
|
-
//# sourceMappingURL=chunk-
|
|
114
|
+
//# sourceMappingURL=chunk-7EFFVT75.js.map
|
|
@@ -1,24 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getTempoBalance
|
|
3
|
+
} from "./chunk-I2B7IMZG.js";
|
|
1
4
|
import {
|
|
2
5
|
detectPaymentProtocols,
|
|
3
|
-
getTempoBalance,
|
|
4
6
|
safeCreatePaymentPayload,
|
|
5
7
|
safeGetPaymentRequired,
|
|
6
8
|
safeGetPaymentSettlement,
|
|
7
9
|
tokenStringToNumber,
|
|
8
10
|
x402Err,
|
|
9
11
|
x402Ok
|
|
10
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RBBAPXT5.js";
|
|
13
|
+
import {
|
|
14
|
+
getBalance
|
|
15
|
+
} from "./chunk-77BBSEYX.js";
|
|
11
16
|
import {
|
|
12
17
|
err,
|
|
13
18
|
fetchErr,
|
|
14
19
|
fetchOk,
|
|
15
|
-
getBalance,
|
|
16
20
|
log,
|
|
17
21
|
ok,
|
|
18
22
|
resultFromPromise,
|
|
19
23
|
resultFromThrowable,
|
|
20
24
|
safeFetch
|
|
21
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-TRPO7BKD.js";
|
|
22
26
|
|
|
23
27
|
// src/server/tools/lib/request.ts
|
|
24
28
|
import z from "zod";
|
|
@@ -354,4 +358,4 @@ export {
|
|
|
354
358
|
safeGetMppChallenge,
|
|
355
359
|
createFetchWithPayment
|
|
356
360
|
};
|
|
357
|
-
//# sourceMappingURL=chunk-
|
|
361
|
+
//# sourceMappingURL=chunk-HHZMUAUM.js.map
|