@sodax/sdk 2.1.0-rc.6 → 2.1.0-rc.7
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 +168 -54
- package/dist/index.d.cts +16 -4
- package/dist/index.d.ts +16 -4
- package/dist/index.mjs +165 -55
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -11,7 +11,7 @@ var bitcoinjsLib = require('bitcoinjs-lib');
|
|
|
11
11
|
var ecc = require('@bitcoinerlab/secp256k1');
|
|
12
12
|
var infinitySdk = require('@pancakeswap/infinity-sdk');
|
|
13
13
|
var transactions = require('@mysten/sui/transactions');
|
|
14
|
-
var
|
|
14
|
+
var grpc = require('@mysten/sui/grpc');
|
|
15
15
|
var splToken = require('@solana/spl-token');
|
|
16
16
|
var anchor = require('@coral-xyz/anchor');
|
|
17
17
|
var BN = require('bn.js');
|
|
@@ -1387,7 +1387,7 @@ var baseSupportedTokens = {
|
|
|
1387
1387
|
symbol: "AERO",
|
|
1388
1388
|
name: "Aerodrome Finance",
|
|
1389
1389
|
decimals: 18,
|
|
1390
|
-
address: "
|
|
1390
|
+
address: "0x940181a94A35A4569E4529A3CDfB74e38FD98631",
|
|
1391
1391
|
chainKey: ChainKeys.BASE_MAINNET,
|
|
1392
1392
|
hubAsset: "0x348e086ab6f424dfc575a325c28624ed23973173",
|
|
1393
1393
|
vault: "0x348e086ab6f424dfc575a325c28624ed23973173"
|
|
@@ -1699,7 +1699,7 @@ var polygonSupportedTokens = {
|
|
|
1699
1699
|
symbol: "WBTC",
|
|
1700
1700
|
name: "Wrapped BTC",
|
|
1701
1701
|
decimals: 8,
|
|
1702
|
-
address: "
|
|
1702
|
+
address: "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6",
|
|
1703
1703
|
chainKey: ChainKeys.POLYGON_MAINNET,
|
|
1704
1704
|
hubAsset: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3",
|
|
1705
1705
|
vault: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3"
|
|
@@ -1717,7 +1717,7 @@ var polygonSupportedTokens = {
|
|
|
1717
1717
|
symbol: "LINK",
|
|
1718
1718
|
name: "ChainLink Token",
|
|
1719
1719
|
decimals: 18,
|
|
1720
|
-
address: "
|
|
1720
|
+
address: "0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39",
|
|
1721
1721
|
chainKey: ChainKeys.POLYGON_MAINNET,
|
|
1722
1722
|
hubAsset: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f",
|
|
1723
1723
|
vault: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f"
|
|
@@ -3365,7 +3365,7 @@ var spokeChainConfig = {
|
|
|
3365
3365
|
supportedTokens: suiSupportedTokens,
|
|
3366
3366
|
nativeToken: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",
|
|
3367
3367
|
bnUSD: "0xff4de2b2b57dd7611d2812d231a467d007b702a101fd5c7ad3b278257cddb507::bnusd::BNUSD",
|
|
3368
|
-
|
|
3368
|
+
grpc_url: "https://fullnode.mainnet.sui.io",
|
|
3369
3369
|
chain: baseChainInfo[ChainKeys.SUI_MAINNET],
|
|
3370
3370
|
pollingConfig: {
|
|
3371
3371
|
pollingIntervalMs: 500,
|
|
@@ -4344,6 +4344,29 @@ var isHookSupportedToken = (chainKey, kind, token) => {
|
|
|
4344
4344
|
return !hook.supportedTokens || hook.supportedTokens.some((t) => t.toLowerCase() === token.toLowerCase());
|
|
4345
4345
|
};
|
|
4346
4346
|
|
|
4347
|
+
// ../types/dist/sui/core.js
|
|
4348
|
+
function toSuiPaginatedCoins(response, coinType) {
|
|
4349
|
+
return {
|
|
4350
|
+
data: response.objects.map((coin) => ({
|
|
4351
|
+
balance: coin.balance,
|
|
4352
|
+
coinObjectId: coin.objectId,
|
|
4353
|
+
coinType,
|
|
4354
|
+
digest: coin.digest,
|
|
4355
|
+
version: coin.version
|
|
4356
|
+
})),
|
|
4357
|
+
hasNextPage: response.hasNextPage,
|
|
4358
|
+
nextCursor: response.cursor
|
|
4359
|
+
};
|
|
4360
|
+
}
|
|
4361
|
+
function toSuiExecutionResult(command) {
|
|
4362
|
+
return {
|
|
4363
|
+
returnValues: command.returnValues.map((value) => [Array.from(value.bcs), ""])
|
|
4364
|
+
};
|
|
4365
|
+
}
|
|
4366
|
+
function toSuiExecutionStatus(status) {
|
|
4367
|
+
return status.success ? { status: "success" } : { status: "failure", error: status.error.message };
|
|
4368
|
+
}
|
|
4369
|
+
|
|
4347
4370
|
// ../types/dist/utils/utils.js
|
|
4348
4371
|
function isHubChainKey(chainId) {
|
|
4349
4372
|
return chainId === HUB_CHAIN_KEY;
|
|
@@ -4458,7 +4481,7 @@ function isValidWalletProviderForChainKey(chainKey, walletProvider) {
|
|
|
4458
4481
|
}
|
|
4459
4482
|
|
|
4460
4483
|
// ../types/dist/index.js
|
|
4461
|
-
var CONFIG_VERSION =
|
|
4484
|
+
var CONFIG_VERSION = 227;
|
|
4462
4485
|
|
|
4463
4486
|
// src/shared/utils/resolveTimeoutMs.ts
|
|
4464
4487
|
function resolveTimeoutMs(timeout, fallbackMs) {
|
|
@@ -23298,8 +23321,133 @@ var SonicSpokeService = class {
|
|
|
23298
23321
|
return params.walletProvider.sendTransaction(rawTx);
|
|
23299
23322
|
}
|
|
23300
23323
|
};
|
|
23324
|
+
async function toMystenTransaction(txn) {
|
|
23325
|
+
if (txn instanceof transactions.Transaction) return txn;
|
|
23326
|
+
return transactions.Transaction.from(await txn.toJSON());
|
|
23327
|
+
}
|
|
23328
|
+
function isTimeoutError(error) {
|
|
23329
|
+
if (typeof error === "object" && error !== null && "name" in error) {
|
|
23330
|
+
const { name } = error;
|
|
23331
|
+
if (name === "TimeoutError" || name === "AbortError") {
|
|
23332
|
+
return true;
|
|
23333
|
+
}
|
|
23334
|
+
}
|
|
23335
|
+
return error instanceof Error && /timed?\s?out|timeout/i.test(error.message);
|
|
23336
|
+
}
|
|
23337
|
+
var DEFAULT_GET_COINS_LIMIT = 10;
|
|
23338
|
+
function toSuiObjectOwner(owner) {
|
|
23339
|
+
switch (owner?.$kind) {
|
|
23340
|
+
case "AddressOwner":
|
|
23341
|
+
return { AddressOwner: owner.AddressOwner };
|
|
23342
|
+
case "ObjectOwner":
|
|
23343
|
+
return { ObjectOwner: owner.ObjectOwner };
|
|
23344
|
+
case "Shared":
|
|
23345
|
+
return { Shared: { initial_shared_version: owner.Shared.initialSharedVersion } };
|
|
23346
|
+
default:
|
|
23347
|
+
return "Immutable";
|
|
23348
|
+
}
|
|
23349
|
+
}
|
|
23350
|
+
function toSuiTransactionEffects(effects, executedEpoch) {
|
|
23351
|
+
const gasObject = effects.gasObject;
|
|
23352
|
+
return {
|
|
23353
|
+
messageVersion: "v1",
|
|
23354
|
+
status: toSuiExecutionStatus(effects.status),
|
|
23355
|
+
executedEpoch,
|
|
23356
|
+
gasUsed: effects.gasUsed,
|
|
23357
|
+
transactionDigest: effects.transactionDigest,
|
|
23358
|
+
gasObject: {
|
|
23359
|
+
owner: toSuiObjectOwner(gasObject?.outputOwner ?? null),
|
|
23360
|
+
reference: {
|
|
23361
|
+
objectId: gasObject?.objectId ?? "",
|
|
23362
|
+
version: gasObject?.outputVersion ?? "",
|
|
23363
|
+
digest: gasObject?.outputDigest ?? ""
|
|
23364
|
+
}
|
|
23365
|
+
},
|
|
23366
|
+
dependencies: effects.dependencies,
|
|
23367
|
+
eventsDigest: effects.eventsDigest
|
|
23368
|
+
};
|
|
23369
|
+
}
|
|
23370
|
+
var SuiGrpcTransport = class {
|
|
23371
|
+
endpoint;
|
|
23372
|
+
client;
|
|
23373
|
+
constructor(endpoint) {
|
|
23374
|
+
this.endpoint = endpoint;
|
|
23375
|
+
this.client = new grpc.SuiGrpcClient({ network: "mainnet", baseUrl: endpoint });
|
|
23376
|
+
}
|
|
23377
|
+
async getCoins(owner, coinType, limit = DEFAULT_GET_COINS_LIMIT) {
|
|
23378
|
+
const response = await this.client.core.listCoins({ owner, coinType, limit });
|
|
23379
|
+
return toSuiPaginatedCoins(response, coinType);
|
|
23380
|
+
}
|
|
23381
|
+
async simulate(tx, sender) {
|
|
23382
|
+
const transaction = await toMystenTransaction(tx);
|
|
23383
|
+
transaction.setSenderIfNotSet(sender);
|
|
23384
|
+
const result = await this.client.core.simulateTransaction({
|
|
23385
|
+
transaction,
|
|
23386
|
+
include: { commandResults: true },
|
|
23387
|
+
checksEnabled: false
|
|
23388
|
+
});
|
|
23389
|
+
const command = result.commandResults?.[0];
|
|
23390
|
+
if (!command) {
|
|
23391
|
+
throw new Error(`transaction didn't return any values: ${JSON.stringify(result, null, 2)}`);
|
|
23392
|
+
}
|
|
23393
|
+
return toSuiExecutionResult(command);
|
|
23394
|
+
}
|
|
23395
|
+
async estimateGas(tx, sender) {
|
|
23396
|
+
const transaction = await toMystenTransaction(tx);
|
|
23397
|
+
transaction.setSenderIfNotSet(sender);
|
|
23398
|
+
const result = await this.client.core.simulateTransaction({ transaction, include: { effects: true } });
|
|
23399
|
+
const effects = (result.Transaction ?? result.FailedTransaction)?.effects;
|
|
23400
|
+
if (!effects) {
|
|
23401
|
+
throw new Error("Transaction simulation returned no effects");
|
|
23402
|
+
}
|
|
23403
|
+
return effects.gasUsed;
|
|
23404
|
+
}
|
|
23405
|
+
async fetchLatestPackageId(objectId) {
|
|
23406
|
+
let object5;
|
|
23407
|
+
try {
|
|
23408
|
+
({ object: object5 } = await this.client.core.getObject({ objectId, include: { json: true } }));
|
|
23409
|
+
} catch (error) {
|
|
23410
|
+
throw new Error("Failed to fetch asset manager id", { cause: error });
|
|
23411
|
+
}
|
|
23412
|
+
if (!object5) {
|
|
23413
|
+
throw new Error("Asset manager id not found (no data)");
|
|
23414
|
+
}
|
|
23415
|
+
const fields = object5.json;
|
|
23416
|
+
if (!fields) {
|
|
23417
|
+
throw new Error("Asset manager id not found (not a move object)");
|
|
23418
|
+
}
|
|
23419
|
+
if (!("latest_package_id" in fields)) {
|
|
23420
|
+
throw new Error("Asset manager id not found (no latest package id)");
|
|
23421
|
+
}
|
|
23422
|
+
const latestPackageId = fields["latest_package_id"];
|
|
23423
|
+
if (typeof latestPackageId !== "string") {
|
|
23424
|
+
throw new Error("Asset manager id invalid (latest package id is not a string)");
|
|
23425
|
+
}
|
|
23426
|
+
if (!latestPackageId) {
|
|
23427
|
+
throw new Error("Asset manager id not found (no latest package id)");
|
|
23428
|
+
}
|
|
23429
|
+
return latestPackageId;
|
|
23430
|
+
}
|
|
23431
|
+
async waitForTransaction(params) {
|
|
23432
|
+
const result = await this.client.core.waitForTransaction({
|
|
23433
|
+
digest: params.digest,
|
|
23434
|
+
include: { effects: true },
|
|
23435
|
+
timeout: params.timeoutMs,
|
|
23436
|
+
pollSchedule: [0, Math.max(1, params.pollingIntervalMs)]
|
|
23437
|
+
});
|
|
23438
|
+
const transaction = result.Transaction ?? result.FailedTransaction;
|
|
23439
|
+
return {
|
|
23440
|
+
digest: transaction.digest,
|
|
23441
|
+
effects: transaction.effects ? toSuiTransactionEffects(transaction.effects, transaction.epoch ?? "0") : void 0
|
|
23442
|
+
};
|
|
23443
|
+
}
|
|
23444
|
+
};
|
|
23445
|
+
|
|
23446
|
+
// src/shared/services/spoke/SuiSpokeService.ts
|
|
23301
23447
|
var SuiSpokeService = class {
|
|
23302
23448
|
config;
|
|
23449
|
+
transport;
|
|
23450
|
+
/** @deprecated Renamed to `transport`, and no longer a raw `@mysten/sui` client. */
|
|
23303
23451
|
publicClient;
|
|
23304
23452
|
assetManagerAddress;
|
|
23305
23453
|
pollingIntervalMs;
|
|
@@ -23307,12 +23455,13 @@ var SuiSpokeService = class {
|
|
|
23307
23455
|
constructor(config) {
|
|
23308
23456
|
this.config = config;
|
|
23309
23457
|
const chainConfig = config.getChainConfig(ChainKeys.SUI_MAINNET);
|
|
23310
|
-
this.
|
|
23458
|
+
this.transport = new SuiGrpcTransport(chainConfig.rpc_url ?? chainConfig.grpc_url);
|
|
23459
|
+
this.publicClient = this.transport;
|
|
23311
23460
|
this.pollingIntervalMs = chainConfig.pollingConfig.pollingIntervalMs;
|
|
23312
23461
|
this.maxTimeoutMs = chainConfig.pollingConfig.maxTimeoutMs;
|
|
23313
23462
|
}
|
|
23314
23463
|
async getCoins(address, token) {
|
|
23315
|
-
return this.
|
|
23464
|
+
return this.transport.getCoins(address, token);
|
|
23316
23465
|
}
|
|
23317
23466
|
async getCoin(tx, coin, amount, address) {
|
|
23318
23467
|
const coins = await this.getCoins(address, coin);
|
|
@@ -23373,14 +23522,7 @@ var SuiSpokeService = class {
|
|
|
23373
23522
|
arguments: args,
|
|
23374
23523
|
typeArguments: typeArgs
|
|
23375
23524
|
});
|
|
23376
|
-
|
|
23377
|
-
transactionBlock: tx,
|
|
23378
|
-
sender
|
|
23379
|
-
});
|
|
23380
|
-
if (txResults.results && txResults.results[0] !== void 0) {
|
|
23381
|
-
return txResults.results[0];
|
|
23382
|
-
}
|
|
23383
|
-
throw Error(`transaction didn't return any values: ${JSON.stringify(txResults, null, 2)}`);
|
|
23525
|
+
return this.transport.simulate(tx, sender);
|
|
23384
23526
|
}
|
|
23385
23527
|
/**
|
|
23386
23528
|
* Deposit tokens to the spoke chain.
|
|
@@ -23447,12 +23589,7 @@ var SuiSpokeService = class {
|
|
|
23447
23589
|
* @returns {Promise<bigint>} The estimated computation cost.
|
|
23448
23590
|
*/
|
|
23449
23591
|
async estimateGas({ tx }) {
|
|
23450
|
-
|
|
23451
|
-
const result = await this.publicClient.devInspectTransactionBlock({
|
|
23452
|
-
sender: tx.from,
|
|
23453
|
-
transactionBlock: txb
|
|
23454
|
-
});
|
|
23455
|
-
return result.effects.gasUsed;
|
|
23592
|
+
return this.transport.estimateGas(transactions.Transaction.from(tx.data), tx.from);
|
|
23456
23593
|
}
|
|
23457
23594
|
/**
|
|
23458
23595
|
* Get the balance of the token in the spoke chain.
|
|
@@ -23493,40 +23630,14 @@ var SuiSpokeService = class {
|
|
|
23493
23630
|
* @returns {Promise<string>} The latest asset manager package id.
|
|
23494
23631
|
*/
|
|
23495
23632
|
async fetchLatestAssetManagerPackageId(chainId) {
|
|
23496
|
-
|
|
23497
|
-
id: this.config.getChainConfig(chainId).addresses.assetManagerConfigId,
|
|
23498
|
-
options: {
|
|
23499
|
-
showContent: true
|
|
23500
|
-
}
|
|
23501
|
-
});
|
|
23502
|
-
if (configData.error) {
|
|
23503
|
-
throw new Error(`Failed to fetch asset manager id. Details: ${JSON.stringify(configData.error)}`);
|
|
23504
|
-
}
|
|
23505
|
-
if (!configData.data) {
|
|
23506
|
-
throw new Error("Asset manager id not found (no data)");
|
|
23507
|
-
}
|
|
23508
|
-
if (configData.data.content?.dataType !== "moveObject") {
|
|
23509
|
-
throw new Error("Asset manager id not found (not a move object)");
|
|
23510
|
-
}
|
|
23511
|
-
if (!("latest_package_id" in configData.data.content.fields)) {
|
|
23512
|
-
throw new Error("Asset manager id not found (no latest package id)");
|
|
23513
|
-
}
|
|
23514
|
-
const latestPackageId = configData.data.content.fields["latest_package_id"];
|
|
23515
|
-
if (typeof latestPackageId !== "string") {
|
|
23516
|
-
throw new Error("Asset manager id invalid (latest package id is not a string)");
|
|
23517
|
-
}
|
|
23518
|
-
if (!latestPackageId) {
|
|
23519
|
-
throw new Error("Asset manager id not found (no latest package id)");
|
|
23520
|
-
}
|
|
23521
|
-
return latestPackageId.toString();
|
|
23633
|
+
return this.transport.fetchLatestPackageId(this.config.getChainConfig(chainId).addresses.assetManagerConfigId);
|
|
23522
23634
|
}
|
|
23523
23635
|
async waitForTransactionReceipt(params) {
|
|
23524
23636
|
try {
|
|
23525
|
-
const result = await this.
|
|
23637
|
+
const result = await this.transport.waitForTransaction({
|
|
23526
23638
|
digest: params.txHash,
|
|
23527
|
-
|
|
23528
|
-
|
|
23529
|
-
options: { showEffects: true }
|
|
23639
|
+
timeoutMs: params.maxTimeoutMs ?? this.maxTimeoutMs,
|
|
23640
|
+
pollingIntervalMs: params.pollingIntervalMs ?? this.pollingIntervalMs
|
|
23530
23641
|
});
|
|
23531
23642
|
if (!result.effects?.status) {
|
|
23532
23643
|
return {
|
|
@@ -23548,11 +23659,10 @@ var SuiSpokeService = class {
|
|
|
23548
23659
|
}
|
|
23549
23660
|
return { ok: true, value: { status: "success", receipt: result } };
|
|
23550
23661
|
} catch (error) {
|
|
23551
|
-
const isTimeout = error instanceof Error && error.message.includes("timeout");
|
|
23552
23662
|
return {
|
|
23553
23663
|
ok: true,
|
|
23554
23664
|
value: {
|
|
23555
|
-
status:
|
|
23665
|
+
status: isTimeoutError(error) ? "timeout" : "failure",
|
|
23556
23666
|
error: error instanceof Error ? error : new Error(String(error))
|
|
23557
23667
|
}
|
|
23558
23668
|
};
|
|
@@ -42538,6 +42648,7 @@ exports.StakingLogic = StakingLogic;
|
|
|
42538
42648
|
exports.StakingService = StakingService;
|
|
42539
42649
|
exports.StatATokenAddresses = StatATokenAddresses;
|
|
42540
42650
|
exports.StellarSpokeService = StellarSpokeService;
|
|
42651
|
+
exports.SuiGrpcTransport = SuiGrpcTransport;
|
|
42541
42652
|
exports.SuiSpokeService = SuiSpokeService;
|
|
42542
42653
|
exports.SupportedMigrationTokens = SupportedMigrationTokens;
|
|
42543
42654
|
exports.SwapService = SwapService;
|
|
@@ -42845,6 +42956,9 @@ exports.swapInvariant = swapInvariant;
|
|
|
42845
42956
|
exports.swapSupportedTokens = swapSupportedTokens;
|
|
42846
42957
|
exports.swapsConfig = swapsConfig;
|
|
42847
42958
|
exports.toCreateBridgeIntentParamsV2 = toCreateBridgeIntentParamsV2;
|
|
42959
|
+
exports.toSuiExecutionResult = toSuiExecutionResult;
|
|
42960
|
+
exports.toSuiExecutionStatus = toSuiExecutionStatus;
|
|
42961
|
+
exports.toSuiPaginatedCoins = toSuiPaginatedCoins;
|
|
42848
42962
|
exports.tokenLogo = tokenLogo;
|
|
42849
42963
|
exports.tokenLogoSlug = tokenLogoSlug;
|
|
42850
42964
|
exports.uiPoolDataAbi = uiPoolDataAbi;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SodaxFeature, ISwapsApiV2, Result, SwapsApiConfig, SodaxLogger, GetSwapTokensResponseV2, GetSwapTokensByChainResponseV2, QuoteRequestV2, QuoteQueryV2, QuoteResponseV2, DeadlineQueryV2, DeadlineResponseV2, CreateIntentParamsV2, AllowanceCheckResponseV2, ApproveResponseV2, CreateIntentResponseV2, SubmitIntentRequestV2, SubmitIntentResponseV2, StatusRequestV2, StatusResponseV2, CancelIntentRequestV2, CancelIntentResponseV2, IntentHashRequestV2, IntentHashResponseV2, IntentPacketRequestV2, IntentPacketResponseV2, IntentExtraDataRequestV2, IntentExtraDataResponseV2, IntentStateV2, GetIntentResponseV2, CreateLimitOrderParamsV2, CreateLimitOrderResponseV2, GasEstimateRequestV2, GasEstimateResponseV2, FeeQueryV2, FeeResponseV2, SubmitTxRequestV2, SubmitTxResponseV2, SubmitTxStatusQueryV2, SubmitTxStatusResponseV2, IStellarSponsoringApi, SponsoringApiConfig, StellarSponsorConfig, StellarSponsoredAccountRequest, StellarSponsoredAccountResponse, IBridgeApiV2, BaseApiConfig, GetBridgeTokensResponseV2, GetBridgeTokensByChainResponseV2, CreateBridgeIntentParamsV2, BridgeAllowanceCheckResponseV2, BridgeApproveResponseV2, CreateBridgeIntentResponseV2, BridgeSubmitTxRequestV2, BridgeSubmitTxResponseV2, BridgeSubmitTxStatusQueryV2, BridgeSubmitTxStatusResponseV2, BridgeFeeRequestV2, BridgeFeeResponseV2, BridgeQuoteRequestV2, BridgeableAmountResponseV2, BridgeableCheckResponseV2, BitcoinBoundExtrasV2, PartnerFeeV2, IConfigApiV1, ApiConfig, Address, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, SpokeChainKey, GetSwapTokensByChainIdApiResponse, GetMoneyMarketTokensApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, AnalyticsDetailLevel, AnalyticsEventPhase, AnalyticsOption, PartnerFee, RadfiSigner, SodaxConfig, SodaxOptions, XToken, OriginalAssetAddress, IntentRelayChainId, HubChainKey, HubConfig, PoolKey, SpokeChainConfig, RelayConfig, SolverConfig, SwapsConfig, BridgeConfig, MoneyMarketConfig, LeverageYieldConfig, DexConfig, GetSpokeChainConfigType, SodaxDefaultConfig, EvmContractCall, Hex, IEvmWalletProvider, EvmRawTransactionReceipt, QuoteType, EvmChainKey, DeepPartial, WalletProviderSlot, TxReturnType, ChainType, GetChainType, SolanaRawTransactionReceipt, StellarSorobanTransactionReceipt, IconTransactionResult, SuiRawTransactionReceipt, InjectiveRawTransactionReceipt, NearRawTransactionReceipt, StacksRawTransactionReceipt, BitcoinRawTransactionReceipt, GetAddressType, HubAddress, GetTokenAddressType, EvmSpokeOnlyChainKey, StellarChainKey, HookKind, SonicChainKey, AssetInfo, TokenInfo, VaultReserves, StacksChainKey, FeeEstimateTransaction, StacksTransactionParams, HttpUrl, RadfiConfig, IBitcoinWalletProvider, RadfiDepositTxResponse, BtcAddressType, BitcoinChainKey, BitcoinRawTransaction, NearChainKey, FillData, NearRawTransaction, INearWalletProvider, SuiPaginatedCoins, SuiChainKey, SuiExecutionResult, SuiGasEstimate, IStellarWalletProvider, StellarGasEstimate, SolanaChainKey, SolanaGasEstimate, SolanaBase58PublicKey, SolanaRawTransactionInstruction, SolanaSerializedTransaction, SolanaRpcResponseAndContext, SolanaTokenAmount, IconChainKey, IconGasEstimate, InjectiveChainKey, InjectiveGasEstimate, JsonObject, InjectiveCoin, InjectiveRawTransaction, IInjectiveWalletProvider, InjectiveExecuteResponse, GetEstimateGasReturnType, IconAddress, IWalletProvider, EvmSpokeChainConfig, PartnerFeeAmount, PartnerFeePercentage, GetWalletProviderType, SodaxLoggerOption, SubmitTxStatusDataV2, SolverIntentStatusResponse, SpokeExecActionParams, FeeAmount, Hash as Hash$1, SolverIntentQuoteRequest, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentStatusRequest, SolverExecutionRequest, SolverExecutionResponse, IconEoaAddress, IcxTokenType, IconContractAddress, BridgeLimit, UserUnstakeInfo, ConcentratedLiquidityConfig, LeverageYieldVault, SponsoringApiErrorCode } from '@sodax/types';
|
|
1
|
+
import { SodaxFeature, ISwapsApiV2, Result, SwapsApiConfig, SodaxLogger, GetSwapTokensResponseV2, GetSwapTokensByChainResponseV2, QuoteRequestV2, QuoteQueryV2, QuoteResponseV2, DeadlineQueryV2, DeadlineResponseV2, CreateIntentParamsV2, AllowanceCheckResponseV2, ApproveResponseV2, CreateIntentResponseV2, SubmitIntentRequestV2, SubmitIntentResponseV2, StatusRequestV2, StatusResponseV2, CancelIntentRequestV2, CancelIntentResponseV2, IntentHashRequestV2, IntentHashResponseV2, IntentPacketRequestV2, IntentPacketResponseV2, IntentExtraDataRequestV2, IntentExtraDataResponseV2, IntentStateV2, GetIntentResponseV2, CreateLimitOrderParamsV2, CreateLimitOrderResponseV2, GasEstimateRequestV2, GasEstimateResponseV2, FeeQueryV2, FeeResponseV2, SubmitTxRequestV2, SubmitTxResponseV2, SubmitTxStatusQueryV2, SubmitTxStatusResponseV2, IStellarSponsoringApi, SponsoringApiConfig, StellarSponsorConfig, StellarSponsoredAccountRequest, StellarSponsoredAccountResponse, IBridgeApiV2, BaseApiConfig, GetBridgeTokensResponseV2, GetBridgeTokensByChainResponseV2, CreateBridgeIntentParamsV2, BridgeAllowanceCheckResponseV2, BridgeApproveResponseV2, CreateBridgeIntentResponseV2, BridgeSubmitTxRequestV2, BridgeSubmitTxResponseV2, BridgeSubmitTxStatusQueryV2, BridgeSubmitTxStatusResponseV2, BridgeFeeRequestV2, BridgeFeeResponseV2, BridgeQuoteRequestV2, BridgeableAmountResponseV2, BridgeableCheckResponseV2, BitcoinBoundExtrasV2, PartnerFeeV2, IConfigApiV1, ApiConfig, Address, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, SpokeChainKey, GetSwapTokensByChainIdApiResponse, GetMoneyMarketTokensApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, AnalyticsDetailLevel, AnalyticsEventPhase, AnalyticsOption, PartnerFee, RadfiSigner, SodaxConfig, SodaxOptions, XToken, OriginalAssetAddress, IntentRelayChainId, HubChainKey, HubConfig, PoolKey, SpokeChainConfig, RelayConfig, SolverConfig, SwapsConfig, BridgeConfig, MoneyMarketConfig, LeverageYieldConfig, DexConfig, GetSpokeChainConfigType, SodaxDefaultConfig, EvmContractCall, Hex, IEvmWalletProvider, EvmRawTransactionReceipt, QuoteType, EvmChainKey, DeepPartial, WalletProviderSlot, TxReturnType, ChainType, GetChainType, SolanaRawTransactionReceipt, StellarSorobanTransactionReceipt, IconTransactionResult, SuiRawTransactionReceipt, InjectiveRawTransactionReceipt, NearRawTransactionReceipt, StacksRawTransactionReceipt, BitcoinRawTransactionReceipt, GetAddressType, HubAddress, GetTokenAddressType, EvmSpokeOnlyChainKey, StellarChainKey, HookKind, SonicChainKey, AssetInfo, TokenInfo, VaultReserves, StacksChainKey, FeeEstimateTransaction, StacksTransactionParams, HttpUrl, RadfiConfig, IBitcoinWalletProvider, RadfiDepositTxResponse, BtcAddressType, BitcoinChainKey, BitcoinRawTransaction, NearChainKey, FillData, NearRawTransaction, INearWalletProvider, SuiTransport, SuiPaginatedCoins, SuiChainKey, SuiExecutionResult, SuiGasEstimate, IStellarWalletProvider, StellarGasEstimate, SolanaChainKey, SolanaGasEstimate, SolanaBase58PublicKey, SolanaRawTransactionInstruction, SolanaSerializedTransaction, SolanaRpcResponseAndContext, SolanaTokenAmount, IconChainKey, IconGasEstimate, InjectiveChainKey, InjectiveGasEstimate, JsonObject, InjectiveCoin, InjectiveRawTransaction, IInjectiveWalletProvider, InjectiveExecuteResponse, GetEstimateGasReturnType, SuiTransaction, SuiWaitForTransactionParams, IconAddress, IWalletProvider, EvmSpokeChainConfig, PartnerFeeAmount, PartnerFeePercentage, GetWalletProviderType, SodaxLoggerOption, SubmitTxStatusDataV2, SolverIntentStatusResponse, SpokeExecActionParams, FeeAmount, Hash as Hash$1, SolverIntentQuoteRequest, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentStatusRequest, SolverExecutionRequest, SolverExecutionResponse, IconEoaAddress, IcxTokenType, IconContractAddress, BridgeLimit, UserUnstakeInfo, ConcentratedLiquidityConfig, LeverageYieldVault, SponsoringApiErrorCode } from '@sodax/types';
|
|
2
2
|
export * from '@sodax/types';
|
|
3
3
|
export { SodaxFeature } from '@sodax/types';
|
|
4
4
|
import * as viem from 'viem';
|
|
@@ -7,7 +7,6 @@ import { StacksNetwork, ClarityValue } from '@sodax/libs/stacks/core';
|
|
|
7
7
|
import { networks, Psbt } from 'bitcoinjs-lib';
|
|
8
8
|
import { JsonRpcProvider } from 'near-api-js';
|
|
9
9
|
import { Transaction, TransactionResult } from '@mysten/sui/transactions';
|
|
10
|
-
import { SuiClient } from '@mysten/sui/client';
|
|
11
10
|
import { rpc, Transaction as Transaction$1, Memo, MemoType, Operation, FeeBumpTransaction, Horizon, Account, xdr } from '@stellar/stellar-sdk';
|
|
12
11
|
import { Connection as Connection$1, PublicKey, TransactionInstruction } from '@solana/web3.js';
|
|
13
12
|
import { IconService } from 'icon-sdk-js';
|
|
@@ -10004,7 +10003,9 @@ type SuiTxObject = {
|
|
|
10004
10003
|
};
|
|
10005
10004
|
declare class SuiSpokeService {
|
|
10006
10005
|
private readonly config;
|
|
10007
|
-
readonly
|
|
10006
|
+
readonly transport: SuiTransport;
|
|
10007
|
+
/** @deprecated Renamed to `transport`, and no longer a raw `@mysten/sui` client. */
|
|
10008
|
+
readonly publicClient: SuiTransport;
|
|
10008
10009
|
assetManagerAddress: string | undefined;
|
|
10009
10010
|
private readonly pollingIntervalMs;
|
|
10010
10011
|
private readonly maxTimeoutMs;
|
|
@@ -10501,6 +10502,17 @@ declare class SpokeService {
|
|
|
10501
10502
|
waitForTxReceipt<C extends SpokeChainKey = SpokeChainKey>(params: WaitForTxReceiptParams<C>): Promise<Result<WaitForTxReceiptReturnType<C>>>;
|
|
10502
10503
|
}
|
|
10503
10504
|
|
|
10505
|
+
declare class SuiGrpcTransport implements SuiTransport {
|
|
10506
|
+
readonly endpoint: string;
|
|
10507
|
+
private readonly client;
|
|
10508
|
+
constructor(endpoint: string);
|
|
10509
|
+
getCoins(owner: string, coinType: string, limit?: number): Promise<SuiPaginatedCoins>;
|
|
10510
|
+
simulate(tx: SuiTransaction, sender: string): Promise<SuiExecutionResult>;
|
|
10511
|
+
estimateGas(tx: SuiTransaction, sender: string): Promise<SuiGasEstimate>;
|
|
10512
|
+
fetchLatestPackageId(objectId: string): Promise<string>;
|
|
10513
|
+
waitForTransaction(params: SuiWaitForTransactionParams): Promise<SuiRawTransactionReceipt>;
|
|
10514
|
+
}
|
|
10515
|
+
|
|
10504
10516
|
/**
|
|
10505
10517
|
* Stable error message strings emitted by relay-layer helpers ({@link submitTransaction},
|
|
10506
10518
|
* {@link relayTxAndWaitPacket}) on failure.
|
|
@@ -18661,4 +18673,4 @@ type DexApproveErrorCode = ApproveErrorCode;
|
|
|
18661
18673
|
type DexApproveError = SodaxError<DexApproveErrorCode>;
|
|
18662
18674
|
declare const isDexApproveError: (e: unknown) => e is SodaxError<ApproveErrorCode>;
|
|
18663
18675
|
|
|
18664
|
-
export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, type ActivateStellarAccountParams, type ActivateStellarAccountResult, type AggregatedReserveData, type AllowanceCheckErrorCode, type AllowanceInfo, type AllowanceResponse, type AllowanceTransferDetails, type AnalyticsActionData, type ApiResponse, type ApprovalTxs, type ApproveErrorCode, type ApyRange, type AssetDepositAction, type AssetEntry, AssetService, type AssetServiceConstructorParams, type AssetWithdrawAction, type AutoSwapPreferences, BackendApiService, BackendHttpError, type BalnLockParams, type BalnMigrateAction, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, type BitcoinBoundExtras, BitcoinSpokeService, type BitcoinTransactionResult, type BitcoinUTXO, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeAction, type BridgeAllowanceCheckError, type BridgeAllowanceCheckErrorCode, BridgeApiService, type BridgeApiServiceOptions, type BridgeApproveError, type BridgeApproveErrorCode, type BridgeCreateIntentError, type BridgeCreateIntentErrorCode, type BridgeError, type BridgeErrorCode, type BridgeExtras, type BridgeLookupError, type BridgeLookupErrorCode, type BridgeOrchestrationError, type BridgeOrchestrationErrorCode, type BridgeParams, BridgeService, type BridgeServiceConstructorParams, type BtcPayload, CREATE_INTENT_CODES, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, type CallResponse, type CancelIntentActionParams, type CancelIntentParams, type CancelUnstakeAction, type CancelUnstakeParams, type ClClaimRewardsParams, type ClDecreaseLiquidityParams, type ClGetPoolDataParams, type ClIncreaseLiquidityParams, type ClLiquidityClaimRewardsAction, type ClLiquidityDecreaseLiquidityAction, type ClLiquidityIncreaseLiquidityAction, type ClLiquidityWithdrawAction, type ClMintPositionEventLog, type ClPositionInfo, ClService, type ClServiceConstructorParams, type ClSupplyAction, type ClSupplyParams, type ClWithdrawParams, type ClaimAction, type ClaimParams, type CombinedReserveData, type ComputedUserReserve, type ConcentratedLiquidityParams, type ConcentratedLiquidityTokenInfo, ConfigService, type ConfigServiceConstructorParams, type ConnMsg, type CreateAssetDepositParams, type CreateAssetWithdrawParams, type CreateBridgeIntentParams, type CreateIntentErrorCode, type CreateIntentParams, type CreateIntentResult, type CreateLimitOrderParams, type CreateSonicSwapIntentParams, type CreateVaultIntentResult, type CreateViemPublicClientParams, CustomSorobanServer, CustomStellarAccount, DETAILED_STATUS_NOT_DELIVERED, type DepositParams, type DepositSimulationParams, type DestinationParamsType, type DetailedLock, type DetailedStatusError, type DetailedStatusErrorCode, type DetailedSwapStatus, type DetailedSwapStatusKey, type DexApproveError, type DexApproveErrorCode, type DexCreateIntentError, type DexCreateIntentErrorCode, type DexError, type DexErrorCode, DexService, type DexServiceConstructorParams, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, type EnrichedToken, type Erc20ApprovalPlan, type Erc20ApprovalPlanReason, type Erc20ApproveParams, type Erc20GetAllowanceParams, type Erc20IsAllowanceParams, type Erc20PlanApprovalParams, Erc20Service, type Erc20Token, Erc4626Service, type EstimateGasParams, EvmAssetManagerService, type EvmDepositToDataParams, EvmHubProvider, type EvmHubProviderConstructorParams, EvmSolverService, EvmSpokeService, EvmVaultTokenService, type EvmWithdrawAssetDataParams, type ExecuteMsg, type FeatureInvariant, type FeeData, type FeeTokenApproveAction, type FeeTokenApproveParams, type FetchHubAssetBalancesParams, type FillEvent, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, GAS_ESTIMATION_CODES, type GasEstimationErrorCode, type GetDepositParams, type GetIntentSubmitTxExtraDataParams, type GetPacketParams, type GetPacketResponse, type GetQuoteParams, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeServiceType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, type GetTxReceiptType, type GetUserIntentParams, type GetUserRouterParams, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HookRequest, HookService, HttpRelayError, type HubAssetBalance, type HubProvider, type IconJsonRpcVersion, IconSpokeService, type IcxCreateRevertMigrationParams, type IcxMigrateAction, type IcxMigrateParams, IcxMigrationService, type IcxMigrationServiceConstructorParams, type IcxRevertMigrationAction, type IcxRevertMigrationParams, type IncentiveDataHumanized, type InjTokenInfo, Injective20Token, type InjectiveBalance, InjectiveSpokeService, type InstantUnstakeAction, type InstantUnstakeParams, type InstantiateMsg, type Intent, type IntentAutoSwapResult, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentData, IntentDataService, IntentDataType, type IntentDeliveryInfo, IntentFilledEventAbi, type IntentFilledEventLog, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentTxResult, IntentsAbi, type JsonRpcPayloadResponse, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, type LendingPoolServiceConstructorParams, type LeverageYieldAction, type LeverageYieldAllowanceCheckError, type LeverageYieldAllowanceCheckErrorCode, type LeverageYieldAllowanceParams, type LeverageYieldApproveError, type LeverageYieldApproveErrorCode, type LeverageYieldApproveParams, type LeverageYieldApr, type LeverageYieldCreateIntentError, type LeverageYieldCreateIntentErrorCode, type LeverageYieldEffectiveApr, type LeverageYieldError, type LeverageYieldErrorCode, type LeverageYieldLookupError, type LeverageYieldLookupErrorCode, type LeverageYieldLsdApr, type LeverageYieldPosition, type LeverageYieldPostExecutionError, type LeverageYieldPostExecutionErrorCode, type LeverageYieldQuoteParams, LeverageYieldService, type LeverageYieldServiceConstructorParams, type LeverageYieldSwapDepositParams, type LeverageYieldSwapError, type LeverageYieldSwapErrorCode, type LeverageYieldSwapPayload, type LeverageYieldSwapWithdrawParams, type LimitOrderActionParams, LockupMultiplier, LockupPeriod, type LookupErrorCode, type MapRelayFailureCtx, type MigrateOrchestrationError, type MigrateOrchestrationErrorCode, type MigrationAction, type MigrationAllowanceCheckError, type MigrationAllowanceCheckErrorCode, type MigrationApproveError, type MigrationApproveErrorCode, type MigrationCreateIntentError, type MigrationCreateIntentErrorCode, type MigrationDirection, type MigrationError, type MigrationErrorCode, type MigrationLookupError, type MigrationLookupErrorCode, type MigrationOp, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConstructorParams, type MigrationTokens, MintPositionEventAbi, type MintPositionEventLog, type MoneyMarketAction, type MoneyMarketAllowanceCheckError, type MoneyMarketAllowanceCheckErrorCode, type MoneyMarketAllowanceParams, type MoneyMarketApproveActionParams, type MoneyMarketApproveError, type MoneyMarketApproveErrorCode, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowActionParams, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketCreateIntentError, type MoneyMarketCreateIntentErrorCode, MoneyMarketDataService, type MoneyMarketDataServiceConstructorParams, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketGasEstimationError, type MoneyMarketGasEstimationErrorCode, type MoneyMarketOrchestrationError, type MoneyMarketOrchestrationErrorCode, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayActionParams, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConstructorParams, type MoneyMarketSupplyActionParams, type MoneyMarketSupplyParams, type MoneyMarketWithdrawActionParams, type MoneyMarketWithdrawParams, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, type OnDemandBtcPayload, type OnDemandRelayData, type OptionalRaw, type OptionalSkipSimulation, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerAction, type PartnerError, type PartnerErrorCode, type PartnerFeeClaimAssetBalance, type PartnerFeeClaimCancelAction, type PartnerFeeClaimCancelParams, PartnerFeeClaimService, type PartnerFeeClaimServiceConstructorParams, type PartnerFeeClaimSwapAction, type PartnerFeeClaimSwapParams, PartnerService, type PartnerServiceConfig, type PartnerServiceConstructorParams, Permit2Service, type PermitBatch, type PermitDetails, type PermitSingle, type PoolBaseCurrencyHumanized, type PoolData, type PoolRewardConfig, type PoolSpokeAssets, type PostExecutionError, type PostExecutionErrorCode, ProtocolIntentsAbi, type QueryMsg, type QueryResponse, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RELAY_FALLBACK_FLOOR_MS, RELAY_REQUEST_TIMEOUT_MS, RadfiApiError, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiErrorBody, type RadfiMaxSpentResponse, RadfiProvider, type RadfiProviderOptions, type RadfiResponseEnvelope, type RadfiTradingWallet, type RadfiUtxo, type RadfiUtxoListResponse, type RadfiWalletBalance, type RateLimitConfig, type RawDestinationParams, type RecoveryAction, type RecoveryError, type RecoveryErrorCode, RecoveryService, type RecoveryServiceConstructorParams, type RelayAction, type RelayAndWaitParams, type RelayCode, type RelayErrorCode, type RelayExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayWrappedErrorCode, type RequestConfig, type RequestOverrideConfig, type RequestTrustlineParams, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResolvedAnalytics, type ResponseAddressType, type ResponseSigningType, type RevertMigrationOrchestrationError, type RevertMigrationOrchestrationErrorCode, type RewardInfoHumanized, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, SPONSOR_CONFIG_TTL_MS, STELLAR_BASE_RESERVE_TTL_MS, STELLAR_TRUSTLINE_MIN_XLM_STROOPS, type SendMessageParams, type SetSwapPreferenceAction, type SetSwapPreferenceParams, Sodax, SodaxError, type SodaxErrorCode, type SodaxErrorContext, type SodaxErrorJSON, type SodaxPhase, SolanaSpokeService, SolverApiService, SonicSpokeService, type SpokeApproveParams, type SpokeApproveParamsEvmSpoke, type SpokeApproveParamsHub, type SpokeApproveParamsStellar, type SpokeIsAllowanceValidParams, type SpokeIsAllowanceValidParamsEvmSpoke, type SpokeIsAllowanceValidParamsHub, type SpokeIsAllowanceValidParamsOther, type SpokeIsAllowanceValidParamsStellar, SpokeService, type SpokeServiceConstructorParams, type SpokeServiceType, type SponsorFailureAction, type SponsorFailureClass, type SponsoringAction, SponsoringApiService, type SponsoringConfigError, type SponsoringConfigErrorCode, type SponsoringLookupError, type SponsoringLookupErrorCode, type SponsoringOrchestrationError, type SponsoringOrchestrationErrorCode, SponsoringService, StacksSpokeService, type StakeAction, type StakeOrchestrationError, type StakeOrchestrationErrorCode, type StakeParams, type StakingActionType, type StakingActionUnion, type StakingAllowanceCheckError, type StakingAllowanceCheckErrorCode, type StakingApproveError, type StakingApproveErrorCode, type StakingConfig, type StakingCreateIntentError, type StakingCreateIntentErrorCode, type StakingError, type StakingErrorCode, type StakingInfo, type StakingInfoFetchError, type StakingInfoFetchErrorCode, StakingLogic, type StakingOrchestrationError, type StakingOrchestrationErrorCode, type StakingParamsUnion, StakingService, type StakingServiceConstructorParams, type State, type StellarAccountStatus, StellarSpokeService, type SubmitTxParams, type SubmitTxResponse, SuiSpokeService, SupportedMigrationTokens, type SwapAction, type SwapActionParams, type SwapCreateIntentError, type SwapCreateIntentErrorCode, type SwapError, type SwapErrorCode, type SwapExtras, type SwapResponse, SwapService, type SwapServiceConstructorParams, SwapsApiService, type SwapsApiServiceOptions, type TokenSpenderPair, type TokenWithConversion, type TxHashPair, type TxStatus, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UiPoolDataProviderServiceConstructorParams, type UnifiedBnUSDMigrateAction, type UnifiedBnUSDMigrateParams, type UnstakeAction, type UnstakeParams, type UnstakeRequest, type UnstakeRequestWithPenalty, type UnstakingInfo, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserIntentsResponse, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, type VaultSwapActionParams, type VaultSwapResponse, type VerifySimulationParams, type VerifyTxHashParams, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitForTxReceiptParams, type WaitForTxReceiptReturnType, type WaitUntilIntentExecutedPayload, type WalletMode, type WalletSimulationParams, type WithdrawHubAssetAction, type WithdrawHubAssetParams, type WithdrawInfo, adjustAmountByFee, allowanceCheckFailed, approveFailed, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bridgeInvariant, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, classifySponsorError, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createInvariant, deepMerge, defaultHookAbi, dexInvariant, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, erc20Abi, erc4626Abi, estimateBitcoinTxSize, executionFailed, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getCompoundedBalance, getConnectionIdl, getConnectionProgram, getEvmViemChain, getIconAddressBytes, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hyper, intentCreationFailed, isBackendHttpError, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexApproveError, isDexCreateIntentError, isDexError, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isFillEvent, isHubChainKeyType, isIconAddress, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNativeBitcoinTransfer, isNearChainKeyType, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isSponsoringConfigError, isSponsoringLookupError, isSponsoringOrchestrationError, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKeyType, isStellarWalletProviderType, isSuiChainKeyType, isSwapCreateIntentError, isSwapError, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, leverageYieldInvariant, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, nativeToUSD, noopAnalytics, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, resolveAnalytics, resolveLogger, retry, reverseEncodeAddress, serializeAddressData, silentLogger, sleep, sodaxInvariant, sonicWalletFactoryAbi, spokeAssetManagerAbi, sponsoringInvariant, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, swapInvariant, toCreateBridgeIntentParamsV2, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|
|
18676
|
+
export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, type ActivateStellarAccountParams, type ActivateStellarAccountResult, type AggregatedReserveData, type AllowanceCheckErrorCode, type AllowanceInfo, type AllowanceResponse, type AllowanceTransferDetails, type AnalyticsActionData, type ApiResponse, type ApprovalTxs, type ApproveErrorCode, type ApyRange, type AssetDepositAction, type AssetEntry, AssetService, type AssetServiceConstructorParams, type AssetWithdrawAction, type AutoSwapPreferences, BackendApiService, BackendHttpError, type BalnLockParams, type BalnMigrateAction, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, type BitcoinBoundExtras, BitcoinSpokeService, type BitcoinTransactionResult, type BitcoinUTXO, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeAction, type BridgeAllowanceCheckError, type BridgeAllowanceCheckErrorCode, BridgeApiService, type BridgeApiServiceOptions, type BridgeApproveError, type BridgeApproveErrorCode, type BridgeCreateIntentError, type BridgeCreateIntentErrorCode, type BridgeError, type BridgeErrorCode, type BridgeExtras, type BridgeLookupError, type BridgeLookupErrorCode, type BridgeOrchestrationError, type BridgeOrchestrationErrorCode, type BridgeParams, BridgeService, type BridgeServiceConstructorParams, type BtcPayload, CREATE_INTENT_CODES, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, type CallResponse, type CancelIntentActionParams, type CancelIntentParams, type CancelUnstakeAction, type CancelUnstakeParams, type ClClaimRewardsParams, type ClDecreaseLiquidityParams, type ClGetPoolDataParams, type ClIncreaseLiquidityParams, type ClLiquidityClaimRewardsAction, type ClLiquidityDecreaseLiquidityAction, type ClLiquidityIncreaseLiquidityAction, type ClLiquidityWithdrawAction, type ClMintPositionEventLog, type ClPositionInfo, ClService, type ClServiceConstructorParams, type ClSupplyAction, type ClSupplyParams, type ClWithdrawParams, type ClaimAction, type ClaimParams, type CombinedReserveData, type ComputedUserReserve, type ConcentratedLiquidityParams, type ConcentratedLiquidityTokenInfo, ConfigService, type ConfigServiceConstructorParams, type ConnMsg, type CreateAssetDepositParams, type CreateAssetWithdrawParams, type CreateBridgeIntentParams, type CreateIntentErrorCode, type CreateIntentParams, type CreateIntentResult, type CreateLimitOrderParams, type CreateSonicSwapIntentParams, type CreateVaultIntentResult, type CreateViemPublicClientParams, CustomSorobanServer, CustomStellarAccount, DETAILED_STATUS_NOT_DELIVERED, type DepositParams, type DepositSimulationParams, type DestinationParamsType, type DetailedLock, type DetailedStatusError, type DetailedStatusErrorCode, type DetailedSwapStatus, type DetailedSwapStatusKey, type DexApproveError, type DexApproveErrorCode, type DexCreateIntentError, type DexCreateIntentErrorCode, type DexError, type DexErrorCode, DexService, type DexServiceConstructorParams, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, type EnrichedToken, type Erc20ApprovalPlan, type Erc20ApprovalPlanReason, type Erc20ApproveParams, type Erc20GetAllowanceParams, type Erc20IsAllowanceParams, type Erc20PlanApprovalParams, Erc20Service, type Erc20Token, Erc4626Service, type EstimateGasParams, EvmAssetManagerService, type EvmDepositToDataParams, EvmHubProvider, type EvmHubProviderConstructorParams, EvmSolverService, EvmSpokeService, EvmVaultTokenService, type EvmWithdrawAssetDataParams, type ExecuteMsg, type FeatureInvariant, type FeeData, type FeeTokenApproveAction, type FeeTokenApproveParams, type FetchHubAssetBalancesParams, type FillEvent, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, GAS_ESTIMATION_CODES, type GasEstimationErrorCode, type GetDepositParams, type GetIntentSubmitTxExtraDataParams, type GetPacketParams, type GetPacketResponse, type GetQuoteParams, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeServiceType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, type GetTxReceiptType, type GetUserIntentParams, type GetUserRouterParams, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HookRequest, HookService, HttpRelayError, type HubAssetBalance, type HubProvider, type IconJsonRpcVersion, IconSpokeService, type IcxCreateRevertMigrationParams, type IcxMigrateAction, type IcxMigrateParams, IcxMigrationService, type IcxMigrationServiceConstructorParams, type IcxRevertMigrationAction, type IcxRevertMigrationParams, type IncentiveDataHumanized, type InjTokenInfo, Injective20Token, type InjectiveBalance, InjectiveSpokeService, type InstantUnstakeAction, type InstantUnstakeParams, type InstantiateMsg, type Intent, type IntentAutoSwapResult, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentData, IntentDataService, IntentDataType, type IntentDeliveryInfo, IntentFilledEventAbi, type IntentFilledEventLog, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentTxResult, IntentsAbi, type JsonRpcPayloadResponse, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, type LendingPoolServiceConstructorParams, type LeverageYieldAction, type LeverageYieldAllowanceCheckError, type LeverageYieldAllowanceCheckErrorCode, type LeverageYieldAllowanceParams, type LeverageYieldApproveError, type LeverageYieldApproveErrorCode, type LeverageYieldApproveParams, type LeverageYieldApr, type LeverageYieldCreateIntentError, type LeverageYieldCreateIntentErrorCode, type LeverageYieldEffectiveApr, type LeverageYieldError, type LeverageYieldErrorCode, type LeverageYieldLookupError, type LeverageYieldLookupErrorCode, type LeverageYieldLsdApr, type LeverageYieldPosition, type LeverageYieldPostExecutionError, type LeverageYieldPostExecutionErrorCode, type LeverageYieldQuoteParams, LeverageYieldService, type LeverageYieldServiceConstructorParams, type LeverageYieldSwapDepositParams, type LeverageYieldSwapError, type LeverageYieldSwapErrorCode, type LeverageYieldSwapPayload, type LeverageYieldSwapWithdrawParams, type LimitOrderActionParams, LockupMultiplier, LockupPeriod, type LookupErrorCode, type MapRelayFailureCtx, type MigrateOrchestrationError, type MigrateOrchestrationErrorCode, type MigrationAction, type MigrationAllowanceCheckError, type MigrationAllowanceCheckErrorCode, type MigrationApproveError, type MigrationApproveErrorCode, type MigrationCreateIntentError, type MigrationCreateIntentErrorCode, type MigrationDirection, type MigrationError, type MigrationErrorCode, type MigrationLookupError, type MigrationLookupErrorCode, type MigrationOp, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConstructorParams, type MigrationTokens, MintPositionEventAbi, type MintPositionEventLog, type MoneyMarketAction, type MoneyMarketAllowanceCheckError, type MoneyMarketAllowanceCheckErrorCode, type MoneyMarketAllowanceParams, type MoneyMarketApproveActionParams, type MoneyMarketApproveError, type MoneyMarketApproveErrorCode, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowActionParams, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketCreateIntentError, type MoneyMarketCreateIntentErrorCode, MoneyMarketDataService, type MoneyMarketDataServiceConstructorParams, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketGasEstimationError, type MoneyMarketGasEstimationErrorCode, type MoneyMarketOrchestrationError, type MoneyMarketOrchestrationErrorCode, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayActionParams, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConstructorParams, type MoneyMarketSupplyActionParams, type MoneyMarketSupplyParams, type MoneyMarketWithdrawActionParams, type MoneyMarketWithdrawParams, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, type OnDemandBtcPayload, type OnDemandRelayData, type OptionalRaw, type OptionalSkipSimulation, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerAction, type PartnerError, type PartnerErrorCode, type PartnerFeeClaimAssetBalance, type PartnerFeeClaimCancelAction, type PartnerFeeClaimCancelParams, PartnerFeeClaimService, type PartnerFeeClaimServiceConstructorParams, type PartnerFeeClaimSwapAction, type PartnerFeeClaimSwapParams, PartnerService, type PartnerServiceConfig, type PartnerServiceConstructorParams, Permit2Service, type PermitBatch, type PermitDetails, type PermitSingle, type PoolBaseCurrencyHumanized, type PoolData, type PoolRewardConfig, type PoolSpokeAssets, type PostExecutionError, type PostExecutionErrorCode, ProtocolIntentsAbi, type QueryMsg, type QueryResponse, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RELAY_FALLBACK_FLOOR_MS, RELAY_REQUEST_TIMEOUT_MS, RadfiApiError, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiErrorBody, type RadfiMaxSpentResponse, RadfiProvider, type RadfiProviderOptions, type RadfiResponseEnvelope, type RadfiTradingWallet, type RadfiUtxo, type RadfiUtxoListResponse, type RadfiWalletBalance, type RateLimitConfig, type RawDestinationParams, type RecoveryAction, type RecoveryError, type RecoveryErrorCode, RecoveryService, type RecoveryServiceConstructorParams, type RelayAction, type RelayAndWaitParams, type RelayCode, type RelayErrorCode, type RelayExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayWrappedErrorCode, type RequestConfig, type RequestOverrideConfig, type RequestTrustlineParams, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResolvedAnalytics, type ResponseAddressType, type ResponseSigningType, type RevertMigrationOrchestrationError, type RevertMigrationOrchestrationErrorCode, type RewardInfoHumanized, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, SPONSOR_CONFIG_TTL_MS, STELLAR_BASE_RESERVE_TTL_MS, STELLAR_TRUSTLINE_MIN_XLM_STROOPS, type SendMessageParams, type SetSwapPreferenceAction, type SetSwapPreferenceParams, Sodax, SodaxError, type SodaxErrorCode, type SodaxErrorContext, type SodaxErrorJSON, type SodaxPhase, SolanaSpokeService, SolverApiService, SonicSpokeService, type SpokeApproveParams, type SpokeApproveParamsEvmSpoke, type SpokeApproveParamsHub, type SpokeApproveParamsStellar, type SpokeIsAllowanceValidParams, type SpokeIsAllowanceValidParamsEvmSpoke, type SpokeIsAllowanceValidParamsHub, type SpokeIsAllowanceValidParamsOther, type SpokeIsAllowanceValidParamsStellar, SpokeService, type SpokeServiceConstructorParams, type SpokeServiceType, type SponsorFailureAction, type SponsorFailureClass, type SponsoringAction, SponsoringApiService, type SponsoringConfigError, type SponsoringConfigErrorCode, type SponsoringLookupError, type SponsoringLookupErrorCode, type SponsoringOrchestrationError, type SponsoringOrchestrationErrorCode, SponsoringService, StacksSpokeService, type StakeAction, type StakeOrchestrationError, type StakeOrchestrationErrorCode, type StakeParams, type StakingActionType, type StakingActionUnion, type StakingAllowanceCheckError, type StakingAllowanceCheckErrorCode, type StakingApproveError, type StakingApproveErrorCode, type StakingConfig, type StakingCreateIntentError, type StakingCreateIntentErrorCode, type StakingError, type StakingErrorCode, type StakingInfo, type StakingInfoFetchError, type StakingInfoFetchErrorCode, StakingLogic, type StakingOrchestrationError, type StakingOrchestrationErrorCode, type StakingParamsUnion, StakingService, type StakingServiceConstructorParams, type State, type StellarAccountStatus, StellarSpokeService, type SubmitTxParams, type SubmitTxResponse, SuiGrpcTransport, SuiSpokeService, SupportedMigrationTokens, type SwapAction, type SwapActionParams, type SwapCreateIntentError, type SwapCreateIntentErrorCode, type SwapError, type SwapErrorCode, type SwapExtras, type SwapResponse, SwapService, type SwapServiceConstructorParams, SwapsApiService, type SwapsApiServiceOptions, type TokenSpenderPair, type TokenWithConversion, type TxHashPair, type TxStatus, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UiPoolDataProviderServiceConstructorParams, type UnifiedBnUSDMigrateAction, type UnifiedBnUSDMigrateParams, type UnstakeAction, type UnstakeParams, type UnstakeRequest, type UnstakeRequestWithPenalty, type UnstakingInfo, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserIntentsResponse, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, type VaultSwapActionParams, type VaultSwapResponse, type VerifySimulationParams, type VerifyTxHashParams, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitForTxReceiptParams, type WaitForTxReceiptReturnType, type WaitUntilIntentExecutedPayload, type WalletMode, type WalletSimulationParams, type WithdrawHubAssetAction, type WithdrawHubAssetParams, type WithdrawInfo, adjustAmountByFee, allowanceCheckFailed, approveFailed, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bridgeInvariant, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, classifySponsorError, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createInvariant, deepMerge, defaultHookAbi, dexInvariant, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, erc20Abi, erc4626Abi, estimateBitcoinTxSize, executionFailed, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getCompoundedBalance, getConnectionIdl, getConnectionProgram, getEvmViemChain, getIconAddressBytes, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hyper, intentCreationFailed, isBackendHttpError, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexApproveError, isDexCreateIntentError, isDexError, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isFillEvent, isHubChainKeyType, isIconAddress, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNativeBitcoinTransfer, isNearChainKeyType, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isSponsoringConfigError, isSponsoringLookupError, isSponsoringOrchestrationError, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKeyType, isStellarWalletProviderType, isSuiChainKeyType, isSwapCreateIntentError, isSwapError, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, leverageYieldInvariant, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, nativeToUSD, noopAnalytics, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, resolveAnalytics, resolveLogger, retry, reverseEncodeAddress, serializeAddressData, silentLogger, sleep, sodaxInvariant, sonicWalletFactoryAbi, spokeAssetManagerAbi, sponsoringInvariant, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, swapInvariant, toCreateBridgeIntentParamsV2, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SodaxFeature, ISwapsApiV2, Result, SwapsApiConfig, SodaxLogger, GetSwapTokensResponseV2, GetSwapTokensByChainResponseV2, QuoteRequestV2, QuoteQueryV2, QuoteResponseV2, DeadlineQueryV2, DeadlineResponseV2, CreateIntentParamsV2, AllowanceCheckResponseV2, ApproveResponseV2, CreateIntentResponseV2, SubmitIntentRequestV2, SubmitIntentResponseV2, StatusRequestV2, StatusResponseV2, CancelIntentRequestV2, CancelIntentResponseV2, IntentHashRequestV2, IntentHashResponseV2, IntentPacketRequestV2, IntentPacketResponseV2, IntentExtraDataRequestV2, IntentExtraDataResponseV2, IntentStateV2, GetIntentResponseV2, CreateLimitOrderParamsV2, CreateLimitOrderResponseV2, GasEstimateRequestV2, GasEstimateResponseV2, FeeQueryV2, FeeResponseV2, SubmitTxRequestV2, SubmitTxResponseV2, SubmitTxStatusQueryV2, SubmitTxStatusResponseV2, IStellarSponsoringApi, SponsoringApiConfig, StellarSponsorConfig, StellarSponsoredAccountRequest, StellarSponsoredAccountResponse, IBridgeApiV2, BaseApiConfig, GetBridgeTokensResponseV2, GetBridgeTokensByChainResponseV2, CreateBridgeIntentParamsV2, BridgeAllowanceCheckResponseV2, BridgeApproveResponseV2, CreateBridgeIntentResponseV2, BridgeSubmitTxRequestV2, BridgeSubmitTxResponseV2, BridgeSubmitTxStatusQueryV2, BridgeSubmitTxStatusResponseV2, BridgeFeeRequestV2, BridgeFeeResponseV2, BridgeQuoteRequestV2, BridgeableAmountResponseV2, BridgeableCheckResponseV2, BitcoinBoundExtrasV2, PartnerFeeV2, IConfigApiV1, ApiConfig, Address, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, SpokeChainKey, GetSwapTokensByChainIdApiResponse, GetMoneyMarketTokensApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, AnalyticsDetailLevel, AnalyticsEventPhase, AnalyticsOption, PartnerFee, RadfiSigner, SodaxConfig, SodaxOptions, XToken, OriginalAssetAddress, IntentRelayChainId, HubChainKey, HubConfig, PoolKey, SpokeChainConfig, RelayConfig, SolverConfig, SwapsConfig, BridgeConfig, MoneyMarketConfig, LeverageYieldConfig, DexConfig, GetSpokeChainConfigType, SodaxDefaultConfig, EvmContractCall, Hex, IEvmWalletProvider, EvmRawTransactionReceipt, QuoteType, EvmChainKey, DeepPartial, WalletProviderSlot, TxReturnType, ChainType, GetChainType, SolanaRawTransactionReceipt, StellarSorobanTransactionReceipt, IconTransactionResult, SuiRawTransactionReceipt, InjectiveRawTransactionReceipt, NearRawTransactionReceipt, StacksRawTransactionReceipt, BitcoinRawTransactionReceipt, GetAddressType, HubAddress, GetTokenAddressType, EvmSpokeOnlyChainKey, StellarChainKey, HookKind, SonicChainKey, AssetInfo, TokenInfo, VaultReserves, StacksChainKey, FeeEstimateTransaction, StacksTransactionParams, HttpUrl, RadfiConfig, IBitcoinWalletProvider, RadfiDepositTxResponse, BtcAddressType, BitcoinChainKey, BitcoinRawTransaction, NearChainKey, FillData, NearRawTransaction, INearWalletProvider, SuiPaginatedCoins, SuiChainKey, SuiExecutionResult, SuiGasEstimate, IStellarWalletProvider, StellarGasEstimate, SolanaChainKey, SolanaGasEstimate, SolanaBase58PublicKey, SolanaRawTransactionInstruction, SolanaSerializedTransaction, SolanaRpcResponseAndContext, SolanaTokenAmount, IconChainKey, IconGasEstimate, InjectiveChainKey, InjectiveGasEstimate, JsonObject, InjectiveCoin, InjectiveRawTransaction, IInjectiveWalletProvider, InjectiveExecuteResponse, GetEstimateGasReturnType, IconAddress, IWalletProvider, EvmSpokeChainConfig, PartnerFeeAmount, PartnerFeePercentage, GetWalletProviderType, SodaxLoggerOption, SubmitTxStatusDataV2, SolverIntentStatusResponse, SpokeExecActionParams, FeeAmount, Hash as Hash$1, SolverIntentQuoteRequest, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentStatusRequest, SolverExecutionRequest, SolverExecutionResponse, IconEoaAddress, IcxTokenType, IconContractAddress, BridgeLimit, UserUnstakeInfo, ConcentratedLiquidityConfig, LeverageYieldVault, SponsoringApiErrorCode } from '@sodax/types';
|
|
1
|
+
import { SodaxFeature, ISwapsApiV2, Result, SwapsApiConfig, SodaxLogger, GetSwapTokensResponseV2, GetSwapTokensByChainResponseV2, QuoteRequestV2, QuoteQueryV2, QuoteResponseV2, DeadlineQueryV2, DeadlineResponseV2, CreateIntentParamsV2, AllowanceCheckResponseV2, ApproveResponseV2, CreateIntentResponseV2, SubmitIntentRequestV2, SubmitIntentResponseV2, StatusRequestV2, StatusResponseV2, CancelIntentRequestV2, CancelIntentResponseV2, IntentHashRequestV2, IntentHashResponseV2, IntentPacketRequestV2, IntentPacketResponseV2, IntentExtraDataRequestV2, IntentExtraDataResponseV2, IntentStateV2, GetIntentResponseV2, CreateLimitOrderParamsV2, CreateLimitOrderResponseV2, GasEstimateRequestV2, GasEstimateResponseV2, FeeQueryV2, FeeResponseV2, SubmitTxRequestV2, SubmitTxResponseV2, SubmitTxStatusQueryV2, SubmitTxStatusResponseV2, IStellarSponsoringApi, SponsoringApiConfig, StellarSponsorConfig, StellarSponsoredAccountRequest, StellarSponsoredAccountResponse, IBridgeApiV2, BaseApiConfig, GetBridgeTokensResponseV2, GetBridgeTokensByChainResponseV2, CreateBridgeIntentParamsV2, BridgeAllowanceCheckResponseV2, BridgeApproveResponseV2, CreateBridgeIntentResponseV2, BridgeSubmitTxRequestV2, BridgeSubmitTxResponseV2, BridgeSubmitTxStatusQueryV2, BridgeSubmitTxStatusResponseV2, BridgeFeeRequestV2, BridgeFeeResponseV2, BridgeQuoteRequestV2, BridgeableAmountResponseV2, BridgeableCheckResponseV2, BitcoinBoundExtrasV2, PartnerFeeV2, IConfigApiV1, ApiConfig, Address, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, SpokeChainKey, GetSwapTokensByChainIdApiResponse, GetMoneyMarketTokensApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, AnalyticsDetailLevel, AnalyticsEventPhase, AnalyticsOption, PartnerFee, RadfiSigner, SodaxConfig, SodaxOptions, XToken, OriginalAssetAddress, IntentRelayChainId, HubChainKey, HubConfig, PoolKey, SpokeChainConfig, RelayConfig, SolverConfig, SwapsConfig, BridgeConfig, MoneyMarketConfig, LeverageYieldConfig, DexConfig, GetSpokeChainConfigType, SodaxDefaultConfig, EvmContractCall, Hex, IEvmWalletProvider, EvmRawTransactionReceipt, QuoteType, EvmChainKey, DeepPartial, WalletProviderSlot, TxReturnType, ChainType, GetChainType, SolanaRawTransactionReceipt, StellarSorobanTransactionReceipt, IconTransactionResult, SuiRawTransactionReceipt, InjectiveRawTransactionReceipt, NearRawTransactionReceipt, StacksRawTransactionReceipt, BitcoinRawTransactionReceipt, GetAddressType, HubAddress, GetTokenAddressType, EvmSpokeOnlyChainKey, StellarChainKey, HookKind, SonicChainKey, AssetInfo, TokenInfo, VaultReserves, StacksChainKey, FeeEstimateTransaction, StacksTransactionParams, HttpUrl, RadfiConfig, IBitcoinWalletProvider, RadfiDepositTxResponse, BtcAddressType, BitcoinChainKey, BitcoinRawTransaction, NearChainKey, FillData, NearRawTransaction, INearWalletProvider, SuiTransport, SuiPaginatedCoins, SuiChainKey, SuiExecutionResult, SuiGasEstimate, IStellarWalletProvider, StellarGasEstimate, SolanaChainKey, SolanaGasEstimate, SolanaBase58PublicKey, SolanaRawTransactionInstruction, SolanaSerializedTransaction, SolanaRpcResponseAndContext, SolanaTokenAmount, IconChainKey, IconGasEstimate, InjectiveChainKey, InjectiveGasEstimate, JsonObject, InjectiveCoin, InjectiveRawTransaction, IInjectiveWalletProvider, InjectiveExecuteResponse, GetEstimateGasReturnType, SuiTransaction, SuiWaitForTransactionParams, IconAddress, IWalletProvider, EvmSpokeChainConfig, PartnerFeeAmount, PartnerFeePercentage, GetWalletProviderType, SodaxLoggerOption, SubmitTxStatusDataV2, SolverIntentStatusResponse, SpokeExecActionParams, FeeAmount, Hash as Hash$1, SolverIntentQuoteRequest, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentStatusRequest, SolverExecutionRequest, SolverExecutionResponse, IconEoaAddress, IcxTokenType, IconContractAddress, BridgeLimit, UserUnstakeInfo, ConcentratedLiquidityConfig, LeverageYieldVault, SponsoringApiErrorCode } from '@sodax/types';
|
|
2
2
|
export * from '@sodax/types';
|
|
3
3
|
export { SodaxFeature } from '@sodax/types';
|
|
4
4
|
import * as viem from 'viem';
|
|
@@ -7,7 +7,6 @@ import { StacksNetwork, ClarityValue } from '@sodax/libs/stacks/core';
|
|
|
7
7
|
import { networks, Psbt } from 'bitcoinjs-lib';
|
|
8
8
|
import { JsonRpcProvider } from 'near-api-js';
|
|
9
9
|
import { Transaction, TransactionResult } from '@mysten/sui/transactions';
|
|
10
|
-
import { SuiClient } from '@mysten/sui/client';
|
|
11
10
|
import { rpc, Transaction as Transaction$1, Memo, MemoType, Operation, FeeBumpTransaction, Horizon, Account, xdr } from '@stellar/stellar-sdk';
|
|
12
11
|
import { Connection as Connection$1, PublicKey, TransactionInstruction } from '@solana/web3.js';
|
|
13
12
|
import { IconService } from 'icon-sdk-js';
|
|
@@ -10004,7 +10003,9 @@ type SuiTxObject = {
|
|
|
10004
10003
|
};
|
|
10005
10004
|
declare class SuiSpokeService {
|
|
10006
10005
|
private readonly config;
|
|
10007
|
-
readonly
|
|
10006
|
+
readonly transport: SuiTransport;
|
|
10007
|
+
/** @deprecated Renamed to `transport`, and no longer a raw `@mysten/sui` client. */
|
|
10008
|
+
readonly publicClient: SuiTransport;
|
|
10008
10009
|
assetManagerAddress: string | undefined;
|
|
10009
10010
|
private readonly pollingIntervalMs;
|
|
10010
10011
|
private readonly maxTimeoutMs;
|
|
@@ -10501,6 +10502,17 @@ declare class SpokeService {
|
|
|
10501
10502
|
waitForTxReceipt<C extends SpokeChainKey = SpokeChainKey>(params: WaitForTxReceiptParams<C>): Promise<Result<WaitForTxReceiptReturnType<C>>>;
|
|
10502
10503
|
}
|
|
10503
10504
|
|
|
10505
|
+
declare class SuiGrpcTransport implements SuiTransport {
|
|
10506
|
+
readonly endpoint: string;
|
|
10507
|
+
private readonly client;
|
|
10508
|
+
constructor(endpoint: string);
|
|
10509
|
+
getCoins(owner: string, coinType: string, limit?: number): Promise<SuiPaginatedCoins>;
|
|
10510
|
+
simulate(tx: SuiTransaction, sender: string): Promise<SuiExecutionResult>;
|
|
10511
|
+
estimateGas(tx: SuiTransaction, sender: string): Promise<SuiGasEstimate>;
|
|
10512
|
+
fetchLatestPackageId(objectId: string): Promise<string>;
|
|
10513
|
+
waitForTransaction(params: SuiWaitForTransactionParams): Promise<SuiRawTransactionReceipt>;
|
|
10514
|
+
}
|
|
10515
|
+
|
|
10504
10516
|
/**
|
|
10505
10517
|
* Stable error message strings emitted by relay-layer helpers ({@link submitTransaction},
|
|
10506
10518
|
* {@link relayTxAndWaitPacket}) on failure.
|
|
@@ -18661,4 +18673,4 @@ type DexApproveErrorCode = ApproveErrorCode;
|
|
|
18661
18673
|
type DexApproveError = SodaxError<DexApproveErrorCode>;
|
|
18662
18674
|
declare const isDexApproveError: (e: unknown) => e is SodaxError<ApproveErrorCode>;
|
|
18663
18675
|
|
|
18664
|
-
export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, type ActivateStellarAccountParams, type ActivateStellarAccountResult, type AggregatedReserveData, type AllowanceCheckErrorCode, type AllowanceInfo, type AllowanceResponse, type AllowanceTransferDetails, type AnalyticsActionData, type ApiResponse, type ApprovalTxs, type ApproveErrorCode, type ApyRange, type AssetDepositAction, type AssetEntry, AssetService, type AssetServiceConstructorParams, type AssetWithdrawAction, type AutoSwapPreferences, BackendApiService, BackendHttpError, type BalnLockParams, type BalnMigrateAction, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, type BitcoinBoundExtras, BitcoinSpokeService, type BitcoinTransactionResult, type BitcoinUTXO, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeAction, type BridgeAllowanceCheckError, type BridgeAllowanceCheckErrorCode, BridgeApiService, type BridgeApiServiceOptions, type BridgeApproveError, type BridgeApproveErrorCode, type BridgeCreateIntentError, type BridgeCreateIntentErrorCode, type BridgeError, type BridgeErrorCode, type BridgeExtras, type BridgeLookupError, type BridgeLookupErrorCode, type BridgeOrchestrationError, type BridgeOrchestrationErrorCode, type BridgeParams, BridgeService, type BridgeServiceConstructorParams, type BtcPayload, CREATE_INTENT_CODES, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, type CallResponse, type CancelIntentActionParams, type CancelIntentParams, type CancelUnstakeAction, type CancelUnstakeParams, type ClClaimRewardsParams, type ClDecreaseLiquidityParams, type ClGetPoolDataParams, type ClIncreaseLiquidityParams, type ClLiquidityClaimRewardsAction, type ClLiquidityDecreaseLiquidityAction, type ClLiquidityIncreaseLiquidityAction, type ClLiquidityWithdrawAction, type ClMintPositionEventLog, type ClPositionInfo, ClService, type ClServiceConstructorParams, type ClSupplyAction, type ClSupplyParams, type ClWithdrawParams, type ClaimAction, type ClaimParams, type CombinedReserveData, type ComputedUserReserve, type ConcentratedLiquidityParams, type ConcentratedLiquidityTokenInfo, ConfigService, type ConfigServiceConstructorParams, type ConnMsg, type CreateAssetDepositParams, type CreateAssetWithdrawParams, type CreateBridgeIntentParams, type CreateIntentErrorCode, type CreateIntentParams, type CreateIntentResult, type CreateLimitOrderParams, type CreateSonicSwapIntentParams, type CreateVaultIntentResult, type CreateViemPublicClientParams, CustomSorobanServer, CustomStellarAccount, DETAILED_STATUS_NOT_DELIVERED, type DepositParams, type DepositSimulationParams, type DestinationParamsType, type DetailedLock, type DetailedStatusError, type DetailedStatusErrorCode, type DetailedSwapStatus, type DetailedSwapStatusKey, type DexApproveError, type DexApproveErrorCode, type DexCreateIntentError, type DexCreateIntentErrorCode, type DexError, type DexErrorCode, DexService, type DexServiceConstructorParams, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, type EnrichedToken, type Erc20ApprovalPlan, type Erc20ApprovalPlanReason, type Erc20ApproveParams, type Erc20GetAllowanceParams, type Erc20IsAllowanceParams, type Erc20PlanApprovalParams, Erc20Service, type Erc20Token, Erc4626Service, type EstimateGasParams, EvmAssetManagerService, type EvmDepositToDataParams, EvmHubProvider, type EvmHubProviderConstructorParams, EvmSolverService, EvmSpokeService, EvmVaultTokenService, type EvmWithdrawAssetDataParams, type ExecuteMsg, type FeatureInvariant, type FeeData, type FeeTokenApproveAction, type FeeTokenApproveParams, type FetchHubAssetBalancesParams, type FillEvent, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, GAS_ESTIMATION_CODES, type GasEstimationErrorCode, type GetDepositParams, type GetIntentSubmitTxExtraDataParams, type GetPacketParams, type GetPacketResponse, type GetQuoteParams, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeServiceType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, type GetTxReceiptType, type GetUserIntentParams, type GetUserRouterParams, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HookRequest, HookService, HttpRelayError, type HubAssetBalance, type HubProvider, type IconJsonRpcVersion, IconSpokeService, type IcxCreateRevertMigrationParams, type IcxMigrateAction, type IcxMigrateParams, IcxMigrationService, type IcxMigrationServiceConstructorParams, type IcxRevertMigrationAction, type IcxRevertMigrationParams, type IncentiveDataHumanized, type InjTokenInfo, Injective20Token, type InjectiveBalance, InjectiveSpokeService, type InstantUnstakeAction, type InstantUnstakeParams, type InstantiateMsg, type Intent, type IntentAutoSwapResult, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentData, IntentDataService, IntentDataType, type IntentDeliveryInfo, IntentFilledEventAbi, type IntentFilledEventLog, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentTxResult, IntentsAbi, type JsonRpcPayloadResponse, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, type LendingPoolServiceConstructorParams, type LeverageYieldAction, type LeverageYieldAllowanceCheckError, type LeverageYieldAllowanceCheckErrorCode, type LeverageYieldAllowanceParams, type LeverageYieldApproveError, type LeverageYieldApproveErrorCode, type LeverageYieldApproveParams, type LeverageYieldApr, type LeverageYieldCreateIntentError, type LeverageYieldCreateIntentErrorCode, type LeverageYieldEffectiveApr, type LeverageYieldError, type LeverageYieldErrorCode, type LeverageYieldLookupError, type LeverageYieldLookupErrorCode, type LeverageYieldLsdApr, type LeverageYieldPosition, type LeverageYieldPostExecutionError, type LeverageYieldPostExecutionErrorCode, type LeverageYieldQuoteParams, LeverageYieldService, type LeverageYieldServiceConstructorParams, type LeverageYieldSwapDepositParams, type LeverageYieldSwapError, type LeverageYieldSwapErrorCode, type LeverageYieldSwapPayload, type LeverageYieldSwapWithdrawParams, type LimitOrderActionParams, LockupMultiplier, LockupPeriod, type LookupErrorCode, type MapRelayFailureCtx, type MigrateOrchestrationError, type MigrateOrchestrationErrorCode, type MigrationAction, type MigrationAllowanceCheckError, type MigrationAllowanceCheckErrorCode, type MigrationApproveError, type MigrationApproveErrorCode, type MigrationCreateIntentError, type MigrationCreateIntentErrorCode, type MigrationDirection, type MigrationError, type MigrationErrorCode, type MigrationLookupError, type MigrationLookupErrorCode, type MigrationOp, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConstructorParams, type MigrationTokens, MintPositionEventAbi, type MintPositionEventLog, type MoneyMarketAction, type MoneyMarketAllowanceCheckError, type MoneyMarketAllowanceCheckErrorCode, type MoneyMarketAllowanceParams, type MoneyMarketApproveActionParams, type MoneyMarketApproveError, type MoneyMarketApproveErrorCode, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowActionParams, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketCreateIntentError, type MoneyMarketCreateIntentErrorCode, MoneyMarketDataService, type MoneyMarketDataServiceConstructorParams, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketGasEstimationError, type MoneyMarketGasEstimationErrorCode, type MoneyMarketOrchestrationError, type MoneyMarketOrchestrationErrorCode, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayActionParams, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConstructorParams, type MoneyMarketSupplyActionParams, type MoneyMarketSupplyParams, type MoneyMarketWithdrawActionParams, type MoneyMarketWithdrawParams, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, type OnDemandBtcPayload, type OnDemandRelayData, type OptionalRaw, type OptionalSkipSimulation, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerAction, type PartnerError, type PartnerErrorCode, type PartnerFeeClaimAssetBalance, type PartnerFeeClaimCancelAction, type PartnerFeeClaimCancelParams, PartnerFeeClaimService, type PartnerFeeClaimServiceConstructorParams, type PartnerFeeClaimSwapAction, type PartnerFeeClaimSwapParams, PartnerService, type PartnerServiceConfig, type PartnerServiceConstructorParams, Permit2Service, type PermitBatch, type PermitDetails, type PermitSingle, type PoolBaseCurrencyHumanized, type PoolData, type PoolRewardConfig, type PoolSpokeAssets, type PostExecutionError, type PostExecutionErrorCode, ProtocolIntentsAbi, type QueryMsg, type QueryResponse, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RELAY_FALLBACK_FLOOR_MS, RELAY_REQUEST_TIMEOUT_MS, RadfiApiError, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiErrorBody, type RadfiMaxSpentResponse, RadfiProvider, type RadfiProviderOptions, type RadfiResponseEnvelope, type RadfiTradingWallet, type RadfiUtxo, type RadfiUtxoListResponse, type RadfiWalletBalance, type RateLimitConfig, type RawDestinationParams, type RecoveryAction, type RecoveryError, type RecoveryErrorCode, RecoveryService, type RecoveryServiceConstructorParams, type RelayAction, type RelayAndWaitParams, type RelayCode, type RelayErrorCode, type RelayExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayWrappedErrorCode, type RequestConfig, type RequestOverrideConfig, type RequestTrustlineParams, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResolvedAnalytics, type ResponseAddressType, type ResponseSigningType, type RevertMigrationOrchestrationError, type RevertMigrationOrchestrationErrorCode, type RewardInfoHumanized, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, SPONSOR_CONFIG_TTL_MS, STELLAR_BASE_RESERVE_TTL_MS, STELLAR_TRUSTLINE_MIN_XLM_STROOPS, type SendMessageParams, type SetSwapPreferenceAction, type SetSwapPreferenceParams, Sodax, SodaxError, type SodaxErrorCode, type SodaxErrorContext, type SodaxErrorJSON, type SodaxPhase, SolanaSpokeService, SolverApiService, SonicSpokeService, type SpokeApproveParams, type SpokeApproveParamsEvmSpoke, type SpokeApproveParamsHub, type SpokeApproveParamsStellar, type SpokeIsAllowanceValidParams, type SpokeIsAllowanceValidParamsEvmSpoke, type SpokeIsAllowanceValidParamsHub, type SpokeIsAllowanceValidParamsOther, type SpokeIsAllowanceValidParamsStellar, SpokeService, type SpokeServiceConstructorParams, type SpokeServiceType, type SponsorFailureAction, type SponsorFailureClass, type SponsoringAction, SponsoringApiService, type SponsoringConfigError, type SponsoringConfigErrorCode, type SponsoringLookupError, type SponsoringLookupErrorCode, type SponsoringOrchestrationError, type SponsoringOrchestrationErrorCode, SponsoringService, StacksSpokeService, type StakeAction, type StakeOrchestrationError, type StakeOrchestrationErrorCode, type StakeParams, type StakingActionType, type StakingActionUnion, type StakingAllowanceCheckError, type StakingAllowanceCheckErrorCode, type StakingApproveError, type StakingApproveErrorCode, type StakingConfig, type StakingCreateIntentError, type StakingCreateIntentErrorCode, type StakingError, type StakingErrorCode, type StakingInfo, type StakingInfoFetchError, type StakingInfoFetchErrorCode, StakingLogic, type StakingOrchestrationError, type StakingOrchestrationErrorCode, type StakingParamsUnion, StakingService, type StakingServiceConstructorParams, type State, type StellarAccountStatus, StellarSpokeService, type SubmitTxParams, type SubmitTxResponse, SuiSpokeService, SupportedMigrationTokens, type SwapAction, type SwapActionParams, type SwapCreateIntentError, type SwapCreateIntentErrorCode, type SwapError, type SwapErrorCode, type SwapExtras, type SwapResponse, SwapService, type SwapServiceConstructorParams, SwapsApiService, type SwapsApiServiceOptions, type TokenSpenderPair, type TokenWithConversion, type TxHashPair, type TxStatus, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UiPoolDataProviderServiceConstructorParams, type UnifiedBnUSDMigrateAction, type UnifiedBnUSDMigrateParams, type UnstakeAction, type UnstakeParams, type UnstakeRequest, type UnstakeRequestWithPenalty, type UnstakingInfo, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserIntentsResponse, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, type VaultSwapActionParams, type VaultSwapResponse, type VerifySimulationParams, type VerifyTxHashParams, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitForTxReceiptParams, type WaitForTxReceiptReturnType, type WaitUntilIntentExecutedPayload, type WalletMode, type WalletSimulationParams, type WithdrawHubAssetAction, type WithdrawHubAssetParams, type WithdrawInfo, adjustAmountByFee, allowanceCheckFailed, approveFailed, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bridgeInvariant, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, classifySponsorError, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createInvariant, deepMerge, defaultHookAbi, dexInvariant, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, erc20Abi, erc4626Abi, estimateBitcoinTxSize, executionFailed, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getCompoundedBalance, getConnectionIdl, getConnectionProgram, getEvmViemChain, getIconAddressBytes, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hyper, intentCreationFailed, isBackendHttpError, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexApproveError, isDexCreateIntentError, isDexError, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isFillEvent, isHubChainKeyType, isIconAddress, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNativeBitcoinTransfer, isNearChainKeyType, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isSponsoringConfigError, isSponsoringLookupError, isSponsoringOrchestrationError, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKeyType, isStellarWalletProviderType, isSuiChainKeyType, isSwapCreateIntentError, isSwapError, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, leverageYieldInvariant, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, nativeToUSD, noopAnalytics, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, resolveAnalytics, resolveLogger, retry, reverseEncodeAddress, serializeAddressData, silentLogger, sleep, sodaxInvariant, sonicWalletFactoryAbi, spokeAssetManagerAbi, sponsoringInvariant, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, swapInvariant, toCreateBridgeIntentParamsV2, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|
|
18676
|
+
export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, type ActivateStellarAccountParams, type ActivateStellarAccountResult, type AggregatedReserveData, type AllowanceCheckErrorCode, type AllowanceInfo, type AllowanceResponse, type AllowanceTransferDetails, type AnalyticsActionData, type ApiResponse, type ApprovalTxs, type ApproveErrorCode, type ApyRange, type AssetDepositAction, type AssetEntry, AssetService, type AssetServiceConstructorParams, type AssetWithdrawAction, type AutoSwapPreferences, BackendApiService, BackendHttpError, type BalnLockParams, type BalnMigrateAction, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, type BitcoinBoundExtras, BitcoinSpokeService, type BitcoinTransactionResult, type BitcoinUTXO, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeAction, type BridgeAllowanceCheckError, type BridgeAllowanceCheckErrorCode, BridgeApiService, type BridgeApiServiceOptions, type BridgeApproveError, type BridgeApproveErrorCode, type BridgeCreateIntentError, type BridgeCreateIntentErrorCode, type BridgeError, type BridgeErrorCode, type BridgeExtras, type BridgeLookupError, type BridgeLookupErrorCode, type BridgeOrchestrationError, type BridgeOrchestrationErrorCode, type BridgeParams, BridgeService, type BridgeServiceConstructorParams, type BtcPayload, CREATE_INTENT_CODES, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, type CallResponse, type CancelIntentActionParams, type CancelIntentParams, type CancelUnstakeAction, type CancelUnstakeParams, type ClClaimRewardsParams, type ClDecreaseLiquidityParams, type ClGetPoolDataParams, type ClIncreaseLiquidityParams, type ClLiquidityClaimRewardsAction, type ClLiquidityDecreaseLiquidityAction, type ClLiquidityIncreaseLiquidityAction, type ClLiquidityWithdrawAction, type ClMintPositionEventLog, type ClPositionInfo, ClService, type ClServiceConstructorParams, type ClSupplyAction, type ClSupplyParams, type ClWithdrawParams, type ClaimAction, type ClaimParams, type CombinedReserveData, type ComputedUserReserve, type ConcentratedLiquidityParams, type ConcentratedLiquidityTokenInfo, ConfigService, type ConfigServiceConstructorParams, type ConnMsg, type CreateAssetDepositParams, type CreateAssetWithdrawParams, type CreateBridgeIntentParams, type CreateIntentErrorCode, type CreateIntentParams, type CreateIntentResult, type CreateLimitOrderParams, type CreateSonicSwapIntentParams, type CreateVaultIntentResult, type CreateViemPublicClientParams, CustomSorobanServer, CustomStellarAccount, DETAILED_STATUS_NOT_DELIVERED, type DepositParams, type DepositSimulationParams, type DestinationParamsType, type DetailedLock, type DetailedStatusError, type DetailedStatusErrorCode, type DetailedSwapStatus, type DetailedSwapStatusKey, type DexApproveError, type DexApproveErrorCode, type DexCreateIntentError, type DexCreateIntentErrorCode, type DexError, type DexErrorCode, DexService, type DexServiceConstructorParams, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, type EnrichedToken, type Erc20ApprovalPlan, type Erc20ApprovalPlanReason, type Erc20ApproveParams, type Erc20GetAllowanceParams, type Erc20IsAllowanceParams, type Erc20PlanApprovalParams, Erc20Service, type Erc20Token, Erc4626Service, type EstimateGasParams, EvmAssetManagerService, type EvmDepositToDataParams, EvmHubProvider, type EvmHubProviderConstructorParams, EvmSolverService, EvmSpokeService, EvmVaultTokenService, type EvmWithdrawAssetDataParams, type ExecuteMsg, type FeatureInvariant, type FeeData, type FeeTokenApproveAction, type FeeTokenApproveParams, type FetchHubAssetBalancesParams, type FillEvent, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, GAS_ESTIMATION_CODES, type GasEstimationErrorCode, type GetDepositParams, type GetIntentSubmitTxExtraDataParams, type GetPacketParams, type GetPacketResponse, type GetQuoteParams, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeServiceType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, type GetTxReceiptType, type GetUserIntentParams, type GetUserRouterParams, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HookRequest, HookService, HttpRelayError, type HubAssetBalance, type HubProvider, type IconJsonRpcVersion, IconSpokeService, type IcxCreateRevertMigrationParams, type IcxMigrateAction, type IcxMigrateParams, IcxMigrationService, type IcxMigrationServiceConstructorParams, type IcxRevertMigrationAction, type IcxRevertMigrationParams, type IncentiveDataHumanized, type InjTokenInfo, Injective20Token, type InjectiveBalance, InjectiveSpokeService, type InstantUnstakeAction, type InstantUnstakeParams, type InstantiateMsg, type Intent, type IntentAutoSwapResult, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentData, IntentDataService, IntentDataType, type IntentDeliveryInfo, IntentFilledEventAbi, type IntentFilledEventLog, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentTxResult, IntentsAbi, type JsonRpcPayloadResponse, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, type LendingPoolServiceConstructorParams, type LeverageYieldAction, type LeverageYieldAllowanceCheckError, type LeverageYieldAllowanceCheckErrorCode, type LeverageYieldAllowanceParams, type LeverageYieldApproveError, type LeverageYieldApproveErrorCode, type LeverageYieldApproveParams, type LeverageYieldApr, type LeverageYieldCreateIntentError, type LeverageYieldCreateIntentErrorCode, type LeverageYieldEffectiveApr, type LeverageYieldError, type LeverageYieldErrorCode, type LeverageYieldLookupError, type LeverageYieldLookupErrorCode, type LeverageYieldLsdApr, type LeverageYieldPosition, type LeverageYieldPostExecutionError, type LeverageYieldPostExecutionErrorCode, type LeverageYieldQuoteParams, LeverageYieldService, type LeverageYieldServiceConstructorParams, type LeverageYieldSwapDepositParams, type LeverageYieldSwapError, type LeverageYieldSwapErrorCode, type LeverageYieldSwapPayload, type LeverageYieldSwapWithdrawParams, type LimitOrderActionParams, LockupMultiplier, LockupPeriod, type LookupErrorCode, type MapRelayFailureCtx, type MigrateOrchestrationError, type MigrateOrchestrationErrorCode, type MigrationAction, type MigrationAllowanceCheckError, type MigrationAllowanceCheckErrorCode, type MigrationApproveError, type MigrationApproveErrorCode, type MigrationCreateIntentError, type MigrationCreateIntentErrorCode, type MigrationDirection, type MigrationError, type MigrationErrorCode, type MigrationLookupError, type MigrationLookupErrorCode, type MigrationOp, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConstructorParams, type MigrationTokens, MintPositionEventAbi, type MintPositionEventLog, type MoneyMarketAction, type MoneyMarketAllowanceCheckError, type MoneyMarketAllowanceCheckErrorCode, type MoneyMarketAllowanceParams, type MoneyMarketApproveActionParams, type MoneyMarketApproveError, type MoneyMarketApproveErrorCode, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowActionParams, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketCreateIntentError, type MoneyMarketCreateIntentErrorCode, MoneyMarketDataService, type MoneyMarketDataServiceConstructorParams, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketGasEstimationError, type MoneyMarketGasEstimationErrorCode, type MoneyMarketOrchestrationError, type MoneyMarketOrchestrationErrorCode, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayActionParams, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConstructorParams, type MoneyMarketSupplyActionParams, type MoneyMarketSupplyParams, type MoneyMarketWithdrawActionParams, type MoneyMarketWithdrawParams, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, type OnDemandBtcPayload, type OnDemandRelayData, type OptionalRaw, type OptionalSkipSimulation, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerAction, type PartnerError, type PartnerErrorCode, type PartnerFeeClaimAssetBalance, type PartnerFeeClaimCancelAction, type PartnerFeeClaimCancelParams, PartnerFeeClaimService, type PartnerFeeClaimServiceConstructorParams, type PartnerFeeClaimSwapAction, type PartnerFeeClaimSwapParams, PartnerService, type PartnerServiceConfig, type PartnerServiceConstructorParams, Permit2Service, type PermitBatch, type PermitDetails, type PermitSingle, type PoolBaseCurrencyHumanized, type PoolData, type PoolRewardConfig, type PoolSpokeAssets, type PostExecutionError, type PostExecutionErrorCode, ProtocolIntentsAbi, type QueryMsg, type QueryResponse, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RELAY_FALLBACK_FLOOR_MS, RELAY_REQUEST_TIMEOUT_MS, RadfiApiError, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiErrorBody, type RadfiMaxSpentResponse, RadfiProvider, type RadfiProviderOptions, type RadfiResponseEnvelope, type RadfiTradingWallet, type RadfiUtxo, type RadfiUtxoListResponse, type RadfiWalletBalance, type RateLimitConfig, type RawDestinationParams, type RecoveryAction, type RecoveryError, type RecoveryErrorCode, RecoveryService, type RecoveryServiceConstructorParams, type RelayAction, type RelayAndWaitParams, type RelayCode, type RelayErrorCode, type RelayExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayWrappedErrorCode, type RequestConfig, type RequestOverrideConfig, type RequestTrustlineParams, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResolvedAnalytics, type ResponseAddressType, type ResponseSigningType, type RevertMigrationOrchestrationError, type RevertMigrationOrchestrationErrorCode, type RewardInfoHumanized, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, SPONSOR_CONFIG_TTL_MS, STELLAR_BASE_RESERVE_TTL_MS, STELLAR_TRUSTLINE_MIN_XLM_STROOPS, type SendMessageParams, type SetSwapPreferenceAction, type SetSwapPreferenceParams, Sodax, SodaxError, type SodaxErrorCode, type SodaxErrorContext, type SodaxErrorJSON, type SodaxPhase, SolanaSpokeService, SolverApiService, SonicSpokeService, type SpokeApproveParams, type SpokeApproveParamsEvmSpoke, type SpokeApproveParamsHub, type SpokeApproveParamsStellar, type SpokeIsAllowanceValidParams, type SpokeIsAllowanceValidParamsEvmSpoke, type SpokeIsAllowanceValidParamsHub, type SpokeIsAllowanceValidParamsOther, type SpokeIsAllowanceValidParamsStellar, SpokeService, type SpokeServiceConstructorParams, type SpokeServiceType, type SponsorFailureAction, type SponsorFailureClass, type SponsoringAction, SponsoringApiService, type SponsoringConfigError, type SponsoringConfigErrorCode, type SponsoringLookupError, type SponsoringLookupErrorCode, type SponsoringOrchestrationError, type SponsoringOrchestrationErrorCode, SponsoringService, StacksSpokeService, type StakeAction, type StakeOrchestrationError, type StakeOrchestrationErrorCode, type StakeParams, type StakingActionType, type StakingActionUnion, type StakingAllowanceCheckError, type StakingAllowanceCheckErrorCode, type StakingApproveError, type StakingApproveErrorCode, type StakingConfig, type StakingCreateIntentError, type StakingCreateIntentErrorCode, type StakingError, type StakingErrorCode, type StakingInfo, type StakingInfoFetchError, type StakingInfoFetchErrorCode, StakingLogic, type StakingOrchestrationError, type StakingOrchestrationErrorCode, type StakingParamsUnion, StakingService, type StakingServiceConstructorParams, type State, type StellarAccountStatus, StellarSpokeService, type SubmitTxParams, type SubmitTxResponse, SuiGrpcTransport, SuiSpokeService, SupportedMigrationTokens, type SwapAction, type SwapActionParams, type SwapCreateIntentError, type SwapCreateIntentErrorCode, type SwapError, type SwapErrorCode, type SwapExtras, type SwapResponse, SwapService, type SwapServiceConstructorParams, SwapsApiService, type SwapsApiServiceOptions, type TokenSpenderPair, type TokenWithConversion, type TxHashPair, type TxStatus, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UiPoolDataProviderServiceConstructorParams, type UnifiedBnUSDMigrateAction, type UnifiedBnUSDMigrateParams, type UnstakeAction, type UnstakeParams, type UnstakeRequest, type UnstakeRequestWithPenalty, type UnstakingInfo, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserIntentsResponse, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, type VaultSwapActionParams, type VaultSwapResponse, type VerifySimulationParams, type VerifyTxHashParams, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitForTxReceiptParams, type WaitForTxReceiptReturnType, type WaitUntilIntentExecutedPayload, type WalletMode, type WalletSimulationParams, type WithdrawHubAssetAction, type WithdrawHubAssetParams, type WithdrawInfo, adjustAmountByFee, allowanceCheckFailed, approveFailed, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bridgeInvariant, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, classifySponsorError, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createInvariant, deepMerge, defaultHookAbi, dexInvariant, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, erc20Abi, erc4626Abi, estimateBitcoinTxSize, executionFailed, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getCompoundedBalance, getConnectionIdl, getConnectionProgram, getEvmViemChain, getIconAddressBytes, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hyper, intentCreationFailed, isBackendHttpError, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexApproveError, isDexCreateIntentError, isDexError, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isFillEvent, isHubChainKeyType, isIconAddress, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNativeBitcoinTransfer, isNearChainKeyType, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isSponsoringConfigError, isSponsoringLookupError, isSponsoringOrchestrationError, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKeyType, isStellarWalletProviderType, isSuiChainKeyType, isSwapCreateIntentError, isSwapError, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, leverageYieldInvariant, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, nativeToUSD, noopAnalytics, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, resolveAnalytics, resolveLogger, retry, reverseEncodeAddress, serializeAddressData, silentLogger, sleep, sodaxInvariant, sonicWalletFactoryAbi, spokeAssetManagerAbi, sponsoringInvariant, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, swapInvariant, toCreateBridgeIntentParamsV2, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|
package/dist/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { initEccLib, networks, Transaction, Psbt, payments, opcodes, script } fr
|
|
|
9
9
|
import * as ecc from '@bitcoinerlab/secp256k1';
|
|
10
10
|
import { CLPositionManagerAbi, encodeCLPositionManagerMintCalldata, encodeCLPositionManagerIncreaseLiquidityCalldata, encodeCLPositionManagerDecreaseLiquidityCalldata, getPoolId, CLPoolManagerAbi, decodePoolKey } from '@pancakeswap/infinity-sdk';
|
|
11
11
|
import { Transaction as Transaction$1 } from '@mysten/sui/transactions';
|
|
12
|
-
import {
|
|
12
|
+
import { SuiGrpcClient } from '@mysten/sui/grpc';
|
|
13
13
|
import { TOKEN_PROGRAM_ID, TOKEN_2022_PROGRAM_ID, getAssociatedTokenAddress } from '@solana/spl-token';
|
|
14
14
|
import { AnchorProvider, Program } from '@coral-xyz/anchor';
|
|
15
15
|
import BN from 'bn.js';
|
|
@@ -1359,7 +1359,7 @@ var baseSupportedTokens = {
|
|
|
1359
1359
|
symbol: "AERO",
|
|
1360
1360
|
name: "Aerodrome Finance",
|
|
1361
1361
|
decimals: 18,
|
|
1362
|
-
address: "
|
|
1362
|
+
address: "0x940181a94A35A4569E4529A3CDfB74e38FD98631",
|
|
1363
1363
|
chainKey: ChainKeys.BASE_MAINNET,
|
|
1364
1364
|
hubAsset: "0x348e086ab6f424dfc575a325c28624ed23973173",
|
|
1365
1365
|
vault: "0x348e086ab6f424dfc575a325c28624ed23973173"
|
|
@@ -1671,7 +1671,7 @@ var polygonSupportedTokens = {
|
|
|
1671
1671
|
symbol: "WBTC",
|
|
1672
1672
|
name: "Wrapped BTC",
|
|
1673
1673
|
decimals: 8,
|
|
1674
|
-
address: "
|
|
1674
|
+
address: "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6",
|
|
1675
1675
|
chainKey: ChainKeys.POLYGON_MAINNET,
|
|
1676
1676
|
hubAsset: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3",
|
|
1677
1677
|
vault: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3"
|
|
@@ -1689,7 +1689,7 @@ var polygonSupportedTokens = {
|
|
|
1689
1689
|
symbol: "LINK",
|
|
1690
1690
|
name: "ChainLink Token",
|
|
1691
1691
|
decimals: 18,
|
|
1692
|
-
address: "
|
|
1692
|
+
address: "0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39",
|
|
1693
1693
|
chainKey: ChainKeys.POLYGON_MAINNET,
|
|
1694
1694
|
hubAsset: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f",
|
|
1695
1695
|
vault: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f"
|
|
@@ -3337,7 +3337,7 @@ var spokeChainConfig = {
|
|
|
3337
3337
|
supportedTokens: suiSupportedTokens,
|
|
3338
3338
|
nativeToken: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",
|
|
3339
3339
|
bnUSD: "0xff4de2b2b57dd7611d2812d231a467d007b702a101fd5c7ad3b278257cddb507::bnusd::BNUSD",
|
|
3340
|
-
|
|
3340
|
+
grpc_url: "https://fullnode.mainnet.sui.io",
|
|
3341
3341
|
chain: baseChainInfo[ChainKeys.SUI_MAINNET],
|
|
3342
3342
|
pollingConfig: {
|
|
3343
3343
|
pollingIntervalMs: 500,
|
|
@@ -4316,6 +4316,29 @@ var isHookSupportedToken = (chainKey, kind, token) => {
|
|
|
4316
4316
|
return !hook.supportedTokens || hook.supportedTokens.some((t) => t.toLowerCase() === token.toLowerCase());
|
|
4317
4317
|
};
|
|
4318
4318
|
|
|
4319
|
+
// ../types/dist/sui/core.js
|
|
4320
|
+
function toSuiPaginatedCoins(response, coinType) {
|
|
4321
|
+
return {
|
|
4322
|
+
data: response.objects.map((coin) => ({
|
|
4323
|
+
balance: coin.balance,
|
|
4324
|
+
coinObjectId: coin.objectId,
|
|
4325
|
+
coinType,
|
|
4326
|
+
digest: coin.digest,
|
|
4327
|
+
version: coin.version
|
|
4328
|
+
})),
|
|
4329
|
+
hasNextPage: response.hasNextPage,
|
|
4330
|
+
nextCursor: response.cursor
|
|
4331
|
+
};
|
|
4332
|
+
}
|
|
4333
|
+
function toSuiExecutionResult(command) {
|
|
4334
|
+
return {
|
|
4335
|
+
returnValues: command.returnValues.map((value) => [Array.from(value.bcs), ""])
|
|
4336
|
+
};
|
|
4337
|
+
}
|
|
4338
|
+
function toSuiExecutionStatus(status) {
|
|
4339
|
+
return status.success ? { status: "success" } : { status: "failure", error: status.error.message };
|
|
4340
|
+
}
|
|
4341
|
+
|
|
4319
4342
|
// ../types/dist/utils/utils.js
|
|
4320
4343
|
function isHubChainKey(chainId) {
|
|
4321
4344
|
return chainId === HUB_CHAIN_KEY;
|
|
@@ -4430,7 +4453,7 @@ function isValidWalletProviderForChainKey(chainKey, walletProvider) {
|
|
|
4430
4453
|
}
|
|
4431
4454
|
|
|
4432
4455
|
// ../types/dist/index.js
|
|
4433
|
-
var CONFIG_VERSION =
|
|
4456
|
+
var CONFIG_VERSION = 227;
|
|
4434
4457
|
|
|
4435
4458
|
// src/shared/utils/resolveTimeoutMs.ts
|
|
4436
4459
|
function resolveTimeoutMs(timeout, fallbackMs) {
|
|
@@ -23270,8 +23293,133 @@ var SonicSpokeService = class {
|
|
|
23270
23293
|
return params.walletProvider.sendTransaction(rawTx);
|
|
23271
23294
|
}
|
|
23272
23295
|
};
|
|
23296
|
+
async function toMystenTransaction(txn) {
|
|
23297
|
+
if (txn instanceof Transaction$1) return txn;
|
|
23298
|
+
return Transaction$1.from(await txn.toJSON());
|
|
23299
|
+
}
|
|
23300
|
+
function isTimeoutError(error) {
|
|
23301
|
+
if (typeof error === "object" && error !== null && "name" in error) {
|
|
23302
|
+
const { name } = error;
|
|
23303
|
+
if (name === "TimeoutError" || name === "AbortError") {
|
|
23304
|
+
return true;
|
|
23305
|
+
}
|
|
23306
|
+
}
|
|
23307
|
+
return error instanceof Error && /timed?\s?out|timeout/i.test(error.message);
|
|
23308
|
+
}
|
|
23309
|
+
var DEFAULT_GET_COINS_LIMIT = 10;
|
|
23310
|
+
function toSuiObjectOwner(owner) {
|
|
23311
|
+
switch (owner?.$kind) {
|
|
23312
|
+
case "AddressOwner":
|
|
23313
|
+
return { AddressOwner: owner.AddressOwner };
|
|
23314
|
+
case "ObjectOwner":
|
|
23315
|
+
return { ObjectOwner: owner.ObjectOwner };
|
|
23316
|
+
case "Shared":
|
|
23317
|
+
return { Shared: { initial_shared_version: owner.Shared.initialSharedVersion } };
|
|
23318
|
+
default:
|
|
23319
|
+
return "Immutable";
|
|
23320
|
+
}
|
|
23321
|
+
}
|
|
23322
|
+
function toSuiTransactionEffects(effects, executedEpoch) {
|
|
23323
|
+
const gasObject = effects.gasObject;
|
|
23324
|
+
return {
|
|
23325
|
+
messageVersion: "v1",
|
|
23326
|
+
status: toSuiExecutionStatus(effects.status),
|
|
23327
|
+
executedEpoch,
|
|
23328
|
+
gasUsed: effects.gasUsed,
|
|
23329
|
+
transactionDigest: effects.transactionDigest,
|
|
23330
|
+
gasObject: {
|
|
23331
|
+
owner: toSuiObjectOwner(gasObject?.outputOwner ?? null),
|
|
23332
|
+
reference: {
|
|
23333
|
+
objectId: gasObject?.objectId ?? "",
|
|
23334
|
+
version: gasObject?.outputVersion ?? "",
|
|
23335
|
+
digest: gasObject?.outputDigest ?? ""
|
|
23336
|
+
}
|
|
23337
|
+
},
|
|
23338
|
+
dependencies: effects.dependencies,
|
|
23339
|
+
eventsDigest: effects.eventsDigest
|
|
23340
|
+
};
|
|
23341
|
+
}
|
|
23342
|
+
var SuiGrpcTransport = class {
|
|
23343
|
+
endpoint;
|
|
23344
|
+
client;
|
|
23345
|
+
constructor(endpoint) {
|
|
23346
|
+
this.endpoint = endpoint;
|
|
23347
|
+
this.client = new SuiGrpcClient({ network: "mainnet", baseUrl: endpoint });
|
|
23348
|
+
}
|
|
23349
|
+
async getCoins(owner, coinType, limit = DEFAULT_GET_COINS_LIMIT) {
|
|
23350
|
+
const response = await this.client.core.listCoins({ owner, coinType, limit });
|
|
23351
|
+
return toSuiPaginatedCoins(response, coinType);
|
|
23352
|
+
}
|
|
23353
|
+
async simulate(tx, sender) {
|
|
23354
|
+
const transaction = await toMystenTransaction(tx);
|
|
23355
|
+
transaction.setSenderIfNotSet(sender);
|
|
23356
|
+
const result = await this.client.core.simulateTransaction({
|
|
23357
|
+
transaction,
|
|
23358
|
+
include: { commandResults: true },
|
|
23359
|
+
checksEnabled: false
|
|
23360
|
+
});
|
|
23361
|
+
const command = result.commandResults?.[0];
|
|
23362
|
+
if (!command) {
|
|
23363
|
+
throw new Error(`transaction didn't return any values: ${JSON.stringify(result, null, 2)}`);
|
|
23364
|
+
}
|
|
23365
|
+
return toSuiExecutionResult(command);
|
|
23366
|
+
}
|
|
23367
|
+
async estimateGas(tx, sender) {
|
|
23368
|
+
const transaction = await toMystenTransaction(tx);
|
|
23369
|
+
transaction.setSenderIfNotSet(sender);
|
|
23370
|
+
const result = await this.client.core.simulateTransaction({ transaction, include: { effects: true } });
|
|
23371
|
+
const effects = (result.Transaction ?? result.FailedTransaction)?.effects;
|
|
23372
|
+
if (!effects) {
|
|
23373
|
+
throw new Error("Transaction simulation returned no effects");
|
|
23374
|
+
}
|
|
23375
|
+
return effects.gasUsed;
|
|
23376
|
+
}
|
|
23377
|
+
async fetchLatestPackageId(objectId) {
|
|
23378
|
+
let object5;
|
|
23379
|
+
try {
|
|
23380
|
+
({ object: object5 } = await this.client.core.getObject({ objectId, include: { json: true } }));
|
|
23381
|
+
} catch (error) {
|
|
23382
|
+
throw new Error("Failed to fetch asset manager id", { cause: error });
|
|
23383
|
+
}
|
|
23384
|
+
if (!object5) {
|
|
23385
|
+
throw new Error("Asset manager id not found (no data)");
|
|
23386
|
+
}
|
|
23387
|
+
const fields = object5.json;
|
|
23388
|
+
if (!fields) {
|
|
23389
|
+
throw new Error("Asset manager id not found (not a move object)");
|
|
23390
|
+
}
|
|
23391
|
+
if (!("latest_package_id" in fields)) {
|
|
23392
|
+
throw new Error("Asset manager id not found (no latest package id)");
|
|
23393
|
+
}
|
|
23394
|
+
const latestPackageId = fields["latest_package_id"];
|
|
23395
|
+
if (typeof latestPackageId !== "string") {
|
|
23396
|
+
throw new Error("Asset manager id invalid (latest package id is not a string)");
|
|
23397
|
+
}
|
|
23398
|
+
if (!latestPackageId) {
|
|
23399
|
+
throw new Error("Asset manager id not found (no latest package id)");
|
|
23400
|
+
}
|
|
23401
|
+
return latestPackageId;
|
|
23402
|
+
}
|
|
23403
|
+
async waitForTransaction(params) {
|
|
23404
|
+
const result = await this.client.core.waitForTransaction({
|
|
23405
|
+
digest: params.digest,
|
|
23406
|
+
include: { effects: true },
|
|
23407
|
+
timeout: params.timeoutMs,
|
|
23408
|
+
pollSchedule: [0, Math.max(1, params.pollingIntervalMs)]
|
|
23409
|
+
});
|
|
23410
|
+
const transaction = result.Transaction ?? result.FailedTransaction;
|
|
23411
|
+
return {
|
|
23412
|
+
digest: transaction.digest,
|
|
23413
|
+
effects: transaction.effects ? toSuiTransactionEffects(transaction.effects, transaction.epoch ?? "0") : void 0
|
|
23414
|
+
};
|
|
23415
|
+
}
|
|
23416
|
+
};
|
|
23417
|
+
|
|
23418
|
+
// src/shared/services/spoke/SuiSpokeService.ts
|
|
23273
23419
|
var SuiSpokeService = class {
|
|
23274
23420
|
config;
|
|
23421
|
+
transport;
|
|
23422
|
+
/** @deprecated Renamed to `transport`, and no longer a raw `@mysten/sui` client. */
|
|
23275
23423
|
publicClient;
|
|
23276
23424
|
assetManagerAddress;
|
|
23277
23425
|
pollingIntervalMs;
|
|
@@ -23279,12 +23427,13 @@ var SuiSpokeService = class {
|
|
|
23279
23427
|
constructor(config) {
|
|
23280
23428
|
this.config = config;
|
|
23281
23429
|
const chainConfig = config.getChainConfig(ChainKeys.SUI_MAINNET);
|
|
23282
|
-
this.
|
|
23430
|
+
this.transport = new SuiGrpcTransport(chainConfig.rpc_url ?? chainConfig.grpc_url);
|
|
23431
|
+
this.publicClient = this.transport;
|
|
23283
23432
|
this.pollingIntervalMs = chainConfig.pollingConfig.pollingIntervalMs;
|
|
23284
23433
|
this.maxTimeoutMs = chainConfig.pollingConfig.maxTimeoutMs;
|
|
23285
23434
|
}
|
|
23286
23435
|
async getCoins(address, token) {
|
|
23287
|
-
return this.
|
|
23436
|
+
return this.transport.getCoins(address, token);
|
|
23288
23437
|
}
|
|
23289
23438
|
async getCoin(tx, coin, amount, address) {
|
|
23290
23439
|
const coins = await this.getCoins(address, coin);
|
|
@@ -23345,14 +23494,7 @@ var SuiSpokeService = class {
|
|
|
23345
23494
|
arguments: args,
|
|
23346
23495
|
typeArguments: typeArgs
|
|
23347
23496
|
});
|
|
23348
|
-
|
|
23349
|
-
transactionBlock: tx,
|
|
23350
|
-
sender
|
|
23351
|
-
});
|
|
23352
|
-
if (txResults.results && txResults.results[0] !== void 0) {
|
|
23353
|
-
return txResults.results[0];
|
|
23354
|
-
}
|
|
23355
|
-
throw Error(`transaction didn't return any values: ${JSON.stringify(txResults, null, 2)}`);
|
|
23497
|
+
return this.transport.simulate(tx, sender);
|
|
23356
23498
|
}
|
|
23357
23499
|
/**
|
|
23358
23500
|
* Deposit tokens to the spoke chain.
|
|
@@ -23419,12 +23561,7 @@ var SuiSpokeService = class {
|
|
|
23419
23561
|
* @returns {Promise<bigint>} The estimated computation cost.
|
|
23420
23562
|
*/
|
|
23421
23563
|
async estimateGas({ tx }) {
|
|
23422
|
-
|
|
23423
|
-
const result = await this.publicClient.devInspectTransactionBlock({
|
|
23424
|
-
sender: tx.from,
|
|
23425
|
-
transactionBlock: txb
|
|
23426
|
-
});
|
|
23427
|
-
return result.effects.gasUsed;
|
|
23564
|
+
return this.transport.estimateGas(Transaction$1.from(tx.data), tx.from);
|
|
23428
23565
|
}
|
|
23429
23566
|
/**
|
|
23430
23567
|
* Get the balance of the token in the spoke chain.
|
|
@@ -23465,40 +23602,14 @@ var SuiSpokeService = class {
|
|
|
23465
23602
|
* @returns {Promise<string>} The latest asset manager package id.
|
|
23466
23603
|
*/
|
|
23467
23604
|
async fetchLatestAssetManagerPackageId(chainId) {
|
|
23468
|
-
|
|
23469
|
-
id: this.config.getChainConfig(chainId).addresses.assetManagerConfigId,
|
|
23470
|
-
options: {
|
|
23471
|
-
showContent: true
|
|
23472
|
-
}
|
|
23473
|
-
});
|
|
23474
|
-
if (configData.error) {
|
|
23475
|
-
throw new Error(`Failed to fetch asset manager id. Details: ${JSON.stringify(configData.error)}`);
|
|
23476
|
-
}
|
|
23477
|
-
if (!configData.data) {
|
|
23478
|
-
throw new Error("Asset manager id not found (no data)");
|
|
23479
|
-
}
|
|
23480
|
-
if (configData.data.content?.dataType !== "moveObject") {
|
|
23481
|
-
throw new Error("Asset manager id not found (not a move object)");
|
|
23482
|
-
}
|
|
23483
|
-
if (!("latest_package_id" in configData.data.content.fields)) {
|
|
23484
|
-
throw new Error("Asset manager id not found (no latest package id)");
|
|
23485
|
-
}
|
|
23486
|
-
const latestPackageId = configData.data.content.fields["latest_package_id"];
|
|
23487
|
-
if (typeof latestPackageId !== "string") {
|
|
23488
|
-
throw new Error("Asset manager id invalid (latest package id is not a string)");
|
|
23489
|
-
}
|
|
23490
|
-
if (!latestPackageId) {
|
|
23491
|
-
throw new Error("Asset manager id not found (no latest package id)");
|
|
23492
|
-
}
|
|
23493
|
-
return latestPackageId.toString();
|
|
23605
|
+
return this.transport.fetchLatestPackageId(this.config.getChainConfig(chainId).addresses.assetManagerConfigId);
|
|
23494
23606
|
}
|
|
23495
23607
|
async waitForTransactionReceipt(params) {
|
|
23496
23608
|
try {
|
|
23497
|
-
const result = await this.
|
|
23609
|
+
const result = await this.transport.waitForTransaction({
|
|
23498
23610
|
digest: params.txHash,
|
|
23499
|
-
|
|
23500
|
-
|
|
23501
|
-
options: { showEffects: true }
|
|
23611
|
+
timeoutMs: params.maxTimeoutMs ?? this.maxTimeoutMs,
|
|
23612
|
+
pollingIntervalMs: params.pollingIntervalMs ?? this.pollingIntervalMs
|
|
23502
23613
|
});
|
|
23503
23614
|
if (!result.effects?.status) {
|
|
23504
23615
|
return {
|
|
@@ -23520,11 +23631,10 @@ var SuiSpokeService = class {
|
|
|
23520
23631
|
}
|
|
23521
23632
|
return { ok: true, value: { status: "success", receipt: result } };
|
|
23522
23633
|
} catch (error) {
|
|
23523
|
-
const isTimeout = error instanceof Error && error.message.includes("timeout");
|
|
23524
23634
|
return {
|
|
23525
23635
|
ok: true,
|
|
23526
23636
|
value: {
|
|
23527
|
-
status:
|
|
23637
|
+
status: isTimeoutError(error) ? "timeout" : "failure",
|
|
23528
23638
|
error: error instanceof Error ? error : new Error(String(error))
|
|
23529
23639
|
}
|
|
23530
23640
|
};
|
|
@@ -42367,4 +42477,4 @@ var isPartnerError = isCodeMember(PARTNER_CODES);
|
|
|
42367
42477
|
(*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
42368
42478
|
*/
|
|
42369
42479
|
|
|
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 };
|
|
42480
|
+
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, SuiGrpcTransport, 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, toSuiExecutionResult, toSuiExecutionStatus, toSuiPaginatedCoins, tokenLogo, tokenLogoSlug, uiPoolDataAbi, universalRouterAbi, unknownFailed, usesBip322MessageSigning, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "2.1.0-rc.
|
|
7
|
+
"version": "2.1.0-rc.7",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"description": "Sodax SDK",
|
|
10
10
|
"keywords": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"./package.json": "./package.json"
|
|
40
40
|
},
|
|
41
41
|
"engines": {
|
|
42
|
-
"node": ">=
|
|
42
|
+
"node": ">=22.12.0"
|
|
43
43
|
},
|
|
44
44
|
"files": [
|
|
45
45
|
"dist",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@coral-xyz/anchor": "0.30.1",
|
|
52
52
|
"@injectivelabs/networks": "1.18.14",
|
|
53
53
|
"@injectivelabs/sdk-ts": "1.18.14",
|
|
54
|
-
"@mysten/sui": "
|
|
54
|
+
"@mysten/sui": "2.23.2",
|
|
55
55
|
"@pancakeswap/infinity-sdk": "1.0.8",
|
|
56
56
|
"@pancakeswap/swap-sdk-core": "1.6.0",
|
|
57
57
|
"@pancakeswap/v3-sdk": "3.10.0",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"rlp": "3.0.0",
|
|
68
68
|
"viem": "2.29.2",
|
|
69
69
|
"valibot": "1.4.1",
|
|
70
|
-
"@sodax/libs": "2.1.0-rc.
|
|
71
|
-
"@sodax/
|
|
72
|
-
"@sodax/
|
|
70
|
+
"@sodax/libs": "2.1.0-rc.7",
|
|
71
|
+
"@sodax/swaps-api": "2.1.0-rc.7",
|
|
72
|
+
"@sodax/types": "2.1.0-rc.7"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@arethetypeswrong/cli": "0.17.4",
|