@pollar/react 0.11.4 → 0.12.0-rc.2

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, RampQuoteRequirement, RampTxStatus, RampDepositInstructions, EnabledAssetRecord, WalletBalanceRecord, SwapProvider, DistributionRulesState, DistributionRule } from '@pollar/core';
2
+ import { pollarPaths, PollarClient, PollarClientConfig, PollarAdapters, OnStorageDegrade, WalletInfo, CosignCustody, PollarLoginOptions, SessionsState, CosignState, RecoveryState, CustodyMigrationState, PendingConfirmation, TransactionState, TxBuildBody, BuildOutcome, SubmitOutcome, SignOutcome, SendPaymentParams, StellarNetwork, WalletBalanceState, EnabledAssetsState, TrustlineOutcome, TxHistoryState, SwapVenue, SwapToken, SwapQuoteParams, SwapQuote, EarnProviderId, EarnOpportunity, EarnPositionParams, EarnPosition, EarnTxParams, PollarAdapter, PasskeyCeremony, PasskeySigner, RecoveryPasskeyCeremony, WalletChain, CosignRequest, CosignVerification, CosignQuorumReport, CosignDevicesContent, KycStatus as KycStatus$1, RampQuote, WalletId, AuthState, KycProvider, KycStartResponse, RampDirection, RampCountry, RampQuoteRequirement, RampTxStatus, RampDepositInstructions, EnabledAssetRecord, WalletBalanceRecord, SwapProvider, DistributionRulesState, DistributionRule, RampSnapshot, RampsTransactionResponse } from '@pollar/core';
3
3
  export { AuthProviderContext, PollarAuthProvider, SessionsState } from '@pollar/core';
4
4
  import { ReactNode, CSSProperties } from 'react';
5
5
 
