@block-auth.io/core 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1698 @@
1
+ import * as _wagmi_core from '@wagmi/core';
2
+ import * as viem from 'viem';
3
+ import * as nanostores from 'nanostores';
4
+ import { PublicClientApplication, AuthenticationResult } from '@azure/msal-browser';
5
+
6
+ interface DeletionServiceDeps {
7
+ provider: {
8
+ disconnect: () => void;
9
+ };
10
+ }
11
+ /**
12
+ * Whether a backend error message means the account's restoration period has
13
+ * expired (i.e. the account is permanently deleted).
14
+ */
15
+ declare function isRestorationExpiredMessage(message: unknown): boolean;
16
+ /**
17
+ * Wipe every SDK-owned localStorage key (preserving the extension-installed
18
+ * marker) and tell the extension to reset itself.
19
+ */
20
+ declare function clearRemainingAuthData(): void;
21
+ /**
22
+ * The account can no longer be restored: clear the remaining auth data and
23
+ * surface the "restoration expired" modal (on top of a clean modal stack).
24
+ */
25
+ declare function handleRestorationExpired(): void;
26
+ /**
27
+ * Full teardown after the user acknowledges the restoration-expired modal:
28
+ * clear storage and reset every deletion/signing UI flag so the app returns
29
+ * to a pristine signed-out state.
30
+ */
31
+ declare function finalizeAfterRestorationExpired(): void;
32
+ /**
33
+ * Route a failed restore attempt: expired-restoration errors surface the
34
+ * restoration-expired modal; anything else logs and re-opens the restore
35
+ * modal so the user can retry.
36
+ */
37
+ declare function handleRestoreFailure(error: unknown): void;
38
+ interface RestoreResult {
39
+ success: boolean;
40
+ expired?: boolean;
41
+ data?: unknown;
42
+ }
43
+ interface RestoreSocket {
44
+ connected?: boolean;
45
+ on: (event: string, cb: (data: any) => void) => void;
46
+ off: (event: string, cb: (data: any) => void) => void;
47
+ emit: (event: string, data: unknown) => void;
48
+ }
49
+ /**
50
+ * Emit `sdk:restore` and wait for the outcome. Resolves `{success: true}` on
51
+ * restore, `{success: false, expired: true}` when the restoration period has
52
+ * expired (either via the `sdk:restore` error message or a concurrent
53
+ * `signin:userDeleted`), and rejects on other failures or timeout.
54
+ *
55
+ * Listens on the RAW socket (`wsc.ws`) so the temporary listeners can coexist
56
+ * with the auth runtime's permanent ones (WsClient.on rejects duplicates).
57
+ */
58
+ declare function requestSdkRestore(wsc: {
59
+ ws?: RestoreSocket | null;
60
+ }, { token, address }: {
61
+ token?: string;
62
+ address?: string;
63
+ }, timeoutMs?: number): Promise<RestoreResult>;
64
+ /**
65
+ * Framework-agnostic deletion service. Handles
66
+ * `signin:userDeleted` / `signin:corrupted` events: validates the address
67
+ * (against the session/external DIDs, the pending deletion address, or an
68
+ * orphaned deletion state), wipes the right storage scope, resets state, and
69
+ * surfaces the "restoration expired" modal. Idempotent for the lifetime of
70
+ * the instance; `resetHandlingState()` re-arms it after a successful auth.
71
+ */
72
+ declare function createDeletionService(deps: DeletionServiceDeps): {
73
+ handleUserDeleted: (forAddress?: string | null) => boolean;
74
+ resetHandlingState: () => void;
75
+ };
76
+
77
+ /**
78
+ * This class allow you to use WebSocket API
79
+ * for Block-Auth service
80
+ *
81
+ * @class WsClient
82
+ * @param reconnect - Allow to automatically reconnect
83
+ * to the WebSocket API
84
+ * @returns WsClient
85
+ * @example
86
+ *
87
+ * import { WsClient } from '@blockauth/sdk'
88
+ * const client = new WsClient()
89
+ * await client.connect()
90
+ *
91
+ */
92
+ declare class WsClient {
93
+ private _wsUrl;
94
+ private _wsConfig;
95
+ private _uiConfig;
96
+ private _ws;
97
+ private _accessToken;
98
+ private _refreshToken;
99
+ private _user;
100
+ private _users;
101
+ private _roles;
102
+ private _logs;
103
+ private _kycIssuerByAddress;
104
+ constructor(url?: string, reconnect?: boolean);
105
+ /**
106
+ * Check if the WebSocket API is connected
107
+ * to Block-Auth service
108
+ * @returns boolean
109
+ */
110
+ isConnected(): any;
111
+ /**
112
+ * Allow you to connect to the WebSocket API
113
+ * for Block-Auth service
114
+ * @param waitMs - time to wait for connection ready
115
+ * @returns Promise<void>
116
+ */
117
+ connect(url?: string, waitMs?: number, retries?: number): Promise<void>;
118
+ /**
119
+ * Allow you to subscribe to an event, and
120
+ * verify if the event is already subscribed
121
+ * for Block-Auth service
122
+ * @param event - Event name
123
+ * @param callback - Callback function
124
+ * @returns void
125
+ */
126
+ on(event: string, callback: (...args: any[]) => void): void;
127
+ /**
128
+ * Allow you to unsubscribe to an event, and
129
+ * verify if the event is already unsubscribed
130
+ * for Block-Auth service
131
+ * @param event - Event name
132
+ * @param callback - Callback function
133
+ * @returns void
134
+ */
135
+ off(event: string, callback: (...args: any[]) => void): void;
136
+ /**
137
+ * Allow you to emit an event, and
138
+ * verify if the event is already emitted
139
+ * for Block-Auth service
140
+ * @param event - Event name
141
+ * @param data - Data to send
142
+ * @returns void
143
+ */
144
+ emit(event: string, data: any): void;
145
+ /**
146
+ * Allow you to close the connection
147
+ * to the WebSocket API for Block-Auth service
148
+ * @returns void
149
+ */
150
+ close(): void;
151
+ /**
152
+ * Event fired when the WebSocket API
153
+ * is connected to Block-Auth service
154
+ * @returns void
155
+ */
156
+ onConnect(): void;
157
+ /**
158
+ * Event fired when the WebSocket API
159
+ * got an error on reconnection to Block-Auth service
160
+ */
161
+ onReconnectError(err: any): void;
162
+ /**
163
+ * Event fired when the WebSocket API
164
+ * try to reconnect to Block-Auth service
165
+ * @param attempt - Number of attempt
166
+ */
167
+ onReconnectAttempt(attempt: number): void;
168
+ /**
169
+ * Event fired when the WebSocket API
170
+ * need to signin to Block-Auth service
171
+ * @param data - Data received from Block-Auth service
172
+ * @returns void
173
+ * @example
174
+ * ```typescript
175
+ * {
176
+ * success: true,
177
+ * message: {
178
+ * accessToken
179
+ * refreshToken
180
+ * }
181
+ * }
182
+ * ```
183
+ * */
184
+ onSdkSignin(data: any): any;
185
+ /**
186
+ * Event fired when the WebSocket API
187
+ * need to refresh the signin to Block-Auth service
188
+ * @param data - Data received from Block-Auth service
189
+ * @returns void
190
+ * @example
191
+ * ```typescript
192
+ * {
193
+ * "success": true,
194
+ * "message": {
195
+ * accessToken
196
+ * refreshToken
197
+ * }
198
+ * }
199
+ * ```
200
+ * */
201
+ onSdkRefresh(data: any): void;
202
+ /**
203
+ * Event fired when the WebSocket API
204
+ * need to check if an address is signed for
205
+ * current APP at this current time
206
+ * @param data - Data received from Block-Auth service
207
+ * @returns void
208
+ * @example
209
+ * ```typescript
210
+ * {
211
+ "success": false,
212
+ "message": "User not signed in APP yet"
213
+ }
214
+ * ```
215
+ * */
216
+ onSdkSign(data: any): void;
217
+ /**
218
+ * Event fired when the WebSocket API
219
+ * need to get APP config from Block-Auth service
220
+ * @param data - Data received from Block-Auth service
221
+ * @returns void
222
+ * @example
223
+ * ```typescript
224
+ * {
225
+ "success": true,
226
+ "message": {
227
+ "domain": "example.com",
228
+ "config": { ... }
229
+ }
230
+ }
231
+ * ```
232
+ * */
233
+ onSdkApp(data: any): void;
234
+ /**
235
+ * Event fired when the WebSocket API
236
+ * need to get APP user from Block-Auth service
237
+ * @param data - Data received from Block-Auth service
238
+ * @returns void
239
+ * @example
240
+ * ```typescript
241
+ * {
242
+ "success": true,
243
+ "message": {
244
+ "items": [ {
245
+ ...profileProperties
246
+ "did": "did:564",
247
+ "address": "0x564",
248
+ } ],
249
+ }
250
+ }
251
+ * ```
252
+ * */
253
+ onSdkUser(data: any): void;
254
+ /**
255
+ * Event fired when the WebSocket API
256
+ * need to get APP users from Block-Auth service
257
+ * @param data - Data received from Block-Auth service
258
+ * @returns void
259
+ * @example
260
+ * ```typescript
261
+ * {
262
+ "success": true,
263
+ "message": {
264
+ "pages": 1,
265
+ "items": [ ... ],
266
+ "total": 1,
267
+ }
268
+ }
269
+ * ```
270
+ * */
271
+ onSdkUsers(data: any): void;
272
+ /**
273
+ * Event fired when the WebSocket API
274
+ * need to get APP roles from Block-Auth service
275
+ * @param data - Data received from Block-Auth service
276
+ * @returns void
277
+ * @example
278
+ * ```typescript
279
+ * {
280
+ "success": true,
281
+ "message": {
282
+ "pages": 1,
283
+ "items": [ ... ],
284
+ "total": 1,
285
+ }
286
+ }
287
+ * ```
288
+ * */
289
+ onSdkRoles(data: any): void;
290
+ /**
291
+ * Event fired when the WebSocket API
292
+ * need to get APP logs from Block-Auth service
293
+ * @param data - Data received from Block-Auth service
294
+ * @returns void
295
+ * @example
296
+ * ```typescript
297
+ * {
298
+ "success": true,
299
+ "message": {
300
+ "pages": 1,
301
+ "items": [ ... ],
302
+ "total": 1,
303
+ }
304
+ }
305
+ * ```
306
+ * */
307
+ onSdkLogs(data: any): void;
308
+ onSdkKycIssuer(data: any): void;
309
+ /**
310
+ * Event fired when the WebSocket API
311
+ * is disconnected from Block-Auth service
312
+ */
313
+ onDisconnect(reason: string): void;
314
+ /**
315
+ * Get SocketIO instance
316
+ */
317
+ get ws(): any;
318
+ /**
319
+ * Get WebSocket access token
320
+ */
321
+ get accessToken(): string;
322
+ /**
323
+ * Get WebSocket refresh token
324
+ */
325
+ get refreshToken(): string;
326
+ /**
327
+ * Get WebSocket APP config
328
+ */
329
+ get uiConfig(): any;
330
+ /**
331
+ * Get WebSocket APP user
332
+ */
333
+ get user(): any;
334
+ /**
335
+ * Get WebSocket APP users
336
+ */
337
+ get users(): any[];
338
+ /**
339
+ * Get WebSocket APP roles
340
+ */
341
+ get roles(): any[];
342
+ /**
343
+ * Get WebSocket APP logs
344
+ */
345
+ get logs(): any[];
346
+ /**
347
+ * Get WebSocket APP issuer for an address
348
+ * if module KYC is enabled
349
+ */
350
+ get kycIssuerByAddress(): any;
351
+ }
352
+
353
+ /**
354
+ * This class allow you to use WebSocket API
355
+ *
356
+ * examples:
357
+ *
358
+ * const client = new WsClient();
359
+ *
360
+ */
361
+ declare class RpcClient {
362
+ private rpcUrl;
363
+ constructor();
364
+ }
365
+
366
+ type BlockAuthUserRole = {
367
+ slug: string;
368
+ name: string;
369
+ };
370
+ type BlockAuthUserProfile = {
371
+ roles?: BlockAuthUserRole[];
372
+ [key: string]: unknown;
373
+ };
374
+ declare const getUserRoles: (user?: BlockAuthUserProfile | null) => BlockAuthUserRole[];
375
+ /** Human-readable role names (primary API for client apps). */
376
+ declare const getUserRoleNames: (user?: BlockAuthUserProfile | null) => string[];
377
+ /** Technical role slugs (advanced / internal identification). */
378
+ declare const getUserRoleSlugs: (user?: BlockAuthUserProfile | null) => string[];
379
+ declare const hasRole: (user: BlockAuthUserProfile | null | undefined, roleName: string) => boolean;
380
+ declare const hasRoleBySlug: (user: BlockAuthUserProfile | null | undefined, roleSlug: string) => boolean;
381
+ declare const hasAnyRole: (user: BlockAuthUserProfile | null | undefined, roleNames: string[]) => boolean;
382
+ declare const hasAnyRoleBySlug: (user: BlockAuthUserProfile | null | undefined, roleSlugs: string[]) => boolean;
383
+
384
+ /**
385
+ * This class allow you to authenticate with your BlockAuth
386
+ * wallet and get the data from your user and/or tenant.
387
+ *
388
+ * examples:
389
+ *
390
+ * const provider = new BlockAuthProvider();
391
+ *
392
+ */
393
+ declare class BlockAuthProvider {
394
+ private _rpc;
395
+ private _wsc;
396
+ private _apiKey;
397
+ private _apiSecret;
398
+ constructor(apiKey?: string, apiSecret?: string, wsUrl?: string);
399
+ /**
400
+ * Allow you to connect to the WebSocket API
401
+ * for Block-Auth service
402
+ * @param waitMs - time to wait for connection ready
403
+ * @returns Promise<void>
404
+ */
405
+ connect(waitMs?: number, url?: string, retries?: number): Promise<void>;
406
+ /**
407
+ * Allow you to disconnect from the WebSocket API
408
+ * for Block-Auth service
409
+ * @returns Promise<void>
410
+ */
411
+ disconnect(): Promise<void>;
412
+ /**
413
+ * Check if the WebSocket API is connected
414
+ * to Block-Auth service
415
+ * @returns boolean
416
+ */
417
+ isConnected(): any;
418
+ /**
419
+ * Allow to Signin with your API Key and Secret
420
+ * to get the access token and refresh token.
421
+ * The access token is valid for 1 hour.
422
+ * The refresh token is valid for 2 hours.
423
+ * You can use the refresh token to get a new
424
+ * access token when the access token is expired using
425
+ * the method `refresh()`.
426
+ * @param apiKey - your API Key
427
+ * @param apiSecret - your API Secret
428
+ * @returns Promise<any>
429
+ */
430
+ signin(): Promise<any>;
431
+ /**
432
+ * Allow to refresh the access token when it's expired.
433
+ * @param refreshToken - your refresh token
434
+ * @returns Promise<any>
435
+ */
436
+ refresh(refreshToken?: string): Promise<any>;
437
+ /**
438
+ * Allow to get the data from your user.
439
+ * @param success - allow to know if address is signed
440
+ * @param message - extended info about signed address
441
+ * @returns Promise<any>
442
+ */
443
+ isAddressSigned(address: string, token?: string): Promise<any>;
444
+ /**
445
+ * Allow to get the data from your app.
446
+ * @param token - your access token
447
+ * @returns Promise<any>
448
+ */
449
+ app(token?: string): Promise<any>;
450
+ user(address: string, token?: string): Promise<any>;
451
+ /**
452
+ * Allow to get a list of users from your app, also
453
+ * you can filter by role and/or permission.
454
+ * @param token - your access token
455
+ * @param data - the data to filter
456
+ * @returns Promise<any>
457
+ */
458
+ users(token?: string, data?: any): Promise<any>;
459
+ /**
460
+ * Allow to get a list of roles from your app.
461
+ * @param token - your access token
462
+ * @param data - the data to filter
463
+ * @returns Promise<any>
464
+ * */
465
+ roles(token?: string, data?: any): Promise<any>;
466
+ /**
467
+ * Allow to get a list of logs from your app.
468
+ * @param token - your access token
469
+ * @param data - the data to filter
470
+ * @returns Promise<any>
471
+ */
472
+ logs(token?: string, data?: any): Promise<any>;
473
+ /**
474
+ * Allow to get KYC issuer for a certain user address from your app.
475
+ * @param address - the address of the user to be paid by the issuer
476
+ * @param data - the data to connect to the KYC issuer
477
+ * { operationId, sessionId, extraData }
478
+ * @param token - your access token
479
+ * @returns Promise<any>
480
+ */
481
+ kycIssuer(address: string, data?: any, token?: string): Promise<any>;
482
+ get rpc(): RpcClient;
483
+ get wsc(): WsClient;
484
+ get socket(): any;
485
+ get uiConfig(): any;
486
+ get appUsers(): any[];
487
+ get appRoles(): any[];
488
+ get appLogs(): any[];
489
+ get appKycIssuerByAddress(): any;
490
+ /**
491
+ * Cached user profile loaded via `user()` (includes `roles` for this app).
492
+ */
493
+ get currentUser(): BlockAuthUserProfile;
494
+ /**
495
+ * Role names assigned to the loaded user profile in this app.
496
+ */
497
+ get roleNames(): string[];
498
+ /**
499
+ * Role slugs assigned to the loaded user profile in this app.
500
+ */
501
+ get roleSlugs(): string[];
502
+ /**
503
+ * Check whether the loaded user profile has a given app role name.
504
+ */
505
+ hasRole(roleName: string): boolean;
506
+ /**
507
+ * Check whether the loaded user profile has a given app role slug.
508
+ */
509
+ hasRoleBySlug(roleSlug: string): boolean;
510
+ /**
511
+ * Check whether the loaded user profile has at least one of the given role names.
512
+ */
513
+ hasAnyRole(roleNames: string[]): boolean;
514
+ /**
515
+ * Check whether the loaded user profile has at least one of the given role slugs.
516
+ */
517
+ hasAnyRoleBySlug(roleSlugs: string[]): boolean;
518
+ }
519
+
520
+ /**
521
+ * A transaction/permission request surfaced by the backend over `user:txns`.
522
+ * Kept permissive (extra backend fields allowed) while the full txn shape is
523
+ * finalized; `id` and `state` are the fields the UI relies on today.
524
+ */
525
+ interface TxnRequest {
526
+ id: number | string;
527
+ state?: 'initial' | 'accepted' | 'rejected' | string;
528
+ [key: string]: unknown;
529
+ }
530
+ interface WsState {
531
+ ready: boolean;
532
+ did: string | null;
533
+ token: string | null;
534
+ apiKey: string | null;
535
+ requests: TxnRequest[];
536
+ }
537
+ declare const $ws: nanostores.MapStore<WsState>;
538
+ declare const setReady: (ready: boolean) => void;
539
+ declare const setToken: (token: string | null) => void;
540
+ declare const setDid: (did: string | null) => void;
541
+ declare const setApiKey: (apiKey: string | null) => void;
542
+ declare const setRequests: (requests: TxnRequest[]) => void;
543
+ declare const resetWs: () => void;
544
+
545
+ interface UiState {
546
+ isSdkSignedIn: boolean;
547
+ uiConfig: Record<string, unknown> | null;
548
+ isServiceConnected: boolean;
549
+ serviceIcon: string | null;
550
+ serviceName: string | null;
551
+ isAppActive: boolean;
552
+ isCheckingAppActive: boolean;
553
+ isSignedFirstCheck: boolean;
554
+ isSigning: boolean;
555
+ isSigned: boolean;
556
+ isSigningLoader: boolean;
557
+ isAcceptingTxn: boolean;
558
+ waitingForSuccessLogInSince: number;
559
+ isOnDeletion: boolean;
560
+ deletionAddress: string | null;
561
+ }
562
+ declare const $ui: nanostores.MapStore<UiState>;
563
+ declare const setIsSdkSignedIn: (v: boolean) => void;
564
+ declare const setUiConfig: (v: UiState["uiConfig"]) => void;
565
+ declare const setIsServiceConnected: (v: boolean) => void;
566
+ declare const setServiceIcon: (v: string | null) => void;
567
+ declare const setServiceName: (v: string | null) => void;
568
+ declare const setIsAppActive: (v: boolean) => void;
569
+ declare const setIsCheckingAppActive: (v: boolean) => void;
570
+ declare const setIsSignedFirstCheck: (v: boolean) => void;
571
+ declare const setIsSigning: (v: boolean) => void;
572
+ declare const setIsSigned: (v: boolean) => void;
573
+ declare const setIsSigningLoader: (v: boolean) => void;
574
+ declare const setIsAcceptingTxn: (v: boolean) => void;
575
+ declare const setWaitingForSuccessLogInSince: (v: number) => void;
576
+ declare const setIsOnDeletion: (v: boolean) => void;
577
+ declare const setDeletionAddress: (v: string | null) => void;
578
+ declare const resetUi: () => void;
579
+
580
+ /** Minimal provider surface needed to load a user profile (test-friendly). */
581
+ interface UserProfileProvider {
582
+ isConnected?: () => boolean;
583
+ user: (address: string, token?: string) => Promise<any>;
584
+ }
585
+ interface UserState {
586
+ user: BlockAuthUserProfile | null;
587
+ isLoadingUser: boolean;
588
+ }
589
+ declare const $user: nanostores.MapStore<UserState>;
590
+ declare const setUser: (user: BlockAuthUserProfile | null) => void;
591
+ declare const setIsLoadingUser: (isLoadingUser: boolean) => void;
592
+ declare const resetUser: () => void;
593
+ /**
594
+ * Loads the signed-in user profile for the current client app, including app
595
+ * roles (normalized via `getUserRoles`).
596
+ */
597
+ declare function loadUserProfile(provider: UserProfileProvider | null | undefined, address: string | null | undefined): Promise<BlockAuthUserProfile | null>;
598
+ /**
599
+ * Fetches and stores the current user profile (including app roles).
600
+ * Used after sdk:sign and when clients need an explicit refresh.
601
+ */
602
+ declare function fetchUserProfile(provider: UserProfileProvider | null | undefined, address: string | null | undefined): Promise<BlockAuthUserProfile | null>;
603
+
604
+ type ModalName = 'signin' | 'signup' | 'restore' | 'restorationExpired';
605
+ /**
606
+ * Stack of open modals (order = stacking order; the last entry is the topmost).
607
+ * A stack — instead of a single value — lets modals overlay each other, e.g. the
608
+ * txn `signin` modal opens on top of the `signup` card while it stays behind.
609
+ */
610
+ declare const $openModals: nanostores.WritableAtom<ModalName[]>;
611
+ /** Open (or bring to front) a modal. */
612
+ declare const openModal: (name: ModalName) => void;
613
+ /** Close a specific modal, or — with no argument — the topmost one. */
614
+ declare const closeModal: (name?: ModalName) => void;
615
+ /** Close every open modal. */
616
+ declare const closeAllModals: () => void;
617
+ /** Whether a given modal is currently open. */
618
+ declare const isModalOpen: (name: ModalName, stack?: ModalName[]) => boolean;
619
+
620
+ type WalletKind = 'evm' | 'solana' | null;
621
+ interface WalletState {
622
+ kind: WalletKind;
623
+ address: string | null;
624
+ chainId: number | null;
625
+ isConnecting: boolean;
626
+ error: string | null;
627
+ }
628
+ declare const $wallet: nanostores.MapStore<WalletState>;
629
+ declare const resetWallet: () => void;
630
+
631
+ interface ExtensionState {
632
+ installed: boolean;
633
+ isLocked: boolean;
634
+ isUser: boolean;
635
+ isUserActive: boolean;
636
+ }
637
+ declare const $extension: nanostores.MapStore<ExtensionState>;
638
+ declare const setExtensionInstalled: (v: boolean) => void;
639
+ declare const setExtensionIsLocked: (v: boolean) => void;
640
+ declare const setExtensionIsUser: (v: boolean) => void;
641
+ declare const setExtensionIsUserActive: (v: boolean) => void;
642
+ declare const resetExtension: () => void;
643
+ /**
644
+ * The BlockAuth extension should offer the sign-in entry point only when it is
645
+ * installed, the user exists and is active, and the extension is unlocked.
646
+ * Mirrors `useStoreExtension.isShowSignin` from the React SDK.
647
+ */
648
+ declare const isShowSignin: (state?: ExtensionState) => boolean;
649
+
650
+ interface Web3SignupState {
651
+ backendMessage: string | null;
652
+ signature: string | null;
653
+ signedBy: string | null;
654
+ }
655
+ declare const $web3: nanostores.MapStore<Web3SignupState>;
656
+ declare const setBackendMessage: (v: string | null) => void;
657
+ declare const setSignature: (v: string | null) => void;
658
+ declare const setSignedBy: (v: string | null) => void;
659
+ declare const resetWeb3: () => void;
660
+
661
+ type Locale = 'en' | 'es';
662
+ declare const $locale: nanostores.WritableAtom<Locale>;
663
+ declare const setLocale: (l: Locale) => void;
664
+
665
+ type GoogleFlow = 'auth-code' | 'implicit';
666
+ interface GoogleConfig {
667
+ clientId: string;
668
+ /** OAuth scopes; defaults to openid email profile. */
669
+ scope?: string;
670
+ }
671
+ interface GoogleSignInResult {
672
+ /** The flow used for this sign-in. */
673
+ flow: GoogleFlow;
674
+ /** Authorization code (auth-code flow). */
675
+ code?: string;
676
+ /** Access token (implicit flow). */
677
+ accessToken?: string;
678
+ /** Seconds until the access token expires (implicit flow). */
679
+ expiresIn?: number;
680
+ }
681
+ /**
682
+ * Configure the Google OAuth client.
683
+ */
684
+ declare function configureGoogle(cfg: GoogleConfig): void;
685
+ /**
686
+ * Starts the Google sign-in popup: 'auth-code' resolves with a `code` (for the
687
+ * backend to exchange), 'implicit' resolves with an `access_token` +
688
+ * `expiresIn`. On success the $ui atom is updated to reflect the connected
689
+ * Google service.
690
+ *
691
+ * @param flow 'auth-code' (default) | 'implicit'.
692
+ * @param overrides optional clientId/scope overrides.
693
+ */
694
+ declare function signInWithGoogle(flow?: GoogleFlow, overrides?: Partial<GoogleConfig>): Promise<GoogleSignInResult>;
695
+
696
+ type MicrosoftAuthorityMode = 'common' | 'tenant';
697
+ interface MicrosoftConfig {
698
+ clientId: string;
699
+ tenantId?: string | null;
700
+ authorityMode?: MicrosoftAuthorityMode;
701
+ redirectUri?: string;
702
+ }
703
+ interface MicrosoftSignInResult {
704
+ accessToken: string;
705
+ /** Full MSAL authentication result, for callers that need it. */
706
+ response: AuthenticationResult;
707
+ }
708
+ /**
709
+ * Configure the Microsoft OAuth client.
710
+ *
711
+ * Eagerly builds and initializes the MSAL instance (when running in the
712
+ * browser with a clientId) so the sign-in click can call loginPopup() without
713
+ * first awaiting initialize(). That intervening async hop dropped the browser's
714
+ * transient user activation, which made the popup open as a dead about:blank
715
+ * window that never navigated to the Microsoft login page.
716
+ */
717
+ declare function configureMicrosoft(cfg: MicrosoftConfig): void;
718
+ /**
719
+ * Builds (or returns the cached) MSAL PublicClientApplication. The instance is
720
+ * initialized before use as required by msal-browser v3+.
721
+ */
722
+ declare function getMicrosoftProvider(overrides?: Partial<MicrosoftConfig>): Promise<PublicClientApplication>;
723
+ /**
724
+ * Performs the Microsoft login popup flow and reflects the connected state
725
+ * into $ui.
726
+ *
727
+ * @returns the access token and the full MSAL response.
728
+ */
729
+ declare function signInWithMicrosoft(overrides?: Partial<MicrosoftConfig>): Promise<MicrosoftSignInResult>;
730
+
731
+ type index$1_GoogleConfig = GoogleConfig;
732
+ type index$1_GoogleFlow = GoogleFlow;
733
+ type index$1_GoogleSignInResult = GoogleSignInResult;
734
+ type index$1_MicrosoftAuthorityMode = MicrosoftAuthorityMode;
735
+ type index$1_MicrosoftConfig = MicrosoftConfig;
736
+ type index$1_MicrosoftSignInResult = MicrosoftSignInResult;
737
+ declare const index$1_configureGoogle: typeof configureGoogle;
738
+ declare const index$1_configureMicrosoft: typeof configureMicrosoft;
739
+ declare const index$1_getMicrosoftProvider: typeof getMicrosoftProvider;
740
+ declare const index$1_signInWithGoogle: typeof signInWithGoogle;
741
+ declare const index$1_signInWithMicrosoft: typeof signInWithMicrosoft;
742
+ declare namespace index$1 {
743
+ export { type index$1_GoogleConfig as GoogleConfig, type index$1_GoogleFlow as GoogleFlow, type index$1_GoogleSignInResult as GoogleSignInResult, type index$1_MicrosoftAuthorityMode as MicrosoftAuthorityMode, type index$1_MicrosoftConfig as MicrosoftConfig, type index$1_MicrosoftSignInResult as MicrosoftSignInResult, index$1_configureGoogle as configureGoogle, index$1_configureMicrosoft as configureMicrosoft, index$1_getMicrosoftProvider as getMicrosoftProvider, index$1_signInWithGoogle as signInWithGoogle, index$1_signInWithMicrosoft as signInWithMicrosoft };
744
+ }
745
+
746
+ interface BlockAuthClientConfig {
747
+ apiKey: string;
748
+ apiSecret: string;
749
+ wsUrl?: string;
750
+ /** Timeout (ms) por intento del connect inicial del WS. Default 300 —
751
+ * puede quedarse corto en orígenes con más latencia (p.ej. PRE sin CDN). */
752
+ wsConnectTimeout?: number;
753
+ /** Reintentos del connect inicial del WS. Default 3. */
754
+ wsConnectRetries?: number;
755
+ /** Opcional: sin él, la conexión por QR de WalletConnect queda deshabilitada. */
756
+ walletConnectProjectId?: string;
757
+ rpcUrl?: string;
758
+ locale?: 'en' | 'es';
759
+ google?: {
760
+ clientId: string;
761
+ scope?: string;
762
+ };
763
+ microsoft?: {
764
+ clientId: string;
765
+ tenantId: string;
766
+ authorityMode?: 'common' | 'tenant';
767
+ redirectUri?: string;
768
+ };
769
+ }
770
+ declare function createBlockAuthClient(config: BlockAuthClientConfig): {
771
+ state: {
772
+ $ws: nanostores.MapStore<WsState>;
773
+ $ui: nanostores.MapStore<UiState>;
774
+ $wallet: nanostores.MapStore<WalletState>;
775
+ $openModals: nanostores.WritableAtom<ModalName[]>;
776
+ $user: nanostores.MapStore<UserState>;
777
+ };
778
+ connect: (waitMs?: number | undefined, url?: string | undefined, retries?: number | undefined) => Promise<void>;
779
+ disconnect: () => Promise<void>;
780
+ signin: () => Promise<any>;
781
+ refresh: (t?: string) => Promise<any>;
782
+ app: (t?: string) => Promise<any>;
783
+ user: (addr: string, t?: string) => Promise<any>;
784
+ users: (t?: string, d?: unknown) => Promise<any>;
785
+ roles: (t?: string, d?: unknown) => Promise<any>;
786
+ logs: (t?: string, d?: unknown) => Promise<any>;
787
+ kycIssuer: (addr: string, d?: unknown, t?: string) => Promise<any>;
788
+ isAddressSigned: (addr: string, t?: string) => Promise<any>;
789
+ wallet: {
790
+ evm: {
791
+ config: _wagmi_core.Config<readonly [{
792
+ blockExplorers: {
793
+ readonly default: {
794
+ readonly name: "Etherscan";
795
+ readonly url: "https://etherscan.io";
796
+ readonly apiUrl: "https://api.etherscan.io/api";
797
+ };
798
+ };
799
+ blockTime: 12000;
800
+ contracts: {
801
+ readonly ensUniversalResolver: {
802
+ readonly address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee";
803
+ readonly blockCreated: 23085558;
804
+ };
805
+ readonly multicall3: {
806
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
807
+ readonly blockCreated: 14353601;
808
+ };
809
+ };
810
+ ensTlds?: readonly string[] | undefined;
811
+ id: 1;
812
+ name: "Ethereum";
813
+ nativeCurrency: {
814
+ readonly name: "Ether";
815
+ readonly symbol: "ETH";
816
+ readonly decimals: 18;
817
+ };
818
+ experimental_preconfirmationTime?: number | undefined | undefined;
819
+ rpcUrls: {
820
+ readonly default: {
821
+ readonly http: readonly ["https://eth.merkle.io"];
822
+ };
823
+ };
824
+ sourceId?: number | undefined | undefined;
825
+ testnet?: boolean | undefined | undefined;
826
+ custom?: Record<string, unknown> | undefined;
827
+ extendSchema?: Record<string, unknown> | undefined;
828
+ fees?: viem.ChainFees<undefined> | undefined;
829
+ formatters?: undefined;
830
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
831
+ client: viem.Client;
832
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
833
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
834
+ client: viem.Client;
835
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
836
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
837
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
838
+ }] | undefined;
839
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
840
+ verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
841
+ }], {
842
+ 1: viem.HttpTransport<undefined, false>;
843
+ }, readonly [_wagmi_core.CreateConnectorFn<{
844
+ on: <event extends keyof viem.EIP1193EventMap>(event: event, listener: viem.EIP1193EventMap[event]) => void;
845
+ removeListener: <event extends keyof viem.EIP1193EventMap>(event: event, listener: viem.EIP1193EventMap[event]) => void;
846
+ request: viem.EIP1193RequestFn<viem.EIP1474Methods>;
847
+ isApexWallet?: true | undefined;
848
+ isAvalanche?: true | undefined;
849
+ isBackpack?: true | undefined;
850
+ isBifrost?: true | undefined;
851
+ isBitKeep?: true | undefined;
852
+ isBitski?: true | undefined;
853
+ isBlockWallet?: true | undefined;
854
+ isBraveWallet?: true | undefined;
855
+ isCoinbaseWallet?: true | undefined;
856
+ isDawn?: true | undefined;
857
+ isEnkrypt?: true | undefined;
858
+ isExodus?: true | undefined;
859
+ isFrame?: true | undefined;
860
+ isFrontier?: true | undefined;
861
+ isGamestop?: true | undefined;
862
+ isHyperPay?: true | undefined;
863
+ isImToken?: true | undefined;
864
+ isKuCoinWallet?: true | undefined;
865
+ isMathWallet?: true | undefined;
866
+ isMetaMask?: true | undefined;
867
+ isOkxWallet?: true | undefined;
868
+ isOKExWallet?: true | undefined;
869
+ isOneInchAndroidWallet?: true | undefined;
870
+ isOneInchIOSWallet?: true | undefined;
871
+ isOpera?: true | undefined;
872
+ isPhantom?: true | undefined;
873
+ isPortal?: true | undefined;
874
+ isRabby?: true | undefined;
875
+ isRainbow?: true | undefined;
876
+ isStatus?: true | undefined;
877
+ isTally?: true | undefined;
878
+ isTokenPocket?: true | undefined;
879
+ isTokenary?: true | undefined;
880
+ isTrust?: true | undefined;
881
+ isTrustWallet?: true | undefined;
882
+ isUniswapWallet?: true | undefined;
883
+ isXDEFI?: true | undefined;
884
+ isZerion?: true | undefined;
885
+ providers?: {
886
+ on: <event extends keyof viem.EIP1193EventMap>(event: event, listener: viem.EIP1193EventMap[event]) => void;
887
+ removeListener: <event extends keyof viem.EIP1193EventMap>(event: event, listener: viem.EIP1193EventMap[event]) => void;
888
+ request: viem.EIP1193RequestFn<viem.EIP1474Methods>;
889
+ isApexWallet?: true | undefined;
890
+ isAvalanche?: true | undefined;
891
+ isBackpack?: true | undefined;
892
+ isBifrost?: true | undefined;
893
+ isBitKeep?: true | undefined;
894
+ isBitski?: true | undefined;
895
+ isBlockWallet?: true | undefined;
896
+ isBraveWallet?: true | undefined;
897
+ isCoinbaseWallet?: true | undefined;
898
+ isDawn?: true | undefined;
899
+ isEnkrypt?: true | undefined;
900
+ isExodus?: true | undefined;
901
+ isFrame?: true | undefined;
902
+ isFrontier?: true | undefined;
903
+ isGamestop?: true | undefined;
904
+ isHyperPay?: true | undefined;
905
+ isImToken?: true | undefined;
906
+ isKuCoinWallet?: true | undefined;
907
+ isMathWallet?: true | undefined;
908
+ isMetaMask?: true | undefined;
909
+ isOkxWallet?: true | undefined;
910
+ isOKExWallet?: true | undefined;
911
+ isOneInchAndroidWallet?: true | undefined;
912
+ isOneInchIOSWallet?: true | undefined;
913
+ isOpera?: true | undefined;
914
+ isPhantom?: true | undefined;
915
+ isPortal?: true | undefined;
916
+ isRabby?: true | undefined;
917
+ isRainbow?: true | undefined;
918
+ isStatus?: true | undefined;
919
+ isTally?: true | undefined;
920
+ isTokenPocket?: true | undefined;
921
+ isTokenary?: true | undefined;
922
+ isTrust?: true | undefined;
923
+ isTrustWallet?: true | undefined;
924
+ isUniswapWallet?: true | undefined;
925
+ isXDEFI?: true | undefined;
926
+ isZerion?: true | undefined;
927
+ providers?: /*elided*/ any[] | undefined | undefined;
928
+ _events?: {
929
+ connect?: (() => void) | undefined;
930
+ } | undefined | undefined;
931
+ _state?: {
932
+ accounts?: string[];
933
+ initialized?: boolean;
934
+ isConnected?: boolean;
935
+ isPermanentlyDisconnected?: boolean;
936
+ isUnlocked?: boolean;
937
+ } | undefined | undefined;
938
+ }[] | undefined | undefined;
939
+ _events?: {
940
+ connect?: (() => void) | undefined;
941
+ } | undefined | undefined;
942
+ _state?: {
943
+ accounts?: string[];
944
+ initialized?: boolean;
945
+ isConnected?: boolean;
946
+ isPermanentlyDisconnected?: boolean;
947
+ isUnlocked?: boolean;
948
+ } | undefined | undefined;
949
+ } | undefined, {
950
+ onConnect(connectInfo: viem.ProviderConnectInfo): void;
951
+ }, {
952
+ [x: `${string}.disconnected`]: true;
953
+ "injected.connected": true;
954
+ }>, _wagmi_core.CreateConnectorFn<any, {
955
+ connect<withCapabilities extends boolean = false>(parameters?: {
956
+ chainId?: number | undefined;
957
+ isReconnecting?: boolean | undefined;
958
+ pairingTopic?: string | undefined;
959
+ withCapabilities?: withCapabilities | boolean | undefined;
960
+ }): Promise<{
961
+ accounts: withCapabilities extends true ? readonly {
962
+ address: viem.Address;
963
+ }[] : readonly viem.Address[];
964
+ chainId: number;
965
+ }>;
966
+ getNamespaceChainsIds(): number[];
967
+ getRequestedChainsIds(): Promise<number[]>;
968
+ isChainsStale(): Promise<boolean>;
969
+ onConnect(connectInfo: viem.ProviderConnectInfo): void;
970
+ onDisplayUri(uri: string): void;
971
+ onSessionDelete(data: {
972
+ topic: string;
973
+ }): void;
974
+ setRequestedChainsIds(chains: number[]): void;
975
+ requestedChainsStorageKey: `${string}.requestedChains`;
976
+ }, {
977
+ [x: `${string}.requestedChains`]: number[];
978
+ }>] | readonly [_wagmi_core.CreateConnectorFn<{
979
+ on: <event extends keyof viem.EIP1193EventMap>(event: event, listener: viem.EIP1193EventMap[event]) => void;
980
+ removeListener: <event extends keyof viem.EIP1193EventMap>(event: event, listener: viem.EIP1193EventMap[event]) => void;
981
+ request: viem.EIP1193RequestFn<viem.EIP1474Methods>;
982
+ isApexWallet?: true | undefined;
983
+ isAvalanche?: true | undefined;
984
+ isBackpack?: true | undefined;
985
+ isBifrost?: true | undefined;
986
+ isBitKeep?: true | undefined;
987
+ isBitski?: true | undefined;
988
+ isBlockWallet?: true | undefined;
989
+ isBraveWallet?: true | undefined;
990
+ isCoinbaseWallet?: true | undefined;
991
+ isDawn?: true | undefined;
992
+ isEnkrypt?: true | undefined;
993
+ isExodus?: true | undefined;
994
+ isFrame?: true | undefined;
995
+ isFrontier?: true | undefined;
996
+ isGamestop?: true | undefined;
997
+ isHyperPay?: true | undefined;
998
+ isImToken?: true | undefined;
999
+ isKuCoinWallet?: true | undefined;
1000
+ isMathWallet?: true | undefined;
1001
+ isMetaMask?: true | undefined;
1002
+ isOkxWallet?: true | undefined;
1003
+ isOKExWallet?: true | undefined;
1004
+ isOneInchAndroidWallet?: true | undefined;
1005
+ isOneInchIOSWallet?: true | undefined;
1006
+ isOpera?: true | undefined;
1007
+ isPhantom?: true | undefined;
1008
+ isPortal?: true | undefined;
1009
+ isRabby?: true | undefined;
1010
+ isRainbow?: true | undefined;
1011
+ isStatus?: true | undefined;
1012
+ isTally?: true | undefined;
1013
+ isTokenPocket?: true | undefined;
1014
+ isTokenary?: true | undefined;
1015
+ isTrust?: true | undefined;
1016
+ isTrustWallet?: true | undefined;
1017
+ isUniswapWallet?: true | undefined;
1018
+ isXDEFI?: true | undefined;
1019
+ isZerion?: true | undefined;
1020
+ providers?: {
1021
+ on: <event extends keyof viem.EIP1193EventMap>(event: event, listener: viem.EIP1193EventMap[event]) => void;
1022
+ removeListener: <event extends keyof viem.EIP1193EventMap>(event: event, listener: viem.EIP1193EventMap[event]) => void;
1023
+ request: viem.EIP1193RequestFn<viem.EIP1474Methods>;
1024
+ isApexWallet?: true | undefined;
1025
+ isAvalanche?: true | undefined;
1026
+ isBackpack?: true | undefined;
1027
+ isBifrost?: true | undefined;
1028
+ isBitKeep?: true | undefined;
1029
+ isBitski?: true | undefined;
1030
+ isBlockWallet?: true | undefined;
1031
+ isBraveWallet?: true | undefined;
1032
+ isCoinbaseWallet?: true | undefined;
1033
+ isDawn?: true | undefined;
1034
+ isEnkrypt?: true | undefined;
1035
+ isExodus?: true | undefined;
1036
+ isFrame?: true | undefined;
1037
+ isFrontier?: true | undefined;
1038
+ isGamestop?: true | undefined;
1039
+ isHyperPay?: true | undefined;
1040
+ isImToken?: true | undefined;
1041
+ isKuCoinWallet?: true | undefined;
1042
+ isMathWallet?: true | undefined;
1043
+ isMetaMask?: true | undefined;
1044
+ isOkxWallet?: true | undefined;
1045
+ isOKExWallet?: true | undefined;
1046
+ isOneInchAndroidWallet?: true | undefined;
1047
+ isOneInchIOSWallet?: true | undefined;
1048
+ isOpera?: true | undefined;
1049
+ isPhantom?: true | undefined;
1050
+ isPortal?: true | undefined;
1051
+ isRabby?: true | undefined;
1052
+ isRainbow?: true | undefined;
1053
+ isStatus?: true | undefined;
1054
+ isTally?: true | undefined;
1055
+ isTokenPocket?: true | undefined;
1056
+ isTokenary?: true | undefined;
1057
+ isTrust?: true | undefined;
1058
+ isTrustWallet?: true | undefined;
1059
+ isUniswapWallet?: true | undefined;
1060
+ isXDEFI?: true | undefined;
1061
+ isZerion?: true | undefined;
1062
+ providers?: /*elided*/ any[] | undefined | undefined;
1063
+ _events?: {
1064
+ connect?: (() => void) | undefined;
1065
+ } | undefined | undefined;
1066
+ _state?: {
1067
+ accounts?: string[];
1068
+ initialized?: boolean;
1069
+ isConnected?: boolean;
1070
+ isPermanentlyDisconnected?: boolean;
1071
+ isUnlocked?: boolean;
1072
+ } | undefined | undefined;
1073
+ }[] | undefined | undefined;
1074
+ _events?: {
1075
+ connect?: (() => void) | undefined;
1076
+ } | undefined | undefined;
1077
+ _state?: {
1078
+ accounts?: string[];
1079
+ initialized?: boolean;
1080
+ isConnected?: boolean;
1081
+ isPermanentlyDisconnected?: boolean;
1082
+ isUnlocked?: boolean;
1083
+ } | undefined | undefined;
1084
+ } | undefined, {
1085
+ onConnect(connectInfo: viem.ProviderConnectInfo): void;
1086
+ }, {
1087
+ [x: `${string}.disconnected`]: true;
1088
+ "injected.connected": true;
1089
+ }>]>;
1090
+ connectInjected: () => Promise<WalletState>;
1091
+ connectWalletConnect: () => Promise<WalletState>;
1092
+ disconnect: () => Promise<void>;
1093
+ signMessage: (message: string) => Promise<`0x${string}`>;
1094
+ };
1095
+ solana: {
1096
+ connect: () => Promise<string>;
1097
+ disconnect: () => Promise<void>;
1098
+ signMessage: (message: string) => Promise<Uint8Array>;
1099
+ };
1100
+ };
1101
+ web3: {
1102
+ signup: (providerSlug: string) => Promise<void>;
1103
+ };
1104
+ connectBlockAuth: () => void;
1105
+ oauth: {
1106
+ signupGoogle: (flow?: "auth-code" | "implicit") => Promise<void>;
1107
+ signupMicrosoft: () => Promise<void>;
1108
+ configureGoogle: typeof configureGoogle;
1109
+ signInWithGoogle: typeof signInWithGoogle;
1110
+ configureMicrosoft: typeof configureMicrosoft;
1111
+ getMicrosoftProvider: typeof getMicrosoftProvider;
1112
+ signInWithMicrosoft: typeof signInWithMicrosoft;
1113
+ };
1114
+ requestSignin: () => void;
1115
+ cancelTxns: () => void;
1116
+ txns: {
1117
+ reject: () => void;
1118
+ accept: (opts: {
1119
+ lifetime: number;
1120
+ userParams?: Record<string, string>;
1121
+ }) => void;
1122
+ report: (slug: string) => void;
1123
+ };
1124
+ restore: () => Promise<RestoreResult>;
1125
+ finalizeRestorationExpired: () => void;
1126
+ logout: () => Promise<void>;
1127
+ openModal: (name: ModalName) => void;
1128
+ closeModal: (name?: ModalName) => void;
1129
+ closeAllModals: () => void;
1130
+ wsConnectTimeout: number;
1131
+ wsConnectRetries: number;
1132
+ provider: BlockAuthProvider;
1133
+ };
1134
+ type BlockAuthClient = ReturnType<typeof createBlockAuthClient>;
1135
+
1136
+ interface AuthRuntimeCallbacks {
1137
+ onSuccess?: (address: string) => void | Promise<void>;
1138
+ onError?: () => void | Promise<void>;
1139
+ onLogout?: () => void | Promise<void>;
1140
+ }
1141
+ declare function createAuthRuntime(client: BlockAuthClient, callbacks?: AuthRuntimeCallbacks): {
1142
+ start: () => Promise<void>;
1143
+ stop: () => void;
1144
+ logout: () => Promise<void>;
1145
+ };
1146
+ type AuthRuntime = ReturnType<typeof createAuthRuntime>;
1147
+
1148
+ interface EvmOptions {
1149
+ /**
1150
+ * WalletConnect Cloud project id. Optional: si se omite, el conector de
1151
+ * WalletConnect (conexión por QR con wallets móviles) no se registra y solo
1152
+ * queda disponible el conector `injected` (MetaMask u otras extensiones).
1153
+ */
1154
+ walletConnectProjectId?: string;
1155
+ rpcUrl?: string;
1156
+ }
1157
+ declare function createEvmWallet(opts: EvmOptions): {
1158
+ config: _wagmi_core.Config<readonly [{
1159
+ blockExplorers: {
1160
+ readonly default: {
1161
+ readonly name: "Etherscan";
1162
+ readonly url: "https://etherscan.io";
1163
+ readonly apiUrl: "https://api.etherscan.io/api";
1164
+ };
1165
+ };
1166
+ blockTime: 12000;
1167
+ contracts: {
1168
+ readonly ensUniversalResolver: {
1169
+ readonly address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee";
1170
+ readonly blockCreated: 23085558;
1171
+ };
1172
+ readonly multicall3: {
1173
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
1174
+ readonly blockCreated: 14353601;
1175
+ };
1176
+ };
1177
+ ensTlds?: readonly string[] | undefined;
1178
+ id: 1;
1179
+ name: "Ethereum";
1180
+ nativeCurrency: {
1181
+ readonly name: "Ether";
1182
+ readonly symbol: "ETH";
1183
+ readonly decimals: 18;
1184
+ };
1185
+ experimental_preconfirmationTime?: number | undefined | undefined;
1186
+ rpcUrls: {
1187
+ readonly default: {
1188
+ readonly http: readonly ["https://eth.merkle.io"];
1189
+ };
1190
+ };
1191
+ sourceId?: number | undefined | undefined;
1192
+ testnet?: boolean | undefined | undefined;
1193
+ custom?: Record<string, unknown> | undefined;
1194
+ extendSchema?: Record<string, unknown> | undefined;
1195
+ fees?: viem.ChainFees<undefined> | undefined;
1196
+ formatters?: undefined;
1197
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
1198
+ client: viem.Client;
1199
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
1200
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
1201
+ client: viem.Client;
1202
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
1203
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
1204
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
1205
+ }] | undefined;
1206
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
1207
+ verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
1208
+ }], {
1209
+ 1: viem.HttpTransport<undefined, false>;
1210
+ }, readonly [_wagmi_core.CreateConnectorFn<{
1211
+ on: <event extends keyof viem.EIP1193EventMap>(event: event, listener: viem.EIP1193EventMap[event]) => void;
1212
+ removeListener: <event extends keyof viem.EIP1193EventMap>(event: event, listener: viem.EIP1193EventMap[event]) => void;
1213
+ request: viem.EIP1193RequestFn<viem.EIP1474Methods>;
1214
+ isApexWallet?: true | undefined;
1215
+ isAvalanche?: true | undefined;
1216
+ isBackpack?: true | undefined;
1217
+ isBifrost?: true | undefined;
1218
+ isBitKeep?: true | undefined;
1219
+ isBitski?: true | undefined;
1220
+ isBlockWallet?: true | undefined;
1221
+ isBraveWallet?: true | undefined;
1222
+ isCoinbaseWallet?: true | undefined;
1223
+ isDawn?: true | undefined;
1224
+ isEnkrypt?: true | undefined;
1225
+ isExodus?: true | undefined;
1226
+ isFrame?: true | undefined;
1227
+ isFrontier?: true | undefined;
1228
+ isGamestop?: true | undefined;
1229
+ isHyperPay?: true | undefined;
1230
+ isImToken?: true | undefined;
1231
+ isKuCoinWallet?: true | undefined;
1232
+ isMathWallet?: true | undefined;
1233
+ isMetaMask?: true | undefined;
1234
+ isOkxWallet?: true | undefined;
1235
+ isOKExWallet?: true | undefined;
1236
+ isOneInchAndroidWallet?: true | undefined;
1237
+ isOneInchIOSWallet?: true | undefined;
1238
+ isOpera?: true | undefined;
1239
+ isPhantom?: true | undefined;
1240
+ isPortal?: true | undefined;
1241
+ isRabby?: true | undefined;
1242
+ isRainbow?: true | undefined;
1243
+ isStatus?: true | undefined;
1244
+ isTally?: true | undefined;
1245
+ isTokenPocket?: true | undefined;
1246
+ isTokenary?: true | undefined;
1247
+ isTrust?: true | undefined;
1248
+ isTrustWallet?: true | undefined;
1249
+ isUniswapWallet?: true | undefined;
1250
+ isXDEFI?: true | undefined;
1251
+ isZerion?: true | undefined;
1252
+ providers?: {
1253
+ on: <event extends keyof viem.EIP1193EventMap>(event: event, listener: viem.EIP1193EventMap[event]) => void;
1254
+ removeListener: <event extends keyof viem.EIP1193EventMap>(event: event, listener: viem.EIP1193EventMap[event]) => void;
1255
+ request: viem.EIP1193RequestFn<viem.EIP1474Methods>;
1256
+ isApexWallet?: true | undefined;
1257
+ isAvalanche?: true | undefined;
1258
+ isBackpack?: true | undefined;
1259
+ isBifrost?: true | undefined;
1260
+ isBitKeep?: true | undefined;
1261
+ isBitski?: true | undefined;
1262
+ isBlockWallet?: true | undefined;
1263
+ isBraveWallet?: true | undefined;
1264
+ isCoinbaseWallet?: true | undefined;
1265
+ isDawn?: true | undefined;
1266
+ isEnkrypt?: true | undefined;
1267
+ isExodus?: true | undefined;
1268
+ isFrame?: true | undefined;
1269
+ isFrontier?: true | undefined;
1270
+ isGamestop?: true | undefined;
1271
+ isHyperPay?: true | undefined;
1272
+ isImToken?: true | undefined;
1273
+ isKuCoinWallet?: true | undefined;
1274
+ isMathWallet?: true | undefined;
1275
+ isMetaMask?: true | undefined;
1276
+ isOkxWallet?: true | undefined;
1277
+ isOKExWallet?: true | undefined;
1278
+ isOneInchAndroidWallet?: true | undefined;
1279
+ isOneInchIOSWallet?: true | undefined;
1280
+ isOpera?: true | undefined;
1281
+ isPhantom?: true | undefined;
1282
+ isPortal?: true | undefined;
1283
+ isRabby?: true | undefined;
1284
+ isRainbow?: true | undefined;
1285
+ isStatus?: true | undefined;
1286
+ isTally?: true | undefined;
1287
+ isTokenPocket?: true | undefined;
1288
+ isTokenary?: true | undefined;
1289
+ isTrust?: true | undefined;
1290
+ isTrustWallet?: true | undefined;
1291
+ isUniswapWallet?: true | undefined;
1292
+ isXDEFI?: true | undefined;
1293
+ isZerion?: true | undefined;
1294
+ providers?: /*elided*/ any[] | undefined | undefined;
1295
+ _events?: {
1296
+ connect?: (() => void) | undefined;
1297
+ } | undefined | undefined;
1298
+ _state?: {
1299
+ accounts?: string[];
1300
+ initialized?: boolean;
1301
+ isConnected?: boolean;
1302
+ isPermanentlyDisconnected?: boolean;
1303
+ isUnlocked?: boolean;
1304
+ } | undefined | undefined;
1305
+ }[] | undefined | undefined;
1306
+ _events?: {
1307
+ connect?: (() => void) | undefined;
1308
+ } | undefined | undefined;
1309
+ _state?: {
1310
+ accounts?: string[];
1311
+ initialized?: boolean;
1312
+ isConnected?: boolean;
1313
+ isPermanentlyDisconnected?: boolean;
1314
+ isUnlocked?: boolean;
1315
+ } | undefined | undefined;
1316
+ } | undefined, {
1317
+ onConnect(connectInfo: viem.ProviderConnectInfo): void;
1318
+ }, {
1319
+ [x: `${string}.disconnected`]: true;
1320
+ "injected.connected": true;
1321
+ }>, _wagmi_core.CreateConnectorFn<any, {
1322
+ connect<withCapabilities extends boolean = false>(parameters?: {
1323
+ chainId?: number | undefined;
1324
+ isReconnecting?: boolean | undefined;
1325
+ pairingTopic?: string | undefined;
1326
+ withCapabilities?: withCapabilities | boolean | undefined;
1327
+ }): Promise<{
1328
+ accounts: withCapabilities extends true ? readonly {
1329
+ address: viem.Address;
1330
+ }[] : readonly viem.Address[];
1331
+ chainId: number;
1332
+ }>;
1333
+ getNamespaceChainsIds(): number[];
1334
+ getRequestedChainsIds(): Promise<number[]>;
1335
+ isChainsStale(): Promise<boolean>;
1336
+ onConnect(connectInfo: viem.ProviderConnectInfo): void;
1337
+ onDisplayUri(uri: string): void;
1338
+ onSessionDelete(data: {
1339
+ topic: string;
1340
+ }): void;
1341
+ setRequestedChainsIds(chains: number[]): void;
1342
+ requestedChainsStorageKey: `${string}.requestedChains`;
1343
+ }, {
1344
+ [x: `${string}.requestedChains`]: number[];
1345
+ }>] | readonly [_wagmi_core.CreateConnectorFn<{
1346
+ on: <event extends keyof viem.EIP1193EventMap>(event: event, listener: viem.EIP1193EventMap[event]) => void;
1347
+ removeListener: <event extends keyof viem.EIP1193EventMap>(event: event, listener: viem.EIP1193EventMap[event]) => void;
1348
+ request: viem.EIP1193RequestFn<viem.EIP1474Methods>;
1349
+ isApexWallet?: true | undefined;
1350
+ isAvalanche?: true | undefined;
1351
+ isBackpack?: true | undefined;
1352
+ isBifrost?: true | undefined;
1353
+ isBitKeep?: true | undefined;
1354
+ isBitski?: true | undefined;
1355
+ isBlockWallet?: true | undefined;
1356
+ isBraveWallet?: true | undefined;
1357
+ isCoinbaseWallet?: true | undefined;
1358
+ isDawn?: true | undefined;
1359
+ isEnkrypt?: true | undefined;
1360
+ isExodus?: true | undefined;
1361
+ isFrame?: true | undefined;
1362
+ isFrontier?: true | undefined;
1363
+ isGamestop?: true | undefined;
1364
+ isHyperPay?: true | undefined;
1365
+ isImToken?: true | undefined;
1366
+ isKuCoinWallet?: true | undefined;
1367
+ isMathWallet?: true | undefined;
1368
+ isMetaMask?: true | undefined;
1369
+ isOkxWallet?: true | undefined;
1370
+ isOKExWallet?: true | undefined;
1371
+ isOneInchAndroidWallet?: true | undefined;
1372
+ isOneInchIOSWallet?: true | undefined;
1373
+ isOpera?: true | undefined;
1374
+ isPhantom?: true | undefined;
1375
+ isPortal?: true | undefined;
1376
+ isRabby?: true | undefined;
1377
+ isRainbow?: true | undefined;
1378
+ isStatus?: true | undefined;
1379
+ isTally?: true | undefined;
1380
+ isTokenPocket?: true | undefined;
1381
+ isTokenary?: true | undefined;
1382
+ isTrust?: true | undefined;
1383
+ isTrustWallet?: true | undefined;
1384
+ isUniswapWallet?: true | undefined;
1385
+ isXDEFI?: true | undefined;
1386
+ isZerion?: true | undefined;
1387
+ providers?: {
1388
+ on: <event extends keyof viem.EIP1193EventMap>(event: event, listener: viem.EIP1193EventMap[event]) => void;
1389
+ removeListener: <event extends keyof viem.EIP1193EventMap>(event: event, listener: viem.EIP1193EventMap[event]) => void;
1390
+ request: viem.EIP1193RequestFn<viem.EIP1474Methods>;
1391
+ isApexWallet?: true | undefined;
1392
+ isAvalanche?: true | undefined;
1393
+ isBackpack?: true | undefined;
1394
+ isBifrost?: true | undefined;
1395
+ isBitKeep?: true | undefined;
1396
+ isBitski?: true | undefined;
1397
+ isBlockWallet?: true | undefined;
1398
+ isBraveWallet?: true | undefined;
1399
+ isCoinbaseWallet?: true | undefined;
1400
+ isDawn?: true | undefined;
1401
+ isEnkrypt?: true | undefined;
1402
+ isExodus?: true | undefined;
1403
+ isFrame?: true | undefined;
1404
+ isFrontier?: true | undefined;
1405
+ isGamestop?: true | undefined;
1406
+ isHyperPay?: true | undefined;
1407
+ isImToken?: true | undefined;
1408
+ isKuCoinWallet?: true | undefined;
1409
+ isMathWallet?: true | undefined;
1410
+ isMetaMask?: true | undefined;
1411
+ isOkxWallet?: true | undefined;
1412
+ isOKExWallet?: true | undefined;
1413
+ isOneInchAndroidWallet?: true | undefined;
1414
+ isOneInchIOSWallet?: true | undefined;
1415
+ isOpera?: true | undefined;
1416
+ isPhantom?: true | undefined;
1417
+ isPortal?: true | undefined;
1418
+ isRabby?: true | undefined;
1419
+ isRainbow?: true | undefined;
1420
+ isStatus?: true | undefined;
1421
+ isTally?: true | undefined;
1422
+ isTokenPocket?: true | undefined;
1423
+ isTokenary?: true | undefined;
1424
+ isTrust?: true | undefined;
1425
+ isTrustWallet?: true | undefined;
1426
+ isUniswapWallet?: true | undefined;
1427
+ isXDEFI?: true | undefined;
1428
+ isZerion?: true | undefined;
1429
+ providers?: /*elided*/ any[] | undefined | undefined;
1430
+ _events?: {
1431
+ connect?: (() => void) | undefined;
1432
+ } | undefined | undefined;
1433
+ _state?: {
1434
+ accounts?: string[];
1435
+ initialized?: boolean;
1436
+ isConnected?: boolean;
1437
+ isPermanentlyDisconnected?: boolean;
1438
+ isUnlocked?: boolean;
1439
+ } | undefined | undefined;
1440
+ }[] | undefined | undefined;
1441
+ _events?: {
1442
+ connect?: (() => void) | undefined;
1443
+ } | undefined | undefined;
1444
+ _state?: {
1445
+ accounts?: string[];
1446
+ initialized?: boolean;
1447
+ isConnected?: boolean;
1448
+ isPermanentlyDisconnected?: boolean;
1449
+ isUnlocked?: boolean;
1450
+ } | undefined | undefined;
1451
+ } | undefined, {
1452
+ onConnect(connectInfo: viem.ProviderConnectInfo): void;
1453
+ }, {
1454
+ [x: `${string}.disconnected`]: true;
1455
+ "injected.connected": true;
1456
+ }>]>;
1457
+ connectInjected: () => Promise<WalletState>;
1458
+ connectWalletConnect: () => Promise<WalletState>;
1459
+ disconnect: () => Promise<void>;
1460
+ signMessage: (message: string) => Promise<`0x${string}`>;
1461
+ };
1462
+ type EvmWallet = ReturnType<typeof createEvmWallet>;
1463
+
1464
+ declare function createSolanaWallet(): {
1465
+ connect: () => Promise<string>;
1466
+ disconnect: () => Promise<void>;
1467
+ signMessage: (message: string) => Promise<Uint8Array>;
1468
+ };
1469
+ type SolanaWallet = ReturnType<typeof createSolanaWallet>;
1470
+
1471
+ /** Mobile deep-link to open the dapp inside a wallet's in-app browser. */
1472
+ declare function deepLinkFor(service: string, domain: string): string;
1473
+ /** Render `text` as a PNG data-URL QR code. */
1474
+ declare function makeQrDataUrl(text: string): Promise<string>;
1475
+
1476
+ /**
1477
+ * Every localStorage key the SDK owns. Cleared together by `clearBrowserState`.
1478
+ */
1479
+ declare const BLOCKAUTH_STORAGE_KEYS: readonly ["blockauth-session", "blockauth-ui", "blockauth-connected", "blockauth-logged-out", "blockauth-uncompleted-signup"];
1480
+ interface UiConfig {
1481
+ installed: boolean;
1482
+ isUser: boolean;
1483
+ isUserActive: boolean;
1484
+ isLocked: boolean;
1485
+ }
1486
+ interface SessionConfig {
1487
+ did: string;
1488
+ token: string;
1489
+ }
1490
+ interface ExternalServiceConfig {
1491
+ connected: boolean;
1492
+ service: string;
1493
+ did: string;
1494
+ token: string;
1495
+ iconUrl: string;
1496
+ account: string;
1497
+ networkId: string;
1498
+ }
1499
+ interface SetSessionParams {
1500
+ installed?: boolean;
1501
+ isUser?: boolean;
1502
+ isUserActive?: boolean;
1503
+ isLocked?: boolean;
1504
+ did?: string;
1505
+ token?: string;
1506
+ externalService?: Partial<ExternalServiceConfig>;
1507
+ serviceName?: string;
1508
+ }
1509
+ declare class BrowserBase {
1510
+ /**
1511
+ * Wipe every SDK-owned localStorage key and reseed the defaults. Unlike a
1512
+ * per-key reset it also clears the `blockauth-logged-out` /
1513
+ * `blockauth-uncompleted-signup` flags, and can preserve the
1514
+ * extension-installed marker across the wipe.
1515
+ */
1516
+ clearBrowserState({ keepExtensionInstalled }?: {
1517
+ keepExtensionInstalled?: boolean | undefined;
1518
+ }): void;
1519
+ reset(target?: 'all' | 'ui' | 'session' | 'external', { keepExtensionInstalled }?: {
1520
+ keepExtensionInstalled?: boolean | undefined;
1521
+ }): void;
1522
+ /**
1523
+ * Obtains the current UI configuration using localStorage as the
1524
+ * source of truth, seeding the default if none is stored.
1525
+ */
1526
+ getUI(): UiConfig;
1527
+ /**
1528
+ * Auxiliary method to update the UI configuration using websocket events.
1529
+ */
1530
+ setUILocked(isLocked: boolean): void;
1531
+ setUI({ installed, isUser, isUserActive, isLocked, }?: Partial<UiConfig>): void;
1532
+ getSession(): SessionConfig;
1533
+ /**
1534
+ * Obtains the configuration about the address and the service
1535
+ * where the user is connected.
1536
+ */
1537
+ getExternalService(): ExternalServiceConfig;
1538
+ /**
1539
+ * Auxiliary method to update the SESSION configuration using websocket events.
1540
+ */
1541
+ setSession({ installed, isUser, isUserActive, isLocked, did, token, externalService, serviceName, }?: SetSessionParams): void;
1542
+ externalServiceDisconnect(): void;
1543
+ getLang(): string;
1544
+ setLang(lang: string): void;
1545
+ subscribe(callback: (value: UiConfig | null) => void): void;
1546
+ }
1547
+ declare const browserBase: BrowserBase;
1548
+
1549
+ /**
1550
+ * Returns the image URL (or base64 data-URI) for a given service slug.
1551
+ * Falls back to the Block-Auth logo for unknown services.
1552
+ */
1553
+ declare const imgUrlByService: (service?: string) => string;
1554
+ /**
1555
+ * Returns a UTC date string of the form `YYYY-MM-DDTHH:mm:ss.SSS` (no trailing
1556
+ * `Z`), so the auth runtime can compute the unsign timeout against UTC.
1557
+ */
1558
+ declare const getUTCDateString: (date?: Date | string | number) => string;
1559
+ /**
1560
+ * Formats a number of seconds into a human-readable "Hh Mm" / "Mm" string.
1561
+ */
1562
+ declare const secsToText: (secs?: number) => string;
1563
+ /**
1564
+ * Best-effort retrieval of the caller's public IP. Returns a placeholder
1565
+ * on failure.
1566
+ */
1567
+ declare const getIp: () => Promise<string | undefined>;
1568
+ /**
1569
+ * Normalizes a URL to use the https scheme.
1570
+ */
1571
+ declare const cleanUrl: (url: string) => string;
1572
+ /**
1573
+ * Validates that a URL looks like an image URL and that the image can be
1574
+ * decoded by the browser. Returns false in non-browser environments.
1575
+ */
1576
+ declare const isValidImgUrl: (url: string) => Promise<boolean>;
1577
+
1578
+ declare const index_BLOCKAUTH_STORAGE_KEYS: typeof BLOCKAUTH_STORAGE_KEYS;
1579
+ type index_ExternalServiceConfig = ExternalServiceConfig;
1580
+ type index_SessionConfig = SessionConfig;
1581
+ type index_SetSessionParams = SetSessionParams;
1582
+ type index_UiConfig = UiConfig;
1583
+ declare const index_browserBase: typeof browserBase;
1584
+ declare const index_cleanUrl: typeof cleanUrl;
1585
+ declare const index_getIp: typeof getIp;
1586
+ declare const index_getUTCDateString: typeof getUTCDateString;
1587
+ declare const index_imgUrlByService: typeof imgUrlByService;
1588
+ declare const index_isValidImgUrl: typeof isValidImgUrl;
1589
+ declare const index_secsToText: typeof secsToText;
1590
+ declare namespace index {
1591
+ export { index_BLOCKAUTH_STORAGE_KEYS as BLOCKAUTH_STORAGE_KEYS, type index_ExternalServiceConfig as ExternalServiceConfig, type index_SessionConfig as SessionConfig, type index_SetSessionParams as SetSessionParams, type index_UiConfig as UiConfig, index_browserBase as browserBase, index_cleanUrl as cleanUrl, index_getIp as getIp, index_getUTCDateString as getUTCDateString, index_imgUrlByService as imgUrlByService, index_isValidImgUrl as isValidImgUrl, index_secsToText as secsToText };
1592
+ }
1593
+
1594
+ /**
1595
+ * Extension state sync module.
1596
+ *
1597
+ * All browser-global access is guarded so this module can be imported safely
1598
+ * in SSR / Node environments without throwing.
1599
+ */
1600
+
1601
+ declare const SDK_PAGE_MARKER = "blockauthSdk";
1602
+ declare const SYNC_TIMEOUT_MS = 800;
1603
+ declare const DISCOVERY_TIMEOUT_MS = 3000;
1604
+ declare function isSdkPage(): boolean;
1605
+ declare function markSdkPresence(): void;
1606
+ declare function clearSdkPresence(): void;
1607
+ declare const isExtensionStateComplete: (ui: Pick<UiConfig, "installed" | "isUser" | "isUserActive">) => boolean;
1608
+ declare function isExtensionPresent(): boolean;
1609
+ declare function appearsExtensionInstalled(): boolean;
1610
+ declare function clearExtensionDomMarkers(): void;
1611
+ declare function resetExtensionAbsentState(): void;
1612
+ declare function onExtensionRemoved(): void;
1613
+ declare function requestExtensionStateSync(): void;
1614
+ declare function syncExtensionStateFromStorage(): UiConfig;
1615
+ declare function onExtensionStatePublished(): UiConfig;
1616
+ declare function confirmExtensionPresence(): boolean;
1617
+ declare function probeExtensionPresence(timeoutMs?: number): Promise<boolean>;
1618
+ declare function discoverExtensionOnce(timeoutMs?: number): Promise<UiConfig>;
1619
+ declare function reconcileExtensionState({ force, }?: {
1620
+ force?: boolean;
1621
+ }): Promise<UiConfig>;
1622
+ declare function requestExtensionRefresh(): Promise<UiConfig>;
1623
+ /** Cancels in-flight sync operations (e.g. on cleanup). */
1624
+ declare function resetExtensionSyncModuleState(): void;
1625
+ /**
1626
+ * Marks SDK presence, kicks off extension discovery, and registers all
1627
+ * event listeners (blockauth:sync / blockauth:gone / storage / visibilitychange
1628
+ * / focus).
1629
+ *
1630
+ * Returns a cleanup function that removes every listener, clears the SDK
1631
+ * marker, and cancels in-flight operations.
1632
+ *
1633
+ * SSR-safe: if called outside a browser environment it returns a no-op cleanup.
1634
+ */
1635
+ declare function startExtensionSync(): () => void;
1636
+
1637
+ declare const TEXTS: {
1638
+ readonly edit: {
1639
+ readonly es: "Editar";
1640
+ readonly en: "Edit";
1641
+ };
1642
+ readonly searchEngine: {
1643
+ readonly es: "Buscador";
1644
+ readonly en: "Search engine";
1645
+ };
1646
+ readonly webTypes: {
1647
+ readonly es: "Tipos de web";
1648
+ readonly en: "Web types";
1649
+ };
1650
+ readonly columns: {
1651
+ readonly es: "Columnas";
1652
+ readonly en: "Columns";
1653
+ };
1654
+ readonly order: {
1655
+ readonly es: "Orden";
1656
+ readonly en: "Order";
1657
+ };
1658
+ readonly activate: {
1659
+ readonly es: "Activar";
1660
+ readonly en: "Activate";
1661
+ };
1662
+ readonly providerName: {
1663
+ readonly es: "Nombre del provider";
1664
+ readonly en: "Provider name";
1665
+ };
1666
+ readonly connectWith: {
1667
+ readonly es: "Conectar con";
1668
+ readonly en: "Connect with";
1669
+ };
1670
+ readonly search: {
1671
+ readonly es: "Buscar ...";
1672
+ readonly en: "Search ...";
1673
+ };
1674
+ readonly webTypeAll: {
1675
+ readonly es: "Todos";
1676
+ readonly en: "All";
1677
+ };
1678
+ readonly login: {
1679
+ readonly es: "Iniciar sesión";
1680
+ readonly en: "Log In";
1681
+ };
1682
+ readonly lastStep: {
1683
+ readonly es: "Completa el último paso";
1684
+ readonly en: "Complete the last step";
1685
+ };
1686
+ readonly footerFirst: {
1687
+ readonly es: "¿Esperando un registro aburrido?";
1688
+ readonly en: "Expecting a boring signup?";
1689
+ };
1690
+ readonly footerSecond: {
1691
+ readonly es: "Di adiós a las contraseñas";
1692
+ readonly en: "Say goodbye to passwords";
1693
+ };
1694
+ };
1695
+ type TextKey = keyof typeof TEXTS;
1696
+ declare function t(key: TextKey, locale?: Locale): string;
1697
+
1698
+ export { $extension, $locale, $openModals, $ui, $user, $wallet, $web3, $ws, type AuthRuntime, type AuthRuntimeCallbacks, type BlockAuthClient, type BlockAuthClientConfig, BlockAuthProvider, type BlockAuthUserProfile, type BlockAuthUserRole, DISCOVERY_TIMEOUT_MS, type DeletionServiceDeps, type EvmOptions, type EvmWallet, type ExtensionState, type Locale, type ModalName, type RestoreResult, RpcClient, SDK_PAGE_MARKER, SYNC_TIMEOUT_MS, type SolanaWallet, TEXTS, type TextKey, type TxnRequest, type UiState, type UserProfileProvider, type UserState, type WalletKind, type WalletState, type Web3SignupState, WsClient, type WsState, appearsExtensionInstalled, clearExtensionDomMarkers, clearRemainingAuthData, clearSdkPresence, closeAllModals, closeModal, confirmExtensionPresence, createAuthRuntime, createBlockAuthClient, createDeletionService, createEvmWallet, createSolanaWallet, deepLinkFor, discoverExtensionOnce, fetchUserProfile, finalizeAfterRestorationExpired, getUserRoleNames, getUserRoleSlugs, getUserRoles, handleRestorationExpired, handleRestoreFailure, hasAnyRole, hasAnyRoleBySlug, hasRole, hasRoleBySlug, isExtensionPresent, isExtensionStateComplete, isModalOpen, isRestorationExpiredMessage, isSdkPage, isShowSignin, loadUserProfile, makeQrDataUrl, markSdkPresence, index$1 as oauth, onExtensionRemoved, onExtensionStatePublished, openModal, probeExtensionPresence, reconcileExtensionState, requestExtensionRefresh, requestExtensionStateSync, requestSdkRestore, resetExtension, resetExtensionAbsentState, resetExtensionSyncModuleState, resetUi, resetUser, resetWallet, resetWeb3, resetWs, setApiKey, setBackendMessage, setDeletionAddress, setDid, setExtensionInstalled, setExtensionIsLocked, setExtensionIsUser, setExtensionIsUserActive, setIsAcceptingTxn, setIsAppActive, setIsCheckingAppActive, setIsLoadingUser, setIsOnDeletion, setIsSdkSignedIn, setIsServiceConnected, setIsSigned, setIsSignedFirstCheck, setIsSigning, setIsSigningLoader, setLocale, setReady, setRequests, setServiceIcon, setServiceName, setSignature, setSignedBy, setToken, setUiConfig, setUser, setWaitingForSuccessLogInSince, startExtensionSync, syncExtensionStateFromStorage, t, index as utils };