@swype-org/react-sdk 0.2.232 → 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 +76 -21
- 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 +77 -22
- 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}`,
|
|
@@ -8240,7 +8249,6 @@ function toTransfer(session) {
|
|
|
8240
8249
|
};
|
|
8241
8250
|
}
|
|
8242
8251
|
var SOLANA_CHAIN_ID = 792703809;
|
|
8243
|
-
var TRON_CHAIN_ID = 728126428;
|
|
8244
8252
|
var SOLANA_NATIVE_SOL_ADDRESS = "11111111111111111111111111111111";
|
|
8245
8253
|
function formatDepositUri(address, chainId, depToken) {
|
|
8246
8254
|
if (chainId === SOLANA_CHAIN_ID) {
|
|
@@ -8249,10 +8257,7 @@ function formatDepositUri(address, chainId, depToken) {
|
|
|
8249
8257
|
}
|
|
8250
8258
|
return `solana:${address}?spl-token=${depToken}`;
|
|
8251
8259
|
}
|
|
8252
|
-
|
|
8253
|
-
return address;
|
|
8254
|
-
}
|
|
8255
|
-
return `ethereum:${address}@${chainId}`;
|
|
8260
|
+
return address;
|
|
8256
8261
|
}
|
|
8257
8262
|
|
|
8258
8263
|
// src/hooks/useManualTransferSession.ts
|
|
@@ -8285,11 +8290,11 @@ function useManualTransferSession({
|
|
|
8285
8290
|
setSourceOptions(sources);
|
|
8286
8291
|
setLoadingSources(false);
|
|
8287
8292
|
const defaultOption = sources.find(
|
|
8288
|
-
(opt) => opt.tokenSymbol === "USDC" && opt.chainId ===
|
|
8293
|
+
(opt) => opt.tokenSymbol === "USDC" && opt.chainId === 792703809
|
|
8289
8294
|
);
|
|
8290
8295
|
if (defaultOption) {
|
|
8291
8296
|
setSelectedToken("USDC");
|
|
8292
|
-
setSelectedChainId("
|
|
8297
|
+
setSelectedChainId("792703809");
|
|
8293
8298
|
}
|
|
8294
8299
|
}
|
|
8295
8300
|
}).catch((err) => {
|
|
@@ -8311,7 +8316,9 @@ function useManualTransferSession({
|
|
|
8311
8316
|
const timer = window.setTimeout(() => setQrReady(true), 1200);
|
|
8312
8317
|
return () => window.clearTimeout(timer);
|
|
8313
8318
|
}, [depositAddress]);
|
|
8314
|
-
const
|
|
8319
|
+
const lastFeeCopyRef = useRef(null);
|
|
8320
|
+
const nextFeeCopy = session ? feeCopy(session) : null;
|
|
8321
|
+
const sessionFeeCopy = nextFeeCopy === lastFeeCopyRef.current ? lastFeeCopyRef.current : lastFeeCopyRef.current = nextFeeCopy;
|
|
8315
8322
|
const advanceMockStatus = useCallback((status) => {
|
|
8316
8323
|
setSession((prev) => prev ? { ...prev, status } : prev);
|
|
8317
8324
|
}, []);
|
|
@@ -8323,6 +8330,21 @@ function useManualTransferSession({
|
|
|
8323
8330
|
}, 2e3);
|
|
8324
8331
|
return () => window.clearInterval(timer);
|
|
8325
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]);
|
|
8326
8348
|
useEffect(() => {
|
|
8327
8349
|
if (session?.status !== "completed") return;
|
|
8328
8350
|
if (completedRef.current === session.sessionId) return;
|
|
@@ -8345,6 +8367,15 @@ function useManualTransferSession({
|
|
|
8345
8367
|
return true;
|
|
8346
8368
|
});
|
|
8347
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]);
|
|
8348
8379
|
const selectedOption = useMemo(
|
|
8349
8380
|
() => (sourceOptions ?? []).find(
|
|
8350
8381
|
(opt) => opt.tokenSymbol === selectedToken && String(opt.chainId) === selectedChainId
|
|
@@ -8497,6 +8528,7 @@ function useManualTransferSession({
|
|
|
8497
8528
|
copiedAddress,
|
|
8498
8529
|
tokenChoices,
|
|
8499
8530
|
chainChoices,
|
|
8531
|
+
tokenLogoUriBySymbol,
|
|
8500
8532
|
selectedOption,
|
|
8501
8533
|
tokensForSelectedChain,
|
|
8502
8534
|
chainsForSelectedToken,
|
|
@@ -9829,12 +9861,14 @@ var trailingStyle = {
|
|
|
9829
9861
|
function TokenChainIcons({
|
|
9830
9862
|
tokenSymbol,
|
|
9831
9863
|
chainName,
|
|
9864
|
+
tokenLogoUri,
|
|
9865
|
+
chainLogoUri,
|
|
9832
9866
|
size = 28,
|
|
9833
9867
|
overlap = 12
|
|
9834
9868
|
}) {
|
|
9835
|
-
const tokenLogo = tokenSymbol ? TOKEN_LOGOS[tokenSymbol] : void 0;
|
|
9869
|
+
const tokenLogo = tokenLogoUri ?? (tokenSymbol ? TOKEN_LOGOS[tokenSymbol] : void 0);
|
|
9836
9870
|
const chainKey = chainName ? chainName.toLowerCase() : void 0;
|
|
9837
|
-
const chainLogo = chainKey ? CHAIN_LOGOS[chainKey] : void 0;
|
|
9871
|
+
const chainLogo = chainLogoUri ?? (chainKey ? CHAIN_LOGOS[chainKey] : void 0);
|
|
9838
9872
|
const chainInitial = chainName ? chainName.charAt(0).toUpperCase() : "?";
|
|
9839
9873
|
return /* @__PURE__ */ jsxs("span", { style: wrapStyle2(overlap), children: [
|
|
9840
9874
|
/* @__PURE__ */ jsx("span", { style: tokenCircleStyle(size, overlap, 2), children: tokenLogo ? /* @__PURE__ */ jsx(
|
|
@@ -10046,6 +10080,7 @@ function formatUsdTwoDecimals2(value) {
|
|
|
10046
10080
|
function TokenSourceRow({
|
|
10047
10081
|
symbol,
|
|
10048
10082
|
chainName,
|
|
10083
|
+
tokenLogoUri,
|
|
10049
10084
|
balance,
|
|
10050
10085
|
selected,
|
|
10051
10086
|
requiresAuth,
|
|
@@ -10053,7 +10088,7 @@ function TokenSourceRow({
|
|
|
10053
10088
|
}) {
|
|
10054
10089
|
const { tokens } = useBlinkConfig();
|
|
10055
10090
|
const [hovered, setHovered] = useState(false);
|
|
10056
|
-
const tokenLogo = TOKEN_LOGOS[symbol];
|
|
10091
|
+
const tokenLogo = tokenLogoUri ?? TOKEN_LOGOS[symbol];
|
|
10057
10092
|
const ariaLabel = [
|
|
10058
10093
|
`${symbol} on ${chainName}`,
|
|
10059
10094
|
balance != null ? `$${formatUsdTwoDecimals2(balance)} balance` : null,
|
|
@@ -10317,7 +10352,7 @@ var errorBoxStyle = (size, bg, color) => ({
|
|
|
10317
10352
|
textAlign: "center"
|
|
10318
10353
|
});
|
|
10319
10354
|
var QR_BOX_SIZE = 251;
|
|
10320
|
-
function
|
|
10355
|
+
function DepositQrCodeImpl({
|
|
10321
10356
|
address,
|
|
10322
10357
|
chainId,
|
|
10323
10358
|
depToken
|
|
@@ -10346,6 +10381,7 @@ function DepositQrCode({
|
|
|
10346
10381
|
/* @__PURE__ */ jsx("img", { src: BLINK_QR_LOGO, alt: "", style: qrLogoStyle })
|
|
10347
10382
|
] }) : /* @__PURE__ */ jsx("span", { style: { color: tokens.textMuted, fontSize: 13 }, children: "QR unavailable" }) });
|
|
10348
10383
|
}
|
|
10384
|
+
var DepositQrCode = memo(DepositQrCodeImpl);
|
|
10349
10385
|
var qrFrameStyle = (bgCardTranslucent) => ({
|
|
10350
10386
|
alignItems: "center",
|
|
10351
10387
|
alignSelf: "center",
|
|
@@ -10483,7 +10519,8 @@ function CompactTokenSelect({
|
|
|
10483
10519
|
value,
|
|
10484
10520
|
onValueChange,
|
|
10485
10521
|
options,
|
|
10486
|
-
availableTokens
|
|
10522
|
+
availableTokens,
|
|
10523
|
+
tokenLogoUriBySymbol
|
|
10487
10524
|
}) {
|
|
10488
10525
|
const { tokens } = useBlinkConfig();
|
|
10489
10526
|
const [hovered, setHovered] = useState(false);
|
|
@@ -10508,7 +10545,7 @@ function CompactTokenSelect({
|
|
|
10508
10545
|
/* @__PURE__ */ jsx(
|
|
10509
10546
|
LogoCircle,
|
|
10510
10547
|
{
|
|
10511
|
-
src: TOKEN_LOGOS[value],
|
|
10548
|
+
src: tokenLogoUriBySymbol?.[value] ?? TOKEN_LOGOS[value],
|
|
10512
10549
|
fallback: (value || "?").charAt(0),
|
|
10513
10550
|
size: 28
|
|
10514
10551
|
}
|
|
@@ -10555,7 +10592,7 @@ function CompactTokenSelect({
|
|
|
10555
10592
|
children: /* @__PURE__ */ jsx(
|
|
10556
10593
|
LogoCircle,
|
|
10557
10594
|
{
|
|
10558
|
-
src: TOKEN_LOGOS[token],
|
|
10595
|
+
src: tokenLogoUriBySymbol?.[token] ?? TOKEN_LOGOS[token],
|
|
10559
10596
|
fallback: token.charAt(0),
|
|
10560
10597
|
size: 28
|
|
10561
10598
|
}
|
|
@@ -10605,7 +10642,7 @@ function CompactChainSelect({
|
|
|
10605
10642
|
/* @__PURE__ */ jsx(
|
|
10606
10643
|
LogoCircle,
|
|
10607
10644
|
{
|
|
10608
|
-
src: CHAIN_LOGOS[selected?.chainName.toLowerCase() ?? ""],
|
|
10645
|
+
src: selected?.chainLogoUri ?? CHAIN_LOGOS[selected?.chainName.toLowerCase() ?? ""],
|
|
10609
10646
|
fallback: (selected?.chainName ?? "?").charAt(0),
|
|
10610
10647
|
size: 28,
|
|
10611
10648
|
preserveShape: true
|
|
@@ -10653,7 +10690,7 @@ function CompactChainSelect({
|
|
|
10653
10690
|
children: /* @__PURE__ */ jsx(
|
|
10654
10691
|
LogoCircle,
|
|
10655
10692
|
{
|
|
10656
|
-
src: CHAIN_LOGOS[opt.chainName.toLowerCase()],
|
|
10693
|
+
src: opt.chainLogoUri ?? CHAIN_LOGOS[opt.chainName.toLowerCase()],
|
|
10657
10694
|
fallback: opt.chainName.charAt(0),
|
|
10658
10695
|
size: 28,
|
|
10659
10696
|
preserveShape: true
|
|
@@ -13186,6 +13223,8 @@ function SetupDepositScreen({
|
|
|
13186
13223
|
tokenSelectionLoading = false,
|
|
13187
13224
|
selectedTokenSymbol,
|
|
13188
13225
|
selectedChainName,
|
|
13226
|
+
selectedTokenLogoUri,
|
|
13227
|
+
selectedChainLogoUri,
|
|
13189
13228
|
tokenOptions,
|
|
13190
13229
|
onSelectToken,
|
|
13191
13230
|
quoteFee,
|
|
@@ -13313,7 +13352,9 @@ function SetupDepositScreen({
|
|
|
13313
13352
|
TokenChainIcons,
|
|
13314
13353
|
{
|
|
13315
13354
|
tokenSymbol: selectedTokenSymbol,
|
|
13316
|
-
chainName: selectedChainName
|
|
13355
|
+
chainName: selectedChainName,
|
|
13356
|
+
tokenLogoUri: selectedTokenLogoUri,
|
|
13357
|
+
chainLogoUri: selectedChainLogoUri
|
|
13317
13358
|
}
|
|
13318
13359
|
),
|
|
13319
13360
|
name: selectedTokenSymbol,
|
|
@@ -13825,6 +13866,8 @@ function DepositScreen({
|
|
|
13825
13866
|
onCommitTokenAuthorization,
|
|
13826
13867
|
selectedTokenSymbol,
|
|
13827
13868
|
selectedChainName,
|
|
13869
|
+
selectedTokenLogoUri,
|
|
13870
|
+
selectedChainLogoUri,
|
|
13828
13871
|
selectedWalletId,
|
|
13829
13872
|
selectedTokenStatus,
|
|
13830
13873
|
onAuthorizeSelectedToken,
|
|
@@ -13928,7 +13971,9 @@ function DepositScreen({
|
|
|
13928
13971
|
TokenChainIcons,
|
|
13929
13972
|
{
|
|
13930
13973
|
tokenSymbol: selectedTokenSymbol,
|
|
13931
|
-
chainName: selectedChainName
|
|
13974
|
+
chainName: selectedChainName,
|
|
13975
|
+
tokenLogoUri: selectedTokenLogoUri,
|
|
13976
|
+
chainLogoUri: selectedChainLogoUri
|
|
13932
13977
|
}
|
|
13933
13978
|
),
|
|
13934
13979
|
name: selectedProviderName,
|
|
@@ -14831,6 +14876,7 @@ function DepositAddressScreen({
|
|
|
14831
14876
|
selectedChainId,
|
|
14832
14877
|
tokenChoices,
|
|
14833
14878
|
chainChoices,
|
|
14879
|
+
tokenLogoUriBySymbol,
|
|
14834
14880
|
selectedOption,
|
|
14835
14881
|
tokensForSelectedChain,
|
|
14836
14882
|
chainsForSelectedToken,
|
|
@@ -14925,7 +14971,8 @@ function DepositAddressScreen({
|
|
|
14925
14971
|
value: selectedToken,
|
|
14926
14972
|
onValueChange: selectToken,
|
|
14927
14973
|
options: tokenChoices,
|
|
14928
|
-
availableTokens: tokensForSelectedChain
|
|
14974
|
+
availableTokens: tokensForSelectedChain,
|
|
14975
|
+
tokenLogoUriBySymbol
|
|
14929
14976
|
}
|
|
14930
14977
|
),
|
|
14931
14978
|
/* @__PURE__ */ jsx(
|
|
@@ -14963,12 +15010,18 @@ function DepositAddressScreen({
|
|
|
14963
15010
|
}
|
|
14964
15011
|
),
|
|
14965
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" }),
|
|
14966
|
-
sessionFeeCopy && /* @__PURE__ */ jsx(
|
|
15013
|
+
sessionFeeCopy && /* @__PURE__ */ jsx(FeeRow, { feeCopy: sessionFeeCopy, color: tokens.textMuted })
|
|
14967
15014
|
] }),
|
|
14968
15015
|
error && /* @__PURE__ */ jsx("p", { style: errorStyle2(tokens.error), children: error })
|
|
14969
15016
|
] })
|
|
14970
15017
|
] });
|
|
14971
15018
|
}
|
|
15019
|
+
var FeeRow = memo(function FeeRow2({
|
|
15020
|
+
feeCopy: feeCopy2,
|
|
15021
|
+
color
|
|
15022
|
+
}) {
|
|
15023
|
+
return /* @__PURE__ */ jsx("p", { style: bodyStyle3(color), children: feeCopy2 });
|
|
15024
|
+
});
|
|
14972
15025
|
var contentStyle17 = {
|
|
14973
15026
|
alignItems: "center",
|
|
14974
15027
|
display: "flex",
|
|
@@ -15925,6 +15978,7 @@ function ManualTransferFlow({
|
|
|
15925
15978
|
copiedAddress,
|
|
15926
15979
|
tokenChoices,
|
|
15927
15980
|
chainChoices,
|
|
15981
|
+
tokenLogoUriBySymbol,
|
|
15928
15982
|
selectedOption,
|
|
15929
15983
|
tokensForSelectedChain,
|
|
15930
15984
|
chainsForSelectedToken,
|
|
@@ -15978,6 +16032,7 @@ function ManualTransferFlow({
|
|
|
15978
16032
|
selectedChainId,
|
|
15979
16033
|
tokenChoices,
|
|
15980
16034
|
chainChoices,
|
|
16035
|
+
tokenLogoUriBySymbol,
|
|
15981
16036
|
selectedOption,
|
|
15982
16037
|
tokensForSelectedChain,
|
|
15983
16038
|
chainsForSelectedToken,
|