@x402/extensions 2.2.0 → 2.3.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.
Files changed (33) hide show
  1. package/README.md +322 -93
  2. package/dist/cjs/bazaar/index.d.ts +3 -562
  3. package/dist/cjs/bazaar/index.js +12 -0
  4. package/dist/cjs/bazaar/index.js.map +1 -1
  5. package/dist/cjs/index-DvDlinmy.d.ts +575 -0
  6. package/dist/cjs/index.d.ts +4 -1
  7. package/dist/cjs/index.js +1008 -2
  8. package/dist/cjs/index.js.map +1 -1
  9. package/dist/cjs/payment-identifier/index.d.ts +345 -0
  10. package/dist/cjs/payment-identifier/index.js +285 -0
  11. package/dist/cjs/payment-identifier/index.js.map +1 -0
  12. package/dist/cjs/sign-in-with-x/index.d.ts +1054 -1
  13. package/dist/cjs/sign-in-with-x/index.js +766 -0
  14. package/dist/cjs/sign-in-with-x/index.js.map +1 -1
  15. package/dist/esm/bazaar/index.d.mts +3 -562
  16. package/dist/esm/bazaar/index.mjs +1 -1
  17. package/dist/esm/chunk-73HCOE6N.mjs +233 -0
  18. package/dist/esm/chunk-73HCOE6N.mjs.map +1 -0
  19. package/dist/esm/{chunk-WB72GLC2.mjs → chunk-DFJ4ZQFO.mjs} +13 -1
  20. package/dist/esm/chunk-DFJ4ZQFO.mjs.map +1 -0
  21. package/dist/esm/chunk-E3F2XHTI.mjs +719 -0
  22. package/dist/esm/chunk-E3F2XHTI.mjs.map +1 -0
  23. package/dist/esm/index-DvDlinmy.d.mts +575 -0
  24. package/dist/esm/index.d.mts +4 -1
  25. package/dist/esm/index.mjs +102 -3
  26. package/dist/esm/payment-identifier/index.d.mts +345 -0
  27. package/dist/esm/payment-identifier/index.mjs +39 -0
  28. package/dist/esm/sign-in-with-x/index.d.mts +1054 -1
  29. package/dist/esm/sign-in-with-x/index.mjs +66 -1
  30. package/package.json +16 -2
  31. package/dist/esm/chunk-MKFJ5AA3.mjs +0 -1
  32. package/dist/esm/chunk-WB72GLC2.mjs.map +0 -1
  33. /package/dist/esm/{chunk-MKFJ5AA3.mjs.map → payment-identifier/index.mjs.map} +0 -0
