@coinlist-co/react 0.12.2-rc.abd9d38 → 0.12.2-rc.e1f6c82

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.
Files changed (36) hide show
  1. package/README.md +10 -0
  2. package/dist/{chunk-45LAPB7U.js → chunk-EKLUJZ7T.js} +10 -10
  3. package/dist/chunk-EKLUJZ7T.js.map +1 -0
  4. package/dist/{chunk-HDJEDOS4.js → chunk-GIE4UWB3.js} +1207 -799
  5. package/dist/chunk-GIE4UWB3.js.map +1 -0
  6. package/dist/chunk-MJ6YXZWH.js +22 -0
  7. package/dist/chunk-MJ6YXZWH.js.map +1 -0
  8. package/dist/{chunk-M7WDZZPX.js → chunk-PIOQA6HW.js} +194 -190
  9. package/dist/chunk-PIOQA6HW.js.map +1 -0
  10. package/dist/client/index.d.ts +2977 -4267
  11. package/dist/client/index.js +8552 -5713
  12. package/dist/client/index.js.map +1 -1
  13. package/dist/server/index.d.ts +7 -33
  14. package/dist/server/index.js +8 -4
  15. package/dist/server/index.js.map +1 -1
  16. package/dist/{tokens-namespace-DrwRi0AQ.d.cts → time-Bbqlt2x7.d.ts} +2081 -2734
  17. package/dist/{token-registry-snapshot-C-Qs3Lgs.d.ts → token-registry-snapshot-DttZXGvY.d.ts} +74 -42
  18. package/dist/universal/index.d.ts +59 -998
  19. package/dist/universal/index.js +38 -36
  20. package/package.json +18 -14
  21. package/dist/chunk-45LAPB7U.js.map +0 -1
  22. package/dist/chunk-HDJEDOS4.js.map +0 -1
  23. package/dist/chunk-M7WDZZPX.js.map +0 -1
  24. package/dist/client/index.cjs +0 -17098
  25. package/dist/client/index.cjs.map +0 -1
  26. package/dist/client/index.d.cts +0 -6660
  27. package/dist/server/index.cjs +0 -4240
  28. package/dist/server/index.cjs.map +0 -1
  29. package/dist/server/index.d.cts +0 -378
  30. package/dist/time-BOCS1TbH.d.cts +0 -50
  31. package/dist/time-C7mhO5_a.d.ts +0 -50
  32. package/dist/token-registry-snapshot-CpzLmsc2.d.cts +0 -179
  33. package/dist/tokens-namespace-DrwRi0AQ.d.ts +0 -3364
  34. package/dist/universal/index.cjs +0 -4135
  35. package/dist/universal/index.cjs.map +0 -1
  36. package/dist/universal/index.d.cts +0 -1314
