@pollar/react 0.11.3 → 0.11.4-rc.1

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 { pollarPaths, PollarClient, PollarClientConfig, PollarAdapters, OnStorageDegrade, WalletInfo, PollarLoginOptions, SessionsState, TransactionState, TxBuildBody, BuildOutcome, SubmitOutcome, SignOutcome, SendPaymentParams, StellarNetwork, WalletBalanceState, EnabledAssetsState, TrustlineOutcome, TxHistoryState, SwapVenue, SwapToken, SwapQuoteParams, SwapQuote, EarnProviderId, EarnOpportunity, EarnPositionParams, EarnPosition, EarnTxParams, PollarAdapter, PasskeyCeremony, PasskeySigner, WalletChain, KycStatus as KycStatus$1, RampQuote, WalletId, AuthState, KycProvider, KycStartResponse, RampDirection, RampCountry, RampTxStatus, RampDepositInstructions, EnabledAssetRecord, WalletBalanceRecord, SwapProvider, DistributionRulesState, DistributionRule } from '@pollar/core';
2
+ import { pollarPaths, PollarClient, PollarClientConfig, PollarAdapters, OnStorageDegrade, WalletInfo, PollarLoginOptions, SessionsState, TransactionState, TxBuildBody, BuildOutcome, SubmitOutcome, SignOutcome, SendPaymentParams, StellarNetwork, WalletBalanceState, EnabledAssetsState, TrustlineOutcome, TxHistoryState, SwapVenue, SwapToken, SwapQuoteParams, SwapQuote, EarnProviderId, EarnOpportunity, EarnPositionParams, EarnPosition, EarnTxParams, PollarAdapter, PasskeyCeremony, PasskeySigner, WalletChain, KycStatus as KycStatus$1, RampQuote, WalletId, AuthState, KycProvider, KycStartResponse, RampDirection, RampCountry, RampQuoteRequirement, RampTxStatus, RampDepositInstructions, EnabledAssetRecord, WalletBalanceRecord, SwapProvider, DistributionRulesState, DistributionRule } from '@pollar/core';
3
3
  export { AuthProviderContext, PollarAuthProvider, SessionsState } from '@pollar/core';
4
4
  import { ReactNode, CSSProperties } from 'react';
5
5
 
