x402-proxy 0.10.7 → 0.10.9
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/CHANGELOG.md +23 -1
- package/README.md +7 -1
- package/dist/Credential-COZQnr1-.js +2055 -0
- package/dist/Mcp-CrCEqLqO.js +10 -0
- package/dist/Sse-ChldYgU7.js +9742 -0
- package/dist/Sse-kCB38G56.js +16482 -0
- package/dist/accounts-DsuvWwph.js +232 -0
- package/dist/accounts-DzvAlQRn.js +5 -0
- package/dist/accounts-IG-Cmrwy.js +229 -0
- package/dist/api-CUzmQvTQ.js +2802 -0
- package/dist/auth-DTzQmnZ_.js +1196 -0
- package/dist/bin/cli.js +585 -242
- package/dist/ccip-Bx-zoUCJ.js +240 -0
- package/dist/ccip-C2k1DD1T.js +153 -0
- package/dist/ccip-C6CQOJYv.js +152 -0
- package/dist/ccip-RZzsZ5Mv.js +156 -0
- package/dist/chain-CafcHffR.js +1997 -0
- package/dist/chain-DwfP5RGZ.js +1968 -0
- package/dist/chunk-DBEY4PJZ.js +16 -0
- package/dist/chunk-DjEMn6fM.js +36 -0
- package/dist/client-Blw2V7LF.js +657 -0
- package/dist/client-C37gWJOZ.js +102 -0
- package/dist/client-CEc4NYAA.js +6388 -0
- package/dist/client-CVDTUY0l.js +5152 -0
- package/dist/config-BUQsit4s.js +3 -0
- package/dist/config-DR1Fs_wL.js +6600 -0
- package/dist/{config-D9wIR3xc.js → config-rvKA3SYT.js} +10 -5
- package/dist/decodeFunctionData-DuFcwhC_.js +4510 -0
- package/dist/decodeFunctionData-JPOUdvil.js +4394 -0
- package/dist/derive-DNUl8LU9.js +9109 -0
- package/dist/dist-C2YO6HSQ.js +6581 -0
- package/dist/dist-DM5_F3r5.js +4 -0
- package/dist/dist-DxJCYyL5.js +1388 -0
- package/dist/hashTypedData-BHmP9dBd.js +859 -0
- package/dist/hashTypedData-CtEdfx4y.js +846 -0
- package/dist/helpers-CuUSw-tH.js +7125 -0
- package/dist/hmac-59IlS_by.js +648 -0
- package/dist/http-BAtucMbS.js +2060 -0
- package/dist/index.d.ts +1903 -9
- package/dist/index.js +18006 -50
- package/dist/index.node-CxkL0OFh.js +3592 -0
- package/dist/index.node-DvmeuZBj.js +3 -0
- package/dist/isAddressEqual-BLrd1Hg1.js +9 -0
- package/dist/isAddressEqual-DsAqfQOD.js +10 -0
- package/dist/localBatchGatewayRequest-C-RPJyDO.js +6260 -0
- package/dist/localBatchGatewayRequest-DOdQ9bR7.js +93 -0
- package/dist/localBatchGatewayRequest-DQkbZaSy.js +6261 -0
- package/dist/parseUnits-CApwcKSD.js +49 -0
- package/dist/parseUnits-cMO2udMe.js +48 -0
- package/dist/schemas-BxMFYNbH.js +1270 -0
- package/dist/secp256k1-BZpiyffY.js +2525 -0
- package/dist/secp256k1-BjenrLl5.js +1877 -0
- package/dist/secp256k1-CLPUX17u.js +3 -0
- package/dist/sendRawTransactionSync-DvSkhZtW.js +3612 -0
- package/dist/server-CSq0IuUq.js +565 -0
- package/dist/setup-BY4J49Lv.js +1110 -0
- package/dist/setup-wMOAgrsN.js +3 -0
- package/dist/sha256-FAs0qeni.js +17 -0
- package/dist/sha3-CYkWM8Xa.js +195 -0
- package/dist/sha3-DbMJRJ3C.js +194 -0
- package/dist/sse-B4LLqBQm.js +408 -0
- package/dist/status-Bu23RjW6.js +3 -0
- package/dist/{status-DihAcUSC.js → status-X21VnGUO.js} +16 -15
- package/dist/stdio-BADqxZdZ.js +85 -0
- package/dist/streamableHttp-BHkJypcI.js +358 -0
- package/dist/tempo-3nttrxgQ.js +17 -0
- package/dist/tempo-DER0P-ul.js +18 -0
- package/dist/types-BEKUz-Mf.js +1240 -0
- package/dist/types-DatK5vR5.js +3 -0
- package/dist/utils-BYjkXZDF.js +444 -0
- package/dist/utils-SeGHMW9O.js +445 -0
- package/dist/wallet-DKVlrR1S.js +3 -0
- package/dist/wallet-DSyht15_.js +17759 -0
- package/package.json +18 -71
- package/dist/config-B_upkJeK.js +0 -66
- package/dist/config-Be35NM5s.js +0 -3
- package/dist/config-J1m-CWXT.js +0 -27
- package/dist/derive-CL6e8K0Z.js +0 -81
- package/dist/openclaw/plugin.d.ts +0 -15
- package/dist/openclaw/plugin.js +0 -2067
- package/dist/openclaw.plugin.json +0 -93
- package/dist/setup-CNyMLnM-.js +0 -197
- package/dist/setup-DTIxPe58.js +0 -3
- package/dist/status-DZlJ4pS7.js +0 -3
- package/dist/wallet-B0S-rma9.js +0 -544
- package/dist/wallet-DBrVZJqe.js +0 -3
- package/openclaw.plugin.json +0 -93
- package/skills/SKILL.md +0 -183
- package/skills/references/library.md +0 -85
- package/skills/references/openclaw-plugin.md +0 -145
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Xt as toFunctionSelector, Yt as getAbiItem, f as batchGatewayAbi, qt as solidityError, t as decodeFunctionData } from "./decodeFunctionData-DuFcwhC_.js";
|
|
3
|
+
import { Ct as AbiFunctionNotFoundError, Ft as formatAbiItem, I as encodeAbiParameters, W as concatHex, _t as AbiErrorInputsNotFoundError, jt as InvalidArrayError, vt as AbiErrorNotFoundError, wt as AbiFunctionOutputsNotFoundError } from "./chain-CafcHffR.js";
|
|
4
|
+
//#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/abi/encodeErrorResult.js
|
|
5
|
+
const docsPath$1 = "/docs/contract/encodeErrorResult";
|
|
6
|
+
function encodeErrorResult(parameters) {
|
|
7
|
+
const { abi, errorName, args } = parameters;
|
|
8
|
+
let abiItem = abi[0];
|
|
9
|
+
if (errorName) {
|
|
10
|
+
const item = getAbiItem({
|
|
11
|
+
abi,
|
|
12
|
+
args,
|
|
13
|
+
name: errorName
|
|
14
|
+
});
|
|
15
|
+
if (!item) throw new AbiErrorNotFoundError(errorName, { docsPath: docsPath$1 });
|
|
16
|
+
abiItem = item;
|
|
17
|
+
}
|
|
18
|
+
if (abiItem.type !== "error") throw new AbiErrorNotFoundError(void 0, { docsPath: docsPath$1 });
|
|
19
|
+
const signature = toFunctionSelector(formatAbiItem(abiItem));
|
|
20
|
+
let data = "0x";
|
|
21
|
+
if (args && args.length > 0) {
|
|
22
|
+
if (!abiItem.inputs) throw new AbiErrorInputsNotFoundError(abiItem.name, { docsPath: docsPath$1 });
|
|
23
|
+
data = encodeAbiParameters(abiItem.inputs, args);
|
|
24
|
+
}
|
|
25
|
+
return concatHex([signature, data]);
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/abi/encodeFunctionResult.js
|
|
29
|
+
const docsPath = "/docs/contract/encodeFunctionResult";
|
|
30
|
+
function encodeFunctionResult(parameters) {
|
|
31
|
+
const { abi, functionName, result } = parameters;
|
|
32
|
+
let abiItem = abi[0];
|
|
33
|
+
if (functionName) {
|
|
34
|
+
const item = getAbiItem({
|
|
35
|
+
abi,
|
|
36
|
+
name: functionName
|
|
37
|
+
});
|
|
38
|
+
if (!item) throw new AbiFunctionNotFoundError(functionName, { docsPath });
|
|
39
|
+
abiItem = item;
|
|
40
|
+
}
|
|
41
|
+
if (abiItem.type !== "function") throw new AbiFunctionNotFoundError(void 0, { docsPath });
|
|
42
|
+
if (!abiItem.outputs) throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath });
|
|
43
|
+
const values = (() => {
|
|
44
|
+
if (abiItem.outputs.length === 0) return [];
|
|
45
|
+
if (abiItem.outputs.length === 1) return [result];
|
|
46
|
+
if (Array.isArray(result)) return result;
|
|
47
|
+
throw new InvalidArrayError(result);
|
|
48
|
+
})();
|
|
49
|
+
return encodeAbiParameters(abiItem.outputs, values);
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js
|
|
53
|
+
const localBatchGatewayUrl = "x-batch-gateway:true";
|
|
54
|
+
async function localBatchGatewayRequest(parameters) {
|
|
55
|
+
const { data, ccipRequest } = parameters;
|
|
56
|
+
const { args: [queries] } = decodeFunctionData({
|
|
57
|
+
abi: batchGatewayAbi,
|
|
58
|
+
data
|
|
59
|
+
});
|
|
60
|
+
const failures = [];
|
|
61
|
+
const responses = [];
|
|
62
|
+
await Promise.all(queries.map(async (query, i) => {
|
|
63
|
+
try {
|
|
64
|
+
responses[i] = query.urls.includes("x-batch-gateway:true") ? await localBatchGatewayRequest({
|
|
65
|
+
data: query.data,
|
|
66
|
+
ccipRequest
|
|
67
|
+
}) : await ccipRequest(query);
|
|
68
|
+
failures[i] = false;
|
|
69
|
+
} catch (err) {
|
|
70
|
+
failures[i] = true;
|
|
71
|
+
responses[i] = encodeError(err);
|
|
72
|
+
}
|
|
73
|
+
}));
|
|
74
|
+
return encodeFunctionResult({
|
|
75
|
+
abi: batchGatewayAbi,
|
|
76
|
+
functionName: "query",
|
|
77
|
+
result: [failures, responses]
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function encodeError(error) {
|
|
81
|
+
if (error.name === "HttpRequestError" && error.status) return encodeErrorResult({
|
|
82
|
+
abi: batchGatewayAbi,
|
|
83
|
+
errorName: "HttpError",
|
|
84
|
+
args: [error.status, error.shortMessage]
|
|
85
|
+
});
|
|
86
|
+
return encodeErrorResult({
|
|
87
|
+
abi: [solidityError],
|
|
88
|
+
errorName: "Error",
|
|
89
|
+
args: ["shortMessage" in error ? error.shortMessage : error.message]
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
export { localBatchGatewayUrl as n, localBatchGatewayRequest as t };
|