@swype-org/react-sdk 0.2.315 → 0.2.323

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.
package/dist/index.d.cts CHANGED
@@ -589,6 +589,12 @@ declare function fetchTransfer(apiBaseUrl: string, token: string, transferId: st
589
589
  * PATCH /v1/transfers/{transferId}
590
590
  */
591
591
  declare function signTransfer(apiBaseUrl: string, token: string, transferId: string, signedTransfer: Record<string, unknown>, authorizationSessionToken?: string): Promise<Transfer>;
592
+ /**
593
+ * Regenerate a fresh sign payload for an SVM transfer whose signing window
594
+ * expired, reusing the same transfer id.
595
+ * POST /v1/transfers/{transferId}/sign-payload
596
+ */
597
+ declare function regenerateTransferSignPayload(apiBaseUrl: string, token: string, transferId: string, authorizationSessionToken?: string): Promise<Transfer>;
592
598
  declare function fetchAuthorizationSession(apiBaseUrl: string, sessionId: string): Promise<AuthorizationSessionDetail>;
593
599
  declare function fetchAuthorizationSessionByToken(apiBaseUrl: string, token: string): Promise<AuthorizationSessionDetail>;
594
600
  /**
@@ -749,6 +755,7 @@ declare const api_fetchUserConfig: typeof fetchUserConfig;
749
755
  declare const api_postTransferQuote: typeof postTransferQuote;
750
756
  declare const api_probeActionCompletion: typeof probeActionCompletion;
751
757
  declare const api_refreshManualTransferQuote: typeof refreshManualTransferQuote;
758
+ declare const api_regenerateTransferSignPayload: typeof regenerateTransferSignPayload;
752
759
  declare const api_registerPasskey: typeof registerPasskey;
753
760
  declare const api_reportActionCompletion: typeof reportActionCompletion;
754
761
  declare const api_reportPasskeyActivity: typeof reportPasskeyActivity;
@@ -760,7 +767,7 @@ declare const api_updateUserConfig: typeof updateUserConfig;
760
767
  declare const api_updateUserConfigBySession: typeof updateUserConfigBySession;
761
768
  declare const api_waitForActionTransactionReceipt: typeof waitForActionTransactionReceipt;
762
769
  declare namespace api {
763
- export { type api_ActionTransactionReceiptWaitResult as ActionTransactionReceiptWaitResult, type api_BridgeCall as BridgeCall, type api_CreateAccountAuthorizationSessionOptions as CreateAccountAuthorizationSessionOptions, type api_CreateAccountParams as CreateAccountParams, type api_CreateManualTransferParams as CreateManualTransferParams, type api_CreateTransferParams as CreateTransferParams, type api_FetchManualTransferSourcesParams as FetchManualTransferSourcesParams, type api_ProbeActionCompletionResult as ProbeActionCompletionResult, type api_RefreshManualTransferQuoteResult as RefreshManualTransferQuoteResult, type api_TransferQuote as TransferQuote, api_createAccount as createAccount, api_createAccountAuthorizationSession as createAccountAuthorizationSession, api_createManualTransfer as createManualTransfer, api_createTransfer as createTransfer, api_fetchAccount as fetchAccount, api_fetchAccounts as fetchAccounts, api_fetchAuthorizationSession as fetchAuthorizationSession, api_fetchAuthorizationSessionByToken as fetchAuthorizationSessionByToken, api_fetchChains as fetchChains, api_fetchManualTransferSession as fetchManualTransferSession, api_fetchManualTransferSources as fetchManualTransferSources, api_fetchMerchantPublicKey as fetchMerchantPublicKey, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_postTransferQuote as postTransferQuote, api_probeActionCompletion as probeActionCompletion, api_refreshManualTransferQuote as refreshManualTransferQuote, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_reportPasskeyActivity as reportPasskeyActivity, api_setAuthorizationSessionPaymentIntentAmount as setAuthorizationSessionPaymentIntentAmount, api_setAuthorizationSessionProvider as setAuthorizationSessionProvider, api_signTransfer as signTransfer, api_updateManualTransferDepositTargetChain as updateManualTransferDepositTargetChain, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession, api_waitForActionTransactionReceipt as waitForActionTransactionReceipt };
770
+ export { type api_ActionTransactionReceiptWaitResult as ActionTransactionReceiptWaitResult, type api_BridgeCall as BridgeCall, type api_CreateAccountAuthorizationSessionOptions as CreateAccountAuthorizationSessionOptions, type api_CreateAccountParams as CreateAccountParams, type api_CreateManualTransferParams as CreateManualTransferParams, type api_CreateTransferParams as CreateTransferParams, type api_FetchManualTransferSourcesParams as FetchManualTransferSourcesParams, type api_ProbeActionCompletionResult as ProbeActionCompletionResult, type api_RefreshManualTransferQuoteResult as RefreshManualTransferQuoteResult, type api_TransferQuote as TransferQuote, api_createAccount as createAccount, api_createAccountAuthorizationSession as createAccountAuthorizationSession, api_createManualTransfer as createManualTransfer, api_createTransfer as createTransfer, api_fetchAccount as fetchAccount, api_fetchAccounts as fetchAccounts, api_fetchAuthorizationSession as fetchAuthorizationSession, api_fetchAuthorizationSessionByToken as fetchAuthorizationSessionByToken, api_fetchChains as fetchChains, api_fetchManualTransferSession as fetchManualTransferSession, api_fetchManualTransferSources as fetchManualTransferSources, api_fetchMerchantPublicKey as fetchMerchantPublicKey, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_postTransferQuote as postTransferQuote, api_probeActionCompletion as probeActionCompletion, api_refreshManualTransferQuote as refreshManualTransferQuote, api_regenerateTransferSignPayload as regenerateTransferSignPayload, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_reportPasskeyActivity as reportPasskeyActivity, api_setAuthorizationSessionPaymentIntentAmount as setAuthorizationSessionPaymentIntentAmount, api_setAuthorizationSessionProvider as setAuthorizationSessionProvider, api_signTransfer as signTransfer, api_updateManualTransferDepositTargetChain as updateManualTransferDepositTargetChain, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession, api_waitForActionTransactionReceipt as waitForActionTransactionReceipt };
764
771
  }
765
772
 
766
773
  interface BlinkPaymentProps {
@@ -1224,6 +1231,14 @@ interface UseAuthorizationOrchestratorDeps {
1224
1231
  }
1225
1232
  declare function useAuthorizationOrchestrator(deps: UseAuthorizationOrchestratorDeps): UseAuthorizationOrchestratorResult;
1226
1233
 
1234
+ interface WalletAccountChange {
1235
+ previousAddress: string | null;
1236
+ nextAddress: string;
1237
+ connectorId: string;
1238
+ chainId: number | null;
1239
+ accounts: readonly string[];
1240
+ }
1241
+
1227
1242
  interface ReownWallet {
1228
1243
  id: string;
1229
1244
  name: string;
@@ -1290,6 +1305,13 @@ interface PaymentState {
1290
1305
  amount: string;
1291
1306
  transfer: Transfer | null;
1292
1307
  creatingTransfer: boolean;
1308
+ /**
1309
+ * True when an SVM transfer's signing window expired (API returned
1310
+ * `SVM_SIGN_PAYLOAD_EXPIRED`). Drives the friendly "sign within 20 seconds"
1311
+ * message + Retry on the processing screen. Cleared when a new attempt
1312
+ * starts or the transfer advances.
1313
+ */
1314
+ signPayloadExpired: boolean;
1293
1315
  passkeyConfigLoaded: boolean;
1294
1316
  activeCredentialId: string | null;
1295
1317
  knownCredentialIds: string[];
@@ -1417,6 +1439,15 @@ interface PaymentState {
1417
1439
  * — a genuine reopen should re-greet.
1418
1440
  */
1419
1441
  welcomeBackAcknowledged: boolean;
1442
+ /**
1443
+ * Latched `true` once the first accounts fetch resolves (`DATA_LOADED` /
1444
+ * `ACCOUNTS_RELOADED`). Gates fresh-phase derivation for an authenticated
1445
+ * user so we never derive a post-load screen (welcome-back / wallet-picker /
1446
+ * deposit) from the empty initial `accounts` array — that race flashes
1447
+ * `WelcomeBackScreen` before the real screen. Reset on de-auth so a new
1448
+ * session re-shows the loader until its accounts arrive.
1449
+ */
1450
+ initialDataLoaded: boolean;
1420
1451
  }
1421
1452
  interface InitialStateConfig {
1422
1453
  depositAmount: number | null;
@@ -1472,6 +1503,8 @@ interface StepHandlers {
1472
1503
  onCancelLogin: () => void;
1473
1504
  /** Advance a returning user off WelcomeBackScreen toward the wallet picker. */
1474
1505
  onAcknowledgeWelcomeBack: () => void;
1506
+ /** Back from WalletPickerScreen: return a walletless user to WelcomeBackScreen. */
1507
+ onReturnToWelcomeBack: () => void;
1475
1508
  /**
1476
1509
  * Update the in-flow amount-entry value (string display). Called by
1477
1510
  * DepositScreen entry mode on every keypress / preset tap. The view-model
@@ -1674,6 +1707,12 @@ interface UseTransferSigningResult {
1674
1707
  * 3. Submits signed UserOp via PATCH /v1/transfers/{id}
1675
1708
  */
1676
1709
  signTransfer: (transferId: string, opts?: SignTransferOptions) => Promise<Transfer>;
1710
+ /**
1711
+ * Regenerates a fresh SVM sign payload for a transfer whose signing window
1712
+ * expired (POST /v1/transfers/{id}/sign-payload), reusing the same transfer
1713
+ * id. Returns the refreshed Transfer carrying the new signPayload.
1714
+ */
1715
+ regenerateSignPayload: (transferId: string) => Promise<Transfer>;
1677
1716
  }
1678
1717
  interface UseTransferSigningOptions {
1679
1718
  /** Optional API base URL override when used outside BlinkProvider. */
@@ -2023,6 +2062,14 @@ interface SetupTokenOption {
2023
2062
  chainId?: number;
2024
2063
  /** Account this token belongs to; used by multi-account pickers to group rows. */
2025
2064
  accountId?: string;
2065
+ /**
2066
+ * Truncated wallet address (from `wallet.name`). One account may own wallets
2067
+ * at several distinct addresses (e.g. multiple Solana accounts under one
2068
+ * Phantom connection); multi-account pickers group rows by address so those
2069
+ * are not collapsed under a single header. EVM wallets share one address per
2070
+ * account, so this yields a single section there.
2071
+ */
2072
+ walletAddress?: string;
2026
2073
  /** Server-provided token logo URI from the catalog. Preferred over the local `TOKEN_LOGOS` map. */
2027
2074
  logoURI?: string | null;
2028
2075
  }
@@ -2291,12 +2338,19 @@ interface TransferStatusBaseProps {
2291
2338
  retryLabel?: string;
2292
2339
  retryAfterDelay?: boolean;
2293
2340
  showRetryOnError?: boolean;
2341
+ /**
2342
+ * Presentation of the error message. `error` (default) uses the red error
2343
+ * banner for genuine failures; `info` uses the neutral informational
2344
+ * NotificationBanner for benign, retryable conditions (e.g. an expired SVM
2345
+ * signing window).
2346
+ */
2347
+ errorVariant?: 'error' | 'info';
2294
2348
  }
2295
2349
 
2296
2350
  interface DepositTransferStatusScreenProps extends TransferStatusBaseProps {
2297
2351
  visibleError?: string | null;
2298
2352
  }
2299
- declare function DepositTransferStatusScreen({ phase, error, visibleError, onLogout, onRetry, }: DepositTransferStatusScreenProps): react_jsx_runtime.JSX.Element;
2353
+ declare function DepositTransferStatusScreen({ phase, error, visibleError, errorVariant, onLogout, onRetry, }: DepositTransferStatusScreenProps): react_jsx_runtime.JSX.Element;
2300
2354
 
2301
2355
  interface OpenWalletScreenProps {
2302
2356
  walletName: string | null;
@@ -2462,8 +2516,45 @@ declare function replaceOpenProviderForAccountSwitch(input: {
2462
2516
  sessionId: string;
2463
2517
  accounts: readonly string[];
2464
2518
  chainId: number | null;
2519
+ /**
2520
+ * SVM (Phantom) switches pass the new account's base58 pubkey here. The
2521
+ * backend's SVM OPEN_PROVIDER re-report (`generateActionsAfterSvmOpenProvider`)
2522
+ * prefers `userSolanaWalletPubkey` over `accounts[0]`, so passing it
2523
+ * explicitly avoids the dual-mode `accounts[0]` ambiguity. EVM callers omit
2524
+ * it (behavior unchanged).
2525
+ */
2526
+ userSolanaWalletPubkey?: string;
2465
2527
  }): Promise<WalletAccountSwitchResult>;
2466
2528
 
2529
+ interface SolanaAccountSwitchDeps {
2530
+ /** Set to false to detach the listener without unmounting the hook. */
2531
+ enabled?: boolean;
2532
+ /** Called with the next account when a real Solana account change is observed. */
2533
+ onAccountChanged: (change: WalletAccountChange) => void | Promise<void>;
2534
+ }
2535
+ /**
2536
+ * SVM analogue of `useWalletAccountSwitchEffect`. Subscribes to the Solana
2537
+ * wallet runtime's account-change channel (fed by the cached Phantom
2538
+ * adapter's `connect` re-emission when the user switches accounts inside the
2539
+ * wallet) and surfaces a `WalletAccountChange` on a genuine transition.
2540
+ *
2541
+ * The single effect synchronizes with an external system — the module-level
2542
+ * adapter event channel in `solanaWalletRuntime` — so the subscription and
2543
+ * its unsubscribe cleanup are a legitimate `useEffect`.
2544
+ *
2545
+ * Unlike the EVM hook (whose `useAccount` replays the current address on
2546
+ * mount, requiring a silent baseline seed to avoid a spurious null→A switch),
2547
+ * this channel is purely event-driven and the runtime already seeds its
2548
+ * baseline from the connected account at bind time — so it emits *only*
2549
+ * genuine transitions. Every emission is therefore fired through immediately;
2550
+ * the local `baselineRef` exists only to populate `previousAddress` and to
2551
+ * defensively drop a same-pubkey repeat. The emitted change is SVM-shaped —
2552
+ * `chainId: null` and `accounts: [pubkey]` — which the switch helper uses to
2553
+ * route the new Solana pubkey to the backend's preferred
2554
+ * `userSolanaWalletPubkey` field.
2555
+ */
2556
+ declare function useSolanaAccountSwitchEffect(deps: SolanaAccountSwitchDeps): void;
2557
+
2467
2558
  type DebugLevel = 'info' | 'warn' | 'error';
2468
2559
  interface DebugEntry {
2469
2560
  id: number;
@@ -2483,4 +2574,4 @@ declare function clearDebugEntries(): void;
2483
2574
  */
2484
2575
  declare function useBlinkDebugLog(): DebugEntry[];
2485
2576
 
2486
- export { ACCOUNT_SWITCH_CONFLICT_MESSAGE, type Account, type ActionExecutionResult, type AdvancedSettings, AdvancedSourceScreen, type Amount, ApprovingInWalletScreen, type ApprovingInWalletScreenProps, type AuthorizationAction, type AuthorizationSession, AuthorizationSessionCancelledError, type AuthorizationSessionDetail, BLINK_ERROR_ILLUSTRATION, BLINK_LOGO, BLINK_MASCOT, BLINK_PASSKEY_ILLUSTRATION, BLINK_SUCCESS_ILLUSTRATION, BlinkErrorScreen, BlinkInitialLoadingScreen, BlinkLoadingScreen, BlinkPayment, type BlinkPaymentProps, BlinkProvider, type BlinkProviderProps, type Chain, ConfirmSignScreen, type DebugEntry, type DebugLevel, DepositCompleteScreen, DepositOptionsScreen, DepositScreen, DepositTransferStatusScreen, type Destination, type ErrorResponse, type ExecutionResult, type GuestTokenEntry, type GuestTokenPickerRawRow, GuestTokenPickerScreen, IconCircle, InfoBanner, LOGIN_KEY_ILLUSTRATION, type LinkTokenEntry, LinkTokensScreen, type ListResponse, LoginScreen, ManualTransferPasskeyScreen, type MerchantAuthorization, type MerchantPublicKey, type MobileFlowState, OpenWalletScreen, type OrchestratorResult, type OrchestratorRunOptions, OtpVerifyScreen, OutlineButton, PasskeyIframeBlockedError, PasskeyPopupWelcomeScreen, PasskeyScreen, type PaymentPhase, type PaymentState, PoweredByFooter, type PreciseMoney, PrimaryButton, type Provider, ScreenHeader, ScreenLayout, type ScreenName, SecondaryButton, SelectDepositSourceScreen, SelectSourceScreen, SettingsMenu, type SetupTokenOption, type SourceOption, type SourceSelection, type SourceType, Spinner, type StepHandlers, type StepItem, StepList, StepRenderer, type StepRendererDerivedProps, type StepRendererFlowProps, type StepRendererFormProps, type StepRendererProps, type StepRendererRemoteProps, SuccessScreen, type ThemeMode, type ThemeTokens, type TokenBalance, TokenPickerScreen, type Transfer, type TransferDestination, type TransferPhase, type UseAuthorizationExecutorResult, type UseAuthorizationOrchestratorResult, type UserConfig, VerifyPasskeyScreen, type Wallet, type WalletAccountSwitchResult, type WalletCapabilities, type WalletCapabilitiesDebugSnapshot, type WalletDeeplink, WalletPickerScreen, type WalletSource, type WalletToken, WelcomeBackScreen, appendDebug, api as blinkApi, clearDebugEntries, createInitialState, credentialIdBase64ToBytes, darkTheme, darkThemeNew, darkTransparentTheme, darkTransparentThemeNew, deviceHasPasskey, encodePermit2ApproveCalldata, findDevicePasskey, findDevicePasskeyViaPopup, getAtomicBatchSupportDebugInfo, getDebugEntries, getDeviceBiometricUnlockText, getTheme, getThemeBase, getWalletCapabilities, isAuthorizationSessionCancelled, isExpectedAuthorizationCancellation, isTerminalTransferStatus, isTransferAwaitingCompletion, isTransparentTheme, isUserDismissedAuthorizationError, isVisibleUsdAmountAtTwoDecimals, lightTheme, lightThemeNew, lightTransparentTheme, lightTransparentThemeNew, mapGuestPickerEntries, replaceOpenProviderForAccountSwitch, resolvePasskeyRpId, screenForPhase, subscribeDebug, supportsAtomicBatch, supportsPaymasterService, useAuthorizationExecutor, useAuthorizationOrchestrator, useBlinkConfig, useBlinkDebugLog, useBlinkDepositAmount, useTransferPolling, useTransferSigning };
2577
+ export { ACCOUNT_SWITCH_CONFLICT_MESSAGE, type Account, type ActionExecutionResult, type AdvancedSettings, AdvancedSourceScreen, type Amount, ApprovingInWalletScreen, type ApprovingInWalletScreenProps, type AuthorizationAction, type AuthorizationSession, AuthorizationSessionCancelledError, type AuthorizationSessionDetail, BLINK_ERROR_ILLUSTRATION, BLINK_LOGO, BLINK_MASCOT, BLINK_PASSKEY_ILLUSTRATION, BLINK_SUCCESS_ILLUSTRATION, BlinkErrorScreen, BlinkInitialLoadingScreen, BlinkLoadingScreen, BlinkPayment, type BlinkPaymentProps, BlinkProvider, type BlinkProviderProps, type Chain, ConfirmSignScreen, type DebugEntry, type DebugLevel, DepositCompleteScreen, DepositOptionsScreen, DepositScreen, DepositTransferStatusScreen, type Destination, type ErrorResponse, type ExecutionResult, type GuestTokenEntry, type GuestTokenPickerRawRow, GuestTokenPickerScreen, IconCircle, InfoBanner, LOGIN_KEY_ILLUSTRATION, type LinkTokenEntry, LinkTokensScreen, type ListResponse, LoginScreen, ManualTransferPasskeyScreen, type MerchantAuthorization, type MerchantPublicKey, type MobileFlowState, OpenWalletScreen, type OrchestratorResult, type OrchestratorRunOptions, OtpVerifyScreen, OutlineButton, PasskeyIframeBlockedError, PasskeyPopupWelcomeScreen, PasskeyScreen, type PaymentPhase, type PaymentState, PoweredByFooter, type PreciseMoney, PrimaryButton, type Provider, ScreenHeader, ScreenLayout, type ScreenName, SecondaryButton, SelectDepositSourceScreen, SelectSourceScreen, SettingsMenu, type SetupTokenOption, type SolanaAccountSwitchDeps, type SourceOption, type SourceSelection, type SourceType, Spinner, type StepHandlers, type StepItem, StepList, StepRenderer, type StepRendererDerivedProps, type StepRendererFlowProps, type StepRendererFormProps, type StepRendererProps, type StepRendererRemoteProps, SuccessScreen, type ThemeMode, type ThemeTokens, type TokenBalance, TokenPickerScreen, type Transfer, type TransferDestination, type TransferPhase, type UseAuthorizationExecutorResult, type UseAuthorizationOrchestratorResult, type UserConfig, VerifyPasskeyScreen, type Wallet, type WalletAccountChange, type WalletAccountSwitchResult, type WalletCapabilities, type WalletCapabilitiesDebugSnapshot, type WalletDeeplink, WalletPickerScreen, type WalletSource, type WalletToken, WelcomeBackScreen, appendDebug, api as blinkApi, clearDebugEntries, createInitialState, credentialIdBase64ToBytes, darkTheme, darkThemeNew, darkTransparentTheme, darkTransparentThemeNew, deviceHasPasskey, encodePermit2ApproveCalldata, findDevicePasskey, findDevicePasskeyViaPopup, getAtomicBatchSupportDebugInfo, getDebugEntries, getDeviceBiometricUnlockText, getTheme, getThemeBase, getWalletCapabilities, isAuthorizationSessionCancelled, isExpectedAuthorizationCancellation, isTerminalTransferStatus, isTransferAwaitingCompletion, isTransparentTheme, isUserDismissedAuthorizationError, isVisibleUsdAmountAtTwoDecimals, lightTheme, lightThemeNew, lightTransparentTheme, lightTransparentThemeNew, mapGuestPickerEntries, replaceOpenProviderForAccountSwitch, resolvePasskeyRpId, screenForPhase, subscribeDebug, supportsAtomicBatch, supportsPaymasterService, useAuthorizationExecutor, useAuthorizationOrchestrator, useBlinkConfig, useBlinkDebugLog, useBlinkDepositAmount, useSolanaAccountSwitchEffect, useTransferPolling, useTransferSigning };
package/dist/index.d.ts CHANGED
@@ -589,6 +589,12 @@ declare function fetchTransfer(apiBaseUrl: string, token: string, transferId: st
589
589
  * PATCH /v1/transfers/{transferId}
590
590
  */
591
591
  declare function signTransfer(apiBaseUrl: string, token: string, transferId: string, signedTransfer: Record<string, unknown>, authorizationSessionToken?: string): Promise<Transfer>;
592
+ /**
593
+ * Regenerate a fresh sign payload for an SVM transfer whose signing window
594
+ * expired, reusing the same transfer id.
595
+ * POST /v1/transfers/{transferId}/sign-payload
596
+ */
597
+ declare function regenerateTransferSignPayload(apiBaseUrl: string, token: string, transferId: string, authorizationSessionToken?: string): Promise<Transfer>;
592
598
  declare function fetchAuthorizationSession(apiBaseUrl: string, sessionId: string): Promise<AuthorizationSessionDetail>;
593
599
  declare function fetchAuthorizationSessionByToken(apiBaseUrl: string, token: string): Promise<AuthorizationSessionDetail>;
594
600
  /**
@@ -749,6 +755,7 @@ declare const api_fetchUserConfig: typeof fetchUserConfig;
749
755
  declare const api_postTransferQuote: typeof postTransferQuote;
750
756
  declare const api_probeActionCompletion: typeof probeActionCompletion;
751
757
  declare const api_refreshManualTransferQuote: typeof refreshManualTransferQuote;
758
+ declare const api_regenerateTransferSignPayload: typeof regenerateTransferSignPayload;
752
759
  declare const api_registerPasskey: typeof registerPasskey;
753
760
  declare const api_reportActionCompletion: typeof reportActionCompletion;
754
761
  declare const api_reportPasskeyActivity: typeof reportPasskeyActivity;
@@ -760,7 +767,7 @@ declare const api_updateUserConfig: typeof updateUserConfig;
760
767
  declare const api_updateUserConfigBySession: typeof updateUserConfigBySession;
761
768
  declare const api_waitForActionTransactionReceipt: typeof waitForActionTransactionReceipt;
762
769
  declare namespace api {
763
- export { type api_ActionTransactionReceiptWaitResult as ActionTransactionReceiptWaitResult, type api_BridgeCall as BridgeCall, type api_CreateAccountAuthorizationSessionOptions as CreateAccountAuthorizationSessionOptions, type api_CreateAccountParams as CreateAccountParams, type api_CreateManualTransferParams as CreateManualTransferParams, type api_CreateTransferParams as CreateTransferParams, type api_FetchManualTransferSourcesParams as FetchManualTransferSourcesParams, type api_ProbeActionCompletionResult as ProbeActionCompletionResult, type api_RefreshManualTransferQuoteResult as RefreshManualTransferQuoteResult, type api_TransferQuote as TransferQuote, api_createAccount as createAccount, api_createAccountAuthorizationSession as createAccountAuthorizationSession, api_createManualTransfer as createManualTransfer, api_createTransfer as createTransfer, api_fetchAccount as fetchAccount, api_fetchAccounts as fetchAccounts, api_fetchAuthorizationSession as fetchAuthorizationSession, api_fetchAuthorizationSessionByToken as fetchAuthorizationSessionByToken, api_fetchChains as fetchChains, api_fetchManualTransferSession as fetchManualTransferSession, api_fetchManualTransferSources as fetchManualTransferSources, api_fetchMerchantPublicKey as fetchMerchantPublicKey, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_postTransferQuote as postTransferQuote, api_probeActionCompletion as probeActionCompletion, api_refreshManualTransferQuote as refreshManualTransferQuote, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_reportPasskeyActivity as reportPasskeyActivity, api_setAuthorizationSessionPaymentIntentAmount as setAuthorizationSessionPaymentIntentAmount, api_setAuthorizationSessionProvider as setAuthorizationSessionProvider, api_signTransfer as signTransfer, api_updateManualTransferDepositTargetChain as updateManualTransferDepositTargetChain, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession, api_waitForActionTransactionReceipt as waitForActionTransactionReceipt };
770
+ export { type api_ActionTransactionReceiptWaitResult as ActionTransactionReceiptWaitResult, type api_BridgeCall as BridgeCall, type api_CreateAccountAuthorizationSessionOptions as CreateAccountAuthorizationSessionOptions, type api_CreateAccountParams as CreateAccountParams, type api_CreateManualTransferParams as CreateManualTransferParams, type api_CreateTransferParams as CreateTransferParams, type api_FetchManualTransferSourcesParams as FetchManualTransferSourcesParams, type api_ProbeActionCompletionResult as ProbeActionCompletionResult, type api_RefreshManualTransferQuoteResult as RefreshManualTransferQuoteResult, type api_TransferQuote as TransferQuote, api_createAccount as createAccount, api_createAccountAuthorizationSession as createAccountAuthorizationSession, api_createManualTransfer as createManualTransfer, api_createTransfer as createTransfer, api_fetchAccount as fetchAccount, api_fetchAccounts as fetchAccounts, api_fetchAuthorizationSession as fetchAuthorizationSession, api_fetchAuthorizationSessionByToken as fetchAuthorizationSessionByToken, api_fetchChains as fetchChains, api_fetchManualTransferSession as fetchManualTransferSession, api_fetchManualTransferSources as fetchManualTransferSources, api_fetchMerchantPublicKey as fetchMerchantPublicKey, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_postTransferQuote as postTransferQuote, api_probeActionCompletion as probeActionCompletion, api_refreshManualTransferQuote as refreshManualTransferQuote, api_regenerateTransferSignPayload as regenerateTransferSignPayload, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_reportPasskeyActivity as reportPasskeyActivity, api_setAuthorizationSessionPaymentIntentAmount as setAuthorizationSessionPaymentIntentAmount, api_setAuthorizationSessionProvider as setAuthorizationSessionProvider, api_signTransfer as signTransfer, api_updateManualTransferDepositTargetChain as updateManualTransferDepositTargetChain, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession, api_waitForActionTransactionReceipt as waitForActionTransactionReceipt };
764
771
  }
765
772
 
766
773
  interface BlinkPaymentProps {
@@ -1224,6 +1231,14 @@ interface UseAuthorizationOrchestratorDeps {
1224
1231
  }
1225
1232
  declare function useAuthorizationOrchestrator(deps: UseAuthorizationOrchestratorDeps): UseAuthorizationOrchestratorResult;
1226
1233
 
1234
+ interface WalletAccountChange {
1235
+ previousAddress: string | null;
1236
+ nextAddress: string;
1237
+ connectorId: string;
1238
+ chainId: number | null;
1239
+ accounts: readonly string[];
1240
+ }
1241
+
1227
1242
  interface ReownWallet {
1228
1243
  id: string;
1229
1244
  name: string;
@@ -1290,6 +1305,13 @@ interface PaymentState {
1290
1305
  amount: string;
1291
1306
  transfer: Transfer | null;
1292
1307
  creatingTransfer: boolean;
1308
+ /**
1309
+ * True when an SVM transfer's signing window expired (API returned
1310
+ * `SVM_SIGN_PAYLOAD_EXPIRED`). Drives the friendly "sign within 20 seconds"
1311
+ * message + Retry on the processing screen. Cleared when a new attempt
1312
+ * starts or the transfer advances.
1313
+ */
1314
+ signPayloadExpired: boolean;
1293
1315
  passkeyConfigLoaded: boolean;
1294
1316
  activeCredentialId: string | null;
1295
1317
  knownCredentialIds: string[];
@@ -1417,6 +1439,15 @@ interface PaymentState {
1417
1439
  * — a genuine reopen should re-greet.
1418
1440
  */
1419
1441
  welcomeBackAcknowledged: boolean;
1442
+ /**
1443
+ * Latched `true` once the first accounts fetch resolves (`DATA_LOADED` /
1444
+ * `ACCOUNTS_RELOADED`). Gates fresh-phase derivation for an authenticated
1445
+ * user so we never derive a post-load screen (welcome-back / wallet-picker /
1446
+ * deposit) from the empty initial `accounts` array — that race flashes
1447
+ * `WelcomeBackScreen` before the real screen. Reset on de-auth so a new
1448
+ * session re-shows the loader until its accounts arrive.
1449
+ */
1450
+ initialDataLoaded: boolean;
1420
1451
  }
1421
1452
  interface InitialStateConfig {
1422
1453
  depositAmount: number | null;
@@ -1472,6 +1503,8 @@ interface StepHandlers {
1472
1503
  onCancelLogin: () => void;
1473
1504
  /** Advance a returning user off WelcomeBackScreen toward the wallet picker. */
1474
1505
  onAcknowledgeWelcomeBack: () => void;
1506
+ /** Back from WalletPickerScreen: return a walletless user to WelcomeBackScreen. */
1507
+ onReturnToWelcomeBack: () => void;
1475
1508
  /**
1476
1509
  * Update the in-flow amount-entry value (string display). Called by
1477
1510
  * DepositScreen entry mode on every keypress / preset tap. The view-model
@@ -1674,6 +1707,12 @@ interface UseTransferSigningResult {
1674
1707
  * 3. Submits signed UserOp via PATCH /v1/transfers/{id}
1675
1708
  */
1676
1709
  signTransfer: (transferId: string, opts?: SignTransferOptions) => Promise<Transfer>;
1710
+ /**
1711
+ * Regenerates a fresh SVM sign payload for a transfer whose signing window
1712
+ * expired (POST /v1/transfers/{id}/sign-payload), reusing the same transfer
1713
+ * id. Returns the refreshed Transfer carrying the new signPayload.
1714
+ */
1715
+ regenerateSignPayload: (transferId: string) => Promise<Transfer>;
1677
1716
  }
1678
1717
  interface UseTransferSigningOptions {
1679
1718
  /** Optional API base URL override when used outside BlinkProvider. */
@@ -2023,6 +2062,14 @@ interface SetupTokenOption {
2023
2062
  chainId?: number;
2024
2063
  /** Account this token belongs to; used by multi-account pickers to group rows. */
2025
2064
  accountId?: string;
2065
+ /**
2066
+ * Truncated wallet address (from `wallet.name`). One account may own wallets
2067
+ * at several distinct addresses (e.g. multiple Solana accounts under one
2068
+ * Phantom connection); multi-account pickers group rows by address so those
2069
+ * are not collapsed under a single header. EVM wallets share one address per
2070
+ * account, so this yields a single section there.
2071
+ */
2072
+ walletAddress?: string;
2026
2073
  /** Server-provided token logo URI from the catalog. Preferred over the local `TOKEN_LOGOS` map. */
2027
2074
  logoURI?: string | null;
2028
2075
  }
@@ -2291,12 +2338,19 @@ interface TransferStatusBaseProps {
2291
2338
  retryLabel?: string;
2292
2339
  retryAfterDelay?: boolean;
2293
2340
  showRetryOnError?: boolean;
2341
+ /**
2342
+ * Presentation of the error message. `error` (default) uses the red error
2343
+ * banner for genuine failures; `info` uses the neutral informational
2344
+ * NotificationBanner for benign, retryable conditions (e.g. an expired SVM
2345
+ * signing window).
2346
+ */
2347
+ errorVariant?: 'error' | 'info';
2294
2348
  }
2295
2349
 
2296
2350
  interface DepositTransferStatusScreenProps extends TransferStatusBaseProps {
2297
2351
  visibleError?: string | null;
2298
2352
  }
2299
- declare function DepositTransferStatusScreen({ phase, error, visibleError, onLogout, onRetry, }: DepositTransferStatusScreenProps): react_jsx_runtime.JSX.Element;
2353
+ declare function DepositTransferStatusScreen({ phase, error, visibleError, errorVariant, onLogout, onRetry, }: DepositTransferStatusScreenProps): react_jsx_runtime.JSX.Element;
2300
2354
 
2301
2355
  interface OpenWalletScreenProps {
2302
2356
  walletName: string | null;
@@ -2462,8 +2516,45 @@ declare function replaceOpenProviderForAccountSwitch(input: {
2462
2516
  sessionId: string;
2463
2517
  accounts: readonly string[];
2464
2518
  chainId: number | null;
2519
+ /**
2520
+ * SVM (Phantom) switches pass the new account's base58 pubkey here. The
2521
+ * backend's SVM OPEN_PROVIDER re-report (`generateActionsAfterSvmOpenProvider`)
2522
+ * prefers `userSolanaWalletPubkey` over `accounts[0]`, so passing it
2523
+ * explicitly avoids the dual-mode `accounts[0]` ambiguity. EVM callers omit
2524
+ * it (behavior unchanged).
2525
+ */
2526
+ userSolanaWalletPubkey?: string;
2465
2527
  }): Promise<WalletAccountSwitchResult>;
2466
2528
 
2529
+ interface SolanaAccountSwitchDeps {
2530
+ /** Set to false to detach the listener without unmounting the hook. */
2531
+ enabled?: boolean;
2532
+ /** Called with the next account when a real Solana account change is observed. */
2533
+ onAccountChanged: (change: WalletAccountChange) => void | Promise<void>;
2534
+ }
2535
+ /**
2536
+ * SVM analogue of `useWalletAccountSwitchEffect`. Subscribes to the Solana
2537
+ * wallet runtime's account-change channel (fed by the cached Phantom
2538
+ * adapter's `connect` re-emission when the user switches accounts inside the
2539
+ * wallet) and surfaces a `WalletAccountChange` on a genuine transition.
2540
+ *
2541
+ * The single effect synchronizes with an external system — the module-level
2542
+ * adapter event channel in `solanaWalletRuntime` — so the subscription and
2543
+ * its unsubscribe cleanup are a legitimate `useEffect`.
2544
+ *
2545
+ * Unlike the EVM hook (whose `useAccount` replays the current address on
2546
+ * mount, requiring a silent baseline seed to avoid a spurious null→A switch),
2547
+ * this channel is purely event-driven and the runtime already seeds its
2548
+ * baseline from the connected account at bind time — so it emits *only*
2549
+ * genuine transitions. Every emission is therefore fired through immediately;
2550
+ * the local `baselineRef` exists only to populate `previousAddress` and to
2551
+ * defensively drop a same-pubkey repeat. The emitted change is SVM-shaped —
2552
+ * `chainId: null` and `accounts: [pubkey]` — which the switch helper uses to
2553
+ * route the new Solana pubkey to the backend's preferred
2554
+ * `userSolanaWalletPubkey` field.
2555
+ */
2556
+ declare function useSolanaAccountSwitchEffect(deps: SolanaAccountSwitchDeps): void;
2557
+
2467
2558
  type DebugLevel = 'info' | 'warn' | 'error';
2468
2559
  interface DebugEntry {
2469
2560
  id: number;
@@ -2483,4 +2574,4 @@ declare function clearDebugEntries(): void;
2483
2574
  */
2484
2575
  declare function useBlinkDebugLog(): DebugEntry[];
2485
2576
 
2486
- export { ACCOUNT_SWITCH_CONFLICT_MESSAGE, type Account, type ActionExecutionResult, type AdvancedSettings, AdvancedSourceScreen, type Amount, ApprovingInWalletScreen, type ApprovingInWalletScreenProps, type AuthorizationAction, type AuthorizationSession, AuthorizationSessionCancelledError, type AuthorizationSessionDetail, BLINK_ERROR_ILLUSTRATION, BLINK_LOGO, BLINK_MASCOT, BLINK_PASSKEY_ILLUSTRATION, BLINK_SUCCESS_ILLUSTRATION, BlinkErrorScreen, BlinkInitialLoadingScreen, BlinkLoadingScreen, BlinkPayment, type BlinkPaymentProps, BlinkProvider, type BlinkProviderProps, type Chain, ConfirmSignScreen, type DebugEntry, type DebugLevel, DepositCompleteScreen, DepositOptionsScreen, DepositScreen, DepositTransferStatusScreen, type Destination, type ErrorResponse, type ExecutionResult, type GuestTokenEntry, type GuestTokenPickerRawRow, GuestTokenPickerScreen, IconCircle, InfoBanner, LOGIN_KEY_ILLUSTRATION, type LinkTokenEntry, LinkTokensScreen, type ListResponse, LoginScreen, ManualTransferPasskeyScreen, type MerchantAuthorization, type MerchantPublicKey, type MobileFlowState, OpenWalletScreen, type OrchestratorResult, type OrchestratorRunOptions, OtpVerifyScreen, OutlineButton, PasskeyIframeBlockedError, PasskeyPopupWelcomeScreen, PasskeyScreen, type PaymentPhase, type PaymentState, PoweredByFooter, type PreciseMoney, PrimaryButton, type Provider, ScreenHeader, ScreenLayout, type ScreenName, SecondaryButton, SelectDepositSourceScreen, SelectSourceScreen, SettingsMenu, type SetupTokenOption, type SourceOption, type SourceSelection, type SourceType, Spinner, type StepHandlers, type StepItem, StepList, StepRenderer, type StepRendererDerivedProps, type StepRendererFlowProps, type StepRendererFormProps, type StepRendererProps, type StepRendererRemoteProps, SuccessScreen, type ThemeMode, type ThemeTokens, type TokenBalance, TokenPickerScreen, type Transfer, type TransferDestination, type TransferPhase, type UseAuthorizationExecutorResult, type UseAuthorizationOrchestratorResult, type UserConfig, VerifyPasskeyScreen, type Wallet, type WalletAccountSwitchResult, type WalletCapabilities, type WalletCapabilitiesDebugSnapshot, type WalletDeeplink, WalletPickerScreen, type WalletSource, type WalletToken, WelcomeBackScreen, appendDebug, api as blinkApi, clearDebugEntries, createInitialState, credentialIdBase64ToBytes, darkTheme, darkThemeNew, darkTransparentTheme, darkTransparentThemeNew, deviceHasPasskey, encodePermit2ApproveCalldata, findDevicePasskey, findDevicePasskeyViaPopup, getAtomicBatchSupportDebugInfo, getDebugEntries, getDeviceBiometricUnlockText, getTheme, getThemeBase, getWalletCapabilities, isAuthorizationSessionCancelled, isExpectedAuthorizationCancellation, isTerminalTransferStatus, isTransferAwaitingCompletion, isTransparentTheme, isUserDismissedAuthorizationError, isVisibleUsdAmountAtTwoDecimals, lightTheme, lightThemeNew, lightTransparentTheme, lightTransparentThemeNew, mapGuestPickerEntries, replaceOpenProviderForAccountSwitch, resolvePasskeyRpId, screenForPhase, subscribeDebug, supportsAtomicBatch, supportsPaymasterService, useAuthorizationExecutor, useAuthorizationOrchestrator, useBlinkConfig, useBlinkDebugLog, useBlinkDepositAmount, useTransferPolling, useTransferSigning };
2577
+ export { ACCOUNT_SWITCH_CONFLICT_MESSAGE, type Account, type ActionExecutionResult, type AdvancedSettings, AdvancedSourceScreen, type Amount, ApprovingInWalletScreen, type ApprovingInWalletScreenProps, type AuthorizationAction, type AuthorizationSession, AuthorizationSessionCancelledError, type AuthorizationSessionDetail, BLINK_ERROR_ILLUSTRATION, BLINK_LOGO, BLINK_MASCOT, BLINK_PASSKEY_ILLUSTRATION, BLINK_SUCCESS_ILLUSTRATION, BlinkErrorScreen, BlinkInitialLoadingScreen, BlinkLoadingScreen, BlinkPayment, type BlinkPaymentProps, BlinkProvider, type BlinkProviderProps, type Chain, ConfirmSignScreen, type DebugEntry, type DebugLevel, DepositCompleteScreen, DepositOptionsScreen, DepositScreen, DepositTransferStatusScreen, type Destination, type ErrorResponse, type ExecutionResult, type GuestTokenEntry, type GuestTokenPickerRawRow, GuestTokenPickerScreen, IconCircle, InfoBanner, LOGIN_KEY_ILLUSTRATION, type LinkTokenEntry, LinkTokensScreen, type ListResponse, LoginScreen, ManualTransferPasskeyScreen, type MerchantAuthorization, type MerchantPublicKey, type MobileFlowState, OpenWalletScreen, type OrchestratorResult, type OrchestratorRunOptions, OtpVerifyScreen, OutlineButton, PasskeyIframeBlockedError, PasskeyPopupWelcomeScreen, PasskeyScreen, type PaymentPhase, type PaymentState, PoweredByFooter, type PreciseMoney, PrimaryButton, type Provider, ScreenHeader, ScreenLayout, type ScreenName, SecondaryButton, SelectDepositSourceScreen, SelectSourceScreen, SettingsMenu, type SetupTokenOption, type SolanaAccountSwitchDeps, type SourceOption, type SourceSelection, type SourceType, Spinner, type StepHandlers, type StepItem, StepList, StepRenderer, type StepRendererDerivedProps, type StepRendererFlowProps, type StepRendererFormProps, type StepRendererProps, type StepRendererRemoteProps, SuccessScreen, type ThemeMode, type ThemeTokens, type TokenBalance, TokenPickerScreen, type Transfer, type TransferDestination, type TransferPhase, type UseAuthorizationExecutorResult, type UseAuthorizationOrchestratorResult, type UserConfig, VerifyPasskeyScreen, type Wallet, type WalletAccountChange, type WalletAccountSwitchResult, type WalletCapabilities, type WalletCapabilitiesDebugSnapshot, type WalletDeeplink, WalletPickerScreen, type WalletSource, type WalletToken, WelcomeBackScreen, appendDebug, api as blinkApi, clearDebugEntries, createInitialState, credentialIdBase64ToBytes, darkTheme, darkThemeNew, darkTransparentTheme, darkTransparentThemeNew, deviceHasPasskey, encodePermit2ApproveCalldata, findDevicePasskey, findDevicePasskeyViaPopup, getAtomicBatchSupportDebugInfo, getDebugEntries, getDeviceBiometricUnlockText, getTheme, getThemeBase, getWalletCapabilities, isAuthorizationSessionCancelled, isExpectedAuthorizationCancellation, isTerminalTransferStatus, isTransferAwaitingCompletion, isTransparentTheme, isUserDismissedAuthorizationError, isVisibleUsdAmountAtTwoDecimals, lightTheme, lightThemeNew, lightTransparentTheme, lightTransparentThemeNew, mapGuestPickerEntries, replaceOpenProviderForAccountSwitch, resolvePasskeyRpId, screenForPhase, subscribeDebug, supportsAtomicBatch, supportsPaymasterService, useAuthorizationExecutor, useAuthorizationOrchestrator, useBlinkConfig, useBlinkDebugLog, useBlinkDepositAmount, useSolanaAccountSwitchEffect, useTransferPolling, useTransferSigning };