@coinlist-co/react 0.12.2-rc.e1f6c82 → 0.12.2
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/README.md +79 -43
- package/dist/{chunk-GIE4UWB3.js → chunk-2FZAXGVH.js} +384 -618
- package/dist/chunk-2FZAXGVH.js.map +1 -0
- package/dist/{chunk-PIOQA6HW.js → chunk-EAPBF7T2.js} +88 -109
- package/dist/chunk-EAPBF7T2.js.map +1 -0
- package/dist/{chunk-MJ6YXZWH.js → chunk-IWQ6A52U.js} +4 -2
- package/dist/chunk-IWQ6A52U.js.map +1 -0
- package/dist/{chunk-EKLUJZ7T.js → chunk-OQ2ANYUF.js} +328 -21
- package/dist/chunk-OQ2ANYUF.js.map +1 -0
- package/dist/client/index.d.ts +1634 -1268
- package/dist/client/index.js +10261 -10050
- package/dist/client/index.js.map +1 -1
- package/dist/client-credentials-BwcmPcn-.d.ts +13 -0
- package/dist/server/index.d.ts +58 -106
- package/dist/server/index.js +208 -170
- package/dist/server/index.js.map +1 -1
- package/dist/{time-Bbqlt2x7.d.ts → time-ChSGmKZe.d.ts} +114 -66
- package/dist/{token-registry-snapshot-DttZXGvY.d.ts → token-registry-snapshot-DMubXr2c.d.ts} +19 -21
- package/dist/universal/index.d.ts +86 -73
- package/dist/universal/index.js +12 -8
- package/package.json +1 -1
- package/dist/chunk-EKLUJZ7T.js.map +0 -1
- package/dist/chunk-GIE4UWB3.js.map +0 -1
- package/dist/chunk-MJ6YXZWH.js.map +0 -1
- package/dist/chunk-PIOQA6HW.js.map +0 -1
|
@@ -19,6 +19,17 @@ type ClientId = Newtype<string, 'ClientId'>;
|
|
|
19
19
|
declare const ClientId: (value: string) => ClientId;
|
|
20
20
|
type ClientSecret = Newtype<string, 'ClientSecret'>;
|
|
21
21
|
declare const ClientSecret: (value: string) => ClientSecret;
|
|
22
|
+
/**
|
|
23
|
+
* The PKCE pair a finished authorization hands from the browser to the
|
|
24
|
+
* partner's backend: `CoinListClient#auth.completeOAuth` produces it, and
|
|
25
|
+
* `CoinListServer#auth.completeOAuth` exchanges it for a session.
|
|
26
|
+
*/
|
|
27
|
+
type AuthorizationGrant = {
|
|
28
|
+
/** The short-lived authorization code parsed out of the redirect URL. */
|
|
29
|
+
code: AuthorizationCode;
|
|
30
|
+
/** The `code_verifier` the browser generated when starting the flow. */
|
|
31
|
+
codeVerifier: CodeVerifier;
|
|
32
|
+
};
|
|
22
33
|
|
|
23
34
|
/**
|
|
24
35
|
* A classified wallet or transaction failure. The SDK derives this from
|
|
@@ -376,21 +387,23 @@ type OfferDetail = CoinListTokenSaleOfferDetail | SuperstateSwapOfferDetail | On
|
|
|
376
387
|
/** The `type` of every {@link AsyncOfferDetail}. */
|
|
377
388
|
type AsyncOfferType = AsyncOfferDetail['type'];
|
|
378
389
|
/**
|
|
379
|
-
* An offer whose trade settles later: the user places a request, the
|
|
380
|
-
* fills it on its own schedule
|
|
381
|
-
*
|
|
390
|
+
* An offer whose trade settles later: the user places a request, and the
|
|
391
|
+
* other side fills it on its own schedule. Only these have a second leg for
|
|
392
|
+
* `ClaimContainer` to show - a vault's position the user comes back to claim,
|
|
393
|
+
* or a token sale's participations, whose tokens are pushed once the sale
|
|
394
|
+
* settles and which the card follows rather than claims.
|
|
382
395
|
*
|
|
383
396
|
* A subset of {@link OfferDetail} picked by `type`, so it narrows like any
|
|
384
397
|
* other variant and a new async provider is one more member here.
|
|
385
398
|
*
|
|
386
399
|
* @alpha
|
|
387
400
|
*/
|
|
388
|
-
type AsyncOfferDetail = CentrifugeVaultOfferDetail;
|
|
401
|
+
type AsyncOfferDetail = CentrifugeVaultOfferDetail | CoinListTokenSaleOfferDetail;
|
|
389
402
|
/** @alpha */
|
|
390
403
|
declare const AsyncOfferDetail: {
|
|
391
404
|
/**
|
|
392
405
|
* Narrows an offer fetched generically, e.g. on an offer page, to one with
|
|
393
|
-
*
|
|
406
|
+
* a second leg to show.
|
|
394
407
|
*
|
|
395
408
|
* An exhaustive `switch` rather than a list of async types, so a new offer
|
|
396
409
|
* type is a compile error here until someone decides whether it settles
|
|
@@ -401,6 +414,12 @@ declare const AsyncOfferDetail: {
|
|
|
401
414
|
type CoinListTokenSaleOfferDetail = OfferDetailBase & OfferEditorial & {
|
|
402
415
|
type: 'coinlist::token_sale';
|
|
403
416
|
logoUrl: string;
|
|
417
|
+
/**
|
|
418
|
+
* Every chain this sale takes participations on, with the contract a
|
|
419
|
+
* participation's approval names as its spender. Empty means it takes
|
|
420
|
+
* participations nowhere.
|
|
421
|
+
*/
|
|
422
|
+
fundingContracts: OfferFundingContract[];
|
|
404
423
|
};
|
|
405
424
|
type SuperstateSwapOfferDetail = OfferDetailBase & OfferEditorial & {
|
|
406
425
|
type: 'superstate::swap';
|
|
@@ -546,6 +565,19 @@ type OfferVaultContract = {
|
|
|
546
565
|
chain: Chain;
|
|
547
566
|
address: EvmContractAddress;
|
|
548
567
|
};
|
|
568
|
+
/**
|
|
569
|
+
* A chain a CoinList token sale takes participations on, with the contract a
|
|
570
|
+
* participation's approval names as its spender: the sale pulls the payment
|
|
571
|
+
* through that allowance shortly after, and holds it until it settles.
|
|
572
|
+
*
|
|
573
|
+
* Its own type rather than an {@link OfferVaultContract}, although the shape
|
|
574
|
+
* is the same, because the meaning is not: nothing is sent to this contract
|
|
575
|
+
* at checkout, it is only approved.
|
|
576
|
+
*/
|
|
577
|
+
type OfferFundingContract = {
|
|
578
|
+
chain: Chain;
|
|
579
|
+
address: EvmContractAddress;
|
|
580
|
+
};
|
|
549
581
|
|
|
550
582
|
/**
|
|
551
583
|
* One vault: a share token on one chain. What the status and position reads
|
|
@@ -929,7 +961,9 @@ type BuildCentrifugeVaultBuyParams = CentrifugeWalletParams & {
|
|
|
929
961
|
/**
|
|
930
962
|
* Centrifuge vault reads and claims: the vault-wide ordering gate, each
|
|
931
963
|
* wallet's position per direction, and the calldata that claims a filled
|
|
932
|
-
* request.
|
|
964
|
+
* request - e.g. `coinlist.centrifuge.getVaultStatus({ ... })`. Broadcasting a
|
|
965
|
+
* request or a claim needs a wallet, so that half is client-only, on
|
|
966
|
+
* `ClientCentrifugeNamespace`.
|
|
933
967
|
*
|
|
934
968
|
* The reads are free to poll - none spends an attestation, so a client may
|
|
935
969
|
* call them while the user sizes a deposit or waits on a fill.
|
|
@@ -1007,14 +1041,6 @@ interface PaginatedResponse<T> {
|
|
|
1007
1041
|
type ParticipationId = Newtype<string, 'ParticipationId'>;
|
|
1008
1042
|
/** Casts a string into a typed {@link ParticipationId}. */
|
|
1009
1043
|
declare const ParticipationId: (value: string) => ParticipationId;
|
|
1010
|
-
/** Blockchain identifier for where a participation is funded. */
|
|
1011
|
-
type Blockchain = Newtype<string, 'Blockchain'>;
|
|
1012
|
-
/** Casts a string into a typed {@link Blockchain}. */
|
|
1013
|
-
declare const Blockchain: (value: string) => Blockchain;
|
|
1014
|
-
/** Wallet address used for a participation. */
|
|
1015
|
-
type WalletAddress = Newtype<`0x${string}`, 'WalletAddress'>;
|
|
1016
|
-
/** Casts a `0x`-prefixed string into a typed {@link WalletAddress}. */
|
|
1017
|
-
declare const WalletAddress: (value: `0x${string}`) => WalletAddress;
|
|
1018
1044
|
/** Possible participation lifecycle states returned by the API. */
|
|
1019
1045
|
type ParticipationStatus = 'prepared' | 'pending' | 'submitted' | 'completed' | 'failed' | 'remit_submitted' | 'remitted' | 'remit_failed';
|
|
1020
1046
|
/** Domain model for a participation returned by CoinList APIs. */
|
|
@@ -1027,20 +1053,26 @@ type Participation = {
|
|
|
1027
1053
|
offerOptionId: OfferOptionId;
|
|
1028
1054
|
/** Current processing status. */
|
|
1029
1055
|
status: ParticipationStatus;
|
|
1030
|
-
/**
|
|
1056
|
+
/** The amount in the asset's base units, e.g. `"25000000"` for 25 USDC. */
|
|
1031
1057
|
amount: string;
|
|
1032
|
-
/**
|
|
1058
|
+
/** The amount as a plain decimal in whole units, e.g. `"25"` for 25 USDC. */
|
|
1033
1059
|
displayAmount: string;
|
|
1034
1060
|
/** Asset metadata for the participation amount. */
|
|
1035
1061
|
asset: Asset;
|
|
1036
|
-
/**
|
|
1037
|
-
|
|
1062
|
+
/**
|
|
1063
|
+
* The chain the participation is funded on, or null when frontline names
|
|
1064
|
+
* one this SDK does not model yet. Lenient on purpose: participations are
|
|
1065
|
+
* listed, and one record on a newer chain must not fail the whole list -
|
|
1066
|
+
* the same reason `isChain` drops what it cannot name elsewhere, except a
|
|
1067
|
+
* participation is the user's own money and is kept rather than dropped.
|
|
1068
|
+
*/
|
|
1069
|
+
chain: Chain | null;
|
|
1038
1070
|
/** Creation timestamp, if returned by API. */
|
|
1039
1071
|
insertedAt: Date | null;
|
|
1040
1072
|
/** Last update timestamp, if returned by API. */
|
|
1041
1073
|
updatedAt: Date | null;
|
|
1042
1074
|
/** Wallet used for participation, blank values normalized to null. */
|
|
1043
|
-
walletAddress:
|
|
1075
|
+
walletAddress: EvmWalletAddress | null;
|
|
1044
1076
|
};
|
|
1045
1077
|
/** Parameters required to create a new participation. */
|
|
1046
1078
|
type CreateParticipationParams = {
|
|
@@ -1048,10 +1080,10 @@ type CreateParticipationParams = {
|
|
|
1048
1080
|
offerId: OfferId;
|
|
1049
1081
|
/** Offer option selected for participation. */
|
|
1050
1082
|
offerOptionId: OfferOptionId;
|
|
1051
|
-
/**
|
|
1052
|
-
chain:
|
|
1083
|
+
/** Chain the participation is funded on. */
|
|
1084
|
+
chain: EthereumChain;
|
|
1053
1085
|
/** Wallet address that funds the participation. */
|
|
1054
|
-
walletAddress:
|
|
1086
|
+
walletAddress: EvmWalletAddress;
|
|
1055
1087
|
/**
|
|
1056
1088
|
* Decimal token amount to participate with (e.g. `"100"` for 100 USDC), NOT
|
|
1057
1089
|
* raw base units. The backend rescales this by the asset's decimals to verify
|
|
@@ -1074,8 +1106,11 @@ interface ParticipationsPaginationParams extends PaginationParams {
|
|
|
1074
1106
|
|
|
1075
1107
|
/**
|
|
1076
1108
|
* Read/write operations for token sales: listing and reading the current user's
|
|
1077
|
-
* participations, and recording a new one
|
|
1078
|
-
*
|
|
1109
|
+
* participations, and recording a new one - e.g. `coinlist.tokenSale.list()`.
|
|
1110
|
+
*
|
|
1111
|
+
* The on-chain purchase, `ClientCoinListTokenSaleNamespace.execute`, is
|
|
1112
|
+
* layered on top of this in the client-side namespace and is not available on
|
|
1113
|
+
* `CoinListServer`, since it needs a wallet to sign with.
|
|
1079
1114
|
*/
|
|
1080
1115
|
interface CoinListTokenSaleNamespace {
|
|
1081
1116
|
/**
|
|
@@ -1429,7 +1464,10 @@ type BuildOndoSellParams = BuildOndoSwapParamsCore & {
|
|
|
1429
1464
|
};
|
|
1430
1465
|
|
|
1431
1466
|
/**
|
|
1432
|
-
* Ondo swap reads
|
|
1467
|
+
* Ondo swap reads - whether an asset is tradable right now and what it costs,
|
|
1468
|
+
* e.g. `coinlist.ondo.getQuote({ ... })` - plus the writes that turn a quote
|
|
1469
|
+
* into a fillable transaction. Approving and broadcasting need a wallet, so
|
|
1470
|
+
* they are client-only, on `ClientOndoNamespace`.
|
|
1433
1471
|
*
|
|
1434
1472
|
* The two reads are free to poll - neither spends an attestation, so a client
|
|
1435
1473
|
* may call them while the user edits an order. The two builders are not:
|
|
@@ -1583,8 +1621,8 @@ type SwapStatus = {
|
|
|
1583
1621
|
*/
|
|
1584
1622
|
type AllowWalletResponse = {
|
|
1585
1623
|
action: 'broadcast_transaction';
|
|
1586
|
-
|
|
1587
|
-
|
|
1624
|
+
/** Broadcast as-is: the allow-list call, already encoded. */
|
|
1625
|
+
tx: Tx;
|
|
1588
1626
|
} | {
|
|
1589
1627
|
action: 'none';
|
|
1590
1628
|
alreadyAllowed: boolean;
|
|
@@ -1592,7 +1630,9 @@ type AllowWalletResponse = {
|
|
|
1592
1630
|
|
|
1593
1631
|
/**
|
|
1594
1632
|
* Read/write operations for the on-chain swap flow: quoting a swap, inspecting
|
|
1595
|
-
* contract state, and
|
|
1633
|
+
* contract state, and allow-listing a proven wallet - e.g.
|
|
1634
|
+
* `coinlist.superstate.getOutputToken({ contractAddress, chain })`. The
|
|
1635
|
+
* wallet-driven flows are client-only, on `ClientSuperstateSwapNamespace`.
|
|
1596
1636
|
*
|
|
1597
1637
|
* Every read here is a contract call the SDK makes itself. By default those go
|
|
1598
1638
|
* through CoinList's authenticated JSON-RPC proxy, so a logged-out caller gets
|
|
@@ -1666,6 +1706,29 @@ type KycToken = {
|
|
|
1666
1706
|
token: string;
|
|
1667
1707
|
};
|
|
1668
1708
|
|
|
1709
|
+
type CreateKycTokenParams = {
|
|
1710
|
+
/**
|
|
1711
|
+
* Sumsub verification level to run. Defaults to the backend's standard
|
|
1712
|
+
* level.
|
|
1713
|
+
*/
|
|
1714
|
+
levelName?: KycLevelName;
|
|
1715
|
+
/**
|
|
1716
|
+
* Resets the Sumsub applicant first, so an already-approved level can be
|
|
1717
|
+
* executed again (e.g. to update stale PII). Pass the `kycReset` value from
|
|
1718
|
+
* the requirement status, and never on mid-flow token refreshes.
|
|
1719
|
+
*/
|
|
1720
|
+
reset?: boolean;
|
|
1721
|
+
};
|
|
1722
|
+
type SubmitDocumentParams = {
|
|
1723
|
+
/** Currently only `tax_certification` (W-8BEN / W-8BEN-E). */
|
|
1724
|
+
documentType: DocumentType;
|
|
1725
|
+
/**
|
|
1726
|
+
* Signing-form values keyed by the document's DocuSeal field names,
|
|
1727
|
+
* forwarded verbatim to pre-fill the document.
|
|
1728
|
+
*/
|
|
1729
|
+
fields: Record<string, string>;
|
|
1730
|
+
};
|
|
1731
|
+
|
|
1669
1732
|
/** Whether the PII belongs to an individual or a company/trust entity. */
|
|
1670
1733
|
type PiiKind = 'person' | 'company';
|
|
1671
1734
|
/** ISO 3166-1 alpha-2 country code (e.g. `'US'`). */
|
|
@@ -1725,33 +1788,11 @@ type RequirementStatusInfo = {
|
|
|
1725
1788
|
kycReset?: boolean;
|
|
1726
1789
|
};
|
|
1727
1790
|
|
|
1728
|
-
type CreateKycTokenParams = {
|
|
1729
|
-
/**
|
|
1730
|
-
* Sumsub verification level to run. Defaults to the backend's standard
|
|
1731
|
-
* level.
|
|
1732
|
-
*/
|
|
1733
|
-
levelName?: KycLevelName;
|
|
1734
|
-
/**
|
|
1735
|
-
* Resets the Sumsub applicant first, so an already-approved level can be
|
|
1736
|
-
* executed again (e.g. to update stale PII). Pass the `kycReset` value from
|
|
1737
|
-
* the requirement status, and never on mid-flow token refreshes.
|
|
1738
|
-
*/
|
|
1739
|
-
reset?: boolean;
|
|
1740
|
-
};
|
|
1741
|
-
type SubmitDocumentParams = {
|
|
1742
|
-
/** Currently only `tax_certification` (W-8BEN / W-8BEN-E). */
|
|
1743
|
-
documentType: DocumentType;
|
|
1744
|
-
/**
|
|
1745
|
-
* Signing-form values keyed by the document's DocuSeal field names,
|
|
1746
|
-
* forwarded verbatim to pre-fill the document.
|
|
1747
|
-
*/
|
|
1748
|
-
fields: Record<string, string>;
|
|
1749
|
-
};
|
|
1750
1791
|
/**
|
|
1751
1792
|
* Everything a user must satisfy before they can participate in an offer:
|
|
1752
1793
|
* reading the checklist and its live statuses, and the operations that satisfy
|
|
1753
|
-
* individual requirements
|
|
1754
|
-
* signing.
|
|
1794
|
+
* individual requirements - identity verification (KYC) and tax-document
|
|
1795
|
+
* signing. E.g. `coinlist.requirements.statuses(offerId)`.
|
|
1755
1796
|
*
|
|
1756
1797
|
* Wallet requirements (`external_wallet`, `whitelisted_wallet`) are satisfied
|
|
1757
1798
|
* through `WalletsNamespace` instead, since wallet proofs are also used
|
|
@@ -1879,11 +1920,13 @@ type RemoveOptionAddressParams = {
|
|
|
1879
1920
|
/** Binding to remove, as returned by {@link WalletsNamespace.list}. */
|
|
1880
1921
|
addressId: OfferOptionAddressId;
|
|
1881
1922
|
};
|
|
1923
|
+
|
|
1882
1924
|
/**
|
|
1883
1925
|
* The user's external wallets: proving ownership of one, binding it to an
|
|
1884
|
-
* offer option, and managing those bindings.
|
|
1926
|
+
* offer option, and managing those bindings - e.g.
|
|
1927
|
+
* `coinlist.wallets.list({ offerId, offerOptionId })`.
|
|
1885
1928
|
*
|
|
1886
|
-
* Ownership proof is a provider-agnostic primitive
|
|
1929
|
+
* Ownership proof is a provider-agnostic primitive - the swap flow uses the
|
|
1887
1930
|
* same challenge to allow-list a wallet — so it lives here rather than being
|
|
1888
1931
|
* duplicated per product namespace.
|
|
1889
1932
|
*
|
|
@@ -1917,11 +1960,12 @@ interface WalletsNamespace {
|
|
|
1917
1960
|
|
|
1918
1961
|
/**
|
|
1919
1962
|
* Reads over CoinList's offers: the catalogue a user can browse, and the full
|
|
1920
|
-
* detail of a single offer.
|
|
1963
|
+
* detail of a single offer - e.g. `coinlist.offers.list()` or
|
|
1964
|
+
* `coinlist.offers.get(offerId)`.
|
|
1921
1965
|
*
|
|
1922
1966
|
* Every method requires an authenticated user and throws
|
|
1923
1967
|
* {@link NotAuthenticatedError} otherwise. On the server, the same reads are
|
|
1924
|
-
* additionally available with an app-level token
|
|
1968
|
+
* additionally available with an app-level token - see
|
|
1925
1969
|
* `ServerOffersNamespace`.
|
|
1926
1970
|
*/
|
|
1927
1971
|
interface OffersNamespace {
|
|
@@ -1958,7 +2002,8 @@ type GetTokenBalanceParams = {
|
|
|
1958
2002
|
/**
|
|
1959
2003
|
* Generic ERC-20 reads shared across on-chain flows (swap, token sale): the
|
|
1960
2004
|
* allowance an owner has granted a spender, and the raw token balance an owner
|
|
1961
|
-
* holds. These are plain token reads, not tied to any single product flow
|
|
2005
|
+
* holds. These are plain token reads, not tied to any single product flow -
|
|
2006
|
+
* e.g. `coinlist.erc20.getBalance({ ... })`.
|
|
1962
2007
|
*
|
|
1963
2008
|
* Read from the chain rather than from a CoinList endpoint. By default that
|
|
1964
2009
|
* goes through CoinList's authenticated JSON-RPC proxy, so a logged-out caller
|
|
@@ -1980,13 +2025,16 @@ interface Erc20Namespace {
|
|
|
1980
2025
|
}
|
|
1981
2026
|
|
|
1982
2027
|
/**
|
|
1983
|
-
* Token display metadata
|
|
2028
|
+
* Token display metadata - name, symbol, decimals, and logos - from
|
|
1984
2029
|
* CoinList's public token registry, keyed by {@link TokenIdentifier} (the
|
|
1985
|
-
* same chain + address pairs `Offer.tokens` carries).
|
|
2030
|
+
* same chain + address pairs `Offer.tokens` carries) - e.g.
|
|
2031
|
+
* `coinlist.tokens.get({ chain, address })` for an entry of `Offer.tokens`,
|
|
2032
|
+
* or `coinlist.tokens.list()` for the whole catalogue in one request.
|
|
1986
2033
|
*
|
|
1987
2034
|
* Unlike the other namespaces, this one is public: no method requires an
|
|
1988
|
-
* authenticated user, and nothing here touches the CoinList API
|
|
1989
|
-
* the registry's CDN.
|
|
2035
|
+
* authenticated user, and nothing here touches the CoinList API - reads go to
|
|
2036
|
+
* the registry's CDN. On `CoinListServer` it therefore also works with a
|
|
2037
|
+
* read-only `SessionStore`.
|
|
1990
2038
|
*/
|
|
1991
2039
|
interface TokensNamespace {
|
|
1992
2040
|
/**
|
|
@@ -2560,13 +2608,15 @@ interface Config {
|
|
|
2560
2608
|
readonly redirectUri: RedirectUri;
|
|
2561
2609
|
/**
|
|
2562
2610
|
* Recommended to leave undefined. Used to change the CoinList environment;
|
|
2563
|
-
* default is production.
|
|
2611
|
+
* default is production. An empty string throws a `ValidationError` when
|
|
2612
|
+
* the client is built: omit the field to use the default.
|
|
2564
2613
|
*/
|
|
2565
2614
|
readonly baseUrl?: string;
|
|
2566
2615
|
/**
|
|
2567
2616
|
* Recommended to leave undefined. Overrides the base URL of the public
|
|
2568
2617
|
* token registry backing `coinlist.tokens`; default is the production
|
|
2569
|
-
* registry.
|
|
2618
|
+
* registry. An empty string throws a `ValidationError` when the client is
|
|
2619
|
+
* built: omit the field to use the default.
|
|
2570
2620
|
*/
|
|
2571
2621
|
readonly tokensBaseUrl?: string;
|
|
2572
2622
|
/**
|
|
@@ -2657,8 +2707,6 @@ interface Config {
|
|
|
2657
2707
|
readonly onSessionExpired?: () => Promise<void>;
|
|
2658
2708
|
}
|
|
2659
2709
|
|
|
2660
|
-
type ClientCredentialsOAuth = Newtype<OAuthAccessToken, 'ClientCredentialsOAuth'>;
|
|
2661
|
-
declare const ClientCredentialsOAuth: (value: OAuthAccessToken) => ClientCredentialsOAuth;
|
|
2662
2710
|
type OAuthAccessToken = {
|
|
2663
2711
|
value: string;
|
|
2664
2712
|
expiresAt: Date;
|
|
@@ -2708,4 +2756,4 @@ declare const Seconds: {
|
|
|
2708
2756
|
toMillis: (value: Seconds) => Millis;
|
|
2709
2757
|
};
|
|
2710
2758
|
|
|
2711
|
-
export { type
|
|
2759
|
+
export { type CentrifugeVaultStatus as $, type AuthorizationGrant as A, BlockchainAmount as B, type CentrifugeVaultBuyTransaction as C, type Offer as D, EthereumChain as E, type TokenMetadata as F, type OfferDetail as G, type Erc20Asset as H, CentrifugeVaultLegId as I, type CentrifugeVaultOfferDetail as J, Seconds as K, AsyncOfferDetail as L, type RequirementStatusInfo as M, type KycLevelName as N, type OfferVaultContract as O, type Participation as P, type RequirementType as Q, type RequirementsNamespace as R, StablecoinSymbol as S, type TokensNamespace as T, type RequirementStatusValue as U, RequirementId as V, type WalletError as W, type PinoLoggerOptions as X, type Logger as Y, AuthorizationCode as Z, CodeVerifier as _, AssetSymbol as a, type FaqItem as a$, type CentrifugeVaultRef as a0, type BuildOndoBuyParams as a1, type OndoSwapOfferDetail as a2, type BuildOndoSellParams as a3, type OndoQuote as a4, type OndoQuoteSize as a5, type OndoTradingStatus as a6, AssetDecimals as a7, type SuperstateSwapOfferDetail as a8, CentrifugeVaultLeg as a9, type BuildOndoSwapParamsCore as aA, CentrifugeAssets as aB, type CentrifugeDepositPosition as aC, type CentrifugeOrderReason as aD, type CentrifugeOrderability as aE, type CentrifugeRedeemPosition as aF, CentrifugeShares as aG, type CentrifugeVaultClaimProceedsTransaction as aH, type CentrifugeVaultClaimTransaction as aI, type CentrifugeVaultOffer as aJ, type CentrifugeVaultReason as aK, type CentrifugeVaultResolution as aL, type CentrifugeVaultTransactionCore as aM, type CentrifugeWalletParams as aN, Chain as aO, type CoinListTokenSaleOffer as aP, type ConnectExternalWalletParams as aQ, type CreateKycTokenParams as aR, type CreateParticipationParams as aS, type CreateWalletOwnershipChallengeParams as aT, Cursor as aU, type DebugEvent as aV, DecimalString as aW, type DocumentFormType as aX, type DocumentSubmissionStatus as aY, type DocumentType as aZ, ETHEREUM_CHAINS as a_, type CentrifugeVault as aa, ParticipationId as ab, type ParticipationStatus as ac, EpochMillis as ad, OfferOptionAddressId as ae, type DocumentSubmission as af, type TokenIdentifier as ag, type OAuthSession as ah, type PaginationParams as ai, type PaginatedResponse as aj, ClientSecret as ak, ClientId as al, RedirectUri as am, CodeChallenge as an, PKCEState as ao, type RequestId as ap, type SwapStatus as aq, KnownAssetSymbol as ar, type AllowWalletParams as as, type AllowWalletResponse as at, type Asset as au, AssetCode as av, AssetId as aw, type AsyncOfferType as ax, type BaseEvent as ay, type BuildCentrifugeVaultBuyParams as az, EvmContractAddress as b, type TokenLogo as b$, type FrontlineEventId as b0, type GetCentrifugeVaultStatusParams as b1, type GetOndoQuoteParams as b2, type GetOndoTradingStatusParams as b3, type GetSwapAuthorizationParams as b4, type GetSwapPreviewParams as b5, type GetSwapQuoteParams as b6, type GetTokenAllowanceParams as b7, type GetTokenBalanceParams as b8, HexEncodedTransactionData as b9, type OndoQuoteDuration as bA, type OndoSellOutcome as bB, type OndoSwapOffer as bC, type ParticipationsPaginationParams as bD, PauseFlags as bE, type Pii as bF, type PiiAddress as bG, type PiiJurisdiction as bH, type PiiKind as bI, type ProductionLogLevel as bJ, type ReadCentrifugePositionParams as bK, type RedactedWalletError as bL, type RemoveOptionAddressParams as bM, type RequirementActionNeededReason as bN, type RpcConfig as bO, type RpcFailureReason as bP, SOLANA_CHAINS as bQ, STABLE_DECIMALS as bR, type SafeEvent as bS, type SafeFields as bT, SolanaChain as bU, type SubmitDocumentParams as bV, type SuperstateSwapOffer as bW, type SwapContractRef as bX, type SwapPreview as bY, type TermItem as bZ, Ticker as b_, Isin as ba, Iso2CountryCode as bb, type KycToken as bc, type Link as bd, type ListOptionAddressesParams as be, type LogBinding as bf, type LogBindings as bg, type LogCause as bh, type LogLevel as bi, type LogScope as bj, type LogValue as bk, MAX_ASSET_DECIMALS as bl, MAX_UINT_256 as bm, type Milestone as bn, Millis as bo, type Newtype as bp, OAuthRefreshToken as bq, type OfferBase as br, type OfferDetailBase as bs, type OfferEditorial as bt, type OfferFundingContract as bu, type OfferOption as bv, OfferOptionSlug as bw, OfferSlug as bx, type OfferToken as by, type OfferType as bz, type CentrifugeClaimDirection as c, type TokenLogoImage as c0, TokenLogoUrl as c1, type TokenRole as c2, type Tx as c3, type Uint256 as c4, type UnredactedFields as c5, type WalletOwnershipChallenge as c6, type WalletOwnershipChallengeParamsBase as c7, type WalletProtocol as c8, assertUint256 as c9, isChain as ca, isOfferType as cb, parseUint256 as cc, resolveCentrifugeVaults as cd, type CentrifugeNamespace as d, type CoinListTokenSaleOfferDetail as e, OfferOptionId as f, type CoinListTokenSaleNamespace as g, type OfferSwapContract as h, type OndoBuyTransaction as i, type OndoSellTransaction as j, type OndoNamespace as k, type OndoSwapTransactionCore as l, type OrderBookSide as m, OfferId as n, type SwapQuote as o, Bps as p, EvmWalletAddress as q, type SuperstateSwapNamespace as r, type Requirement as s, type WalletChallengeType as t, type OfferOptionAddress as u, type WalletsNamespace as v, type Config as w, type OAuthAccessToken as x, type OffersNamespace as y, type Erc20Namespace as z };
|
package/dist/{token-registry-snapshot-DttZXGvY.d.ts → token-registry-snapshot-DMubXr2c.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as EvmWalletAddress, E as EthereumChain, c3 as Tx,
|
|
1
|
+
import { q as EvmWalletAddress, E as EthereumChain, c3 as Tx, bp as Newtype, F as TokenMetadata, aO as Chain, b as EvmContractAddress, by as OfferToken } from './time-ChSGmKZe.js';
|
|
2
2
|
import { Hex, Abi, Hash, TransactionReceipt } from 'viem';
|
|
3
3
|
|
|
4
4
|
type WriteContractParams = {
|
|
@@ -75,23 +75,6 @@ type ExternalWalletAdapter = {
|
|
|
75
75
|
disconnect: () => Promise<void>;
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
type FormattedAmountUi = Newtype<string, 'FormattedAmountUi'>;
|
|
79
|
-
declare const FormattedAmountUi: (value: string) => FormattedAmountUi;
|
|
80
|
-
type FormattedPercentUi = Newtype<string, 'FormattedPercentUi'>;
|
|
81
|
-
declare const FormattedPercentUi: (value: string) => FormattedPercentUi;
|
|
82
|
-
type TxExplorerUrl = Newtype<string, 'TxExplorerUrl'>;
|
|
83
|
-
declare const TxExplorerUrl: (value: string) => TxExplorerUrl;
|
|
84
|
-
/**
|
|
85
|
-
* A wallet address shortened for display (e.g. `0x1234…5678`). Keeps a
|
|
86
|
-
* `0x${string}` base but drops the runtime `0x` narrowing.
|
|
87
|
-
*/
|
|
88
|
-
type ShortenedWalletAddress = Newtype<`0x${string}`, 'ShortenedWalletAddress'>;
|
|
89
|
-
declare const ShortenedWalletAddress: (value: string) => ShortenedWalletAddress;
|
|
90
|
-
type FormattedAmountAssetUi = Newtype<string, 'FormattedAmountAssetUi'>;
|
|
91
|
-
declare const FormattedAmountAssetUi: (value: string) => FormattedAmountAssetUi;
|
|
92
|
-
type AssetIconUrl = Newtype<string, 'AssetIconUrl'>;
|
|
93
|
-
declare const AssetIconUrl: (value: string) => AssetIconUrl;
|
|
94
|
-
|
|
95
78
|
/**
|
|
96
79
|
* The wallets a screen reads for and acts from, supplied by the host.
|
|
97
80
|
*
|
|
@@ -100,8 +83,6 @@ declare const AssetIconUrl: (value: string) => AssetIconUrl;
|
|
|
100
83
|
* adapter for connecting an external one when it supports that. Every wallet
|
|
101
84
|
* here is one that can sign for itself, so a screen can broadcast from the
|
|
102
85
|
* wallet that holds a position.
|
|
103
|
-
*
|
|
104
|
-
* @alpha
|
|
105
86
|
*/
|
|
106
87
|
type WalletSelection = {
|
|
107
88
|
/**
|
|
@@ -119,7 +100,7 @@ type WalletSelection = {
|
|
|
119
100
|
*/
|
|
120
101
|
externalAdapter: ExternalWalletAdapter | null;
|
|
121
102
|
};
|
|
122
|
-
/** @
|
|
103
|
+
/** Operations over a {@link WalletSelection}. */
|
|
123
104
|
declare const WalletSelection: {
|
|
124
105
|
/**
|
|
125
106
|
* Every wallet in display order - embedded first, then the external one -
|
|
@@ -137,6 +118,23 @@ declare const WalletSelection: {
|
|
|
137
118
|
*/
|
|
138
119
|
type WalletLabelResolver = (address: EvmWalletAddress) => string | null;
|
|
139
120
|
|
|
121
|
+
type FormattedAmountUi = Newtype<string, 'FormattedAmountUi'>;
|
|
122
|
+
declare const FormattedAmountUi: (value: string) => FormattedAmountUi;
|
|
123
|
+
type FormattedPercentUi = Newtype<string, 'FormattedPercentUi'>;
|
|
124
|
+
declare const FormattedPercentUi: (value: string) => FormattedPercentUi;
|
|
125
|
+
type TxExplorerUrl = Newtype<string, 'TxExplorerUrl'>;
|
|
126
|
+
declare const TxExplorerUrl: (value: string) => TxExplorerUrl;
|
|
127
|
+
/**
|
|
128
|
+
* A wallet address shortened for display (e.g. `0x1234…5678`). Keeps a
|
|
129
|
+
* `0x${string}` base but drops the runtime `0x` narrowing.
|
|
130
|
+
*/
|
|
131
|
+
type ShortenedWalletAddress = Newtype<`0x${string}`, 'ShortenedWalletAddress'>;
|
|
132
|
+
declare const ShortenedWalletAddress: (value: string) => ShortenedWalletAddress;
|
|
133
|
+
type FormattedAmountAssetUi = Newtype<string, 'FormattedAmountAssetUi'>;
|
|
134
|
+
declare const FormattedAmountAssetUi: (value: string) => FormattedAmountAssetUi;
|
|
135
|
+
type AssetIconUrl = Newtype<string, 'AssetIconUrl'>;
|
|
136
|
+
declare const AssetIconUrl: (value: string) => AssetIconUrl;
|
|
137
|
+
|
|
140
138
|
/**
|
|
141
139
|
* An array guaranteed to hold at least one element. Use it where an empty list
|
|
142
140
|
* would be a bug (e.g. the set of assets a swap always offers).
|