@bananalink-sdk/protocol 1.2.7

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 (158) hide show
  1. package/README.md +604 -0
  2. package/dist/chunk-32OWUOZ3.js +308 -0
  3. package/dist/chunk-32OWUOZ3.js.map +1 -0
  4. package/dist/chunk-65HNHRJK.cjs +123 -0
  5. package/dist/chunk-65HNHRJK.cjs.map +1 -0
  6. package/dist/chunk-7KYDLL3B.js +480 -0
  7. package/dist/chunk-7KYDLL3B.js.map +1 -0
  8. package/dist/chunk-A6FLEJ7R.cjs +62 -0
  9. package/dist/chunk-A6FLEJ7R.cjs.map +1 -0
  10. package/dist/chunk-CUJK7ZTS.js +217 -0
  11. package/dist/chunk-CUJK7ZTS.js.map +1 -0
  12. package/dist/chunk-GI3BUPIH.cjs +236 -0
  13. package/dist/chunk-GI3BUPIH.cjs.map +1 -0
  14. package/dist/chunk-JXHV66Q4.js +106 -0
  15. package/dist/chunk-JXHV66Q4.js.map +1 -0
  16. package/dist/chunk-KNGZKGRS.cjs +552 -0
  17. package/dist/chunk-KNGZKGRS.cjs.map +1 -0
  18. package/dist/chunk-LELPCIE7.js +840 -0
  19. package/dist/chunk-LELPCIE7.js.map +1 -0
  20. package/dist/chunk-MCZG7QEM.cjs +310 -0
  21. package/dist/chunk-MCZG7QEM.cjs.map +1 -0
  22. package/dist/chunk-TCVKC227.js +56 -0
  23. package/dist/chunk-TCVKC227.js.map +1 -0
  24. package/dist/chunk-VXLUSU5B.cjs +856 -0
  25. package/dist/chunk-VXLUSU5B.cjs.map +1 -0
  26. package/dist/chunk-WCQVDF3K.js +12 -0
  27. package/dist/chunk-WCQVDF3K.js.map +1 -0
  28. package/dist/chunk-WGEGR3DF.cjs +15 -0
  29. package/dist/chunk-WGEGR3DF.cjs.map +1 -0
  30. package/dist/client-session-claim-3QF3noOr.d.ts +197 -0
  31. package/dist/client-session-claim-C4lUik3b.d.cts +197 -0
  32. package/dist/core-DMhuNfoz.d.cts +62 -0
  33. package/dist/core-DMhuNfoz.d.ts +62 -0
  34. package/dist/crypto/providers/noble-provider.cjs +14 -0
  35. package/dist/crypto/providers/noble-provider.cjs.map +1 -0
  36. package/dist/crypto/providers/noble-provider.d.cts +30 -0
  37. package/dist/crypto/providers/noble-provider.d.ts +30 -0
  38. package/dist/crypto/providers/noble-provider.js +5 -0
  39. package/dist/crypto/providers/noble-provider.js.map +1 -0
  40. package/dist/crypto/providers/node-provider.cjs +308 -0
  41. package/dist/crypto/providers/node-provider.cjs.map +1 -0
  42. package/dist/crypto/providers/node-provider.d.cts +32 -0
  43. package/dist/crypto/providers/node-provider.d.ts +32 -0
  44. package/dist/crypto/providers/node-provider.js +306 -0
  45. package/dist/crypto/providers/node-provider.js.map +1 -0
  46. package/dist/crypto/providers/quickcrypto-provider.cjs +339 -0
  47. package/dist/crypto/providers/quickcrypto-provider.cjs.map +1 -0
  48. package/dist/crypto/providers/quickcrypto-provider.d.cts +34 -0
  49. package/dist/crypto/providers/quickcrypto-provider.d.ts +34 -0
  50. package/dist/crypto/providers/quickcrypto-provider.js +337 -0
  51. package/dist/crypto/providers/quickcrypto-provider.js.map +1 -0
  52. package/dist/crypto/providers/webcrypto-provider.cjs +310 -0
  53. package/dist/crypto/providers/webcrypto-provider.cjs.map +1 -0
  54. package/dist/crypto/providers/webcrypto-provider.d.cts +30 -0
  55. package/dist/crypto/providers/webcrypto-provider.d.ts +30 -0
  56. package/dist/crypto/providers/webcrypto-provider.js +308 -0
  57. package/dist/crypto/providers/webcrypto-provider.js.map +1 -0
  58. package/dist/crypto-BUS06Qz-.d.cts +40 -0
  59. package/dist/crypto-BUS06Qz-.d.ts +40 -0
  60. package/dist/crypto-export.cjs +790 -0
  61. package/dist/crypto-export.cjs.map +1 -0
  62. package/dist/crypto-export.d.cts +257 -0
  63. package/dist/crypto-export.d.ts +257 -0
  64. package/dist/crypto-export.js +709 -0
  65. package/dist/crypto-export.js.map +1 -0
  66. package/dist/crypto-provider-deYoVIxi.d.cts +36 -0
  67. package/dist/crypto-provider-deYoVIxi.d.ts +36 -0
  68. package/dist/index.cjs +615 -0
  69. package/dist/index.cjs.map +1 -0
  70. package/dist/index.d.cts +379 -0
  71. package/dist/index.d.ts +379 -0
  72. package/dist/index.js +504 -0
  73. package/dist/index.js.map +1 -0
  74. package/dist/schemas-export.cjs +294 -0
  75. package/dist/schemas-export.cjs.map +1 -0
  76. package/dist/schemas-export.d.cts +1598 -0
  77. package/dist/schemas-export.d.ts +1598 -0
  78. package/dist/schemas-export.js +5 -0
  79. package/dist/schemas-export.js.map +1 -0
  80. package/dist/siwe-export.cjs +237 -0
  81. package/dist/siwe-export.cjs.map +1 -0
  82. package/dist/siwe-export.d.cts +27 -0
  83. package/dist/siwe-export.d.ts +27 -0
  84. package/dist/siwe-export.js +228 -0
  85. package/dist/siwe-export.js.map +1 -0
  86. package/dist/testing.cjs +54 -0
  87. package/dist/testing.cjs.map +1 -0
  88. package/dist/testing.d.cts +20 -0
  89. package/dist/testing.d.ts +20 -0
  90. package/dist/testing.js +51 -0
  91. package/dist/testing.js.map +1 -0
  92. package/dist/validation-export.cjs +359 -0
  93. package/dist/validation-export.cjs.map +1 -0
  94. package/dist/validation-export.d.cts +3 -0
  95. package/dist/validation-export.d.ts +3 -0
  96. package/dist/validation-export.js +6 -0
  97. package/dist/validation-export.js.map +1 -0
  98. package/dist/validators-export.cjs +73 -0
  99. package/dist/validators-export.cjs.map +1 -0
  100. package/dist/validators-export.d.cts +37 -0
  101. package/dist/validators-export.d.ts +37 -0
  102. package/dist/validators-export.js +4 -0
  103. package/dist/validators-export.js.map +1 -0
  104. package/package.json +140 -0
  105. package/src/constants/index.ts +205 -0
  106. package/src/crypto/context.ts +228 -0
  107. package/src/crypto/diagnostics.ts +772 -0
  108. package/src/crypto/errors.ts +114 -0
  109. package/src/crypto/index.ts +89 -0
  110. package/src/crypto/payload-handler.ts +102 -0
  111. package/src/crypto/providers/compliance-provider.ts +579 -0
  112. package/src/crypto/providers/factory.ts +204 -0
  113. package/src/crypto/providers/index.ts +44 -0
  114. package/src/crypto/providers/noble-provider.ts +392 -0
  115. package/src/crypto/providers/node-provider.ts +433 -0
  116. package/src/crypto/providers/quickcrypto-provider.ts +483 -0
  117. package/src/crypto/providers/registry.ts +129 -0
  118. package/src/crypto/providers/webcrypto-provider.ts +364 -0
  119. package/src/crypto/session-security.ts +185 -0
  120. package/src/crypto/types.ts +93 -0
  121. package/src/crypto/utils.ts +190 -0
  122. package/src/crypto-export.ts +21 -0
  123. package/src/index.ts +38 -0
  124. package/src/schemas/auth.ts +60 -0
  125. package/src/schemas/client-messages.ts +57 -0
  126. package/src/schemas/core.ts +144 -0
  127. package/src/schemas/crypto.ts +65 -0
  128. package/src/schemas/discovery.ts +79 -0
  129. package/src/schemas/index.ts +239 -0
  130. package/src/schemas/relay-messages.ts +45 -0
  131. package/src/schemas/wallet-messages.ts +177 -0
  132. package/src/schemas-export.ts +23 -0
  133. package/src/siwe-export.ts +27 -0
  134. package/src/testing.ts +71 -0
  135. package/src/types/auth.ts +60 -0
  136. package/src/types/client-messages.ts +84 -0
  137. package/src/types/core.ts +131 -0
  138. package/src/types/crypto-provider.ts +264 -0
  139. package/src/types/crypto.ts +90 -0
  140. package/src/types/discovery.ts +50 -0
  141. package/src/types/errors.ts +87 -0
  142. package/src/types/index.ts +197 -0
  143. package/src/types/post-auth-operations.ts +363 -0
  144. package/src/types/providers.ts +72 -0
  145. package/src/types/relay-messages.ts +60 -0
  146. package/src/types/request-lifecycle.ts +161 -0
  147. package/src/types/signing-operations.ts +99 -0
  148. package/src/types/wallet-messages.ts +251 -0
  149. package/src/utils/client-session-claim.ts +188 -0
  150. package/src/utils/index.ts +54 -0
  151. package/src/utils/public-keys.ts +49 -0
  152. package/src/utils/siwe.ts +362 -0
  153. package/src/utils/url-decoding.ts +126 -0
  154. package/src/utils/url-encoding.ts +144 -0
  155. package/src/utils/wallet-session-claim.ts +188 -0
  156. package/src/validation-export.ts +32 -0
  157. package/src/validators/index.ts +222 -0
  158. package/src/validators-export.ts +8 -0
