@pollar/react 0.12.1-rc.16 → 0.12.1-rc.18

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
@@ -1203,6 +1217,15 @@ interface RampWidgetTemplateProps {
1203
1217
  onAssetChange: (key: string) => void;
1204
1218
  onAmountChange: (value: string) => void;
1205
1219
  onFindRoute: () => void;
1220
+ /** The amount screen is quoting what was typed. */
1221
+ quoting?: boolean;
1222
+ /** `BEST_ROUTE`, or the key of the route the user picked in the details. */
1223
+ routeChoice?: string;
1224
+ /** The route Continue takes: the picked one, else the best. */
1225
+ chosenQuote?: RampQuote | null;
1226
+ onRouteChoice?: (choice: string) => void;
1227
+ /** Takes the chosen route, or opens every route when none could be quoted. */
1228
+ onContinue?: () => void;
1206
1229
  onSelectQuote: (quote: RampQuote) => void;
1207
1230
  /** Opens the verification step a dropped route waits on. */
1208
1231
  onVerifyRoute?: (requirement: RampQuoteRequirement) => void;
@@ -1253,8 +1276,10 @@ interface RampWidgetTemplateProps {
1253
1276
  onRetry: () => void;
1254
1277
  onRefresh: () => void;
1255
1278
  onClose: () => void;
1279
+ /** A leg's signature waiting for the user's yes, answered in the status view. */
1280
+ confirmation?: PendingConfirmation | null | undefined;
1256
1281
  }
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;
1282
+ 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, quoting, routeChoice, chosenQuote, onRouteChoice, onContinue, 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
1283
 
1259
1284
  interface TransactionModalTemplateProps {
1260
1285
  theme: string;
@@ -1273,8 +1298,12 @@ interface TransactionModalTemplateProps {
1273
1298
  onRetry?: () => void;
1274
1299
  /** Language of the modal. Defaults to the user's device; the modal passes the resolved one. */
1275
1300
  language?: PollarLanguage | undefined;
1301
+ /** The signature waiting for the user's yes, answered in this view. */
1302
+ confirmation?: PendingConfirmation | null | undefined;
1303
+ /** The app's network, for the details of a confirmation. */
1304
+ network?: StellarNetwork | undefined;
1276
1305
  }
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;
1306
+ 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
1307
 
1279
1308
  /** One end of the flow: a wallet, an account or a contract, and what it sends or gets. */
1280
1309
  interface TxParty {
@@ -1293,6 +1322,8 @@ interface TxDetailRow {
1293
1322
  value: string;
1294
1323
  /** What the copy button copies; the row has none when absent. */
1295
1324
  copyValue?: string;
1325
+ /** Opens this page: the value is a link (an explorer on another chain). */
1326
+ href?: string;
1296
1327
  mono?: boolean;
1297
1328
  }
1298
1329
  interface TxReviewData {
@@ -1346,8 +1377,24 @@ interface TxStatusViewProps {
1346
1377
  successMessage?: string | undefined;
1347
1378
  /** Shown under the review once the transaction succeeds, above Done. */
1348
1379
  successExtra?: ReactNode;
1380
+ /** The signature waiting for the user's yes, answered here instead of in a prompt over the modal. */
1381
+ confirmation?: PendingConfirmation | null | undefined;
1382
+ /** The app's network, for the details of a confirmation. */
1383
+ network?: StellarNetwork | undefined;
1384
+ /** Rows the modal adds to the details (where a cross-chain swap delivers). */
1385
+ extraRows?: TxDetailRow[] | undefined;
1386
+ /** A second line for the outcome strip, and whether it reports a failure (a cross-chain leg). */
1387
+ outcomeNote?: {
1388
+ text: string;
1389
+ failed?: boolean;
1390
+ } | undefined;
1349
1391
  }
1350
- declare function TxStatusView({ transaction, showXdr, explorerUrl, walletType, onSignAndSend, onToggleXdr, onRetry, onDone, language: languageProp, review: reviewProp, successMessage, successExtra, }: TxStatusViewProps): react_jsx_runtime.JSX.Element;
1392
+ /**
1393
+ * A transaction from the user's yes to its outcome in one view: the review stays,
1394
+ * and a strip under it says where the transaction stands. The hash and every
1395
+ * address live in the details.
1396
+ */
1397
+ 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
1398
 
1352
1399
  interface TxHistoryModalTemplateProps {
1353
1400
  theme: string;
@@ -1397,6 +1444,14 @@ interface WalletBalanceModalTemplateProps {
1397
1444
  }
1398
1445
  declare function WalletBalanceModalTemplate({ theme, accentColor, styleOverrides, walletBalance, walletAddress, assetMetadata, chains, selectedChain, network, onSelectChain, onRefresh, onClose, language: languageProp, }: WalletBalanceModalTemplateProps): react_jsx_runtime.JSX.Element;
1399
1446
 
1447
+ /** Adding or removing an asset from this modal, and where that trustline change stands. */
1448
+ interface AssetOutcome {
1449
+ code: string;
1450
+ removing: boolean;
1451
+ state: 'busy' | 'done' | 'failed';
1452
+ /** Why it failed, ready to show. */
1453
+ note?: string;
1454
+ }
1400
1455
  interface EnabledAssetsModalTemplateProps {
1401
1456
  theme: string;
1402
1457
  accentColor: string;
@@ -1411,7 +1466,8 @@ interface EnabledAssetsModalTemplateProps {
1411
1466
  onSelectChain: (chain: WalletChain) => void;
1412
1467
  /** Key (`code+issuer`) of the asset whose trustline action is in flight. */
1413
1468
  busyKey: string | null;
1414
- actionError: string | null;
1469
+ outcome: AssetOutcome | null;
1470
+ confirmation?: PendingConfirmation | null | undefined;
1415
1471
  onRefresh: () => void;
1416
1472
  onClose: () => void;
1417
1473
  onToggleTrustline: (record: EnabledAssetRecord) => void;
@@ -1419,14 +1475,15 @@ interface EnabledAssetsModalTemplateProps {
1419
1475
  /** Language of the modal. Defaults to the user's device; the modal passes the resolved one. */
1420
1476
  language?: PollarLanguage | undefined;
1421
1477
  }
1422
- declare function EnabledAssetsModalTemplate({ theme, accentColor, styleOverrides, enabledAssets, walletAddress, chains, selectedChain, onSelectChain, busyKey, actionError, onRefresh, onClose, onToggleTrustline, onAddCustom, language: languageProp, }: EnabledAssetsModalTemplateProps): react_jsx_runtime.JSX.Element;
1478
+ declare function EnabledAssetsModalTemplate({ theme, accentColor, styleOverrides, enabledAssets, walletAddress, chains, selectedChain, onSelectChain, busyKey, outcome, confirmation, onRefresh, onClose, onToggleTrustline, onAddCustom, language: languageProp, }: EnabledAssetsModalTemplateProps): react_jsx_runtime.JSX.Element;
1423
1479
  interface CustomTrustlineModalTemplateProps {
1424
1480
  theme: string;
1425
1481
  accentColor: string;
1426
1482
  /** Per-app modal chrome overrides (background, card + button radius). */
1427
1483
  styleOverrides?: ModalStyleOverrides;
1428
1484
  busy: boolean;
1429
- actionError: string | null;
1485
+ outcome: AssetOutcome | null;
1486
+ confirmation?: PendingConfirmation | null | undefined;
1430
1487
  onBack: () => void;
1431
1488
  onClose: () => void;
1432
1489
  onSubmit: (input: {
@@ -1473,6 +1530,8 @@ interface BridgeModalTemplateProps {
1473
1530
  onNewBridge: () => void;
1474
1531
  onClose: () => void;
1475
1532
  language?: PollarLanguage | undefined;
1533
+ /** The signature waiting for the user's yes, answered in the transfer view. */
1534
+ confirmation?: PendingConfirmation | null | undefined;
1476
1535
  }
1477
1536
  declare function BridgeModalTemplate(props: BridgeModalTemplateProps): react_jsx_runtime.JSX.Element;
1478
1537
 
@@ -1553,8 +1612,10 @@ interface CosignModalTemplateProps {
1553
1612
  onLinkDevice?: () => void;
1554
1613
  /** The last request that reached a final state, shown once the list is empty. */
1555
1614
  lastResolved?: CosignRequest;
1556
- /** Explorer page of {@link lastResolved}'s transaction, when it was sent. */
1557
- explorerUrl?: string | null;
1615
+ /** The requests resolved while the modal is open, oldest first: the steps of the flow already signed. */
1616
+ history?: CosignRequest[];
1617
+ /** The explorer page of a sent request's transaction. */
1618
+ explorerUrlOf?: (request: CosignRequest) => string | null;
1558
1619
  /** Seconds until the modal closes on its own, while what it shows needs nothing from the user. */
1559
1620
  closesIn?: number | null;
1560
1621
  /** The approval coming next in the same flow, shown while the modal waits for it. */
@@ -1573,7 +1634,7 @@ interface CosignModalTemplateProps {
1573
1634
  onKeepOpen?: () => void;
1574
1635
  onCloseAnyway?: () => void;
1575
1636
  }
1576
- 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, confirmingClose, onKeepOpen, onCloseAnyway, }: CosignModalTemplateProps): react_jsx_runtime.JSX.Element;
1637
+ 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
1638
 
1578
1639
  interface CustodyMigrationModalProps {
1579
1640
  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
@@ -1203,6 +1217,15 @@ interface RampWidgetTemplateProps {
1203
1217
  onAssetChange: (key: string) => void;
1204
1218
  onAmountChange: (value: string) => void;
1205
1219
  onFindRoute: () => void;
1220
+ /** The amount screen is quoting what was typed. */
1221
+ quoting?: boolean;
1222
+ /** `BEST_ROUTE`, or the key of the route the user picked in the details. */
1223
+ routeChoice?: string;
1224
+ /** The route Continue takes: the picked one, else the best. */
1225
+ chosenQuote?: RampQuote | null;
1226
+ onRouteChoice?: (choice: string) => void;
1227
+ /** Takes the chosen route, or opens every route when none could be quoted. */
1228
+ onContinue?: () => void;
1206
1229
  onSelectQuote: (quote: RampQuote) => void;
1207
1230
  /** Opens the verification step a dropped route waits on. */
1208
1231
  onVerifyRoute?: (requirement: RampQuoteRequirement) => void;
@@ -1253,8 +1276,10 @@ interface RampWidgetTemplateProps {
1253
1276
  onRetry: () => void;
1254
1277
  onRefresh: () => void;
1255
1278
  onClose: () => void;
1279
+ /** A leg's signature waiting for the user's yes, answered in the status view. */
1280
+ confirmation?: PendingConfirmation | null | undefined;
1256
1281
  }
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;
1282
+ 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, quoting, routeChoice, chosenQuote, onRouteChoice, onContinue, 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
1283
 
1259
1284
  interface TransactionModalTemplateProps {
1260
1285
  theme: string;
@@ -1273,8 +1298,12 @@ interface TransactionModalTemplateProps {
1273
1298
  onRetry?: () => void;
1274
1299
  /** Language of the modal. Defaults to the user's device; the modal passes the resolved one. */
1275
1300
  language?: PollarLanguage | undefined;
1301
+ /** The signature waiting for the user's yes, answered in this view. */
1302
+ confirmation?: PendingConfirmation | null | undefined;
1303
+ /** The app's network, for the details of a confirmation. */
1304
+ network?: StellarNetwork | undefined;
1276
1305
  }
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;
1306
+ 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
1307
 
1279
1308
  /** One end of the flow: a wallet, an account or a contract, and what it sends or gets. */
1280
1309
  interface TxParty {
@@ -1293,6 +1322,8 @@ interface TxDetailRow {
1293
1322
  value: string;
1294
1323
  /** What the copy button copies; the row has none when absent. */
1295
1324
  copyValue?: string;
1325
+ /** Opens this page: the value is a link (an explorer on another chain). */
1326
+ href?: string;
1296
1327
  mono?: boolean;
1297
1328
  }
1298
1329
  interface TxReviewData {
@@ -1346,8 +1377,24 @@ interface TxStatusViewProps {
1346
1377
  successMessage?: string | undefined;
1347
1378
  /** Shown under the review once the transaction succeeds, above Done. */
1348
1379
  successExtra?: ReactNode;
1380
+ /** The signature waiting for the user's yes, answered here instead of in a prompt over the modal. */
1381
+ confirmation?: PendingConfirmation | null | undefined;
1382
+ /** The app's network, for the details of a confirmation. */
1383
+ network?: StellarNetwork | undefined;
1384
+ /** Rows the modal adds to the details (where a cross-chain swap delivers). */
1385
+ extraRows?: TxDetailRow[] | undefined;
1386
+ /** A second line for the outcome strip, and whether it reports a failure (a cross-chain leg). */
1387
+ outcomeNote?: {
1388
+ text: string;
1389
+ failed?: boolean;
1390
+ } | undefined;
1349
1391
  }
1350
- declare function TxStatusView({ transaction, showXdr, explorerUrl, walletType, onSignAndSend, onToggleXdr, onRetry, onDone, language: languageProp, review: reviewProp, successMessage, successExtra, }: TxStatusViewProps): react_jsx_runtime.JSX.Element;
1392
+ /**
1393
+ * A transaction from the user's yes to its outcome in one view: the review stays,
1394
+ * and a strip under it says where the transaction stands. The hash and every
1395
+ * address live in the details.
1396
+ */
1397
+ 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
1398
 
1352
1399
  interface TxHistoryModalTemplateProps {
1353
1400
  theme: string;
@@ -1397,6 +1444,14 @@ interface WalletBalanceModalTemplateProps {
1397
1444
  }
1398
1445
  declare function WalletBalanceModalTemplate({ theme, accentColor, styleOverrides, walletBalance, walletAddress, assetMetadata, chains, selectedChain, network, onSelectChain, onRefresh, onClose, language: languageProp, }: WalletBalanceModalTemplateProps): react_jsx_runtime.JSX.Element;
1399
1446
 
1447
+ /** Adding or removing an asset from this modal, and where that trustline change stands. */
1448
+ interface AssetOutcome {
1449
+ code: string;
1450
+ removing: boolean;
1451
+ state: 'busy' | 'done' | 'failed';
1452
+ /** Why it failed, ready to show. */
1453
+ note?: string;
1454
+ }
1400
1455
  interface EnabledAssetsModalTemplateProps {
1401
1456
  theme: string;
1402
1457
  accentColor: string;
@@ -1411,7 +1466,8 @@ interface EnabledAssetsModalTemplateProps {
1411
1466
  onSelectChain: (chain: WalletChain) => void;
1412
1467
  /** Key (`code+issuer`) of the asset whose trustline action is in flight. */
1413
1468
  busyKey: string | null;
1414
- actionError: string | null;
1469
+ outcome: AssetOutcome | null;
1470
+ confirmation?: PendingConfirmation | null | undefined;
1415
1471
  onRefresh: () => void;
1416
1472
  onClose: () => void;
1417
1473
  onToggleTrustline: (record: EnabledAssetRecord) => void;
@@ -1419,14 +1475,15 @@ interface EnabledAssetsModalTemplateProps {
1419
1475
  /** Language of the modal. Defaults to the user's device; the modal passes the resolved one. */
1420
1476
  language?: PollarLanguage | undefined;
1421
1477
  }
1422
- declare function EnabledAssetsModalTemplate({ theme, accentColor, styleOverrides, enabledAssets, walletAddress, chains, selectedChain, onSelectChain, busyKey, actionError, onRefresh, onClose, onToggleTrustline, onAddCustom, language: languageProp, }: EnabledAssetsModalTemplateProps): react_jsx_runtime.JSX.Element;
1478
+ declare function EnabledAssetsModalTemplate({ theme, accentColor, styleOverrides, enabledAssets, walletAddress, chains, selectedChain, onSelectChain, busyKey, outcome, confirmation, onRefresh, onClose, onToggleTrustline, onAddCustom, language: languageProp, }: EnabledAssetsModalTemplateProps): react_jsx_runtime.JSX.Element;
1423
1479
  interface CustomTrustlineModalTemplateProps {
1424
1480
  theme: string;
1425
1481
  accentColor: string;
1426
1482
  /** Per-app modal chrome overrides (background, card + button radius). */
1427
1483
  styleOverrides?: ModalStyleOverrides;
1428
1484
  busy: boolean;
1429
- actionError: string | null;
1485
+ outcome: AssetOutcome | null;
1486
+ confirmation?: PendingConfirmation | null | undefined;
1430
1487
  onBack: () => void;
1431
1488
  onClose: () => void;
1432
1489
  onSubmit: (input: {
@@ -1473,6 +1530,8 @@ interface BridgeModalTemplateProps {
1473
1530
  onNewBridge: () => void;
1474
1531
  onClose: () => void;
1475
1532
  language?: PollarLanguage | undefined;
1533
+ /** The signature waiting for the user's yes, answered in the transfer view. */
1534
+ confirmation?: PendingConfirmation | null | undefined;
1476
1535
  }
1477
1536
  declare function BridgeModalTemplate(props: BridgeModalTemplateProps): react_jsx_runtime.JSX.Element;
1478
1537
 
@@ -1553,8 +1612,10 @@ interface CosignModalTemplateProps {
1553
1612
  onLinkDevice?: () => void;
1554
1613
  /** The last request that reached a final state, shown once the list is empty. */
1555
1614
  lastResolved?: CosignRequest;
1556
- /** Explorer page of {@link lastResolved}'s transaction, when it was sent. */
1557
- explorerUrl?: string | null;
1615
+ /** The requests resolved while the modal is open, oldest first: the steps of the flow already signed. */
1616
+ history?: CosignRequest[];
1617
+ /** The explorer page of a sent request's transaction. */
1618
+ explorerUrlOf?: (request: CosignRequest) => string | null;
1558
1619
  /** Seconds until the modal closes on its own, while what it shows needs nothing from the user. */
1559
1620
  closesIn?: number | null;
1560
1621
  /** The approval coming next in the same flow, shown while the modal waits for it. */
@@ -1573,7 +1634,7 @@ interface CosignModalTemplateProps {
1573
1634
  onKeepOpen?: () => void;
1574
1635
  onCloseAnyway?: () => void;
1575
1636
  }
1576
- 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, confirmingClose, onKeepOpen, onCloseAnyway, }: CosignModalTemplateProps): react_jsx_runtime.JSX.Element;
1637
+ 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
1638
 
1578
1639
  interface CustodyMigrationModalProps {
1579
1640
  state: CustodyMigrationState;