@coinlist-co/react 0.12.2-rc.abd9d38 → 0.12.2-rc.bc20f5b
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/README.md +10 -0
- package/dist/{chunk-45LAPB7U.js → chunk-3WW5FLT7.js} +2 -2
- package/dist/{chunk-HDJEDOS4.js → chunk-C6GF7MDF.js} +759 -412
- package/dist/chunk-C6GF7MDF.js.map +1 -0
- package/dist/{chunk-M7WDZZPX.js → chunk-IZJ4JSSC.js} +69 -4
- package/dist/chunk-IZJ4JSSC.js.map +1 -0
- package/dist/client/index.cjs +11305 -7943
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +1545 -10
- package/dist/client/index.d.ts +1545 -10
- package/dist/client/index.js +7725 -4781
- package/dist/client/index.js.map +1 -1
- package/dist/server/index.cjs +347 -62
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +6 -2
- package/dist/server/index.d.ts +6 -2
- package/dist/server/index.js +4 -2
- package/dist/server/index.js.map +1 -1
- package/dist/{tokens-namespace-DrwRi0AQ.d.cts → time-CVZpAkGY.d.cts} +815 -192
- package/dist/{tokens-namespace-DrwRi0AQ.d.ts → time-CVZpAkGY.d.ts} +815 -192
- package/dist/{token-registry-snapshot-C-Qs3Lgs.d.ts → token-registry-snapshot-BkwA8KmD.d.ts} +74 -8
- package/dist/{token-registry-snapshot-CpzLmsc2.d.cts → token-registry-snapshot-bR14QehS.d.cts} +74 -8
- package/dist/universal/index.cjs +812 -385
- package/dist/universal/index.cjs.map +1 -1
- package/dist/universal/index.d.cts +54 -6
- package/dist/universal/index.d.ts +54 -6
- package/dist/universal/index.js +30 -2
- package/package.json +1 -1
- package/dist/chunk-HDJEDOS4.js.map +0 -1
- package/dist/chunk-M7WDZZPX.js.map +0 -1
- package/dist/time-BOCS1TbH.d.cts +0 -50
- package/dist/time-C7mhO5_a.d.ts +0 -50
- /package/dist/{chunk-45LAPB7U.js.map → chunk-3WW5FLT7.js.map} +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { N as NonEmptyArray, S as SwapQuote, F as FormattedAmountAssetUi, T as TxExplorerUrl,
|
|
4
|
-
export { A as AssetIconUrl, B as BroadcastTxParams, C as ConnectWallet,
|
|
1
|
+
import { aI as PaginationParams, aJ as PaginatedResponse, a as EthereumChain, b as EvmContractAddress, J as TokenMetadata, aL as OfferToken, K as CentrifugeVaultOfferDetail, aM as DecimalString, G as StablecoinSymbol, o as OndoBuyTransaction, B as BlockchainAmount, p as OndoSellTransaction, ap as HttpError, u as Bps, aN as SwapStatus, a9 as AssetDecimals, n as OfferSwapContract, aO as Uint256, d as AssetSymbol, v as EvmWalletAddress, aP as KnownAssetSymbol, H as Erc20Asset, aQ as Newtype } from '../time-CVZpAkGY.cjs';
|
|
2
|
+
export { aR as AllowWalletParams, aS as AllowWalletResponse, aT as Asset, aU as AssetCode, k as AssetId, _ as AsyncOfferDetail, Z as AsyncOfferType, A as AuthorizationCode, aV as Blockchain, aa as BuildCentrifugeVaultBuyParams, ae as BuildOndoBuyParams, af as BuildOndoSellParams, aW as BuildOndoSwapParamsCore, f as CentrifugeClaimDirection, c as CentrifugeNamespace, g as CentrifugeNamespaceImpl, ab as CentrifugeOrderReason, ac as CentrifugeOrderability, aX as CentrifugePositionStatus, e as CentrifugeVaultBuyTransaction, aY as CentrifugeVaultClaimProceedsTransaction, aZ as CentrifugeVaultClaimTransaction, aj as CentrifugeVaultLeg, X as CentrifugeVaultLegId, a_ as CentrifugeVaultOffer, a$ as CentrifugeVaultPosition, b0 as CentrifugeVaultReason, b1 as CentrifugeVaultRedeemPosition, al as CentrifugeVaultStatus, b2 as CentrifugeVaultTransactionCore, b3 as CentrifugeWalletParams, b4 as Chain, aG as ClientCredentialsOAuth, b5 as ClientId, aK as ClientSecret, b6 as CodeChallenge, C as CodeVerifier, h as CoinListTokenSaleNamespace, l as CoinListTokenSaleNamespaceImpl, b7 as CoinListTokenSaleOffer, Q as CoinListTokenSaleOfferDetail, z as Config, b8 as ConnectExternalWalletParams, b9 as CreateKycTokenParams, ba as CreateParticipationParams, bb as CreateWalletOwnershipChallengeParams, bc as Cursor, an as DebugEvent, bd as DocumentFormType, a6 as DocumentSubmission, be as DocumentSubmissionStatus, bf as DocumentType, bg as ETHEREUM_CHAINS, bh as EpochMillis, E as Erc20Namespace, bi as Erc20NamespaceImpl, bj as FaqItem, ao as FrontlineEventId, bk as GetCentrifugeVaultStatusParams, bl as GetOndoQuoteParams, bm as GetOndoTradingStatusParams, bn as GetSwapAuthorizationParams, bo as GetSwapPreviewParams, bp as GetTokenAllowanceParams, bq as GetTokenBalanceParams, br as HexEncodedTransactionData, aq as HttpResponse, bs as Isin, bt as Iso2CountryCode, a5 as KycLevelName, ar as KycToken, bu as Link, bv as ListOptionAddressesParams, as as LogBinding, at as LogBindings, au as LogCause, av as LogLevel, aw as LogScope, ax as LogValue, L as Logger, bw as MAX_ASSET_DECIMALS, bx as MAX_UINT_256, by as Milestone, bz as Millis, D as OAuthAccessToken, bA as OAuthRefreshToken, aF as OAuthSession, $ as Offer, bB as OfferBase, I as OfferDetail, bC as OfferDetailBase, bD as OfferEditorial, i as OfferId, bE as OfferOption, a3 as OfferOptionAddress, ak as OfferOptionAddressId, j as OfferOptionId, bF as OfferOptionSlug, bG as OfferSlug, M as OfferType, O as OfferVaultContract, F as OffersNamespace, bH as OffersNamespaceImpl, m as OndoNamespace, s as OndoNamespaceImpl, ag as OndoQuote, bI as OndoQuoteDuration, ah as OndoQuoteSize, bJ as OndoSellOutcome, bK as OndoSwapOffer, N as OndoSwapOfferDetail, q as OndoSwapTransactionCore, ad as OndoTradingStatus, r as OrderBookSide, bL as PKCEState, bM as PaginatedResponseDto, P as Participation, bN as ParticipationId, bO as ParticipationStatus, bP as ParticipationsPaginationParams, bQ as PauseFlags, bR as Pii, bS as PiiAddress, bT as PiiJurisdiction, bU as PiiKind, a8 as PinoLoggerOptions, ay as ProductionLogLevel, bV as QueryParamValue, bW as QueryParamValues, az as RedactedWalletError, bX as RedirectUri, bY as RemoveOptionAddressParams, aA as RequestId, x as Requirement, bZ as RequirementActionNeededReason, a4 as RequirementId, a0 as RequirementStatusInfo, a2 as RequirementStatusValue, a1 as RequirementType, R as RequirementsNamespace, y as RequirementsNamespaceImpl, b_ as RpcConfig, aB as RpcFailureReason, b$ as SOLANA_CHAINS, c0 as STABLE_DECIMALS, aC as SafeEvent, aD as SafeFields, Y as Seconds, c1 as SolanaChain, c2 as SubmitDocumentParams, S as SuperstateSwapNamespace, w as SuperstateSwapNamespaceImpl, c3 as SuperstateSwapOffer, V as SuperstateSwapOfferDetail, c4 as SwapContractRef, c5 as SwapPreview, c6 as TermItem, c7 as Ticker, ai as TokenIdentifier, am as TokenLogo, c8 as TokenLogoImage, c9 as TokenLogoUrl, ca as TokenRole, T as TokensNamespace, cb as TokensNamespaceImpl, cc as Tx, aE as UnredactedFields, cd as WalletAddress, a7 as WalletChallengeType, W as WalletError, ce as WalletOwnershipChallenge, cf as WalletProtocol, t as WalletsNamespace, cg as WalletsNamespaceImpl, ch as apiErrorCode, ci as assertUint256, cj as isChain, ck as isExpired, cl as isOfferType, cm as parseUint256 } from '../time-CVZpAkGY.cjs';
|
|
3
|
+
import { N as NonEmptyArray, S as SwapQuote, F as FormattedAmountAssetUi, T as TxExplorerUrl, h as FormattedAmountUi, b as FormattedPercentUi, a as ShortenedWalletAddress } from '../token-registry-snapshot-bR14QehS.cjs';
|
|
4
|
+
export { A as AssetIconUrl, B as BroadcastTxParams, C as ConnectWallet, e as EvmSigner, E as EvmWallet, f as ExternalWalletAdapter, P as PKCEConfig, i as PKCEParams, d as TokenRegistrySnapshot, c as WalletLabelResolver, W as WalletSelection, g as WriteContractParams, j as generatePKCEParams, o as offerDisplayTokens } from '../token-registry-snapshot-bR14QehS.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-BOCS1TbH.cjs';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* Walks every page of a cursor-paginated endpoint and returns the flattened
|
|
@@ -16,6 +15,55 @@ export { E as EpochMillis, M as Millis, S as Seconds, i as isExpired } from '../
|
|
|
16
15
|
*/
|
|
17
16
|
declare function fetchAllPages<A, P extends PaginationParams = PaginationParams>(fetchPage: (params: P) => Promise<PaginatedResponse<A>>, baseParams?: Omit<P, keyof PaginationParams>): Promise<A[]>;
|
|
18
17
|
|
|
18
|
+
/**
|
|
19
|
+
* How often the Centrifuge checkout refreshes the vault status. The read is
|
|
20
|
+
* free - it spends no attestation - so this is paced for a gate the user can
|
|
21
|
+
* trust rather than for cost.
|
|
22
|
+
*/
|
|
23
|
+
declare const CENTRIFUGE_POLL_INTERVAL_MS = 15000;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* One chain a vault offer runs on, with everything a screen needs to read and
|
|
27
|
+
* show a position there: the proxy every request and claim goes through, the
|
|
28
|
+
* share token it issues, and the funding token it is paid in.
|
|
29
|
+
*
|
|
30
|
+
* The share token's `symbol` is what every `/v1/centrifuge/vault/*` call is
|
|
31
|
+
* keyed by.
|
|
32
|
+
*/
|
|
33
|
+
type CentrifugeVault = {
|
|
34
|
+
chain: EthereumChain;
|
|
35
|
+
proxy: EvmContractAddress;
|
|
36
|
+
share: TokenMetadata;
|
|
37
|
+
funding: TokenMetadata;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* The vaults an offer runs on, or why a chain could not be resolved: one
|
|
41
|
+
* entry per `vaultContracts` chain, in the offer's order.
|
|
42
|
+
*/
|
|
43
|
+
type CentrifugeVaultResolution = {
|
|
44
|
+
type: 'resolved';
|
|
45
|
+
vault: CentrifugeVault;
|
|
46
|
+
} | {
|
|
47
|
+
type: 'unresolved';
|
|
48
|
+
chain: OfferToken['chain'];
|
|
49
|
+
/** Which token the offer or the registry could not name. */
|
|
50
|
+
missing: 'share-token' | 'funding-token' | 'evm-chain';
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Resolves each chain of a vault offer to its share and funding tokens.
|
|
54
|
+
*
|
|
55
|
+
* The offer names tokens by role and address only - the share token as
|
|
56
|
+
* `vault`, the coin it is paid in as `funding` - so `lookup` turns each into
|
|
57
|
+
* metadata. A function rather than a registry snapshot, so this module does
|
|
58
|
+
* not depend on where the metadata comes from.
|
|
59
|
+
*
|
|
60
|
+
* A chain whose tokens cannot be named is reported rather than dropped: its
|
|
61
|
+
* position cannot be read without the symbol, and a caller has to know it is
|
|
62
|
+
* not showing it. When a chain lists several funding tokens, the first one
|
|
63
|
+
* `lookup` knows wins - a vault is priced in one.
|
|
64
|
+
*/
|
|
65
|
+
declare function resolveCentrifugeVaults(offer: CentrifugeVaultOfferDetail, lookup: (token: OfferToken) => TokenMetadata | null): CentrifugeVaultResolution[];
|
|
66
|
+
|
|
19
67
|
/**
|
|
20
68
|
* How often the Ondo checkout refreshes what it is allowed to poll: the market
|
|
21
69
|
* status and the indicative price. Both are free - neither spends an
|
|
@@ -1311,4 +1359,4 @@ declare const User: {
|
|
|
1311
1359
|
fromDto: (dto: UserDto) => User;
|
|
1312
1360
|
};
|
|
1313
1361
|
|
|
1314
|
-
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, 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 };
|
|
1362
|
+
export { type AmountParseErrorReason, type AmountParseResult, AssetDecimals, AssetSymbol, BPS_DENOM, BlockchainAmount, Bps, CENTRIFUGE_POLL_INTERVAL_MS, type CentrifugeVault, CentrifugeVaultOfferDetail, type CentrifugeVaultResolution, 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, OfferToken, 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, TokenMetadata, 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, resolveCentrifugeVaults, shortenAddress, superstateSwapContractAddress, swapSpender, txExplorerUrl, usdAmount, viemChain };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { N as NonEmptyArray, S as SwapQuote, F as FormattedAmountAssetUi, T as TxExplorerUrl,
|
|
4
|
-
export { A as AssetIconUrl, B as BroadcastTxParams, C as ConnectWallet,
|
|
1
|
+
import { aI as PaginationParams, aJ as PaginatedResponse, a as EthereumChain, b as EvmContractAddress, J as TokenMetadata, aL as OfferToken, K as CentrifugeVaultOfferDetail, aM as DecimalString, G as StablecoinSymbol, o as OndoBuyTransaction, B as BlockchainAmount, p as OndoSellTransaction, ap as HttpError, u as Bps, aN as SwapStatus, a9 as AssetDecimals, n as OfferSwapContract, aO as Uint256, d as AssetSymbol, v as EvmWalletAddress, aP as KnownAssetSymbol, H as Erc20Asset, aQ as Newtype } from '../time-CVZpAkGY.js';
|
|
2
|
+
export { aR as AllowWalletParams, aS as AllowWalletResponse, aT as Asset, aU as AssetCode, k as AssetId, _ as AsyncOfferDetail, Z as AsyncOfferType, A as AuthorizationCode, aV as Blockchain, aa as BuildCentrifugeVaultBuyParams, ae as BuildOndoBuyParams, af as BuildOndoSellParams, aW as BuildOndoSwapParamsCore, f as CentrifugeClaimDirection, c as CentrifugeNamespace, g as CentrifugeNamespaceImpl, ab as CentrifugeOrderReason, ac as CentrifugeOrderability, aX as CentrifugePositionStatus, e as CentrifugeVaultBuyTransaction, aY as CentrifugeVaultClaimProceedsTransaction, aZ as CentrifugeVaultClaimTransaction, aj as CentrifugeVaultLeg, X as CentrifugeVaultLegId, a_ as CentrifugeVaultOffer, a$ as CentrifugeVaultPosition, b0 as CentrifugeVaultReason, b1 as CentrifugeVaultRedeemPosition, al as CentrifugeVaultStatus, b2 as CentrifugeVaultTransactionCore, b3 as CentrifugeWalletParams, b4 as Chain, aG as ClientCredentialsOAuth, b5 as ClientId, aK as ClientSecret, b6 as CodeChallenge, C as CodeVerifier, h as CoinListTokenSaleNamespace, l as CoinListTokenSaleNamespaceImpl, b7 as CoinListTokenSaleOffer, Q as CoinListTokenSaleOfferDetail, z as Config, b8 as ConnectExternalWalletParams, b9 as CreateKycTokenParams, ba as CreateParticipationParams, bb as CreateWalletOwnershipChallengeParams, bc as Cursor, an as DebugEvent, bd as DocumentFormType, a6 as DocumentSubmission, be as DocumentSubmissionStatus, bf as DocumentType, bg as ETHEREUM_CHAINS, bh as EpochMillis, E as Erc20Namespace, bi as Erc20NamespaceImpl, bj as FaqItem, ao as FrontlineEventId, bk as GetCentrifugeVaultStatusParams, bl as GetOndoQuoteParams, bm as GetOndoTradingStatusParams, bn as GetSwapAuthorizationParams, bo as GetSwapPreviewParams, bp as GetTokenAllowanceParams, bq as GetTokenBalanceParams, br as HexEncodedTransactionData, aq as HttpResponse, bs as Isin, bt as Iso2CountryCode, a5 as KycLevelName, ar as KycToken, bu as Link, bv as ListOptionAddressesParams, as as LogBinding, at as LogBindings, au as LogCause, av as LogLevel, aw as LogScope, ax as LogValue, L as Logger, bw as MAX_ASSET_DECIMALS, bx as MAX_UINT_256, by as Milestone, bz as Millis, D as OAuthAccessToken, bA as OAuthRefreshToken, aF as OAuthSession, $ as Offer, bB as OfferBase, I as OfferDetail, bC as OfferDetailBase, bD as OfferEditorial, i as OfferId, bE as OfferOption, a3 as OfferOptionAddress, ak as OfferOptionAddressId, j as OfferOptionId, bF as OfferOptionSlug, bG as OfferSlug, M as OfferType, O as OfferVaultContract, F as OffersNamespace, bH as OffersNamespaceImpl, m as OndoNamespace, s as OndoNamespaceImpl, ag as OndoQuote, bI as OndoQuoteDuration, ah as OndoQuoteSize, bJ as OndoSellOutcome, bK as OndoSwapOffer, N as OndoSwapOfferDetail, q as OndoSwapTransactionCore, ad as OndoTradingStatus, r as OrderBookSide, bL as PKCEState, bM as PaginatedResponseDto, P as Participation, bN as ParticipationId, bO as ParticipationStatus, bP as ParticipationsPaginationParams, bQ as PauseFlags, bR as Pii, bS as PiiAddress, bT as PiiJurisdiction, bU as PiiKind, a8 as PinoLoggerOptions, ay as ProductionLogLevel, bV as QueryParamValue, bW as QueryParamValues, az as RedactedWalletError, bX as RedirectUri, bY as RemoveOptionAddressParams, aA as RequestId, x as Requirement, bZ as RequirementActionNeededReason, a4 as RequirementId, a0 as RequirementStatusInfo, a2 as RequirementStatusValue, a1 as RequirementType, R as RequirementsNamespace, y as RequirementsNamespaceImpl, b_ as RpcConfig, aB as RpcFailureReason, b$ as SOLANA_CHAINS, c0 as STABLE_DECIMALS, aC as SafeEvent, aD as SafeFields, Y as Seconds, c1 as SolanaChain, c2 as SubmitDocumentParams, S as SuperstateSwapNamespace, w as SuperstateSwapNamespaceImpl, c3 as SuperstateSwapOffer, V as SuperstateSwapOfferDetail, c4 as SwapContractRef, c5 as SwapPreview, c6 as TermItem, c7 as Ticker, ai as TokenIdentifier, am as TokenLogo, c8 as TokenLogoImage, c9 as TokenLogoUrl, ca as TokenRole, T as TokensNamespace, cb as TokensNamespaceImpl, cc as Tx, aE as UnredactedFields, cd as WalletAddress, a7 as WalletChallengeType, W as WalletError, ce as WalletOwnershipChallenge, cf as WalletProtocol, t as WalletsNamespace, cg as WalletsNamespaceImpl, ch as apiErrorCode, ci as assertUint256, cj as isChain, ck as isExpired, cl as isOfferType, cm as parseUint256 } from '../time-CVZpAkGY.js';
|
|
3
|
+
import { N as NonEmptyArray, S as SwapQuote, F as FormattedAmountAssetUi, T as TxExplorerUrl, h as FormattedAmountUi, b as FormattedPercentUi, a as ShortenedWalletAddress } from '../token-registry-snapshot-BkwA8KmD.js';
|
|
4
|
+
export { A as AssetIconUrl, B as BroadcastTxParams, C as ConnectWallet, e as EvmSigner, E as EvmWallet, f as ExternalWalletAdapter, P as PKCEConfig, i as PKCEParams, d as TokenRegistrySnapshot, c as WalletLabelResolver, W as WalletSelection, g as WriteContractParams, j as generatePKCEParams, o as offerDisplayTokens } from '../token-registry-snapshot-BkwA8KmD.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-C7mhO5_a.js';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* Walks every page of a cursor-paginated endpoint and returns the flattened
|
|
@@ -16,6 +15,55 @@ export { E as EpochMillis, M as Millis, S as Seconds, i as isExpired } from '../
|
|
|
16
15
|
*/
|
|
17
16
|
declare function fetchAllPages<A, P extends PaginationParams = PaginationParams>(fetchPage: (params: P) => Promise<PaginatedResponse<A>>, baseParams?: Omit<P, keyof PaginationParams>): Promise<A[]>;
|
|
18
17
|
|
|
18
|
+
/**
|
|
19
|
+
* How often the Centrifuge checkout refreshes the vault status. The read is
|
|
20
|
+
* free - it spends no attestation - so this is paced for a gate the user can
|
|
21
|
+
* trust rather than for cost.
|
|
22
|
+
*/
|
|
23
|
+
declare const CENTRIFUGE_POLL_INTERVAL_MS = 15000;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* One chain a vault offer runs on, with everything a screen needs to read and
|
|
27
|
+
* show a position there: the proxy every request and claim goes through, the
|
|
28
|
+
* share token it issues, and the funding token it is paid in.
|
|
29
|
+
*
|
|
30
|
+
* The share token's `symbol` is what every `/v1/centrifuge/vault/*` call is
|
|
31
|
+
* keyed by.
|
|
32
|
+
*/
|
|
33
|
+
type CentrifugeVault = {
|
|
34
|
+
chain: EthereumChain;
|
|
35
|
+
proxy: EvmContractAddress;
|
|
36
|
+
share: TokenMetadata;
|
|
37
|
+
funding: TokenMetadata;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* The vaults an offer runs on, or why a chain could not be resolved: one
|
|
41
|
+
* entry per `vaultContracts` chain, in the offer's order.
|
|
42
|
+
*/
|
|
43
|
+
type CentrifugeVaultResolution = {
|
|
44
|
+
type: 'resolved';
|
|
45
|
+
vault: CentrifugeVault;
|
|
46
|
+
} | {
|
|
47
|
+
type: 'unresolved';
|
|
48
|
+
chain: OfferToken['chain'];
|
|
49
|
+
/** Which token the offer or the registry could not name. */
|
|
50
|
+
missing: 'share-token' | 'funding-token' | 'evm-chain';
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Resolves each chain of a vault offer to its share and funding tokens.
|
|
54
|
+
*
|
|
55
|
+
* The offer names tokens by role and address only - the share token as
|
|
56
|
+
* `vault`, the coin it is paid in as `funding` - so `lookup` turns each into
|
|
57
|
+
* metadata. A function rather than a registry snapshot, so this module does
|
|
58
|
+
* not depend on where the metadata comes from.
|
|
59
|
+
*
|
|
60
|
+
* A chain whose tokens cannot be named is reported rather than dropped: its
|
|
61
|
+
* position cannot be read without the symbol, and a caller has to know it is
|
|
62
|
+
* not showing it. When a chain lists several funding tokens, the first one
|
|
63
|
+
* `lookup` knows wins - a vault is priced in one.
|
|
64
|
+
*/
|
|
65
|
+
declare function resolveCentrifugeVaults(offer: CentrifugeVaultOfferDetail, lookup: (token: OfferToken) => TokenMetadata | null): CentrifugeVaultResolution[];
|
|
66
|
+
|
|
19
67
|
/**
|
|
20
68
|
* How often the Ondo checkout refreshes what it is allowed to poll: the market
|
|
21
69
|
* status and the indicative price. Both are free - neither spends an
|
|
@@ -1311,4 +1359,4 @@ declare const User: {
|
|
|
1311
1359
|
fromDto: (dto: UserDto) => User;
|
|
1312
1360
|
};
|
|
1313
1361
|
|
|
1314
|
-
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, 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 };
|
|
1362
|
+
export { type AmountParseErrorReason, type AmountParseResult, AssetDecimals, AssetSymbol, BPS_DENOM, BlockchainAmount, Bps, CENTRIFUGE_POLL_INTERVAL_MS, type CentrifugeVault, CentrifugeVaultOfferDetail, type CentrifugeVaultResolution, 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, OfferToken, 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, TokenMetadata, 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, resolveCentrifugeVaults, 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,
|
|
@@ -34,6 +35,7 @@ import {
|
|
|
34
35
|
User,
|
|
35
36
|
UserEmail,
|
|
36
37
|
UserId,
|
|
38
|
+
WalletSelection,
|
|
37
39
|
applyBps,
|
|
38
40
|
computeOndoBuyPrice,
|
|
39
41
|
computeOndoSellPrice,
|
|
@@ -46,9 +48,10 @@ import {
|
|
|
46
48
|
isSwapAvailable,
|
|
47
49
|
offerDisplayTokens,
|
|
48
50
|
ondoQuoteOfferDeadline,
|
|
51
|
+
resolveCentrifugeVaults,
|
|
49
52
|
superstateSwapContractAddress,
|
|
50
53
|
swapSpender
|
|
51
|
-
} from "../chunk-
|
|
54
|
+
} from "../chunk-IZJ4JSSC.js";
|
|
52
55
|
import {
|
|
53
56
|
AllowWalletResponse,
|
|
54
57
|
Asset,
|
|
@@ -57,9 +60,19 @@ import {
|
|
|
57
60
|
AssetIconUrl,
|
|
58
61
|
AssetId,
|
|
59
62
|
AssetSymbol,
|
|
63
|
+
AsyncOfferDetail,
|
|
60
64
|
Blockchain,
|
|
61
65
|
BlockchainAmount,
|
|
62
66
|
Bps,
|
|
67
|
+
CentrifugeNamespaceImpl,
|
|
68
|
+
CentrifugeVaultBuyTransaction,
|
|
69
|
+
CentrifugeVaultClaimProceedsTransaction,
|
|
70
|
+
CentrifugeVaultClaimTransaction,
|
|
71
|
+
CentrifugeVaultLeg,
|
|
72
|
+
CentrifugeVaultLegId,
|
|
73
|
+
CentrifugeVaultPosition,
|
|
74
|
+
CentrifugeVaultRedeemPosition,
|
|
75
|
+
CentrifugeVaultStatus,
|
|
63
76
|
Chain,
|
|
64
77
|
ClientCredentialsOAuth,
|
|
65
78
|
CoinListTokenSaleNamespaceImpl,
|
|
@@ -110,6 +123,7 @@ import {
|
|
|
110
123
|
OfferSlug,
|
|
111
124
|
OfferSwapContract,
|
|
112
125
|
OfferToken,
|
|
126
|
+
OfferVaultContract,
|
|
113
127
|
OndoBuyTransaction,
|
|
114
128
|
OndoNamespaceImpl,
|
|
115
129
|
OndoQuote,
|
|
@@ -172,7 +186,7 @@ import {
|
|
|
172
186
|
txExplorerUrl,
|
|
173
187
|
usdAmount,
|
|
174
188
|
viemChain
|
|
175
|
-
} from "../chunk-
|
|
189
|
+
} from "../chunk-C6GF7MDF.js";
|
|
176
190
|
export {
|
|
177
191
|
AllowWalletResponse,
|
|
178
192
|
Asset,
|
|
@@ -181,11 +195,22 @@ export {
|
|
|
181
195
|
AssetIconUrl,
|
|
182
196
|
AssetId,
|
|
183
197
|
AssetSymbol,
|
|
198
|
+
AsyncOfferDetail,
|
|
184
199
|
AuthorizationCode,
|
|
185
200
|
BPS_DENOM,
|
|
186
201
|
Blockchain,
|
|
187
202
|
BlockchainAmount,
|
|
188
203
|
Bps,
|
|
204
|
+
CENTRIFUGE_POLL_INTERVAL_MS,
|
|
205
|
+
CentrifugeNamespaceImpl,
|
|
206
|
+
CentrifugeVaultBuyTransaction,
|
|
207
|
+
CentrifugeVaultClaimProceedsTransaction,
|
|
208
|
+
CentrifugeVaultClaimTransaction,
|
|
209
|
+
CentrifugeVaultLeg,
|
|
210
|
+
CentrifugeVaultLegId,
|
|
211
|
+
CentrifugeVaultPosition,
|
|
212
|
+
CentrifugeVaultRedeemPosition,
|
|
213
|
+
CentrifugeVaultStatus,
|
|
189
214
|
Chain,
|
|
190
215
|
ClientCredentialsOAuth,
|
|
191
216
|
ClientId,
|
|
@@ -249,6 +274,7 @@ export {
|
|
|
249
274
|
OfferSlug,
|
|
250
275
|
OfferSwapContract,
|
|
251
276
|
OfferToken,
|
|
277
|
+
OfferVaultContract,
|
|
252
278
|
OffersNamespaceImpl,
|
|
253
279
|
OndoBuyTransaction,
|
|
254
280
|
OndoNamespaceImpl,
|
|
@@ -307,6 +333,7 @@ export {
|
|
|
307
333
|
ValidationError,
|
|
308
334
|
WalletAddress,
|
|
309
335
|
WalletOwnershipChallenge,
|
|
336
|
+
WalletSelection,
|
|
310
337
|
WalletsNamespaceImpl,
|
|
311
338
|
apiErrorCode,
|
|
312
339
|
applyBps,
|
|
@@ -339,6 +366,7 @@ export {
|
|
|
339
366
|
ondoQuoteOfferDeadline,
|
|
340
367
|
parseBlockchainAmount,
|
|
341
368
|
parseUint256,
|
|
369
|
+
resolveCentrifugeVaults,
|
|
342
370
|
shortenAddress,
|
|
343
371
|
superstateSwapContractAddress,
|
|
344
372
|
swapSpender,
|