@coinlist-co/react 0.12.2-rc.818bed6 → 0.12.2-rc.8a0d02a
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-2HCSM3FB.js → chunk-3WW5FLT7.js} +2 -2
- package/dist/{chunk-YMDYLYL3.js → chunk-C6GF7MDF.js} +2 -58
- package/dist/chunk-C6GF7MDF.js.map +1 -0
- package/dist/{chunk-OUFI3D3Q.js → chunk-IZJ4JSSC.js} +2 -8
- package/dist/{chunk-OUFI3D3Q.js.map → chunk-IZJ4JSSC.js.map} +1 -1
- package/dist/client/index.cjs +598 -912
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +41 -174
- package/dist/client/index.d.ts +41 -174
- package/dist/client/index.js +524 -777
- package/dist/client/index.js.map +1 -1
- package/dist/server/index.cjs +1 -56
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +3 -6
- package/dist/server/index.d.ts +3 -6
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/{time-DJU6E8KK.d.cts → time-CVZpAkGY.d.cts} +10 -75
- package/dist/{time-DJU6E8KK.d.ts → time-CVZpAkGY.d.ts} +10 -75
- package/dist/{token-registry-snapshot-DGG5N27C.d.ts → token-registry-snapshot-BkwA8KmD.d.ts} +1 -1
- package/dist/{token-registry-snapshot-B0xCp3GD.d.cts → token-registry-snapshot-bR14QehS.d.cts} +1 -1
- package/dist/universal/index.cjs +1 -64
- package/dist/universal/index.cjs.map +1 -1
- package/dist/universal/index.d.cts +8 -22
- package/dist/universal/index.d.ts +8 -22
- package/dist/universal/index.js +2 -6
- package/package.json +1 -1
- package/dist/chunk-YMDYLYL3.js.map +0 -1
- /package/dist/{chunk-2HCSM3FB.js.map → chunk-3WW5FLT7.js.map} +0 -0
|
@@ -1188,16 +1188,6 @@ type GetCentrifugeVaultStatusParams = {
|
|
|
1188
1188
|
*/
|
|
1189
1189
|
chain: EthereumChain;
|
|
1190
1190
|
};
|
|
1191
|
-
type GetCentrifugeVaultQuoteParams = GetCentrifugeVaultStatusParams & {
|
|
1192
|
-
/**
|
|
1193
|
-
* Amount to price, in the base units of the funding token. Must be greater
|
|
1194
|
-
* than zero. No fee is deducted; this product charges none.
|
|
1195
|
-
*
|
|
1196
|
-
* Sized by `amount` alone: the quote is a free read of one spend, not a
|
|
1197
|
-
* dollar figure converted later.
|
|
1198
|
-
*/
|
|
1199
|
-
amount: BlockchainAmount;
|
|
1200
|
-
};
|
|
1201
1191
|
/**
|
|
1202
1192
|
* One wallet on one vault: what every position read and every claim is keyed
|
|
1203
1193
|
* by. There is no order id - a wallet has one pooled position per vault per
|
|
@@ -1309,7 +1299,7 @@ type InternalDebugEvent = {
|
|
|
1309
1299
|
* then, and the user claims the resulting shares in a second transaction. So
|
|
1310
1300
|
* every share figure before a fill is an estimate.
|
|
1311
1301
|
*
|
|
1312
|
-
* The
|
|
1302
|
+
* The GETs are free to poll. The two POSTs return calldata to broadcast:
|
|
1313
1303
|
* `invest` is signed for one wallet and called once on confirmation, `claim`
|
|
1314
1304
|
* collects everything claimable and carries no amount.
|
|
1315
1305
|
*/
|
|
@@ -1318,8 +1308,8 @@ type InternalDebugEvent = {
|
|
|
1318
1308
|
* branch on every value. `vault_unlinked` is terminal for the offer's proxy on
|
|
1319
1309
|
* that chain; the rest clear on their own or by hand.
|
|
1320
1310
|
*
|
|
1321
|
-
* `below_minimum`
|
|
1322
|
-
*
|
|
1311
|
+
* `below_minimum` depends on an amount, so a vault status never reports it —
|
|
1312
|
+
* see {@link CentrifugeVaultReasonDto}.
|
|
1323
1313
|
*/
|
|
1324
1314
|
type CentrifugeOrderReasonDto = 'vault_unlinked' | 'vault_halted' | 'proxy_not_permissioned' | 'price_unavailable' | 'below_minimum';
|
|
1325
1315
|
/** What a vault status can report: every reason but the amount-dependent one. */
|
|
@@ -1330,26 +1320,6 @@ type CentrifugeVaultReasonDto = Exclude<CentrifugeOrderReasonDto, 'below_minimum
|
|
|
1330
1320
|
* while earlier shares stay claimed.
|
|
1331
1321
|
*/
|
|
1332
1322
|
type CentrifugePositionStatusDto = 'none' | 'pending' | 'partially_filled' | 'filled' | 'claimed';
|
|
1333
|
-
/** `GET /v1/centrifuge/vault/quote?symbol&chain&amount`. Indicative only. */
|
|
1334
|
-
type CentrifugeVaultQuoteDto = {
|
|
1335
|
-
object: 'centrifuge_vault_quote';
|
|
1336
|
-
/** The vault's share token symbol, e.g. `deJTRSY`. */
|
|
1337
|
-
symbol: string;
|
|
1338
|
-
chain: string;
|
|
1339
|
-
/** The amount priced, echoed back, in `spend_input_decimals`. No fee. */
|
|
1340
|
-
spend_input_amount: string;
|
|
1341
|
-
spend_input_decimals: number;
|
|
1342
|
-
/** An estimate, not a floor: the fill can price either side of it. */
|
|
1343
|
-
estimated_shares: string;
|
|
1344
|
-
share_decimals: number;
|
|
1345
|
-
/** Funding token per whole share. Null when the vault has no price. */
|
|
1346
|
-
indicative_price: string | null;
|
|
1347
|
-
/** In `spend_input_decimals`. Null when the offer sets no minimum. */
|
|
1348
|
-
minimum_input_amount: string | null;
|
|
1349
|
-
can_order: boolean;
|
|
1350
|
-
/** Empty exactly when `can_order` is true. */
|
|
1351
|
-
reasons: CentrifugeOrderReasonDto[];
|
|
1352
|
-
};
|
|
1353
1323
|
/**
|
|
1354
1324
|
* `GET /v1/centrifuge/vault/status?symbol&chain`. The vault's own state, read
|
|
1355
1325
|
* from the chain on every call; the gate to poll, because Centrifuge announces
|
|
@@ -1394,9 +1364,6 @@ type CentrifugeVaultBuyDto = CentrifugeBroadcastDto & {
|
|
|
1394
1364
|
/** Exactly what the approval has to cover: no fee comes off it. */
|
|
1395
1365
|
spend_input_amount: string;
|
|
1396
1366
|
spend_input_decimals: number;
|
|
1397
|
-
/** Not a quantity purchased: the fill prices later. */
|
|
1398
|
-
estimated_shares: string;
|
|
1399
|
-
share_decimals: number;
|
|
1400
1367
|
};
|
|
1401
1368
|
/**
|
|
1402
1369
|
* `GET /v1/centrifuge/vault/position?symbol&chain&wallet_address`. The six
|
|
@@ -1514,31 +1481,6 @@ type CentrifugeOrderability<R extends CentrifugeOrderReason> = {
|
|
|
1514
1481
|
type: 'blocked';
|
|
1515
1482
|
reasons: [R, ...R[]];
|
|
1516
1483
|
};
|
|
1517
|
-
/**
|
|
1518
|
-
* What a deposit of a given size would buy, and whether it can be placed.
|
|
1519
|
-
*
|
|
1520
|
-
* **Indicative only.** The price is read from the vault now and the fund
|
|
1521
|
-
* prices the fulfilment on its own epoch, so neither {@link indicativePrice}
|
|
1522
|
-
* nor {@link estimatedShares} is a commitment. Free to poll while the user
|
|
1523
|
-
* sizes a deposit.
|
|
1524
|
-
*/
|
|
1525
|
-
type CentrifugeVaultQuote = {
|
|
1526
|
-
chain: EthereumChain;
|
|
1527
|
-
/** The vault's share token symbol, e.g. `deJTRSY`. */
|
|
1528
|
-
symbol: AssetSymbol;
|
|
1529
|
-
/** The amount priced, in the funding token's decimals. No fee is taken. */
|
|
1530
|
-
spendInputAmount: BlockchainAmount;
|
|
1531
|
-
/** Shares at the indicative price, in the share token's decimals. */
|
|
1532
|
-
estimatedShares: BlockchainAmount;
|
|
1533
|
-
/** Funding token per whole share. Null when the vault publishes no price. */
|
|
1534
|
-
indicativePrice: DecimalString | null;
|
|
1535
|
-
/** Null when the offer sets no minimum. Same decimals as the spend. */
|
|
1536
|
-
minimumInputAmount: BlockchainAmount | null;
|
|
1537
|
-
orderability: CentrifugeOrderability<CentrifugeOrderReason>;
|
|
1538
|
-
};
|
|
1539
|
-
declare const CentrifugeVaultQuote: {
|
|
1540
|
-
fromDto: (dto: CentrifugeVaultQuoteDto) => CentrifugeVaultQuote;
|
|
1541
|
-
};
|
|
1542
1484
|
/**
|
|
1543
1485
|
* A vault's own state, independent of any wallet or amount: the gate to poll.
|
|
1544
1486
|
* Centrifuge announces none of these changes, and an unlinked vault leaves the
|
|
@@ -1563,7 +1505,7 @@ type CentrifugeVaultStatus = {
|
|
|
1563
1505
|
membershipValidUntil: Date | null;
|
|
1564
1506
|
/** The proxy halted itself after a force-cancel; cleared only by hand. */
|
|
1565
1507
|
halted: boolean;
|
|
1566
|
-
/** A stale value
|
|
1508
|
+
/** When the vault last published a price. A stale value means the price is old. */
|
|
1567
1509
|
priceUpdatedAt: Date | null;
|
|
1568
1510
|
orderability: CentrifugeOrderability<CentrifugeVaultReason>;
|
|
1569
1511
|
/** When the chain was read: how old everything above is. */
|
|
@@ -1590,14 +1532,11 @@ type CentrifugeVaultTransactionCore = {
|
|
|
1590
1532
|
*
|
|
1591
1533
|
* **Broadcasting it buys nothing yet.** It places a request in the vault's
|
|
1592
1534
|
* queue; the fund fulfils it later at a price set then, and the user comes
|
|
1593
|
-
* back to claim.
|
|
1594
|
-
* purchased. Single-use: built once on confirmation, never on a timer.
|
|
1535
|
+
* back to claim. Single-use: built once on confirmation, never on a timer.
|
|
1595
1536
|
*/
|
|
1596
1537
|
type CentrifugeVaultBuyTransaction = CentrifugeVaultTransactionCore & {
|
|
1597
1538
|
/** Exactly what the approval has to cover: no fee comes off it. */
|
|
1598
1539
|
spendInputAmount: BlockchainAmount;
|
|
1599
|
-
/** At the price read when the calldata was built. An estimate, not a floor. */
|
|
1600
|
-
estimatedShares: BlockchainAmount;
|
|
1601
1540
|
};
|
|
1602
1541
|
declare const CentrifugeVaultBuyTransaction: {
|
|
1603
1542
|
fromDto: (dto: CentrifugeVaultBuyDto) => CentrifugeVaultBuyTransaction;
|
|
@@ -1738,14 +1677,12 @@ declare const CentrifugeVaultClaimProceedsTransaction: {
|
|
|
1738
1677
|
};
|
|
1739
1678
|
|
|
1740
1679
|
/**
|
|
1741
|
-
* Centrifuge vault reads and claims:
|
|
1742
|
-
*
|
|
1743
|
-
*
|
|
1680
|
+
* Centrifuge vault reads and claims: the vault-wide ordering gate, each
|
|
1681
|
+
* wallet's position per direction, and the calldata that claims a filled
|
|
1682
|
+
* request.
|
|
1744
1683
|
*
|
|
1745
1684
|
* The reads are free to poll - none spends an attestation, so a client may
|
|
1746
|
-
* call them while the user sizes a deposit or waits on a fill.
|
|
1747
|
-
* no expiry: it is indicative, the fund prices fulfilment later, and a
|
|
1748
|
-
* countdown would imply a commitment the API does not make.
|
|
1685
|
+
* call them while the user sizes a deposit or waits on a fill.
|
|
1749
1686
|
*
|
|
1750
1687
|
* A vault trade settles in two legs: a request the fund fills on its own
|
|
1751
1688
|
* schedule, then a claim. There is no order id - each wallet has one pooled
|
|
@@ -1761,7 +1698,6 @@ declare const CentrifugeVaultClaimProceedsTransaction: {
|
|
|
1761
1698
|
* {@link NotAuthenticatedError} otherwise.
|
|
1762
1699
|
*/
|
|
1763
1700
|
interface CentrifugeNamespace {
|
|
1764
|
-
getQuote(params: GetCentrifugeVaultQuoteParams): Promise<CentrifugeVaultQuote>;
|
|
1765
1701
|
getVaultStatus(params: GetCentrifugeVaultStatusParams): Promise<CentrifugeVaultStatus>;
|
|
1766
1702
|
/** The wallet's invest position: funding queued, shares claimable. */
|
|
1767
1703
|
getPosition(params: CentrifugeWalletParams): Promise<CentrifugeVaultPosition>;
|
|
@@ -1794,7 +1730,6 @@ declare class CentrifugeNamespaceImpl implements CentrifugeNamespace {
|
|
|
1794
1730
|
private readonly ctx;
|
|
1795
1731
|
protected readonly log: InternalLogger;
|
|
1796
1732
|
constructor(ctx: UniversalNamespaceContext);
|
|
1797
|
-
getQuote(params: GetCentrifugeVaultQuoteParams): Promise<CentrifugeVaultQuote>;
|
|
1798
1733
|
getVaultStatus(params: GetCentrifugeVaultStatusParams): Promise<CentrifugeVaultStatus>;
|
|
1799
1734
|
getPosition(params: CentrifugeWalletParams): Promise<CentrifugeVaultPosition>;
|
|
1800
1735
|
getRedeemPosition(params: CentrifugeWalletParams): Promise<CentrifugeVaultRedeemPosition>;
|
|
@@ -4049,4 +3984,4 @@ declare function isExpired({ expiresAt, now, buffer, }: {
|
|
|
4049
3984
|
buffer?: Millis;
|
|
4050
3985
|
}): boolean;
|
|
4051
3986
|
|
|
4052
|
-
export {
|
|
3987
|
+
export { Offer as $, AuthorizationCode as A, BlockchainAmount as B, CodeVerifier as C, type OAuthAccessToken as D, type Erc20Namespace as E, type OffersNamespace as F, StablecoinSymbol as G, type Erc20Asset as H, OfferDetail as I, TokenMetadata as J, type CentrifugeVaultOfferDetail as K, type Logger as L, type OfferType as M, type OndoSwapOfferDetail as N, OfferVaultContract as O, Participation as P, type CoinListTokenSaleOfferDetail as Q, type RequirementsNamespace as R, type SuperstateSwapNamespace as S, type TokensNamespace as T, type UniversalNamespaceContext as U, type SuperstateSwapOfferDetail as V, type WalletError as W, CentrifugeVaultLegId as X, Seconds as Y, type AsyncOfferType as Z, AsyncOfferDetail as _, EthereumChain as a, CentrifugeVaultPosition as a$, RequirementStatusInfo as a0, type RequirementType as a1, type RequirementStatusValue as a2, OfferOptionAddress as a3, RequirementId as a4, type KycLevelName as a5, DocumentSubmission as a6, type WalletChallengeType as a7, type PinoLoggerOptions as a8, AssetDecimals as a9, type RequestId as aA, type RpcFailureReason as aB, type SafeEvent as aC, type SafeFields as aD, type UnredactedFields as aE, OAuthSession as aF, ClientCredentialsOAuth as aG, type Sender as aH, PaginationParams as aI, PaginatedResponse as aJ, ClientSecret as aK, OfferToken as aL, DecimalString as aM, SwapStatus as aN, type Uint256 as aO, KnownAssetSymbol as aP, type Newtype as aQ, type AllowWalletParams as aR, AllowWalletResponse as aS, Asset as aT, AssetCode as aU, Blockchain as aV, type BuildOndoSwapParamsCore as aW, type CentrifugePositionStatus as aX, CentrifugeVaultClaimProceedsTransaction as aY, CentrifugeVaultClaimTransaction as aZ, type CentrifugeVaultOffer as a_, type BuildCentrifugeVaultBuyParams as aa, type CentrifugeOrderReason as ab, type CentrifugeOrderability as ac, OndoTradingStatus as ad, type BuildOndoBuyParams as ae, type BuildOndoSellParams as af, OndoQuote as ag, type OndoQuoteSize as ah, type TokenIdentifier as ai, CentrifugeVaultLeg as aj, OfferOptionAddressId as ak, CentrifugeVaultStatus as al, TokenLogo as am, type DebugEvent as an, type FrontlineEventId as ao, HttpError as ap, type HttpResponse as aq, KycToken as ar, type LogBinding as as, type LogBindings as at, type LogCause as au, type LogLevel as av, type LogScope as aw, type LogValue as ax, type ProductionLogLevel as ay, RedactedWalletError as az, EvmContractAddress as b, SOLANA_CHAINS as b$, type CentrifugeVaultReason as b0, CentrifugeVaultRedeemPosition as b1, type CentrifugeVaultTransactionCore as b2, type CentrifugeWalletParams as b3, Chain as b4, ClientId as b5, CodeChallenge as b6, type CoinListTokenSaleOffer as b7, ConnectExternalWalletParams as b8, type CreateKycTokenParams as b9, OAuthRefreshToken as bA, type OfferBase as bB, type OfferDetailBase as bC, OfferEditorial as bD, OfferOption as bE, OfferOptionSlug as bF, OfferSlug as bG, OffersNamespaceImpl as bH, type OndoQuoteDuration as bI, type OndoSellOutcome as bJ, type OndoSwapOffer as bK, PKCEState as bL, type PaginatedResponseDto as bM, ParticipationId as bN, type ParticipationStatus as bO, ParticipationsPaginationParams as bP, PauseFlags as bQ, Pii as bR, PiiAddress as bS, PiiJurisdiction as bT, type PiiKind as bU, type QueryParamValue as bV, type QueryParamValues as bW, RedirectUri as bX, type RemoveOptionAddressParams as bY, type RequirementActionNeededReason as bZ, type RpcConfig as b_, CreateParticipationParams as ba, CreateWalletOwnershipChallengeParams as bb, Cursor as bc, type DocumentFormType as bd, type DocumentSubmissionStatus as be, type DocumentType as bf, ETHEREUM_CHAINS as bg, EpochMillis as bh, Erc20NamespaceImpl as bi, FaqItem as bj, type GetCentrifugeVaultStatusParams as bk, type GetOndoQuoteParams as bl, type GetOndoTradingStatusParams as bm, type GetSwapAuthorizationParams as bn, type GetSwapPreviewParams as bo, type GetTokenAllowanceParams as bp, type GetTokenBalanceParams as bq, HexEncodedTransactionData as br, Isin as bs, Iso2CountryCode as bt, Link as bu, type ListOptionAddressesParams as bv, MAX_ASSET_DECIMALS as bw, MAX_UINT_256 as bx, Milestone as by, Millis as bz, type CentrifugeNamespace as c, STABLE_DECIMALS as c0, SolanaChain as c1, type SubmitDocumentParams as c2, type SuperstateSwapOffer as c3, type SwapContractRef as c4, SwapPreview as c5, TermItem as c6, Ticker as c7, type TokenLogoImage as c8, TokenLogoUrl as c9, type TokenRole as ca, TokensNamespaceImpl as cb, type Tx as cc, WalletAddress as cd, WalletOwnershipChallenge as ce, type WalletProtocol as cf, WalletsNamespaceImpl as cg, apiErrorCode as ch, assertUint256 as ci, isChain as cj, isExpired as ck, isOfferType as cl, parseUint256 as cm, AssetSymbol as d, CentrifugeVaultBuyTransaction as e, type CentrifugeClaimDirection as f, CentrifugeNamespaceImpl as g, type CoinListTokenSaleNamespace as h, OfferId as i, OfferOptionId as j, AssetId as k, CoinListTokenSaleNamespaceImpl as l, type OndoNamespace as m, OfferSwapContract as n, OndoBuyTransaction as o, OndoSellTransaction as p, type OndoSwapTransactionCore as q, type OrderBookSide as r, OndoNamespaceImpl as s, type WalletsNamespace as t, Bps as u, EvmWalletAddress as v, SuperstateSwapNamespaceImpl as w, Requirement as x, RequirementsNamespaceImpl as y, type Config as z };
|
package/dist/{token-registry-snapshot-DGG5N27C.d.ts → token-registry-snapshot-BkwA8KmD.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b5 as ClientId, bX as RedirectUri, b6 as CodeChallenge, bL as PKCEState, C as CodeVerifier, v as EvmWalletAddress, a as EthereumChain, cc as Tx, B as BlockchainAmount, c5 as SwapPreview, a9 as AssetDecimals, aQ as Newtype, J as TokenMetadata, b4 as Chain, b as EvmContractAddress, aL as OfferToken } from './time-CVZpAkGY.js';
|
|
2
2
|
import { Hex, Abi, Hash, TransactionReceipt } from 'viem';
|
|
3
3
|
|
|
4
4
|
type PKCEParams = {
|
package/dist/{token-registry-snapshot-B0xCp3GD.d.cts → token-registry-snapshot-bR14QehS.d.cts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b5 as ClientId, bX as RedirectUri, b6 as CodeChallenge, bL as PKCEState, C as CodeVerifier, v as EvmWalletAddress, a as EthereumChain, cc as Tx, B as BlockchainAmount, c5 as SwapPreview, a9 as AssetDecimals, aQ as Newtype, J as TokenMetadata, b4 as Chain, b as EvmContractAddress, aL as OfferToken } from './time-CVZpAkGY.cjs';
|
|
2
2
|
import { Hex, Abi, Hash, TransactionReceipt } from 'viem';
|
|
3
3
|
|
|
4
4
|
type PKCEParams = {
|
package/dist/universal/index.cjs
CHANGED
|
@@ -33,7 +33,6 @@ __export(universal_exports, {
|
|
|
33
33
|
Blockchain: () => Blockchain,
|
|
34
34
|
BlockchainAmount: () => BlockchainAmount,
|
|
35
35
|
Bps: () => Bps,
|
|
36
|
-
CENTRIFUGE_INDICATIVE_QUOTE_AMOUNT: () => CENTRIFUGE_INDICATIVE_QUOTE_AMOUNT,
|
|
37
36
|
CENTRIFUGE_POLL_INTERVAL_MS: () => CENTRIFUGE_POLL_INTERVAL_MS,
|
|
38
37
|
CentrifugeNamespaceImpl: () => CentrifugeNamespaceImpl,
|
|
39
38
|
CentrifugeVaultBuyTransaction: () => CentrifugeVaultBuyTransaction,
|
|
@@ -42,7 +41,6 @@ __export(universal_exports, {
|
|
|
42
41
|
CentrifugeVaultLeg: () => CentrifugeVaultLeg,
|
|
43
42
|
CentrifugeVaultLegId: () => CentrifugeVaultLegId,
|
|
44
43
|
CentrifugeVaultPosition: () => CentrifugeVaultPosition,
|
|
45
|
-
CentrifugeVaultQuote: () => CentrifugeVaultQuote,
|
|
46
44
|
CentrifugeVaultRedeemPosition: () => CentrifugeVaultRedeemPosition,
|
|
47
45
|
CentrifugeVaultStatus: () => CentrifugeVaultStatus,
|
|
48
46
|
Chain: () => Chain,
|
|
@@ -704,37 +702,6 @@ function requiredArray(value, field) {
|
|
|
704
702
|
}
|
|
705
703
|
|
|
706
704
|
// src/universal/types/providers/centrifuge/centrifuge.ts
|
|
707
|
-
var CentrifugeVaultQuote = {
|
|
708
|
-
fromDto: (dto) => {
|
|
709
|
-
const spendDecimals = AssetDecimals(dto.spend_input_decimals);
|
|
710
|
-
const shareDecimals = AssetDecimals(dto.share_decimals);
|
|
711
|
-
return {
|
|
712
|
-
chain: EthereumChain(dto.chain),
|
|
713
|
-
symbol: AssetSymbol(dto.symbol),
|
|
714
|
-
spendInputAmount: blockchainAmountFromRawOrThrow({
|
|
715
|
-
label: "spend_input_amount",
|
|
716
|
-
raw: dto.spend_input_amount,
|
|
717
|
-
decimals: spendDecimals
|
|
718
|
-
}),
|
|
719
|
-
estimatedShares: blockchainAmountFromRawOrThrow({
|
|
720
|
-
label: "estimated_shares",
|
|
721
|
-
raw: dto.estimated_shares,
|
|
722
|
-
decimals: shareDecimals
|
|
723
|
-
}),
|
|
724
|
-
indicativePrice: decimalOrNull(dto.indicative_price),
|
|
725
|
-
minimumInputAmount: dto.minimum_input_amount === null ? null : blockchainAmountFromRawOrThrow({
|
|
726
|
-
label: "minimum_input_amount",
|
|
727
|
-
raw: dto.minimum_input_amount,
|
|
728
|
-
decimals: spendDecimals
|
|
729
|
-
}),
|
|
730
|
-
orderability: parseOrderability(
|
|
731
|
-
dto.can_order,
|
|
732
|
-
dto.reasons,
|
|
733
|
-
"CentrifugeVaultQuote"
|
|
734
|
-
)
|
|
735
|
-
};
|
|
736
|
-
}
|
|
737
|
-
};
|
|
738
705
|
var CentrifugeVaultStatus = {
|
|
739
706
|
fromDto: (dto) => ({
|
|
740
707
|
chain: EthereumChain(dto.chain),
|
|
@@ -773,12 +740,7 @@ var CentrifugeVaultBuyTransaction = {
|
|
|
773
740
|
}
|
|
774
741
|
return {
|
|
775
742
|
...parseTransactionCore(dto, "CentrifugeVaultBuyTransaction"),
|
|
776
|
-
spendInputAmount
|
|
777
|
-
estimatedShares: blockchainAmountFromRawOrThrow({
|
|
778
|
-
label: "estimated_shares",
|
|
779
|
-
raw: dto.estimated_shares,
|
|
780
|
-
decimals: AssetDecimals(dto.share_decimals)
|
|
781
|
-
})
|
|
743
|
+
spendInputAmount
|
|
782
744
|
};
|
|
783
745
|
}
|
|
784
746
|
};
|
|
@@ -902,19 +864,6 @@ function parseTransactionCore(dto, model) {
|
|
|
902
864
|
}
|
|
903
865
|
|
|
904
866
|
// src/universal/api/frontline/providers/centrifuge/centrifuge.ts
|
|
905
|
-
async function getCentrifugeVaultQuote(api, params) {
|
|
906
|
-
const dto = await api.send({
|
|
907
|
-
method: "GET",
|
|
908
|
-
url: "/v1/centrifuge/vault/quote",
|
|
909
|
-
queryParams: {
|
|
910
|
-
symbol: params.symbol,
|
|
911
|
-
chain: params.chain,
|
|
912
|
-
amount: params.amount.raw.toString()
|
|
913
|
-
},
|
|
914
|
-
attributes: Attributes.protected()
|
|
915
|
-
});
|
|
916
|
-
return CentrifugeVaultQuote.fromDto(dto);
|
|
917
|
-
}
|
|
918
867
|
async function getCentrifugeVaultStatus(api, params) {
|
|
919
868
|
const dto = await api.send({
|
|
920
869
|
method: "GET",
|
|
@@ -1168,12 +1117,6 @@ var CentrifugeNamespaceImpl = class {
|
|
|
1168
1117
|
this.ctx = ctx;
|
|
1169
1118
|
this.log = internalLogger(ctx.logger, "CENTRIFUGE");
|
|
1170
1119
|
}
|
|
1171
|
-
async getQuote(params) {
|
|
1172
|
-
return this.log.wrap("getQuote", params, async () => {
|
|
1173
|
-
await this.ctx.ensureUserAuthenticated();
|
|
1174
|
-
return getCentrifugeVaultQuote(this.ctx.api, params);
|
|
1175
|
-
});
|
|
1176
|
-
}
|
|
1177
1120
|
async getVaultStatus(params) {
|
|
1178
1121
|
return this.log.wrap("getVaultStatus", params, async () => {
|
|
1179
1122
|
await this.ctx.ensureUserAuthenticated();
|
|
@@ -1214,10 +1157,6 @@ var CentrifugeNamespaceImpl = class {
|
|
|
1214
1157
|
|
|
1215
1158
|
// src/universal/core/checkout/centrifuge/constants.ts
|
|
1216
1159
|
var CENTRIFUGE_POLL_INTERVAL_MS = 15e3;
|
|
1217
|
-
var CENTRIFUGE_INDICATIVE_QUOTE_AMOUNT = BlockchainAmount({
|
|
1218
|
-
raw: 100000000n,
|
|
1219
|
-
decimals: STABLE_DECIMALS
|
|
1220
|
-
});
|
|
1221
1160
|
|
|
1222
1161
|
// src/universal/core/checkout/centrifuge/vaults.ts
|
|
1223
1162
|
function resolveCentrifugeVaults(offer, lookup) {
|
|
@@ -4447,7 +4386,6 @@ var User = {
|
|
|
4447
4386
|
Blockchain,
|
|
4448
4387
|
BlockchainAmount,
|
|
4449
4388
|
Bps,
|
|
4450
|
-
CENTRIFUGE_INDICATIVE_QUOTE_AMOUNT,
|
|
4451
4389
|
CENTRIFUGE_POLL_INTERVAL_MS,
|
|
4452
4390
|
CentrifugeNamespaceImpl,
|
|
4453
4391
|
CentrifugeVaultBuyTransaction,
|
|
@@ -4456,7 +4394,6 @@ var User = {
|
|
|
4456
4394
|
CentrifugeVaultLeg,
|
|
4457
4395
|
CentrifugeVaultLegId,
|
|
4458
4396
|
CentrifugeVaultPosition,
|
|
4459
|
-
CentrifugeVaultQuote,
|
|
4460
4397
|
CentrifugeVaultRedeemPosition,
|
|
4461
4398
|
CentrifugeVaultStatus,
|
|
4462
4399
|
Chain,
|