@@ -1,86 +1,68 @@
1
- import { at as PaginationParams, au as PaginatedResponse, aw as DecimalString, x as StablecoinSymbol, j as OndoBuyTransaction, B as BlockchainAmount, k as OndoSellTransaction, aa as HttpError, p as Bps, ax as SwapStatus, a0 as AssetDecimals, b as EvmContractAddress, a as EthereumChain, i as OfferSwapContract, ay as Uint256, h as AssetSymbol, q as EvmWalletAddress, az as KnownAssetSymbol, y as Erc20Asset, aA as Newtype } from '../tokens-namespace-DrwRi0AQ.js';
2
- export { aB as AllowWalletParams, aC as AllowWalletResponse, aD as Asset, aE as AssetCode, e as AssetId, A as AuthorizationCode, aF as Blockchain, a1 as BuildOndoBuyParams, a2 as BuildOndoSellParams, aG as BuildOndoSwapParamsCore, aH as Chain, ar as ClientCredentialsOAuth, aI as ClientId, av as ClientSecret, aJ as CodeChallenge, C as CodeVerifier, c as CoinListTokenSaleNamespace, f as CoinListTokenSaleNamespaceImpl, aK as CoinListTokenSaleOffer, H as CoinListTokenSaleOfferDetail, u as Config, aL as ConnectExternalWalletParams, aM as CreateKycTokenParams, aN as CreateParticipationParams, aO as CreateWalletOwnershipChallengeParams, aP as Cursor, a8 as DebugEvent, aQ as DocumentFormType, Y as DocumentSubmission, aR as DocumentSubmissionStatus, aS as DocumentType, aT as ETHEREUM_CHAINS, E as Erc20Namespace, aU as Erc20NamespaceImpl, aV as FaqItem, a9 as FrontlineEventId, aW as GetOndoQuoteParams, aX as GetOndoTradingStatusParams, aY as GetSwapAuthorizationParams, aZ as GetSwapPreviewParams, a_ as GetTokenAllowanceParams, a$ as GetTokenBalanceParams, b0 as HexEncodedTransactionData, ab as HttpResponse, b1 as Isin, b2 as Iso2CountryCode, X as KycLevelName, ac as KycToken, b3 as Link, b4 as ListOptionAddressesParams, ad as LogBinding, ae as LogBindings, af as LogCause, ag as LogLevel, ah as LogScope, ai as LogValue, L as Logger, b5 as MAX_ASSET_DECIMALS, b6 as MAX_UINT_256, b7 as Milestone, v as OAuthAccessToken, b8 as OAuthRefreshToken, aq as OAuthSession, J as Offer, b9 as OfferBase, z as OfferDetail, ba as OfferDetailBase, bb as OfferEditorial, O as OfferId, bc as OfferOption, Q as OfferOptionAddress, a6 as OfferOptionAddressId, d as OfferOptionId, bd as OfferOptionSlug, be as OfferSlug, bf as OfferToken, F as OfferType, w as OffersNamespace, bg as OffersNamespaceImpl, g as OndoNamespace, n as OndoNamespaceImpl, a3 as OndoQuote, bh as OndoQuoteDuration, a4 as OndoQuoteSize, bi as OndoSellOutcome, bj as OndoSwapOffer, G as OndoSwapOfferDetail, l as OndoSwapTransactionCore, $ as OndoTradingStatus, m as OrderBookSide, bk as PKCEState, bl as PaginatedResponseDto, P as Participation, bm as ParticipationId, bn as ParticipationStatus, bo as ParticipationsPaginationParams, bp as PauseFlags, bq as Pii, br as PiiAddress, bs as PiiJurisdiction, bt as PiiKind, _ as PinoLoggerOptions, aj as ProductionLogLevel, bu as QueryParamValue, bv as QueryParamValues, ak as RedactedWalletError, bw as RedirectUri, bx as RemoveOptionAddressParams, al as RequestId, s as Requirement, by as RequirementActionNeededReason, V as RequirementId, K as RequirementStatusInfo, N as RequirementStatusValue, M as RequirementType, R as RequirementsNamespace, t as RequirementsNamespaceImpl, bz as RpcConfig, am as RpcFailureReason, bA as SOLANA_CHAINS, bB as STABLE_DECIMALS, an as SafeEvent, ao as SafeFields, bC as SolanaChain, bD as SubmitDocumentParams, S as SuperstateSwapNamespace, r as SuperstateSwapNamespaceImpl, bE as SuperstateSwapOffer, I as SuperstateSwapOfferDetail, bF as SwapContractRef, bG as SwapPreview, bH as TermItem, bI as Ticker, a5 as TokenIdentifier, a7 as TokenLogo, bJ as TokenLogoImage, bK as TokenLogoUrl, D as TokenMetadata, bL as TokenRole, T as TokensNamespace, bM as TokensNamespaceImpl, bN as Tx, ap as UnredactedFields, bO as WalletAddress, Z as WalletChallengeType, W as WalletError, bP as WalletOwnershipChallenge, bQ as WalletProtocol, o as WalletsNamespace, bR as WalletsNamespaceImpl, bS as apiErrorCode, bT as assertUint256, bU as isChain, bV as isOfferType, bW as parseUint256 } from '../tokens-namespace-DrwRi0AQ.js';
3
- import { N as NonEmptyArray, S as SwapQuote, F as FormattedAmountAssetUi, T as TxExplorerUrl, e as FormattedAmountUi, b as FormattedPercentUi, a as ShortenedWalletAddress } from '../token-registry-snapshot-C-Qs3Lgs.js';
4
- export { A as AssetIconUrl, B as BroadcastTxParams, C as ConnectWallet, d as EvmSigner, E as EvmWallet, P as PKCEConfig, f as PKCEParams, c as TokenRegistrySnapshot, W as WriteContractParams, g as generatePKCEParams, o as offerDisplayTokens } from '../token-registry-snapshot-C-Qs3Lgs.js';
5
- import { TransactionReceipt, Hash, Chain } from 'viem';
6
- export { E as EpochMillis, M as Millis, S as Seconds, i as isExpired } from '../time-C7mhO5_a.js';
1
+ import { ak as RequestId, al as ClientId, am as RedirectUri, an as CodeChallenge, ao as PKCEState, C as CodeVerifier, k as OndoBuyTransaction, B as BlockchainAmount, l as OndoSellTransaction, S as SwapQuote, p as Bps, ap as SwapStatus, E as EthereumChain, b as EvmContractAddress, j as OfferSwapContract, a6 as AssetDecimals, a as AssetSymbol, q as EvmWalletAddress, aq as KnownAssetSymbol, F as Erc20Asset, D as StablecoinSymbol } from '../time-Bbqlt2x7.js';
2
+ export { ar as AllowWalletParams, as as AllowWalletResponse, at as Asset, au as AssetCode, h as AssetId, L as AsyncOfferDetail, av as AsyncOfferType, A as AuthorizationCode, aw as BaseEvent, ax as Blockchain, $ as BuildCentrifugeVaultBuyParams, a0 as BuildOndoBuyParams, a2 as BuildOndoSellParams, ay as BuildOndoSwapParamsCore, az as CentrifugeAssets, d as CentrifugeClaimDirection, aA as CentrifugeDepositPosition, e as CentrifugeNamespace, aB as CentrifugeOrderReason, aC as CentrifugeOrderability, aD as CentrifugeRedeemPosition, aE as CentrifugeShares, a9 as CentrifugeVault, c as CentrifugeVaultBuyTransaction, aF as CentrifugeVaultClaimProceedsTransaction, aG as CentrifugeVaultClaimTransaction, a8 as CentrifugeVaultLeg, I as CentrifugeVaultLegId, aH as CentrifugeVaultOffer, J as CentrifugeVaultOfferDetail, aI as CentrifugeVaultReason, ad as CentrifugeVaultRef, aJ as CentrifugeVaultResolution, ac as CentrifugeVaultStatus, aK as CentrifugeVaultTransactionCore, aL as CentrifugeWalletParams, aM as Chain, ag as ClientCredentialsOAuth, aj as ClientSecret, i as CoinListTokenSaleNamespace, aN as CoinListTokenSaleOffer, G as CoinListTokenSaleOfferDetail, w as Config, aO as ConnectExternalWalletParams, aP as CreateKycTokenParams, aQ as CreateParticipationParams, aR as CreateWalletOwnershipChallengeParams, aS as Cursor, aT as DebugEvent, aU as DecimalString, aV as DocumentFormType, ab as DocumentSubmission, aW as DocumentSubmissionStatus, aX as DocumentType, aY as ETHEREUM_CHAINS, aZ as EpochMillis, z as Erc20Namespace, a_ as FaqItem, a$ as FrontlineEventId, b0 as GetCentrifugeVaultStatusParams, b1 as GetOndoQuoteParams, b2 as GetOndoTradingStatusParams, b3 as GetSwapAuthorizationParams, b4 as GetSwapPreviewParams, b5 as GetSwapQuoteParams, b6 as GetTokenAllowanceParams, b7 as GetTokenBalanceParams, b8 as HexEncodedTransactionData, b9 as Isin, ba as Iso2CountryCode, U as KycLevelName, bb as KycToken, bc as Link, bd as ListOptionAddressesParams, be as LogBinding, bf as LogBindings, bg as LogCause, bh as LogLevel, bi as LogScope, bj as LogValue, _ as Logger, bk as MAX_ASSET_DECIMALS, bl as MAX_UINT_256, bm as Milestone, bn as Millis, bo as Newtype, x as OAuthAccessToken, bp as OAuthRefreshToken, af as OAuthSession, M as Offer, bq as OfferBase, H as OfferDetail, br as OfferDetailBase, bs as OfferEditorial, f as OfferId, bt as OfferOption, u as OfferOptionAddress, aa as OfferOptionAddressId, g as OfferOptionId, bu as OfferOptionSlug, bv as OfferSlug, bw as OfferToken, bx as OfferType, O as OfferVaultContract, y as OffersNamespace, m as OndoNamespace, a3 as OndoQuote, by as OndoQuoteDuration, a4 as OndoQuoteSize, bz as OndoSellOutcome, bA as OndoSwapOffer, a1 as OndoSwapOfferDetail, n as OndoSwapTransactionCore, a5 as OndoTradingStatus, o as OrderBookSide, ai as PaginatedResponse, ah as PaginationParams, P as Participation, bB as ParticipationId, bC as ParticipationStatus, bD as ParticipationsPaginationParams, bE as PauseFlags, bF as Pii, bG as PiiAddress, bH as PiiJurisdiction, bI as PiiKind, Z as PinoLoggerOptions, bJ as ProductionLogLevel, bK as ReadCentrifugePositionParams, bL as RedactedWalletError, bM as RemoveOptionAddressParams, s as Requirement, bN as RequirementActionNeededReason, Y as RequirementId, Q as RequirementStatusInfo, X as RequirementStatusValue, V as RequirementType, R as RequirementsNamespace, bO as RpcConfig, bP as RpcFailureReason, bQ as SOLANA_CHAINS, bR as STABLE_DECIMALS, bS as SafeEvent, bT as SafeFields, K as Seconds, bU as SolanaChain, bV as SubmitDocumentParams, r as SuperstateSwapNamespace, bW as SuperstateSwapOffer, a7 as SuperstateSwapOfferDetail, bX as SwapContractRef, bY as SwapPreview, bZ as TermItem, b_ as Ticker, ae as TokenIdentifier, b$ as TokenLogo, c0 as TokenLogoImage, c1 as TokenLogoUrl, N as TokenMetadata, c2 as TokenRole, T as TokensNamespace, c3 as Tx, c4 as Uint256, c5 as UnredactedFields, c6 as WalletAddress, t as WalletChallengeType, W as WalletError, c7 as WalletOwnershipChallenge, c8 as WalletOwnershipChallengeParamsBase, c9 as WalletProtocol, v as WalletsNamespace, ca as assertUint256, cb as isChain, cc as isOfferType, cd as parseUint256, ce as resolveCentrifugeVaults } from '../time-Bbqlt2x7.js';
3
+ import { F as FormattedAmountAssetUi, T as TxExplorerUrl, d as FormattedAmountUi, b as FormattedPercentUi, S as ShortenedWalletAddress } from '../token-registry-snapshot-DttZXGvY.js';
4
+ export { A as AssetIconUrl, B as BroadcastTxParams, C as ConnectWallet, e as EvmSigner, E as EvmWallet, f as ExternalWalletAdapter, N as NonEmptyArray, g as TokenKey, c as TokenRegistrySnapshot, a as WalletLabelResolver, W as WalletSelection, h as WriteContractParams, o as offerDisplayTokens } from '../token-registry-snapshot-DttZXGvY.js';
5
+ import { Hash, Chain } from 'viem';
7
6
 
