@okxweb3/app-x402-core 0.1.2

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 (66) hide show
  1. package/README.md +267 -0
  2. package/dist/cjs/OKXFacilitatorClient-BvyQB1QM.d.ts +59 -0
  3. package/dist/cjs/client/index.d.ts +320 -0
  4. package/dist/cjs/client/index.js +564 -0
  5. package/dist/cjs/client/index.js.map +1 -0
  6. package/dist/cjs/facilitator/index.d.ts +198 -0
  7. package/dist/cjs/facilitator/index.js +533 -0
  8. package/dist/cjs/facilitator/index.js.map +1 -0
  9. package/dist/cjs/http/index.d.ts +51 -0
  10. package/dist/cjs/http/index.js +1226 -0
  11. package/dist/cjs/http/index.js.map +1 -0
  12. package/dist/cjs/index.d.ts +6 -0
  13. package/dist/cjs/index.js +155 -0
  14. package/dist/cjs/index.js.map +1 -0
  15. package/dist/cjs/mechanisms-sojpSwWW.d.ts +763 -0
  16. package/dist/cjs/schemas/index.d.ts +309 -0
  17. package/dist/cjs/schemas/index.js +127 -0
  18. package/dist/cjs/schemas/index.js.map +1 -0
  19. package/dist/cjs/server/index.d.ts +2 -0
  20. package/dist/cjs/server/index.js +1880 -0
  21. package/dist/cjs/server/index.js.map +1 -0
  22. package/dist/cjs/types/index.d.ts +1 -0
  23. package/dist/cjs/types/index.js +97 -0
  24. package/dist/cjs/types/index.js.map +1 -0
  25. package/dist/cjs/utils/index.d.ts +48 -0
  26. package/dist/cjs/utils/index.js +116 -0
  27. package/dist/cjs/utils/index.js.map +1 -0
  28. package/dist/cjs/x402HTTPResourceServer-CcsAkcgI.d.ts +466 -0
  29. package/dist/esm/OKXFacilitatorClient-D5E3LX50.d.mts +59 -0
  30. package/dist/esm/chunk-CAXWAW23.mjs +68 -0
  31. package/dist/esm/chunk-CAXWAW23.mjs.map +1 -0
  32. package/dist/esm/chunk-CS33MEMU.mjs +86 -0
  33. package/dist/esm/chunk-CS33MEMU.mjs.map +1 -0
  34. package/dist/esm/chunk-O3IYMTNT.mjs +118 -0
  35. package/dist/esm/chunk-O3IYMTNT.mjs.map +1 -0
  36. package/dist/esm/chunk-TDLQZ6MP.mjs +86 -0
  37. package/dist/esm/chunk-TDLQZ6MP.mjs.map +1 -0
  38. package/dist/esm/chunk-XBQG2CDV.mjs +1792 -0
  39. package/dist/esm/chunk-XBQG2CDV.mjs.map +1 -0
  40. package/dist/esm/client/index.d.mts +320 -0
  41. package/dist/esm/client/index.mjs +318 -0
  42. package/dist/esm/client/index.mjs.map +1 -0
  43. package/dist/esm/facilitator/index.d.mts +198 -0
  44. package/dist/esm/facilitator/index.mjs +387 -0
  45. package/dist/esm/facilitator/index.mjs.map +1 -0
  46. package/dist/esm/http/index.d.mts +51 -0
  47. package/dist/esm/http/index.mjs +34 -0
  48. package/dist/esm/http/index.mjs.map +1 -0
  49. package/dist/esm/index.d.mts +6 -0
  50. package/dist/esm/index.mjs +9 -0
  51. package/dist/esm/index.mjs.map +1 -0
  52. package/dist/esm/mechanisms-sojpSwWW.d.mts +763 -0
  53. package/dist/esm/schemas/index.d.mts +309 -0
  54. package/dist/esm/schemas/index.mjs +41 -0
  55. package/dist/esm/schemas/index.mjs.map +1 -0
  56. package/dist/esm/server/index.d.mts +2 -0
  57. package/dist/esm/server/index.mjs +28 -0
  58. package/dist/esm/server/index.mjs.map +1 -0
  59. package/dist/esm/types/index.d.mts +1 -0
  60. package/dist/esm/types/index.mjs +13 -0
  61. package/dist/esm/types/index.mjs.map +1 -0
  62. package/dist/esm/utils/index.d.mts +48 -0
  63. package/dist/esm/utils/index.mjs +19 -0
  64. package/dist/esm/utils/index.mjs.map +1 -0
  65. package/dist/esm/x402HTTPResourceServer-DBeutKxq.d.mts +466 -0
  66. package/package.json +121 -0
