@coinlist-co/react 0.12.2-rc.3de3751 → 0.12.2-rc.4cc3d7e
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-RLOYYAMO.js → chunk-4FGI6MAK.js} +108 -110
- package/dist/chunk-4FGI6MAK.js.map +1 -0
- package/dist/{chunk-HMLWCXAP.js → chunk-ANPPXFXD.js} +186 -432
- package/dist/chunk-ANPPXFXD.js.map +1 -0
- package/dist/{chunk-L7SVKXXW.js → chunk-AY4ADMCH.js} +328 -21
- package/dist/chunk-AY4ADMCH.js.map +1 -0
- package/dist/{chunk-MJ6YXZWH.js → chunk-IWQ6A52U.js} +4 -2
- package/dist/chunk-IWQ6A52U.js.map +1 -0
- package/dist/client/index.d.ts +298 -123
- package/dist/client/index.js +1876 -1032
- package/dist/client/index.js.map +1 -1
- package/dist/client-credentials-B2l_rZTE.d.ts +13 -0
- package/dist/server/index.d.ts +58 -106
- package/dist/server/index.js +208 -170
- package/dist/server/index.js.map +1 -1
- package/dist/{time-DkU7jivQ.d.ts → time-BgR3LVER.d.ts} +91 -43
- package/dist/{token-registry-snapshot-D0OWXMe4.d.ts → token-registry-snapshot-CE21sVyi.d.ts} +1 -1
- package/dist/universal/index.d.ts +56 -44
- package/dist/universal/index.js +6 -4
- package/package.json +1 -1
- package/dist/chunk-HMLWCXAP.js.map +0 -1
- package/dist/chunk-L7SVKXXW.js.map +0 -1
- package/dist/chunk-MJ6YXZWH.js.map +0 -1
- package/dist/chunk-RLOYYAMO.js.map +0 -1
|
@@ -1,48 +1,9 @@
|
|
|
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 ClientId, aj as RedirectUri, ak as CodeChallenge, al as PKCEState, _ as CodeVerifier, h as OfferSwapContract, E as EthereumChain, b as EvmContractAddress, i as OndoBuyTransaction, B as BlockchainAmount, j as OndoSellTransaction, am as RequestId, o as SwapQuote, p as Bps, an as SwapStatus, a7 as AssetDecimals, a as AssetSymbol, q as EvmWalletAddress, ao as KnownAssetSymbol, H as Erc20Asset, S as StablecoinSymbol } from '../time-BgR3LVER.js';
|
|
2
|
+
export { ap as AllowWalletParams, aq as AllowWalletResponse, ar as Asset, as as AssetCode, at as AssetId, L as AsyncOfferDetail, au as AsyncOfferType, Z as AuthorizationCode, A as AuthorizationGrant, av as BaseEvent, aw as BuildCentrifugeVaultBuyParams, a1 as BuildOndoBuyParams, a3 as BuildOndoSellParams, ax as BuildOndoSwapParamsCore, ay as CentrifugeAssets, c as CentrifugeClaimDirection, az as CentrifugeDepositPosition, d as CentrifugeNamespace, aA as CentrifugeOrderReason, aB as CentrifugeOrderability, aC as CentrifugeRedeemPosition, aD as CentrifugeShares, aa as CentrifugeVault, C as CentrifugeVaultBuyTransaction, aE as CentrifugeVaultClaimProceedsTransaction, aF as CentrifugeVaultClaimTransaction, a9 as CentrifugeVaultLeg, I as CentrifugeVaultLegId, aG as CentrifugeVaultOffer, J as CentrifugeVaultOfferDetail, aH as CentrifugeVaultReason, a0 as CentrifugeVaultRef, aI as CentrifugeVaultResolution, $ as CentrifugeVaultStatus, aJ as CentrifugeVaultTransactionCore, aK as CentrifugeWalletParams, aL as Chain, ah as ClientSecret, g as CoinListTokenSaleNamespace, aM as CoinListTokenSaleOffer, e as CoinListTokenSaleOfferDetail, w 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, ac as DocumentSubmission, aV as DocumentSubmissionStatus, aW as DocumentType, aX as ETHEREUM_CHAINS, aY as EpochMillis, z 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, N 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, Y as Logger, bj as MAX_ASSET_DECIMALS, bk as MAX_UINT_256, bl as Milestone, bm as Millis, bn as Newtype, x as OAuthAccessToken, bo as OAuthRefreshToken, ae as OAuthSession, D as Offer, bp as OfferBase, G as OfferDetail, bq as OfferDetailBase, br as OfferEditorial, bs as OfferFundingContract, n as OfferId, bt as OfferOption, u as OfferOptionAddress, ab as OfferOptionAddressId, f as OfferOptionId, bu as OfferOptionSlug, bv as OfferSlug, bw as OfferToken, bx as OfferType, O as OfferVaultContract, y as OffersNamespace, k as OndoNamespace, a4 as OndoQuote, by as OndoQuoteDuration, a5 as OndoQuoteSize, bz as OndoSellOutcome, bA as OndoSwapOffer, a2 as OndoSwapOfferDetail, l as OndoSwapTransactionCore, a6 as OndoTradingStatus, m 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, X as PinoLoggerOptions, bJ as ProductionLogLevel, bK as ReadCentrifugePositionParams, bL as RedactedWalletError, bM as RemoveOptionAddressParams, s as Requirement, bN as RequirementActionNeededReason, V as RequirementId, M as RequirementStatusInfo, U as RequirementStatusValue, Q 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, K as Seconds, bU as SolanaChain, bV as SubmitDocumentParams, r as SuperstateSwapNamespace, bW as SuperstateSwapOffer, a8 as SuperstateSwapOfferDetail, bX as SwapContractRef, bY as SwapPreview, bZ as TermItem, b_ as Ticker, ad as TokenIdentifier, b$ as TokenLogo, c0 as TokenLogoImage, c1 as TokenLogoUrl, F as TokenMetadata, c2 as TokenRole, T as TokensNamespace, c3 as Tx, c4 as Uint256, c5 as UnredactedFields, t as WalletChallengeType, W as WalletError, c6 as WalletOwnershipChallenge, c7 as WalletOwnershipChallengeParamsBase, c8 as WalletProtocol, v as WalletsNamespace, c9 as assertUint256, ca as isChain, cb as isOfferType, cc as parseUint256, cd as resolveCentrifugeVaults } from '../time-BgR3LVER.js';
|
|
3
|
+
import { F as FormattedAmountAssetUi, T as TxExplorerUrl, d as FormattedAmountUi, b as FormattedPercentUi, S as ShortenedWalletAddress } from '../token-registry-snapshot-CE21sVyi.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-CE21sVyi.js';
|
|
5
5
|
import { Hash, Chain } from 'viem';
|
|
6
|
-
|
|
7
|
-
type HttpResponse<TBody = unknown> = {
|
|
8
|
-
status: number;
|
|
9
|
-
headers?: Record<string, string>;
|
|
10
|
-
body: TBody | null;
|
|
11
|
-
/**
|
|
12
|
-
* The id of the request that produced this response, stamped by
|
|
13
|
-
* {@link HttpClient} so that whoever turns a non-2xx into an
|
|
14
|
-
* {@link HttpError} can carry it without threading the request alongside.
|
|
15
|
-
* Absent when the response did not come from an `HttpClient`.
|
|
16
|
-
*/
|
|
17
|
-
requestId?: RequestId;
|
|
18
|
-
};
|
|
19
|
-
declare class HttpError<TBody = unknown> extends Error {
|
|
20
|
-
readonly response: HttpResponse<TBody>;
|
|
21
|
-
constructor(response: HttpResponse<TBody>);
|
|
22
|
-
/**
|
|
23
|
-
* Correlates this failure with the `[HTTP]` log lines for the same request,
|
|
24
|
-
* which carry the method, the URL, the duration and every retry. `null` when
|
|
25
|
-
* the response did not come from an {@link HttpClient}.
|
|
26
|
-
*
|
|
27
|
-
* Worth quoting in a bug report: it is what makes a log excerpt readable.
|
|
28
|
-
*/
|
|
29
|
-
get requestId(): RequestId | null;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* The machine-readable `code` frontline attaches to an error, or `null` for
|
|
33
|
-
* anything else - a non-HTTP failure, or an error body that carries only a
|
|
34
|
-
* message.
|
|
35
|
-
*
|
|
36
|
-
* Frontline answers a failure with `{ type, message, code?, errors?,
|
|
37
|
-
* event_id? }`, and `code` is the only part of it meant to be branched on:
|
|
38
|
-
* `message` is prose that may be reworded, and `type` distinguishes
|
|
39
|
-
* `invalid_request_error` from `api_error` without saying which one.
|
|
40
|
-
*
|
|
41
|
-
* Reach for this only where a code has a distinct remedy the user can act on.
|
|
42
|
-
* Mapping the whole vocabulary would couple the SDK to strings frontline does
|
|
43
|
-
* not version; falling back to a generic failure is the right default.
|
|
44
|
-
*/
|
|
45
|
-
declare function apiErrorCode(error: unknown): string | null;
|
|
6
|
+
export { C as ClientCredentialsOAuth } from '../client-credentials-B2l_rZTE.js';
|
|
46
7
|
|
|
47
8
|
type PKCEParams = {
|
|
48
9
|
clientId: ClientId;
|
|
@@ -134,6 +95,46 @@ declare function computeOndoBuyPrice(transaction: OndoBuyTransaction): Blockchai
|
|
|
134
95
|
*/
|
|
135
96
|
declare function computeOndoSellPrice(transaction: OndoSellTransaction): BlockchainAmount;
|
|
136
97
|
|
|
98
|
+
type HttpResponse<TBody = unknown> = {
|
|
99
|
+
status: number;
|
|
100
|
+
headers?: Record<string, string>;
|
|
101
|
+
body: TBody | null;
|
|
102
|
+
/**
|
|
103
|
+
* The id of the request that produced this response, stamped by
|
|
104
|
+
* {@link HttpClient} so that whoever turns a non-2xx into an
|
|
105
|
+
* {@link HttpError} can carry it without threading the request alongside.
|
|
106
|
+
* Absent when the response did not come from an `HttpClient`.
|
|
107
|
+
*/
|
|
108
|
+
requestId?: RequestId;
|
|
109
|
+
};
|
|
110
|
+
declare class HttpError<TBody = unknown> extends Error {
|
|
111
|
+
readonly response: HttpResponse<TBody>;
|
|
112
|
+
constructor(response: HttpResponse<TBody>);
|
|
113
|
+
/**
|
|
114
|
+
* Correlates this failure with the `[HTTP]` log lines for the same request,
|
|
115
|
+
* which carry the method, the URL, the duration and every retry. `null` when
|
|
116
|
+
* the response did not come from an {@link HttpClient}.
|
|
117
|
+
*
|
|
118
|
+
* Worth quoting in a bug report: it is what makes a log excerpt readable.
|
|
119
|
+
*/
|
|
120
|
+
get requestId(): RequestId | null;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The machine-readable `code` frontline attaches to an error, or `null` for
|
|
124
|
+
* anything else - a non-HTTP failure, or an error body that carries only a
|
|
125
|
+
* message.
|
|
126
|
+
*
|
|
127
|
+
* Frontline answers a failure with `{ type, message, code?, errors?,
|
|
128
|
+
* event_id? }`, and `code` is the only part of it meant to be branched on:
|
|
129
|
+
* `message` is prose that may be reworded, and `type` distinguishes
|
|
130
|
+
* `invalid_request_error` from `api_error` without saying which one.
|
|
131
|
+
*
|
|
132
|
+
* Reach for this only where a code has a distinct remedy the user can act on.
|
|
133
|
+
* Mapping the whole vocabulary would couple the SDK to strings frontline does
|
|
134
|
+
* not version; falling back to a generic failure is the right default.
|
|
135
|
+
*/
|
|
136
|
+
declare function apiErrorCode(error: unknown): string | null;
|
|
137
|
+
|
|
137
138
|
/**
|
|
138
139
|
* Whether `error` is the CoinList API refusing an Ondo quote because the
|
|
139
140
|
* market is not open, as opposed to a request that failed.
|
|
@@ -329,6 +330,17 @@ declare const TOKEN_REGISTRY: {
|
|
|
329
330
|
* read would call.
|
|
330
331
|
*/
|
|
331
332
|
usdtAddress: (chain: EthereumChain) => EvmContractAddress | null;
|
|
333
|
+
/**
|
|
334
|
+
* `symbol`'s contract on `chain`, or `null` where it has none - one lookup
|
|
335
|
+
* over both tables, for a caller that holds the symbol as data.
|
|
336
|
+
*/
|
|
337
|
+
address: (symbol: StablecoinSymbol, chain: EthereumChain) => EvmContractAddress | null;
|
|
338
|
+
/**
|
|
339
|
+
* The stablecoin a backend asset code names, or `null` for a code the
|
|
340
|
+
* registry does not support. Matched exactly: frontline spells its codes
|
|
341
|
+
* the way the registry does, and a near miss is a different asset.
|
|
342
|
+
*/
|
|
343
|
+
stablecoin: (code: string) => StablecoinSymbol | null;
|
|
332
344
|
};
|
|
333
345
|
|
|
334
346
|
/**
|
package/dist/universal/index.js
CHANGED
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
DEFAULT_AMOUNT_TO_COMPUTE_PRICE,
|
|
8
8
|
DEFAULT_SLIPPAGE_BPS,
|
|
9
9
|
ONDO_NOT_TRADABLE_CODE,
|
|
10
|
-
OffersNamespaceImpl,
|
|
11
10
|
PKCEState,
|
|
12
11
|
RedactedWalletError,
|
|
13
12
|
RedirectUri,
|
|
@@ -37,12 +36,12 @@ import {
|
|
|
37
36
|
resolveCentrifugeVaults,
|
|
38
37
|
superstateSwapContractAddress,
|
|
39
38
|
swapSpender
|
|
40
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-4FGI6MAK.js";
|
|
41
40
|
import {
|
|
42
41
|
ClientCredentialsOAuth,
|
|
43
42
|
OAuthRefreshToken,
|
|
44
43
|
OAuthSession
|
|
45
|
-
} from "../chunk-
|
|
44
|
+
} from "../chunk-IWQ6A52U.js";
|
|
46
45
|
import {
|
|
47
46
|
AllowWalletResponse,
|
|
48
47
|
Asset,
|
|
@@ -102,6 +101,7 @@ import {
|
|
|
102
101
|
Offer,
|
|
103
102
|
OfferDetail,
|
|
104
103
|
OfferEditorial,
|
|
104
|
+
OfferFundingContract,
|
|
105
105
|
OfferId,
|
|
106
106
|
OfferOption,
|
|
107
107
|
OfferOptionAddress,
|
|
@@ -112,6 +112,7 @@ import {
|
|
|
112
112
|
OfferSwapContract,
|
|
113
113
|
OfferToken,
|
|
114
114
|
OfferVaultContract,
|
|
115
|
+
OffersNamespaceImpl,
|
|
115
116
|
OndoBuyTransaction,
|
|
116
117
|
OndoNamespaceImpl,
|
|
117
118
|
OndoQuote,
|
|
@@ -175,7 +176,7 @@ import {
|
|
|
175
176
|
txExplorerUrl,
|
|
176
177
|
usdAmount,
|
|
177
178
|
viemChain
|
|
178
|
-
} from "../chunk-
|
|
179
|
+
} from "../chunk-ANPPXFXD.js";
|
|
179
180
|
export {
|
|
180
181
|
AllowWalletResponse,
|
|
181
182
|
Asset,
|
|
@@ -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,
|