@coinlist-co/react 0.12.2-rc.bc20f5b → 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.
- package/dist/{chunk-3WW5FLT7.js → chunk-EKLUJZ7T.js} +10 -10
- package/dist/chunk-EKLUJZ7T.js.map +1 -0
- package/dist/{chunk-C6GF7MDF.js → chunk-GIE4UWB3.js} +680 -619
- package/dist/chunk-GIE4UWB3.js.map +1 -0
- package/dist/chunk-MJ6YXZWH.js +22 -0
- package/dist/chunk-MJ6YXZWH.js.map +1 -0
- package/dist/{chunk-IZJ4JSSC.js → chunk-PIOQA6HW.js} +173 -234
- package/dist/chunk-PIOQA6HW.js.map +1 -0
- package/dist/client/index.d.ts +2414 -5239
- package/dist/client/index.js +683 -788
- package/dist/client/index.js.map +1 -1
- package/dist/server/index.d.ts +2 -32
- package/dist/server/index.js +6 -4
- package/dist/server/index.js.map +1 -1
- package/dist/{time-CVZpAkGY.d.cts → time-Bbqlt2x7.d.ts} +1907 -3183
- package/dist/{token-registry-snapshot-BkwA8KmD.d.ts → token-registry-snapshot-DttZXGvY.d.ts} +7 -41
- package/dist/universal/index.d.ts +57 -1044
- package/dist/universal/index.js +16 -42
- package/package.json +18 -14
- package/dist/chunk-3WW5FLT7.js.map +0 -1
- package/dist/chunk-C6GF7MDF.js.map +0 -1
- package/dist/chunk-IZJ4JSSC.js.map +0 -1
- package/dist/client/index.cjs +0 -20460
- package/dist/client/index.cjs.map +0 -1
- package/dist/client/index.d.cts +0 -8195
- package/dist/server/index.cjs +0 -4525
- package/dist/server/index.cjs.map +0 -1
- package/dist/server/index.d.cts +0 -382
- package/dist/time-CVZpAkGY.d.ts +0 -3987
- package/dist/token-registry-snapshot-bR14QehS.d.cts +0 -245
- package/dist/universal/index.cjs +0 -4562
- package/dist/universal/index.cjs.map +0 -1
- package/dist/universal/index.d.cts +0 -1362
|
@@ -1,134 +1,68 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
export { A as AssetIconUrl, B as BroadcastTxParams, C as ConnectWallet, e as EvmSigner, E as EvmWallet, f as ExternalWalletAdapter,
|
|
5
|
-
import {
|
|
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';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* How often the Centrifuge checkout refreshes the vault status. The read is
|
|
20
|
-
* free - it spends no attestation - so this is paced for a gate the user can
|
|
21
|
-
* trust rather than for cost.
|
|
22
|
-
*/
|
|
23
|
-
declare const CENTRIFUGE_POLL_INTERVAL_MS = 15000;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* One chain a vault offer runs on, with everything a screen needs to read and
|
|
27
|
-
* show a position there: the proxy every request and claim goes through, the
|
|
28
|
-
* share token it issues, and the funding token it is paid in.
|
|
29
|
-
*
|
|
30
|
-
* The share token's `symbol` is what every `/v1/centrifuge/vault/*` call is
|
|
31
|
-
* keyed by.
|
|
32
|
-
*/
|
|
33
|
-
type CentrifugeVault = {
|
|
34
|
-
chain: EthereumChain;
|
|
35
|
-
proxy: EvmContractAddress;
|
|
36
|
-
share: TokenMetadata;
|
|
37
|
-
funding: TokenMetadata;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* The vaults an offer runs on, or why a chain could not be resolved: one
|
|
41
|
-
* entry per `vaultContracts` chain, in the offer's order.
|
|
42
|
-
*/
|
|
43
|
-
type CentrifugeVaultResolution = {
|
|
44
|
-
type: 'resolved';
|
|
45
|
-
vault: CentrifugeVault;
|
|
46
|
-
} | {
|
|
47
|
-
type: 'unresolved';
|
|
48
|
-
chain: OfferToken['chain'];
|
|
49
|
-
/** Which token the offer or the registry could not name. */
|
|
50
|
-
missing: 'share-token' | 'funding-token' | 'evm-chain';
|
|
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;
|
|
51
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
|
+
}
|
|
52
31
|
/**
|
|
53
|
-
*
|
|
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.
|
|
54
35
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
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.
|
|
59
40
|
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* not
|
|
63
|
-
* `lookup` knows wins - a vault is priced in one.
|
|
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.
|
|
64
44
|
*/
|
|
65
|
-
declare function
|
|
45
|
+
declare function apiErrorCode(error: unknown): string | null;
|
|
66
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
|
+
};
|
|
67
60
|
/**
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* for cost.
|
|
72
|
-
*
|
|
73
|
-
* A built transaction is deliberately not on this timer. Building spends an
|
|
74
|
-
* attestation, so it happens once per order and once per refresh the user
|
|
75
|
-
* asks for.
|
|
76
|
-
*/
|
|
77
|
-
declare const ONDO_POLL_INTERVAL_MS = 15000;
|
|
78
|
-
/** Max time the review step offers a built quote. */
|
|
79
|
-
declare const ONDO_QUOTE_MAX_TTL_MS = 15000;
|
|
80
|
-
/**
|
|
81
|
-
* The order size the sidebar prices against before the user names one.
|
|
82
|
-
*
|
|
83
|
-
* Ondo prices by size, so some amount has to be sent. $1,000 is a plausible
|
|
84
|
-
* order rather than a token one: a size so small that Ondo's minimum rejects
|
|
85
|
-
* it would leave the panel permanently blank.
|
|
86
|
-
*
|
|
87
|
-
* Named distinctly from `DEFAULT_AMOUNT_TO_COMPUTE_PRICE` in the swap
|
|
88
|
-
* constants, which is a raw `bigint` of USDC base units for a different
|
|
89
|
-
* endpoint. Both barrels are flat, so two constants of the same name could not
|
|
90
|
-
* coexist - and they mean different things anyway.
|
|
91
|
-
*/
|
|
92
|
-
declare const DEFAULT_ONDO_AMOUNT_TO_COMPUTE_PRICE: DecimalString;
|
|
93
|
-
/**
|
|
94
|
-
* The coin an Ondo sell settles into, for display only.
|
|
95
|
-
*
|
|
96
|
-
* The scale of every amount on a built transaction comes off the response, so
|
|
97
|
-
* this names the token and never sizes it - `receive_output_decimals` is the
|
|
98
|
-
* only authority on how many decimals the proceeds are counted in, and the two
|
|
99
|
-
* are allowed to disagree.
|
|
100
|
-
*
|
|
101
|
-
* Named apart from {@link ONDO_SUPPORTED_INPUT_ASSETS} rather than read out of
|
|
102
|
-
* it, though both are USDC today. On a buy USDC is what the user funds with
|
|
103
|
-
* and one of a list that may grow; on a sell it is what they settle into and
|
|
104
|
-
* there is one of it. Reading `ONDO_SUPPORTED_INPUT_ASSETS[0]` here would make
|
|
105
|
-
* the sell screen quietly follow whichever funding coin happened to be listed
|
|
106
|
-
* first.
|
|
107
|
-
*/
|
|
108
|
-
declare const ONDO_SETTLEMENT_ASSET: StablecoinSymbol;
|
|
109
|
-
/**
|
|
110
|
-
* The order size the sidebar prices a sell against before the user names one.
|
|
111
|
-
*
|
|
112
|
-
* Sells are quoted by token amount rather than by notional: the fee comes out
|
|
113
|
-
* of dollars, and Ondo's price is size-aware, so a buy's quantity depends on
|
|
114
|
-
* the quote being asked for while a sell is sized by what the user already
|
|
115
|
-
* holds. One whole share is a size Ondo will price - small enough to be
|
|
116
|
-
* plausible for any asset, large enough that Ondo's minimum does not reject it
|
|
117
|
-
* and leave the panel permanently blank.
|
|
118
|
-
*
|
|
119
|
-
* The buy counterpart is {@link DEFAULT_ONDO_AMOUNT_TO_COMPUTE_PRICE}, which
|
|
120
|
-
* is a dollar figure for the same reason in reverse.
|
|
121
|
-
*/
|
|
122
|
-
declare const DEFAULT_ONDO_SELL_TOKENS_TO_COMPUTE_PRICE = 1;
|
|
123
|
-
/**
|
|
124
|
-
* The coins an Ondo buy can be funded with, in display order, with the first
|
|
125
|
-
* preselected.
|
|
126
|
-
*
|
|
127
|
-
* USDC alone today: it is what the Sepolia integration contract accepts. The
|
|
128
|
-
* amount step renders a single entry as a plain card and two or more as a
|
|
129
|
-
* 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.
|
|
130
64
|
*/
|
|
131
|
-
declare
|
|
65
|
+
declare function generatePKCEParams(config: PKCEConfig): Promise<PKCEParams>;
|
|
132
66
|
|
|
133
67
|
/**
|
|
134
68
|
* The price of one whole asset token in a built Ondo purchase, in the funding
|
|
@@ -175,20 +109,7 @@ declare function computeOndoBuyPrice(transaction: OndoBuyTransaction): Blockchai
|
|
|
175
109
|
* does today. They diverge the day ENG-1718 lands.
|
|
176
110
|
*/
|
|
177
111
|
declare function computeOndoSellPrice(transaction: OndoSellTransaction): BlockchainAmount;
|
|
178
|
-
/** The sooner of Ondo's deadline and now + {@link ONDO_QUOTE_MAX_TTL_MS}. */
|
|
179
|
-
declare function ondoQuoteOfferDeadline(expiresAt: Date, nowMs?: number): Date;
|
|
180
112
|
|
|
181
|
-
/**
|
|
182
|
-
* The CoinList API's error code for an Ondo quote refused because the asset
|
|
183
|
-
* cannot be traded right now: the market is closed or paused, or the asset is
|
|
184
|
-
* paused or closed for the session. It arrives on a 409.
|
|
185
|
-
*
|
|
186
|
-
* One code for all four of Ondo's reasons, because the remedy is the same:
|
|
187
|
-
* wait for the market to open. Ondo pauses for a moment at every US session
|
|
188
|
-
* change (04:00 and 16:00 ET), so a poll can land on one even while
|
|
189
|
-
* `getTradingStatus` reported the asset tradable a second earlier.
|
|
190
|
-
*/
|
|
191
|
-
declare const ONDO_NOT_TRADABLE_CODE = "not_tradable";
|
|
192
113
|
/**
|
|
193
114
|
* Whether `error` is the CoinList API refusing an Ondo quote because the
|
|
194
115
|
* market is not open, as opposed to a request that failed.
|
|
@@ -198,694 +119,6 @@ declare const ONDO_NOT_TRADABLE_CODE = "not_tradable";
|
|
|
198
119
|
*/
|
|
199
120
|
declare function isOndoNotTradableError(error: unknown): error is HttpError;
|
|
200
121
|
|
|
201
|
-
/**
|
|
202
|
-
* The Superstate swap contract's ABI, generated verbatim from the shared
|
|
203
|
-
* `TokenSwap` base contract:
|
|
204
|
-
*
|
|
205
|
-
* ```
|
|
206
|
-
* cd ../solidity && forge inspect TokenSwap abi --json --use 0.8.34
|
|
207
|
-
* ```
|
|
208
|
-
*
|
|
209
|
-
* Generated rather than hand-trimmed to the four methods the SDK calls, so
|
|
210
|
-
* regenerating after a contract change is one command and a paste. The custom
|
|
211
|
-
* errors carry their weight in particular: viem decodes a revert against them,
|
|
212
|
-
* so a `preview()` on a stopped contract surfaces as `IsStopped` rather than
|
|
213
|
-
* as an opaque `0x`-prefixed blob.
|
|
214
|
-
*
|
|
215
|
-
* `status()` returns `Status { uint32 flags; State state }` where `State` is
|
|
216
|
-
* `0 = Active | 1 = Paused | 2 = Stopped`. It replaced the older
|
|
217
|
-
* `stopped() -> uint256` bitmask, which this contract still exposes but as a
|
|
218
|
-
* `bool`; {@link SwapStatus} reads `status()` and nothing else.
|
|
219
|
-
*/
|
|
220
|
-
declare const SUPERSTATE_SWAP_ABI: readonly [{
|
|
221
|
-
readonly type: "function";
|
|
222
|
-
readonly name: "KIND";
|
|
223
|
-
readonly inputs: readonly [];
|
|
224
|
-
readonly outputs: readonly [{
|
|
225
|
-
readonly name: "";
|
|
226
|
-
readonly type: "uint16";
|
|
227
|
-
readonly internalType: "uint16";
|
|
228
|
-
}];
|
|
229
|
-
readonly stateMutability: "view";
|
|
230
|
-
}, {
|
|
231
|
-
readonly type: "function";
|
|
232
|
-
readonly name: "ONE_HUNDRED_P";
|
|
233
|
-
readonly inputs: readonly [];
|
|
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: "SWAP_LEVEL";
|
|
243
|
-
readonly inputs: readonly [];
|
|
244
|
-
readonly outputs: readonly [{
|
|
245
|
-
readonly name: "";
|
|
246
|
-
readonly type: "uint32";
|
|
247
|
-
readonly internalType: "uint32";
|
|
248
|
-
}];
|
|
249
|
-
readonly stateMutability: "view";
|
|
250
|
-
}, {
|
|
251
|
-
readonly type: "function";
|
|
252
|
-
readonly name: "VERSION";
|
|
253
|
-
readonly inputs: readonly [];
|
|
254
|
-
readonly outputs: readonly [{
|
|
255
|
-
readonly name: "";
|
|
256
|
-
readonly type: "uint16";
|
|
257
|
-
readonly internalType: "uint16";
|
|
258
|
-
}];
|
|
259
|
-
readonly stateMutability: "view";
|
|
260
|
-
}, {
|
|
261
|
-
readonly type: "function";
|
|
262
|
-
readonly name: "authorized";
|
|
263
|
-
readonly inputs: readonly [{
|
|
264
|
-
readonly name: "user";
|
|
265
|
-
readonly type: "address";
|
|
266
|
-
readonly internalType: "address";
|
|
267
|
-
}];
|
|
268
|
-
readonly outputs: readonly [{
|
|
269
|
-
readonly name: "";
|
|
270
|
-
readonly type: "bool";
|
|
271
|
-
readonly internalType: "bool";
|
|
272
|
-
}];
|
|
273
|
-
readonly stateMutability: "view";
|
|
274
|
-
}, {
|
|
275
|
-
readonly type: "function";
|
|
276
|
-
readonly name: "bpp";
|
|
277
|
-
readonly inputs: readonly [{
|
|
278
|
-
readonly name: "amount";
|
|
279
|
-
readonly type: "uint256";
|
|
280
|
-
readonly internalType: "uint256";
|
|
281
|
-
}];
|
|
282
|
-
readonly outputs: readonly [{
|
|
283
|
-
readonly name: "";
|
|
284
|
-
readonly type: "uint256";
|
|
285
|
-
readonly internalType: "uint256";
|
|
286
|
-
}];
|
|
287
|
-
readonly stateMutability: "view";
|
|
288
|
-
}, {
|
|
289
|
-
readonly type: "function";
|
|
290
|
-
readonly name: "bps";
|
|
291
|
-
readonly inputs: readonly [];
|
|
292
|
-
readonly outputs: readonly [{
|
|
293
|
-
readonly name: "";
|
|
294
|
-
readonly type: "uint256";
|
|
295
|
-
readonly internalType: "uint256";
|
|
296
|
-
}];
|
|
297
|
-
readonly stateMutability: "view";
|
|
298
|
-
}, {
|
|
299
|
-
readonly type: "function";
|
|
300
|
-
readonly name: "cancelOwnershipHandover";
|
|
301
|
-
readonly inputs: readonly [];
|
|
302
|
-
readonly outputs: readonly [];
|
|
303
|
-
readonly stateMutability: "payable";
|
|
304
|
-
}, {
|
|
305
|
-
readonly type: "function";
|
|
306
|
-
readonly name: "completeOwnershipHandover";
|
|
307
|
-
readonly inputs: readonly [{
|
|
308
|
-
readonly name: "pendingOwner";
|
|
309
|
-
readonly type: "address";
|
|
310
|
-
readonly internalType: "address";
|
|
311
|
-
}];
|
|
312
|
-
readonly outputs: readonly [];
|
|
313
|
-
readonly stateMutability: "payable";
|
|
314
|
-
}, {
|
|
315
|
-
readonly type: "function";
|
|
316
|
-
readonly name: "fee";
|
|
317
|
-
readonly inputs: readonly [{
|
|
318
|
-
readonly name: "amount";
|
|
319
|
-
readonly type: "uint256";
|
|
320
|
-
readonly internalType: "uint256";
|
|
321
|
-
}];
|
|
322
|
-
readonly outputs: readonly [{
|
|
323
|
-
readonly name: "";
|
|
324
|
-
readonly type: "uint256";
|
|
325
|
-
readonly internalType: "uint256";
|
|
326
|
-
}, {
|
|
327
|
-
readonly name: "";
|
|
328
|
-
readonly type: "uint256";
|
|
329
|
-
readonly internalType: "uint256";
|
|
330
|
-
}];
|
|
331
|
-
readonly stateMutability: "view";
|
|
332
|
-
}, {
|
|
333
|
-
readonly type: "function";
|
|
334
|
-
readonly name: "id";
|
|
335
|
-
readonly inputs: readonly [];
|
|
336
|
-
readonly outputs: readonly [{
|
|
337
|
-
readonly name: "";
|
|
338
|
-
readonly type: "bytes32";
|
|
339
|
-
readonly internalType: "bytes32";
|
|
340
|
-
}];
|
|
341
|
-
readonly stateMutability: "view";
|
|
342
|
-
}, {
|
|
343
|
-
readonly type: "function";
|
|
344
|
-
readonly name: "inputTokens";
|
|
345
|
-
readonly inputs: readonly [{
|
|
346
|
-
readonly name: "";
|
|
347
|
-
readonly type: "address";
|
|
348
|
-
readonly internalType: "address";
|
|
349
|
-
}];
|
|
350
|
-
readonly outputs: readonly [{
|
|
351
|
-
readonly name: "";
|
|
352
|
-
readonly type: "bool";
|
|
353
|
-
readonly internalType: "bool";
|
|
354
|
-
}];
|
|
355
|
-
readonly stateMutability: "view";
|
|
356
|
-
}, {
|
|
357
|
-
readonly type: "function";
|
|
358
|
-
readonly name: "outputToken";
|
|
359
|
-
readonly inputs: readonly [];
|
|
360
|
-
readonly outputs: readonly [{
|
|
361
|
-
readonly name: "";
|
|
362
|
-
readonly type: "address";
|
|
363
|
-
readonly internalType: "address";
|
|
364
|
-
}];
|
|
365
|
-
readonly stateMutability: "view";
|
|
366
|
-
}, {
|
|
367
|
-
readonly type: "function";
|
|
368
|
-
readonly name: "outputTokenBalance";
|
|
369
|
-
readonly inputs: readonly [];
|
|
370
|
-
readonly outputs: readonly [{
|
|
371
|
-
readonly name: "";
|
|
372
|
-
readonly type: "uint256";
|
|
373
|
-
readonly internalType: "uint256";
|
|
374
|
-
}];
|
|
375
|
-
readonly stateMutability: "view";
|
|
376
|
-
}, {
|
|
377
|
-
readonly type: "function";
|
|
378
|
-
readonly name: "owner";
|
|
379
|
-
readonly inputs: readonly [];
|
|
380
|
-
readonly outputs: readonly [{
|
|
381
|
-
readonly name: "result";
|
|
382
|
-
readonly type: "address";
|
|
383
|
-
readonly internalType: "address";
|
|
384
|
-
}];
|
|
385
|
-
readonly stateMutability: "view";
|
|
386
|
-
}, {
|
|
387
|
-
readonly type: "function";
|
|
388
|
-
readonly name: "ownershipHandoverExpiresAt";
|
|
389
|
-
readonly inputs: readonly [{
|
|
390
|
-
readonly name: "pendingOwner";
|
|
391
|
-
readonly type: "address";
|
|
392
|
-
readonly internalType: "address";
|
|
393
|
-
}];
|
|
394
|
-
readonly outputs: readonly [{
|
|
395
|
-
readonly name: "result";
|
|
396
|
-
readonly type: "uint256";
|
|
397
|
-
readonly internalType: "uint256";
|
|
398
|
-
}];
|
|
399
|
-
readonly stateMutability: "view";
|
|
400
|
-
}, {
|
|
401
|
-
readonly type: "function";
|
|
402
|
-
readonly name: "pause";
|
|
403
|
-
readonly inputs: readonly [{
|
|
404
|
-
readonly name: "level";
|
|
405
|
-
readonly type: "uint32";
|
|
406
|
-
readonly internalType: "uint32";
|
|
407
|
-
}];
|
|
408
|
-
readonly outputs: readonly [{
|
|
409
|
-
readonly name: "";
|
|
410
|
-
readonly type: "bool";
|
|
411
|
-
readonly internalType: "bool";
|
|
412
|
-
}];
|
|
413
|
-
readonly stateMutability: "nonpayable";
|
|
414
|
-
}, {
|
|
415
|
-
readonly type: "function";
|
|
416
|
-
readonly name: "paused";
|
|
417
|
-
readonly inputs: readonly [];
|
|
418
|
-
readonly outputs: readonly [{
|
|
419
|
-
readonly name: "";
|
|
420
|
-
readonly type: "uint32";
|
|
421
|
-
readonly internalType: "uint32";
|
|
422
|
-
}];
|
|
423
|
-
readonly stateMutability: "view";
|
|
424
|
-
}, {
|
|
425
|
-
readonly type: "function";
|
|
426
|
-
readonly name: "preview";
|
|
427
|
-
readonly inputs: readonly [{
|
|
428
|
-
readonly name: "token";
|
|
429
|
-
readonly type: "address";
|
|
430
|
-
readonly internalType: "address";
|
|
431
|
-
}, {
|
|
432
|
-
readonly name: "amount";
|
|
433
|
-
readonly type: "uint256";
|
|
434
|
-
readonly internalType: "uint256";
|
|
435
|
-
}];
|
|
436
|
-
readonly outputs: readonly [{
|
|
437
|
-
readonly name: "";
|
|
438
|
-
readonly type: "tuple";
|
|
439
|
-
readonly internalType: "struct Preview";
|
|
440
|
-
readonly components: readonly [{
|
|
441
|
-
readonly name: "input";
|
|
442
|
-
readonly type: "uint256";
|
|
443
|
-
readonly internalType: "uint256";
|
|
444
|
-
}, {
|
|
445
|
-
readonly name: "fee";
|
|
446
|
-
readonly type: "uint256";
|
|
447
|
-
readonly internalType: "uint256";
|
|
448
|
-
}, {
|
|
449
|
-
readonly name: "output";
|
|
450
|
-
readonly type: "uint256";
|
|
451
|
-
readonly internalType: "uint256";
|
|
452
|
-
}];
|
|
453
|
-
}];
|
|
454
|
-
readonly stateMutability: "view";
|
|
455
|
-
}, {
|
|
456
|
-
readonly type: "function";
|
|
457
|
-
readonly name: "renounceOwnership";
|
|
458
|
-
readonly inputs: readonly [];
|
|
459
|
-
readonly outputs: readonly [];
|
|
460
|
-
readonly stateMutability: "payable";
|
|
461
|
-
}, {
|
|
462
|
-
readonly type: "function";
|
|
463
|
-
readonly name: "requestOwnershipHandover";
|
|
464
|
-
readonly inputs: readonly [];
|
|
465
|
-
readonly outputs: readonly [];
|
|
466
|
-
readonly stateMutability: "payable";
|
|
467
|
-
}, {
|
|
468
|
-
readonly type: "function";
|
|
469
|
-
readonly name: "setBps";
|
|
470
|
-
readonly inputs: readonly [{
|
|
471
|
-
readonly name: "points";
|
|
472
|
-
readonly type: "uint256";
|
|
473
|
-
readonly internalType: "uint256";
|
|
474
|
-
}];
|
|
475
|
-
readonly outputs: readonly [{
|
|
476
|
-
readonly name: "";
|
|
477
|
-
readonly type: "bool";
|
|
478
|
-
readonly internalType: "bool";
|
|
479
|
-
}];
|
|
480
|
-
readonly stateMutability: "nonpayable";
|
|
481
|
-
}, {
|
|
482
|
-
readonly type: "function";
|
|
483
|
-
readonly name: "setInputToken";
|
|
484
|
-
readonly inputs: readonly [{
|
|
485
|
-
readonly name: "token";
|
|
486
|
-
readonly type: "address";
|
|
487
|
-
readonly internalType: "address";
|
|
488
|
-
}, {
|
|
489
|
-
readonly name: "val";
|
|
490
|
-
readonly type: "bool";
|
|
491
|
-
readonly internalType: "bool";
|
|
492
|
-
}];
|
|
493
|
-
readonly outputs: readonly [{
|
|
494
|
-
readonly name: "";
|
|
495
|
-
readonly type: "bool";
|
|
496
|
-
readonly internalType: "bool";
|
|
497
|
-
}];
|
|
498
|
-
readonly stateMutability: "nonpayable";
|
|
499
|
-
}, {
|
|
500
|
-
readonly type: "function";
|
|
501
|
-
readonly name: "status";
|
|
502
|
-
readonly inputs: readonly [];
|
|
503
|
-
readonly outputs: readonly [{
|
|
504
|
-
readonly name: "";
|
|
505
|
-
readonly type: "tuple";
|
|
506
|
-
readonly internalType: "struct Status";
|
|
507
|
-
readonly components: readonly [{
|
|
508
|
-
readonly name: "flags";
|
|
509
|
-
readonly type: "uint32";
|
|
510
|
-
readonly internalType: "uint32";
|
|
511
|
-
}, {
|
|
512
|
-
readonly name: "state";
|
|
513
|
-
readonly type: "uint8";
|
|
514
|
-
readonly internalType: "enum State";
|
|
515
|
-
}];
|
|
516
|
-
}];
|
|
517
|
-
readonly stateMutability: "view";
|
|
518
|
-
}, {
|
|
519
|
-
readonly type: "function";
|
|
520
|
-
readonly name: "stop";
|
|
521
|
-
readonly inputs: readonly [];
|
|
522
|
-
readonly outputs: readonly [{
|
|
523
|
-
readonly name: "";
|
|
524
|
-
readonly type: "bool";
|
|
525
|
-
readonly internalType: "bool";
|
|
526
|
-
}];
|
|
527
|
-
readonly stateMutability: "nonpayable";
|
|
528
|
-
}, {
|
|
529
|
-
readonly type: "function";
|
|
530
|
-
readonly name: "stopped";
|
|
531
|
-
readonly inputs: readonly [];
|
|
532
|
-
readonly outputs: readonly [{
|
|
533
|
-
readonly name: "";
|
|
534
|
-
readonly type: "bool";
|
|
535
|
-
readonly internalType: "bool";
|
|
536
|
-
}];
|
|
537
|
-
readonly stateMutability: "view";
|
|
538
|
-
}, {
|
|
539
|
-
readonly type: "function";
|
|
540
|
-
readonly name: "swap";
|
|
541
|
-
readonly inputs: readonly [{
|
|
542
|
-
readonly name: "token";
|
|
543
|
-
readonly type: "address";
|
|
544
|
-
readonly internalType: "address";
|
|
545
|
-
}, {
|
|
546
|
-
readonly name: "amount";
|
|
547
|
-
readonly type: "uint256";
|
|
548
|
-
readonly internalType: "uint256";
|
|
549
|
-
}, {
|
|
550
|
-
readonly name: "slip";
|
|
551
|
-
readonly type: "uint256";
|
|
552
|
-
readonly internalType: "uint256";
|
|
553
|
-
}];
|
|
554
|
-
readonly outputs: readonly [{
|
|
555
|
-
readonly name: "";
|
|
556
|
-
readonly type: "uint256";
|
|
557
|
-
readonly internalType: "uint256";
|
|
558
|
-
}];
|
|
559
|
-
readonly stateMutability: "nonpayable";
|
|
560
|
-
}, {
|
|
561
|
-
readonly type: "function";
|
|
562
|
-
readonly name: "tokenBalance";
|
|
563
|
-
readonly inputs: readonly [{
|
|
564
|
-
readonly name: "token";
|
|
565
|
-
readonly type: "address";
|
|
566
|
-
readonly internalType: "address";
|
|
567
|
-
}];
|
|
568
|
-
readonly outputs: readonly [{
|
|
569
|
-
readonly name: "";
|
|
570
|
-
readonly type: "uint256";
|
|
571
|
-
readonly internalType: "uint256";
|
|
572
|
-
}];
|
|
573
|
-
readonly stateMutability: "view";
|
|
574
|
-
}, {
|
|
575
|
-
readonly type: "function";
|
|
576
|
-
readonly name: "totals";
|
|
577
|
-
readonly inputs: readonly [{
|
|
578
|
-
readonly name: "user";
|
|
579
|
-
readonly type: "address";
|
|
580
|
-
readonly internalType: "address";
|
|
581
|
-
}, {
|
|
582
|
-
readonly name: "token";
|
|
583
|
-
readonly type: "address";
|
|
584
|
-
readonly internalType: "address";
|
|
585
|
-
}];
|
|
586
|
-
readonly outputs: readonly [{
|
|
587
|
-
readonly name: "";
|
|
588
|
-
readonly type: "tuple";
|
|
589
|
-
readonly internalType: "struct SwapTotal";
|
|
590
|
-
readonly components: readonly [{
|
|
591
|
-
readonly name: "inputSum";
|
|
592
|
-
readonly type: "uint256";
|
|
593
|
-
readonly internalType: "uint256";
|
|
594
|
-
}, {
|
|
595
|
-
readonly name: "feeSum";
|
|
596
|
-
readonly type: "uint256";
|
|
597
|
-
readonly internalType: "uint256";
|
|
598
|
-
}, {
|
|
599
|
-
readonly name: "outputSum";
|
|
600
|
-
readonly type: "uint256";
|
|
601
|
-
readonly internalType: "uint256";
|
|
602
|
-
}, {
|
|
603
|
-
readonly name: "count";
|
|
604
|
-
readonly type: "uint256";
|
|
605
|
-
readonly internalType: "uint256";
|
|
606
|
-
}];
|
|
607
|
-
}];
|
|
608
|
-
readonly stateMutability: "view";
|
|
609
|
-
}, {
|
|
610
|
-
readonly type: "function";
|
|
611
|
-
readonly name: "totals";
|
|
612
|
-
readonly inputs: readonly [{
|
|
613
|
-
readonly name: "token";
|
|
614
|
-
readonly type: "address";
|
|
615
|
-
readonly internalType: "address";
|
|
616
|
-
}];
|
|
617
|
-
readonly outputs: readonly [{
|
|
618
|
-
readonly name: "";
|
|
619
|
-
readonly type: "tuple";
|
|
620
|
-
readonly internalType: "struct SwapTotal";
|
|
621
|
-
readonly components: readonly [{
|
|
622
|
-
readonly name: "inputSum";
|
|
623
|
-
readonly type: "uint256";
|
|
624
|
-
readonly internalType: "uint256";
|
|
625
|
-
}, {
|
|
626
|
-
readonly name: "feeSum";
|
|
627
|
-
readonly type: "uint256";
|
|
628
|
-
readonly internalType: "uint256";
|
|
629
|
-
}, {
|
|
630
|
-
readonly name: "outputSum";
|
|
631
|
-
readonly type: "uint256";
|
|
632
|
-
readonly internalType: "uint256";
|
|
633
|
-
}, {
|
|
634
|
-
readonly name: "count";
|
|
635
|
-
readonly type: "uint256";
|
|
636
|
-
readonly internalType: "uint256";
|
|
637
|
-
}];
|
|
638
|
-
}];
|
|
639
|
-
readonly stateMutability: "view";
|
|
640
|
-
}, {
|
|
641
|
-
readonly type: "function";
|
|
642
|
-
readonly name: "transfer";
|
|
643
|
-
readonly inputs: readonly [{
|
|
644
|
-
readonly name: "to";
|
|
645
|
-
readonly type: "address";
|
|
646
|
-
readonly internalType: "address";
|
|
647
|
-
}, {
|
|
648
|
-
readonly name: "amount";
|
|
649
|
-
readonly type: "uint256";
|
|
650
|
-
readonly internalType: "uint256";
|
|
651
|
-
}];
|
|
652
|
-
readonly outputs: readonly [{
|
|
653
|
-
readonly name: "";
|
|
654
|
-
readonly type: "bool";
|
|
655
|
-
readonly internalType: "bool";
|
|
656
|
-
}];
|
|
657
|
-
readonly stateMutability: "nonpayable";
|
|
658
|
-
}, {
|
|
659
|
-
readonly type: "function";
|
|
660
|
-
readonly name: "transfer";
|
|
661
|
-
readonly inputs: readonly [{
|
|
662
|
-
readonly name: "to";
|
|
663
|
-
readonly type: "address";
|
|
664
|
-
readonly internalType: "address";
|
|
665
|
-
}, {
|
|
666
|
-
readonly name: "token";
|
|
667
|
-
readonly type: "address";
|
|
668
|
-
readonly internalType: "address";
|
|
669
|
-
}, {
|
|
670
|
-
readonly name: "amount";
|
|
671
|
-
readonly type: "uint256";
|
|
672
|
-
readonly internalType: "uint256";
|
|
673
|
-
}];
|
|
674
|
-
readonly outputs: readonly [{
|
|
675
|
-
readonly name: "";
|
|
676
|
-
readonly type: "bool";
|
|
677
|
-
readonly internalType: "bool";
|
|
678
|
-
}];
|
|
679
|
-
readonly stateMutability: "nonpayable";
|
|
680
|
-
}, {
|
|
681
|
-
readonly type: "function";
|
|
682
|
-
readonly name: "transferOwnership";
|
|
683
|
-
readonly inputs: readonly [{
|
|
684
|
-
readonly name: "newOwner";
|
|
685
|
-
readonly type: "address";
|
|
686
|
-
readonly internalType: "address";
|
|
687
|
-
}];
|
|
688
|
-
readonly outputs: readonly [];
|
|
689
|
-
readonly stateMutability: "payable";
|
|
690
|
-
}, {
|
|
691
|
-
readonly type: "event";
|
|
692
|
-
readonly name: "BpsUpdated";
|
|
693
|
-
readonly inputs: readonly [{
|
|
694
|
-
readonly name: "prev";
|
|
695
|
-
readonly type: "uint256";
|
|
696
|
-
readonly indexed: false;
|
|
697
|
-
readonly internalType: "uint256";
|
|
698
|
-
}, {
|
|
699
|
-
readonly name: "next";
|
|
700
|
-
readonly type: "uint256";
|
|
701
|
-
readonly indexed: false;
|
|
702
|
-
readonly internalType: "uint256";
|
|
703
|
-
}];
|
|
704
|
-
readonly anonymous: false;
|
|
705
|
-
}, {
|
|
706
|
-
readonly type: "event";
|
|
707
|
-
readonly name: "InputTokenUpdated";
|
|
708
|
-
readonly inputs: readonly [{
|
|
709
|
-
readonly name: "token";
|
|
710
|
-
readonly type: "address";
|
|
711
|
-
readonly indexed: true;
|
|
712
|
-
readonly internalType: "address";
|
|
713
|
-
}, {
|
|
714
|
-
readonly name: "prev";
|
|
715
|
-
readonly type: "bool";
|
|
716
|
-
readonly indexed: false;
|
|
717
|
-
readonly internalType: "bool";
|
|
718
|
-
}, {
|
|
719
|
-
readonly name: "next";
|
|
720
|
-
readonly type: "bool";
|
|
721
|
-
readonly indexed: false;
|
|
722
|
-
readonly internalType: "bool";
|
|
723
|
-
}];
|
|
724
|
-
readonly anonymous: false;
|
|
725
|
-
}, {
|
|
726
|
-
readonly type: "event";
|
|
727
|
-
readonly name: "OwnershipHandoverCanceled";
|
|
728
|
-
readonly inputs: readonly [{
|
|
729
|
-
readonly name: "pendingOwner";
|
|
730
|
-
readonly type: "address";
|
|
731
|
-
readonly indexed: true;
|
|
732
|
-
readonly internalType: "address";
|
|
733
|
-
}];
|
|
734
|
-
readonly anonymous: false;
|
|
735
|
-
}, {
|
|
736
|
-
readonly type: "event";
|
|
737
|
-
readonly name: "OwnershipHandoverRequested";
|
|
738
|
-
readonly inputs: readonly [{
|
|
739
|
-
readonly name: "pendingOwner";
|
|
740
|
-
readonly type: "address";
|
|
741
|
-
readonly indexed: true;
|
|
742
|
-
readonly internalType: "address";
|
|
743
|
-
}];
|
|
744
|
-
readonly anonymous: false;
|
|
745
|
-
}, {
|
|
746
|
-
readonly type: "event";
|
|
747
|
-
readonly name: "OwnershipTransferred";
|
|
748
|
-
readonly inputs: readonly [{
|
|
749
|
-
readonly name: "oldOwner";
|
|
750
|
-
readonly type: "address";
|
|
751
|
-
readonly indexed: true;
|
|
752
|
-
readonly internalType: "address";
|
|
753
|
-
}, {
|
|
754
|
-
readonly name: "newOwner";
|
|
755
|
-
readonly type: "address";
|
|
756
|
-
readonly indexed: true;
|
|
757
|
-
readonly internalType: "address";
|
|
758
|
-
}];
|
|
759
|
-
readonly anonymous: false;
|
|
760
|
-
}, {
|
|
761
|
-
readonly type: "event";
|
|
762
|
-
readonly name: "Paused";
|
|
763
|
-
readonly inputs: readonly [{
|
|
764
|
-
readonly name: "previous";
|
|
765
|
-
readonly type: "uint32";
|
|
766
|
-
readonly indexed: false;
|
|
767
|
-
readonly internalType: "uint32";
|
|
768
|
-
}, {
|
|
769
|
-
readonly name: "next";
|
|
770
|
-
readonly type: "uint32";
|
|
771
|
-
readonly indexed: false;
|
|
772
|
-
readonly internalType: "uint32";
|
|
773
|
-
}];
|
|
774
|
-
readonly anonymous: false;
|
|
775
|
-
}, {
|
|
776
|
-
readonly type: "event";
|
|
777
|
-
readonly name: "Stopped";
|
|
778
|
-
readonly inputs: readonly [];
|
|
779
|
-
readonly anonymous: false;
|
|
780
|
-
}, {
|
|
781
|
-
readonly type: "event";
|
|
782
|
-
readonly name: "Swapped";
|
|
783
|
-
readonly inputs: readonly [{
|
|
784
|
-
readonly name: "user";
|
|
785
|
-
readonly type: "address";
|
|
786
|
-
readonly indexed: true;
|
|
787
|
-
readonly internalType: "address";
|
|
788
|
-
}, {
|
|
789
|
-
readonly name: "inputToken";
|
|
790
|
-
readonly type: "address";
|
|
791
|
-
readonly indexed: true;
|
|
792
|
-
readonly internalType: "address";
|
|
793
|
-
}, {
|
|
794
|
-
readonly name: "outputToken";
|
|
795
|
-
readonly type: "address";
|
|
796
|
-
readonly indexed: true;
|
|
797
|
-
readonly internalType: "address";
|
|
798
|
-
}, {
|
|
799
|
-
readonly name: "inputAmount";
|
|
800
|
-
readonly type: "uint256";
|
|
801
|
-
readonly indexed: false;
|
|
802
|
-
readonly internalType: "uint256";
|
|
803
|
-
}, {
|
|
804
|
-
readonly name: "fee";
|
|
805
|
-
readonly type: "uint256";
|
|
806
|
-
readonly indexed: false;
|
|
807
|
-
readonly internalType: "uint256";
|
|
808
|
-
}, {
|
|
809
|
-
readonly name: "outputAmount";
|
|
810
|
-
readonly type: "uint256";
|
|
811
|
-
readonly indexed: false;
|
|
812
|
-
readonly internalType: "uint256";
|
|
813
|
-
}];
|
|
814
|
-
readonly anonymous: false;
|
|
815
|
-
}, {
|
|
816
|
-
readonly type: "event";
|
|
817
|
-
readonly name: "Transferred";
|
|
818
|
-
readonly inputs: readonly [{
|
|
819
|
-
readonly name: "to";
|
|
820
|
-
readonly type: "address";
|
|
821
|
-
readonly indexed: true;
|
|
822
|
-
readonly internalType: "address";
|
|
823
|
-
}, {
|
|
824
|
-
readonly name: "token";
|
|
825
|
-
readonly type: "address";
|
|
826
|
-
readonly indexed: true;
|
|
827
|
-
readonly internalType: "address";
|
|
828
|
-
}, {
|
|
829
|
-
readonly name: "amount";
|
|
830
|
-
readonly type: "uint256";
|
|
831
|
-
readonly indexed: false;
|
|
832
|
-
readonly internalType: "uint256";
|
|
833
|
-
}];
|
|
834
|
-
readonly anonymous: false;
|
|
835
|
-
}, {
|
|
836
|
-
readonly type: "error";
|
|
837
|
-
readonly name: "AlreadyInitialized";
|
|
838
|
-
readonly inputs: readonly [];
|
|
839
|
-
}, {
|
|
840
|
-
readonly type: "error";
|
|
841
|
-
readonly name: "InsufficientAmount";
|
|
842
|
-
readonly inputs: readonly [];
|
|
843
|
-
}, {
|
|
844
|
-
readonly type: "error";
|
|
845
|
-
readonly name: "InvalidAddress";
|
|
846
|
-
readonly inputs: readonly [];
|
|
847
|
-
}, {
|
|
848
|
-
readonly type: "error";
|
|
849
|
-
readonly name: "InvalidAmount";
|
|
850
|
-
readonly inputs: readonly [];
|
|
851
|
-
}, {
|
|
852
|
-
readonly type: "error";
|
|
853
|
-
readonly name: "IsPaused";
|
|
854
|
-
readonly inputs: readonly [{
|
|
855
|
-
readonly name: "level";
|
|
856
|
-
readonly type: "uint32";
|
|
857
|
-
readonly internalType: "uint32";
|
|
858
|
-
}];
|
|
859
|
-
}, {
|
|
860
|
-
readonly type: "error";
|
|
861
|
-
readonly name: "IsStopped";
|
|
862
|
-
readonly inputs: readonly [];
|
|
863
|
-
}, {
|
|
864
|
-
readonly type: "error";
|
|
865
|
-
readonly name: "NewOwnerIsZeroAddress";
|
|
866
|
-
readonly inputs: readonly [];
|
|
867
|
-
}, {
|
|
868
|
-
readonly type: "error";
|
|
869
|
-
readonly name: "NoHandoverRequest";
|
|
870
|
-
readonly inputs: readonly [];
|
|
871
|
-
}, {
|
|
872
|
-
readonly type: "error";
|
|
873
|
-
readonly name: "SwapFailed";
|
|
874
|
-
readonly inputs: readonly [{
|
|
875
|
-
readonly name: "user";
|
|
876
|
-
readonly type: "address";
|
|
877
|
-
readonly internalType: "address";
|
|
878
|
-
}, {
|
|
879
|
-
readonly name: "token";
|
|
880
|
-
readonly type: "address";
|
|
881
|
-
readonly internalType: "address";
|
|
882
|
-
}];
|
|
883
|
-
}, {
|
|
884
|
-
readonly type: "error";
|
|
885
|
-
readonly name: "Unauthorized";
|
|
886
|
-
readonly inputs: readonly [];
|
|
887
|
-
}];
|
|
888
|
-
|
|
889
122
|
/**
|
|
890
123
|
* Price of 1 output token in USD, assuming the input token is a $1 stablecoin.
|
|
891
124
|
*
|
|
@@ -923,52 +156,10 @@ declare const SWAP_LEVEL = 2;
|
|
|
923
156
|
*/
|
|
924
157
|
declare function isSwapAvailable(status: SwapStatus): boolean;
|
|
925
158
|
|
|
926
|
-
/**
|
|
927
|
-
* Decodes the confirmed output amount from the `Swapped` event in a swap
|
|
928
|
-
* transaction receipt.
|
|
929
|
-
*
|
|
930
|
-
* Returns `null` when the event is absent or the amount is not a valid uint256
|
|
931
|
-
* so callers can fall back to the quote's expected output — the swap already
|
|
932
|
-
* confirmed on-chain, so a missing/undecodable event should not fail the flow.
|
|
933
|
-
*/
|
|
934
|
-
declare function decodeSwappedOutputAmount(receipt: TransactionReceipt, outputDecimals: AssetDecimals): BlockchainAmount | null;
|
|
935
|
-
|
|
936
|
-
/**
|
|
937
|
-
* Who issues the asset a Superstate swap pays out.
|
|
938
|
-
*
|
|
939
|
-
* A constant rather than a field off the offer: no frontline endpoint carries
|
|
940
|
-
* an issuer, and every offer this checkout serves is Superstate's by
|
|
941
|
-
* definition — `CheckoutContainer` routes here on `superstate::swap` alone.
|
|
942
|
-
*/
|
|
943
|
-
declare const SUPERSTATE_ISSUER_NAME = "Superstate";
|
|
944
|
-
/**
|
|
945
|
-
* The coins a Superstate swap can be funded with, in display order, with the
|
|
946
|
-
* first preselected.
|
|
947
|
-
*
|
|
948
|
-
* USDC alone today: it is what the deployed swap contract accepts. The amount
|
|
949
|
-
* step renders a single entry as a plain card and two or more as a picker, so
|
|
950
|
-
* adding one here is all it takes.
|
|
951
|
-
*/
|
|
952
|
-
declare const SUPERSTATE_SUPPORTED_INPUT_ASSETS: NonEmptyArray<StablecoinSymbol>;
|
|
953
|
-
/** Poll interval for refreshing on-chain swap quotes and balances. */
|
|
954
|
-
declare const SWAP_POLL_INTERVAL_MS = 15000;
|
|
955
|
-
/**
|
|
956
|
-
* Notional input used to derive a display price-per-share when the user has
|
|
957
|
-
* not yet entered an amount (1 USDC at 6 decimals).
|
|
958
|
-
*/
|
|
959
|
-
declare const DEFAULT_AMOUNT_TO_COMPUTE_PRICE = 1000000n;
|
|
960
159
|
/** Slippage tolerances offered in the review step, in basis points. */
|
|
961
160
|
declare const SLIPPAGE_OPTIONS_BPS: Bps[];
|
|
962
161
|
/** Default slippage tolerance (0.5%). */
|
|
963
162
|
declare const DEFAULT_SLIPPAGE_BPS: Bps;
|
|
964
|
-
/**
|
|
965
|
-
* The deployed Superstate swap contract on Ethereum Sepolia, and therefore the
|
|
966
|
-
* ERC-20 spender the user approves there.
|
|
967
|
-
*
|
|
968
|
-
* Exported in its own right for a partner driving `coinlist.superstate.execute`
|
|
969
|
-
* at Level 1, where the contract is an explicit parameter.
|
|
970
|
-
*/
|
|
971
|
-
declare const SUPERSTATE_SWAP_CONTRACT_ADDRESS_SEPOLIA: EvmContractAddress;
|
|
972
163
|
/**
|
|
973
164
|
* The Superstate swap contract on `chain`, or `null` where none is deployed.
|
|
974
165
|
*
|
|
@@ -1013,15 +204,6 @@ declare function formattedPricePerShare(quote: SwapQuote | null, locale: string)
|
|
|
1013
204
|
*/
|
|
1014
205
|
declare function swapSpender(swapContracts: OfferSwapContract[], chain: EthereumChain): EvmContractAddress | null;
|
|
1015
206
|
|
|
1016
|
-
/** Basis-point denominator: 10_000 bps = 100%. */
|
|
1017
|
-
declare const BPS_DENOM: Bps;
|
|
1018
|
-
/**
|
|
1019
|
-
* Applies a basis-point fraction to an amount, flooring the result.
|
|
1020
|
-
* `floor((amount × bps) / BPS_DENOM)`. The result is bounds-checked, so an
|
|
1021
|
-
* overflow (bps far above BPS_DENOM) or a negative product is rejected.
|
|
1022
|
-
*/
|
|
1023
|
-
declare function applyBps(amount: Uint256, bps: Bps): Uint256;
|
|
1024
|
-
|
|
1025
207
|
/** The viem chain definition the SDK reads and writes this chain through. */
|
|
1026
208
|
declare function viemChain(chain: EthereumChain): Chain;
|
|
1027
209
|
declare function getChainId(chain: EthereumChain): number;
|
|
@@ -1036,158 +218,6 @@ declare function chainFromId(chainId: string): EthereumChain;
|
|
|
1036
218
|
declare function getNetworkName(chain: EthereumChain): string;
|
|
1037
219
|
declare function txExplorerUrl(chain: EthereumChain, txHash: Hash): TxExplorerUrl;
|
|
1038
220
|
|
|
1039
|
-
/**
|
|
1040
|
-
* Minimal ERC-20 ABI the SDK writes against (mirrors viem's `erc20Abi`). The
|
|
1041
|
-
* swap flow uses `approve`; `allowance`/`balanceOf`/`decimals`/`symbol`/`name`
|
|
1042
|
-
* are included so reads share a single SDK-owned ABI.
|
|
1043
|
-
*/
|
|
1044
|
-
declare const ERC20_ABI: readonly [{
|
|
1045
|
-
readonly type: "function";
|
|
1046
|
-
readonly name: "allowance";
|
|
1047
|
-
readonly inputs: readonly [{
|
|
1048
|
-
readonly name: "owner";
|
|
1049
|
-
readonly type: "address";
|
|
1050
|
-
}, {
|
|
1051
|
-
readonly name: "spender";
|
|
1052
|
-
readonly type: "address";
|
|
1053
|
-
}];
|
|
1054
|
-
readonly outputs: readonly [{
|
|
1055
|
-
readonly name: "";
|
|
1056
|
-
readonly type: "uint256";
|
|
1057
|
-
}];
|
|
1058
|
-
readonly stateMutability: "view";
|
|
1059
|
-
}, {
|
|
1060
|
-
readonly type: "function";
|
|
1061
|
-
readonly name: "approve";
|
|
1062
|
-
readonly inputs: readonly [{
|
|
1063
|
-
readonly name: "spender";
|
|
1064
|
-
readonly type: "address";
|
|
1065
|
-
}, {
|
|
1066
|
-
readonly name: "amount";
|
|
1067
|
-
readonly type: "uint256";
|
|
1068
|
-
}];
|
|
1069
|
-
readonly outputs: readonly [{
|
|
1070
|
-
readonly name: "";
|
|
1071
|
-
readonly type: "bool";
|
|
1072
|
-
}];
|
|
1073
|
-
readonly stateMutability: "nonpayable";
|
|
1074
|
-
}, {
|
|
1075
|
-
readonly type: "function";
|
|
1076
|
-
readonly name: "balanceOf";
|
|
1077
|
-
readonly inputs: readonly [{
|
|
1078
|
-
readonly name: "account";
|
|
1079
|
-
readonly type: "address";
|
|
1080
|
-
}];
|
|
1081
|
-
readonly outputs: readonly [{
|
|
1082
|
-
readonly name: "";
|
|
1083
|
-
readonly type: "uint256";
|
|
1084
|
-
}];
|
|
1085
|
-
readonly stateMutability: "view";
|
|
1086
|
-
}, {
|
|
1087
|
-
readonly type: "function";
|
|
1088
|
-
readonly name: "decimals";
|
|
1089
|
-
readonly inputs: readonly [];
|
|
1090
|
-
readonly outputs: readonly [{
|
|
1091
|
-
readonly name: "";
|
|
1092
|
-
readonly type: "uint8";
|
|
1093
|
-
}];
|
|
1094
|
-
readonly stateMutability: "view";
|
|
1095
|
-
}, {
|
|
1096
|
-
readonly type: "function";
|
|
1097
|
-
readonly name: "name";
|
|
1098
|
-
readonly inputs: readonly [];
|
|
1099
|
-
readonly outputs: readonly [{
|
|
1100
|
-
readonly name: "";
|
|
1101
|
-
readonly type: "string";
|
|
1102
|
-
}];
|
|
1103
|
-
readonly stateMutability: "view";
|
|
1104
|
-
}, {
|
|
1105
|
-
readonly type: "function";
|
|
1106
|
-
readonly name: "symbol";
|
|
1107
|
-
readonly inputs: readonly [];
|
|
1108
|
-
readonly outputs: readonly [{
|
|
1109
|
-
readonly name: "";
|
|
1110
|
-
readonly type: "string";
|
|
1111
|
-
}];
|
|
1112
|
-
readonly stateMutability: "view";
|
|
1113
|
-
}, {
|
|
1114
|
-
readonly type: "function";
|
|
1115
|
-
readonly name: "totalSupply";
|
|
1116
|
-
readonly inputs: readonly [];
|
|
1117
|
-
readonly outputs: readonly [{
|
|
1118
|
-
readonly name: "";
|
|
1119
|
-
readonly type: "uint256";
|
|
1120
|
-
}];
|
|
1121
|
-
readonly stateMutability: "view";
|
|
1122
|
-
}, {
|
|
1123
|
-
readonly type: "function";
|
|
1124
|
-
readonly name: "transfer";
|
|
1125
|
-
readonly inputs: readonly [{
|
|
1126
|
-
readonly name: "recipient";
|
|
1127
|
-
readonly type: "address";
|
|
1128
|
-
}, {
|
|
1129
|
-
readonly name: "amount";
|
|
1130
|
-
readonly type: "uint256";
|
|
1131
|
-
}];
|
|
1132
|
-
readonly outputs: readonly [{
|
|
1133
|
-
readonly name: "";
|
|
1134
|
-
readonly type: "bool";
|
|
1135
|
-
}];
|
|
1136
|
-
readonly stateMutability: "nonpayable";
|
|
1137
|
-
}, {
|
|
1138
|
-
readonly type: "function";
|
|
1139
|
-
readonly name: "transferFrom";
|
|
1140
|
-
readonly inputs: readonly [{
|
|
1141
|
-
readonly name: "sender";
|
|
1142
|
-
readonly type: "address";
|
|
1143
|
-
}, {
|
|
1144
|
-
readonly name: "recipient";
|
|
1145
|
-
readonly type: "address";
|
|
1146
|
-
}, {
|
|
1147
|
-
readonly name: "amount";
|
|
1148
|
-
readonly type: "uint256";
|
|
1149
|
-
}];
|
|
1150
|
-
readonly outputs: readonly [{
|
|
1151
|
-
readonly name: "";
|
|
1152
|
-
readonly type: "bool";
|
|
1153
|
-
}];
|
|
1154
|
-
readonly stateMutability: "nonpayable";
|
|
1155
|
-
}, {
|
|
1156
|
-
readonly type: "event";
|
|
1157
|
-
readonly name: "Approval";
|
|
1158
|
-
readonly inputs: readonly [{
|
|
1159
|
-
readonly name: "owner";
|
|
1160
|
-
readonly type: "address";
|
|
1161
|
-
readonly indexed: true;
|
|
1162
|
-
}, {
|
|
1163
|
-
readonly name: "spender";
|
|
1164
|
-
readonly type: "address";
|
|
1165
|
-
readonly indexed: true;
|
|
1166
|
-
}, {
|
|
1167
|
-
readonly name: "value";
|
|
1168
|
-
readonly type: "uint256";
|
|
1169
|
-
readonly indexed: false;
|
|
1170
|
-
}];
|
|
1171
|
-
readonly anonymous: false;
|
|
1172
|
-
}, {
|
|
1173
|
-
readonly type: "event";
|
|
1174
|
-
readonly name: "Transfer";
|
|
1175
|
-
readonly inputs: readonly [{
|
|
1176
|
-
readonly name: "from";
|
|
1177
|
-
readonly type: "address";
|
|
1178
|
-
readonly indexed: true;
|
|
1179
|
-
}, {
|
|
1180
|
-
readonly name: "to";
|
|
1181
|
-
readonly type: "address";
|
|
1182
|
-
readonly indexed: true;
|
|
1183
|
-
}, {
|
|
1184
|
-
readonly name: "value";
|
|
1185
|
-
readonly type: "uint256";
|
|
1186
|
-
readonly indexed: false;
|
|
1187
|
-
}];
|
|
1188
|
-
readonly anonymous: false;
|
|
1189
|
-
}];
|
|
1190
|
-
|
|
1191
221
|
declare function shortenAddress(address: EvmWalletAddress): ShortenedWalletAddress;
|
|
1192
222
|
type FormatAmountOptions = {
|
|
1193
223
|
maxFractionDigits?: AssetDecimals;
|
|
@@ -1342,21 +372,4 @@ declare class MathError extends Error {
|
|
|
1342
372
|
constructor(message: string);
|
|
1343
373
|
}
|
|
1344
374
|
|
|
1345
|
-
type
|
|
1346
|
-
id: string;
|
|
1347
|
-
email: string;
|
|
1348
|
-
};
|
|
1349
|
-
|
|
1350
|
-
type UserId = Newtype<string, 'UserId'>;
|
|
1351
|
-
declare const UserId: (value: string) => UserId;
|
|
1352
|
-
type UserEmail = Newtype<string, 'UserEmail'>;
|
|
1353
|
-
declare const UserEmail: (value: string) => UserEmail;
|
|
1354
|
-
type User = {
|
|
1355
|
-
id: UserId;
|
|
1356
|
-
email: UserEmail;
|
|
1357
|
-
};
|
|
1358
|
-
declare const User: {
|
|
1359
|
-
fromDto: (dto: UserDto) => User;
|
|
1360
|
-
};
|
|
1361
|
-
|
|
1362
|
-
export { type AmountParseErrorReason, type AmountParseResult, AssetDecimals, AssetSymbol, BPS_DENOM, BlockchainAmount, Bps, CENTRIFUGE_POLL_INTERVAL_MS, type CentrifugeVault, CentrifugeVaultOfferDetail, type CentrifugeVaultResolution, 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, OfferToken, 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, TokenMetadata, 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, resolveCentrifugeVaults, 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 };
|