@@ -0,0 +1,309 @@
1
+ import { z } from 'zod';
2
+ export { z } from 'zod';
3
+
4
+ /**
5
+ * Non-empty string schema - a string with at least one character.
6
+ * Used for required string fields that cannot be empty.
7
+ */
8
+ declare const NonEmptyString: z.ZodString;
9
+ type NonEmptyString = z.infer<typeof NonEmptyString>;
10
+ /**
11
+ * Any record schema - an object with unknown keys and values.
12
+ * Used for scheme-specific payloads and other extensible objects.
13
+ */
14
+ declare const Any: z.ZodRecord<z.ZodString, z.ZodUnknown>;
15
+ type Any = z.infer<typeof Any>;
16
+ /**
17
+ * Optional any record schema - an optional object with unknown keys and values.
18
+ * Used for optional extension fields like `extra` and `extensions`.
19
+ */
20
+ declare const OptionalAny: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
21
+ type OptionalAny = z.infer<typeof OptionalAny>;
22
+ /**
23
+ * Network identifier schema - CAIP-2 format validation.
24
+ * Requires minimum length of 3 and a colon separator (e.g., "eip155:196", "eip155:196").
25
+ */
26
+ declare const NetworkSchema: z.ZodEffects<z.ZodString, string, string>;
27
+ type Network = z.infer<typeof NetworkSchema>;
28
+ /**
29
+ * ResourceInfo schema for V2 - describes the protected resource.
30
+ */
31
+ declare const ResourceInfoSchema: z.ZodObject<{
32
+ url: z.ZodString;
33
+ description: z.ZodOptional<z.ZodString>;
34
+ mimeType: z.ZodOptional<z.ZodString>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ url: string;
37
+ description?: string | undefined;
38
+ mimeType?: string | undefined;
39
+ }, {
40
+ url: string;
41
+ description?: string | undefined;
42
+ mimeType?: string | undefined;
43
+ }>;
44
+ type ResourceInfo = z.infer<typeof ResourceInfoSchema>;
45
+ /**
46
+ * PaymentRequirements schema.
47
+ */
48
+ declare const PaymentRequirementsSchema: z.ZodObject<{
49
+ scheme: z.ZodString;
50
+ network: z.ZodEffects<z.ZodString, string, string>;
51
+ amount: z.ZodString;
52
+ asset: z.ZodString;
53
+ payTo: z.ZodString;
54
+ maxTimeoutSeconds: z.ZodNumber;
55
+ extra: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ amount: string;
58
+ scheme: string;
59
+ network: string;
60
+ asset: string;
61
+ payTo: string;
62
+ maxTimeoutSeconds: number;
63
+ extra?: Record<string, unknown> | null | undefined;
64
+ }, {
65
+ amount: string;
66
+ scheme: string;
67
+ network: string;
68
+ asset: string;
69
+ payTo: string;
70
+ maxTimeoutSeconds: number;
71
+ extra?: Record<string, unknown> | null | undefined;
72
+ }>;
73
+ type PaymentRequirements = z.infer<typeof PaymentRequirementsSchema>;
74
+ /**
75
+ * PaymentRequired (402 response) schema.
76
+ * Contains payment requirements when a resource requires payment.
77
+ */
78
+ declare const PaymentRequiredSchema: z.ZodObject<{
79
+ x402Version: z.ZodLiteral<2>;
80
+ error: z.ZodOptional<z.ZodString>;
81
+ resource: z.ZodObject<{
82
+ url: z.ZodString;
83
+ description: z.ZodOptional<z.ZodString>;
84
+ mimeType: z.ZodOptional<z.ZodString>;
85
+ }, "strip", z.ZodTypeAny, {
86
+ url: string;
87
+ description?: string | undefined;
88
+ mimeType?: string | undefined;
89
+ }, {
90
+ url: string;
91
+ description?: string | undefined;
92
+ mimeType?: string | undefined;
93
+ }>;
94
+ accepts: z.ZodArray<z.ZodObject<{
95
+ scheme: z.ZodString;
96
+ network: z.ZodEffects<z.ZodString, string, string>;
97
+ amount: z.ZodString;
98
+ asset: z.ZodString;
99
+ payTo: z.ZodString;
100
+ maxTimeoutSeconds: z.ZodNumber;
101
+ extra: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
102
+ }, "strip", z.ZodTypeAny, {
103
+ amount: string;
104
+ scheme: string;
105
+ network: string;
106
+ asset: string;
107
+ payTo: string;
108
+ maxTimeoutSeconds: number;
109
+ extra?: Record<string, unknown> | null | undefined;
110
+ }, {
111
+ amount: string;
112
+ scheme: string;
113
+ network: string;
114
+ asset: string;
115
+ payTo: string;
116
+ maxTimeoutSeconds: number;
117
+ extra?: Record<string, unknown> | null | undefined;
118
+ }>, "many">;
119
+ extensions: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
120
+ }, "strip", z.ZodTypeAny, {
121
+ x402Version: 2;
122
+ resource: {
123
+ url: string;
124
+ description?: string | undefined;
125
+ mimeType?: string | undefined;
126
+ };
127
+ accepts: {
128
+ amount: string;
129
+ scheme: string;
130
+ network: string;
131
+ asset: string;
132
+ payTo: string;
133
+ maxTimeoutSeconds: number;
134
+ extra?: Record<string, unknown> | null | undefined;
135
+ }[];
136
+ extensions?: Record<string, unknown> | null | undefined;
137
+ error?: string | undefined;
138
+ }, {
139
+ x402Version: 2;
140
+ resource: {
141
+ url: string;
142
+ description?: string | undefined;
143
+ mimeType?: string | undefined;
144
+ };
145
+ accepts: {
146
+ amount: string;
147
+ scheme: string;
148
+ network: string;
149
+ asset: string;
150
+ payTo: string;
151
+ maxTimeoutSeconds: number;
152
+ extra?: Record<string, unknown> | null | undefined;
153
+ }[];
154
+ extensions?: Record<string, unknown> | null | undefined;
155
+ error?: string | undefined;
156
+ }>;
157
+ type PaymentRequired = z.infer<typeof PaymentRequiredSchema>;
158
+ /**
159
+ * PaymentPayload schema.
160
+ * Contains the payment data sent by the client.
161
+ */
162
+ declare const PaymentPayloadSchema: z.ZodObject<{
163
+ x402Version: z.ZodLiteral<2>;
164
+ resource: z.ZodOptional<z.ZodObject<{
165
+ url: z.ZodString;
166
+ description: z.ZodOptional<z.ZodString>;
167
+ mimeType: z.ZodOptional<z.ZodString>;
168
+ }, "strip", z.ZodTypeAny, {
169
+ url: string;
170
+ description?: string | undefined;
171
+ mimeType?: string | undefined;
172
+ }, {
173
+ url: string;
174
+ description?: string | undefined;
175
+ mimeType?: string | undefined;
176
+ }>>;
177
+ accepted: z.ZodObject<{
178
+ scheme: z.ZodString;
179
+ network: z.ZodEffects<z.ZodString, string, string>;
180
+ amount: z.ZodString;
181
+ asset: z.ZodString;
182
+ payTo: z.ZodString;
183
+ maxTimeoutSeconds: z.ZodNumber;
184
+ extra: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
185
+ }, "strip", z.ZodTypeAny, {
186
+ amount: string;
187
+ scheme: string;
188
+ network: string;
189
+ asset: string;
190
+ payTo: string;
191
+ maxTimeoutSeconds: number;
192
+ extra?: Record<string, unknown> | null | undefined;
193
+ }, {
194
+ amount: string;
195
+ scheme: string;
196
+ network: string;
197
+ asset: string;
198
+ payTo: string;
199
+ maxTimeoutSeconds: number;
200
+ extra?: Record<string, unknown> | null | undefined;
201
+ }>;
202
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
203
+ extensions: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
204
+ }, "strip", z.ZodTypeAny, {
205
+ x402Version: 2;
206
+ payload: Record<string, unknown>;
207
+ accepted: {
208
+ amount: string;
209
+ scheme: string;
210
+ network: string;
211
+ asset: string;
212
+ payTo: string;
213
+ maxTimeoutSeconds: number;
214
+ extra?: Record<string, unknown> | null | undefined;
215
+ };
216
+ extensions?: Record<string, unknown> | null | undefined;
217
+ resource?: {
218
+ url: string;
219
+ description?: string | undefined;
220
+ mimeType?: string | undefined;
221
+ } | undefined;
222
+ }, {
223
+ x402Version: 2;
224
+ payload: Record<string, unknown>;
225
+ accepted: {
226
+ amount: string;
227
+ scheme: string;
228
+ network: string;
229
+ asset: string;
230
+ payTo: string;
231
+ maxTimeoutSeconds: number;
232
+ extra?: Record<string, unknown> | null | undefined;
233
+ };
234
+ extensions?: Record<string, unknown> | null | undefined;
235
+ resource?: {
236
+ url: string;
237
+ description?: string | undefined;
238
+ mimeType?: string | undefined;
239
+ } | undefined;
240
+ }>;
241
+ type PaymentPayload = z.infer<typeof PaymentPayloadSchema>;
242
+ /**
243
+ * Validates a PaymentRequired object (V1 or V2).
244
+ *
245
+ * @param value - The value to validate
246
+ * @returns A result object with success status and data or error
247
+ */
248
+ declare function parsePaymentRequired(value: unknown): z.SafeParseReturnType<unknown, PaymentRequired>;
249
+ /**
250
+ * Validates a PaymentRequired object and throws on error.
251
+ *
252
+ * @param value - The value to validate
253
+ * @returns The validated PaymentRequired
254
+ * @throws ZodError if validation fails
255
+ */
256
+ declare function validatePaymentRequired(value: unknown): PaymentRequired;
257
+ /**
258
+ * Type guard for PaymentRequired (V1 or V2).
259
+ *
260
+ * @param value - The value to check
261
+ * @returns True if the value is a valid PaymentRequired
262
+ */
263
+ declare function isPaymentRequired(value: unknown): value is PaymentRequired;
264
+ /**
265
+ * Validates a PaymentRequirements object (V1 or V2).
266
+ *
267
+ * @param value - The value to validate
268
+ * @returns A result object with success status and data or error
269
+ */
270
+ declare function parsePaymentRequirements(value: unknown): z.SafeParseReturnType<unknown, PaymentRequirements>;
271
+ /**
272
+ * Validates a PaymentRequirements object and throws on error.
273
+ *
274
+ * @param value - The value to validate
275
+ * @returns The validated PaymentRequirements
276
+ * @throws ZodError if validation fails
277
+ */
278
+ declare function validatePaymentRequirements(value: unknown): PaymentRequirements;
279
+ /**
280
+ * Type guard for PaymentRequirements (V1 or V2).
281
+ *
282
+ * @param value - The value to check
283
+ * @returns True if the value is a valid PaymentRequirements
284
+ */
285
+ declare function isPaymentRequirements(value: unknown): value is PaymentRequirements;
286
+ /**
287
+ * Validates a PaymentPayload object (V1 or V2).
288
+ *
289
+ * @param value - The value to validate
290
+ * @returns A result object with success status and data or error
291
+ */
292
+ declare function parsePaymentPayload(value: unknown): z.SafeParseReturnType<unknown, PaymentPayload>;
293
+ /**
294
+ * Validates a PaymentPayload object and throws on error.
295
+ *
296
+ * @param value - The value to validate
297
+ * @returns The validated PaymentPayload
298
+ * @throws ZodError if validation fails
299
+ */
300
+ declare function validatePaymentPayload(value: unknown): PaymentPayload;
301
+ /**
302
+ * Type guard for PaymentPayload (V1 or V2).
303
+ *
304
+ * @param value - The value to check
305
+ * @returns True if the value is a valid PaymentPayload
306
+ */
307
+ declare function isPaymentPayload(value: unknown): value is PaymentPayload;
308
+
309
+ export { Any, type Network, NetworkSchema, NonEmptyString, OptionalAny, type PaymentPayload, PaymentPayloadSchema, type PaymentRequired, PaymentRequiredSchema, type PaymentRequirements, PaymentRequirementsSchema, type ResourceInfo, ResourceInfoSchema, isPaymentPayload, isPaymentRequired, isPaymentRequirements, parsePaymentPayload, parsePaymentRequired, parsePaymentRequirements, validatePaymentPayload, validatePaymentRequired, validatePaymentRequirements };
@@ -0,0 +1,41 @@
1
+ import {
2
+ Any,
3
+ NetworkSchema,
4
+ NonEmptyString,
5
+ OptionalAny,
6
+ PaymentPayloadSchema,
7
+ PaymentRequiredSchema,
8
+ PaymentRequirementsSchema,
9
+ ResourceInfoSchema,
10
+ isPaymentPayload,
11
+ isPaymentRequired,
12
+ isPaymentRequirements,
13
+ parsePaymentPayload,
14
+ parsePaymentRequired,
15
+ parsePaymentRequirements,
16
+ validatePaymentPayload,
17
+ validatePaymentRequired,
18
+ validatePaymentRequirements,
19
+ z
20
+ } from "../chunk-CS33MEMU.mjs";
21
+ export {
22
+ Any,
23
+ NetworkSchema,
24
+ NonEmptyString,
25
+ OptionalAny,
26
+ PaymentPayloadSchema,
27
+ PaymentRequiredSchema,
28
+ PaymentRequirementsSchema,
29
+ ResourceInfoSchema,
30
+ isPaymentPayload,
31
+ isPaymentRequired,
32
+ isPaymentRequirements,
33
+ parsePaymentPayload,
34
+ parsePaymentRequired,
35
+ parsePaymentRequirements,
36
+ validatePaymentPayload,
37
+ validatePaymentRequired,
38
+ validatePaymentRequirements,
39
+ z
40
+ };
41
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,2 @@
1
+ export { D as DEFAULT_POLL_DEADLINE_MS, k as DEFAULT_POLL_INTERVAL_MS, d as FacilitatorClient, e as FacilitatorConfig, f as FacilitatorResponseError, H as HTTPFacilitatorClient, l as PollResult, R as ResourceConfig, m as SettleResultContext, n as SettlementOverrides, g as getFacilitatorResponseError, x as x402ResourceServer } from '../mechanisms-sojpSwWW.mjs';
2
+ export { C as CompiledRoute, H as HTTPAdapter, b as HTTPProcessResult, c as HTTPRequestContext, d as HTTPResponseBody, e as HTTPResponseInstructions, f as HTTPTransportContext, g as PaywallConfig, h as PaywallProvider, i as ProcessSettleFailureResponse, j as ProcessSettleResultResponse, k as ProcessSettleSuccessResponse, R as RouteConfig, m as RouteConfigurationError, n as RouteValidationError, o as RoutesConfig, p as SETTLEMENT_OVERRIDES_HEADER, S as SettlementFailedResponseBody, U as UnpaidResponseBody, x as x402HTTPResourceServer } from '../x402HTTPResourceServer-DBeutKxq.mjs';
@@ -0,0 +1,28 @@
1
+ import {
2
+ DEFAULT_POLL_DEADLINE_MS,
3
+ DEFAULT_POLL_INTERVAL_MS,
4
+ HTTPFacilitatorClient,
5
+ RouteConfigurationError,
6
+ SETTLEMENT_OVERRIDES_HEADER,
7
+ x402HTTPResourceServer,
8
+ x402ResourceServer
9
+ } from "../chunk-XBQG2CDV.mjs";
10
+ import "../chunk-O3IYMTNT.mjs";
11
+ import {
12
+ FacilitatorResponseError,
13
+ getFacilitatorResponseError
14
+ } from "../chunk-CAXWAW23.mjs";
15
+ import "../chunk-TDLQZ6MP.mjs";
16
+ import "../chunk-CS33MEMU.mjs";
17
+ export {
18
+ DEFAULT_POLL_DEADLINE_MS,
19
+ DEFAULT_POLL_INTERVAL_MS,
20
+ FacilitatorResponseError,
21
+ HTTPFacilitatorClient,
22
+ RouteConfigurationError,
23
+ SETTLEMENT_OVERRIDES_HEADER,
24
+ getFacilitatorResponseError,
25
+ x402HTTPResourceServer,
26
+ x402ResourceServer
27
+ };
28
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1 @@
1
+ export { A as AssetAmount, p as FacilitatorContext, F as FacilitatorExtension, f as FacilitatorResponseError, M as Money, q as MoneyParser, N as Network, P as PaymentPayload, r as PaymentPayloadContext, s as PaymentPayloadResult, c as PaymentRequired, t as PaymentRequiredContext, a as PaymentRequirements, o as Price, u as ResourceInfo, v as ResourceServerExtension, j as SchemeNetworkClient, b as SchemeNetworkFacilitator, w as SchemeNetworkServer, y as SettleError, z as SettleRequest, S as SettleResponse, m as SettleResultContext, i as SettleStatusResponse, h as SupportedResponse, B as VerifyError, C as VerifyRequest, V as VerifyResponse, g as getFacilitatorResponseError } from '../mechanisms-sojpSwWW.mjs';
@@ -0,0 +1,13 @@
1
+ import {
2
+ FacilitatorResponseError,
3
+ SettleError,
4
+ VerifyError,
5
+ getFacilitatorResponseError
6
+ } from "../chunk-CAXWAW23.mjs";
7
+ export {
8
+ FacilitatorResponseError,
9
+ SettleError,
10
+ VerifyError,
11
+ getFacilitatorResponseError
12
+ };
13
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,48 @@
1
+ import { N as Network } from '../mechanisms-sojpSwWW.mjs';
2
+
3
+ /**
4
+ * Scheme data structure for facilitator storage
5
+ */
6
+ interface SchemeData<T> {
7
+ facilitator: T;
8
+ networks: Set<Network>;
9
+ pattern: Network;
10
+ }
11
+ declare const findSchemesByNetwork: <T>(map: Map<string, Map<string, T>>, network: Network) => Map<string, T> | undefined;
12
+ declare const findByNetworkAndScheme: <T>(map: Map<string, Map<string, T>>, scheme: string, network: Network) => T | undefined;
13
+ /**
14
+ * Finds a facilitator by scheme and network using pattern matching.
15
+ * Works with new SchemeData storage structure.
16
+ *
17
+ * @param schemeMap - Map of scheme names to SchemeData
18
+ * @param scheme - The scheme to find
19
+ * @param network - The network to match against
20
+ * @returns The facilitator if found, undefined otherwise
21
+ */
22
+ declare const findFacilitatorBySchemeAndNetwork: <T>(schemeMap: Map<string, SchemeData<T>>, scheme: string, network: Network) => T | undefined;
23
+ declare const Base64EncodedRegex: RegExp;
24
+ /**
25
+ * Encodes a string to base64 format
26
+ *
27
+ * @param data - The string to be encoded to base64
28
+ * @returns The base64 encoded string
29
+ */
30
+ declare function safeBase64Encode(data: string): string;
31
+ /**
32
+ * Decodes a base64 string back to its original format
33
+ *
34
+ * @param data - The base64 encoded string to be decoded
35
+ * @returns The decoded string in UTF-8 format
36
+ */
37
+ declare function safeBase64Decode(data: string): string;
38
+ /**
39
+ * Deep equality comparison for payment requirements
40
+ * Uses a normalized JSON.stringify for consistent comparison
41
+ *
42
+ * @param obj1 - First object to compare
43
+ * @param obj2 - Second object to compare
44
+ * @returns True if objects are deeply equal
45
+ */
46
+ declare function deepEqual(obj1: unknown, obj2: unknown): boolean;
47
+
48
+ export { Base64EncodedRegex, type SchemeData, deepEqual, findByNetworkAndScheme, findFacilitatorBySchemeAndNetwork, findSchemesByNetwork, safeBase64Decode, safeBase64Encode };
@@ -0,0 +1,19 @@
1
+ import {
2
+ Base64EncodedRegex,
3
+ deepEqual,
4
+ findByNetworkAndScheme,
5
+ findFacilitatorBySchemeAndNetwork,
6
+ findSchemesByNetwork,
7
+ safeBase64Decode,
8
+ safeBase64Encode
9
+ } from "../chunk-TDLQZ6MP.mjs";
10
+ export {
11
+ Base64EncodedRegex,
12
+ deepEqual,
13
+ findByNetworkAndScheme,
14
+ findFacilitatorBySchemeAndNetwork,
15
+ findSchemesByNetwork,
16
+ safeBase64Decode,
17
+ safeBase64Encode
18
+ };
19
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}