@coinlist-co/react 0.11.1-rc.e102bdb → 0.12.1-rc.14ac67e
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-LSPZETDH.js → chunk-2XBPKC4C.js} +8 -11
- package/dist/chunk-2XBPKC4C.js.map +1 -0
- package/dist/{chunk-7CTH4KPU.js → chunk-3ATIDGVR.js} +15 -1
- package/dist/chunk-3ATIDGVR.js.map +1 -0
- package/dist/{chunk-UZUQALFY.js → chunk-SOMNMOBU.js} +2 -2
- package/dist/client/index.cjs +39 -39
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +42 -28
- package/dist/client/index.d.ts +42 -28
- package/dist/client/index.js +26 -36
- package/dist/client/index.js.map +1 -1
- package/dist/{collections-BBI_XydI.d.cts → collections-DNbBE6Pk.d.cts} +1 -1
- package/dist/{collections-BrX9rRWc.d.ts → collections-DVCh4jUp.d.ts} +1 -1
- package/dist/{config-CMl1bR3F.d.cts → config-DFYAM0GD.d.cts} +26 -1
- package/dist/{config-CMl1bR3F.d.ts → config-DFYAM0GD.d.ts} +26 -1
- package/dist/server/index.cjs +13 -0
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +2 -2
- package/dist/shared/index.cjs +22 -10
- package/dist/shared/index.cjs.map +1 -1
- package/dist/shared/index.d.cts +38 -8
- package/dist/shared/index.d.ts +38 -8
- package/dist/shared/index.js +7 -5
- package/package.json +18 -13
- package/dist/chunk-7CTH4KPU.js.map +0 -1
- package/dist/chunk-LSPZETDH.js.map +0 -1
- /package/dist/{chunk-UZUQALFY.js.map → chunk-SOMNMOBU.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aD as ClientId, bk as RedirectUri, aE as CodeChallenge, b9 as PKCEState, C as CodeVerifier, r as EvmWalletAddress, a as EthereumChain, bD as Tx, B as BlockchainAmount, bt as SwapPreview, Y as AssetDecimals, av as Newtype } from './config-DFYAM0GD.cjs';
|
|
2
2
|
import { Hex, Abi, Hash, TransactionReceipt } from 'viem';
|
|
3
3
|
|
|
4
4
|
type PKCEParams = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aD as ClientId, bk as RedirectUri, aE as CodeChallenge, b9 as PKCEState, C as CodeVerifier, r as EvmWalletAddress, a as EthereumChain, bD as Tx, B as BlockchainAmount, bt as SwapPreview, Y as AssetDecimals, av as Newtype } from './config-DFYAM0GD.js';
|
|
2
2
|
import { Hex, Abi, Hash, TransactionReceipt } from 'viem';
|
|
3
3
|
|
|
4
4
|
type PKCEParams = {
|
|
@@ -1285,6 +1285,7 @@ type OfferDetailDto = {
|
|
|
1285
1285
|
faqs: OfferDetailFaqDto[];
|
|
1286
1286
|
funding_assets: AssetDto[];
|
|
1287
1287
|
tokens: OfferTokenDto[];
|
|
1288
|
+
swap_contracts?: OfferDetailSwapContractDto[];
|
|
1288
1289
|
id: string;
|
|
1289
1290
|
links: OfferDetailLinkDto[];
|
|
1290
1291
|
milestones: OfferDetailMilestoneDto[];
|
|
@@ -1329,11 +1330,30 @@ type OfferDetailTermDto = {
|
|
|
1329
1330
|
key: string | null;
|
|
1330
1331
|
value: string | null;
|
|
1331
1332
|
};
|
|
1333
|
+
type OfferDetailSwapContractDto = {
|
|
1334
|
+
chain: string;
|
|
1335
|
+
address: string;
|
|
1336
|
+
};
|
|
1332
1337
|
|
|
1333
1338
|
type OfferOptionId = Newtype<string, 'OfferOptionId'>;
|
|
1334
1339
|
declare const OfferOptionId: (value: string) => OfferOptionId;
|
|
1335
1340
|
type OfferOptionSlug = Newtype<string, 'OfferOptionSlug'>;
|
|
1336
1341
|
declare const OfferOptionSlug: (value: string) => OfferOptionSlug;
|
|
1342
|
+
/**
|
|
1343
|
+
* A chain an offer can be swapped on, with the CoinList contract the swap
|
|
1344
|
+
* settles through - the spender to approve before any quote exists.
|
|
1345
|
+
*
|
|
1346
|
+
* Carries no role, unlike {@link OfferToken}: there is one swap contract per
|
|
1347
|
+
* chain and it serves every Ondo asset on it, so which token is being traded
|
|
1348
|
+
* does not change the answer.
|
|
1349
|
+
*/
|
|
1350
|
+
type OfferSwapContract = {
|
|
1351
|
+
chain: Chain;
|
|
1352
|
+
address: EvmContractAddress;
|
|
1353
|
+
};
|
|
1354
|
+
declare const OfferSwapContract: {
|
|
1355
|
+
fromDto: (dto: OfferDetailSwapContractDto) => OfferSwapContract;
|
|
1356
|
+
};
|
|
1337
1357
|
type OfferDetail = {
|
|
1338
1358
|
id: OfferId;
|
|
1339
1359
|
slug: OfferSlug;
|
|
@@ -1342,6 +1362,11 @@ type OfferDetail = {
|
|
|
1342
1362
|
asset: Asset;
|
|
1343
1363
|
fundingAssets: Asset[];
|
|
1344
1364
|
tokens: OfferToken[];
|
|
1365
|
+
/**
|
|
1366
|
+
* Every chain this offer can be swapped on, with the CoinList contract each
|
|
1367
|
+
* settles through. Empty means it cannot be swapped anywhere.
|
|
1368
|
+
*/
|
|
1369
|
+
swapContracts: OfferSwapContract[];
|
|
1345
1370
|
about: string | null;
|
|
1346
1371
|
tagline: string;
|
|
1347
1372
|
bannerUrl: string;
|
|
@@ -2956,4 +2981,4 @@ interface Config {
|
|
|
2956
2981
|
readonly logger?: Logger;
|
|
2957
2982
|
}
|
|
2958
2983
|
|
|
2959
|
-
export {
|
|
2984
|
+
export { OndoQuote as $, AuthorizationCode as A, BlockchainAmount as B, CodeVerifier as C, OfferDetail as D, type Erc20Namespace as E, type OfferType as F, Offer as G, RequirementStatusInfo as H, type RequirementType as I, type RequirementStatusValue as J, OfferOptionAddress as K, type Logger as L, RequirementId as M, type KycLevelName as N, OfferId as O, Participation as P, DocumentSubmission as Q, type RequirementsNamespace as R, type SharedNamespaceContext as S, type TokensNamespace as T, type WalletChallengeType as U, type PinoLoggerOptions as V, type WalletError as W, OndoTradingStatus as X, AssetDecimals as Y, type BuildOndoBuyParams as Z, type BuildOndoSellParams as _, EthereumChain as a, MAX_UINT_256 as a$, type OndoQuoteSize as a0, OfferOptionAddressId as a1, TokenMetadata as a2, type TokenIdentifier as a3, type DebugEvent as a4, type FrontlineEventId as a5, HttpError as a6, type HttpResponse as a7, KycToken as a8, type LogBinding as a9, Blockchain as aA, type BuildOndoSwapParamsCore as aB, Chain as aC, ClientId as aD, CodeChallenge as aE, ConnectExternalWalletParams as aF, type CreateKycTokenParams as aG, CreateParticipationParams as aH, CreateWalletOwnershipChallengeParams as aI, Cursor as aJ, type DocumentFormType as aK, type DocumentSubmissionStatus as aL, type DocumentType as aM, ETHEREUM_CHAINS as aN, Erc20NamespaceImpl as aO, FaqItem as aP, type GetOndoQuoteParams as aQ, type GetOndoTradingStatusParams as aR, type GetSwapAuthorizationParams as aS, type GetSwapPreviewParams as aT, type GetTokenAllowanceParams as aU, type GetTokenBalanceParams as aV, HexEncodedTransactionData as aW, Iso2CountryCode as aX, Link as aY, type ListOptionAddressesParams as aZ, MAX_ASSET_DECIMALS as a_, type LogBindings as aa, type LogCause as ab, type LogLevel as ac, type LogScope as ad, type LogValue as ae, type ProductionLogLevel as af, RedactedWalletError as ag, type RequestId as ah, type SafeEvent as ai, type SafeFields as aj, type UnredactedFields as ak, OAuthSession as al, ClientCredentialsOAuth as am, ClientSecret as an, type Sender as ao, PaginationParams as ap, PaginatedResponse as aq, type Uint256 as ar, KnownAssetSymbol as as, DecimalString as at, SwapStatus as au, type Newtype as av, type AllowWalletParams as aw, AllowWalletResponse as ax, Asset as ay, AssetCode as az, EvmContractAddress as b, Milestone as b0, OAuthRefreshToken as b1, OfferOption as b2, OfferOptionSlug as b3, OfferSlug as b4, OfferToken as b5, OffersNamespaceImpl as b6, type OndoQuoteDuration as b7, type OndoSellOutcome as b8, PKCEState as b9, TokenLogoUrl as bA, type TokenRole as bB, TokensNamespaceImpl as bC, type Tx as bD, WalletAddress as bE, WalletOwnershipChallenge as bF, type WalletProtocol as bG, WalletsNamespaceImpl as bH, apiErrorCode as bI, assertUint256 as bJ, parseUint256 as bK, type PaginatedResponseDto as ba, ParticipationId as bb, type ParticipationStatus as bc, ParticipationsPaginationParams as bd, Pii as be, PiiAddress as bf, PiiJurisdiction as bg, type PiiKind as bh, type QueryParamValue as bi, type QueryParamValues as bj, RedirectUri as bk, type RemoveOptionAddressParams as bl, type RequirementActionNeededReason as bm, SOLANA_CHAINS as bn, STABLE_DECIMALS as bo, SolanaChain as bp, type SubmitDocumentParams as bq, SwapAuthorization as br, type SwapContractRef as bs, SwapPreview as bt, TermItem as bu, Ticker as bv, TokenAllowance as bw, TokenBalance as bx, TokenLogo as by, type TokenLogoImage 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 SuperstateSwapNamespace as o, type WalletsNamespace as p, Bps as q, EvmWalletAddress as r, SuperstateSwapNamespaceImpl as s, Requirement as t, RequirementsNamespaceImpl as u, type Config as v, type OAuthAccessToken as w, type OffersNamespace as x, StablecoinSymbol as y, type Erc20Asset as z };
|
|
@@ -1285,6 +1285,7 @@ type OfferDetailDto = {
|
|
|
1285
1285
|
faqs: OfferDetailFaqDto[];
|
|
1286
1286
|
funding_assets: AssetDto[];
|
|
1287
1287
|
tokens: OfferTokenDto[];
|
|
1288
|
+
swap_contracts?: OfferDetailSwapContractDto[];
|
|
1288
1289
|
id: string;
|
|
1289
1290
|
links: OfferDetailLinkDto[];
|
|
1290
1291
|
milestones: OfferDetailMilestoneDto[];
|
|
@@ -1329,11 +1330,30 @@ type OfferDetailTermDto = {
|
|
|
1329
1330
|
key: string | null;
|
|
1330
1331
|
value: string | null;
|
|
1331
1332
|
};
|
|
1333
|
+
type OfferDetailSwapContractDto = {
|
|
1334
|
+
chain: string;
|
|
1335
|
+
address: string;
|
|
1336
|
+
};
|
|
1332
1337
|
|
|
1333
1338
|
type OfferOptionId = Newtype<string, 'OfferOptionId'>;
|
|
1334
1339
|
declare const OfferOptionId: (value: string) => OfferOptionId;
|
|
1335
1340
|
type OfferOptionSlug = Newtype<string, 'OfferOptionSlug'>;
|
|
1336
1341
|
declare const OfferOptionSlug: (value: string) => OfferOptionSlug;
|
|
1342
|
+
/**
|
|
1343
|
+
* A chain an offer can be swapped on, with the CoinList contract the swap
|
|
1344
|
+
* settles through - the spender to approve before any quote exists.
|
|
1345
|
+
*
|
|
1346
|
+
* Carries no role, unlike {@link OfferToken}: there is one swap contract per
|
|
1347
|
+
* chain and it serves every Ondo asset on it, so which token is being traded
|
|
1348
|
+
* does not change the answer.
|
|
1349
|
+
*/
|
|
1350
|
+
type OfferSwapContract = {
|
|
1351
|
+
chain: Chain;
|
|
1352
|
+
address: EvmContractAddress;
|
|
1353
|
+
};
|
|
1354
|
+
declare const OfferSwapContract: {
|
|
1355
|
+
fromDto: (dto: OfferDetailSwapContractDto) => OfferSwapContract;
|
|
1356
|
+
};
|
|
1337
1357
|
type OfferDetail = {
|
|
1338
1358
|
id: OfferId;
|
|
1339
1359
|
slug: OfferSlug;
|
|
@@ -1342,6 +1362,11 @@ type OfferDetail = {
|
|
|
1342
1362
|
asset: Asset;
|
|
1343
1363
|
fundingAssets: Asset[];
|
|
1344
1364
|
tokens: OfferToken[];
|
|
1365
|
+
/**
|
|
1366
|
+
* Every chain this offer can be swapped on, with the CoinList contract each
|
|
1367
|
+
* settles through. Empty means it cannot be swapped anywhere.
|
|
1368
|
+
*/
|
|
1369
|
+
swapContracts: OfferSwapContract[];
|
|
1345
1370
|
about: string | null;
|
|
1346
1371
|
tagline: string;
|
|
1347
1372
|
bannerUrl: string;
|
|
@@ -2956,4 +2981,4 @@ interface Config {
|
|
|
2956
2981
|
readonly logger?: Logger;
|
|
2957
2982
|
}
|
|
2958
2983
|
|
|
2959
|
-
export {
|
|
2984
|
+
export { OndoQuote as $, AuthorizationCode as A, BlockchainAmount as B, CodeVerifier as C, OfferDetail as D, type Erc20Namespace as E, type OfferType as F, Offer as G, RequirementStatusInfo as H, type RequirementType as I, type RequirementStatusValue as J, OfferOptionAddress as K, type Logger as L, RequirementId as M, type KycLevelName as N, OfferId as O, Participation as P, DocumentSubmission as Q, type RequirementsNamespace as R, type SharedNamespaceContext as S, type TokensNamespace as T, type WalletChallengeType as U, type PinoLoggerOptions as V, type WalletError as W, OndoTradingStatus as X, AssetDecimals as Y, type BuildOndoBuyParams as Z, type BuildOndoSellParams as _, EthereumChain as a, MAX_UINT_256 as a$, type OndoQuoteSize as a0, OfferOptionAddressId as a1, TokenMetadata as a2, type TokenIdentifier as a3, type DebugEvent as a4, type FrontlineEventId as a5, HttpError as a6, type HttpResponse as a7, KycToken as a8, type LogBinding as a9, Blockchain as aA, type BuildOndoSwapParamsCore as aB, Chain as aC, ClientId as aD, CodeChallenge as aE, ConnectExternalWalletParams as aF, type CreateKycTokenParams as aG, CreateParticipationParams as aH, CreateWalletOwnershipChallengeParams as aI, Cursor as aJ, type DocumentFormType as aK, type DocumentSubmissionStatus as aL, type DocumentType as aM, ETHEREUM_CHAINS as aN, Erc20NamespaceImpl as aO, FaqItem as aP, type GetOndoQuoteParams as aQ, type GetOndoTradingStatusParams as aR, type GetSwapAuthorizationParams as aS, type GetSwapPreviewParams as aT, type GetTokenAllowanceParams as aU, type GetTokenBalanceParams as aV, HexEncodedTransactionData as aW, Iso2CountryCode as aX, Link as aY, type ListOptionAddressesParams as aZ, MAX_ASSET_DECIMALS as a_, type LogBindings as aa, type LogCause as ab, type LogLevel as ac, type LogScope as ad, type LogValue as ae, type ProductionLogLevel as af, RedactedWalletError as ag, type RequestId as ah, type SafeEvent as ai, type SafeFields as aj, type UnredactedFields as ak, OAuthSession as al, ClientCredentialsOAuth as am, ClientSecret as an, type Sender as ao, PaginationParams as ap, PaginatedResponse as aq, type Uint256 as ar, KnownAssetSymbol as as, DecimalString as at, SwapStatus as au, type Newtype as av, type AllowWalletParams as aw, AllowWalletResponse as ax, Asset as ay, AssetCode as az, EvmContractAddress as b, Milestone as b0, OAuthRefreshToken as b1, OfferOption as b2, OfferOptionSlug as b3, OfferSlug as b4, OfferToken as b5, OffersNamespaceImpl as b6, type OndoQuoteDuration as b7, type OndoSellOutcome as b8, PKCEState as b9, TokenLogoUrl as bA, type TokenRole as bB, TokensNamespaceImpl as bC, type Tx as bD, WalletAddress as bE, WalletOwnershipChallenge as bF, type WalletProtocol as bG, WalletsNamespaceImpl as bH, apiErrorCode as bI, assertUint256 as bJ, parseUint256 as bK, type PaginatedResponseDto as ba, ParticipationId as bb, type ParticipationStatus as bc, ParticipationsPaginationParams as bd, Pii as be, PiiAddress as bf, PiiJurisdiction as bg, type PiiKind as bh, type QueryParamValue as bi, type QueryParamValues as bj, RedirectUri as bk, type RemoveOptionAddressParams as bl, type RequirementActionNeededReason as bm, SOLANA_CHAINS as bn, STABLE_DECIMALS as bo, SolanaChain as bp, type SubmitDocumentParams as bq, SwapAuthorization as br, type SwapContractRef as bs, SwapPreview as bt, TermItem as bu, Ticker as bv, TokenAllowance as bw, TokenBalance as bx, TokenLogo as by, type TokenLogoImage 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 SuperstateSwapNamespace as o, type WalletsNamespace as p, Bps as q, EvmWalletAddress as r, SuperstateSwapNamespaceImpl as s, Requirement as t, RequirementsNamespaceImpl as u, type Config as v, type OAuthAccessToken as w, type OffersNamespace as x, StablecoinSymbol as y, type Erc20Asset as z };
|
package/dist/server/index.cjs
CHANGED
|
@@ -1041,6 +1041,12 @@ var Asset = {
|
|
|
1041
1041
|
// src/shared/types/offer-detail.ts
|
|
1042
1042
|
var OfferOptionId = (value) => value;
|
|
1043
1043
|
var OfferOptionSlug = (value) => value;
|
|
1044
|
+
var OfferSwapContract = {
|
|
1045
|
+
fromDto: (dto) => ({
|
|
1046
|
+
chain: Chain(dto.chain),
|
|
1047
|
+
address: EvmContractAddress(dto.address)
|
|
1048
|
+
})
|
|
1049
|
+
};
|
|
1044
1050
|
var OfferDetail = {
|
|
1045
1051
|
fromDto: (dto) => {
|
|
1046
1052
|
if (!Array.isArray(dto.funding_assets)) {
|
|
@@ -1078,6 +1084,12 @@ var OfferDetail = {
|
|
|
1078
1084
|
`OfferDetail.tokens: expected an array, got ${typeof dto.tokens}`
|
|
1079
1085
|
);
|
|
1080
1086
|
}
|
|
1087
|
+
const swapContracts = dto.swap_contracts === void 0 ? [] : dto.swap_contracts;
|
|
1088
|
+
if (!Array.isArray(swapContracts)) {
|
|
1089
|
+
throw new ValidationError(
|
|
1090
|
+
`OfferDetail.swap_contracts: expected an array, got ${typeof swapContracts}`
|
|
1091
|
+
);
|
|
1092
|
+
}
|
|
1081
1093
|
return {
|
|
1082
1094
|
id: OfferId(dto.id),
|
|
1083
1095
|
slug: OfferSlug(dto.slug),
|
|
@@ -1086,6 +1098,7 @@ var OfferDetail = {
|
|
|
1086
1098
|
asset: Asset.fromDto(dto.asset),
|
|
1087
1099
|
fundingAssets: dto.funding_assets.map(Asset.fromDto),
|
|
1088
1100
|
tokens: dto.tokens.map(OfferToken.fromDto),
|
|
1101
|
+
swapContracts: swapContracts.map(OfferSwapContract.fromDto),
|
|
1089
1102
|
about: notBlankStringOrNull(dto.about),
|
|
1090
1103
|
tagline: dto.tagline,
|
|
1091
1104
|
bannerUrl: dto.banner_url,
|