@coinlist-co/react 0.12.1-rc.a230abc → 0.12.1-rc.c2b6ba5
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/{chunk-GFLU5OMP.js → chunk-6CQHDASY.js} +643 -643
- package/dist/chunk-6CQHDASY.js.map +1 -0
- package/dist/{chunk-HLL7IBIS.js → chunk-F6WGUKZC.js} +9 -9
- package/dist/chunk-F6WGUKZC.js.map +1 -0
- package/dist/{chunk-RPE7XIBV.js → chunk-ZFBEI3BW.js} +126 -126
- package/dist/chunk-ZFBEI3BW.js.map +1 -0
- package/dist/client/index.cjs +2032 -2030
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +149 -149
- package/dist/client/index.d.ts +149 -149
- package/dist/client/index.js +481 -481
- package/dist/client/index.js.map +1 -1
- package/dist/{collections-CAfs2Eww.d.cts → collections-DOm9VKVm.d.cts} +1 -1
- package/dist/{collections-DZZFrizd.d.ts → collections-aCv-Wr2a.d.ts} +1 -1
- package/dist/{config-D19ktBr0.d.cts → config-DIaFzrMW.d.cts} +13 -13
- package/dist/{config-D19ktBr0.d.ts → config-DIaFzrMW.d.ts} +13 -13
- package/dist/server/index.cjs +232 -232
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +4 -4
- package/dist/server/index.d.ts +4 -4
- package/dist/server/index.js +3 -3
- package/dist/server/index.js.map +1 -1
- package/dist/{shared → universal}/index.cjs +850 -848
- package/dist/universal/index.cjs.map +1 -0
- package/dist/{shared → universal}/index.d.cts +557 -557
- package/dist/{shared → universal}/index.d.ts +557 -557
- package/dist/{shared → universal}/index.js +2 -2
- package/package.json +6 -5
- package/dist/chunk-GFLU5OMP.js.map +0 -1
- package/dist/chunk-HLL7IBIS.js.map +0 -1
- package/dist/chunk-RPE7XIBV.js.map +0 -1
- package/dist/shared/index.cjs.map +0 -1
- /package/dist/{shared → universal}/index.js.map +0 -0
package/dist/client/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, ButtonHTMLAttributes } from 'react';
|
|
3
|
-
import { A as AuthorizationCode, C as CodeVerifier, L as Logger, W as WalletError, E as Erc20Namespace, a as EthereumChain, b as EvmContractAddress, B as BlockchainAmount, c as CoinListTokenSaleNamespace, O as OfferId, d as OfferOptionId, e as AssetId, P as Participation, f as CoinListTokenSaleNamespaceImpl,
|
|
4
|
-
export { a5 as DebugEvent, a6 as FrontlineEventId, a7 as HttpError, a8 as HttpResponse, a9 as KycToken, aa as LogBinding, ab as LogBindings, ac as LogCause, ad as LogLevel, ae as LogScope, af as LogValue, ag as ProductionLogLevel, ah as RedactedWalletError, ai as RequestId, aj as SafeEvent, ak as SafeFields, al as UnredactedFields } from '../config-
|
|
5
|
-
import { P as PKCEConfig, E as EvmWallet, S as SwapQuote, A as AssetIconUrl, a as ShortenedWalletAddress, F as FormattedAmountAssetUi, b as FormattedPercentUi, T as TxExplorerUrl, C as ConnectWallet, N as NonEmptyArray } from '../collections-
|
|
6
|
-
export { B as BroadcastTxParams, c as EvmSigner, W as WriteContractParams } from '../collections-
|
|
3
|
+
import { A as AuthorizationCode, C as CodeVerifier, L as Logger, W as WalletError, E as Erc20Namespace, a as EthereumChain, b as EvmContractAddress, B as BlockchainAmount, c as CoinListTokenSaleNamespace, O as OfferId, d as OfferOptionId, e as AssetId, P as Participation, f as CoinListTokenSaleNamespaceImpl, U as UniversalNamespaceContext, g as OndoNamespace, h as AssetSymbol, i as OfferSwapContract, j as OndoBuyTransaction, k as OndoSellTransaction, l as OndoSwapTransactionCore, m as OrderBookSide, n as OndoNamespaceImpl, S as SuperstateSwapNamespace, o as WalletsNamespace, p as Bps, q as EvmWalletAddress, r as SuperstateSwapNamespaceImpl, R as RequirementsNamespace, s as Requirement, t as RequirementsNamespaceImpl, u as Config, v as OAuthAccessToken, w as OffersNamespace, T as TokensNamespace, x as StablecoinSymbol, y as Erc20Asset, z as OfferDetail, D as TokenMetadata, F as OfferType, G as Offer, H as RequirementStatusInfo, I as RequirementType, J as RequirementStatusValue, K as OfferOptionAddress, M as RequirementId, N as KycLevelName, Q as DocumentSubmission, V as WalletChallengeType, X as PinoLoggerOptions, Y as OndoTradingStatus, Z as AssetDecimals, _ as BuildOndoBuyParams, $ as BuildOndoSellParams, a0 as OndoQuote, a1 as OndoQuoteSize, a2 as TokenIdentifier, a3 as OfferOptionAddressId, a4 as TokenLogo } from '../config-DIaFzrMW.cjs';
|
|
4
|
+
export { a5 as DebugEvent, a6 as FrontlineEventId, a7 as HttpError, a8 as HttpResponse, a9 as KycToken, aa as LogBinding, ab as LogBindings, ac as LogCause, ad as LogLevel, ae as LogScope, af as LogValue, ag as ProductionLogLevel, ah as RedactedWalletError, ai as RequestId, aj as SafeEvent, ak as SafeFields, al as UnredactedFields } from '../config-DIaFzrMW.cjs';
|
|
5
|
+
import { P as PKCEConfig, E as EvmWallet, S as SwapQuote, A as AssetIconUrl, a as ShortenedWalletAddress, F as FormattedAmountAssetUi, b as FormattedPercentUi, T as TxExplorerUrl, C as ConnectWallet, N as NonEmptyArray } from '../collections-DOm9VKVm.cjs';
|
|
6
|
+
export { B as BroadcastTxParams, c as EvmSigner, W as WriteContractParams } from '../collections-DOm9VKVm.cjs';
|
|
7
7
|
import { Hash } from 'viem';
|
|
8
8
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
9
9
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -250,7 +250,7 @@ interface ClientCoinListTokenSaleNamespace extends CoinListTokenSaleNamespace {
|
|
|
250
250
|
}
|
|
251
251
|
declare class ClientCoinListTokenSaleNamespaceImpl extends CoinListTokenSaleNamespaceImpl implements ClientCoinListTokenSaleNamespace {
|
|
252
252
|
private readonly erc20;
|
|
253
|
-
constructor(ctx:
|
|
253
|
+
constructor(ctx: UniversalNamespaceContext, erc20: Erc20Namespace);
|
|
254
254
|
execute(params: Omit<ExecuteTokenSaleParams, 'erc20' | 'tokenSale'>): Promise<TokenSaleExecutionResult>;
|
|
255
255
|
}
|
|
256
256
|
|
|
@@ -492,7 +492,7 @@ interface ClientOndoNamespace extends OndoNamespace {
|
|
|
492
492
|
}
|
|
493
493
|
declare class ClientOndoNamespaceImpl extends OndoNamespaceImpl implements ClientOndoNamespace {
|
|
494
494
|
private readonly erc20;
|
|
495
|
-
constructor(ctx:
|
|
495
|
+
constructor(ctx: UniversalNamespaceContext, erc20: Erc20Namespace);
|
|
496
496
|
prepareBuy(params: Omit<PrepareOndoBuyParams, 'ondo' | 'erc20'>): Promise<OndoBuyPreparationResult>;
|
|
497
497
|
prepareSell(params: Omit<PrepareOndoSellParams, 'ondo' | 'erc20'>): Promise<OndoSellPreparationResult>;
|
|
498
498
|
executeSwap<T extends OndoSwapTransactionCore & {
|
|
@@ -640,7 +640,7 @@ interface ClientSuperstateSwapNamespace extends SuperstateSwapNamespace {
|
|
|
640
640
|
declare class ClientSuperstateSwapNamespaceImpl extends SuperstateSwapNamespaceImpl implements ClientSuperstateSwapNamespace {
|
|
641
641
|
private readonly erc20;
|
|
642
642
|
private readonly wallets;
|
|
643
|
-
constructor(ctx:
|
|
643
|
+
constructor(ctx: UniversalNamespaceContext, erc20: Erc20Namespace, wallets: WalletsNamespace);
|
|
644
644
|
execute(params: Omit<ExecuteSwapParams, 'swap' | 'erc20'>): Promise<SwapExecutionResult>;
|
|
645
645
|
authorizeWallet(params: Omit<AuthorizeWalletParams, 'swap' | 'wallets'>): Promise<WalletAuthorizationResult>;
|
|
646
646
|
}
|
|
@@ -665,7 +665,7 @@ interface ClientRequirementsNamespace extends RequirementsNamespace {
|
|
|
665
665
|
}
|
|
666
666
|
declare class ClientRequirementsNamespaceImpl extends RequirementsNamespaceImpl implements ClientRequirementsNamespace {
|
|
667
667
|
private readonly coinlistBaseUrl;
|
|
668
|
-
constructor(ctx:
|
|
668
|
+
constructor(ctx: UniversalNamespaceContext, coinlistBaseUrl: string | undefined);
|
|
669
669
|
handle(requirement: Requirement): void;
|
|
670
670
|
}
|
|
671
671
|
|
|
@@ -3507,6 +3507,82 @@ interface ConnectedWalletListProps {
|
|
|
3507
3507
|
*/
|
|
3508
3508
|
declare function ConnectedWalletList(props: ConnectedWalletListProps): ReactNode;
|
|
3509
3509
|
|
|
3510
|
+
interface IdentityVerificationContainerProps {
|
|
3511
|
+
/**
|
|
3512
|
+
* Sumsub verification level to start. Determines which screens the Sumsub
|
|
3513
|
+
* WebSDK shows. Defaults to the backend's standard identity level.
|
|
3514
|
+
*/
|
|
3515
|
+
levelName?: KycLevelName;
|
|
3516
|
+
/**
|
|
3517
|
+
* Reset the Sumsub applicant before starting the flow, so an
|
|
3518
|
+
* already-approved level can be executed again (e.g. to update stale PII).
|
|
3519
|
+
* Pass the `kycReset` value from the requirement status. Applies only to
|
|
3520
|
+
* the initial token: mid-flow token refreshes never repeat the reset.
|
|
3521
|
+
*/
|
|
3522
|
+
reset?: boolean;
|
|
3523
|
+
/** BCP-47 language tag for the Sumsub UI, e.g. `'en'`. */
|
|
3524
|
+
locale?: string;
|
|
3525
|
+
/**
|
|
3526
|
+
* Called when the user submits their data in the Sumsub flow. Verification
|
|
3527
|
+
* continues asynchronously on the backend, so the requirement typically moves
|
|
3528
|
+
* to a pending state first - refetch requirement statuses to observe it.
|
|
3529
|
+
*/
|
|
3530
|
+
onSubmitted?: () => void;
|
|
3531
|
+
/** Called when the Sumsub flow reports an error. */
|
|
3532
|
+
onError?: (error: Error) => void;
|
|
3533
|
+
className?: string;
|
|
3534
|
+
}
|
|
3535
|
+
/**
|
|
3536
|
+
* Inline Sumsub identity verification flow, backed by
|
|
3537
|
+
* {@link useIdentityVerificationViewModel}, which fetches the Sumsub WebSDK
|
|
3538
|
+
* access token via {@link useKycToken}. Used by
|
|
3539
|
+
* `RequirementsChecklistContainer` for KYC-backed requirements, and can also
|
|
3540
|
+
* be rendered standalone.
|
|
3541
|
+
*/
|
|
3542
|
+
declare function IdentityVerificationContainer({ levelName, reset, locale, onSubmitted, onError, className, }: IdentityVerificationContainerProps): ReactNode;
|
|
3543
|
+
|
|
3544
|
+
type IdentityVerificationUiState = {
|
|
3545
|
+
type: 'loading';
|
|
3546
|
+
} | {
|
|
3547
|
+
type: 'error';
|
|
3548
|
+
message: string;
|
|
3549
|
+
retryable: boolean;
|
|
3550
|
+
} | {
|
|
3551
|
+
type: 'ready';
|
|
3552
|
+
accessToken: string;
|
|
3553
|
+
/** BCP-47 language tag for the Sumsub UI, or `undefined` for its default. */
|
|
3554
|
+
locale: string | undefined;
|
|
3555
|
+
/**
|
|
3556
|
+
* Handed straight to the Sumsub WebSDK, which refreshes an expired token
|
|
3557
|
+
* by calling it and awaiting the new one. It has to be a callback rather
|
|
3558
|
+
* than an event, because the third-party SDK expects a promise back.
|
|
3559
|
+
*/
|
|
3560
|
+
refreshToken: () => Promise<string>;
|
|
3561
|
+
};
|
|
3562
|
+
type IdentityVerificationUiEvent = {
|
|
3563
|
+
type: 'ON_RETRY';
|
|
3564
|
+
} | {
|
|
3565
|
+
type: 'ON_SUBMITTED';
|
|
3566
|
+
} | {
|
|
3567
|
+
type: 'ON_ERROR';
|
|
3568
|
+
error: Error;
|
|
3569
|
+
};
|
|
3570
|
+
|
|
3571
|
+
interface IdentityVerificationViewProps {
|
|
3572
|
+
state: IdentityVerificationUiState;
|
|
3573
|
+
onEvent: (event: IdentityVerificationUiEvent) => void;
|
|
3574
|
+
className?: string;
|
|
3575
|
+
}
|
|
3576
|
+
/**
|
|
3577
|
+
* Renders the inline Sumsub identity verification flow: its loading state, its
|
|
3578
|
+
* failure states, and the Sumsub iframe itself. Pure: the access token arrives
|
|
3579
|
+
* in `state`, and flow outcomes leave through `onEvent`.
|
|
3580
|
+
*
|
|
3581
|
+
* Self-scoped: renders fully styled on its own, with no `CoinListStyleScope`
|
|
3582
|
+
* needed.
|
|
3583
|
+
*/
|
|
3584
|
+
declare function IdentityVerificationView(props: IdentityVerificationViewProps): ReactNode;
|
|
3585
|
+
|
|
3510
3586
|
interface RequirementItemProps {
|
|
3511
3587
|
ui: RequirementItemUi;
|
|
3512
3588
|
expanded?: boolean;
|
|
@@ -3697,99 +3773,6 @@ interface RequirementsChecklistViewProps {
|
|
|
3697
3773
|
*/
|
|
3698
3774
|
declare function RequirementsChecklistView(props: RequirementsChecklistViewProps): ReactNode;
|
|
3699
3775
|
|
|
3700
|
-
interface VerificationOverlayProps {
|
|
3701
|
-
onClose: () => void;
|
|
3702
|
-
children: ReactNode;
|
|
3703
|
-
}
|
|
3704
|
-
/**
|
|
3705
|
-
* Full-screen overlay hosting the identity verification flow. Mirrors
|
|
3706
|
-
* frontline-web, where verification runs on a dedicated full page rather than
|
|
3707
|
-
* inside the requirement row.
|
|
3708
|
-
*
|
|
3709
|
-
* Self-scoped: renders fully styled on its own, with no `CoinListStyleScope`
|
|
3710
|
-
* needed. It has to be, because the checklist renders it as a sibling of
|
|
3711
|
-
* `RequirementsChecklistView` rather than inside it, and its backdrop
|
|
3712
|
-
* (`bg-overlay`) is token-backed: outside `.clco-sdk-root` the token is
|
|
3713
|
-
* undefined and the scrim disappears entirely.
|
|
3714
|
-
*/
|
|
3715
|
-
declare function VerificationOverlay({ onClose, children, }: VerificationOverlayProps): ReactNode;
|
|
3716
|
-
|
|
3717
|
-
interface IdentityVerificationContainerProps {
|
|
3718
|
-
/**
|
|
3719
|
-
* Sumsub verification level to start. Determines which screens the Sumsub
|
|
3720
|
-
* WebSDK shows. Defaults to the backend's standard identity level.
|
|
3721
|
-
*/
|
|
3722
|
-
levelName?: KycLevelName;
|
|
3723
|
-
/**
|
|
3724
|
-
* Reset the Sumsub applicant before starting the flow, so an
|
|
3725
|
-
* already-approved level can be executed again (e.g. to update stale PII).
|
|
3726
|
-
* Pass the `kycReset` value from the requirement status. Applies only to
|
|
3727
|
-
* the initial token: mid-flow token refreshes never repeat the reset.
|
|
3728
|
-
*/
|
|
3729
|
-
reset?: boolean;
|
|
3730
|
-
/** BCP-47 language tag for the Sumsub UI, e.g. `'en'`. */
|
|
3731
|
-
locale?: string;
|
|
3732
|
-
/**
|
|
3733
|
-
* Called when the user submits their data in the Sumsub flow. Verification
|
|
3734
|
-
* continues asynchronously on the backend, so the requirement typically moves
|
|
3735
|
-
* to a pending state first - refetch requirement statuses to observe it.
|
|
3736
|
-
*/
|
|
3737
|
-
onSubmitted?: () => void;
|
|
3738
|
-
/** Called when the Sumsub flow reports an error. */
|
|
3739
|
-
onError?: (error: Error) => void;
|
|
3740
|
-
className?: string;
|
|
3741
|
-
}
|
|
3742
|
-
/**
|
|
3743
|
-
* Inline Sumsub identity verification flow, backed by
|
|
3744
|
-
* {@link useIdentityVerificationViewModel}, which fetches the Sumsub WebSDK
|
|
3745
|
-
* access token via {@link useKycToken}. Used by
|
|
3746
|
-
* `RequirementsChecklistContainer` for KYC-backed requirements, and can also
|
|
3747
|
-
* be rendered standalone.
|
|
3748
|
-
*/
|
|
3749
|
-
declare function IdentityVerificationContainer({ levelName, reset, locale, onSubmitted, onError, className, }: IdentityVerificationContainerProps): ReactNode;
|
|
3750
|
-
|
|
3751
|
-
type IdentityVerificationUiState = {
|
|
3752
|
-
type: 'loading';
|
|
3753
|
-
} | {
|
|
3754
|
-
type: 'error';
|
|
3755
|
-
message: string;
|
|
3756
|
-
retryable: boolean;
|
|
3757
|
-
} | {
|
|
3758
|
-
type: 'ready';
|
|
3759
|
-
accessToken: string;
|
|
3760
|
-
/** BCP-47 language tag for the Sumsub UI, or `undefined` for its default. */
|
|
3761
|
-
locale: string | undefined;
|
|
3762
|
-
/**
|
|
3763
|
-
* Handed straight to the Sumsub WebSDK, which refreshes an expired token
|
|
3764
|
-
* by calling it and awaiting the new one. It has to be a callback rather
|
|
3765
|
-
* than an event, because the third-party SDK expects a promise back.
|
|
3766
|
-
*/
|
|
3767
|
-
refreshToken: () => Promise<string>;
|
|
3768
|
-
};
|
|
3769
|
-
type IdentityVerificationUiEvent = {
|
|
3770
|
-
type: 'ON_RETRY';
|
|
3771
|
-
} | {
|
|
3772
|
-
type: 'ON_SUBMITTED';
|
|
3773
|
-
} | {
|
|
3774
|
-
type: 'ON_ERROR';
|
|
3775
|
-
error: Error;
|
|
3776
|
-
};
|
|
3777
|
-
|
|
3778
|
-
interface IdentityVerificationViewProps {
|
|
3779
|
-
state: IdentityVerificationUiState;
|
|
3780
|
-
onEvent: (event: IdentityVerificationUiEvent) => void;
|
|
3781
|
-
className?: string;
|
|
3782
|
-
}
|
|
3783
|
-
/**
|
|
3784
|
-
* Renders the inline Sumsub identity verification flow: its loading state, its
|
|
3785
|
-
* failure states, and the Sumsub iframe itself. Pure: the access token arrives
|
|
3786
|
-
* in `state`, and flow outcomes leave through `onEvent`.
|
|
3787
|
-
*
|
|
3788
|
-
* Self-scoped: renders fully styled on its own, with no `CoinListStyleScope`
|
|
3789
|
-
* needed.
|
|
3790
|
-
*/
|
|
3791
|
-
declare function IdentityVerificationView(props: IdentityVerificationViewProps): ReactNode;
|
|
3792
|
-
|
|
3793
3776
|
interface TaxDocumentModalContainerProps {
|
|
3794
3777
|
isOpen: boolean;
|
|
3795
3778
|
onClose: () => void;
|
|
@@ -3900,6 +3883,23 @@ interface TaxDocumentModalViewProps {
|
|
|
3900
3883
|
*/
|
|
3901
3884
|
declare function TaxDocumentModalView({ state, onEvent, className, }: TaxDocumentModalViewProps): ReactNode;
|
|
3902
3885
|
|
|
3886
|
+
interface VerificationOverlayProps {
|
|
3887
|
+
onClose: () => void;
|
|
3888
|
+
children: ReactNode;
|
|
3889
|
+
}
|
|
3890
|
+
/**
|
|
3891
|
+
* Full-screen overlay hosting the identity verification flow. Mirrors
|
|
3892
|
+
* frontline-web, where verification runs on a dedicated full page rather than
|
|
3893
|
+
* inside the requirement row.
|
|
3894
|
+
*
|
|
3895
|
+
* Self-scoped: renders fully styled on its own, with no `CoinListStyleScope`
|
|
3896
|
+
* needed. It has to be, because the checklist renders it as a sibling of
|
|
3897
|
+
* `RequirementsChecklistView` rather than inside it, and its backdrop
|
|
3898
|
+
* (`bg-overlay`) is token-backed: outside `.clco-sdk-root` the token is
|
|
3899
|
+
* undefined and the scrim disappears entirely.
|
|
3900
|
+
*/
|
|
3901
|
+
declare function VerificationOverlay({ onClose, children, }: VerificationOverlayProps): ReactNode;
|
|
3902
|
+
|
|
3903
3903
|
interface ConnectWalletModalContainerProps {
|
|
3904
3904
|
isOpen: boolean;
|
|
3905
3905
|
onClose: () => void;
|
|
@@ -5720,53 +5720,6 @@ interface UseOffersGridViewModelResult {
|
|
|
5720
5720
|
*/
|
|
5721
5721
|
declare function useOffersGridViewModel(options?: UseOffersGridViewModelOptions): UseOffersGridViewModelResult;
|
|
5722
5722
|
|
|
5723
|
-
interface UseRequirementsChecklistViewModelOptions {
|
|
5724
|
-
offerId: OfferId;
|
|
5725
|
-
optionId: OfferOptionId;
|
|
5726
|
-
title: string;
|
|
5727
|
-
description: string;
|
|
5728
|
-
onContinue?: () => void;
|
|
5729
|
-
/**
|
|
5730
|
-
* Called when the user clicks a requirement's action button. Defaults to
|
|
5731
|
-
* `CoinListClient#requirements.handle`, except for `document` requirements,
|
|
5732
|
-
* which open the built-in tax document modal, and wallet requirements with a
|
|
5733
|
-
* host wallet, which open the built-in connect flow. Pass `null` to disable
|
|
5734
|
-
* the action button entirely.
|
|
5735
|
-
*/
|
|
5736
|
-
onRequirementActionOverride?: ((requirement: Requirement) => void) | null;
|
|
5737
|
-
/**
|
|
5738
|
-
* Called when the user clicks "Contact support" on a rejected requirement.
|
|
5739
|
-
* Defaults to `CoinListClient#support.contact`. Pass `null` to disable the
|
|
5740
|
-
* button entirely.
|
|
5741
|
-
*/
|
|
5742
|
-
onContactSupportOverride?: ((requirement: Requirement) => void) | null;
|
|
5743
|
-
/** Host-provided connected wallet, or `null` while none is connected. */
|
|
5744
|
-
wallet?: ConnectWallet | null;
|
|
5745
|
-
/** Called when the user asks to connect a wallet and none is connected yet. */
|
|
5746
|
-
onRequestConnect?: () => void;
|
|
5747
|
-
/** Override the default label for a requirement type. */
|
|
5748
|
-
getLabel?: (requirement: Requirement) => string;
|
|
5749
|
-
/** Override the default description for a requirement type. */
|
|
5750
|
-
getDescription?: (requirement: Requirement) => string | null;
|
|
5751
|
-
/** Requirements pre-fetched on the server. */
|
|
5752
|
-
data?: RequirementsData;
|
|
5753
|
-
/** Options for the inline Sumsub verification flow. */
|
|
5754
|
-
identityVerificationOptions?: {
|
|
5755
|
-
levelName?: KycLevelName;
|
|
5756
|
-
locale?: string;
|
|
5757
|
-
};
|
|
5758
|
-
}
|
|
5759
|
-
interface UseRequirementsChecklistViewModelResult {
|
|
5760
|
-
state: RequirementsChecklistUiState;
|
|
5761
|
-
onEvent: (event: RequirementsChecklistUiEvent) => void;
|
|
5762
|
-
}
|
|
5763
|
-
/**
|
|
5764
|
-
* Drives {@link RequirementsChecklistView}: loads the requirements and their
|
|
5765
|
-
* statuses for one offer option, shapes each row, and owns the three flows the
|
|
5766
|
-
* checklist can open (tax document, wallet connect, identity verification).
|
|
5767
|
-
*/
|
|
5768
|
-
declare function useRequirementsChecklistViewModel(options: UseRequirementsChecklistViewModelOptions): UseRequirementsChecklistViewModelResult;
|
|
5769
|
-
|
|
5770
5723
|
/**
|
|
5771
5724
|
* A display-ready connect-wallet error: the core flow's machine-readable code
|
|
5772
5725
|
* and `retryable` flag, plus copy for the UI.
|
|
@@ -6028,6 +5981,53 @@ interface UseTaxDocumentModalViewModelResult {
|
|
|
6028
5981
|
*/
|
|
6029
5982
|
declare function useTaxDocumentModalViewModel({ isOpen, onClose, onSubmitted, }: UseTaxDocumentModalViewModelOptions): UseTaxDocumentModalViewModelResult;
|
|
6030
5983
|
|
|
5984
|
+
interface UseRequirementsChecklistViewModelOptions {
|
|
5985
|
+
offerId: OfferId;
|
|
5986
|
+
optionId: OfferOptionId;
|
|
5987
|
+
title: string;
|
|
5988
|
+
description: string;
|
|
5989
|
+
onContinue?: () => void;
|
|
5990
|
+
/**
|
|
5991
|
+
* Called when the user clicks a requirement's action button. Defaults to
|
|
5992
|
+
* `CoinListClient#requirements.handle`, except for `document` requirements,
|
|
5993
|
+
* which open the built-in tax document modal, and wallet requirements with a
|
|
5994
|
+
* host wallet, which open the built-in connect flow. Pass `null` to disable
|
|
5995
|
+
* the action button entirely.
|
|
5996
|
+
*/
|
|
5997
|
+
onRequirementActionOverride?: ((requirement: Requirement) => void) | null;
|
|
5998
|
+
/**
|
|
5999
|
+
* Called when the user clicks "Contact support" on a rejected requirement.
|
|
6000
|
+
* Defaults to `CoinListClient#support.contact`. Pass `null` to disable the
|
|
6001
|
+
* button entirely.
|
|
6002
|
+
*/
|
|
6003
|
+
onContactSupportOverride?: ((requirement: Requirement) => void) | null;
|
|
6004
|
+
/** Host-provided connected wallet, or `null` while none is connected. */
|
|
6005
|
+
wallet?: ConnectWallet | null;
|
|
6006
|
+
/** Called when the user asks to connect a wallet and none is connected yet. */
|
|
6007
|
+
onRequestConnect?: () => void;
|
|
6008
|
+
/** Override the default label for a requirement type. */
|
|
6009
|
+
getLabel?: (requirement: Requirement) => string;
|
|
6010
|
+
/** Override the default description for a requirement type. */
|
|
6011
|
+
getDescription?: (requirement: Requirement) => string | null;
|
|
6012
|
+
/** Requirements pre-fetched on the server. */
|
|
6013
|
+
data?: RequirementsData;
|
|
6014
|
+
/** Options for the inline Sumsub verification flow. */
|
|
6015
|
+
identityVerificationOptions?: {
|
|
6016
|
+
levelName?: KycLevelName;
|
|
6017
|
+
locale?: string;
|
|
6018
|
+
};
|
|
6019
|
+
}
|
|
6020
|
+
interface UseRequirementsChecklistViewModelResult {
|
|
6021
|
+
state: RequirementsChecklistUiState;
|
|
6022
|
+
onEvent: (event: RequirementsChecklistUiEvent) => void;
|
|
6023
|
+
}
|
|
6024
|
+
/**
|
|
6025
|
+
* Drives {@link RequirementsChecklistView}: loads the requirements and their
|
|
6026
|
+
* statuses for one offer option, shapes each row, and owns the three flows the
|
|
6027
|
+
* checklist can open (tax document, wallet connect, identity verification).
|
|
6028
|
+
*/
|
|
6029
|
+
declare function useRequirementsChecklistViewModel(options: UseRequirementsChecklistViewModelOptions): UseRequirementsChecklistViewModelResult;
|
|
6030
|
+
|
|
6031
6031
|
interface UseConnectWalletModalViewModelOptions {
|
|
6032
6032
|
isOpen: boolean;
|
|
6033
6033
|
onClose: () => void;
|
|
@@ -6253,7 +6253,7 @@ declare function offerAssetIconUrl(offer: OfferDetail, tokenMetadata: TokenMetad
|
|
|
6253
6253
|
* Date presentation helpers.
|
|
6254
6254
|
*
|
|
6255
6255
|
* Every function takes an explicit `locale`, the way
|
|
6256
|
-
* `@/
|
|
6256
|
+
* `@/universal/core/shared/blockchain/formatters` does: the UI layer never reads the
|
|
6257
6257
|
* locale from React context, so it stays pure and testable. Callers get the
|
|
6258
6258
|
* locale from `useLocale()` in a viewmodel and pass it down.
|
|
6259
6259
|
*/
|