@frak-labs/core-sdk 0.0.19-beta.f259d7fc → 0.1.0-beta.263acd1e

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 (139) hide show
  1. package/cdn/bundle.iife.js +14 -0
  2. package/dist/actions-CEEObPYc.js +1 -0
  3. package/dist/actions-DbQhWYx8.cjs +1 -0
  4. package/dist/actions.cjs +1 -1
  5. package/dist/actions.d.cts +3 -1400
  6. package/dist/actions.d.ts +3 -1400
  7. package/dist/actions.js +1 -1
  8. package/dist/bundle.cjs +1 -13
  9. package/dist/bundle.d.cts +6 -1927
  10. package/dist/bundle.d.ts +6 -1927
  11. package/dist/bundle.js +1 -13
  12. package/dist/index-7OZ39x1U.d.ts +195 -0
  13. package/dist/index-C6FxkWPC.d.cts +511 -0
  14. package/dist/index-UFX7xCg3.d.ts +351 -0
  15. package/dist/index-d8xS4ryI.d.ts +511 -0
  16. package/dist/index-p4FqSp8z.d.cts +351 -0
  17. package/dist/index-zDq-VlKx.d.cts +195 -0
  18. package/dist/index.cjs +1 -13
  19. package/dist/index.d.cts +4 -1269
  20. package/dist/index.d.ts +4 -1269
  21. package/dist/index.js +1 -13
  22. package/dist/interaction-DMJ3ZfaF.d.cts +45 -0
  23. package/dist/interaction-KX1h9a7V.d.ts +45 -0
  24. package/dist/interactions-DnfM3oe0.js +1 -0
  25. package/dist/interactions-EIXhNLf6.cjs +1 -0
  26. package/dist/interactions.cjs +1 -1
  27. package/dist/interactions.d.cts +2 -182
  28. package/dist/interactions.d.ts +2 -182
  29. package/dist/interactions.js +1 -1
  30. package/dist/openSso-D--Airj6.d.cts +1018 -0
  31. package/dist/openSso-DsKJ4y0j.d.ts +1018 -0
  32. package/dist/productTypes-BUkXJKZ7.cjs +1 -0
  33. package/dist/productTypes-CGb1MmBF.js +1 -0
  34. package/dist/src-B_xO0AR6.cjs +13 -0
  35. package/dist/src-D2d52OZa.js +13 -0
  36. package/dist/trackEvent-CHnYa85W.js +1 -0
  37. package/dist/trackEvent-GuQm_1Nm.cjs +1 -0
  38. package/package.json +24 -19
  39. package/src/actions/displayEmbeddedWallet.test.ts +194 -0
  40. package/src/actions/displayEmbeddedWallet.ts +20 -0
  41. package/src/actions/displayModal.test.ts +387 -0
  42. package/src/actions/displayModal.ts +131 -0
  43. package/src/actions/getProductInformation.test.ts +133 -0
  44. package/src/actions/getProductInformation.ts +14 -0
  45. package/src/actions/index.ts +29 -0
  46. package/src/actions/openSso.test.ts +407 -0
  47. package/src/actions/openSso.ts +116 -0
  48. package/src/actions/prepareSso.test.ts +223 -0
  49. package/src/actions/prepareSso.ts +48 -0
  50. package/src/actions/referral/processReferral.ts +230 -0
  51. package/src/actions/referral/referralInteraction.ts +57 -0
  52. package/src/actions/sendInteraction.test.ts +219 -0
  53. package/src/actions/sendInteraction.ts +32 -0
  54. package/src/actions/trackPurchaseStatus.test.ts +287 -0
  55. package/src/actions/trackPurchaseStatus.ts +53 -0
  56. package/src/actions/watchWalletStatus.test.ts +372 -0
  57. package/src/actions/watchWalletStatus.ts +94 -0
  58. package/src/actions/wrapper/modalBuilder.ts +212 -0
  59. package/src/actions/wrapper/sendTransaction.ts +62 -0
  60. package/src/actions/wrapper/siweAuthenticate.ts +94 -0
  61. package/src/bundle.ts +3 -0
  62. package/src/clients/DebugInfo.ts +182 -0
  63. package/src/clients/createIFrameFrakClient.ts +287 -0
  64. package/src/clients/index.ts +3 -0
  65. package/src/clients/setupClient.test.ts +343 -0
  66. package/src/clients/setupClient.ts +73 -0
  67. package/src/clients/transports/iframeLifecycleManager.test.ts +399 -0
  68. package/src/clients/transports/iframeLifecycleManager.ts +90 -0
  69. package/src/constants/interactionTypes.ts +44 -0
  70. package/src/constants/locales.ts +14 -0
  71. package/src/constants/productTypes.ts +33 -0
  72. package/src/index.ts +101 -0
  73. package/src/interactions/index.ts +5 -0
  74. package/src/interactions/pressEncoder.test.ts +215 -0
  75. package/src/interactions/pressEncoder.ts +53 -0
  76. package/src/interactions/purchaseEncoder.test.ts +291 -0
  77. package/src/interactions/purchaseEncoder.ts +99 -0
  78. package/src/interactions/referralEncoder.test.ts +170 -0
  79. package/src/interactions/referralEncoder.ts +47 -0
  80. package/src/interactions/retailEncoder.test.ts +107 -0
  81. package/src/interactions/retailEncoder.ts +37 -0
  82. package/src/interactions/webshopEncoder.test.ts +56 -0
  83. package/src/interactions/webshopEncoder.ts +30 -0
  84. package/src/types/client.ts +14 -0
  85. package/src/types/compression.ts +22 -0
  86. package/src/types/config.ts +111 -0
  87. package/src/types/context.ts +13 -0
  88. package/src/types/index.ts +71 -0
  89. package/src/types/lifecycle/client.ts +46 -0
  90. package/src/types/lifecycle/iframe.ts +35 -0
  91. package/src/types/lifecycle/index.ts +2 -0
  92. package/src/types/rpc/displayModal.ts +84 -0
  93. package/src/types/rpc/embedded/index.ts +68 -0
  94. package/src/types/rpc/embedded/loggedIn.ts +55 -0
  95. package/src/types/rpc/embedded/loggedOut.ts +28 -0
  96. package/src/types/rpc/interaction.ts +43 -0
  97. package/src/types/rpc/modal/final.ts +46 -0
  98. package/src/types/rpc/modal/generic.ts +46 -0
  99. package/src/types/rpc/modal/index.ts +20 -0
  100. package/src/types/rpc/modal/login.ts +32 -0
  101. package/src/types/rpc/modal/openSession.ts +25 -0
  102. package/src/types/rpc/modal/siweAuthenticate.ts +37 -0
  103. package/src/types/rpc/modal/transaction.ts +33 -0
  104. package/src/types/rpc/productInformation.ts +59 -0
  105. package/src/types/rpc/sso.ts +80 -0
  106. package/src/types/rpc/walletStatus.ts +35 -0
  107. package/src/types/rpc.ts +158 -0
  108. package/src/types/transport.ts +34 -0
  109. package/src/utils/FrakContext.test.ts +407 -0
  110. package/src/utils/FrakContext.ts +158 -0
  111. package/src/utils/compression/b64.test.ts +181 -0
  112. package/src/utils/compression/b64.ts +29 -0
  113. package/src/utils/compression/compress.test.ts +123 -0
  114. package/src/utils/compression/compress.ts +11 -0
  115. package/src/utils/compression/decompress.test.ts +145 -0
  116. package/src/utils/compression/decompress.ts +11 -0
  117. package/src/utils/compression/index.ts +3 -0
  118. package/src/utils/computeProductId.test.ts +80 -0
  119. package/src/utils/computeProductId.ts +11 -0
  120. package/src/utils/constants.test.ts +23 -0
  121. package/src/utils/constants.ts +4 -0
  122. package/src/utils/formatAmount.test.ts +113 -0
  123. package/src/utils/formatAmount.ts +18 -0
  124. package/src/utils/getCurrencyAmountKey.test.ts +44 -0
  125. package/src/utils/getCurrencyAmountKey.ts +15 -0
  126. package/src/utils/getSupportedCurrency.test.ts +51 -0
  127. package/src/utils/getSupportedCurrency.ts +14 -0
  128. package/src/utils/getSupportedLocale.test.ts +64 -0
  129. package/src/utils/getSupportedLocale.ts +16 -0
  130. package/src/utils/iframeHelper.test.ts +450 -0
  131. package/src/utils/iframeHelper.ts +143 -0
  132. package/src/utils/index.ts +21 -0
  133. package/src/utils/sso.test.ts +361 -0
  134. package/src/utils/sso.ts +119 -0
  135. package/src/utils/ssoUrlListener.ts +60 -0
  136. package/src/utils/trackEvent.test.ts +162 -0
  137. package/src/utils/trackEvent.ts +26 -0
  138. package/cdn/bundle.js +0 -19
  139. package/cdn/bundle.js.LICENSE.txt +0 -10
