@swype-org/react-sdk 0.1.300 → 0.1.329
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/README.md +19 -0
- package/dist/index.cjs +1021 -345
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +59 -9
- package/dist/index.d.ts +59 -9
- package/dist/index.js +1020 -347
- package/dist/index.js.map +1 -1
- package/package.json +11 -3
package/dist/index.d.cts
CHANGED
|
@@ -373,8 +373,24 @@ interface CreateTransferParams {
|
|
|
373
373
|
destination: Destination;
|
|
374
374
|
amount: number;
|
|
375
375
|
currency?: string;
|
|
376
|
+
/** Pre-transfer fee quote ID for advisory linkage. */
|
|
377
|
+
quoteId?: string;
|
|
376
378
|
}
|
|
377
379
|
declare function createTransfer(apiBaseUrl: string, token: string, params: CreateTransferParams): Promise<Transfer>;
|
|
380
|
+
interface TransferQuote {
|
|
381
|
+
id: string;
|
|
382
|
+
fee: PreciseMoney;
|
|
383
|
+
expiresAt: string;
|
|
384
|
+
}
|
|
385
|
+
declare function postTransferQuote(apiBaseUrl: string, bearerToken: string, params: {
|
|
386
|
+
walletId: string;
|
|
387
|
+
sourceTokenAddress?: string;
|
|
388
|
+
destination: Destination;
|
|
389
|
+
amount: {
|
|
390
|
+
amount: number;
|
|
391
|
+
currency: string;
|
|
392
|
+
};
|
|
393
|
+
}): Promise<TransferQuote>;
|
|
378
394
|
declare function fetchMerchantPublicKey(apiBaseUrl: string, merchantId: string): Promise<MerchantPublicKey>;
|
|
379
395
|
declare function fetchTransfer(apiBaseUrl: string, token: string, transferId: string, authorizationSessionToken?: string): Promise<Transfer>;
|
|
380
396
|
/**
|
|
@@ -512,6 +528,7 @@ type api_CreateGuestTransferParams = CreateGuestTransferParams;
|
|
|
512
528
|
type api_CreateTransferParams = CreateTransferParams;
|
|
513
529
|
type api_GuestBalanceOption = GuestBalanceOption;
|
|
514
530
|
type api_GuestTransferResult = GuestTransferResult;
|
|
531
|
+
type api_TransferQuote = TransferQuote;
|
|
515
532
|
declare const api_createAccount: typeof createAccount;
|
|
516
533
|
declare const api_createAccountAuthorizationSession: typeof createAccountAuthorizationSession;
|
|
517
534
|
declare const api_createGuestAccount: typeof createGuestAccount;
|
|
@@ -530,6 +547,7 @@ declare const api_fetchUserConfig: typeof fetchUserConfig;
|
|
|
530
547
|
declare const api_getGuestTransfer: typeof getGuestTransfer;
|
|
531
548
|
declare const api_getTransferByGuestToken: typeof getTransferByGuestToken;
|
|
532
549
|
declare const api_postGuestTransferFeeQuote: typeof postGuestTransferFeeQuote;
|
|
550
|
+
declare const api_postTransferQuote: typeof postTransferQuote;
|
|
533
551
|
declare const api_putGuestTransferSender: typeof putGuestTransferSender;
|
|
534
552
|
declare const api_registerPasskey: typeof registerPasskey;
|
|
535
553
|
declare const api_reportActionCompletion: typeof reportActionCompletion;
|
|
@@ -541,7 +559,7 @@ declare const api_signTransfer: typeof signTransfer;
|
|
|
541
559
|
declare const api_updateUserConfig: typeof updateUserConfig;
|
|
542
560
|
declare const api_updateUserConfigBySession: typeof updateUserConfigBySession;
|
|
543
561
|
declare namespace api {
|
|
544
|
-
export { type api_CreateAccountParams as CreateAccountParams, type api_CreateGuestTransferParams as CreateGuestTransferParams, type api_CreateTransferParams as CreateTransferParams, type api_GuestBalanceOption as GuestBalanceOption, type api_GuestTransferResult as GuestTransferResult, api_createAccount as createAccount, api_createAccountAuthorizationSession as createAccountAuthorizationSession, api_createGuestAccount as createGuestAccount, api_createGuestTransfer as createGuestTransfer, 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_fetchGuestAccount as fetchGuestAccount, api_fetchMerchantPublicKey as fetchMerchantPublicKey, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_getGuestTransfer as getGuestTransfer, api_getTransferByGuestToken as getTransferByGuestToken, api_postGuestTransferFeeQuote as postGuestTransferFeeQuote, api_putGuestTransferSender as putGuestTransferSender, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_reportPasskeyActivity as reportPasskeyActivity, api_setAccountOwner as setAccountOwner, api_setTransferSender as setTransferSender, api_signGuestTransfer as signGuestTransfer, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession };
|
|
562
|
+
export { type api_CreateAccountParams as CreateAccountParams, type api_CreateGuestTransferParams as CreateGuestTransferParams, type api_CreateTransferParams as CreateTransferParams, type api_GuestBalanceOption as GuestBalanceOption, type api_GuestTransferResult as GuestTransferResult, type api_TransferQuote as TransferQuote, api_createAccount as createAccount, api_createAccountAuthorizationSession as createAccountAuthorizationSession, api_createGuestAccount as createGuestAccount, api_createGuestTransfer as createGuestTransfer, 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_fetchGuestAccount as fetchGuestAccount, api_fetchMerchantPublicKey as fetchMerchantPublicKey, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_getGuestTransfer as getGuestTransfer, api_getTransferByGuestToken as getTransferByGuestToken, api_postGuestTransferFeeQuote as postGuestTransferFeeQuote, api_postTransferQuote as postTransferQuote, api_putGuestTransferSender as putGuestTransferSender, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_reportPasskeyActivity as reportPasskeyActivity, api_setAccountOwner as setAccountOwner, api_setTransferSender as setTransferSender, api_signGuestTransfer as signGuestTransfer, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession };
|
|
545
563
|
}
|
|
546
564
|
|
|
547
565
|
interface BlinkPaymentProps {
|
|
@@ -699,6 +717,18 @@ interface UseTransferPollingResult {
|
|
|
699
717
|
*/
|
|
700
718
|
declare function useTransferPolling(intervalMs?: number): UseTransferPollingResult;
|
|
701
719
|
|
|
720
|
+
/** Thrown when `cancelPendingExecution()` rejects an in-flight session (user left funding UI). */
|
|
721
|
+
declare class AuthorizationSessionCancelledError extends Error {
|
|
722
|
+
constructor();
|
|
723
|
+
}
|
|
724
|
+
/** True for client cancel or duplicate bundle copies where `instanceof` may fail. */
|
|
725
|
+
declare function isAuthorizationSessionCancelled(err: unknown): boolean;
|
|
726
|
+
/**
|
|
727
|
+
* Backend / wallet may surface user-dismissal with this wording; treat like cancel so deposit
|
|
728
|
+
* does not keep a red banner after backing out of setup.
|
|
729
|
+
*/
|
|
730
|
+
declare function isUserDismissedAuthorizationError(err: unknown): boolean;
|
|
731
|
+
|
|
702
732
|
interface UseAuthorizationExecutorResult {
|
|
703
733
|
executing: boolean;
|
|
704
734
|
results: ActionExecutionResult[];
|
|
@@ -715,6 +745,14 @@ interface UseAuthorizationExecutorResult {
|
|
|
715
745
|
resolveOneTapSetup: () => void;
|
|
716
746
|
/** Execute authorization by session id. */
|
|
717
747
|
executeSessionById: (sessionId: string) => Promise<void>;
|
|
748
|
+
/**
|
|
749
|
+
* Number of nested `executeSessionById` runs on the stack (1 = single session).
|
|
750
|
+
* Used to show OpenWallet during token reauthorization while the parent session is paused
|
|
751
|
+
* on the One-Tap limit step (`pendingOneTapSetup`).
|
|
752
|
+
*/
|
|
753
|
+
authorizationSessionStackDepth: number;
|
|
754
|
+
/** Reject paused SELECT_SOURCE / One-Tap waits and reset executor flags (e.g. user backed to deposit). */
|
|
755
|
+
cancelPendingExecution: () => void;
|
|
718
756
|
}
|
|
719
757
|
interface UseAuthorizationExecutorOptions {
|
|
720
758
|
/** Optional API base URL override when used outside BlinkProvider. */
|
|
@@ -1024,6 +1062,9 @@ interface SetupTokenOption {
|
|
|
1024
1062
|
chainName: string;
|
|
1025
1063
|
balance?: number;
|
|
1026
1064
|
walletId?: string;
|
|
1065
|
+
status?: string;
|
|
1066
|
+
tokenAddress?: string;
|
|
1067
|
+
chainId?: number;
|
|
1027
1068
|
}
|
|
1028
1069
|
interface SetupScreenProps {
|
|
1029
1070
|
availableBalance: number;
|
|
@@ -1042,12 +1083,14 @@ interface SetupScreenProps {
|
|
|
1042
1083
|
error: string | null;
|
|
1043
1084
|
/** Token symbol for the selected source, e.g. "USDC" or "USDT" */
|
|
1044
1085
|
selectedTokenSymbol?: string;
|
|
1086
|
+
/** Chain name for the selected source, used alongside selectedTokenSymbol to disambiguate same-symbol tokens on different chains. */
|
|
1087
|
+
selectedChainName?: string;
|
|
1045
1088
|
/** Available tokens for the inline dropdown. When provided, the token row opens a dropdown instead of navigating. */
|
|
1046
1089
|
tokenOptions?: SetupTokenOption[];
|
|
1047
1090
|
/** Called when the user picks a token from the inline dropdown. */
|
|
1048
1091
|
onSelectToken?: (symbol: string, chainName: string, walletId?: string) => void;
|
|
1049
1092
|
}
|
|
1050
|
-
declare function SetupScreen({ availableBalance, onSetupOneTap, onBack, onLogout, onAdvanced, loading, error, selectedTokenSymbol, tokenOptions, onSelectToken, }: SetupScreenProps): react_jsx_runtime.JSX.Element;
|
|
1093
|
+
declare function SetupScreen({ availableBalance, onSetupOneTap, onBack, onLogout, onAdvanced, loading, error, selectedTokenSymbol, selectedChainName, tokenOptions, onSelectToken, }: SetupScreenProps): react_jsx_runtime.JSX.Element;
|
|
1051
1094
|
|
|
1052
1095
|
interface SetupStatusScreenProps {
|
|
1053
1096
|
/** Whether setup has completed */
|
|
@@ -1075,9 +1118,10 @@ interface DepositScreenProps {
|
|
|
1075
1118
|
tokenCount: number;
|
|
1076
1119
|
/** Pre-populated amount */
|
|
1077
1120
|
initialAmount: number;
|
|
1078
|
-
/**
|
|
1079
|
-
|
|
1080
|
-
|
|
1121
|
+
/** Pre-transfer fee estimate from POST /v1/transfers/quotes */
|
|
1122
|
+
quoteFee?: PreciseMoney | null;
|
|
1123
|
+
/** Whether a fee quote is being fetched */
|
|
1124
|
+
quoteLoading?: boolean;
|
|
1081
1125
|
/** Whether the deposit is currently processing */
|
|
1082
1126
|
processing?: boolean;
|
|
1083
1127
|
error: string | null;
|
|
@@ -1099,12 +1143,18 @@ interface DepositScreenProps {
|
|
|
1099
1143
|
onAuthorizeAccount?: (accountId: string) => void;
|
|
1100
1144
|
/** Called when "+ Add Provider" is clicked in the dropdown */
|
|
1101
1145
|
onAddProvider?: () => void;
|
|
1102
|
-
/**
|
|
1146
|
+
/** Fallback: navigate to the full-page token picker when no inline options. */
|
|
1103
1147
|
onSelectToken?: () => void;
|
|
1148
|
+
/** Available tokens for the inline dropdown. When provided, the token badge opens a dropdown instead of navigating. */
|
|
1149
|
+
tokenOptions?: SetupTokenOption[];
|
|
1150
|
+
/** Called when the user picks a token from the inline dropdown. */
|
|
1151
|
+
onPickToken?: (symbol: string, chainName: string, walletId?: string) => void;
|
|
1104
1152
|
/** Label for the selected chain/token, e.g. "USDC on Base" */
|
|
1105
1153
|
selectedSourceLabel?: string;
|
|
1106
1154
|
/** Token symbol for the selected source, e.g. "USDC" or "USDT" */
|
|
1107
1155
|
selectedTokenSymbol?: string;
|
|
1156
|
+
/** Chain name for the selected source, used to disambiguate same-symbol tokens on different chains. */
|
|
1157
|
+
selectedChainName?: string;
|
|
1108
1158
|
/**
|
|
1109
1159
|
* Minimum USD amount required for One-Tap on this screen. When the host sets
|
|
1110
1160
|
* `depositAmount`, this should match it; otherwise the default floor ($0.25)
|
|
@@ -1112,7 +1162,7 @@ interface DepositScreenProps {
|
|
|
1112
1162
|
*/
|
|
1113
1163
|
minDepositFloor: number;
|
|
1114
1164
|
}
|
|
1115
|
-
declare function DepositScreen({ merchantName, availableBalance, remainingLimit, tokenCount, initialAmount, minDepositFloor, processing, error, onDeposit, onSwitchWallet, onBack, onLogout, onIncreaseLimit, increasingLimit, accounts, selectedAccountId, onSelectAccount, onAuthorizeAccount, onAddProvider, onSelectToken, selectedSourceLabel, selectedTokenSymbol, }: DepositScreenProps): react_jsx_runtime.JSX.Element;
|
|
1165
|
+
declare function DepositScreen({ merchantName, availableBalance, remainingLimit, tokenCount, initialAmount, minDepositFloor, quoteFee, quoteLoading, processing, error, onDeposit, onSwitchWallet, onBack, onLogout, onIncreaseLimit, increasingLimit, accounts, selectedAccountId, onSelectAccount, onAuthorizeAccount, onAddProvider, onSelectToken, tokenOptions, onPickToken, selectedSourceLabel, selectedTokenSymbol, selectedChainName, }: DepositScreenProps): react_jsx_runtime.JSX.Element;
|
|
1116
1166
|
|
|
1117
1167
|
interface SuccessScreenProps {
|
|
1118
1168
|
amount: number;
|
|
@@ -1128,7 +1178,7 @@ interface SuccessScreenProps {
|
|
|
1128
1178
|
onManageAccount?: () => void;
|
|
1129
1179
|
onPreauthorize?: () => void;
|
|
1130
1180
|
}
|
|
1131
|
-
declare function SuccessScreen({ amount, currency, succeeded, error, merchantName, sourceName, remainingLimit, onDone, onLogout, onIncreaseLimits, onManageAccount, onPreauthorize, }: SuccessScreenProps): react_jsx_runtime.JSX.Element;
|
|
1181
|
+
declare function SuccessScreen({ amount, currency: _currency, succeeded, error, merchantName, sourceName, remainingLimit, onDone, onLogout, onIncreaseLimits, onManageAccount, onPreauthorize, }: SuccessScreenProps): react_jsx_runtime.JSX.Element;
|
|
1132
1182
|
|
|
1133
1183
|
interface ChainChoice$1 {
|
|
1134
1184
|
chainName: string;
|
|
@@ -1272,4 +1322,4 @@ declare const BLINK_LOGO: string;
|
|
|
1272
1322
|
/** @deprecated Use BLINK_LOGO instead. Kept for backward compatibility. */
|
|
1273
1323
|
declare const BLINK_MASCOT: string;
|
|
1274
1324
|
|
|
1275
|
-
export { type Account, type ActionExecutionResult, type AdvancedSettings, AdvancedSourceScreen, type Amount, type AuthorizationAction, type AuthorizationSession, type AuthorizationSessionDetail, BLINK_LOGO, BLINK_MASCOT, BlinkLoadingScreen, BlinkPayment, type BlinkPaymentProps, BlinkProvider, type BlinkProviderProps, type Chain, ConfirmSignScreen, DepositScreen, type Destination, type ErrorResponse, type FlowPhase, FlowPhaseProvider, type GuestBalanceOptionInput, GuestPreauthLinkingScreen, GuestPreauthSetupCompleteScreen, type GuestTokenEntry, GuestTokenPickerScreen, type GuestTransferFee, IconCircle, InfoBanner, type ListResponse, LoginScreen, type MerchantAuthorization, type MerchantPublicKey, type MobileFlowState, OpenWalletScreen, OtpVerifyScreen, OutlineButton, PasskeyIframeBlockedError, PasskeyScreen, type PaymentPhase, PoweredByFooter, type PreciseMoney, PrimaryButton, type Provider, ScreenHeader, ScreenLayout, type ScreenName, SelectSourceScreen, SettingsMenu, SetupScreen, SetupStatusScreen, type SetupTokenOption, type SourceOption, type SourceSelection, type SourceType, Spinner, type StepItem, StepList, SuccessScreen, type ThemeMode, type ThemeTokens, type TokenBalance, TokenPickerScreen, type Transfer, type TransferDestination, type TransferPhase, TransferStatusScreen, type UserConfig, VerifyPasskeyScreen, type Wallet, WalletPickerScreen, type WalletSource, type WalletToken, api as blinkApi, buildPasskeyPopupOptions, createPasskeyCredential, createPasskeyViaPopup, darkTheme, deviceHasPasskey, findDevicePasskey, findDevicePasskeyViaPopup, getTheme, guestEntryMatchingRecommended, lightTheme, mapGuestPickerEntries, resolvePasskeyRpId, screenForPhase, useAuthorizationExecutor, useBlinkConfig, useBlinkDepositAmount, useTransferPolling, useTransferSigning };
|
|
1325
|
+
export { type Account, type ActionExecutionResult, type AdvancedSettings, AdvancedSourceScreen, type Amount, type AuthorizationAction, type AuthorizationSession, AuthorizationSessionCancelledError, type AuthorizationSessionDetail, BLINK_LOGO, BLINK_MASCOT, BlinkLoadingScreen, BlinkPayment, type BlinkPaymentProps, BlinkProvider, type BlinkProviderProps, type Chain, ConfirmSignScreen, DepositScreen, type Destination, type ErrorResponse, type FlowPhase, FlowPhaseProvider, type GuestBalanceOptionInput, GuestPreauthLinkingScreen, GuestPreauthSetupCompleteScreen, type GuestTokenEntry, GuestTokenPickerScreen, type GuestTransferFee, IconCircle, InfoBanner, type ListResponse, LoginScreen, type MerchantAuthorization, type MerchantPublicKey, type MobileFlowState, OpenWalletScreen, OtpVerifyScreen, OutlineButton, PasskeyIframeBlockedError, PasskeyScreen, type PaymentPhase, PoweredByFooter, type PreciseMoney, PrimaryButton, type Provider, ScreenHeader, ScreenLayout, type ScreenName, SelectSourceScreen, SettingsMenu, SetupScreen, SetupStatusScreen, type SetupTokenOption, type SourceOption, type SourceSelection, type SourceType, Spinner, type StepItem, StepList, SuccessScreen, type ThemeMode, type ThemeTokens, type TokenBalance, TokenPickerScreen, type Transfer, type TransferDestination, type TransferPhase, TransferStatusScreen, type UserConfig, VerifyPasskeyScreen, type Wallet, WalletPickerScreen, type WalletSource, type WalletToken, api as blinkApi, buildPasskeyPopupOptions, createPasskeyCredential, createPasskeyViaPopup, darkTheme, deviceHasPasskey, findDevicePasskey, findDevicePasskeyViaPopup, getTheme, guestEntryMatchingRecommended, isAuthorizationSessionCancelled, isUserDismissedAuthorizationError, lightTheme, mapGuestPickerEntries, resolvePasskeyRpId, screenForPhase, useAuthorizationExecutor, useBlinkConfig, useBlinkDepositAmount, useTransferPolling, useTransferSigning };
|
package/dist/index.d.ts
CHANGED
|
@@ -373,8 +373,24 @@ interface CreateTransferParams {
|
|
|
373
373
|
destination: Destination;
|
|
374
374
|
amount: number;
|
|
375
375
|
currency?: string;
|
|
376
|
+
/** Pre-transfer fee quote ID for advisory linkage. */
|
|
377
|
+
quoteId?: string;
|
|
376
378
|
}
|
|
377
379
|
declare function createTransfer(apiBaseUrl: string, token: string, params: CreateTransferParams): Promise<Transfer>;
|
|
380
|
+
interface TransferQuote {
|
|
381
|
+
id: string;
|
|
382
|
+
fee: PreciseMoney;
|
|
383
|
+
expiresAt: string;
|
|
384
|
+
}
|
|
385
|
+
declare function postTransferQuote(apiBaseUrl: string, bearerToken: string, params: {
|
|
386
|
+
walletId: string;
|
|
387
|
+
sourceTokenAddress?: string;
|
|
388
|
+
destination: Destination;
|
|
389
|
+
amount: {
|
|
390
|
+
amount: number;
|
|
391
|
+
currency: string;
|
|
392
|
+
};
|
|
393
|
+
}): Promise<TransferQuote>;
|
|
378
394
|
declare function fetchMerchantPublicKey(apiBaseUrl: string, merchantId: string): Promise<MerchantPublicKey>;
|
|
379
395
|
declare function fetchTransfer(apiBaseUrl: string, token: string, transferId: string, authorizationSessionToken?: string): Promise<Transfer>;
|
|
380
396
|
/**
|
|
@@ -512,6 +528,7 @@ type api_CreateGuestTransferParams = CreateGuestTransferParams;
|
|
|
512
528
|
type api_CreateTransferParams = CreateTransferParams;
|
|
513
529
|
type api_GuestBalanceOption = GuestBalanceOption;
|
|
514
530
|
type api_GuestTransferResult = GuestTransferResult;
|
|
531
|
+
type api_TransferQuote = TransferQuote;
|
|
515
532
|
declare const api_createAccount: typeof createAccount;
|
|
516
533
|
declare const api_createAccountAuthorizationSession: typeof createAccountAuthorizationSession;
|
|
517
534
|
declare const api_createGuestAccount: typeof createGuestAccount;
|
|
@@ -530,6 +547,7 @@ declare const api_fetchUserConfig: typeof fetchUserConfig;
|
|
|
530
547
|
declare const api_getGuestTransfer: typeof getGuestTransfer;
|
|
531
548
|
declare const api_getTransferByGuestToken: typeof getTransferByGuestToken;
|
|
532
549
|
declare const api_postGuestTransferFeeQuote: typeof postGuestTransferFeeQuote;
|
|
550
|
+
declare const api_postTransferQuote: typeof postTransferQuote;
|
|
533
551
|
declare const api_putGuestTransferSender: typeof putGuestTransferSender;
|
|
534
552
|
declare const api_registerPasskey: typeof registerPasskey;
|
|
535
553
|
declare const api_reportActionCompletion: typeof reportActionCompletion;
|
|
@@ -541,7 +559,7 @@ declare const api_signTransfer: typeof signTransfer;
|
|
|
541
559
|
declare const api_updateUserConfig: typeof updateUserConfig;
|
|
542
560
|
declare const api_updateUserConfigBySession: typeof updateUserConfigBySession;
|
|
543
561
|
declare namespace api {
|
|
544
|
-
export { type api_CreateAccountParams as CreateAccountParams, type api_CreateGuestTransferParams as CreateGuestTransferParams, type api_CreateTransferParams as CreateTransferParams, type api_GuestBalanceOption as GuestBalanceOption, type api_GuestTransferResult as GuestTransferResult, api_createAccount as createAccount, api_createAccountAuthorizationSession as createAccountAuthorizationSession, api_createGuestAccount as createGuestAccount, api_createGuestTransfer as createGuestTransfer, 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_fetchGuestAccount as fetchGuestAccount, api_fetchMerchantPublicKey as fetchMerchantPublicKey, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_getGuestTransfer as getGuestTransfer, api_getTransferByGuestToken as getTransferByGuestToken, api_postGuestTransferFeeQuote as postGuestTransferFeeQuote, api_putGuestTransferSender as putGuestTransferSender, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_reportPasskeyActivity as reportPasskeyActivity, api_setAccountOwner as setAccountOwner, api_setTransferSender as setTransferSender, api_signGuestTransfer as signGuestTransfer, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession };
|
|
562
|
+
export { type api_CreateAccountParams as CreateAccountParams, type api_CreateGuestTransferParams as CreateGuestTransferParams, type api_CreateTransferParams as CreateTransferParams, type api_GuestBalanceOption as GuestBalanceOption, type api_GuestTransferResult as GuestTransferResult, type api_TransferQuote as TransferQuote, api_createAccount as createAccount, api_createAccountAuthorizationSession as createAccountAuthorizationSession, api_createGuestAccount as createGuestAccount, api_createGuestTransfer as createGuestTransfer, 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_fetchGuestAccount as fetchGuestAccount, api_fetchMerchantPublicKey as fetchMerchantPublicKey, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_getGuestTransfer as getGuestTransfer, api_getTransferByGuestToken as getTransferByGuestToken, api_postGuestTransferFeeQuote as postGuestTransferFeeQuote, api_postTransferQuote as postTransferQuote, api_putGuestTransferSender as putGuestTransferSender, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_reportPasskeyActivity as reportPasskeyActivity, api_setAccountOwner as setAccountOwner, api_setTransferSender as setTransferSender, api_signGuestTransfer as signGuestTransfer, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession };
|
|
545
563
|
}
|
|
546
564
|
|
|
547
565
|
interface BlinkPaymentProps {
|
|
@@ -699,6 +717,18 @@ interface UseTransferPollingResult {
|
|
|
699
717
|
*/
|
|
700
718
|
declare function useTransferPolling(intervalMs?: number): UseTransferPollingResult;
|
|
701
719
|
|
|
720
|
+
/** Thrown when `cancelPendingExecution()` rejects an in-flight session (user left funding UI). */
|
|
721
|
+
declare class AuthorizationSessionCancelledError extends Error {
|
|
722
|
+
constructor();
|
|
723
|
+
}
|
|
724
|
+
/** True for client cancel or duplicate bundle copies where `instanceof` may fail. */
|
|
725
|
+
declare function isAuthorizationSessionCancelled(err: unknown): boolean;
|
|
726
|
+
/**
|
|
727
|
+
* Backend / wallet may surface user-dismissal with this wording; treat like cancel so deposit
|
|
728
|
+
* does not keep a red banner after backing out of setup.
|
|
729
|
+
*/
|
|
730
|
+
declare function isUserDismissedAuthorizationError(err: unknown): boolean;
|
|
731
|
+
|
|
702
732
|
interface UseAuthorizationExecutorResult {
|
|
703
733
|
executing: boolean;
|
|
704
734
|
results: ActionExecutionResult[];
|
|
@@ -715,6 +745,14 @@ interface UseAuthorizationExecutorResult {
|
|
|
715
745
|
resolveOneTapSetup: () => void;
|
|
716
746
|
/** Execute authorization by session id. */
|
|
717
747
|
executeSessionById: (sessionId: string) => Promise<void>;
|
|
748
|
+
/**
|
|
749
|
+
* Number of nested `executeSessionById` runs on the stack (1 = single session).
|
|
750
|
+
* Used to show OpenWallet during token reauthorization while the parent session is paused
|
|
751
|
+
* on the One-Tap limit step (`pendingOneTapSetup`).
|
|
752
|
+
*/
|
|
753
|
+
authorizationSessionStackDepth: number;
|
|
754
|
+
/** Reject paused SELECT_SOURCE / One-Tap waits and reset executor flags (e.g. user backed to deposit). */
|
|
755
|
+
cancelPendingExecution: () => void;
|
|
718
756
|
}
|
|
719
757
|
interface UseAuthorizationExecutorOptions {
|
|
720
758
|
/** Optional API base URL override when used outside BlinkProvider. */
|
|
@@ -1024,6 +1062,9 @@ interface SetupTokenOption {
|
|
|
1024
1062
|
chainName: string;
|
|
1025
1063
|
balance?: number;
|
|
1026
1064
|
walletId?: string;
|
|
1065
|
+
status?: string;
|
|
1066
|
+
tokenAddress?: string;
|
|
1067
|
+
chainId?: number;
|
|
1027
1068
|
}
|
|
1028
1069
|
interface SetupScreenProps {
|
|
1029
1070
|
availableBalance: number;
|
|
@@ -1042,12 +1083,14 @@ interface SetupScreenProps {
|
|
|
1042
1083
|
error: string | null;
|
|
1043
1084
|
/** Token symbol for the selected source, e.g. "USDC" or "USDT" */
|
|
1044
1085
|
selectedTokenSymbol?: string;
|
|
1086
|
+
/** Chain name for the selected source, used alongside selectedTokenSymbol to disambiguate same-symbol tokens on different chains. */
|
|
1087
|
+
selectedChainName?: string;
|
|
1045
1088
|
/** Available tokens for the inline dropdown. When provided, the token row opens a dropdown instead of navigating. */
|
|
1046
1089
|
tokenOptions?: SetupTokenOption[];
|
|
1047
1090
|
/** Called when the user picks a token from the inline dropdown. */
|
|
1048
1091
|
onSelectToken?: (symbol: string, chainName: string, walletId?: string) => void;
|
|
1049
1092
|
}
|
|
1050
|
-
declare function SetupScreen({ availableBalance, onSetupOneTap, onBack, onLogout, onAdvanced, loading, error, selectedTokenSymbol, tokenOptions, onSelectToken, }: SetupScreenProps): react_jsx_runtime.JSX.Element;
|
|
1093
|
+
declare function SetupScreen({ availableBalance, onSetupOneTap, onBack, onLogout, onAdvanced, loading, error, selectedTokenSymbol, selectedChainName, tokenOptions, onSelectToken, }: SetupScreenProps): react_jsx_runtime.JSX.Element;
|
|
1051
1094
|
|
|
1052
1095
|
interface SetupStatusScreenProps {
|
|
1053
1096
|
/** Whether setup has completed */
|
|
@@ -1075,9 +1118,10 @@ interface DepositScreenProps {
|
|
|
1075
1118
|
tokenCount: number;
|
|
1076
1119
|
/** Pre-populated amount */
|
|
1077
1120
|
initialAmount: number;
|
|
1078
|
-
/**
|
|
1079
|
-
|
|
1080
|
-
|
|
1121
|
+
/** Pre-transfer fee estimate from POST /v1/transfers/quotes */
|
|
1122
|
+
quoteFee?: PreciseMoney | null;
|
|
1123
|
+
/** Whether a fee quote is being fetched */
|
|
1124
|
+
quoteLoading?: boolean;
|
|
1081
1125
|
/** Whether the deposit is currently processing */
|
|
1082
1126
|
processing?: boolean;
|
|
1083
1127
|
error: string | null;
|
|
@@ -1099,12 +1143,18 @@ interface DepositScreenProps {
|
|
|
1099
1143
|
onAuthorizeAccount?: (accountId: string) => void;
|
|
1100
1144
|
/** Called when "+ Add Provider" is clicked in the dropdown */
|
|
1101
1145
|
onAddProvider?: () => void;
|
|
1102
|
-
/**
|
|
1146
|
+
/** Fallback: navigate to the full-page token picker when no inline options. */
|
|
1103
1147
|
onSelectToken?: () => void;
|
|
1148
|
+
/** Available tokens for the inline dropdown. When provided, the token badge opens a dropdown instead of navigating. */
|
|
1149
|
+
tokenOptions?: SetupTokenOption[];
|
|
1150
|
+
/** Called when the user picks a token from the inline dropdown. */
|
|
1151
|
+
onPickToken?: (symbol: string, chainName: string, walletId?: string) => void;
|
|
1104
1152
|
/** Label for the selected chain/token, e.g. "USDC on Base" */
|
|
1105
1153
|
selectedSourceLabel?: string;
|
|
1106
1154
|
/** Token symbol for the selected source, e.g. "USDC" or "USDT" */
|
|
1107
1155
|
selectedTokenSymbol?: string;
|
|
1156
|
+
/** Chain name for the selected source, used to disambiguate same-symbol tokens on different chains. */
|
|
1157
|
+
selectedChainName?: string;
|
|
1108
1158
|
/**
|
|
1109
1159
|
* Minimum USD amount required for One-Tap on this screen. When the host sets
|
|
1110
1160
|
* `depositAmount`, this should match it; otherwise the default floor ($0.25)
|
|
@@ -1112,7 +1162,7 @@ interface DepositScreenProps {
|
|
|
1112
1162
|
*/
|
|
1113
1163
|
minDepositFloor: number;
|
|
1114
1164
|
}
|
|
1115
|
-
declare function DepositScreen({ merchantName, availableBalance, remainingLimit, tokenCount, initialAmount, minDepositFloor, processing, error, onDeposit, onSwitchWallet, onBack, onLogout, onIncreaseLimit, increasingLimit, accounts, selectedAccountId, onSelectAccount, onAuthorizeAccount, onAddProvider, onSelectToken, selectedSourceLabel, selectedTokenSymbol, }: DepositScreenProps): react_jsx_runtime.JSX.Element;
|
|
1165
|
+
declare function DepositScreen({ merchantName, availableBalance, remainingLimit, tokenCount, initialAmount, minDepositFloor, quoteFee, quoteLoading, processing, error, onDeposit, onSwitchWallet, onBack, onLogout, onIncreaseLimit, increasingLimit, accounts, selectedAccountId, onSelectAccount, onAuthorizeAccount, onAddProvider, onSelectToken, tokenOptions, onPickToken, selectedSourceLabel, selectedTokenSymbol, selectedChainName, }: DepositScreenProps): react_jsx_runtime.JSX.Element;
|
|
1116
1166
|
|
|
1117
1167
|
interface SuccessScreenProps {
|
|
1118
1168
|
amount: number;
|
|
@@ -1128,7 +1178,7 @@ interface SuccessScreenProps {
|
|
|
1128
1178
|
onManageAccount?: () => void;
|
|
1129
1179
|
onPreauthorize?: () => void;
|
|
1130
1180
|
}
|
|
1131
|
-
declare function SuccessScreen({ amount, currency, succeeded, error, merchantName, sourceName, remainingLimit, onDone, onLogout, onIncreaseLimits, onManageAccount, onPreauthorize, }: SuccessScreenProps): react_jsx_runtime.JSX.Element;
|
|
1181
|
+
declare function SuccessScreen({ amount, currency: _currency, succeeded, error, merchantName, sourceName, remainingLimit, onDone, onLogout, onIncreaseLimits, onManageAccount, onPreauthorize, }: SuccessScreenProps): react_jsx_runtime.JSX.Element;
|
|
1132
1182
|
|
|
1133
1183
|
interface ChainChoice$1 {
|
|
1134
1184
|
chainName: string;
|
|
@@ -1272,4 +1322,4 @@ declare const BLINK_LOGO: string;
|
|
|
1272
1322
|
/** @deprecated Use BLINK_LOGO instead. Kept for backward compatibility. */
|
|
1273
1323
|
declare const BLINK_MASCOT: string;
|
|
1274
1324
|
|
|
1275
|
-
export { type Account, type ActionExecutionResult, type AdvancedSettings, AdvancedSourceScreen, type Amount, type AuthorizationAction, type AuthorizationSession, type AuthorizationSessionDetail, BLINK_LOGO, BLINK_MASCOT, BlinkLoadingScreen, BlinkPayment, type BlinkPaymentProps, BlinkProvider, type BlinkProviderProps, type Chain, ConfirmSignScreen, DepositScreen, type Destination, type ErrorResponse, type FlowPhase, FlowPhaseProvider, type GuestBalanceOptionInput, GuestPreauthLinkingScreen, GuestPreauthSetupCompleteScreen, type GuestTokenEntry, GuestTokenPickerScreen, type GuestTransferFee, IconCircle, InfoBanner, type ListResponse, LoginScreen, type MerchantAuthorization, type MerchantPublicKey, type MobileFlowState, OpenWalletScreen, OtpVerifyScreen, OutlineButton, PasskeyIframeBlockedError, PasskeyScreen, type PaymentPhase, PoweredByFooter, type PreciseMoney, PrimaryButton, type Provider, ScreenHeader, ScreenLayout, type ScreenName, SelectSourceScreen, SettingsMenu, SetupScreen, SetupStatusScreen, type SetupTokenOption, type SourceOption, type SourceSelection, type SourceType, Spinner, type StepItem, StepList, SuccessScreen, type ThemeMode, type ThemeTokens, type TokenBalance, TokenPickerScreen, type Transfer, type TransferDestination, type TransferPhase, TransferStatusScreen, type UserConfig, VerifyPasskeyScreen, type Wallet, WalletPickerScreen, type WalletSource, type WalletToken, api as blinkApi, buildPasskeyPopupOptions, createPasskeyCredential, createPasskeyViaPopup, darkTheme, deviceHasPasskey, findDevicePasskey, findDevicePasskeyViaPopup, getTheme, guestEntryMatchingRecommended, lightTheme, mapGuestPickerEntries, resolvePasskeyRpId, screenForPhase, useAuthorizationExecutor, useBlinkConfig, useBlinkDepositAmount, useTransferPolling, useTransferSigning };
|
|
1325
|
+
export { type Account, type ActionExecutionResult, type AdvancedSettings, AdvancedSourceScreen, type Amount, type AuthorizationAction, type AuthorizationSession, AuthorizationSessionCancelledError, type AuthorizationSessionDetail, BLINK_LOGO, BLINK_MASCOT, BlinkLoadingScreen, BlinkPayment, type BlinkPaymentProps, BlinkProvider, type BlinkProviderProps, type Chain, ConfirmSignScreen, DepositScreen, type Destination, type ErrorResponse, type FlowPhase, FlowPhaseProvider, type GuestBalanceOptionInput, GuestPreauthLinkingScreen, GuestPreauthSetupCompleteScreen, type GuestTokenEntry, GuestTokenPickerScreen, type GuestTransferFee, IconCircle, InfoBanner, type ListResponse, LoginScreen, type MerchantAuthorization, type MerchantPublicKey, type MobileFlowState, OpenWalletScreen, OtpVerifyScreen, OutlineButton, PasskeyIframeBlockedError, PasskeyScreen, type PaymentPhase, PoweredByFooter, type PreciseMoney, PrimaryButton, type Provider, ScreenHeader, ScreenLayout, type ScreenName, SelectSourceScreen, SettingsMenu, SetupScreen, SetupStatusScreen, type SetupTokenOption, type SourceOption, type SourceSelection, type SourceType, Spinner, type StepItem, StepList, SuccessScreen, type ThemeMode, type ThemeTokens, type TokenBalance, TokenPickerScreen, type Transfer, type TransferDestination, type TransferPhase, TransferStatusScreen, type UserConfig, VerifyPasskeyScreen, type Wallet, WalletPickerScreen, type WalletSource, type WalletToken, api as blinkApi, buildPasskeyPopupOptions, createPasskeyCredential, createPasskeyViaPopup, darkTheme, deviceHasPasskey, findDevicePasskey, findDevicePasskeyViaPopup, getTheme, guestEntryMatchingRecommended, isAuthorizationSessionCancelled, isUserDismissedAuthorizationError, lightTheme, mapGuestPickerEntries, resolvePasskeyRpId, screenForPhase, useAuthorizationExecutor, useBlinkConfig, useBlinkDepositAmount, useTransferPolling, useTransferSigning };
|