@@ -0,0 +1,575 @@
1
+ import { BodyMethods, QueryParamMethods, HTTPFacilitatorClient } from '@x402/core/http';
2
+ import { ResourceServerExtension, PaymentPayload, PaymentRequirements, PaymentRequirementsV1 } from '@x402/core/types';
3
+
4
+ /**
5
+ * Shared type utilities for x402 extensions
6
+ */
7
+ /**
8
+ * Type utility to merge extensions properly when chaining.
9
+ * If T already has extensions, merge them; otherwise add new extensions.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * // Chaining multiple extensions preserves all types:
14
+ * const client = withBazaar(withOtherExtension(new HTTPFacilitatorClient()));
15
+ * // Type: HTTPFacilitatorClient & { extensions: OtherExtension & BazaarExtension }
16
+ * ```
17
+ */
18
+ type WithExtensions<T, E> = T extends {
19
+ extensions: infer Existing;
20
+ } ? Omit<T, "extensions"> & {
21
+ extensions: Existing & E;
22
+ } : T & {
23
+ extensions: E;
24
+ };
25
+
26
+ /**
27
+ * Type definitions for the Bazaar Discovery Extension
28
+ */
29
+
30
+ /**
31
+ * Extension identifier constant for the Bazaar discovery extension
32
+ */
33
+ declare const BAZAAR = "bazaar";
34
+ /**
35
+ * Discovery info for query parameter methods (GET, HEAD, DELETE)
36
+ */
37
+ interface QueryDiscoveryInfo {
38
+ input: {
39
+ type: "http";
40
+ method: QueryParamMethods;
41
+ queryParams?: Record<string, unknown>;
42
+ headers?: Record<string, string>;
43
+ };
44
+ output?: {
45
+ type?: string;
46
+ format?: string;
47
+ example?: unknown;
48
+ };
49
+ }
50
+ /**
51
+ * Discovery info for body methods (POST, PUT, PATCH)
52
+ */
53
+ interface BodyDiscoveryInfo {
54
+ input: {
55
+ type: "http";
56
+ method: BodyMethods;
57
+ bodyType: "json" | "form-data" | "text";
58
+ body: Record<string, unknown>;
59
+ queryParams?: Record<string, unknown>;
60
+ headers?: Record<string, string>;
61
+ };
62
+ output?: {
63
+ type?: string;
64
+ format?: string;
65
+ example?: unknown;
66
+ };
67
+ }
68
+ /**
69
+ * Combined discovery info type
70
+ */
71
+ type DiscoveryInfo = QueryDiscoveryInfo | BodyDiscoveryInfo;
72
+ /**
73
+ * Discovery extension for query parameter methods (GET, HEAD, DELETE)
74
+ */
75
+ interface QueryDiscoveryExtension {
76
+ info: QueryDiscoveryInfo;
77
+ schema: {
78
+ $schema: "https://json-schema.org/draft/2020-12/schema";
79
+ type: "object";
80
+ properties: {
81
+ input: {
82
+ type: "object";
83
+ properties: {
84
+ type: {
85
+ type: "string";
86
+ const: "http";
87
+ };
88
+ method: {
89
+ type: "string";
90
+ enum: QueryParamMethods[];
91
+ };
92
+ queryParams?: {
93
+ type: "object";
94
+ properties?: Record<string, unknown>;
95
+ required?: string[];
96
+ additionalProperties?: boolean;
97
+ };
98
+ headers?: {
99
+ type: "object";
100
+ additionalProperties: {
101
+ type: "string";
102
+ };
103
+ };
104
+ };
105
+ required: ("type" | "method")[];
106
+ additionalProperties?: boolean;
107
+ };
108
+ output?: {
109
+ type: "object";
110
+ properties?: Record<string, unknown>;
111
+ required?: readonly string[];
112
+ additionalProperties?: boolean;
113
+ };
114
+ };
115
+ required: ["input"];
116
+ };
117
+ }
118
+ /**
119
+ * Discovery extension for body methods (POST, PUT, PATCH)
120
+ */
121
+ interface BodyDiscoveryExtension {
122
+ info: BodyDiscoveryInfo;
123
+ schema: {
124
+ $schema: "https://json-schema.org/draft/2020-12/schema";
125
+ type: "object";
126
+ properties: {
127
+ input: {
128
+ type: "object";
129
+ properties: {
130
+ type: {
131
+ type: "string";
132
+ const: "http";
133
+ };
134
+ method: {
135
+ type: "string";
136
+ enum: BodyMethods[];
137
+ };
138
+ bodyType: {
139
+ type: "string";
140
+ enum: ["json", "form-data", "text"];
141
+ };
142
+ body: Record<string, unknown>;
143
+ queryParams?: {
144
+ type: "object";
145
+ properties?: Record<string, unknown>;
146
+ required?: string[];
147
+ additionalProperties?: boolean;
148
+ };
149
+ headers?: {
150
+ type: "object";
151
+ additionalProperties: {
152
+ type: "string";
153
+ };
154
+ };
155
+ };
156
+ required: ("type" | "method" | "bodyType" | "body")[];
157
+ additionalProperties?: boolean;
158
+ };
159
+ output?: {
160
+ type: "object";
161
+ properties?: Record<string, unknown>;
162
+ required?: readonly string[];
163
+ additionalProperties?: boolean;
164
+ };
165
+ };
166
+ required: ["input"];
167
+ };
168
+ }
169
+ /**
170
+ * Combined discovery extension type
171
+ */
172
+ type DiscoveryExtension = QueryDiscoveryExtension | BodyDiscoveryExtension;
173
+ interface DeclareQueryDiscoveryExtensionConfig {
174
+ method?: QueryParamMethods;
175
+ input?: Record<string, unknown>;
176
+ inputSchema?: Record<string, unknown>;
177
+ output?: {
178
+ example?: unknown;
179
+ schema?: Record<string, unknown>;
180
+ };
181
+ }
182
+ interface DeclareBodyDiscoveryExtensionConfig {
183
+ method?: BodyMethods;
184
+ input?: Record<string, unknown>;
185
+ inputSchema?: Record<string, unknown>;
186
+ bodyType: "json" | "form-data" | "text";
187
+ output?: {
188
+ example?: unknown;
189
+ schema?: Record<string, unknown>;
190
+ };
191
+ }
192
+ type DeclareDiscoveryExtensionConfig = DeclareQueryDiscoveryExtensionConfig | DeclareBodyDiscoveryExtensionConfig;
193
+ /**
194
+ * Distributive Omit - properly distributes Omit over union types.
195
+ *
196
+ * Standard `Omit<A | B, K>` collapses to common properties only,
197
+ * losing discriminant properties like `bodyType`.
198
+ *
199
+ * This type uses conditional type distribution to preserve the union:
200
+ * `DistributiveOmit<A | B, K>` = `Omit<A, K> | Omit<B, K>`
201
+ */
202
+ type DistributiveOmit<T, K extends keyof T> = T extends T ? Omit<T, K> : never;
203
+ /**
204
+ * Config type for declareDiscoveryExtension function.
205
+ * Uses DistributiveOmit to preserve bodyType discriminant in the union.
206
+ */
207
+ type DeclareDiscoveryExtensionInput = DistributiveOmit<DeclareDiscoveryExtensionConfig, "method">;
208
+
209
+ /**
210
+ * Resource Service functions for creating Bazaar discovery extensions
211
+ *
212
+ * These functions help servers declare the shape of their endpoints
213
+ * for facilitator discovery and cataloging in the Bazaar.
214
+ */
215
+
216
+ /**
217
+ * Create a discovery extension for any HTTP method
218
+ *
219
+ * This function helps servers declare how their endpoint should be called,
220
+ * including the expected input parameters/body and output format.
221
+ *
222
+ * @param config - Configuration object for the discovery extension
223
+ * @returns A discovery extension object with both info and schema
224
+ *
225
+ * @example
226
+ * ```typescript
227
+ * // For a GET endpoint with no input
228
+ * const getExtension = declareDiscoveryExtension({
229
+ * method: "GET",
230
+ * output: {
231
+ * example: { message: "Success", timestamp: "2024-01-01T00:00:00Z" }
232
+ * }
233
+ * });
234
+ *
235
+ * // For a GET endpoint with query params
236
+ * const getWithParams = declareDiscoveryExtension({
237
+ * method: "GET",
238
+ * input: { query: "example" },
239
+ * inputSchema: {
240
+ * properties: {
241
+ * query: { type: "string" }
242
+ * },
243
+ * required: ["query"]
244
+ * }
245
+ * });
246
+ *
247
+ * // For a POST endpoint with JSON body
248
+ * const postExtension = declareDiscoveryExtension({
249
+ * method: "POST",
250
+ * input: { name: "John", age: 30 },
251
+ * inputSchema: {
252
+ * properties: {
253
+ * name: { type: "string" },
254
+ * age: { type: "number" }
255
+ * },
256
+ * required: ["name"]
257
+ * },
258
+ * bodyType: "json",
259
+ * output: {
260
+ * example: { success: true, id: "123" }
261
+ * }
262
+ * });
263
+ * ```
264
+ */
265
+ declare function declareDiscoveryExtension(config: DeclareDiscoveryExtensionInput): Record<string, DiscoveryExtension>;
266
+
267
+ declare const bazaarResourceServerExtension: ResourceServerExtension;
268
+
269
+ /**
270
+ * Facilitator functions for validating and extracting Bazaar discovery extensions
271
+ *
272
+ * These functions help facilitators validate extension data against schemas
273
+ * and extract the discovery information for cataloging in the Bazaar.
274
+ *
275
+ * Supports both v2 (extensions in PaymentRequired) and v1 (outputSchema in PaymentRequirements).
276
+ */
277
+
278
+ /**
279
+ * Validation result for discovery extensions
280
+ */
281
+ interface ValidationResult {
282
+ valid: boolean;
283
+ errors?: string[];
284
+ }
285
+ /**
286
+ * Validates a discovery extension's info against its schema
287
+ *
288
+ * @param extension - The discovery extension containing info and schema
289
+ * @returns Validation result indicating if the info matches the schema
290
+ *
291
+ * @example
292
+ * ```typescript
293
+ * const extension = declareDiscoveryExtension(...);
294
+ * const result = validateDiscoveryExtension(extension);
295
+ *
296
+ * if (result.valid) {
297
+ * console.log("Extension is valid");
298
+ * } else {
299
+ * console.error("Validation errors:", result.errors);
300
+ * }
301
+ * ```
302
+ */
303
+ 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
+ }
342
+ /**
343
+ * Extracts discovery information from payment payload and requirements.
344
+ * Combines resource URL, HTTP method, version, and discovery info into a single object.
345
+ *
346
+ * @param paymentPayload - The payment payload containing extensions and resource info
347
+ * @param paymentRequirements - The payment requirements to validate against
348
+ * @param validate - Whether to validate the discovery info against the schema (default: true)
349
+ * @returns Discovered resource info with URL, method, version and discovery data, or null if not found
350
+ */
351
+ declare function extractDiscoveryInfo(paymentPayload: PaymentPayload, paymentRequirements: PaymentRequirements | PaymentRequirementsV1, validate?: boolean): DiscoveredResource | null;
352
+ /**
353
+ * Extracts discovery info from a v2 extension directly
354
+ *
355
+ * This is a lower-level function for when you already have the extension object.
356
+ * For general use, prefer the main extractDiscoveryInfo function.
357
+ *
358
+ * @param extension - The discovery extension to extract info from
359
+ * @param validate - Whether to validate before extracting (default: true)
360
+ * @returns The discovery info if valid
361
+ * @throws Error if validation fails and validate is true
362
+ */
363
+ declare function extractDiscoveryInfoFromExtension(extension: DiscoveryExtension, validate?: boolean): DiscoveryInfo;
364
+ /**
365
+ * Validates and extracts discovery info in one step
366
+ *
367
+ * This is a convenience function that combines validation and extraction,
368
+ * returning both the validation result and the info if valid.
369
+ *
370
+ * @param extension - The discovery extension to validate and extract
371
+ * @returns Object containing validation result and info (if valid)
372
+ *
373
+ * @example
374
+ * ```typescript
375
+ * const extension = declareDiscoveryExtension(...);
376
+ * const { valid, info, errors } = validateAndExtract(extension);
377
+ *
378
+ * if (valid && info) {
379
+ * // Store info in Bazaar catalog
380
+ * } else {
381
+ * console.error("Validation errors:", errors);
382
+ * }
383
+ * ```
384
+ */
385
+ declare function validateAndExtract(extension: DiscoveryExtension): {
386
+ valid: boolean;
387
+ info?: DiscoveryInfo;
388
+ errors?: string[];
389
+ };
390
+
391
+ /**
392
+ * V1 Facilitator functions for extracting Bazaar discovery information
393
+ *
394
+ * In v1, discovery information is stored in the `outputSchema` field
395
+ * of PaymentRequirements, which has a different structure than v2.
396
+ *
397
+ * This module transforms v1 data into v2 DiscoveryInfo format.
398
+ */
399
+
400
+ /**
401
+ * Extracts discovery info from v1 PaymentRequirements and transforms to v2 format
402
+ *
403
+ * In v1, the discovery information is stored in the `outputSchema` field,
404
+ * which contains both input (endpoint shape) and output (response schema) information.
405
+ *
406
+ * This function makes smart assumptions to normalize v1 data into v2 DiscoveryInfo format:
407
+ * - For GET/HEAD/DELETE: Looks for queryParams, query, or params fields
408
+ * - For POST/PUT/PATCH: Looks for bodyFields, body, or data fields and normalizes bodyType
409
+ * - Extracts optional headers if present
410
+ *
411
+ * @param paymentRequirements - V1 payment requirements
412
+ * @returns Discovery info in v2 format if present and valid, or null if not discoverable
413
+ *
414
+ * @example
415
+ * ```typescript
416
+ * const requirements: PaymentRequirementsV1 = {
417
+ * scheme: "exact",
418
+ * network: "eip155:8453",
419
+ * maxAmountRequired: "100000",
420
+ * resource: "https://api.example.com/data",
421
+ * description: "Get data",
422
+ * mimeType: "application/json",
423
+ * outputSchema: {
424
+ * input: {
425
+ * type: "http",
426
+ * method: "GET",
427
+ * discoverable: true,
428
+ * queryParams: { query: "string" }
429
+ * },
430
+ * output: { type: "object" }
431
+ * },
432
+ * payTo: "0x...",
433
+ * maxTimeoutSeconds: 300,
434
+ * asset: "0x...",
435
+ * extra: {}
436
+ * };
437
+ *
438
+ * const info = extractDiscoveryInfoV1(requirements);
439
+ * if (info) {
440
+ * console.log("Endpoint method:", info.input.method);
441
+ * }
442
+ * ```
443
+ */
444
+ declare function extractDiscoveryInfoV1(paymentRequirements: PaymentRequirementsV1): DiscoveryInfo | null;
445
+ /**
446
+ * Checks if v1 PaymentRequirements contains discoverable information
447
+ *
448
+ * @param paymentRequirements - V1 payment requirements
449
+ * @returns True if the requirements contain valid discovery info
450
+ *
451
+ * @example
452
+ * ```typescript
453
+ * if (isDiscoverableV1(requirements)) {
454
+ * const info = extractDiscoveryInfoV1(requirements);
455
+ * // Catalog info in Bazaar
456
+ * }
457
+ * ```
458
+ */
459
+ declare function isDiscoverableV1(paymentRequirements: PaymentRequirementsV1): boolean;
460
+ /**
461
+ * Extracts resource metadata from v1 PaymentRequirements
462
+ *
463
+ * In v1, resource information is embedded directly in the payment requirements
464
+ * rather than in a separate resource object.
465
+ *
466
+ * @param paymentRequirements - V1 payment requirements
467
+ * @returns Resource metadata
468
+ *
469
+ * @example
470
+ * ```typescript
471
+ * const metadata = extractResourceMetadataV1(requirements);
472
+ * console.log("Resource URL:", metadata.url);
473
+ * console.log("Description:", metadata.description);
474
+ * ```
475
+ */
476
+ declare function extractResourceMetadataV1(paymentRequirements: PaymentRequirementsV1): {
477
+ url: string;
478
+ description: string;
479
+ mimeType: string;
480
+ };
481
+
482
+ /**
483
+ * Client extensions for querying Bazaar discovery resources
484
+ */
485
+
486
+ /**
487
+ * Parameters for listing discovery resources.
488
+ * All parameters are optional and used for filtering/pagination.
489
+ */
490
+ interface ListDiscoveryResourcesParams {
491
+ /**
492
+ * Filter by protocol type (e.g., "http", "mcp").
493
+ * Currently, the only supported protocol type is "http".
494
+ */
495
+ type?: string;
496
+ /**
497
+ * The number of discovered x402 resources to return per page.
498
+ */
499
+ limit?: number;
500
+ /**
501
+ * The offset of the first discovered x402 resource to return.
502
+ */
503
+ offset?: number;
504
+ }
505
+ /**
506
+ * A discovered x402 resource from the bazaar.
507
+ */
508
+ interface DiscoveryResource {
509
+ /** The URL or identifier of the discovered resource */
510
+ resource: string;
511
+ /** The protocol type of the resource (e.g., "http") */
512
+ type: string;
513
+ /** The x402 protocol version supported by this resource */
514
+ x402Version: number;
515
+ /** Array of accepted payment methods for this resource */
516
+ accepts: PaymentRequirements[];
517
+ /** ISO 8601 timestamp of when the resource was last updated */
518
+ lastUpdated: string;
519
+ /** Additional metadata about the resource */
520
+ metadata?: Record<string, unknown>;
521
+ }
522
+ /**
523
+ * Response from listing discovery resources.
524
+ */
525
+ interface DiscoveryResourcesResponse {
526
+ /** The x402 protocol version of this response */
527
+ x402Version: number;
528
+ /** The list of discovered resources */
529
+ items: DiscoveryResource[];
530
+ /** Pagination information for the response */
531
+ pagination: {
532
+ /** Maximum number of results returned */
533
+ limit: number;
534
+ /** Number of results skipped */
535
+ offset: number;
536
+ /** Total count of resources matching the query */
537
+ total: number;
538
+ };
539
+ }
540
+ /**
541
+ * Bazaar client extension interface providing discovery query functionality.
542
+ */
543
+ interface BazaarClientExtension {
544
+ discovery: {
545
+ /**
546
+ * List x402 discovery resources from the bazaar.
547
+ *
548
+ * @param params - Optional filtering and pagination parameters
549
+ * @returns A promise resolving to the discovery resources response
550
+ */
551
+ listResources(params?: ListDiscoveryResourcesParams): Promise<DiscoveryResourcesResponse>;
552
+ };
553
+ }
554
+ /**
555
+ * Extends a facilitator client with Bazaar discovery query functionality.
556
+ * Preserves and merges with any existing extensions from prior chaining.
557
+ *
558
+ * @param client - The facilitator client to extend
559
+ * @returns The client extended with bazaar discovery capabilities
560
+ *
561
+ * @example
562
+ * ```ts
563
+ * // Basic usage
564
+ * const client = withBazaar(new HTTPFacilitatorClient());
565
+ * const resources = await client.extensions.discovery.listResources({ type: "http" });
566
+ *
567
+ * // Chaining with other extensions
568
+ * const client = withBazaar(withOtherExtension(new HTTPFacilitatorClient()));
569
+ * await client.extensions.other.someMethod();
570
+ * await client.extensions.discovery.listResources();
571
+ * ```
572
+ */
573
+ declare function withBazaar<T extends HTTPFacilitatorClient>(client: T): WithExtensions<T, BazaarClientExtension>;
574
+
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 };
@@ -1,3 +1,6 @@
1
- export { BAZAAR, BazaarClientExtension, BodyDiscoveryExtension, BodyDiscoveryInfo, DiscoveryExtension, DiscoveryInfo, DiscoveryResource, DiscoveryResourcesResponse, ListDiscoveryResourcesParams, QueryDiscoveryExtension, QueryDiscoveryInfo, ValidationResult, W as WithExtensions, bazaarResourceServerExtension, declareDiscoveryExtension, extractDiscoveryInfo, extractDiscoveryInfoFromExtension, extractDiscoveryInfoV1, extractResourceMetadataV1, isDiscoverableV1, validateAndExtract, validateDiscoveryExtension, withBazaar } from './bazaar/index.js';
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';
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, parseSIWxHeader, signEVMMessage, signSolanaMessage, siwxResourceServerExtension, validateSIWxMessage, verifyEVMSignature, verifySIWxSignature, verifySolanaSignature, wrapFetchWithSIWx } from './sign-in-with-x/index.js';
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';
2
4
  import '@x402/core/http';
3
5
  import '@x402/core/types';
6
+ import 'zod';