@pollar/react 0.12.1-rc.16 → 0.12.1-rc.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -34
- package/dist/index.css +120 -163
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +51 -9
- package/dist/index.d.ts +51 -9
- package/dist/index.js +679 -511
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +680 -512
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { WalletChain, pollarPaths, WalletBalanceRecord, TransactionState, WalletId, PollarLanguage, SwapQuoteParams, SwapDestinationChain, BridgeChain, BridgeTransfer, EarnProviderId, CardFundingChain, CardFunding, PollarClient, PollarClientConfig, PollarAdapters, OnStorageDegrade, WalletInfo, CosignCustody, PollarLoginOptions, SessionsState, CosignState, RecoveryState, CustodyMigrationState,
|
|
2
|
+
import { WalletChain, pollarPaths, WalletBalanceRecord, TransactionState, WalletId, PollarLanguage, PendingConfirmation, StellarNetwork, SwapQuoteParams, SwapDestinationChain, BridgeChain, BridgeTransfer, EarnProviderId, CardFundingChain, CardFunding, PollarClient, PollarClientConfig, PollarAdapters, OnStorageDegrade, WalletInfo, CosignCustody, PollarLoginOptions, SessionsState, CosignState, RecoveryState, CustodyMigrationState, TxBuildBody, BuildOutcome, SubmitOutcome, SignOutcome, SendPaymentParams, WalletBalanceState, EnabledAssetsState, TrustlineOutcome, TxHistoryState, SwapVenue, SwapToken, SwapQuote, SolanaSwapVenue, SolanaSwapQuoteParams, SolanaSwapQuote, SolanaSwapOptions, SwapStatus, EarnOpportunity, EarnPositionParams, EarnPosition, EarnTxParams, SolanaEarnProviderId, SolanaEarnOpportunity, SolanaEarnPosition, SolanaEarnTxParams, PollarAdapter, AuthEntryAdapterStep, AuthEntryAdapterOutcome, PasskeyCeremony, PasskeySigner, RecoveryPasskeyCeremony, CosignRequest, CosignVerification, CosignQuorumReport, CosignDevicesContent, KycStatus as KycStatus$1, RampQuoteRejection, RampQuoteRequirement, RampWalletStep, RampQuote, AuthState, KycProvider, KycStartResponse, RampDirection, RampFiat, RampAsset, RampField, RampOrder, EnabledAssetRecord, BridgeQuote, DistributionRulesState, DistributionRule } from '@pollar/core';
|
|
3
3
|
export { AuthProviderContext, PollarAuthProvider, SessionsState } from '@pollar/core';
|
|
4
4
|
import { CSSProperties, ReactNode } from 'react';
|
|
5
5
|
|
|
@@ -185,8 +185,12 @@ interface SendModalTemplateProps {
|
|
|
185
185
|
onDone: () => void;
|
|
186
186
|
/** Language of the modal. Defaults to the user's device; the modal passes the resolved one. */
|
|
187
187
|
language?: PollarLanguage | undefined;
|
|
188
|
+
/** The signature waiting for the user's yes, answered in the transaction step. */
|
|
189
|
+
confirmation?: PendingConfirmation | null | undefined;
|
|
190
|
+
/** The app's network, for the details of a confirmation. */
|
|
191
|
+
network?: StellarNetwork | undefined;
|
|
188
192
|
}
|
|
189
|
-
declare function SendModalTemplate({ theme, accentColor, styleOverrides, step, txTitle, assets, selectedAsset, selectedChain, canSendOnChain, notReadyReason, chains, onSelectChain, amount, destination, formError, isLoadingBalance, isCheckingDestination, minStartingBalance, onCreateAccount, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, onClose, onBack, onRefresh, onSelectAsset, onAmountChange, onMax, onPaste, onDestinationChange, memo, memoType, onMemoChange, onMemoTypeChange, onSubmit, onSignAndSend, onToggleXdr, onCopyHash, onRetry, onDone, language: languageProp, }: SendModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
193
|
+
declare function SendModalTemplate({ theme, accentColor, styleOverrides, step, txTitle, assets, selectedAsset, selectedChain, canSendOnChain, notReadyReason, chains, onSelectChain, amount, destination, formError, isLoadingBalance, isCheckingDestination, minStartingBalance, onCreateAccount, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, onClose, onBack, onRefresh, onSelectAsset, onAmountChange, onMax, onPaste, onDestinationChange, memo, memoType, onMemoChange, onMemoTypeChange, onSubmit, onSignAndSend, onToggleXdr, onCopyHash, onRetry, onDone, language: languageProp, confirmation, network, }: SendModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
190
194
|
|
|
191
195
|
/** Where the send modal opens: a starting point the user can change. An option the wallet cannot use is left out. */
|
|
192
196
|
interface SendModalOptions {
|
|
@@ -265,6 +269,10 @@ interface SwapModalTemplateProps {
|
|
|
265
269
|
/** USDC to USDC across chains: a transfer, which the swap does not do. */
|
|
266
270
|
usdcAcross?: boolean;
|
|
267
271
|
settlement?: SwapSettlementView | null;
|
|
272
|
+
/** The signature waiting for the user's yes, answered in the transaction step. */
|
|
273
|
+
confirmation?: PendingConfirmation | null | undefined;
|
|
274
|
+
/** The app's network, for the details of a confirmation. */
|
|
275
|
+
network?: StellarNetwork | undefined;
|
|
268
276
|
provider: string;
|
|
269
277
|
providers: string[];
|
|
270
278
|
quote: SwapQuoteView | null;
|
|
@@ -303,7 +311,7 @@ interface SwapModalTemplateProps {
|
|
|
303
311
|
onRetry: () => void;
|
|
304
312
|
onDone: () => void;
|
|
305
313
|
}
|
|
306
|
-
declare function SwapModalTemplate({ theme, accentColor, styleOverrides, step, txTitle, sellOptions, buyOptions, selectedSell, selectedBuy, amount, chains, chain, destinations, destination, usdcAcross, settlement, provider, providers, quote, quoteLoading, quoteError, formError, isLoadingData, smartUnsupported, configLoading, swapUnavailable, buyNeedsTrustline, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, language: languageProp, onClose, onBack, onRefresh, onSelectSell, onSelectBuy, onAddCustomToken, onReverse, onMax, onAmountChange, onChainChange, onDestinationChange, onProviderChange, onSwap, onToggleXdr, onCopyHash, onRetry, onDone, }: SwapModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
314
|
+
declare function SwapModalTemplate({ theme, accentColor, styleOverrides, step, txTitle, sellOptions, buyOptions, selectedSell, selectedBuy, amount, chains, chain, destinations, destination, usdcAcross, settlement, confirmation, network, provider, providers, quote, quoteLoading, quoteError, formError, isLoadingData, smartUnsupported, configLoading, swapUnavailable, buyNeedsTrustline, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, language: languageProp, onClose, onBack, onRefresh, onSelectSell, onSelectBuy, onAddCustomToken, onReverse, onMax, onAmountChange, onChainChange, onDestinationChange, onProviderChange, onSwap, onToggleXdr, onCopyHash, onRetry, onDone, }: SwapModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
307
315
|
|
|
308
316
|
/** Where the swap modal opens: a starting point the user can change. An option the app does not offer is left out. */
|
|
309
317
|
interface SwapModalOptions {
|
|
@@ -459,6 +467,12 @@ interface PollarContextValue {
|
|
|
459
467
|
refreshCustodyMigration: () => void;
|
|
460
468
|
/** Signing calls waiting for the user under `confirmation: 'prompt'`; the provider shows the first one. */
|
|
461
469
|
confirmations: PendingConfirmation[];
|
|
470
|
+
/**
|
|
471
|
+
* A modal that shows the transaction it signs answers the confirmation itself:
|
|
472
|
+
* while one is registered the provider does not open its own prompt over it.
|
|
473
|
+
* Returns the unregister.
|
|
474
|
+
*/
|
|
475
|
+
registerConfirmationHost: () => () => void;
|
|
462
476
|
appConfig: PollarConfig;
|
|
463
477
|
styles: PollarStyles;
|
|
464
478
|
/** Remote app-config load state. 'loading' while the initial fetch is in
|
|
@@ -1253,8 +1267,10 @@ interface RampWidgetTemplateProps {
|
|
|
1253
1267
|
onRetry: () => void;
|
|
1254
1268
|
onRefresh: () => void;
|
|
1255
1269
|
onClose: () => void;
|
|
1270
|
+
/** A leg's signature waiting for the user's yes, answered in the status view. */
|
|
1271
|
+
confirmation?: PendingConfirmation | null | undefined;
|
|
1256
1272
|
}
|
|
1257
|
-
declare function RampWidgetTemplate({ theme, accentColor, styleOverrides, network, step, flowSteps, flowStepIndex, direction, routesLoading, countries, country, fiats, fiat, assets, asset, amount, sellAvailable, quotes, rejected, startingQuoteId, fields, fieldValues, order, pendingOrders, isLoading, refreshing, signing, errorMsg, notice, onDirectionChange, onCountryChange, onFiatChange, onAssetChange, onAmountChange, onFindRoute, onSelectQuote, onVerifyRoute, trustingAsset, onTrustAsset, walletBusy, custodyChoice, onWalletStep, noChains, retrying, onRetryOrder, onRequote, onSetUpRecovery, recoveryMissing, checkingPayment, onCheckPayment, pollTrouble, onFieldChange, onContactContinue, onSign, onApprove, onResumeOrder, onNewOrder, onBack, onStepSelect, onRetry, onRefresh, onClose, language: languageProp, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1273
|
+
declare function RampWidgetTemplate({ theme, accentColor, styleOverrides, network, step, flowSteps, flowStepIndex, direction, routesLoading, countries, country, fiats, fiat, assets, asset, amount, sellAvailable, quotes, rejected, startingQuoteId, fields, fieldValues, order, pendingOrders, isLoading, refreshing, signing, errorMsg, notice, onDirectionChange, onCountryChange, onFiatChange, onAssetChange, onAmountChange, onFindRoute, onSelectQuote, onVerifyRoute, trustingAsset, onTrustAsset, walletBusy, custodyChoice, onWalletStep, noChains, retrying, onRetryOrder, onRequote, onSetUpRecovery, recoveryMissing, checkingPayment, onCheckPayment, pollTrouble, onFieldChange, onContactContinue, onSign, onApprove, onResumeOrder, onNewOrder, onBack, onStepSelect, onRetry, onRefresh, onClose, language: languageProp, confirmation, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1258
1274
|
|
|
1259
1275
|
interface TransactionModalTemplateProps {
|
|
1260
1276
|
theme: string;
|
|
@@ -1273,8 +1289,12 @@ interface TransactionModalTemplateProps {
|
|
|
1273
1289
|
onRetry?: () => void;
|
|
1274
1290
|
/** Language of the modal. Defaults to the user's device; the modal passes the resolved one. */
|
|
1275
1291
|
language?: PollarLanguage | undefined;
|
|
1292
|
+
/** The signature waiting for the user's yes, answered in this view. */
|
|
1293
|
+
confirmation?: PendingConfirmation | null | undefined;
|
|
1294
|
+
/** The app's network, for the details of a confirmation. */
|
|
1295
|
+
network?: StellarNetwork | undefined;
|
|
1276
1296
|
}
|
|
1277
|
-
declare function TransactionModalTemplate({ theme, accentColor, styleOverrides, transaction, showXdr, copied, explorerUrl, walletType, onClose, onSignAndSend, onToggleXdr, onCopyHash, onRetry, language: languageProp, }: TransactionModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1297
|
+
declare function TransactionModalTemplate({ theme, accentColor, styleOverrides, transaction, showXdr, copied, explorerUrl, walletType, onClose, onSignAndSend, onToggleXdr, onCopyHash, onRetry, language: languageProp, confirmation, network, }: TransactionModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1278
1298
|
|
|
1279
1299
|
/** One end of the flow: a wallet, an account or a contract, and what it sends or gets. */
|
|
1280
1300
|
interface TxParty {
|
|
@@ -1293,6 +1313,8 @@ interface TxDetailRow {
|
|
|
1293
1313
|
value: string;
|
|
1294
1314
|
/** What the copy button copies; the row has none when absent. */
|
|
1295
1315
|
copyValue?: string;
|
|
1316
|
+
/** Opens this page: the value is a link (an explorer on another chain). */
|
|
1317
|
+
href?: string;
|
|
1296
1318
|
mono?: boolean;
|
|
1297
1319
|
}
|
|
1298
1320
|
interface TxReviewData {
|
|
@@ -1346,8 +1368,24 @@ interface TxStatusViewProps {
|
|
|
1346
1368
|
successMessage?: string | undefined;
|
|
1347
1369
|
/** Shown under the review once the transaction succeeds, above Done. */
|
|
1348
1370
|
successExtra?: ReactNode;
|
|
1371
|
+
/** The signature waiting for the user's yes, answered here instead of in a prompt over the modal. */
|
|
1372
|
+
confirmation?: PendingConfirmation | null | undefined;
|
|
1373
|
+
/** The app's network, for the details of a confirmation. */
|
|
1374
|
+
network?: StellarNetwork | undefined;
|
|
1375
|
+
/** Rows the modal adds to the details (where a cross-chain swap delivers). */
|
|
1376
|
+
extraRows?: TxDetailRow[] | undefined;
|
|
1377
|
+
/** A second line for the outcome strip, and whether it reports a failure (a cross-chain leg). */
|
|
1378
|
+
outcomeNote?: {
|
|
1379
|
+
text: string;
|
|
1380
|
+
failed?: boolean;
|
|
1381
|
+
} | undefined;
|
|
1349
1382
|
}
|
|
1350
|
-
|
|
1383
|
+
/**
|
|
1384
|
+
* A transaction from the user's yes to its outcome in one view: the review stays,
|
|
1385
|
+
* and a strip under it says where the transaction stands. The hash and every
|
|
1386
|
+
* address live in the details.
|
|
1387
|
+
*/
|
|
1388
|
+
declare function TxStatusView({ transaction, showXdr, explorerUrl, walletType, onSignAndSend, onToggleXdr, onRetry, onDone, language: languageProp, review: reviewProp, successMessage, successExtra, confirmation, network, extraRows, outcomeNote, }: TxStatusViewProps): react_jsx_runtime.JSX.Element;
|
|
1351
1389
|
|
|
1352
1390
|
interface TxHistoryModalTemplateProps {
|
|
1353
1391
|
theme: string;
|
|
@@ -1473,6 +1511,8 @@ interface BridgeModalTemplateProps {
|
|
|
1473
1511
|
onNewBridge: () => void;
|
|
1474
1512
|
onClose: () => void;
|
|
1475
1513
|
language?: PollarLanguage | undefined;
|
|
1514
|
+
/** The signature waiting for the user's yes, answered in the transfer view. */
|
|
1515
|
+
confirmation?: PendingConfirmation | null | undefined;
|
|
1476
1516
|
}
|
|
1477
1517
|
declare function BridgeModalTemplate(props: BridgeModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1478
1518
|
|
|
@@ -1553,8 +1593,10 @@ interface CosignModalTemplateProps {
|
|
|
1553
1593
|
onLinkDevice?: () => void;
|
|
1554
1594
|
/** The last request that reached a final state, shown once the list is empty. */
|
|
1555
1595
|
lastResolved?: CosignRequest;
|
|
1556
|
-
/**
|
|
1557
|
-
|
|
1596
|
+
/** The requests resolved while the modal is open, oldest first: the steps of the flow already signed. */
|
|
1597
|
+
history?: CosignRequest[];
|
|
1598
|
+
/** The explorer page of a sent request's transaction. */
|
|
1599
|
+
explorerUrlOf?: (request: CosignRequest) => string | null;
|
|
1558
1600
|
/** Seconds until the modal closes on its own, while what it shows needs nothing from the user. */
|
|
1559
1601
|
closesIn?: number | null;
|
|
1560
1602
|
/** The approval coming next in the same flow, shown while the modal waits for it. */
|
|
@@ -1573,7 +1615,7 @@ interface CosignModalTemplateProps {
|
|
|
1573
1615
|
onKeepOpen?: () => void;
|
|
1574
1616
|
onCloseAnyway?: () => void;
|
|
1575
1617
|
}
|
|
1576
|
-
declare function CosignModalTemplate({ theme, accentColor, styleOverrides, pending, current, verification, busy, error, approveBlocked, deviceNotLinked, onLinkDevice, lastResolved,
|
|
1618
|
+
declare function CosignModalTemplate({ theme, accentColor, styleOverrides, pending, current, verification, busy, error, approveBlocked, deviceNotLinked, onLinkDevice, lastResolved, history, explorerUrlOf, closesIn, nextStep, language: languageProp, network, onSelect, onApprove, onReject, onClose, confirmingClose, onKeepOpen, onCloseAnyway, }: CosignModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1577
1619
|
|
|
1578
1620
|
interface CustodyMigrationModalProps {
|
|
1579
1621
|
state: CustodyMigrationState;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { WalletChain, pollarPaths, WalletBalanceRecord, TransactionState, WalletId, PollarLanguage, SwapQuoteParams, SwapDestinationChain, BridgeChain, BridgeTransfer, EarnProviderId, CardFundingChain, CardFunding, PollarClient, PollarClientConfig, PollarAdapters, OnStorageDegrade, WalletInfo, CosignCustody, PollarLoginOptions, SessionsState, CosignState, RecoveryState, CustodyMigrationState,
|
|
2
|
+
import { WalletChain, pollarPaths, WalletBalanceRecord, TransactionState, WalletId, PollarLanguage, PendingConfirmation, StellarNetwork, SwapQuoteParams, SwapDestinationChain, BridgeChain, BridgeTransfer, EarnProviderId, CardFundingChain, CardFunding, PollarClient, PollarClientConfig, PollarAdapters, OnStorageDegrade, WalletInfo, CosignCustody, PollarLoginOptions, SessionsState, CosignState, RecoveryState, CustodyMigrationState, TxBuildBody, BuildOutcome, SubmitOutcome, SignOutcome, SendPaymentParams, WalletBalanceState, EnabledAssetsState, TrustlineOutcome, TxHistoryState, SwapVenue, SwapToken, SwapQuote, SolanaSwapVenue, SolanaSwapQuoteParams, SolanaSwapQuote, SolanaSwapOptions, SwapStatus, EarnOpportunity, EarnPositionParams, EarnPosition, EarnTxParams, SolanaEarnProviderId, SolanaEarnOpportunity, SolanaEarnPosition, SolanaEarnTxParams, PollarAdapter, AuthEntryAdapterStep, AuthEntryAdapterOutcome, PasskeyCeremony, PasskeySigner, RecoveryPasskeyCeremony, CosignRequest, CosignVerification, CosignQuorumReport, CosignDevicesContent, KycStatus as KycStatus$1, RampQuoteRejection, RampQuoteRequirement, RampWalletStep, RampQuote, AuthState, KycProvider, KycStartResponse, RampDirection, RampFiat, RampAsset, RampField, RampOrder, EnabledAssetRecord, BridgeQuote, DistributionRulesState, DistributionRule } from '@pollar/core';
|
|
3
3
|
export { AuthProviderContext, PollarAuthProvider, SessionsState } from '@pollar/core';
|
|
4
4
|
import { CSSProperties, ReactNode } from 'react';
|
|
5
5
|
|
|
@@ -185,8 +185,12 @@ interface SendModalTemplateProps {
|
|
|
185
185
|
onDone: () => void;
|
|
186
186
|
/** Language of the modal. Defaults to the user's device; the modal passes the resolved one. */
|
|
187
187
|
language?: PollarLanguage | undefined;
|
|
188
|
+
/** The signature waiting for the user's yes, answered in the transaction step. */
|
|
189
|
+
confirmation?: PendingConfirmation | null | undefined;
|
|
190
|
+
/** The app's network, for the details of a confirmation. */
|
|
191
|
+
network?: StellarNetwork | undefined;
|
|
188
192
|
}
|
|
189
|
-
declare function SendModalTemplate({ theme, accentColor, styleOverrides, step, txTitle, assets, selectedAsset, selectedChain, canSendOnChain, notReadyReason, chains, onSelectChain, amount, destination, formError, isLoadingBalance, isCheckingDestination, minStartingBalance, onCreateAccount, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, onClose, onBack, onRefresh, onSelectAsset, onAmountChange, onMax, onPaste, onDestinationChange, memo, memoType, onMemoChange, onMemoTypeChange, onSubmit, onSignAndSend, onToggleXdr, onCopyHash, onRetry, onDone, language: languageProp, }: SendModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
193
|
+
declare function SendModalTemplate({ theme, accentColor, styleOverrides, step, txTitle, assets, selectedAsset, selectedChain, canSendOnChain, notReadyReason, chains, onSelectChain, amount, destination, formError, isLoadingBalance, isCheckingDestination, minStartingBalance, onCreateAccount, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, onClose, onBack, onRefresh, onSelectAsset, onAmountChange, onMax, onPaste, onDestinationChange, memo, memoType, onMemoChange, onMemoTypeChange, onSubmit, onSignAndSend, onToggleXdr, onCopyHash, onRetry, onDone, language: languageProp, confirmation, network, }: SendModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
190
194
|
|
|
191
195
|
/** Where the send modal opens: a starting point the user can change. An option the wallet cannot use is left out. */
|
|
192
196
|
interface SendModalOptions {
|
|
@@ -265,6 +269,10 @@ interface SwapModalTemplateProps {
|
|
|
265
269
|
/** USDC to USDC across chains: a transfer, which the swap does not do. */
|
|
266
270
|
usdcAcross?: boolean;
|
|
267
271
|
settlement?: SwapSettlementView | null;
|
|
272
|
+
/** The signature waiting for the user's yes, answered in the transaction step. */
|
|
273
|
+
confirmation?: PendingConfirmation | null | undefined;
|
|
274
|
+
/** The app's network, for the details of a confirmation. */
|
|
275
|
+
network?: StellarNetwork | undefined;
|
|
268
276
|
provider: string;
|
|
269
277
|
providers: string[];
|
|
270
278
|
quote: SwapQuoteView | null;
|
|
@@ -303,7 +311,7 @@ interface SwapModalTemplateProps {
|
|
|
303
311
|
onRetry: () => void;
|
|
304
312
|
onDone: () => void;
|
|
305
313
|
}
|
|
306
|
-
declare function SwapModalTemplate({ theme, accentColor, styleOverrides, step, txTitle, sellOptions, buyOptions, selectedSell, selectedBuy, amount, chains, chain, destinations, destination, usdcAcross, settlement, provider, providers, quote, quoteLoading, quoteError, formError, isLoadingData, smartUnsupported, configLoading, swapUnavailable, buyNeedsTrustline, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, language: languageProp, onClose, onBack, onRefresh, onSelectSell, onSelectBuy, onAddCustomToken, onReverse, onMax, onAmountChange, onChainChange, onDestinationChange, onProviderChange, onSwap, onToggleXdr, onCopyHash, onRetry, onDone, }: SwapModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
314
|
+
declare function SwapModalTemplate({ theme, accentColor, styleOverrides, step, txTitle, sellOptions, buyOptions, selectedSell, selectedBuy, amount, chains, chain, destinations, destination, usdcAcross, settlement, confirmation, network, provider, providers, quote, quoteLoading, quoteError, formError, isLoadingData, smartUnsupported, configLoading, swapUnavailable, buyNeedsTrustline, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, language: languageProp, onClose, onBack, onRefresh, onSelectSell, onSelectBuy, onAddCustomToken, onReverse, onMax, onAmountChange, onChainChange, onDestinationChange, onProviderChange, onSwap, onToggleXdr, onCopyHash, onRetry, onDone, }: SwapModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
307
315
|
|
|
308
316
|
/** Where the swap modal opens: a starting point the user can change. An option the app does not offer is left out. */
|
|
309
317
|
interface SwapModalOptions {
|
|
@@ -459,6 +467,12 @@ interface PollarContextValue {
|
|
|
459
467
|
refreshCustodyMigration: () => void;
|
|
460
468
|
/** Signing calls waiting for the user under `confirmation: 'prompt'`; the provider shows the first one. */
|
|
461
469
|
confirmations: PendingConfirmation[];
|
|
470
|
+
/**
|
|
471
|
+
* A modal that shows the transaction it signs answers the confirmation itself:
|
|
472
|
+
* while one is registered the provider does not open its own prompt over it.
|
|
473
|
+
* Returns the unregister.
|
|
474
|
+
*/
|
|
475
|
+
registerConfirmationHost: () => () => void;
|
|
462
476
|
appConfig: PollarConfig;
|
|
463
477
|
styles: PollarStyles;
|
|
464
478
|
/** Remote app-config load state. 'loading' while the initial fetch is in
|
|
@@ -1253,8 +1267,10 @@ interface RampWidgetTemplateProps {
|
|
|
1253
1267
|
onRetry: () => void;
|
|
1254
1268
|
onRefresh: () => void;
|
|
1255
1269
|
onClose: () => void;
|
|
1270
|
+
/** A leg's signature waiting for the user's yes, answered in the status view. */
|
|
1271
|
+
confirmation?: PendingConfirmation | null | undefined;
|
|
1256
1272
|
}
|
|
1257
|
-
declare function RampWidgetTemplate({ theme, accentColor, styleOverrides, network, step, flowSteps, flowStepIndex, direction, routesLoading, countries, country, fiats, fiat, assets, asset, amount, sellAvailable, quotes, rejected, startingQuoteId, fields, fieldValues, order, pendingOrders, isLoading, refreshing, signing, errorMsg, notice, onDirectionChange, onCountryChange, onFiatChange, onAssetChange, onAmountChange, onFindRoute, onSelectQuote, onVerifyRoute, trustingAsset, onTrustAsset, walletBusy, custodyChoice, onWalletStep, noChains, retrying, onRetryOrder, onRequote, onSetUpRecovery, recoveryMissing, checkingPayment, onCheckPayment, pollTrouble, onFieldChange, onContactContinue, onSign, onApprove, onResumeOrder, onNewOrder, onBack, onStepSelect, onRetry, onRefresh, onClose, language: languageProp, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1273
|
+
declare function RampWidgetTemplate({ theme, accentColor, styleOverrides, network, step, flowSteps, flowStepIndex, direction, routesLoading, countries, country, fiats, fiat, assets, asset, amount, sellAvailable, quotes, rejected, startingQuoteId, fields, fieldValues, order, pendingOrders, isLoading, refreshing, signing, errorMsg, notice, onDirectionChange, onCountryChange, onFiatChange, onAssetChange, onAmountChange, onFindRoute, onSelectQuote, onVerifyRoute, trustingAsset, onTrustAsset, walletBusy, custodyChoice, onWalletStep, noChains, retrying, onRetryOrder, onRequote, onSetUpRecovery, recoveryMissing, checkingPayment, onCheckPayment, pollTrouble, onFieldChange, onContactContinue, onSign, onApprove, onResumeOrder, onNewOrder, onBack, onStepSelect, onRetry, onRefresh, onClose, language: languageProp, confirmation, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1258
1274
|
|
|
1259
1275
|
interface TransactionModalTemplateProps {
|
|
1260
1276
|
theme: string;
|
|
@@ -1273,8 +1289,12 @@ interface TransactionModalTemplateProps {
|
|
|
1273
1289
|
onRetry?: () => void;
|
|
1274
1290
|
/** Language of the modal. Defaults to the user's device; the modal passes the resolved one. */
|
|
1275
1291
|
language?: PollarLanguage | undefined;
|
|
1292
|
+
/** The signature waiting for the user's yes, answered in this view. */
|
|
1293
|
+
confirmation?: PendingConfirmation | null | undefined;
|
|
1294
|
+
/** The app's network, for the details of a confirmation. */
|
|
1295
|
+
network?: StellarNetwork | undefined;
|
|
1276
1296
|
}
|
|
1277
|
-
declare function TransactionModalTemplate({ theme, accentColor, styleOverrides, transaction, showXdr, copied, explorerUrl, walletType, onClose, onSignAndSend, onToggleXdr, onCopyHash, onRetry, language: languageProp, }: TransactionModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1297
|
+
declare function TransactionModalTemplate({ theme, accentColor, styleOverrides, transaction, showXdr, copied, explorerUrl, walletType, onClose, onSignAndSend, onToggleXdr, onCopyHash, onRetry, language: languageProp, confirmation, network, }: TransactionModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1278
1298
|
|
|
1279
1299
|
/** One end of the flow: a wallet, an account or a contract, and what it sends or gets. */
|
|
1280
1300
|
interface TxParty {
|
|
@@ -1293,6 +1313,8 @@ interface TxDetailRow {
|
|
|
1293
1313
|
value: string;
|
|
1294
1314
|
/** What the copy button copies; the row has none when absent. */
|
|
1295
1315
|
copyValue?: string;
|
|
1316
|
+
/** Opens this page: the value is a link (an explorer on another chain). */
|
|
1317
|
+
href?: string;
|
|
1296
1318
|
mono?: boolean;
|
|
1297
1319
|
}
|
|
1298
1320
|
interface TxReviewData {
|
|
@@ -1346,8 +1368,24 @@ interface TxStatusViewProps {
|
|
|
1346
1368
|
successMessage?: string | undefined;
|
|
1347
1369
|
/** Shown under the review once the transaction succeeds, above Done. */
|
|
1348
1370
|
successExtra?: ReactNode;
|
|
1371
|
+
/** The signature waiting for the user's yes, answered here instead of in a prompt over the modal. */
|
|
1372
|
+
confirmation?: PendingConfirmation | null | undefined;
|
|
1373
|
+
/** The app's network, for the details of a confirmation. */
|
|
1374
|
+
network?: StellarNetwork | undefined;
|
|
1375
|
+
/** Rows the modal adds to the details (where a cross-chain swap delivers). */
|
|
1376
|
+
extraRows?: TxDetailRow[] | undefined;
|
|
1377
|
+
/** A second line for the outcome strip, and whether it reports a failure (a cross-chain leg). */
|
|
1378
|
+
outcomeNote?: {
|
|
1379
|
+
text: string;
|
|
1380
|
+
failed?: boolean;
|
|
1381
|
+
} | undefined;
|
|
1349
1382
|
}
|
|
1350
|
-
|
|
1383
|
+
/**
|
|
1384
|
+
* A transaction from the user's yes to its outcome in one view: the review stays,
|
|
1385
|
+
* and a strip under it says where the transaction stands. The hash and every
|
|
1386
|
+
* address live in the details.
|
|
1387
|
+
*/
|
|
1388
|
+
declare function TxStatusView({ transaction, showXdr, explorerUrl, walletType, onSignAndSend, onToggleXdr, onRetry, onDone, language: languageProp, review: reviewProp, successMessage, successExtra, confirmation, network, extraRows, outcomeNote, }: TxStatusViewProps): react_jsx_runtime.JSX.Element;
|
|
1351
1389
|
|
|
1352
1390
|
interface TxHistoryModalTemplateProps {
|
|
1353
1391
|
theme: string;
|
|
@@ -1473,6 +1511,8 @@ interface BridgeModalTemplateProps {
|
|
|
1473
1511
|
onNewBridge: () => void;
|
|
1474
1512
|
onClose: () => void;
|
|
1475
1513
|
language?: PollarLanguage | undefined;
|
|
1514
|
+
/** The signature waiting for the user's yes, answered in the transfer view. */
|
|
1515
|
+
confirmation?: PendingConfirmation | null | undefined;
|
|
1476
1516
|
}
|
|
1477
1517
|
declare function BridgeModalTemplate(props: BridgeModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1478
1518
|
|
|
@@ -1553,8 +1593,10 @@ interface CosignModalTemplateProps {
|
|
|
1553
1593
|
onLinkDevice?: () => void;
|
|
1554
1594
|
/** The last request that reached a final state, shown once the list is empty. */
|
|
1555
1595
|
lastResolved?: CosignRequest;
|
|
1556
|
-
/**
|
|
1557
|
-
|
|
1596
|
+
/** The requests resolved while the modal is open, oldest first: the steps of the flow already signed. */
|
|
1597
|
+
history?: CosignRequest[];
|
|
1598
|
+
/** The explorer page of a sent request's transaction. */
|
|
1599
|
+
explorerUrlOf?: (request: CosignRequest) => string | null;
|
|
1558
1600
|
/** Seconds until the modal closes on its own, while what it shows needs nothing from the user. */
|
|
1559
1601
|
closesIn?: number | null;
|
|
1560
1602
|
/** The approval coming next in the same flow, shown while the modal waits for it. */
|
|
@@ -1573,7 +1615,7 @@ interface CosignModalTemplateProps {
|
|
|
1573
1615
|
onKeepOpen?: () => void;
|
|
1574
1616
|
onCloseAnyway?: () => void;
|
|
1575
1617
|
}
|
|
1576
|
-
declare function CosignModalTemplate({ theme, accentColor, styleOverrides, pending, current, verification, busy, error, approveBlocked, deviceNotLinked, onLinkDevice, lastResolved,
|
|
1618
|
+
declare function CosignModalTemplate({ theme, accentColor, styleOverrides, pending, current, verification, busy, error, approveBlocked, deviceNotLinked, onLinkDevice, lastResolved, history, explorerUrlOf, closesIn, nextStep, language: languageProp, network, onSelect, onApprove, onReject, onClose, confirmingClose, onKeepOpen, onCloseAnyway, }: CosignModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1577
1619
|
|
|
1578
1620
|
interface CustodyMigrationModalProps {
|
|
1579
1621
|
state: CustodyMigrationState;
|