x402-proxy 0.10.11 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/{Credential-0iRzpJkF.js → Mcp-CKylLH8N.js} +209 -211
- package/dist/accounts-D5u2KBgr.js +4 -0
- package/dist/{hashTypedData-CtEdfx4y.js → accounts-D9KsVVpJ.js} +228 -3
- package/dist/{auth-J9VuNMoG.js → auth-CaCZiNCk.js} +3 -3
- package/dist/bin/cli.js +46 -51
- package/dist/{decodeFunctionData-JPOUdvil.js → call-CNxk2xpg.js} +2084 -144
- package/dist/{decodeFunctionData-DuFcwhC_.js → call-DdUUzMfg.js} +11 -16
- package/dist/{ccip-C6CQOJYv.js → ccip-Cc1Fdazz.js} +1 -1
- package/dist/{ccip-Bx-zoUCJ.js → ccip-IumNC20V.js} +13 -3
- package/dist/{ccip-C2k1DD1T.js → ccip-JDVib6lf.js} +1 -1
- package/dist/{ccip-RZzsZ5Mv.js → ccip-RzF9aX_O.js} +3 -4
- package/dist/{chain-CafcHffR.js → chain-C_3Km9Dx.js} +1 -1
- package/dist/{client-Bcl2uC6u.js → client-C2DwSbYN.js} +1 -2
- package/dist/{Sse-DGR-tH7K.js → client-DqtxTnu6.js} +10249 -6224
- package/dist/client-DuqEc8Iw.js +3 -0
- package/dist/{client-DZV1cVsW.js → client-uAaF6lv2.js} +2 -2
- package/dist/{derive-DNUl8LU9.js → config-cyNyKO4-.js} +1024 -919
- package/dist/{dist-DM5_F3r5.js → dist-CFt2UZ4W.js} +1 -1
- package/dist/{dist-DxJCYyL5.js → dist-Cwt2qrTK.js} +2 -2
- package/dist/{helpers-ChcFbdC0.js → helpers-DebIs_21.js} +2 -2
- package/dist/{sendRawTransactionSync-DvSkhZtW.js → http-J0KYM-2Y.js} +2186 -169
- package/dist/index.d.ts +0 -1
- package/dist/index.js +30107 -771
- package/dist/{index.node-CxkL0OFh.js → index.node-DCvOPMK7.js} +5 -57
- package/dist/{index.node-DvmeuZBj.js → index.node-xc-jRJ78.js} +1 -1
- package/dist/{localBatchGatewayRequest-DOdQ9bR7.js → localBatchGatewayRequest-0gr8vzH3.js} +14 -2
- package/dist/{localBatchGatewayRequest-DQkbZaSy.js → localBatchGatewayRequest-CBsFXIAU.js} +2 -2
- package/dist/{localBatchGatewayRequest-C-RPJyDO.js → localBatchGatewayRequest-CPqqSJcB.js} +2 -2
- package/dist/{schemas-BxMFYNbH.js → schemas-DzZjufD1.js} +1 -1
- package/dist/{secp256k1-BZpiyffY.js → secp256k1-Bp7LcNvI.js} +2 -7
- package/dist/secp256k1-BsaSkXlH.js +2 -0
- package/dist/{secp256k1-BjenrLl5.js → secp256k1-BwSAYyif.js} +2 -2
- package/dist/secp256k1-CHAXu2gP.js +3 -0
- package/dist/{server-D2apWWY9.js → server-Dbsk9dql.js} +2 -2
- package/dist/setup-BdSfEdx4.js +3 -0
- package/dist/{setup-BY4J49Lv.js → setup-C10O8N36.js} +16 -33
- package/dist/{hmac-59IlS_by.js → sha2-XLg3s2a9.js} +81 -81
- package/dist/{sha256-FAs0qeni.js → sha256-DCLdwsRU.js} +1 -1
- package/dist/{sha3-DbMJRJ3C.js → sha3-03id956K.js} +1 -1
- package/dist/{sha3-CYkWM8Xa.js → sha3-VSia5eGE.js} +1 -1
- package/dist/{sse-qIEKrJEZ.js → sse-kba68iqF.js} +2 -2
- package/dist/status-B2xUewrq.js +3 -0
- package/dist/{status-X21VnGUO.js → status-DjZdIeES.js} +2 -3
- package/dist/{stdio-BfDjLLnd.js → stdio-CdmkLt8r.js} +3 -3
- package/dist/{streamableHttp-BkayeoEQ.js → streamableHttp-DRntYTFN.js} +2 -2
- package/dist/{types-BmyZIQ8G.js → types-BQ17ZF7g.js} +1 -1
- package/dist/{types-DlqDf-zE.js → types-DH9rDVeP.js} +1 -1
- package/dist/{utils-SeGHMW9O.js → utils-psFtUKLa.js} +53 -53
- package/dist/wallet-BsCgqUun.js +3 -0
- package/dist/{wallet-DSyht15_.js → wallet-CUCoLEqs.js} +192 -148
- package/package.json +1 -1
- package/dist/Mcp-CSyD7Hxz.js +0 -10
- package/dist/Sse-C-KDPYh0.js +0 -16482
- package/dist/accounts-DsuvWwph.js +0 -232
- package/dist/accounts-DzvAlQRn.js +0 -5
- package/dist/accounts-IG-Cmrwy.js +0 -229
- package/dist/chain-DwfP5RGZ.js +0 -1968
- package/dist/chunk-DBEY4PJZ.js +0 -16
- package/dist/client-1XQsO-Eh.js +0 -5152
- package/dist/client-Co7Fg1lv.js +0 -6388
- package/dist/config-BUQsit4s.js +0 -3
- package/dist/config-DR1Fs_wL.js +0 -6600
- package/dist/config-rvKA3SYT.js +0 -96
- package/dist/hashTypedData-BHmP9dBd.js +0 -859
- package/dist/http-BAtucMbS.js +0 -2060
- package/dist/isAddressEqual-BLrd1Hg1.js +0 -9
- package/dist/isAddressEqual-DsAqfQOD.js +0 -10
- package/dist/parseUnits-CApwcKSD.js +0 -49
- package/dist/parseUnits-cMO2udMe.js +0 -48
- package/dist/secp256k1-CLPUX17u.js +0 -3
- package/dist/setup-wMOAgrsN.js +0 -3
- package/dist/status-Bu23RjW6.js +0 -3
- package/dist/tempo-BcTkftHK.js +0 -17
- package/dist/tempo-Bs_aydgm.js +0 -18
- package/dist/wallet-DKVlrR1S.js +0 -3
- /package/dist/{api-CUzmQvTQ.js → api-B5mo8tpE.js} +0 -0
- /package/dist/{dist-C2YO6HSQ.js → dist-CvV4mGO6.js} +0 -0
- /package/dist/{utils-BYjkXZDF.js → utils-B1qOlJzL.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as normalizeHeaders, i as createFetchWithInit, n as auth, o as createParser, r as extractWWWAuthenticateParams, t as UnauthorizedError } from "./auth-
|
|
3
|
-
import { Z as JSONRPCMessageSchema } from "./types-
|
|
2
|
+
import { a as normalizeHeaders, i as createFetchWithInit, n as auth, o as createParser, r as extractWWWAuthenticateParams, t as UnauthorizedError } from "./auth-CaCZiNCk.js";
|
|
3
|
+
import { Z as JSONRPCMessageSchema } from "./types-BQ17ZF7g.js";
|
|
4
4
|
//#region node_modules/.pnpm/eventsource@3.0.7/node_modules/eventsource/dist/index.js
|
|
5
5
|
var ErrorEvent = class extends Event {
|
|
6
6
|
/**
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { i as __toESM } from "./chunk-DjEMn6fM.js";
|
|
3
|
-
import {
|
|
4
|
-
import { c as resolveWallet, f as formatAmount, h as readHistory, m as formatUsdcValue, n as fetchAllBalances, p as formatTxLine, t as balanceLine, u as calcSpend, v as dim } from "./wallet-
|
|
5
|
-
import { i as getConfigDirShort, o as getHistoryPath, u as loadConfig } from "./config-rvKA3SYT.js";
|
|
3
|
+
import { i as getConfigDirShort, l as loadConfig, o as getHistoryPath, x as buildCommand, y as require_picocolors } from "./config-cyNyKO4-.js";
|
|
4
|
+
import { c as resolveWallet, f as formatAmount, h as readHistory, m as formatUsdcValue, n as fetchAllBalances, p as formatTxLine, t as balanceLine, u as calcSpend, v as dim } from "./wallet-CUCoLEqs.js";
|
|
6
5
|
//#region packages/x402-proxy/src/commands/status.ts
|
|
7
6
|
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
8
7
|
async function displayStatus() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Z as JSONRPCMessageSchema } from "./types-
|
|
3
|
-
import
|
|
2
|
+
import { Z as JSONRPCMessageSchema } from "./types-BQ17ZF7g.js";
|
|
3
|
+
import process from "node:process";
|
|
4
4
|
//#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
5
5
|
/**
|
|
6
6
|
* Buffers a continuous stdio stream into discrete JSON-RPC messages.
|
|
@@ -35,7 +35,7 @@ function serializeMessage(message) {
|
|
|
35
35
|
* This transport is only available in Node.js environments.
|
|
36
36
|
*/
|
|
37
37
|
var StdioServerTransport = class {
|
|
38
|
-
constructor(_stdin =
|
|
38
|
+
constructor(_stdin = process.stdin, _stdout = process.stdout) {
|
|
39
39
|
this._stdin = _stdin;
|
|
40
40
|
this._stdout = _stdout;
|
|
41
41
|
this._readBuffer = new ReadBuffer();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as normalizeHeaders, i as createFetchWithInit, n as auth, o as createParser, r as extractWWWAuthenticateParams, t as UnauthorizedError } from "./auth-
|
|
3
|
-
import { Hn as isJSONRPCRequest, Un as isJSONRPCResultResponse, Z as JSONRPCMessageSchema, zn as isInitializedNotification } from "./types-
|
|
2
|
+
import { a as normalizeHeaders, i as createFetchWithInit, n as auth, o as createParser, r as extractWWWAuthenticateParams, t as UnauthorizedError } from "./auth-CaCZiNCk.js";
|
|
3
|
+
import { Hn as isJSONRPCRequest, Un as isJSONRPCResultResponse, Z as JSONRPCMessageSchema, zn as isInitializedNotification } from "./types-BQ17ZF7g.js";
|
|
4
4
|
//#region node_modules/.pnpm/eventsource-parser@3.0.6/node_modules/eventsource-parser/dist/stream.js
|
|
5
5
|
var EventSourceParserStream = class extends TransformStream {
|
|
6
6
|
constructor({ onError, onRetry, onComment } = {}) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { _ as string, a as array, c as discriminatedUnion, d as looseObject, f as number, g as record, h as preprocess, l as intersection, m as optional, n as _enum, o as boolean, p as object, r as _null, s as custom, u as literal, v as union, x as datetime, y as unknown } from "./schemas-
|
|
2
|
+
import { _ as string, a as array, c as discriminatedUnion, d as looseObject, f as number, g as record, h as preprocess, l as intersection, m as optional, n as _enum, o as boolean, p as object, r as _null, s as custom, u as literal, v as union, x as datetime, y as unknown } from "./schemas-DzZjufD1.js";
|
|
3
3
|
//#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
4
4
|
const LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
5
5
|
const SUPPORTED_PROTOCOL_VERSIONS = [
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { An as ToolListChangedNotificationSchema, Jt as ResourceListChangedNotificationSchema, Vt as ReadResourceRequestSchema, ct as ListResourcesRequestSchema, mt as ListToolsRequestSchema, s as CallToolRequestSchema } from "./types-
|
|
2
|
+
import { An as ToolListChangedNotificationSchema, Jt as ResourceListChangedNotificationSchema, Vt as ReadResourceRequestSchema, ct as ListResourcesRequestSchema, mt as ListToolsRequestSchema, s as CallToolRequestSchema } from "./types-BQ17ZF7g.js";
|
|
3
3
|
export { CallToolRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema, ResourceListChangedNotificationSchema, ToolListChangedNotificationSchema };
|
|
@@ -1,57 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import * as nc from "node:crypto";
|
|
3
|
-
//#region node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js
|
|
4
|
-
/**
|
|
5
|
-
* Internal helpers for u64. BigUint64Array is too slow as per 2025, so we implement it using Uint32Array.
|
|
6
|
-
* @todo re-check https://issues.chromium.org/issues/42212588
|
|
7
|
-
* @module
|
|
8
|
-
*/
|
|
9
|
-
const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
|
|
10
|
-
const _32n = /* @__PURE__ */ BigInt(32);
|
|
11
|
-
function fromBig(n, le = false) {
|
|
12
|
-
if (le) return {
|
|
13
|
-
h: Number(n & U32_MASK64),
|
|
14
|
-
l: Number(n >> _32n & U32_MASK64)
|
|
15
|
-
};
|
|
16
|
-
return {
|
|
17
|
-
h: Number(n >> _32n & U32_MASK64) | 0,
|
|
18
|
-
l: Number(n & U32_MASK64) | 0
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
function split(lst, le = false) {
|
|
22
|
-
const len = lst.length;
|
|
23
|
-
let Ah = new Uint32Array(len);
|
|
24
|
-
let Al = new Uint32Array(len);
|
|
25
|
-
for (let i = 0; i < len; i++) {
|
|
26
|
-
const { h, l } = fromBig(lst[i], le);
|
|
27
|
-
[Ah[i], Al[i]] = [h, l];
|
|
28
|
-
}
|
|
29
|
-
return [Ah, Al];
|
|
30
|
-
}
|
|
31
|
-
const shrSH = (h, _l, s) => h >>> s;
|
|
32
|
-
const shrSL = (h, l, s) => h << 32 - s | l >>> s;
|
|
33
|
-
const rotrSH = (h, l, s) => h >>> s | l << 32 - s;
|
|
34
|
-
const rotrSL = (h, l, s) => h << 32 - s | l >>> s;
|
|
35
|
-
const rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;
|
|
36
|
-
const rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;
|
|
37
|
-
const rotlSH = (h, l, s) => h << s | l >>> 32 - s;
|
|
38
|
-
const rotlSL = (h, l, s) => l << s | h >>> 32 - s;
|
|
39
|
-
const rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
|
|
40
|
-
const rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
|
|
41
|
-
function add(Ah, Al, Bh, Bl) {
|
|
42
|
-
const l = (Al >>> 0) + (Bl >>> 0);
|
|
43
|
-
return {
|
|
44
|
-
h: Ah + Bh + (l / 2 ** 32 | 0) | 0,
|
|
45
|
-
l: l | 0
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
const add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
|
|
49
|
-
const add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
|
|
50
|
-
const add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
|
|
51
|
-
const add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
|
|
52
|
-
const add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
|
|
53
|
-
const add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
|
|
54
|
-
//#endregion
|
|
55
3
|
//#region node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/cryptoNode.js
|
|
56
4
|
/**
|
|
57
5
|
* Internal webcrypto alias.
|
|
@@ -187,6 +135,58 @@ function randomBytes(bytesLength = 32) {
|
|
|
187
135
|
throw new Error("crypto.getRandomValues must be defined");
|
|
188
136
|
}
|
|
189
137
|
//#endregion
|
|
138
|
+
//#region node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js
|
|
139
|
+
/**
|
|
140
|
+
* Internal helpers for u64. BigUint64Array is too slow as per 2025, so we implement it using Uint32Array.
|
|
141
|
+
* @todo re-check https://issues.chromium.org/issues/42212588
|
|
142
|
+
* @module
|
|
143
|
+
*/
|
|
144
|
+
const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
|
|
145
|
+
const _32n = /* @__PURE__ */ BigInt(32);
|
|
146
|
+
function fromBig(n, le = false) {
|
|
147
|
+
if (le) return {
|
|
148
|
+
h: Number(n & U32_MASK64),
|
|
149
|
+
l: Number(n >> _32n & U32_MASK64)
|
|
150
|
+
};
|
|
151
|
+
return {
|
|
152
|
+
h: Number(n >> _32n & U32_MASK64) | 0,
|
|
153
|
+
l: Number(n & U32_MASK64) | 0
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
function split(lst, le = false) {
|
|
157
|
+
const len = lst.length;
|
|
158
|
+
let Ah = new Uint32Array(len);
|
|
159
|
+
let Al = new Uint32Array(len);
|
|
160
|
+
for (let i = 0; i < len; i++) {
|
|
161
|
+
const { h, l } = fromBig(lst[i], le);
|
|
162
|
+
[Ah[i], Al[i]] = [h, l];
|
|
163
|
+
}
|
|
164
|
+
return [Ah, Al];
|
|
165
|
+
}
|
|
166
|
+
const shrSH = (h, _l, s) => h >>> s;
|
|
167
|
+
const shrSL = (h, l, s) => h << 32 - s | l >>> s;
|
|
168
|
+
const rotrSH = (h, l, s) => h >>> s | l << 32 - s;
|
|
169
|
+
const rotrSL = (h, l, s) => h << 32 - s | l >>> s;
|
|
170
|
+
const rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;
|
|
171
|
+
const rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;
|
|
172
|
+
const rotlSH = (h, l, s) => h << s | l >>> 32 - s;
|
|
173
|
+
const rotlSL = (h, l, s) => l << s | h >>> 32 - s;
|
|
174
|
+
const rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
|
|
175
|
+
const rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
|
|
176
|
+
function add(Ah, Al, Bh, Bl) {
|
|
177
|
+
const l = (Al >>> 0) + (Bl >>> 0);
|
|
178
|
+
return {
|
|
179
|
+
h: Ah + Bh + (l / 2 ** 32 | 0) | 0,
|
|
180
|
+
l: l | 0
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
const add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
|
|
184
|
+
const add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
|
|
185
|
+
const add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
|
|
186
|
+
const add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
|
|
187
|
+
const add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
|
|
188
|
+
const add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
|
|
189
|
+
//#endregion
|
|
190
190
|
//#region node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/utils.js
|
|
191
191
|
/**
|
|
192
192
|
* Hex, bytes and number utilities.
|
|
@@ -442,4 +442,4 @@ function memoized(fn) {
|
|
|
442
442
|
};
|
|
443
443
|
}
|
|
444
444
|
//#endregion
|
|
445
|
-
export {
|
|
445
|
+
export { swap32IfBE as $, rotlBL as A, Hash as B, add3H as C, add5H as D, add4L as E, rotrSH as F, aoutput as G, aexists as H, rotrSL as I, createHasher as J, clean as K, shrSH as L, rotlSL as M, rotrBH as N, add5L as O, rotrBL as P, rotr as Q, shrSL as R, add as S, add4H as T, ahash as U, abytes$1 as V, anumber as W, createXOFer as X, createView as Y, randomBytes as Z, numberToBytesBE as _, bitMask as a, utf8ToBytes as b, bytesToNumberLE as c, ensureBytes as d, toBytes as et, equalBytes as f, memoized as g, isBytes as h, bitLen as i, rotlSH as j, rotlBH as k, concatBytes as l, inRange as m, abool as n, bytesToHex as o, hexToBytes as p, concatBytes$1 as q, abytes as r, bytesToNumberBE as s, aInRange as t, u32 as tt, createHmacDrbg as u, numberToBytesLE as v, add3L as w, validateObject as x, numberToHexUnpadded as y, split as z };
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { i as __toESM } from "./chunk-DjEMn6fM.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { B as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import "./localBatchGatewayRequest-
|
|
13
|
-
import { l as
|
|
14
|
-
import { t as secp256k1 } from "./secp256k1-BjenrLl5.js";
|
|
15
|
-
import { d as loadWalletFile, o as getHistoryPath } from "./config-rvKA3SYT.js";
|
|
16
|
-
import { $ as UnknownNodeError$1, $t as encodeAbiParameters, A as slice$4, An as DecodeLogTopicsMismatch$1, At as CallExecutionError, B as toNumber, Bn as InvalidAbiItemError$1, Bt as TransactionReceiptRevertedError, C as fromBoolean, Cn as AbiDecodingDataSizeTooSmallError, Ct as UnsupportedNonOptionalCapabilityError, D as padLeft, Dn as AbiEventSignatureNotFoundError, Dt as HttpRequestError, E as fromString$2, En as AbiEventSignatureEmptyTopicsError, Et as WalletConnectSessionSettlementError, F as fromString$1, Fn as parseStructs$1, G as decodeFunctionResult$1, Gt as stringify$1, H as trimLeft, Hn as modifiers, Ht as prettyPrint, I as size$4, In as parseAbiParameter, It as InvalidSerializableTransactionError, J as maxUint256$1, Jt as createCursor, K as isAddressEqual$1, L as slice$3, Ln as parseSignature$1, Lt as TransactionExecutionError, M as validate$5, Mn as size$2, Mt as ContractFunctionRevertedError$1, N as from$9, Nn as isHex$1, Nt as ContractFunctionZeroDataError, O as padRight, On as BytesSizeMismatchError$1, Ot as RpcRequestError, P as fromHex$1, Pn as formatAbiItem$1, Pt as RawContractError$1, Q as getNodeError$1, Qt as getAbiItem, R as toBigInt, Rn as splitParameters, Rt as TransactionNotFoundError$1, S as from$10, Sn as trim$1, St as UnsupportedChainIdError, T as fromNumber, Tn as AbiEventNotFoundError, Tt as UserRejectedRequestError, U as stringify$2, Un as formatAbiItem$2, Ut as formatGwei, V as toString, Vn as isStructSignature$1, Vt as WaitForTransactionReceiptTimeoutError$1, W as BaseError$3, Wn as formatAbiParameters, Wt as formatEther, X as formatTransactionRequest$1, Xt as encodeFunctionData$1, Y as serializeStateOverride$1, Yt as PositionOutOfBoundsError$1, Z as extract$2, Zt as parseAccount$1, _ as universalResolverResolveAbi$1, _n as stringToHex, _t as SwitchChainError, a as withResolvers$1, an as isAddress$1, at as InternalRpcError, b as IntegerOutOfRangeError, bn as hexToBool, bt as UnknownBundleIdError, c as encodeDeployData, cn as LruMap$1, ct as InvalidRequestRpcError, d as multicall3Bytecode, dn as keccak256$3, dt as MethodNotFoundRpcError, en as bytesRegex$1, et as AtomicReadyWalletRejectedUpgradeError, f as addressResolverAbi$1, fn as hexToBytes, ft as MethodNotSupportedRpcError, g as textResolverAbi$1, gn as numberToHex$1, gt as ResourceUnavailableRpcError, h as multicall3Abi$1, hn as bytesToHex$1, ht as ResourceNotFoundRpcError, i as createBatchScheduler, in as concatHex$1, it as DuplicateIdError, j as toNumber$1, jn as BaseError$2, jt as ContractFunctionExecutionError, k as size$3, kn as DecodeLogDataMismatch$1, kt as TimeoutError, l as deploylessCallViaBytecodeBytecode$1, ln as InvalidAddressError$2, lt as JsonRpcVersionUnsupportedError, m as erc6492SignatureValidatorAbi, mn as toBytes$1, mt as ProviderDisconnectedError, nn as slice$2, nt as BundleTooLargeError, o as getCallError$1, on as checksumAddress, ot as InvalidInputRpcError$1, p as erc1271Abi, pn as stringToBytes$1, pt as ParseRpcError, q as assertRequest$1, qt as decodeAbiParameters, r as call$1, rn as concat$2, rt as ChainDisconnectedError, s as getChainContractAddress$1, sn as getAddress$1, st as InvalidParamsRpcError, tn as integerRegex$1, tt as AtomicityNotSupportedError, u as erc6492SignatureValidatorByteCode, un as toEventSelector, ut as LimitExceededRpcError, v as universalResolverReverseAbi$1, vn as toHex$1, vt as TransactionRejectedRpcError, w as fromBytes$1, wn as AbiDecodingZeroDataError$1, wt as UnsupportedProviderMethodError, x as concat$3, xn as hexToNumber$1, xt as UnknownRpcError, y as toRpc$1, yn as hexToBigInt$1, yt as UnauthorizedProviderError, z as toBoolean, zn as InvalidAbiParametersError, zt as TransactionReceiptNotFoundError$1 } from "./localBatchGatewayRequest-DQkbZaSy.js";
|
|
17
|
-
import { B as setTransactionMessageComputeUnitLimit, Ct as getAddressEncoder, G as mainnet, H as setTransactionMessageFeePayer, K as AccountRole, Qo as SolanaError, Tt as getProgramDerivedAddress, U as setTransactionMessageLifetimeUsingBlockhash, V as setTransactionMessageComputeUnitPrice, X as upgradeRoleToSigner, Yt as transformEncoder, Z as pipe, _t as getU8Encoder, c as isTransactionSigner, f as createDefaultRpcTransport, gt as getU64Encoder, j as createTransactionMessage, k as appendTransactionMessageInstructions, l as partiallySignTransactionMessageWithSigners, ns as isSolanaError, ot as getStructEncoder, p as createSolanaRpcFromTransport, ra as SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL, vt as address, x as getBase64EncodedWireTransaction } from "./index.node-CxkL0OFh.js";
|
|
3
|
+
import { _ as base58, h as deriveSolanaKeypair, m as deriveEvmKeypair, o as getHistoryPath, u as loadWalletFile, v as ed25519, x as buildCommand, y as require_picocolors } from "./config-cyNyKO4-.js";
|
|
4
|
+
import { $ as BaseError, D as fromString, Jt as encodeFunctionData, M as slice, Qt as parseStructs, R as validate$3, S as concat, Ut as RawContractError, Vt as ContractFunctionRevertedError, _ as universalResolverReverseAbi, a as getChainContractAddress, at as formatTransactionRequest, ct as getNodeError, en as parseSignature, et as decodeFunctionResult, g as universalResolverResolveAbi, h as textResolverAbi, ht as InvalidInputRpcError, i as getCallError, in as isStructSignature, m as multicall3Abi, nt as assertRequest, on as formatAbiItem, r as withResolvers, rn as InvalidAbiItemError, rt as serializeStateOverride, s as deploylessCallViaBytecodeBytecode, st as extract$1, t as call, tt as isAddressEqual, u as addressResolverAbi, v as toRpc } from "./call-DdUUzMfg.js";
|
|
5
|
+
import { $ as parseEventLogs$1, B as formatTransactionReceipt$1, C as encode$4, Ct as getAction$1, F as defineChain, G as uninstallFilter$1, H as withRetry$1, J as poll$1, K as getFilterChanges$1, L as getCode$1, M as keccak256$1, Q as getLogs$1, R as createClient$1, St as encodeEventTopics$1, U as sendRawTransaction$1, W as watchContractEvent$1, X as readContract$1, Y as observe$1, Z as getContractEvents$1, _t as BlockNotFoundError$1, a as getTransactionReceipt$1, at as fillTransaction$1, bt as createContractEventFilter$1, ct as getTransactionCount$1, dt as getGasPrice$1, et as decodeEventLog$1, ft as getBlock$1, gt as formatTransaction$1, ht as defineTransaction, i as multicall$1, it as prepareTransactionRequest$1, k as validate$4, lt as estimateFeesPerGas$1, mt as formatBlock$1, nt as estimateGas$1, ot as getChainId$1, pt as defineBlock, q as getBlockNumber$1, r as verifyHash$1, t as http$1, tt as formatLog$1, ut as estimateMaxPriorityFeePerGas$1, xt as createFilterRequestScope$1, yt as getContractError$1, z as defineTransactionReceipt } from "./http-J0KYM-2Y.js";
|
|
6
|
+
import { t as keccak_256 } from "./sha3-VSia5eGE.js";
|
|
7
|
+
import { t as sha256$1 } from "./sha256-DCLdwsRU.js";
|
|
8
|
+
import { t as secp256k1 } from "./secp256k1-BwSAYyif.js";
|
|
9
|
+
import { $ as toBytes, B as slice$1, D as TransactionReceiptRevertedError, E as TransactionReceiptNotFoundError, F as parseAccount, G as isAddress, M as stringify, Mt as BaseError$1, Nt as size$1, O as WaitForTransactionReceiptTimeoutError, Ot as DecodeLogDataMismatch, Pt as isHex, Q as stringToBytes, T as TransactionNotFoundError, U as concat$1, W as concatHex, X as keccak256$2, Y as InvalidAddressError$1, at as hexToBigInt, ct as trim, et as bytesToHex, gt as AbiDecodingZeroDataError, kt as DecodeLogTopicsMismatch, q as getAddress, rt as toHex, st as hexToNumber, tt as numberToHex, v as UnknownNodeError } from "./chain-C_3Km9Dx.js";
|
|
10
|
+
import { E as toRlp$1, l as hashTypedData$1, m as serializeTransaction$1, p as hashMessage$1, t as privateKeyToAccount } from "./accounts-D9KsVVpJ.js";
|
|
11
|
+
import "./localBatchGatewayRequest-0gr8vzH3.js";
|
|
12
|
+
import { $ as UnknownNodeError$1, $t as encodeAbiParameters, A as slice$4, An as DecodeLogTopicsMismatch$1, At as CallExecutionError, B as toNumber, Bn as InvalidAbiItemError$1, Bt as TransactionReceiptRevertedError$1, C as fromBoolean, Cn as AbiDecodingDataSizeTooSmallError, Ct as UnsupportedNonOptionalCapabilityError, D as padLeft, Dn as AbiEventSignatureNotFoundError, Dt as HttpRequestError, E as fromString$2, En as AbiEventSignatureEmptyTopicsError, Et as WalletConnectSessionSettlementError, F as fromString$1, Fn as parseStructs$1, G as decodeFunctionResult$1, Gt as stringify$1, H as trimLeft, Hn as modifiers, Ht as prettyPrint, I as size$4, In as parseAbiParameter, It as InvalidSerializableTransactionError, J as maxUint256$1, Jt as createCursor, K as isAddressEqual$1, L as slice$3, Ln as parseSignature$1, Lt as TransactionExecutionError, M as validate$5, Mn as size$2, Mt as ContractFunctionRevertedError$1, N as from$9, Nn as isHex$1, Nt as ContractFunctionZeroDataError, O as padRight, On as BytesSizeMismatchError$1, Ot as RpcRequestError, P as fromHex$1, Pn as formatAbiItem$1, Pt as RawContractError$1, Q as getNodeError$1, Qt as getAbiItem, R as toBigInt, Rn as splitParameters, Rt as TransactionNotFoundError$1, S as from$10, Sn as trim$1, St as UnsupportedChainIdError, T as fromNumber, Tn as AbiEventNotFoundError, Tt as UserRejectedRequestError, U as stringify$2, Un as formatAbiItem$2, Ut as formatGwei, V as toString, Vn as isStructSignature$1, Vt as WaitForTransactionReceiptTimeoutError$1, W as BaseError$3, Wn as formatAbiParameters, Wt as formatEther, X as formatTransactionRequest$1, Xt as encodeFunctionData$1, Y as serializeStateOverride$1, Yt as PositionOutOfBoundsError$1, Z as extract$2, Zt as parseAccount$1, _ as universalResolverResolveAbi$1, _n as stringToHex, _t as SwitchChainError, a as withResolvers$1, an as isAddress$1, at as InternalRpcError, b as IntegerOutOfRangeError, bn as hexToBool, bt as UnknownBundleIdError, c as encodeDeployData, cn as LruMap$1, ct as InvalidRequestRpcError, d as multicall3Bytecode, dn as keccak256$3, dt as MethodNotFoundRpcError, en as bytesRegex$1, et as AtomicReadyWalletRejectedUpgradeError, f as addressResolverAbi$1, fn as hexToBytes, ft as MethodNotSupportedRpcError, g as textResolverAbi$1, gn as numberToHex$1, gt as ResourceUnavailableRpcError, h as multicall3Abi$1, hn as bytesToHex$1, ht as ResourceNotFoundRpcError, i as createBatchScheduler, in as concatHex$1, it as DuplicateIdError, j as toNumber$1, jn as BaseError$2, jt as ContractFunctionExecutionError, k as size$3, kn as DecodeLogDataMismatch$1, kt as TimeoutError, l as deploylessCallViaBytecodeBytecode$1, ln as InvalidAddressError$2, lt as JsonRpcVersionUnsupportedError, m as erc6492SignatureValidatorAbi, mn as toBytes$1, mt as ProviderDisconnectedError, nn as slice$2, nt as BundleTooLargeError, o as getCallError$1, on as checksumAddress, ot as InvalidInputRpcError$1, p as erc1271Abi, pn as stringToBytes$1, pt as ParseRpcError, q as assertRequest$1, qt as decodeAbiParameters, r as call$1, rn as concat$2, rt as ChainDisconnectedError, s as getChainContractAddress$1, sn as getAddress$1, st as InvalidParamsRpcError, tn as integerRegex$1, tt as AtomicityNotSupportedError, u as erc6492SignatureValidatorByteCode, un as toEventSelector, ut as LimitExceededRpcError, v as universalResolverReverseAbi$1, vn as toHex$1, vt as TransactionRejectedRpcError, w as fromBytes$1, wn as AbiDecodingZeroDataError$1, wt as UnsupportedProviderMethodError, x as concat$3, xn as hexToNumber$1, xt as UnknownRpcError, y as toRpc$1, yn as hexToBigInt$1, yt as UnauthorizedProviderError, z as toBoolean, zn as InvalidAbiParametersError, zt as TransactionReceiptNotFoundError$1 } from "./localBatchGatewayRequest-CBsFXIAU.js";
|
|
13
|
+
import { G as mainnet, H as setTransactionMessageFeePayer, Jt as transformEncoder, K as AccountRole, St as getAddressEncoder, U as setTransactionMessageLifetimeUsingBlockhash, V as setTransactionMessageComputeUnitPrice, X as upgradeRoleToSigner, Z as pipe, Zo as SolanaError, _t as address, c as isTransactionSigner, f as createDefaultRpcTransport, gt as getU8Encoder, ht as getU64Encoder, j as createTransactionMessage, k as appendTransactionMessageInstructions, l as partiallySignTransactionMessageWithSigners, na as SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL, ot as getStructEncoder, p as createSolanaRpcFromTransport, ts as isSolanaError, wt as getProgramDerivedAddress, x as getBase64EncodedWireTransaction, z as prependTransactionMessageInstruction } from "./index.node-DCvOPMK7.js";
|
|
18
14
|
import { dirname } from "node:path";
|
|
19
15
|
import { appendFileSync, existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
20
16
|
//#region packages/x402-proxy/src/lib/output.ts
|
|
@@ -7504,6 +7500,42 @@ async function verifySiweMessage$1(client, parameters) {
|
|
|
7504
7500
|
});
|
|
7505
7501
|
}
|
|
7506
7502
|
//#endregion
|
|
7503
|
+
//#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/actions/wallet/sendRawTransactionSync.js
|
|
7504
|
+
/**
|
|
7505
|
+
* Sends a **signed** transaction to the network synchronously,
|
|
7506
|
+
* and waits for the transaction to be included in a block.
|
|
7507
|
+
*
|
|
7508
|
+
* - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync
|
|
7509
|
+
* - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966)
|
|
7510
|
+
*
|
|
7511
|
+
* @param client - Client to use
|
|
7512
|
+
* @param parameters - {@link SendRawTransactionParameters}
|
|
7513
|
+
* @returns The transaction receipt. {@link SendRawTransactionSyncReturnType}
|
|
7514
|
+
*
|
|
7515
|
+
* @example
|
|
7516
|
+
* import { createWalletClient, custom } from 'viem'
|
|
7517
|
+
* import { mainnet } from 'viem/chains'
|
|
7518
|
+
* import { sendRawTransactionSync } from 'viem/wallet'
|
|
7519
|
+
*
|
|
7520
|
+
* const client = createWalletClient({
|
|
7521
|
+
* chain: mainnet,
|
|
7522
|
+
* transport: custom(window.ethereum),
|
|
7523
|
+
* })
|
|
7524
|
+
*
|
|
7525
|
+
* const receipt = await sendRawTransactionSync(client, {
|
|
7526
|
+
* serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33'
|
|
7527
|
+
* })
|
|
7528
|
+
*/
|
|
7529
|
+
async function sendRawTransactionSync$1(client, { serializedTransaction, throwOnReceiptRevert, timeout }) {
|
|
7530
|
+
const receipt = await client.request({
|
|
7531
|
+
method: "eth_sendRawTransactionSync",
|
|
7532
|
+
params: timeout ? [serializedTransaction, timeout] : [serializedTransaction]
|
|
7533
|
+
}, { retryCount: 0 });
|
|
7534
|
+
const formatted = (client.chain?.formatters?.transactionReceipt?.format || formatTransactionReceipt$1)(receipt);
|
|
7535
|
+
if (formatted.status === "reverted" && throwOnReceiptRevert) throw new TransactionReceiptRevertedError({ receipt: formatted });
|
|
7536
|
+
return formatted;
|
|
7537
|
+
}
|
|
7538
|
+
//#endregion
|
|
7507
7539
|
//#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/clients/decorators/public.js
|
|
7508
7540
|
function publicActions$1(client) {
|
|
7509
7541
|
return {
|
|
@@ -7598,6 +7630,135 @@ function createPublicClient$1(parameters) {
|
|
|
7598
7630
|
}).extend(publicActions$1);
|
|
7599
7631
|
}
|
|
7600
7632
|
//#endregion
|
|
7633
|
+
//#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/op-stack/contracts.js
|
|
7634
|
+
/**
|
|
7635
|
+
* Predeploy contracts for OP Stack.
|
|
7636
|
+
* @see https://github.com/ethereum-optimism/optimism/blob/develop/specs/predeploys.md
|
|
7637
|
+
*/
|
|
7638
|
+
const contracts = {
|
|
7639
|
+
gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
|
|
7640
|
+
l1Block: { address: "0x4200000000000000000000000000000000000015" },
|
|
7641
|
+
l2CrossDomainMessenger: { address: "0x4200000000000000000000000000000000000007" },
|
|
7642
|
+
l2Erc721Bridge: { address: "0x4200000000000000000000000000000000000014" },
|
|
7643
|
+
l2StandardBridge: { address: "0x4200000000000000000000000000000000000010" },
|
|
7644
|
+
l2ToL1MessagePasser: { address: "0x4200000000000000000000000000000000000016" }
|
|
7645
|
+
};
|
|
7646
|
+
//#endregion
|
|
7647
|
+
//#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/op-stack/formatters.js
|
|
7648
|
+
const formatters = {
|
|
7649
|
+
block: /* @__PURE__ */ defineBlock({ format(args) {
|
|
7650
|
+
return {
|
|
7651
|
+
transactions: args.transactions?.map((transaction) => {
|
|
7652
|
+
if (typeof transaction === "string") return transaction;
|
|
7653
|
+
const formatted = formatTransaction$1(transaction);
|
|
7654
|
+
if (formatted.typeHex === "0x7e") {
|
|
7655
|
+
formatted.isSystemTx = transaction.isSystemTx;
|
|
7656
|
+
formatted.mint = transaction.mint ? hexToBigInt(transaction.mint) : void 0;
|
|
7657
|
+
formatted.sourceHash = transaction.sourceHash;
|
|
7658
|
+
formatted.type = "deposit";
|
|
7659
|
+
}
|
|
7660
|
+
return formatted;
|
|
7661
|
+
}),
|
|
7662
|
+
stateRoot: args.stateRoot
|
|
7663
|
+
};
|
|
7664
|
+
} }),
|
|
7665
|
+
transaction: /* @__PURE__ */ defineTransaction({ format(args) {
|
|
7666
|
+
const transaction = {};
|
|
7667
|
+
if (args.type === "0x7e") {
|
|
7668
|
+
transaction.isSystemTx = args.isSystemTx;
|
|
7669
|
+
transaction.mint = args.mint ? hexToBigInt(args.mint) : void 0;
|
|
7670
|
+
transaction.sourceHash = args.sourceHash;
|
|
7671
|
+
transaction.type = "deposit";
|
|
7672
|
+
}
|
|
7673
|
+
return transaction;
|
|
7674
|
+
} }),
|
|
7675
|
+
transactionReceipt: /* @__PURE__ */ defineTransactionReceipt({ format(args) {
|
|
7676
|
+
return {
|
|
7677
|
+
l1GasPrice: args.l1GasPrice ? hexToBigInt(args.l1GasPrice) : null,
|
|
7678
|
+
l1GasUsed: args.l1GasUsed ? hexToBigInt(args.l1GasUsed) : null,
|
|
7679
|
+
l1Fee: args.l1Fee ? hexToBigInt(args.l1Fee) : null,
|
|
7680
|
+
l1FeeScalar: args.l1FeeScalar ? Number(args.l1FeeScalar) : null
|
|
7681
|
+
};
|
|
7682
|
+
} })
|
|
7683
|
+
};
|
|
7684
|
+
//#endregion
|
|
7685
|
+
//#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/op-stack/serializers.js
|
|
7686
|
+
function serializeTransaction(transaction, signature) {
|
|
7687
|
+
if (isDeposit(transaction)) return serializeTransactionDeposit(transaction);
|
|
7688
|
+
return serializeTransaction$1(transaction, signature);
|
|
7689
|
+
}
|
|
7690
|
+
const serializers = { transaction: serializeTransaction };
|
|
7691
|
+
function serializeTransactionDeposit(transaction) {
|
|
7692
|
+
assertTransactionDeposit(transaction);
|
|
7693
|
+
const { sourceHash, data, from, gas, isSystemTx, mint, to, value } = transaction;
|
|
7694
|
+
return concatHex(["0x7e", toRlp$1([
|
|
7695
|
+
sourceHash,
|
|
7696
|
+
from,
|
|
7697
|
+
to ?? "0x",
|
|
7698
|
+
mint ? toHex(mint) : "0x",
|
|
7699
|
+
value ? toHex(value) : "0x",
|
|
7700
|
+
gas ? toHex(gas) : "0x",
|
|
7701
|
+
isSystemTx ? "0x1" : "0x",
|
|
7702
|
+
data ?? "0x"
|
|
7703
|
+
])]);
|
|
7704
|
+
}
|
|
7705
|
+
function isDeposit(transaction) {
|
|
7706
|
+
if (transaction.type === "deposit") return true;
|
|
7707
|
+
if (typeof transaction.sourceHash !== "undefined") return true;
|
|
7708
|
+
return false;
|
|
7709
|
+
}
|
|
7710
|
+
function assertTransactionDeposit(transaction) {
|
|
7711
|
+
const { from, to } = transaction;
|
|
7712
|
+
if (from && !isAddress(from)) throw new InvalidAddressError$1({ address: from });
|
|
7713
|
+
if (to && !isAddress(to)) throw new InvalidAddressError$1({ address: to });
|
|
7714
|
+
}
|
|
7715
|
+
//#endregion
|
|
7716
|
+
//#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/op-stack/chainConfig.js
|
|
7717
|
+
const chainConfig = {
|
|
7718
|
+
blockTime: 2e3,
|
|
7719
|
+
contracts,
|
|
7720
|
+
formatters,
|
|
7721
|
+
serializers
|
|
7722
|
+
};
|
|
7723
|
+
//#endregion
|
|
7724
|
+
//#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/base.js
|
|
7725
|
+
const sourceId = 1;
|
|
7726
|
+
const base = /* @__PURE__ */ defineChain({
|
|
7727
|
+
...chainConfig,
|
|
7728
|
+
id: 8453,
|
|
7729
|
+
name: "Base",
|
|
7730
|
+
nativeCurrency: {
|
|
7731
|
+
name: "Ether",
|
|
7732
|
+
symbol: "ETH",
|
|
7733
|
+
decimals: 18
|
|
7734
|
+
},
|
|
7735
|
+
rpcUrls: { default: { http: ["https://mainnet.base.org"] } },
|
|
7736
|
+
blockExplorers: { default: {
|
|
7737
|
+
name: "Basescan",
|
|
7738
|
+
url: "https://basescan.org",
|
|
7739
|
+
apiUrl: "https://api.basescan.org/api"
|
|
7740
|
+
} },
|
|
7741
|
+
contracts: {
|
|
7742
|
+
...chainConfig.contracts,
|
|
7743
|
+
disputeGameFactory: { [sourceId]: { address: "0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e" } },
|
|
7744
|
+
l2OutputOracle: { [sourceId]: { address: "0x56315b90c40730925ec5485cf004d835058518A0" } },
|
|
7745
|
+
multicall3: {
|
|
7746
|
+
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
7747
|
+
blockCreated: 5022
|
|
7748
|
+
},
|
|
7749
|
+
portal: { [sourceId]: {
|
|
7750
|
+
address: "0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",
|
|
7751
|
+
blockCreated: 17482143
|
|
7752
|
+
} },
|
|
7753
|
+
l1StandardBridge: { [sourceId]: {
|
|
7754
|
+
address: "0x3154Cf16ccdb4C6d922629664174b904d80F2C35",
|
|
7755
|
+
blockCreated: 17482143
|
|
7756
|
+
} }
|
|
7757
|
+
},
|
|
7758
|
+
sourceId
|
|
7759
|
+
});
|
|
7760
|
+
({ ...base });
|
|
7761
|
+
//#endregion
|
|
7601
7762
|
//#region node_modules/.pnpm/@x402+evm@2.8.0_typescript@5.9.3/node_modules/@x402/evm/dist/esm/chunk-GD4MKCN7.mjs
|
|
7602
7763
|
var EIP2612_GAS_SPONSORING_KEY = "eip2612GasSponsoring";
|
|
7603
7764
|
var ERC20_APPROVAL_GAS_SPONSORING_KEY = "erc20ApprovalGasSponsoring";
|
|
@@ -7848,7 +8009,7 @@ function publicKeyToAddress(publicKey) {
|
|
|
7848
8009
|
//#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@3.25.76/node_modules/viem/_esm/utils/signature/recoverPublicKey.js
|
|
7849
8010
|
async function recoverPublicKey({ hash, signature }) {
|
|
7850
8011
|
const hashHex = isHex$1(hash) ? hash : toHex$1(hash);
|
|
7851
|
-
const { secp256k1 } = await import("./secp256k1-
|
|
8012
|
+
const { secp256k1 } = await import("./secp256k1-CHAXu2gP.js");
|
|
7852
8013
|
return `0x${(() => {
|
|
7853
8014
|
if (typeof signature === "object" && "r" in signature && "s" in signature) {
|
|
7854
8015
|
const { r, s, v, yParity } = signature;
|
|
@@ -16206,7 +16367,7 @@ async function sendRawTransactionSync(client, { serializedTransaction, throwOnRe
|
|
|
16206
16367
|
params: timeout ? [serializedTransaction, timeout] : [serializedTransaction]
|
|
16207
16368
|
}, { retryCount: 0 });
|
|
16208
16369
|
const formatted = (client.chain?.formatters?.transactionReceipt?.format || formatTransactionReceipt)(receipt);
|
|
16209
|
-
if (formatted.status === "reverted" && throwOnReceiptRevert) throw new TransactionReceiptRevertedError({ receipt: formatted });
|
|
16370
|
+
if (formatted.status === "reverted" && throwOnReceiptRevert) throw new TransactionReceiptRevertedError$1({ receipt: formatted });
|
|
16210
16371
|
return formatted;
|
|
16211
16372
|
}
|
|
16212
16373
|
//#endregion
|
|
@@ -17020,135 +17181,6 @@ function toClientEvmSigner(signer, publicClient) {
|
|
|
17020
17181
|
if (estimateFeesPerGas) result.estimateFeesPerGas = () => estimateFeesPerGas();
|
|
17021
17182
|
return result;
|
|
17022
17183
|
}
|
|
17023
|
-
//#endregion
|
|
17024
|
-
//#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/op-stack/contracts.js
|
|
17025
|
-
/**
|
|
17026
|
-
* Predeploy contracts for OP Stack.
|
|
17027
|
-
* @see https://github.com/ethereum-optimism/optimism/blob/develop/specs/predeploys.md
|
|
17028
|
-
*/
|
|
17029
|
-
const contracts = {
|
|
17030
|
-
gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
|
|
17031
|
-
l1Block: { address: "0x4200000000000000000000000000000000000015" },
|
|
17032
|
-
l2CrossDomainMessenger: { address: "0x4200000000000000000000000000000000000007" },
|
|
17033
|
-
l2Erc721Bridge: { address: "0x4200000000000000000000000000000000000014" },
|
|
17034
|
-
l2StandardBridge: { address: "0x4200000000000000000000000000000000000010" },
|
|
17035
|
-
l2ToL1MessagePasser: { address: "0x4200000000000000000000000000000000000016" }
|
|
17036
|
-
};
|
|
17037
|
-
//#endregion
|
|
17038
|
-
//#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/op-stack/formatters.js
|
|
17039
|
-
const formatters = {
|
|
17040
|
-
block: /* @__PURE__ */ defineBlock({ format(args) {
|
|
17041
|
-
return {
|
|
17042
|
-
transactions: args.transactions?.map((transaction) => {
|
|
17043
|
-
if (typeof transaction === "string") return transaction;
|
|
17044
|
-
const formatted = formatTransaction$1(transaction);
|
|
17045
|
-
if (formatted.typeHex === "0x7e") {
|
|
17046
|
-
formatted.isSystemTx = transaction.isSystemTx;
|
|
17047
|
-
formatted.mint = transaction.mint ? hexToBigInt(transaction.mint) : void 0;
|
|
17048
|
-
formatted.sourceHash = transaction.sourceHash;
|
|
17049
|
-
formatted.type = "deposit";
|
|
17050
|
-
}
|
|
17051
|
-
return formatted;
|
|
17052
|
-
}),
|
|
17053
|
-
stateRoot: args.stateRoot
|
|
17054
|
-
};
|
|
17055
|
-
} }),
|
|
17056
|
-
transaction: /* @__PURE__ */ defineTransaction({ format(args) {
|
|
17057
|
-
const transaction = {};
|
|
17058
|
-
if (args.type === "0x7e") {
|
|
17059
|
-
transaction.isSystemTx = args.isSystemTx;
|
|
17060
|
-
transaction.mint = args.mint ? hexToBigInt(args.mint) : void 0;
|
|
17061
|
-
transaction.sourceHash = args.sourceHash;
|
|
17062
|
-
transaction.type = "deposit";
|
|
17063
|
-
}
|
|
17064
|
-
return transaction;
|
|
17065
|
-
} }),
|
|
17066
|
-
transactionReceipt: /* @__PURE__ */ defineTransactionReceipt({ format(args) {
|
|
17067
|
-
return {
|
|
17068
|
-
l1GasPrice: args.l1GasPrice ? hexToBigInt(args.l1GasPrice) : null,
|
|
17069
|
-
l1GasUsed: args.l1GasUsed ? hexToBigInt(args.l1GasUsed) : null,
|
|
17070
|
-
l1Fee: args.l1Fee ? hexToBigInt(args.l1Fee) : null,
|
|
17071
|
-
l1FeeScalar: args.l1FeeScalar ? Number(args.l1FeeScalar) : null
|
|
17072
|
-
};
|
|
17073
|
-
} })
|
|
17074
|
-
};
|
|
17075
|
-
//#endregion
|
|
17076
|
-
//#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/op-stack/serializers.js
|
|
17077
|
-
function serializeTransaction(transaction, signature) {
|
|
17078
|
-
if (isDeposit(transaction)) return serializeTransactionDeposit(transaction);
|
|
17079
|
-
return serializeTransaction$1(transaction, signature);
|
|
17080
|
-
}
|
|
17081
|
-
const serializers = { transaction: serializeTransaction };
|
|
17082
|
-
function serializeTransactionDeposit(transaction) {
|
|
17083
|
-
assertTransactionDeposit(transaction);
|
|
17084
|
-
const { sourceHash, data, from, gas, isSystemTx, mint, to, value } = transaction;
|
|
17085
|
-
return concatHex(["0x7e", toRlp$1([
|
|
17086
|
-
sourceHash,
|
|
17087
|
-
from,
|
|
17088
|
-
to ?? "0x",
|
|
17089
|
-
mint ? toHex(mint) : "0x",
|
|
17090
|
-
value ? toHex(value) : "0x",
|
|
17091
|
-
gas ? toHex(gas) : "0x",
|
|
17092
|
-
isSystemTx ? "0x1" : "0x",
|
|
17093
|
-
data ?? "0x"
|
|
17094
|
-
])]);
|
|
17095
|
-
}
|
|
17096
|
-
function isDeposit(transaction) {
|
|
17097
|
-
if (transaction.type === "deposit") return true;
|
|
17098
|
-
if (typeof transaction.sourceHash !== "undefined") return true;
|
|
17099
|
-
return false;
|
|
17100
|
-
}
|
|
17101
|
-
function assertTransactionDeposit(transaction) {
|
|
17102
|
-
const { from, to } = transaction;
|
|
17103
|
-
if (from && !isAddress(from)) throw new InvalidAddressError$1({ address: from });
|
|
17104
|
-
if (to && !isAddress(to)) throw new InvalidAddressError$1({ address: to });
|
|
17105
|
-
}
|
|
17106
|
-
//#endregion
|
|
17107
|
-
//#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/op-stack/chainConfig.js
|
|
17108
|
-
const chainConfig = {
|
|
17109
|
-
blockTime: 2e3,
|
|
17110
|
-
contracts,
|
|
17111
|
-
formatters,
|
|
17112
|
-
serializers
|
|
17113
|
-
};
|
|
17114
|
-
//#endregion
|
|
17115
|
-
//#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/base.js
|
|
17116
|
-
const sourceId = 1;
|
|
17117
|
-
const base = /* @__PURE__ */ defineChain({
|
|
17118
|
-
...chainConfig,
|
|
17119
|
-
id: 8453,
|
|
17120
|
-
name: "Base",
|
|
17121
|
-
nativeCurrency: {
|
|
17122
|
-
name: "Ether",
|
|
17123
|
-
symbol: "ETH",
|
|
17124
|
-
decimals: 18
|
|
17125
|
-
},
|
|
17126
|
-
rpcUrls: { default: { http: ["https://mainnet.base.org"] } },
|
|
17127
|
-
blockExplorers: { default: {
|
|
17128
|
-
name: "Basescan",
|
|
17129
|
-
url: "https://basescan.org",
|
|
17130
|
-
apiUrl: "https://api.basescan.org/api"
|
|
17131
|
-
} },
|
|
17132
|
-
contracts: {
|
|
17133
|
-
...chainConfig.contracts,
|
|
17134
|
-
disputeGameFactory: { [sourceId]: { address: "0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e" } },
|
|
17135
|
-
l2OutputOracle: { [sourceId]: { address: "0x56315b90c40730925ec5485cf004d835058518A0" } },
|
|
17136
|
-
multicall3: {
|
|
17137
|
-
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
17138
|
-
blockCreated: 5022
|
|
17139
|
-
},
|
|
17140
|
-
portal: { [sourceId]: {
|
|
17141
|
-
address: "0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",
|
|
17142
|
-
blockCreated: 17482143
|
|
17143
|
-
} },
|
|
17144
|
-
l1StandardBridge: { [sourceId]: {
|
|
17145
|
-
address: "0x3154Cf16ccdb4C6d922629664174b904d80F2C35",
|
|
17146
|
-
blockCreated: 17482143
|
|
17147
|
-
} }
|
|
17148
|
-
},
|
|
17149
|
-
sourceId
|
|
17150
|
-
});
|
|
17151
|
-
({ ...base });
|
|
17152
17184
|
function isMeaningfulInferenceRecord(record) {
|
|
17153
17185
|
if (record.kind !== "x402_inference") return true;
|
|
17154
17186
|
if (!record.ok) return true;
|
|
@@ -17377,8 +17409,20 @@ if (process.env.NODE_ENV !== "production");
|
|
|
17377
17409
|
//#endregion
|
|
17378
17410
|
//#region packages/x402-proxy/src/lib/optimized-svm-scheme.ts
|
|
17379
17411
|
const MEMO_PROGRAM_ADDRESS = "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr";
|
|
17412
|
+
const COMPUTE_BUDGET_PROGRAM = "ComputeBudget111111111111111111111111111111";
|
|
17380
17413
|
const COMPUTE_UNIT_LIMIT = 2e4;
|
|
17381
17414
|
const COMPUTE_UNIT_PRICE_MICROLAMPORTS = 1n;
|
|
17415
|
+
/** Build a SetComputeUnitLimit instruction (discriminator 0x02 + u32 LE). */
|
|
17416
|
+
function getSetComputeUnitLimitInstruction(units) {
|
|
17417
|
+
const data = new Uint8Array(5);
|
|
17418
|
+
data[0] = 2;
|
|
17419
|
+
new DataView(data.buffer).setUint32(1, units, true);
|
|
17420
|
+
return {
|
|
17421
|
+
programAddress: COMPUTE_BUDGET_PROGRAM,
|
|
17422
|
+
accounts: [],
|
|
17423
|
+
data
|
|
17424
|
+
};
|
|
17425
|
+
}
|
|
17382
17426
|
const USDC_MINT = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
|
17383
17427
|
const USDC_DECIMALS = 6;
|
|
17384
17428
|
const MAINNET_RPC_URLS = ["https://api.mainnet.solana.com", "https://public.rpc.solanavibestation.com"];
|
|
@@ -17453,7 +17497,7 @@ var OptimizedSvmScheme = class {
|
|
|
17453
17497
|
};
|
|
17454
17498
|
return {
|
|
17455
17499
|
x402Version,
|
|
17456
|
-
payload: { transaction: getBase64EncodedWireTransaction(await partiallySignTransactionMessageWithSigners(pipe(createTransactionMessage({ version: 0 }), (tx) => setTransactionMessageComputeUnitPrice(COMPUTE_UNIT_PRICE_MICROLAMPORTS, tx), (tx) =>
|
|
17500
|
+
payload: { transaction: getBase64EncodedWireTransaction(await partiallySignTransactionMessageWithSigners(pipe(createTransactionMessage({ version: 0 }), (tx) => setTransactionMessageComputeUnitPrice(COMPUTE_UNIT_PRICE_MICROLAMPORTS, tx), (tx) => setTransactionMessageFeePayer(feePayer, tx), (tx) => prependTransactionMessageInstruction(getSetComputeUnitLimitInstruction(COMPUTE_UNIT_LIMIT), tx), (tx) => appendTransactionMessageInstructions([transferIx, memoIx], tx), (tx) => setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, tx)))) }
|
|
17457
17501
|
};
|
|
17458
17502
|
}
|
|
17459
17503
|
};
|
|
@@ -17589,7 +17633,7 @@ async function buildX402Client(wallet, opts) {
|
|
|
17589
17633
|
})) });
|
|
17590
17634
|
}
|
|
17591
17635
|
if (wallet.solanaKey) {
|
|
17592
|
-
const { createKeyPairSignerFromBytes } = await import("./index.node-
|
|
17636
|
+
const { createKeyPairSignerFromBytes } = await import("./index.node-xc-jRJ78.js");
|
|
17593
17637
|
const signer = await createKeyPairSignerFromBytes(wallet.solanaKey);
|
|
17594
17638
|
client.register("solana:*", new OptimizedSvmScheme(signer));
|
|
17595
17639
|
}
|
package/package.json
CHANGED