@@ -63,7 +63,7 @@ interface PollarContextValue {
63
63
  tx: TransactionState;
64
64
  buildTx: (operation: TxBuildBody['operation'], params: TxBuildBody['params'], options?: TxBuildBody['options']) => Promise<BuildOutcome>;
65
65
  signAndSubmitTx: (unsignedXdr?: string) => Promise<SubmitOutcome>;
66
- /** External-wallet only. Custodial flows should use `signAndSubmitTx`. */
66
+ /** Sign only. Embedded sessions sign server-side, external sessions through their adapter. Smart wallets use `signAndSubmitTx`. */
67
67
  signTx: (unsignedXdr: string) => Promise<SignOutcome>;
68
68
  submitTx: (signedXdr: string) => Promise<SubmitOutcome>;
69
69
  /** One-shot: build -> sign -> submit. Drives the same TransactionState flow as the split calls. */
@@ -73,7 +73,7 @@ interface PollarContextValue {
73
73
  /**
74
74
  * Send a payment on any chain the user holds a wallet on. Stellar keeps the
75
75
  * split flow (so external adapters and passkeys still work); a chain whose
76
- * signature expires goes through one server-side call and is custodial-only.
76
+ * signature expires goes through one server-side call and is embedded-only.
77
77
  */
78
78
  sendPayment: (params: SendPaymentParams) => Promise<SubmitOutcome>;
79
79
  network: StellarNetwork;
@@ -104,6 +104,8 @@ interface PollarContextValue {
104
104
  /** Open the enabled-assets / trustline-state modal. */
105
105
  openEnabledAssetsModal: () => void;
106
106
  openKycModal: (options?: {
107
+ corridorId?: string;
108
+ providerId?: string;
107
109
  country?: string;
108
110
  level?: 'basic' | 'intermediate' | 'enhanced';
109
111
  onApproved?: () => void;
@@ -256,6 +258,25 @@ declare const browserPasskeyCeremony: PasskeyCeremony;
256
258
  */
257
259
  declare const browserPasskeySigner: PasskeySigner;
258
260
 
261
+ /**
262
+ * The one place the widget decides whether a wallet can act on-chain, and what
263
+ * to say when it cannot.
264
+ *
265
+ * Only STELLAR is gated: `provisioning` describes the Stellar account, and a
266
+ * Solana wallet has nothing to wait for. Only the ACCOUNT is described, never
267
+ * trustlines - an asset the app enabled yesterday is not a reason to stop a
268
+ * user from sending the one they already hold.
269
+ *
270
+ * A `null` chain is "not known yet" (the app's chain order comes from
271
+ * `/config`, which is still in flight on a cold start) and reads as no reason
272
+ * to block. Guessing STELLAR there would tell a Solana-first user their wallet
273
+ * is being prepared, next to a Solana address that sends and receives fine.
274
+ *
275
+ * Returns null when the wallet is usable, so a caller reads it as "no reason to
276
+ * block".
277
+ */
278
+ declare function walletNotReadyReason(wallet: WalletInfo | null | undefined, chain: WalletChain | null | undefined): string | null;
279
+
259
280
  declare function WalletButton(): react_jsx_runtime.JSX.Element;
260
281
 
261
282
  interface WalletButtonTemplateProps {
@@ -270,6 +291,13 @@ interface WalletButtonTemplateProps {
270
291
  isInProgress: boolean;
271
292
  /** Show the "Create account" action (external wallet not yet on-chain, IMMEDIATE funding). */
272
293
  showCreateAccount: boolean;
294
+ /**
295
+ * Why the wallet cannot act on-chain yet (its account is being created, or
296
+ * that failed), or null when it can. Shown as a banner in the dropdown, since
297
+ * the address itself is valid and worth copying either way. Optional, so a
298
+ * custom template written before this existed keeps compiling.
299
+ */
300
+ notReadyReason?: string | null;
273
301
  creatingAccount: boolean;
274
302
  onToggleOpen: () => void;
275
303
  onCreateAccount: () => void;
@@ -285,7 +313,7 @@ interface WalletButtonTemplateProps {
285
313
  onLogout: () => void;
286
314
  onLogin: () => void;
287
315
  }
288
- declare function WalletButtonTemplate({ walletAddress, accentColor, open, copied, dropdownBg, dropdownBorder, itemColor, wrapperRef, isInProgress, showCreateAccount, creatingAccount, onToggleOpen, onCreateAccount, onCopy, onWalletBalance, onTxHistory, onSend, onReceive, onSessions, onKyc, onRamp, onDistributionRules, onLogout, onLogin, }: WalletButtonTemplateProps): react_jsx_runtime.JSX.Element;
316
+ declare function WalletButtonTemplate({ walletAddress, accentColor, open, copied, dropdownBg, dropdownBorder, itemColor, wrapperRef, isInProgress, showCreateAccount, notReadyReason, creatingAccount, onToggleOpen, onCreateAccount, onCopy, onWalletBalance, onTxHistory, onSend, onReceive, onSessions, onKyc, onRamp, onDistributionRules, onLogout, onLogin, }: WalletButtonTemplateProps): react_jsx_runtime.JSX.Element;
289
317
 
290
318
  /**
291
319
  * The chain a record lives on, with the legacy shape folded in: sessions and
@@ -296,7 +324,7 @@ declare function resolveChain(chain: WalletChain | undefined): WalletChain;
296
324
  /**
297
325
  * The selectable chains - the first is the default everywhere (network picker,
298
326
  * the address the wallet button shows). De-duplicated because two wallets on one
299
- * chain (e.g. a custodial and a linked external Stellar wallet) are still one
327
+ * chain (e.g. an embedded and a linked external Stellar wallet) are still one
300
328
  * network choice.
301
329
  *
302
330
  * `order` is the app's chain list from `/applications/config`, as arranged in the
@@ -346,21 +374,74 @@ interface UseChainsResult {
346
374
  declare function useChains(): UseChainsResult;
347
375
 
348
376
  interface KycModalProps {
377
+ corridorId?: string;
378
+ /** Open this option directly instead of listing the choices (the one a ramp's KYC gate names). */
379
+ providerId?: string;
349
380
  onClose: () => void;
350
381
  /** ISO 3166-1 alpha-2 country code to filter providers. Defaults to 'MX'. */
351
382
  country?: string;
352
- /** KYC level required. Defaults to 'basic'. */
383
+ /** Legacy fallback for older backends. Named options select their own workflow. */
353
384
  level?: 'basic' | 'intermediate' | 'enhanced';
354
385
  /** Called when KYC is successfully approved. */
355
386
  onApproved?: () => void;
356
387
  }
357
- declare function KycModal({ onClose, country, level, onApproved }: KycModalProps): react_jsx_runtime.JSX.Element;
388
+ declare function KycModal({ onClose, country, level, onApproved, corridorId, providerId }: KycModalProps): react_jsx_runtime.JSX.Element;
389
+
390
+ interface RequirementFormModalProps {
391
+ formId: string;
392
+ /** Position of this step over the route's steps, when known. */
393
+ progress?: {
394
+ position: number;
395
+ total: number;
396
+ };
397
+ onClose: () => void;
398
+ /** Called once the answers are stored. */
399
+ onSubmitted: () => void;
400
+ }
401
+ /** One FORM requirement step: the form a route asks for, prefilled with the user's previous answers. */
402
+ declare function RequirementFormModal({ formId, progress, onClose, onSubmitted }: RequirementFormModalProps): react_jsx_runtime.JSX.Element;
403
+
404
+ interface RegistryCheckModalProps {
405
+ optionId: string;
406
+ /** Position of this step over the route's steps, when known. */
407
+ progress?: {
408
+ position: number;
409
+ total: number;
410
+ };
411
+ onClose: () => void;
412
+ /** Called once the registry confirmed the data. */
413
+ onApproved: () => void;
414
+ }
415
+ /**
416
+ * One REGISTRY_CHECK step (SEGIP): the user's verified data, prefilled and read-only
417
+ * except for the surname split and the CI complement, sent to the registry on confirm.
418
+ */
419
+ declare function RegistryCheckModal({ optionId, progress, onClose, onApproved }: RegistryCheckModalProps): react_jsx_runtime.JSX.Element;
420
+
421
+ interface ProviderRegistrationModalProps {
422
+ corridorId: string;
423
+ /** Position of this step over the route's steps, when known. */
424
+ progress?: {
425
+ position: number;
426
+ total: number;
427
+ };
428
+ onClose: () => void;
429
+ /** Called once the user is registered with the provider. */
430
+ onRegistered: () => void;
431
+ }
432
+ /**
433
+ * One PROVIDER_REGISTRATION step: what the ramp provider receives, listed before the
434
+ * user consents. Registering is the consent; nothing is sent until then.
435
+ */
436
+ declare function ProviderRegistrationModal({ corridorId, progress, onClose, onRegistered }: ProviderRegistrationModalProps): react_jsx_runtime.JSX.Element;
358
437
 
359
438
  interface KycStatusProps {
360
439
  status: KycStatus$1;
440
+ /** Replaces the status label, keeping its color. */
441
+ label?: string;
361
442
  className?: string;
362
443
  }
363
- declare function KycStatus({ status, className }: KycStatusProps): react_jsx_runtime.JSX.Element;
444
+ declare function KycStatus({ status, label, className }: KycStatusProps): react_jsx_runtime.JSX.Element;
364
445
 
365
446
  interface RampWidgetProps {
366
447
  onClose: () => void;
@@ -521,13 +602,20 @@ interface KycModalTemplateProps {
521
602
  selectedProvider: KycProvider | null;
522
603
  session: KycStartResponse | null;
523
604
  kycStatus: KycStatus$1;
605
+ /** Set when the decision is held for manual review (e.g. DUPLICATE_DOCUMENT). */
606
+ reviewReason?: string | null;
607
+ /** The vendor approved and Pollar is still recording it (`kycStatus` stays `pending`). */
608
+ processing?: boolean;
524
609
  isLoading: boolean;
610
+ error?: string | null;
525
611
  onSelectProvider: (provider: KycProvider) => void;
526
612
  onDoneVerifying: () => void;
613
+ /** Open a new session after the previous one expired. */
614
+ onStartAgain?: () => void;
527
615
  onRefresh: () => void;
528
616
  onClose: () => void;
529
617
  }
530
- declare function KycModalTemplate({ theme, accentColor, styleOverrides, step, providers, selectedProvider, session, kycStatus, isLoading, onSelectProvider, onDoneVerifying, onRefresh, onClose, }: KycModalTemplateProps): react_jsx_runtime.JSX.Element;
618
+ declare function KycModalTemplate({ theme, accentColor, styleOverrides, step, providers, selectedProvider, session, kycStatus, reviewReason, processing, isLoading, error, onSelectProvider, onDoneVerifying, onStartAgain, onRefresh, onClose, }: KycModalTemplateProps): react_jsx_runtime.JSX.Element;
531
619
 
532
620
  type RampStep = 'input' | 'loading_quote' | 'select_route' | 'contact' | 'status' | 'error';
533
621
  /** A field a provider declares (via the quote) that the client must collect. */
@@ -579,6 +667,8 @@ interface RampWidgetTemplateProps {
579
667
  countriesLoading: boolean;
580
668
  refreshing: boolean;
581
669
  quotes: RampQuote[];
670
+ /** Routes not quoted until the user completes the requirement step their corridor names (KYC, form, registry check or provider registration). */
671
+ kycRequired: RampQuoteRequirement[];
582
672
  isLoading: boolean;
583
673
  provider: string;
584
674
  txStatus: RampTxStatus | null;
@@ -586,6 +676,13 @@ interface RampWidgetTemplateProps {
586
676
  tosUrl: string | null;
587
677
  /** Provider gated the flow on KYC and published no link; nothing was signed. */
588
678
  kycBlocking: boolean;
679
+ /**
680
+ * Which part of provider onboarding is outstanding, when any is. Optional
681
+ * because this template is exported for integrators who render their own
682
+ * chrome: a required prop would break every one of them on upgrade. Omitted,
683
+ * the gate falls back to the identity-verification wording.
684
+ */
685
+ onboardingStatus?: 'kyc' | 'endorsement' | 'awaiting_provider' | null;
589
686
  /** The gate has since cleared - the user needs a fresh quote to continue. */
590
687
  kycJustApproved: boolean;
591
688
  stellarTxHash: string | null;
@@ -595,12 +692,15 @@ interface RampWidgetTemplateProps {
595
692
  canComplete: boolean;
596
693
  completing: boolean;
597
694
  errorMsg: string | null;
695
+ /** Neutral guidance on the route list, e.g. after identity verification sent the user back to it. */
696
+ noticeMsg?: string | null;
598
697
  onDirectionChange: (d: RampDirection) => void;
599
698
  onAmountChange: (v: string) => void;
600
699
  onFieldChange: (key: string, value: string) => void;
601
700
  onCountryChange: (v: string) => void;
602
701
  onFindRoute: () => void;
603
702
  onSelectQuote: (q: RampQuote) => void;
703
+ onVerifyRoute: (requirement: RampQuoteRequirement) => void;
604
704
  onContactContinue: () => void;
605
705
  onOpenKyc: () => void;
606
706
  onOpenTos: () => void;
@@ -612,7 +712,7 @@ interface RampWidgetTemplateProps {
612
712
  onRefresh: () => void;
613
713
  onClose: () => void;
614
714
  }
615
- declare function RampWidgetTemplate({ theme, accentColor, styleOverrides, step, flowSteps, flowStepIndex, startingQuoteId, direction, amount, currency, country, requiredFields, fieldValues, countries, countriesLoading, refreshing, quotes, isLoading, provider, txStatus, kycUrl, tosUrl, kycBlocking, kycJustApproved, stellarTxHash, explorerUrl, depositInstructions, canComplete, completing, errorMsg, onDirectionChange, onAmountChange, onFieldChange, onCountryChange, onFindRoute, onSelectQuote, onContactContinue, onOpenKyc, onOpenTos, onCompleteWithdraw, onBack, onRetry, onRefresh, onClose, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
715
+ declare function RampWidgetTemplate({ theme, accentColor, styleOverrides, step, flowSteps, flowStepIndex, startingQuoteId, direction, amount, currency, country, requiredFields, fieldValues, countries, countriesLoading, refreshing, quotes, kycRequired, isLoading, provider, txStatus, kycUrl, tosUrl, kycBlocking, onboardingStatus, kycJustApproved, stellarTxHash, explorerUrl, depositInstructions, canComplete, completing, errorMsg, noticeMsg, onDirectionChange, onAmountChange, onFieldChange, onCountryChange, onFindRoute, onSelectQuote, onVerifyRoute, onContactContinue, onOpenKyc, onOpenTos, onCompleteWithdraw, onBack, onRetry, onRefresh, onClose, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
616
716
 
617
717
  interface TransactionModalTemplateProps {
618
718
  theme: string;
@@ -674,16 +774,21 @@ interface WalletBalanceModalTemplateProps {
674
774
  walletBalance: WalletBalanceState;
675
775
  /** Address of the wallet on {@link selectedChain}. */
676
776
  walletAddress: string;
677
- /** Networks the user holds a wallet on; the first one is the default. */
678
- chains: WalletChain[];
777
+ /** Asset catalog metadata, when already available in the provider. */
778
+ assetMetadata?: EnabledAssetRecord[];
779
+ /**
780
+ * The networks the user holds a wallet on, in the app's configured order.
781
+ * The picker renders only with two or more, so a single-chain app shows none.
782
+ */
783
+ chains?: WalletChain[];
679
784
  selectedChain: WalletChain | null;
680
785
  /** testnet vs mainnet - gates the Solana devnet faucet hint. */
681
786
  network: StellarNetwork;
682
- onSelectChain: (chain: WalletChain) => void;
787
+ onSelectChain?: (chain: WalletChain) => void;
683
788
  onRefresh: () => void;
684
789
  onClose: () => void;
685
790
  }
686
- declare function WalletBalanceModalTemplate({ theme, accentColor, styleOverrides, walletBalance, walletAddress, chains, selectedChain, network, onSelectChain, onRefresh, onClose, }: WalletBalanceModalTemplateProps): react_jsx_runtime.JSX.Element;
791
+ declare function WalletBalanceModalTemplate({ theme, accentColor, styleOverrides, walletBalance, walletAddress, assetMetadata, chains, selectedChain, network, onSelectChain, onRefresh, onClose, }: WalletBalanceModalTemplateProps): react_jsx_runtime.JSX.Element;
687
792
 
688
793
  interface EnabledAssetsModalTemplateProps {
689
794
  theme: string;
@@ -731,14 +836,28 @@ interface SendModalTemplateProps {
731
836
  txTitle: string;
732
837
  assets: WalletBalanceRecord[];
733
838
  selectedAsset: WalletBalanceRecord | null;
734
- /** Networks the user holds a wallet on; the first one is the default. */
735
- chains: WalletChain[];
736
839
  selectedChain: WalletChain | null;
737
- /** Address of the wallet on {@link selectedChain}, shown under the picker. */
738
- walletAddress: string;
840
+ /**
841
+ * The networks the user can send from, in the app's configured order. The
842
+ * picker renders only with two or more, so a single-chain app shows none.
843
+ */
844
+ chains?: WalletChain[];
845
+ /** @deprecated Kept for compatibility; the sender address is no longer shown. */
846
+ walletAddress?: string;
739
847
  /** Can a payment be built on {@link selectedChain}? Stellar and Solana only. */
740
848
  canSendOnChain: boolean;
741
- onSelectChain: (chain: WalletChain) => void;
849
+ /**
850
+ * Why the wallet cannot act on-chain right now (its Stellar account is still
851
+ * being created, or its creation failed), or null when it can.
852
+ *
853
+ * Separate from {@link canSendOnChain}: that one is about the NETWORK not
854
+ * having a transfer path, this one about the user's own account. Collapsing
855
+ * them would tell someone waiting on a brand-new wallet that Stellar does not
856
+ * support sending. Optional, so a custom template written before this existed
857
+ * keeps compiling.
858
+ */
859
+ notReadyReason?: string | null;
860
+ onSelectChain?: (chain: WalletChain) => void;
742
861
  amount: string;
743
862
  destination: string;
744
863
  formError: string;
@@ -755,6 +874,8 @@ interface SendModalTemplateProps {
755
874
  onRefresh: () => void;
756
875
  onSelectAsset: (asset: WalletBalanceRecord) => void;
757
876
  onAmountChange: (value: string) => void;
877
+ onMax: () => void;
878
+ onPaste: () => void;
758
879
  onDestinationChange: (value: string) => void;
759
880
  onSubmit: () => void;
760
881
  onSignAndSend: () => void;
@@ -763,9 +884,8 @@ interface SendModalTemplateProps {
763
884
  onRetry: () => void;
764
885
  onDone: () => void;
765
886
  }
766
- declare function SendModalTemplate({ theme, accentColor, styleOverrides, step, txTitle, assets, selectedAsset, chains, selectedChain, walletAddress, canSendOnChain, onSelectChain, amount, destination, formError, isLoadingBalance, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, onClose, onBack, onRefresh, onSelectAsset, onAmountChange, onDestinationChange, onSubmit, onSignAndSend, onToggleXdr, onCopyHash, onRetry, onDone, }: SendModalTemplateProps): react_jsx_runtime.JSX.Element;
887
+ declare function SendModalTemplate({ theme, accentColor, styleOverrides, step, txTitle, assets, selectedAsset, selectedChain, canSendOnChain, notReadyReason, chains, onSelectChain, amount, destination, formError, isLoadingBalance, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, onClose, onBack, onRefresh, onSelectAsset, onAmountChange, onMax, onPaste, onDestinationChange, onSubmit, onSignAndSend, onToggleXdr, onCopyHash, onRetry, onDone, }: SendModalTemplateProps): react_jsx_runtime.JSX.Element;
767
888
 
768
- /** A selectable asset in the sell/buy pickers, normalized across balance/enabled records. */
769
889
  interface SwapAssetOption {
770
890
  ref: SwapQuoteParams['sellAsset'];
771
891
  code: string;
@@ -776,7 +896,6 @@ interface SwapAssetOption {
776
896
  interface SwapModalTemplateProps {
777
897
  theme: string;
778
898
  accentColor: string;
779
- /** Per-app modal chrome overrides (background, card + button radius). */
780
899
  styleOverrides?: ModalStyleOverrides;
781
900
  step: 'form' | 'tx';
782
901
  txTitle: string;
@@ -793,11 +912,8 @@ interface SwapModalTemplateProps {
793
912
  formError: string;
794
913
  isLoadingData: boolean;
795
914
  smartUnsupported: boolean;
796
- /** Swap config is still loading. */
797
915
  configLoading: boolean;
798
- /** Config loaded and this app exposes no swap venues - swap is disabled. */
799
916
  swapUnavailable: boolean;
800
- /** Buying the selected asset will create a trustline first (~0.5 XLM reserve). */
801
917
  buyNeedsTrustline: boolean;
802
918
  transaction: TransactionState;
803
919
  showXdr: boolean;
@@ -811,7 +927,8 @@ interface SwapModalTemplateProps {
811
927
  onRefresh: () => void;
812
928
  onSelectSell: (o: SwapAssetOption) => void;
813
929
  onSelectBuy: (o: SwapAssetOption) => void;
814
- /** Add a user-pasted token (code + issuer) to the buy list. Returns an error or null. */
930
+ onReverse: () => void;
931
+ onMax: () => void;
815
932
  onAddCustomToken: (code: string, issuer: string) => string | null;
816
933
  onAmountChange: (value: string) => void;
817
934
  onProviderChange: (p: SwapProvider) => void;
@@ -821,7 +938,7 @@ interface SwapModalTemplateProps {
821
938
  onRetry: () => void;
822
939
  onDone: () => void;
823
940
  }
824
- declare function SwapModalTemplate({ theme, accentColor, styleOverrides, step, txTitle, sellOptions, buyOptions, selectedSell, selectedBuy, amount, provider, providers, quote, quoteLoading, quoteError, formError, isLoadingData, smartUnsupported, configLoading, swapUnavailable, buyNeedsTrustline, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, onClose, onBack, onRefresh, onSelectSell, onSelectBuy, onAddCustomToken, onAmountChange, onProviderChange, onSwap, onToggleXdr, onCopyHash, onRetry, onDone, }: SwapModalTemplateProps): react_jsx_runtime.JSX.Element;
941
+ declare function SwapModalTemplate({ theme, accentColor, styleOverrides, step, txTitle, sellOptions, buyOptions, selectedSell, selectedBuy, amount, provider, providers, quote, quoteLoading, quoteError, formError, isLoadingData, smartUnsupported, configLoading, swapUnavailable, buyNeedsTrustline, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, onClose, onBack, onRefresh, onSelectSell, onSelectBuy, onAddCustomToken, onReverse, onMax, onAmountChange, onProviderChange, onSwap, onToggleXdr, onCopyHash, onRetry, onDone, }: SwapModalTemplateProps): react_jsx_runtime.JSX.Element;
825
942
 
826
943
  interface ReceiveModalTemplateProps {
827
944
  theme: string;
@@ -830,15 +947,27 @@ interface ReceiveModalTemplateProps {
830
947
  styleOverrides?: ModalStyleOverrides;
831
948
  /** Address of the wallet on {@link selectedChain}. */
832
949
  walletAddress: string;
833
- /** Networks the user holds a wallet on; the first one is the default. */
834
- chains: WalletChain[];
950
+ /**
951
+ * The networks the user holds an address on, in the app's configured order.
952
+ * The picker renders only with two or more, so a single-chain app shows none.
953
+ */
954
+ chains?: WalletChain[];
835
955
  selectedChain: WalletChain | null;
836
- onSelectChain: (chain: WalletChain) => void;
956
+ onSelectChain?: (chain: WalletChain) => void;
837
957
  copied: boolean;
958
+ /**
959
+ * Why the wallet cannot receive yet (its Stellar account is still being
960
+ * created, or its creation failed), or null when it can.
961
+ *
962
+ * The address itself is valid either way - what is missing is the account
963
+ * behind it, so a payment sent now is rejected by the network. Optional, so a
964
+ * custom template written before this existed keeps compiling.
965
+ */
966
+ notReadyReason?: string | null;
838
967
  onCopy: () => void;
839
968
  onClose: () => void;
840
969
  }
841
- declare function ReceiveModalTemplate({ theme, accentColor, styleOverrides, walletAddress, chains, selectedChain, onSelectChain, copied, onCopy, onClose, }: ReceiveModalTemplateProps): react_jsx_runtime.JSX.Element;
970
+ declare function ReceiveModalTemplate({ theme, accentColor, styleOverrides, walletAddress, chains, selectedChain, onSelectChain, copied, notReadyReason, onCopy, onClose, }: ReceiveModalTemplateProps): react_jsx_runtime.JSX.Element;
842
971
 
843
972
  interface SessionsModalTemplateProps {
844
973
  theme: string;
@@ -848,12 +977,13 @@ interface SessionsModalTemplateProps {
848
977
  state: SessionsState;
849
978
  revokingFamilyId: string | null;
850
979
  signingOutEverywhere: boolean;
980
+ revokeError: string | null;
851
981
  onRefresh: () => void;
852
982
  onRevoke: (familyId: string) => void;
853
983
  onLogoutEverywhere: () => void;
854
984
  onClose: () => void;
855
985
  }
856
- declare function SessionsModalTemplate({ theme, accentColor, styleOverrides, state, revokingFamilyId, signingOutEverywhere, onRefresh, onRevoke, onLogoutEverywhere, onClose, }: SessionsModalTemplateProps): react_jsx_runtime.JSX.Element;
986
+ declare function SessionsModalTemplate({ theme, accentColor, styleOverrides, state, revokingFamilyId, signingOutEverywhere, revokeError, onRefresh, onRevoke, onLogoutEverywhere, onClose, }: SessionsModalTemplateProps): react_jsx_runtime.JSX.Element;
857
987
 
858
988
  interface DistributionRulesModalTemplateProps {
859
989
  theme: string;
@@ -870,4 +1000,4 @@ interface DistributionRulesModalTemplateProps {
870
1000
  }
871
1001
  declare function DistributionRulesModalTemplate({ theme, accentColor, styleOverrides, state, claimingId, claimErrors, claimedIds, onRefresh, onClaim, onClose, }: DistributionRulesModalTemplateProps): react_jsx_runtime.JSX.Element;
872
1002
 
873
- export { type AuthModalProps, ChainSelect, type ChainSelectProps, type CustomTrustlineModalTemplateProps, DistributionRulesModal, DistributionRulesModalTemplate, EarnModal, EnabledAssetsModal, EnabledAssetsModalTemplate, type EnabledAssetsModalTemplateProps, KycModal, KycModalTemplate, KycStatus, type KycStep, type LoginButtonProps, LoginModalTemplate, type ModalChrome, type ModalStyleOverrides, type ModalVariant, type PollarConfig, PollarProvider, type PollarStyles, type RampStep, RampWidget, RampWidgetTemplate, ReceiveModal, ReceiveModalTemplate, type ReceiveModalTemplateProps, RouteDisplay, SendModal, SendModalTemplate, type SendModalTemplateProps, SessionsModal, SessionsModalTemplate, type SessionsModalTemplateProps, type SwapAssetOption, SwapModal, SwapModalTemplate, type SwapModalTemplateProps, TransactionModalTemplate, type TransactionModalTemplateProps, TxHistoryModalTemplate, TxStatusView, type TxStatusViewProps, type UseChainsResult, WalletBalanceModal, WalletBalanceModalTemplate, type WalletBalanceModalTemplateProps, WalletButton, WalletButtonTemplate, type WalletButtonTemplateProps, addressForChain, browserPasskeyCeremony, browserPasskeySigner, buildModalCssVars, chainsOf, createPollarAdapterHook, modalChrome, readableTextOn, resolveChain, useChains, usePollar };
1003
+ export { type AuthModalProps, ChainSelect, type ChainSelectProps, type CustomTrustlineModalTemplateProps, DistributionRulesModal, DistributionRulesModalTemplate, EarnModal, EnabledAssetsModal, EnabledAssetsModalTemplate, type EnabledAssetsModalTemplateProps, KycModal, KycModalTemplate, KycStatus, type KycStep, type LoginButtonProps, LoginModalTemplate, type ModalChrome, type ModalStyleOverrides, type ModalVariant, type PollarConfig, PollarProvider, type PollarStyles, ProviderRegistrationModal, type RampStep, RampWidget, RampWidgetTemplate, ReceiveModal, ReceiveModalTemplate, type ReceiveModalTemplateProps, RegistryCheckModal, RequirementFormModal, RouteDisplay, SendModal, SendModalTemplate, type SendModalTemplateProps, SessionsModal, SessionsModalTemplate, type SessionsModalTemplateProps, type SwapAssetOption, SwapModal, SwapModalTemplate, type SwapModalTemplateProps, TransactionModalTemplate, type TransactionModalTemplateProps, TxHistoryModalTemplate, TxStatusView, type TxStatusViewProps, type UseChainsResult, WalletBalanceModal, WalletBalanceModalTemplate, type WalletBalanceModalTemplateProps, WalletButton, WalletButtonTemplate, type WalletButtonTemplateProps, addressForChain, browserPasskeyCeremony, browserPasskeySigner, buildModalCssVars, chainsOf, createPollarAdapterHook, modalChrome, readableTextOn, resolveChain, useChains, usePollar, walletNotReadyReason };