@bosonprotocol/agentic-commerce 1.2.4-alpha.4 → 1.2.4-alpha.5
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/boson/goat-sdk-plugin/boson-protocol-plugin.service.d.ts +7 -16
- package/dist/boson/goat-sdk-plugin/boson-protocol-plugin.service.d.ts.map +1 -1
- package/dist/boson/goat-sdk-plugin/boson-protocol-plugin.service.js +0 -26
- package/dist/boson/goat-sdk-plugin/boson-protocol-plugin.service.js.map +1 -1
- package/dist/boson/goat-sdk-plugin/parameters.d.ts +4 -103
- package/dist/boson/goat-sdk-plugin/parameters.d.ts.map +1 -1
- package/dist/boson/goat-sdk-plugin/parameters.js +1 -6
- package/dist/boson/goat-sdk-plugin/parameters.js.map +1 -1
- package/dist/boson/mcp-client/index.d.ts +0 -204
- package/dist/boson/mcp-client/index.d.ts.map +1 -1
- package/dist/boson/mcp-client/index.js +0 -6
- package/dist/boson/mcp-client/index.js.map +1 -1
- package/dist/boson/mcp-server/handlers/metaTx.d.ts +4 -4
- package/dist/boson/mcp-server/handlers/transactions.d.ts +1 -3
- package/dist/boson/mcp-server/handlers/transactions.d.ts.map +1 -1
- package/dist/boson/mcp-server/handlers/transactions.js +0 -8
- package/dist/boson/mcp-server/handlers/transactions.js.map +1 -1
- package/dist/boson/mcp-server/index.d.ts.map +1 -1
- package/dist/boson/mcp-server/index.js +9 -14
- package/dist/boson/mcp-server/index.js.map +1 -1
- package/dist/boson/mcp-server/validation.d.ts +1 -1
- package/dist/boson/mcp-server/validation.d.ts.map +1 -1
- package/dist/boson/mcp-server/validation.js +8 -11
- package/dist/boson/mcp-server/validation.js.map +1 -1
- package/dist/common/mcp-client/index.d.ts +1 -204
- package/dist/common/mcp-client/index.d.ts.map +1 -1
- package/dist/common/mcp-client/index.js +0 -3
- package/dist/common/mcp-client/index.js.map +1 -1
- package/dist/common/mcp-server/transactionSigning.d.ts +0 -199
- package/dist/common/mcp-server/transactionSigning.d.ts.map +1 -1
- package/dist/common/mcp-server/transactionSigning.js +2 -283
- package/dist/common/mcp-server/transactionSigning.js.map +1 -1
- package/dist/common/mcp-server/validationUtils.js +1 -1
- package/dist/common/mcp-server/validationUtils.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,226 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.signTransaction = signTransaction;
|
|
3
|
+
exports.signedTransactionValidationZod = exports.signedTransactionValidation = void 0;
|
|
5
4
|
exports.sendSignedTransaction = sendSignedTransaction;
|
|
6
|
-
exports.signTypedData = signTypedData;
|
|
7
|
-
const signature_js_1 = require("@bosonprotocol/core-sdk/dist/cjs/utils/signature.js");
|
|
8
|
-
const ethers_1 = require("ethers");
|
|
9
5
|
const zod_1 = require("zod");
|
|
10
6
|
const configValidation_js_1 = require("./configValidation.js");
|
|
11
7
|
const errorHandling_js_1 = require("./errorHandling.js");
|
|
12
8
|
const jsonUtils_js_1 = require("./jsonUtils.js");
|
|
13
|
-
const logger_js_1 = require("./logger.js");
|
|
14
|
-
const validationUtils_js_1 = require("./validationUtils.js");
|
|
15
9
|
exports.signedTransactionValidation = {
|
|
16
10
|
signedTransaction: zod_1.z
|
|
17
11
|
.string()
|
|
18
12
|
.refine((value) => /^0x[a-fA-F0-9]+$/.test(value))
|
|
19
|
-
.describe("RLP-encoded signed Ethereum transaction as 0x-prefixed hex string. Obtain from
|
|
13
|
+
.describe("RLP-encoded signed Ethereum transaction as 0x-prefixed hex string. Obtain from local wallet signing (e.g. ethers `wallet.signTransaction(tx)`)."),
|
|
20
14
|
configId: configValidation_js_1.configIdValidation,
|
|
21
15
|
};
|
|
22
16
|
exports.signedTransactionValidationZod = zod_1.z.object(exports.signedTransactionValidation);
|
|
23
|
-
exports.signTransactionValidation = {
|
|
24
|
-
to: validationUtils_js_1.ethereumAddressValidation.describe("Destination Ethereum address for the transaction."),
|
|
25
|
-
value: zod_1.z
|
|
26
|
-
.string()
|
|
27
|
-
.optional()
|
|
28
|
-
.transform((val) => {
|
|
29
|
-
if (val === undefined || val === null)
|
|
30
|
-
return undefined;
|
|
31
|
-
if (val === "0")
|
|
32
|
-
return "0x0";
|
|
33
|
-
if (!val.startsWith("0x") && /^\d+$/.test(val)) {
|
|
34
|
-
const bigNumberValue = ethers_1.BigNumber.from(val);
|
|
35
|
-
return bigNumberValue.isZero()
|
|
36
|
-
? "0x0"
|
|
37
|
-
: bigNumberValue.toHexString().replace(/^0x0+/, "0x");
|
|
38
|
-
}
|
|
39
|
-
return val; // Return as-is if already hex or other string format
|
|
40
|
-
})
|
|
41
|
-
.describe("ETH value to send in wei as decimal string or 0x hex string. Use 0 for non-payable calls."),
|
|
42
|
-
data: zod_1.z
|
|
43
|
-
.string()
|
|
44
|
-
.optional()
|
|
45
|
-
.describe("ABI-encoded calldata as 0x-prefixed hex string. Required for contract interactions."),
|
|
46
|
-
gasLimit: zod_1.z
|
|
47
|
-
.string()
|
|
48
|
-
.optional()
|
|
49
|
-
.describe("Max gas units as a decimal string or 0x-prefixed hex string. Auto-estimated if rpcUrl is provided."),
|
|
50
|
-
gasPrice: zod_1.z
|
|
51
|
-
.string()
|
|
52
|
-
.optional()
|
|
53
|
-
.describe("Legacy gas price in wei as a decimal string or 0x-prefixed hex string. Mutually exclusive with maxFeePerGas/maxPriorityFeePerGas."),
|
|
54
|
-
maxFeePerGas: zod_1.z
|
|
55
|
-
.string()
|
|
56
|
-
.optional()
|
|
57
|
-
.describe("EIP-1559 max total fee per gas in wei as a decimal string or 0x-prefixed hex string."),
|
|
58
|
-
maxPriorityFeePerGas: zod_1.z
|
|
59
|
-
.string()
|
|
60
|
-
.optional()
|
|
61
|
-
.describe("EIP-1559 miner tip per gas in wei as a decimal string or 0x-prefixed hex string."),
|
|
62
|
-
nonce: zod_1.z
|
|
63
|
-
.number()
|
|
64
|
-
.optional()
|
|
65
|
-
.describe("Transaction sequence number. Auto-fetched if rpcUrl is provided."),
|
|
66
|
-
type: zod_1.z
|
|
67
|
-
.number()
|
|
68
|
-
.optional()
|
|
69
|
-
.describe("Transaction type: 0=legacy, 1=EIP-2930, 2=EIP-1559."),
|
|
70
|
-
chainId: zod_1.z
|
|
71
|
-
.number()
|
|
72
|
-
.optional()
|
|
73
|
-
.describe("EVM chain ID (e.g. 1=Ethereum mainnet, 137=Polygon). Must match target network."),
|
|
74
|
-
rpcUrl: zod_1.z
|
|
75
|
-
.string()
|
|
76
|
-
.optional()
|
|
77
|
-
.describe("JSON-RPC endpoint for the target network. Required for auto gas/nonce estimation."),
|
|
78
|
-
privateKey: zod_1.z
|
|
79
|
-
.string()
|
|
80
|
-
.refine((value) => /^[a-fA-F0-9]{64}$/.test(value))
|
|
81
|
-
.describe("64-char hex private key (no 0x prefix) of the signing wallet. Handle with extreme care — never log or persist."),
|
|
82
|
-
};
|
|
83
|
-
exports.signTransactionValidationZod = zod_1.z.object(exports.signTransactionValidation);
|
|
84
|
-
exports.signTypedDataValidation = {
|
|
85
|
-
domain: zod_1.z
|
|
86
|
-
.object({
|
|
87
|
-
name: zod_1.z.string().optional(),
|
|
88
|
-
version: zod_1.z.string().optional(),
|
|
89
|
-
chainId: zod_1.z.string().optional(),
|
|
90
|
-
verifyingContract: validationUtils_js_1.ethereumAddressValidation.optional(),
|
|
91
|
-
salt: zod_1.z.string().optional(),
|
|
92
|
-
})
|
|
93
|
-
.describe("EIP-712 domain separator object identifying the contract and chain."),
|
|
94
|
-
types: zod_1.z
|
|
95
|
-
.record(zod_1.z.array(zod_1.z.object({
|
|
96
|
-
name: zod_1.z.string(),
|
|
97
|
-
type: zod_1.z.string(),
|
|
98
|
-
})))
|
|
99
|
-
.describe("EIP-712 named type definitions (excluding EIP712Domain)."),
|
|
100
|
-
primaryType: zod_1.z
|
|
101
|
-
.string()
|
|
102
|
-
.describe("Top-level type name to sign from the types map."),
|
|
103
|
-
message: zod_1.z
|
|
104
|
-
.record(zod_1.z.unknown())
|
|
105
|
-
.describe("Typed data payload matching the primaryType structure."),
|
|
106
|
-
privateKey: zod_1.z
|
|
107
|
-
.string()
|
|
108
|
-
.refine((value) => /^[a-fA-F0-9]{64}$/.test(value))
|
|
109
|
-
.describe("64-char hex private key (no 0x prefix) of the signing wallet. Handle with extreme care — never log or persist."),
|
|
110
|
-
// Optional: Contract submission details (for use with submitTypedDataSignature)
|
|
111
|
-
contractAddress: validationUtils_js_1.ethereumAddressValidation
|
|
112
|
-
.optional()
|
|
113
|
-
.describe("Optional: if provided with functionName + contractAbi, also returns a signed transaction calling that function."),
|
|
114
|
-
functionName: zod_1.z
|
|
115
|
-
.string()
|
|
116
|
-
.optional()
|
|
117
|
-
.describe("Contract function to call with the signature as the last argument."),
|
|
118
|
-
functionArgs: zod_1.z
|
|
119
|
-
.array(zod_1.z.unknown())
|
|
120
|
-
.optional()
|
|
121
|
-
.describe("Additional positional arguments before the signature."),
|
|
122
|
-
contractAbi: zod_1.z
|
|
123
|
-
.array(zod_1.z.unknown())
|
|
124
|
-
.optional()
|
|
125
|
-
.describe("ABI array for the function; required when contractAddress is set."),
|
|
126
|
-
// Optional: Transaction parameters
|
|
127
|
-
value: zod_1.z.string().optional(),
|
|
128
|
-
gasLimit: zod_1.z.string().optional(),
|
|
129
|
-
gasPrice: zod_1.z.string().optional(),
|
|
130
|
-
maxFeePerGas: zod_1.z.string().optional(),
|
|
131
|
-
maxPriorityFeePerGas: zod_1.z.string().optional(),
|
|
132
|
-
nonce: zod_1.z.number().optional(),
|
|
133
|
-
rpcUrl: zod_1.z
|
|
134
|
-
.string()
|
|
135
|
-
.optional()
|
|
136
|
-
.describe("JSON-RPC endpoint for the target network. Required for auto gas/nonce estimation."),
|
|
137
|
-
};
|
|
138
|
-
exports.signTypedDataValidationZod = zod_1.z.object(exports.signTypedDataValidation);
|
|
139
|
-
async function signTransaction({ to, value, data, gasLimit, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, type, chainId, rpcUrl, privateKey, }) {
|
|
140
|
-
try {
|
|
141
|
-
const wallet = new ethers_1.ethers.Wallet(privateKey);
|
|
142
|
-
let finalNonce = nonce;
|
|
143
|
-
let finalGasLimit = gasLimit;
|
|
144
|
-
(0, logger_js_1.log)(`Sign transaction with Wallet ${wallet.address}`);
|
|
145
|
-
// If rpcUrl is provided, fetch missing values from RPC
|
|
146
|
-
let finalGasPrice = gasPrice;
|
|
147
|
-
if (rpcUrl) {
|
|
148
|
-
if (process.env.LOCALHOST_SUBSTITUTE) {
|
|
149
|
-
rpcUrl = rpcUrl
|
|
150
|
-
.replace(/localhost/i, process.env.LOCALHOST_SUBSTITUTE)
|
|
151
|
-
.replace("127.0.0.1", process.env.LOCALHOST_SUBSTITUTE);
|
|
152
|
-
}
|
|
153
|
-
const provider = new ethers_1.ethers.providers.JsonRpcProvider(rpcUrl);
|
|
154
|
-
// Fetch nonce if not provided
|
|
155
|
-
if (nonce === undefined) {
|
|
156
|
-
finalNonce = await provider.getTransactionCount(wallet.address);
|
|
157
|
-
}
|
|
158
|
-
// Fetch gas price if not provided
|
|
159
|
-
if (gasPrice === undefined) {
|
|
160
|
-
const gasPriceBigNumber = await provider.getGasPrice();
|
|
161
|
-
finalGasPrice = gasPriceBigNumber.toHexString();
|
|
162
|
-
}
|
|
163
|
-
// Estimate gas limit if not provided
|
|
164
|
-
if (gasLimit === undefined) {
|
|
165
|
-
try {
|
|
166
|
-
const estimatedGas = await provider.estimateGas({
|
|
167
|
-
to,
|
|
168
|
-
value: value || "0x0",
|
|
169
|
-
data: data || "0x",
|
|
170
|
-
from: wallet.address,
|
|
171
|
-
});
|
|
172
|
-
finalGasLimit = estimatedGas.toHexString();
|
|
173
|
-
(0, logger_js_1.log)("Gas estimated:", estimatedGas.toString());
|
|
174
|
-
}
|
|
175
|
-
catch (estimateError) {
|
|
176
|
-
// If estimation fails, use a higher default for contract interactions
|
|
177
|
-
const hasData = data && data !== "0x" && data !== "";
|
|
178
|
-
finalGasLimit = hasData ? "0x61a80" : "0x5208"; // 400000 for contracts, 21000 for transfers
|
|
179
|
-
(0, logger_js_1.log)("Gas estimation failed, using default:", finalGasLimit, "Error:", estimateError);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
else if (gasLimit === undefined) {
|
|
184
|
-
// If no RPC URL provided and no gas limit, use a reasonable default
|
|
185
|
-
const hasData = data && data !== "0x" && data !== "";
|
|
186
|
-
finalGasLimit = hasData ? "0x61a80" : "0x5208"; // 400000 for contracts, 21000 for transfers
|
|
187
|
-
(0, logger_js_1.log)("No RPC URL provided for gas estimation, using default:", finalGasLimit);
|
|
188
|
-
}
|
|
189
|
-
const transactionRequest = Object.entries({
|
|
190
|
-
to,
|
|
191
|
-
value,
|
|
192
|
-
data,
|
|
193
|
-
gasLimit: finalGasLimit,
|
|
194
|
-
gasPrice: finalGasPrice,
|
|
195
|
-
maxFeePerGas,
|
|
196
|
-
maxPriorityFeePerGas,
|
|
197
|
-
nonce: finalNonce,
|
|
198
|
-
type,
|
|
199
|
-
chainId,
|
|
200
|
-
}).reduce((acc, [key, value]) => {
|
|
201
|
-
if (value !== undefined && value !== "") {
|
|
202
|
-
acc[key] = value;
|
|
203
|
-
}
|
|
204
|
-
return acc;
|
|
205
|
-
}, {});
|
|
206
|
-
(0, logger_js_1.log)("Signing transaction with data:", transactionRequest);
|
|
207
|
-
const signedTransaction = await wallet.signTransaction(transactionRequest);
|
|
208
|
-
return {
|
|
209
|
-
content: [
|
|
210
|
-
{
|
|
211
|
-
type: "text",
|
|
212
|
-
text: JSON.stringify({
|
|
213
|
-
success: true,
|
|
214
|
-
signedTransaction,
|
|
215
|
-
}, null, 2),
|
|
216
|
-
},
|
|
217
|
-
],
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
catch (error) {
|
|
221
|
-
(0, errorHandling_js_1.logAndThrowError)(error, "sign transaction");
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
17
|
async function sendSignedTransaction(coreSDK, signedTransaction, protocolName) {
|
|
225
18
|
try {
|
|
226
19
|
if (!coreSDK) {
|
|
@@ -241,78 +34,4 @@ async function sendSignedTransaction(coreSDK, signedTransaction, protocolName) {
|
|
|
241
34
|
(0, errorHandling_js_1.logAndThrowError)(error, "send signed transaction");
|
|
242
35
|
}
|
|
243
36
|
}
|
|
244
|
-
async function signTypedData({ domain, types, primaryType, message, privateKey, contractAddress, functionName, functionArgs, contractAbi, value, gasLimit, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, rpcUrl, }) {
|
|
245
|
-
try {
|
|
246
|
-
const wallet = new ethers_1.ethers.Wallet(privateKey);
|
|
247
|
-
(0, logger_js_1.log)("Signing typed data with:", {
|
|
248
|
-
domain,
|
|
249
|
-
types,
|
|
250
|
-
primaryType,
|
|
251
|
-
message,
|
|
252
|
-
address: wallet.address,
|
|
253
|
-
});
|
|
254
|
-
delete types.EIP712Domain;
|
|
255
|
-
const signature = await wallet._signTypedData(domain, types, message);
|
|
256
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
257
|
-
const { signature: _, ...signatureParams } = (0, signature_js_1.getSignatureParameters)(signature);
|
|
258
|
-
const result = {
|
|
259
|
-
success: true,
|
|
260
|
-
signatureParams,
|
|
261
|
-
signature,
|
|
262
|
-
address: wallet.address,
|
|
263
|
-
// Include the original data for easy use with submitTypedDataSignature
|
|
264
|
-
signedData: {
|
|
265
|
-
domain,
|
|
266
|
-
types: types,
|
|
267
|
-
primaryType,
|
|
268
|
-
message,
|
|
269
|
-
},
|
|
270
|
-
};
|
|
271
|
-
// If contract details are provided, also create a signed transaction
|
|
272
|
-
if (contractAddress && functionName && contractAbi) {
|
|
273
|
-
(0, logger_js_1.log)("Creating signed transaction for contract submission");
|
|
274
|
-
const contractInterface = new ethers_1.ethers.utils.Interface(contractAbi);
|
|
275
|
-
const data = contractInterface.encodeFunctionData(functionName, [
|
|
276
|
-
...(functionArgs || []),
|
|
277
|
-
signature,
|
|
278
|
-
]);
|
|
279
|
-
const { content } = await signTransaction({
|
|
280
|
-
to: contractAddress,
|
|
281
|
-
value,
|
|
282
|
-
data,
|
|
283
|
-
gasLimit,
|
|
284
|
-
gasPrice,
|
|
285
|
-
maxFeePerGas,
|
|
286
|
-
maxPriorityFeePerGas,
|
|
287
|
-
nonce,
|
|
288
|
-
rpcUrl,
|
|
289
|
-
privateKey,
|
|
290
|
-
});
|
|
291
|
-
const json = content[0].text;
|
|
292
|
-
const parsedJson = JSON.parse(json);
|
|
293
|
-
const signedTransaction = parsedJson.signedTransaction;
|
|
294
|
-
if (!signedTransaction) {
|
|
295
|
-
throw new Error("Failed to sign transaction for contract submission");
|
|
296
|
-
}
|
|
297
|
-
result.signedTransaction = signedTransaction;
|
|
298
|
-
result.transactionData = {
|
|
299
|
-
to: contractAddress,
|
|
300
|
-
functionName,
|
|
301
|
-
data,
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
|
-
return {
|
|
305
|
-
content: [
|
|
306
|
-
{
|
|
307
|
-
type: "text",
|
|
308
|
-
text: (0, jsonUtils_js_1.stringifyWithBigInt)(result),
|
|
309
|
-
},
|
|
310
|
-
],
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
catch (error) {
|
|
314
|
-
(0, logger_js_1.log)("Error signing typed data:", error);
|
|
315
|
-
throw new Error(`Failed to sign typed data: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
37
|
//# sourceMappingURL=transactionSigning.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactionSigning.js","sourceRoot":"","sources":["../../../src/common/mcp-server/transactionSigning.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"transactionSigning.js","sourceRoot":"","sources":["../../../src/common/mcp-server/transactionSigning.ts"],"names":[],"mappings":";;;AAqBA,sDA8BC;AAlDD,6BAAwB;AAExB,+DAA2D;AAC3D,yDAAsD;AACtD,iDAAqD;AAExC,QAAA,2BAA2B,GAAG;IACzC,iBAAiB,EAAE,OAAC;SACjB,MAAM,EAAE;SACR,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACjD,QAAQ,CACP,iJAAiJ,CAClJ;IACH,QAAQ,EAAE,wCAAkB;CAC7B,CAAC;AAEW,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CACpD,mCAA2B,CAC5B,CAAC;AAEK,KAAK,UAAU,qBAAqB,CACzC,OAMQ,EACR,iBAAyB,EACzB,YAAiC;IAEjC,IAAI,CAAC;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,qBAAqB,YAAY,qBAAqB,CAAC,CAAC;QAC1E,CAAC;QAED,MAAM,UAAU,GACd,MAAM,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC,iBAAiB,CAAC,CAAC;QACjE,MAAM,SAAS,GAAG,MAAM,UAAU,CAAC,IAAI,EAAE,CAAC;QAC1C,OAAO,IAAA,kCAAmB,EAAC;YACzB,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,WAAW,EAAE,SAAS,CAAC,WAAW;YAClC,IAAI,EAAE,SAAS,CAAC,IAAI;YACpB,gEAAgE;YAChE,OAAO,EAAE,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,GAAG;SAC9C,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAA,mCAAgB,EAAC,KAAK,EAAE,yBAAyB,CAAC,CAAC;IACrD,CAAC;AACH,CAAC"}
|
|
@@ -28,5 +28,5 @@ exports.ecdsaSignatureString = zod_1.z
|
|
|
28
28
|
}, {
|
|
29
29
|
message: `Must be a valid ECDSA signature string: optionally prefixed with '0x', followed by ${ECDSA_SIGNATURE_HEX_LENGTH} hex characters (r: 64, s: 64, v: 2)`,
|
|
30
30
|
})
|
|
31
|
-
.describe("65-byte ECDSA signature, optionally 0x-prefixed, exactly 130 hex chars (r=32 bytes, s=32 bytes, v=1 byte). Obtain
|
|
31
|
+
.describe("65-byte ECDSA signature, optionally 0x-prefixed, exactly 130 hex chars (r=32 bytes, s=32 bytes, v=1 byte). Obtain by calling sign_full_offer and signing the returned typed data locally with your wallet (EIP-712).");
|
|
32
32
|
//# sourceMappingURL=validationUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validationUtils.js","sourceRoot":"","sources":["../../../src/common/mcp-server/validationUtils.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,6BAAwB;AAExB,MAAM,0BAA0B,GAAG,GAAG,CAAC,CAAC,uCAAuC;AAElE,QAAA,yBAAyB,GAAG,OAAC;KACvC,MAAM,EAAE;KACR,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,eAAM,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;IAChD,OAAO,EAAE,kCAAkC;CAC5C,CAAC;KACD,QAAQ,CACP,qKAAqK,CACtK,CAAC;AAES,QAAA,uBAAuB,GAAG,OAAC;KACrC,MAAM,EAAE;KACR,KAAK,CAAC,sBAAsB,EAAE,mCAAmC,CAAC;KAClE,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE;IACd,4DAA4D;IAC5D,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC7B,+CAA+C;IAC/C,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACpD,CAAC,EAAE,kCAAkC,CAAC,CAAC;AAE5B,QAAA,oBAAoB,GAAG,OAAC;KAClC,MAAM,EAAE;KACR,MAAM,CACL,CAAC,KAAK,EAAE,EAAE;IACR,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAChE,OAAO,IAAI,MAAM,CAAC,gBAAgB,0BAA0B,IAAI,CAAC,CAAC,IAAI,CACpE,OAAO,CACR,CAAC;AACJ,CAAC,EACD;IACE,OAAO,EAAE,sFAAsF,0BAA0B,sCAAsC;CAChK,CACF;KACA,QAAQ,CACP,
|
|
1
|
+
{"version":3,"file":"validationUtils.js","sourceRoot":"","sources":["../../../src/common/mcp-server/validationUtils.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,6BAAwB;AAExB,MAAM,0BAA0B,GAAG,GAAG,CAAC,CAAC,uCAAuC;AAElE,QAAA,yBAAyB,GAAG,OAAC;KACvC,MAAM,EAAE;KACR,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,eAAM,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;IAChD,OAAO,EAAE,kCAAkC;CAC5C,CAAC;KACD,QAAQ,CACP,qKAAqK,CACtK,CAAC;AAES,QAAA,uBAAuB,GAAG,OAAC;KACrC,MAAM,EAAE;KACR,KAAK,CAAC,sBAAsB,EAAE,mCAAmC,CAAC;KAClE,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE;IACd,4DAA4D;IAC5D,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC7B,+CAA+C;IAC/C,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACpD,CAAC,EAAE,kCAAkC,CAAC,CAAC;AAE5B,QAAA,oBAAoB,GAAG,OAAC;KAClC,MAAM,EAAE;KACR,MAAM,CACL,CAAC,KAAK,EAAE,EAAE;IACR,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAChE,OAAO,IAAI,MAAM,CAAC,gBAAgB,0BAA0B,IAAI,CAAC,CAAC,IAAI,CACpE,OAAO,CACR,CAAC;AACJ,CAAC,EACD;IACE,OAAO,EAAE,sFAAsF,0BAA0B,sCAAsC;CAChK,CACF;KACA,QAAQ,CACP,sNAAsN,CACvN,CAAC"}
|