7
+ type HttpResponse<TBody = unknown> = {
8
+ status: number;
9
+ headers?: Record<string, string>;
10
+ body: TBody | null;
11
+ /**
12
+ * The id of the request that produced this response, stamped by
13
+ * {@link HttpClient} so that whoever turns a non-2xx into an
14
+ * {@link HttpError} can carry it without threading the request alongside.
15
+ * Absent when the response did not come from an `HttpClient`.
16
+ */
17
+ requestId?: RequestId;
18
+ };
19
+ declare class HttpError<TBody = unknown> extends Error {
20
+ readonly response: HttpResponse<TBody>;
21
+ constructor(response: HttpResponse<TBody>);
22
+ /**
23
+ * Correlates this failure with the `[HTTP]` log lines for the same request,
24
+ * which carry the method, the URL, the duration and every retry. `null` when
25
+ * the response did not come from an {@link HttpClient}.
26
+ *
27
+ * Worth quoting in a bug report: it is what makes a log excerpt readable.
28
+ */
29
+ get requestId(): RequestId | null;
30
+ }
8
31
  /**
9
- * Walks every page of a cursor-paginated endpoint and returns the flattened
10
- * result.
11
- *
12
- * Lives in the API layer rather than beside `PaginationParams` because it
13
- * drives requests: it is the auto-paginating half that `list()` is built on,
14
- * while the params and the response envelope are domain models the client and
15
- * the server both name.
16
- */
17
- declare function fetchAllPages<A, P extends PaginationParams = PaginationParams>(fetchPage: (params: P) => Promise<PaginatedResponse<A>>, baseParams?: Omit<P, keyof PaginationParams>): Promise<A[]>;
18
-
19
- /**
20
- * How often the Ondo checkout refreshes what it is allowed to poll: the market
21
- * status and the indicative price. Both are free - neither spends an
22
- * attestation - so this is paced for a price the user can trust rather than
23
- * for cost.
24
- *
25
- * A built transaction is deliberately not on this timer. Building spends an
26
- * attestation, so it happens once per order and once per refresh the user
27
- * asks for.
28
- */
29
- declare const ONDO_POLL_INTERVAL_MS = 15000;
30
- /** Max time the review step offers a built quote. */
31
- declare const ONDO_QUOTE_MAX_TTL_MS = 15000;
32
- /**
33
- * The order size the sidebar prices against before the user names one.
34
- *
35
- * Ondo prices by size, so some amount has to be sent. $1,000 is a plausible
36
- * order rather than a token one: a size so small that Ondo's minimum rejects
37
- * it would leave the panel permanently blank.
38
- *
39
- * Named distinctly from `DEFAULT_AMOUNT_TO_COMPUTE_PRICE` in the swap
40
- * constants, which is a raw `bigint` of USDC base units for a different
41
- * endpoint. Both barrels are flat, so two constants of the same name could not
42
- * coexist - and they mean different things anyway.
43
- */
44
- declare const DEFAULT_ONDO_AMOUNT_TO_COMPUTE_PRICE: DecimalString;
45
- /**
46
- * The coin an Ondo sell settles into, for display only.
47
- *
48
- * The scale of every amount on a built transaction comes off the response, so
49
- * this names the token and never sizes it - `receive_output_decimals` is the
50
- * only authority on how many decimals the proceeds are counted in, and the two
51
- * are allowed to disagree.
52
- *
53
- * Named apart from {@link ONDO_SUPPORTED_INPUT_ASSETS} rather than read out of
54
- * it, though both are USDC today. On a buy USDC is what the user funds with
55
- * and one of a list that may grow; on a sell it is what they settle into and
56
- * there is one of it. Reading `ONDO_SUPPORTED_INPUT_ASSETS[0]` here would make
57
- * the sell screen quietly follow whichever funding coin happened to be listed
58
- * first.
59
- */
60
- declare const ONDO_SETTLEMENT_ASSET: StablecoinSymbol;
61
- /**
62
- * The order size the sidebar prices a sell against before the user names one.
32
+ * The machine-readable `code` frontline attaches to an error, or `null` for
33
+ * anything else - a non-HTTP failure, or an error body that carries only a
34
+ * message.
63
35
  *
64
- * Sells are quoted by token amount rather than by notional: the fee comes out
65
- * of dollars, and Ondo's price is size-aware, so a buy's quantity depends on
66
- * the quote being asked for while a sell is sized by what the user already
67
- * holds. One whole share is a size Ondo will price - small enough to be
68
- * plausible for any asset, large enough that Ondo's minimum does not reject it
69
- * and leave the panel permanently blank.
36
+ * Frontline answers a failure with `{ type, message, code?, errors?,
37
+ * event_id? }`, and `code` is the only part of it meant to be branched on:
38
+ * `message` is prose that may be reworded, and `type` distinguishes
39
+ * `invalid_request_error` from `api_error` without saying which one.
70
40
  *
71
- * The buy counterpart is {@link DEFAULT_ONDO_AMOUNT_TO_COMPUTE_PRICE}, which
72
- * is a dollar figure for the same reason in reverse.
41
+ * Reach for this only where a code has a distinct remedy the user can act on.
42
+ * Mapping the whole vocabulary would couple the SDK to strings frontline does
43
+ * not version; falling back to a generic failure is the right default.
73
44
  */
74
- declare const DEFAULT_ONDO_SELL_TOKENS_TO_COMPUTE_PRICE = 1;
45
+ declare function apiErrorCode(error: unknown): string | null;
46
+
47
+ type PKCEParams = {
48
+ clientId: ClientId;
49
+ responseType: 'code';
50
+ redirectUri: RedirectUri;
51
+ codeChallenge: CodeChallenge;
52
+ codeChallengeMethod: 'S256';
53
+ state: PKCEState;
54
+ codeVerifier: CodeVerifier;
55
+ };
56
+ type PKCEConfig = {
57
+ clientId: ClientId;
58
+ redirectUri: RedirectUri;
59
+ };
75
60
  /**
76
- * The coins an Ondo buy can be funded with, in display order, with the first
77
- * preselected.
78
- *
79
- * USDC alone today: it is what the Sepolia integration contract accepts. The
80
- * amount step renders a single entry as a plain card and two or more as a
81
- * picker, so adding one here is all it takes.
61
+ * Generates PKCE parameters for an OAuth2 authorization code flow.
62
+ * Pure crypto — no React, no DOM beyond Web Crypto API. Safe to use
63
+ * in server-side code and Next.js middleware.
82
64
  */
83
- declare const ONDO_SUPPORTED_INPUT_ASSETS: NonEmptyArray<StablecoinSymbol>;
65
+ declare function generatePKCEParams(config: PKCEConfig): Promise<PKCEParams>;
84
66
 
85
67
  /**
86
68
  * The price of one whole asset token in a built Ondo purchase, in the funding
@@ -127,20 +109,7 @@ declare function computeOndoBuyPrice(transaction: OndoBuyTransaction): Blockchai
127
109
  * does today. They diverge the day ENG-1718 lands.
128
110
  */
129
111
  declare function computeOndoSellPrice(transaction: OndoSellTransaction): BlockchainAmount;
