@swype-org/react-sdk 0.1.230 → 0.1.232
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.cjs +1237 -992
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +62 -42
- package/dist/index.d.ts +62 -42
- package/dist/index.js +1237 -992
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -350,6 +350,7 @@ declare function fetchTransfer(apiBaseUrl: string, token: string, transferId: st
|
|
|
350
350
|
*/
|
|
351
351
|
declare function signTransfer(apiBaseUrl: string, token: string, transferId: string, signedUserOp: Record<string, unknown>, authorizationSessionToken?: string): Promise<Transfer>;
|
|
352
352
|
declare function fetchAuthorizationSession(apiBaseUrl: string, sessionId: string): Promise<AuthorizationSessionDetail>;
|
|
353
|
+
declare function fetchAuthorizationSessionByToken(apiBaseUrl: string, token: string): Promise<AuthorizationSessionDetail>;
|
|
353
354
|
/**
|
|
354
355
|
* Registers a WebAuthn passkey for the authenticated user.
|
|
355
356
|
* POST /v1/users/config/passkey
|
|
@@ -462,6 +463,7 @@ declare function setAccountOwner(apiBaseUrl: string, accessToken: string, accoun
|
|
|
462
463
|
}): Promise<{
|
|
463
464
|
accountId: string;
|
|
464
465
|
smartAccountAddress: string;
|
|
466
|
+
userOpHash: string;
|
|
465
467
|
}>;
|
|
466
468
|
declare function reportActionCompletion(apiBaseUrl: string, actionId: string, result: Record<string, unknown>): Promise<AuthorizationSessionDetail>;
|
|
467
469
|
|
|
@@ -478,6 +480,7 @@ declare const api_createTransfer: typeof createTransfer;
|
|
|
478
480
|
declare const api_fetchAccount: typeof fetchAccount;
|
|
479
481
|
declare const api_fetchAccounts: typeof fetchAccounts;
|
|
480
482
|
declare const api_fetchAuthorizationSession: typeof fetchAuthorizationSession;
|
|
483
|
+
declare const api_fetchAuthorizationSessionByToken: typeof fetchAuthorizationSessionByToken;
|
|
481
484
|
declare const api_fetchChains: typeof fetchChains;
|
|
482
485
|
declare const api_fetchGuestAccount: typeof fetchGuestAccount;
|
|
483
486
|
declare const api_fetchGuestTransferBalances: typeof fetchGuestTransferBalances;
|
|
@@ -497,7 +500,7 @@ declare const api_signTransfer: typeof signTransfer;
|
|
|
497
500
|
declare const api_updateUserConfig: typeof updateUserConfig;
|
|
498
501
|
declare const api_updateUserConfigBySession: typeof updateUserConfigBySession;
|
|
499
502
|
declare namespace api {
|
|
500
|
-
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_fetchChains as fetchChains, api_fetchGuestAccount as fetchGuestAccount, api_fetchGuestTransferBalances as fetchGuestTransferBalances, 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_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 };
|
|
503
|
+
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_fetchGuestTransferBalances as fetchGuestTransferBalances, 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_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 };
|
|
501
504
|
}
|
|
502
505
|
|
|
503
506
|
interface BlinkPaymentProps {
|
|
@@ -603,19 +606,7 @@ interface PasskeyVerifyPopupOptions {
|
|
|
603
606
|
*/
|
|
604
607
|
declare function findDevicePasskeyViaPopup(options: PasskeyVerifyPopupOptions): Promise<string | null>;
|
|
605
608
|
|
|
606
|
-
type AccessTokenGetter = () => Promise<string | null | undefined>;
|
|
607
609
|
declare function resolvePasskeyRpId(): string;
|
|
608
|
-
/**
|
|
609
|
-
* Creates a WebAuthn passkey credential.
|
|
610
|
-
* Used for upfront passkey registration before the authorization flow.
|
|
611
|
-
*
|
|
612
|
-
* @param params.userId - Globally unique user identifier (e.g. Privy DID).
|
|
613
|
-
* Used as the WebAuthn `user.id` handle so each user gets a distinct
|
|
614
|
-
* credential slot on the authenticator.
|
|
615
|
-
* @param params.displayName - Human-readable label shown in the OS passkey
|
|
616
|
-
* prompt (e.g. the user's email address or name).
|
|
617
|
-
* @returns The base64-encoded credentialId and publicKey.
|
|
618
|
-
*/
|
|
619
610
|
declare function createPasskeyCredential(params: {
|
|
620
611
|
userId: string;
|
|
621
612
|
displayName: string;
|
|
@@ -653,6 +644,7 @@ declare function deviceHasPasskey(credentialId: string): Promise<boolean>;
|
|
|
653
644
|
* @returns The matching credential ID, or `null` if none are on this device.
|
|
654
645
|
*/
|
|
655
646
|
declare function findDevicePasskey(credentialIds: string[]): Promise<string | null>;
|
|
647
|
+
|
|
656
648
|
interface UseTransferPollingResult {
|
|
657
649
|
transfer: Transfer | null;
|
|
658
650
|
error: string | null;
|
|
@@ -665,6 +657,7 @@ interface UseTransferPollingResult {
|
|
|
665
657
|
* COMPLETED or FAILED.
|
|
666
658
|
*/
|
|
667
659
|
declare function useTransferPolling(intervalMs?: number): UseTransferPollingResult;
|
|
660
|
+
|
|
668
661
|
interface UseAuthorizationExecutorResult {
|
|
669
662
|
executing: boolean;
|
|
670
663
|
results: ActionExecutionResult[];
|
|
@@ -704,6 +697,8 @@ interface UseAuthorizationExecutorOptions {
|
|
|
704
697
|
* `useTransferSigning()` after the authorization flow completes.
|
|
705
698
|
*/
|
|
706
699
|
declare function useAuthorizationExecutor(options?: UseAuthorizationExecutorOptions): UseAuthorizationExecutorResult;
|
|
700
|
+
|
|
701
|
+
type AccessTokenGetter = () => Promise<string | null | undefined>;
|
|
707
702
|
interface UseTransferSigningResult {
|
|
708
703
|
signing: boolean;
|
|
709
704
|
signPayload: TransferSignPayload | null;
|
|
@@ -833,35 +828,60 @@ interface NormalizedAuthIdentifier {
|
|
|
833
828
|
}
|
|
834
829
|
|
|
835
830
|
type ScreenName = 'loading' | 'login' | 'otp-verify' | 'create-passkey' | 'verify-passkey' | 'success' | 'processing' | 'confirm-sign' | 'select-source' | 'setup' | 'open-wallet' | 'setup-status' | 'guest-token-picker' | 'wallet-picker' | 'token-picker' | 'deposit';
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
831
|
+
interface MobileFlowState {
|
|
832
|
+
deeplinkUri: string;
|
|
833
|
+
providerId: string | null;
|
|
834
|
+
}
|
|
835
|
+
type PaymentPhase = {
|
|
836
|
+
step: 'initializing';
|
|
837
|
+
} | {
|
|
838
|
+
step: 'login';
|
|
839
|
+
} | {
|
|
840
|
+
step: 'otp-verify';
|
|
841
|
+
target: NormalizedAuthIdentifier;
|
|
842
|
+
} | {
|
|
843
|
+
step: 'passkey-create';
|
|
844
|
+
popupFallback: boolean;
|
|
845
|
+
} | {
|
|
846
|
+
step: 'passkey-verify';
|
|
847
|
+
} | {
|
|
848
|
+
step: 'data-loading';
|
|
849
|
+
} | {
|
|
850
|
+
step: 'wallet-picker';
|
|
851
|
+
reason: 'link' | 'switch' | 'entry' | 'guest-entry';
|
|
852
|
+
} | {
|
|
853
|
+
step: 'wallet-setup';
|
|
854
|
+
mobile: MobileFlowState | null;
|
|
855
|
+
accountId: string | null;
|
|
856
|
+
} | {
|
|
857
|
+
step: 'select-source';
|
|
858
|
+
action: AuthorizationAction;
|
|
856
859
|
isDesktop: boolean;
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
}
|
|
864
|
-
|
|
860
|
+
skipOneTapLimit?: boolean;
|
|
861
|
+
} | {
|
|
862
|
+
step: 'one-tap-setup';
|
|
863
|
+
action: AuthorizationAction | null;
|
|
864
|
+
} | {
|
|
865
|
+
step: 'guest-token-picker';
|
|
866
|
+
} | {
|
|
867
|
+
step: 'token-picker';
|
|
868
|
+
} | {
|
|
869
|
+
step: 'deposit';
|
|
870
|
+
} | {
|
|
871
|
+
step: 'processing';
|
|
872
|
+
transfer: Transfer | null;
|
|
873
|
+
} | {
|
|
874
|
+
step: 'confirm-sign';
|
|
875
|
+
transfer: Transfer;
|
|
876
|
+
} | {
|
|
877
|
+
step: 'completed';
|
|
878
|
+
transfer: Transfer;
|
|
879
|
+
} | {
|
|
880
|
+
step: 'failed';
|
|
881
|
+
transfer: Transfer;
|
|
882
|
+
error: string;
|
|
883
|
+
};
|
|
884
|
+
declare function screenForPhase(phase: PaymentPhase): ScreenName;
|
|
865
885
|
|
|
866
886
|
interface SetupScreenProps {
|
|
867
887
|
availableBalance: number;
|
|
@@ -955,4 +975,4 @@ declare const BLINK_LOGO: string;
|
|
|
955
975
|
/** @deprecated Use BLINK_LOGO instead. Kept for backward compatibility. */
|
|
956
976
|
declare const BLINK_MASCOT: string;
|
|
957
977
|
|
|
958
|
-
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, type Destination, type ErrorResponse, type FlowPhase, FlowPhaseProvider, IconCircle, InfoBanner, type ListResponse, type MerchantAuthorization, type MerchantPublicKey, OutlineButton, PasskeyIframeBlockedError, PasskeyScreen, PoweredByFooter, PrimaryButton, type Provider,
|
|
978
|
+
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, type Destination, type ErrorResponse, type FlowPhase, FlowPhaseProvider, IconCircle, InfoBanner, type ListResponse, type MerchantAuthorization, type MerchantPublicKey, type MobileFlowState, OutlineButton, PasskeyIframeBlockedError, PasskeyScreen, type PaymentPhase, PoweredByFooter, PrimaryButton, type Provider, ScreenHeader, ScreenLayout, type ScreenName, SelectSourceScreen, SettingsMenu, SetupScreen, type SourceOption, type SourceSelection, type SourceType, Spinner, type StepItem, StepList, type ThemeMode, type ThemeTokens, type TokenBalance, TokenPickerScreen, type Transfer, type TransferDestination, type UserConfig, type Wallet, type WalletSource, type WalletToken, api as blinkApi, buildPasskeyPopupOptions, createPasskeyCredential, createPasskeyViaPopup, darkTheme, deviceHasPasskey, findDevicePasskey, findDevicePasskeyViaPopup, getTheme, lightTheme, resolvePasskeyRpId, screenForPhase, useAuthorizationExecutor, useBlinkConfig, useBlinkDepositAmount, useTransferPolling, useTransferSigning };
|
package/dist/index.d.ts
CHANGED
|
@@ -350,6 +350,7 @@ declare function fetchTransfer(apiBaseUrl: string, token: string, transferId: st
|
|
|
350
350
|
*/
|
|
351
351
|
declare function signTransfer(apiBaseUrl: string, token: string, transferId: string, signedUserOp: Record<string, unknown>, authorizationSessionToken?: string): Promise<Transfer>;
|
|
352
352
|
declare function fetchAuthorizationSession(apiBaseUrl: string, sessionId: string): Promise<AuthorizationSessionDetail>;
|
|
353
|
+
declare function fetchAuthorizationSessionByToken(apiBaseUrl: string, token: string): Promise<AuthorizationSessionDetail>;
|
|
353
354
|
/**
|
|
354
355
|
* Registers a WebAuthn passkey for the authenticated user.
|
|
355
356
|
* POST /v1/users/config/passkey
|
|
@@ -462,6 +463,7 @@ declare function setAccountOwner(apiBaseUrl: string, accessToken: string, accoun
|
|
|
462
463
|
}): Promise<{
|
|
463
464
|
accountId: string;
|
|
464
465
|
smartAccountAddress: string;
|
|
466
|
+
userOpHash: string;
|
|
465
467
|
}>;
|
|
466
468
|
declare function reportActionCompletion(apiBaseUrl: string, actionId: string, result: Record<string, unknown>): Promise<AuthorizationSessionDetail>;
|
|
467
469
|
|
|
@@ -478,6 +480,7 @@ declare const api_createTransfer: typeof createTransfer;
|
|
|
478
480
|
declare const api_fetchAccount: typeof fetchAccount;
|
|
479
481
|
declare const api_fetchAccounts: typeof fetchAccounts;
|
|
480
482
|
declare const api_fetchAuthorizationSession: typeof fetchAuthorizationSession;
|
|
483
|
+
declare const api_fetchAuthorizationSessionByToken: typeof fetchAuthorizationSessionByToken;
|
|
481
484
|
declare const api_fetchChains: typeof fetchChains;
|
|
482
485
|
declare const api_fetchGuestAccount: typeof fetchGuestAccount;
|
|
483
486
|
declare const api_fetchGuestTransferBalances: typeof fetchGuestTransferBalances;
|
|
@@ -497,7 +500,7 @@ declare const api_signTransfer: typeof signTransfer;
|
|
|
497
500
|
declare const api_updateUserConfig: typeof updateUserConfig;
|
|
498
501
|
declare const api_updateUserConfigBySession: typeof updateUserConfigBySession;
|
|
499
502
|
declare namespace api {
|
|
500
|
-
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_fetchChains as fetchChains, api_fetchGuestAccount as fetchGuestAccount, api_fetchGuestTransferBalances as fetchGuestTransferBalances, 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_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 };
|
|
503
|
+
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_fetchGuestTransferBalances as fetchGuestTransferBalances, 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_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 };
|
|
501
504
|
}
|
|
502
505
|
|
|
503
506
|
interface BlinkPaymentProps {
|
|
@@ -603,19 +606,7 @@ interface PasskeyVerifyPopupOptions {
|
|
|
603
606
|
*/
|
|
604
607
|
declare function findDevicePasskeyViaPopup(options: PasskeyVerifyPopupOptions): Promise<string | null>;
|
|
605
608
|
|
|
606
|
-
type AccessTokenGetter = () => Promise<string | null | undefined>;
|
|
607
609
|
declare function resolvePasskeyRpId(): string;
|
|
608
|
-
/**
|
|
609
|
-
* Creates a WebAuthn passkey credential.
|
|
610
|
-
* Used for upfront passkey registration before the authorization flow.
|
|
611
|
-
*
|
|
612
|
-
* @param params.userId - Globally unique user identifier (e.g. Privy DID).
|
|
613
|
-
* Used as the WebAuthn `user.id` handle so each user gets a distinct
|
|
614
|
-
* credential slot on the authenticator.
|
|
615
|
-
* @param params.displayName - Human-readable label shown in the OS passkey
|
|
616
|
-
* prompt (e.g. the user's email address or name).
|
|
617
|
-
* @returns The base64-encoded credentialId and publicKey.
|
|
618
|
-
*/
|
|
619
610
|
declare function createPasskeyCredential(params: {
|
|
620
611
|
userId: string;
|
|
621
612
|
displayName: string;
|
|
@@ -653,6 +644,7 @@ declare function deviceHasPasskey(credentialId: string): Promise<boolean>;
|
|
|
653
644
|
* @returns The matching credential ID, or `null` if none are on this device.
|
|
654
645
|
*/
|
|
655
646
|
declare function findDevicePasskey(credentialIds: string[]): Promise<string | null>;
|
|
647
|
+
|
|
656
648
|
interface UseTransferPollingResult {
|
|
657
649
|
transfer: Transfer | null;
|
|
658
650
|
error: string | null;
|
|
@@ -665,6 +657,7 @@ interface UseTransferPollingResult {
|
|
|
665
657
|
* COMPLETED or FAILED.
|
|
666
658
|
*/
|
|
667
659
|
declare function useTransferPolling(intervalMs?: number): UseTransferPollingResult;
|
|
660
|
+
|
|
668
661
|
interface UseAuthorizationExecutorResult {
|
|
669
662
|
executing: boolean;
|
|
670
663
|
results: ActionExecutionResult[];
|
|
@@ -704,6 +697,8 @@ interface UseAuthorizationExecutorOptions {
|
|
|
704
697
|
* `useTransferSigning()` after the authorization flow completes.
|
|
705
698
|
*/
|
|
706
699
|
declare function useAuthorizationExecutor(options?: UseAuthorizationExecutorOptions): UseAuthorizationExecutorResult;
|
|
700
|
+
|
|
701
|
+
type AccessTokenGetter = () => Promise<string | null | undefined>;
|
|
707
702
|
interface UseTransferSigningResult {
|
|
708
703
|
signing: boolean;
|
|
709
704
|
signPayload: TransferSignPayload | null;
|
|
@@ -833,35 +828,60 @@ interface NormalizedAuthIdentifier {
|
|
|
833
828
|
}
|
|
834
829
|
|
|
835
830
|
type ScreenName = 'loading' | 'login' | 'otp-verify' | 'create-passkey' | 'verify-passkey' | 'success' | 'processing' | 'confirm-sign' | 'select-source' | 'setup' | 'open-wallet' | 'setup-status' | 'guest-token-picker' | 'wallet-picker' | 'token-picker' | 'deposit';
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
831
|
+
interface MobileFlowState {
|
|
832
|
+
deeplinkUri: string;
|
|
833
|
+
providerId: string | null;
|
|
834
|
+
}
|
|
835
|
+
type PaymentPhase = {
|
|
836
|
+
step: 'initializing';
|
|
837
|
+
} | {
|
|
838
|
+
step: 'login';
|
|
839
|
+
} | {
|
|
840
|
+
step: 'otp-verify';
|
|
841
|
+
target: NormalizedAuthIdentifier;
|
|
842
|
+
} | {
|
|
843
|
+
step: 'passkey-create';
|
|
844
|
+
popupFallback: boolean;
|
|
845
|
+
} | {
|
|
846
|
+
step: 'passkey-verify';
|
|
847
|
+
} | {
|
|
848
|
+
step: 'data-loading';
|
|
849
|
+
} | {
|
|
850
|
+
step: 'wallet-picker';
|
|
851
|
+
reason: 'link' | 'switch' | 'entry' | 'guest-entry';
|
|
852
|
+
} | {
|
|
853
|
+
step: 'wallet-setup';
|
|
854
|
+
mobile: MobileFlowState | null;
|
|
855
|
+
accountId: string | null;
|
|
856
|
+
} | {
|
|
857
|
+
step: 'select-source';
|
|
858
|
+
action: AuthorizationAction;
|
|
856
859
|
isDesktop: boolean;
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
}
|
|
864
|
-
|
|
860
|
+
skipOneTapLimit?: boolean;
|
|
861
|
+
} | {
|
|
862
|
+
step: 'one-tap-setup';
|
|
863
|
+
action: AuthorizationAction | null;
|
|
864
|
+
} | {
|
|
865
|
+
step: 'guest-token-picker';
|
|
866
|
+
} | {
|
|
867
|
+
step: 'token-picker';
|
|
868
|
+
} | {
|
|
869
|
+
step: 'deposit';
|
|
870
|
+
} | {
|
|
871
|
+
step: 'processing';
|
|
872
|
+
transfer: Transfer | null;
|
|
873
|
+
} | {
|
|
874
|
+
step: 'confirm-sign';
|
|
875
|
+
transfer: Transfer;
|
|
876
|
+
} | {
|
|
877
|
+
step: 'completed';
|
|
878
|
+
transfer: Transfer;
|
|
879
|
+
} | {
|
|
880
|
+
step: 'failed';
|
|
881
|
+
transfer: Transfer;
|
|
882
|
+
error: string;
|
|
883
|
+
};
|
|
884
|
+
declare function screenForPhase(phase: PaymentPhase): ScreenName;
|
|
865
885
|
|
|
866
886
|
interface SetupScreenProps {
|
|
867
887
|
availableBalance: number;
|
|
@@ -955,4 +975,4 @@ declare const BLINK_LOGO: string;
|
|
|
955
975
|
/** @deprecated Use BLINK_LOGO instead. Kept for backward compatibility. */
|
|
956
976
|
declare const BLINK_MASCOT: string;
|
|
957
977
|
|
|
958
|
-
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, type Destination, type ErrorResponse, type FlowPhase, FlowPhaseProvider, IconCircle, InfoBanner, type ListResponse, type MerchantAuthorization, type MerchantPublicKey, OutlineButton, PasskeyIframeBlockedError, PasskeyScreen, PoweredByFooter, PrimaryButton, type Provider,
|
|
978
|
+
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, type Destination, type ErrorResponse, type FlowPhase, FlowPhaseProvider, IconCircle, InfoBanner, type ListResponse, type MerchantAuthorization, type MerchantPublicKey, type MobileFlowState, OutlineButton, PasskeyIframeBlockedError, PasskeyScreen, type PaymentPhase, PoweredByFooter, PrimaryButton, type Provider, ScreenHeader, ScreenLayout, type ScreenName, SelectSourceScreen, SettingsMenu, SetupScreen, type SourceOption, type SourceSelection, type SourceType, Spinner, type StepItem, StepList, type ThemeMode, type ThemeTokens, type TokenBalance, TokenPickerScreen, type Transfer, type TransferDestination, type UserConfig, type Wallet, type WalletSource, type WalletToken, api as blinkApi, buildPasskeyPopupOptions, createPasskeyCredential, createPasskeyViaPopup, darkTheme, deviceHasPasskey, findDevicePasskey, findDevicePasskeyViaPopup, getTheme, lightTheme, resolvePasskeyRpId, screenForPhase, useAuthorizationExecutor, useBlinkConfig, useBlinkDepositAmount, useTransferPolling, useTransferSigning };
|