@x402/extensions 2.3.1 → 2.4.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.
@@ -1,5 +1,5 @@
1
+ import { FacilitatorExtension, ResourceServerExtension, PaymentPayload, PaymentRequirements, PaymentRequirementsV1 } from '@x402/core/types';
1
2
  import { BodyMethods, QueryParamMethods, HTTPFacilitatorClient } from '@x402/core/http';
2
- import { ResourceServerExtension, PaymentPayload, PaymentRequirements, PaymentRequirementsV1 } from '@x402/core/types';
3
3
 
4
4
  /**
5
5
  * Shared type utilities for x402 extensions
@@ -24,20 +24,17 @@ type WithExtensions<T, E> = T extends {
24
24
  };
25
25
 
26
26
  /**
27
- * Type definitions for the Bazaar Discovery Extension
27
+ * HTTP-specific type definitions for the Bazaar Discovery Extension
28
28
  */
29
29
 
30
- /**
31
- * Extension identifier constant for the Bazaar discovery extension
32
- */
33
- declare const BAZAAR = "bazaar";
34
30
  /**
35
31
  * Discovery info for query parameter methods (GET, HEAD, DELETE)
36
32
  */
37
33
  interface QueryDiscoveryInfo {
38
34
  input: {
39
35
  type: "http";
40
- method: QueryParamMethods;
36
+ /** Absent at declaration time; set by bazaarResourceServerExtension.enrichDeclaration */
37
+ method?: QueryParamMethods;
41
38
  queryParams?: Record<string, unknown>;
42
39
  headers?: Record<string, string>;
43
40
  };
@@ -53,7 +50,8 @@ interface QueryDiscoveryInfo {
53
50
  interface BodyDiscoveryInfo {
54
51
  input: {
55
52
  type: "http";
56
- method: BodyMethods;
53
+ /** Absent at declaration time; set by bazaarResourceServerExtension.enrichDeclaration */
54
+ method?: BodyMethods;
57
55
  bodyType: "json" | "form-data" | "text";
58
56
  body: Record<string, unknown>;
59
57
  queryParams?: Record<string, unknown>;
@@ -65,10 +63,6 @@ interface BodyDiscoveryInfo {
65
63
  example?: unknown;
66
64
  };
67
65
  }
68
- /**
69
- * Combined discovery info type
70
- */
71
- type DiscoveryInfo = QueryDiscoveryInfo | BodyDiscoveryInfo;
72
66
  /**
73
67
  * Discovery extension for query parameter methods (GET, HEAD, DELETE)
74
68
  */
@@ -166,10 +160,6 @@ interface BodyDiscoveryExtension {
166
160
  required: ["input"];
167
161
  };
168
162
  }
169
- /**
170
- * Combined discovery extension type
171
- */
172
- type DiscoveryExtension = QueryDiscoveryExtension | BodyDiscoveryExtension;
173
163
  interface DeclareQueryDiscoveryExtensionConfig {
174
164
  method?: QueryParamMethods;
175
165
  input?: Record<string, unknown>;
@@ -189,7 +179,124 @@ interface DeclareBodyDiscoveryExtensionConfig {
189
179
  schema?: Record<string, unknown>;
190
180
  };
191
181
  }
192
- type DeclareDiscoveryExtensionConfig = DeclareQueryDiscoveryExtensionConfig | DeclareBodyDiscoveryExtensionConfig;
182
+ interface DiscoveredHTTPResource {
183
+ resourceUrl: string;
184
+ description?: string;
185
+ mimeType?: string;
186
+ /** Present after server extension enrichment; may be absent for pre-enrichment data */
187
+ method?: string;
188
+ x402Version: number;
189
+ discoveryInfo: DiscoveryInfo;
190
+ }
191
+ declare const isQueryExtensionConfig: (config: DeclareQueryDiscoveryExtensionConfig | DeclareBodyDiscoveryExtensionConfig) => config is DeclareQueryDiscoveryExtensionConfig;
192
+ declare const isBodyExtensionConfig: (config: DeclareQueryDiscoveryExtensionConfig | DeclareBodyDiscoveryExtensionConfig) => config is DeclareBodyDiscoveryExtensionConfig;
193
+
194
+ /**
195
+ * MCP-specific type definitions for the Bazaar Discovery Extension
196
+ */
197
+
198
+ /**
199
+ * Discovery info for MCP tools
200
+ */
201
+ interface McpDiscoveryInfo {
202
+ input: {
203
+ type: "mcp";
204
+ toolName: string;
205
+ description?: string;
206
+ transport?: "streamable-http" | "sse";
207
+ inputSchema: Record<string, unknown>;
208
+ example?: Record<string, unknown>;
209
+ };
210
+ output?: {
211
+ type?: string;
212
+ format?: string;
213
+ example?: unknown;
214
+ };
215
+ }
216
+ /**
217
+ * Discovery extension for MCP tools
218
+ */
219
+ interface McpDiscoveryExtension {
220
+ info: McpDiscoveryInfo;
221
+ schema: {
222
+ $schema: "https://json-schema.org/draft/2020-12/schema";
223
+ type: "object";
224
+ properties: {
225
+ input: {
226
+ type: "object";
227
+ properties: {
228
+ type: {
229
+ type: "string";
230
+ const: "mcp";
231
+ };
232
+ toolName: {
233
+ type: "string";
234
+ };
235
+ description?: {
236
+ type: "string";
237
+ };
238
+ transport?: {
239
+ type: "string";
240
+ enum: ["streamable-http", "sse"];
241
+ };
242
+ inputSchema: Record<string, unknown>;
243
+ example?: Record<string, unknown>;
244
+ };
245
+ required: ("type" | "toolName" | "inputSchema")[];
246
+ additionalProperties?: boolean;
247
+ };
248
+ output?: {
249
+ type: "object";
250
+ properties?: Record<string, unknown>;
251
+ required?: readonly string[];
252
+ additionalProperties?: boolean;
253
+ };
254
+ };
255
+ required: ["input"];
256
+ };
257
+ }
258
+ interface DeclareMcpDiscoveryExtensionConfig {
259
+ toolName: string;
260
+ description?: string;
261
+ transport?: "streamable-http" | "sse";
262
+ inputSchema: Record<string, unknown>;
263
+ example?: Record<string, unknown>;
264
+ output?: {
265
+ example?: unknown;
266
+ schema?: Record<string, unknown>;
267
+ };
268
+ }
269
+ interface DiscoveredMCPResource {
270
+ resourceUrl: string;
271
+ description?: string;
272
+ mimeType?: string;
273
+ toolName: string;
274
+ x402Version: number;
275
+ discoveryInfo: DiscoveryInfo;
276
+ }
277
+ declare const isMcpExtensionConfig: (config: DeclareMcpDiscoveryExtensionConfig | Record<string, unknown>) => config is DeclareMcpDiscoveryExtensionConfig;
278
+
279
+ /**
280
+ * Shared type definitions for the Bazaar Discovery Extension
281
+ *
282
+ * Protocol-specific types live in their own directories (http/, mcp/).
283
+ * This file defines the shared unions, constants, and utility types,
284
+ * and re-exports all protocol-specific types for backwards compatibility.
285
+ */
286
+
287
+ /**
288
+ * Extension identifier for the Bazaar discovery extension.
289
+ */
290
+ declare const BAZAAR: FacilitatorExtension;
291
+ /**
292
+ * Combined discovery info type
293
+ */
294
+ type DiscoveryInfo = QueryDiscoveryInfo | BodyDiscoveryInfo | McpDiscoveryInfo;
295
+ /**
296
+ * Combined discovery extension type
297
+ */
298
+ type DiscoveryExtension = QueryDiscoveryExtension | BodyDiscoveryExtension | McpDiscoveryExtension;
299
+ type DeclareDiscoveryExtensionConfig = DeclareQueryDiscoveryExtensionConfig | DeclareBodyDiscoveryExtensionConfig | DeclareMcpDiscoveryExtensionConfig;
193
300
  /**
194
301
  * Distributive Omit - properly distributes Omit over union types.
195
302
  *
@@ -202,19 +309,20 @@ type DeclareDiscoveryExtensionConfig = DeclareQueryDiscoveryExtensionConfig | De
202
309
  type DistributiveOmit<T, K extends keyof T> = T extends T ? Omit<T, K> : never;
203
310
  /**
204
311
  * Config type for declareDiscoveryExtension function.
205
- * Uses DistributiveOmit to preserve bodyType discriminant in the union.
312
+ * Uses DistributiveOmit to preserve bodyType discriminant in the union for HTTP configs.
313
+ * MCP config has no `method` field so it's included directly.
206
314
  */
207
- type DeclareDiscoveryExtensionInput = DistributiveOmit<DeclareDiscoveryExtensionConfig, "method">;
315
+ type DeclareDiscoveryExtensionInput = DistributiveOmit<DeclareQueryDiscoveryExtensionConfig, "method"> | DistributiveOmit<DeclareBodyDiscoveryExtensionConfig, "method"> | DeclareMcpDiscoveryExtensionConfig;
208
316
 
209
317
  /**
210
- * Resource Service functions for creating Bazaar discovery extensions
318
+ * Resource Service entry point for creating Bazaar discovery extensions
211
319
  *
212
- * These functions help servers declare the shape of their endpoints
213
- * for facilitator discovery and cataloging in the Bazaar.
320
+ * This module provides the unified `declareDiscoveryExtension` function that
321
+ * routes to protocol-specific builders in http/ and mcp/.
214
322
  */
215
323
 
216
324
  /**
217
- * Create a discovery extension for any HTTP method
325
+ * Create a discovery extension for any HTTP method or MCP tool
218
326
  *
219
327
  * This function helps servers declare how their endpoint should be called,
220
328
  * including the expected input parameters/body and output format.
@@ -260,6 +368,22 @@ type DeclareDiscoveryExtensionInput = DistributiveOmit<DeclareDiscoveryExtension
260
368
  * example: { success: true, id: "123" }
261
369
  * }
262
370
  * });
371
+ *
372
+ * // For an MCP tool
373
+ * const mcpExtension = declareDiscoveryExtension({
374
+ * toolName: "financial_analysis",
375
+ * description: "Analyze financial data for a given ticker",
376
+ * inputSchema: {
377
+ * type: "object",
378
+ * properties: {
379
+ * ticker: { type: "string" },
380
+ * },
381
+ * required: ["ticker"],
382
+ * },
383
+ * output: {
384
+ * example: { pe_ratio: 28.5, recommendation: "hold" }
385
+ * }
386
+ * });
263
387
  * ```
264
388
  */
265
389
  declare function declareDiscoveryExtension(config: DeclareDiscoveryExtensionInput): Record<string, DiscoveryExtension>;
@@ -301,44 +425,8 @@ interface ValidationResult {
301
425
  * ```
302
426
  */
303
427
  declare function validateDiscoveryExtension(extension: DiscoveryExtension): ValidationResult;
304
- /**
305
- * Extracts the discovery info from payment payload and requirements
306
- *
307
- * This function handles both v2 (extensions) and v1 (outputSchema) formats.
308
- *
309
- * For v2: Discovery info is in PaymentPayload.extensions (client copied it from PaymentRequired)
310
- * For v1: Discovery info is in PaymentRequirements.outputSchema
311
- *
312
- * V1 data is automatically transformed to v2 DiscoveryInfo format, making smart
313
- * assumptions about field names (queryParams/query/params for GET, bodyFields/body/data for POST, etc.)
314
- *
315
- * @param paymentPayload - The payment payload containing extensions (v2) and version info
316
- * @param paymentRequirements - The payment requirements (contains outputSchema for v1)
317
- * @param validate - Whether to validate v2 extensions before extracting (default: true)
318
- * @returns The discovery info in v2 format if present, or null if not discoverable
319
- *
320
- * @example
321
- * ```typescript
322
- * // V2 - extensions are in PaymentPayload
323
- * const info = extractDiscoveryInfo(paymentPayload, paymentRequirements);
324
- *
325
- * // V1 - discovery info is in PaymentRequirements.outputSchema
326
- * const info = extractDiscoveryInfo(paymentPayloadV1, paymentRequirementsV1);
327
- *
328
- * if (info) {
329
- * // Both v1 and v2 return the same DiscoveryInfo structure
330
- * console.log("Method:", info.input.method);
331
- * }
332
- * ```
333
- */
334
- interface DiscoveredResource {
335
- resourceUrl: string;
336
- description?: string;
337
- mimeType?: string;
338
- method: string;
339
- x402Version: number;
340
- discoveryInfo: DiscoveryInfo;
341
- }
428
+
429
+ type DiscoveredResource = DiscoveredHTTPResource | DiscoveredMCPResource;
342
430
  /**
343
431
  * Extracts discovery information from payment payload and requirements.
344
432
  * Combines resource URL, HTTP method, version, and discovery info into a single object.
@@ -490,7 +578,6 @@ declare function extractResourceMetadataV1(paymentRequirements: PaymentRequireme
490
578
  interface ListDiscoveryResourcesParams {
491
579
  /**
492
580
  * Filter by protocol type (e.g., "http", "mcp").
493
- * Currently, the only supported protocol type is "http".
494
581
  */
495
582
  type?: string;
496
583
  /**
@@ -572,4 +659,4 @@ interface BazaarClientExtension {
572
659
  */
573
660
  declare function withBazaar<T extends HTTPFacilitatorClient>(client: T): WithExtensions<T, BazaarClientExtension>;
574
661
 
575
- export { BAZAAR as B, type DiscoveredResource as D, type ListDiscoveryResourcesParams as L, type QueryDiscoveryExtension as Q, type ValidationResult as V, type WithExtensions as W, type BazaarClientExtension as a, type BodyDiscoveryExtension as b, type BodyDiscoveryInfo as c, type DiscoveryExtension as d, type DiscoveryInfo as e, type DiscoveryResource as f, type DiscoveryResourcesResponse as g, type QueryDiscoveryInfo as h, bazaarResourceServerExtension as i, declareDiscoveryExtension as j, extractDiscoveryInfo as k, extractDiscoveryInfoFromExtension as l, extractDiscoveryInfoV1 as m, extractResourceMetadataV1 as n, isDiscoverableV1 as o, validateDiscoveryExtension as p, validateAndExtract as v, withBazaar as w };
662
+ export { validateAndExtract as A, BAZAAR as B, validateDiscoveryExtension as C, type DeclareBodyDiscoveryExtensionConfig as D, withBazaar as E, type ListDiscoveryResourcesParams as L, type McpDiscoveryExtension as M, type QueryDiscoveryExtension as Q, type ValidationResult as V, type WithExtensions as W, type BazaarClientExtension as a, type BodyDiscoveryExtension as b, type BodyDiscoveryInfo as c, type DeclareDiscoveryExtensionConfig as d, type DeclareDiscoveryExtensionInput as e, type DeclareMcpDiscoveryExtensionConfig as f, type DeclareQueryDiscoveryExtensionConfig as g, type DiscoveredHTTPResource as h, type DiscoveredMCPResource as i, type DiscoveredResource as j, type DiscoveryExtension as k, type DiscoveryInfo as l, type DiscoveryResource as m, type DiscoveryResourcesResponse as n, type McpDiscoveryInfo as o, type QueryDiscoveryInfo as p, bazaarResourceServerExtension as q, declareDiscoveryExtension as r, extractDiscoveryInfo as s, extractDiscoveryInfoFromExtension as t, extractDiscoveryInfoV1 as u, extractResourceMetadataV1 as v, isBodyExtensionConfig as w, isDiscoverableV1 as x, isMcpExtensionConfig as y, isQueryExtensionConfig as z };
@@ -1,6 +1,134 @@
1
- export { B as BAZAAR, a as BazaarClientExtension, b as BodyDiscoveryExtension, c as BodyDiscoveryInfo, D as DiscoveredResource, d as DiscoveryExtension, e as DiscoveryInfo, f as DiscoveryResource, g as DiscoveryResourcesResponse, L as ListDiscoveryResourcesParams, Q as QueryDiscoveryExtension, h as QueryDiscoveryInfo, V as ValidationResult, W as WithExtensions, i as bazaarResourceServerExtension, j as declareDiscoveryExtension, k as extractDiscoveryInfo, l as extractDiscoveryInfoFromExtension, m as extractDiscoveryInfoV1, n as extractResourceMetadataV1, o as isDiscoverableV1, v as validateAndExtract, p as validateDiscoveryExtension, w as withBazaar } from './index-DvDlinmy.js';
1
+ export { B as BAZAAR, a as BazaarClientExtension, b as BodyDiscoveryExtension, c as BodyDiscoveryInfo, D as DeclareBodyDiscoveryExtensionConfig, d as DeclareDiscoveryExtensionConfig, e as DeclareDiscoveryExtensionInput, f as DeclareMcpDiscoveryExtensionConfig, g as DeclareQueryDiscoveryExtensionConfig, h as DiscoveredHTTPResource, i as DiscoveredMCPResource, j as DiscoveredResource, k as DiscoveryExtension, l as DiscoveryInfo, m as DiscoveryResource, n as DiscoveryResourcesResponse, L as ListDiscoveryResourcesParams, M as McpDiscoveryExtension, o as McpDiscoveryInfo, Q as QueryDiscoveryExtension, p as QueryDiscoveryInfo, V as ValidationResult, W as WithExtensions, q as bazaarResourceServerExtension, r as declareDiscoveryExtension, s as extractDiscoveryInfo, t as extractDiscoveryInfoFromExtension, u as extractDiscoveryInfoV1, v as extractResourceMetadataV1, w as isBodyExtensionConfig, x as isDiscoverableV1, y as isMcpExtensionConfig, z as isQueryExtensionConfig, A as validateAndExtract, C as validateDiscoveryExtension, E as withBazaar } from './index-G8RNfr6X.js';
2
2
  export { CompleteSIWxInfo, CreateSIWxHookOptions, DeclareSIWxOptions, EVMMessageVerifier, EVMSigner, InMemorySIWxStorage, SIGN_IN_WITH_X, SIWxExtension, SIWxExtensionInfo, SIWxExtensionSchema, SIWxHookEvent, SIWxPayload, SIWxPayloadSchema, SIWxSigner, SIWxStorage, SIWxValidationOptions, SIWxValidationResult, SIWxVerifyOptions, SIWxVerifyResult, SOLANA_DEVNET, SOLANA_MAINNET, SOLANA_TESTNET, SignatureScheme, SignatureType, SolanaSigner, SupportedChain, buildSIWxSchema, createSIWxClientHook, createSIWxMessage, createSIWxPayload, createSIWxRequestHook, createSIWxSettleHook, declareSIWxExtension, decodeBase58, encodeBase58, encodeSIWxHeader, extractEVMChainId, extractSolanaChainReference, formatSIWEMessage, formatSIWSMessage, getEVMAddress, getSolanaAddress, isEVMSigner, isSolanaSigner, parseSIWxHeader, signEVMMessage, signSolanaMessage, siwxResourceServerExtension, validateSIWxMessage, verifyEVMSignature, verifySIWxSignature, verifySolanaSignature, wrapFetchWithSIWx } from './sign-in-with-x/index.js';
3
3
  export { PAYMENT_IDENTIFIER, PAYMENT_ID_MAX_LENGTH, PAYMENT_ID_MIN_LENGTH, PAYMENT_ID_PATTERN, PaymentIdentifierExtension, PaymentIdentifierInfo, PaymentIdentifierSchema, PaymentIdentifierValidationResult, appendPaymentIdentifierToExtensions, declarePaymentIdentifierExtension, extractAndValidatePaymentIdentifier, extractPaymentIdentifier, generatePaymentId, hasPaymentIdentifier, isPaymentIdentifierExtension, isPaymentIdentifierRequired, isValidPaymentId, paymentIdentifierResourceServerExtension, paymentIdentifierSchema, validatePaymentIdentifier, validatePaymentIdentifierRequirement } from './payment-identifier/index.js';
4
+ import { FacilitatorExtension, PaymentPayload } from '@x402/core/types';
4
5
  import '@x402/core/http';
5
- import '@x402/core/types';
6
6
  import 'zod';
7
+
8
+ /**
9
+ * Type definitions for the EIP-2612 Gas Sponsoring Extension
10
+ *
11
+ * This extension enables gasless approval of the Permit2 contract for tokens
12
+ * that implement EIP-2612. The client signs an off-chain permit, and the
13
+ * facilitator submits it on-chain via `x402Permit2Proxy.settleWithPermit`.
14
+ */
15
+
16
+ /**
17
+ * Extension identifier for the EIP-2612 gas sponsoring extension.
18
+ */
19
+ declare const EIP2612_GAS_SPONSORING: FacilitatorExtension;
20
+ /**
21
+ * EIP-2612 gas sponsoring info populated by the client.
22
+ *
23
+ * Contains the EIP-2612 permit signature and parameters that the facilitator
24
+ * needs to call `x402Permit2Proxy.settleWithPermit`.
25
+ */
26
+ interface Eip2612GasSponsoringInfo {
27
+ /** Index signature for compatibility with Record<string, unknown> */
28
+ [key: string]: unknown;
29
+ /** The address of the sender (token owner). */
30
+ from: string;
31
+ /** The address of the ERC-20 token contract. */
32
+ asset: string;
33
+ /** The address of the spender (Canonical Permit2). */
34
+ spender: string;
35
+ /** The amount to approve (uint256 as decimal string). Typically MaxUint256. */
36
+ amount: string;
37
+ /** The current EIP-2612 nonce of the sender (decimal string). */
38
+ nonce: string;
39
+ /** The timestamp at which the permit signature expires (decimal string). */
40
+ deadline: string;
41
+ /** The 65-byte concatenated EIP-2612 permit signature (r, s, v) as a hex string. */
42
+ signature: string;
43
+ /** Schema version identifier. */
44
+ version: string;
45
+ }
46
+ /**
47
+ * Server-side EIP-2612 gas sponsoring info included in PaymentRequired.
48
+ * Contains a description and version; the client populates the rest.
49
+ */
50
+ interface Eip2612GasSponsoringServerInfo {
51
+ /** Index signature for compatibility with Record<string, unknown> */
52
+ [key: string]: unknown;
53
+ /** Human-readable description of the extension. */
54
+ description: string;
55
+ /** Schema version identifier. */
56
+ version: string;
57
+ }
58
+ /**
59
+ * The full extension object as it appears in PaymentRequired.extensions
60
+ * and PaymentPayload.extensions.
61
+ */
62
+ interface Eip2612GasSponsoringExtension {
63
+ /** Extension info - server-provided or client-enriched. */
64
+ info: Eip2612GasSponsoringServerInfo | Eip2612GasSponsoringInfo;
65
+ /** JSON Schema describing the expected structure of info. */
66
+ schema: Record<string, unknown>;
67
+ }
68
+
69
+ /**
70
+ * Resource Service functions for declaring the EIP-2612 Gas Sponsoring extension.
71
+ *
72
+ * These functions help servers declare support for EIP-2612 gasless Permit2 approvals
73
+ * in the PaymentRequired response extensions.
74
+ */
75
+
76
+ /**
77
+ * Declares the EIP-2612 gas sponsoring extension for inclusion in
78
+ * PaymentRequired.extensions.
79
+ *
80
+ * The server advertises that it (or its facilitator) supports EIP-2612
81
+ * gasless Permit2 approval. The client will populate the info with the
82
+ * actual permit signature data.
83
+ *
84
+ * @returns An object keyed by the extension identifier containing the extension declaration
85
+ *
86
+ * @example
87
+ * ```typescript
88
+ * import { declareEip2612GasSponsoringExtension } from '@x402/extensions';
89
+ *
90
+ * const routes = [
91
+ * {
92
+ * path: "/api/data",
93
+ * price: "$0.01",
94
+ * extensions: {
95
+ * ...declareEip2612GasSponsoringExtension(),
96
+ * },
97
+ * },
98
+ * ];
99
+ * ```
100
+ */
101
+ declare function declareEip2612GasSponsoringExtension(): Record<string, Eip2612GasSponsoringExtension>;
102
+
103
+ /**
104
+ * Facilitator functions for extracting and validating EIP-2612 Gas Sponsoring extension data.
105
+ *
106
+ * These functions help facilitators extract the EIP-2612 permit data from payment
107
+ * payloads and validate it before calling settleWithPermit.
108
+ */
109
+
110
+ /**
111
+ * Extracts the EIP-2612 gas sponsoring info from a payment payload's extensions.
112
+ *
113
+ * Returns the info if the extension is present and contains the required client-populated
114
+ * fields (from, asset, spender, amount, nonce, deadline, signature, version).
115
+ *
116
+ * @param paymentPayload - The payment payload to extract from
117
+ * @returns The EIP-2612 gas sponsoring info, or null if not present
118
+ */
119
+ declare function extractEip2612GasSponsoringInfo(paymentPayload: PaymentPayload): Eip2612GasSponsoringInfo | null;
120
+ /**
121
+ * Validates that the EIP-2612 gas sponsoring info has valid format.
122
+ *
123
+ * Performs basic validation on the info fields:
124
+ * - Addresses are valid hex (0x + 40 hex chars)
125
+ * - Amount, nonce, deadline are numeric strings
126
+ * - Signature is a hex string
127
+ * - Version is a numeric version string
128
+ *
129
+ * @param info - The EIP-2612 gas sponsoring info to validate
130
+ * @returns True if the info is valid, false otherwise
131
+ */
132
+ declare function validateEip2612GasSponsoringInfo(info: Eip2612GasSponsoringInfo): boolean;
133
+
134
+ export { EIP2612_GAS_SPONSORING, type Eip2612GasSponsoringExtension, type Eip2612GasSponsoringInfo, type Eip2612GasSponsoringServerInfo, declareEip2612GasSponsoringExtension, extractEip2612GasSponsoringInfo, validateEip2612GasSponsoringInfo };