@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
|
@@ -1267,13 +1267,13 @@ type InternalDebugEvent = {
|
|
|
1267
1267
|
* union makes a `switch` over it exhaustive: adding a provider without
|
|
1268
1268
|
* handling it becomes a compile error.
|
|
1269
1269
|
*/
|
|
1270
|
-
type OfferTypeDto = 'coinlist::token_sale' | 'superstate::swap' | 'ondo::swap';
|
|
1270
|
+
type OfferTypeDto = 'coinlist::token_sale' | 'superstate::swap' | 'ondo::swap' | 'centrifuge::vault';
|
|
1271
1271
|
/**
|
|
1272
1272
|
* One variant per {@link OfferTypeDto}, mirroring frontline#1365, which keys
|
|
1273
1273
|
* `GET /v1/offers` on `type`. Read `type` first: it decides which of the
|
|
1274
1274
|
* fields below mean anything.
|
|
1275
1275
|
*/
|
|
1276
|
-
type OfferDto = CoinListTokenSaleOfferDto | SuperstateSwapOfferDto | OndoSwapOfferDto;
|
|
1276
|
+
type OfferDto = CoinListTokenSaleOfferDto | SuperstateSwapOfferDto | OndoSwapOfferDto | CentrifugeVaultOfferDto;
|
|
1277
1277
|
type OfferBaseDto = {
|
|
1278
1278
|
id: string;
|
|
1279
1279
|
slug: string;
|
|
@@ -1290,15 +1290,16 @@ type OfferEditorialDto = {
|
|
|
1290
1290
|
starts_at: string;
|
|
1291
1291
|
};
|
|
1292
1292
|
/**
|
|
1293
|
-
* What an Ondo swap sends in place of
|
|
1294
|
-
*
|
|
1295
|
-
*
|
|
1296
|
-
* reads
|
|
1293
|
+
* What an Ondo swap or a Centrifuge vault sends in place of
|
|
1294
|
+
* {@link OfferEditorialDto}. Neither runs a campaign, so the keys arrive as
|
|
1295
|
+
* `null` and carry nothing, and the backend may stop sending them at all.
|
|
1296
|
+
* Declared so a fixture can describe the real payload; no `fromDto` reads
|
|
1297
|
+
* them.
|
|
1297
1298
|
*/
|
|
1298
1299
|
type OfferNoEditorialDto = {
|
|
1299
|
-
tagline
|
|
1300
|
-
banner_url
|
|
1301
|
-
starts_at
|
|
1300
|
+
tagline?: null;
|
|
1301
|
+
banner_url?: null;
|
|
1302
|
+
starts_at?: null;
|
|
1302
1303
|
};
|
|
1303
1304
|
type CoinListTokenSaleOfferDto = OfferBaseDto & OfferEditorialDto & {
|
|
1304
1305
|
type: 'coinlist::token_sale';
|
|
@@ -1314,8 +1315,17 @@ type OndoSwapOfferDto = OfferBaseDto & OfferNoEditorialDto & {
|
|
|
1314
1315
|
/** Publishing a swap does not require anyone to upload artwork for it. */
|
|
1315
1316
|
logo_url: string | null;
|
|
1316
1317
|
};
|
|
1318
|
+
type CentrifugeVaultOfferDto = OfferBaseDto & OfferNoEditorialDto & {
|
|
1319
|
+
type: 'centrifuge::vault';
|
|
1320
|
+
/** Publishing a vault does not require anyone to upload artwork for it. */
|
|
1321
|
+
logo_url: string | null;
|
|
1322
|
+
};
|
|
1317
1323
|
type OfferTokenDto = {
|
|
1318
|
-
|
|
1324
|
+
/**
|
|
1325
|
+
* `vault` is the share token a `centrifuge::vault` offer issues for
|
|
1326
|
+
* deposits, as `swap` is the token a swap offer trades into.
|
|
1327
|
+
*/
|
|
1328
|
+
role: 'funding' | 'distribution' | 'swap' | 'vault';
|
|
1319
1329
|
chain: string;
|
|
1320
1330
|
address: string;
|
|
1321
1331
|
};
|
|
@@ -1346,10 +1356,16 @@ type OndoSwapOffer = OfferBase & {
|
|
|
1346
1356
|
/** Null when nobody has uploaded artwork: a swap publishes without it. */
|
|
1347
1357
|
logoUrl: string | null;
|
|
1348
1358
|
};
|
|
1359
|
+
type CentrifugeVaultOffer = OfferBase & {
|
|
1360
|
+
type: 'centrifuge::vault';
|
|
1361
|
+
/** Null when nobody has uploaded artwork: a vault publishes without it. */
|
|
1362
|
+
logoUrl: string | null;
|
|
1363
|
+
};
|
|
1349
1364
|
/**
|
|
1350
1365
|
* A curated sale window and the hand-authored copy that goes with it. Every
|
|
1351
1366
|
* variant that runs such a campaign carries all three, validated; an Ondo swap
|
|
1352
|
-
* trades continuously
|
|
1367
|
+
* trades continuously and a Centrifuge vault takes deposits continuously, so
|
|
1368
|
+
* neither runs one and neither carries any.
|
|
1353
1369
|
*/
|
|
1354
1370
|
type OfferEditorial = {
|
|
1355
1371
|
tagline: string;
|
|
@@ -1369,7 +1385,7 @@ declare const OfferEditorial: {
|
|
|
1369
1385
|
* `type` before reading anything beyond {@link OfferBase} - an Ondo swap has
|
|
1370
1386
|
* no `startsAt` to read, and the compiler says so.
|
|
1371
1387
|
*/
|
|
1372
|
-
type Offer = CoinListTokenSaleOffer | SuperstateSwapOffer | OndoSwapOffer;
|
|
1388
|
+
type Offer = CoinListTokenSaleOffer | SuperstateSwapOffer | OndoSwapOffer | CentrifugeVaultOffer;
|
|
1373
1389
|
declare const Offer: {
|
|
1374
1390
|
fromDto: (dto: OfferDto) => Offer;
|
|
1375
1391
|
/**
|
|
@@ -1382,7 +1398,11 @@ declare const Offer: {
|
|
|
1382
1398
|
*/
|
|
1383
1399
|
listFromDto: (dtos: OfferDto[]) => Offer[];
|
|
1384
1400
|
};
|
|
1385
|
-
|
|
1401
|
+
/**
|
|
1402
|
+
* `vault` is the share token a `centrifuge::vault` offer issues for deposits,
|
|
1403
|
+
* as `swap` is the token a swap offer trades into.
|
|
1404
|
+
*/
|
|
1405
|
+
type TokenRole = 'funding' | 'distribution' | 'swap' | 'vault';
|
|
1386
1406
|
type OfferToken = {
|
|
1387
1407
|
role: TokenRole;
|
|
1388
1408
|
chain: Chain;
|
|
@@ -1497,16 +1517,16 @@ type CreateParticipationDto = {
|
|
|
1497
1517
|
* One variant per `OfferTypeDto`, the same split as `OfferDto` with what
|
|
1498
1518
|
* `GET /v1/offers/:id` adds on top. Read `type` first.
|
|
1499
1519
|
*/
|
|
1500
|
-
type OfferDetailDto = CoinListTokenSaleOfferDetailDto | SuperstateSwapOfferDetailDto | OndoSwapOfferDetailDto;
|
|
1501
|
-
type CoinListTokenSaleOfferDetailDto = OfferDetailBaseDto & OfferEditorialDto & OfferDetailNoSwapContractsDto & {
|
|
1520
|
+
type OfferDetailDto = CoinListTokenSaleOfferDetailDto | SuperstateSwapOfferDetailDto | OndoSwapOfferDetailDto | CentrifugeVaultOfferDetailDto;
|
|
1521
|
+
type CoinListTokenSaleOfferDetailDto = OfferDetailBaseDto & OfferEditorialDto & OfferDetailNoSwapContractsDto & OfferDetailNoVaultContractsDto & {
|
|
1502
1522
|
type: 'coinlist::token_sale';
|
|
1503
1523
|
logo_url: string;
|
|
1504
1524
|
};
|
|
1505
|
-
type SuperstateSwapOfferDetailDto = OfferDetailBaseDto & OfferEditorialDto & OfferDetailNoSwapContractsDto & {
|
|
1525
|
+
type SuperstateSwapOfferDetailDto = OfferDetailBaseDto & OfferEditorialDto & OfferDetailNoSwapContractsDto & OfferDetailNoVaultContractsDto & {
|
|
1506
1526
|
type: 'superstate::swap';
|
|
1507
1527
|
logo_url: string | null;
|
|
1508
1528
|
};
|
|
1509
|
-
type OndoSwapOfferDetailDto = OfferDetailBaseDto & OfferNoEditorialDto & {
|
|
1529
|
+
type OndoSwapOfferDetailDto = OfferDetailBaseDto & OfferNoEditorialDto & OfferDetailNoVaultContractsDto & {
|
|
1510
1530
|
type: 'ondo::swap';
|
|
1511
1531
|
logo_url: string | null;
|
|
1512
1532
|
/**
|
|
@@ -1515,6 +1535,19 @@ type OndoSwapOfferDetailDto = OfferDetailBaseDto & OfferNoEditorialDto & {
|
|
|
1515
1535
|
*/
|
|
1516
1536
|
swap_contracts: OfferDetailSwapContractDto[];
|
|
1517
1537
|
};
|
|
1538
|
+
type CentrifugeVaultOfferDetailDto = OfferDetailBaseDto & OfferNoEditorialDto & OfferDetailNoSwapContractsDto & {
|
|
1539
|
+
type: 'centrifuge::vault';
|
|
1540
|
+
logo_url: string | null;
|
|
1541
|
+
/**
|
|
1542
|
+
* Every chain this vault takes deposits on, with the CoinList proxy each
|
|
1543
|
+
* request goes through. `[]` is an answer - "deposits nowhere", which is
|
|
1544
|
+
* every vault until a proxy is deployed - and a missing key is not.
|
|
1545
|
+
*/
|
|
1546
|
+
vault_contracts: OfferDetailVaultContractDto[];
|
|
1547
|
+
};
|
|
1548
|
+
type OfferDetailNoVaultContractsDto = {
|
|
1549
|
+
vault_contracts?: OfferDetailVaultContractDto[];
|
|
1550
|
+
};
|
|
1518
1551
|
/**
|
|
1519
1552
|
* An offer that does not settle through a CoinList swap contract sends `[]`
|
|
1520
1553
|
* or no key at all, and either way there is nothing to read. Declared so a
|
|
@@ -1581,6 +1614,10 @@ type OfferDetailSwapContractDto = {
|
|
|
1581
1614
|
chain: string;
|
|
1582
1615
|
address: string;
|
|
1583
1616
|
};
|
|
1617
|
+
type OfferDetailVaultContractDto = {
|
|
1618
|
+
chain: string;
|
|
1619
|
+
address: string;
|
|
1620
|
+
};
|
|
1584
1621
|
|
|
1585
1622
|
type Ticker = Newtype<string, 'Ticker'>;
|
|
1586
1623
|
declare const Ticker: (value: string) => Ticker;
|
|
@@ -1618,6 +1655,16 @@ type OndoSwapOfferDetail = OfferDetailBase & {
|
|
|
1618
1655
|
*/
|
|
1619
1656
|
swapContracts: OfferSwapContract[];
|
|
1620
1657
|
};
|
|
1658
|
+
type CentrifugeVaultOfferDetail = OfferDetailBase & {
|
|
1659
|
+
type: 'centrifuge::vault';
|
|
1660
|
+
/** Null when nobody has uploaded artwork: a vault publishes without it. */
|
|
1661
|
+
logoUrl: string | null;
|
|
1662
|
+
/**
|
|
1663
|
+
* Every chain this vault takes deposits on, with the CoinList proxy each
|
|
1664
|
+
* request goes through. Empty means it takes deposits nowhere yet.
|
|
1665
|
+
*/
|
|
1666
|
+
vaultContracts: OfferVaultContract[];
|
|
1667
|
+
};
|
|
1621
1668
|
type OfferDetailBase = {
|
|
1622
1669
|
id: OfferId;
|
|
1623
1670
|
slug: OfferSlug;
|
|
@@ -1695,13 +1742,38 @@ type OfferSwapContract = {
|
|
|
1695
1742
|
declare const OfferSwapContract: {
|
|
1696
1743
|
fromDto: (dto: OfferDetailSwapContractDto) => OfferSwapContract;
|
|
1697
1744
|
};
|
|
1745
|
+
/**
|
|
1746
|
+
* A chain a Centrifuge vault takes deposits on, with the CoinList proxy the
|
|
1747
|
+
* request goes through. Not a token, so the token registry knows nothing about
|
|
1748
|
+
* it: it is the spender the user approves the funding token to, and the `to`
|
|
1749
|
+
* the buy and claim transactions are sent to.
|
|
1750
|
+
*
|
|
1751
|
+
* Its own type rather than an {@link OfferSwapContract}, although the shape is
|
|
1752
|
+
* the same, because the meaning is not: a swap contract serves every Ondo
|
|
1753
|
+
* asset on its chain, while a proxy belongs to one offer on one chain, so the
|
|
1754
|
+
* same chain carries a different address on every vault.
|
|
1755
|
+
*/
|
|
1756
|
+
type OfferVaultContract = {
|
|
1757
|
+
chain: Chain;
|
|
1758
|
+
address: EvmContractAddress;
|
|
1759
|
+
};
|
|
1760
|
+
declare const OfferVaultContract: {
|
|
1761
|
+
fromDto: (dto: OfferDetailVaultContractDto) => OfferVaultContract;
|
|
1762
|
+
/**
|
|
1763
|
+
* Drops every proxy on a chain this SDK does not name, as
|
|
1764
|
+
* `OfferToken.listFromDto` does: frontline publishes the full offer-token
|
|
1765
|
+
* chain list, which runs ahead of {@link Chain}, and one unmodelled chain
|
|
1766
|
+
* should not throw away the proxies the SDK can use.
|
|
1767
|
+
*/
|
|
1768
|
+
listFromDto: (dtos: OfferDetailVaultContractDto[]) => OfferVaultContract[];
|
|
1769
|
+
};
|
|
1698
1770
|
/**
|
|
1699
1771
|
* An offer as `GET /v1/offers/:id` serves it: the same union on `type` as
|
|
1700
1772
|
* {@link Offer}, each variant carrying only the fields that mean something
|
|
1701
1773
|
* for it. Narrow on `type` before reading anything beyond
|
|
1702
1774
|
* {@link OfferDetailBase}.
|
|
1703
1775
|
*/
|
|
1704
|
-
type OfferDetail = CoinListTokenSaleOfferDetail | SuperstateSwapOfferDetail | OndoSwapOfferDetail;
|
|
1776
|
+
type OfferDetail = CoinListTokenSaleOfferDetail | SuperstateSwapOfferDetail | OndoSwapOfferDetail | CentrifugeVaultOfferDetail;
|
|
1705
1777
|
declare const OfferDetail: {
|
|
1706
1778
|
fromDto: (dto: OfferDetailDto) => OfferDetail;
|
|
1707
1779
|
};
|
|
@@ -2488,6 +2560,17 @@ declare const OndoSellTransaction: {
|
|
|
2488
2560
|
*/
|
|
2489
2561
|
interface OndoNamespace {
|
|
2490
2562
|
getTradingStatus(params: GetOndoTradingStatusParams): Promise<OndoTradingStatus>;
|
|
2563
|
+
/**
|
|
2564
|
+
* An indicative price for `params`' size, from Ondo's live market.
|
|
2565
|
+
*
|
|
2566
|
+
* Ondo refuses to quote while the market is closed or paused, or the asset
|
|
2567
|
+
* is paused or closed for the session - including for about a minute at
|
|
2568
|
+
* every US session change, when `getTradingStatus` may still have reported
|
|
2569
|
+
* the asset tradable. The request then rejects with a 409 carrying
|
|
2570
|
+
* `code: "not_tradable"`; tell it apart from a failure with
|
|
2571
|
+
* {@link isOndoNotTradableError}. Retrying before the market opens fails the
|
|
2572
|
+
* same way.
|
|
2573
|
+
*/
|
|
2491
2574
|
getQuote(params: GetOndoQuoteParams): Promise<OndoQuote>;
|
|
2492
2575
|
/**
|
|
2493
2576
|
* Builds a purchase for a specific wallet and deposit: spends an attestation
|
|
@@ -3350,4 +3433,4 @@ declare class TokensNamespaceImpl implements TokensNamespace {
|
|
|
3350
3433
|
list(chain?: EthereumChain): Promise<TokenMetadata[]>;
|
|
3351
3434
|
}
|
|
3352
3435
|
|
|
3353
|
-
export {
|
|
3436
|
+
export { type PinoLoggerOptions as $, AuthorizationCode as A, BlockchainAmount as B, CodeVerifier as C, TokenMetadata as D, type Erc20Namespace as E, type CentrifugeVaultOfferDetail as F, type OfferType as G, type OndoSwapOfferDetail as H, type CoinListTokenSaleOfferDetail as I, type SuperstateSwapOfferDetail as J, Offer as K, type Logger as L, RequirementStatusInfo as M, type RequirementType as N, OfferId as O, Participation as P, type RequirementStatusValue as Q, type RequirementsNamespace as R, type SuperstateSwapNamespace as S, type TokensNamespace as T, type UniversalNamespaceContext as U, OfferOptionAddress as V, type WalletError as W, RequirementId as X, type KycLevelName as Y, DocumentSubmission as Z, type WalletChallengeType as _, EthereumChain as a, type GetSwapAuthorizationParams as a$, OndoTradingStatus as a0, AssetDecimals as a1, type BuildOndoBuyParams as a2, type BuildOndoSellParams as a3, OndoQuote as a4, type OndoQuoteSize as a5, type TokenIdentifier as a6, OfferOptionAddressId as a7, TokenLogo as a8, type DebugEvent as a9, KnownAssetSymbol as aA, type Tx as aB, type Newtype as aC, type AllowWalletParams as aD, AllowWalletResponse as aE, Asset as aF, AssetCode as aG, Blockchain as aH, type BuildOndoSwapParamsCore as aI, type CentrifugeVaultOffer as aJ, Chain as aK, ClientId as aL, CodeChallenge as aM, type CoinListTokenSaleOffer as aN, ConnectExternalWalletParams as aO, type CreateKycTokenParams as aP, CreateParticipationParams as aQ, CreateWalletOwnershipChallengeParams as aR, Cursor as aS, type DocumentFormType as aT, type DocumentSubmissionStatus as aU, type DocumentType as aV, ETHEREUM_CHAINS as aW, Erc20NamespaceImpl as aX, FaqItem as aY, type GetOndoQuoteParams as aZ, type GetOndoTradingStatusParams as a_, type FrontlineEventId as aa, HttpError as ab, type HttpResponse as ac, KycToken as ad, type LogBinding as ae, type LogBindings as af, type LogCause as ag, type LogLevel as ah, type LogScope as ai, type LogValue as aj, type ProductionLogLevel as ak, RedactedWalletError as al, type RequestId as am, type RpcFailureReason as an, type SafeEvent as ao, type SafeFields as ap, type UnredactedFields as aq, OAuthSession as ar, ClientCredentialsOAuth as as, type Sender as at, PaginationParams as au, PaginatedResponse as av, ClientSecret as aw, DecimalString as ax, SwapStatus as ay, type Uint256 as az, EvmContractAddress as b, type GetSwapPreviewParams as b0, type GetTokenAllowanceParams as b1, type GetTokenBalanceParams as b2, HexEncodedTransactionData as b3, Isin as b4, Iso2CountryCode as b5, Link as b6, type ListOptionAddressesParams as b7, MAX_ASSET_DECIMALS as b8, MAX_UINT_256 as b9, RedirectUri as bA, type RemoveOptionAddressParams as bB, type RequirementActionNeededReason as bC, type RpcConfig as bD, SOLANA_CHAINS as bE, STABLE_DECIMALS as bF, SolanaChain as bG, type SubmitDocumentParams as bH, type SuperstateSwapOffer as bI, type SwapContractRef as bJ, SwapPreview as bK, TermItem as bL, Ticker as bM, type TokenLogoImage as bN, TokenLogoUrl as bO, type TokenRole as bP, TokensNamespaceImpl as bQ, WalletAddress as bR, WalletOwnershipChallenge as bS, type WalletProtocol as bT, WalletsNamespaceImpl as bU, apiErrorCode as bV, assertUint256 as bW, isChain as bX, isOfferType as bY, parseUint256 as bZ, Milestone as ba, OAuthRefreshToken as bb, type OfferBase as bc, type OfferDetailBase as bd, OfferEditorial as be, OfferOption as bf, OfferOptionSlug as bg, OfferSlug as bh, OfferToken as bi, OfferVaultContract as bj, OffersNamespaceImpl as bk, type OndoQuoteDuration as bl, type OndoSellOutcome as bm, type OndoSwapOffer as bn, PKCEState as bo, type PaginatedResponseDto as bp, ParticipationId as bq, type ParticipationStatus as br, ParticipationsPaginationParams as bs, PauseFlags as bt, Pii as bu, PiiAddress as bv, PiiJurisdiction as bw, type PiiKind as bx, type QueryParamValue as by, type QueryParamValues as bz, type CoinListTokenSaleNamespace as c, OfferOptionId as d, AssetId as e, CoinListTokenSaleNamespaceImpl as f, type OndoNamespace as g, AssetSymbol as h, OfferSwapContract as i, OndoBuyTransaction as j, OndoSellTransaction as k, type OndoSwapTransactionCore as l, type OrderBookSide as m, OndoNamespaceImpl as n, type WalletsNamespace as o, Bps as p, EvmWalletAddress as q, SuperstateSwapNamespaceImpl as r, Requirement as s, RequirementsNamespaceImpl as t, type Config as u, type OAuthAccessToken as v, type OffersNamespace as w, StablecoinSymbol as x, type Erc20Asset as y, OfferDetail as z };
|
|
@@ -1267,13 +1267,13 @@ type InternalDebugEvent = {
|
|
|
1267
1267
|
* union makes a `switch` over it exhaustive: adding a provider without
|
|
1268
1268
|
* handling it becomes a compile error.
|
|
1269
1269
|
*/
|
|
1270
|
-
type OfferTypeDto = 'coinlist::token_sale' | 'superstate::swap' | 'ondo::swap';
|
|
1270
|
+
type OfferTypeDto = 'coinlist::token_sale' | 'superstate::swap' | 'ondo::swap' | 'centrifuge::vault';
|
|
1271
1271
|
/**
|
|
1272
1272
|
* One variant per {@link OfferTypeDto}, mirroring frontline#1365, which keys
|
|
1273
1273
|
* `GET /v1/offers` on `type`. Read `type` first: it decides which of the
|
|
1274
1274
|
* fields below mean anything.
|
|
1275
1275
|
*/
|
|
1276
|
-
type OfferDto = CoinListTokenSaleOfferDto | SuperstateSwapOfferDto | OndoSwapOfferDto;
|
|
1276
|
+
type OfferDto = CoinListTokenSaleOfferDto | SuperstateSwapOfferDto | OndoSwapOfferDto | CentrifugeVaultOfferDto;
|
|
1277
1277
|
type OfferBaseDto = {
|
|
1278
1278
|
id: string;
|
|
1279
1279
|
slug: string;
|
|
@@ -1290,15 +1290,16 @@ type OfferEditorialDto = {
|
|
|
1290
1290
|
starts_at: string;
|
|
1291
1291
|
};
|
|
1292
1292
|
/**
|
|
1293
|
-
* What an Ondo swap sends in place of
|
|
1294
|
-
*
|
|
1295
|
-
*
|
|
1296
|
-
* reads
|
|
1293
|
+
* What an Ondo swap or a Centrifuge vault sends in place of
|
|
1294
|
+
* {@link OfferEditorialDto}. Neither runs a campaign, so the keys arrive as
|
|
1295
|
+
* `null` and carry nothing, and the backend may stop sending them at all.
|
|
1296
|
+
* Declared so a fixture can describe the real payload; no `fromDto` reads
|
|
1297
|
+
* them.
|
|
1297
1298
|
*/
|
|
1298
1299
|
type OfferNoEditorialDto = {
|
|
1299
|
-
tagline
|
|
1300
|
-
banner_url
|
|
1301
|
-
starts_at
|
|
1300
|
+
tagline?: null;
|
|
1301
|
+
banner_url?: null;
|
|
1302
|
+
starts_at?: null;
|
|
1302
1303
|
};
|
|
1303
1304
|
type CoinListTokenSaleOfferDto = OfferBaseDto & OfferEditorialDto & {
|
|
1304
1305
|
type: 'coinlist::token_sale';
|
|
@@ -1314,8 +1315,17 @@ type OndoSwapOfferDto = OfferBaseDto & OfferNoEditorialDto & {
|
|
|
1314
1315
|
/** Publishing a swap does not require anyone to upload artwork for it. */
|
|
1315
1316
|
logo_url: string | null;
|
|
1316
1317
|
};
|
|
1318
|
+
type CentrifugeVaultOfferDto = OfferBaseDto & OfferNoEditorialDto & {
|
|
1319
|
+
type: 'centrifuge::vault';
|
|
1320
|
+
/** Publishing a vault does not require anyone to upload artwork for it. */
|
|
1321
|
+
logo_url: string | null;
|
|
1322
|
+
};
|
|
1317
1323
|
type OfferTokenDto = {
|
|
1318
|
-
|
|
1324
|
+
/**
|
|
1325
|
+
* `vault` is the share token a `centrifuge::vault` offer issues for
|
|
1326
|
+
* deposits, as `swap` is the token a swap offer trades into.
|
|
1327
|
+
*/
|
|
1328
|
+
role: 'funding' | 'distribution' | 'swap' | 'vault';
|
|
1319
1329
|
chain: string;
|
|
1320
1330
|
address: string;
|
|
1321
1331
|
};
|
|
@@ -1346,10 +1356,16 @@ type OndoSwapOffer = OfferBase & {
|
|
|
1346
1356
|
/** Null when nobody has uploaded artwork: a swap publishes without it. */
|
|
1347
1357
|
logoUrl: string | null;
|
|
1348
1358
|
};
|
|
1359
|
+
type CentrifugeVaultOffer = OfferBase & {
|
|
1360
|
+
type: 'centrifuge::vault';
|
|
1361
|
+
/** Null when nobody has uploaded artwork: a vault publishes without it. */
|
|
1362
|
+
logoUrl: string | null;
|
|
1363
|
+
};
|
|
1349
1364
|
/**
|
|
1350
1365
|
* A curated sale window and the hand-authored copy that goes with it. Every
|
|
1351
1366
|
* variant that runs such a campaign carries all three, validated; an Ondo swap
|
|
1352
|
-
* trades continuously
|
|
1367
|
+
* trades continuously and a Centrifuge vault takes deposits continuously, so
|
|
1368
|
+
* neither runs one and neither carries any.
|
|
1353
1369
|
*/
|
|
1354
1370
|
type OfferEditorial = {
|
|
1355
1371
|
tagline: string;
|
|
@@ -1369,7 +1385,7 @@ declare const OfferEditorial: {
|
|
|
1369
1385
|
* `type` before reading anything beyond {@link OfferBase} - an Ondo swap has
|
|
1370
1386
|
* no `startsAt` to read, and the compiler says so.
|
|
1371
1387
|
*/
|
|
1372
|
-
type Offer = CoinListTokenSaleOffer | SuperstateSwapOffer | OndoSwapOffer;
|
|
1388
|
+
type Offer = CoinListTokenSaleOffer | SuperstateSwapOffer | OndoSwapOffer | CentrifugeVaultOffer;
|
|
1373
1389
|
declare const Offer: {
|
|
1374
1390
|
fromDto: (dto: OfferDto) => Offer;
|
|
1375
1391
|
/**
|
|
@@ -1382,7 +1398,11 @@ declare const Offer: {
|
|
|
1382
1398
|
*/
|
|
1383
1399
|
listFromDto: (dtos: OfferDto[]) => Offer[];
|
|
1384
1400
|
};
|
|
1385
|
-
|
|
1401
|
+
/**
|
|
1402
|
+
* `vault` is the share token a `centrifuge::vault` offer issues for deposits,
|
|
1403
|
+
* as `swap` is the token a swap offer trades into.
|
|
1404
|
+
*/
|
|
1405
|
+
type TokenRole = 'funding' | 'distribution' | 'swap' | 'vault';
|
|
1386
1406
|
type OfferToken = {
|
|
1387
1407
|
role: TokenRole;
|
|
1388
1408
|
chain: Chain;
|
|
@@ -1497,16 +1517,16 @@ type CreateParticipationDto = {
|
|
|
1497
1517
|
* One variant per `OfferTypeDto`, the same split as `OfferDto` with what
|
|
1498
1518
|
* `GET /v1/offers/:id` adds on top. Read `type` first.
|
|
1499
1519
|
*/
|
|
1500
|
-
type OfferDetailDto = CoinListTokenSaleOfferDetailDto | SuperstateSwapOfferDetailDto | OndoSwapOfferDetailDto;
|
|
1501
|
-
type CoinListTokenSaleOfferDetailDto = OfferDetailBaseDto & OfferEditorialDto & OfferDetailNoSwapContractsDto & {
|
|
1520
|
+
type OfferDetailDto = CoinListTokenSaleOfferDetailDto | SuperstateSwapOfferDetailDto | OndoSwapOfferDetailDto | CentrifugeVaultOfferDetailDto;
|
|
1521
|
+
type CoinListTokenSaleOfferDetailDto = OfferDetailBaseDto & OfferEditorialDto & OfferDetailNoSwapContractsDto & OfferDetailNoVaultContractsDto & {
|
|
1502
1522
|
type: 'coinlist::token_sale';
|
|
1503
1523
|
logo_url: string;
|
|
1504
1524
|
};
|
|
1505
|
-
type SuperstateSwapOfferDetailDto = OfferDetailBaseDto & OfferEditorialDto & OfferDetailNoSwapContractsDto & {
|
|
1525
|
+
type SuperstateSwapOfferDetailDto = OfferDetailBaseDto & OfferEditorialDto & OfferDetailNoSwapContractsDto & OfferDetailNoVaultContractsDto & {
|
|
1506
1526
|
type: 'superstate::swap';
|
|
1507
1527
|
logo_url: string | null;
|
|
1508
1528
|
};
|
|
1509
|
-
type OndoSwapOfferDetailDto = OfferDetailBaseDto & OfferNoEditorialDto & {
|
|
1529
|
+
type OndoSwapOfferDetailDto = OfferDetailBaseDto & OfferNoEditorialDto & OfferDetailNoVaultContractsDto & {
|
|
1510
1530
|
type: 'ondo::swap';
|
|
1511
1531
|
logo_url: string | null;
|
|
1512
1532
|
/**
|
|
@@ -1515,6 +1535,19 @@ type OndoSwapOfferDetailDto = OfferDetailBaseDto & OfferNoEditorialDto & {
|
|
|
1515
1535
|
*/
|
|
1516
1536
|
swap_contracts: OfferDetailSwapContractDto[];
|
|
1517
1537
|
};
|
|
1538
|
+
type CentrifugeVaultOfferDetailDto = OfferDetailBaseDto & OfferNoEditorialDto & OfferDetailNoSwapContractsDto & {
|
|
1539
|
+
type: 'centrifuge::vault';
|
|
1540
|
+
logo_url: string | null;
|
|
1541
|
+
/**
|
|
1542
|
+
* Every chain this vault takes deposits on, with the CoinList proxy each
|
|
1543
|
+
* request goes through. `[]` is an answer - "deposits nowhere", which is
|
|
1544
|
+
* every vault until a proxy is deployed - and a missing key is not.
|
|
1545
|
+
*/
|
|
1546
|
+
vault_contracts: OfferDetailVaultContractDto[];
|
|
1547
|
+
};
|
|
1548
|
+
type OfferDetailNoVaultContractsDto = {
|
|
1549
|
+
vault_contracts?: OfferDetailVaultContractDto[];
|
|
1550
|
+
};
|
|
1518
1551
|
/**
|
|
1519
1552
|
* An offer that does not settle through a CoinList swap contract sends `[]`
|
|
1520
1553
|
* or no key at all, and either way there is nothing to read. Declared so a
|
|
@@ -1581,6 +1614,10 @@ type OfferDetailSwapContractDto = {
|
|
|
1581
1614
|
chain: string;
|
|
1582
1615
|
address: string;
|
|
1583
1616
|
};
|
|
1617
|
+
type OfferDetailVaultContractDto = {
|
|
1618
|
+
chain: string;
|
|
1619
|
+
address: string;
|
|
1620
|
+
};
|
|
1584
1621
|
|
|
1585
1622
|
type Ticker = Newtype<string, 'Ticker'>;
|
|
1586
1623
|
declare const Ticker: (value: string) => Ticker;
|
|
@@ -1618,6 +1655,16 @@ type OndoSwapOfferDetail = OfferDetailBase & {
|
|
|
1618
1655
|
*/
|
|
1619
1656
|
swapContracts: OfferSwapContract[];
|
|
1620
1657
|
};
|
|
1658
|
+
type CentrifugeVaultOfferDetail = OfferDetailBase & {
|
|
1659
|
+
type: 'centrifuge::vault';
|
|
1660
|
+
/** Null when nobody has uploaded artwork: a vault publishes without it. */
|
|
1661
|
+
logoUrl: string | null;
|
|
1662
|
+
/**
|
|
1663
|
+
* Every chain this vault takes deposits on, with the CoinList proxy each
|
|
1664
|
+
* request goes through. Empty means it takes deposits nowhere yet.
|
|
1665
|
+
*/
|
|
1666
|
+
vaultContracts: OfferVaultContract[];
|
|
1667
|
+
};
|
|
1621
1668
|
type OfferDetailBase = {
|
|
1622
1669
|
id: OfferId;
|
|
1623
1670
|
slug: OfferSlug;
|
|
@@ -1695,13 +1742,38 @@ type OfferSwapContract = {
|
|
|
1695
1742
|
declare const OfferSwapContract: {
|
|
1696
1743
|
fromDto: (dto: OfferDetailSwapContractDto) => OfferSwapContract;
|
|
1697
1744
|
};
|
|
1745
|
+
/**
|
|
1746
|
+
* A chain a Centrifuge vault takes deposits on, with the CoinList proxy the
|
|
1747
|
+
* request goes through. Not a token, so the token registry knows nothing about
|
|
1748
|
+
* it: it is the spender the user approves the funding token to, and the `to`
|
|
1749
|
+
* the buy and claim transactions are sent to.
|
|
1750
|
+
*
|
|
1751
|
+
* Its own type rather than an {@link OfferSwapContract}, although the shape is
|
|
1752
|
+
* the same, because the meaning is not: a swap contract serves every Ondo
|
|
1753
|
+
* asset on its chain, while a proxy belongs to one offer on one chain, so the
|
|
1754
|
+
* same chain carries a different address on every vault.
|
|
1755
|
+
*/
|
|
1756
|
+
type OfferVaultContract = {
|
|
1757
|
+
chain: Chain;
|
|
1758
|
+
address: EvmContractAddress;
|
|
1759
|
+
};
|
|
1760
|
+
declare const OfferVaultContract: {
|
|
1761
|
+
fromDto: (dto: OfferDetailVaultContractDto) => OfferVaultContract;
|
|
1762
|
+
/**
|
|
1763
|
+
* Drops every proxy on a chain this SDK does not name, as
|
|
1764
|
+
* `OfferToken.listFromDto` does: frontline publishes the full offer-token
|
|
1765
|
+
* chain list, which runs ahead of {@link Chain}, and one unmodelled chain
|
|
1766
|
+
* should not throw away the proxies the SDK can use.
|
|
1767
|
+
*/
|
|
1768
|
+
listFromDto: (dtos: OfferDetailVaultContractDto[]) => OfferVaultContract[];
|
|
1769
|
+
};
|
|
1698
1770
|
/**
|
|
1699
1771
|
* An offer as `GET /v1/offers/:id` serves it: the same union on `type` as
|
|
1700
1772
|
* {@link Offer}, each variant carrying only the fields that mean something
|
|
1701
1773
|
* for it. Narrow on `type` before reading anything beyond
|
|
1702
1774
|
* {@link OfferDetailBase}.
|
|
1703
1775
|
*/
|
|
1704
|
-
type OfferDetail = CoinListTokenSaleOfferDetail | SuperstateSwapOfferDetail | OndoSwapOfferDetail;
|
|
1776
|
+
type OfferDetail = CoinListTokenSaleOfferDetail | SuperstateSwapOfferDetail | OndoSwapOfferDetail | CentrifugeVaultOfferDetail;
|
|
1705
1777
|
declare const OfferDetail: {
|
|
1706
1778
|
fromDto: (dto: OfferDetailDto) => OfferDetail;
|
|
1707
1779
|
};
|
|
@@ -2488,6 +2560,17 @@ declare const OndoSellTransaction: {
|
|
|
2488
2560
|
*/
|
|
2489
2561
|
interface OndoNamespace {
|
|
2490
2562
|
getTradingStatus(params: GetOndoTradingStatusParams): Promise<OndoTradingStatus>;
|
|
2563
|
+
/**
|
|
2564
|
+
* An indicative price for `params`' size, from Ondo's live market.
|
|
2565
|
+
*
|
|
2566
|
+
* Ondo refuses to quote while the market is closed or paused, or the asset
|
|
2567
|
+
* is paused or closed for the session - including for about a minute at
|
|
2568
|
+
* every US session change, when `getTradingStatus` may still have reported
|
|
2569
|
+
* the asset tradable. The request then rejects with a 409 carrying
|
|
2570
|
+
* `code: "not_tradable"`; tell it apart from a failure with
|
|
2571
|
+
* {@link isOndoNotTradableError}. Retrying before the market opens fails the
|
|
2572
|
+
* same way.
|
|
2573
|
+
*/
|
|
2491
2574
|
getQuote(params: GetOndoQuoteParams): Promise<OndoQuote>;
|
|
2492
2575
|
/**
|
|
2493
2576
|
* Builds a purchase for a specific wallet and deposit: spends an attestation
|
|
@@ -3350,4 +3433,4 @@ declare class TokensNamespaceImpl implements TokensNamespace {
|
|
|
3350
3433
|
list(chain?: EthereumChain): Promise<TokenMetadata[]>;
|
|
3351
3434
|
}
|
|
3352
3435
|
|
|
3353
|
-
export {
|
|
3436
|
+
export { type PinoLoggerOptions as $, AuthorizationCode as A, BlockchainAmount as B, CodeVerifier as C, TokenMetadata as D, type Erc20Namespace as E, type CentrifugeVaultOfferDetail as F, type OfferType as G, type OndoSwapOfferDetail as H, type CoinListTokenSaleOfferDetail as I, type SuperstateSwapOfferDetail as J, Offer as K, type Logger as L, RequirementStatusInfo as M, type RequirementType as N, OfferId as O, Participation as P, type RequirementStatusValue as Q, type RequirementsNamespace as R, type SuperstateSwapNamespace as S, type TokensNamespace as T, type UniversalNamespaceContext as U, OfferOptionAddress as V, type WalletError as W, RequirementId as X, type KycLevelName as Y, DocumentSubmission as Z, type WalletChallengeType as _, EthereumChain as a, type GetSwapAuthorizationParams as a$, OndoTradingStatus as a0, AssetDecimals as a1, type BuildOndoBuyParams as a2, type BuildOndoSellParams as a3, OndoQuote as a4, type OndoQuoteSize as a5, type TokenIdentifier as a6, OfferOptionAddressId as a7, TokenLogo as a8, type DebugEvent as a9, KnownAssetSymbol as aA, type Tx as aB, type Newtype as aC, type AllowWalletParams as aD, AllowWalletResponse as aE, Asset as aF, AssetCode as aG, Blockchain as aH, type BuildOndoSwapParamsCore as aI, type CentrifugeVaultOffer as aJ, Chain as aK, ClientId as aL, CodeChallenge as aM, type CoinListTokenSaleOffer as aN, ConnectExternalWalletParams as aO, type CreateKycTokenParams as aP, CreateParticipationParams as aQ, CreateWalletOwnershipChallengeParams as aR, Cursor as aS, type DocumentFormType as aT, type DocumentSubmissionStatus as aU, type DocumentType as aV, ETHEREUM_CHAINS as aW, Erc20NamespaceImpl as aX, FaqItem as aY, type GetOndoQuoteParams as aZ, type GetOndoTradingStatusParams as a_, type FrontlineEventId as aa, HttpError as ab, type HttpResponse as ac, KycToken as ad, type LogBinding as ae, type LogBindings as af, type LogCause as ag, type LogLevel as ah, type LogScope as ai, type LogValue as aj, type ProductionLogLevel as ak, RedactedWalletError as al, type RequestId as am, type RpcFailureReason as an, type SafeEvent as ao, type SafeFields as ap, type UnredactedFields as aq, OAuthSession as ar, ClientCredentialsOAuth as as, type Sender as at, PaginationParams as au, PaginatedResponse as av, ClientSecret as aw, DecimalString as ax, SwapStatus as ay, type Uint256 as az, EvmContractAddress as b, type GetSwapPreviewParams as b0, type GetTokenAllowanceParams as b1, type GetTokenBalanceParams as b2, HexEncodedTransactionData as b3, Isin as b4, Iso2CountryCode as b5, Link as b6, type ListOptionAddressesParams as b7, MAX_ASSET_DECIMALS as b8, MAX_UINT_256 as b9, RedirectUri as bA, type RemoveOptionAddressParams as bB, type RequirementActionNeededReason as bC, type RpcConfig as bD, SOLANA_CHAINS as bE, STABLE_DECIMALS as bF, SolanaChain as bG, type SubmitDocumentParams as bH, type SuperstateSwapOffer as bI, type SwapContractRef as bJ, SwapPreview as bK, TermItem as bL, Ticker as bM, type TokenLogoImage as bN, TokenLogoUrl as bO, type TokenRole as bP, TokensNamespaceImpl as bQ, WalletAddress as bR, WalletOwnershipChallenge as bS, type WalletProtocol as bT, WalletsNamespaceImpl as bU, apiErrorCode as bV, assertUint256 as bW, isChain as bX, isOfferType as bY, parseUint256 as bZ, Milestone as ba, OAuthRefreshToken as bb, type OfferBase as bc, type OfferDetailBase as bd, OfferEditorial as be, OfferOption as bf, OfferOptionSlug as bg, OfferSlug as bh, OfferToken as bi, OfferVaultContract as bj, OffersNamespaceImpl as bk, type OndoQuoteDuration as bl, type OndoSellOutcome as bm, type OndoSwapOffer as bn, PKCEState as bo, type PaginatedResponseDto as bp, ParticipationId as bq, type ParticipationStatus as br, ParticipationsPaginationParams as bs, PauseFlags as bt, Pii as bu, PiiAddress as bv, PiiJurisdiction as bw, type PiiKind as bx, type QueryParamValue as by, type QueryParamValues as bz, type CoinListTokenSaleNamespace as c, OfferOptionId as d, AssetId as e, CoinListTokenSaleNamespaceImpl as f, type OndoNamespace as g, AssetSymbol as h, OfferSwapContract as i, OndoBuyTransaction as j, OndoSellTransaction as k, type OndoSwapTransactionCore as l, type OrderBookSide as m, OndoNamespaceImpl as n, type WalletsNamespace as o, Bps as p, EvmWalletAddress as q, SuperstateSwapNamespaceImpl as r, Requirement as s, RequirementsNamespaceImpl as t, type Config as u, type OAuthAccessToken as v, type OffersNamespace as w, StablecoinSymbol as x, type Erc20Asset as y, OfferDetail as z };
|