@@ -43,8 +43,13 @@ interface PollarContextValue {
43
43
  * creates none.
44
44
  */
45
45
  hasWallet: boolean;
46
- /** Create the signed-in user's wallet; see `PollarClient.createWallet`. */
47
- createWallet: () => Promise<WalletInfo>;
46
+ /**
47
+ * Create the signed-in user's wallet; see `PollarClient.createWallet`. An app
48
+ * whose custody mode is USER_CHOICE needs `custody`: the user's pick.
49
+ */
50
+ createWallet: (options?: {
51
+ custody?: CosignCustody;
52
+ }) => Promise<WalletInfo>;
48
53
  /**
49
54
  * `true` once the server has confirmed the session (login / refresh /
50
55
  * `/auth/session/resume`). `false` while a cold-start session is still
@@ -56,6 +61,30 @@ interface PollarContextValue {
56
61
  sessions: SessionsState;
57
62
  /** Open the active-sessions modal. */
58
63
  openSessionsModal: () => void;
64
+ /** Requests waiting for this device's vote. */
65
+ cosign: CosignState;
66
+ /** Open the approval prompt of a co-signed wallet. Opens by itself when a request arrives. */
67
+ openCosignModal: () => void;
68
+ /**
69
+ * The recovery state of the user's Turnkey wallet: null until read, or for a
70
+ * session without one. `recoveryLocked` is true while the wallet has no way
71
+ * to be recovered without this device: it signs nothing but its own setup.
72
+ */
73
+ recovery: RecoveryState | null;
74
+ recoveryLocked: boolean;
75
+ /** Read the recovery state again (after a method changed elsewhere). */
76
+ refreshRecovery: () => void;
77
+ /** Open the recovery methods modal: passkeys, email, devices, export. */
78
+ openRecoveryModal: () => void;
79
+ /**
80
+ * Whether the user's wallet, one Pollar custodies, has to move to this
81
+ * device because the app keeps its wallets in Turnkey. While `required`, the
82
+ * provider shows the move and nothing else; null until read.
83
+ */
84
+ custodyMigration: CustodyMigrationState | null;
85
+ refreshCustodyMigration: () => void;
86
+ /** Signing calls waiting for the user under `confirmation: 'prompt'`; the provider shows the first one. */
87
+ confirmations: PendingConfirmation[];
59
88
  appConfig: PollarConfig;
60
89
  styles: PollarStyles;
61
90
  /** Remote app-config load state. 'loading' while the initial fetch is in
@@ -271,6 +300,15 @@ declare const browserPasskeyCeremony: PasskeyCeremony;
271
300
  * entry. The secp256r1 key never leaves the device.
272
301
  */
273
302
  declare const browserPasskeySigner: PasskeySigner;
303
+ /**
304
+ * Browser passkey ceremonies for a Turnkey wallet's recovery: register a
305
+ * passkey as a way back in, and sign a Turnkey request with one to add a new
306
+ * device. rpId is the page's hostname, like the smart-wallet ceremony, so a
307
+ * passkey made on the app's domain recovers the wallet on that domain.
308
+ * `challenge` arrives base64url already: for `get()` it is what Turnkey checks
309
+ * (the hex SHA-256 of the request body).
310
+ */
311
+ declare const browserRecoveryPasskey: RecoveryPasskeyCeremony;
274
312
 
275
313
  /**
276
314
  * The one place the widget decides whether a wallet can act on-chain, and what
@@ -312,6 +350,13 @@ interface WalletButtonTemplateProps {
312
350
  * custom template written before this existed keeps compiling.
313
351
  */
314
352
  notReadyReason?: string | null;
353
+ /**
354
+ * The wallet has no recovery method yet and signs nothing but its own setup.
355
+ * Shown at the top of the menu with a way to fix it. Optional for custom templates.
356
+ */
357
+ recoveryLocked?: boolean;
358
+ /** Open the recovery methods; the item shows only when set. */
359
+ onRecovery?: () => void;
315
360
  creatingAccount: boolean;
316
361
  /**
317
362
  * Signed in with no wallet yet (an app that creates wallets on demand, or
@@ -322,7 +367,13 @@ interface WalletButtonTemplateProps {
322
367
  signedIn?: boolean;
323
368
  creatingWallet?: boolean;
324
369
  createWalletError?: string | null;
325
- onCreateWallet?: () => void;
370
+ /**
371
+ * The app leaves the custody to the user (USER_CHOICE): Create wallet offers
372
+ * co-signed and self-custody, and calls `onCreateWallet` with the pick. A
373
+ * self-custody wallet is created only after the user accepts its risks.
374
+ */
375
+ custodyChoice?: boolean;
376
+ onCreateWallet?: (custody?: CosignCustody) => void;
326
377
  onToggleOpen: () => void;
327
378
  onCreateAccount: () => void;
328
379
  onCopy: () => void;
@@ -337,7 +388,7 @@ interface WalletButtonTemplateProps {
337
388
  onLogout: () => void;
338
389
  onLogin: () => void;
339
390
  }
340
- 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, signedIn, creatingWallet, createWalletError, onCreateWallet, }: WalletButtonTemplateProps): react_jsx_runtime.JSX.Element;
391
+ declare function WalletButtonTemplate({ walletAddress, accentColor, open, copied, dropdownBg, dropdownBorder, itemColor, wrapperRef, isInProgress, showCreateAccount, notReadyReason, recoveryLocked, onRecovery, creatingAccount, onToggleOpen, onCreateAccount, onCopy, onWalletBalance, onTxHistory, onSend, onReceive, onSessions, onKyc, onRamp, onDistributionRules, onLogout, onLogin, signedIn, creatingWallet, createWalletError, custodyChoice, onCreateWallet, }: WalletButtonTemplateProps): react_jsx_runtime.JSX.Element;
341
392
 
