@coinlist-co/react 0.12.2-rc.eea3be6 → 0.12.2
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 +79 -43
- package/dist/{chunk-335G7ZM5.js → chunk-2FZAXGVH.js} +162 -431
- package/dist/chunk-2FZAXGVH.js.map +1 -0
- package/dist/{chunk-WBB6P6ZI.js → chunk-EAPBF7T2.js} +11 -42
- package/dist/chunk-EAPBF7T2.js.map +1 -0
- package/dist/{chunk-MJ6YXZWH.js → chunk-IWQ6A52U.js} +4 -2
- package/dist/chunk-IWQ6A52U.js.map +1 -0
- package/dist/{chunk-IUAGXUJY.js → chunk-OQ2ANYUF.js} +328 -21
- package/dist/chunk-OQ2ANYUF.js.map +1 -0
- package/dist/client/index.d.ts +251 -164
- package/dist/client/index.js +930 -570
- package/dist/client/index.js.map +1 -1
- package/dist/client-credentials-BwcmPcn-.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-qZW4aYYp.d.ts → time-ChSGmKZe.d.ts} +82 -51
- package/dist/{token-registry-snapshot-CMrhSBun.d.ts → token-registry-snapshot-DMubXr2c.d.ts} +1 -1
- package/dist/universal/index.d.ts +45 -44
- package/dist/universal/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-335G7ZM5.js.map +0 -1
- package/dist/chunk-IUAGXUJY.js.map +0 -1
- package/dist/chunk-MJ6YXZWH.js.map +0 -1
- package/dist/chunk-WBB6P6ZI.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 { al as ClientId, am as RedirectUri, an as CodeChallenge, ao as PKCEState, _ as CodeVerifier, h as OfferSwapContract, E as EthereumChain, b as EvmContractAddress, i as OndoBuyTransaction, B as BlockchainAmount, j as OndoSellTransaction, ap as RequestId, o as SwapQuote, p as Bps, aq as SwapStatus, a7 as AssetDecimals, a as AssetSymbol, q as EvmWalletAddress, ar as KnownAssetSymbol, H as Erc20Asset, S as StablecoinSymbol } from '../time-ChSGmKZe.js';
|
|
2
|
+
export { as as AllowWalletParams, at as AllowWalletResponse, au as Asset, av as AssetCode, aw as AssetId, L as AsyncOfferDetail, ax as AsyncOfferType, Z as AuthorizationCode, A as AuthorizationGrant, ay as BaseEvent, az as BuildCentrifugeVaultBuyParams, a1 as BuildOndoBuyParams, a3 as BuildOndoSellParams, aA as BuildOndoSwapParamsCore, aB as CentrifugeAssets, c as CentrifugeClaimDirection, aC as CentrifugeDepositPosition, d as CentrifugeNamespace, aD as CentrifugeOrderReason, aE as CentrifugeOrderability, aF as CentrifugeRedeemPosition, aG as CentrifugeShares, aa as CentrifugeVault, C as CentrifugeVaultBuyTransaction, aH as CentrifugeVaultClaimProceedsTransaction, aI as CentrifugeVaultClaimTransaction, a9 as CentrifugeVaultLeg, I as CentrifugeVaultLegId, aJ as CentrifugeVaultOffer, J as CentrifugeVaultOfferDetail, aK as CentrifugeVaultReason, a0 as CentrifugeVaultRef, aL as CentrifugeVaultResolution, $ as CentrifugeVaultStatus, aM as CentrifugeVaultTransactionCore, aN as CentrifugeWalletParams, aO as Chain, ak as ClientSecret, g as CoinListTokenSaleNamespace, aP as CoinListTokenSaleOffer, e as CoinListTokenSaleOfferDetail, w as Config, aQ as ConnectExternalWalletParams, aR as CreateKycTokenParams, aS as CreateParticipationParams, aT as CreateWalletOwnershipChallengeParams, aU as Cursor, aV as DebugEvent, aW as DecimalString, aX as DocumentFormType, af as DocumentSubmission, aY as DocumentSubmissionStatus, aZ as DocumentType, a_ as ETHEREUM_CHAINS, ad as EpochMillis, z as Erc20Namespace, a$ as FaqItem, b0 as FrontlineEventId, b1 as GetCentrifugeVaultStatusParams, b2 as GetOndoQuoteParams, b3 as GetOndoTradingStatusParams, b4 as GetSwapAuthorizationParams, b5 as GetSwapPreviewParams, b6 as GetSwapQuoteParams, b7 as GetTokenAllowanceParams, b8 as GetTokenBalanceParams, b9 as HexEncodedTransactionData, ba as Isin, bb as Iso2CountryCode, N as KycLevelName, bc as KycToken, bd as Link, be as ListOptionAddressesParams, bf as LogBinding, bg as LogBindings, bh as LogCause, bi as LogLevel, bj as LogScope, bk as LogValue, Y as Logger, bl as MAX_ASSET_DECIMALS, bm as MAX_UINT_256, bn as Milestone, bo as Millis, bp as Newtype, x as OAuthAccessToken, bq as OAuthRefreshToken, ah as OAuthSession, D as Offer, br as OfferBase, G as OfferDetail, bs as OfferDetailBase, bt as OfferEditorial, bu as OfferFundingContract, n as OfferId, bv as OfferOption, u as OfferOptionAddress, ae as OfferOptionAddressId, f as OfferOptionId, bw as OfferOptionSlug, bx as OfferSlug, by as OfferToken, bz as OfferType, O as OfferVaultContract, y as OffersNamespace, k as OndoNamespace, a4 as OndoQuote, bA as OndoQuoteDuration, a5 as OndoQuoteSize, bB as OndoSellOutcome, bC as OndoSwapOffer, a2 as OndoSwapOfferDetail, l as OndoSwapTransactionCore, a6 as OndoTradingStatus, m as OrderBookSide, aj as PaginatedResponse, ai as PaginationParams, P as Participation, ab as ParticipationId, ac 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, ag 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-ChSGmKZe.js';
|
|
3
|
+
import { F as FormattedAmountAssetUi, T as TxExplorerUrl, d as FormattedAmountUi, b as FormattedPercentUi, S as ShortenedWalletAddress } from '../token-registry-snapshot-DMubXr2c.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-DMubXr2c.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-BwcmPcn-.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.
|
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-EAPBF7T2.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,
|
|
@@ -113,6 +112,7 @@ import {
|
|
|
113
112
|
OfferSwapContract,
|
|
114
113
|
OfferToken,
|
|
115
114
|
OfferVaultContract,
|
|
115
|
+
OffersNamespaceImpl,
|
|
116
116
|
OndoBuyTransaction,
|
|
117
117
|
OndoNamespaceImpl,
|
|
118
118
|
OndoQuote,
|
|
@@ -176,7 +176,7 @@ import {
|
|
|
176
176
|
txExplorerUrl,
|
|
177
177
|
usdAmount,
|
|
178
178
|
viemChain
|
|
179
|
-
} from "../chunk-
|
|
179
|
+
} from "../chunk-2FZAXGVH.js";
|
|
180
180
|
export {
|
|
181
181
|
AllowWalletResponse,
|
|
182
182
|
Asset,
|