130
- /** The sooner of Ondo's deadline and now + {@link ONDO_QUOTE_MAX_TTL_MS}. */
131
- declare function ondoQuoteOfferDeadline(expiresAt: Date, nowMs?: number): Date;
132
112
 
133
- /**
134
- * The CoinList API's error code for an Ondo quote refused because the asset
135
- * cannot be traded right now: the market is closed or paused, or the asset is
136
- * paused or closed for the session. It arrives on a 409.
137
- *
138
- * One code for all four of Ondo's reasons, because the remedy is the same:
139
- * wait for the market to open. Ondo pauses for a moment at every US session
140
- * change (04:00 and 16:00 ET), so a poll can land on one even while
141
- * `getTradingStatus` reported the asset tradable a second earlier.
142
- */
143
- declare const ONDO_NOT_TRADABLE_CODE = "not_tradable";
144
113
  /**
145
114
  * Whether `error` is the CoinList API refusing an Ondo quote because the
146
115
  * market is not open, as opposed to a request that failed.
@@ -150,694 +119,6 @@ declare const ONDO_NOT_TRADABLE_CODE = "not_tradable";
150
119
  */
151
120
  declare function isOndoNotTradableError(error: unknown): error is HttpError;
152
121
 
153
- /**
154
- * The Superstate swap contract's ABI, generated verbatim from the shared
155
- * `TokenSwap` base contract:
156
- *
157
- * ```
158
- * cd ../solidity && forge inspect TokenSwap abi --json --use 0.8.34
159
- * ```
160
- *
161
- * Generated rather than hand-trimmed to the four methods the SDK calls, so
162
- * regenerating after a contract change is one command and a paste. The custom
163
- * errors carry their weight in particular: viem decodes a revert against them,
164
- * so a `preview()` on a stopped contract surfaces as `IsStopped` rather than
165
- * as an opaque `0x`-prefixed blob.
166
- *
167
- * `status()` returns `Status { uint32 flags; State state }` where `State` is
168
- * `0 = Active | 1 = Paused | 2 = Stopped`. It replaced the older
169
- * `stopped() -> uint256` bitmask, which this contract still exposes but as a
170
- * `bool`; {@link SwapStatus} reads `status()` and nothing else.
171
- */
172
- declare const SUPERSTATE_SWAP_ABI: readonly [{
173
- readonly type: "function";
174
- readonly name: "KIND";
175
- readonly inputs: readonly [];
176
- readonly outputs: readonly [{
177
- readonly name: "";
178
- readonly type: "uint16";
179
- readonly internalType: "uint16";
180
- }];
181
- readonly stateMutability: "view";
182
- }, {
183
- readonly type: "function";
184
- readonly name: "ONE_HUNDRED_P";
185
- readonly inputs: readonly [];
186
- readonly outputs: readonly [{
187
- readonly name: "";
188
- readonly type: "uint256";
189
- readonly internalType: "uint256";
190
- }];
191
- readonly stateMutability: "view";
192
- }, {
193
- readonly type: "function";
194
- readonly name: "SWAP_LEVEL";
195
- readonly inputs: readonly [];
196
- readonly outputs: readonly [{
197
- readonly name: "";
198
- readonly type: "uint32";
199
- readonly internalType: "uint32";
200
- }];
201
- readonly stateMutability: "view";
202
- }, {
203
- readonly type: "function";
204
- readonly name: "VERSION";
205
- readonly inputs: readonly [];
206
- readonly outputs: readonly [{
207
- readonly name: "";
208
- readonly type: "uint16";
209
- readonly internalType: "uint16";
210
- }];
211
- readonly stateMutability: "view";
212
- }, {
213
- readonly type: "function";
214
- readonly name: "authorized";
215
- readonly inputs: readonly [{
216
- readonly name: "user";
217
- readonly type: "address";
218
- readonly internalType: "address";
219
- }];
220
- readonly outputs: readonly [{
221
- readonly name: "";
222
- readonly type: "bool";
223
- readonly internalType: "bool";
224
- }];
225
- readonly stateMutability: "view";
226
- }, {
227
- readonly type: "function";
228
- readonly name: "bpp";
229
- readonly inputs: readonly [{
230
- readonly name: "amount";
231
- readonly type: "uint256";
232
- readonly internalType: "uint256";
233
- }];
234
- readonly outputs: readonly [{
235
- readonly name: "";
236
- readonly type: "uint256";
237
- readonly internalType: "uint256";
238
- }];
239
- readonly stateMutability: "view";
240
- }, {
241
- readonly type: "function";
242
- readonly name: "bps";
243
- readonly inputs: readonly [];
244
- readonly outputs: readonly [{
245
- readonly name: "";
246
- readonly type: "uint256";
247
- readonly internalType: "uint256";
248
- }];
249
- readonly stateMutability: "view";
250
- }, {
251
- readonly type: "function";
252
- readonly name: "cancelOwnershipHandover";
253
- readonly inputs: readonly [];
254
- readonly outputs: readonly [];
255
- readonly stateMutability: "payable";
256
- }, {
257
- readonly type: "function";
258
- readonly name: "completeOwnershipHandover";
259
- readonly inputs: readonly [{
260
- readonly name: "pendingOwner";
261
- readonly type: "address";
262
- readonly internalType: "address";
263
- }];
264
- readonly outputs: readonly [];
265
- readonly stateMutability: "payable";
266
- }, {
267
- readonly type: "function";
268
- readonly name: "fee";
269
- readonly inputs: readonly [{
270
- readonly name: "amount";
271
- readonly type: "uint256";
272
- readonly internalType: "uint256";
273
- }];
274
- readonly outputs: readonly [{
275
- readonly name: "";
276
- readonly type: "uint256";
277
- readonly internalType: "uint256";
278
- }, {
279
- readonly name: "";
280
- readonly type: "uint256";
281
- readonly internalType: "uint256";
282
- }];
283
- readonly stateMutability: "view";
284
- }, {
285
- readonly type: "function";
286
- readonly name: "id";
287
- readonly inputs: readonly [];
288
- readonly outputs: readonly [{
289
- readonly name: "";
290
- readonly type: "bytes32";
291
- readonly internalType: "bytes32";
292
- }];
293
- readonly stateMutability: "view";
294
- }, {
295
- readonly type: "function";
296
- readonly name: "inputTokens";
297
- readonly inputs: readonly [{
298
- readonly name: "";
299
- readonly type: "address";
300
- readonly internalType: "address";
301
- }];
302
- readonly outputs: readonly [{
303
- readonly name: "";
304
- readonly type: "bool";
305
- readonly internalType: "bool";
306
- }];
307
- readonly stateMutability: "view";
308
- }, {
309
- readonly type: "function";
310
- readonly name: "outputToken";
311
- readonly inputs: readonly [];
312
- readonly outputs: readonly [{
313
- readonly name: "";
314
- readonly type: "address";
315
- readonly internalType: "address";
316
- }];
317
- readonly stateMutability: "view";
318
- }, {
319
- readonly type: "function";
320
- readonly name: "outputTokenBalance";
321
- readonly inputs: readonly [];
322
- readonly outputs: readonly [{
323
- readonly name: "";
324
- readonly type: "uint256";
325
- readonly internalType: "uint256";
326
- }];
327
- readonly stateMutability: "view";
328
- }, {
329
- readonly type: "function";
330
- readonly name: "owner";
331
- readonly inputs: readonly [];
332
- readonly outputs: readonly [{
333
- readonly name: "result";
334
- readonly type: "address";
335
- readonly internalType: "address";
336
- }];
337
- readonly stateMutability: "view";
338
- }, {
339
- readonly type: "function";
340
- readonly name: "ownershipHandoverExpiresAt";
341
- readonly inputs: readonly [{
342
- readonly name: "pendingOwner";
343
- readonly type: "address";
344
- readonly internalType: "address";
345
- }];
346
- readonly outputs: readonly [{
347
- readonly name: "result";
348
- readonly type: "uint256";
349
- readonly internalType: "uint256";
350
- }];
351
- readonly stateMutability: "view";
352
- }, {
353
- readonly type: "function";
354
- readonly name: "pause";
355
- readonly inputs: readonly [{
356
- readonly name: "level";
357
- readonly type: "uint32";
358
- readonly internalType: "uint32";
359
- }];
360
- readonly outputs: readonly [{
361
- readonly name: "";
362
- readonly type: "bool";
363
- readonly internalType: "bool";
364
- }];
365
- readonly stateMutability: "nonpayable";
366
- }, {
367
- readonly type: "function";
368
- readonly name: "paused";
369
- readonly inputs: readonly [];
370
- readonly outputs: readonly [{
371
- readonly name: "";
372
- readonly type: "uint32";
373
- readonly internalType: "uint32";
374
- }];
375
- readonly stateMutability: "view";
376
- }, {
377
- readonly type: "function";
378
- readonly name: "preview";
379
- readonly inputs: readonly [{
380
- readonly name: "token";
381
- readonly type: "address";
382
- readonly internalType: "address";
383
- }, {
384
- readonly name: "amount";
385
- readonly type: "uint256";
386
- readonly internalType: "uint256";
387
- }];
388
- readonly outputs: readonly [{
389
- readonly name: "";
390
- readonly type: "tuple";
391
- readonly internalType: "struct Preview";
392
- readonly components: readonly [{
393
- readonly name: "input";
394
- readonly type: "uint256";
395
- readonly internalType: "uint256";
396
- }, {
397
- readonly name: "fee";
398
- readonly type: "uint256";
399
- readonly internalType: "uint256";
400
- }, {
401
- readonly name: "output";
402
- readonly type: "uint256";
403
- readonly internalType: "uint256";
404
- }];
405
- }];
406
- readonly stateMutability: "view";
407
- }, {
408
- readonly type: "function";
409
- readonly name: "renounceOwnership";
410
- readonly inputs: readonly [];
411
- readonly outputs: readonly [];
412
- readonly stateMutability: "payable";
413
- }, {
414
- readonly type: "function";
415
- readonly name: "requestOwnershipHandover";
416
- readonly inputs: readonly [];
417
- readonly outputs: readonly [];
418
- readonly stateMutability: "payable";
419
- }, {
420
- readonly type: "function";
421
- readonly name: "setBps";
422
- readonly inputs: readonly [{
423
- readonly name: "points";
424
- readonly type: "uint256";
425
- readonly internalType: "uint256";
426
- }];
427
- readonly outputs: readonly [{
428
- readonly name: "";
429
- readonly type: "bool";
430
- readonly internalType: "bool";
431
- }];
432
- readonly stateMutability: "nonpayable";
433
- }, {
434
- readonly type: "function";
435
- readonly name: "setInputToken";
436
- readonly inputs: readonly [{
437
- readonly name: "token";
438
- readonly type: "address";
439
- readonly internalType: "address";
440
- }, {
441
- readonly name: "val";
442
- readonly type: "bool";
443
- readonly internalType: "bool";
444
- }];
445
- readonly outputs: readonly [{
446
- readonly name: "";
447
- readonly type: "bool";
448
- readonly internalType: "bool";
449
- }];
450
- readonly stateMutability: "nonpayable";
451
- }, {
452
- readonly type: "function";
453
- readonly name: "status";
454
- readonly inputs: readonly [];
455
- readonly outputs: readonly [{
456
- readonly name: "";
457
- readonly type: "tuple";
458
- readonly internalType: "struct Status";
459
- readonly components: readonly [{
460
- readonly name: "flags";
461
- readonly type: "uint32";
462
- readonly internalType: "uint32";
463
- }, {
464
- readonly name: "state";
465
- readonly type: "uint8";
466
- readonly internalType: "enum State";
467
- }];
468
- }];
469
- readonly stateMutability: "view";
470
- }, {
471
- readonly type: "function";
472
- readonly name: "stop";
473
- readonly inputs: readonly [];
474
- readonly outputs: readonly [{
475
- readonly name: "";
476
- readonly type: "bool";
477
- readonly internalType: "bool";
478
- }];
479
- readonly stateMutability: "nonpayable";
480
- }, {
481
- readonly type: "function";
482
- readonly name: "stopped";
483
- readonly inputs: readonly [];
484
- readonly outputs: readonly [{
485
- readonly name: "";
486
- readonly type: "bool";
487
- readonly internalType: "bool";
488
- }];
489
- readonly stateMutability: "view";
490
- }, {
491
- readonly type: "function";
492
- readonly name: "swap";
493
- readonly inputs: readonly [{
494
- readonly name: "token";
495
- readonly type: "address";
496
- readonly internalType: "address";
497
- }, {
498
- readonly name: "amount";
499
- readonly type: "uint256";
500
- readonly internalType: "uint256";
501
- }, {
502
- readonly name: "slip";
503
- readonly type: "uint256";
504
- readonly internalType: "uint256";
505
- }];
506
- readonly outputs: readonly [{
507
- readonly name: "";
508
- readonly type: "uint256";
509
- readonly internalType: "uint256";
510
- }];
511
- readonly stateMutability: "nonpayable";
512
- }, {
513
- readonly type: "function";
514
- readonly name: "tokenBalance";
515
- readonly inputs: readonly [{
516
- readonly name: "token";
517
- readonly type: "address";
518
- readonly internalType: "address";
519
- }];
520
- readonly outputs: readonly [{
521
- readonly name: "";
522
- readonly type: "uint256";
523
- readonly internalType: "uint256";
524
- }];
525
- readonly stateMutability: "view";
526
- }, {
527
- readonly type: "function";
528
- readonly name: "totals";
529
- readonly inputs: readonly [{
530
- readonly name: "user";
531
- readonly type: "address";
532
- readonly internalType: "address";
533
- }, {
534
- readonly name: "token";
535
- readonly type: "address";
536
- readonly internalType: "address";
537
- }];
538
- readonly outputs: readonly [{
539
- readonly name: "";
540
- readonly type: "tuple";
541
- readonly internalType: "struct SwapTotal";
542
- readonly components: readonly [{
543
- readonly name: "inputSum";
544
- readonly type: "uint256";
545
- readonly internalType: "uint256";
546
- }, {
547
- readonly name: "feeSum";
548
- readonly type: "uint256";
549
- readonly internalType: "uint256";
550
- }, {
551
- readonly name: "outputSum";
552
- readonly type: "uint256";
553
- readonly internalType: "uint256";
554
- }, {
555
- readonly name: "count";
556
- readonly type: "uint256";
557
- readonly internalType: "uint256";
558
- }];
559
- }];
560
- readonly stateMutability: "view";
561
- }, {
562
- readonly type: "function";
563
- readonly name: "totals";
564
- readonly inputs: readonly [{
565
- readonly name: "token";
566
- readonly type: "address";
567
- readonly internalType: "address";
568
- }];
569
- readonly outputs: readonly [{
570
- readonly name: "";
571
- readonly type: "tuple";
572
- readonly internalType: "struct SwapTotal";
573
- readonly components: readonly [{
574
- readonly name: "inputSum";
575
- readonly type: "uint256";
576
- readonly internalType: "uint256";
577
- }, {
578
- readonly name: "feeSum";
579
- readonly type: "uint256";
580
- readonly internalType: "uint256";
581
- }, {
582
- readonly name: "outputSum";
583
- readonly type: "uint256";
584
- readonly internalType: "uint256";
585
- }, {
586
- readonly name: "count";
587
- readonly type: "uint256";
588
- readonly internalType: "uint256";
589
- }];
590
- }];
591
- readonly stateMutability: "view";
592
- }, {
593
- readonly type: "function";
594
- readonly name: "transfer";
595
- readonly inputs: readonly [{
596
- readonly name: "to";
597
- readonly type: "address";
598
- readonly internalType: "address";
599
- }, {
600
- readonly name: "amount";
601
- readonly type: "uint256";
602
- readonly internalType: "uint256";
603
- }];
604
- readonly outputs: readonly [{
605
- readonly name: "";
606
- readonly type: "bool";
607
- readonly internalType: "bool";
608
- }];
609
- readonly stateMutability: "nonpayable";
610
- }, {
611
- readonly type: "function";
612
- readonly name: "transfer";
613
- readonly inputs: readonly [{
614
- readonly name: "to";
615
- readonly type: "address";
616
- readonly internalType: "address";
617
- }, {
618
- readonly name: "token";
619
- readonly type: "address";
620
- readonly internalType: "address";
621
- }, {
622
- readonly name: "amount";
623
- readonly type: "uint256";
624
- readonly internalType: "uint256";
625
- }];
626
- readonly outputs: readonly [{
627
- readonly name: "";
628
- readonly type: "bool";
629
- readonly internalType: "bool";
630
- }];
631
- readonly stateMutability: "nonpayable";
632
- }, {
633
- readonly type: "function";
634
- readonly name: "transferOwnership";
635
- readonly inputs: readonly [{
636
- readonly name: "newOwner";
637
- readonly type: "address";
638
- readonly internalType: "address";
639
- }];
640
- readonly outputs: readonly [];
641
- readonly stateMutability: "payable";
642
- }, {
643
- readonly type: "event";
644
- readonly name: "BpsUpdated";
645
- readonly inputs: readonly [{
646
- readonly name: "prev";
647
- readonly type: "uint256";
648
- readonly indexed: false;
649
- readonly internalType: "uint256";
650
- }, {
651
- readonly name: "next";
652
- readonly type: "uint256";
653
- readonly indexed: false;
654
- readonly internalType: "uint256";
655
- }];
656
- readonly anonymous: false;
657
- }, {
658
- readonly type: "event";
659
- readonly name: "InputTokenUpdated";
660
- readonly inputs: readonly [{
661
- readonly name: "token";
662
- readonly type: "address";
663
- readonly indexed: true;
664
- readonly internalType: "address";
665
- }, {
666
- readonly name: "prev";
667
- readonly type: "bool";
668
- readonly indexed: false;
669
- readonly internalType: "bool";
670
- }, {
671
- readonly name: "next";
672
- readonly type: "bool";
673
- readonly indexed: false;
674
- readonly internalType: "bool";
675
- }];
676
- readonly anonymous: false;
677
- }, {
678
- readonly type: "event";
679
- readonly name: "OwnershipHandoverCanceled";
680
- readonly inputs: readonly [{
681
- readonly name: "pendingOwner";
682
- readonly type: "address";
683
- readonly indexed: true;
684
- readonly internalType: "address";
685
- }];
686
- readonly anonymous: false;
687
- }, {
688
- readonly type: "event";
689
- readonly name: "OwnershipHandoverRequested";
690
- readonly inputs: readonly [{
691
- readonly name: "pendingOwner";
692
- readonly type: "address";
693
- readonly indexed: true;
694
- readonly internalType: "address";
695
- }];
696
- readonly anonymous: false;
697
- }, {
698
- readonly type: "event";
699
- readonly name: "OwnershipTransferred";
700
- readonly inputs: readonly [{
701
- readonly name: "oldOwner";
702
- readonly type: "address";
703
- readonly indexed: true;
704
- readonly internalType: "address";
705
- }, {
706
- readonly name: "newOwner";
707
- readonly type: "address";
708
- readonly indexed: true;
709
- readonly internalType: "address";
710
- }];
711
- readonly anonymous: false;
712
- }, {
713
- readonly type: "event";
714
- readonly name: "Paused";
715
- readonly inputs: readonly [{
716
- readonly name: "previous";
717
- readonly type: "uint32";
718
- readonly indexed: false;
719
- readonly internalType: "uint32";
720
- }, {
721
- readonly name: "next";
722
- readonly type: "uint32";
723
- readonly indexed: false;
724
- readonly internalType: "uint32";
725
- }];
726
- readonly anonymous: false;
727
- }, {
728
- readonly type: "event";
729
- readonly name: "Stopped";
730
- readonly inputs: readonly [];
731
- readonly anonymous: false;
732
- }, {
733
- readonly type: "event";
734
- readonly name: "Swapped";
735
- readonly inputs: readonly [{
736
- readonly name: "user";
737
- readonly type: "address";
738
- readonly indexed: true;
739
- readonly internalType: "address";
740
- }, {
741
- readonly name: "inputToken";
742
- readonly type: "address";
743
- readonly indexed: true;
744
- readonly internalType: "address";
745
- }, {
746
- readonly name: "outputToken";
747
- readonly type: "address";
748
- readonly indexed: true;
749
- readonly internalType: "address";
750
- }, {
751
- readonly name: "inputAmount";
752
- readonly type: "uint256";
753
- readonly indexed: false;
754
- readonly internalType: "uint256";
755
- }, {
756
- readonly name: "fee";
757
- readonly type: "uint256";
758
- readonly indexed: false;
759
- readonly internalType: "uint256";
760
- }, {
761
- readonly name: "outputAmount";
762
- readonly type: "uint256";
763
- readonly indexed: false;
764
- readonly internalType: "uint256";
765
- }];
766
- readonly anonymous: false;
767
- }, {
768
- readonly type: "event";
769
- readonly name: "Transferred";
770
- readonly inputs: readonly [{
771
- readonly name: "to";
772
- readonly type: "address";
773
- readonly indexed: true;
774
- readonly internalType: "address";
775
- }, {
776
- readonly name: "token";
777
- readonly type: "address";
778
- readonly indexed: true;
779
- readonly internalType: "address";
780
- }, {
781
- readonly name: "amount";
782
- readonly type: "uint256";
783
- readonly indexed: false;
784
- readonly internalType: "uint256";
785
- }];
786
- readonly anonymous: false;
787
- }, {
788
- readonly type: "error";
789
- readonly name: "AlreadyInitialized";
790
- readonly inputs: readonly [];
791
- }, {
792
- readonly type: "error";
793
- readonly name: "InsufficientAmount";
794
- readonly inputs: readonly [];
795
- }, {
796
- readonly type: "error";
797
- readonly name: "InvalidAddress";
798
- readonly inputs: readonly [];
799
- }, {
800
- readonly type: "error";
801
- readonly name: "InvalidAmount";
802
- readonly inputs: readonly [];
803
- }, {
804
- readonly type: "error";
805
- readonly name: "IsPaused";
806
- readonly inputs: readonly [{
807
- readonly name: "level";
808
- readonly type: "uint32";
809
- readonly internalType: "uint32";
810
- }];
811
- }, {
812
- readonly type: "error";
813
- readonly name: "IsStopped";
814
- readonly inputs: readonly [];
815
- }, {
816
- readonly type: "error";
817
- readonly name: "NewOwnerIsZeroAddress";
818
- readonly inputs: readonly [];
819
- }, {
820
- readonly type: "error";
821
- readonly name: "NoHandoverRequest";
822
- readonly inputs: readonly [];
823
- }, {
824
- readonly type: "error";
825
- readonly name: "SwapFailed";
826
- readonly inputs: readonly [{
827
- readonly name: "user";
828
- readonly type: "address";
829
- readonly internalType: "address";
830
- }, {
831
- readonly name: "token";
832
- readonly type: "address";
833
- readonly internalType: "address";
834
- }];
835
- }, {
836
- readonly type: "error";
837
- readonly name: "Unauthorized";
838
- readonly inputs: readonly [];
839
- }];
840
-
841
122
  /**
842
123
  * Price of 1 output token in USD, assuming the input token is a $1 stablecoin.
843
124
  *
@@ -875,52 +156,10 @@ declare const SWAP_LEVEL = 2;
875
156
  */
