@sodax/sdk 2.1.0-rc.5 → 2.1.0-rc.6
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/index.cjs +493 -303
- package/dist/index.d.cts +141 -5
- package/dist/index.d.ts +141 -5
- package/dist/index.mjs +491 -304
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getAbiItem, parseAbi, isAddress, toHex, hexToBytes, encodeAbiParameters, parseAbiParameters, defineChain, encodeFunctionData, erc20Abi as erc20Abi$1, createPublicClient, http, bytesToHex, keccak256, stringToBytes, fromHex, encodePacked, decodeAbiParameters, parseEventLogs, maxUint160, maxUint48, fallback } from 'viem';
|
|
1
|
+
import { getAbiItem, parseAbi, isAddress, toHex, hexToBytes, encodeAbiParameters, parseAbiParameters, defineChain, encodeFunctionData, erc20Abi as erc20Abi$1, createPublicClient, http, bytesToHex, keccak256, stringToBytes, fromHex, encodePacked, decodeAbiParameters, parseEventLogs, isHex, maxUint160, maxUint48, fallback } from 'viem';
|
|
2
2
|
import { bcs } from '@mysten/sui/bcs';
|
|
3
3
|
import { PublicKey, Connection, VersionedTransaction, SystemProgram, ComputeBudgetProgram, TransactionMessage, TransactionInstruction } from '@solana/web3.js';
|
|
4
4
|
import { rpc, Address, xdr, Account, Horizon, Contract, TransactionBuilder, nativeToScVal, TimeoutInfinite, scValToBigInt, Operation, Asset, FeeBumpTransaction, NotFoundError, Networks, Keypair } from '@stellar/stellar-sdk';
|
|
@@ -17,7 +17,7 @@ import * as IconSdkRaw from 'icon-sdk-js';
|
|
|
17
17
|
import { ChainGrpcWasmApi, TxGrpcApi, toBase64, fromBase64, MsgExecuteContract, ChainRestAuthApi, BaseAccount, createTransaction } from '@injectivelabs/sdk-ts';
|
|
18
18
|
import { TxRaw } from 'cosmjs-types/cosmos/tx/v1beta1/tx.js';
|
|
19
19
|
import { getNetworkEndpoints, Network } from '@injectivelabs/networks';
|
|
20
|
-
import * as
|
|
20
|
+
import * as v from 'valibot';
|
|
21
21
|
import { SwapsApi, SwapsApiError } from '@sodax/swaps-api';
|
|
22
22
|
export { SwapsApiError } from '@sodax/swaps-api';
|
|
23
23
|
import BigNumber5, { BigNumber } from 'bignumber.js';
|
|
@@ -94,8 +94,8 @@ function serializeCause(cause, depth) {
|
|
|
94
94
|
}
|
|
95
95
|
function sanitizeContext(value, depth) {
|
|
96
96
|
const out = {};
|
|
97
|
-
for (const [key,
|
|
98
|
-
out[key] = sanitizeValue(
|
|
97
|
+
for (const [key, v10] of Object.entries(value)) {
|
|
98
|
+
out[key] = sanitizeValue(v10, depth + 1);
|
|
99
99
|
}
|
|
100
100
|
return out;
|
|
101
101
|
}
|
|
@@ -106,13 +106,13 @@ function sanitizeValue(value, depth) {
|
|
|
106
106
|
if (t === "bigint") return value.toString();
|
|
107
107
|
if (t === "string" || t === "number" || t === "boolean") return value;
|
|
108
108
|
if (t === "function" || t === "symbol") return safeString(value);
|
|
109
|
-
if (Array.isArray(value)) return value.map((
|
|
109
|
+
if (Array.isArray(value)) return value.map((v10) => sanitizeValue(v10, depth + 1));
|
|
110
110
|
if (value instanceof Date) return value.toISOString();
|
|
111
111
|
if (value instanceof Map) {
|
|
112
|
-
return Array.from(value.entries()).map(([k,
|
|
112
|
+
return Array.from(value.entries()).map(([k, v10]) => [sanitizeValue(k, depth + 1), sanitizeValue(v10, depth + 1)]);
|
|
113
113
|
}
|
|
114
114
|
if (value instanceof Set) {
|
|
115
|
-
return Array.from(value.values()).map((
|
|
115
|
+
return Array.from(value.values()).map((v10) => sanitizeValue(v10, depth + 1));
|
|
116
116
|
}
|
|
117
117
|
if (value instanceof Error) return { name: value.name, message: value.message };
|
|
118
118
|
if (t === "object") {
|
|
@@ -124,9 +124,9 @@ function sanitizeValue(value, depth) {
|
|
|
124
124
|
}
|
|
125
125
|
return safeString(value);
|
|
126
126
|
}
|
|
127
|
-
function safeString(
|
|
127
|
+
function safeString(v10) {
|
|
128
128
|
try {
|
|
129
|
-
return String(
|
|
129
|
+
return String(v10);
|
|
130
130
|
} catch {
|
|
131
131
|
return "[unserializable]";
|
|
132
132
|
}
|
|
@@ -4430,7 +4430,7 @@ function isValidWalletProviderForChainKey(chainKey, walletProvider) {
|
|
|
4430
4430
|
}
|
|
4431
4431
|
|
|
4432
4432
|
// ../types/dist/index.js
|
|
4433
|
-
var CONFIG_VERSION =
|
|
4433
|
+
var CONFIG_VERSION = 226;
|
|
4434
4434
|
|
|
4435
4435
|
// src/shared/utils/resolveTimeoutMs.ts
|
|
4436
4436
|
function resolveTimeoutMs(timeout, fallbackMs) {
|
|
@@ -4817,10 +4817,11 @@ async function submitTransaction(payload, apiUrl) {
|
|
|
4817
4817
|
return { ok: false, error };
|
|
4818
4818
|
}
|
|
4819
4819
|
}
|
|
4820
|
-
async function getTransactionPackets(payload, apiUrl) {
|
|
4820
|
+
async function getTransactionPackets(payload, apiUrl, timeoutMs) {
|
|
4821
4821
|
invariant(payload.params.chain_id.length > 0, "Invalid input parameters. source_chain_id empty");
|
|
4822
4822
|
invariant(payload.params.tx_hash.length > 0, "Invalid input parameters. tx_hash empty");
|
|
4823
|
-
return postRequest(payload, apiUrl);
|
|
4823
|
+
if (timeoutMs === void 0) return postRequest(payload, apiUrl);
|
|
4824
|
+
return pollTransactionPackets(payload, apiUrl, Date.now() + resolveTimeoutMs(timeoutMs, RELAY_REQUEST_TIMEOUT_MS));
|
|
4824
4825
|
}
|
|
4825
4826
|
async function getPacket(payload, apiUrl) {
|
|
4826
4827
|
invariant(payload.params.chain_id.length > 0, "Invalid input parameters. source_chain_id empty");
|
|
@@ -14367,7 +14368,7 @@ function mergeSodaxConfig(base2, override) {
|
|
|
14367
14368
|
}
|
|
14368
14369
|
function encodeContractCalls(calls) {
|
|
14369
14370
|
return encodeAbiParameters(parseAbiParameters("(address,uint256,bytes)[]"), [
|
|
14370
|
-
calls.map((
|
|
14371
|
+
calls.map((v10) => [v10.address, v10.value, v10.data])
|
|
14371
14372
|
]);
|
|
14372
14373
|
}
|
|
14373
14374
|
async function waitForTransactionReceipt(hash, provider) {
|
|
@@ -15780,12 +15781,12 @@ function encodeBtcPayloadToBytes(payload) {
|
|
|
15780
15781
|
});
|
|
15781
15782
|
}
|
|
15782
15783
|
function normalizePsbtToBase64(signedPsbt) {
|
|
15783
|
-
const
|
|
15784
|
-
return
|
|
15784
|
+
const isHex2 = /^[0-9a-fA-F]+$/.test(signedPsbt);
|
|
15785
|
+
return isHex2 ? Buffer.from(signedPsbt, "hex").toString("base64") : signedPsbt;
|
|
15785
15786
|
}
|
|
15786
15787
|
function normalizeSignatureToBase64(signature) {
|
|
15787
|
-
const
|
|
15788
|
-
return
|
|
15788
|
+
const isHex2 = /^[0-9a-fA-F]+$/.test(signature);
|
|
15789
|
+
return isHex2 ? Buffer.from(signature, "hex").toString("base64") : signature;
|
|
15789
15790
|
}
|
|
15790
15791
|
|
|
15791
15792
|
// src/shared/services/spoke/BitcoinSpokeService.ts
|
|
@@ -17059,22 +17060,22 @@ function createHmacDrbg(hashLen, qByteLen, hmacFn) {
|
|
|
17059
17060
|
const byte0 = Uint8Array.of(0);
|
|
17060
17061
|
const byte1 = Uint8Array.of(1);
|
|
17061
17062
|
const _maxDrbgIters = 1e3;
|
|
17062
|
-
let
|
|
17063
|
+
let v10 = u8n(hashLen);
|
|
17063
17064
|
let k = u8n(hashLen);
|
|
17064
17065
|
let i = 0;
|
|
17065
17066
|
const reset = () => {
|
|
17066
|
-
|
|
17067
|
+
v10.fill(1);
|
|
17067
17068
|
k.fill(0);
|
|
17068
17069
|
i = 0;
|
|
17069
17070
|
};
|
|
17070
|
-
const h = (...msgs) => hmacFn(k, concatBytes(
|
|
17071
|
+
const h = (...msgs) => hmacFn(k, concatBytes(v10, ...msgs));
|
|
17071
17072
|
const reseed = (seed = NULL) => {
|
|
17072
17073
|
k = h(byte0, seed);
|
|
17073
|
-
|
|
17074
|
+
v10 = h();
|
|
17074
17075
|
if (seed.length === 0)
|
|
17075
17076
|
return;
|
|
17076
17077
|
k = h(byte1, seed);
|
|
17077
|
-
|
|
17078
|
+
v10 = h();
|
|
17078
17079
|
};
|
|
17079
17080
|
const gen = () => {
|
|
17080
17081
|
if (i++ >= _maxDrbgIters)
|
|
@@ -17082,10 +17083,10 @@ function createHmacDrbg(hashLen, qByteLen, hmacFn) {
|
|
|
17082
17083
|
let len = 0;
|
|
17083
17084
|
const out = [];
|
|
17084
17085
|
while (len < qByteLen) {
|
|
17085
|
-
|
|
17086
|
-
const sl =
|
|
17086
|
+
v10 = h();
|
|
17087
|
+
const sl = v10.slice();
|
|
17087
17088
|
out.push(sl);
|
|
17088
|
-
len +=
|
|
17089
|
+
len += v10.length;
|
|
17089
17090
|
}
|
|
17090
17091
|
return concatBytes(...out);
|
|
17091
17092
|
};
|
|
@@ -17111,7 +17112,7 @@ function validateObject(object5, fields = {}, optFields = {}) {
|
|
|
17111
17112
|
if (current !== expectedType || val === null)
|
|
17112
17113
|
throw new Error(`param "${fieldName}" is invalid: expected ${expectedType}, got ${current}`);
|
|
17113
17114
|
}
|
|
17114
|
-
const iter = (f, isOpt) => Object.entries(f).forEach(([k,
|
|
17115
|
+
const iter = (f, isOpt) => Object.entries(f).forEach(([k, v10]) => checkField(k, v10, isOpt));
|
|
17115
17116
|
iter(fields, false);
|
|
17116
17117
|
iter(optFields, true);
|
|
17117
17118
|
}
|
|
@@ -17182,9 +17183,9 @@ function sqrt3mod4(Fp, n) {
|
|
|
17182
17183
|
function sqrt5mod8(Fp, n) {
|
|
17183
17184
|
const p5div8 = (Fp.ORDER - _5n) / _8n;
|
|
17184
17185
|
const n2 = Fp.mul(n, _2n);
|
|
17185
|
-
const
|
|
17186
|
-
const nv = Fp.mul(n,
|
|
17187
|
-
const i = Fp.mul(Fp.mul(nv, _2n),
|
|
17186
|
+
const v10 = Fp.pow(n2, p5div8);
|
|
17187
|
+
const nv = Fp.mul(n, v10);
|
|
17188
|
+
const i = Fp.mul(Fp.mul(nv, _2n), v10);
|
|
17188
17189
|
const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));
|
|
17189
17190
|
assertIsSquare(Fp, root, n);
|
|
17190
17191
|
return root;
|
|
@@ -17766,9 +17767,9 @@ function edwards(params, extraOpts = {}) {
|
|
|
17766
17767
|
validateObject(extraOpts, {}, { uvRatio: "function" });
|
|
17767
17768
|
const MASK = _2n2 << BigInt(Fn.BYTES * 8) - _1n4;
|
|
17768
17769
|
const modP = (n) => Fp.create(n);
|
|
17769
|
-
const uvRatio2 = extraOpts.uvRatio || ((u,
|
|
17770
|
+
const uvRatio2 = extraOpts.uvRatio || ((u, v10) => {
|
|
17770
17771
|
try {
|
|
17771
|
-
return { isValid: true, value: Fp.sqrt(Fp.div(u,
|
|
17772
|
+
return { isValid: true, value: Fp.sqrt(Fp.div(u, v10)) };
|
|
17772
17773
|
} catch (e) {
|
|
17773
17774
|
return { isValid: false, value: _0n4 };
|
|
17774
17775
|
}
|
|
@@ -17864,8 +17865,8 @@ function edwards(params, extraOpts = {}) {
|
|
|
17864
17865
|
aInRange("point.y", y, _0n4, max);
|
|
17865
17866
|
const y2 = modP(y * y);
|
|
17866
17867
|
const u = modP(y2 - _1n4);
|
|
17867
|
-
const
|
|
17868
|
-
let { isValid, value: x } = uvRatio2(u,
|
|
17868
|
+
const v10 = modP(d * y2 - a);
|
|
17869
|
+
let { isValid, value: x } = uvRatio2(u, v10);
|
|
17869
17870
|
if (!isValid)
|
|
17870
17871
|
throw new Error("bad point: invalid y coordinate");
|
|
17871
17872
|
const isXOdd = (x & _1n4) === _1n4;
|
|
@@ -18205,13 +18206,13 @@ function adjustScalarBytes(bytes) {
|
|
|
18205
18206
|
return bytes;
|
|
18206
18207
|
}
|
|
18207
18208
|
var ED25519_SQRT_M1 = /* @__PURE__ */ BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");
|
|
18208
|
-
function uvRatio(u,
|
|
18209
|
+
function uvRatio(u, v10) {
|
|
18209
18210
|
const P = ed25519_CURVE_p;
|
|
18210
|
-
const v32 = mod(
|
|
18211
|
-
const v72 = mod(v32 * v32 *
|
|
18211
|
+
const v32 = mod(v10 * v10 * v10, P);
|
|
18212
|
+
const v72 = mod(v32 * v32 * v10, P);
|
|
18212
18213
|
const pow = ed25519_pow_2_252_3(u * v72).pow_p_5_8;
|
|
18213
18214
|
let x = mod(u * v32 * pow, P);
|
|
18214
|
-
const vx2 = mod(
|
|
18215
|
+
const vx2 = mod(v10 * x * x, P);
|
|
18215
18216
|
const root1 = x;
|
|
18216
18217
|
const root2 = mod(x * ED25519_SQRT_M1, P);
|
|
18217
18218
|
const useRoot1 = vx2 === u;
|
|
@@ -18542,7 +18543,7 @@ function findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio, protocol
|
|
|
18542
18543
|
return findSeatPriceForProtocolAfter49(validators, maxNumberOfSeats, minimumStakeRatio);
|
|
18543
18544
|
}
|
|
18544
18545
|
function findSeatPriceForProtocolBefore49(validators, numSeats) {
|
|
18545
|
-
const stakes = validators.map((
|
|
18546
|
+
const stakes = validators.map((v10) => BigInt(v10.stake)).sort(sortBigIntAsc);
|
|
18546
18547
|
const num = BigInt(numSeats);
|
|
18547
18548
|
const stakesSum = stakes.reduce((a, b) => a + b);
|
|
18548
18549
|
if (stakesSum < num) {
|
|
@@ -18571,7 +18572,7 @@ function findSeatPriceForProtocolAfter49(validators, maxNumberOfSeats, minimumSt
|
|
|
18571
18572
|
if (minimumStakeRatio.length != 2) {
|
|
18572
18573
|
throw Error("minimumStakeRatio should have 2 elements");
|
|
18573
18574
|
}
|
|
18574
|
-
const stakes = validators.map((
|
|
18575
|
+
const stakes = validators.map((v10) => BigInt(v10.stake)).sort(sortBigIntAsc);
|
|
18575
18576
|
const stakesSum = stakes.reduce((a, b) => a + b);
|
|
18576
18577
|
if (validators.length < maxNumberOfSeats) {
|
|
18577
18578
|
return stakesSum * BigInt(minimumStakeRatio[0]) / BigInt(minimumStakeRatio[1]);
|
|
@@ -18743,10 +18744,10 @@ var DER = {
|
|
|
18743
18744
|
if (length < 128)
|
|
18744
18745
|
throw new E("tlv.decode(long): not minimal encoding");
|
|
18745
18746
|
}
|
|
18746
|
-
const
|
|
18747
|
-
if (
|
|
18747
|
+
const v10 = data.subarray(pos, pos + length);
|
|
18748
|
+
if (v10.length !== length)
|
|
18748
18749
|
throw new E("tlv.decode: wrong value length");
|
|
18749
|
-
return { v:
|
|
18750
|
+
return { v: v10, l: data.subarray(pos + length) };
|
|
18750
18751
|
}
|
|
18751
18752
|
},
|
|
18752
18753
|
// https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,
|
|
@@ -19493,14 +19494,14 @@ function ecdsa(Point, hash, ecdsaOpts = {}) {
|
|
|
19493
19494
|
return false;
|
|
19494
19495
|
const { r, s } = sig;
|
|
19495
19496
|
const h = bits2int_modN(message);
|
|
19496
|
-
const
|
|
19497
|
-
const u1 = Fn.create(h *
|
|
19498
|
-
const u2 = Fn.create(r *
|
|
19497
|
+
const is3 = Fn.inv(s);
|
|
19498
|
+
const u1 = Fn.create(h * is3);
|
|
19499
|
+
const u2 = Fn.create(r * is3);
|
|
19499
19500
|
const R = Point.BASE.multiplyUnsafe(u1).add(P.multiplyUnsafe(u2));
|
|
19500
19501
|
if (R.is0())
|
|
19501
19502
|
return false;
|
|
19502
|
-
const
|
|
19503
|
-
return
|
|
19503
|
+
const v10 = Fn.create(R.x);
|
|
19504
|
+
return v10 === r;
|
|
19504
19505
|
} catch (e) {
|
|
19505
19506
|
return false;
|
|
19506
19507
|
}
|
|
@@ -26895,19 +26896,32 @@ var SolverApiService = class {
|
|
|
26895
26896
|
*
|
|
26896
26897
|
* @param request - Object containing `intent_tx_hash` — the hub-chain tx hash of the intent.
|
|
26897
26898
|
* @param config - Solver endpoint configuration.
|
|
26899
|
+
* @param logger - Diagnostics sink; defaults to the silent logger.
|
|
26900
|
+
* @param timeoutMs - Optional budget for the request. Omit it and the call is unbounded, as it has
|
|
26901
|
+
* always been. Supply it when a stalled solver must not hold the caller open — a status read
|
|
26902
|
+
* polled on a short interval, say. An expiry surfaces as `UNKNOWN`, like any other failure.
|
|
26903
|
+
* A non-finite value (`NaN` out of `Number(process.env.X)`, or `Infinity`) is treated as no
|
|
26904
|
+
* budget at all rather than passed to `setTimeout`, which would coerce it to ~0 and fail every
|
|
26905
|
+
* request instantly. A non-positive one is a real budget of zero: the request aborts at once.
|
|
26906
|
+
* The relay's `getTransactionPackets` takes the same parameter but degrades a non-finite value
|
|
26907
|
+
* to its own per-request budget instead; the divergence is deliberate, and explained inline.
|
|
26898
26908
|
* @returns A `Result` containing `{ status: SolverIntentStatusCode, fill_tx_hash?: string }`.
|
|
26899
26909
|
* `fill_tx_hash` is set only when `status === SolverIntentStatusCode.SOLVED (3)`.
|
|
26900
26910
|
* @throws Invariant error if `intent_tx_hash` is empty (thrown before the async request).
|
|
26901
26911
|
*/
|
|
26902
|
-
static async getStatus(request, config, logger = silentLogger) {
|
|
26912
|
+
static async getStatus(request, config, logger = silentLogger, timeoutMs) {
|
|
26903
26913
|
invariant(request.intent_tx_hash.length > 0, "Empty intent_tx_hash");
|
|
26914
|
+
const budgetMs = timeoutMs !== void 0 && Number.isFinite(timeoutMs) ? Math.max(0, timeoutMs) : void 0;
|
|
26915
|
+
const controller = budgetMs === void 0 ? void 0 : new AbortController();
|
|
26916
|
+
const timeoutId = controller ? setTimeout(() => controller.abort(), budgetMs) : void 0;
|
|
26904
26917
|
try {
|
|
26905
26918
|
const response = await fetch(`${config.solverApiEndpoint}/status`, {
|
|
26906
26919
|
method: "POST",
|
|
26907
26920
|
headers: {
|
|
26908
26921
|
"Content-Type": "application/json"
|
|
26909
26922
|
},
|
|
26910
|
-
body: JSON.stringify(request)
|
|
26923
|
+
body: JSON.stringify(request),
|
|
26924
|
+
signal: controller?.signal
|
|
26911
26925
|
});
|
|
26912
26926
|
if (!response.ok) {
|
|
26913
26927
|
return {
|
|
@@ -26929,10 +26943,12 @@ var SolverApiService = class {
|
|
|
26929
26943
|
error: {
|
|
26930
26944
|
detail: {
|
|
26931
26945
|
code: SolverIntentErrorCode.UNKNOWN,
|
|
26932
|
-
message: e ? JSON.stringify(e, bigintReplacer) : "Unknown error"
|
|
26946
|
+
message: controller?.signal.aborted ? `solver /status timed out after ${budgetMs}ms` : e ? JSON.stringify(e, bigintReplacer) : "Unknown error"
|
|
26933
26947
|
}
|
|
26934
26948
|
}
|
|
26935
26949
|
};
|
|
26950
|
+
} finally {
|
|
26951
|
+
clearTimeout(timeoutId);
|
|
26936
26952
|
}
|
|
26937
26953
|
}
|
|
26938
26954
|
};
|
|
@@ -27026,6 +27042,152 @@ async function runBackendSubmitTx({
|
|
|
27026
27042
|
});
|
|
27027
27043
|
return polled.ok ? { ok: true, value: polled.value } : { ok: false, cause: polled.cause };
|
|
27028
27044
|
}
|
|
27045
|
+
var ChainKeySchema = v.custom((input) => typeof input === "string");
|
|
27046
|
+
var SpokeChainKeySchema = v.custom((input) => typeof input === "string");
|
|
27047
|
+
var AddressSchema = v.custom((input) => typeof input === "string");
|
|
27048
|
+
var XTokenSchema = v.object({
|
|
27049
|
+
symbol: v.string(),
|
|
27050
|
+
name: v.string(),
|
|
27051
|
+
decimals: v.number(),
|
|
27052
|
+
address: v.string(),
|
|
27053
|
+
chainKey: ChainKeySchema,
|
|
27054
|
+
hubAsset: AddressSchema,
|
|
27055
|
+
vault: AddressSchema,
|
|
27056
|
+
access: v.optional(v.picklist(["withdrawOnly", "depositOnly"]))
|
|
27057
|
+
});
|
|
27058
|
+
var IntentStructSchema = v.object({
|
|
27059
|
+
intentId: v.string(),
|
|
27060
|
+
creator: v.string(),
|
|
27061
|
+
inputToken: v.string(),
|
|
27062
|
+
outputToken: v.string(),
|
|
27063
|
+
inputAmount: v.string(),
|
|
27064
|
+
minOutputAmount: v.string(),
|
|
27065
|
+
deadline: v.string(),
|
|
27066
|
+
allowPartialFill: v.boolean(),
|
|
27067
|
+
srcChain: v.number(),
|
|
27068
|
+
dstChain: v.number(),
|
|
27069
|
+
srcAddress: v.string(),
|
|
27070
|
+
dstAddress: v.string(),
|
|
27071
|
+
solver: v.string(),
|
|
27072
|
+
data: v.string()
|
|
27073
|
+
});
|
|
27074
|
+
var FillEventSchema = v.object({
|
|
27075
|
+
eventType: v.literal("intent-filled"),
|
|
27076
|
+
// The hub-chain fill tx; an empty one is no use as `fill_tx_hash`.
|
|
27077
|
+
txHash: v.pipe(v.string(), v.nonEmpty()),
|
|
27078
|
+
// Terminality. An intent created with `allowPartialFill` emits a fill event per fill, so the
|
|
27079
|
+
// event alone does not mean the intent is done — only `remainingInput === '0'` does. Required:
|
|
27080
|
+
// without it there is no proof of completion, and claiming SOLVED on a partial fill would report
|
|
27081
|
+
// an unfinished swap as complete.
|
|
27082
|
+
intentState: v.object({
|
|
27083
|
+
remainingInput: v.string()
|
|
27084
|
+
})
|
|
27085
|
+
});
|
|
27086
|
+
var IntentResponseSchema = v.object({
|
|
27087
|
+
intentHash: v.string(),
|
|
27088
|
+
txHash: v.string(),
|
|
27089
|
+
logIndex: v.number(),
|
|
27090
|
+
chainId: v.number(),
|
|
27091
|
+
blockNumber: v.number(),
|
|
27092
|
+
open: v.boolean(),
|
|
27093
|
+
intent: IntentStructSchema,
|
|
27094
|
+
events: v.array(v.unknown())
|
|
27095
|
+
});
|
|
27096
|
+
var UserIntentsResponseSchema = v.object({
|
|
27097
|
+
total: v.number(),
|
|
27098
|
+
offset: v.number(),
|
|
27099
|
+
limit: v.number(),
|
|
27100
|
+
items: v.array(IntentResponseSchema)
|
|
27101
|
+
});
|
|
27102
|
+
var OrderbookResponseSchema = v.object({
|
|
27103
|
+
total: v.number(),
|
|
27104
|
+
data: v.array(
|
|
27105
|
+
v.object({
|
|
27106
|
+
intentState: v.object({
|
|
27107
|
+
exists: v.boolean(),
|
|
27108
|
+
remainingInput: v.string(),
|
|
27109
|
+
receivedOutput: v.string(),
|
|
27110
|
+
pendingPayment: v.boolean()
|
|
27111
|
+
}),
|
|
27112
|
+
intentData: v.object({
|
|
27113
|
+
intentId: v.string(),
|
|
27114
|
+
creator: v.string(),
|
|
27115
|
+
inputToken: v.string(),
|
|
27116
|
+
outputToken: v.string(),
|
|
27117
|
+
inputAmount: v.string(),
|
|
27118
|
+
minOutputAmount: v.string(),
|
|
27119
|
+
deadline: v.string(),
|
|
27120
|
+
allowPartialFill: v.boolean(),
|
|
27121
|
+
srcChain: v.number(),
|
|
27122
|
+
dstChain: v.number(),
|
|
27123
|
+
srcAddress: v.string(),
|
|
27124
|
+
dstAddress: v.string(),
|
|
27125
|
+
solver: v.string(),
|
|
27126
|
+
data: v.string(),
|
|
27127
|
+
intentHash: v.string(),
|
|
27128
|
+
txHash: v.string(),
|
|
27129
|
+
blockNumber: v.number()
|
|
27130
|
+
})
|
|
27131
|
+
})
|
|
27132
|
+
)
|
|
27133
|
+
});
|
|
27134
|
+
var MoneyMarketPositionSchema = v.object({
|
|
27135
|
+
userAddress: v.string(),
|
|
27136
|
+
positions: v.array(
|
|
27137
|
+
v.object({
|
|
27138
|
+
reserveAddress: v.string(),
|
|
27139
|
+
aTokenAddress: v.string(),
|
|
27140
|
+
variableDebtTokenAddress: v.string(),
|
|
27141
|
+
aTokenBalance: v.string(),
|
|
27142
|
+
variableDebtTokenBalance: v.string(),
|
|
27143
|
+
blockNumber: v.number()
|
|
27144
|
+
})
|
|
27145
|
+
)
|
|
27146
|
+
});
|
|
27147
|
+
var MoneyMarketAssetSchema = v.object({
|
|
27148
|
+
reserveAddress: v.string(),
|
|
27149
|
+
aTokenAddress: v.string(),
|
|
27150
|
+
totalATokenBalance: v.string(),
|
|
27151
|
+
variableDebtTokenAddress: v.string(),
|
|
27152
|
+
totalVariableDebtTokenBalance: v.string(),
|
|
27153
|
+
liquidityRate: v.string(),
|
|
27154
|
+
symbol: v.string(),
|
|
27155
|
+
totalSuppliers: v.number(),
|
|
27156
|
+
totalBorrowers: v.number(),
|
|
27157
|
+
variableBorrowRate: v.string(),
|
|
27158
|
+
stableBorrowRate: v.string(),
|
|
27159
|
+
liquidityIndex: v.string(),
|
|
27160
|
+
variableBorrowIndex: v.string(),
|
|
27161
|
+
blockNumber: v.number()
|
|
27162
|
+
});
|
|
27163
|
+
var MoneyMarketAssetsSchema = v.array(MoneyMarketAssetSchema);
|
|
27164
|
+
var MoneyMarketAssetBorrowersSchema = v.object({
|
|
27165
|
+
borrowers: v.array(v.string()),
|
|
27166
|
+
total: v.number(),
|
|
27167
|
+
offset: v.number(),
|
|
27168
|
+
limit: v.number()
|
|
27169
|
+
});
|
|
27170
|
+
var MoneyMarketAssetSuppliersSchema = v.object({
|
|
27171
|
+
suppliers: v.array(v.string()),
|
|
27172
|
+
total: v.number(),
|
|
27173
|
+
offset: v.number(),
|
|
27174
|
+
limit: v.number()
|
|
27175
|
+
});
|
|
27176
|
+
var MoneyMarketBorrowersSchema = v.object({
|
|
27177
|
+
borrowers: v.array(v.string()),
|
|
27178
|
+
total: v.number(),
|
|
27179
|
+
offset: v.number(),
|
|
27180
|
+
limit: v.number()
|
|
27181
|
+
});
|
|
27182
|
+
var GetChainsResponseSchema = v.array(SpokeChainKeySchema);
|
|
27183
|
+
var TokensByChainMapSchema = v.custom(
|
|
27184
|
+
(input) => typeof input === "object" && input !== null && Object.values(input).every((tokens) => Array.isArray(tokens) && tokens.every((t) => v.is(XTokenSchema, t)))
|
|
27185
|
+
);
|
|
27186
|
+
var TokensListSchema = v.array(XTokenSchema);
|
|
27187
|
+
var ReserveAssetsSchema = v.array(AddressSchema);
|
|
27188
|
+
|
|
27189
|
+
// src/backendApi/guards.ts
|
|
27190
|
+
var isFillEvent = (value) => v.is(FillEventSchema, value);
|
|
27029
27191
|
function decodePacketIntentTarget(payload) {
|
|
27030
27192
|
try {
|
|
27031
27193
|
const hex = payload.startsWith("0x") ? payload.slice(2) : payload;
|
|
@@ -27045,6 +27207,12 @@ function selectSolvedIntentPacket(packets, intentsContract) {
|
|
|
27045
27207
|
return packets.reduce((highest, packet) => packet.conn_sn > highest.conn_sn ? packet : highest);
|
|
27046
27208
|
}
|
|
27047
27209
|
|
|
27210
|
+
// src/swap/detailedStatus.ts
|
|
27211
|
+
var DETAILED_STATUS_NOT_DELIVERED = "relay_not_delivered";
|
|
27212
|
+
function isBackendSubmitTxAbandoned(data) {
|
|
27213
|
+
return data.status === "failed" || Boolean(data.abandonedAt);
|
|
27214
|
+
}
|
|
27215
|
+
|
|
27048
27216
|
// src/swap/errors.ts
|
|
27049
27217
|
var swapInvariant = createInvariant("swap");
|
|
27050
27218
|
var POST_EXECUTION_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
@@ -27069,6 +27237,8 @@ var isPostExecutionError = isCodeMember(POST_EXECUTION_ERROR_CODES);
|
|
|
27069
27237
|
var isSwapError = isCodeMember(SWAP_ERROR_CODES);
|
|
27070
27238
|
|
|
27071
27239
|
// src/swap/SwapService.ts
|
|
27240
|
+
var RECONCILE_TIMEOUT_MS = 5e3;
|
|
27241
|
+
var DETAILED_STATUS_SOLVER_TIMEOUT_MS = 5e3;
|
|
27072
27242
|
var SwapService = class {
|
|
27073
27243
|
// dependent services
|
|
27074
27244
|
hubProvider;
|
|
@@ -27169,7 +27339,8 @@ var SwapService = class {
|
|
|
27169
27339
|
return calculatePercentageFeeAmount(inputAmount, 10);
|
|
27170
27340
|
}
|
|
27171
27341
|
/**
|
|
27172
|
-
* Polls the solver API for the current execution status of an intent.
|
|
27342
|
+
* Polls the solver API for the current execution status of an intent. A `NOT_FOUND` or a failed
|
|
27343
|
+
* request is cross-checked against the backend's durable intent record.
|
|
27173
27344
|
*
|
|
27174
27345
|
* The `intent_tx_hash` in the request must be the hub-chain (Sonic) transaction hash where
|
|
27175
27346
|
* the intent was registered — this is the `dst_tx_hash` from the relay packet returned by
|
|
@@ -27180,7 +27351,145 @@ var SwapService = class {
|
|
|
27180
27351
|
* `fill_tx_hash` is populated only when `status === SolverIntentStatusCode.SOLVED (3)`.
|
|
27181
27352
|
*/
|
|
27182
27353
|
async getStatus(request) {
|
|
27183
|
-
return
|
|
27354
|
+
return this.resolveSolverStatus(request);
|
|
27355
|
+
}
|
|
27356
|
+
/**
|
|
27357
|
+
* {@link SwapService.getStatus} with an optional budget for the solver leg. Public `getStatus` is a
|
|
27358
|
+
* one-shot read a caller bounds however it likes, so it stays unbounded; `getDetailedStatus` is
|
|
27359
|
+
* polled and passes {@link DETAILED_STATUS_SOLVER_TIMEOUT_MS}. Both go through here so the
|
|
27360
|
+
* durable-intent reconcile below is written once.
|
|
27361
|
+
*
|
|
27362
|
+
* `timeoutMs` bounds the solver request alone. The reconcile that a failed or NOT_FOUND solver read
|
|
27363
|
+
* falls through to carries its own {@link RECONCILE_TIMEOUT_MS}, so a bounded call can cost both.
|
|
27364
|
+
*/
|
|
27365
|
+
async resolveSolverStatus(request, timeoutMs) {
|
|
27366
|
+
const solverResult = await SolverApiService.getStatus(request, this.solver, this.config.logger, timeoutMs);
|
|
27367
|
+
const forgotten = !solverResult.ok || solverResult.value.status === SolverIntentStatusCode.NOT_FOUND;
|
|
27368
|
+
if (!forgotten) return solverResult;
|
|
27369
|
+
const timeout = Math.min(RECONCILE_TIMEOUT_MS, this.backendApi.requestTimeoutMs);
|
|
27370
|
+
const intent = await this.backendApi.getIntentByTxHash(request.intent_tx_hash, { timeout });
|
|
27371
|
+
const settled = intent.ok ? intent.value.events.filter(isFillEvent).find((fill) => fill.intentState.remainingInput === "0") : void 0;
|
|
27372
|
+
if (settled) return { ok: true, value: { status: SolverIntentStatusCode.SOLVED, fill_tx_hash: settled.txHash } };
|
|
27373
|
+
const backendAnswered = intent.ok || isSodaxError(intent.error) && intent.error.context?.status === 404;
|
|
27374
|
+
if (solverResult.ok && !backendAnswered) {
|
|
27375
|
+
return {
|
|
27376
|
+
ok: false,
|
|
27377
|
+
error: {
|
|
27378
|
+
detail: {
|
|
27379
|
+
code: SolverIntentErrorCode.UNKNOWN,
|
|
27380
|
+
message: "solver reported NOT_FOUND and the durable intent record could not be read to verify it"
|
|
27381
|
+
}
|
|
27382
|
+
}
|
|
27383
|
+
};
|
|
27384
|
+
}
|
|
27385
|
+
return solverResult;
|
|
27386
|
+
}
|
|
27387
|
+
/**
|
|
27388
|
+
* Reads a swap's status from its source-chain transaction — the identifier a caller always holds.
|
|
27389
|
+
*
|
|
27390
|
+
* **Routes; does not translate.** Returns the backend submit-tx record while it is in play,
|
|
27391
|
+
* otherwise the solver's answer via the hub tx hash resolved from the relay packet. The result is
|
|
27392
|
+
* tagged with `source` (discriminate on it) and carries that source's payload unmodified.
|
|
27393
|
+
*
|
|
27394
|
+
* **Any** unusable backend response routes to the solver — a 404, a transport or server error, or
|
|
27395
|
+
* a record the backend gave up on. See `docs/SWAPS.md` § Get Detailed Status for why.
|
|
27396
|
+
*
|
|
27397
|
+
* A point-in-time read; poll it yourself, or use dapp-kit's `useDetailedStatus`.
|
|
27398
|
+
*
|
|
27399
|
+
* @param params - `srcChainKey` and `srcTxHash` of the source-chain swap transaction.
|
|
27400
|
+
* @returns A `Result` containing a {@link DetailedSwapStatus}. Fails with `LOOKUP_FAILED` when no
|
|
27401
|
+
* source can answer yet — usually the relay has not delivered the packet, so there is no hub tx
|
|
27402
|
+
* hash for the solver to be asked about.
|
|
27403
|
+
*/
|
|
27404
|
+
async getDetailedStatus(params) {
|
|
27405
|
+
try {
|
|
27406
|
+
const record3 = await this.backendApi.swaps.getSubmitTxStatus({
|
|
27407
|
+
txHash: params.srcTxHash,
|
|
27408
|
+
srcChainKey: params.srcChainKey
|
|
27409
|
+
});
|
|
27410
|
+
if (record3.ok && record3.value.success && !isBackendSubmitTxAbandoned(record3.value.data)) {
|
|
27411
|
+
return { ok: true, value: { source: "backend", data: record3.value.data } };
|
|
27412
|
+
}
|
|
27413
|
+
const backendAnswered = record3.ok || isSodaxError(record3.error) && record3.error.context?.status === 404;
|
|
27414
|
+
const dstTxHash = await this.resolveHubTxHash(params, backendAnswered);
|
|
27415
|
+
if (!dstTxHash.ok) return dstTxHash;
|
|
27416
|
+
const solver = await this.resolveSolverStatus(
|
|
27417
|
+
{ intent_tx_hash: dstTxHash.value },
|
|
27418
|
+
DETAILED_STATUS_SOLVER_TIMEOUT_MS
|
|
27419
|
+
);
|
|
27420
|
+
if (!solver.ok) {
|
|
27421
|
+
return { ok: false, error: this.detailedStatusLookupFailed(solver.error, params.srcChainKey) };
|
|
27422
|
+
}
|
|
27423
|
+
return { ok: true, value: { source: "solver", dstTxHash: dstTxHash.value, data: solver.value } };
|
|
27424
|
+
} catch (error) {
|
|
27425
|
+
return { ok: false, error: this.detailedStatusLookupFailed(error, params.srcChainKey) };
|
|
27426
|
+
}
|
|
27427
|
+
}
|
|
27428
|
+
/**
|
|
27429
|
+
* The hub-chain tx hash the solver is keyed on. A hub-source swap has no relay leg — the source
|
|
27430
|
+
* tx *is* the hub tx. Otherwise the delivered relay packet carries it, so an undelivered packet
|
|
27431
|
+
* is simply "no hash yet".
|
|
27432
|
+
*/
|
|
27433
|
+
async resolveHubTxHash(key, backendAnswered) {
|
|
27434
|
+
const missReason = backendAnswered ? DETAILED_STATUS_NOT_DELIVERED : void 0;
|
|
27435
|
+
let hubTxHash = key.srcTxHash;
|
|
27436
|
+
if (!isHubChainKeyType(key.srcChainKey)) {
|
|
27437
|
+
const relayChainId = getIntentRelayChainId(key.srcChainKey);
|
|
27438
|
+
const packets = await getTransactionPackets(
|
|
27439
|
+
{
|
|
27440
|
+
action: "get_transaction_packets",
|
|
27441
|
+
params: { chain_id: relayChainId.toString(), tx_hash: key.srcTxHash }
|
|
27442
|
+
},
|
|
27443
|
+
this.relayerApiEndpoint,
|
|
27444
|
+
RELAY_REQUEST_TIMEOUT_MS
|
|
27445
|
+
);
|
|
27446
|
+
if (!packets.ok) {
|
|
27447
|
+
const notIndexed = packets.error instanceof HttpRelayError && packets.error.status === 404;
|
|
27448
|
+
return {
|
|
27449
|
+
ok: false,
|
|
27450
|
+
error: this.detailedStatusLookupFailed(packets.error, key.srcChainKey, notIndexed ? missReason : void 0)
|
|
27451
|
+
};
|
|
27452
|
+
}
|
|
27453
|
+
if (!packets.value?.success || !Array.isArray(packets.value.data)) {
|
|
27454
|
+
return {
|
|
27455
|
+
ok: false,
|
|
27456
|
+
error: this.detailedStatusLookupFailed(
|
|
27457
|
+
new Error("relay returned no usable transaction packets"),
|
|
27458
|
+
key.srcChainKey
|
|
27459
|
+
)
|
|
27460
|
+
};
|
|
27461
|
+
}
|
|
27462
|
+
const delivered = packets.value.data.find(
|
|
27463
|
+
(packet) => typeof packet?.src_tx_hash === "string" && packet.src_tx_hash.toLowerCase() === key.srcTxHash.toLowerCase() && packet.src_chain_id === Number(relayChainId) && packet.status === "executed" && typeof packet.dst_tx_hash === "string" && packet.dst_tx_hash.length > 0
|
|
27464
|
+
);
|
|
27465
|
+
if (!delivered) {
|
|
27466
|
+
return {
|
|
27467
|
+
ok: false,
|
|
27468
|
+
error: this.detailedStatusLookupFailed(
|
|
27469
|
+
new Error("relay has not delivered the intent to the hub yet"),
|
|
27470
|
+
key.srcChainKey,
|
|
27471
|
+
missReason
|
|
27472
|
+
)
|
|
27473
|
+
};
|
|
27474
|
+
}
|
|
27475
|
+
hubTxHash = delivered.dst_tx_hash;
|
|
27476
|
+
}
|
|
27477
|
+
if (isHex(hubTxHash)) return { ok: true, value: hubTxHash };
|
|
27478
|
+
return {
|
|
27479
|
+
ok: false,
|
|
27480
|
+
error: this.detailedStatusLookupFailed(
|
|
27481
|
+
new Error(`hub tx hash is not a hex string: ${hubTxHash}`),
|
|
27482
|
+
key.srcChainKey
|
|
27483
|
+
)
|
|
27484
|
+
};
|
|
27485
|
+
}
|
|
27486
|
+
/**
|
|
27487
|
+
* `reason` is set only for {@link DETAILED_STATUS_NOT_DELIVERED} — the miss a caller can bound
|
|
27488
|
+
* with a retry budget. Leaving it off marks a dependency that is failing right now, which a
|
|
27489
|
+
* caller should keep retrying rather than give up on.
|
|
27490
|
+
*/
|
|
27491
|
+
detailedStatusLookupFailed(cause, srcChainKey, reason) {
|
|
27492
|
+
return lookupFailed("swap", "getDetailedStatus", cause, { srcChainKey, action: "swap", reason });
|
|
27184
27493
|
}
|
|
27185
27494
|
/**
|
|
27186
27495
|
* Notifies the solver API that an intent has been registered on the hub chain, triggering
|
|
@@ -30495,7 +30804,7 @@ var SwapsApiService = class _SwapsApiService {
|
|
|
30495
30804
|
if (error.code === "VALIDATION_ERROR" && error.context.issues !== void 0) {
|
|
30496
30805
|
context.reason = "invalid_response_shape";
|
|
30497
30806
|
const issues = error.context.issues;
|
|
30498
|
-
context.issues = issues instanceof
|
|
30807
|
+
context.issues = issues instanceof v.ValiError ? v.flatten(issues.issues) : issues;
|
|
30499
30808
|
}
|
|
30500
30809
|
if (error.context.status !== void 0) context.status = error.context.status;
|
|
30501
30810
|
}
|
|
@@ -30670,21 +30979,21 @@ var SwapsApiService = class _SwapsApiService {
|
|
|
30670
30979
|
return this.config.timeout ?? DEFAULT_BACKEND_API_TIMEOUT;
|
|
30671
30980
|
}
|
|
30672
30981
|
};
|
|
30673
|
-
var StellarSponsorConfigSchema =
|
|
30674
|
-
sponsorAccount:
|
|
30675
|
-
networkPassphrase:
|
|
30676
|
-
minTotalFeeStroops:
|
|
30677
|
-
maxTotalFeeStroops:
|
|
30678
|
-
operationCount:
|
|
30679
|
-
minPerOperationFeeStroops:
|
|
30680
|
-
maxPerOperationFeeStroops:
|
|
30681
|
-
recommendedPerOperationFeeStroops:
|
|
30682
|
-
maxTimeboundSeconds:
|
|
30683
|
-
requiredStartingBalance:
|
|
30982
|
+
var StellarSponsorConfigSchema = v.object({
|
|
30983
|
+
sponsorAccount: v.string(),
|
|
30984
|
+
networkPassphrase: v.string(),
|
|
30985
|
+
minTotalFeeStroops: v.string(),
|
|
30986
|
+
maxTotalFeeStroops: v.string(),
|
|
30987
|
+
operationCount: v.number(),
|
|
30988
|
+
minPerOperationFeeStroops: v.string(),
|
|
30989
|
+
maxPerOperationFeeStroops: v.string(),
|
|
30990
|
+
recommendedPerOperationFeeStroops: v.string(),
|
|
30991
|
+
maxTimeboundSeconds: v.number(),
|
|
30992
|
+
requiredStartingBalance: v.string()
|
|
30684
30993
|
});
|
|
30685
|
-
var StellarSponsoredAccountResponseSchema =
|
|
30686
|
-
|
|
30687
|
-
|
|
30994
|
+
var StellarSponsoredAccountResponseSchema = v.variant("alreadyActive", [
|
|
30995
|
+
v.object({ hash: v.string(), alreadyActive: v.literal(false) }),
|
|
30996
|
+
v.object({ hash: v.null(), alreadyActive: v.literal(true) })
|
|
30688
30997
|
]);
|
|
30689
30998
|
|
|
30690
30999
|
// src/backendApi/SponsoringApiService.ts
|
|
@@ -30712,7 +31021,7 @@ var SponsoringApiService = class {
|
|
|
30712
31021
|
logger: this.logger,
|
|
30713
31022
|
serviceLabel: "SponsoringApiService"
|
|
30714
31023
|
});
|
|
30715
|
-
const parsed =
|
|
31024
|
+
const parsed = v.safeParse(schema, raw);
|
|
30716
31025
|
if (!parsed.success) {
|
|
30717
31026
|
return {
|
|
30718
31027
|
ok: false,
|
|
@@ -30720,7 +31029,7 @@ var SponsoringApiService = class {
|
|
|
30720
31029
|
api: "sponsoring",
|
|
30721
31030
|
feature: "backend",
|
|
30722
31031
|
endpoint,
|
|
30723
|
-
issues:
|
|
31032
|
+
issues: v.flatten(parsed.issues)
|
|
30724
31033
|
})
|
|
30725
31034
|
};
|
|
30726
31035
|
}
|
|
@@ -30758,141 +31067,141 @@ var SponsoringApiService = class {
|
|
|
30758
31067
|
return this.config.baseURL;
|
|
30759
31068
|
}
|
|
30760
31069
|
};
|
|
30761
|
-
var RelayExtraDataResponseSchema =
|
|
30762
|
-
address:
|
|
30763
|
-
payload:
|
|
31070
|
+
var RelayExtraDataResponseSchema = v.object({
|
|
31071
|
+
address: v.string(),
|
|
31072
|
+
payload: v.string()
|
|
30764
31073
|
});
|
|
30765
|
-
var BridgeTokenSchema =
|
|
30766
|
-
symbol:
|
|
30767
|
-
name:
|
|
30768
|
-
decimals:
|
|
30769
|
-
address:
|
|
30770
|
-
chainKey:
|
|
30771
|
-
hubAsset:
|
|
30772
|
-
vault:
|
|
31074
|
+
var BridgeTokenSchema = v.object({
|
|
31075
|
+
symbol: v.string(),
|
|
31076
|
+
name: v.string(),
|
|
31077
|
+
decimals: v.number(),
|
|
31078
|
+
address: v.string(),
|
|
31079
|
+
chainKey: v.string(),
|
|
31080
|
+
hubAsset: v.string(),
|
|
31081
|
+
vault: v.string()
|
|
30773
31082
|
});
|
|
30774
|
-
var BridgeTokensResponseSchema =
|
|
30775
|
-
var BridgeTokensByChainResponseSchema =
|
|
30776
|
-
var BridgeAllowanceCheckResponseSchema =
|
|
30777
|
-
valid:
|
|
31083
|
+
var BridgeTokensResponseSchema = v.record(v.string(), v.array(BridgeTokenSchema));
|
|
31084
|
+
var BridgeTokensByChainResponseSchema = v.array(BridgeTokenSchema);
|
|
31085
|
+
var BridgeAllowanceCheckResponseSchema = v.object({
|
|
31086
|
+
valid: v.boolean()
|
|
30778
31087
|
});
|
|
30779
|
-
var makeBridgeApproveResponseSchema = (txSchema) =>
|
|
30780
|
-
var makeCreateBridgeIntentResponseSchema = (txSchema) =>
|
|
31088
|
+
var makeBridgeApproveResponseSchema = (txSchema) => v.object({ tx: txSchema });
|
|
31089
|
+
var makeCreateBridgeIntentResponseSchema = (txSchema) => v.object({
|
|
30781
31090
|
tx: txSchema,
|
|
30782
31091
|
relayData: RelayExtraDataResponseSchema
|
|
30783
31092
|
});
|
|
30784
|
-
var BridgeSubmitTxResponseSchema =
|
|
30785
|
-
success:
|
|
30786
|
-
data:
|
|
30787
|
-
status:
|
|
30788
|
-
message:
|
|
31093
|
+
var BridgeSubmitTxResponseSchema = v.object({
|
|
31094
|
+
success: v.boolean(),
|
|
31095
|
+
data: v.object({
|
|
31096
|
+
status: v.picklist(["inserted", "duplicate"]),
|
|
31097
|
+
message: v.string()
|
|
30789
31098
|
})
|
|
30790
31099
|
});
|
|
30791
|
-
var BridgePacketDataSchema =
|
|
30792
|
-
src_chain_id:
|
|
30793
|
-
src_tx_hash:
|
|
30794
|
-
src_address:
|
|
30795
|
-
status:
|
|
30796
|
-
dst_chain_id:
|
|
30797
|
-
conn_sn:
|
|
30798
|
-
dst_address:
|
|
30799
|
-
dst_tx_hash:
|
|
30800
|
-
signatures:
|
|
30801
|
-
payload:
|
|
31100
|
+
var BridgePacketDataSchema = v.object({
|
|
31101
|
+
src_chain_id: v.number(),
|
|
31102
|
+
src_tx_hash: v.string(),
|
|
31103
|
+
src_address: v.string(),
|
|
31104
|
+
status: v.picklist(["pending", "validating", "executing", "executed"]),
|
|
31105
|
+
dst_chain_id: v.number(),
|
|
31106
|
+
conn_sn: v.number(),
|
|
31107
|
+
dst_address: v.string(),
|
|
31108
|
+
dst_tx_hash: v.string(),
|
|
31109
|
+
signatures: v.array(v.string()),
|
|
31110
|
+
payload: v.string()
|
|
30802
31111
|
});
|
|
30803
|
-
var BridgeSubmitTxStatusResultSchema =
|
|
30804
|
-
dstIntentTxHash:
|
|
30805
|
-
packetData:
|
|
31112
|
+
var BridgeSubmitTxStatusResultSchema = v.object({
|
|
31113
|
+
dstIntentTxHash: v.string(),
|
|
31114
|
+
packetData: v.optional(BridgePacketDataSchema)
|
|
30806
31115
|
});
|
|
30807
|
-
var BridgeSubmitTxStatusDataSchema =
|
|
30808
|
-
txHash:
|
|
30809
|
-
srcChainKey:
|
|
30810
|
-
status:
|
|
30811
|
-
failedAtStep:
|
|
30812
|
-
failureReason:
|
|
30813
|
-
processingAttempts:
|
|
30814
|
-
abandonedAt:
|
|
30815
|
-
result:
|
|
30816
|
-
userMessage:
|
|
31116
|
+
var BridgeSubmitTxStatusDataSchema = v.object({
|
|
31117
|
+
txHash: v.string(),
|
|
31118
|
+
srcChainKey: v.string(),
|
|
31119
|
+
status: v.string(),
|
|
31120
|
+
failedAtStep: v.optional(v.string()),
|
|
31121
|
+
failureReason: v.optional(v.string()),
|
|
31122
|
+
processingAttempts: v.number(),
|
|
31123
|
+
abandonedAt: v.optional(v.string()),
|
|
31124
|
+
result: v.optional(BridgeSubmitTxStatusResultSchema),
|
|
31125
|
+
userMessage: v.optional(v.string())
|
|
30817
31126
|
});
|
|
30818
|
-
var BridgeSubmitTxStatusResponseSchema =
|
|
30819
|
-
success:
|
|
31127
|
+
var BridgeSubmitTxStatusResponseSchema = v.object({
|
|
31128
|
+
success: v.boolean(),
|
|
30820
31129
|
data: BridgeSubmitTxStatusDataSchema
|
|
30821
31130
|
});
|
|
30822
|
-
var BridgeFeeResponseSchema =
|
|
30823
|
-
var BridgeLimitSchema =
|
|
30824
|
-
amount:
|
|
30825
|
-
decimals:
|
|
30826
|
-
type:
|
|
31131
|
+
var BridgeFeeResponseSchema = v.object({ fee: v.string() });
|
|
31132
|
+
var BridgeLimitSchema = v.object({
|
|
31133
|
+
amount: v.string(),
|
|
31134
|
+
decimals: v.number(),
|
|
31135
|
+
type: v.picklist(["DEPOSIT_LIMIT", "WITHDRAWAL_LIMIT"])
|
|
30827
31136
|
});
|
|
30828
|
-
var BridgeableAmountResponseSchema =
|
|
30829
|
-
var BridgeableCheckResponseSchema =
|
|
30830
|
-
var
|
|
30831
|
-
var HexSchema =
|
|
30832
|
-
var BigintFromString =
|
|
30833
|
-
var BytesFromIndexRecord =
|
|
30834
|
-
|
|
30835
|
-
|
|
31137
|
+
var BridgeableAmountResponseSchema = v.object({ limit: BridgeLimitSchema });
|
|
31138
|
+
var BridgeableCheckResponseSchema = v.object({ bridgeable: v.boolean() });
|
|
31139
|
+
var AddressSchema2 = v.custom((input) => typeof input === "string");
|
|
31140
|
+
var HexSchema = v.custom((input) => typeof input === "string");
|
|
31141
|
+
var BigintFromString = v.pipe(v.string(), v.toBigint());
|
|
31142
|
+
var BytesFromIndexRecord = v.pipe(
|
|
31143
|
+
v.record(v.string(), v.number()),
|
|
31144
|
+
v.transform((indexed) => Uint8Array.from(Object.values(indexed)))
|
|
30836
31145
|
);
|
|
30837
|
-
var EvmRawTxSchema =
|
|
30838
|
-
from:
|
|
30839
|
-
to:
|
|
31146
|
+
var EvmRawTxSchema = v.object({
|
|
31147
|
+
from: AddressSchema2,
|
|
31148
|
+
to: AddressSchema2,
|
|
30840
31149
|
value: BigintFromString,
|
|
30841
31150
|
data: HexSchema
|
|
30842
31151
|
});
|
|
30843
|
-
var SolanaRawTxSchema =
|
|
30844
|
-
from:
|
|
30845
|
-
to:
|
|
31152
|
+
var SolanaRawTxSchema = v.object({
|
|
31153
|
+
from: v.string(),
|
|
31154
|
+
to: v.string(),
|
|
30846
31155
|
value: BigintFromString,
|
|
30847
|
-
data:
|
|
31156
|
+
data: v.string()
|
|
30848
31157
|
});
|
|
30849
|
-
var SuiRawTxSchema =
|
|
31158
|
+
var SuiRawTxSchema = v.object({
|
|
30850
31159
|
from: HexSchema,
|
|
30851
|
-
to:
|
|
31160
|
+
to: v.string(),
|
|
30852
31161
|
value: BigintFromString,
|
|
30853
|
-
data:
|
|
31162
|
+
data: v.string()
|
|
30854
31163
|
});
|
|
30855
|
-
var StellarRawTxSchema =
|
|
30856
|
-
from:
|
|
30857
|
-
to:
|
|
31164
|
+
var StellarRawTxSchema = v.object({
|
|
31165
|
+
from: v.string(),
|
|
31166
|
+
to: v.string(),
|
|
30858
31167
|
value: BigintFromString,
|
|
30859
|
-
data:
|
|
31168
|
+
data: v.string()
|
|
30860
31169
|
});
|
|
30861
|
-
var BitcoinRawTxSchema =
|
|
30862
|
-
from:
|
|
30863
|
-
to:
|
|
31170
|
+
var BitcoinRawTxSchema = v.object({
|
|
31171
|
+
from: v.string(),
|
|
31172
|
+
to: v.string(),
|
|
30864
31173
|
value: BigintFromString,
|
|
30865
|
-
data:
|
|
31174
|
+
data: v.string()
|
|
30866
31175
|
});
|
|
30867
|
-
var InjectiveRawTxSchema =
|
|
31176
|
+
var InjectiveRawTxSchema = v.object({
|
|
30868
31177
|
from: HexSchema,
|
|
30869
31178
|
to: HexSchema,
|
|
30870
|
-
signedDoc:
|
|
31179
|
+
signedDoc: v.object({
|
|
30871
31180
|
bodyBytes: BytesFromIndexRecord,
|
|
30872
31181
|
authInfoBytes: BytesFromIndexRecord,
|
|
30873
|
-
chainId:
|
|
31182
|
+
chainId: v.string(),
|
|
30874
31183
|
accountNumber: BigintFromString
|
|
30875
31184
|
})
|
|
30876
31185
|
});
|
|
30877
|
-
var NearRawTxSchema =
|
|
30878
|
-
signerId:
|
|
30879
|
-
params:
|
|
30880
|
-
contractId:
|
|
30881
|
-
method:
|
|
30882
|
-
args:
|
|
30883
|
-
gas:
|
|
30884
|
-
deposit:
|
|
31186
|
+
var NearRawTxSchema = v.object({
|
|
31187
|
+
signerId: v.string(),
|
|
31188
|
+
params: v.object({
|
|
31189
|
+
contractId: v.string(),
|
|
31190
|
+
method: v.string(),
|
|
31191
|
+
args: v.custom((input) => typeof input === "object" && input !== null),
|
|
31192
|
+
gas: v.optional(BigintFromString),
|
|
31193
|
+
deposit: v.optional(BigintFromString)
|
|
30885
31194
|
})
|
|
30886
31195
|
});
|
|
30887
|
-
var IconRawTxSchema =
|
|
30888
|
-
|
|
30889
|
-
|
|
31196
|
+
var IconRawTxSchema = v.record(
|
|
31197
|
+
v.string(),
|
|
31198
|
+
v.union([v.string(), v.custom((input) => typeof input === "object" && input !== null)])
|
|
30890
31199
|
);
|
|
30891
|
-
var StacksRawTxSchema =
|
|
30892
|
-
payload:
|
|
30893
|
-
estimatedLength:
|
|
31200
|
+
var StacksRawTxSchema = v.object({
|
|
31201
|
+
payload: v.string(),
|
|
31202
|
+
estimatedLength: v.optional(v.number())
|
|
30894
31203
|
});
|
|
30895
|
-
var AnyRawTxSchema =
|
|
31204
|
+
var AnyRawTxSchema = v.custom((input) => typeof input === "object" && input !== null);
|
|
30896
31205
|
function rawTxSchemaForChainKey(chainKey) {
|
|
30897
31206
|
let chainType;
|
|
30898
31207
|
try {
|
|
@@ -30971,13 +31280,13 @@ var BridgeApiService = class {
|
|
|
30971
31280
|
logger: this.logger,
|
|
30972
31281
|
serviceLabel: "BridgeApiService"
|
|
30973
31282
|
});
|
|
30974
|
-
const parsed =
|
|
31283
|
+
const parsed = v.safeParse(schema, raw);
|
|
30975
31284
|
if (!parsed.success) {
|
|
30976
31285
|
return {
|
|
30977
31286
|
ok: false,
|
|
30978
31287
|
error: new SodaxError("EXTERNAL_API_ERROR", `Invalid response shape from bridge API for ${endpoint}`, {
|
|
30979
31288
|
feature: "backend",
|
|
30980
|
-
context: { api: "bridge", endpoint, reason: "invalid_response_shape", issues:
|
|
31289
|
+
context: { api: "bridge", endpoint, reason: "invalid_response_shape", issues: v.flatten(parsed.issues) }
|
|
30981
31290
|
})
|
|
30982
31291
|
};
|
|
30983
31292
|
}
|
|
@@ -31172,137 +31481,6 @@ var BridgeApiService = class {
|
|
|
31172
31481
|
return this.config.timeout;
|
|
31173
31482
|
}
|
|
31174
31483
|
};
|
|
31175
|
-
var ChainKeySchema = v7.custom((input) => typeof input === "string");
|
|
31176
|
-
var SpokeChainKeySchema = v7.custom((input) => typeof input === "string");
|
|
31177
|
-
var AddressSchema2 = v7.custom((input) => typeof input === "string");
|
|
31178
|
-
var XTokenSchema = v7.object({
|
|
31179
|
-
symbol: v7.string(),
|
|
31180
|
-
name: v7.string(),
|
|
31181
|
-
decimals: v7.number(),
|
|
31182
|
-
address: v7.string(),
|
|
31183
|
-
chainKey: ChainKeySchema,
|
|
31184
|
-
hubAsset: AddressSchema2,
|
|
31185
|
-
vault: AddressSchema2,
|
|
31186
|
-
access: v7.optional(v7.picklist(["withdrawOnly", "depositOnly"]))
|
|
31187
|
-
});
|
|
31188
|
-
var IntentStructSchema = v7.object({
|
|
31189
|
-
intentId: v7.string(),
|
|
31190
|
-
creator: v7.string(),
|
|
31191
|
-
inputToken: v7.string(),
|
|
31192
|
-
outputToken: v7.string(),
|
|
31193
|
-
inputAmount: v7.string(),
|
|
31194
|
-
minOutputAmount: v7.string(),
|
|
31195
|
-
deadline: v7.string(),
|
|
31196
|
-
allowPartialFill: v7.boolean(),
|
|
31197
|
-
srcChain: v7.number(),
|
|
31198
|
-
dstChain: v7.number(),
|
|
31199
|
-
srcAddress: v7.string(),
|
|
31200
|
-
dstAddress: v7.string(),
|
|
31201
|
-
solver: v7.string(),
|
|
31202
|
-
data: v7.string()
|
|
31203
|
-
});
|
|
31204
|
-
var IntentResponseSchema = v7.object({
|
|
31205
|
-
intentHash: v7.string(),
|
|
31206
|
-
txHash: v7.string(),
|
|
31207
|
-
logIndex: v7.number(),
|
|
31208
|
-
chainId: v7.number(),
|
|
31209
|
-
blockNumber: v7.number(),
|
|
31210
|
-
open: v7.boolean(),
|
|
31211
|
-
intent: IntentStructSchema,
|
|
31212
|
-
events: v7.array(v7.unknown())
|
|
31213
|
-
});
|
|
31214
|
-
var UserIntentsResponseSchema = v7.object({
|
|
31215
|
-
total: v7.number(),
|
|
31216
|
-
offset: v7.number(),
|
|
31217
|
-
limit: v7.number(),
|
|
31218
|
-
items: v7.array(IntentResponseSchema)
|
|
31219
|
-
});
|
|
31220
|
-
var OrderbookResponseSchema = v7.object({
|
|
31221
|
-
total: v7.number(),
|
|
31222
|
-
data: v7.array(
|
|
31223
|
-
v7.object({
|
|
31224
|
-
intentState: v7.object({
|
|
31225
|
-
exists: v7.boolean(),
|
|
31226
|
-
remainingInput: v7.string(),
|
|
31227
|
-
receivedOutput: v7.string(),
|
|
31228
|
-
pendingPayment: v7.boolean()
|
|
31229
|
-
}),
|
|
31230
|
-
intentData: v7.object({
|
|
31231
|
-
intentId: v7.string(),
|
|
31232
|
-
creator: v7.string(),
|
|
31233
|
-
inputToken: v7.string(),
|
|
31234
|
-
outputToken: v7.string(),
|
|
31235
|
-
inputAmount: v7.string(),
|
|
31236
|
-
minOutputAmount: v7.string(),
|
|
31237
|
-
deadline: v7.string(),
|
|
31238
|
-
allowPartialFill: v7.boolean(),
|
|
31239
|
-
srcChain: v7.number(),
|
|
31240
|
-
dstChain: v7.number(),
|
|
31241
|
-
srcAddress: v7.string(),
|
|
31242
|
-
dstAddress: v7.string(),
|
|
31243
|
-
solver: v7.string(),
|
|
31244
|
-
data: v7.string(),
|
|
31245
|
-
intentHash: v7.string(),
|
|
31246
|
-
txHash: v7.string(),
|
|
31247
|
-
blockNumber: v7.number()
|
|
31248
|
-
})
|
|
31249
|
-
})
|
|
31250
|
-
)
|
|
31251
|
-
});
|
|
31252
|
-
var MoneyMarketPositionSchema = v7.object({
|
|
31253
|
-
userAddress: v7.string(),
|
|
31254
|
-
positions: v7.array(
|
|
31255
|
-
v7.object({
|
|
31256
|
-
reserveAddress: v7.string(),
|
|
31257
|
-
aTokenAddress: v7.string(),
|
|
31258
|
-
variableDebtTokenAddress: v7.string(),
|
|
31259
|
-
aTokenBalance: v7.string(),
|
|
31260
|
-
variableDebtTokenBalance: v7.string(),
|
|
31261
|
-
blockNumber: v7.number()
|
|
31262
|
-
})
|
|
31263
|
-
)
|
|
31264
|
-
});
|
|
31265
|
-
var MoneyMarketAssetSchema = v7.object({
|
|
31266
|
-
reserveAddress: v7.string(),
|
|
31267
|
-
aTokenAddress: v7.string(),
|
|
31268
|
-
totalATokenBalance: v7.string(),
|
|
31269
|
-
variableDebtTokenAddress: v7.string(),
|
|
31270
|
-
totalVariableDebtTokenBalance: v7.string(),
|
|
31271
|
-
liquidityRate: v7.string(),
|
|
31272
|
-
symbol: v7.string(),
|
|
31273
|
-
totalSuppliers: v7.number(),
|
|
31274
|
-
totalBorrowers: v7.number(),
|
|
31275
|
-
variableBorrowRate: v7.string(),
|
|
31276
|
-
stableBorrowRate: v7.string(),
|
|
31277
|
-
liquidityIndex: v7.string(),
|
|
31278
|
-
variableBorrowIndex: v7.string(),
|
|
31279
|
-
blockNumber: v7.number()
|
|
31280
|
-
});
|
|
31281
|
-
var MoneyMarketAssetsSchema = v7.array(MoneyMarketAssetSchema);
|
|
31282
|
-
var MoneyMarketAssetBorrowersSchema = v7.object({
|
|
31283
|
-
borrowers: v7.array(v7.string()),
|
|
31284
|
-
total: v7.number(),
|
|
31285
|
-
offset: v7.number(),
|
|
31286
|
-
limit: v7.number()
|
|
31287
|
-
});
|
|
31288
|
-
var MoneyMarketAssetSuppliersSchema = v7.object({
|
|
31289
|
-
suppliers: v7.array(v7.string()),
|
|
31290
|
-
total: v7.number(),
|
|
31291
|
-
offset: v7.number(),
|
|
31292
|
-
limit: v7.number()
|
|
31293
|
-
});
|
|
31294
|
-
var MoneyMarketBorrowersSchema = v7.object({
|
|
31295
|
-
borrowers: v7.array(v7.string()),
|
|
31296
|
-
total: v7.number(),
|
|
31297
|
-
offset: v7.number(),
|
|
31298
|
-
limit: v7.number()
|
|
31299
|
-
});
|
|
31300
|
-
var GetChainsResponseSchema = v7.array(SpokeChainKeySchema);
|
|
31301
|
-
var TokensByChainMapSchema = v7.custom(
|
|
31302
|
-
(input) => typeof input === "object" && input !== null && Object.values(input).every((tokens) => Array.isArray(tokens) && tokens.every((t) => v7.is(XTokenSchema, t)))
|
|
31303
|
-
);
|
|
31304
|
-
var TokensListSchema = v7.array(XTokenSchema);
|
|
31305
|
-
var ReserveAssetsSchema = v7.array(AddressSchema2);
|
|
31306
31484
|
|
|
31307
31485
|
// src/backendApi/BackendApiService.ts
|
|
31308
31486
|
var BackendApiService = class {
|
|
@@ -31315,6 +31493,15 @@ var BackendApiService = class {
|
|
|
31315
31493
|
config;
|
|
31316
31494
|
headers;
|
|
31317
31495
|
logger;
|
|
31496
|
+
/**
|
|
31497
|
+
* The resolved request timeout. Exposed so a caller wanting a *shorter* per-call budget can clamp
|
|
31498
|
+
* to it: a `RequestOverrideConfig.timeout` replaces the configured value rather than capping it,
|
|
31499
|
+
* so passing a fixed override would silently lengthen requests for a consumer who configured a
|
|
31500
|
+
* stricter timeout.
|
|
31501
|
+
*/
|
|
31502
|
+
get requestTimeoutMs() {
|
|
31503
|
+
return this.config.timeout;
|
|
31504
|
+
}
|
|
31318
31505
|
/**
|
|
31319
31506
|
* Whether a legacy `/be` suffix is trimmed off a per-call `baseURL` override. Mirrors the config-level
|
|
31320
31507
|
* decision: an explicit `basePath` means the consumer writes complete roots, so their per-call value is
|
|
@@ -31385,7 +31572,7 @@ var BackendApiService = class {
|
|
|
31385
31572
|
async request(endpoint, config, schema) {
|
|
31386
31573
|
try {
|
|
31387
31574
|
const raw = await this.send(endpoint, config);
|
|
31388
|
-
const parsed =
|
|
31575
|
+
const parsed = v.safeParse(schema, raw);
|
|
31389
31576
|
if (!parsed.success) {
|
|
31390
31577
|
return {
|
|
31391
31578
|
ok: false,
|
|
@@ -31393,7 +31580,7 @@ var BackendApiService = class {
|
|
|
31393
31580
|
api: "backend",
|
|
31394
31581
|
feature: "backend",
|
|
31395
31582
|
endpoint,
|
|
31396
|
-
issues:
|
|
31583
|
+
issues: v.flatten(parsed.issues)
|
|
31397
31584
|
})
|
|
31398
31585
|
};
|
|
31399
31586
|
}
|
|
@@ -40615,7 +40802,7 @@ var LeverageYieldService = class {
|
|
|
40615
40802
|
}
|
|
40616
40803
|
/** Looks up a vault by its `name` field. Returns `undefined` when not registered. */
|
|
40617
40804
|
getVault(name) {
|
|
40618
|
-
return this.listVaults().find((
|
|
40805
|
+
return this.listVaults().find((v10) => v10.name === name);
|
|
40619
40806
|
}
|
|
40620
40807
|
/**
|
|
40621
40808
|
* Looks up a registered vault by its on-chain proxy address (case-insensitive).
|
|
@@ -40623,7 +40810,7 @@ var LeverageYieldService = class {
|
|
|
40623
40810
|
*/
|
|
40624
40811
|
getVaultByAddress(address) {
|
|
40625
40812
|
const normalized = address.toLowerCase();
|
|
40626
|
-
return this.listVaults().find((
|
|
40813
|
+
return this.listVaults().find((v10) => v10.vault.toLowerCase() === normalized);
|
|
40627
40814
|
}
|
|
40628
40815
|
/**
|
|
40629
40816
|
* Resolves the intent `deadline`: returns the caller-supplied value verbatim, otherwise
|
|
@@ -42180,4 +42367,4 @@ var isPartnerError = isCodeMember(PARTNER_CODES);
|
|
|
42180
42367
|
(*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
42181
42368
|
*/
|
|
42182
42369
|
|
|
42183
|
-
export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, AssetService, BACKEND_API_BASE_PATH, BITCOIN_CHAIN_KEYS, BITCOIN_CHAIN_KEYS_SET, BITCOIN_DUST_SATS, BTC_WALLET_ADDRESS_TYPES, BackendApiService, BackendHttpError, BalnSwapService, BigIntToHex, BigNumberZeroDecimal, BitcoinSpokeService, BnUSDMigrationService, BridgeApiService, BridgeService, CHAIN_KEYS, CHAIN_LOGO_BASE_URL, CONFIG_VERSION, CREATE_INTENT_CODES, ChainKeys, ChainTypeArr, ClService, ConfigService, CustomSorobanServer, CustomStellarAccount, DEFAULT_API_BASE_URL, DEFAULT_BACKEND_API_ENDPOINT, DEFAULT_BACKEND_API_HEADERS, DEFAULT_BACKEND_API_TIMEOUT, DEFAULT_DEADLINE_OFFSET, DEFAULT_MAX_RETRY, DEFAULT_RELAYER_API_ENDPOINT, DEFAULT_RELAY_TX_TIMEOUT, DEFAULT_RETRY_DELAY_MS, DEFAULT_SPONSORING_API_ENDPOINT, DexService, EVM_CHAIN_ID_TO_KEY, EVM_CHAIN_KEYS, EVM_CHAIN_KEYS_SET, EVM_SPOKE_ONLY_CHAIN_KEYS, EVM_SPOKE_ONLY_CHAIN_KEYS_SET, Erc20Service, Erc4626Service, EvmAssetManagerService, EvmHubProvider, EvmSolverService, EvmSpokeService, EvmVaultTokenService, FEE_PERCENTAGE_SCALE, GAS_ESTIMATION_CODES, HALF_RAY, HALF_WAD, HUB_CHAIN_KEY, HookKind, HookService, HttpRelayError, HubVaultSymbols, ICON_CHAIN_KEYS, ICON_CHAIN_KEYS_SET, ICON_TX_RESULT_WAIT_MAX_RETRY, INJECTIVE_CHAIN_KEYS, INJECTIVE_CHAIN_KEYS_SET, INTENT_CHAIN_IDS, IconSpokeService, IcxMigrationService, Injective20Token, InjectiveSpokeService, IntentCreatedEventAbi, IntentDataService, IntentDataType, IntentFilledEventAbi, IntentRelayChainIdToChainKey, IntentsAbi, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, LeverageYieldService, LockupMultiplier, LockupPeriod, LsodaSymbols, LsodaTokens, MAX_UINT256, MigrationService, MintPositionEventAbi, MoneyMarketDataService, MoneyMarketService, NEAR_CHAIN_KEYS, NEAR_CHAIN_KEYS_SET, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, PartnerFeeClaimService, PartnerService, Permit2Service, ProtocolIntentsAbi, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RELAY_FALLBACK_FLOOR_MS, RadfiApiError, RadfiProvider, RecoveryService, RelayChainIdMap, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, SOLANA_CHAIN_KEYS, SOLANA_CHAIN_KEYS_SET, SONIC_CHAIN_KEYS, SONIC_CHAIN_KEYS_SET, SPONSORING_API_ERROR_CODES, SPONSORING_API_STELLAR_BASE_PATH, SPONSOR_CONFIG_TTL_MS, STACKS_CHAIN_KEYS, STACKS_CHAIN_KEYS_SET, STELLAR_BASE_RESERVE_TTL_MS, STELLAR_CHAIN_KEYS, STELLAR_CHAIN_KEYS_SET, STELLAR_TRUSTLINE_MIN_XLM_STROOPS, SUI_CHAIN_KEYS, SUI_CHAIN_KEYS_SET, SodaTokens, Sodax, SodaxError, SolanaSpokeService, SolverApiService, SolverIntentErrorCode, SolverIntentStatusCode, SonicSpokeService, SpokeService, SponsoringApiService, SponsoringService, StacksSpokeService, StakingLogic, StakingService, StatATokenAddresses, StellarSpokeService, SuiSpokeService, SupportedMigrationTokens, SwapService, SwapsApiService, TOKEN_LOGO_BASE_URL, USD_DECIMALS, UiPoolDataProviderService, VAULT_TOKEN_DECIMALS, WAD, WAD_RAY_RATIO, WEI_DECIMALS, adjustAmountByFee, allowanceCheckFailed, apiConfig, approveFailed, arbitrumSupportedTokens, assetManagerAbi, avalancheSupportedTokens, balnSwapAbi, baseChainInfo, baseSupportedTokens, binomialApproximatedRayPow, bitcoinSupportedTokens, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bridgeConfig, bridgeInvariant, bscSupportedTokens, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, classifySponsorError, concentratedLiquidityConfig, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createInvariant, deepMerge, defaultHookAbi, detectBitcoinAddressType, dexConfig, dexInvariant, dexPools, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, erc20Abi, erc4626Abi, estimateBitcoinTxSize, ethereumSupportedTokens, executionFailed, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getChainKeyFromRelayChainId, getChainType, getCompoundedBalance, getConcentratedLiquidityConfig, getConnectionIdl, getConnectionProgram, getEvmChainKeyByChainId, getEvmViemChain, getIconAddressBytes, getIntentRelayChainId, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getSolverConfig, getSpokeHook, getSpokeHooks, getStagingSolverTokens, getSupportedSolverTokens, getTransactionPackets, getbnUSDToken, hederaSupportedTokens, hexToBigInt, hexToSolanaAddress, hubConfig, hyper, hyperevmSupportedTokens, iconSupportedTokens, injectiveSupportedTokens, intentCreationFailed, isBackendHttpError, isBalnMigrateParams, isBitcoinChainKey, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexApproveError, isDexCreateIntentError, isDexError, isEvmChainKey, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKey, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isHookSupportedToken, isHubChainKey, isHubChainKeyType, isIconAddress, isIconChainKey, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKey, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNativeBitcoinToken, isNativeBitcoinTransfer, isNativeToken, isNearChainKey, isNearChainKeyType, isNewbnUSDChainId, isNewbnUSDToken, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKey, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKey, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeChainKey, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isSponsoringConfigError, isSponsoringLookupError, isSponsoringOrchestrationError, isStacksChainKey, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKey, isStellarChainKeyType, isStellarWalletProviderType, isSuiChainKey, isSuiChainKeyType, isSupportedBitcoinAddressType, isSwapCreateIntentError, isSwapError, isSwapSupportedToken, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, isValidWalletProviderForChainKey, kaiaSupportedTokens, leverageYieldConfig, leverageYieldInvariant, leverageYieldVaults, lightlinkSupportedTokens, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, moneyMarketConfig, moneyMarketReserveAssets, moneyMarketSupportedTokens, nativeToUSD, nearSupportedTokens, newbnUSDSpokeChainIds, noopAnalytics, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, optimismSupportedTokens, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, polygonSupportedTokens, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, redbellySupportedTokens, relayConfig, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, resolveAnalytics, resolveLogger, retry, reverseEncodeAddress, serializeAddressData, silentLogger, sleep, sodaxConfig, sodaxInvariant, solanaSupportedTokens, solverConfig, sonicSupportedTokens, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, spokeChainKeysSet, spokeHooks, sponsoringInvariant, stacksSupportedTokens, stagingSwapSupportedTokens, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, stellarSupportedTokens, submitTransaction, suiSupportedTokens, supportedSpokeChains, supportedTokensByChain, swapExactInSingleParamsAbi, swapInvariant, swapSupportedTokens, swapsConfig, toCreateBridgeIntentParamsV2, tokenLogo, tokenLogoSlug, uiPoolDataAbi, universalRouterAbi, unknownFailed, usesBip322MessageSigning, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|
|
42370
|
+
export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, AssetService, BACKEND_API_BASE_PATH, BITCOIN_CHAIN_KEYS, BITCOIN_CHAIN_KEYS_SET, BITCOIN_DUST_SATS, BTC_WALLET_ADDRESS_TYPES, BackendApiService, BackendHttpError, BalnSwapService, BigIntToHex, BigNumberZeroDecimal, BitcoinSpokeService, BnUSDMigrationService, BridgeApiService, BridgeService, CHAIN_KEYS, CHAIN_LOGO_BASE_URL, CONFIG_VERSION, CREATE_INTENT_CODES, ChainKeys, ChainTypeArr, ClService, ConfigService, CustomSorobanServer, CustomStellarAccount, DEFAULT_API_BASE_URL, DEFAULT_BACKEND_API_ENDPOINT, DEFAULT_BACKEND_API_HEADERS, DEFAULT_BACKEND_API_TIMEOUT, DEFAULT_DEADLINE_OFFSET, DEFAULT_MAX_RETRY, DEFAULT_RELAYER_API_ENDPOINT, DEFAULT_RELAY_TX_TIMEOUT, DEFAULT_RETRY_DELAY_MS, DEFAULT_SPONSORING_API_ENDPOINT, DETAILED_STATUS_NOT_DELIVERED, DexService, EVM_CHAIN_ID_TO_KEY, EVM_CHAIN_KEYS, EVM_CHAIN_KEYS_SET, EVM_SPOKE_ONLY_CHAIN_KEYS, EVM_SPOKE_ONLY_CHAIN_KEYS_SET, Erc20Service, Erc4626Service, EvmAssetManagerService, EvmHubProvider, EvmSolverService, EvmSpokeService, EvmVaultTokenService, FEE_PERCENTAGE_SCALE, GAS_ESTIMATION_CODES, HALF_RAY, HALF_WAD, HUB_CHAIN_KEY, HookKind, HookService, HttpRelayError, HubVaultSymbols, ICON_CHAIN_KEYS, ICON_CHAIN_KEYS_SET, ICON_TX_RESULT_WAIT_MAX_RETRY, INJECTIVE_CHAIN_KEYS, INJECTIVE_CHAIN_KEYS_SET, INTENT_CHAIN_IDS, IconSpokeService, IcxMigrationService, Injective20Token, InjectiveSpokeService, IntentCreatedEventAbi, IntentDataService, IntentDataType, IntentFilledEventAbi, IntentRelayChainIdToChainKey, IntentsAbi, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, LeverageYieldService, LockupMultiplier, LockupPeriod, LsodaSymbols, LsodaTokens, MAX_UINT256, MigrationService, MintPositionEventAbi, MoneyMarketDataService, MoneyMarketService, NEAR_CHAIN_KEYS, NEAR_CHAIN_KEYS_SET, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, PartnerFeeClaimService, PartnerService, Permit2Service, ProtocolIntentsAbi, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RELAY_FALLBACK_FLOOR_MS, RELAY_REQUEST_TIMEOUT_MS, RadfiApiError, RadfiProvider, RecoveryService, RelayChainIdMap, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, SOLANA_CHAIN_KEYS, SOLANA_CHAIN_KEYS_SET, SONIC_CHAIN_KEYS, SONIC_CHAIN_KEYS_SET, SPONSORING_API_ERROR_CODES, SPONSORING_API_STELLAR_BASE_PATH, SPONSOR_CONFIG_TTL_MS, STACKS_CHAIN_KEYS, STACKS_CHAIN_KEYS_SET, STELLAR_BASE_RESERVE_TTL_MS, STELLAR_CHAIN_KEYS, STELLAR_CHAIN_KEYS_SET, STELLAR_TRUSTLINE_MIN_XLM_STROOPS, SUI_CHAIN_KEYS, SUI_CHAIN_KEYS_SET, SodaTokens, Sodax, SodaxError, SolanaSpokeService, SolverApiService, SolverIntentErrorCode, SolverIntentStatusCode, SonicSpokeService, SpokeService, SponsoringApiService, SponsoringService, StacksSpokeService, StakingLogic, StakingService, StatATokenAddresses, StellarSpokeService, SuiSpokeService, SupportedMigrationTokens, SwapService, SwapsApiService, TOKEN_LOGO_BASE_URL, USD_DECIMALS, UiPoolDataProviderService, VAULT_TOKEN_DECIMALS, WAD, WAD_RAY_RATIO, WEI_DECIMALS, adjustAmountByFee, allowanceCheckFailed, apiConfig, approveFailed, arbitrumSupportedTokens, assetManagerAbi, avalancheSupportedTokens, balnSwapAbi, baseChainInfo, baseSupportedTokens, binomialApproximatedRayPow, bitcoinSupportedTokens, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bridgeConfig, bridgeInvariant, bscSupportedTokens, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, classifySponsorError, concentratedLiquidityConfig, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createInvariant, deepMerge, defaultHookAbi, detectBitcoinAddressType, dexConfig, dexInvariant, dexPools, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, erc20Abi, erc4626Abi, estimateBitcoinTxSize, ethereumSupportedTokens, executionFailed, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getChainKeyFromRelayChainId, getChainType, getCompoundedBalance, getConcentratedLiquidityConfig, getConnectionIdl, getConnectionProgram, getEvmChainKeyByChainId, getEvmViemChain, getIconAddressBytes, getIntentRelayChainId, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getSolverConfig, getSpokeHook, getSpokeHooks, getStagingSolverTokens, getSupportedSolverTokens, getTransactionPackets, getbnUSDToken, hederaSupportedTokens, hexToBigInt, hexToSolanaAddress, hubConfig, hyper, hyperevmSupportedTokens, iconSupportedTokens, injectiveSupportedTokens, intentCreationFailed, isBackendHttpError, isBalnMigrateParams, isBitcoinChainKey, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexApproveError, isDexCreateIntentError, isDexError, isEvmChainKey, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKey, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isFillEvent, isHookSupportedToken, isHubChainKey, isHubChainKeyType, isIconAddress, isIconChainKey, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKey, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNativeBitcoinToken, isNativeBitcoinTransfer, isNativeToken, isNearChainKey, isNearChainKeyType, isNewbnUSDChainId, isNewbnUSDToken, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKey, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKey, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeChainKey, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isSponsoringConfigError, isSponsoringLookupError, isSponsoringOrchestrationError, isStacksChainKey, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKey, isStellarChainKeyType, isStellarWalletProviderType, isSuiChainKey, isSuiChainKeyType, isSupportedBitcoinAddressType, isSwapCreateIntentError, isSwapError, isSwapSupportedToken, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, isValidWalletProviderForChainKey, kaiaSupportedTokens, leverageYieldConfig, leverageYieldInvariant, leverageYieldVaults, lightlinkSupportedTokens, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, moneyMarketConfig, moneyMarketReserveAssets, moneyMarketSupportedTokens, nativeToUSD, nearSupportedTokens, newbnUSDSpokeChainIds, noopAnalytics, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, optimismSupportedTokens, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, polygonSupportedTokens, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, redbellySupportedTokens, relayConfig, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, resolveAnalytics, resolveLogger, retry, reverseEncodeAddress, serializeAddressData, silentLogger, sleep, sodaxConfig, sodaxInvariant, solanaSupportedTokens, solverConfig, sonicSupportedTokens, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, spokeChainKeysSet, spokeHooks, sponsoringInvariant, stacksSupportedTokens, stagingSwapSupportedTokens, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, stellarSupportedTokens, submitTransaction, suiSupportedTokens, supportedSpokeChains, supportedTokensByChain, swapExactInSingleParamsAbi, swapInvariant, swapSupportedTokens, swapsConfig, toCreateBridgeIntentParamsV2, tokenLogo, tokenLogoSlug, uiPoolDataAbi, universalRouterAbi, unknownFailed, usesBip322MessageSigning, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|