@coinlist-co/react 0.12.2-rc.0fda52c → 0.12.2-rc.5f2ca48
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-STAHYDLY.js → chunk-6NCNF5GF.js} +2 -2
- package/dist/{chunk-KRA6EM2L.js → chunk-VUIDJYHY.js} +18 -3
- package/dist/chunk-VUIDJYHY.js.map +1 -0
- package/dist/{chunk-BNMF2HMW.js → chunk-XCRU3YE2.js} +628 -402
- package/dist/chunk-XCRU3YE2.js.map +1 -0
- package/dist/client/index.cjs +605 -160
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +271 -29
- package/dist/client/index.d.ts +271 -29
- package/dist/client/index.js +294 -21
- package/dist/client/index.js.map +1 -1
- package/dist/server/index.cjs +216 -62
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +10 -2
- package/dist/server/index.d.ts +10 -2
- package/dist/server/index.js +4 -2
- package/dist/server/index.js.map +1 -1
- package/dist/{time-B5YOQxuh.d.ts → time-CTuVDTx6.d.ts} +1 -1
- package/dist/{time-BY3apBpc.d.cts → time-Dv1dejVB.d.cts} +1 -1
- package/dist/{token-registry-snapshot-DyjrA32p.d.cts → token-registry-snapshot-CX5YiSHp.d.cts} +9 -7
- package/dist/{token-registry-snapshot-C1NxdBmF.d.ts → token-registry-snapshot-CzJd2VYU.d.ts} +9 -7
- package/dist/{tokens-namespace-BJfFeowE.d.cts → tokens-namespace-CcvHrw-k.d.cts} +462 -20
- package/dist/{tokens-namespace-BJfFeowE.d.ts → tokens-namespace-CcvHrw-k.d.ts} +462 -20
- package/dist/universal/index.cjs +568 -316
- package/dist/universal/index.cjs.map +1 -1
- package/dist/universal/index.d.cts +38 -6
- package/dist/universal/index.d.ts +38 -6
- package/dist/universal/index.js +22 -2
- package/package.json +1 -1
- package/dist/chunk-BNMF2HMW.js.map +0 -1
- package/dist/chunk-KRA6EM2L.js.map +0 -1
- /package/dist/{chunk-STAHYDLY.js.map → chunk-6NCNF5GF.js.map} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { N as NonEmptyArray, S as SwapQuote, F as FormattedAmountAssetUi, T as TxExplorerUrl, e as FormattedAmountUi, b as FormattedPercentUi, a as ShortenedWalletAddress } from '../token-registry-snapshot-
|
|
4
|
-
export { A as AssetIconUrl, B as BroadcastTxParams, C as ConnectWallet, d as EvmSigner, E as EvmWallet, P as PKCEConfig, f as PKCEParams, c as TokenRegistrySnapshot, W as WriteContractParams, g as generatePKCEParams, o as offerDisplayTokens } from '../token-registry-snapshot-
|
|
1
|
+
import { az as PaginationParams, aA as PaginatedResponse, aC as DecimalString, y as StablecoinSymbol, j as OndoBuyTransaction, B as BlockchainAmount, k as OndoSellTransaction, ag as HttpError, p as Bps, aD as SwapStatus, a6 as AssetDecimals, b as EvmContractAddress, a as EthereumChain, i as OfferSwapContract, aE as Uint256, h as AssetSymbol, q as EvmWalletAddress, aF as KnownAssetSymbol, z as Erc20Asset, aG as Newtype } from '../tokens-namespace-CcvHrw-k.cjs';
|
|
2
|
+
export { aH as AllowWalletParams, aI as AllowWalletResponse, aJ as Asset, aK as AssetCode, e as AssetId, A as AuthorizationCode, aL as Blockchain, a7 as BuildOndoBuyParams, a8 as BuildOndoSellParams, aM as BuildOndoSwapParamsCore, x as CentrifugeNamespace, aN as CentrifugeNamespaceImpl, a1 as CentrifugeOrderReason, a2 as CentrifugeOrderability, aO as CentrifugePositionStatus, aP as CentrifugeVaultBuyTransaction, aQ as CentrifugeVaultClaimTransaction, aR as CentrifugeVaultOffer, G as CentrifugeVaultOfferDetail, aS as CentrifugeVaultPosition, a3 as CentrifugeVaultQuote, aT as CentrifugeVaultReason, a4 as CentrifugeVaultStatus, aU as CentrifugeVaultTransactionCore, aV as Chain, ax as ClientCredentialsOAuth, aW as ClientId, aB as ClientSecret, aX as CodeChallenge, C as CodeVerifier, c as CoinListTokenSaleNamespace, f as CoinListTokenSaleNamespaceImpl, aY as CoinListTokenSaleOffer, J as CoinListTokenSaleOfferDetail, u as Config, aZ as ConnectExternalWalletParams, a_ as CreateKycTokenParams, a$ as CreateParticipationParams, b0 as CreateWalletOwnershipChallengeParams, b1 as Cursor, ae as DebugEvent, b2 as DocumentFormType, _ as DocumentSubmission, b3 as DocumentSubmissionStatus, b4 as DocumentType, b5 as ETHEREUM_CHAINS, E as Erc20Namespace, b6 as Erc20NamespaceImpl, b7 as FaqItem, af as FrontlineEventId, b8 as GetCentrifugeVaultQuoteParams, b9 as GetCentrifugeVaultStatusParams, ba as GetOndoQuoteParams, bb as GetOndoTradingStatusParams, bc as GetSwapAuthorizationParams, bd as GetSwapPreviewParams, be as GetTokenAllowanceParams, bf as GetTokenBalanceParams, bg as HexEncodedTransactionData, ah as HttpResponse, bh as Isin, bi as Iso2CountryCode, Z as KycLevelName, ai as KycToken, bj as Link, bk as ListOptionAddressesParams, aj as LogBinding, ak as LogBindings, al as LogCause, am as LogLevel, an as LogScope, ao as LogValue, L as Logger, bl as MAX_ASSET_DECIMALS, bm as MAX_UINT_256, bn as Milestone, v as OAuthAccessToken, bo as OAuthRefreshToken, aw as OAuthSession, M as Offer, bp as OfferBase, D as OfferDetail, bq as OfferDetailBase, br as OfferEditorial, O as OfferId, bs as OfferOption, X as OfferOptionAddress, ac as OfferOptionAddressId, d as OfferOptionId, bt as OfferOptionSlug, bu as OfferSlug, bv as OfferToken, H as OfferType, bw as OfferVaultContract, w as OffersNamespace, bx as OffersNamespaceImpl, g as OndoNamespace, n as OndoNamespaceImpl, a9 as OndoQuote, by as OndoQuoteDuration, aa as OndoQuoteSize, bz as OndoSellOutcome, bA as OndoSwapOffer, I as OndoSwapOfferDetail, l as OndoSwapTransactionCore, a5 as OndoTradingStatus, m as OrderBookSide, bB as PKCEState, bC as PaginatedResponseDto, P as Participation, bD as ParticipationId, bE as ParticipationStatus, bF as ParticipationsPaginationParams, bG as PauseFlags, bH as Pii, bI as PiiAddress, bJ as PiiJurisdiction, bK as PiiKind, a0 as PinoLoggerOptions, ap as ProductionLogLevel, bL as QueryParamValue, bM as QueryParamValues, aq as RedactedWalletError, bN as RedirectUri, bO as RemoveOptionAddressParams, ar as RequestId, s as Requirement, bP as RequirementActionNeededReason, Y as RequirementId, N as RequirementStatusInfo, V as RequirementStatusValue, Q as RequirementType, R as RequirementsNamespace, t as RequirementsNamespaceImpl, bQ as RpcConfig, as as RpcFailureReason, bR as SOLANA_CHAINS, bS as STABLE_DECIMALS, at as SafeEvent, au as SafeFields, bT as SolanaChain, bU as SubmitDocumentParams, S as SuperstateSwapNamespace, r as SuperstateSwapNamespaceImpl, bV as SuperstateSwapOffer, K as SuperstateSwapOfferDetail, bW as SwapContractRef, bX as SwapPreview, bY as TermItem, bZ as Ticker, ab as TokenIdentifier, ad as TokenLogo, b_ as TokenLogoImage, b$ as TokenLogoUrl, F as TokenMetadata, c0 as TokenRole, T as TokensNamespace, c1 as TokensNamespaceImpl, c2 as Tx, av as UnredactedFields, c3 as WalletAddress, $ as WalletChallengeType, W as WalletError, c4 as WalletOwnershipChallenge, c5 as WalletProtocol, o as WalletsNamespace, c6 as WalletsNamespaceImpl, c7 as apiErrorCode, c8 as assertUint256, c9 as isChain, ca as isOfferType, cb as parseUint256 } from '../tokens-namespace-CcvHrw-k.cjs';
|
|
3
|
+
import { N as NonEmptyArray, S as SwapQuote, F as FormattedAmountAssetUi, T as TxExplorerUrl, e as FormattedAmountUi, b as FormattedPercentUi, a as ShortenedWalletAddress } from '../token-registry-snapshot-CX5YiSHp.cjs';
|
|
4
|
+
export { A as AssetIconUrl, B as BroadcastTxParams, C as ConnectWallet, d as EvmSigner, E as EvmWallet, P as PKCEConfig, f as PKCEParams, c as TokenRegistrySnapshot, W as WriteContractParams, g as generatePKCEParams, o as offerDisplayTokens } from '../token-registry-snapshot-CX5YiSHp.cjs';
|
|
5
5
|
import { TransactionReceipt, Hash, Chain } from 'viem';
|
|
6
|
-
export { E as EpochMillis, M as Millis, S as Seconds, i as isExpired } from '../time-
|
|
6
|
+
export { E as EpochMillis, M as Millis, S as Seconds, i as isExpired } from '../time-Dv1dejVB.cjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Walks every page of a cursor-paginated endpoint and returns the flattened
|
|
@@ -16,6 +16,18 @@ export { E as EpochMillis, M as Millis, S as Seconds, i as isExpired } from '../
|
|
|
16
16
|
*/
|
|
17
17
|
declare function fetchAllPages<A, P extends PaginationParams = PaginationParams>(fetchPage: (params: P) => Promise<PaginatedResponse<A>>, baseParams?: Omit<P, keyof PaginationParams>): Promise<A[]>;
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* How often the Centrifuge checkout refreshes what it is allowed to poll: the
|
|
21
|
+
* vault status and the indicative quote. Both are free - neither spends an
|
|
22
|
+
* attestation - so this is paced for a gate the user can trust rather than
|
|
23
|
+
* for cost.
|
|
24
|
+
*
|
|
25
|
+
* There is no quote TTL beside this. A Centrifuge quote does not expire: it
|
|
26
|
+
* is indicative, the fund prices fulfilment later, and a countdown would
|
|
27
|
+
* imply a commitment the API does not make.
|
|
28
|
+
*/
|
|
29
|
+
declare const CENTRIFUGE_POLL_INTERVAL_MS = 15000;
|
|
30
|
+
|
|
19
31
|
/**
|
|
20
32
|
* How often the Ondo checkout refreshes what it is allowed to poll: the market
|
|
21
33
|
* status and the indicative price. Both are free - neither spends an
|
|
@@ -130,6 +142,26 @@ declare function computeOndoSellPrice(transaction: OndoSellTransaction): Blockch
|
|
|
130
142
|
/** The sooner of Ondo's deadline and now + {@link ONDO_QUOTE_MAX_TTL_MS}. */
|
|
131
143
|
declare function ondoQuoteOfferDeadline(expiresAt: Date, nowMs?: number): Date;
|
|
132
144
|
|
|
145
|
+
/**
|
|
146
|
+
* The CoinList API's error code for an Ondo quote refused because the asset
|
|
147
|
+
* cannot be traded right now: the market is closed or paused, or the asset is
|
|
148
|
+
* paused or closed for the session. It arrives on a 409.
|
|
149
|
+
*
|
|
150
|
+
* One code for all four of Ondo's reasons, because the remedy is the same:
|
|
151
|
+
* wait for the market to open. Ondo pauses for a moment at every US session
|
|
152
|
+
* change (04:00 and 16:00 ET), so a poll can land on one even while
|
|
153
|
+
* `getTradingStatus` reported the asset tradable a second earlier.
|
|
154
|
+
*/
|
|
155
|
+
declare const ONDO_NOT_TRADABLE_CODE = "not_tradable";
|
|
156
|
+
/**
|
|
157
|
+
* Whether `error` is the CoinList API refusing an Ondo quote because the
|
|
158
|
+
* market is not open, as opposed to a request that failed.
|
|
159
|
+
*
|
|
160
|
+
* Total: anything that is not an `HttpError` carrying
|
|
161
|
+
* {@link ONDO_NOT_TRADABLE_CODE} is `false`.
|
|
162
|
+
*/
|
|
163
|
+
declare function isOndoNotTradableError(error: unknown): error is HttpError;
|
|
164
|
+
|
|
133
165
|
/**
|
|
134
166
|
* The Superstate swap contract's ABI, generated verbatim from the shared
|
|
135
167
|
* `TokenSwap` base contract:
|
|
@@ -1291,4 +1323,4 @@ declare const User: {
|
|
|
1291
1323
|
fromDto: (dto: UserDto) => User;
|
|
1292
1324
|
};
|
|
1293
1325
|
|
|
1294
|
-
export { type AmountParseErrorReason, type AmountParseResult, AssetDecimals, AssetSymbol, BPS_DENOM, BlockchainAmount, Bps, DEFAULT_AMOUNT_TO_COMPUTE_PRICE, DEFAULT_ONDO_AMOUNT_TO_COMPUTE_PRICE, DEFAULT_ONDO_SELL_TOKENS_TO_COMPUTE_PRICE, DEFAULT_SLIPPAGE_BPS, DecimalString, ERC20_ABI, Erc20Asset, EthereumChain, EvmContractAddress, EvmWalletAddress, type FormatAmountOptions, FormattedAmountAssetUi, FormattedAmountUi, FormattedPercentUi, InvariantError, KnownAssetSymbol, MathError, NA_AMOUNT_ASSET_UI, NonEmptyArray, NotAuthenticatedError, NotImplementedError, ONDO_POLL_INTERVAL_MS, ONDO_QUOTE_MAX_TTL_MS, ONDO_SETTLEMENT_ASSET, ONDO_SUPPORTED_INPUT_ASSETS, OfferSwapContract, OndoBuyTransaction, OndoSellTransaction, PaginatedResponse, PaginationParams, SLIPPAGE_OPTIONS_BPS, SUPERSTATE_ISSUER_NAME, SUPERSTATE_SUPPORTED_INPUT_ASSETS, SUPERSTATE_SWAP_ABI, SUPERSTATE_SWAP_CONTRACT_ADDRESS_SEPOLIA, SWAP_LEVEL, SWAP_POLL_INTERVAL_MS, ShortenedWalletAddress, StablecoinSymbol, SwapQuote, SwapStatus, TOKEN_REGISTRY, TxExplorerUrl, USDC, USDC_SYMBOL, USDT, USDT_SYMBOL, Uint256, User, UserEmail, UserId, ValidationError, applyBps, assetAmount, blockchainAmountFromRawOrThrow, chainFromId, computeOndoBuyPrice, computeOndoSellPrice, computePrice, computeSlip, decodeSwappedOutputAmount, fetchAllPages, formatAmount, formatBpsAsPercent, formatCompactAmount, formatRawAmount, formatShareAmount, formattedPricePerShare, formattedUsdPrice, getChainId, getNetworkName, isSwapAvailable, ondoQuoteOfferDeadline, parseBlockchainAmount, shortenAddress, superstateSwapContractAddress, swapSpender, txExplorerUrl, usdAmount, viemChain };
|
|
1326
|
+
export { type AmountParseErrorReason, type AmountParseResult, AssetDecimals, AssetSymbol, BPS_DENOM, BlockchainAmount, Bps, CENTRIFUGE_POLL_INTERVAL_MS, DEFAULT_AMOUNT_TO_COMPUTE_PRICE, DEFAULT_ONDO_AMOUNT_TO_COMPUTE_PRICE, DEFAULT_ONDO_SELL_TOKENS_TO_COMPUTE_PRICE, DEFAULT_SLIPPAGE_BPS, DecimalString, ERC20_ABI, Erc20Asset, EthereumChain, EvmContractAddress, EvmWalletAddress, type FormatAmountOptions, FormattedAmountAssetUi, FormattedAmountUi, FormattedPercentUi, HttpError, InvariantError, KnownAssetSymbol, MathError, NA_AMOUNT_ASSET_UI, NonEmptyArray, NotAuthenticatedError, NotImplementedError, ONDO_NOT_TRADABLE_CODE, ONDO_POLL_INTERVAL_MS, ONDO_QUOTE_MAX_TTL_MS, ONDO_SETTLEMENT_ASSET, ONDO_SUPPORTED_INPUT_ASSETS, OfferSwapContract, OndoBuyTransaction, OndoSellTransaction, PaginatedResponse, PaginationParams, SLIPPAGE_OPTIONS_BPS, SUPERSTATE_ISSUER_NAME, SUPERSTATE_SUPPORTED_INPUT_ASSETS, SUPERSTATE_SWAP_ABI, SUPERSTATE_SWAP_CONTRACT_ADDRESS_SEPOLIA, SWAP_LEVEL, SWAP_POLL_INTERVAL_MS, ShortenedWalletAddress, StablecoinSymbol, SwapQuote, SwapStatus, TOKEN_REGISTRY, TxExplorerUrl, USDC, USDC_SYMBOL, USDT, USDT_SYMBOL, Uint256, User, UserEmail, UserId, ValidationError, applyBps, assetAmount, blockchainAmountFromRawOrThrow, chainFromId, computeOndoBuyPrice, computeOndoSellPrice, computePrice, computeSlip, decodeSwappedOutputAmount, fetchAllPages, formatAmount, formatBpsAsPercent, formatCompactAmount, formatRawAmount, formatShareAmount, formattedPricePerShare, formattedUsdPrice, getChainId, getNetworkName, isOndoNotTradableError, isSwapAvailable, ondoQuoteOfferDeadline, parseBlockchainAmount, shortenAddress, superstateSwapContractAddress, swapSpender, txExplorerUrl, usdAmount, viemChain };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { N as NonEmptyArray, S as SwapQuote, F as FormattedAmountAssetUi, T as TxExplorerUrl, e as FormattedAmountUi, b as FormattedPercentUi, a as ShortenedWalletAddress } from '../token-registry-snapshot-
|
|
4
|
-
export { A as AssetIconUrl, B as BroadcastTxParams, C as ConnectWallet, d as EvmSigner, E as EvmWallet, P as PKCEConfig, f as PKCEParams, c as TokenRegistrySnapshot, W as WriteContractParams, g as generatePKCEParams, o as offerDisplayTokens } from '../token-registry-snapshot-
|
|
1
|
+
import { az as PaginationParams, aA as PaginatedResponse, aC as DecimalString, y as StablecoinSymbol, j as OndoBuyTransaction, B as BlockchainAmount, k as OndoSellTransaction, ag as HttpError, p as Bps, aD as SwapStatus, a6 as AssetDecimals, b as EvmContractAddress, a as EthereumChain, i as OfferSwapContract, aE as Uint256, h as AssetSymbol, q as EvmWalletAddress, aF as KnownAssetSymbol, z as Erc20Asset, aG as Newtype } from '../tokens-namespace-CcvHrw-k.js';
|
|
2
|
+
export { aH as AllowWalletParams, aI as AllowWalletResponse, aJ as Asset, aK as AssetCode, e as AssetId, A as AuthorizationCode, aL as Blockchain, a7 as BuildOndoBuyParams, a8 as BuildOndoSellParams, aM as BuildOndoSwapParamsCore, x as CentrifugeNamespace, aN as CentrifugeNamespaceImpl, a1 as CentrifugeOrderReason, a2 as CentrifugeOrderability, aO as CentrifugePositionStatus, aP as CentrifugeVaultBuyTransaction, aQ as CentrifugeVaultClaimTransaction, aR as CentrifugeVaultOffer, G as CentrifugeVaultOfferDetail, aS as CentrifugeVaultPosition, a3 as CentrifugeVaultQuote, aT as CentrifugeVaultReason, a4 as CentrifugeVaultStatus, aU as CentrifugeVaultTransactionCore, aV as Chain, ax as ClientCredentialsOAuth, aW as ClientId, aB as ClientSecret, aX as CodeChallenge, C as CodeVerifier, c as CoinListTokenSaleNamespace, f as CoinListTokenSaleNamespaceImpl, aY as CoinListTokenSaleOffer, J as CoinListTokenSaleOfferDetail, u as Config, aZ as ConnectExternalWalletParams, a_ as CreateKycTokenParams, a$ as CreateParticipationParams, b0 as CreateWalletOwnershipChallengeParams, b1 as Cursor, ae as DebugEvent, b2 as DocumentFormType, _ as DocumentSubmission, b3 as DocumentSubmissionStatus, b4 as DocumentType, b5 as ETHEREUM_CHAINS, E as Erc20Namespace, b6 as Erc20NamespaceImpl, b7 as FaqItem, af as FrontlineEventId, b8 as GetCentrifugeVaultQuoteParams, b9 as GetCentrifugeVaultStatusParams, ba as GetOndoQuoteParams, bb as GetOndoTradingStatusParams, bc as GetSwapAuthorizationParams, bd as GetSwapPreviewParams, be as GetTokenAllowanceParams, bf as GetTokenBalanceParams, bg as HexEncodedTransactionData, ah as HttpResponse, bh as Isin, bi as Iso2CountryCode, Z as KycLevelName, ai as KycToken, bj as Link, bk as ListOptionAddressesParams, aj as LogBinding, ak as LogBindings, al as LogCause, am as LogLevel, an as LogScope, ao as LogValue, L as Logger, bl as MAX_ASSET_DECIMALS, bm as MAX_UINT_256, bn as Milestone, v as OAuthAccessToken, bo as OAuthRefreshToken, aw as OAuthSession, M as Offer, bp as OfferBase, D as OfferDetail, bq as OfferDetailBase, br as OfferEditorial, O as OfferId, bs as OfferOption, X as OfferOptionAddress, ac as OfferOptionAddressId, d as OfferOptionId, bt as OfferOptionSlug, bu as OfferSlug, bv as OfferToken, H as OfferType, bw as OfferVaultContract, w as OffersNamespace, bx as OffersNamespaceImpl, g as OndoNamespace, n as OndoNamespaceImpl, a9 as OndoQuote, by as OndoQuoteDuration, aa as OndoQuoteSize, bz as OndoSellOutcome, bA as OndoSwapOffer, I as OndoSwapOfferDetail, l as OndoSwapTransactionCore, a5 as OndoTradingStatus, m as OrderBookSide, bB as PKCEState, bC as PaginatedResponseDto, P as Participation, bD as ParticipationId, bE as ParticipationStatus, bF as ParticipationsPaginationParams, bG as PauseFlags, bH as Pii, bI as PiiAddress, bJ as PiiJurisdiction, bK as PiiKind, a0 as PinoLoggerOptions, ap as ProductionLogLevel, bL as QueryParamValue, bM as QueryParamValues, aq as RedactedWalletError, bN as RedirectUri, bO as RemoveOptionAddressParams, ar as RequestId, s as Requirement, bP as RequirementActionNeededReason, Y as RequirementId, N as RequirementStatusInfo, V as RequirementStatusValue, Q as RequirementType, R as RequirementsNamespace, t as RequirementsNamespaceImpl, bQ as RpcConfig, as as RpcFailureReason, bR as SOLANA_CHAINS, bS as STABLE_DECIMALS, at as SafeEvent, au as SafeFields, bT as SolanaChain, bU as SubmitDocumentParams, S as SuperstateSwapNamespace, r as SuperstateSwapNamespaceImpl, bV as SuperstateSwapOffer, K as SuperstateSwapOfferDetail, bW as SwapContractRef, bX as SwapPreview, bY as TermItem, bZ as Ticker, ab as TokenIdentifier, ad as TokenLogo, b_ as TokenLogoImage, b$ as TokenLogoUrl, F as TokenMetadata, c0 as TokenRole, T as TokensNamespace, c1 as TokensNamespaceImpl, c2 as Tx, av as UnredactedFields, c3 as WalletAddress, $ as WalletChallengeType, W as WalletError, c4 as WalletOwnershipChallenge, c5 as WalletProtocol, o as WalletsNamespace, c6 as WalletsNamespaceImpl, c7 as apiErrorCode, c8 as assertUint256, c9 as isChain, ca as isOfferType, cb as parseUint256 } from '../tokens-namespace-CcvHrw-k.js';
|
|
3
|
+
import { N as NonEmptyArray, S as SwapQuote, F as FormattedAmountAssetUi, T as TxExplorerUrl, e as FormattedAmountUi, b as FormattedPercentUi, a as ShortenedWalletAddress } from '../token-registry-snapshot-CzJd2VYU.js';
|
|
4
|
+
export { A as AssetIconUrl, B as BroadcastTxParams, C as ConnectWallet, d as EvmSigner, E as EvmWallet, P as PKCEConfig, f as PKCEParams, c as TokenRegistrySnapshot, W as WriteContractParams, g as generatePKCEParams, o as offerDisplayTokens } from '../token-registry-snapshot-CzJd2VYU.js';
|
|
5
5
|
import { TransactionReceipt, Hash, Chain } from 'viem';
|
|
6
|
-
export { E as EpochMillis, M as Millis, S as Seconds, i as isExpired } from '../time-
|
|
6
|
+
export { E as EpochMillis, M as Millis, S as Seconds, i as isExpired } from '../time-CTuVDTx6.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Walks every page of a cursor-paginated endpoint and returns the flattened
|
|
@@ -16,6 +16,18 @@ export { E as EpochMillis, M as Millis, S as Seconds, i as isExpired } from '../
|
|
|
16
16
|
*/
|
|
17
17
|
declare function fetchAllPages<A, P extends PaginationParams = PaginationParams>(fetchPage: (params: P) => Promise<PaginatedResponse<A>>, baseParams?: Omit<P, keyof PaginationParams>): Promise<A[]>;
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* How often the Centrifuge checkout refreshes what it is allowed to poll: the
|
|
21
|
+
* vault status and the indicative quote. Both are free - neither spends an
|
|
22
|
+
* attestation - so this is paced for a gate the user can trust rather than
|
|
23
|
+
* for cost.
|
|
24
|
+
*
|
|
25
|
+
* There is no quote TTL beside this. A Centrifuge quote does not expire: it
|
|
26
|
+
* is indicative, the fund prices fulfilment later, and a countdown would
|
|
27
|
+
* imply a commitment the API does not make.
|
|
28
|
+
*/
|
|
29
|
+
declare const CENTRIFUGE_POLL_INTERVAL_MS = 15000;
|
|
30
|
+
|
|
19
31
|
/**
|
|
20
32
|
* How often the Ondo checkout refreshes what it is allowed to poll: the market
|
|
21
33
|
* status and the indicative price. Both are free - neither spends an
|
|
@@ -130,6 +142,26 @@ declare function computeOndoSellPrice(transaction: OndoSellTransaction): Blockch
|
|
|
130
142
|
/** The sooner of Ondo's deadline and now + {@link ONDO_QUOTE_MAX_TTL_MS}. */
|
|
131
143
|
declare function ondoQuoteOfferDeadline(expiresAt: Date, nowMs?: number): Date;
|
|
132
144
|
|
|
145
|
+
/**
|
|
146
|
+
* The CoinList API's error code for an Ondo quote refused because the asset
|
|
147
|
+
* cannot be traded right now: the market is closed or paused, or the asset is
|
|
148
|
+
* paused or closed for the session. It arrives on a 409.
|
|
149
|
+
*
|
|
150
|
+
* One code for all four of Ondo's reasons, because the remedy is the same:
|
|
151
|
+
* wait for the market to open. Ondo pauses for a moment at every US session
|
|
152
|
+
* change (04:00 and 16:00 ET), so a poll can land on one even while
|
|
153
|
+
* `getTradingStatus` reported the asset tradable a second earlier.
|
|
154
|
+
*/
|
|
155
|
+
declare const ONDO_NOT_TRADABLE_CODE = "not_tradable";
|
|
156
|
+
/**
|
|
157
|
+
* Whether `error` is the CoinList API refusing an Ondo quote because the
|
|
158
|
+
* market is not open, as opposed to a request that failed.
|
|
159
|
+
*
|
|
160
|
+
* Total: anything that is not an `HttpError` carrying
|
|
161
|
+
* {@link ONDO_NOT_TRADABLE_CODE} is `false`.
|
|
162
|
+
*/
|
|
163
|
+
declare function isOndoNotTradableError(error: unknown): error is HttpError;
|
|
164
|
+
|
|
133
165
|
/**
|
|
134
166
|
* The Superstate swap contract's ABI, generated verbatim from the shared
|
|
135
167
|
* `TokenSwap` base contract:
|
|
@@ -1291,4 +1323,4 @@ declare const User: {
|
|
|
1291
1323
|
fromDto: (dto: UserDto) => User;
|
|
1292
1324
|
};
|
|
1293
1325
|
|
|
1294
|
-
export { type AmountParseErrorReason, type AmountParseResult, AssetDecimals, AssetSymbol, BPS_DENOM, BlockchainAmount, Bps, DEFAULT_AMOUNT_TO_COMPUTE_PRICE, DEFAULT_ONDO_AMOUNT_TO_COMPUTE_PRICE, DEFAULT_ONDO_SELL_TOKENS_TO_COMPUTE_PRICE, DEFAULT_SLIPPAGE_BPS, DecimalString, ERC20_ABI, Erc20Asset, EthereumChain, EvmContractAddress, EvmWalletAddress, type FormatAmountOptions, FormattedAmountAssetUi, FormattedAmountUi, FormattedPercentUi, InvariantError, KnownAssetSymbol, MathError, NA_AMOUNT_ASSET_UI, NonEmptyArray, NotAuthenticatedError, NotImplementedError, ONDO_POLL_INTERVAL_MS, ONDO_QUOTE_MAX_TTL_MS, ONDO_SETTLEMENT_ASSET, ONDO_SUPPORTED_INPUT_ASSETS, OfferSwapContract, OndoBuyTransaction, OndoSellTransaction, PaginatedResponse, PaginationParams, SLIPPAGE_OPTIONS_BPS, SUPERSTATE_ISSUER_NAME, SUPERSTATE_SUPPORTED_INPUT_ASSETS, SUPERSTATE_SWAP_ABI, SUPERSTATE_SWAP_CONTRACT_ADDRESS_SEPOLIA, SWAP_LEVEL, SWAP_POLL_INTERVAL_MS, ShortenedWalletAddress, StablecoinSymbol, SwapQuote, SwapStatus, TOKEN_REGISTRY, TxExplorerUrl, USDC, USDC_SYMBOL, USDT, USDT_SYMBOL, Uint256, User, UserEmail, UserId, ValidationError, applyBps, assetAmount, blockchainAmountFromRawOrThrow, chainFromId, computeOndoBuyPrice, computeOndoSellPrice, computePrice, computeSlip, decodeSwappedOutputAmount, fetchAllPages, formatAmount, formatBpsAsPercent, formatCompactAmount, formatRawAmount, formatShareAmount, formattedPricePerShare, formattedUsdPrice, getChainId, getNetworkName, isSwapAvailable, ondoQuoteOfferDeadline, parseBlockchainAmount, shortenAddress, superstateSwapContractAddress, swapSpender, txExplorerUrl, usdAmount, viemChain };
|
|
1326
|
+
export { type AmountParseErrorReason, type AmountParseResult, AssetDecimals, AssetSymbol, BPS_DENOM, BlockchainAmount, Bps, CENTRIFUGE_POLL_INTERVAL_MS, DEFAULT_AMOUNT_TO_COMPUTE_PRICE, DEFAULT_ONDO_AMOUNT_TO_COMPUTE_PRICE, DEFAULT_ONDO_SELL_TOKENS_TO_COMPUTE_PRICE, DEFAULT_SLIPPAGE_BPS, DecimalString, ERC20_ABI, Erc20Asset, EthereumChain, EvmContractAddress, EvmWalletAddress, type FormatAmountOptions, FormattedAmountAssetUi, FormattedAmountUi, FormattedPercentUi, HttpError, InvariantError, KnownAssetSymbol, MathError, NA_AMOUNT_ASSET_UI, NonEmptyArray, NotAuthenticatedError, NotImplementedError, ONDO_NOT_TRADABLE_CODE, ONDO_POLL_INTERVAL_MS, ONDO_QUOTE_MAX_TTL_MS, ONDO_SETTLEMENT_ASSET, ONDO_SUPPORTED_INPUT_ASSETS, OfferSwapContract, OndoBuyTransaction, OndoSellTransaction, PaginatedResponse, PaginationParams, SLIPPAGE_OPTIONS_BPS, SUPERSTATE_ISSUER_NAME, SUPERSTATE_SUPPORTED_INPUT_ASSETS, SUPERSTATE_SWAP_ABI, SUPERSTATE_SWAP_CONTRACT_ADDRESS_SEPOLIA, SWAP_LEVEL, SWAP_POLL_INTERVAL_MS, ShortenedWalletAddress, StablecoinSymbol, SwapQuote, SwapStatus, TOKEN_REGISTRY, TxExplorerUrl, USDC, USDC_SYMBOL, USDT, USDT_SYMBOL, Uint256, User, UserEmail, UserId, ValidationError, applyBps, assetAmount, blockchainAmountFromRawOrThrow, chainFromId, computeOndoBuyPrice, computeOndoSellPrice, computePrice, computeSlip, decodeSwappedOutputAmount, fetchAllPages, formatAmount, formatBpsAsPercent, formatCompactAmount, formatRawAmount, formatShareAmount, formattedPricePerShare, formattedUsdPrice, getChainId, getNetworkName, isOndoNotTradableError, isSwapAvailable, ondoQuoteOfferDeadline, parseBlockchainAmount, shortenAddress, superstateSwapContractAddress, swapSpender, txExplorerUrl, usdAmount, viemChain };
|
package/dist/universal/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AuthorizationCode,
|
|
3
3
|
BPS_DENOM,
|
|
4
|
+
CENTRIFUGE_POLL_INTERVAL_MS,
|
|
4
5
|
ClientId,
|
|
5
6
|
ClientSecret,
|
|
6
7
|
CodeChallenge,
|
|
@@ -9,6 +10,7 @@ import {
|
|
|
9
10
|
DEFAULT_ONDO_AMOUNT_TO_COMPUTE_PRICE,
|
|
10
11
|
DEFAULT_ONDO_SELL_TOKENS_TO_COMPUTE_PRICE,
|
|
11
12
|
DEFAULT_SLIPPAGE_BPS,
|
|
13
|
+
ONDO_NOT_TRADABLE_CODE,
|
|
12
14
|
ONDO_POLL_INTERVAL_MS,
|
|
13
15
|
ONDO_QUOTE_MAX_TTL_MS,
|
|
14
16
|
ONDO_SETTLEMENT_ASSET,
|
|
@@ -41,12 +43,13 @@ import {
|
|
|
41
43
|
decodeSwappedOutputAmount,
|
|
42
44
|
formattedPricePerShare,
|
|
43
45
|
generatePKCEParams,
|
|
46
|
+
isOndoNotTradableError,
|
|
44
47
|
isSwapAvailable,
|
|
45
48
|
offerDisplayTokens,
|
|
46
49
|
ondoQuoteOfferDeadline,
|
|
47
50
|
superstateSwapContractAddress,
|
|
48
51
|
swapSpender
|
|
49
|
-
} from "../chunk-
|
|
52
|
+
} from "../chunk-VUIDJYHY.js";
|
|
50
53
|
import {
|
|
51
54
|
AllowWalletResponse,
|
|
52
55
|
Asset,
|
|
@@ -58,6 +61,12 @@ import {
|
|
|
58
61
|
Blockchain,
|
|
59
62
|
BlockchainAmount,
|
|
60
63
|
Bps,
|
|
64
|
+
CentrifugeNamespaceImpl,
|
|
65
|
+
CentrifugeVaultBuyTransaction,
|
|
66
|
+
CentrifugeVaultClaimTransaction,
|
|
67
|
+
CentrifugeVaultPosition,
|
|
68
|
+
CentrifugeVaultQuote,
|
|
69
|
+
CentrifugeVaultStatus,
|
|
61
70
|
Chain,
|
|
62
71
|
ClientCredentialsOAuth,
|
|
63
72
|
CoinListTokenSaleNamespaceImpl,
|
|
@@ -108,6 +117,7 @@ import {
|
|
|
108
117
|
OfferSlug,
|
|
109
118
|
OfferSwapContract,
|
|
110
119
|
OfferToken,
|
|
120
|
+
OfferVaultContract,
|
|
111
121
|
OndoBuyTransaction,
|
|
112
122
|
OndoNamespaceImpl,
|
|
113
123
|
OndoQuote,
|
|
@@ -170,7 +180,7 @@ import {
|
|
|
170
180
|
txExplorerUrl,
|
|
171
181
|
usdAmount,
|
|
172
182
|
viemChain
|
|
173
|
-
} from "../chunk-
|
|
183
|
+
} from "../chunk-XCRU3YE2.js";
|
|
174
184
|
export {
|
|
175
185
|
AllowWalletResponse,
|
|
176
186
|
Asset,
|
|
@@ -184,6 +194,13 @@ export {
|
|
|
184
194
|
Blockchain,
|
|
185
195
|
BlockchainAmount,
|
|
186
196
|
Bps,
|
|
197
|
+
CENTRIFUGE_POLL_INTERVAL_MS,
|
|
198
|
+
CentrifugeNamespaceImpl,
|
|
199
|
+
CentrifugeVaultBuyTransaction,
|
|
200
|
+
CentrifugeVaultClaimTransaction,
|
|
201
|
+
CentrifugeVaultPosition,
|
|
202
|
+
CentrifugeVaultQuote,
|
|
203
|
+
CentrifugeVaultStatus,
|
|
187
204
|
Chain,
|
|
188
205
|
ClientCredentialsOAuth,
|
|
189
206
|
ClientId,
|
|
@@ -230,6 +247,7 @@ export {
|
|
|
230
247
|
NotImplementedError,
|
|
231
248
|
OAuthRefreshToken,
|
|
232
249
|
OAuthSession,
|
|
250
|
+
ONDO_NOT_TRADABLE_CODE,
|
|
233
251
|
ONDO_POLL_INTERVAL_MS,
|
|
234
252
|
ONDO_QUOTE_MAX_TTL_MS,
|
|
235
253
|
ONDO_SETTLEMENT_ASSET,
|
|
@@ -246,6 +264,7 @@ export {
|
|
|
246
264
|
OfferSlug,
|
|
247
265
|
OfferSwapContract,
|
|
248
266
|
OfferToken,
|
|
267
|
+
OfferVaultContract,
|
|
249
268
|
OffersNamespaceImpl,
|
|
250
269
|
OndoBuyTransaction,
|
|
251
270
|
OndoNamespaceImpl,
|
|
@@ -330,6 +349,7 @@ export {
|
|
|
330
349
|
isChain,
|
|
331
350
|
isExpired,
|
|
332
351
|
isOfferType,
|
|
352
|
+
isOndoNotTradableError,
|
|
333
353
|
isSwapAvailable,
|
|
334
354
|
offerDisplayTokens,
|
|
335
355
|
ondoQuoteOfferDeadline,
|