876
157
  declare function isSwapAvailable(status: SwapStatus): boolean;
877
158
 
878
- /**
879
- * Decodes the confirmed output amount from the `Swapped` event in a swap
880
- * transaction receipt.
881
- *
882
- * Returns `null` when the event is absent or the amount is not a valid uint256
883
- * so callers can fall back to the quote's expected output — the swap already
884
- * confirmed on-chain, so a missing/undecodable event should not fail the flow.
885
- */
886
- declare function decodeSwappedOutputAmount(receipt: TransactionReceipt, outputDecimals: AssetDecimals): BlockchainAmount | null;
887
-
888
- /**
889
- * Who issues the asset a Superstate swap pays out.
890
- *
891
- * A constant rather than a field off the offer: no frontline endpoint carries
892
- * an issuer, and every offer this checkout serves is Superstate's by
893
- * definition — `CheckoutContainer` routes here on `superstate::swap` alone.
894
- */
895
- declare const SUPERSTATE_ISSUER_NAME = "Superstate";
896
- /**
897
- * The coins a Superstate swap can be funded with, in display order, with the
898
- * first preselected.
899
- *
900
- * USDC alone today: it is what the deployed swap contract accepts. The amount
901
- * step renders a single entry as a plain card and two or more as a picker, so
902
- * adding one here is all it takes.
903
- */
904
- declare const SUPERSTATE_SUPPORTED_INPUT_ASSETS: NonEmptyArray<StablecoinSymbol>;
905
- /** Poll interval for refreshing on-chain swap quotes and balances. */
906
- declare const SWAP_POLL_INTERVAL_MS = 15000;
907
- /**
908
- * Notional input used to derive a display price-per-share when the user has
909
- * not yet entered an amount (1 USDC at 6 decimals).
910
- */
911
- declare const DEFAULT_AMOUNT_TO_COMPUTE_PRICE = 1000000n;
912
159
  /** Slippage tolerances offered in the review step, in basis points. */
