@coinlist-co/react 0.12.2-rc.9fb6364 → 0.12.2-rc.a59b344
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-STAHYDLY.js → chunk-4IZ2F732.js} +2 -2
- package/dist/{chunk-BNMF2HMW.js → chunk-NBO5E2RO.js} +39 -3
- package/dist/chunk-NBO5E2RO.js.map +1 -0
- package/dist/{chunk-KRA6EM2L.js → chunk-UJYSXXJF.js} +168 -3
- package/dist/chunk-UJYSXXJF.js.map +1 -0
- package/dist/client/index.cjs +147 -49
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +92 -29
- package/dist/client/index.d.ts +92 -29
- package/dist/client/index.js +75 -15
- package/dist/client/index.js.map +1 -1
- package/dist/server/index.cjs +70 -40
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +20 -5
- package/dist/server/index.d.ts +20 -5
- package/dist/server/index.js +7 -6
- package/dist/server/index.js.map +1 -1
- package/dist/{time-BY3apBpc.d.cts → time-CFocgYyl.d.cts} +1 -1
- package/dist/{time-B5YOQxuh.d.ts → time-DvgN98Q9.d.ts} +1 -1
- package/dist/{token-registry-snapshot-C1NxdBmF.d.ts → token-registry-snapshot-BsAfBL_b.d.ts} +9 -7
- package/dist/{token-registry-snapshot-DyjrA32p.d.cts → token-registry-snapshot-Cc_eA5zM.d.cts} +9 -7
- package/dist/{tokens-namespace-BJfFeowE.d.cts → tokens-namespace-D_XSpiS-.d.cts} +102 -19
- package/dist/{tokens-namespace-BJfFeowE.d.ts → tokens-namespace-D_XSpiS-.d.ts} +102 -19
- package/dist/universal/index.cjs +233 -37
- package/dist/universal/index.cjs.map +1 -1
- package/dist/universal/index.d.cts +341 -6
- package/dist/universal/index.d.ts +341 -6
- package/dist/universal/index.js +18 -2
- package/package.json +1 -1
- package/dist/chunk-BNMF2HMW.js.map +0 -1
- package/dist/chunk-KRA6EM2L.js.map +0 -1
- /package/dist/{chunk-STAHYDLY.js.map → chunk-4IZ2F732.js.map} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { N as NonEmptyArray, S as SwapQuote, F as FormattedAmountAssetUi, T as TxExplorerUrl, e as FormattedAmountUi, b as FormattedPercentUi, a as ShortenedWalletAddress } from '../token-registry-snapshot-
|
|
4
|
-
export { A as AssetIconUrl, B as BroadcastTxParams, C as ConnectWallet, d as EvmSigner, E as EvmWallet, P as PKCEConfig, f as PKCEParams, c as TokenRegistrySnapshot, W as WriteContractParams, g as generatePKCEParams, o as offerDisplayTokens } from '../token-registry-snapshot-
|
|
1
|
+
import { au as PaginationParams, av as PaginatedResponse, ax as DecimalString, x as StablecoinSymbol, j as OndoBuyTransaction, B as BlockchainAmount, k as OndoSellTransaction, ab as HttpError, p as Bps, ay as SwapStatus, a1 as AssetDecimals, b as EvmContractAddress, a as EthereumChain, i as OfferSwapContract, az as Uint256, h as AssetSymbol, q as EvmWalletAddress, aA as KnownAssetSymbol, y as Erc20Asset, aB as Tx, aC as Newtype } from '../tokens-namespace-D_XSpiS-.js';
|
|
2
|
+
export { aD as AllowWalletParams, aE as AllowWalletResponse, aF as Asset, aG as AssetCode, e as AssetId, A as AuthorizationCode, aH as Blockchain, a2 as BuildOndoBuyParams, a3 as BuildOndoSellParams, aI as BuildOndoSwapParamsCore, aJ as CentrifugeVaultOffer, F as CentrifugeVaultOfferDetail, aK as Chain, as as ClientCredentialsOAuth, aL as ClientId, aw as ClientSecret, aM as CodeChallenge, C as CodeVerifier, c as CoinListTokenSaleNamespace, f as CoinListTokenSaleNamespaceImpl, aN as CoinListTokenSaleOffer, I as CoinListTokenSaleOfferDetail, u as Config, aO as ConnectExternalWalletParams, aP as CreateKycTokenParams, aQ as CreateParticipationParams, aR as CreateWalletOwnershipChallengeParams, aS as Cursor, a9 as DebugEvent, aT as DocumentFormType, Z as DocumentSubmission, aU as DocumentSubmissionStatus, aV as DocumentType, aW as ETHEREUM_CHAINS, E as Erc20Namespace, aX as Erc20NamespaceImpl, aY as FaqItem, aa as FrontlineEventId, aZ as GetOndoQuoteParams, a_ as GetOndoTradingStatusParams, a$ as GetSwapAuthorizationParams, b0 as GetSwapPreviewParams, b1 as GetTokenAllowanceParams, b2 as GetTokenBalanceParams, b3 as HexEncodedTransactionData, ac as HttpResponse, b4 as Isin, b5 as Iso2CountryCode, Y as KycLevelName, ad as KycToken, b6 as Link, b7 as ListOptionAddressesParams, ae as LogBinding, af as LogBindings, ag as LogCause, ah as LogLevel, ai as LogScope, aj as LogValue, L as Logger, b8 as MAX_ASSET_DECIMALS, b9 as MAX_UINT_256, ba as Milestone, v as OAuthAccessToken, bb as OAuthRefreshToken, ar as OAuthSession, K as Offer, bc as OfferBase, z as OfferDetail, bd as OfferDetailBase, be as OfferEditorial, O as OfferId, bf as OfferOption, V as OfferOptionAddress, a7 as OfferOptionAddressId, d as OfferOptionId, bg as OfferOptionSlug, bh as OfferSlug, bi as OfferToken, G as OfferType, bj as OfferVaultContract, w as OffersNamespace, bk as OffersNamespaceImpl, g as OndoNamespace, n as OndoNamespaceImpl, a4 as OndoQuote, bl as OndoQuoteDuration, a5 as OndoQuoteSize, bm as OndoSellOutcome, bn as OndoSwapOffer, H as OndoSwapOfferDetail, l as OndoSwapTransactionCore, a0 as OndoTradingStatus, m as OrderBookSide, bo as PKCEState, bp as PaginatedResponseDto, P as Participation, bq as ParticipationId, br as ParticipationStatus, bs as ParticipationsPaginationParams, bt as PauseFlags, bu as Pii, bv as PiiAddress, bw as PiiJurisdiction, bx as PiiKind, $ as PinoLoggerOptions, ak as ProductionLogLevel, by as QueryParamValue, bz as QueryParamValues, al as RedactedWalletError, bA as RedirectUri, bB as RemoveOptionAddressParams, am as RequestId, s as Requirement, bC as RequirementActionNeededReason, X as RequirementId, M as RequirementStatusInfo, Q as RequirementStatusValue, N as RequirementType, R as RequirementsNamespace, t as RequirementsNamespaceImpl, bD as RpcConfig, an as RpcFailureReason, bE as SOLANA_CHAINS, bF as STABLE_DECIMALS, ao as SafeEvent, ap as SafeFields, bG as SolanaChain, bH as SubmitDocumentParams, S as SuperstateSwapNamespace, r as SuperstateSwapNamespaceImpl, bI as SuperstateSwapOffer, J as SuperstateSwapOfferDetail, bJ as SwapContractRef, bK as SwapPreview, bL as TermItem, bM as Ticker, a6 as TokenIdentifier, a8 as TokenLogo, bN as TokenLogoImage, bO as TokenLogoUrl, D as TokenMetadata, bP as TokenRole, T as TokensNamespace, bQ as TokensNamespaceImpl, aq as UnredactedFields, bR as WalletAddress, _ as WalletChallengeType, W as WalletError, bS as WalletOwnershipChallenge, bT as WalletProtocol, o as WalletsNamespace, bU as WalletsNamespaceImpl, bV as apiErrorCode, bW as assertUint256, bX as isChain, bY as isOfferType, bZ as parseUint256 } from '../tokens-namespace-D_XSpiS-.js';
|
|
3
|
+
import { N as NonEmptyArray, S as SwapQuote, F as FormattedAmountAssetUi, T as TxExplorerUrl, e as FormattedAmountUi, b as FormattedPercentUi, a as ShortenedWalletAddress } from '../token-registry-snapshot-BsAfBL_b.js';
|
|
4
|
+
export { A as AssetIconUrl, B as BroadcastTxParams, C as ConnectWallet, d as EvmSigner, E as EvmWallet, P as PKCEConfig, f as PKCEParams, c as TokenRegistrySnapshot, W as WriteContractParams, g as generatePKCEParams, o as offerDisplayTokens } from '../token-registry-snapshot-BsAfBL_b.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-
|
|
6
|
+
export { E as EpochMillis, M as Millis, S as Seconds, i as isExpired } from '../time-DvgN98Q9.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Walks every page of a cursor-paginated endpoint and returns the flattened
|
|
@@ -130,6 +130,26 @@ declare function computeOndoSellPrice(transaction: OndoSellTransaction): Blockch
|
|
|
130
130
|
/** The sooner of Ondo's deadline and now + {@link ONDO_QUOTE_MAX_TTL_MS}. */
|
|
131
131
|
declare function ondoQuoteOfferDeadline(expiresAt: Date, nowMs?: number): Date;
|
|
132
132
|
|
|
133
|
+
/**
|
|
134
|
+
* The CoinList API's error code for an Ondo quote refused because the asset
|
|
135
|
+
* cannot be traded right now: the market is closed or paused, or the asset is
|
|
136
|
+
* paused or closed for the session. It arrives on a 409.
|
|
137
|
+
*
|
|
138
|
+
* One code for all four of Ondo's reasons, because the remedy is the same:
|
|
139
|
+
* wait for the market to open. Ondo pauses for a moment at every US session
|
|
140
|
+
* change (04:00 and 16:00 ET), so a poll can land on one even while
|
|
141
|
+
* `getTradingStatus` reported the asset tradable a second earlier.
|
|
142
|
+
*/
|
|
143
|
+
declare const ONDO_NOT_TRADABLE_CODE = "not_tradable";
|
|
144
|
+
/**
|
|
145
|
+
* Whether `error` is the CoinList API refusing an Ondo quote because the
|
|
146
|
+
* market is not open, as opposed to a request that failed.
|
|
147
|
+
*
|
|
148
|
+
* Total: anything that is not an `HttpError` carrying
|
|
149
|
+
* {@link ONDO_NOT_TRADABLE_CODE} is `false`.
|
|
150
|
+
*/
|
|
151
|
+
declare function isOndoNotTradableError(error: unknown): error is HttpError;
|
|
152
|
+
|
|
133
153
|
/**
|
|
134
154
|
* The Superstate swap contract's ABI, generated verbatim from the shared
|
|
135
155
|
* `TokenSwap` base contract:
|
|
@@ -1274,6 +1294,321 @@ declare class MathError extends Error {
|
|
|
1274
1294
|
constructor(message: string);
|
|
1275
1295
|
}
|
|
1276
1296
|
|
|
1297
|
+
/**
|
|
1298
|
+
* Wire shapes for frontline's `/v1/centrifuge/vault/*` endpoints, as published
|
|
1299
|
+
* in frontline's OpenAPI schema (ENG-1936). Every uint256 crosses as a decimal
|
|
1300
|
+
* string, every price as a decimal string, every timestamp as ISO 8601.
|
|
1301
|
+
*
|
|
1302
|
+
* **A vault deposit does not settle in the transaction that places it.** The
|
|
1303
|
+
* fund fulfils requests on its own epoch, in whole or in part, at a price set
|
|
1304
|
+
* then, and the user claims the resulting shares in a second transaction. So
|
|
1305
|
+
* every share figure before a fill is an estimate.
|
|
1306
|
+
*
|
|
1307
|
+
* The three GETs are free to poll. The two POSTs return calldata to broadcast:
|
|
1308
|
+
* `buy` is signed for one wallet and called once on confirmation, `claim`
|
|
1309
|
+
* collects everything claimable and carries no amount.
|
|
1310
|
+
*/
|
|
1311
|
+
/**
|
|
1312
|
+
* Why a deposit cannot be placed right now. A closed set, so a client can
|
|
1313
|
+
* branch on every value. `vault_unlinked` is terminal for the offer's proxy on
|
|
1314
|
+
* that chain; the rest clear on their own or by hand.
|
|
1315
|
+
*
|
|
1316
|
+
* `below_minimum` is the one reason that depends on an amount, so only a quote
|
|
1317
|
+
* can report it - see {@link CentrifugeVaultReasonDto}.
|
|
1318
|
+
*/
|
|
1319
|
+
type CentrifugeOrderReasonDto = 'vault_unlinked' | 'vault_halted' | 'proxy_not_permissioned' | 'price_unavailable' | 'below_minimum';
|
|
1320
|
+
/** What a vault status can report: every reason but the amount-dependent one. */
|
|
1321
|
+
type CentrifugeVaultReasonDto = Exclude<CentrifugeOrderReasonDto, 'below_minimum'>;
|
|
1322
|
+
/**
|
|
1323
|
+
* Where a wallet stands on a vault, derived from its amounts rather than
|
|
1324
|
+
* stored. Not a lifecycle: a new request moves any of these back to `pending`
|
|
1325
|
+
* while earlier shares stay claimed.
|
|
1326
|
+
*/
|
|
1327
|
+
type CentrifugePositionStatusDto = 'none' | 'pending' | 'partially_filled' | 'filled' | 'claimed';
|
|
1328
|
+
/** `GET /v1/centrifuge/vault/quote?symbol&chain&amount`. Indicative only. */
|
|
1329
|
+
type CentrifugeVaultQuoteDto = {
|
|
1330
|
+
object: 'centrifuge_vault_quote';
|
|
1331
|
+
/** The vault's share token symbol, e.g. `deJTRSY`. */
|
|
1332
|
+
symbol: string;
|
|
1333
|
+
chain: string;
|
|
1334
|
+
/** The amount priced, echoed back, in `spend_input_decimals`. No fee. */
|
|
1335
|
+
spend_input_amount: string;
|
|
1336
|
+
spend_input_decimals: number;
|
|
1337
|
+
/** An estimate, not a floor: the fill can price either side of it. */
|
|
1338
|
+
estimated_shares: string;
|
|
1339
|
+
share_decimals: number;
|
|
1340
|
+
/** Funding token per whole share. Null when the vault has no price. */
|
|
1341
|
+
indicative_price: string | null;
|
|
1342
|
+
/** In `spend_input_decimals`. Null when the offer sets no minimum. */
|
|
1343
|
+
minimum_input_amount: string | null;
|
|
1344
|
+
can_order: boolean;
|
|
1345
|
+
/** Empty exactly when `can_order` is true. */
|
|
1346
|
+
reasons: CentrifugeOrderReasonDto[];
|
|
1347
|
+
};
|
|
1348
|
+
/**
|
|
1349
|
+
* `GET /v1/centrifuge/vault/status?symbol&chain`. The vault's own state, read
|
|
1350
|
+
* from the chain on every call; the gate to poll, because Centrifuge announces
|
|
1351
|
+
* none of these changes.
|
|
1352
|
+
*/
|
|
1353
|
+
type CentrifugeVaultStatusDto = {
|
|
1354
|
+
object: 'centrifuge_vault_status';
|
|
1355
|
+
symbol: string;
|
|
1356
|
+
chain: string;
|
|
1357
|
+
/** Centrifuge's vault, read from the proxy. Fixed for the proxy's life. */
|
|
1358
|
+
vault_address: string;
|
|
1359
|
+
/** False is terminal for this proxy: a replacement has to be deployed. */
|
|
1360
|
+
linked: boolean;
|
|
1361
|
+
/** Whether the proxy is on the share token's memberlist. */
|
|
1362
|
+
permissioned: boolean;
|
|
1363
|
+
membership_valid_until: string | null;
|
|
1364
|
+
/** Set by the proxy after a force-cancel; cleared only by hand. */
|
|
1365
|
+
halted: boolean;
|
|
1366
|
+
price_updated_at: string | null;
|
|
1367
|
+
can_order: boolean;
|
|
1368
|
+
reasons: CentrifugeVaultReasonDto[];
|
|
1369
|
+
as_of: string;
|
|
1370
|
+
};
|
|
1371
|
+
/**
|
|
1372
|
+
* What both POSTs return: calldata for the wallet to broadcast verbatim.
|
|
1373
|
+
* Unlike Ondo's, `expires_at` is nullable - a claim carries no signature, so
|
|
1374
|
+
* it is always null there.
|
|
1375
|
+
*/
|
|
1376
|
+
type CentrifugeBroadcastDto = {
|
|
1377
|
+
action: 'broadcast_transaction';
|
|
1378
|
+
/** The offer's proxy on the chain. Lower case: compare case-insensitively. */
|
|
1379
|
+
to: string;
|
|
1380
|
+
data: string;
|
|
1381
|
+
expires_at: string | null;
|
|
1382
|
+
};
|
|
1383
|
+
/**
|
|
1384
|
+
* `POST /v1/centrifuge/vault/buy` with `{ symbol, chain, wallet_address,
|
|
1385
|
+
* amount }`. Broadcasting it places a request in the vault's queue and buys
|
|
1386
|
+
* nothing yet.
|
|
1387
|
+
*/
|
|
1388
|
+
type CentrifugeVaultBuyDto = CentrifugeBroadcastDto & {
|
|
1389
|
+
/** Exactly what the approval has to cover: no fee comes off it. */
|
|
1390
|
+
spend_input_amount: string;
|
|
1391
|
+
spend_input_decimals: number;
|
|
1392
|
+
/** Not a quantity purchased: the fill prices later. */
|
|
1393
|
+
estimated_shares: string;
|
|
1394
|
+
share_decimals: number;
|
|
1395
|
+
};
|
|
1396
|
+
/**
|
|
1397
|
+
* `GET /v1/centrifuge/vault/position?symbol&chain&wallet_address`. The six
|
|
1398
|
+
* amounts are independent: a wallet can hold a pending request, a claimable
|
|
1399
|
+
* balance and claimed shares at once. There is no per-fulfilment breakdown;
|
|
1400
|
+
* settlement pools every fulfilment into one rate.
|
|
1401
|
+
*/
|
|
1402
|
+
type CentrifugeVaultPositionDto = {
|
|
1403
|
+
object: 'centrifuge_vault_position';
|
|
1404
|
+
symbol: string;
|
|
1405
|
+
chain: string;
|
|
1406
|
+
wallet_address: string;
|
|
1407
|
+
status: CentrifugePositionStatusDto;
|
|
1408
|
+
/** Funding token ever requested, in `asset_decimals`. */
|
|
1409
|
+
requested: string;
|
|
1410
|
+
/** Of that, still queued. */
|
|
1411
|
+
pending: string;
|
|
1412
|
+
/** Of that, fulfilled. */
|
|
1413
|
+
filled_assets: string;
|
|
1414
|
+
/** Shares the fulfilments earned, in `share_decimals`. Held by the proxy until claimed. */
|
|
1415
|
+
earned_shares: string;
|
|
1416
|
+
claimed_shares: string;
|
|
1417
|
+
/** Non-zero means the claim endpoint will return calldata. */
|
|
1418
|
+
claimable_shares: string;
|
|
1419
|
+
/** Read from the share token; can exceed `claimed_shares`. */
|
|
1420
|
+
share_balance: string;
|
|
1421
|
+
asset_decimals: number;
|
|
1422
|
+
share_decimals: number;
|
|
1423
|
+
/** Null before the first claim. */
|
|
1424
|
+
average_price: string | null;
|
|
1425
|
+
/** Centrifuge froze the wallet on the share token; blocks claiming. */
|
|
1426
|
+
frozen: boolean;
|
|
1427
|
+
as_of: string;
|
|
1428
|
+
};
|
|
1429
|
+
/**
|
|
1430
|
+
* `POST /v1/centrifuge/vault/claim` with `{ symbol, chain, wallet_address }`.
|
|
1431
|
+
* The wallet named must be the one that broadcasts: the proxy credits the
|
|
1432
|
+
* sender.
|
|
1433
|
+
*/
|
|
1434
|
+
type CentrifugeVaultClaimDto = CentrifugeBroadcastDto & {
|
|
1435
|
+
/** A floor: a fill landing before the broadcast raises it. */
|
|
1436
|
+
claimable_shares: string;
|
|
1437
|
+
share_decimals: number;
|
|
1438
|
+
};
|
|
1439
|
+
|
|
1440
|
+
/**
|
|
1441
|
+
* Why a deposit cannot be placed on a vault right now. Kept verbatim from the
|
|
1442
|
+
* wire: frontline publishes it as a closed set for clients to branch on.
|
|
1443
|
+
*/
|
|
1444
|
+
type CentrifugeOrderReason = CentrifugeOrderReasonDto;
|
|
1445
|
+
/** The reasons a vault status can report - all but `below_minimum`. */
|
|
1446
|
+
type CentrifugeVaultReason = CentrifugeVaultReasonDto;
|
|
1447
|
+
/**
|
|
1448
|
+
* Where a wallet stands on a vault. Not a lifecycle - see
|
|
1449
|
+
* {@link CentrifugeVaultPosition.status}.
|
|
1450
|
+
*/
|
|
1451
|
+
type CentrifugePositionStatus = CentrifugePositionStatusDto;
|
|
1452
|
+
/**
|
|
1453
|
+
* Whether a deposit can be placed, as one union rather than the wire's
|
|
1454
|
+
* `can_order` beside `reasons`: a blocked answer always says why, and an
|
|
1455
|
+
* orderable one has nothing to say. The wire pair can contradict itself; this
|
|
1456
|
+
* cannot, because `fromDto` refuses the payloads that do.
|
|
1457
|
+
*/
|
|
1458
|
+
type CentrifugeOrderability<R extends CentrifugeOrderReason> = {
|
|
1459
|
+
type: 'orderable';
|
|
1460
|
+
} | {
|
|
1461
|
+
type: 'blocked';
|
|
1462
|
+
reasons: [R, ...R[]];
|
|
1463
|
+
};
|
|
1464
|
+
/**
|
|
1465
|
+
* What a deposit of a given size would buy, and whether it can be placed.
|
|
1466
|
+
*
|
|
1467
|
+
* **Indicative only.** The price is read from the vault now and the fund
|
|
1468
|
+
* prices the fulfilment on its own epoch, so neither {@link indicativePrice}
|
|
1469
|
+
* nor {@link estimatedShares} is a commitment. Free to poll while the user
|
|
1470
|
+
* sizes a deposit.
|
|
1471
|
+
*/
|
|
1472
|
+
type CentrifugeVaultQuote = {
|
|
1473
|
+
chain: EthereumChain;
|
|
1474
|
+
/** The vault's share token symbol, e.g. `deJTRSY`. */
|
|
1475
|
+
symbol: AssetSymbol;
|
|
1476
|
+
/** The amount priced, in the funding token's decimals. No fee is taken. */
|
|
1477
|
+
spendInputAmount: BlockchainAmount;
|
|
1478
|
+
/** Shares at the indicative price, in the share token's decimals. */
|
|
1479
|
+
estimatedShares: BlockchainAmount;
|
|
1480
|
+
/** Funding token per whole share. Null when the vault publishes no price. */
|
|
1481
|
+
indicativePrice: DecimalString | null;
|
|
1482
|
+
/** Null when the offer sets no minimum. Same decimals as the spend. */
|
|
1483
|
+
minimumInputAmount: BlockchainAmount | null;
|
|
1484
|
+
orderability: CentrifugeOrderability<CentrifugeOrderReason>;
|
|
1485
|
+
};
|
|
1486
|
+
declare const CentrifugeVaultQuote: {
|
|
1487
|
+
fromDto: (dto: CentrifugeVaultQuoteDto) => CentrifugeVaultQuote;
|
|
1488
|
+
};
|
|
1489
|
+
/**
|
|
1490
|
+
* A vault's own state, independent of any wallet or amount: the gate to poll.
|
|
1491
|
+
* Centrifuge announces none of these changes, and an unlinked vault leaves the
|
|
1492
|
+
* offer's proxy permanently dead, so a cached answer goes wrong silently.
|
|
1493
|
+
*/
|
|
1494
|
+
type CentrifugeVaultStatus = {
|
|
1495
|
+
chain: EthereumChain;
|
|
1496
|
+
symbol: AssetSymbol;
|
|
1497
|
+
/** Centrifuge's vault behind the proxy. Fixed for the proxy's life. */
|
|
1498
|
+
vaultAddress: EvmContractAddress;
|
|
1499
|
+
/**
|
|
1500
|
+
* Whether Centrifuge still links the vault to its pool. False is terminal
|
|
1501
|
+
* for this proxy: no request or claim succeeds until a new one is deployed.
|
|
1502
|
+
*/
|
|
1503
|
+
linked: boolean;
|
|
1504
|
+
/**
|
|
1505
|
+
* Whether the proxy is on the share token's memberlist. It holds shares for
|
|
1506
|
+
* every wallet, so one expired entry stops the whole offer.
|
|
1507
|
+
*/
|
|
1508
|
+
permissioned: boolean;
|
|
1509
|
+
/** Watch it: {@link permissioned} goes false the moment it passes. */
|
|
1510
|
+
membershipValidUntil: Date | null;
|
|
1511
|
+
/** The proxy halted itself after a force-cancel; cleared only by hand. */
|
|
1512
|
+
halted: boolean;
|
|
1513
|
+
/** A stale value is the signal that a quote's price is old. */
|
|
1514
|
+
priceUpdatedAt: Date | null;
|
|
1515
|
+
orderability: CentrifugeOrderability<CentrifugeVaultReason>;
|
|
1516
|
+
/** When the chain was read: how old everything above is. */
|
|
1517
|
+
asOf: Date;
|
|
1518
|
+
};
|
|
1519
|
+
declare const CentrifugeVaultStatus: {
|
|
1520
|
+
fromDto: (dto: CentrifugeVaultStatusDto) => CentrifugeVaultStatus;
|
|
1521
|
+
};
|
|
1522
|
+
/**
|
|
1523
|
+
* What both vault transactions share: calldata to broadcast verbatim, and the
|
|
1524
|
+
* deadline on it.
|
|
1525
|
+
*/
|
|
1526
|
+
type CentrifugeVaultTransactionCore = {
|
|
1527
|
+
/** The `to` is the offer's proxy: the spender the deposit was approved to. */
|
|
1528
|
+
tx: Tx;
|
|
1529
|
+
/**
|
|
1530
|
+
* When the calldata stops being accepted, or null when it carries no
|
|
1531
|
+
* deadline - always the case for a claim, which nobody signs.
|
|
1532
|
+
*/
|
|
1533
|
+
expiresAt: Date | null;
|
|
1534
|
+
};
|
|
1535
|
+
/**
|
|
1536
|
+
* A signed deposit request, ready to broadcast.
|
|
1537
|
+
*
|
|
1538
|
+
* **Broadcasting it buys nothing yet.** It places a request in the vault's
|
|
1539
|
+
* queue; the fund fulfils it later at a price set then, and the user comes
|
|
1540
|
+
* back to claim. {@link estimatedShares} is therefore never a quantity
|
|
1541
|
+
* purchased. Single-use: built once on confirmation, never on a timer.
|
|
1542
|
+
*/
|
|
1543
|
+
type CentrifugeVaultBuyTransaction = CentrifugeVaultTransactionCore & {
|
|
1544
|
+
/** Exactly what the approval has to cover: no fee comes off it. */
|
|
1545
|
+
spendInputAmount: BlockchainAmount;
|
|
1546
|
+
/** At the price read when the calldata was built. An estimate, not a floor. */
|
|
1547
|
+
estimatedShares: BlockchainAmount;
|
|
1548
|
+
};
|
|
1549
|
+
declare const CentrifugeVaultBuyTransaction: {
|
|
1550
|
+
fromDto: (dto: CentrifugeVaultBuyDto) => CentrifugeVaultBuyTransaction;
|
|
1551
|
+
};
|
|
1552
|
+
/**
|
|
1553
|
+
* The claim that moves fulfilled shares from the proxy to the wallet: the
|
|
1554
|
+
* second transaction every vault purchase needs. The wallet that broadcasts it
|
|
1555
|
+
* is the one credited.
|
|
1556
|
+
*/
|
|
1557
|
+
type CentrifugeVaultClaimTransaction = CentrifugeVaultTransactionCore & {
|
|
1558
|
+
/**
|
|
1559
|
+
* Read when the calldata was built. A floor: a fill landing before the
|
|
1560
|
+
* broadcast raises it, and the claim still collects everything.
|
|
1561
|
+
*/
|
|
1562
|
+
claimableShares: BlockchainAmount;
|
|
1563
|
+
};
|
|
1564
|
+
declare const CentrifugeVaultClaimTransaction: {
|
|
1565
|
+
fromDto: (dto: CentrifugeVaultClaimDto) => CentrifugeVaultClaimTransaction;
|
|
1566
|
+
};
|
|
1567
|
+
/**
|
|
1568
|
+
* One wallet's standing on one vault: what it put in, what has settled, and
|
|
1569
|
+
* what it can claim. The endpoint a returning user lands on, and the one that
|
|
1570
|
+
* says whether to offer the claim.
|
|
1571
|
+
*
|
|
1572
|
+
* The amounts are independent of each other: each piece of a request settles
|
|
1573
|
+
* and is claimed on its own, so a wallet can be pending, claimable and claimed
|
|
1574
|
+
* at once. There is no per-fulfilment breakdown; settlement pools every
|
|
1575
|
+
* fulfilment into one {@link averagePrice}.
|
|
1576
|
+
*/
|
|
1577
|
+
type CentrifugeVaultPosition = {
|
|
1578
|
+
chain: EthereumChain;
|
|
1579
|
+
symbol: AssetSymbol;
|
|
1580
|
+
walletAddress: EvmWalletAddress;
|
|
1581
|
+
/**
|
|
1582
|
+
* Derived by frontline from the amounts. Not a lifecycle: a new request
|
|
1583
|
+
* moves it back to `pending` while earlier shares stay claimed.
|
|
1584
|
+
*/
|
|
1585
|
+
status: CentrifugePositionStatus;
|
|
1586
|
+
/** Funding token ever requested. */
|
|
1587
|
+
requested: BlockchainAmount;
|
|
1588
|
+
/** Of {@link requested}, what is still queued. */
|
|
1589
|
+
pending: BlockchainAmount;
|
|
1590
|
+
/** Of {@link requested}, what has been fulfilled. */
|
|
1591
|
+
filledAssets: BlockchainAmount;
|
|
1592
|
+
/** Shares the fulfilments earned. Held by the proxy until claimed. */
|
|
1593
|
+
earnedShares: BlockchainAmount;
|
|
1594
|
+
claimedShares: BlockchainAmount;
|
|
1595
|
+
/** Non-zero means a claim will return calldata. */
|
|
1596
|
+
claimableShares: BlockchainAmount;
|
|
1597
|
+
/**
|
|
1598
|
+
* What the wallet holds on the share token. Can exceed
|
|
1599
|
+
* {@link claimedShares}: shares acquired any other way count here.
|
|
1600
|
+
*/
|
|
1601
|
+
shareBalance: BlockchainAmount;
|
|
1602
|
+
/** Pooled rate over everything claimed. Null before the first claim. */
|
|
1603
|
+
averagePrice: DecimalString | null;
|
|
1604
|
+
/** Centrifuge froze this wallet on the share token. Blocks claiming. */
|
|
1605
|
+
frozen: boolean;
|
|
1606
|
+
asOf: Date;
|
|
1607
|
+
};
|
|
1608
|
+
declare const CentrifugeVaultPosition: {
|
|
1609
|
+
fromDto: (dto: CentrifugeVaultPositionDto) => CentrifugeVaultPosition;
|
|
1610
|
+
};
|
|
1611
|
+
|
|
1277
1612
|
type UserDto = {
|
|
1278
1613
|
id: string;
|
|
1279
1614
|
email: string;
|
|
@@ -1291,4 +1626,4 @@ declare const User: {
|
|
|
1291
1626
|
fromDto: (dto: UserDto) => User;
|
|
1292
1627
|
};
|
|
1293
1628
|
|
|
1294
|
-
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, InvariantError, KnownAssetSymbol, MathError, NA_AMOUNT_ASSET_UI, NonEmptyArray, NotAuthenticatedError, NotImplementedError, 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, isSwapAvailable, ondoQuoteOfferDeadline, parseBlockchainAmount, shortenAddress, superstateSwapContractAddress, swapSpender, txExplorerUrl, usdAmount, viemChain };
|
|
1629
|
+
export { type AmountParseErrorReason, type AmountParseResult, AssetDecimals, AssetSymbol, BPS_DENOM, BlockchainAmount, Bps, type CentrifugeOrderReason, type CentrifugeOrderability, type CentrifugePositionStatus, CentrifugeVaultBuyTransaction, CentrifugeVaultClaimTransaction, CentrifugeVaultPosition, CentrifugeVaultQuote, type CentrifugeVaultReason, CentrifugeVaultStatus, type CentrifugeVaultTransactionCore, 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, Tx, 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 };
|
package/dist/universal/index.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AuthorizationCode,
|
|
3
3
|
BPS_DENOM,
|
|
4
|
+
CentrifugeVaultBuyTransaction,
|
|
5
|
+
CentrifugeVaultClaimTransaction,
|
|
6
|
+
CentrifugeVaultPosition,
|
|
7
|
+
CentrifugeVaultQuote,
|
|
8
|
+
CentrifugeVaultStatus,
|
|
4
9
|
ClientId,
|
|
5
10
|
ClientSecret,
|
|
6
11
|
CodeChallenge,
|
|
@@ -9,6 +14,7 @@ import {
|
|
|
9
14
|
DEFAULT_ONDO_AMOUNT_TO_COMPUTE_PRICE,
|
|
10
15
|
DEFAULT_ONDO_SELL_TOKENS_TO_COMPUTE_PRICE,
|
|
11
16
|
DEFAULT_SLIPPAGE_BPS,
|
|
17
|
+
ONDO_NOT_TRADABLE_CODE,
|
|
12
18
|
ONDO_POLL_INTERVAL_MS,
|
|
13
19
|
ONDO_QUOTE_MAX_TTL_MS,
|
|
14
20
|
ONDO_SETTLEMENT_ASSET,
|
|
@@ -41,12 +47,13 @@ import {
|
|
|
41
47
|
decodeSwappedOutputAmount,
|
|
42
48
|
formattedPricePerShare,
|
|
43
49
|
generatePKCEParams,
|
|
50
|
+
isOndoNotTradableError,
|
|
44
51
|
isSwapAvailable,
|
|
45
52
|
offerDisplayTokens,
|
|
46
53
|
ondoQuoteOfferDeadline,
|
|
47
54
|
superstateSwapContractAddress,
|
|
48
55
|
swapSpender
|
|
49
|
-
} from "../chunk-
|
|
56
|
+
} from "../chunk-UJYSXXJF.js";
|
|
50
57
|
import {
|
|
51
58
|
AllowWalletResponse,
|
|
52
59
|
Asset,
|
|
@@ -108,6 +115,7 @@ import {
|
|
|
108
115
|
OfferSlug,
|
|
109
116
|
OfferSwapContract,
|
|
110
117
|
OfferToken,
|
|
118
|
+
OfferVaultContract,
|
|
111
119
|
OndoBuyTransaction,
|
|
112
120
|
OndoNamespaceImpl,
|
|
113
121
|
OndoQuote,
|
|
@@ -170,7 +178,7 @@ import {
|
|
|
170
178
|
txExplorerUrl,
|
|
171
179
|
usdAmount,
|
|
172
180
|
viemChain
|
|
173
|
-
} from "../chunk-
|
|
181
|
+
} from "../chunk-NBO5E2RO.js";
|
|
174
182
|
export {
|
|
175
183
|
AllowWalletResponse,
|
|
176
184
|
Asset,
|
|
@@ -184,6 +192,11 @@ export {
|
|
|
184
192
|
Blockchain,
|
|
185
193
|
BlockchainAmount,
|
|
186
194
|
Bps,
|
|
195
|
+
CentrifugeVaultBuyTransaction,
|
|
196
|
+
CentrifugeVaultClaimTransaction,
|
|
197
|
+
CentrifugeVaultPosition,
|
|
198
|
+
CentrifugeVaultQuote,
|
|
199
|
+
CentrifugeVaultStatus,
|
|
187
200
|
Chain,
|
|
188
201
|
ClientCredentialsOAuth,
|
|
189
202
|
ClientId,
|
|
@@ -230,6 +243,7 @@ export {
|
|
|
230
243
|
NotImplementedError,
|
|
231
244
|
OAuthRefreshToken,
|
|
232
245
|
OAuthSession,
|
|
246
|
+
ONDO_NOT_TRADABLE_CODE,
|
|
233
247
|
ONDO_POLL_INTERVAL_MS,
|
|
234
248
|
ONDO_QUOTE_MAX_TTL_MS,
|
|
235
249
|
ONDO_SETTLEMENT_ASSET,
|
|
@@ -246,6 +260,7 @@ export {
|
|
|
246
260
|
OfferSlug,
|
|
247
261
|
OfferSwapContract,
|
|
248
262
|
OfferToken,
|
|
263
|
+
OfferVaultContract,
|
|
249
264
|
OffersNamespaceImpl,
|
|
250
265
|
OndoBuyTransaction,
|
|
251
266
|
OndoNamespaceImpl,
|
|
@@ -330,6 +345,7 @@ export {
|
|
|
330
345
|
isChain,
|
|
331
346
|
isExpired,
|
|
332
347
|
isOfferType,
|
|
348
|
+
isOndoNotTradableError,
|
|
333
349
|
isSwapAvailable,
|
|
334
350
|
offerDisplayTokens,
|
|
335
351
|
ondoQuoteOfferDeadline,
|