@coinlist-co/react 0.11.1-rc.e102bdb → 0.12.0
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-7CTH4KPU.js → chunk-6CQHDASY.js} +648 -620
- package/dist/chunk-6CQHDASY.js.map +1 -0
- package/dist/{chunk-UZUQALFY.js → chunk-F6WGUKZC.js} +9 -9
- package/dist/chunk-F6WGUKZC.js.map +1 -0
- package/dist/{chunk-LSPZETDH.js → chunk-ZFBEI3BW.js} +131 -134
- package/dist/chunk-ZFBEI3BW.js.map +1 -0
- package/dist/client/index.cjs +1489 -1346
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +395 -254
- package/dist/client/index.d.ts +395 -254
- package/dist/client/index.js +852 -739
- package/dist/client/index.js.map +1 -1
- package/dist/{collections-BBI_XydI.d.cts → collections-DOm9VKVm.d.cts} +1 -1
- package/dist/{collections-BrX9rRWc.d.ts → collections-aCv-Wr2a.d.ts} +1 -1
- package/dist/{config-CMl1bR3F.d.cts → config-DIaFzrMW.d.cts} +56 -13
- package/dist/{config-CMl1bR3F.d.ts → config-DIaFzrMW.d.ts} +56 -13
- package/dist/server/index.cjs +262 -236
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +4 -4
- package/dist/server/index.d.ts +4 -4
- package/dist/server/index.js +3 -3
- package/dist/server/index.js.map +1 -1
- package/dist/{shared → universal}/index.cjs +948 -919
- package/dist/universal/index.cjs.map +1 -0
- package/dist/{shared → universal}/index.d.cts +566 -536
- package/dist/{shared → universal}/index.d.ts +566 -536
- package/dist/{shared → universal}/index.js +9 -5
- package/package.json +23 -17
- package/dist/chunk-7CTH4KPU.js.map +0 -1
- package/dist/chunk-LSPZETDH.js.map +0 -1
- package/dist/chunk-UZUQALFY.js.map +0 -1
- package/dist/shared/index.cjs.map +0 -1
- /package/dist/{shared → universal}/index.js.map +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aE as ClientId, bl as RedirectUri, aF as CodeChallenge, ba as PKCEState, C as CodeVerifier, q as EvmWalletAddress, a as EthereumChain, bD as Tx, B as BlockchainAmount, bu as SwapPreview, Z as AssetDecimals, aw as Newtype } from './config-DIaFzrMW.cjs';
|
|
2
2
|
import { Hex, Abi, Hash, TransactionReceipt } from 'viem';
|
|
3
3
|
|
|
4
4
|
type PKCEParams = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aE as ClientId, bl as RedirectUri, aF as CodeChallenge, ba as PKCEState, C as CodeVerifier, q as EvmWalletAddress, a as EthereumChain, bD as Tx, B as BlockchainAmount, bu as SwapPreview, Z as AssetDecimals, aw as Newtype } from './config-DIaFzrMW.js';
|
|
2
2
|
import { Hex, Abi, Hash, TransactionReceipt } from 'viem';
|
|
3
3
|
|
|
4
4
|
type PKCEParams = {
|
|
@@ -26,7 +26,7 @@ declare const ClientSecret: (value: string) => ClientSecret;
|
|
|
26
26
|
* shape regardless of the wallet library underneath.
|
|
27
27
|
*
|
|
28
28
|
* Lives here rather than beside its classifier because it is the failure half
|
|
29
|
-
* of the {@link EvmWallet} contract, and because both `@/
|
|
29
|
+
* of the {@link EvmWallet} contract, and because both `@/universal` and
|
|
30
30
|
* `@/client` name it: {@link LogCause} carries one, and classifying a thrown
|
|
31
31
|
* error into one needs viem's error classes, which are browser-side.
|
|
32
32
|
*/
|
|
@@ -580,6 +580,12 @@ type SolanaChain = 'solana_mainnet' | 'solana_devnet';
|
|
|
580
580
|
* caused it.
|
|
581
581
|
*/
|
|
582
582
|
declare const SolanaChain: (value: string) => SolanaChain;
|
|
583
|
+
/**
|
|
584
|
+
* {@link Chain}'s check without the throw, for a mapper over a list that drops
|
|
585
|
+
* the entries it cannot name rather than rejecting the whole list. Frontline's
|
|
586
|
+
* chain registry may carry chains this SDK does not model yet.
|
|
587
|
+
*/
|
|
588
|
+
declare const isChain: (value: string) => value is Chain;
|
|
583
589
|
type Chain = EthereumChain | SolanaChain;
|
|
584
590
|
declare const Chain: (value: string) => Chain;
|
|
585
591
|
/**
|
|
@@ -843,7 +849,7 @@ type HttpRequestAttributes = {
|
|
|
843
849
|
* Declared here rather than beside the HTTP client because domain models build
|
|
844
850
|
* query parameters too: `ParticipationsPaginationParams.toQueryParams` returns
|
|
845
851
|
* a `Record<string, QueryParamValue>`, and a domain model must not import
|
|
846
|
-
* `@/
|
|
852
|
+
* `@/universal/api/**`.
|
|
847
853
|
*/
|
|
848
854
|
type QueryParamValue = string | number | boolean | null | undefined;
|
|
849
855
|
type QueryParamValues = QueryParamValue | QueryParamValue[];
|
|
@@ -920,7 +926,7 @@ interface Sender {
|
|
|
920
926
|
send<T>(request: HttpRequest): Promise<T>;
|
|
921
927
|
}
|
|
922
928
|
|
|
923
|
-
interface
|
|
929
|
+
interface UniversalNamespaceContext {
|
|
924
930
|
readonly api: Sender;
|
|
925
931
|
/**
|
|
926
932
|
* The host's logger, or `null` when they supplied none.
|
|
@@ -1058,7 +1064,7 @@ interface Erc20Namespace {
|
|
|
1058
1064
|
declare class Erc20NamespaceImpl implements Erc20Namespace {
|
|
1059
1065
|
private readonly ctx;
|
|
1060
1066
|
private readonly log;
|
|
1061
|
-
constructor(ctx:
|
|
1067
|
+
constructor(ctx: UniversalNamespaceContext);
|
|
1062
1068
|
getAllowance(params: GetTokenAllowanceParams): Promise<TokenAllowance>;
|
|
1063
1069
|
getBalance(params: GetTokenBalanceParams): Promise<TokenBalance>;
|
|
1064
1070
|
}
|
|
@@ -1196,6 +1202,18 @@ type OfferToken = {
|
|
|
1196
1202
|
};
|
|
1197
1203
|
declare const OfferToken: {
|
|
1198
1204
|
fromDto: (dto: OfferTokenDto) => OfferToken;
|
|
1205
|
+
/**
|
|
1206
|
+
* Maps an offer's token list, dropping every token on a chain this SDK does
|
|
1207
|
+
* not name. Frontline's chain registry runs ahead of {@link Chain}, and a
|
|
1208
|
+
* plain `.map` would throw out of `Offer.fromDto` and, through
|
|
1209
|
+
* `PaginatedResponse.fromDto`, reject the whole offers page - which is how
|
|
1210
|
+
* one Base token blanked production's offers list. Dropping costs that
|
|
1211
|
+
* token's metadata alone: `coinlist.tokens.get` takes an `EthereumChain`,
|
|
1212
|
+
* so nobody could have looked it up anyway.
|
|
1213
|
+
*
|
|
1214
|
+
* Same shape as `TokenMetadata.fromRegistryDto`.
|
|
1215
|
+
*/
|
|
1216
|
+
listFromDto: (dtos: OfferTokenDto[]) => OfferToken[];
|
|
1199
1217
|
};
|
|
1200
1218
|
|
|
1201
1219
|
/**
|
|
@@ -1285,6 +1303,7 @@ type OfferDetailDto = {
|
|
|
1285
1303
|
faqs: OfferDetailFaqDto[];
|
|
1286
1304
|
funding_assets: AssetDto[];
|
|
1287
1305
|
tokens: OfferTokenDto[];
|
|
1306
|
+
swap_contracts?: OfferDetailSwapContractDto[];
|
|
1288
1307
|
id: string;
|
|
1289
1308
|
links: OfferDetailLinkDto[];
|
|
1290
1309
|
milestones: OfferDetailMilestoneDto[];
|
|
@@ -1329,11 +1348,30 @@ type OfferDetailTermDto = {
|
|
|
1329
1348
|
key: string | null;
|
|
1330
1349
|
value: string | null;
|
|
1331
1350
|
};
|
|
1351
|
+
type OfferDetailSwapContractDto = {
|
|
1352
|
+
chain: string;
|
|
1353
|
+
address: string;
|
|
1354
|
+
};
|
|
1332
1355
|
|
|
1333
1356
|
type OfferOptionId = Newtype<string, 'OfferOptionId'>;
|
|
1334
1357
|
declare const OfferOptionId: (value: string) => OfferOptionId;
|
|
1335
1358
|
type OfferOptionSlug = Newtype<string, 'OfferOptionSlug'>;
|
|
1336
1359
|
declare const OfferOptionSlug: (value: string) => OfferOptionSlug;
|
|
1360
|
+
/**
|
|
1361
|
+
* A chain an offer can be swapped on, with the CoinList contract the swap
|
|
1362
|
+
* settles through - the spender to approve before any quote exists.
|
|
1363
|
+
*
|
|
1364
|
+
* Carries no role, unlike {@link OfferToken}: there is one swap contract per
|
|
1365
|
+
* chain and it serves every Ondo asset on it, so which token is being traded
|
|
1366
|
+
* does not change the answer.
|
|
1367
|
+
*/
|
|
1368
|
+
type OfferSwapContract = {
|
|
1369
|
+
chain: Chain;
|
|
1370
|
+
address: EvmContractAddress;
|
|
1371
|
+
};
|
|
1372
|
+
declare const OfferSwapContract: {
|
|
1373
|
+
fromDto: (dto: OfferDetailSwapContractDto) => OfferSwapContract;
|
|
1374
|
+
};
|
|
1337
1375
|
type OfferDetail = {
|
|
1338
1376
|
id: OfferId;
|
|
1339
1377
|
slug: OfferSlug;
|
|
@@ -1342,6 +1380,11 @@ type OfferDetail = {
|
|
|
1342
1380
|
asset: Asset;
|
|
1343
1381
|
fundingAssets: Asset[];
|
|
1344
1382
|
tokens: OfferToken[];
|
|
1383
|
+
/**
|
|
1384
|
+
* Every chain this offer can be swapped on, with the CoinList contract each
|
|
1385
|
+
* settles through. Empty means it cannot be swapped anywhere.
|
|
1386
|
+
*/
|
|
1387
|
+
swapContracts: OfferSwapContract[];
|
|
1345
1388
|
about: string | null;
|
|
1346
1389
|
tagline: string;
|
|
1347
1390
|
bannerUrl: string;
|
|
@@ -1520,7 +1563,7 @@ interface CoinListTokenSaleNamespace {
|
|
|
1520
1563
|
declare class CoinListTokenSaleNamespaceImpl implements CoinListTokenSaleNamespace {
|
|
1521
1564
|
private readonly ctx;
|
|
1522
1565
|
protected readonly log: InternalLogger;
|
|
1523
|
-
constructor(ctx:
|
|
1566
|
+
constructor(ctx: UniversalNamespaceContext);
|
|
1524
1567
|
list(offerId?: OfferId): Promise<Participation[]>;
|
|
1525
1568
|
listPage(params: ParticipationsPaginationParams): Promise<PaginatedResponse<Participation>>;
|
|
1526
1569
|
get(id: ParticipationId): Promise<Participation>;
|
|
@@ -2180,7 +2223,7 @@ interface OndoNamespace {
|
|
|
2180
2223
|
declare class OndoNamespaceImpl implements OndoNamespace {
|
|
2181
2224
|
private readonly ctx;
|
|
2182
2225
|
protected readonly log: InternalLogger;
|
|
2183
|
-
constructor(ctx:
|
|
2226
|
+
constructor(ctx: UniversalNamespaceContext);
|
|
2184
2227
|
getTradingStatus(params: GetOndoTradingStatusParams): Promise<OndoTradingStatus>;
|
|
2185
2228
|
getQuote(params: GetOndoQuoteParams): Promise<OndoQuote>;
|
|
2186
2229
|
buildBuyTransaction(params: BuildOndoBuyParams): Promise<OndoBuyTransaction>;
|
|
@@ -2238,7 +2281,7 @@ interface SuperstateSwapNamespace {
|
|
|
2238
2281
|
declare class SuperstateSwapNamespaceImpl implements SuperstateSwapNamespace {
|
|
2239
2282
|
private readonly ctx;
|
|
2240
2283
|
protected readonly log: InternalLogger;
|
|
2241
|
-
constructor(ctx:
|
|
2284
|
+
constructor(ctx: UniversalNamespaceContext);
|
|
2242
2285
|
getAuthorization(params: GetSwapAuthorizationParams): Promise<SwapAuthorization>;
|
|
2243
2286
|
getPreview(params: GetSwapPreviewParams): Promise<SwapPreview>;
|
|
2244
2287
|
getStatus(params: SwapContractRef): Promise<SwapStatus>;
|
|
@@ -2432,7 +2475,7 @@ interface WalletsNamespace {
|
|
|
2432
2475
|
declare class WalletsNamespaceImpl implements WalletsNamespace {
|
|
2433
2476
|
private readonly ctx;
|
|
2434
2477
|
private readonly log;
|
|
2435
|
-
constructor(ctx:
|
|
2478
|
+
constructor(ctx: UniversalNamespaceContext);
|
|
2436
2479
|
createOwnershipChallenge(params: CreateWalletOwnershipChallengeParams): Promise<WalletOwnershipChallenge>;
|
|
2437
2480
|
connectExternal(params: ConnectExternalWalletParams): Promise<OfferOptionAddress>;
|
|
2438
2481
|
list(params: ListOptionAddressesParams): Promise<OfferOptionAddress[]>;
|
|
@@ -2667,9 +2710,9 @@ interface RequirementsNamespace {
|
|
|
2667
2710
|
submitDocument(params: SubmitDocumentParams): Promise<DocumentSubmission>;
|
|
2668
2711
|
}
|
|
2669
2712
|
declare class RequirementsNamespaceImpl implements RequirementsNamespace {
|
|
2670
|
-
protected readonly ctx:
|
|
2713
|
+
protected readonly ctx: UniversalNamespaceContext;
|
|
2671
2714
|
protected readonly log: InternalLogger;
|
|
2672
|
-
constructor(ctx:
|
|
2715
|
+
constructor(ctx: UniversalNamespaceContext);
|
|
2673
2716
|
forOffer(offerId: OfferId): Promise<Record<OfferOptionId, Requirement[]>>;
|
|
2674
2717
|
statuses(offerId: OfferId): Promise<RequirementStatusInfo[]>;
|
|
2675
2718
|
createKycToken(params?: CreateKycTokenParams): Promise<KycToken>;
|
|
@@ -2707,7 +2750,7 @@ interface OffersNamespace {
|
|
|
2707
2750
|
declare class OffersNamespaceImpl implements OffersNamespace {
|
|
2708
2751
|
private readonly ctx;
|
|
2709
2752
|
private readonly log;
|
|
2710
|
-
constructor(ctx:
|
|
2753
|
+
constructor(ctx: UniversalNamespaceContext);
|
|
2711
2754
|
list(): Promise<Offer[]>;
|
|
2712
2755
|
listPage(params: PaginationParams): Promise<PaginatedResponse<Offer>>;
|
|
2713
2756
|
get(id: OfferId): Promise<OfferDetail>;
|
|
@@ -2883,7 +2926,7 @@ declare class TokensNamespaceImpl implements TokensNamespace {
|
|
|
2883
2926
|
private readonly api;
|
|
2884
2927
|
private readonly log;
|
|
2885
2928
|
/**
|
|
2886
|
-
* Takes the registry origin rather than a `
|
|
2929
|
+
* Takes the registry origin rather than a `UniversalNamespaceContext`: the
|
|
2887
2930
|
* registry is unauthenticated and on its own host, so the frontline sender
|
|
2888
2931
|
* and the auth check would both be dead weight here.
|
|
2889
2932
|
*/
|
|
@@ -2956,4 +2999,4 @@ interface Config {
|
|
|
2956
2999
|
readonly logger?: Logger;
|
|
2957
3000
|
}
|
|
2958
3001
|
|
|
2959
|
-
export { type
|
|
3002
|
+
export { type BuildOndoSellParams as $, AuthorizationCode as A, BlockchainAmount as B, CodeVerifier as C, TokenMetadata 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 SuperstateSwapNamespace as S, type TokensNamespace as T, type UniversalNamespaceContext as U, type WalletChallengeType as V, type WalletError as W, type PinoLoggerOptions as X, OndoTradingStatus as Y, AssetDecimals as Z, type BuildOndoBuyParams as _, EthereumChain as a, MAX_ASSET_DECIMALS as a$, OndoQuote as a0, type OndoQuoteSize as a1, type TokenIdentifier as a2, OfferOptionAddressId as a3, TokenLogo as a4, type DebugEvent as a5, type FrontlineEventId as a6, HttpError as a7, type HttpResponse as a8, KycToken as a9, AssetCode as aA, Blockchain as aB, type BuildOndoSwapParamsCore as aC, Chain as aD, ClientId as aE, CodeChallenge as aF, ConnectExternalWalletParams as aG, type CreateKycTokenParams as aH, CreateParticipationParams as aI, CreateWalletOwnershipChallengeParams as aJ, Cursor as aK, type DocumentFormType as aL, type DocumentSubmissionStatus as aM, type DocumentType as aN, ETHEREUM_CHAINS as aO, Erc20NamespaceImpl as aP, FaqItem as aQ, type GetOndoQuoteParams as aR, type GetOndoTradingStatusParams as aS, type GetSwapAuthorizationParams as aT, type GetSwapPreviewParams as aU, type GetTokenAllowanceParams as aV, type GetTokenBalanceParams as aW, HexEncodedTransactionData as aX, Iso2CountryCode as aY, Link as aZ, type ListOptionAddressesParams as a_, type LogBinding as aa, type LogBindings as ab, type LogCause as ac, type LogLevel as ad, type LogScope as ae, type LogValue as af, type ProductionLogLevel as ag, RedactedWalletError as ah, type RequestId as ai, type SafeEvent as aj, type SafeFields as ak, type UnredactedFields as al, OAuthSession as am, ClientCredentialsOAuth as an, ClientSecret as ao, type Sender as ap, PaginationParams as aq, PaginatedResponse as ar, DecimalString as as, SwapStatus as at, type Uint256 as au, KnownAssetSymbol as av, type Newtype as aw, type AllowWalletParams as ax, AllowWalletResponse as ay, Asset as az, EvmContractAddress as b, MAX_UINT_256 as b0, Milestone as b1, OAuthRefreshToken as b2, OfferOption as b3, OfferOptionSlug as b4, OfferSlug as b5, OfferToken as b6, OffersNamespaceImpl as b7, type OndoQuoteDuration as b8, type OndoSellOutcome 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, isChain as bK, parseUint256 as bL, PKCEState as ba, type PaginatedResponseDto as bb, ParticipationId as bc, type ParticipationStatus as bd, ParticipationsPaginationParams as be, Pii as bf, PiiAddress as bg, PiiJurisdiction as bh, type PiiKind as bi, type QueryParamValue as bj, type QueryParamValues as bk, RedirectUri as bl, type RemoveOptionAddressParams as bm, type RequirementActionNeededReason as bn, SOLANA_CHAINS as bo, STABLE_DECIMALS as bp, SolanaChain as bq, type SubmitDocumentParams as br, SwapAuthorization as bs, type SwapContractRef as bt, SwapPreview as bu, TermItem as bv, Ticker as bw, TokenAllowance as bx, TokenBalance 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 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 };
|
|
@@ -26,7 +26,7 @@ declare const ClientSecret: (value: string) => ClientSecret;
|
|
|
26
26
|
* shape regardless of the wallet library underneath.
|
|
27
27
|
*
|
|
28
28
|
* Lives here rather than beside its classifier because it is the failure half
|
|
29
|
-
* of the {@link EvmWallet} contract, and because both `@/
|
|
29
|
+
* of the {@link EvmWallet} contract, and because both `@/universal` and
|
|
30
30
|
* `@/client` name it: {@link LogCause} carries one, and classifying a thrown
|
|
31
31
|
* error into one needs viem's error classes, which are browser-side.
|
|
32
32
|
*/
|
|
@@ -580,6 +580,12 @@ type SolanaChain = 'solana_mainnet' | 'solana_devnet';
|
|
|
580
580
|
* caused it.
|
|
581
581
|
*/
|
|
582
582
|
declare const SolanaChain: (value: string) => SolanaChain;
|
|
583
|
+
/**
|
|
584
|
+
* {@link Chain}'s check without the throw, for a mapper over a list that drops
|
|
585
|
+
* the entries it cannot name rather than rejecting the whole list. Frontline's
|
|
586
|
+
* chain registry may carry chains this SDK does not model yet.
|
|
587
|
+
*/
|
|
588
|
+
declare const isChain: (value: string) => value is Chain;
|
|
583
589
|
type Chain = EthereumChain | SolanaChain;
|
|
584
590
|
declare const Chain: (value: string) => Chain;
|
|
585
591
|
/**
|
|
@@ -843,7 +849,7 @@ type HttpRequestAttributes = {
|
|
|
843
849
|
* Declared here rather than beside the HTTP client because domain models build
|
|
844
850
|
* query parameters too: `ParticipationsPaginationParams.toQueryParams` returns
|
|
845
851
|
* a `Record<string, QueryParamValue>`, and a domain model must not import
|
|
846
|
-
* `@/
|
|
852
|
+
* `@/universal/api/**`.
|
|
847
853
|
*/
|
|
848
854
|
type QueryParamValue = string | number | boolean | null | undefined;
|
|
849
855
|
type QueryParamValues = QueryParamValue | QueryParamValue[];
|
|
@@ -920,7 +926,7 @@ interface Sender {
|
|
|
920
926
|
send<T>(request: HttpRequest): Promise<T>;
|
|
921
927
|
}
|
|
922
928
|
|
|
923
|
-
interface
|
|
929
|
+
interface UniversalNamespaceContext {
|
|
924
930
|
readonly api: Sender;
|
|
925
931
|
/**
|
|
926
932
|
* The host's logger, or `null` when they supplied none.
|
|
@@ -1058,7 +1064,7 @@ interface Erc20Namespace {
|
|
|
1058
1064
|
declare class Erc20NamespaceImpl implements Erc20Namespace {
|
|
1059
1065
|
private readonly ctx;
|
|
1060
1066
|
private readonly log;
|
|
1061
|
-
constructor(ctx:
|
|
1067
|
+
constructor(ctx: UniversalNamespaceContext);
|
|
1062
1068
|
getAllowance(params: GetTokenAllowanceParams): Promise<TokenAllowance>;
|
|
1063
1069
|
getBalance(params: GetTokenBalanceParams): Promise<TokenBalance>;
|
|
1064
1070
|
}
|
|
@@ -1196,6 +1202,18 @@ type OfferToken = {
|
|
|
1196
1202
|
};
|
|
1197
1203
|
declare const OfferToken: {
|
|
1198
1204
|
fromDto: (dto: OfferTokenDto) => OfferToken;
|
|
1205
|
+
/**
|
|
1206
|
+
* Maps an offer's token list, dropping every token on a chain this SDK does
|
|
1207
|
+
* not name. Frontline's chain registry runs ahead of {@link Chain}, and a
|
|
1208
|
+
* plain `.map` would throw out of `Offer.fromDto` and, through
|
|
1209
|
+
* `PaginatedResponse.fromDto`, reject the whole offers page - which is how
|
|
1210
|
+
* one Base token blanked production's offers list. Dropping costs that
|
|
1211
|
+
* token's metadata alone: `coinlist.tokens.get` takes an `EthereumChain`,
|
|
1212
|
+
* so nobody could have looked it up anyway.
|
|
1213
|
+
*
|
|
1214
|
+
* Same shape as `TokenMetadata.fromRegistryDto`.
|
|
1215
|
+
*/
|
|
1216
|
+
listFromDto: (dtos: OfferTokenDto[]) => OfferToken[];
|
|
1199
1217
|
};
|
|
1200
1218
|
|
|
1201
1219
|
/**
|
|
@@ -1285,6 +1303,7 @@ type OfferDetailDto = {
|
|
|
1285
1303
|
faqs: OfferDetailFaqDto[];
|
|
1286
1304
|
funding_assets: AssetDto[];
|
|
1287
1305
|
tokens: OfferTokenDto[];
|
|
1306
|
+
swap_contracts?: OfferDetailSwapContractDto[];
|
|
1288
1307
|
id: string;
|
|
1289
1308
|
links: OfferDetailLinkDto[];
|
|
1290
1309
|
milestones: OfferDetailMilestoneDto[];
|
|
@@ -1329,11 +1348,30 @@ type OfferDetailTermDto = {
|
|
|
1329
1348
|
key: string | null;
|
|
1330
1349
|
value: string | null;
|
|
1331
1350
|
};
|
|
1351
|
+
type OfferDetailSwapContractDto = {
|
|
1352
|
+
chain: string;
|
|
1353
|
+
address: string;
|
|
1354
|
+
};
|
|
1332
1355
|
|
|
1333
1356
|
type OfferOptionId = Newtype<string, 'OfferOptionId'>;
|
|
1334
1357
|
declare const OfferOptionId: (value: string) => OfferOptionId;
|
|
1335
1358
|
type OfferOptionSlug = Newtype<string, 'OfferOptionSlug'>;
|
|
1336
1359
|
declare const OfferOptionSlug: (value: string) => OfferOptionSlug;
|
|
1360
|
+
/**
|
|
1361
|
+
* A chain an offer can be swapped on, with the CoinList contract the swap
|
|
1362
|
+
* settles through - the spender to approve before any quote exists.
|
|
1363
|
+
*
|
|
1364
|
+
* Carries no role, unlike {@link OfferToken}: there is one swap contract per
|
|
1365
|
+
* chain and it serves every Ondo asset on it, so which token is being traded
|
|
1366
|
+
* does not change the answer.
|
|
1367
|
+
*/
|
|
1368
|
+
type OfferSwapContract = {
|
|
1369
|
+
chain: Chain;
|
|
1370
|
+
address: EvmContractAddress;
|
|
1371
|
+
};
|
|
1372
|
+
declare const OfferSwapContract: {
|
|
1373
|
+
fromDto: (dto: OfferDetailSwapContractDto) => OfferSwapContract;
|
|
1374
|
+
};
|
|
1337
1375
|
type OfferDetail = {
|
|
1338
1376
|
id: OfferId;
|
|
1339
1377
|
slug: OfferSlug;
|
|
@@ -1342,6 +1380,11 @@ type OfferDetail = {
|
|
|
1342
1380
|
asset: Asset;
|
|
1343
1381
|
fundingAssets: Asset[];
|
|
1344
1382
|
tokens: OfferToken[];
|
|
1383
|
+
/**
|
|
1384
|
+
* Every chain this offer can be swapped on, with the CoinList contract each
|
|
1385
|
+
* settles through. Empty means it cannot be swapped anywhere.
|
|
1386
|
+
*/
|
|
1387
|
+
swapContracts: OfferSwapContract[];
|
|
1345
1388
|
about: string | null;
|
|
1346
1389
|
tagline: string;
|
|
1347
1390
|
bannerUrl: string;
|
|
@@ -1520,7 +1563,7 @@ interface CoinListTokenSaleNamespace {
|
|
|
1520
1563
|
declare class CoinListTokenSaleNamespaceImpl implements CoinListTokenSaleNamespace {
|
|
1521
1564
|
private readonly ctx;
|
|
1522
1565
|
protected readonly log: InternalLogger;
|
|
1523
|
-
constructor(ctx:
|
|
1566
|
+
constructor(ctx: UniversalNamespaceContext);
|
|
1524
1567
|
list(offerId?: OfferId): Promise<Participation[]>;
|
|
1525
1568
|
listPage(params: ParticipationsPaginationParams): Promise<PaginatedResponse<Participation>>;
|
|
1526
1569
|
get(id: ParticipationId): Promise<Participation>;
|
|
@@ -2180,7 +2223,7 @@ interface OndoNamespace {
|
|
|
2180
2223
|
declare class OndoNamespaceImpl implements OndoNamespace {
|
|
2181
2224
|
private readonly ctx;
|
|
2182
2225
|
protected readonly log: InternalLogger;
|
|
2183
|
-
constructor(ctx:
|
|
2226
|
+
constructor(ctx: UniversalNamespaceContext);
|
|
2184
2227
|
getTradingStatus(params: GetOndoTradingStatusParams): Promise<OndoTradingStatus>;
|
|
2185
2228
|
getQuote(params: GetOndoQuoteParams): Promise<OndoQuote>;
|
|
2186
2229
|
buildBuyTransaction(params: BuildOndoBuyParams): Promise<OndoBuyTransaction>;
|
|
@@ -2238,7 +2281,7 @@ interface SuperstateSwapNamespace {
|
|
|
2238
2281
|
declare class SuperstateSwapNamespaceImpl implements SuperstateSwapNamespace {
|
|
2239
2282
|
private readonly ctx;
|
|
2240
2283
|
protected readonly log: InternalLogger;
|
|
2241
|
-
constructor(ctx:
|
|
2284
|
+
constructor(ctx: UniversalNamespaceContext);
|
|
2242
2285
|
getAuthorization(params: GetSwapAuthorizationParams): Promise<SwapAuthorization>;
|
|
2243
2286
|
getPreview(params: GetSwapPreviewParams): Promise<SwapPreview>;
|
|
2244
2287
|
getStatus(params: SwapContractRef): Promise<SwapStatus>;
|
|
@@ -2432,7 +2475,7 @@ interface WalletsNamespace {
|
|
|
2432
2475
|
declare class WalletsNamespaceImpl implements WalletsNamespace {
|
|
2433
2476
|
private readonly ctx;
|
|
2434
2477
|
private readonly log;
|
|
2435
|
-
constructor(ctx:
|
|
2478
|
+
constructor(ctx: UniversalNamespaceContext);
|
|
2436
2479
|
createOwnershipChallenge(params: CreateWalletOwnershipChallengeParams): Promise<WalletOwnershipChallenge>;
|
|
2437
2480
|
connectExternal(params: ConnectExternalWalletParams): Promise<OfferOptionAddress>;
|
|
2438
2481
|
list(params: ListOptionAddressesParams): Promise<OfferOptionAddress[]>;
|
|
@@ -2667,9 +2710,9 @@ interface RequirementsNamespace {
|
|
|
2667
2710
|
submitDocument(params: SubmitDocumentParams): Promise<DocumentSubmission>;
|
|
2668
2711
|
}
|
|
2669
2712
|
declare class RequirementsNamespaceImpl implements RequirementsNamespace {
|
|
2670
|
-
protected readonly ctx:
|
|
2713
|
+
protected readonly ctx: UniversalNamespaceContext;
|
|
2671
2714
|
protected readonly log: InternalLogger;
|
|
2672
|
-
constructor(ctx:
|
|
2715
|
+
constructor(ctx: UniversalNamespaceContext);
|
|
2673
2716
|
forOffer(offerId: OfferId): Promise<Record<OfferOptionId, Requirement[]>>;
|
|
2674
2717
|
statuses(offerId: OfferId): Promise<RequirementStatusInfo[]>;
|
|
2675
2718
|
createKycToken(params?: CreateKycTokenParams): Promise<KycToken>;
|
|
@@ -2707,7 +2750,7 @@ interface OffersNamespace {
|
|
|
2707
2750
|
declare class OffersNamespaceImpl implements OffersNamespace {
|
|
2708
2751
|
private readonly ctx;
|
|
2709
2752
|
private readonly log;
|
|
2710
|
-
constructor(ctx:
|
|
2753
|
+
constructor(ctx: UniversalNamespaceContext);
|
|
2711
2754
|
list(): Promise<Offer[]>;
|
|
2712
2755
|
listPage(params: PaginationParams): Promise<PaginatedResponse<Offer>>;
|
|
2713
2756
|
get(id: OfferId): Promise<OfferDetail>;
|
|
@@ -2883,7 +2926,7 @@ declare class TokensNamespaceImpl implements TokensNamespace {
|
|
|
2883
2926
|
private readonly api;
|
|
2884
2927
|
private readonly log;
|
|
2885
2928
|
/**
|
|
2886
|
-
* Takes the registry origin rather than a `
|
|
2929
|
+
* Takes the registry origin rather than a `UniversalNamespaceContext`: the
|
|
2887
2930
|
* registry is unauthenticated and on its own host, so the frontline sender
|
|
2888
2931
|
* and the auth check would both be dead weight here.
|
|
2889
2932
|
*/
|
|
@@ -2956,4 +2999,4 @@ interface Config {
|
|
|
2956
2999
|
readonly logger?: Logger;
|
|
2957
3000
|
}
|
|
2958
3001
|
|
|
2959
|
-
export { type
|
|
3002
|
+
export { type BuildOndoSellParams as $, AuthorizationCode as A, BlockchainAmount as B, CodeVerifier as C, TokenMetadata 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 SuperstateSwapNamespace as S, type TokensNamespace as T, type UniversalNamespaceContext as U, type WalletChallengeType as V, type WalletError as W, type PinoLoggerOptions as X, OndoTradingStatus as Y, AssetDecimals as Z, type BuildOndoBuyParams as _, EthereumChain as a, MAX_ASSET_DECIMALS as a$, OndoQuote as a0, type OndoQuoteSize as a1, type TokenIdentifier as a2, OfferOptionAddressId as a3, TokenLogo as a4, type DebugEvent as a5, type FrontlineEventId as a6, HttpError as a7, type HttpResponse as a8, KycToken as a9, AssetCode as aA, Blockchain as aB, type BuildOndoSwapParamsCore as aC, Chain as aD, ClientId as aE, CodeChallenge as aF, ConnectExternalWalletParams as aG, type CreateKycTokenParams as aH, CreateParticipationParams as aI, CreateWalletOwnershipChallengeParams as aJ, Cursor as aK, type DocumentFormType as aL, type DocumentSubmissionStatus as aM, type DocumentType as aN, ETHEREUM_CHAINS as aO, Erc20NamespaceImpl as aP, FaqItem as aQ, type GetOndoQuoteParams as aR, type GetOndoTradingStatusParams as aS, type GetSwapAuthorizationParams as aT, type GetSwapPreviewParams as aU, type GetTokenAllowanceParams as aV, type GetTokenBalanceParams as aW, HexEncodedTransactionData as aX, Iso2CountryCode as aY, Link as aZ, type ListOptionAddressesParams as a_, type LogBinding as aa, type LogBindings as ab, type LogCause as ac, type LogLevel as ad, type LogScope as ae, type LogValue as af, type ProductionLogLevel as ag, RedactedWalletError as ah, type RequestId as ai, type SafeEvent as aj, type SafeFields as ak, type UnredactedFields as al, OAuthSession as am, ClientCredentialsOAuth as an, ClientSecret as ao, type Sender as ap, PaginationParams as aq, PaginatedResponse as ar, DecimalString as as, SwapStatus as at, type Uint256 as au, KnownAssetSymbol as av, type Newtype as aw, type AllowWalletParams as ax, AllowWalletResponse as ay, Asset as az, EvmContractAddress as b, MAX_UINT_256 as b0, Milestone as b1, OAuthRefreshToken as b2, OfferOption as b3, OfferOptionSlug as b4, OfferSlug as b5, OfferToken as b6, OffersNamespaceImpl as b7, type OndoQuoteDuration as b8, type OndoSellOutcome 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, isChain as bK, parseUint256 as bL, PKCEState as ba, type PaginatedResponseDto as bb, ParticipationId as bc, type ParticipationStatus as bd, ParticipationsPaginationParams as be, Pii as bf, PiiAddress as bg, PiiJurisdiction as bh, type PiiKind as bi, type QueryParamValue as bj, type QueryParamValues as bk, RedirectUri as bl, type RemoveOptionAddressParams as bm, type RequirementActionNeededReason as bn, SOLANA_CHAINS as bo, STABLE_DECIMALS as bp, SolanaChain as bq, type SubmitDocumentParams as br, SwapAuthorization as bs, type SwapContractRef as bt, SwapPreview as bu, TermItem as bv, Ticker as bw, TokenAllowance as bx, TokenBalance 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 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 };
|