913
160
  declare const SLIPPAGE_OPTIONS_BPS: Bps[];
914
161
  /** Default slippage tolerance (0.5%). */
915
162
  declare const DEFAULT_SLIPPAGE_BPS: Bps;
916
- /**
917
- * The deployed Superstate swap contract on Ethereum Sepolia, and therefore the
918
- * ERC-20 spender the user approves there.
919
- *
920
- * Exported in its own right for a partner driving `coinlist.superstate.execute`
921
- * at Level 1, where the contract is an explicit parameter.
922
- */
923
- declare const SUPERSTATE_SWAP_CONTRACT_ADDRESS_SEPOLIA: EvmContractAddress;
924
163
  /**
925
164
  * The Superstate swap contract on `chain`, or `null` where none is deployed.
926
165
  *
@@ -965,15 +204,6 @@ declare function formattedPricePerShare(quote: SwapQuote | null, locale: string)
965
204
  */
966
205
  declare function swapSpender(swapContracts: OfferSwapContract[], chain: EthereumChain): EvmContractAddress | null;
967
206
 
968
- /** Basis-point denominator: 10_000 bps = 100%. */
969
- declare const BPS_DENOM: Bps;
970
- /**
971
- * Applies a basis-point fraction to an amount, flooring the result.
972
- * `floor((amount × bps) / BPS_DENOM)`. The result is bounds-checked, so an
973
- * overflow (bps far above BPS_DENOM) or a negative product is rejected.
974
- */
975
- declare function applyBps(amount: Uint256, bps: Bps): Uint256;
976
-
977
207
  /** The viem chain definition the SDK reads and writes this chain through. */
