@swype-org/react-sdk 0.1.301 → 0.1.333
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 +1193 -432
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +69 -11
- package/dist/index.d.ts +69 -11
- package/dist/index.js +1192 -434
- 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. */
|
|
@@ -920,8 +958,16 @@ interface PasskeyScreenProps {
|
|
|
920
958
|
popupFallback?: boolean;
|
|
921
959
|
/** Opens a pop-up window on the Blink domain for passkey registration. */
|
|
922
960
|
onCreatePasskeyViaPopup?: () => void;
|
|
923
|
-
|
|
924
|
-
|
|
961
|
+
/** Creates a brand-new passkey on this device (for users who already have one on another device). */
|
|
962
|
+
onCreateNewPasskey?: () => void;
|
|
963
|
+
/** Popup fallback variant of onCreateNewPasskey. */
|
|
964
|
+
onCreateNewPasskeyViaPopup?: () => void;
|
|
965
|
+
/** When set, overrides `popupFallback` for the create-new link only. */
|
|
966
|
+
createNewPopupFallback?: boolean;
|
|
967
|
+
/** Loading state while a new passkey is being created. */
|
|
968
|
+
creatingNewPasskey?: boolean;
|
|
969
|
+
}
|
|
970
|
+
declare function PasskeyScreen({ onCreatePasskey, onBack, onLogout, creating, error, popupFallback, onCreatePasskeyViaPopup, onCreateNewPasskey, onCreateNewPasskeyViaPopup, createNewPopupFallback, creatingNewPasskey, }: PasskeyScreenProps): react_jsx_runtime.JSX.Element;
|
|
925
971
|
|
|
926
972
|
interface VerifyPasskeyScreenProps {
|
|
927
973
|
onVerify: () => void;
|
|
@@ -1024,6 +1070,9 @@ interface SetupTokenOption {
|
|
|
1024
1070
|
chainName: string;
|
|
1025
1071
|
balance?: number;
|
|
1026
1072
|
walletId?: string;
|
|
1073
|
+
status?: string;
|
|
1074
|
+
tokenAddress?: string;
|
|
1075
|
+
chainId?: number;
|
|
1027
1076
|
}
|
|
1028
1077
|
interface SetupScreenProps {
|
|
1029
1078
|
availableBalance: number;
|
|
@@ -1042,12 +1091,14 @@ interface SetupScreenProps {
|
|
|
1042
1091
|
error: string | null;
|
|
1043
1092
|
/** Token symbol for the selected source, e.g. "USDC" or "USDT" */
|
|
1044
1093
|
selectedTokenSymbol?: string;
|
|
1094
|
+
/** Chain name for the selected source, used alongside selectedTokenSymbol to disambiguate same-symbol tokens on different chains. */
|
|
1095
|
+
selectedChainName?: string;
|
|
1045
1096
|
/** Available tokens for the inline dropdown. When provided, the token row opens a dropdown instead of navigating. */
|
|
1046
1097
|
tokenOptions?: SetupTokenOption[];
|
|
1047
1098
|
/** Called when the user picks a token from the inline dropdown. */
|
|
1048
1099
|
onSelectToken?: (symbol: string, chainName: string, walletId?: string) => void;
|
|
1049
1100
|
}
|
|
1050
|
-
declare function SetupScreen({ availableBalance, onSetupOneTap, onBack, onLogout, onAdvanced, loading, error, selectedTokenSymbol, tokenOptions, onSelectToken, }: SetupScreenProps): react_jsx_runtime.JSX.Element;
|
|
1101
|
+
declare function SetupScreen({ availableBalance, onSetupOneTap, onBack, onLogout, onAdvanced, loading, error, selectedTokenSymbol, selectedChainName, tokenOptions, onSelectToken, }: SetupScreenProps): react_jsx_runtime.JSX.Element;
|
|
1051
1102
|
|
|
1052
1103
|
interface SetupStatusScreenProps {
|
|
1053
1104
|
/** Whether setup has completed */
|
|
@@ -1075,9 +1126,10 @@ interface DepositScreenProps {
|
|
|
1075
1126
|
tokenCount: number;
|
|
1076
1127
|
/** Pre-populated amount */
|
|
1077
1128
|
initialAmount: number;
|
|
1078
|
-
/**
|
|
1079
|
-
|
|
1080
|
-
|
|
1129
|
+
/** Pre-transfer fee estimate from POST /v1/transfers/quotes */
|
|
1130
|
+
quoteFee?: PreciseMoney | null;
|
|
1131
|
+
/** Whether a fee quote is being fetched */
|
|
1132
|
+
quoteLoading?: boolean;
|
|
1081
1133
|
/** Whether the deposit is currently processing */
|
|
1082
1134
|
processing?: boolean;
|
|
1083
1135
|
error: string | null;
|
|
@@ -1099,12 +1151,18 @@ interface DepositScreenProps {
|
|
|
1099
1151
|
onAuthorizeAccount?: (accountId: string) => void;
|
|
1100
1152
|
/** Called when "+ Add Provider" is clicked in the dropdown */
|
|
1101
1153
|
onAddProvider?: () => void;
|
|
1102
|
-
/**
|
|
1154
|
+
/** Fallback: navigate to the full-page token picker when no inline options. */
|
|
1103
1155
|
onSelectToken?: () => void;
|
|
1156
|
+
/** Available tokens for the inline dropdown. When provided, the token badge opens a dropdown instead of navigating. */
|
|
1157
|
+
tokenOptions?: SetupTokenOption[];
|
|
1158
|
+
/** Called when the user picks a token from the inline dropdown. */
|
|
1159
|
+
onPickToken?: (symbol: string, chainName: string, walletId?: string) => void;
|
|
1104
1160
|
/** Label for the selected chain/token, e.g. "USDC on Base" */
|
|
1105
1161
|
selectedSourceLabel?: string;
|
|
1106
1162
|
/** Token symbol for the selected source, e.g. "USDC" or "USDT" */
|
|
1107
1163
|
selectedTokenSymbol?: string;
|
|
1164
|
+
/** Chain name for the selected source, used to disambiguate same-symbol tokens on different chains. */
|
|
1165
|
+
selectedChainName?: string;
|
|
1108
1166
|
/**
|
|
1109
1167
|
* Minimum USD amount required for One-Tap on this screen. When the host sets
|
|
1110
1168
|
* `depositAmount`, this should match it; otherwise the default floor ($0.25)
|
|
@@ -1112,7 +1170,7 @@ interface DepositScreenProps {
|
|
|
1112
1170
|
*/
|
|
1113
1171
|
minDepositFloor: number;
|
|
1114
1172
|
}
|
|
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;
|
|
1173
|
+
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
1174
|
|
|
1117
1175
|
interface SuccessScreenProps {
|
|
1118
1176
|
amount: number;
|
|
@@ -1128,7 +1186,7 @@ interface SuccessScreenProps {
|
|
|
1128
1186
|
onManageAccount?: () => void;
|
|
1129
1187
|
onPreauthorize?: () => void;
|
|
1130
1188
|
}
|
|
1131
|
-
declare function SuccessScreen({ amount, currency, succeeded, error, merchantName, sourceName, remainingLimit, onDone, onLogout, onIncreaseLimits, onManageAccount, onPreauthorize, }: SuccessScreenProps): react_jsx_runtime.JSX.Element;
|
|
1189
|
+
declare function SuccessScreen({ amount, currency: _currency, succeeded, error, merchantName, sourceName, remainingLimit, onDone, onLogout, onIncreaseLimits, onManageAccount, onPreauthorize, }: SuccessScreenProps): react_jsx_runtime.JSX.Element;
|
|
1132
1190
|
|
|
1133
1191
|
interface ChainChoice$1 {
|
|
1134
1192
|
chainName: string;
|
|
@@ -1272,4 +1330,4 @@ declare const BLINK_LOGO: string;
|
|
|
1272
1330
|
/** @deprecated Use BLINK_LOGO instead. Kept for backward compatibility. */
|
|
1273
1331
|
declare const BLINK_MASCOT: string;
|
|
1274
1332
|
|
|
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 };
|
|
1333
|
+
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. */
|
|
@@ -920,8 +958,16 @@ interface PasskeyScreenProps {
|
|
|
920
958
|
popupFallback?: boolean;
|
|
921
959
|
/** Opens a pop-up window on the Blink domain for passkey registration. */
|
|
922
960
|
onCreatePasskeyViaPopup?: () => void;
|
|
923
|
-
|
|
924
|
-
|
|
961
|
+
/** Creates a brand-new passkey on this device (for users who already have one on another device). */
|
|
962
|
+
onCreateNewPasskey?: () => void;
|
|
963
|
+
/** Popup fallback variant of onCreateNewPasskey. */
|
|
964
|
+
onCreateNewPasskeyViaPopup?: () => void;
|
|
965
|
+
/** When set, overrides `popupFallback` for the create-new link only. */
|
|
966
|
+
createNewPopupFallback?: boolean;
|
|
967
|
+
/** Loading state while a new passkey is being created. */
|
|
968
|
+
creatingNewPasskey?: boolean;
|
|
969
|
+
}
|
|
970
|
+
declare function PasskeyScreen({ onCreatePasskey, onBack, onLogout, creating, error, popupFallback, onCreatePasskeyViaPopup, onCreateNewPasskey, onCreateNewPasskeyViaPopup, createNewPopupFallback, creatingNewPasskey, }: PasskeyScreenProps): react_jsx_runtime.JSX.Element;
|
|
925
971
|
|
|
926
972
|
interface VerifyPasskeyScreenProps {
|
|
927
973
|
onVerify: () => void;
|
|
@@ -1024,6 +1070,9 @@ interface SetupTokenOption {
|
|
|
1024
1070
|
chainName: string;
|
|
1025
1071
|
balance?: number;
|
|
1026
1072
|
walletId?: string;
|
|
1073
|
+
status?: string;
|
|
1074
|
+
tokenAddress?: string;
|
|
1075
|
+
chainId?: number;
|
|
1027
1076
|
}
|
|
1028
1077
|
interface SetupScreenProps {
|
|
1029
1078
|
availableBalance: number;
|
|
@@ -1042,12 +1091,14 @@ interface SetupScreenProps {
|
|
|
1042
1091
|
error: string | null;
|
|
1043
1092
|
/** Token symbol for the selected source, e.g. "USDC" or "USDT" */
|
|
1044
1093
|
selectedTokenSymbol?: string;
|
|
1094
|
+
/** Chain name for the selected source, used alongside selectedTokenSymbol to disambiguate same-symbol tokens on different chains. */
|
|
1095
|
+
selectedChainName?: string;
|
|
1045
1096
|
/** Available tokens for the inline dropdown. When provided, the token row opens a dropdown instead of navigating. */
|
|
1046
1097
|
tokenOptions?: SetupTokenOption[];
|
|
1047
1098
|
/** Called when the user picks a token from the inline dropdown. */
|
|
1048
1099
|
onSelectToken?: (symbol: string, chainName: string, walletId?: string) => void;
|
|
1049
1100
|
}
|
|
1050
|
-
declare function SetupScreen({ availableBalance, onSetupOneTap, onBack, onLogout, onAdvanced, loading, error, selectedTokenSymbol, tokenOptions, onSelectToken, }: SetupScreenProps): react_jsx_runtime.JSX.Element;
|
|
1101
|
+
declare function SetupScreen({ availableBalance, onSetupOneTap, onBack, onLogout, onAdvanced, loading, error, selectedTokenSymbol, selectedChainName, tokenOptions, onSelectToken, }: SetupScreenProps): react_jsx_runtime.JSX.Element;
|
|
1051
1102
|
|
|
1052
1103
|
interface SetupStatusScreenProps {
|
|
1053
1104
|
/** Whether setup has completed */
|
|
@@ -1075,9 +1126,10 @@ interface DepositScreenProps {
|
|
|
1075
1126
|
tokenCount: number;
|
|
1076
1127
|
/** Pre-populated amount */
|
|
1077
1128
|
initialAmount: number;
|
|
1078
|
-
/**
|
|
1079
|
-
|
|
1080
|
-
|
|
1129
|
+
/** Pre-transfer fee estimate from POST /v1/transfers/quotes */
|
|
1130
|
+
quoteFee?: PreciseMoney | null;
|
|
1131
|
+
/** Whether a fee quote is being fetched */
|
|
1132
|
+
quoteLoading?: boolean;
|
|
1081
1133
|
/** Whether the deposit is currently processing */
|
|
1082
1134
|
processing?: boolean;
|
|
1083
1135
|
error: string | null;
|
|
@@ -1099,12 +1151,18 @@ interface DepositScreenProps {
|
|
|
1099
1151
|
onAuthorizeAccount?: (accountId: string) => void;
|
|
1100
1152
|
/** Called when "+ Add Provider" is clicked in the dropdown */
|
|
1101
1153
|
onAddProvider?: () => void;
|
|
1102
|
-
/**
|
|
1154
|
+
/** Fallback: navigate to the full-page token picker when no inline options. */
|
|
1103
1155
|
onSelectToken?: () => void;
|
|
1156
|
+
/** Available tokens for the inline dropdown. When provided, the token badge opens a dropdown instead of navigating. */
|
|
1157
|
+
tokenOptions?: SetupTokenOption[];
|
|
1158
|
+
/** Called when the user picks a token from the inline dropdown. */
|
|
1159
|
+
onPickToken?: (symbol: string, chainName: string, walletId?: string) => void;
|
|
1104
1160
|
/** Label for the selected chain/token, e.g. "USDC on Base" */
|
|
1105
1161
|
selectedSourceLabel?: string;
|
|
1106
1162
|
/** Token symbol for the selected source, e.g. "USDC" or "USDT" */
|
|
1107
1163
|
selectedTokenSymbol?: string;
|
|
1164
|
+
/** Chain name for the selected source, used to disambiguate same-symbol tokens on different chains. */
|
|
1165
|
+
selectedChainName?: string;
|
|
1108
1166
|
/**
|
|
1109
1167
|
* Minimum USD amount required for One-Tap on this screen. When the host sets
|
|
1110
1168
|
* `depositAmount`, this should match it; otherwise the default floor ($0.25)
|
|
@@ -1112,7 +1170,7 @@ interface DepositScreenProps {
|
|
|
1112
1170
|
*/
|
|
1113
1171
|
minDepositFloor: number;
|
|
1114
1172
|
}
|
|
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;
|
|
1173
|
+
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
1174
|
|
|
1117
1175
|
interface SuccessScreenProps {
|
|
1118
1176
|
amount: number;
|
|
@@ -1128,7 +1186,7 @@ interface SuccessScreenProps {
|
|
|
1128
1186
|
onManageAccount?: () => void;
|
|
1129
1187
|
onPreauthorize?: () => void;
|
|
1130
1188
|
}
|
|
1131
|
-
declare function SuccessScreen({ amount, currency, succeeded, error, merchantName, sourceName, remainingLimit, onDone, onLogout, onIncreaseLimits, onManageAccount, onPreauthorize, }: SuccessScreenProps): react_jsx_runtime.JSX.Element;
|
|
1189
|
+
declare function SuccessScreen({ amount, currency: _currency, succeeded, error, merchantName, sourceName, remainingLimit, onDone, onLogout, onIncreaseLimits, onManageAccount, onPreauthorize, }: SuccessScreenProps): react_jsx_runtime.JSX.Element;
|
|
1132
1190
|
|
|
1133
1191
|
interface ChainChoice$1 {
|
|
1134
1192
|
chainName: string;
|
|
@@ -1272,4 +1330,4 @@ declare const BLINK_LOGO: string;
|
|
|
1272
1330
|
/** @deprecated Use BLINK_LOGO instead. Kept for backward compatibility. */
|
|
1273
1331
|
declare const BLINK_MASCOT: string;
|
|
1274
1332
|
|
|
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 };
|
|
1333
|
+
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 };
|