342
393
  /**
343
394
  * The chain a record lives on, with the legacy shape folded in: sessions and
@@ -397,6 +448,39 @@ interface UseChainsResult {
397
448
  }
398
449
  declare function useChains(): UseChainsResult;
399
450
 
451
+ interface UseCosignResult {
452
+ /** Requests waiting for this device's vote, oldest first. */
453
+ pending: CosignRequest[];
454
+ /** The last request that reached a final state. */
455
+ lastResolved?: CosignRequest;
456
+ /** Whether the client's co-sign store has been read at least once. */
457
+ loaded: boolean;
458
+ /** Re-read the pending requests from the API. */
459
+ refresh: () => Promise<void>;
460
+ /** Verify the request against Turnkey and, when it checks out, vote yes. */
461
+ approve: (request: CosignRequest) => Promise<CosignRequest>;
462
+ /** Vote no. Final. */
463
+ reject: (request: CosignRequest) => Promise<CosignRequest>;
464
+ /** The verification a UI can show before the user decides. */
465
+ verify: (request: CosignRequest) => Promise<CosignVerification>;
466
+ /** Read the sub-organization from Turnkey with the device key and record whether it is the quorum its custody promises. */
467
+ inspectQuorum: () => Promise<CosignQuorumReport>;
468
+ /** The user's enrolled devices and the quorum state as sdk-api records it. */
469
+ devices: () => Promise<CosignDevicesContent>;
470
+ /** Revoke another enrolled device; `force` to revoke this one. */
471
+ revokeDevice: (deviceId: string, options?: {
472
+ force?: boolean;
473
+ }) => Promise<CosignDevicesContent>;
474
+ /** Move the wallet between co-signed and self-custody; only an app in USER_CHOICE custody allows it. */
475
+ switchCustody: (to: CosignCustody) => Promise<CosignQuorumReport>;
476
+ }
477
+ /**
478
+ * The user's side of a Turnkey co-signed wallet, for an app that renders its
479
+ * own confirmation UI instead of the provider's modal. Subscribes to the
480
+ * client's co-sign store and loads the pending requests once on mount.
481
+ */
482
+ declare function useCosign(): UseCosignResult;
483
+
400
484
  interface KycModalProps {
401
485
  corridorId?: string;
402
486
  /** A card provider's steps, in place of a route's. */
@@ -527,6 +611,28 @@ interface SessionsModalProps {
527
611
  }
528
612
  declare function SessionsModal({ onClose }: SessionsModalProps): react_jsx_runtime.JSX.Element;
529
613
 
614
+ interface CosignModalProps {
615
+ onClose: () => void;
616
+ }
617
+ /**
618
+ * The approval prompt of a Turnkey co-signed wallet. Verifies each request
619
+ * against Turnkey before enabling Approve, so the user only ever confirms a
620
+ * transaction the device checked itself.
621
+ */
622
+ declare function CosignModal({ onClose }: CosignModalProps): react_jsx_runtime.JSX.Element;
623
+
624
+ interface RecoveryModalProps {
625
+ onClose: () => void;
626
+ }
627
+ /**
628
+ * The recovery methods of a Turnkey wallet: add and remove passkeys, confirm
629
+ * an email, approve another device, export the recovery phrase, and, on a
630
+ * device that is not part of the wallet, get back in. Until one method exists
631
+ * the wallet signs nothing but its own setup, so this is also where a locked
632
+ * wallet sends the user.
633
+ */
634
+ declare function RecoveryModal({ onClose }: RecoveryModalProps): react_jsx_runtime.JSX.Element;
635
+
530
636
  interface DistributionRulesModalProps {
531
637
  onClose: () => void;
532
638
  }
@@ -657,7 +763,7 @@ interface RampFieldSpec {
657
763
  key: string;
658
764
  label: string;
659
765
  type: 'text' | 'email' | 'tel' | 'select';
660
- bankType?: 'CLABE' | 'PIX' | 'PSE' | 'ACH' | 'BREB';
766
+ bankType?: string;
661
767
  /** For `type: 'select'` - dropdown choices (e.g. Stereum's Bolivian banks). */
662
768
  options?: {
663
769
  value: string;
@@ -678,6 +784,8 @@ interface RampFieldSpec {
678
784
  hint?: string;
679
785
  }
680
786
  interface RampWidgetTemplateProps {
787
+ workflowContent?: React.ReactNode;
788
+ routeSelector?: React.ReactNode;
681
789
  theme: string;
682
790
  accentColor: string;
683
791
  /** Per-app modal chrome overrides (background, card + button radius). */
@@ -719,12 +827,34 @@ interface RampWidgetTemplateProps {
719
827
  onboardingStatus?: 'kyc' | 'endorsement' | 'awaiting_provider' | null;
720
828
  /** The gate has since cleared - the user needs a fresh quote to continue. */
721
829
  kycJustApproved: boolean;
830
+ /** Superseded by `txHash`, which carries the settlement on any chain; read when `txHash` is absent. */
722
831
  stellarTxHash: string | null;
723
- /** Stellar Expert URL for `stellarTxHash` (network-aware); null when unknown. */
832
+ /** The on-chain transaction that settled the ramp, on `txChain`. */
833
+ txHash?: string | null;
834
+ /** Chain of `txHash`; Stellar when omitted. */
835
+ txChain?: 'STELLAR' | 'POLYGON' | 'SOLANA' | null;
836
+ /** Explorer URL for the transaction (chain- and network-aware); null when unknown. */
724
837
  explorerUrl: string | null;
838
+ /**
839
+ * The user's money is in one of their wallets between two steps of the route.
840
+ * Optional for integrators rendering their own chrome; omitted, the state is
841
+ * not shown.
842
+ */
843
+ fundsInTransit?: boolean;
844
+ /** A retry of the pending step is in flight. */
845
+ retrying?: boolean;
846
+ onRetryTransit?: () => void;
725
847
  depositInstructions: RampDepositInstructions | null;
726
848
  canComplete: boolean;
727
849
  completing: boolean;
850
+ savedRamps?: Array<{
851
+ txId: string;
852
+ provider: string;
853
+ }>;
854
+ onResumeRamp?: (id: string) => void;
855
+ onDismissRamp?: (id: string) => void;
856
+ onDismissCurrentRamp?: (() => void) | undefined;
857
+ onExploreRoutes?: (() => void) | undefined;
728
858
  errorMsg: string | null;
729
859
  /** Neutral guidance on the route list, e.g. after identity verification sent the user back to it. */
730
860
  noticeMsg?: string | null;
@@ -746,7 +876,7 @@ interface RampWidgetTemplateProps {
746
876
  onRefresh: () => void;
747
877
  onClose: () => void;
748
878
  }
749
- 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;
879
+ declare function RampWidgetTemplate({ workflowContent, routeSelector, 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, txHash, txChain, explorerUrl, fundsInTransit, retrying, onRetryTransit, depositInstructions, canComplete, completing, savedRamps, onResumeRamp, onDismissRamp, onDismissCurrentRamp, onExploreRoutes, errorMsg, noticeMsg, onDirectionChange, onAmountChange, onFieldChange, onCountryChange, onFindRoute, onSelectQuote, onVerifyRoute, onContactContinue, onOpenKyc, onOpenTos, onCompleteWithdraw, onBack, onRetry, onRefresh, onClose, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
750
880
 
751
881
  interface TransactionModalTemplateProps {
752
882
  theme: string;
@@ -861,6 +991,8 @@ interface CustomTrustlineModalTemplateProps {
861
991
  }) => void;
862
992
  }
863
993
 
994
+ /** The memo types the backend accepts on a Stellar payment. */
995
+ type SendMemoType = 'text' | 'id';
864
996
  interface SendModalTemplateProps {
865
997
  theme: string;
866
998
  accentColor: string;
@@ -911,6 +1043,15 @@ interface SendModalTemplateProps {
911
1043
  onMax: () => void;
912
1044
  onPaste: () => void;
913
1045
  onDestinationChange: (value: string) => void;
1046
+ /**
1047
+ * Optional Stellar memo. The field renders only on Stellar and only when
1048
+ * {@link onMemoChange} is passed, so a custom template written before it
1049
+ * existed keeps compiling.
1050
+ */
1051
+ memo?: string;
1052
+ memoType?: SendMemoType;
1053
+ onMemoChange?: (value: string) => void;
1054
+ onMemoTypeChange?: (type: SendMemoType) => void;
914
1055
  onSubmit: () => void;
915
1056
  onSignAndSend: () => void;
916
1057
  onToggleXdr: () => void;
@@ -918,7 +1059,7 @@ interface SendModalTemplateProps {
918
1059
  onRetry: () => void;
919
1060
  onDone: () => void;
920
1061
  }
921
- 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;
1062
+ 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, memo, memoType, onMemoChange, onMemoTypeChange, onSubmit, onSignAndSend, onToggleXdr, onCopyHash, onRetry, onDone, }: SendModalTemplateProps): react_jsx_runtime.JSX.Element;
922
1063
 
923
1064
  interface SwapAssetOption {
924
1065
  ref: SwapQuoteParams['sellAsset'];
@@ -998,10 +1139,17 @@ interface ReceiveModalTemplateProps {
998
1139
  * custom template written before this existed keeps compiling.
999
1140
  */
1000
1141
  notReadyReason?: string | null;
1142
+ /**
1143
+ * The wallet has no way to be recovered without this device yet. The address
1144
+ * stays hidden until the user adds one, so nobody is handed an address whose
1145
+ * funds a lost phone would take with it. Optional for custom templates.
1146
+ */
1147
+ recoveryLocked?: boolean;
1148
+ onSetupRecovery?: () => void;
1001
1149
  onCopy: () => void;
1002
1150
  onClose: () => void;
1003
1151
  }
1004
- declare function ReceiveModalTemplate({ theme, accentColor, styleOverrides, walletAddress, chains, selectedChain, onSelectChain, copied, notReadyReason, onCopy, onClose, }: ReceiveModalTemplateProps): react_jsx_runtime.JSX.Element;
1152
+ declare function ReceiveModalTemplate({ theme, accentColor, styleOverrides, walletAddress, chains, selectedChain, onSelectChain, copied, notReadyReason, recoveryLocked, onSetupRecovery, onCopy, onClose, }: ReceiveModalTemplateProps): react_jsx_runtime.JSX.Element;
1005
1153
 
1006
1154
  interface SessionsModalTemplateProps {
1007
1155
  theme: string;
@@ -1019,6 +1167,104 @@ interface SessionsModalTemplateProps {
1019
1167
  }
1020
1168
  declare function SessionsModalTemplate({ theme, accentColor, styleOverrides, state, revokingFamilyId, signingOutEverywhere, revokeError, onRefresh, onRevoke, onLogoutEverywhere, onClose, }: SessionsModalTemplateProps): react_jsx_runtime.JSX.Element;
1021
1169
 
1170
+ interface CosignModalTemplateProps {
1171
+ theme: string;
1172
+ accentColor: string;
1173
+ /** Per-app modal chrome overrides (background, card + button radius). */
1174
+ styleOverrides?: ModalStyleOverrides;
1175
+ /** Requests waiting for this device's vote, oldest first. */
1176
+ pending: CosignRequest[];
1177
+ /** The request shown in detail; the first pending one when not chosen. */
1178
+ current: CosignRequest | null;
1179
+ /** Verification of `current`, or null while it runs. */
1180
+ verification: CosignVerification | null;
1181
+ busy: 'approving' | 'rejecting' | null;
1182
+ error: string | null;
1183
+ /** Approve stays off for a request whose approval just failed. */
1184
+ approveBlocked?: boolean;
1185
+ /** The last request that reached a final state, shown once the list is empty. */
1186
+ lastResolved?: CosignRequest;
1187
+ /** Explorer page of {@link lastResolved}'s transaction, when it was sent. */
1188
+ explorerUrl?: string | null;
1189
+ onSelect: (request: CosignRequest) => void;
1190
+ onApprove: (request: CosignRequest) => void;
1191
+ onReject: (request: CosignRequest) => void;
1192
+ onClose: () => void;
1193
+ }
1194
+ declare function CosignModalTemplate({ theme, accentColor, styleOverrides, pending, current, verification, busy, error, approveBlocked, lastResolved, explorerUrl, onSelect, onApprove, onReject, onClose, }: CosignModalTemplateProps): react_jsx_runtime.JSX.Element;
1195
+
1196
+ interface CustodyMigrationModalProps {
1197
+ state: CustodyMigrationState;
1198
+ /** The wallets moved: the provider reads their state again and asks for a recovery method. */
1199
+ onMoved: () => void;
1200
+ /** A blocked wallet waits for what is pending; the provider stops asking until the next session. */
1201
+ onLater: () => void;
1202
+ }
1203
+ declare function CustodyMigrationModal({ state, onMoved, onLater }: CustodyMigrationModalProps): react_jsx_runtime.JSX.Element;
1204
+
1205
+ interface CustodyMigrationModalTemplateProps {
1206
+ theme: string;
1207
+ accentColor: string;
1208
+ styleOverrides?: ModalStyleOverrides;
1209
+ state: CustodyMigrationState;
1210
+ busy: boolean;
1211
+ error: string | null;
1212
+ /** What still points at a wallet that cannot move yet (an open ramp order, a transaction in flight). */
1213
+ blockedReasons: string[] | null;
1214
+ onMove: (custody?: CosignCustody) => void;
1215
+ /** Only offered while a wallet is blocked: the move waits for what is pending. */
1216
+ onLater: () => void;
1217
+ onLogout: () => void;
1218
+ }
1219
+ /**
1220
+ * The move of the wallets Pollar custodies to ones the user's device signs for.
1221
+ * It cannot be put off: the app's wallets live in Turnkey now, so the only ways
1222
+ * out are moving or logging out, unless something still pending holds a
1223
+ * wallet back.
1224
+ */
1225
+ declare function CustodyMigrationModalTemplate(p: CustodyMigrationModalTemplateProps): react_jsx_runtime.JSX.Element;
1226
+
1227
+ type RecoveryView = 'overview' | 'email' | 'export' | 'recover-email';
1228
+ interface RecoveryModalTemplateProps {
1229
+ theme: string;
1230
+ accentColor: string;
1231
+ styleOverrides?: ModalStyleOverrides;
1232
+ /** Null while the first read is in flight. */
1233
+ state: RecoveryState | null;
1234
+ devices: CosignDevicesContent | null;
1235
+ thisDeviceKey: string | null;
1236
+ /** Whether this device's key is one of the wallet's credentials. */
1237
+ thisDeviceEnrolled: boolean;
1238
+ /** Whether the runtime can run passkey ceremonies here. */
1239
+ passkeyAvailable: boolean;
1240
+ /** A self-custody wallet of an app that never asked the user to accept its risks. */
1241
+ selfCustodyRisks: boolean;
1242
+ view: RecoveryView;
1243
+ /** The action in flight, by key, for its button's spinner. */
1244
+ busy: string | null;
1245
+ error: string | null;
1246
+ notice: string | null;
1247
+ emailDraft: string;
1248
+ codeSent: boolean;
1249
+ /** The recovery phrase, once exported. */
1250
+ phrase: string | null;
1251
+ onView: (view: RecoveryView) => void;
1252
+ onEmailDraft: (email: string) => void;
1253
+ onAddPasskey: () => void;
1254
+ onRemovePasskey: (authenticatorId: string) => void;
1255
+ onSendEmailCode: () => void;
1256
+ onConfirmEmail: (code: string) => void;
1257
+ onApproveDevice: (enrollmentId: string) => void;
1258
+ onRejectDevice: (enrollmentId: string) => void;
1259
+ onRequestEnrollment: () => void;
1260
+ onRecoverWithPasskey: () => void;
1261
+ onSendRecoveryCode: () => void;
1262
+ onRecoverWithCode: (code: string) => void;
1263
+ onExport: () => void;
1264
+ onClose: () => void;
1265
+ }
1266
+ declare function RecoveryModalTemplate(p: RecoveryModalTemplateProps): react_jsx_runtime.JSX.Element;
1267
+
1022
1268
  interface DistributionRulesModalTemplateProps {
1023
1269
  theme: string;
1024
1270
  accentColor: string;
@@ -1034,4 +1280,11 @@ interface DistributionRulesModalTemplateProps {
1034
1280
  }
1035
1281
  declare function DistributionRulesModalTemplate({ theme, accentColor, styleOverrides, state, claimingId, claimErrors, claimedIds, onRefresh, onClaim, onClose, }: DistributionRulesModalTemplateProps): react_jsx_runtime.JSX.Element;
1036
1282
 
1037
- export { type AuthModalProps, CardModal, 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 };
1283
+ declare function RampWorkflow({ client, snapshot, onChange, onBusyChange, }: {
1284
+ client: PollarClient;
1285
+ snapshot: RampSnapshot;
1286
+ onChange: (next: RampsTransactionResponse) => void;
1287
+ onBusyChange?: (busy: boolean) => void;
1288
+ }): react_jsx_runtime.JSX.Element;
1289
+
1290
+ export { type AuthModalProps, CardModal, ChainSelect, type ChainSelectProps, CosignModal, CosignModalTemplate, type CosignModalTemplateProps, CustodyMigrationModal, CustodyMigrationModalTemplate, type CustodyMigrationModalTemplateProps, 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, RampWorkflow, ReceiveModal, ReceiveModalTemplate, type ReceiveModalTemplateProps, RecoveryModal, RecoveryModalTemplate, type RecoveryModalTemplateProps, type RecoveryView, RegistryCheckModal, RequirementFormModal, RouteDisplay, type SendMemoType, SendModal, SendModalTemplate, type SendModalTemplateProps, SessionsModal, SessionsModalTemplate, type SessionsModalTemplateProps, type SwapAssetOption, SwapModal, SwapModalTemplate, type SwapModalTemplateProps, TransactionModalTemplate, type TransactionModalTemplateProps, TxHistoryModalTemplate, TxStatusView, type TxStatusViewProps, type UseChainsResult, type UseCosignResult, WalletBalanceModal, WalletBalanceModalTemplate, type WalletBalanceModalTemplateProps, WalletButton, WalletButtonTemplate, type WalletButtonTemplateProps, addressForChain, browserPasskeyCeremony, browserPasskeySigner, browserRecoveryPasskey, buildModalCssVars, chainsOf, createPollarAdapterHook, modalChrome, readableTextOn, resolveChain, useChains, useCosign, usePollar, walletNotReadyReason };