978
208
  declare function viemChain(chain: EthereumChain): Chain;
979
209
  declare function getChainId(chain: EthereumChain): number;
@@ -988,158 +218,6 @@ declare function chainFromId(chainId: string): EthereumChain;
988
218
  declare function getNetworkName(chain: EthereumChain): string;
989
219
  declare function txExplorerUrl(chain: EthereumChain, txHash: Hash): TxExplorerUrl;
990
220
 
991
- /**
992
- * Minimal ERC-20 ABI the SDK writes against (mirrors viem's `erc20Abi`). The
993
- * swap flow uses `approve`; `allowance`/`balanceOf`/`decimals`/`symbol`/`name`
994
- * are included so reads share a single SDK-owned ABI.
995
- */
996
- declare const ERC20_ABI: readonly [{
997
- readonly type: "function";
998
- readonly name: "allowance";
999
- readonly inputs: readonly [{
1000
- readonly name: "owner";
1001
- readonly type: "address";
1002
- }, {
1003
- readonly name: "spender";
1004
- readonly type: "address";
1005
- }];
1006
- readonly outputs: readonly [{
1007
- readonly name: "";
1008
- readonly type: "uint256";
1009
- }];
1010
- readonly stateMutability: "view";
1011
- }, {
1012
- readonly type: "function";
1013
- readonly name: "approve";
1014
- readonly inputs: readonly [{
1015
- readonly name: "spender";
1016
- readonly type: "address";
1017
- }, {
1018
- readonly name: "amount";
1019
- readonly type: "uint256";
1020
- }];
1021
- readonly outputs: readonly [{
1022
- readonly name: "";
1023
- readonly type: "bool";
1024
- }];
1025
- readonly stateMutability: "nonpayable";
1026
- }, {
1027
- readonly type: "function";
1028
- readonly name: "balanceOf";
1029
- readonly inputs: readonly [{
1030
- readonly name: "account";
1031
- readonly type: "address";
1032
- }];
1033
- readonly outputs: readonly [{
1034
- readonly name: "";
1035
- readonly type: "uint256";
1036
- }];
1037
- readonly stateMutability: "view";
1038
- }, {
1039
- readonly type: "function";
1040
- readonly name: "decimals";
1041
- readonly inputs: readonly [];
1042
- readonly outputs: readonly [{
1043
- readonly name: "";
1044
- readonly type: "uint8";
1045
- }];
1046
- readonly stateMutability: "view";
1047
- }, {
1048
- readonly type: "function";
1049
- readonly name: "name";
1050
- readonly inputs: readonly [];
1051
- readonly outputs: readonly [{
1052
- readonly name: "";
1053
- readonly type: "string";
1054
- }];
1055
- readonly stateMutability: "view";
1056
- }, {
1057
- readonly type: "function";
1058
- readonly name: "symbol";
1059
- readonly inputs: readonly [];
1060
- readonly outputs: readonly [{
1061
- readonly name: "";
1062
- readonly type: "string";
1063
- }];
1064
- readonly stateMutability: "view";
1065
- }, {
1066
- readonly type: "function";
1067
- readonly name: "totalSupply";
1068
- readonly inputs: readonly [];
1069
- readonly outputs: readonly [{
1070
- readonly name: "";
1071
- readonly type: "uint256";
1072
- }];
1073
- readonly stateMutability: "view";
1074
- }, {
1075
- readonly type: "function";
1076
- readonly name: "transfer";
1077
- readonly inputs: readonly [{
1078
- readonly name: "recipient";
1079
- readonly type: "address";
1080
- }, {
1081
- readonly name: "amount";
1082
- readonly type: "uint256";
1083
- }];
1084
- readonly outputs: readonly [{
1085
- readonly name: "";
1086
- readonly type: "bool";
1087
- }];
1088
- readonly stateMutability: "nonpayable";
1089
- }, {
1090
- readonly type: "function";
1091
- readonly name: "transferFrom";
1092
- readonly inputs: readonly [{
1093
- readonly name: "sender";
1094
- readonly type: "address";
1095
- }, {
1096
- readonly name: "recipient";
1097
- readonly type: "address";
1098
- }, {
1099
- readonly name: "amount";
1100
- readonly type: "uint256";
1101
- }];
1102
- readonly outputs: readonly [{
1103
- readonly name: "";
1104
- readonly type: "bool";
1105
- }];
1106
- readonly stateMutability: "nonpayable";
1107
- }, {
1108
- readonly type: "event";
1109
- readonly name: "Approval";
1110
- readonly inputs: readonly [{
1111
- readonly name: "owner";
1112
- readonly type: "address";
1113
- readonly indexed: true;
1114
- }, {
1115
- readonly name: "spender";
1116
- readonly type: "address";
1117
- readonly indexed: true;
1118
- }, {
1119
- readonly name: "value";
1120
- readonly type: "uint256";
1121
- readonly indexed: false;
1122
- }];
1123
- readonly anonymous: false;
1124
- }, {
1125
- readonly type: "event";
1126
- readonly name: "Transfer";
1127
- readonly inputs: readonly [{
1128
- readonly name: "from";
1129
- readonly type: "address";
1130
- readonly indexed: true;
1131
- }, {
1132
- readonly name: "to";
1133
- readonly type: "address";
1134
- readonly indexed: true;
1135
- }, {
1136
- readonly name: "value";
1137
- readonly type: "uint256";
1138
- readonly indexed: false;
1139
- }];
1140
- readonly anonymous: false;
1141
- }];
1142
-
1143
221
  declare function shortenAddress(address: EvmWalletAddress): ShortenedWalletAddress;