@@ -0,0 +1,1598 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const dAppMetadataSchema$1: z.ZodObject<{
4
+ dappId: z.ZodOptional<z.ZodString>;
5
+ name: z.ZodString;
6
+ description: z.ZodOptional<z.ZodString>;
7
+ url: z.ZodString;
8
+ icons: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ name: string;
11
+ url: string;
12
+ dappId?: string | undefined;
13
+ description?: string | undefined;
14
+ icons?: string[] | undefined;
15
+ }, {
16
+ name: string;
17
+ url: string;
18
+ dappId?: string | undefined;
19
+ description?: string | undefined;
20
+ icons?: string[] | undefined;
21
+ }>;
22
+ declare const sessionConfigSchema: z.ZodObject<{
23
+ returnUrl: z.ZodOptional<z.ZodString>;
24
+ sessionName: z.ZodOptional<z.ZodString>;
25
+ expiresAt: z.ZodOptional<z.ZodString>;
26
+ customData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ returnUrl?: string | undefined;
29
+ sessionName?: string | undefined;
30
+ expiresAt?: string | undefined;
31
+ customData?: Record<string, unknown> | undefined;
32
+ }, {
33
+ returnUrl?: string | undefined;
34
+ sessionName?: string | undefined;
35
+ expiresAt?: string | undefined;
36
+ customData?: Record<string, unknown> | undefined;
37
+ }>;
38
+ declare const securityPolicySchema$1: z.ZodObject<{
39
+ sessionTimeout: z.ZodNumber;
40
+ requestTimeout: z.ZodNumber;
41
+ maxConcurrentSessions: z.ZodNumber;
42
+ requireOriginProof: z.ZodBoolean;
43
+ allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
44
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
45
+ }, "strip", z.ZodTypeAny, {
46
+ sessionTimeout: number;
47
+ requestTimeout: number;
48
+ maxConcurrentSessions: number;
49
+ requireOriginProof: boolean;
50
+ allowedDomains?: string[] | undefined;
51
+ blockedDomains?: string[] | undefined;
52
+ }, {
53
+ sessionTimeout: number;
54
+ requestTimeout: number;
55
+ maxConcurrentSessions: number;
56
+ requireOriginProof: boolean;
57
+ allowedDomains?: string[] | undefined;
58
+ blockedDomains?: string[] | undefined;
59
+ }>;
60
+ declare const sessionOptionsSchema: z.ZodObject<{
61
+ config: z.ZodOptional<z.ZodObject<{
62
+ returnUrl: z.ZodOptional<z.ZodString>;
63
+ sessionName: z.ZodOptional<z.ZodString>;
64
+ expiresAt: z.ZodOptional<z.ZodString>;
65
+ customData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
66
+ }, "strip", z.ZodTypeAny, {
67
+ returnUrl?: string | undefined;
68
+ sessionName?: string | undefined;
69
+ expiresAt?: string | undefined;
70
+ customData?: Record<string, unknown> | undefined;
71
+ }, {
72
+ returnUrl?: string | undefined;
73
+ sessionName?: string | undefined;
74
+ expiresAt?: string | undefined;
75
+ customData?: Record<string, unknown> | undefined;
76
+ }>>;
77
+ securityPolicy: z.ZodOptional<z.ZodObject<{
78
+ sessionTimeout: z.ZodOptional<z.ZodNumber>;
79
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
80
+ maxConcurrentSessions: z.ZodOptional<z.ZodNumber>;
81
+ requireOriginProof: z.ZodOptional<z.ZodBoolean>;
82
+ allowedDomains: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
83
+ blockedDomains: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
84
+ }, "strip", z.ZodTypeAny, {
85
+ sessionTimeout?: number | undefined;
86
+ requestTimeout?: number | undefined;
87
+ maxConcurrentSessions?: number | undefined;
88
+ requireOriginProof?: boolean | undefined;
89
+ allowedDomains?: string[] | undefined;
90
+ blockedDomains?: string[] | undefined;
91
+ }, {
92
+ sessionTimeout?: number | undefined;
93
+ requestTimeout?: number | undefined;
94
+ maxConcurrentSessions?: number | undefined;
95
+ requireOriginProof?: boolean | undefined;
96
+ allowedDomains?: string[] | undefined;
97
+ blockedDomains?: string[] | undefined;
98
+ }>>;
99
+ relayUrl: z.ZodOptional<z.ZodString>;
100
+ }, "strip", z.ZodTypeAny, {
101
+ config?: {
102
+ returnUrl?: string | undefined;
103
+ sessionName?: string | undefined;
104
+ expiresAt?: string | undefined;
105
+ customData?: Record<string, unknown> | undefined;
106
+ } | undefined;
107
+ securityPolicy?: {
108
+ sessionTimeout?: number | undefined;
109
+ requestTimeout?: number | undefined;
110
+ maxConcurrentSessions?: number | undefined;
111
+ requireOriginProof?: boolean | undefined;
112
+ allowedDomains?: string[] | undefined;
113
+ blockedDomains?: string[] | undefined;
114
+ } | undefined;
115
+ relayUrl?: string | undefined;
116
+ }, {
117
+ config?: {
118
+ returnUrl?: string | undefined;
119
+ sessionName?: string | undefined;
120
+ expiresAt?: string | undefined;
121
+ customData?: Record<string, unknown> | undefined;
122
+ } | undefined;
123
+ securityPolicy?: {
124
+ sessionTimeout?: number | undefined;
125
+ requestTimeout?: number | undefined;
126
+ maxConcurrentSessions?: number | undefined;
127
+ requireOriginProof?: boolean | undefined;
128
+ allowedDomains?: string[] | undefined;
129
+ blockedDomains?: string[] | undefined;
130
+ } | undefined;
131
+ relayUrl?: string | undefined;
132
+ }>;
133
+ declare const sessionMetadataSchema: z.ZodObject<{
134
+ encryptionAlgorithm: z.ZodEnum<["AES-GCM", "plaintext"]>;
135
+ sessionId: z.ZodString;
136
+ publicKey: z.ZodOptional<z.ZodString>;
137
+ timestamp: z.ZodString;
138
+ }, "strip", z.ZodTypeAny, {
139
+ sessionId: string;
140
+ encryptionAlgorithm: "AES-GCM" | "plaintext";
141
+ timestamp: string;
142
+ publicKey?: string | undefined;
143
+ }, {
144
+ sessionId: string;
145
+ encryptionAlgorithm: "AES-GCM" | "plaintext";
146
+ timestamp: string;
147
+ publicKey?: string | undefined;
148
+ }>;
149
+ declare const createSessionRequestSchema: z.ZodObject<{
150
+ dappId: z.ZodString;
151
+ metadata: z.ZodObject<{
152
+ encryptionAlgorithm: z.ZodEnum<["AES-GCM", "plaintext"]>;
153
+ sessionId: z.ZodString;
154
+ publicKey: z.ZodOptional<z.ZodString>;
155
+ timestamp: z.ZodString;
156
+ }, "strip", z.ZodTypeAny, {
157
+ sessionId: string;
158
+ encryptionAlgorithm: "AES-GCM" | "plaintext";
159
+ timestamp: string;
160
+ publicKey?: string | undefined;
161
+ }, {
162
+ sessionId: string;
163
+ encryptionAlgorithm: "AES-GCM" | "plaintext";
164
+ timestamp: string;
165
+ publicKey?: string | undefined;
166
+ }>;
167
+ sessionConfig: z.ZodOptional<z.ZodObject<{
168
+ returnUrl: z.ZodOptional<z.ZodString>;
169
+ sessionName: z.ZodOptional<z.ZodString>;
170
+ expiresAt: z.ZodOptional<z.ZodString>;
171
+ customData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
172
+ }, "strip", z.ZodTypeAny, {
173
+ returnUrl?: string | undefined;
174
+ sessionName?: string | undefined;
175
+ expiresAt?: string | undefined;
176
+ customData?: Record<string, unknown> | undefined;
177
+ }, {
178
+ returnUrl?: string | undefined;
179
+ sessionName?: string | undefined;
180
+ expiresAt?: string | undefined;
181
+ customData?: Record<string, unknown> | undefined;
182
+ }>>;
183
+ }, "strip", z.ZodTypeAny, {
184
+ dappId: string;
185
+ metadata: {
186
+ sessionId: string;
187
+ encryptionAlgorithm: "AES-GCM" | "plaintext";
188
+ timestamp: string;
189
+ publicKey?: string | undefined;
190
+ };
191
+ sessionConfig?: {
192
+ returnUrl?: string | undefined;
193
+ sessionName?: string | undefined;
194
+ expiresAt?: string | undefined;
195
+ customData?: Record<string, unknown> | undefined;
196
+ } | undefined;
197
+ }, {
198
+ dappId: string;
199
+ metadata: {
200
+ sessionId: string;
201
+ encryptionAlgorithm: "AES-GCM" | "plaintext";
202
+ timestamp: string;
203
+ publicKey?: string | undefined;
204
+ };
205
+ sessionConfig?: {
206
+ returnUrl?: string | undefined;
207
+ sessionName?: string | undefined;
208
+ expiresAt?: string | undefined;
209
+ customData?: Record<string, unknown> | undefined;
210
+ } | undefined;
211
+ }>;
212
+ declare const clientSessionClaimSchema: z.ZodObject<{
213
+ claimNonce: z.ZodString;
214
+ timestamp: z.ZodNumber;
215
+ }, "strip", z.ZodTypeAny, {
216
+ timestamp: number;
217
+ claimNonce: string;
218
+ }, {
219
+ timestamp: number;
220
+ claimNonce: string;
221
+ }>;
222
+ declare const createSessionResponseSchema: z.ZodObject<{
223
+ sessionId: z.ZodString;
224
+ clientSessionClaim: z.ZodObject<{
225
+ claimNonce: z.ZodString;
226
+ timestamp: z.ZodNumber;
227
+ }, "strip", z.ZodTypeAny, {
228
+ timestamp: number;
229
+ claimNonce: string;
230
+ }, {
231
+ timestamp: number;
232
+ claimNonce: string;
233
+ }>;
234
+ ttl: z.ZodNumber;
235
+ }, "strip", z.ZodTypeAny, {
236
+ sessionId: string;
237
+ clientSessionClaim: {
238
+ timestamp: number;
239
+ claimNonce: string;
240
+ };
241
+ ttl: number;
242
+ }, {
243
+ sessionId: string;
244
+ clientSessionClaim: {
245
+ timestamp: number;
246
+ claimNonce: string;
247
+ };
248
+ ttl: number;
249
+ }>;
250
+
251
+ declare const walletSessionClaimSchema: z.ZodObject<{
252
+ sessionNonce: z.ZodString;
253
+ timestamp: z.ZodNumber;
254
+ }, "strip", z.ZodTypeAny, {
255
+ timestamp: number;
256
+ sessionNonce: string;
257
+ }, {
258
+ timestamp: number;
259
+ sessionNonce: string;
260
+ }>;
261
+ declare const claimSessionPayloadSchema: z.ZodObject<{
262
+ type: z.ZodLiteral<"claim_session">;
263
+ walletPublicKey: z.ZodString;
264
+ }, "strip", z.ZodTypeAny, {
265
+ type: "claim_session";
266
+ walletPublicKey: string;
267
+ }, {
268
+ type: "claim_session";
269
+ walletPublicKey: string;
270
+ }>;
271
+ declare const prefetchMetadataPayloadSchema: z.ZodObject<{
272
+ type: z.ZodLiteral<"prefetch_metadata">;
273
+ }, "strip", z.ZodTypeAny, {
274
+ type: "prefetch_metadata";
275
+ }, {
276
+ type: "prefetch_metadata";
277
+ }>;
278
+ declare const connectionRejectedPayloadSchema: z.ZodObject<{
279
+ type: z.ZodLiteral<"connection_rejected">;
280
+ encrypted: z.ZodObject<{
281
+ iv: z.ZodString;
282
+ ciphertext: z.ZodString;
283
+ mac: z.ZodString;
284
+ }, "strip", z.ZodTypeAny, {
285
+ iv: string;
286
+ ciphertext: string;
287
+ mac: string;
288
+ }, {
289
+ iv: string;
290
+ ciphertext: string;
291
+ mac: string;
292
+ }>;
293
+ }, "strip", z.ZodTypeAny, {
294
+ type: "connection_rejected";
295
+ encrypted: {
296
+ iv: string;
297
+ ciphertext: string;
298
+ mac: string;
299
+ };
300
+ }, {
301
+ type: "connection_rejected";
302
+ encrypted: {
303
+ iv: string;
304
+ ciphertext: string;
305
+ mac: string;
306
+ };
307
+ }>;
308
+ declare const authenticateConnectionPayloadSchema: z.ZodObject<{
309
+ type: z.ZodLiteral<"authenticate_connection">;
310
+ encrypted: z.ZodObject<{
311
+ iv: z.ZodString;
312
+ ciphertext: z.ZodString;
313
+ mac: z.ZodString;
314
+ }, "strip", z.ZodTypeAny, {
315
+ iv: string;
316
+ ciphertext: string;
317
+ mac: string;
318
+ }, {
319
+ iv: string;
320
+ ciphertext: string;
321
+ mac: string;
322
+ }>;
323
+ }, "strip", z.ZodTypeAny, {
324
+ type: "authenticate_connection";
325
+ encrypted: {
326
+ iv: string;
327
+ ciphertext: string;
328
+ mac: string;
329
+ };
330
+ }, {
331
+ type: "authenticate_connection";
332
+ encrypted: {
333
+ iv: string;
334
+ ciphertext: string;
335
+ mac: string;
336
+ };
337
+ }>;
338
+ declare const walletReconnectPayloadSchema: z.ZodObject<{
339
+ type: z.ZodLiteral<"wallet_reconnect">;
340
+ }, "strip", z.ZodTypeAny, {
341
+ type: "wallet_reconnect";
342
+ }, {
343
+ type: "wallet_reconnect";
344
+ }>;
345
+ declare const walletMessagePayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
346
+ type: z.ZodLiteral<"claim_session">;
347
+ walletPublicKey: z.ZodString;
348
+ }, "strip", z.ZodTypeAny, {
349
+ type: "claim_session";
350
+ walletPublicKey: string;
351
+ }, {
352
+ type: "claim_session";
353
+ walletPublicKey: string;
354
+ }>, z.ZodObject<{
355
+ type: z.ZodLiteral<"prefetch_metadata">;
356
+ }, "strip", z.ZodTypeAny, {
357
+ type: "prefetch_metadata";
358
+ }, {
359
+ type: "prefetch_metadata";
360
+ }>, z.ZodObject<{
361
+ type: z.ZodLiteral<"connection_rejected">;
362
+ encrypted: z.ZodObject<{
363
+ iv: z.ZodString;
364
+ ciphertext: z.ZodString;
365
+ mac: z.ZodString;
366
+ }, "strip", z.ZodTypeAny, {
367
+ iv: string;
368
+ ciphertext: string;
369
+ mac: string;
370
+ }, {
371
+ iv: string;
372
+ ciphertext: string;
373
+ mac: string;
374
+ }>;
375
+ }, "strip", z.ZodTypeAny, {
376
+ type: "connection_rejected";
377
+ encrypted: {
378
+ iv: string;
379
+ ciphertext: string;
380
+ mac: string;
381
+ };
382
+ }, {
383
+ type: "connection_rejected";
384
+ encrypted: {
385
+ iv: string;
386
+ ciphertext: string;
387
+ mac: string;
388
+ };
389
+ }>, z.ZodObject<{
390
+ type: z.ZodLiteral<"authenticate_connection">;
391
+ encrypted: z.ZodObject<{
392
+ iv: z.ZodString;
393
+ ciphertext: z.ZodString;
394
+ mac: z.ZodString;
395
+ }, "strip", z.ZodTypeAny, {
396
+ iv: string;
397
+ ciphertext: string;
398
+ mac: string;
399
+ }, {
400
+ iv: string;
401
+ ciphertext: string;
402
+ mac: string;
403
+ }>;
404
+ }, "strip", z.ZodTypeAny, {
405
+ type: "authenticate_connection";
406
+ encrypted: {
407
+ iv: string;
408
+ ciphertext: string;
409
+ mac: string;
410
+ };
411
+ }, {
412
+ type: "authenticate_connection";
413
+ encrypted: {
414
+ iv: string;
415
+ ciphertext: string;
416
+ mac: string;
417
+ };
418
+ }>, z.ZodObject<{
419
+ type: z.ZodLiteral<"wallet_reconnect">;
420
+ }, "strip", z.ZodTypeAny, {
421
+ type: "wallet_reconnect";
422
+ }, {
423
+ type: "wallet_reconnect";
424
+ }>]>;
425
+ declare const walletMessageEnvelopeSchema: z.ZodObject<{
426
+ sessionId: z.ZodString;
427
+ walletSessionClaim: z.ZodObject<{
428
+ sessionNonce: z.ZodString;
429
+ timestamp: z.ZodNumber;
430
+ }, "strip", z.ZodTypeAny, {
431
+ timestamp: number;
432
+ sessionNonce: string;
433
+ }, {
434
+ timestamp: number;
435
+ sessionNonce: string;
436
+ }>;
437
+ payload: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
438
+ type: z.ZodLiteral<"claim_session">;
439
+ walletPublicKey: z.ZodString;
440
+ }, "strip", z.ZodTypeAny, {
441
+ type: "claim_session";
442
+ walletPublicKey: string;
443
+ }, {
444
+ type: "claim_session";
445
+ walletPublicKey: string;
446
+ }>, z.ZodObject<{
447
+ type: z.ZodLiteral<"prefetch_metadata">;
448
+ }, "strip", z.ZodTypeAny, {
449
+ type: "prefetch_metadata";
450
+ }, {
451
+ type: "prefetch_metadata";
452
+ }>, z.ZodObject<{
453
+ type: z.ZodLiteral<"connection_rejected">;
454
+ encrypted: z.ZodObject<{
455
+ iv: z.ZodString;
456
+ ciphertext: z.ZodString;
457
+ mac: z.ZodString;
458
+ }, "strip", z.ZodTypeAny, {
459
+ iv: string;
460
+ ciphertext: string;
461
+ mac: string;
462
+ }, {
463
+ iv: string;
464
+ ciphertext: string;
465
+ mac: string;
466
+ }>;
467
+ }, "strip", z.ZodTypeAny, {
468
+ type: "connection_rejected";
469
+ encrypted: {
470
+ iv: string;
471
+ ciphertext: string;
472
+ mac: string;
473
+ };
474
+ }, {
475
+ type: "connection_rejected";
476
+ encrypted: {
477
+ iv: string;
478
+ ciphertext: string;
479
+ mac: string;
480
+ };
481
+ }>, z.ZodObject<{
482
+ type: z.ZodLiteral<"authenticate_connection">;
483
+ encrypted: z.ZodObject<{
484
+ iv: z.ZodString;
485
+ ciphertext: z.ZodString;
486
+ mac: z.ZodString;
487
+ }, "strip", z.ZodTypeAny, {
488
+ iv: string;
489
+ ciphertext: string;
490
+ mac: string;
491
+ }, {
492
+ iv: string;
493
+ ciphertext: string;
494
+ mac: string;
495
+ }>;
496
+ }, "strip", z.ZodTypeAny, {
497
+ type: "authenticate_connection";
498
+ encrypted: {
499
+ iv: string;
500
+ ciphertext: string;
501
+ mac: string;
502
+ };
503
+ }, {
504
+ type: "authenticate_connection";
505
+ encrypted: {
506
+ iv: string;
507
+ ciphertext: string;
508
+ mac: string;
509
+ };
510
+ }>, z.ZodObject<{
511
+ type: z.ZodLiteral<"wallet_reconnect">;
512
+ }, "strip", z.ZodTypeAny, {
513
+ type: "wallet_reconnect";
514
+ }, {
515
+ type: "wallet_reconnect";
516
+ }>]>;
517
+ }, "strip", z.ZodTypeAny, {
518
+ sessionId: string;
519
+ payload: {
520
+ type: "claim_session";
521
+ walletPublicKey: string;
522
+ } | {
523
+ type: "prefetch_metadata";
524
+ } | {
525
+ type: "connection_rejected";
526
+ encrypted: {
527
+ iv: string;
528
+ ciphertext: string;
529
+ mac: string;
530
+ };
531
+ } | {
532
+ type: "authenticate_connection";
533
+ encrypted: {
534
+ iv: string;
535
+ ciphertext: string;
536
+ mac: string;
537
+ };
538
+ } | {
539
+ type: "wallet_reconnect";
540
+ };
541
+ walletSessionClaim: {
542
+ timestamp: number;
543
+ sessionNonce: string;
544
+ };
545
+ }, {
546
+ sessionId: string;
547
+ payload: {
548
+ type: "claim_session";
549
+ walletPublicKey: string;
550
+ } | {
551
+ type: "prefetch_metadata";
552
+ } | {
553
+ type: "connection_rejected";
554
+ encrypted: {
555
+ iv: string;
556
+ ciphertext: string;
557
+ mac: string;
558
+ };
559
+ } | {
560
+ type: "authenticate_connection";
561
+ encrypted: {
562
+ iv: string;
563
+ ciphertext: string;
564
+ mac: string;
565
+ };
566
+ } | {
567
+ type: "wallet_reconnect";
568
+ };
569
+ walletSessionClaim: {
570
+ timestamp: number;
571
+ sessionNonce: string;
572
+ };
573
+ }>;
574
+ declare const rejectionDataSchema: z.ZodObject<{
575
+ reason: z.ZodOptional<z.ZodString>;
576
+ timestamp: z.ZodNumber;
577
+ }, "strip", z.ZodTypeAny, {
578
+ timestamp: number;
579
+ reason?: string | undefined;
580
+ }, {
581
+ timestamp: number;
582
+ reason?: string | undefined;
583
+ }>;
584
+ declare const walletMetadataSchema: z.ZodObject<{
585
+ name: z.ZodString;
586
+ version: z.ZodOptional<z.ZodString>;
587
+ icon: z.ZodOptional<z.ZodString>;
588
+ description: z.ZodOptional<z.ZodString>;
589
+ url: z.ZodOptional<z.ZodString>;
590
+ provider: z.ZodOptional<z.ZodString>;
591
+ }, "strip", z.ZodTypeAny, {
592
+ name: string;
593
+ version?: string | undefined;
594
+ description?: string | undefined;
595
+ url?: string | undefined;
596
+ icon?: string | undefined;
597
+ provider?: string | undefined;
598
+ }, {
599
+ name: string;
600
+ version?: string | undefined;
601
+ description?: string | undefined;
602
+ url?: string | undefined;
603
+ icon?: string | undefined;
604
+ provider?: string | undefined;
605
+ }>;
606
+ declare const authenticationDataSchema: z.ZodObject<{
607
+ address: z.ZodString;
608
+ signature: z.ZodString;
609
+ message: z.ZodString;
610
+ chainId: z.ZodNumber;
611
+ network: z.ZodOptional<z.ZodString>;
612
+ signingAlgo: z.ZodOptional<z.ZodString>;
613
+ walletMetadata: z.ZodOptional<z.ZodObject<{
614
+ name: z.ZodString;
615
+ version: z.ZodOptional<z.ZodString>;
616
+ icon: z.ZodOptional<z.ZodString>;
617
+ description: z.ZodOptional<z.ZodString>;
618
+ url: z.ZodOptional<z.ZodString>;
619
+ provider: z.ZodOptional<z.ZodString>;
620
+ }, "strip", z.ZodTypeAny, {
621
+ name: string;
622
+ version?: string | undefined;
623
+ description?: string | undefined;
624
+ url?: string | undefined;
625
+ icon?: string | undefined;
626
+ provider?: string | undefined;
627
+ }, {
628
+ name: string;
629
+ version?: string | undefined;
630
+ description?: string | undefined;
631
+ url?: string | undefined;
632
+ icon?: string | undefined;
633
+ provider?: string | undefined;
634
+ }>>;
635
+ }, "strip", z.ZodTypeAny, {
636
+ message: string;
637
+ address: string;
638
+ chainId: number;
639
+ signature: string;
640
+ network?: string | undefined;
641
+ signingAlgo?: string | undefined;
642
+ walletMetadata?: {
643
+ name: string;
644
+ version?: string | undefined;
645
+ description?: string | undefined;
646
+ url?: string | undefined;
647
+ icon?: string | undefined;
648
+ provider?: string | undefined;
649
+ } | undefined;
650
+ }, {
651
+ message: string;
652
+ address: string;
653
+ chainId: number;
654
+ signature: string;
655
+ network?: string | undefined;
656
+ signingAlgo?: string | undefined;
657
+ walletMetadata?: {
658
+ name: string;
659
+ version?: string | undefined;
660
+ description?: string | undefined;
661
+ url?: string | undefined;
662
+ icon?: string | undefined;
663
+ provider?: string | undefined;
664
+ } | undefined;
665
+ }>;
666
+ declare const walletHandshakeMessageSchema: z.ZodObject<{
667
+ type: z.ZodLiteral<"wallet_handshake">;
668
+ status: z.ZodLiteral<"reviewing">;
669
+ walletPublicKey: z.ZodString;
670
+ timestamp: z.ZodNumber;
671
+ }, "strip", z.ZodTypeAny, {
672
+ status: "reviewing";
673
+ type: "wallet_handshake";
674
+ timestamp: number;
675
+ walletPublicKey: string;
676
+ }, {
677
+ status: "reviewing";
678
+ type: "wallet_handshake";
679
+ timestamp: number;
680
+ walletPublicKey: string;
681
+ }>;
682
+ declare const connectionRejectedMessageSchema: z.ZodObject<{
683
+ type: z.ZodLiteral<"connection_rejected">;
684
+ encrypted: z.ZodObject<{
685
+ iv: z.ZodString;
686
+ ciphertext: z.ZodString;
687
+ mac: z.ZodString;
688
+ }, "strip", z.ZodTypeAny, {
689
+ iv: string;
690
+ ciphertext: string;
691
+ mac: string;
692
+ }, {
693
+ iv: string;
694
+ ciphertext: string;
695
+ mac: string;
696
+ }>;
697
+ }, "strip", z.ZodTypeAny, {
698
+ type: "connection_rejected";
699
+ encrypted: {
700
+ iv: string;
701
+ ciphertext: string;
702
+ mac: string;
703
+ };
704
+ }, {
705
+ type: "connection_rejected";
706
+ encrypted: {
707
+ iv: string;
708
+ ciphertext: string;
709
+ mac: string;
710
+ };
711
+ }>;
712
+ declare const connectionAuthenticatedMessageSchema: z.ZodObject<{
713
+ type: z.ZodLiteral<"connection_authenticated">;
714
+ encrypted: z.ZodObject<{
715
+ iv: z.ZodString;
716
+ ciphertext: z.ZodString;
717
+ mac: z.ZodString;
718
+ }, "strip", z.ZodTypeAny, {
719
+ iv: string;
720
+ ciphertext: string;
721
+ mac: string;
722
+ }, {
723
+ iv: string;
724
+ ciphertext: string;
725
+ mac: string;
726
+ }>;
727
+ }, "strip", z.ZodTypeAny, {
728
+ type: "connection_authenticated";
729
+ encrypted: {
730
+ iv: string;
731
+ ciphertext: string;
732
+ mac: string;
733
+ };
734
+ }, {
735
+ type: "connection_authenticated";
736
+ encrypted: {
737
+ iv: string;
738
+ ciphertext: string;
739
+ mac: string;
740
+ };
741
+ }>;
742
+ declare const relayToDAppMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
743
+ type: z.ZodLiteral<"wallet_handshake">;
744
+ status: z.ZodLiteral<"reviewing">;
745
+ walletPublicKey: z.ZodString;
746
+ timestamp: z.ZodNumber;
747
+ }, "strip", z.ZodTypeAny, {
748
+ status: "reviewing";
749
+ type: "wallet_handshake";
750
+ timestamp: number;
751
+ walletPublicKey: string;
752
+ }, {
753
+ status: "reviewing";
754
+ type: "wallet_handshake";
755
+ timestamp: number;
756
+ walletPublicKey: string;
757
+ }>, z.ZodObject<{
758
+ type: z.ZodLiteral<"connection_rejected">;
759
+ encrypted: z.ZodObject<{
760
+ iv: z.ZodString;
761
+ ciphertext: z.ZodString;
762
+ mac: z.ZodString;
763
+ }, "strip", z.ZodTypeAny, {
764
+ iv: string;
765
+ ciphertext: string;
766
+ mac: string;
767
+ }, {
768
+ iv: string;
769
+ ciphertext: string;
770
+ mac: string;
771
+ }>;
772
+ }, "strip", z.ZodTypeAny, {
773
+ type: "connection_rejected";
774
+ encrypted: {
775
+ iv: string;
776
+ ciphertext: string;
777
+ mac: string;
778
+ };
779
+ }, {
780
+ type: "connection_rejected";
781
+ encrypted: {
782
+ iv: string;
783
+ ciphertext: string;
784
+ mac: string;
785
+ };
786
+ }>, z.ZodObject<{
787
+ type: z.ZodLiteral<"connection_authenticated">;
788
+ encrypted: z.ZodObject<{
789
+ iv: z.ZodString;
790
+ ciphertext: z.ZodString;
791
+ mac: z.ZodString;
792
+ }, "strip", z.ZodTypeAny, {
793
+ iv: string;
794
+ ciphertext: string;
795
+ mac: string;
796
+ }, {
797
+ iv: string;
798
+ ciphertext: string;
799
+ mac: string;
800
+ }>;
801
+ }, "strip", z.ZodTypeAny, {
802
+ type: "connection_authenticated";
803
+ encrypted: {
804
+ iv: string;
805
+ ciphertext: string;
806
+ mac: string;
807
+ };
808
+ }, {
809
+ type: "connection_authenticated";
810
+ encrypted: {
811
+ iv: string;
812
+ ciphertext: string;
813
+ mac: string;
814
+ };
815
+ }>]>;
816
+ declare const prefetchMetadataResponseSchema: z.ZodObject<{
817
+ dappMetadata: z.ZodObject<{
818
+ dappId: z.ZodOptional<z.ZodString>;
819
+ name: z.ZodString;
820
+ description: z.ZodOptional<z.ZodString>;
821
+ url: z.ZodString;
822
+ icons: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
823
+ }, "strip", z.ZodTypeAny, {
824
+ name: string;
825
+ url: string;
826
+ dappId?: string | undefined;
827
+ description?: string | undefined;
828
+ icons?: string[] | undefined;
829
+ }, {
830
+ name: string;
831
+ url: string;
832
+ dappId?: string | undefined;
833
+ description?: string | undefined;
834
+ icons?: string[] | undefined;
835
+ }>;
836
+ sessionConfig: z.ZodOptional<z.ZodObject<{
837
+ returnUrl: z.ZodOptional<z.ZodString>;
838
+ sessionName: z.ZodOptional<z.ZodString>;
839
+ expiresAt: z.ZodOptional<z.ZodString>;
840
+ customData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
841
+ }, "strip", z.ZodTypeAny, {
842
+ returnUrl?: string | undefined;
843
+ sessionName?: string | undefined;
844
+ expiresAt?: string | undefined;
845
+ customData?: Record<string, unknown> | undefined;
846
+ }, {
847
+ returnUrl?: string | undefined;
848
+ sessionName?: string | undefined;
849
+ expiresAt?: string | undefined;
850
+ customData?: Record<string, unknown> | undefined;
851
+ }>>;
852
+ }, "strip", z.ZodTypeAny, {
853
+ dappMetadata: {
854
+ name: string;
855
+ url: string;
856
+ dappId?: string | undefined;
857
+ description?: string | undefined;
858
+ icons?: string[] | undefined;
859
+ };
860
+ sessionConfig?: {
861
+ returnUrl?: string | undefined;
862
+ sessionName?: string | undefined;
863
+ expiresAt?: string | undefined;
864
+ customData?: Record<string, unknown> | undefined;
865
+ } | undefined;
866
+ }, {
867
+ dappMetadata: {
868
+ name: string;
869
+ url: string;
870
+ dappId?: string | undefined;
871
+ description?: string | undefined;
872
+ icons?: string[] | undefined;
873
+ };
874
+ sessionConfig?: {
875
+ returnUrl?: string | undefined;
876
+ sessionName?: string | undefined;
877
+ expiresAt?: string | undefined;
878
+ customData?: Record<string, unknown> | undefined;
879
+ } | undefined;
880
+ }>;
881
+ declare const validateWalletMessage: (message: unknown) => {
882
+ sessionId: string;
883
+ payload: {
884
+ type: "claim_session";
885
+ walletPublicKey: string;
886
+ } | {
887
+ type: "prefetch_metadata";
888
+ } | {
889
+ type: "connection_rejected";
890
+ encrypted: {
891
+ iv: string;
892
+ ciphertext: string;
893
+ mac: string;
894
+ };
895
+ } | {
896
+ type: "authenticate_connection";
897
+ encrypted: {
898
+ iv: string;
899
+ ciphertext: string;
900
+ mac: string;
901
+ };
902
+ } | {
903
+ type: "wallet_reconnect";
904
+ };
905
+ walletSessionClaim: {
906
+ timestamp: number;
907
+ sessionNonce: string;
908
+ };
909
+ };
910
+ declare const safeValidateWalletMessage: (message: unknown) => z.SafeParseReturnType<{
911
+ sessionId: string;
912
+ payload: {
913
+ type: "claim_session";
914
+ walletPublicKey: string;
915
+ } | {
916
+ type: "prefetch_metadata";
917
+ } | {
918
+ type: "connection_rejected";
919
+ encrypted: {
920
+ iv: string;
921
+ ciphertext: string;
922
+ mac: string;
923
+ };
924
+ } | {
925
+ type: "authenticate_connection";
926
+ encrypted: {
927
+ iv: string;
928
+ ciphertext: string;
929
+ mac: string;
930
+ };
931
+ } | {
932
+ type: "wallet_reconnect";
933
+ };
934
+ walletSessionClaim: {
935
+ timestamp: number;
936
+ sessionNonce: string;
937
+ };
938
+ }, {
939
+ sessionId: string;
940
+ payload: {
941
+ type: "claim_session";
942
+ walletPublicKey: string;
943
+ } | {
944
+ type: "prefetch_metadata";
945
+ } | {
946
+ type: "connection_rejected";
947
+ encrypted: {
948
+ iv: string;
949
+ ciphertext: string;
950
+ mac: string;
951
+ };
952
+ } | {
953
+ type: "authenticate_connection";
954
+ encrypted: {
955
+ iv: string;
956
+ ciphertext: string;
957
+ mac: string;
958
+ };
959
+ } | {
960
+ type: "wallet_reconnect";
961
+ };
962
+ walletSessionClaim: {
963
+ timestamp: number;
964
+ sessionNonce: string;
965
+ };
966
+ }>;
967
+ declare const validateRelayToDAppMessage: (message: unknown) => {
968
+ status: "reviewing";
969
+ type: "wallet_handshake";
970
+ timestamp: number;
971
+ walletPublicKey: string;
972
+ } | {
973
+ type: "connection_rejected";
974
+ encrypted: {
975
+ iv: string;
976
+ ciphertext: string;
977
+ mac: string;
978
+ };
979
+ } | {
980
+ type: "connection_authenticated";
981
+ encrypted: {
982
+ iv: string;
983
+ ciphertext: string;
984
+ mac: string;
985
+ };
986
+ };
987
+ declare const safeValidateRelayToDAppMessage: (message: unknown) => z.SafeParseReturnType<{
988
+ status: "reviewing";
989
+ type: "wallet_handshake";
990
+ timestamp: number;
991
+ walletPublicKey: string;
992
+ } | {
993
+ type: "connection_rejected";
994
+ encrypted: {
995
+ iv: string;
996
+ ciphertext: string;
997
+ mac: string;
998
+ };
999
+ } | {
1000
+ type: "connection_authenticated";
1001
+ encrypted: {
1002
+ iv: string;
1003
+ ciphertext: string;
1004
+ mac: string;
1005
+ };
1006
+ }, {
1007
+ status: "reviewing";
1008
+ type: "wallet_handshake";
1009
+ timestamp: number;
1010
+ walletPublicKey: string;
1011
+ } | {
1012
+ type: "connection_rejected";
1013
+ encrypted: {
1014
+ iv: string;
1015
+ ciphertext: string;
1016
+ mac: string;
1017
+ };
1018
+ } | {
1019
+ type: "connection_authenticated";
1020
+ encrypted: {
1021
+ iv: string;
1022
+ ciphertext: string;
1023
+ mac: string;
1024
+ };
1025
+ }>;
1026
+ declare const validateWalletSessionClaim: (claim: unknown) => {
1027
+ timestamp: number;
1028
+ sessionNonce: string;
1029
+ };
1030
+ declare const safeValidateWalletSessionClaim: (claim: unknown) => z.SafeParseReturnType<{
1031
+ timestamp: number;
1032
+ sessionNonce: string;
1033
+ }, {
1034
+ timestamp: number;
1035
+ sessionNonce: string;
1036
+ }>;
1037
+ declare function validateTimestamp(timestamp: number, maxAge?: number): boolean;
1038
+
1039
+ declare const clientReconnectPayloadSchema: z.ZodObject<{
1040
+ type: z.ZodLiteral<"client_reconnect">;
1041
+ }, "strip", z.ZodTypeAny, {
1042
+ type: "client_reconnect";
1043
+ }, {
1044
+ type: "client_reconnect";
1045
+ }>;
1046
+ declare const closeSessionPayloadSchema: z.ZodObject<{
1047
+ type: z.ZodLiteral<"close_session">;
1048
+ reason: z.ZodOptional<z.ZodString>;
1049
+ }, "strip", z.ZodTypeAny, {
1050
+ type: "close_session";
1051
+ reason?: string | undefined;
1052
+ }, {
1053
+ type: "close_session";
1054
+ reason?: string | undefined;
1055
+ }>;
1056
+ declare const clientMessagePayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1057
+ type: z.ZodLiteral<"client_reconnect">;
1058
+ }, "strip", z.ZodTypeAny, {
1059
+ type: "client_reconnect";
1060
+ }, {
1061
+ type: "client_reconnect";
1062
+ }>, z.ZodObject<{
1063
+ type: z.ZodLiteral<"close_session">;
1064
+ reason: z.ZodOptional<z.ZodString>;
1065
+ }, "strip", z.ZodTypeAny, {
1066
+ type: "close_session";
1067
+ reason?: string | undefined;
1068
+ }, {
1069
+ type: "close_session";
1070
+ reason?: string | undefined;
1071
+ }>]>;
1072
+ declare const clientMessageEnvelopeSchema: z.ZodObject<{
1073
+ sessionId: z.ZodString;
1074
+ clientSessionClaim: z.ZodObject<{
1075
+ claimNonce: z.ZodString;
1076
+ timestamp: z.ZodNumber;
1077
+ }, "strip", z.ZodTypeAny, {
1078
+ timestamp: number;
1079
+ claimNonce: string;
1080
+ }, {
1081
+ timestamp: number;
1082
+ claimNonce: string;
1083
+ }>;
1084
+ payload: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1085
+ type: z.ZodLiteral<"client_reconnect">;
1086
+ }, "strip", z.ZodTypeAny, {
1087
+ type: "client_reconnect";
1088
+ }, {
1089
+ type: "client_reconnect";
1090
+ }>, z.ZodObject<{
1091
+ type: z.ZodLiteral<"close_session">;
1092
+ reason: z.ZodOptional<z.ZodString>;
1093
+ }, "strip", z.ZodTypeAny, {
1094
+ type: "close_session";
1095
+ reason?: string | undefined;
1096
+ }, {
1097
+ type: "close_session";
1098
+ reason?: string | undefined;
1099
+ }>]>;
1100
+ }, "strip", z.ZodTypeAny, {
1101
+ sessionId: string;
1102
+ payload: {
1103
+ type: "client_reconnect";
1104
+ } | {
1105
+ type: "close_session";
1106
+ reason?: string | undefined;
1107
+ };
1108
+ clientSessionClaim: {
1109
+ timestamp: number;
1110
+ claimNonce: string;
1111
+ };
1112
+ }, {
1113
+ sessionId: string;
1114
+ payload: {
1115
+ type: "client_reconnect";
1116
+ } | {
1117
+ type: "close_session";
1118
+ reason?: string | undefined;
1119
+ };
1120
+ clientSessionClaim: {
1121
+ timestamp: number;
1122
+ claimNonce: string;
1123
+ };
1124
+ }>;
1125
+ declare const validateClientMessage: (message: unknown) => {
1126
+ sessionId: string;
1127
+ payload: {
1128
+ type: "client_reconnect";
1129
+ } | {
1130
+ type: "close_session";
1131
+ reason?: string | undefined;
1132
+ };
1133
+ clientSessionClaim: {
1134
+ timestamp: number;
1135
+ claimNonce: string;
1136
+ };
1137
+ };
1138
+ declare const safeValidateClientMessage: (message: unknown) => z.SafeParseReturnType<{
1139
+ sessionId: string;
1140
+ payload: {
1141
+ type: "client_reconnect";
1142
+ } | {
1143
+ type: "close_session";
1144
+ reason?: string | undefined;
1145
+ };
1146
+ clientSessionClaim: {
1147
+ timestamp: number;
1148
+ claimNonce: string;
1149
+ };
1150
+ }, {
1151
+ sessionId: string;
1152
+ payload: {
1153
+ type: "client_reconnect";
1154
+ } | {
1155
+ type: "close_session";
1156
+ reason?: string | undefined;
1157
+ };
1158
+ clientSessionClaim: {
1159
+ timestamp: number;
1160
+ claimNonce: string;
1161
+ };
1162
+ }>;
1163
+ declare const validateClientSessionClaim: (claim: unknown) => {
1164
+ timestamp: number;
1165
+ claimNonce: string;
1166
+ };
1167
+ declare const safeValidateClientSessionClaim: (claim: unknown) => z.SafeParseReturnType<{
1168
+ timestamp: number;
1169
+ claimNonce: string;
1170
+ }, {
1171
+ timestamp: number;
1172
+ claimNonce: string;
1173
+ }>;
1174
+
1175
+ declare const sessionClosedAckSchema: z.ZodObject<{
1176
+ type: z.ZodLiteral<"session_closed_ack">;
1177
+ timestamp: z.ZodNumber;
1178
+ }, "strip", z.ZodTypeAny, {
1179
+ type: "session_closed_ack";
1180
+ timestamp: number;
1181
+ }, {
1182
+ type: "session_closed_ack";
1183
+ timestamp: number;
1184
+ }>;
1185
+ declare const sessionClosedNotificationSchema: z.ZodObject<{
1186
+ type: z.ZodLiteral<"session_closed_notification">;
1187
+ closedBy: z.ZodEnum<["client", "wallet"]>;
1188
+ reason: z.ZodOptional<z.ZodString>;
1189
+ timestamp: z.ZodNumber;
1190
+ }, "strip", z.ZodTypeAny, {
1191
+ type: "session_closed_notification";
1192
+ timestamp: number;
1193
+ closedBy: "client" | "wallet";
1194
+ reason?: string | undefined;
1195
+ }, {
1196
+ type: "session_closed_notification";
1197
+ timestamp: number;
1198
+ closedBy: "client" | "wallet";
1199
+ reason?: string | undefined;
1200
+ }>;
1201
+ declare const reconnectedMessageSchema: z.ZodObject<{
1202
+ type: z.ZodLiteral<"reconnected">;
1203
+ queuedMessages: z.ZodNumber;
1204
+ timestamp: z.ZodNumber;
1205
+ }, "strip", z.ZodTypeAny, {
1206
+ type: "reconnected";
1207
+ timestamp: number;
1208
+ queuedMessages: number;
1209
+ }, {
1210
+ type: "reconnected";
1211
+ timestamp: number;
1212
+ queuedMessages: number;
1213
+ }>;
1214
+ declare const relayNotificationMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1215
+ type: z.ZodLiteral<"session_closed_ack">;
1216
+ timestamp: z.ZodNumber;
1217
+ }, "strip", z.ZodTypeAny, {
1218
+ type: "session_closed_ack";
1219
+ timestamp: number;
1220
+ }, {
1221
+ type: "session_closed_ack";
1222
+ timestamp: number;
1223
+ }>, z.ZodObject<{
1224
+ type: z.ZodLiteral<"session_closed_notification">;
1225
+ closedBy: z.ZodEnum<["client", "wallet"]>;
1226
+ reason: z.ZodOptional<z.ZodString>;
1227
+ timestamp: z.ZodNumber;
1228
+ }, "strip", z.ZodTypeAny, {
1229
+ type: "session_closed_notification";
1230
+ timestamp: number;
1231
+ closedBy: "client" | "wallet";
1232
+ reason?: string | undefined;
1233
+ }, {
1234
+ type: "session_closed_notification";
1235
+ timestamp: number;
1236
+ closedBy: "client" | "wallet";
1237
+ reason?: string | undefined;
1238
+ }>, z.ZodObject<{
1239
+ type: z.ZodLiteral<"reconnected">;
1240
+ queuedMessages: z.ZodNumber;
1241
+ timestamp: z.ZodNumber;
1242
+ }, "strip", z.ZodTypeAny, {
1243
+ type: "reconnected";
1244
+ timestamp: number;
1245
+ queuedMessages: number;
1246
+ }, {
1247
+ type: "reconnected";
1248
+ timestamp: number;
1249
+ queuedMessages: number;
1250
+ }>]>;
1251
+ declare const validateRelayNotificationMessage: (message: unknown) => {
1252
+ type: "session_closed_ack";
1253
+ timestamp: number;
1254
+ } | {
1255
+ type: "session_closed_notification";
1256
+ timestamp: number;
1257
+ closedBy: "client" | "wallet";
1258
+ reason?: string | undefined;
1259
+ } | {
1260
+ type: "reconnected";
1261
+ timestamp: number;
1262
+ queuedMessages: number;
1263
+ };
1264
+ declare const safeValidateRelayNotificationMessage: (message: unknown) => z.SafeParseReturnType<{
1265
+ type: "session_closed_ack";
1266
+ timestamp: number;
1267
+ } | {
1268
+ type: "session_closed_notification";
1269
+ timestamp: number;
1270
+ closedBy: "client" | "wallet";
1271
+ reason?: string | undefined;
1272
+ } | {
1273
+ type: "reconnected";
1274
+ timestamp: number;
1275
+ queuedMessages: number;
1276
+ }, {
1277
+ type: "session_closed_ack";
1278
+ timestamp: number;
1279
+ } | {
1280
+ type: "session_closed_notification";
1281
+ timestamp: number;
1282
+ closedBy: "client" | "wallet";
1283
+ reason?: string | undefined;
1284
+ } | {
1285
+ type: "reconnected";
1286
+ timestamp: number;
1287
+ queuedMessages: number;
1288
+ }>;
1289
+
1290
+ declare const siweFieldsSchema: z.ZodObject<{
1291
+ scheme: z.ZodOptional<z.ZodString>;
1292
+ domain: z.ZodString;
1293
+ address: z.ZodString;
1294
+ statement: z.ZodOptional<z.ZodString>;
1295
+ uri: z.ZodString;
1296
+ version: z.ZodLiteral<"1">;
1297
+ chainId: z.ZodNumber;
1298
+ nonce: z.ZodString;
1299
+ issuedAt: z.ZodString;
1300
+ expirationTime: z.ZodOptional<z.ZodString>;
1301
+ notBefore: z.ZodOptional<z.ZodString>;
1302
+ requestId: z.ZodOptional<z.ZodString>;
1303
+ resources: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1304
+ }, "strip", z.ZodTypeAny, {
1305
+ domain: string;
1306
+ address: string;
1307
+ uri: string;
1308
+ version: "1";
1309
+ chainId: number;
1310
+ nonce: string;
1311
+ issuedAt: string;
1312
+ scheme?: string | undefined;
1313
+ statement?: string | undefined;
1314
+ expirationTime?: string | undefined;
1315
+ notBefore?: string | undefined;
1316
+ requestId?: string | undefined;
1317
+ resources?: string[] | undefined;
1318
+ }, {
1319
+ domain: string;
1320
+ address: string;
1321
+ uri: string;
1322
+ version: "1";
1323
+ chainId: number;
1324
+ nonce: string;
1325
+ issuedAt: string;
1326
+ scheme?: string | undefined;
1327
+ statement?: string | undefined;
1328
+ expirationTime?: string | undefined;
1329
+ notBefore?: string | undefined;
1330
+ requestId?: string | undefined;
1331
+ resources?: string[] | undefined;
1332
+ }>;
1333
+ declare const dAppMetadataSchema: z.ZodObject<{
1334
+ returnUrl: z.ZodOptional<z.ZodString>;
1335
+ }, "strip", z.ZodTypeAny, {
1336
+ returnUrl?: string | undefined;
1337
+ }, {
1338
+ returnUrl?: string | undefined;
1339
+ }>;
1340
+ declare const qrPayloadSchema: z.ZodObject<{
1341
+ sessionId: z.ZodString;
1342
+ publicKey: z.ZodString;
1343
+ providerId: z.ZodOptional<z.ZodString>;
1344
+ relayUrl: z.ZodOptional<z.ZodString>;
1345
+ }, "strip", z.ZodTypeAny, {
1346
+ sessionId: string;
1347
+ publicKey: string;
1348
+ relayUrl?: string | undefined;
1349
+ providerId?: string | undefined;
1350
+ }, {
1351
+ sessionId: string;
1352
+ publicKey: string;
1353
+ relayUrl?: string | undefined;
1354
+ providerId?: string | undefined;
1355
+ }>;
1356
+ declare const encryptedPayloadSchema: z.ZodObject<{
1357
+ iv: z.ZodString;
1358
+ ciphertext: z.ZodString;
1359
+ mac: z.ZodString;
1360
+ }, "strip", z.ZodTypeAny, {
1361
+ iv: string;
1362
+ ciphertext: string;
1363
+ mac: string;
1364
+ }, {
1365
+ iv: string;
1366
+ ciphertext: string;
1367
+ mac: string;
1368
+ }>;
1369
+ declare const relayMessageTypeSchema: z.ZodEnum<["pub", "sub", "ack", "error"]>;
1370
+ declare const relayMessageSchema: z.ZodObject<{
1371
+ topic: z.ZodString;
1372
+ type: z.ZodEnum<["pub", "sub", "ack", "error"]>;
1373
+ payload: z.ZodOptional<z.ZodObject<{
1374
+ iv: z.ZodString;
1375
+ ciphertext: z.ZodString;
1376
+ mac: z.ZodString;
1377
+ }, "strip", z.ZodTypeAny, {
1378
+ iv: string;
1379
+ ciphertext: string;
1380
+ mac: string;
1381
+ }, {
1382
+ iv: string;
1383
+ ciphertext: string;
1384
+ mac: string;
1385
+ }>>;
1386
+ id: z.ZodString;
1387
+ }, "strip", z.ZodTypeAny, {
1388
+ type: "sub" | "pub" | "ack" | "error";
1389
+ topic: string;
1390
+ id: string;
1391
+ payload?: {
1392
+ iv: string;
1393
+ ciphertext: string;
1394
+ mac: string;
1395
+ } | undefined;
1396
+ }, {
1397
+ type: "sub" | "pub" | "ack" | "error";
1398
+ topic: string;
1399
+ id: string;
1400
+ payload?: {
1401
+ iv: string;
1402
+ ciphertext: string;
1403
+ mac: string;
1404
+ } | undefined;
1405
+ }>;
1406
+ declare const securityPolicySchema: z.ZodObject<{
1407
+ sessionTimeout: z.ZodNumber;
1408
+ requestTimeout: z.ZodNumber;
1409
+ maxConcurrentSessions: z.ZodNumber;
1410
+ requireOriginProof: z.ZodBoolean;
1411
+ allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1412
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1413
+ }, "strip", z.ZodTypeAny, {
1414
+ sessionTimeout: number;
1415
+ requestTimeout: number;
1416
+ maxConcurrentSessions: number;
1417
+ requireOriginProof: boolean;
1418
+ allowedDomains?: string[] | undefined;
1419
+ blockedDomains?: string[] | undefined;
1420
+ }, {
1421
+ sessionTimeout: number;
1422
+ requestTimeout: number;
1423
+ maxConcurrentSessions: number;
1424
+ requireOriginProof: boolean;
1425
+ allowedDomains?: string[] | undefined;
1426
+ blockedDomains?: string[] | undefined;
1427
+ }>;
1428
+ declare const originProofSchema: z.ZodObject<{
1429
+ domain: z.ZodString;
1430
+ timestamp: z.ZodNumber;
1431
+ signature: z.ZodString;
1432
+ }, "strip", z.ZodTypeAny, {
1433
+ domain: string;
1434
+ timestamp: number;
1435
+ signature: string;
1436
+ }, {
1437
+ domain: string;
1438
+ timestamp: number;
1439
+ signature: string;
1440
+ }>;
1441
+ declare const sessionStateSchema: z.ZodEnum<["created", "claimed", "authenticated", "active", "disconnected", "closed", "expired", "rejected"]>;
1442
+ declare const sessionInfoSchema: z.ZodObject<{
1443
+ sessionId: z.ZodString;
1444
+ state: z.ZodEnum<["created", "claimed", "authenticated", "active", "disconnected", "closed", "expired", "rejected"]>;
1445
+ address: z.ZodOptional<z.ZodString>;
1446
+ metadata: z.ZodObject<{
1447
+ returnUrl: z.ZodOptional<z.ZodString>;
1448
+ }, "strip", z.ZodTypeAny, {
1449
+ returnUrl?: string | undefined;
1450
+ }, {
1451
+ returnUrl?: string | undefined;
1452
+ }>;
1453
+ createdAt: z.ZodString;
1454
+ lastActivity: z.ZodString;
1455
+ expiresAt: z.ZodOptional<z.ZodString>;
1456
+ }, "strip", z.ZodTypeAny, {
1457
+ sessionId: string;
1458
+ metadata: {
1459
+ returnUrl?: string | undefined;
1460
+ };
1461
+ state: "created" | "claimed" | "authenticated" | "active" | "disconnected" | "closed" | "expired" | "rejected";
1462
+ createdAt: string;
1463
+ lastActivity: string;
1464
+ address?: string | undefined;
1465
+ expiresAt?: string | undefined;
1466
+ }, {
1467
+ sessionId: string;
1468
+ metadata: {
1469
+ returnUrl?: string | undefined;
1470
+ };
1471
+ state: "created" | "claimed" | "authenticated" | "active" | "disconnected" | "closed" | "expired" | "rejected";
1472
+ createdAt: string;
1473
+ lastActivity: string;
1474
+ address?: string | undefined;
1475
+ expiresAt?: string | undefined;
1476
+ }>;
1477
+ declare const displayInfoSchema: z.ZodObject<{
1478
+ qrCode: z.ZodString;
1479
+ frutiLink: z.ZodString;
1480
+ deepLink: z.ZodString;
1481
+ }, "strip", z.ZodTypeAny, {
1482
+ qrCode: string;
1483
+ frutiLink: string;
1484
+ deepLink: string;
1485
+ }, {
1486
+ qrCode: string;
1487
+ frutiLink: string;
1488
+ deepLink: string;
1489
+ }>;
1490
+ declare const errorCodeSchema: z.ZodEnum<["SESSION_EXPIRED", "SESSION_NOT_FOUND", "SESSION_ALREADY_CLAIMED", "INVALID_SESSION_CLAIM", "INVALID_CLIENT_CLAIM", "SESSION_TOKEN_EXPIRED", "SESSION_CLOSED", "ENCRYPTION_FAILED", "DECRYPTION_FAILED", "INVALID_SIGNATURE", "NETWORK_ERROR", "RELAY_ERROR", "MESSAGE_QUEUE_FULL", "RATE_LIMIT_EXCEEDED", "ORIGIN_MISMATCH", "REQUEST_PENDING", "REQUEST_NOT_FOUND", "REQUEST_EXPIRED", "REQUEST_INVALID", "REQUEST_TIMEOUT", "SIGNING_FAILED", "SIGNING_REJECTED", "TRANSACTION_INVALID", "CHAIN_MISMATCH"]>;
1491
+ declare const bananaLinkErrorSchema: z.ZodObject<{
1492
+ code: z.ZodEnum<["SESSION_EXPIRED", "SESSION_NOT_FOUND", "SESSION_ALREADY_CLAIMED", "INVALID_SESSION_CLAIM", "INVALID_CLIENT_CLAIM", "SESSION_TOKEN_EXPIRED", "SESSION_CLOSED", "ENCRYPTION_FAILED", "DECRYPTION_FAILED", "INVALID_SIGNATURE", "NETWORK_ERROR", "RELAY_ERROR", "MESSAGE_QUEUE_FULL", "RATE_LIMIT_EXCEEDED", "ORIGIN_MISMATCH", "REQUEST_PENDING", "REQUEST_NOT_FOUND", "REQUEST_EXPIRED", "REQUEST_INVALID", "REQUEST_TIMEOUT", "SIGNING_FAILED", "SIGNING_REJECTED", "TRANSACTION_INVALID", "CHAIN_MISMATCH"]>;
1493
+ message: z.ZodString;
1494
+ details: z.ZodOptional<z.ZodUnknown>;
1495
+ }, "strip", z.ZodTypeAny, {
1496
+ message: string;
1497
+ code: "SESSION_EXPIRED" | "SESSION_NOT_FOUND" | "SESSION_ALREADY_CLAIMED" | "INVALID_SESSION_CLAIM" | "INVALID_CLIENT_CLAIM" | "SESSION_TOKEN_EXPIRED" | "SESSION_CLOSED" | "ENCRYPTION_FAILED" | "DECRYPTION_FAILED" | "INVALID_SIGNATURE" | "NETWORK_ERROR" | "RELAY_ERROR" | "MESSAGE_QUEUE_FULL" | "RATE_LIMIT_EXCEEDED" | "ORIGIN_MISMATCH" | "REQUEST_PENDING" | "REQUEST_NOT_FOUND" | "REQUEST_EXPIRED" | "REQUEST_INVALID" | "REQUEST_TIMEOUT" | "SIGNING_FAILED" | "SIGNING_REJECTED" | "TRANSACTION_INVALID" | "CHAIN_MISMATCH";
1498
+ details?: unknown;
1499
+ }, {
1500
+ message: string;
1501
+ code: "SESSION_EXPIRED" | "SESSION_NOT_FOUND" | "SESSION_ALREADY_CLAIMED" | "INVALID_SESSION_CLAIM" | "INVALID_CLIENT_CLAIM" | "SESSION_TOKEN_EXPIRED" | "SESSION_CLOSED" | "ENCRYPTION_FAILED" | "DECRYPTION_FAILED" | "INVALID_SIGNATURE" | "NETWORK_ERROR" | "RELAY_ERROR" | "MESSAGE_QUEUE_FULL" | "RATE_LIMIT_EXCEEDED" | "ORIGIN_MISMATCH" | "REQUEST_PENDING" | "REQUEST_NOT_FOUND" | "REQUEST_EXPIRED" | "REQUEST_INVALID" | "REQUEST_TIMEOUT" | "SIGNING_FAILED" | "SIGNING_REJECTED" | "TRANSACTION_INVALID" | "CHAIN_MISMATCH";
1502
+ details?: unknown;
1503
+ }>;
1504
+ declare const frutiLinkSchema: z.ZodEffects<z.ZodString, string, string>;
1505
+ declare const supportedChainIdSchema: z.ZodEffects<z.ZodNumber, number, number>;
1506
+ declare const base64Schema: z.ZodString;
1507
+ declare const sessionIdSchema: z.ZodString;
1508
+ declare const publicKeySchema: z.ZodEffects<z.ZodString, string, string>;
1509
+ declare const validateQRPayload: (payload: unknown) => {
1510
+ sessionId: string;
1511
+ publicKey: string;
1512
+ relayUrl?: string | undefined;
1513
+ providerId?: string | undefined;
1514
+ };
1515
+ declare const validateRelayMessage: (message: unknown) => {
1516
+ type: "sub" | "pub" | "ack" | "error";
1517
+ topic: string;
1518
+ id: string;
1519
+ payload?: {
1520
+ iv: string;
1521
+ ciphertext: string;
1522
+ mac: string;
1523
+ } | undefined;
1524
+ };
1525
+ declare const validateSessionInfo: (info: unknown) => {
1526
+ sessionId: string;
1527
+ metadata: {
1528
+ returnUrl?: string | undefined;
1529
+ };
1530
+ state: "created" | "claimed" | "authenticated" | "active" | "disconnected" | "closed" | "expired" | "rejected";
1531
+ createdAt: string;
1532
+ lastActivity: string;
1533
+ address?: string | undefined;
1534
+ expiresAt?: string | undefined;
1535
+ };
1536
+ declare const validateFrutiLink: (frutiLink: unknown) => string;
1537
+ declare const safeValidateQRPayload: (payload: unknown) => z.SafeParseReturnType<{
1538
+ sessionId: string;
1539
+ publicKey: string;
1540
+ relayUrl?: string | undefined;
1541
+ providerId?: string | undefined;
1542
+ }, {
1543
+ sessionId: string;
1544
+ publicKey: string;
1545
+ relayUrl?: string | undefined;
1546
+ providerId?: string | undefined;
1547
+ }>;
1548
+ declare const safeValidateRelayMessage: (message: unknown) => z.SafeParseReturnType<{
1549
+ type: "sub" | "pub" | "ack" | "error";
1550
+ topic: string;
1551
+ id: string;
1552
+ payload?: {
1553
+ iv: string;
1554
+ ciphertext: string;
1555
+ mac: string;
1556
+ } | undefined;
1557
+ }, {
1558
+ type: "sub" | "pub" | "ack" | "error";
1559
+ topic: string;
1560
+ id: string;
1561
+ payload?: {
1562
+ iv: string;
1563
+ ciphertext: string;
1564
+ mac: string;
1565
+ } | undefined;
1566
+ }>;
1567
+ declare const safeValidateSessionInfo: (info: unknown) => z.SafeParseReturnType<{
1568
+ sessionId: string;
1569
+ metadata: {
1570
+ returnUrl?: string | undefined;
1571
+ };
1572
+ state: "created" | "claimed" | "authenticated" | "active" | "disconnected" | "closed" | "expired" | "rejected";
1573
+ createdAt: string;
1574
+ lastActivity: string;
1575
+ address?: string | undefined;
1576
+ expiresAt?: string | undefined;
1577
+ }, {
1578
+ sessionId: string;
1579
+ metadata: {
1580
+ returnUrl?: string | undefined;
1581
+ };
1582
+ state: "created" | "claimed" | "authenticated" | "active" | "disconnected" | "closed" | "expired" | "rejected";
1583
+ createdAt: string;
1584
+ lastActivity: string;
1585
+ address?: string | undefined;
1586
+ expiresAt?: string | undefined;
1587
+ }>;
1588
+ declare const safeValidateFrutiLink: (frutiLink: unknown) => z.SafeParseReturnType<string, string>;
1589
+ type SIWEFields = z.infer<typeof siweFieldsSchema>;
1590
+ type DAppMetadata = z.infer<typeof dAppMetadataSchema>;
1591
+ type QRPayload = z.infer<typeof qrPayloadSchema>;
1592
+ type EncryptedPayload = z.infer<typeof encryptedPayloadSchema>;
1593
+ type RelayMessage = z.infer<typeof relayMessageSchema>;
1594
+ type SecurityPolicy = z.infer<typeof securityPolicySchema>;
1595
+ type SessionInfo = z.infer<typeof sessionInfoSchema>;
1596
+ type DisplayInfo = z.infer<typeof displayInfoSchema>;
1597
+
1598
+ export { type DAppMetadata, type DisplayInfo, type EncryptedPayload, type QRPayload, type RelayMessage, type SIWEFields, type SecurityPolicy, type SessionInfo, authenticateConnectionPayloadSchema, authenticationDataSchema, bananaLinkErrorSchema, base64Schema, claimSessionPayloadSchema, clientMessageEnvelopeSchema, clientMessagePayloadSchema, clientReconnectPayloadSchema, clientSessionClaimSchema, closeSessionPayloadSchema, connectionAuthenticatedMessageSchema, connectionRejectedMessageSchema, connectionRejectedPayloadSchema, dAppMetadataSchema$1 as coreDAppMetadataSchema, securityPolicySchema$1 as coreSecurityPolicySchema, createSessionRequestSchema, createSessionResponseSchema, dAppMetadataSchema, displayInfoSchema, encryptedPayloadSchema, errorCodeSchema, frutiLinkSchema, originProofSchema, prefetchMetadataPayloadSchema, prefetchMetadataResponseSchema, publicKeySchema, qrPayloadSchema, reconnectedMessageSchema, rejectionDataSchema, relayMessageSchema, relayMessageTypeSchema, relayNotificationMessageSchema, relayToDAppMessageSchema, safeValidateClientMessage, safeValidateClientSessionClaim, safeValidateFrutiLink, safeValidateQRPayload, safeValidateRelayMessage, safeValidateRelayNotificationMessage, safeValidateRelayToDAppMessage, safeValidateSessionInfo, safeValidateWalletMessage, safeValidateWalletSessionClaim, securityPolicySchema, sessionClosedAckSchema, sessionClosedNotificationSchema, sessionConfigSchema, sessionIdSchema, sessionInfoSchema, sessionMetadataSchema, sessionOptionsSchema, sessionStateSchema, siweFieldsSchema, supportedChainIdSchema, validateClientMessage, validateClientSessionClaim, validateFrutiLink, validateQRPayload, validateRelayMessage, validateRelayNotificationMessage, validateRelayToDAppMessage, validateSessionInfo, validateTimestamp, validateWalletMessage, validateWalletSessionClaim, walletHandshakeMessageSchema, walletMessageEnvelopeSchema, walletMessagePayloadSchema, walletMetadataSchema, walletReconnectPayloadSchema, walletSessionClaimSchema };