agentcash 0.5.0-mpp.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/run-server.cjs +54 -54
- package/dist/esm/{chunk-UWU3MOEC.js → chunk-BOGGLB3Y.js} +4 -4
- package/dist/esm/{chunk-CRYNS6Y3.js → chunk-C73Z5QPI.js} +4 -4
- package/dist/esm/{chunk-W3OHV4AX.js → chunk-KFYFGEC4.js} +2 -2
- package/dist/esm/{chunk-OS6MJ6OG.js → chunk-LOEINYA7.js} +3 -3
- package/dist/esm/chunk-N3WKW6F4.js +7 -0
- package/dist/esm/{chunk-HV7BGP42.js.map → chunk-N3WKW6F4.js.map} +1 -1
- package/dist/esm/{chunk-KEPI2YKC.js → chunk-THRXTZU6.js} +2 -2
- package/dist/esm/{chunk-G4TH4S7M.js → chunk-UFSCGP67.js} +2 -5
- package/dist/esm/chunk-UFSCGP67.js.map +1 -0
- package/dist/esm/{chunk-CK3GCQYQ.js → chunk-X5H7CNL7.js} +2 -2
- package/dist/esm/{commands-JOZ6UKA6.js → commands-RO7I7ERX.js} +134 -21
- package/dist/esm/commands-RO7I7ERX.js.map +1 -0
- package/dist/esm/{fund-C24TLKK6.js → fund-BVBH76XD.js} +4 -4
- package/dist/esm/index.js +45 -11
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/{install-R2P4LXLN.js → install-WAPHWJ54.js} +5 -5
- package/dist/esm/lib.js +2 -2
- package/dist/esm/{server-EUPBSNJX.js → server-VK4ASVX7.js} +9 -9
- package/dist/esm/server-VK4ASVX7.js.map +1 -0
- package/dist/esm/shared/operations/index.js +5 -5
- package/package.json +4 -4
- package/dist/esm/chunk-G4TH4S7M.js.map +0 -1
- package/dist/esm/chunk-HV7BGP42.js +0 -7
- package/dist/esm/commands-JOZ6UKA6.js.map +0 -1
- package/dist/esm/server-EUPBSNJX.js.map +0 -1
- /package/dist/esm/{chunk-UWU3MOEC.js.map → chunk-BOGGLB3Y.js.map} +0 -0
- /package/dist/esm/{chunk-CRYNS6Y3.js.map → chunk-C73Z5QPI.js.map} +0 -0
- /package/dist/esm/{chunk-W3OHV4AX.js.map → chunk-KFYFGEC4.js.map} +0 -0
- /package/dist/esm/{chunk-OS6MJ6OG.js.map → chunk-LOEINYA7.js.map} +0 -0
- /package/dist/esm/{chunk-KEPI2YKC.js.map → chunk-THRXTZU6.js.map} +0 -0
- /package/dist/esm/{chunk-CK3GCQYQ.js.map → chunk-X5H7CNL7.js.map} +0 -0
- /package/dist/esm/{fund-C24TLKK6.js.map → fund-BVBH76XD.js.map} +0 -0
- /package/dist/esm/{install-R2P4LXLN.js.map → install-WAPHWJ54.js.map} +0 -0
package/dist/cjs/run-server.cjs
CHANGED
|
@@ -88972,19 +88972,19 @@ var ExactEvmScheme = class {
|
|
|
88972
88972
|
}
|
|
88973
88973
|
};
|
|
88974
88974
|
|
|
88975
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
88975
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/client/index.js
|
|
88976
88976
|
init_cjs_shims();
|
|
88977
88977
|
|
|
88978
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
88978
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/Expires.js
|
|
88979
88979
|
init_cjs_shims();
|
|
88980
88980
|
function minutes(n) {
|
|
88981
88981
|
return new Date(Date.now() + n * 60 * 1e3).toISOString();
|
|
88982
88982
|
}
|
|
88983
88983
|
|
|
88984
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
88984
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/client/Methods.js
|
|
88985
88985
|
init_cjs_shims();
|
|
88986
88986
|
|
|
88987
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
88987
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/Credential.js
|
|
88988
88988
|
init_cjs_shims();
|
|
88989
88989
|
|
|
88990
88990
|
// ../../../node_modules/.pnpm/ox@0.12.4_typescript@5.9.3_zod@4.3.6/node_modules/ox/_esm/index.js
|
|
@@ -91407,7 +91407,7 @@ function verify3(options) {
|
|
|
91407
91407
|
// ../../../node_modules/.pnpm/ox@0.12.4_typescript@5.9.3_zod@4.3.6/node_modules/ox/_esm/index.js
|
|
91408
91408
|
init_Withdrawal();
|
|
91409
91409
|
|
|
91410
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
91410
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/Challenge.js
|
|
91411
91411
|
var Challenge_exports = {};
|
|
91412
91412
|
__export(Challenge_exports, {
|
|
91413
91413
|
Schema: () => Schema,
|
|
@@ -91421,7 +91421,7 @@ __export(Challenge_exports, {
|
|
|
91421
91421
|
});
|
|
91422
91422
|
init_cjs_shims();
|
|
91423
91423
|
|
|
91424
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
91424
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/PaymentRequest.js
|
|
91425
91425
|
init_cjs_shims();
|
|
91426
91426
|
function deserialize(encoded) {
|
|
91427
91427
|
const json3 = Base64_exports.toString(encoded);
|
|
@@ -91435,13 +91435,13 @@ function serialize(request) {
|
|
|
91435
91435
|
return Base64_exports.fromString(json3, { pad: false, url: true });
|
|
91436
91436
|
}
|
|
91437
91437
|
|
|
91438
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
91438
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/zod.js
|
|
91439
91439
|
init_cjs_shims();
|
|
91440
91440
|
|
|
91441
91441
|
// ../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/mini/index.js
|
|
91442
91442
|
init_cjs_shims();
|
|
91443
91443
|
|
|
91444
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
91444
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/zod.js
|
|
91445
91445
|
function amount() {
|
|
91446
91446
|
return external_exports2.string().check(external_exports2.regex(/^\d+(\.\d+)?$/, "Invalid amount"));
|
|
91447
91447
|
}
|
|
@@ -91455,7 +91455,7 @@ function signature() {
|
|
|
91455
91455
|
return external_exports2.string().check(external_exports2.regex(/^0x[0-9a-fA-F]+$/, "Invalid signature"));
|
|
91456
91456
|
}
|
|
91457
91457
|
|
|
91458
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
91458
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/Challenge.js
|
|
91459
91459
|
var Schema = object({
|
|
91460
91460
|
/** Optional human-readable description of the payment. */
|
|
91461
91461
|
description: optional(string2()),
|
|
@@ -91582,7 +91582,7 @@ function constantTimeEqual(a, b) {
|
|
|
91582
91582
|
return result === 0;
|
|
91583
91583
|
}
|
|
91584
91584
|
|
|
91585
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
91585
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/Credential.js
|
|
91586
91586
|
function serialize3(credential) {
|
|
91587
91587
|
const wire = {
|
|
91588
91588
|
challenge: {
|
|
@@ -91597,7 +91597,7 @@ function serialize3(credential) {
|
|
|
91597
91597
|
return `Payment ${encoded}`;
|
|
91598
91598
|
}
|
|
91599
91599
|
|
|
91600
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
91600
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/Method.js
|
|
91601
91601
|
init_cjs_shims();
|
|
91602
91602
|
function from10(method) {
|
|
91603
91603
|
return method;
|
|
@@ -96203,10 +96203,10 @@ init_getAddress2();
|
|
|
96203
96203
|
init_toFunctionSelector();
|
|
96204
96204
|
init_formatUnits();
|
|
96205
96205
|
|
|
96206
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
96206
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/client/index.js
|
|
96207
96207
|
init_cjs_shims();
|
|
96208
96208
|
|
|
96209
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
96209
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/client/Charge.js
|
|
96210
96210
|
init_cjs_shims();
|
|
96211
96211
|
|
|
96212
96212
|
// ../../../node_modules/.pnpm/viem@2.46.2_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
|
|
@@ -102445,7 +102445,7 @@ async function updateSync(client, parameters) {
|
|
|
102445
102445
|
return { receipt };
|
|
102446
102446
|
}
|
|
102447
102447
|
|
|
102448
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
102448
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/viem/Account.js
|
|
102449
102449
|
init_cjs_shims();
|
|
102450
102450
|
|
|
102451
102451
|
// ../../../node_modules/.pnpm/viem@2.46.2_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
|
|
@@ -102608,7 +102608,7 @@ function privateKeyToAccount(privateKey, options = {}) {
|
|
|
102608
102608
|
// ../../../node_modules/.pnpm/viem@2.46.2_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
|
|
102609
102609
|
init_parseAccount();
|
|
102610
102610
|
|
|
102611
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
102611
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/viem/Account.js
|
|
102612
102612
|
function getResolver(parameters = {}) {
|
|
102613
102613
|
const { account: defaultAccount } = parameters;
|
|
102614
102614
|
return (client, { account: override } = {}) => {
|
|
@@ -102622,7 +102622,7 @@ function getResolver(parameters = {}) {
|
|
|
102622
102622
|
};
|
|
102623
102623
|
}
|
|
102624
102624
|
|
|
102625
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
102625
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/viem/Client.js
|
|
102626
102626
|
init_cjs_shims();
|
|
102627
102627
|
function getResolver2(parameters) {
|
|
102628
102628
|
const { chain: chain2, getClient, rpcUrl: rpcUrl2 } = parameters;
|
|
@@ -102642,7 +102642,7 @@ function getResolver2(parameters) {
|
|
|
102642
102642
|
};
|
|
102643
102643
|
}
|
|
102644
102644
|
|
|
102645
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
102645
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/Attribution.js
|
|
102646
102646
|
init_cjs_shims();
|
|
102647
102647
|
var tag = Hex_exports.slice(Hash_exports.keccak256(Bytes_exports.fromString("mpp"), { as: "Hex" }), 0, 4);
|
|
102648
102648
|
var version6 = 1;
|
|
@@ -102663,7 +102663,7 @@ function encode5(parameters) {
|
|
|
102663
102663
|
return Hex_exports.fromBytes(buf);
|
|
102664
102664
|
}
|
|
102665
102665
|
|
|
102666
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
102666
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/internal/defaults.js
|
|
102667
102667
|
init_cjs_shims();
|
|
102668
102668
|
var rpcUrl = {
|
|
102669
102669
|
4217: "https://rpc.tempo.xyz",
|
|
@@ -102675,7 +102675,7 @@ var escrowContract = {
|
|
|
102675
102675
|
};
|
|
102676
102676
|
var decimals = 6;
|
|
102677
102677
|
|
|
102678
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
102678
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/Methods.js
|
|
102679
102679
|
init_cjs_shims();
|
|
102680
102680
|
var charge = from10({
|
|
102681
102681
|
name: "tempo",
|
|
@@ -102776,7 +102776,7 @@ var session = from10({
|
|
|
102776
102776
|
}
|
|
102777
102777
|
});
|
|
102778
102778
|
|
|
102779
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
102779
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/client/Charge.js
|
|
102780
102780
|
function charge2(parameters = {}) {
|
|
102781
102781
|
const { clientId } = parameters;
|
|
102782
102782
|
const getClient = getResolver2({
|
|
@@ -102819,13 +102819,13 @@ function charge2(parameters = {}) {
|
|
|
102819
102819
|
});
|
|
102820
102820
|
}
|
|
102821
102821
|
|
|
102822
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
102822
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/client/Methods.js
|
|
102823
102823
|
init_cjs_shims();
|
|
102824
102824
|
|
|
102825
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
102825
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/client/Session.js
|
|
102826
102826
|
init_cjs_shims();
|
|
102827
102827
|
|
|
102828
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
102828
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/stream/Voucher.js
|
|
102829
102829
|
init_cjs_shims();
|
|
102830
102830
|
var DOMAIN_NAME = "Tempo Stream Channel";
|
|
102831
102831
|
var DOMAIN_VERSION = "1";
|
|
@@ -102865,13 +102865,13 @@ async function signVoucher(client, account, message, escrowContract2, chainId, a
|
|
|
102865
102865
|
return signature2;
|
|
102866
102866
|
}
|
|
102867
102867
|
|
|
102868
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
102868
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/client/ChannelOps.js
|
|
102869
102869
|
init_cjs_shims();
|
|
102870
102870
|
|
|
102871
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
102871
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/stream/Chain.js
|
|
102872
102872
|
init_cjs_shims();
|
|
102873
102873
|
|
|
102874
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
102874
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/stream/escrow.abi.js
|
|
102875
102875
|
init_cjs_shims();
|
|
102876
102876
|
var escrowAbi = [
|
|
102877
102877
|
{
|
|
@@ -103633,7 +103633,7 @@ var escrowAbi = [
|
|
|
103633
103633
|
}
|
|
103634
103634
|
];
|
|
103635
103635
|
|
|
103636
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
103636
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/stream/Chain.js
|
|
103637
103637
|
var UINT128_MAX = 2n ** 128n - 1n;
|
|
103638
103638
|
async function getOnChainChannel(client, escrowContract2, channelId) {
|
|
103639
103639
|
return readContract(client, {
|
|
@@ -103646,7 +103646,7 @@ async function getOnChainChannel(client, escrowContract2, channelId) {
|
|
|
103646
103646
|
var escrowOpenSelector = /* @__PURE__ */ toFunctionSelector(getAbiItem({ abi: escrowAbi, name: "open" }));
|
|
103647
103647
|
var escrowTopUpSelector = /* @__PURE__ */ toFunctionSelector(getAbiItem({ abi: escrowAbi, name: "topUp" }));
|
|
103648
103648
|
|
|
103649
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
103649
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/stream/Channel.js
|
|
103650
103650
|
init_cjs_shims();
|
|
103651
103651
|
function computeId2(parameters) {
|
|
103652
103652
|
const encoded = AbiParameters_exports.encode(AbiParameters_exports.from([
|
|
@@ -103669,7 +103669,7 @@ function computeId2(parameters) {
|
|
|
103669
103669
|
return Hash_exports.keccak256(encoded);
|
|
103670
103670
|
}
|
|
103671
103671
|
|
|
103672
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
103672
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/client/ChannelOps.js
|
|
103673
103673
|
function resolveEscrow(challenge2, chainId, escrowContractOverride) {
|
|
103674
103674
|
const challengeEscrow = challenge2.request.methodDetails?.escrowContract;
|
|
103675
103675
|
const escrow = challengeEscrow ?? escrowContractOverride ?? escrowContract[chainId];
|
|
@@ -103765,7 +103765,7 @@ async function tryRecoverChannel(client, escrowContract2, channelId, chainId) {
|
|
|
103765
103765
|
return void 0;
|
|
103766
103766
|
}
|
|
103767
103767
|
|
|
103768
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
103768
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/client/Session.js
|
|
103769
103769
|
var streamContextSchema = object({
|
|
103770
103770
|
account: optional(custom()),
|
|
103771
103771
|
action: optional(_enum2(["open", "topUp", "voucher", "close"])),
|
|
@@ -103786,6 +103786,7 @@ function session2(parameters = {}) {
|
|
|
103786
103786
|
rpcUrl
|
|
103787
103787
|
});
|
|
103788
103788
|
const getAccount = getResolver({ account: parameters.account });
|
|
103789
|
+
const getAuthorizedSigner = (account) => parameters.authorizedSigner ?? account.accessKeyAddress;
|
|
103789
103790
|
const maxDeposit = parameters.maxDeposit !== void 0 ? parseUnits(parameters.maxDeposit, decimals2) : void 0;
|
|
103790
103791
|
const escrowContractMap = /* @__PURE__ */ new Map();
|
|
103791
103792
|
const channels = /* @__PURE__ */ new Map();
|
|
@@ -103827,6 +103828,7 @@ function session2(parameters = {}) {
|
|
|
103827
103828
|
return parseUnits(parameters.deposit, decimals2);
|
|
103828
103829
|
throw new Error("No deposit amount available. Set `deposit`, `maxDeposit`, or ensure the server challenge includes `suggestedDeposit`.");
|
|
103829
103830
|
})();
|
|
103831
|
+
const authorizedSigner = getAuthorizedSigner(account);
|
|
103830
103832
|
const key = channelKey(payee, currency, escrowContract2);
|
|
103831
103833
|
let entry = channels.get(key);
|
|
103832
103834
|
if (!entry) {
|
|
@@ -103850,11 +103852,11 @@ function session2(parameters = {}) {
|
|
|
103850
103852
|
let payload;
|
|
103851
103853
|
if (entry?.opened) {
|
|
103852
103854
|
entry.cumulativeAmount += amount2;
|
|
103853
|
-
payload = await createVoucherPayload(client, account, entry.channelId, entry.cumulativeAmount, escrowContract2, chainId,
|
|
103855
|
+
payload = await createVoucherPayload(client, account, entry.channelId, entry.cumulativeAmount, escrowContract2, chainId, authorizedSigner);
|
|
103854
103856
|
notifyUpdate(entry);
|
|
103855
103857
|
} else {
|
|
103856
103858
|
const result = await createOpenPayload(client, account, {
|
|
103857
|
-
authorizedSigner
|
|
103859
|
+
authorizedSigner,
|
|
103858
103860
|
escrowContract: escrowContract2,
|
|
103859
103861
|
payee,
|
|
103860
103862
|
currency,
|
|
@@ -103876,7 +103878,8 @@ function session2(parameters = {}) {
|
|
|
103876
103878
|
const chainId = md?.chainId ?? 0;
|
|
103877
103879
|
const client = await getClient({ chainId });
|
|
103878
103880
|
const action = context2.action;
|
|
103879
|
-
const { channelId: channelIdRaw, transaction, authorizedSigner } = context2;
|
|
103881
|
+
const { channelId: channelIdRaw, transaction, authorizedSigner: contextAuthorizedSigner } = context2;
|
|
103882
|
+
const authorizedSigner = contextAuthorizedSigner ?? getAuthorizedSigner(account);
|
|
103880
103883
|
const channelId = channelIdRaw;
|
|
103881
103884
|
const cumulativeAmount = context2.cumulativeAmountRaw ? BigInt(context2.cumulativeAmountRaw) : context2.cumulativeAmount ? parseUnits(context2.cumulativeAmount, decimals2) : void 0;
|
|
103882
103885
|
const resolvedAdditionalDeposit = context2.additionalDepositRaw ? BigInt(context2.additionalDepositRaw) : context2.additionalDeposit ? parseUnits(context2.additionalDeposit, decimals2) : void 0;
|
|
@@ -103889,7 +103892,7 @@ function session2(parameters = {}) {
|
|
|
103889
103892
|
throw new Error("transaction required for open action");
|
|
103890
103893
|
if (cumulativeAmount === void 0)
|
|
103891
103894
|
throw new Error("cumulativeAmount required for open action");
|
|
103892
|
-
const signature2 = await signVoucher(client, account, { channelId, cumulativeAmount }, escrowContract2, chainId,
|
|
103895
|
+
const signature2 = await signVoucher(client, account, { channelId, cumulativeAmount }, escrowContract2, chainId, authorizedSigner);
|
|
103893
103896
|
payload = {
|
|
103894
103897
|
action: "open",
|
|
103895
103898
|
type: "transaction",
|
|
@@ -103917,7 +103920,7 @@ function session2(parameters = {}) {
|
|
|
103917
103920
|
case "voucher": {
|
|
103918
103921
|
if (cumulativeAmount === void 0)
|
|
103919
103922
|
throw new Error("cumulativeAmount required for voucher action");
|
|
103920
|
-
payload = await createVoucherPayload(client, account, channelId, cumulativeAmount, escrowContract2, chainId,
|
|
103923
|
+
payload = await createVoucherPayload(client, account, channelId, cumulativeAmount, escrowContract2, chainId, authorizedSigner);
|
|
103921
103924
|
const key = channelIdToKey.get(channelId);
|
|
103922
103925
|
if (key) {
|
|
103923
103926
|
const entry = channels.get(key);
|
|
@@ -103931,7 +103934,7 @@ function session2(parameters = {}) {
|
|
|
103931
103934
|
case "close": {
|
|
103932
103935
|
if (cumulativeAmount === void 0)
|
|
103933
103936
|
throw new Error("cumulativeAmount required for close action");
|
|
103934
|
-
const signature2 = await signVoucher(client, account, { channelId, cumulativeAmount }, escrowContract2, chainId,
|
|
103937
|
+
const signature2 = await signVoucher(client, account, { channelId, cumulativeAmount }, escrowContract2, chainId, authorizedSigner);
|
|
103935
103938
|
payload = {
|
|
103936
103939
|
action: "close",
|
|
103937
103940
|
channelId,
|
|
@@ -103967,10 +103970,10 @@ function session2(parameters = {}) {
|
|
|
103967
103970
|
});
|
|
103968
103971
|
}
|
|
103969
103972
|
|
|
103970
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
103973
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/client/SessionManager.js
|
|
103971
103974
|
init_cjs_shims();
|
|
103972
103975
|
|
|
103973
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
103976
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/client/internal/Fetch.js
|
|
103974
103977
|
init_cjs_shims();
|
|
103975
103978
|
var originalFetch;
|
|
103976
103979
|
function from19(config2) {
|
|
@@ -104012,14 +104015,14 @@ async function resolveCredential(challenge2, mi, context2) {
|
|
|
104012
104015
|
return mi.createCredential(parsedContext !== void 0 ? { challenge: challenge2, context: parsedContext } : { challenge: challenge2 });
|
|
104013
104016
|
}
|
|
104014
104017
|
|
|
104015
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
104018
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/stream/Receipt.js
|
|
104016
104019
|
init_cjs_shims();
|
|
104017
104020
|
function deserializeStreamReceipt(encoded) {
|
|
104018
104021
|
const json3 = Base64_exports.toString(encoded);
|
|
104019
104022
|
return JSON.parse(json3);
|
|
104020
104023
|
}
|
|
104021
104024
|
|
|
104022
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
104025
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/stream/Sse.js
|
|
104023
104026
|
init_cjs_shims();
|
|
104024
104027
|
function parseEvent(raw) {
|
|
104025
104028
|
let eventType = "message";
|
|
@@ -104048,7 +104051,7 @@ function parseEvent(raw) {
|
|
|
104048
104051
|
}
|
|
104049
104052
|
}
|
|
104050
104053
|
|
|
104051
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
104054
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/client/SessionManager.js
|
|
104052
104055
|
function sessionManager(parameters) {
|
|
104053
104056
|
const fetchFn = parameters.fetch ?? globalThis.fetch;
|
|
104054
104057
|
let channel = null;
|
|
@@ -104223,7 +104226,7 @@ function sessionManager(parameters) {
|
|
|
104223
104226
|
return self2;
|
|
104224
104227
|
}
|
|
104225
104228
|
|
|
104226
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
104229
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/tempo/client/Methods.js
|
|
104227
104230
|
function tempo2(parameters = {}) {
|
|
104228
104231
|
return [charge2(parameters), session2(parameters)];
|
|
104229
104232
|
}
|
|
@@ -104232,7 +104235,7 @@ function tempo2(parameters = {}) {
|
|
|
104232
104235
|
tempo3.session = sessionManager;
|
|
104233
104236
|
})(tempo2 || (tempo2 = {}));
|
|
104234
104237
|
|
|
104235
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
104238
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/client/Mppx.js
|
|
104236
104239
|
var Mppx_exports = {};
|
|
104237
104240
|
__export(Mppx_exports, {
|
|
104238
104241
|
create: () => create4,
|
|
@@ -104240,7 +104243,7 @@ __export(Mppx_exports, {
|
|
|
104240
104243
|
});
|
|
104241
104244
|
init_cjs_shims();
|
|
104242
104245
|
|
|
104243
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
104246
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/client/Transport.js
|
|
104244
104247
|
init_cjs_shims();
|
|
104245
104248
|
function from20(transport) {
|
|
104246
104249
|
return transport;
|
|
@@ -104262,7 +104265,7 @@ function http2() {
|
|
|
104262
104265
|
});
|
|
104263
104266
|
}
|
|
104264
104267
|
|
|
104265
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
104268
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/client/Mppx.js
|
|
104266
104269
|
function create4(config2) {
|
|
104267
104270
|
const { onChallenge, polyfill: polyfill2 = true, transport = http2() } = config2;
|
|
104268
104271
|
const methods = config2.methods.flat();
|
|
@@ -104445,7 +104448,7 @@ var TEMPO_TOKEN_ADDRESS = "0x20c0000000000000000000000000000000000000";
|
|
|
104445
104448
|
|
|
104446
104449
|
// src/shared/mpp-enabled.ts
|
|
104447
104450
|
init_cjs_shims();
|
|
104448
|
-
var isMppEnabled = () => "0.
|
|
104451
|
+
var isMppEnabled = () => "0.6.0".includes("-mpp");
|
|
104449
104452
|
|
|
104450
104453
|
// src/shared/operations/fetch-with-payment.ts
|
|
104451
104454
|
init_cjs_shims();
|
|
@@ -108748,10 +108751,10 @@ var safeCreateSIWxPayload = (surface2, serverInfo, signer) => {
|
|
|
108748
108751
|
// src/shared/neverthrow/mpp/index.ts
|
|
108749
108752
|
init_cjs_shims();
|
|
108750
108753
|
|
|
108751
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
108754
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/index.js
|
|
108752
108755
|
init_cjs_shims();
|
|
108753
108756
|
|
|
108754
|
-
// ../../../node_modules/.pnpm/mppx@0.2.
|
|
108757
|
+
// ../../../node_modules/.pnpm/mppx@0.2.6_@modelcontextprotocol+sdk@1.27.0_zod@4.3.6__express@5.2.1_hono@4.11.9_typesc_0a7e045eedf7d9af6a8a9ad69b3938ba/node_modules/mppx/dist/Receipt.js
|
|
108755
108758
|
var Receipt_exports = {};
|
|
108756
108759
|
__export(Receipt_exports, {
|
|
108757
108760
|
Schema: () => Schema2,
|
|
@@ -108857,10 +108860,7 @@ var tokenStringToNumber = (amount2, decimals2 = 6) => {
|
|
|
108857
108860
|
// src/shared/balance.ts
|
|
108858
108861
|
init_cjs_shims();
|
|
108859
108862
|
var X402SCAN_BASE = "https://x402scan.com";
|
|
108860
|
-
var getBalance3 = async ({
|
|
108861
|
-
address,
|
|
108862
|
-
surface: surface2
|
|
108863
|
-
}) => {
|
|
108863
|
+
var getBalance3 = async ({ address, surface: surface2 }) => {
|
|
108864
108864
|
const url3 = `${X402SCAN_BASE}/api/rpc/balance/${address}`;
|
|
108865
108865
|
const res = await safeFetchJson(
|
|
108866
108866
|
surface2,
|
|
@@ -111029,7 +111029,7 @@ var import_path2 = require("path");
|
|
|
111029
111029
|
var import_url = require("url");
|
|
111030
111030
|
function getVersion2() {
|
|
111031
111031
|
if (true) {
|
|
111032
|
-
return "0.
|
|
111032
|
+
return "0.6.0";
|
|
111033
111033
|
}
|
|
111034
111034
|
const __dirname3 = (0, import_path2.dirname)((0, import_url.fileURLToPath)(importMetaUrl));
|
|
111035
111035
|
const pkg = JSON.parse(
|
|
@@ -111773,7 +111773,7 @@ var import_path3 = require("path");
|
|
|
111773
111773
|
var import_url2 = require("url");
|
|
111774
111774
|
function getVersion3() {
|
|
111775
111775
|
if (true) {
|
|
111776
|
-
return "0.
|
|
111776
|
+
return "0.6.0";
|
|
111777
111777
|
}
|
|
111778
111778
|
const __dirname3 = (0, import_path3.dirname)((0, import_url2.fileURLToPath)(importMetaUrl));
|
|
111779
111779
|
const pkg = JSON.parse(
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isMppEnabled
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N3WKW6F4.js";
|
|
4
4
|
import {
|
|
5
5
|
MCP_VERSION
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-THRXTZU6.js";
|
|
7
7
|
import {
|
|
8
8
|
getBalance,
|
|
9
9
|
getBaseUrl,
|
|
10
10
|
getDepositLink
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UFSCGP67.js";
|
|
12
12
|
import {
|
|
13
13
|
log,
|
|
14
14
|
ok,
|
|
@@ -119,4 +119,4 @@ export {
|
|
|
119
119
|
getWalletInfo,
|
|
120
120
|
submitErrorReport
|
|
121
121
|
};
|
|
122
|
-
//# sourceMappingURL=chunk-
|
|
122
|
+
//# sourceMappingURL=chunk-BOGGLB3Y.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getTempoBalance
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BOGGLB3Y.js";
|
|
4
4
|
import {
|
|
5
5
|
detectPaymentProtocols,
|
|
6
6
|
safeCreatePaymentPayload,
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
tokenStringToNumber,
|
|
10
10
|
x402Err,
|
|
11
11
|
x402Ok
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-X5H7CNL7.js";
|
|
13
13
|
import {
|
|
14
14
|
getBalance
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UFSCGP67.js";
|
|
16
16
|
import {
|
|
17
17
|
err,
|
|
18
18
|
fetchErr,
|
|
@@ -357,4 +357,4 @@ export {
|
|
|
357
357
|
safeGetMppChallenge,
|
|
358
358
|
createFetchWithPayment
|
|
359
359
|
};
|
|
360
|
-
//# sourceMappingURL=chunk-
|
|
360
|
+
//# sourceMappingURL=chunk-C73Z5QPI.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getBalance,
|
|
3
3
|
getBaseUrl
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UFSCGP67.js";
|
|
5
5
|
import {
|
|
6
6
|
LEGACY_DIRECTORY,
|
|
7
7
|
configFile,
|
|
@@ -361,4 +361,4 @@ export {
|
|
|
361
361
|
getWallet,
|
|
362
362
|
redeemInviteCode
|
|
363
363
|
};
|
|
364
|
-
//# sourceMappingURL=chunk-
|
|
364
|
+
//# sourceMappingURL=chunk-KFYFGEC4.js.map
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
DEFAULT_NETWORK,
|
|
3
3
|
getChainName,
|
|
4
4
|
redeemInviteCode
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KFYFGEC4.js";
|
|
6
6
|
import {
|
|
7
7
|
getDepositLink
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UFSCGP67.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-LOEINYA7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/shared/mpp-enabled.ts"],"sourcesContent":["declare const __MCP_VERSION__: string | undefined;\n\n/**\n * MPP features are visible when running a pre-release build published to the `mpp` dist-tag.\n * Pre-release versions look like `0.5.0-mpp.0` (managed by changesets).\n * On the `latest` dist-tag (e.g., `0.5.0`), MPP code stays in the binary but is\n * hidden from all agent-visible surfaces (tool schemas, CLI help, protocol detection).\n *\n * In dev (tsx, unbundled) __MCP_VERSION__ is not defined — defaults to enabled\n * so developers always have full MPP access during local development.\n */\nexport const isMppEnabled = () =>\n typeof __MCP_VERSION__ !== 'string' || __MCP_VERSION__.includes('-mpp');\n"],"mappings":";AAWO,IAAM,eAAe,MACa,
|
|
1
|
+
{"version":3,"sources":["../../src/shared/mpp-enabled.ts"],"sourcesContent":["declare const __MCP_VERSION__: string | undefined;\n\n/**\n * MPP features are visible when running a pre-release build published to the `mpp` dist-tag.\n * Pre-release versions look like `0.5.0-mpp.0` (managed by changesets).\n * On the `latest` dist-tag (e.g., `0.5.0`), MPP code stays in the binary but is\n * hidden from all agent-visible surfaces (tool schemas, CLI help, protocol detection).\n *\n * In dev (tsx, unbundled) __MCP_VERSION__ is not defined — defaults to enabled\n * so developers always have full MPP access during local development.\n */\nexport const isMppEnabled = () =>\n typeof __MCP_VERSION__ !== 'string' || __MCP_VERSION__.includes('-mpp');\n"],"mappings":";AAWO,IAAM,eAAe,MACa,QAAgB,SAAS,MAAM;","names":[]}
|
|
@@ -4,7 +4,7 @@ import { dirname, join } from "path";
|
|
|
4
4
|
import { fileURLToPath } from "url";
|
|
5
5
|
function getVersion() {
|
|
6
6
|
if (true) {
|
|
7
|
-
return "0.
|
|
7
|
+
return "0.6.0";
|
|
8
8
|
}
|
|
9
9
|
const __dirname2 = dirname(fileURLToPath(import.meta.url));
|
|
10
10
|
const pkg = JSON.parse(
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
MCP_VERSION,
|
|
20
20
|
DIST_TAG
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
22
|
+
//# sourceMappingURL=chunk-THRXTZU6.js.map
|
|
@@ -5,10 +5,7 @@ import {
|
|
|
5
5
|
// src/shared/balance.ts
|
|
6
6
|
import z from "zod";
|
|
7
7
|
var X402SCAN_BASE = "https://x402scan.com";
|
|
8
|
-
var getBalance = async ({
|
|
9
|
-
address,
|
|
10
|
-
surface
|
|
11
|
-
}) => {
|
|
8
|
+
var getBalance = async ({ address, surface }) => {
|
|
12
9
|
const url = `${X402SCAN_BASE}/api/rpc/balance/${address}`;
|
|
13
10
|
const res = await safeFetchJson(
|
|
14
11
|
surface,
|
|
@@ -45,4 +42,4 @@ export {
|
|
|
45
42
|
getDepositLink,
|
|
46
43
|
openDepositLink
|
|
47
44
|
};
|
|
48
|
-
//# sourceMappingURL=chunk-
|
|
45
|
+
//# sourceMappingURL=chunk-UFSCGP67.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shared/balance.ts","../../src/shared/utils.ts"],"sourcesContent":["import z from 'zod';\n\nimport { safeFetchJson } from '@/shared/neverthrow/fetch';\n\nimport type { Address } from 'viem';\n\nconst X402SCAN_BASE = 'https://x402scan.com';\n\ninterface GetBalanceProps {\n address: Address;\n surface: string;\n}\n\nexport const getBalance = async ({ address, surface }: GetBalanceProps) => {\n const url = `${X402SCAN_BASE}/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","import open from 'open';\n\nimport type { GlobalFlags } from '@/types';\n\nexport const getBaseUrl = (dev: boolean) => {\n return dev ? 'http://localhost:3000' : 'https://agentcash.dev';\n};\n\nexport const getDepositLink = (address: string, flags: GlobalFlags) => {\n return `${getBaseUrl(flags.dev)}/deposit/${address}`;\n};\n\nexport const openDepositLink = async (address: string, flags: GlobalFlags) => {\n const depositLink = getDepositLink(address, flags);\n await open(depositLink);\n};\n"],"mappings":";;;;;AAAA,OAAO,OAAO;AAMd,IAAM,gBAAgB;AAOf,IAAM,aAAa,OAAO,EAAE,SAAS,QAAQ,MAAuB;AACzE,QAAM,MAAM,GAAG,aAAa,oBAAoB,OAAO;AAEvD,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;;;AC/BA,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,YAAY,OAAO;AACpD;AAEO,IAAM,kBAAkB,OAAO,SAAiB,UAAuB;AAC5E,QAAM,cAAc,eAAe,SAAS,KAAK;AACjD,QAAM,KAAK,WAAW;AACxB;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isMppEnabled
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N3WKW6F4.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_FETCH_TIMEOUT,
|
|
6
6
|
err,
|
|
@@ -645,4 +645,4 @@ export {
|
|
|
645
645
|
checkEndpoint,
|
|
646
646
|
discoverResources
|
|
647
647
|
};
|
|
648
|
-
//# sourceMappingURL=chunk-
|
|
648
|
+
//# sourceMappingURL=chunk-X5H7CNL7.js.map
|