@coinlist-co/react 0.12.2-rc.e1f6c82 → 0.12.2-rc.eea3be6
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-GIE4UWB3.js → chunk-335G7ZM5.js} +228 -193
- package/dist/chunk-335G7ZM5.js.map +1 -0
- package/dist/{chunk-EKLUJZ7T.js → chunk-IUAGXUJY.js} +2 -2
- package/dist/{chunk-PIOQA6HW.js → chunk-WBB6P6ZI.js} +111 -101
- package/dist/chunk-WBB6P6ZI.js.map +1 -0
- package/dist/client/index.d.ts +1490 -1211
- package/dist/client/index.js +9818 -9967
- package/dist/client/index.js.map +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/{time-Bbqlt2x7.d.ts → time-qZW4aYYp.d.ts} +34 -17
- package/dist/{token-registry-snapshot-DttZXGvY.d.ts → token-registry-snapshot-CMrhSBun.d.ts} +19 -21
- package/dist/universal/index.d.ts +45 -33
- package/dist/universal/index.js +10 -6
- package/package.json +1 -1
- package/dist/chunk-GIE4UWB3.js.map +0 -1
- package/dist/chunk-PIOQA6HW.js.map +0 -1
- /package/dist/{chunk-EKLUJZ7T.js.map → chunk-IUAGXUJY.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { F as FormattedAmountAssetUi, T as TxExplorerUrl, d as FormattedAmountUi, b as FormattedPercentUi, S as ShortenedWalletAddress } from '../token-registry-snapshot-
|
|
4
|
-
export { A as AssetIconUrl, B as BroadcastTxParams, C as ConnectWallet, e as EvmSigner, E as EvmWallet, f as ExternalWalletAdapter, N as NonEmptyArray, g as TokenKey, c as TokenRegistrySnapshot, a as WalletLabelResolver, W as WalletSelection, h as WriteContractParams, o as offerDisplayTokens } from '../token-registry-snapshot-
|
|
1
|
+
import { ai as RequestId, aj as ClientId, ak as RedirectUri, al as CodeChallenge, am as PKCEState, C as CodeVerifier, i as OfferSwapContract, E as EthereumChain, b as EvmContractAddress, j as OndoBuyTransaction, B as BlockchainAmount, k as OndoSellTransaction, p as SwapQuote, q as Bps, an as SwapStatus, a6 as AssetDecimals, a as AssetSymbol, r as EvmWalletAddress, ao as KnownAssetSymbol, I as Erc20Asset, S as StablecoinSymbol } from '../time-qZW4aYYp.js';
|
|
2
|
+
export { ap as AllowWalletParams, aq as AllowWalletResponse, ar as Asset, as as AssetCode, at as AssetId, M as AsyncOfferDetail, au as AsyncOfferType, A as AuthorizationCode, av as BaseEvent, aw as BuildCentrifugeVaultBuyParams, a0 as BuildOndoBuyParams, a2 as BuildOndoSellParams, ax as BuildOndoSwapParamsCore, ay as CentrifugeAssets, d as CentrifugeClaimDirection, az as CentrifugeDepositPosition, e as CentrifugeNamespace, aA as CentrifugeOrderReason, aB as CentrifugeOrderability, aC as CentrifugeRedeemPosition, aD as CentrifugeShares, a9 as CentrifugeVault, c as CentrifugeVaultBuyTransaction, aE as CentrifugeVaultClaimProceedsTransaction, aF as CentrifugeVaultClaimTransaction, a8 as CentrifugeVaultLeg, J as CentrifugeVaultLegId, aG as CentrifugeVaultOffer, K as CentrifugeVaultOfferDetail, aH as CentrifugeVaultReason, $ as CentrifugeVaultRef, aI as CentrifugeVaultResolution, _ as CentrifugeVaultStatus, aJ as CentrifugeVaultTransactionCore, aK as CentrifugeWalletParams, aL as Chain, ae as ClientCredentialsOAuth, ah as ClientSecret, h as CoinListTokenSaleNamespace, aM as CoinListTokenSaleOffer, f as CoinListTokenSaleOfferDetail, x as Config, aN as ConnectExternalWalletParams, aO as CreateKycTokenParams, aP as CreateParticipationParams, aQ as CreateWalletOwnershipChallengeParams, aR as Cursor, aS as DebugEvent, aT as DecimalString, aU as DocumentFormType, ab as DocumentSubmission, aV as DocumentSubmissionStatus, aW as DocumentType, aX as ETHEREUM_CHAINS, aY as EpochMillis, D as Erc20Namespace, aZ as FaqItem, a_ as FrontlineEventId, a$ as GetCentrifugeVaultStatusParams, b0 as GetOndoQuoteParams, b1 as GetOndoTradingStatusParams, b2 as GetSwapAuthorizationParams, b3 as GetSwapPreviewParams, b4 as GetSwapQuoteParams, b5 as GetTokenAllowanceParams, b6 as GetTokenBalanceParams, b7 as HexEncodedTransactionData, b8 as Isin, b9 as Iso2CountryCode, Q as KycLevelName, ba as KycToken, bb as Link, bc as ListOptionAddressesParams, bd as LogBinding, be as LogBindings, bf as LogCause, bg as LogLevel, bh as LogScope, bi as LogValue, Z as Logger, bj as MAX_ASSET_DECIMALS, bk as MAX_UINT_256, bl as Milestone, bm as Millis, bn as Newtype, y as OAuthAccessToken, bo as OAuthRefreshToken, ad as OAuthSession, F as Offer, bp as OfferBase, H as OfferDetail, bq as OfferDetailBase, br as OfferEditorial, bs as OfferFundingContract, o as OfferId, bt as OfferOption, v as OfferOptionAddress, aa as OfferOptionAddressId, g as OfferOptionId, bu as OfferOptionSlug, bv as OfferSlug, bw as OfferToken, bx as OfferType, O as OfferVaultContract, z as OffersNamespace, l as OndoNamespace, a3 as OndoQuote, by as OndoQuoteDuration, a4 as OndoQuoteSize, bz as OndoSellOutcome, bA as OndoSwapOffer, a1 as OndoSwapOfferDetail, m as OndoSwapTransactionCore, a5 as OndoTradingStatus, n as OrderBookSide, ag as PaginatedResponse, af as PaginationParams, P as Participation, bB as ParticipationId, bC as ParticipationStatus, bD as ParticipationsPaginationParams, bE as PauseFlags, bF as Pii, bG as PiiAddress, bH as PiiJurisdiction, bI as PiiKind, Y as PinoLoggerOptions, bJ as ProductionLogLevel, bK as ReadCentrifugePositionParams, bL as RedactedWalletError, bM as RemoveOptionAddressParams, t as Requirement, bN as RequirementActionNeededReason, X as RequirementId, N as RequirementStatusInfo, V as RequirementStatusValue, U as RequirementType, R as RequirementsNamespace, bO as RpcConfig, bP as RpcFailureReason, bQ as SOLANA_CHAINS, bR as STABLE_DECIMALS, bS as SafeEvent, bT as SafeFields, L as Seconds, bU as SolanaChain, bV as SubmitDocumentParams, s as SuperstateSwapNamespace, bW as SuperstateSwapOffer, a7 as SuperstateSwapOfferDetail, bX as SwapContractRef, bY as SwapPreview, bZ as TermItem, b_ as Ticker, ac as TokenIdentifier, b$ as TokenLogo, c0 as TokenLogoImage, c1 as TokenLogoUrl, G as TokenMetadata, c2 as TokenRole, T as TokensNamespace, c3 as Tx, c4 as Uint256, c5 as UnredactedFields, u as WalletChallengeType, W as WalletError, c6 as WalletOwnershipChallenge, c7 as WalletOwnershipChallengeParamsBase, c8 as WalletProtocol, w as WalletsNamespace, c9 as assertUint256, ca as isChain, cb as isOfferType, cc as parseUint256, cd as resolveCentrifugeVaults } from '../time-qZW4aYYp.js';
|
|
3
|
+
import { F as FormattedAmountAssetUi, T as TxExplorerUrl, d as FormattedAmountUi, b as FormattedPercentUi, S as ShortenedWalletAddress } from '../token-registry-snapshot-CMrhSBun.js';
|
|
4
|
+
export { A as AssetIconUrl, B as BroadcastTxParams, C as ConnectWallet, e as EvmSigner, E as EvmWallet, f as ExternalWalletAdapter, N as NonEmptyArray, g as TokenKey, c as TokenRegistrySnapshot, a as WalletLabelResolver, W as WalletSelection, h as WriteContractParams, o as offerDisplayTokens } from '../token-registry-snapshot-CMrhSBun.js';
|
|
5
5
|
import { Hash, Chain } from 'viem';
|
|
6
6
|
|
|
7
7
|
type HttpResponse<TBody = unknown> = {
|
|
@@ -64,6 +64,30 @@ type PKCEConfig = {
|
|
|
64
64
|
*/
|
|
65
65
|
declare function generatePKCEParams(config: PKCEConfig): Promise<PKCEParams>;
|
|
66
66
|
|
|
67
|
+
/**
|
|
68
|
+
* The CoinList contract a swap on `chain` settles through, and therefore the
|
|
69
|
+
* ERC-20 spender the user approves - or `null` where this offer cannot be
|
|
70
|
+
* swapped on that chain.
|
|
71
|
+
*
|
|
72
|
+
* Read off the offer rather than held as a constant because the address varies
|
|
73
|
+
* by environment, not only by chain: beta and production both run
|
|
74
|
+
* `ethereum_sepolia` and deploy a different contract on each, and one constant
|
|
75
|
+
* cannot name both. Frontline resolves it per environment and serves the
|
|
76
|
+
* answer on the offer.
|
|
77
|
+
*
|
|
78
|
+
* The array varies per *offer* as well as per chain - frontline drops a chain
|
|
79
|
+
* whose funding and swap tokens do not both resolve for this asset - so an
|
|
80
|
+
* array read for one symbol must not be reused for another. An empty array
|
|
81
|
+
* means "cannot swap here", which is an answer rather than an error.
|
|
82
|
+
*
|
|
83
|
+
* A capability rather than a provider slice, and named for the data it reads
|
|
84
|
+
* rather than for its first caller: `swap_contracts` is an offer field, and
|
|
85
|
+
* `universal-core-isolation-and-sharing` would stop Superstate reusing this if
|
|
86
|
+
* it lived under `checkout/ondo/`. Superstate has not migrated yet - it still
|
|
87
|
+
* reads `superstateSwapContractAddress` - so Ondo is the only caller today.
|
|
88
|
+
*/
|
|
89
|
+
declare function swapSpender(swapContracts: OfferSwapContract[], chain: EthereumChain): EvmContractAddress | null;
|
|
90
|
+
|
|
67
91
|
/**
|
|
68
92
|
* The price of one whole asset token in a built Ondo purchase, in the funding
|
|
69
93
|
* token's units - USD per share.
|
|
@@ -120,13 +144,14 @@ declare function computeOndoSellPrice(transaction: OndoSellTransaction): Blockch
|
|
|
120
144
|
declare function isOndoNotTradableError(error: unknown): error is HttpError;
|
|
121
145
|
|
|
122
146
|
/**
|
|
123
|
-
* Price of 1 output token in USD, assuming the input token is a $1 stablecoin
|
|
147
|
+
* Price of 1 output token in USD, assuming the input token is a $1 stablecoin:
|
|
148
|
+
* the quote's input divided by its output, via {@link pricePerShare}.
|
|
149
|
+
* Returned decimals match the input token decimals (always the stablecoin's 6).
|
|
124
150
|
*
|
|
125
|
-
* `
|
|
151
|
+
* `null` for a quote that fills nothing, which is an answer here rather than
|
|
152
|
+
* a corrupt amount: there is no price to show for it.
|
|
126
153
|
*
|
|
127
|
-
*
|
|
128
|
-
* integer truncation early. This mirrors standard fixed-point practice on-chain.
|
|
129
|
-
* Returned decimals match the input token decimals (always the stablecoin's 6).
|
|
154
|
+
* @throws MathError when the price is out of uint256 bounds.
|
|
130
155
|
*/
|
|
131
156
|
declare function computePrice({ inputTokenAmount, outputTokenAmount, }: SwapQuote): BlockchainAmount | null;
|
|
132
157
|
/**
|
|
@@ -180,30 +205,6 @@ declare function superstateSwapContractAddress(chain: EthereumChain): EvmContrac
|
|
|
180
205
|
*/
|
|
181
206
|
declare function formattedPricePerShare(quote: SwapQuote | null, locale: string): FormattedAmountAssetUi;
|
|
182
207
|
|
|
183
|
-
/**
|
|
184
|
-
* The CoinList contract a swap on `chain` settles through, and therefore the
|
|
185
|
-
* ERC-20 spender the user approves - or `null` where this offer cannot be
|
|
186
|
-
* swapped on that chain.
|
|
187
|
-
*
|
|
188
|
-
* Read off the offer rather than held as a constant because the address varies
|
|
189
|
-
* by environment, not only by chain: beta and production both run
|
|
190
|
-
* `ethereum_sepolia` and deploy a different contract on each, and one constant
|
|
191
|
-
* cannot name both. Frontline resolves it per environment and serves the
|
|
192
|
-
* answer on the offer.
|
|
193
|
-
*
|
|
194
|
-
* The array varies per *offer* as well as per chain - frontline drops a chain
|
|
195
|
-
* whose funding and swap tokens do not both resolve for this asset - so an
|
|
196
|
-
* array read for one symbol must not be reused for another. An empty array
|
|
197
|
-
* means "cannot swap here", which is an answer rather than an error.
|
|
198
|
-
*
|
|
199
|
-
* A capability rather than a provider slice, and named for the data it reads
|
|
200
|
-
* rather than for its first caller: `swap_contracts` is an offer field, and
|
|
201
|
-
* `universal-core-isolation-and-sharing` would stop Superstate reusing this if
|
|
202
|
-
* it lived under `checkout/ondo/`. Superstate has not migrated yet - it still
|
|
203
|
-
* reads `superstateSwapContractAddress` - so Ondo is the only caller today.
|
|
204
|
-
*/
|
|
205
|
-
declare function swapSpender(swapContracts: OfferSwapContract[], chain: EthereumChain): EvmContractAddress | null;
|
|
206
|
-
|
|
207
208
|
/** The viem chain definition the SDK reads and writes this chain through. */
|
|
208
209
|
declare function viemChain(chain: EthereumChain): Chain;
|
|
209
210
|
declare function getChainId(chain: EthereumChain): number;
|
|
@@ -328,6 +329,17 @@ declare const TOKEN_REGISTRY: {
|
|
|
328
329
|
* read would call.
|
|
329
330
|
*/
|
|
330
331
|
usdtAddress: (chain: EthereumChain) => EvmContractAddress | null;
|
|
332
|
+
/**
|
|
333
|
+
* `symbol`'s contract on `chain`, or `null` where it has none - one lookup
|
|
334
|
+
* over both tables, for a caller that holds the symbol as data.
|
|
335
|
+
*/
|
|
336
|
+
address: (symbol: StablecoinSymbol, chain: EthereumChain) => EvmContractAddress | null;
|
|
337
|
+
/**
|
|
338
|
+
* The stablecoin a backend asset code names, or `null` for a code the
|
|
339
|
+
* registry does not support. Matched exactly: frontline spells its codes
|
|
340
|
+
* the way the registry does, and a near miss is a different asset.
|
|
341
|
+
*/
|
|
342
|
+
stablecoin: (code: string) => StablecoinSymbol | null;
|
|
331
343
|
};
|
|
332
344
|
|
|
333
345
|
/**
|
package/dist/universal/index.js
CHANGED
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
resolveCentrifugeVaults,
|
|
38
38
|
superstateSwapContractAddress,
|
|
39
39
|
swapSpender
|
|
40
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-WBB6P6ZI.js";
|
|
41
41
|
import {
|
|
42
42
|
ClientCredentialsOAuth,
|
|
43
43
|
OAuthRefreshToken,
|
|
@@ -52,7 +52,6 @@ import {
|
|
|
52
52
|
AssetId,
|
|
53
53
|
AssetSymbol,
|
|
54
54
|
AsyncOfferDetail,
|
|
55
|
-
Blockchain,
|
|
56
55
|
BlockchainAmount,
|
|
57
56
|
Bps,
|
|
58
57
|
CentrifugeAssets,
|
|
@@ -103,6 +102,7 @@ import {
|
|
|
103
102
|
Offer,
|
|
104
103
|
OfferDetail,
|
|
105
104
|
OfferEditorial,
|
|
105
|
+
OfferFundingContract,
|
|
106
106
|
OfferId,
|
|
107
107
|
OfferOption,
|
|
108
108
|
OfferOptionAddress,
|
|
@@ -149,7 +149,6 @@ import {
|
|
|
149
149
|
TokensNamespaceImpl,
|
|
150
150
|
TxExplorerUrl,
|
|
151
151
|
ValidationError,
|
|
152
|
-
WalletAddress,
|
|
153
152
|
WalletOwnershipChallenge,
|
|
154
153
|
WalletsNamespaceImpl,
|
|
155
154
|
apiErrorCode,
|
|
@@ -157,6 +156,7 @@ import {
|
|
|
157
156
|
assetAmount,
|
|
158
157
|
blockchainAmountFromRawOrThrow,
|
|
159
158
|
chainFromId,
|
|
159
|
+
contractOn,
|
|
160
160
|
formatAmount,
|
|
161
161
|
formatBpsAsPercent,
|
|
162
162
|
formatCompactAmount,
|
|
@@ -170,11 +170,13 @@ import {
|
|
|
170
170
|
isOfferType,
|
|
171
171
|
parseBlockchainAmount,
|
|
172
172
|
parseUint256,
|
|
173
|
+
positiveAmountFromRawOrThrow,
|
|
174
|
+
pricePerShare,
|
|
173
175
|
shortenAddress,
|
|
174
176
|
txExplorerUrl,
|
|
175
177
|
usdAmount,
|
|
176
178
|
viemChain
|
|
177
|
-
} from "../chunk-
|
|
179
|
+
} from "../chunk-335G7ZM5.js";
|
|
178
180
|
export {
|
|
179
181
|
AllowWalletResponse,
|
|
180
182
|
Asset,
|
|
@@ -185,7 +187,6 @@ export {
|
|
|
185
187
|
AssetSymbol,
|
|
186
188
|
AsyncOfferDetail,
|
|
187
189
|
AuthorizationCode,
|
|
188
|
-
Blockchain,
|
|
189
190
|
BlockchainAmount,
|
|
190
191
|
Bps,
|
|
191
192
|
CentrifugeAssets,
|
|
@@ -246,6 +247,7 @@ export {
|
|
|
246
247
|
Offer,
|
|
247
248
|
OfferDetail,
|
|
248
249
|
OfferEditorial,
|
|
250
|
+
OfferFundingContract,
|
|
249
251
|
OfferId,
|
|
250
252
|
OfferOption,
|
|
251
253
|
OfferOptionAddress,
|
|
@@ -308,7 +310,6 @@ export {
|
|
|
308
310
|
USDT,
|
|
309
311
|
USDT_SYMBOL,
|
|
310
312
|
ValidationError,
|
|
311
|
-
WalletAddress,
|
|
312
313
|
WalletOwnershipChallenge,
|
|
313
314
|
WalletSelection,
|
|
314
315
|
WalletsNamespaceImpl,
|
|
@@ -321,6 +322,7 @@ export {
|
|
|
321
322
|
computeOndoSellPrice,
|
|
322
323
|
computePrice,
|
|
323
324
|
computeSlip,
|
|
325
|
+
contractOn,
|
|
324
326
|
formatAmount,
|
|
325
327
|
formatBpsAsPercent,
|
|
326
328
|
formatCompactAmount,
|
|
@@ -340,6 +342,8 @@ export {
|
|
|
340
342
|
ondoQuoteOfferDeadline,
|
|
341
343
|
parseBlockchainAmount,
|
|
342
344
|
parseUint256,
|
|
345
|
+
positiveAmountFromRawOrThrow,
|
|
346
|
+
pricePerShare,
|
|
343
347
|
resolveCentrifugeVaults,
|
|
344
348
|
shortenAddress,
|
|
345
349
|
superstateSwapContractAddress,
|