1144
222
  type FormatAmountOptions = {
1145
223
  maxFractionDigits?: AssetDecimals;
@@ -1294,21 +372,4 @@ declare class MathError extends Error {
1294
372
  constructor(message: string);
1295
373
  }
1296
374
 
1297
- type UserDto = {
1298
- id: string;
1299
- email: string;
1300
- };
1301
-
1302
- type UserId = Newtype<string, 'UserId'>;
1303
- declare const UserId: (value: string) => UserId;
1304
- type UserEmail = Newtype<string, 'UserEmail'>;
1305
- declare const UserEmail: (value: string) => UserEmail;
1306
- type User = {
1307
- id: UserId;
1308
- email: UserEmail;
1309
- };
1310
- declare const User: {
1311
- fromDto: (dto: UserDto) => User;
1312
- };
1313
-
1314
- export { type AmountParseErrorReason, type AmountParseResult, AssetDecimals, AssetSymbol, BPS_DENOM, BlockchainAmount, Bps, DEFAULT_AMOUNT_TO_COMPUTE_PRICE, DEFAULT_ONDO_AMOUNT_TO_COMPUTE_PRICE, DEFAULT_ONDO_SELL_TOKENS_TO_COMPUTE_PRICE, DEFAULT_SLIPPAGE_BPS, DecimalString, ERC20_ABI, Erc20Asset, EthereumChain, EvmContractAddress, EvmWalletAddress, type FormatAmountOptions, FormattedAmountAssetUi, FormattedAmountUi, FormattedPercentUi, HttpError, InvariantError, KnownAssetSymbol, MathError, NA_AMOUNT_ASSET_UI, NonEmptyArray, NotAuthenticatedError, NotImplementedError, ONDO_NOT_TRADABLE_CODE, ONDO_POLL_INTERVAL_MS, ONDO_QUOTE_MAX_TTL_MS, ONDO_SETTLEMENT_ASSET, ONDO_SUPPORTED_INPUT_ASSETS, OfferSwapContract, OndoBuyTransaction, OndoSellTransaction, PaginatedResponse, PaginationParams, SLIPPAGE_OPTIONS_BPS, SUPERSTATE_ISSUER_NAME, SUPERSTATE_SUPPORTED_INPUT_ASSETS, SUPERSTATE_SWAP_ABI, SUPERSTATE_SWAP_CONTRACT_ADDRESS_SEPOLIA, SWAP_LEVEL, SWAP_POLL_INTERVAL_MS, ShortenedWalletAddress, StablecoinSymbol, SwapQuote, SwapStatus, TOKEN_REGISTRY, TxExplorerUrl, USDC, USDC_SYMBOL, USDT, USDT_SYMBOL, Uint256, User, UserEmail, UserId, ValidationError, applyBps, assetAmount, blockchainAmountFromRawOrThrow, chainFromId, computeOndoBuyPrice, computeOndoSellPrice, computePrice, computeSlip, decodeSwappedOutputAmount, fetchAllPages, formatAmount, formatBpsAsPercent, formatCompactAmount, formatRawAmount, formatShareAmount, formattedPricePerShare, formattedUsdPrice, getChainId, getNetworkName, isOndoNotTradableError, isSwapAvailable, ondoQuoteOfferDeadline, parseBlockchainAmount, shortenAddress, superstateSwapContractAddress, swapSpender, txExplorerUrl, usdAmount, viemChain };
375
+ export { type AmountParseErrorReason, type AmountParseResult, AssetDecimals, AssetSymbol, BlockchainAmount, Bps, ClientId, CodeChallenge, CodeVerifier, DEFAULT_SLIPPAGE_BPS, Erc20Asset, EthereumChain, EvmContractAddress, EvmWalletAddress, type FormatAmountOptions, FormattedAmountAssetUi, FormattedAmountUi, FormattedPercentUi, HttpError, type HttpResponse, InvariantError, KnownAssetSymbol, MathError, NA_AMOUNT_ASSET_UI, NotAuthenticatedError, NotImplementedError, OfferSwapContract, OndoBuyTransaction, OndoSellTransaction, type PKCEConfig, type PKCEParams, PKCEState, RedirectUri, RequestId, SLIPPAGE_OPTIONS_BPS, SWAP_LEVEL, ShortenedWalletAddress, StablecoinSymbol, SwapQuote, SwapStatus, TOKEN_REGISTRY, TxExplorerUrl, USDC, USDC_SYMBOL, USDT, USDT_SYMBOL, ValidationError, apiErrorCode, assetAmount, blockchainAmountFromRawOrThrow, chainFromId, computeOndoBuyPrice, computeOndoSellPrice, computePrice, computeSlip, formatAmount, formatBpsAsPercent, formatCompactAmount, formatRawAmount, formatShareAmount, formattedPricePerShare, formattedUsdPrice, generatePKCEParams, getChainId, getNetworkName, isOndoNotTradableError, isSwapAvailable, parseBlockchainAmount, shortenAddress, superstateSwapContractAddress, swapSpender, txExplorerUrl, usdAmount, viemChain };