@pollar/react 0.12.1-rc.15 → 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/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, PendingConfirmation, TxBuildBody, BuildOutcome, SubmitOutcome, SignOutcome, SendPaymentParams, StellarNetwork, 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';
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,12 +1313,16 @@ 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 {
1299
1321
  /** The action in plain words: what a user without crypto background reads first. */
1300
1322
  title: string;
1301
- kind: 'send' | 'bridge' | 'approve' | 'swap' | 'payment' | 'create_account' | 'deposit' | 'withdraw' | 'sign_in' | 'other';
1323
+ kind: 'send' | 'bridge' | 'approve' | 'swap' | 'payment' | 'create_account' | 'activate_wallet' | 'add_asset' | 'deposit' | 'withdraw' | 'sign_in' | 'other';
1324
+ /** One line under the title that says what the action is for, when the title alone does not. */
1325
+ lead?: string;
1302
1326
  from?: TxParty;
1303
1327
  to?: TxParty;
1304
1328
  /**
@@ -1307,6 +1331,7 @@ interface TxReviewData {
1307
1331
  */
1308
1332
  fee?: {
1309
1333
  sponsored: boolean;
1334
+ free?: boolean;
1310
1335
  };
1311
1336
  rows: TxDetailRow[];
1312
1337
  raw?: string;
@@ -1343,8 +1368,24 @@ interface TxStatusViewProps {
1343
1368
  successMessage?: string | undefined;
1344
1369
  /** Shown under the review once the transaction succeeds, above Done. */
1345
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;
1346
1382
  }
1347
- declare function TxStatusView({ transaction, showXdr, explorerUrl, walletType, onSignAndSend, onToggleXdr, onRetry, onDone, language: languageProp, review: reviewProp, successMessage, successExtra, }: TxStatusViewProps): react_jsx_runtime.JSX.Element;
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;
1348
1389
 
1349
1390
  interface TxHistoryModalTemplateProps {
1350
1391
  theme: string;
@@ -1470,6 +1511,8 @@ interface BridgeModalTemplateProps {
1470
1511
  onNewBridge: () => void;
1471
1512
  onClose: () => void;
1472
1513
  language?: PollarLanguage | undefined;
1514
+ /** The signature waiting for the user's yes, answered in the transfer view. */
1515
+ confirmation?: PendingConfirmation | null | undefined;
1473
1516
  }
1474
1517
  declare function BridgeModalTemplate(props: BridgeModalTemplateProps): react_jsx_runtime.JSX.Element;
1475
1518
 
@@ -1550,8 +1593,10 @@ interface CosignModalTemplateProps {
1550
1593
  onLinkDevice?: () => void;
1551
1594
  /** The last request that reached a final state, shown once the list is empty. */
1552
1595
  lastResolved?: CosignRequest;
1553
- /** Explorer page of {@link lastResolved}'s transaction, when it was sent. */
1554
- explorerUrl?: string | null;
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;
1555
1600
  /** Seconds until the modal closes on its own, while what it shows needs nothing from the user. */
1556
1601
  closesIn?: number | null;
1557
1602
  /** The approval coming next in the same flow, shown while the modal waits for it. */
@@ -1563,9 +1608,14 @@ interface CosignModalTemplateProps {
1563
1608
  onSelect: (request: CosignRequest) => void;
1564
1609
  onApprove: (request: CosignRequest) => void;
1565
1610
  onReject: (request: CosignRequest) => void;
1611
+ /** The user asked to close (the X): the container closes or asks first. */
1566
1612
  onClose: () => void;
1613
+ /** Closing was asked while a request waits: the modal asks before leaving it unsigned. */
1614
+ confirmingClose?: boolean;
1615
+ onKeepOpen?: () => void;
1616
+ onCloseAnyway?: () => void;
1567
1617
  }
1568
- declare function CosignModalTemplate({ theme, accentColor, styleOverrides, pending, current, verification, busy, error, approveBlocked, deviceNotLinked, onLinkDevice, lastResolved, explorerUrl, closesIn, nextStep, language: languageProp, network, onSelect, onApprove, onReject, onClose, }: CosignModalTemplateProps): react_jsx_runtime.JSX.Element;
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;
1569
1619
 
1570
1620
  interface CustodyMigrationModalProps {
1571
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, PendingConfirmation, TxBuildBody, BuildOutcome, SubmitOutcome, SignOutcome, SendPaymentParams, StellarNetwork, 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';
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,12 +1313,16 @@ 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 {
1299
1321
  /** The action in plain words: what a user without crypto background reads first. */
1300
1322
  title: string;
1301
- kind: 'send' | 'bridge' | 'approve' | 'swap' | 'payment' | 'create_account' | 'deposit' | 'withdraw' | 'sign_in' | 'other';
1323
+ kind: 'send' | 'bridge' | 'approve' | 'swap' | 'payment' | 'create_account' | 'activate_wallet' | 'add_asset' | 'deposit' | 'withdraw' | 'sign_in' | 'other';
1324
+ /** One line under the title that says what the action is for, when the title alone does not. */
1325
+ lead?: string;
1302
1326
  from?: TxParty;
1303
1327
  to?: TxParty;
1304
1328
  /**
@@ -1307,6 +1331,7 @@ interface TxReviewData {
1307
1331
  */
1308
1332
  fee?: {
1309
1333
  sponsored: boolean;
1334
+ free?: boolean;
1310
1335
  };
1311
1336
  rows: TxDetailRow[];
1312
1337
  raw?: string;
@@ -1343,8 +1368,24 @@ interface TxStatusViewProps {
1343
1368
  successMessage?: string | undefined;
1344
1369
  /** Shown under the review once the transaction succeeds, above Done. */
1345
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;
1346
1382
  }
1347
- declare function TxStatusView({ transaction, showXdr, explorerUrl, walletType, onSignAndSend, onToggleXdr, onRetry, onDone, language: languageProp, review: reviewProp, successMessage, successExtra, }: TxStatusViewProps): react_jsx_runtime.JSX.Element;
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;
1348
1389
 
1349
1390
  interface TxHistoryModalTemplateProps {
1350
1391
  theme: string;
@@ -1470,6 +1511,8 @@ interface BridgeModalTemplateProps {
1470
1511
  onNewBridge: () => void;
1471
1512
  onClose: () => void;
1472
1513
  language?: PollarLanguage | undefined;
1514
+ /** The signature waiting for the user's yes, answered in the transfer view. */
1515
+ confirmation?: PendingConfirmation | null | undefined;
1473
1516
  }
1474
1517
  declare function BridgeModalTemplate(props: BridgeModalTemplateProps): react_jsx_runtime.JSX.Element;
1475
1518
 
@@ -1550,8 +1593,10 @@ interface CosignModalTemplateProps {
1550
1593
  onLinkDevice?: () => void;
1551
1594
  /** The last request that reached a final state, shown once the list is empty. */
1552
1595
  lastResolved?: CosignRequest;
1553
- /** Explorer page of {@link lastResolved}'s transaction, when it was sent. */
1554
- explorerUrl?: string | null;
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;
1555
1600
  /** Seconds until the modal closes on its own, while what it shows needs nothing from the user. */
1556
1601
  closesIn?: number | null;
1557
1602
  /** The approval coming next in the same flow, shown while the modal waits for it. */
@@ -1563,9 +1608,14 @@ interface CosignModalTemplateProps {
1563
1608
  onSelect: (request: CosignRequest) => void;
1564
1609
  onApprove: (request: CosignRequest) => void;
1565
1610
  onReject: (request: CosignRequest) => void;
1611
+ /** The user asked to close (the X): the container closes or asks first. */
1566
1612
  onClose: () => void;
1613
+ /** Closing was asked while a request waits: the modal asks before leaving it unsigned. */
1614
+ confirmingClose?: boolean;
1615
+ onKeepOpen?: () => void;
1616
+ onCloseAnyway?: () => void;
1567
1617
  }
1568
- declare function CosignModalTemplate({ theme, accentColor, styleOverrides, pending, current, verification, busy, error, approveBlocked, deviceNotLinked, onLinkDevice, lastResolved, explorerUrl, closesIn, nextStep, language: languageProp, network, onSelect, onApprove, onReject, onClose, }: CosignModalTemplateProps): react_jsx_runtime.JSX.Element;
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;
1569
1619
 
1570
1620
  interface CustodyMigrationModalProps {
1571
1621
  state: CustodyMigrationState;