@coinlist-co/react 0.12.0 → 0.12.1-rc.0fa5c3b
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-ZFBEI3BW.js → chunk-3EOK47CQ.js} +20 -330
- package/dist/chunk-3EOK47CQ.js.map +1 -0
- package/dist/{chunk-F6WGUKZC.js → chunk-I5EHOV7V.js} +129 -3
- package/dist/chunk-I5EHOV7V.js.map +1 -0
- package/dist/{chunk-6CQHDASY.js → chunk-VSYGGTI6.js} +1173 -156
- package/dist/chunk-VSYGGTI6.js.map +1 -0
- package/dist/client/index.cjs +8559 -7690
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +116 -48
- package/dist/client/index.d.ts +116 -48
- package/dist/client/index.js +4059 -4007
- package/dist/client/index.js.map +1 -1
- package/dist/{collections-DOm9VKVm.d.cts → collections-C6b-rJpx.d.ts} +1 -1
- package/dist/{collections-aCv-Wr2a.d.ts → collections-UYVlXbEh.d.cts} +1 -1
- package/dist/server/index.cjs +1291 -166
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +5 -3
- package/dist/server/index.js.map +1 -1
- package/dist/{config-DIaFzrMW.d.cts → tokens-namespace-C-BxcYMj.d.cts} +362 -188
- package/dist/{config-DIaFzrMW.d.ts → tokens-namespace-C-BxcYMj.d.ts} +362 -188
- package/dist/universal/index.cjs +1103 -405
- package/dist/universal/index.cjs.map +1 -1
- package/dist/universal/index.d.cts +427 -45
- package/dist/universal/index.d.ts +427 -45
- package/dist/universal/index.js +16 -14
- package/package.json +1 -1
- package/dist/chunk-6CQHDASY.js.map +0 -1
- package/dist/chunk-F6WGUKZC.js.map +0 -1
- package/dist/chunk-ZFBEI3BW.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { N as NonEmptyArray, S as SwapQuote, F as FormattedAmountAssetUi, T as TxExplorerUrl, d as FormattedAmountUi, b as FormattedPercentUi, a as ShortenedWalletAddress } from '../collections-
|
|
4
|
-
export { A as AssetIconUrl, B as BroadcastTxParams, C as ConnectWallet, c as EvmSigner, E as EvmWallet, P as PKCEConfig, e as PKCEParams, W as WriteContractParams, g as generatePKCEParams } from '../collections-
|
|
5
|
-
import { TransactionReceipt, Hash } from 'viem';
|
|
1
|
+
import { ar as PaginationParams, as as PaginatedResponse, at as DecimalString, x as StablecoinSymbol, j as OndoBuyTransaction, B as BlockchainAmount, k as OndoSellTransaction, p as Bps, au as SwapStatus, Z as AssetDecimals, b as EvmContractAddress, a as EthereumChain, i as OfferSwapContract, av as Uint256, h as AssetSymbol, q as EvmWalletAddress, aw as KnownAssetSymbol, y as Erc20Asset, ax as Newtype } from '../tokens-namespace-C-BxcYMj.cjs';
|
|
2
|
+
export { ay as AllowWalletParams, az as AllowWalletResponse, aA as Asset, aB as AssetCode, e as AssetId, A as AuthorizationCode, aC as Blockchain, _ as BuildOndoBuyParams, $ as BuildOndoSellParams, aD as BuildOndoSwapParamsCore, aE as Chain, ao as ClientCredentialsOAuth, aF as ClientId, ap as ClientSecret, aG as CodeChallenge, C as CodeVerifier, c as CoinListTokenSaleNamespace, f as CoinListTokenSaleNamespaceImpl, u as Config, aH as ConnectExternalWalletParams, aI as CreateKycTokenParams, aJ as CreateParticipationParams, aK as CreateWalletOwnershipChallengeParams, aL as Cursor, a5 as DebugEvent, aM as DocumentFormType, Q as DocumentSubmission, aN as DocumentSubmissionStatus, aO as DocumentType, aP as ETHEREUM_CHAINS, E as Erc20Namespace, aQ as Erc20NamespaceImpl, aR as FaqItem, a6 as FrontlineEventId, aS as GetOndoQuoteParams, aT as GetOndoTradingStatusParams, aU as GetSwapAuthorizationParams, aV as GetSwapPreviewParams, aW as GetTokenAllowanceParams, aX as GetTokenBalanceParams, aY as HexEncodedTransactionData, a7 as HttpError, a8 as HttpResponse, aZ as Isin, a_ as Iso2CountryCode, N as KycLevelName, a9 as KycToken, a$ as Link, b0 as ListOptionAddressesParams, aa as LogBinding, ab as LogBindings, ac as LogCause, ad as LogLevel, ae as LogScope, af as LogValue, L as Logger, b1 as MAX_ASSET_DECIMALS, b2 as MAX_UINT_256, b3 as Milestone, v as OAuthAccessToken, b4 as OAuthRefreshToken, an as OAuthSession, G as Offer, z as OfferDetail, O as OfferId, b5 as OfferOption, K as OfferOptionAddress, a3 as OfferOptionAddressId, d as OfferOptionId, b6 as OfferOptionSlug, b7 as OfferSlug, b8 as OfferToken, F as OfferType, w as OffersNamespace, b9 as OffersNamespaceImpl, g as OndoNamespace, n as OndoNamespaceImpl, a0 as OndoQuote, ba as OndoQuoteDuration, a1 as OndoQuoteSize, bb as OndoSellOutcome, l as OndoSwapTransactionCore, Y as OndoTradingStatus, m as OrderBookSide, bc as PKCEState, bd as PaginatedResponseDto, P as Participation, be as ParticipationId, bf as ParticipationStatus, bg as ParticipationsPaginationParams, bh as PauseFlags, bi as Pii, bj as PiiAddress, bk as PiiJurisdiction, bl as PiiKind, X as PinoLoggerOptions, ag as ProductionLogLevel, bm as QueryParamValue, bn as QueryParamValues, ah as RedactedWalletError, bo as RedirectUri, bp as RemoveOptionAddressParams, ai as RequestId, s as Requirement, bq as RequirementActionNeededReason, M as RequirementId, H as RequirementStatusInfo, J as RequirementStatusValue, I as RequirementType, R as RequirementsNamespace, t as RequirementsNamespaceImpl, br as RpcConfig, aj as RpcFailureReason, bs as SOLANA_CHAINS, bt as STABLE_DECIMALS, ak as SafeEvent, al as SafeFields, bu as SolanaChain, bv as SubmitDocumentParams, S as SuperstateSwapNamespace, r as SuperstateSwapNamespaceImpl, bw as SwapContractRef, bx as SwapPreview, by as TermItem, bz as Ticker, a2 as TokenIdentifier, a4 as TokenLogo, bA as TokenLogoImage, bB as TokenLogoUrl, D as TokenMetadata, bC as TokenRole, T as TokensNamespace, bD as TokensNamespaceImpl, bE as Tx, am as UnredactedFields, bF as WalletAddress, V as WalletChallengeType, W as WalletError, bG as WalletOwnershipChallenge, bH as WalletProtocol, o as WalletsNamespace, bI as WalletsNamespaceImpl, bJ as apiErrorCode, bK as assertUint256, bL as isChain, bM as parseUint256 } from '../tokens-namespace-C-BxcYMj.cjs';
|
|
3
|
+
import { N as NonEmptyArray, S as SwapQuote, F as FormattedAmountAssetUi, T as TxExplorerUrl, d as FormattedAmountUi, b as FormattedPercentUi, a as ShortenedWalletAddress } from '../collections-UYVlXbEh.cjs';
|
|
4
|
+
export { A as AssetIconUrl, B as BroadcastTxParams, C as ConnectWallet, c as EvmSigner, E as EvmWallet, P as PKCEConfig, e as PKCEParams, W as WriteContractParams, g as generatePKCEParams } from '../collections-UYVlXbEh.cjs';
|
|
5
|
+
import { TransactionReceipt, Hash, Chain } from 'viem';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Walks every page of a cursor-paginated endpoint and returns the flattened
|
|
@@ -134,7 +134,66 @@ declare function computeOndoBuyPrice(transaction: OndoBuyTransaction): Blockchai
|
|
|
134
134
|
*/
|
|
135
135
|
declare function computeOndoSellPrice(transaction: OndoSellTransaction): BlockchainAmount;
|
|
136
136
|
|
|
137
|
+
/**
|
|
138
|
+
* The Superstate swap contract's ABI, generated verbatim from the shared
|
|
139
|
+
* `TokenSwap` base contract:
|
|
140
|
+
*
|
|
141
|
+
* ```
|
|
142
|
+
* cd ../solidity && forge inspect TokenSwap abi --json --use 0.8.34
|
|
143
|
+
* ```
|
|
144
|
+
*
|
|
145
|
+
* Generated rather than hand-trimmed to the four methods the SDK calls, so
|
|
146
|
+
* regenerating after a contract change is one command and a paste. The custom
|
|
147
|
+
* errors carry their weight in particular: viem decodes a revert against them,
|
|
148
|
+
* so a `preview()` on a stopped contract surfaces as `IsStopped` rather than
|
|
149
|
+
* as an opaque `0x`-prefixed blob.
|
|
150
|
+
*
|
|
151
|
+
* `status()` returns `Status { uint32 flags; State state }` where `State` is
|
|
152
|
+
* `0 = Active | 1 = Paused | 2 = Stopped`. It replaced the older
|
|
153
|
+
* `stopped() -> uint256` bitmask, which this contract still exposes but as a
|
|
154
|
+
* `bool`; {@link SwapStatus} reads `status()` and nothing else.
|
|
155
|
+
*/
|
|
137
156
|
declare const SUPERSTATE_SWAP_ABI: readonly [{
|
|
157
|
+
readonly type: "function";
|
|
158
|
+
readonly name: "KIND";
|
|
159
|
+
readonly inputs: readonly [];
|
|
160
|
+
readonly outputs: readonly [{
|
|
161
|
+
readonly name: "";
|
|
162
|
+
readonly type: "uint16";
|
|
163
|
+
readonly internalType: "uint16";
|
|
164
|
+
}];
|
|
165
|
+
readonly stateMutability: "view";
|
|
166
|
+
}, {
|
|
167
|
+
readonly type: "function";
|
|
168
|
+
readonly name: "ONE_HUNDRED_P";
|
|
169
|
+
readonly inputs: readonly [];
|
|
170
|
+
readonly outputs: readonly [{
|
|
171
|
+
readonly name: "";
|
|
172
|
+
readonly type: "uint256";
|
|
173
|
+
readonly internalType: "uint256";
|
|
174
|
+
}];
|
|
175
|
+
readonly stateMutability: "view";
|
|
176
|
+
}, {
|
|
177
|
+
readonly type: "function";
|
|
178
|
+
readonly name: "SWAP_LEVEL";
|
|
179
|
+
readonly inputs: readonly [];
|
|
180
|
+
readonly outputs: readonly [{
|
|
181
|
+
readonly name: "";
|
|
182
|
+
readonly type: "uint32";
|
|
183
|
+
readonly internalType: "uint32";
|
|
184
|
+
}];
|
|
185
|
+
readonly stateMutability: "view";
|
|
186
|
+
}, {
|
|
187
|
+
readonly type: "function";
|
|
188
|
+
readonly name: "VERSION";
|
|
189
|
+
readonly inputs: readonly [];
|
|
190
|
+
readonly outputs: readonly [{
|
|
191
|
+
readonly name: "";
|
|
192
|
+
readonly type: "uint16";
|
|
193
|
+
readonly internalType: "uint16";
|
|
194
|
+
}];
|
|
195
|
+
readonly stateMutability: "view";
|
|
196
|
+
}, {
|
|
138
197
|
readonly type: "function";
|
|
139
198
|
readonly name: "authorized";
|
|
140
199
|
readonly inputs: readonly [{
|
|
@@ -150,7 +209,21 @@ declare const SUPERSTATE_SWAP_ABI: readonly [{
|
|
|
150
209
|
readonly stateMutability: "view";
|
|
151
210
|
}, {
|
|
152
211
|
readonly type: "function";
|
|
153
|
-
readonly name: "
|
|
212
|
+
readonly name: "bpp";
|
|
213
|
+
readonly inputs: readonly [{
|
|
214
|
+
readonly name: "amount";
|
|
215
|
+
readonly type: "uint256";
|
|
216
|
+
readonly internalType: "uint256";
|
|
217
|
+
}];
|
|
218
|
+
readonly outputs: readonly [{
|
|
219
|
+
readonly name: "";
|
|
220
|
+
readonly type: "uint256";
|
|
221
|
+
readonly internalType: "uint256";
|
|
222
|
+
}];
|
|
223
|
+
readonly stateMutability: "view";
|
|
224
|
+
}, {
|
|
225
|
+
readonly type: "function";
|
|
226
|
+
readonly name: "bps";
|
|
154
227
|
readonly inputs: readonly [];
|
|
155
228
|
readonly outputs: readonly [{
|
|
156
229
|
readonly name: "";
|
|
@@ -160,12 +233,128 @@ declare const SUPERSTATE_SWAP_ABI: readonly [{
|
|
|
160
233
|
readonly stateMutability: "view";
|
|
161
234
|
}, {
|
|
162
235
|
readonly type: "function";
|
|
163
|
-
readonly name: "
|
|
236
|
+
readonly name: "cancelOwnershipHandover";
|
|
164
237
|
readonly inputs: readonly [];
|
|
238
|
+
readonly outputs: readonly [];
|
|
239
|
+
readonly stateMutability: "payable";
|
|
240
|
+
}, {
|
|
241
|
+
readonly type: "function";
|
|
242
|
+
readonly name: "completeOwnershipHandover";
|
|
243
|
+
readonly inputs: readonly [{
|
|
244
|
+
readonly name: "pendingOwner";
|
|
245
|
+
readonly type: "address";
|
|
246
|
+
readonly internalType: "address";
|
|
247
|
+
}];
|
|
248
|
+
readonly outputs: readonly [];
|
|
249
|
+
readonly stateMutability: "payable";
|
|
250
|
+
}, {
|
|
251
|
+
readonly type: "function";
|
|
252
|
+
readonly name: "fee";
|
|
253
|
+
readonly inputs: readonly [{
|
|
254
|
+
readonly name: "amount";
|
|
255
|
+
readonly type: "uint256";
|
|
256
|
+
readonly internalType: "uint256";
|
|
257
|
+
}];
|
|
165
258
|
readonly outputs: readonly [{
|
|
166
259
|
readonly name: "";
|
|
167
260
|
readonly type: "uint256";
|
|
168
261
|
readonly internalType: "uint256";
|
|
262
|
+
}, {
|
|
263
|
+
readonly name: "";
|
|
264
|
+
readonly type: "uint256";
|
|
265
|
+
readonly internalType: "uint256";
|
|
266
|
+
}];
|
|
267
|
+
readonly stateMutability: "view";
|
|
268
|
+
}, {
|
|
269
|
+
readonly type: "function";
|
|
270
|
+
readonly name: "id";
|
|
271
|
+
readonly inputs: readonly [];
|
|
272
|
+
readonly outputs: readonly [{
|
|
273
|
+
readonly name: "";
|
|
274
|
+
readonly type: "bytes32";
|
|
275
|
+
readonly internalType: "bytes32";
|
|
276
|
+
}];
|
|
277
|
+
readonly stateMutability: "view";
|
|
278
|
+
}, {
|
|
279
|
+
readonly type: "function";
|
|
280
|
+
readonly name: "inputTokens";
|
|
281
|
+
readonly inputs: readonly [{
|
|
282
|
+
readonly name: "";
|
|
283
|
+
readonly type: "address";
|
|
284
|
+
readonly internalType: "address";
|
|
285
|
+
}];
|
|
286
|
+
readonly outputs: readonly [{
|
|
287
|
+
readonly name: "";
|
|
288
|
+
readonly type: "bool";
|
|
289
|
+
readonly internalType: "bool";
|
|
290
|
+
}];
|
|
291
|
+
readonly stateMutability: "view";
|
|
292
|
+
}, {
|
|
293
|
+
readonly type: "function";
|
|
294
|
+
readonly name: "outputToken";
|
|
295
|
+
readonly inputs: readonly [];
|
|
296
|
+
readonly outputs: readonly [{
|
|
297
|
+
readonly name: "";
|
|
298
|
+
readonly type: "address";
|
|
299
|
+
readonly internalType: "address";
|
|
300
|
+
}];
|
|
301
|
+
readonly stateMutability: "view";
|
|
302
|
+
}, {
|
|
303
|
+
readonly type: "function";
|
|
304
|
+
readonly name: "outputTokenBalance";
|
|
305
|
+
readonly inputs: readonly [];
|
|
306
|
+
readonly outputs: readonly [{
|
|
307
|
+
readonly name: "";
|
|
308
|
+
readonly type: "uint256";
|
|
309
|
+
readonly internalType: "uint256";
|
|
310
|
+
}];
|
|
311
|
+
readonly stateMutability: "view";
|
|
312
|
+
}, {
|
|
313
|
+
readonly type: "function";
|
|
314
|
+
readonly name: "owner";
|
|
315
|
+
readonly inputs: readonly [];
|
|
316
|
+
readonly outputs: readonly [{
|
|
317
|
+
readonly name: "result";
|
|
318
|
+
readonly type: "address";
|
|
319
|
+
readonly internalType: "address";
|
|
320
|
+
}];
|
|
321
|
+
readonly stateMutability: "view";
|
|
322
|
+
}, {
|
|
323
|
+
readonly type: "function";
|
|
324
|
+
readonly name: "ownershipHandoverExpiresAt";
|
|
325
|
+
readonly inputs: readonly [{
|
|
326
|
+
readonly name: "pendingOwner";
|
|
327
|
+
readonly type: "address";
|
|
328
|
+
readonly internalType: "address";
|
|
329
|
+
}];
|
|
330
|
+
readonly outputs: readonly [{
|
|
331
|
+
readonly name: "result";
|
|
332
|
+
readonly type: "uint256";
|
|
333
|
+
readonly internalType: "uint256";
|
|
334
|
+
}];
|
|
335
|
+
readonly stateMutability: "view";
|
|
336
|
+
}, {
|
|
337
|
+
readonly type: "function";
|
|
338
|
+
readonly name: "pause";
|
|
339
|
+
readonly inputs: readonly [{
|
|
340
|
+
readonly name: "level";
|
|
341
|
+
readonly type: "uint32";
|
|
342
|
+
readonly internalType: "uint32";
|
|
343
|
+
}];
|
|
344
|
+
readonly outputs: readonly [{
|
|
345
|
+
readonly name: "";
|
|
346
|
+
readonly type: "bool";
|
|
347
|
+
readonly internalType: "bool";
|
|
348
|
+
}];
|
|
349
|
+
readonly stateMutability: "nonpayable";
|
|
350
|
+
}, {
|
|
351
|
+
readonly type: "function";
|
|
352
|
+
readonly name: "paused";
|
|
353
|
+
readonly inputs: readonly [];
|
|
354
|
+
readonly outputs: readonly [{
|
|
355
|
+
readonly name: "";
|
|
356
|
+
readonly type: "uint32";
|
|
357
|
+
readonly internalType: "uint32";
|
|
169
358
|
}];
|
|
170
359
|
readonly stateMutability: "view";
|
|
171
360
|
}, {
|
|
@@ -201,54 +390,117 @@ declare const SUPERSTATE_SWAP_ABI: readonly [{
|
|
|
201
390
|
readonly stateMutability: "view";
|
|
202
391
|
}, {
|
|
203
392
|
readonly type: "function";
|
|
204
|
-
readonly name: "
|
|
393
|
+
readonly name: "renounceOwnership";
|
|
394
|
+
readonly inputs: readonly [];
|
|
395
|
+
readonly outputs: readonly [];
|
|
396
|
+
readonly stateMutability: "payable";
|
|
397
|
+
}, {
|
|
398
|
+
readonly type: "function";
|
|
399
|
+
readonly name: "requestOwnershipHandover";
|
|
400
|
+
readonly inputs: readonly [];
|
|
401
|
+
readonly outputs: readonly [];
|
|
402
|
+
readonly stateMutability: "payable";
|
|
403
|
+
}, {
|
|
404
|
+
readonly type: "function";
|
|
405
|
+
readonly name: "setBps";
|
|
205
406
|
readonly inputs: readonly [{
|
|
206
|
-
readonly name: "
|
|
207
|
-
readonly type: "address";
|
|
208
|
-
readonly internalType: "address";
|
|
209
|
-
}, {
|
|
210
|
-
readonly name: "amount";
|
|
211
|
-
readonly type: "uint256";
|
|
212
|
-
readonly internalType: "uint256";
|
|
213
|
-
}, {
|
|
214
|
-
readonly name: "slip";
|
|
407
|
+
readonly name: "points";
|
|
215
408
|
readonly type: "uint256";
|
|
216
409
|
readonly internalType: "uint256";
|
|
217
410
|
}];
|
|
218
411
|
readonly outputs: readonly [{
|
|
219
412
|
readonly name: "";
|
|
220
|
-
readonly type: "
|
|
221
|
-
readonly internalType: "
|
|
413
|
+
readonly type: "bool";
|
|
414
|
+
readonly internalType: "bool";
|
|
222
415
|
}];
|
|
223
416
|
readonly stateMutability: "nonpayable";
|
|
224
417
|
}, {
|
|
225
418
|
readonly type: "function";
|
|
226
|
-
readonly name: "
|
|
419
|
+
readonly name: "setInputToken";
|
|
227
420
|
readonly inputs: readonly [{
|
|
228
421
|
readonly name: "token";
|
|
229
422
|
readonly type: "address";
|
|
230
423
|
readonly internalType: "address";
|
|
424
|
+
}, {
|
|
425
|
+
readonly name: "val";
|
|
426
|
+
readonly type: "bool";
|
|
427
|
+
readonly internalType: "bool";
|
|
231
428
|
}];
|
|
232
429
|
readonly outputs: readonly [{
|
|
233
430
|
readonly name: "";
|
|
234
|
-
readonly type: "
|
|
235
|
-
readonly internalType: "
|
|
431
|
+
readonly type: "bool";
|
|
432
|
+
readonly internalType: "bool";
|
|
433
|
+
}];
|
|
434
|
+
readonly stateMutability: "nonpayable";
|
|
435
|
+
}, {
|
|
436
|
+
readonly type: "function";
|
|
437
|
+
readonly name: "status";
|
|
438
|
+
readonly inputs: readonly [];
|
|
439
|
+
readonly outputs: readonly [{
|
|
440
|
+
readonly name: "";
|
|
441
|
+
readonly type: "tuple";
|
|
442
|
+
readonly internalType: "struct Status";
|
|
443
|
+
readonly components: readonly [{
|
|
444
|
+
readonly name: "flags";
|
|
445
|
+
readonly type: "uint32";
|
|
446
|
+
readonly internalType: "uint32";
|
|
447
|
+
}, {
|
|
448
|
+
readonly name: "state";
|
|
449
|
+
readonly type: "uint8";
|
|
450
|
+
readonly internalType: "enum State";
|
|
451
|
+
}];
|
|
236
452
|
}];
|
|
237
453
|
readonly stateMutability: "view";
|
|
238
454
|
}, {
|
|
239
455
|
readonly type: "function";
|
|
240
|
-
readonly name: "
|
|
456
|
+
readonly name: "stop";
|
|
457
|
+
readonly inputs: readonly [];
|
|
458
|
+
readonly outputs: readonly [{
|
|
459
|
+
readonly name: "";
|
|
460
|
+
readonly type: "bool";
|
|
461
|
+
readonly internalType: "bool";
|
|
462
|
+
}];
|
|
463
|
+
readonly stateMutability: "nonpayable";
|
|
464
|
+
}, {
|
|
465
|
+
readonly type: "function";
|
|
466
|
+
readonly name: "stopped";
|
|
241
467
|
readonly inputs: readonly [];
|
|
242
468
|
readonly outputs: readonly [{
|
|
243
469
|
readonly name: "";
|
|
470
|
+
readonly type: "bool";
|
|
471
|
+
readonly internalType: "bool";
|
|
472
|
+
}];
|
|
473
|
+
readonly stateMutability: "view";
|
|
474
|
+
}, {
|
|
475
|
+
readonly type: "function";
|
|
476
|
+
readonly name: "swap";
|
|
477
|
+
readonly inputs: readonly [{
|
|
478
|
+
readonly name: "token";
|
|
244
479
|
readonly type: "address";
|
|
245
480
|
readonly internalType: "address";
|
|
481
|
+
}, {
|
|
482
|
+
readonly name: "amount";
|
|
483
|
+
readonly type: "uint256";
|
|
484
|
+
readonly internalType: "uint256";
|
|
485
|
+
}, {
|
|
486
|
+
readonly name: "slip";
|
|
487
|
+
readonly type: "uint256";
|
|
488
|
+
readonly internalType: "uint256";
|
|
246
489
|
}];
|
|
247
|
-
readonly
|
|
490
|
+
readonly outputs: readonly [{
|
|
491
|
+
readonly name: "";
|
|
492
|
+
readonly type: "uint256";
|
|
493
|
+
readonly internalType: "uint256";
|
|
494
|
+
}];
|
|
495
|
+
readonly stateMutability: "nonpayable";
|
|
248
496
|
}, {
|
|
249
497
|
readonly type: "function";
|
|
250
|
-
readonly name: "
|
|
251
|
-
readonly inputs: readonly [
|
|
498
|
+
readonly name: "tokenBalance";
|
|
499
|
+
readonly inputs: readonly [{
|
|
500
|
+
readonly name: "token";
|
|
501
|
+
readonly type: "address";
|
|
502
|
+
readonly internalType: "address";
|
|
503
|
+
}];
|
|
252
504
|
readonly outputs: readonly [{
|
|
253
505
|
readonly name: "";
|
|
254
506
|
readonly type: "uint256";
|
|
@@ -259,6 +511,10 @@ declare const SUPERSTATE_SWAP_ABI: readonly [{
|
|
|
259
511
|
readonly type: "function";
|
|
260
512
|
readonly name: "totals";
|
|
261
513
|
readonly inputs: readonly [{
|
|
514
|
+
readonly name: "user";
|
|
515
|
+
readonly type: "address";
|
|
516
|
+
readonly internalType: "address";
|
|
517
|
+
}, {
|
|
262
518
|
readonly name: "token";
|
|
263
519
|
readonly type: "address";
|
|
264
520
|
readonly internalType: "address";
|
|
@@ -290,10 +546,6 @@ declare const SUPERSTATE_SWAP_ABI: readonly [{
|
|
|
290
546
|
readonly type: "function";
|
|
291
547
|
readonly name: "totals";
|
|
292
548
|
readonly inputs: readonly [{
|
|
293
|
-
readonly name: "user";
|
|
294
|
-
readonly type: "address";
|
|
295
|
-
readonly internalType: "address";
|
|
296
|
-
}, {
|
|
297
549
|
readonly name: "token";
|
|
298
550
|
readonly type: "address";
|
|
299
551
|
readonly internalType: "address";
|
|
@@ -363,18 +615,104 @@ declare const SUPERSTATE_SWAP_ABI: readonly [{
|
|
|
363
615
|
readonly stateMutability: "nonpayable";
|
|
364
616
|
}, {
|
|
365
617
|
readonly type: "function";
|
|
366
|
-
readonly name: "
|
|
618
|
+
readonly name: "transferOwnership";
|
|
367
619
|
readonly inputs: readonly [{
|
|
368
|
-
readonly name: "
|
|
620
|
+
readonly name: "newOwner";
|
|
621
|
+
readonly type: "address";
|
|
622
|
+
readonly internalType: "address";
|
|
623
|
+
}];
|
|
624
|
+
readonly outputs: readonly [];
|
|
625
|
+
readonly stateMutability: "payable";
|
|
626
|
+
}, {
|
|
627
|
+
readonly type: "event";
|
|
628
|
+
readonly name: "BpsUpdated";
|
|
629
|
+
readonly inputs: readonly [{
|
|
630
|
+
readonly name: "prev";
|
|
631
|
+
readonly type: "uint256";
|
|
632
|
+
readonly indexed: false;
|
|
633
|
+
readonly internalType: "uint256";
|
|
634
|
+
}, {
|
|
635
|
+
readonly name: "next";
|
|
369
636
|
readonly type: "uint256";
|
|
637
|
+
readonly indexed: false;
|
|
370
638
|
readonly internalType: "uint256";
|
|
371
639
|
}];
|
|
372
|
-
readonly
|
|
373
|
-
|
|
640
|
+
readonly anonymous: false;
|
|
641
|
+
}, {
|
|
642
|
+
readonly type: "event";
|
|
643
|
+
readonly name: "InputTokenUpdated";
|
|
644
|
+
readonly inputs: readonly [{
|
|
645
|
+
readonly name: "token";
|
|
646
|
+
readonly type: "address";
|
|
647
|
+
readonly indexed: true;
|
|
648
|
+
readonly internalType: "address";
|
|
649
|
+
}, {
|
|
650
|
+
readonly name: "prev";
|
|
374
651
|
readonly type: "bool";
|
|
652
|
+
readonly indexed: false;
|
|
653
|
+
readonly internalType: "bool";
|
|
654
|
+
}, {
|
|
655
|
+
readonly name: "next";
|
|
656
|
+
readonly type: "bool";
|
|
657
|
+
readonly indexed: false;
|
|
375
658
|
readonly internalType: "bool";
|
|
376
659
|
}];
|
|
377
|
-
readonly
|
|
660
|
+
readonly anonymous: false;
|
|
661
|
+
}, {
|
|
662
|
+
readonly type: "event";
|
|
663
|
+
readonly name: "OwnershipHandoverCanceled";
|
|
664
|
+
readonly inputs: readonly [{
|
|
665
|
+
readonly name: "pendingOwner";
|
|
666
|
+
readonly type: "address";
|
|
667
|
+
readonly indexed: true;
|
|
668
|
+
readonly internalType: "address";
|
|
669
|
+
}];
|
|
670
|
+
readonly anonymous: false;
|
|
671
|
+
}, {
|
|
672
|
+
readonly type: "event";
|
|
673
|
+
readonly name: "OwnershipHandoverRequested";
|
|
674
|
+
readonly inputs: readonly [{
|
|
675
|
+
readonly name: "pendingOwner";
|
|
676
|
+
readonly type: "address";
|
|
677
|
+
readonly indexed: true;
|
|
678
|
+
readonly internalType: "address";
|
|
679
|
+
}];
|
|
680
|
+
readonly anonymous: false;
|
|
681
|
+
}, {
|
|
682
|
+
readonly type: "event";
|
|
683
|
+
readonly name: "OwnershipTransferred";
|
|
684
|
+
readonly inputs: readonly [{
|
|
685
|
+
readonly name: "oldOwner";
|
|
686
|
+
readonly type: "address";
|
|
687
|
+
readonly indexed: true;
|
|
688
|
+
readonly internalType: "address";
|
|
689
|
+
}, {
|
|
690
|
+
readonly name: "newOwner";
|
|
691
|
+
readonly type: "address";
|
|
692
|
+
readonly indexed: true;
|
|
693
|
+
readonly internalType: "address";
|
|
694
|
+
}];
|
|
695
|
+
readonly anonymous: false;
|
|
696
|
+
}, {
|
|
697
|
+
readonly type: "event";
|
|
698
|
+
readonly name: "Paused";
|
|
699
|
+
readonly inputs: readonly [{
|
|
700
|
+
readonly name: "previous";
|
|
701
|
+
readonly type: "uint32";
|
|
702
|
+
readonly indexed: false;
|
|
703
|
+
readonly internalType: "uint32";
|
|
704
|
+
}, {
|
|
705
|
+
readonly name: "next";
|
|
706
|
+
readonly type: "uint32";
|
|
707
|
+
readonly indexed: false;
|
|
708
|
+
readonly internalType: "uint32";
|
|
709
|
+
}];
|
|
710
|
+
readonly anonymous: false;
|
|
711
|
+
}, {
|
|
712
|
+
readonly type: "event";
|
|
713
|
+
readonly name: "Stopped";
|
|
714
|
+
readonly inputs: readonly [];
|
|
715
|
+
readonly anonymous: false;
|
|
378
716
|
}, {
|
|
379
717
|
readonly type: "event";
|
|
380
718
|
readonly name: "Swapped";
|
|
@@ -398,6 +736,11 @@ declare const SUPERSTATE_SWAP_ABI: readonly [{
|
|
|
398
736
|
readonly type: "uint256";
|
|
399
737
|
readonly indexed: false;
|
|
400
738
|
readonly internalType: "uint256";
|
|
739
|
+
}, {
|
|
740
|
+
readonly name: "fee";
|
|
741
|
+
readonly type: "uint256";
|
|
742
|
+
readonly indexed: false;
|
|
743
|
+
readonly internalType: "uint256";
|
|
401
744
|
}, {
|
|
402
745
|
readonly name: "outputAmount";
|
|
403
746
|
readonly type: "uint256";
|
|
@@ -427,16 +770,40 @@ declare const SUPERSTATE_SWAP_ABI: readonly [{
|
|
|
427
770
|
readonly anonymous: false;
|
|
428
771
|
}, {
|
|
429
772
|
readonly type: "error";
|
|
430
|
-
readonly name: "
|
|
773
|
+
readonly name: "AlreadyInitialized";
|
|
431
774
|
readonly inputs: readonly [];
|
|
432
775
|
}, {
|
|
433
776
|
readonly type: "error";
|
|
434
777
|
readonly name: "InsufficientAmount";
|
|
435
778
|
readonly inputs: readonly [];
|
|
779
|
+
}, {
|
|
780
|
+
readonly type: "error";
|
|
781
|
+
readonly name: "InvalidAddress";
|
|
782
|
+
readonly inputs: readonly [];
|
|
436
783
|
}, {
|
|
437
784
|
readonly type: "error";
|
|
438
785
|
readonly name: "InvalidAmount";
|
|
439
786
|
readonly inputs: readonly [];
|
|
787
|
+
}, {
|
|
788
|
+
readonly type: "error";
|
|
789
|
+
readonly name: "IsPaused";
|
|
790
|
+
readonly inputs: readonly [{
|
|
791
|
+
readonly name: "level";
|
|
792
|
+
readonly type: "uint32";
|
|
793
|
+
readonly internalType: "uint32";
|
|
794
|
+
}];
|
|
795
|
+
}, {
|
|
796
|
+
readonly type: "error";
|
|
797
|
+
readonly name: "IsStopped";
|
|
798
|
+
readonly inputs: readonly [];
|
|
799
|
+
}, {
|
|
800
|
+
readonly type: "error";
|
|
801
|
+
readonly name: "NewOwnerIsZeroAddress";
|
|
802
|
+
readonly inputs: readonly [];
|
|
803
|
+
}, {
|
|
804
|
+
readonly type: "error";
|
|
805
|
+
readonly name: "NoHandoverRequest";
|
|
806
|
+
readonly inputs: readonly [];
|
|
440
807
|
}, {
|
|
441
808
|
readonly type: "error";
|
|
442
809
|
readonly name: "SwapFailed";
|
|
@@ -449,6 +816,10 @@ declare const SUPERSTATE_SWAP_ABI: readonly [{
|
|
|
449
816
|
readonly type: "address";
|
|
450
817
|
readonly internalType: "address";
|
|
451
818
|
}];
|
|
819
|
+
}, {
|
|
820
|
+
readonly type: "error";
|
|
821
|
+
readonly name: "Unauthorized";
|
|
822
|
+
readonly inputs: readonly [];
|
|
452
823
|
}];
|
|
453
824
|
|
|
454
825
|
/**
|
|
@@ -469,15 +840,24 @@ declare function computePrice({ inputTokenAmount, outputTokenAmount, }: SwapQuot
|
|
|
469
840
|
declare function computeSlip(amount: BlockchainAmount, slippage: Bps): BlockchainAmount;
|
|
470
841
|
|
|
471
842
|
/**
|
|
472
|
-
*
|
|
473
|
-
* `SWAP_LEVEL
|
|
843
|
+
* The bit `Operable.paused` sets for the swap operation, mirroring the
|
|
844
|
+
* contract's `SWAP_LEVEL` constant.
|
|
474
845
|
*
|
|
475
|
-
*
|
|
476
|
-
*
|
|
846
|
+
* A constant rather than a `SWAP_LEVEL()` read: it is `constant` in the
|
|
847
|
+
* contract, so reading it would spend a round-trip to be told the same number
|
|
848
|
+
* every time.
|
|
849
|
+
*/
|
|
850
|
+
declare const SWAP_LEVEL = 2;
|
|
851
|
+
/**
|
|
852
|
+
* Whether the contract will actually accept a swap right now.
|
|
477
853
|
*
|
|
478
|
-
*
|
|
854
|
+
* Not the same question as "is it active". `paused` is a bitmask over
|
|
855
|
+
* *operations*, so a contract can suspend something unrelated and go on
|
|
856
|
+
* swapping; only the {@link SWAP_LEVEL} bit stops it. Reading `state ===
|
|
857
|
+
* 'active'` instead would refuse swaps the contract is perfectly willing to
|
|
858
|
+
* make.
|
|
479
859
|
*/
|
|
480
|
-
declare function
|
|
860
|
+
declare function isSwapAvailable(status: SwapStatus): boolean;
|
|
481
861
|
|
|
482
862
|
/**
|
|
483
863
|
* Decodes the confirmed output amount from the `Swapped` event in a swap
|
|
@@ -518,8 +898,8 @@ declare const SLIPPAGE_OPTIONS_BPS: Bps[];
|
|
|
518
898
|
/** Default slippage tolerance (0.5%). */
|
|
519
899
|
declare const DEFAULT_SLIPPAGE_BPS: Bps;
|
|
520
900
|
/**
|
|
521
|
-
* The Superstate swap contract on Ethereum Sepolia, and therefore the
|
|
522
|
-
* spender the user approves there.
|
|
901
|
+
* The deployed Superstate swap contract on Ethereum Sepolia, and therefore the
|
|
902
|
+
* ERC-20 spender the user approves there.
|
|
523
903
|
*
|
|
524
904
|
* Exported in its own right for a partner driving `coinlist.superstate.execute`
|
|
525
905
|
* at Level 1, where the contract is an explicit parameter.
|
|
@@ -578,6 +958,8 @@ declare const BPS_DENOM: Bps;
|
|
|
578
958
|
*/
|
|
579
959
|
declare function applyBps(amount: Uint256, bps: Bps): Uint256;
|
|
580
960
|
|
|
961
|
+
/** The viem chain definition the SDK reads and writes this chain through. */
|
|
962
|
+
declare function viemChain(chain: EthereumChain): Chain;
|
|
581
963
|
declare function getChainId(chain: EthereumChain): number;
|
|
582
964
|
/**
|
|
583
965
|
* Resolves an EIP-155 chain id to the chain the SDK names it by — the inverse
|
|
@@ -896,4 +1278,4 @@ declare const User: {
|
|
|
896
1278
|
fromDto: (dto: UserDto) => User;
|
|
897
1279
|
};
|
|
898
1280
|
|
|
899
|
-
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, InvariantError, KnownAssetSymbol, MathError, NA_AMOUNT_ASSET_UI, NonEmptyArray, NotAuthenticatedError, NotImplementedError, ONDO_POLL_INTERVAL_MS, ONDO_QUOTE_EXPIRY_THRESHOLD_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_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, formattedPricePerShare, formattedUsdPrice, getChainId, getNetworkName,
|
|
1281
|
+
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, InvariantError, KnownAssetSymbol, MathError, NA_AMOUNT_ASSET_UI, NonEmptyArray, NotAuthenticatedError, NotImplementedError, ONDO_POLL_INTERVAL_MS, ONDO_QUOTE_EXPIRY_THRESHOLD_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, formattedPricePerShare, formattedUsdPrice, getChainId, getNetworkName, isSwapAvailable, parseBlockchainAmount, shortenAddress, superstateSwapContractAddress, swapSpender, txExplorerUrl, usdAmount, viemChain };
|