package/dist/index.d.ts CHANGED
@@ -1,1269 +1,4 @@
1
- import type { Address } from 'viem';
2
- import type { Hex } from 'viem';
3
- import type { LifecycleMessage } from '@frak-labs/frame-connector';
4
- import type { OpenPanel } from '@openpanel/web';
5
- import type { RpcClient } from '@frak-labs/frame-connector';
6
- import { RpcMessage } from '@frak-labs/frame-connector';
7
- import { RpcResponse } from '@frak-labs/frame-connector';
8
- import type { SiweMessage } from 'viem/siwe';
9
-
10
- /**
11
- * Decode a base64url encoded string
12
- * @param value The value to decode
13
- * @returns The decoded value
14
- */
15
- export declare function base64urlDecode(value: string): Uint8Array;
16
-
17
- /**
18
- * Encode a buffer to a base64url encoded string
19
- * @param buffer The buffer to encode
20
- * @returns The encoded string
21
- */
22
- export declare function base64urlEncode(buffer: Uint8Array): string;
23
-
24
- /**
25
- * Base props for the iframe
26
- * @ignore
27
- */
28
- export declare const baseIframeProps: {
29
- id: string;
30
- name: string;
31
- title: string;
32
- allow: string;
33
- style: {
34
- width: string;
35
- height: string;
36
- border: string;
37
- position: string;
38
- zIndex: number;
39
- top: string;
40
- left: string;
41
- colorScheme: string;
42
- };
43
- };
44
-
45
- /**
46
- * Event related to the iframe lifecycle
47
- * @ignore
48
- */
49
- export declare type ClientLifecycleEvent = CustomCssEvent | CustomI18nEvent | RestoreBackupEvent | HearbeatEvent | HandshakeResponse | SsoRedirectCompleteEvent;
50
-
51
- /**
52
- * Compress the current Frak context
53
- * @param context - The context to be compressed
54
- * @returns A compressed string containing the Frak context
55
- */
56
- declare function compress(context?: Partial<FrakContext>): string | undefined;
57
-
58
- /**
59
- * The received encoded data from a client
60
- * -> The encoded should contain a HashProtectedData once decoded
61
- * @ignore
62
- */
63
- export declare type CompressedData = Uint8Array;
64
-
65
- /**
66
- * Compress json data
67
- * @param data
68
- * @ignore
69
- */
70
- export declare function compressJsonToB64(data: unknown): string;
71
-
72
- /**
73
- * Create the Frak iframe
74
- * @param args
75
- * @param args.walletBaseUrl - Use `config.walletUrl` instead. Will be removed in future versions.
76
- * @param args.config - The configuration object containing iframe options, including the replacement for `walletBaseUrl`.
77
- */
78
- export declare function createIframe({ walletBaseUrl, config, }: {
79
- walletBaseUrl?: string;
80
- config?: FrakWalletSdkConfig;
81
- }): Promise<HTMLIFrameElement | undefined>;
82
-
83
- /**
84
- * Create a new iframe Frak client
85
- * @param args
86
- * @param args.config - The configuration to use for the Frak Wallet SDK
87
- * @param args.iframe - The iframe to use for the communication
88
- * @returns The created Frak Client
89
- *
90
- * @example
91
- * const frakConfig: FrakWalletSdkConfig = {
92
- * metadata: {
93
- * name: "My app title",
94
- * },
95
- * }
96
- * const iframe = await createIframe({ config: frakConfig });
97
- * const client = createIFrameFrakClient({ config: frakConfig, iframe });
98
- */
99
- export declare function createIFrameFrakClient({ config, iframe, }: {
100
- config: FrakWalletSdkConfig;
101
- iframe: HTMLIFrameElement;
102
- }): FrakClient;
103
-
104
- /**
105
- * All the currencies available
106
- * @category Config
107
- */
108
- export declare type Currency = "eur" | "usd" | "gbp";
109
-
110
- declare type CustomCssEvent = {
111
- clientLifecycle: "modal-css";
112
- data: {
113
- cssLink: string;
114
- };
115
- };
116
-
117
- declare type CustomI18nEvent = {
118
- clientLifecycle: "modal-i18n";
119
- data: {
120
- i18n: I18nConfig;
121
- };
122
- };
123
-
124
- /** @ignore */
125
- export declare class DebugInfoGatherer {
126
- private config?;
127
- private iframe?;
128
- private isSetupDone;
129
- private lastResponse;
130
- private lastRequest;
131
- constructor(config?: FrakWalletSdkConfig, iframe?: HTMLIFrameElement);
132
- setLastResponse(message: RpcMessage, response: RpcResponse): void;
133
- setLastRequest(event: RpcMessage): void;
134
- updateSetupStatus(status: boolean): void;
135
- private base64Encode;
136
- /**
137
- * Extract information from the iframe status
138
- */
139
- private getIframeStatus;
140
- private getNavigatorInfo;
141
- private gatherDebugInfo;
142
- static empty(): DebugInfoGatherer;
143
- /**
144
- * Format Frak debug information
145
- */
146
- formatDebugInfo(error: Error | unknown | string): string;
147
- }
148
-
149
- /**
150
- * Decompress the given Frak context
151
- * @param context - The raw context to be decompressed into a `FrakContext`
152
- * @returns The decompressed Frak context, or undefined if it fails
153
- */
154
- declare function decompress(context?: string): FrakContext | undefined;
155
-
156
- /**
157
- * Decompress json data
158
- * @param data
159
- * @ignore
160
- */
161
- export declare function decompressJsonFromB64<T>(data: string): T | null;
162
-
163
- /**
164
- * The params used to display the embedded wallet
165
- *
166
- * @group Embedded wallet
167
- */
168
- export declare type DisplayEmbeddedWalletParamsType = {
169
- /**
170
- * The embedded view to display once the user is logged in
171
- */
172
- loggedIn?: LoggedInEmbeddedView;
173
- /**
174
- * The embedded view to display once the user is logged out
175
- */
176
- loggedOut?: LoggedOutEmbeddedView;
177
- /**
178
- * Some metadata to customize the embedded view
179
- */
180
- metadata?: {
181
- /**
182
- * The logo to display on the embedded wallet
183
- * If undefined, will default to no logo displayed
184
- */
185
- logo?: string;
186
- /**
187
- * Link to the homepage of the calling website
188
- * If undefined, will default to the domain of the calling website
189
- */
190
- homepageLink?: string;
191
- /**
192
- * The target interaction behind this modal
193
- */
194
- targetInteraction?: FullInteractionTypesKey;
195
- /**
196
- * The position of the component
197
- */
198
- position?: "left" | "right";
199
- /**
200
- * Some i18n override for the displayed modal (i.e. update the displayed text only for this modal)
201
- */
202
- i18n?: I18nConfig;
203
- };
204
- };
205
-
206
- /**
207
- * The result of the display embedded wallet rpc request
208
- *
209
- * @group Embedded wallet
210
- */
211
- export declare type DisplayEmbeddedWalletResultType = {
212
- wallet: Address;
213
- };
214
-
215
- /**
216
- * Params used to display a modal
217
- * @typeParam T - The list of modal steps we expect to have in the modal
218
- * @group Modal Display
219
- */
220
- export declare type DisplayModalParamsType<T extends ModalStepTypes[]> = {
221
- steps: ModalRpcStepsInput<T>;
222
- metadata?: ModalRpcMetadata;
223
- };
224
-
225
- declare type DoBackupEvent = {
226
- iframeLifecycle: "do-backup";
227
- data: {
228
- backup?: string;
229
- };
230
- };
231
-
232
- /**
233
- * The action to display on the logged out embedded view when the user is referred
234
- *
235
- * @group Embedded wallet
236
- */
237
- export declare type EmbeddedViewActionReferred = {
238
- key: "referred";
239
- /**
240
- * No options for a referred action
241
- */
242
- options?: never;
243
- };
244
-
245
- /**
246
- * The different type of action we can have on the embedded view (once the user is logged in)
247
- *
248
- * @group Embedded wallet
249
- */
250
- export declare type EmbeddedViewActionSharing = {
251
- key: "sharing";
252
- /**
253
- * Some sharing options
254
- */
255
- options?: {
256
- /**
257
- * The title that will be displayed on the system popup once the system sharing window is open
258
- * @deprecated Use the top level `config.metadata.i18n` instead
259
- */
260
- popupTitle?: string;
261
- /**
262
- * The text that will be shared alongside the link.
263
- * Can contain the variable {LINK} to specify where the link is placed, otherwise it will be added at the end
264
- * @deprecated Use the top level `config.metadata.i18n` instead
265
- */
266
- text?: string;
267
- /**
268
- * The link to be shared (will be suffixed with the Frak sharing context)
269
- */
270
- link?: string;
271
- };
272
- };
273
-
274
- declare type EventProps = Record<string, unknown>;
275
-
276
- /**
277
- * The different types of final actions we can display in the final step
278
- * @group Modal Display
279
- */
280
- export declare type FinalActionType = {
281
- key: "sharing";
282
- options?: {
283
- /**
284
- * @deprecated Use the top level `config.metadata.i18n` instead
285
- */
286
- popupTitle?: string;
287
- /**
288
- * @deprecated Use the top level `config.metadata.i18n` instead
289
- */
290
- text?: string;
291
- link?: string;
292
- };
293
- } | {
294
- key: "reward";
295
- options?: never;
296
- };
297
-
298
- /**
299
- * The final modal step type, could be used to display sharing options or a success reward screen.
300
- *
301
- * **Input**: What type final step to display?
302
- * **Output**: None
303
- *
304
- * @group Modal Display
305
- */
306
- export declare type FinalModalStepType = GenericModalStepType<"final", {
307
- dismissedMetadata?: ModalStepMetadata["metadata"];
308
- action: FinalActionType;
309
- autoSkip?: boolean;
310
- }, object>;
311
-
312
- export declare function formatAmount(amount: number, currency?: Currency): string;
313
-
314
- /**
315
- * Representing a Frak client, used to interact with the Frak Wallet
316
- */
317
- export declare type FrakClient = {
318
- config: FrakWalletSdkConfig;
319
- debugInfo: {
320
- formatDebugInfo: (error: Error | unknown | string) => string;
321
- };
322
- openPanel?: OpenPanel;
323
- } & IFrameTransport;
324
-
325
- /**
326
- * The current Frak Context
327
- *
328
- * For now, only contain a referrer address.
329
- *
330
- * @ignore
331
- */
332
- export declare type FrakContext = {
333
- r: Address;
334
- };
335
-
336
- /**
337
- * Export our frak context
338
- */
339
- export declare const FrakContextManager: {
340
- compress: typeof compress;
341
- decompress: typeof decompress;
342
- parse: typeof parse;
343
- update: typeof update;
344
- remove: typeof remove;
345
- replaceUrl: typeof replaceUrl;
346
- };
347
-
348
- declare type FrakEvent = "share_button_clicked" | "wallet_button_clicked" | "share_modal_error" | "user_referred";
349
-
350
- /**
351
- * Represent an iframe event
352
- */
353
- export declare type FrakLifecycleEvent = IFrameLifecycleEvent | ClientLifecycleEvent;
354
-
355
- /**
356
- * Configuration for the Frak Wallet SDK
357
- * @category Config
358
- */
359
- export declare type FrakWalletSdkConfig = {
360
- /**
361
- * The Frak wallet url
362
- * @defaultValue "https://wallet.frak.id"
363
- */
364
- walletUrl?: string;
365
- /**
366
- * Some metadata about your implementation of the Frak SDK
367
- */
368
- metadata: {
369
- /**
370
- * Your application name (will be displayed in a few modals and in SSO)
371
- */
372
- name: string;
373
- /**
374
- * Language to display in the modal
375
- * If undefined, will default to the browser language
376
- */
377
- lang?: Language;
378
- /**
379
- * The currency to display in the modal
380
- * @defaultValue `"eur"`
381
- */
382
- currency?: Currency;
383
- /**
384
- * The logo URL that will be displayed in a few components
385
- */
386
- logoUrl?: string;
387
- /**
388
- * The homepage link that could be displayed in a few components
389
- */
390
- homepageLink?: string;
391
- };
392
- /**
393
- * Some customization for the modal
394
- */
395
- customizations?: {
396
- /**
397
- * Custom CSS styles to apply to the modals and components
398
- */
399
- css?: `${string}.css`;
400
- /**
401
- * Custom i18n configuration for the modal
402
- */
403
- i18n?: I18nConfig;
404
- };
405
- /**
406
- * The domain name of your application
407
- * @defaultValue window.location.host
408
- */
409
- domain?: string;
410
- };
411
-
412
- /**
413
- * The keys for each interaction types (e.g. `press.openArticle`) -> category_type.interaction_type
414
- * @inline
415
- */
416
- export declare type FullInteractionTypesKey = {
417
- [Category in keyof typeof interactionTypes]: `${Category & string}.${keyof (typeof interactionTypes)[Category] & string}`;
418
- }[keyof typeof interactionTypes];
419
-
420
- /**
421
- * Represent a generic modal step type
422
- * @ignore
423
- * @inline
424
- */
425
- declare type GenericModalStepType<TKey, TParams, TReturns> = {
426
- key: TKey;
427
- params: TParams extends never ? ModalStepMetadata : ModalStepMetadata & TParams;
428
- returns: TReturns;
429
- };
430
-
431
- /**
432
- * Get the currency amount key for a given currency
433
- * @param currency - The currency to use
434
- * @returns The currency amount key
435
- */
436
- export declare function getCurrencyAmountKey(currency?: Currency): keyof TokenAmountType;
437
-
438
- /**
439
- * Response of the `frak_getProductInformation` RPC method
440
- * @group RPC Schema
441
- */
442
- export declare type GetProductInformationReturnType = {
443
- /**
444
- * Current product id
445
- */
446
- id: Hex;
447
- /**
448
- * Some metadata
449
- */
450
- onChainMetadata: {
451
- /**
452
- * Name of the product on-chain
453
- */
454
- name: string;
455
- /**
456
- * Domain of the product on-chain
457
- */
458
- domain: string;
459
- /**
460
- * The supported product types
461
- */
462
- productTypes: ProductTypesKey[];
463
- };
464
- /**
465
- * The max potential reward for the referrer
466
- */
467
- maxReferrer?: TokenAmountType;
468
- /**
469
- * The max potential reward for the referee
470
- */
471
- maxReferee?: TokenAmountType;
472
- /**
473
- * List of all the potentials reward arround this product
474
- */
475
- rewards: {
476
- token: Address;
477
- campaign: Address;
478
- interactionTypeKey: FullInteractionTypesKey;
479
- referrer: TokenAmountType;
480
- referee: TokenAmountType;
481
- }[];
482
- };
483
-
484
- /**
485
- * Get the supported currency for a given currency
486
- * @param currency - The currency to use
487
- * @returns The supported currency
488
- */
489
- export declare function getSupportedCurrency(currency?: Currency): Currency;
490
-
491
- /**
492
- * Get the supported locale for a given currency
493
- * @param currency - The currency to use
494
- * @returns The supported locale
495
- */
496
- export declare function getSupportedLocale(currency?: Currency): (typeof locales)[LocalesKey];
497
-
498
- declare type HandshakeRequestEvent = {
499
- iframeLifecycle: "handshake";
500
- data: {
501
- token: string;
502
- };
503
- };
504
-
505
- declare type HandshakeResponse = {
506
- clientLifecycle: "handshake-response";
507
- data: {
508
- token: string;
509
- currentUrl: string;
510
- };
511
- };
512
-
513
- /**
514
- * The encoded data to send to a client / received by a client
515
- * @ignore
516
- */
517
- export declare type HashProtectedData<DataType> = Readonly<DataType & {
518
- validationHash: string;
519
- }>;
520
-
521
- declare type HearbeatEvent = {
522
- clientLifecycle: "heartbeat";
523
- data?: never;
524
- };
525
-
526
- /**
527
- * Custom i18n configuration for the modal
528
- * See [i18next json format](https://www.i18next.com/misc/json-format#i18next-json-v4)
529
- *
530
- * Available variables
531
- * - `{{ productName }}` : The name of your website (`metadata.name`)
532
- * - `{{ productOrigin }}` : The origin url of your website
533
- * - `{{ estimatedReward }}` : The estimated reward for the user (based on the specific `targetInteraction` you can specify, or the max referrer reward if no target interaction is specified)
534
- *
535
- * Context of the translation [see i18n context](https://www.i18next.com/translation-function/context)
536
- * - For modal display, the key of the final action (`sharing`, `reward`, or undefined)
537
- * - For embedded wallet display, the key of the logged in action (`sharing` or undefined)
538
- *
539
- * @example
540
- * ```ts
541
- * // Multi language config
542
- * const multiI18n = {
543
- * fr: {
544
- * "sdk.modal.title": "Titre de modal",
545
- * "sdk.modal.description": "Description de modal, avec {{ estimatedReward }} de gains possible",
546
- * },
547
- * en: "https://example.com/en.json"
548
- * }
549
- *
550
- * // Single language config
551
- * const singleI18n = {
552
- * "sdk.modal.title": "Modal title",
553
- * "sdk.modal.description": "Modal description, with {{ estimatedReward }} of gains possible",
554
- * }
555
- * ```
556
- *
557
- * @category Config
558
- */
559
- export declare type I18nConfig = Record<Language, LocalizedI18nConfig> | LocalizedI18nConfig;
560
-
561
- /**
562
- * Event related to the iframe lifecycle
563
- * @ignore
564
- */
565
- export declare type IFrameLifecycleEvent = {
566
- iframeLifecycle: "connected" | "show" | "hide" | "remove-backup";
567
- data?: never;
568
- } | DoBackupEvent | HandshakeRequestEvent | RedirectRequestEvent;
569
-
570
- /**
571
- * RPC interface that's used for the iframe communication
572
- *
573
- * Define all the methods available within the iFrame RPC client with response type annotations
574
- *
575
- * @group RPC Schema
576
- *
577
- * @remarks
578
- * Each method in the schema now includes a ResponseType field that indicates:
579
- * - "promise": One-shot request that resolves once
580
- * - "stream": Streaming request that can emit multiple values
581
- *
582
- * ### Methods:
583
- *
584
- * #### frak_listenToWalletStatus
585
- * - Params: None
586
- * - Returns: {@link WalletStatusReturnType}
587
- * - Response Type: stream (emits updates when wallet status changes)
588
- *
589
- * #### frak_displayModal
590
- * - Params: [requests: {@link ModalRpcStepsInput}, metadata?: {@link ModalRpcMetadata}, configMetadata: {@link FrakWalletSdkConfig}["metadata"]]
591
- * - Returns: {@link ModalRpcStepsResultType}
592
- * - Response Type: promise (one-shot)
593
- *
594
- * #### frak_sendInteraction
595
- * - Params: [productId: Hex, interaction: {@link PreparedInteraction}, signature?: Hex]
596
- * - Returns: {@link SendInteractionReturnType}
597
- * - Response Type: promise (one-shot)
598
- *
599
- * #### frak_sso
600
- * - Params: [params: {@link OpenSsoParamsType}, name: string, customCss?: string]
601
- * - Returns: {@link OpenSsoReturnType}
602
- * - Response Type: promise (one-shot)
603
- *
604
- * #### frak_getProductInformation
605
- * - Params: None
606
- * - Returns: {@link GetProductInformationReturnType}
607
- * - Response Type: promise (one-shot)
608
- *
609
- * #### frak_displayEmbeddedWallet
610
- * - Params: [request: {@link DisplayEmbeddedWalletParamsType}, metadata: {@link FrakWalletSdkConfig}["metadata"]]
611
- * - Returns: {@link DisplayEmbeddedWalletResultType}
612
- * - Response Type: promise (one-shot)
613
- */
614
- export declare type IFrameRpcSchema = [
615
- /**
616
- * Method used to listen to the wallet status
617
- * This is a streaming method that emits updates when wallet status changes
618
- */
619
- {
620
- Method: "frak_listenToWalletStatus";
621
- Parameters?: undefined;
622
- ReturnType: WalletStatusReturnType;
623
- },
624
- /**
625
- * Method to display a modal with the provided steps
626
- * This is a one-shot request
627
- */
628
- {
629
- Method: "frak_displayModal";
630
- Parameters: [
631
- requests: ModalRpcStepsInput,
632
- metadata: ModalRpcMetadata | undefined,
633
- configMetadata: FrakWalletSdkConfig["metadata"]
634
- ];
635
- ReturnType: ModalRpcStepsResultType;
636
- },
637
- /**
638
- * Method to transmit a user interaction
639
- * This is a one-shot request
640
- */
641
- {
642
- Method: "frak_sendInteraction";
643
- Parameters: [
644
- productId: Hex,
645
- interaction: PreparedInteraction,
646
- signature?: Hex
647
- ];
648
- ReturnType: SendInteractionReturnType;
649
- },
650
- /**
651
- * Method to start a SSO
652
- * This is a one-shot request
653
- */
654
- {
655
- Method: "frak_sso";
656
- Parameters: [
657
- params: OpenSsoParamsType,
658
- name: string,
659
- customCss?: string
660
- ];
661
- ReturnType: OpenSsoReturnType;
662
- },
663
- /**
664
- * Method to get current product information's
665
- * - Is product minted?
666
- * - Does it have running campaign?
667
- * - Estimated reward on actions
668
- * This is a one-shot request
669
- */
670
- {
671
- Method: "frak_getProductInformation";
672
- Parameters?: undefined;
673
- ReturnType: GetProductInformationReturnType;
674
- },
675
- /**
676
- * Method to show the embedded wallet, with potential customization
677
- * This is a one-shot request
678
- */
679
- {
680
- Method: "frak_displayEmbeddedWallet";
681
- Parameters: [
682
- request: DisplayEmbeddedWalletParamsType,
683
- metadata: FrakWalletSdkConfig["metadata"]
684
- ];
685
- ReturnType: DisplayEmbeddedWalletResultType;
686
- }
687
- ];
688
-
689
- /**
690
- * IFrame transport interface
691
- */
692
- export declare type IFrameTransport = {
693
- /**
694
- * Wait for the connection to be established
695
- */
696
- waitForConnection: Promise<boolean>;
697
- /**
698
- * Wait for the setup to be done
699
- */
700
- waitForSetup: Promise<void>;
701
- /**
702
- * Function used to perform a single request via the iframe transport
703
- */
704
- request: RpcClient<IFrameRpcSchema, LifecycleMessage>["request"];
705
- /**
706
- * Function used to listen to a request response via the iframe transport
707
- */
708
- listenerRequest: RpcClient<IFrameRpcSchema, LifecycleMessage>["listen"];
709
- /**
710
- * Function used to destroy the iframe transport
711
- */
712
- destroy: () => Promise<void>;
713
- };
714
-
715
- /**
716
- * Each interactions types according to the product types
717
- */
718
- export declare const interactionTypes: {
719
- readonly press: {
720
- readonly openArticle: "0xc0a24ffb";
721
- readonly readArticle: "0xd5bd0fbe";
722
- };
723
- readonly dapp: {
724
- readonly proofVerifiableStorageUpdate: "0x2ab2aeef";
725
- readonly callableVerifiableStorageUpdate: "0xa07da986";
726
- };
727
- readonly webshop: {
728
- readonly open: "0xb311798f";
729
- };
730
- readonly referral: {
731
- readonly referred: "0x010cc3b9";
732
- readonly createLink: "0xb2c0f17c";
733
- };
734
- readonly purchase: {
735
- readonly started: "0xd87e90c3";
736
- readonly completed: "0x8403aeb4";
737
- readonly unsafeCompleted: "0x4d5b14e0";
738
- };
739
- readonly retail: {
740
- readonly customerMeeting: "0x74489004";
741
- };
742
- };
743
-
744
- /**
745
- * The final keys for each interaction types (e.g. `openArticle`) -> interaction type
746
- * @inline
747
- */
748
- export declare type InteractionTypesKey = {
749
- [K in keyof typeof interactionTypes]: keyof (typeof interactionTypes)[K];
750
- }[keyof typeof interactionTypes];
751
-
752
- /**
753
- * Represent a key provider used for the hashed and secure compression
754
- * @ignore
755
- */
756
- export declare type KeyProvider<DataType> = (value: DataType) => string[];
757
-
758
- /**
759
- * All the languages available
760
- * @category Config
761
- */
762
- export declare type Language = "fr" | "en";
763
-
764
- /**
765
- * Map the currency to the locale
766
- */
767
- export declare const locales: {
768
- readonly eur: "fr-FR";
769
- readonly usd: "en-US";
770
- readonly gbp: "en-GB";
771
- };
772
-
773
- /**
774
- * The keys for each locales
775
- * @inline
776
- */
777
- export declare type LocalesKey = keyof typeof locales;
778
-
779
- /**
780
- * A localized i18n config
781
- * @category Config
782
- */
783
- export declare type LocalizedI18nConfig = `${string}.css` | {
784
- [key: string]: string;
785
- };
786
-
787
- /**
788
- * Some configuration options for the embedded view
789
- *
790
- * @group Embedded wallet
791
- */
792
- export declare type LoggedInEmbeddedView = {
793
- /**
794
- * The main action to display on the logged in embedded view
795
- */
796
- action?: EmbeddedViewActionSharing | EmbeddedViewActionReferred;
797
- };
798
-
799
- /**
800
- * The view when a user is logged out
801
- * @group Embedded wallet
802
- */
803
- export declare type LoggedOutEmbeddedView = {
804
- /**
805
- * Metadata option when displaying the embedded view
806
- */
807
- metadata?: {
808
- /**
809
- * The main CTA for the logged out view
810
- * - can include some variable, available ones are:
811
- * - {REWARD} -> The maximum reward a user can receive when interacting on your website
812
- * - can be formatted in markdown
813
- *
814
- * If not set, it will default to a internationalized message
815
- * @deprecated Use the top level `config.customizations.i18n`, or `metadata.i18n` instead
816
- */
817
- text?: string;
818
- /**
819
- * The text that will be displayed on the login button
820
- *
821
- * If not set, it will default to a internationalized message
822
- * @deprecated Use the top level `config.customizations.i18n`, or `metadata.i18n` instead
823
- */
824
- buttonText?: string;
825
- };
826
- };
827
-
828
- /**
829
- * The login step for a Modal
830
- *
831
- * **Input**: Do we allow SSO or not? Is yes then the SSO metadata
832
- * **Output**: The logged in wallet address
833
- *
834
- * @group Modal Display
835
- */
836
- export declare type LoginModalStepType = GenericModalStepType<"login", LoginWithSso | LoginWithoutSso, {
837
- wallet: Address;
838
- }>;
839
-
840
- /** @inline */
841
- declare type LoginWithoutSso = {
842
- allowSso?: false;
843
- ssoMetadata?: never;
844
- };
845
-
846
- /** @inline */
847
- declare type LoginWithSso = {
848
- allowSso: true;
849
- ssoMetadata?: SsoMetadata;
850
- };
851
-
852
- /**
853
- * RPC metadata for the modal, used on top level modal configuration
854
- * @group Modal Display
855
- * @group RPC Schema
856
- */
857
- export declare type ModalRpcMetadata = {
858
- header?: {
859
- title?: string;
860
- icon?: string;
861
- };
862
- targetInteraction?: FullInteractionTypesKey;
863
- /**
864
- * Some i18n override for the displayed modal (i.e. update the displayed text only for this modal)
865
- */
866
- i18n?: I18nConfig;
867
- } & ({
868
- isDismissible: true;
869
- /**
870
- * @deprecated Use `config.customizations.i18n` or `metadata.i18n` instead
871
- */
872
- dismissActionTxt?: string;
873
- } | {
874
- isDismissible?: false;
875
- dismissActionTxt?: never;
876
- });
877
-
878
- /**
879
- * Type for the RPC input of a modal
880
- * Just the `params` type of each `ModalStepTypes`
881
- * @typeParam T - The list of modal steps we expect to have in the modal
882
- * @group Modal Display
883
- * @group RPC Schema
884
- */
885
- export declare type ModalRpcStepsInput<T extends ModalStepTypes[] = ModalStepTypes[]> = {
886
- [K in T[number]["key"]]?: Extract<T[number], {
887
- key: K;
888
- }>["params"];
889
- };
890
-
891
- /**
892
- * Type for the result of a modal request
893
- * Just the `returns` type of each `ModalStepTypes`
894
- * @typeParam T - The list of modal steps we expect to have in the modal
895
- * @group Modal Display
896
- * @group RPC Schema
897
- */
898
- export declare type ModalRpcStepsResultType<T extends ModalStepTypes[] = ModalStepTypes[]> = {
899
- [K in T[number]["key"]]: Extract<T[number], {
900
- key: K;
901
- }>["returns"];
902
- };
903
-
904
- /**
905
- * Metadata that can be used to customize a modal step
906
- * @group Modal Display
907
- * @deprecated Use the top level `config.customizations.i18n`, or `metadata.i18n` instead
908
- */
909
- export declare type ModalStepMetadata = {
910
- metadata?: {
911
- /**
912
- * Custom title for the step
913
- * If none provided, it will use an internationalized text
914
- * @deprecated Use the top level `config.customizations.i18n`, or `metadata.i18n` instead
915
- */
916
- title?: string;
917
- /**
918
- * Custom description for the step
919
- * If none provided, it will use an internationalized text
920
- * @deprecated Use the top level `config.customizations.i18n`, or `metadata.i18n` instead
921
- */
922
- description?: string;
923
- /**
924
- * Custom text for the primary action of the step
925
- * If none provided, it will use an internationalized text
926
- * @deprecated Use the top level `config.customizations.i18n`, or `metadata.i18n` instead
927
- */
928
- primaryActionText?: string;
929
- /**
930
- * Custom text for the secondary action of the step
931
- * If none provided, it will use an internationalized text
932
- * @deprecated Use the top level `config.customizations.i18n`, or `metadata.i18n` instead
933
- */
934
- secondaryActionText?: string;
935
- };
936
- };
937
-
938
- /**
939
- * Generic type of steps we will display in the modal to the end user
940
- * @group Modal Display
941
- */
942
- export declare type ModalStepTypes = LoginModalStepType | SiweAuthenticateModalStepType | SendTransactionModalStepType | OpenInteractionSessionModalStepType | FinalModalStepType;
943
-
944
- /**
945
- * The open interaction session step for a Modal
946
- *
947
- * **Input**: None
948
- * **Output**: The interactions session period (start and end timestamp)
949
- *
950
- * @group Modal Display
951
- */
952
- export declare type OpenInteractionSessionModalStepType = GenericModalStepType<"openSession", object, OpenInteractionSessionReturnType>;
953
-
954
- /**
955
- * Return type of the open session modal step
956
- * @inline
957
- * @ignore
958
- */
959
- export declare type OpenInteractionSessionReturnType = {
960
- startTimestamp: number;
961
- endTimestamp: number;
962
- };
963
-
964
- /**
965
- * Params to start a SSO
966
- * @group RPC Schema
967
- */
968
- export declare type OpenSsoParamsType = {
969
- /**
970
- * Redirect URL after the SSO (optional)
971
- */
972
- redirectUrl?: string;
973
- /**
974
- * If the SSO should directly exit after completion
975
- * @defaultValue true
976
- */
977
- directExit?: boolean;
978
- /**
979
- * If true, opens SSO in same window instead of popup
980
- * Defaults to true when redirectUrl is provided, false otherwise
981
- */
982
- openInSameWindow?: boolean;
983
- /**
984
- * Language of the SSO page (optional)
985
- * It will default to the current user language (or "en" if unsupported language)
986
- */
987
- lang?: "en" | "fr";
988
- /**
989
- * Custom SSO metadata
990
- */
991
- metadata: SsoMetadata;
992
- };
993
-
994
- /**
995
- * Response after an SSO has been openned
996
- */
997
- export declare type OpenSsoReturnType = {
998
- /**
999
- * Optional wallet address, returned when SSO completes via postMessage
1000
- * Note: Only present when SSO flow completes (not immediately on open)
1001
- */
1002
- wallet?: Hex;
1003
- };
1004
-
1005
- /**
1006
- * Parse the current URL into a Frak Context
1007
- * @param args
1008
- * @param args.url - The url to parse
1009
- * @returns The parsed Frak context
1010
- */
1011
- declare function parse({ url }: {
1012
- url: string;
1013
- }): FrakContext | null | undefined;
1014
-
1015
- /**
1016
- * Represent a prepared user interaction, ready to be sent on-chain via the wallet
1017
- */
1018
- export declare type PreparedInteraction = {
1019
- handlerTypeDenominator: Hex;
1020
- interactionData: Hex;
1021
- };
1022
-
1023
- /**
1024
- * List of the product types per denominator
1025
- */
1026
- export declare const productTypes: {
1027
- dapp: number;
1028
- press: number;
1029
- webshop: number;
1030
- retail: number;
1031
- referral: number;
1032
- purchase: number;
1033
- };
1034
-
1035
- /**
1036
- * The keys for each product types
1037
- * @inline
1038
- */
1039
- export declare type ProductTypesKey = keyof typeof productTypes;
1040
-
1041
- /**
1042
- * Bitmask for each product types
1043
- */
1044
- export declare const productTypesMask: Record<ProductTypesKey, bigint>;
1045
-
1046
- declare type RedirectRequestEvent = {
1047
- iframeLifecycle: "redirect";
1048
- data: {
1049
- /**
1050
- * The base url to redirect to
1051
- * If it contain a query param `u`, the client need will suffix the current url to the base url
1052
- */
1053
- baseRedirectUrl: string;
1054
- };
1055
- };
1056
-
1057
- /**
1058
- * Remove Frak context from current url
1059
- * @param url - The url to update
1060
- * @returns The new url without the Frak context
1061
- */
1062
- declare function remove(url: string): string;
1063
-
1064
- /**
1065
- * Replace the current url with the given Frak context
1066
- * @param args
1067
- * @param args.url - The url to update
1068
- * @param args.context - The context to update
1069
- */
1070
- declare function replaceUrl({ url: baseUrl, context, }: {
1071
- url?: string;
1072
- context: Partial<FrakContext> | null;
1073
- }): void;
1074
-
1075
- declare type RestoreBackupEvent = {
1076
- clientLifecycle: "restore-backup";
1077
- data: {
1078
- backup: string;
1079
- };
1080
- };
1081
-
1082
- /**
1083
- * Parameters that will be used to send an interaction to the blockchain
1084
- * @inline
1085
- */
1086
- export declare type SendInteractionParamsType = {
1087
- /**
1088
- * The product id where this interaction has been made
1089
- * @defaultValue keccak256(toHex(window.location.host))
1090
- */
1091
- productId?: Hex;
1092
- /**
1093
- * The prepared interaction, built from an Interaction Encoder
1094
- */
1095
- interaction: PreparedInteraction;
1096
- /**
1097
- * A pre-computed interaction signature
1098
- * If none provided, the delegated interaction validator of your product will sign it (you can manage it in the business dashboard)
1099
- *
1100
- * @defaultValue undefined
1101
- */
1102
- validation?: Hex;
1103
- };
1104
-
1105
- /**
1106
- * Return type of the send interaction rpc request
1107
- * @group RPC Schema
1108
- */
1109
- export declare type SendInteractionReturnType = {
1110
- /**
1111
- * The id of the interaction in the interaction pool
1112
- */
1113
- delegationId: string;
1114
- };
1115
-
1116
- /**
1117
- * The send transaction step for a Modal
1118
- *
1119
- * **Input**: Either a single tx or an array of tx to be sent
1120
- * **Output**: The hash of the tx(s) hash (in case of multiple tx, still returns a single hash because it's bundled on the wallet level)
1121
- *
1122
- * @group Modal Display
1123
- */
1124
- export declare type SendTransactionModalStepType = GenericModalStepType<"sendTransaction", {
1125
- tx: SendTransactionTxType | SendTransactionTxType[];
1126
- }, SendTransactionReturnType>;
1127
-
1128
- /**
1129
- * Return type of the send transaction rpc request
1130
- * @inline
1131
- */
1132
- export declare type SendTransactionReturnType = {
1133
- hash: Hex;
1134
- };
1135
-
1136
- /**
1137
- * Generic format representing a tx to be sent
1138
- */
1139
- export declare type SendTransactionTxType = {
1140
- to: Address;
1141
- data?: Hex;
1142
- value?: Hex;
1143
- };
1144
-
1145
- /**
1146
- * Directly setup the Frak client with an iframe
1147
- * Return when the FrakClient is ready (setup and communication estbalished with the wallet)
1148
- *
1149
- * @param config - The configuration to use for the Frak Wallet SDK
1150
- * @returns a Promise with the Frak Client
1151
- *
1152
- * @example
1153
- * const frakConfig: FrakWalletSdkConfig = {
1154
- * metadata: {
1155
- * name: "My app title",
1156
- * },
1157
- * }
1158
- * const client = await setupClient({ config: frakConfig });
1159
- */
1160
- export declare function setupClient({ config, }: {
1161
- config: FrakWalletSdkConfig;
1162
- }): Promise<FrakClient | undefined>;
1163
-
1164
- /**
1165
- * The SIWE authentication step for a Modal
1166
- *
1167
- * **Input**: SIWE message parameters
1168
- * **Output**: SIWE result (message signed and wallet signature)
1169
- *
1170
- * @group Modal Display
1171
- */
1172
- export declare type SiweAuthenticateModalStepType = GenericModalStepType<"siweAuthenticate", {
1173
- siwe: SiweAuthenticationParams;
1174
- }, SiweAuthenticateReturnType>;
1175
-
1176
- /**
1177
- * Return type of the Siwe transaction rpc request
1178
- * @inline
1179
- */
1180
- export declare type SiweAuthenticateReturnType = {
1181
- signature: Hex;
1182
- message: string;
1183
- };
1184
-
1185
- /**
1186
- * Parameters used send a SIWE rpc request
1187
- */
1188
- export declare type SiweAuthenticationParams = Omit<SiweMessage, "address" | "chainId" | "expirationTime" | "issuedAt" | "notBefore"> & {
1189
- expirationTimeTimestamp?: number;
1190
- notBeforeTimestamp?: number;
1191
- };
1192
-
1193
- /**
1194
- * SSO Metadata
1195
- */
1196
- export declare type SsoMetadata = {
1197
- /**
1198
- * URL to your client, if provided will be displayed in the SSO header
1199
- */
1200
- logoUrl?: string;
1201
- /**
1202
- * Link to your homepage, if referenced your app name will contain a link on the sso page
1203
- */
1204
- homepageLink?: string;
1205
- };
1206
-
1207
- declare type SsoRedirectCompleteEvent = {
1208
- clientLifecycle: "sso-redirect-complete";
1209
- data: {
1210
- compressed: string;
1211
- };
1212
- };
1213
-
1214
- /**
1215
- * The type for the amount of tokens
1216
- */
1217
- export declare type TokenAmountType = {
1218
- amount: number;
1219
- eurAmount: number;
1220
- usdAmount: number;
1221
- gbpAmount: number;
1222
- };
1223
-
1224
- export declare function trackEvent(client: FrakClient | undefined, event: FrakEvent, props?: EventProps): void;
1225
-
1226
- /**
1227
- * Populate the current url with the given Frak context
1228
- * @param args
1229
- * @param args.url - The url to update
1230
- * @param args.context - The context to update
1231
- * @returns The new url with the Frak context
1232
- */
1233
- declare function update({ url, context, }: {
1234
- url?: string;
1235
- context: Partial<FrakContext>;
1236
- }): string | null;
1237
-
1238
- /**
1239
- * @ignore
1240
- * @inline
1241
- */
1242
- declare type WalletConnected = {
1243
- key: "connected";
1244
- wallet: Address;
1245
- interactionToken?: string;
1246
- interactionSession?: {
1247
- startTimestamp: number;
1248
- endTimestamp: number;
1249
- };
1250
- };
1251
-
1252
- /**
1253
- * @ignore
1254
- * @inline
1255
- */
1256
- declare type WalletNotConnected = {
1257
- key: "not-connected";
1258
- wallet?: never;
1259
- interactionToken?: never;
1260
- interactionSession?: never;
1261
- };
1262
-
1263
- /**
1264
- * RPC Response for the method `frak_listenToWalletStatus`
1265
- * @group RPC Schema
1266
- */
1267
- export declare type WalletStatusReturnType = WalletConnected | WalletNotConnected;
1268
-
1269
- export { }
1
+ import { A as SiweAuthenticateReturnType, B as FinalActionType, C as ModalRpcStepsInput, D as SendTransactionReturnType, E as SendTransactionModalStepType, F as OpenSsoParamsType, G as interactionTypes, H as ModalStepMetadata, I as OpenSsoReturnType, J as Currency, K as IFrameLifecycleEvent, L as PrepareSsoParamsType, M as OpenInteractionSessionModalStepType, N as OpenInteractionSessionReturnType, O as SendTransactionTxType, P as LoginModalStepType, Q as LocalizedI18nConfig, R as PrepareSsoReturnType, S as ModalRpcMetadata, T as ModalStepTypes, U as FullInteractionTypesKey, V as FinalModalStepType, W as InteractionTypesKey, X as I18nConfig, Y as FrakWalletSdkConfig, Z as Language, _ as LoggedOutEmbeddedView, a as FrakClient, b as LoggedInEmbeddedView, c as IFrameRpcSchema, d as TokenAmountType, f as ProductTypesKey, g as DisplayEmbeddedWalletResultType, h as DisplayEmbeddedWalletParamsType, i as FrakContext, j as SiweAuthenticationParams, k as SiweAuthenticateModalStepType, l as WalletStatusReturnType, m as productTypesMask, n as ssoPopupFeatures, o as FrakLifecycleEvent, p as productTypes, q as ClientLifecycleEvent, r as ssoPopupName, s as IFrameTransport, u as GetProductInformationReturnType, v as EmbeddedViewActionReferred, w as ModalRpcStepsResultType, x as DisplayModalParamsType, y as EmbeddedViewActionSharing, z as SsoMetadata } from "./openSso-DsKJ4y0j.js";
2
+ import { n as SendInteractionParamsType, r as SendInteractionReturnType, t as PreparedInteraction } from "./interaction-KX1h9a7V.js";
3
+ import { C as CompressedData, S as createIFrameFrakClient, T as KeyProvider, _ as base64urlEncode, a as generateSsoUrl, b as setupClient, c as findIframeInOpener, d as getCurrencyAmountKey, f as formatAmount, g as base64urlDecode, h as compressJsonToB64, i as FullSsoParams, l as getSupportedLocale, m as decompressJsonFromB64, n as AppSpecificSsoMetadata, o as baseIframeProps, p as FrakContextManager, r as CompressedSsoData, s as createIframe, t as trackEvent, u as getSupportedCurrency, v as LocalesKey, w as HashProtectedData, x as DebugInfoGatherer, y as locales } from "./index-UFX7xCg3.js";
4
+ export { AppSpecificSsoMetadata, ClientLifecycleEvent, CompressedData, CompressedSsoData, Currency, DebugInfoGatherer, DisplayEmbeddedWalletParamsType, DisplayEmbeddedWalletResultType, DisplayModalParamsType, EmbeddedViewActionReferred, EmbeddedViewActionSharing, FinalActionType, FinalModalStepType, FrakClient, FrakContext, FrakContextManager, FrakLifecycleEvent, FrakWalletSdkConfig, FullInteractionTypesKey, FullSsoParams, GetProductInformationReturnType, HashProtectedData, I18nConfig, IFrameLifecycleEvent, IFrameRpcSchema, IFrameTransport, InteractionTypesKey, KeyProvider, Language, LocalesKey, LocalizedI18nConfig, LoggedInEmbeddedView, LoggedOutEmbeddedView, LoginModalStepType, ModalRpcMetadata, ModalRpcStepsInput, ModalRpcStepsResultType, ModalStepMetadata, ModalStepTypes, OpenInteractionSessionModalStepType, OpenInteractionSessionReturnType, OpenSsoParamsType, OpenSsoReturnType, PrepareSsoParamsType, PrepareSsoReturnType, PreparedInteraction, ProductTypesKey, SendInteractionParamsType, SendInteractionReturnType, SendTransactionModalStepType, SendTransactionReturnType, SendTransactionTxType, SiweAuthenticateModalStepType, SiweAuthenticateReturnType, SiweAuthenticationParams, SsoMetadata, TokenAmountType, WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, compressJsonToB64, createIFrameFrakClient, createIframe, decompressJsonFromB64, findIframeInOpener, formatAmount, generateSsoUrl, getCurrencyAmountKey, getSupportedCurrency, getSupportedLocale, interactionTypes, locales, productTypes, productTypesMask, setupClient, ssoPopupFeatures, ssoPopupName, trackEvent };