@swype-org/react-sdk 0.2.233 → 0.2.237
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 +75 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -3
- package/dist/index.d.ts +21 -3
- package/dist/index.js +76 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -252,8 +252,10 @@ interface ManualTransferSourceOption {
|
|
|
252
252
|
chainId: number;
|
|
253
253
|
chainName: string;
|
|
254
254
|
chainFamily: 'evm' | 'svm' | 'tvm';
|
|
255
|
+
chainLogoUri: string | null;
|
|
255
256
|
tokenSymbol: string;
|
|
256
257
|
tokenAddress: string;
|
|
258
|
+
tokenLogoUri: string | null;
|
|
257
259
|
decimals: number;
|
|
258
260
|
minAmountUsd: string;
|
|
259
261
|
}
|
|
@@ -660,6 +662,12 @@ interface CreateManualTransferParams {
|
|
|
660
662
|
}
|
|
661
663
|
declare function createManualTransfer(apiBaseUrl: string, params: CreateManualTransferParams): Promise<ManualTransferSession>;
|
|
662
664
|
declare function fetchManualTransferSession(apiBaseUrl: string, sessionId: string): Promise<ManualTransferSession>;
|
|
665
|
+
interface RefreshManualTransferQuoteResult {
|
|
666
|
+
quoteValidUntil: string;
|
|
667
|
+
minAmountUsd: string;
|
|
668
|
+
slippage: ManualTransferSlippageSnapshot | null;
|
|
669
|
+
}
|
|
670
|
+
declare function refreshManualTransferQuote(apiBaseUrl: string, sessionId: string): Promise<RefreshManualTransferQuoteResult>;
|
|
663
671
|
declare function reportActionCompletion(apiBaseUrl: string, actionId: string, result: Record<string, unknown>): Promise<AuthorizationSessionDetail>;
|
|
664
672
|
interface ActionTransactionReceiptWaitResult {
|
|
665
673
|
txHash: string;
|
|
@@ -716,6 +724,7 @@ type api_CreateManualTransferParams = CreateManualTransferParams;
|
|
|
716
724
|
type api_CreateTransferParams = CreateTransferParams;
|
|
717
725
|
type api_FetchManualTransferSourcesParams = FetchManualTransferSourcesParams;
|
|
718
726
|
type api_ProbeActionCompletionResult = ProbeActionCompletionResult;
|
|
727
|
+
type api_RefreshManualTransferQuoteResult = RefreshManualTransferQuoteResult;
|
|
719
728
|
type api_TransferQuote = TransferQuote;
|
|
720
729
|
declare const api_createAccount: typeof createAccount;
|
|
721
730
|
declare const api_createAccountAuthorizationSession: typeof createAccountAuthorizationSession;
|
|
@@ -734,6 +743,7 @@ declare const api_fetchTransfer: typeof fetchTransfer;
|
|
|
734
743
|
declare const api_fetchUserConfig: typeof fetchUserConfig;
|
|
735
744
|
declare const api_postTransferQuote: typeof postTransferQuote;
|
|
736
745
|
declare const api_probeActionCompletion: typeof probeActionCompletion;
|
|
746
|
+
declare const api_refreshManualTransferQuote: typeof refreshManualTransferQuote;
|
|
737
747
|
declare const api_registerPasskey: typeof registerPasskey;
|
|
738
748
|
declare const api_reportActionCompletion: typeof reportActionCompletion;
|
|
739
749
|
declare const api_reportPasskeyActivity: typeof reportPasskeyActivity;
|
|
@@ -745,7 +755,7 @@ declare const api_updateUserConfig: typeof updateUserConfig;
|
|
|
745
755
|
declare const api_updateUserConfigBySession: typeof updateUserConfigBySession;
|
|
746
756
|
declare const api_waitForActionTransactionReceipt: typeof waitForActionTransactionReceipt;
|
|
747
757
|
declare namespace api {
|
|
748
|
-
export { type api_ActionTransactionReceiptWaitResult as ActionTransactionReceiptWaitResult, type api_BridgeCall as BridgeCall, type api_CreateAccountAuthorizationSessionOptions as CreateAccountAuthorizationSessionOptions, type api_CreateAccountParams as CreateAccountParams, type api_CreateManualTransferParams as CreateManualTransferParams, type api_CreateTransferParams as CreateTransferParams, type api_FetchManualTransferSourcesParams as FetchManualTransferSourcesParams, type api_ProbeActionCompletionResult as ProbeActionCompletionResult, type api_TransferQuote as TransferQuote, api_createAccount as createAccount, api_createAccountAuthorizationSession as createAccountAuthorizationSession, api_createManualTransfer as createManualTransfer, api_createTransfer as createTransfer, api_fetchAccount as fetchAccount, api_fetchAccounts as fetchAccounts, api_fetchAuthorizationSession as fetchAuthorizationSession, api_fetchAuthorizationSessionByToken as fetchAuthorizationSessionByToken, api_fetchChains as fetchChains, api_fetchManualTransferSession as fetchManualTransferSession, api_fetchManualTransferSources as fetchManualTransferSources, api_fetchMerchantPublicKey as fetchMerchantPublicKey, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_postTransferQuote as postTransferQuote, api_probeActionCompletion as probeActionCompletion, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_reportPasskeyActivity as reportPasskeyActivity, api_setAuthorizationSessionPaymentIntentAmount as setAuthorizationSessionPaymentIntentAmount, api_setAuthorizationSessionProvider as setAuthorizationSessionProvider, api_setTransferSource as setTransferSource, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession, api_waitForActionTransactionReceipt as waitForActionTransactionReceipt };
|
|
758
|
+
export { type api_ActionTransactionReceiptWaitResult as ActionTransactionReceiptWaitResult, type api_BridgeCall as BridgeCall, type api_CreateAccountAuthorizationSessionOptions as CreateAccountAuthorizationSessionOptions, type api_CreateAccountParams as CreateAccountParams, type api_CreateManualTransferParams as CreateManualTransferParams, type api_CreateTransferParams as CreateTransferParams, type api_FetchManualTransferSourcesParams as FetchManualTransferSourcesParams, type api_ProbeActionCompletionResult as ProbeActionCompletionResult, type api_RefreshManualTransferQuoteResult as RefreshManualTransferQuoteResult, type api_TransferQuote as TransferQuote, api_createAccount as createAccount, api_createAccountAuthorizationSession as createAccountAuthorizationSession, api_createManualTransfer as createManualTransfer, api_createTransfer as createTransfer, api_fetchAccount as fetchAccount, api_fetchAccounts as fetchAccounts, api_fetchAuthorizationSession as fetchAuthorizationSession, api_fetchAuthorizationSessionByToken as fetchAuthorizationSessionByToken, api_fetchChains as fetchChains, api_fetchManualTransferSession as fetchManualTransferSession, api_fetchManualTransferSources as fetchManualTransferSources, api_fetchMerchantPublicKey as fetchMerchantPublicKey, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_postTransferQuote as postTransferQuote, api_probeActionCompletion as probeActionCompletion, api_refreshManualTransferQuote as refreshManualTransferQuote, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_reportPasskeyActivity as reportPasskeyActivity, api_setAuthorizationSessionPaymentIntentAmount as setAuthorizationSessionPaymentIntentAmount, api_setAuthorizationSessionProvider as setAuthorizationSessionProvider, api_setTransferSource as setTransferSource, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession, api_waitForActionTransactionReceipt as waitForActionTransactionReceipt };
|
|
749
759
|
}
|
|
750
760
|
|
|
751
761
|
interface BlinkPaymentProps {
|
|
@@ -1996,6 +2006,10 @@ interface SetupDepositScreenProps {
|
|
|
1996
2006
|
selectedTokenSymbol?: string;
|
|
1997
2007
|
/** Chain name for the currently selected source. */
|
|
1998
2008
|
selectedChainName?: string;
|
|
2009
|
+
/** Server-provided token logo URI for the currently selected source. */
|
|
2010
|
+
selectedTokenLogoUri?: string | null;
|
|
2011
|
+
/** Server-provided chain logo URI for the currently selected source. */
|
|
2012
|
+
selectedChainLogoUri?: string | null;
|
|
1999
2013
|
/** Available tokens for the inline dropdown. */
|
|
2000
2014
|
tokenOptions?: SetupTokenOption[];
|
|
2001
2015
|
/** Called when the user picks a token from the inline dropdown. */
|
|
@@ -2009,7 +2023,7 @@ interface SetupDepositScreenProps {
|
|
|
2009
2023
|
/** True when the orchestrator is paused on source selection and ready for confirmation. */
|
|
2010
2024
|
continueReady?: boolean;
|
|
2011
2025
|
}
|
|
2012
|
-
declare function SetupDepositScreen({ depositAmount, availableBalance, minDepositFloor, onLogout, onBack, error, loadingShimmersEnabled, tokenSelectionLoading, selectedTokenSymbol, selectedChainName, tokenOptions, onSelectToken, quoteFee, quoteLoading, quoteError, onContinue, continueReady, }: SetupDepositScreenProps): react_jsx_runtime.JSX.Element;
|
|
2026
|
+
declare function SetupDepositScreen({ depositAmount, availableBalance, minDepositFloor, onLogout, onBack, error, loadingShimmersEnabled, tokenSelectionLoading, selectedTokenSymbol, selectedChainName, selectedTokenLogoUri, selectedChainLogoUri, tokenOptions, onSelectToken, quoteFee, quoteLoading, quoteError, onContinue, continueReady, }: SetupDepositScreenProps): react_jsx_runtime.JSX.Element;
|
|
2013
2027
|
|
|
2014
2028
|
interface DepositCompleteScreenProps {
|
|
2015
2029
|
amount: number;
|
|
@@ -2067,6 +2081,10 @@ interface DepositScreenProps {
|
|
|
2067
2081
|
selectedTokenSymbol?: string;
|
|
2068
2082
|
/** Chain name for the selected source, used to disambiguate same-symbol tokens on different chains. */
|
|
2069
2083
|
selectedChainName?: string;
|
|
2084
|
+
/** Server-provided token logo URI for the selected source. */
|
|
2085
|
+
selectedTokenLogoUri?: string | null;
|
|
2086
|
+
/** Server-provided chain logo URI for the selected source. */
|
|
2087
|
+
selectedChainLogoUri?: string | null;
|
|
2070
2088
|
/** Wallet that owns the selected source. Required for the inline source sheet
|
|
2071
2089
|
* to mark the active row when two wallets/accounts are authorized on the
|
|
2072
2090
|
* same symbol+chain. */
|
|
@@ -2084,7 +2102,7 @@ interface DepositScreenProps {
|
|
|
2084
2102
|
*/
|
|
2085
2103
|
minDepositFloor: number;
|
|
2086
2104
|
}
|
|
2087
|
-
declare function DepositScreen({ availableBalance, remainingLimit, initialAmount, minDepositFloor, quoteLoading, processing, error, onDeposit, onSwitchWallet, onBack, onLogout, onIncreaseLimit, increasingLimit, accounts, selectedAccountId, onSelectAccount: _onSelectAccount, onAuthorizeAccount: _onAuthorizeAccount, onAddProvider, onSelectToken, tokenOptions, onPickToken, useDeeplink, onPrepareTokenAuthorization, onCommitTokenAuthorization, selectedTokenSymbol, selectedChainName, selectedWalletId, selectedTokenStatus, onAuthorizeSelectedToken, authorizingToken, }: DepositScreenProps): react_jsx_runtime.JSX.Element;
|
|
2105
|
+
declare function DepositScreen({ availableBalance, remainingLimit, initialAmount, minDepositFloor, quoteLoading, processing, error, onDeposit, onSwitchWallet, onBack, onLogout, onIncreaseLimit, increasingLimit, accounts, selectedAccountId, onSelectAccount: _onSelectAccount, onAuthorizeAccount: _onAuthorizeAccount, onAddProvider, onSelectToken, tokenOptions, onPickToken, useDeeplink, onPrepareTokenAuthorization, onCommitTokenAuthorization, selectedTokenSymbol, selectedChainName, selectedTokenLogoUri, selectedChainLogoUri, selectedWalletId, selectedTokenStatus, onAuthorizeSelectedToken, authorizingToken, }: DepositScreenProps): react_jsx_runtime.JSX.Element;
|
|
2088
2106
|
|
|
2089
2107
|
interface SuccessScreenProps {
|
|
2090
2108
|
amount: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -252,8 +252,10 @@ interface ManualTransferSourceOption {
|
|
|
252
252
|
chainId: number;
|
|
253
253
|
chainName: string;
|
|
254
254
|
chainFamily: 'evm' | 'svm' | 'tvm';
|
|
255
|
+
chainLogoUri: string | null;
|
|
255
256
|
tokenSymbol: string;
|
|
256
257
|
tokenAddress: string;
|
|
258
|
+
tokenLogoUri: string | null;
|
|
257
259
|
decimals: number;
|
|
258
260
|
minAmountUsd: string;
|
|
259
261
|
}
|
|
@@ -660,6 +662,12 @@ interface CreateManualTransferParams {
|
|
|
660
662
|
}
|
|
661
663
|
declare function createManualTransfer(apiBaseUrl: string, params: CreateManualTransferParams): Promise<ManualTransferSession>;
|
|
662
664
|
declare function fetchManualTransferSession(apiBaseUrl: string, sessionId: string): Promise<ManualTransferSession>;
|
|
665
|
+
interface RefreshManualTransferQuoteResult {
|
|
666
|
+
quoteValidUntil: string;
|
|
667
|
+
minAmountUsd: string;
|
|
668
|
+
slippage: ManualTransferSlippageSnapshot | null;
|
|
669
|
+
}
|
|
670
|
+
declare function refreshManualTransferQuote(apiBaseUrl: string, sessionId: string): Promise<RefreshManualTransferQuoteResult>;
|
|
663
671
|
declare function reportActionCompletion(apiBaseUrl: string, actionId: string, result: Record<string, unknown>): Promise<AuthorizationSessionDetail>;
|
|
664
672
|
interface ActionTransactionReceiptWaitResult {
|
|
665
673
|
txHash: string;
|
|
@@ -716,6 +724,7 @@ type api_CreateManualTransferParams = CreateManualTransferParams;
|
|
|
716
724
|
type api_CreateTransferParams = CreateTransferParams;
|
|
717
725
|
type api_FetchManualTransferSourcesParams = FetchManualTransferSourcesParams;
|
|
718
726
|
type api_ProbeActionCompletionResult = ProbeActionCompletionResult;
|
|
727
|
+
type api_RefreshManualTransferQuoteResult = RefreshManualTransferQuoteResult;
|
|
719
728
|
type api_TransferQuote = TransferQuote;
|
|
720
729
|
declare const api_createAccount: typeof createAccount;
|
|
721
730
|
declare const api_createAccountAuthorizationSession: typeof createAccountAuthorizationSession;
|
|
@@ -734,6 +743,7 @@ declare const api_fetchTransfer: typeof fetchTransfer;
|
|
|
734
743
|
declare const api_fetchUserConfig: typeof fetchUserConfig;
|
|
735
744
|
declare const api_postTransferQuote: typeof postTransferQuote;
|
|
736
745
|
declare const api_probeActionCompletion: typeof probeActionCompletion;
|
|
746
|
+
declare const api_refreshManualTransferQuote: typeof refreshManualTransferQuote;
|
|
737
747
|
declare const api_registerPasskey: typeof registerPasskey;
|
|
738
748
|
declare const api_reportActionCompletion: typeof reportActionCompletion;
|
|
739
749
|
declare const api_reportPasskeyActivity: typeof reportPasskeyActivity;
|
|
@@ -745,7 +755,7 @@ declare const api_updateUserConfig: typeof updateUserConfig;
|
|
|
745
755
|
declare const api_updateUserConfigBySession: typeof updateUserConfigBySession;
|
|
746
756
|
declare const api_waitForActionTransactionReceipt: typeof waitForActionTransactionReceipt;
|
|
747
757
|
declare namespace api {
|
|
748
|
-
export { type api_ActionTransactionReceiptWaitResult as ActionTransactionReceiptWaitResult, type api_BridgeCall as BridgeCall, type api_CreateAccountAuthorizationSessionOptions as CreateAccountAuthorizationSessionOptions, type api_CreateAccountParams as CreateAccountParams, type api_CreateManualTransferParams as CreateManualTransferParams, type api_CreateTransferParams as CreateTransferParams, type api_FetchManualTransferSourcesParams as FetchManualTransferSourcesParams, type api_ProbeActionCompletionResult as ProbeActionCompletionResult, type api_TransferQuote as TransferQuote, api_createAccount as createAccount, api_createAccountAuthorizationSession as createAccountAuthorizationSession, api_createManualTransfer as createManualTransfer, api_createTransfer as createTransfer, api_fetchAccount as fetchAccount, api_fetchAccounts as fetchAccounts, api_fetchAuthorizationSession as fetchAuthorizationSession, api_fetchAuthorizationSessionByToken as fetchAuthorizationSessionByToken, api_fetchChains as fetchChains, api_fetchManualTransferSession as fetchManualTransferSession, api_fetchManualTransferSources as fetchManualTransferSources, api_fetchMerchantPublicKey as fetchMerchantPublicKey, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_postTransferQuote as postTransferQuote, api_probeActionCompletion as probeActionCompletion, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_reportPasskeyActivity as reportPasskeyActivity, api_setAuthorizationSessionPaymentIntentAmount as setAuthorizationSessionPaymentIntentAmount, api_setAuthorizationSessionProvider as setAuthorizationSessionProvider, api_setTransferSource as setTransferSource, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession, api_waitForActionTransactionReceipt as waitForActionTransactionReceipt };
|
|
758
|
+
export { type api_ActionTransactionReceiptWaitResult as ActionTransactionReceiptWaitResult, type api_BridgeCall as BridgeCall, type api_CreateAccountAuthorizationSessionOptions as CreateAccountAuthorizationSessionOptions, type api_CreateAccountParams as CreateAccountParams, type api_CreateManualTransferParams as CreateManualTransferParams, type api_CreateTransferParams as CreateTransferParams, type api_FetchManualTransferSourcesParams as FetchManualTransferSourcesParams, type api_ProbeActionCompletionResult as ProbeActionCompletionResult, type api_RefreshManualTransferQuoteResult as RefreshManualTransferQuoteResult, type api_TransferQuote as TransferQuote, api_createAccount as createAccount, api_createAccountAuthorizationSession as createAccountAuthorizationSession, api_createManualTransfer as createManualTransfer, api_createTransfer as createTransfer, api_fetchAccount as fetchAccount, api_fetchAccounts as fetchAccounts, api_fetchAuthorizationSession as fetchAuthorizationSession, api_fetchAuthorizationSessionByToken as fetchAuthorizationSessionByToken, api_fetchChains as fetchChains, api_fetchManualTransferSession as fetchManualTransferSession, api_fetchManualTransferSources as fetchManualTransferSources, api_fetchMerchantPublicKey as fetchMerchantPublicKey, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_postTransferQuote as postTransferQuote, api_probeActionCompletion as probeActionCompletion, api_refreshManualTransferQuote as refreshManualTransferQuote, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_reportPasskeyActivity as reportPasskeyActivity, api_setAuthorizationSessionPaymentIntentAmount as setAuthorizationSessionPaymentIntentAmount, api_setAuthorizationSessionProvider as setAuthorizationSessionProvider, api_setTransferSource as setTransferSource, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession, api_waitForActionTransactionReceipt as waitForActionTransactionReceipt };
|
|
749
759
|
}
|
|
750
760
|
|
|
751
761
|
interface BlinkPaymentProps {
|
|
@@ -1996,6 +2006,10 @@ interface SetupDepositScreenProps {
|
|
|
1996
2006
|
selectedTokenSymbol?: string;
|
|
1997
2007
|
/** Chain name for the currently selected source. */
|
|
1998
2008
|
selectedChainName?: string;
|
|
2009
|
+
/** Server-provided token logo URI for the currently selected source. */
|
|
2010
|
+
selectedTokenLogoUri?: string | null;
|
|
2011
|
+
/** Server-provided chain logo URI for the currently selected source. */
|
|
2012
|
+
selectedChainLogoUri?: string | null;
|
|
1999
2013
|
/** Available tokens for the inline dropdown. */
|
|
2000
2014
|
tokenOptions?: SetupTokenOption[];
|
|
2001
2015
|
/** Called when the user picks a token from the inline dropdown. */
|
|
@@ -2009,7 +2023,7 @@ interface SetupDepositScreenProps {
|
|
|
2009
2023
|
/** True when the orchestrator is paused on source selection and ready for confirmation. */
|
|
2010
2024
|
continueReady?: boolean;
|
|
2011
2025
|
}
|
|
2012
|
-
declare function SetupDepositScreen({ depositAmount, availableBalance, minDepositFloor, onLogout, onBack, error, loadingShimmersEnabled, tokenSelectionLoading, selectedTokenSymbol, selectedChainName, tokenOptions, onSelectToken, quoteFee, quoteLoading, quoteError, onContinue, continueReady, }: SetupDepositScreenProps): react_jsx_runtime.JSX.Element;
|
|
2026
|
+
declare function SetupDepositScreen({ depositAmount, availableBalance, minDepositFloor, onLogout, onBack, error, loadingShimmersEnabled, tokenSelectionLoading, selectedTokenSymbol, selectedChainName, selectedTokenLogoUri, selectedChainLogoUri, tokenOptions, onSelectToken, quoteFee, quoteLoading, quoteError, onContinue, continueReady, }: SetupDepositScreenProps): react_jsx_runtime.JSX.Element;
|
|
2013
2027
|
|
|
2014
2028
|
interface DepositCompleteScreenProps {
|
|
2015
2029
|
amount: number;
|
|
@@ -2067,6 +2081,10 @@ interface DepositScreenProps {
|
|
|
2067
2081
|
selectedTokenSymbol?: string;
|
|
2068
2082
|
/** Chain name for the selected source, used to disambiguate same-symbol tokens on different chains. */
|
|
2069
2083
|
selectedChainName?: string;
|
|
2084
|
+
/** Server-provided token logo URI for the selected source. */
|
|
2085
|
+
selectedTokenLogoUri?: string | null;
|
|
2086
|
+
/** Server-provided chain logo URI for the selected source. */
|
|
2087
|
+
selectedChainLogoUri?: string | null;
|
|
2070
2088
|
/** Wallet that owns the selected source. Required for the inline source sheet
|
|
2071
2089
|
* to mark the active row when two wallets/accounts are authorized on the
|
|
2072
2090
|
* same symbol+chain. */
|
|
@@ -2084,7 +2102,7 @@ interface DepositScreenProps {
|
|
|
2084
2102
|
*/
|
|
2085
2103
|
minDepositFloor: number;
|
|
2086
2104
|
}
|
|
2087
|
-
declare function DepositScreen({ availableBalance, remainingLimit, initialAmount, minDepositFloor, quoteLoading, processing, error, onDeposit, onSwitchWallet, onBack, onLogout, onIncreaseLimit, increasingLimit, accounts, selectedAccountId, onSelectAccount: _onSelectAccount, onAuthorizeAccount: _onAuthorizeAccount, onAddProvider, onSelectToken, tokenOptions, onPickToken, useDeeplink, onPrepareTokenAuthorization, onCommitTokenAuthorization, selectedTokenSymbol, selectedChainName, selectedWalletId, selectedTokenStatus, onAuthorizeSelectedToken, authorizingToken, }: DepositScreenProps): react_jsx_runtime.JSX.Element;
|
|
2105
|
+
declare function DepositScreen({ availableBalance, remainingLimit, initialAmount, minDepositFloor, quoteLoading, processing, error, onDeposit, onSwitchWallet, onBack, onLogout, onIncreaseLimit, increasingLimit, accounts, selectedAccountId, onSelectAccount: _onSelectAccount, onAuthorizeAccount: _onAuthorizeAccount, onAddProvider, onSelectToken, tokenOptions, onPickToken, useDeeplink, onPrepareTokenAuthorization, onCommitTokenAuthorization, selectedTokenSymbol, selectedChainName, selectedTokenLogoUri, selectedChainLogoUri, selectedWalletId, selectedTokenStatus, onAuthorizeSelectedToken, authorizingToken, }: DepositScreenProps): react_jsx_runtime.JSX.Element;
|
|
2088
2106
|
|
|
2089
2107
|
interface SuccessScreenProps {
|
|
2090
2108
|
amount: number;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Buffer } from 'buffer';
|
|
2
|
-
import { createContext, forwardRef,
|
|
2
|
+
import { createContext, forwardRef, memo, useContext, useState, useEffect, useRef, useCallback, useMemo, useSyncExternalStore, useReducer, Component } from 'react';
|
|
3
3
|
import { PrivyProvider, usePrivy, useLoginWithPasskey, useSignupWithPasskey } from '@privy-io/react-auth';
|
|
4
4
|
import { WagmiProvider, useConfig, useConnect, useSwitchChain, createConfig, http, useAccount } from 'wagmi';
|
|
5
5
|
import { mainnet, arbitrum, base, polygon, bsc, megaeth, monad, hyperliquid, baseSepolia } from 'wagmi/chains';
|
|
@@ -1581,6 +1581,7 @@ __export(api_exports, {
|
|
|
1581
1581
|
fetchUserConfig: () => fetchUserConfig,
|
|
1582
1582
|
postTransferQuote: () => postTransferQuote,
|
|
1583
1583
|
probeActionCompletion: () => probeActionCompletion,
|
|
1584
|
+
refreshManualTransferQuote: () => refreshManualTransferQuote,
|
|
1584
1585
|
registerPasskey: () => registerPasskey,
|
|
1585
1586
|
reportActionCompletion: () => reportActionCompletion,
|
|
1586
1587
|
reportPasskeyActivity: () => reportPasskeyActivity,
|
|
@@ -2007,6 +2008,14 @@ async function fetchManualTransferSession(apiBaseUrl, sessionId) {
|
|
|
2007
2008
|
if (!res.ok) await throwApiError(res);
|
|
2008
2009
|
return await res.json();
|
|
2009
2010
|
}
|
|
2011
|
+
async function refreshManualTransferQuote(apiBaseUrl, sessionId) {
|
|
2012
|
+
const res = await fetch(
|
|
2013
|
+
`${apiBaseUrl}/v1/manual-transfers/${sessionId}/refresh-quote`,
|
|
2014
|
+
{ method: "POST" }
|
|
2015
|
+
);
|
|
2016
|
+
if (!res.ok) await throwApiError(res);
|
|
2017
|
+
return await res.json();
|
|
2018
|
+
}
|
|
2010
2019
|
async function reportActionCompletion(apiBaseUrl, actionId, result) {
|
|
2011
2020
|
const res = await fetchWithRetry(
|
|
2012
2021
|
`${apiBaseUrl}/v1/authorization-actions/${actionId}`,
|
|
@@ -8281,11 +8290,11 @@ function useManualTransferSession({
|
|
|
8281
8290
|
setSourceOptions(sources);
|
|
8282
8291
|
setLoadingSources(false);
|
|
8283
8292
|
const defaultOption = sources.find(
|
|
8284
|
-
(opt) => opt.tokenSymbol === "USDC" && opt.chainId ===
|
|
8293
|
+
(opt) => opt.tokenSymbol === "USDC" && opt.chainId === 792703809
|
|
8285
8294
|
);
|
|
8286
8295
|
if (defaultOption) {
|
|
8287
8296
|
setSelectedToken("USDC");
|
|
8288
|
-
setSelectedChainId("
|
|
8297
|
+
setSelectedChainId("792703809");
|
|
8289
8298
|
}
|
|
8290
8299
|
}
|
|
8291
8300
|
}).catch((err) => {
|
|
@@ -8307,7 +8316,9 @@ function useManualTransferSession({
|
|
|
8307
8316
|
const timer = window.setTimeout(() => setQrReady(true), 1200);
|
|
8308
8317
|
return () => window.clearTimeout(timer);
|
|
8309
8318
|
}, [depositAddress]);
|
|
8310
|
-
const
|
|
8319
|
+
const lastFeeCopyRef = useRef(null);
|
|
8320
|
+
const nextFeeCopy = session ? feeCopy(session) : null;
|
|
8321
|
+
const sessionFeeCopy = nextFeeCopy === lastFeeCopyRef.current ? lastFeeCopyRef.current : lastFeeCopyRef.current = nextFeeCopy;
|
|
8311
8322
|
const advanceMockStatus = useCallback((status) => {
|
|
8312
8323
|
setSession((prev) => prev ? { ...prev, status } : prev);
|
|
8313
8324
|
}, []);
|
|
@@ -8319,6 +8330,21 @@ function useManualTransferSession({
|
|
|
8319
8330
|
}, 2e3);
|
|
8320
8331
|
return () => window.clearInterval(timer);
|
|
8321
8332
|
}, [apiBaseUrl, mock, session?.sessionId, session?.status]);
|
|
8333
|
+
useEffect(() => {
|
|
8334
|
+
if (mock) return;
|
|
8335
|
+
if (!session?.sessionId || session.status !== "awaiting_deposit") return;
|
|
8336
|
+
const sessionId = session.sessionId;
|
|
8337
|
+
const timer = window.setInterval(() => {
|
|
8338
|
+
refreshManualTransferQuote(apiBaseUrl, sessionId).then(({ quoteValidUntil, minAmountUsd, slippage }) => {
|
|
8339
|
+
setSession(
|
|
8340
|
+
(prev) => prev && prev.sessionId === sessionId ? { ...prev, quoteValidUntil, minAmountUsd, slippage } : prev
|
|
8341
|
+
);
|
|
8342
|
+
}).catch((err) => {
|
|
8343
|
+
console.warn("[manual-transfer] refresh quote failed", err);
|
|
8344
|
+
});
|
|
8345
|
+
}, 1e4);
|
|
8346
|
+
return () => window.clearInterval(timer);
|
|
8347
|
+
}, [apiBaseUrl, mock, session?.sessionId, session?.status]);
|
|
8322
8348
|
useEffect(() => {
|
|
8323
8349
|
if (session?.status !== "completed") return;
|
|
8324
8350
|
if (completedRef.current === session.sessionId) return;
|
|
@@ -8341,6 +8367,15 @@ function useManualTransferSession({
|
|
|
8341
8367
|
return true;
|
|
8342
8368
|
});
|
|
8343
8369
|
}, [sourceOptions]);
|
|
8370
|
+
const tokenLogoUriBySymbol = useMemo(() => {
|
|
8371
|
+
const out = {};
|
|
8372
|
+
for (const opt of sourceOptions ?? []) {
|
|
8373
|
+
if (out[opt.tokenSymbol] == null) {
|
|
8374
|
+
out[opt.tokenSymbol] = opt.tokenLogoUri;
|
|
8375
|
+
}
|
|
8376
|
+
}
|
|
8377
|
+
return out;
|
|
8378
|
+
}, [sourceOptions]);
|
|
8344
8379
|
const selectedOption = useMemo(
|
|
8345
8380
|
() => (sourceOptions ?? []).find(
|
|
8346
8381
|
(opt) => opt.tokenSymbol === selectedToken && String(opt.chainId) === selectedChainId
|
|
@@ -8493,6 +8528,7 @@ function useManualTransferSession({
|
|
|
8493
8528
|
copiedAddress,
|
|
8494
8529
|
tokenChoices,
|
|
8495
8530
|
chainChoices,
|
|
8531
|
+
tokenLogoUriBySymbol,
|
|
8496
8532
|
selectedOption,
|
|
8497
8533
|
tokensForSelectedChain,
|
|
8498
8534
|
chainsForSelectedToken,
|
|
@@ -9825,12 +9861,14 @@ var trailingStyle = {
|
|
|
9825
9861
|
function TokenChainIcons({
|
|
9826
9862
|
tokenSymbol,
|
|
9827
9863
|
chainName,
|
|
9864
|
+
tokenLogoUri,
|
|
9865
|
+
chainLogoUri,
|
|
9828
9866
|
size = 28,
|
|
9829
9867
|
overlap = 12
|
|
9830
9868
|
}) {
|
|
9831
|
-
const tokenLogo = tokenSymbol ? TOKEN_LOGOS[tokenSymbol] : void 0;
|
|
9869
|
+
const tokenLogo = tokenLogoUri ?? (tokenSymbol ? TOKEN_LOGOS[tokenSymbol] : void 0);
|
|
9832
9870
|
const chainKey = chainName ? chainName.toLowerCase() : void 0;
|
|
9833
|
-
const chainLogo = chainKey ? CHAIN_LOGOS[chainKey] : void 0;
|
|
9871
|
+
const chainLogo = chainLogoUri ?? (chainKey ? CHAIN_LOGOS[chainKey] : void 0);
|
|
9834
9872
|
const chainInitial = chainName ? chainName.charAt(0).toUpperCase() : "?";
|
|
9835
9873
|
return /* @__PURE__ */ jsxs("span", { style: wrapStyle2(overlap), children: [
|
|
9836
9874
|
/* @__PURE__ */ jsx("span", { style: tokenCircleStyle(size, overlap, 2), children: tokenLogo ? /* @__PURE__ */ jsx(
|
|
@@ -10042,6 +10080,7 @@ function formatUsdTwoDecimals2(value) {
|
|
|
10042
10080
|
function TokenSourceRow({
|
|
10043
10081
|
symbol,
|
|
10044
10082
|
chainName,
|
|
10083
|
+
tokenLogoUri,
|
|
10045
10084
|
balance,
|
|
10046
10085
|
selected,
|
|
10047
10086
|
requiresAuth,
|
|
@@ -10049,7 +10088,7 @@ function TokenSourceRow({
|
|
|
10049
10088
|
}) {
|
|
10050
10089
|
const { tokens } = useBlinkConfig();
|
|
10051
10090
|
const [hovered, setHovered] = useState(false);
|
|
10052
|
-
const tokenLogo = TOKEN_LOGOS[symbol];
|
|
10091
|
+
const tokenLogo = tokenLogoUri ?? TOKEN_LOGOS[symbol];
|
|
10053
10092
|
const ariaLabel = [
|
|
10054
10093
|
`${symbol} on ${chainName}`,
|
|
10055
10094
|
balance != null ? `$${formatUsdTwoDecimals2(balance)} balance` : null,
|
|
@@ -10313,7 +10352,7 @@ var errorBoxStyle = (size, bg, color) => ({
|
|
|
10313
10352
|
textAlign: "center"
|
|
10314
10353
|
});
|
|
10315
10354
|
var QR_BOX_SIZE = 251;
|
|
10316
|
-
function
|
|
10355
|
+
function DepositQrCodeImpl({
|
|
10317
10356
|
address,
|
|
10318
10357
|
chainId,
|
|
10319
10358
|
depToken
|
|
@@ -10342,6 +10381,7 @@ function DepositQrCode({
|
|
|
10342
10381
|
/* @__PURE__ */ jsx("img", { src: BLINK_QR_LOGO, alt: "", style: qrLogoStyle })
|
|
10343
10382
|
] }) : /* @__PURE__ */ jsx("span", { style: { color: tokens.textMuted, fontSize: 13 }, children: "QR unavailable" }) });
|
|
10344
10383
|
}
|
|
10384
|
+
var DepositQrCode = memo(DepositQrCodeImpl);
|
|
10345
10385
|
var qrFrameStyle = (bgCardTranslucent) => ({
|
|
10346
10386
|
alignItems: "center",
|
|
10347
10387
|
alignSelf: "center",
|
|
@@ -10479,7 +10519,8 @@ function CompactTokenSelect({
|
|
|
10479
10519
|
value,
|
|
10480
10520
|
onValueChange,
|
|
10481
10521
|
options,
|
|
10482
|
-
availableTokens
|
|
10522
|
+
availableTokens,
|
|
10523
|
+
tokenLogoUriBySymbol
|
|
10483
10524
|
}) {
|
|
10484
10525
|
const { tokens } = useBlinkConfig();
|
|
10485
10526
|
const [hovered, setHovered] = useState(false);
|
|
@@ -10504,7 +10545,7 @@ function CompactTokenSelect({
|
|
|
10504
10545
|
/* @__PURE__ */ jsx(
|
|
10505
10546
|
LogoCircle,
|
|
10506
10547
|
{
|
|
10507
|
-
src: TOKEN_LOGOS[value],
|
|
10548
|
+
src: tokenLogoUriBySymbol?.[value] ?? TOKEN_LOGOS[value],
|
|
10508
10549
|
fallback: (value || "?").charAt(0),
|
|
10509
10550
|
size: 28
|
|
10510
10551
|
}
|
|
@@ -10551,7 +10592,7 @@ function CompactTokenSelect({
|
|
|
10551
10592
|
children: /* @__PURE__ */ jsx(
|
|
10552
10593
|
LogoCircle,
|
|
10553
10594
|
{
|
|
10554
|
-
src: TOKEN_LOGOS[token],
|
|
10595
|
+
src: tokenLogoUriBySymbol?.[token] ?? TOKEN_LOGOS[token],
|
|
10555
10596
|
fallback: token.charAt(0),
|
|
10556
10597
|
size: 28
|
|
10557
10598
|
}
|
|
@@ -10601,7 +10642,7 @@ function CompactChainSelect({
|
|
|
10601
10642
|
/* @__PURE__ */ jsx(
|
|
10602
10643
|
LogoCircle,
|
|
10603
10644
|
{
|
|
10604
|
-
src: CHAIN_LOGOS[selected?.chainName.toLowerCase() ?? ""],
|
|
10645
|
+
src: selected?.chainLogoUri ?? CHAIN_LOGOS[selected?.chainName.toLowerCase() ?? ""],
|
|
10605
10646
|
fallback: (selected?.chainName ?? "?").charAt(0),
|
|
10606
10647
|
size: 28,
|
|
10607
10648
|
preserveShape: true
|
|
@@ -10649,7 +10690,7 @@ function CompactChainSelect({
|
|
|
10649
10690
|
children: /* @__PURE__ */ jsx(
|
|
10650
10691
|
LogoCircle,
|
|
10651
10692
|
{
|
|
10652
|
-
src: CHAIN_LOGOS[opt.chainName.toLowerCase()],
|
|
10693
|
+
src: opt.chainLogoUri ?? CHAIN_LOGOS[opt.chainName.toLowerCase()],
|
|
10653
10694
|
fallback: opt.chainName.charAt(0),
|
|
10654
10695
|
size: 28,
|
|
10655
10696
|
preserveShape: true
|
|
@@ -13182,6 +13223,8 @@ function SetupDepositScreen({
|
|
|
13182
13223
|
tokenSelectionLoading = false,
|
|
13183
13224
|
selectedTokenSymbol,
|
|
13184
13225
|
selectedChainName,
|
|
13226
|
+
selectedTokenLogoUri,
|
|
13227
|
+
selectedChainLogoUri,
|
|
13185
13228
|
tokenOptions,
|
|
13186
13229
|
onSelectToken,
|
|
13187
13230
|
quoteFee,
|
|
@@ -13309,7 +13352,9 @@ function SetupDepositScreen({
|
|
|
13309
13352
|
TokenChainIcons,
|
|
13310
13353
|
{
|
|
13311
13354
|
tokenSymbol: selectedTokenSymbol,
|
|
13312
|
-
chainName: selectedChainName
|
|
13355
|
+
chainName: selectedChainName,
|
|
13356
|
+
tokenLogoUri: selectedTokenLogoUri,
|
|
13357
|
+
chainLogoUri: selectedChainLogoUri
|
|
13313
13358
|
}
|
|
13314
13359
|
),
|
|
13315
13360
|
name: selectedTokenSymbol,
|
|
@@ -13821,6 +13866,8 @@ function DepositScreen({
|
|
|
13821
13866
|
onCommitTokenAuthorization,
|
|
13822
13867
|
selectedTokenSymbol,
|
|
13823
13868
|
selectedChainName,
|
|
13869
|
+
selectedTokenLogoUri,
|
|
13870
|
+
selectedChainLogoUri,
|
|
13824
13871
|
selectedWalletId,
|
|
13825
13872
|
selectedTokenStatus,
|
|
13826
13873
|
onAuthorizeSelectedToken,
|
|
@@ -13924,7 +13971,9 @@ function DepositScreen({
|
|
|
13924
13971
|
TokenChainIcons,
|
|
13925
13972
|
{
|
|
13926
13973
|
tokenSymbol: selectedTokenSymbol,
|
|
13927
|
-
chainName: selectedChainName
|
|
13974
|
+
chainName: selectedChainName,
|
|
13975
|
+
tokenLogoUri: selectedTokenLogoUri,
|
|
13976
|
+
chainLogoUri: selectedChainLogoUri
|
|
13928
13977
|
}
|
|
13929
13978
|
),
|
|
13930
13979
|
name: selectedProviderName,
|
|
@@ -14827,6 +14876,7 @@ function DepositAddressScreen({
|
|
|
14827
14876
|
selectedChainId,
|
|
14828
14877
|
tokenChoices,
|
|
14829
14878
|
chainChoices,
|
|
14879
|
+
tokenLogoUriBySymbol,
|
|
14830
14880
|
selectedOption,
|
|
14831
14881
|
tokensForSelectedChain,
|
|
14832
14882
|
chainsForSelectedToken,
|
|
@@ -14921,7 +14971,8 @@ function DepositAddressScreen({
|
|
|
14921
14971
|
value: selectedToken,
|
|
14922
14972
|
onValueChange: selectToken,
|
|
14923
14973
|
options: tokenChoices,
|
|
14924
|
-
availableTokens: tokensForSelectedChain
|
|
14974
|
+
availableTokens: tokensForSelectedChain,
|
|
14975
|
+
tokenLogoUriBySymbol
|
|
14925
14976
|
}
|
|
14926
14977
|
),
|
|
14927
14978
|
/* @__PURE__ */ jsx(
|
|
@@ -14959,12 +15010,18 @@ function DepositAddressScreen({
|
|
|
14959
15010
|
}
|
|
14960
15011
|
),
|
|
14961
15012
|
/* @__PURE__ */ jsx("p", { style: bodyStyle3(tokens.textMuted), children: selectedOption ? session ? `Send ${selectedOption.tokenSymbol} on ${selectedOption.chainName}. Minimum $${session.minAmountUsd}.` : `Send ${selectedOption.tokenSymbol} on ${selectedOption.chainName}.` : "\xA0" }),
|
|
14962
|
-
sessionFeeCopy && /* @__PURE__ */ jsx(
|
|
15013
|
+
sessionFeeCopy && /* @__PURE__ */ jsx(FeeRow, { feeCopy: sessionFeeCopy, color: tokens.textMuted })
|
|
14963
15014
|
] }),
|
|
14964
15015
|
error && /* @__PURE__ */ jsx("p", { style: errorStyle2(tokens.error), children: error })
|
|
14965
15016
|
] })
|
|
14966
15017
|
] });
|
|
14967
15018
|
}
|
|
15019
|
+
var FeeRow = memo(function FeeRow2({
|
|
15020
|
+
feeCopy: feeCopy2,
|
|
15021
|
+
color
|
|
15022
|
+
}) {
|
|
15023
|
+
return /* @__PURE__ */ jsx("p", { style: bodyStyle3(color), children: feeCopy2 });
|
|
15024
|
+
});
|
|
14968
15025
|
var contentStyle17 = {
|
|
14969
15026
|
alignItems: "center",
|
|
14970
15027
|
display: "flex",
|
|
@@ -15921,6 +15978,7 @@ function ManualTransferFlow({
|
|
|
15921
15978
|
copiedAddress,
|
|
15922
15979
|
tokenChoices,
|
|
15923
15980
|
chainChoices,
|
|
15981
|
+
tokenLogoUriBySymbol,
|
|
15924
15982
|
selectedOption,
|
|
15925
15983
|
tokensForSelectedChain,
|
|
15926
15984
|
chainsForSelectedToken,
|
|
@@ -15974,6 +16032,7 @@ function ManualTransferFlow({
|
|
|
15974
16032
|
selectedChainId,
|
|
15975
16033
|
tokenChoices,
|
|
15976
16034
|
chainChoices,
|
|
16035
|
+
tokenLogoUriBySymbol,
|
|
15977
16036
|
selectedOption,
|
|
15978
16037
|
tokensForSelectedChain,
|
|
15979
16038
|
chainsForSelectedToken,
|