@sodax/sdk 2.0.0-rc.7 → 2.0.0-rc.9

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 CHANGED
@@ -310,6 +310,7 @@ var HubVaultSymbols = [
310
310
  "sodaBNB",
311
311
  "sodaETH",
312
312
  "sodaBTC",
313
+ "sodaWBTC",
313
314
  "sodaSUI",
314
315
  "sodaINJ",
315
316
  "sodaXLM",
@@ -368,6 +369,15 @@ var SodaTokens = {
368
369
  hubAsset: "0x7A1A5555842Ad2D0eD274d09b5c4406a95799D5d",
369
370
  vault: "0x7A1A5555842Ad2D0eD274d09b5c4406a95799D5d"
370
371
  },
372
+ sodaWBTC: {
373
+ symbol: "sodaWBTC",
374
+ name: "Soda Wrapped BTC",
375
+ decimals: 18,
376
+ address: "0x811C3fCc13f9c2a23AE2Ae2DCadacFAC6eb5f0eB",
377
+ chainKey: ChainKeys.SONIC_MAINNET,
378
+ hubAsset: "0x811C3fCc13f9c2a23AE2Ae2DCadacFAC6eb5f0eB",
379
+ vault: "0x811C3fCc13f9c2a23AE2Ae2DCadacFAC6eb5f0eB"
380
+ },
371
381
  sodaSOL: {
372
382
  symbol: "sodaSOL",
373
383
  name: "Soda SOL",
@@ -971,7 +981,8 @@ var arbitrumSupportedTokens = {
971
981
  address: "0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40",
972
982
  chainKey: ChainKeys.ARBITRUM_MAINNET,
973
983
  hubAsset: "0x96Fc8540736f1598b7E235e6dE8814062b3b5d3B",
974
- vault: SodaTokens.sodaBTC.address
984
+ vault: SodaTokens.sodaBTC.address,
985
+ access: "withdrawOnly"
975
986
  },
976
987
  WBTC: {
977
988
  symbol: "WBTC",
@@ -980,7 +991,17 @@ var arbitrumSupportedTokens = {
980
991
  address: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f",
981
992
  chainKey: ChainKeys.ARBITRUM_MAINNET,
982
993
  hubAsset: "0xfB0ACB1b2720B620935F50a6dd3F7FEA52b2FCBe",
983
- vault: SodaTokens.sodaBTC.address
994
+ vault: SodaTokens.sodaWBTC.address
995
+ },
996
+ WBTC_LEGACY: {
997
+ symbol: "WBTC.legacy",
998
+ name: "Wrapped BTC (Legacy)",
999
+ decimals: 8,
1000
+ address: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f",
1001
+ chainKey: ChainKeys.ARBITRUM_MAINNET,
1002
+ hubAsset: "0xfB0ACB1b2720B620935F50a6dd3F7FEA52b2FCBe",
1003
+ vault: SodaTokens.sodaBTC.address,
1004
+ access: "withdrawOnly"
984
1005
  },
985
1006
  USDC: {
986
1007
  symbol: "USDC",
@@ -1135,7 +1156,8 @@ var baseSupportedTokens = {
1135
1156
  address: "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",
1136
1157
  chainKey: ChainKeys.BASE_MAINNET,
1137
1158
  hubAsset: "0x2803a23a3BA6b09e57D1c71deC0D9eFdBB00A27F",
1138
- vault: SodaTokens.sodaBTC.address
1159
+ vault: SodaTokens.sodaBTC.address,
1160
+ access: "withdrawOnly"
1139
1161
  },
1140
1162
  SODA: {
1141
1163
  symbol: "SODA",
@@ -2178,7 +2200,17 @@ var ethereumSupportedTokens = {
2178
2200
  address: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
2179
2201
  chainKey: ChainKeys.ETHEREUM_MAINNET,
2180
2202
  hubAsset: "0x4ccbe4c2cf2aeed19314790622efd71dc0b67acb",
2181
- vault: SodaTokens.sodaBTC.address
2203
+ vault: SodaTokens.sodaWBTC.address
2204
+ },
2205
+ WBTC_LEGACY: {
2206
+ symbol: "WBTC.legacy",
2207
+ name: "Wrapped Bitcoin (Legacy)",
2208
+ decimals: 8,
2209
+ address: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
2210
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
2211
+ hubAsset: "0x4ccbe4c2cf2aeed19314790622efd71dc0b67acb",
2212
+ vault: SodaTokens.sodaBTC.address,
2213
+ access: "withdrawOnly"
2182
2214
  },
2183
2215
  sUSDat: {
2184
2216
  symbol: "sUSDat",
@@ -3182,6 +3214,7 @@ var moneyMarketSupportedTokens = {
3182
3214
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.ETH,
3183
3215
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.bnUSD,
3184
3216
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.WBTC,
3217
+ spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.WBTC_LEGACY,
3185
3218
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.weETH,
3186
3219
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.wstETH,
3187
3220
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.tBTC,
@@ -3309,6 +3342,7 @@ var moneyMarketSupportedTokens = {
3309
3342
  spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.wstETH,
3310
3343
  spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.USDT,
3311
3344
  spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.WBTC,
3345
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.WBTC_LEGACY,
3312
3346
  spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.LL
3313
3347
  ],
3314
3348
  [ChainKeys.REDBELLY_MAINNET]: [
@@ -3899,7 +3933,7 @@ function isValidWalletProviderForChainKey(chainKey, walletProvider) {
3899
3933
  }
3900
3934
 
3901
3935
  // ../types/dist/index.js
3902
- var CONFIG_VERSION = 205;
3936
+ var CONFIG_VERSION = 207;
3903
3937
  function isEvmSpokeChainConfig(value) {
3904
3938
  return typeof value === "object" && value !== null && value.chain.type === "EVM" && value.chain.key !== HUB_CHAIN_KEY;
3905
3939
  }
@@ -13153,9 +13187,42 @@ var universalRouterAbi = [
13153
13187
  type: "function"
13154
13188
  }
13155
13189
  ];
13190
+
13191
+ // src/shared/utils/deepMerge.ts
13192
+ function deepMerge(target, source) {
13193
+ const result = { ...target };
13194
+ for (const key of Object.keys(source)) {
13195
+ const sourceVal = source[key];
13196
+ const targetVal = target[key];
13197
+ if (sourceVal !== void 0 && typeof sourceVal === "object" && sourceVal !== null && !Array.isArray(sourceVal) && typeof targetVal === "object" && targetVal !== null && !Array.isArray(targetVal)) {
13198
+ result[key] = deepMerge(
13199
+ targetVal,
13200
+ sourceVal
13201
+ );
13202
+ } else if (sourceVal !== void 0) {
13203
+ result[key] = sourceVal;
13204
+ }
13205
+ }
13206
+ return result;
13207
+ }
13208
+
13209
+ // src/shared/config/mergeSodaxConfig.ts
13210
+ function mergeSodaxConfig(base2, override) {
13211
+ const merged = deepMerge(base2, override);
13212
+ if (override.fee !== void 0) {
13213
+ merged.fee = override.fee;
13214
+ }
13215
+ if (override.bridge?.partnerFee !== void 0) {
13216
+ merged.bridge.partnerFee = override.bridge.partnerFee;
13217
+ }
13218
+ return merged;
13219
+ }
13220
+
13221
+ // src/shared/config/ConfigService.ts
13156
13222
  var ConfigService = class {
13157
13223
  sodax;
13158
13224
  api;
13225
+ userConfig;
13159
13226
  initialized = false;
13160
13227
  // data structures for quick lookup
13161
13228
  supportedHubAssetsSet;
@@ -13167,9 +13234,10 @@ var ConfigService = class {
13167
13234
  stakedATokenAddressesSet;
13168
13235
  chainToSupportedTokenAddressMap;
13169
13236
  hubAssetToXTokenMap;
13170
- constructor({ api, config }) {
13237
+ constructor({ api, config, userConfig }) {
13171
13238
  this.api = api;
13172
13239
  this.sodax = config;
13240
+ this.userConfig = userConfig;
13173
13241
  this.loadSodaxConfigDataStructures(config);
13174
13242
  }
13175
13243
  async initialize() {
@@ -13182,8 +13250,9 @@ var ConfigService = class {
13182
13250
  `Dynamic config version is less than the current version, resorting to the default one. Current version: ${CONFIG_VERSION}, response version: ${response.version}`
13183
13251
  );
13184
13252
  } else {
13185
- this.sodax = response.config;
13186
- this.loadSodaxConfigDataStructures(this.sodax);
13253
+ const next = this.userConfig ? mergeSodaxConfig(response.config, this.userConfig) : response.config;
13254
+ this.loadSodaxConfigDataStructures(next);
13255
+ this.sodax = next;
13187
13256
  this.initialized = true;
13188
13257
  }
13189
13258
  return { ok: true, value: void 0 };
@@ -13364,9 +13433,9 @@ var ConfigService = class {
13364
13433
  ])
13365
13434
  );
13366
13435
  this.loadSpokeChainConfigDataStructures(sodaxConfig2);
13367
- this.moneyMarketReserveAssetsSet = new Set(this.moneyMarket.supportedReserveAssets);
13436
+ this.moneyMarketReserveAssetsSet = new Set(sodaxConfig2.moneyMarket.supportedReserveAssets);
13368
13437
  this.stakedATokenAddressesSet = new Set(
13369
- Object.keys(this.dex.statATokenAddresses).map((address) => address.toLowerCase())
13438
+ Object.keys(sodaxConfig2.dex.statATokenAddresses).map((address) => address.toLowerCase())
13370
13439
  );
13371
13440
  }
13372
13441
  loadSpokeChainDataStructures(sodaxConfig2) {
@@ -13520,24 +13589,6 @@ function getEvmViemChain(key) {
13520
13589
  }
13521
13590
  }
13522
13591
  }
13523
-
13524
- // src/shared/utils/deepMerge.ts
13525
- function deepMerge(target, source) {
13526
- const result = { ...target };
13527
- for (const key of Object.keys(source)) {
13528
- const sourceVal = source[key];
13529
- const targetVal = target[key];
13530
- if (sourceVal !== void 0 && typeof sourceVal === "object" && sourceVal !== null && !Array.isArray(sourceVal) && typeof targetVal === "object" && targetVal !== null && !Array.isArray(targetVal)) {
13531
- result[key] = deepMerge(
13532
- targetVal,
13533
- sourceVal
13534
- );
13535
- } else if (sourceVal !== void 0) {
13536
- result[key] = sourceVal;
13537
- }
13538
- }
13539
- return result;
13540
- }
13541
13592
  var EvmVaultTokenService = class {
13542
13593
  constructor() {
13543
13594
  }
@@ -21379,6 +21430,66 @@ var EvmSolverService = class _EvmSolverService {
21379
21430
  };
21380
21431
  return [viem.encodePacked(["uint8", "bytes"], [intentData.type, intentData.data]), feeAmount];
21381
21432
  }
21433
+ /**
21434
+ * Recovers the partner fee amount embedded in an intent's `data` field.
21435
+ *
21436
+ * Exact inverse of {@link createIntentFeeData}: `'0x'` means no fee (`0n`); otherwise the first
21437
+ * byte is the {@link IntentDataType} tag (from the `encodePacked(['uint8','bytes'], …)` envelope)
21438
+ * and the remainder is the ABI-encoded `(uint256 fee, address receiver)` struct.
21439
+ *
21440
+ * @param data - The intent's `data` field (`'0x'` when no fee was configured).
21441
+ * @returns The fee amount in the input token's smallest unit (`0n` when no fee data is present, or
21442
+ * when the leading type byte is not {@link IntentDataType.FEE} — in which case it logs and degrades to `0n`).
21443
+ */
21444
+ static decodeIntentFeeAmount(data) {
21445
+ if (data === "0x" || data.length <= 2) {
21446
+ return 0n;
21447
+ }
21448
+ const typeByte = Number.parseInt(data.slice(2, 4), 16);
21449
+ if (typeByte !== 1 /* FEE */) {
21450
+ console.error(`[decodeIntentFeeAmount] Unknown IntentData type byte: ${typeByte}. Gracefully returning 0n.`);
21451
+ return 0n;
21452
+ }
21453
+ const [feeAmount] = viem.decodeAbiParameters(
21454
+ [
21455
+ { name: "fee", type: "uint256" },
21456
+ { name: "receiver", type: "address" }
21457
+ ],
21458
+ `0x${data.slice(4)}`
21459
+ );
21460
+ return feeAmount;
21461
+ }
21462
+ /**
21463
+ * Re-derives the byte-identical relay payload that `createIntent` originally produced, from a
21464
+ * fully-populated `Intent` alone.
21465
+ *
21466
+ * Mirrors the two payload shapes built at intent-creation time:
21467
+ * - Hub (Sonic) source — raw `createIntent(intent)` calldata (no approval, no multicall), matching
21468
+ * {@link SonicSpokeService.createSwapIntent}.
21469
+ * - Spoke source — the `[approve(intentsContract, gross), createIntent(intent)]` multicall, matching
21470
+ * {@link constructCreateIntentData}. The gross approval amount is recovered as
21471
+ * `intent.inputAmount + feeAmount`, where `feeAmount` comes from {@link decodeIntentFeeAmount}.
21472
+ *
21473
+ * Byte-identity holds because this reuses the exact encode primitives (`encodeCreateIntent`,
21474
+ * `Erc20Service.encodeApprove`, `encodeContractCalls`) that produced the original — the only
21475
+ * originally-random input, `intentId`, is already carried on the `Intent`.
21476
+ *
21477
+ * @param intent - The fully-populated intent (e.g. from `createIntent` or `getIntent`).
21478
+ * @param intentsContract - The hub-chain intents contract address (`config.solver.intentsContract`).
21479
+ * @param isHubSource - `true` when the intent's source chain is the hub (Sonic).
21480
+ * @returns The byte-identical relay payload `Hex`.
21481
+ */
21482
+ static reconstructCreateIntentData(intent, intentsContract, isHubSource) {
21483
+ const createIntentCall = _EvmSolverService.encodeCreateIntent(intent, intentsContract);
21484
+ if (isHubSource) {
21485
+ return createIntentCall.data;
21486
+ }
21487
+ const grossInputAmount = intent.inputAmount + _EvmSolverService.decodeIntentFeeAmount(intent.data);
21488
+ return encodeContractCalls([
21489
+ Erc20Service.encodeApprove(intent.inputToken, intentsContract, grossInputAmount),
21490
+ createIntentCall
21491
+ ]);
21492
+ }
21382
21493
  /**
21383
21494
  * Reads an `Intent` struct from a hub-chain transaction receipt.
21384
21495
  *
@@ -26063,6 +26174,34 @@ var SwapService = class {
26063
26174
  return { ok: false, error };
26064
26175
  }
26065
26176
  }
26177
+ /**
26178
+ * Re-derives the byte-identical relay extra data (`{ address, payload }`) for a swap intent from a
26179
+ * fully-populated `Intent` alone — no on-chain call, no original `createIntent` return value needed.
26180
+ *
26181
+ * The `payload` matches exactly what `createIntent` relayed when the intent was first created:
26182
+ * - Sonic-hub source — raw `createIntent(intent)` calldata.
26183
+ * - Any spoke source — the `[approve, createIntent]` multicall (uniform across all spokes).
26184
+ *
26185
+ * Byte-identity is possible because the only originally-random field, `intentId`, is already
26186
+ * carried on the `Intent`; everything else in the payload is a pure function of the intent and
26187
+ * the configured intents contract. Use this to rebuild relay submission data for a manual relay
26188
+ * step when the runtime `relayData` from `createIntent` is no longer available.
26189
+ *
26190
+ * @param intent - A fully-populated intent (e.g. from `getIntent(txHash)` or the `intent` field
26191
+ * returned by `createIntent`).
26192
+ * @returns A `Result` containing `RelayExtraData`: `{ address: Hex; payload: Hex }`.
26193
+ */
26194
+ reconstructRelayData(intent) {
26195
+ try {
26196
+ invariant(this.config.isValidIntentRelayChainId(intent.srcChain), `Invalid intent.srcChain: ${intent.srcChain}`);
26197
+ invariant(this.config.isValidIntentRelayChainId(intent.dstChain), `Invalid intent.dstChain: ${intent.dstChain}`);
26198
+ const isHubSource = intent.srcChain === getIntentRelayChainId(HUB_CHAIN_KEY);
26199
+ const payload = EvmSolverService.reconstructCreateIntentData(intent, this.solver.intentsContract, isHubSource);
26200
+ return { ok: true, value: { address: intent.creator, payload } };
26201
+ } catch (error) {
26202
+ return { ok: false, error };
26203
+ }
26204
+ }
26066
26205
  /**
26067
26206
  * Fetches a previously created `Intent` from the hub chain by its transaction hash.
26068
26207
  *
@@ -31353,7 +31492,7 @@ var AssetService = class {
31353
31492
  calls.push(Erc4626Service.encodeRedeem(dexToken, amount, userAddress, userAddress));
31354
31493
  }
31355
31494
  calls.push(EvmVaultTokenService.encodeWithdraw(assetConfig.vault, assetConfig.hubAsset, vaultAmount));
31356
- const translatedAmount = EvmVaultTokenService.translateIncomingDecimals(assetConfig.decimals, vaultAmount);
31495
+ const translatedAmount = EvmVaultTokenService.translateOutgoingDecimals(assetConfig.decimals, vaultAmount);
31357
31496
  if (dstChainKey === this.hubProvider.chainConfig.chain.key) {
31358
31497
  if (assetConfig.hubAsset.toLowerCase() === this.config.spokeChainConfig[dstChainKey].addresses.wrappedSonic.toLowerCase()) {
31359
31498
  const withdrawToCall = {
@@ -36652,9 +36791,9 @@ var Sodax = class {
36652
36791
  spoke;
36653
36792
  // spoke service enabling spoke chain operations
36654
36793
  constructor(config) {
36655
- this.instanceConfig = config ? deepMerge(sodaxConfig, config) : sodaxConfig;
36794
+ this.instanceConfig = config ? mergeSodaxConfig(sodaxConfig, config) : sodaxConfig;
36656
36795
  this.backendApi = new BackendApiService(this.instanceConfig.api);
36657
- this.config = new ConfigService({ api: this.backendApi, config: this.instanceConfig });
36796
+ this.config = new ConfigService({ api: this.backendApi, config: this.instanceConfig, userConfig: config });
36658
36797
  this.hubProvider = new EvmHubProvider({ config: this.config });
36659
36798
  this.spoke = new SpokeService({ config: this.config, hubProvider: this.hubProvider });
36660
36799
  this.swaps = new SwapService({
@@ -37049,6 +37188,7 @@ exports.kaiaSupportedTokens = kaiaSupportedTokens;
37049
37188
  exports.lightlinkSupportedTokens = lightlinkSupportedTokens;
37050
37189
  exports.lookupFailed = lookupFailed;
37051
37190
  exports.mapRelayFailure = mapRelayFailure;
37191
+ exports.mergeSodaxConfig = mergeSodaxConfig;
37052
37192
  exports.messageOf = messageOf;
37053
37193
  exports.migrationInvariant = migrationInvariant;
37054
37194
  exports.mintPositionParamsAbi = mintPositionParamsAbi;
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { IConfigApi, ApiConfig, Result, SubmitSwapTxRequest, SubmitSwapTxResponse, GetSubmitSwapTxStatusParams, SubmitSwapTxStatusResponse, Address, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, SpokeChainKey, GetSwapTokensByChainIdApiResponse, GetMoneyMarketTokensApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, SodaxConfig, XToken, OriginalAssetAddress, IntentRelayChainId, HubChainKey, HubConfig, PoolKey, SpokeChainConfig, RelayConfig, SolverConfig, SwapsConfig, BridgeConfig, MoneyMarketConfig, DexConfig, GetSpokeChainConfigType, EvmContractCall, Hex, IEvmWalletProvider, EvmRawTransactionReceipt, PartnerFee, QuoteType, EvmChainKey, DeepPartial, WalletProviderSlot, TxReturnType, ChainType, GetChainType, SolanaRawTransactionReceipt, StellarSorobanTransactionReceipt, IconTransactionResult, SuiRawTransactionReceipt, InjectiveRawTransactionReceipt, NearRawTransactionReceipt, StacksRawTransactionReceipt, BitcoinRawTransactionReceipt, GetAddressType, HubAddress, GetTokenAddressType, EvmSpokeOnlyChainKey, StellarChainKey, SonicChainKey, AssetInfo, TokenInfo, VaultReserves, StacksChainKey, FeeEstimateTransaction, StacksTransactionParams, RadfiConfig, IBitcoinWalletProvider, RadfiDepositTxResponse, BtcAddressType, BitcoinChainKey, HttpUrl, NearChainKey, FillData, NearRawTransaction, SuiPaginatedCoins, SuiChainKey, SuiExecutionResult, SuiGasEstimate, IStellarWalletProvider, StellarGasEstimate, SolanaChainKey, SolanaGasEstimate, SolanaBase58PublicKey, SolanaRawTransactionInstruction, SolanaSerializedTransaction, SolanaRpcResponseAndContext, SolanaTokenAmount, IconChainKey, IconGasEstimate, InjectiveChainKey, InjectiveGasEstimate, JsonObject, InjectiveRawTransaction, IInjectiveWalletProvider, InjectiveExecuteResponse, GetEstimateGasReturnType, IconAddress, IWalletProvider, EvmSpokeChainConfig, PartnerFeeAmount, PartnerFeePercentage, GetWalletProviderType, SpokeExecActionParams, FeeAmount, Hash as Hash$1, SolverIntentQuoteRequest, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentStatusRequest, SolverIntentStatusResponse, SolverExecutionRequest, SolverExecutionResponse, IconEoaAddress, IcxTokenType, IconContractAddress, BridgeLimit, UserUnstakeInfo, ConcentratedLiquidityConfig } from '@sodax/types';
1
+ import { IConfigApi, ApiConfig, Result, SubmitSwapTxRequest, SubmitSwapTxResponse, GetSubmitSwapTxStatusParams, SubmitSwapTxStatusResponse, Address, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, SpokeChainKey, GetSwapTokensByChainIdApiResponse, GetMoneyMarketTokensApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, SodaxConfig, DeepPartial, XToken, OriginalAssetAddress, IntentRelayChainId, HubChainKey, HubConfig, PoolKey, SpokeChainConfig, RelayConfig, SolverConfig, SwapsConfig, BridgeConfig, MoneyMarketConfig, DexConfig, GetSpokeChainConfigType, EvmContractCall, Hex, IEvmWalletProvider, EvmRawTransactionReceipt, PartnerFee, QuoteType, EvmChainKey, WalletProviderSlot, TxReturnType, ChainType, GetChainType, SolanaRawTransactionReceipt, StellarSorobanTransactionReceipt, IconTransactionResult, SuiRawTransactionReceipt, InjectiveRawTransactionReceipt, NearRawTransactionReceipt, StacksRawTransactionReceipt, BitcoinRawTransactionReceipt, GetAddressType, HubAddress, GetTokenAddressType, EvmSpokeOnlyChainKey, StellarChainKey, SonicChainKey, AssetInfo, TokenInfo, VaultReserves, StacksChainKey, FeeEstimateTransaction, StacksTransactionParams, RadfiConfig, IBitcoinWalletProvider, RadfiDepositTxResponse, BtcAddressType, BitcoinChainKey, HttpUrl, NearChainKey, FillData, NearRawTransaction, SuiPaginatedCoins, SuiChainKey, SuiExecutionResult, SuiGasEstimate, IStellarWalletProvider, StellarGasEstimate, SolanaChainKey, SolanaGasEstimate, SolanaBase58PublicKey, SolanaRawTransactionInstruction, SolanaSerializedTransaction, SolanaRpcResponseAndContext, SolanaTokenAmount, IconChainKey, IconGasEstimate, InjectiveChainKey, InjectiveGasEstimate, JsonObject, InjectiveRawTransaction, IInjectiveWalletProvider, InjectiveExecuteResponse, GetEstimateGasReturnType, IconAddress, IWalletProvider, EvmSpokeChainConfig, PartnerFeeAmount, PartnerFeePercentage, GetWalletProviderType, SpokeExecActionParams, FeeAmount, Hash as Hash$1, SolverIntentQuoteRequest, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentStatusRequest, SolverIntentStatusResponse, SolverExecutionRequest, SolverExecutionResponse, IconEoaAddress, IcxTokenType, IconContractAddress, BridgeLimit, UserUnstakeInfo, ConcentratedLiquidityConfig } from '@sodax/types';
2
2
  export * from '@sodax/types';
3
3
  import * as viem from 'viem';
4
4
  import { Hex as Hex$1, Chain, Address as Address$1, PublicClient, HttpTransport, Hash, GetLogsReturnType } from 'viem';
@@ -7811,6 +7811,12 @@ declare class BackendApiService implements IConfigApi {
7811
7811
  type ConfigServiceConstructorParams = {
7812
7812
  api: BackendApiService;
7813
7813
  config: SodaxConfig;
7814
+ /**
7815
+ * The raw user-provided config override (the `DeepPartial<SodaxConfig>` passed to `new Sodax(...)`),
7816
+ * NOT the merged result. Re-applied on top of dynamic config in {@link ConfigService.initialize} so
7817
+ * that a remote config fetch never clobbers explicit user overrides.
7818
+ */
7819
+ userConfig?: DeepPartial<SodaxConfig>;
7814
7820
  };
7815
7821
  /**
7816
7822
  * ConfigApiService - Service for fetching configuration data from the backend API or fallbacking to default values
@@ -7818,6 +7824,7 @@ type ConfigServiceConstructorParams = {
7818
7824
  declare class ConfigService {
7819
7825
  private sodax;
7820
7826
  private readonly api;
7827
+ private readonly userConfig?;
7821
7828
  private initialized;
7822
7829
  private supportedHubAssetsSet;
7823
7830
  private supportedSodaVaultAssetsSet;
@@ -7828,7 +7835,7 @@ declare class ConfigService {
7828
7835
  private stakedATokenAddressesSet;
7829
7836
  private chainToSupportedTokenAddressMap;
7830
7837
  private hubAssetToXTokenMap;
7831
- constructor({ api, config }: ConfigServiceConstructorParams);
7838
+ constructor({ api, config, userConfig }: ConfigServiceConstructorParams);
7832
7839
  initialize(): Promise<Result<void>>;
7833
7840
  getChains(): GetChainsApiResponse;
7834
7841
  getSwapTokens(): GetSwapTokensApiResponse;
@@ -7893,6 +7900,20 @@ declare class ConfigService {
7893
7900
  */
7894
7901
  declare function parseTokenArrayFromJson(input: unknown): readonly XToken[];
7895
7902
 
7903
+ /**
7904
+ * Layers a user `DeepPartial<SodaxConfig>` override on top of a full base config (the static default in the
7905
+ * Sodax constructor, or the dynamic config in {@link ConfigService.initialize}).
7906
+ *
7907
+ * Most fields are deep-merged, so a user can override `api.timeout` without dropping the sibling `api.baseURL`.
7908
+ * `PartnerFee` is the exception: it is a discriminated union (`{address, amount}` | `{address, percentage}`),
7909
+ * so deep-merging a percentage override onto an amount base (or vice versa) would yield an invalid hybrid
7910
+ * carrying both keys. Downstream discrimination treats any object with a bigint `amount` as the amount
7911
+ * variant (see `isPartnerFeeAmount` / `calculateFeeAmount`), so such a hybrid silently mis-charges the fee.
7912
+ * The two `PartnerFee`-typed config fields are therefore atomic — the override replaces the base value
7913
+ * wholesale, which means a fee override must be a complete `PartnerFee`, not a partial.
7914
+ */
7915
+ declare function mergeSodaxConfig(base: SodaxConfig, override: DeepPartial<SodaxConfig>): SodaxConfig;
7916
+
7896
7917
  /**
7897
7918
  * ABI-encode an array of ContractCall objects.
7898
7919
  * @param calls An array of ContractCall objects.
@@ -11857,6 +11878,24 @@ declare class SwapService {
11857
11878
  * @returns A `Result` containing `RelayExtraData`: `{ address: Hex; payload: Hex }`.
11858
11879
  */
11859
11880
  getIntentSubmitTxExtraData(params: GetIntentSubmitTxExtraDataParams): Promise<Result<RelayExtraData>>;
11881
+ /**
11882
+ * Re-derives the byte-identical relay extra data (`{ address, payload }`) for a swap intent from a
11883
+ * fully-populated `Intent` alone — no on-chain call, no original `createIntent` return value needed.
11884
+ *
11885
+ * The `payload` matches exactly what `createIntent` relayed when the intent was first created:
11886
+ * - Sonic-hub source — raw `createIntent(intent)` calldata.
11887
+ * - Any spoke source — the `[approve, createIntent]` multicall (uniform across all spokes).
11888
+ *
11889
+ * Byte-identity is possible because the only originally-random field, `intentId`, is already
11890
+ * carried on the `Intent`; everything else in the payload is a pure function of the intent and
11891
+ * the configured intents contract. Use this to rebuild relay submission data for a manual relay
11892
+ * step when the runtime `relayData` from `createIntent` is no longer available.
11893
+ *
11894
+ * @param intent - A fully-populated intent (e.g. from `getIntent(txHash)` or the `intent` field
11895
+ * returned by `createIntent`).
11896
+ * @returns A `Result` containing `RelayExtraData`: `{ address: Hex; payload: Hex }`.
11897
+ */
11898
+ reconstructRelayData(intent: Intent): Result<RelayExtraData>;
11860
11899
  /**
11861
11900
  * Fetches a previously created `Intent` from the hub chain by its transaction hash.
11862
11901
  *
@@ -16049,6 +16088,39 @@ declare class EvmSolverService {
16049
16088
  * @throws Invariant error if `inputAmount` is `0n` or if the fee percentage is out of range.
16050
16089
  */
16051
16090
  static createIntentFeeData(fee: PartnerFee | undefined, inputAmount: bigint): [Hex, bigint];
16091
+ /**
16092
+ * Recovers the partner fee amount embedded in an intent's `data` field.
16093
+ *
16094
+ * Exact inverse of {@link createIntentFeeData}: `'0x'` means no fee (`0n`); otherwise the first
16095
+ * byte is the {@link IntentDataType} tag (from the `encodePacked(['uint8','bytes'], …)` envelope)
16096
+ * and the remainder is the ABI-encoded `(uint256 fee, address receiver)` struct.
16097
+ *
16098
+ * @param data - The intent's `data` field (`'0x'` when no fee was configured).
16099
+ * @returns The fee amount in the input token's smallest unit (`0n` when no fee data is present, or
16100
+ * when the leading type byte is not {@link IntentDataType.FEE} — in which case it logs and degrades to `0n`).
16101
+ */
16102
+ static decodeIntentFeeAmount(data: Hex): bigint;
16103
+ /**
16104
+ * Re-derives the byte-identical relay payload that `createIntent` originally produced, from a
16105
+ * fully-populated `Intent` alone.
16106
+ *
16107
+ * Mirrors the two payload shapes built at intent-creation time:
16108
+ * - Hub (Sonic) source — raw `createIntent(intent)` calldata (no approval, no multicall), matching
16109
+ * {@link SonicSpokeService.createSwapIntent}.
16110
+ * - Spoke source — the `[approve(intentsContract, gross), createIntent(intent)]` multicall, matching
16111
+ * {@link constructCreateIntentData}. The gross approval amount is recovered as
16112
+ * `intent.inputAmount + feeAmount`, where `feeAmount` comes from {@link decodeIntentFeeAmount}.
16113
+ *
16114
+ * Byte-identity holds because this reuses the exact encode primitives (`encodeCreateIntent`,
16115
+ * `Erc20Service.encodeApprove`, `encodeContractCalls`) that produced the original — the only
16116
+ * originally-random input, `intentId`, is already carried on the `Intent`.
16117
+ *
16118
+ * @param intent - The fully-populated intent (e.g. from `createIntent` or `getIntent`).
16119
+ * @param intentsContract - The hub-chain intents contract address (`config.solver.intentsContract`).
16120
+ * @param isHubSource - `true` when the intent's source chain is the hub (Sonic).
16121
+ * @returns The byte-identical relay payload `Hex`.
16122
+ */
16123
+ static reconstructCreateIntentData(intent: Intent, intentsContract: Address$1, isHubSource: boolean): Hex;
16052
16124
  /**
16053
16125
  * Reads an `Intent` struct from a hub-chain transaction receipt.
16054
16126
  *
@@ -16388,4 +16460,4 @@ type DexErrorCode = LookupErrorCode;
16388
16460
  type DexError = SodaxError<DexErrorCode>;
16389
16461
  declare const isDexError: (e: unknown) => e is SodaxError<LookupErrorCode>;
16390
16462
 
16391
- export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, type AggregatedReserveData, type AllowanceCheckErrorCode, type AllowanceInfo, type AllowanceResponse, type AllowanceTransferDetails, type ApiResponse, type ApproveErrorCode, type ApyRange, type AssetDepositAction, type AssetEntry, AssetService, type AssetServiceConstructorParams, type AssetWithdrawAction, type AutoSwapPreferences, BackendApiService, type BalnLockParams, type BalnMigrateAction, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, BitcoinSpokeService, type BitcoinTransactionResult, type BitcoinUTXO, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeAction, type BridgeAllowanceCheckError, type BridgeAllowanceCheckErrorCode, type BridgeApproveError, type BridgeApproveErrorCode, type BridgeCreateIntentError, type BridgeCreateIntentErrorCode, type BridgeError, type BridgeErrorCode, 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 CreateViemPublicClientParams, CustomSorobanServer, CustomStellarAccount, type DepositParams, type DepositSimulationParams, type DestinationParamsType, type DetailedLock, type DexError, type DexErrorCode, DexService, type DexServiceConstructorParams, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, type EnrichedToken, type Erc20ApproveParams, type Erc20IsAllowanceParams, 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 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 GetRelayRequestParamType, type GetRelayResponse, type GetSpokeServiceType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, type GetTxReceiptType, type GetUserRouterParams, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, 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, 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 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, NearSpokeService, type OnDemandBtcPayload, type OptionalRaw, type OptionalSkipSimulation, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerAction, type PartnerError, type PartnerErrorCode, type PartnerFeeClaimAssetBalance, 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, RadfiApiError, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiErrorBody, type RadfiMaxSpentResponse, RadfiProvider, 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 ResponseAddressType, type ResponseSigningType, type RevertMigrationOrchestrationError, type RevertMigrationOrchestrationErrorCode, type RewardInfoHumanized, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, type SendMessageParams, type SetSwapPreferenceAction, type SetSwapPreferenceParams, Sodax, SodaxError, type SodaxErrorCode, type SodaxErrorContext, type SodaxErrorJSON, type SodaxFeature, 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, 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, StellarSpokeService, type SubmitTxParams, type SubmitTxResponse, SuiSpokeService, SupportedMigrationTokens, type SwapAction, type SwapActionParams, type SwapCreateIntentError, type SwapCreateIntentErrorCode, type SwapError, type SwapErrorCode, type SwapResponse, SwapService, type SwapServiceConstructorParams, 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 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, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, connectionAbi, 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, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexError, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isHubChainKeyType, isIconAddress, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNearChainKeyType, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKeyType, isStellarWalletProviderType, isSubmitSwapTxResponse, isSubmitSwapTxStatusResponse, isSuiChainKeyType, isSwapCreateIntentError, isSwapError, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, lookupFailed, mapRelayFailure, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, nativeToUSD, normalize, normalizeBN, normalizePsbtToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, reverseEncodeAddress, serializeAddressData, sleep, sodaxInvariant, sonicWalletFactoryAbi, spokeAssetManagerAbi, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, swapInvariant, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
16463
+ export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, type AggregatedReserveData, type AllowanceCheckErrorCode, type AllowanceInfo, type AllowanceResponse, type AllowanceTransferDetails, type ApiResponse, type ApproveErrorCode, type ApyRange, type AssetDepositAction, type AssetEntry, AssetService, type AssetServiceConstructorParams, type AssetWithdrawAction, type AutoSwapPreferences, BackendApiService, type BalnLockParams, type BalnMigrateAction, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, BitcoinSpokeService, type BitcoinTransactionResult, type BitcoinUTXO, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeAction, type BridgeAllowanceCheckError, type BridgeAllowanceCheckErrorCode, type BridgeApproveError, type BridgeApproveErrorCode, type BridgeCreateIntentError, type BridgeCreateIntentErrorCode, type BridgeError, type BridgeErrorCode, 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 CreateViemPublicClientParams, CustomSorobanServer, CustomStellarAccount, type DepositParams, type DepositSimulationParams, type DestinationParamsType, type DetailedLock, type DexError, type DexErrorCode, DexService, type DexServiceConstructorParams, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, type EnrichedToken, type Erc20ApproveParams, type Erc20IsAllowanceParams, 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 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 GetRelayRequestParamType, type GetRelayResponse, type GetSpokeServiceType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, type GetTxReceiptType, type GetUserRouterParams, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, 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, 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 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, NearSpokeService, type OnDemandBtcPayload, type OptionalRaw, type OptionalSkipSimulation, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerAction, type PartnerError, type PartnerErrorCode, type PartnerFeeClaimAssetBalance, 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, RadfiApiError, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiErrorBody, type RadfiMaxSpentResponse, RadfiProvider, 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 ResponseAddressType, type ResponseSigningType, type RevertMigrationOrchestrationError, type RevertMigrationOrchestrationErrorCode, type RewardInfoHumanized, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, type SendMessageParams, type SetSwapPreferenceAction, type SetSwapPreferenceParams, Sodax, SodaxError, type SodaxErrorCode, type SodaxErrorContext, type SodaxErrorJSON, type SodaxFeature, 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, 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, StellarSpokeService, type SubmitTxParams, type SubmitTxResponse, SuiSpokeService, SupportedMigrationTokens, type SwapAction, type SwapActionParams, type SwapCreateIntentError, type SwapCreateIntentErrorCode, type SwapError, type SwapErrorCode, type SwapResponse, SwapService, type SwapServiceConstructorParams, 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 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, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, connectionAbi, 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, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexError, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isHubChainKeyType, isIconAddress, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNearChainKeyType, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKeyType, isStellarWalletProviderType, isSubmitSwapTxResponse, isSubmitSwapTxStatusResponse, isSuiChainKeyType, isSwapCreateIntentError, isSwapError, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, nativeToUSD, normalize, normalizeBN, normalizePsbtToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, reverseEncodeAddress, serializeAddressData, sleep, sodaxInvariant, sonicWalletFactoryAbi, spokeAssetManagerAbi, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, swapInvariant, 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 { IConfigApi, ApiConfig, Result, SubmitSwapTxRequest, SubmitSwapTxResponse, GetSubmitSwapTxStatusParams, SubmitSwapTxStatusResponse, Address, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, SpokeChainKey, GetSwapTokensByChainIdApiResponse, GetMoneyMarketTokensApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, SodaxConfig, XToken, OriginalAssetAddress, IntentRelayChainId, HubChainKey, HubConfig, PoolKey, SpokeChainConfig, RelayConfig, SolverConfig, SwapsConfig, BridgeConfig, MoneyMarketConfig, DexConfig, GetSpokeChainConfigType, EvmContractCall, Hex, IEvmWalletProvider, EvmRawTransactionReceipt, PartnerFee, QuoteType, EvmChainKey, DeepPartial, WalletProviderSlot, TxReturnType, ChainType, GetChainType, SolanaRawTransactionReceipt, StellarSorobanTransactionReceipt, IconTransactionResult, SuiRawTransactionReceipt, InjectiveRawTransactionReceipt, NearRawTransactionReceipt, StacksRawTransactionReceipt, BitcoinRawTransactionReceipt, GetAddressType, HubAddress, GetTokenAddressType, EvmSpokeOnlyChainKey, StellarChainKey, SonicChainKey, AssetInfo, TokenInfo, VaultReserves, StacksChainKey, FeeEstimateTransaction, StacksTransactionParams, RadfiConfig, IBitcoinWalletProvider, RadfiDepositTxResponse, BtcAddressType, BitcoinChainKey, HttpUrl, NearChainKey, FillData, NearRawTransaction, SuiPaginatedCoins, SuiChainKey, SuiExecutionResult, SuiGasEstimate, IStellarWalletProvider, StellarGasEstimate, SolanaChainKey, SolanaGasEstimate, SolanaBase58PublicKey, SolanaRawTransactionInstruction, SolanaSerializedTransaction, SolanaRpcResponseAndContext, SolanaTokenAmount, IconChainKey, IconGasEstimate, InjectiveChainKey, InjectiveGasEstimate, JsonObject, InjectiveRawTransaction, IInjectiveWalletProvider, InjectiveExecuteResponse, GetEstimateGasReturnType, IconAddress, IWalletProvider, EvmSpokeChainConfig, PartnerFeeAmount, PartnerFeePercentage, GetWalletProviderType, SpokeExecActionParams, FeeAmount, Hash as Hash$1, SolverIntentQuoteRequest, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentStatusRequest, SolverIntentStatusResponse, SolverExecutionRequest, SolverExecutionResponse, IconEoaAddress, IcxTokenType, IconContractAddress, BridgeLimit, UserUnstakeInfo, ConcentratedLiquidityConfig } from '@sodax/types';
1
+ import { IConfigApi, ApiConfig, Result, SubmitSwapTxRequest, SubmitSwapTxResponse, GetSubmitSwapTxStatusParams, SubmitSwapTxStatusResponse, Address, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, SpokeChainKey, GetSwapTokensByChainIdApiResponse, GetMoneyMarketTokensApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, SodaxConfig, DeepPartial, XToken, OriginalAssetAddress, IntentRelayChainId, HubChainKey, HubConfig, PoolKey, SpokeChainConfig, RelayConfig, SolverConfig, SwapsConfig, BridgeConfig, MoneyMarketConfig, DexConfig, GetSpokeChainConfigType, EvmContractCall, Hex, IEvmWalletProvider, EvmRawTransactionReceipt, PartnerFee, QuoteType, EvmChainKey, WalletProviderSlot, TxReturnType, ChainType, GetChainType, SolanaRawTransactionReceipt, StellarSorobanTransactionReceipt, IconTransactionResult, SuiRawTransactionReceipt, InjectiveRawTransactionReceipt, NearRawTransactionReceipt, StacksRawTransactionReceipt, BitcoinRawTransactionReceipt, GetAddressType, HubAddress, GetTokenAddressType, EvmSpokeOnlyChainKey, StellarChainKey, SonicChainKey, AssetInfo, TokenInfo, VaultReserves, StacksChainKey, FeeEstimateTransaction, StacksTransactionParams, RadfiConfig, IBitcoinWalletProvider, RadfiDepositTxResponse, BtcAddressType, BitcoinChainKey, HttpUrl, NearChainKey, FillData, NearRawTransaction, SuiPaginatedCoins, SuiChainKey, SuiExecutionResult, SuiGasEstimate, IStellarWalletProvider, StellarGasEstimate, SolanaChainKey, SolanaGasEstimate, SolanaBase58PublicKey, SolanaRawTransactionInstruction, SolanaSerializedTransaction, SolanaRpcResponseAndContext, SolanaTokenAmount, IconChainKey, IconGasEstimate, InjectiveChainKey, InjectiveGasEstimate, JsonObject, InjectiveRawTransaction, IInjectiveWalletProvider, InjectiveExecuteResponse, GetEstimateGasReturnType, IconAddress, IWalletProvider, EvmSpokeChainConfig, PartnerFeeAmount, PartnerFeePercentage, GetWalletProviderType, SpokeExecActionParams, FeeAmount, Hash as Hash$1, SolverIntentQuoteRequest, SolverIntentQuoteResponse, SolverErrorResponse, SolverIntentStatusRequest, SolverIntentStatusResponse, SolverExecutionRequest, SolverExecutionResponse, IconEoaAddress, IcxTokenType, IconContractAddress, BridgeLimit, UserUnstakeInfo, ConcentratedLiquidityConfig } from '@sodax/types';
2
2
  export * from '@sodax/types';
3
3
  import * as viem from 'viem';
4
4
  import { Hex as Hex$1, Chain, Address as Address$1, PublicClient, HttpTransport, Hash, GetLogsReturnType } from 'viem';
@@ -7811,6 +7811,12 @@ declare class BackendApiService implements IConfigApi {
7811
7811
  type ConfigServiceConstructorParams = {
7812
7812
  api: BackendApiService;
7813
7813
  config: SodaxConfig;
7814
+ /**
7815
+ * The raw user-provided config override (the `DeepPartial<SodaxConfig>` passed to `new Sodax(...)`),
7816
+ * NOT the merged result. Re-applied on top of dynamic config in {@link ConfigService.initialize} so
7817
+ * that a remote config fetch never clobbers explicit user overrides.
7818
+ */
7819
+ userConfig?: DeepPartial<SodaxConfig>;
7814
7820
  };
7815
7821
  /**
7816
7822
  * ConfigApiService - Service for fetching configuration data from the backend API or fallbacking to default values
@@ -7818,6 +7824,7 @@ type ConfigServiceConstructorParams = {
7818
7824
  declare class ConfigService {
7819
7825
  private sodax;
7820
7826
  private readonly api;
7827
+ private readonly userConfig?;
7821
7828
  private initialized;
7822
7829
  private supportedHubAssetsSet;
7823
7830
  private supportedSodaVaultAssetsSet;
@@ -7828,7 +7835,7 @@ declare class ConfigService {
7828
7835
  private stakedATokenAddressesSet;
7829
7836
  private chainToSupportedTokenAddressMap;
7830
7837
  private hubAssetToXTokenMap;
7831
- constructor({ api, config }: ConfigServiceConstructorParams);
7838
+ constructor({ api, config, userConfig }: ConfigServiceConstructorParams);
7832
7839
  initialize(): Promise<Result<void>>;
7833
7840
  getChains(): GetChainsApiResponse;
7834
7841
  getSwapTokens(): GetSwapTokensApiResponse;
@@ -7893,6 +7900,20 @@ declare class ConfigService {
7893
7900
  */
7894
7901
  declare function parseTokenArrayFromJson(input: unknown): readonly XToken[];
7895
7902
 
7903
+ /**
7904
+ * Layers a user `DeepPartial<SodaxConfig>` override on top of a full base config (the static default in the
7905
+ * Sodax constructor, or the dynamic config in {@link ConfigService.initialize}).
7906
+ *
7907
+ * Most fields are deep-merged, so a user can override `api.timeout` without dropping the sibling `api.baseURL`.
7908
+ * `PartnerFee` is the exception: it is a discriminated union (`{address, amount}` | `{address, percentage}`),
7909
+ * so deep-merging a percentage override onto an amount base (or vice versa) would yield an invalid hybrid
7910
+ * carrying both keys. Downstream discrimination treats any object with a bigint `amount` as the amount
7911
+ * variant (see `isPartnerFeeAmount` / `calculateFeeAmount`), so such a hybrid silently mis-charges the fee.
7912
+ * The two `PartnerFee`-typed config fields are therefore atomic — the override replaces the base value
7913
+ * wholesale, which means a fee override must be a complete `PartnerFee`, not a partial.
7914
+ */
7915
+ declare function mergeSodaxConfig(base: SodaxConfig, override: DeepPartial<SodaxConfig>): SodaxConfig;
7916
+
7896
7917
  /**
7897
7918
  * ABI-encode an array of ContractCall objects.
7898
7919
  * @param calls An array of ContractCall objects.
@@ -11857,6 +11878,24 @@ declare class SwapService {
11857
11878
  * @returns A `Result` containing `RelayExtraData`: `{ address: Hex; payload: Hex }`.
11858
11879
  */
11859
11880
  getIntentSubmitTxExtraData(params: GetIntentSubmitTxExtraDataParams): Promise<Result<RelayExtraData>>;
11881
+ /**
11882
+ * Re-derives the byte-identical relay extra data (`{ address, payload }`) for a swap intent from a
11883
+ * fully-populated `Intent` alone — no on-chain call, no original `createIntent` return value needed.
11884
+ *
11885
+ * The `payload` matches exactly what `createIntent` relayed when the intent was first created:
11886
+ * - Sonic-hub source — raw `createIntent(intent)` calldata.
11887
+ * - Any spoke source — the `[approve, createIntent]` multicall (uniform across all spokes).
11888
+ *
11889
+ * Byte-identity is possible because the only originally-random field, `intentId`, is already
11890
+ * carried on the `Intent`; everything else in the payload is a pure function of the intent and
11891
+ * the configured intents contract. Use this to rebuild relay submission data for a manual relay
11892
+ * step when the runtime `relayData` from `createIntent` is no longer available.
11893
+ *
11894
+ * @param intent - A fully-populated intent (e.g. from `getIntent(txHash)` or the `intent` field
11895
+ * returned by `createIntent`).
11896
+ * @returns A `Result` containing `RelayExtraData`: `{ address: Hex; payload: Hex }`.
11897
+ */
11898
+ reconstructRelayData(intent: Intent): Result<RelayExtraData>;
11860
11899
  /**
11861
11900
  * Fetches a previously created `Intent` from the hub chain by its transaction hash.
11862
11901
  *
@@ -16049,6 +16088,39 @@ declare class EvmSolverService {
16049
16088
  * @throws Invariant error if `inputAmount` is `0n` or if the fee percentage is out of range.
16050
16089
  */
16051
16090
  static createIntentFeeData(fee: PartnerFee | undefined, inputAmount: bigint): [Hex, bigint];
16091
+ /**
16092
+ * Recovers the partner fee amount embedded in an intent's `data` field.
16093
+ *
16094
+ * Exact inverse of {@link createIntentFeeData}: `'0x'` means no fee (`0n`); otherwise the first
16095
+ * byte is the {@link IntentDataType} tag (from the `encodePacked(['uint8','bytes'], …)` envelope)
16096
+ * and the remainder is the ABI-encoded `(uint256 fee, address receiver)` struct.
16097
+ *
16098
+ * @param data - The intent's `data` field (`'0x'` when no fee was configured).
16099
+ * @returns The fee amount in the input token's smallest unit (`0n` when no fee data is present, or
16100
+ * when the leading type byte is not {@link IntentDataType.FEE} — in which case it logs and degrades to `0n`).
16101
+ */
16102
+ static decodeIntentFeeAmount(data: Hex): bigint;
16103
+ /**
16104
+ * Re-derives the byte-identical relay payload that `createIntent` originally produced, from a
16105
+ * fully-populated `Intent` alone.
16106
+ *
16107
+ * Mirrors the two payload shapes built at intent-creation time:
16108
+ * - Hub (Sonic) source — raw `createIntent(intent)` calldata (no approval, no multicall), matching
16109
+ * {@link SonicSpokeService.createSwapIntent}.
16110
+ * - Spoke source — the `[approve(intentsContract, gross), createIntent(intent)]` multicall, matching
16111
+ * {@link constructCreateIntentData}. The gross approval amount is recovered as
16112
+ * `intent.inputAmount + feeAmount`, where `feeAmount` comes from {@link decodeIntentFeeAmount}.
16113
+ *
16114
+ * Byte-identity holds because this reuses the exact encode primitives (`encodeCreateIntent`,
16115
+ * `Erc20Service.encodeApprove`, `encodeContractCalls`) that produced the original — the only
16116
+ * originally-random input, `intentId`, is already carried on the `Intent`.
16117
+ *
16118
+ * @param intent - The fully-populated intent (e.g. from `createIntent` or `getIntent`).
16119
+ * @param intentsContract - The hub-chain intents contract address (`config.solver.intentsContract`).
16120
+ * @param isHubSource - `true` when the intent's source chain is the hub (Sonic).
16121
+ * @returns The byte-identical relay payload `Hex`.
16122
+ */
16123
+ static reconstructCreateIntentData(intent: Intent, intentsContract: Address$1, isHubSource: boolean): Hex;
16052
16124
  /**
16053
16125
  * Reads an `Intent` struct from a hub-chain transaction receipt.
16054
16126
  *
@@ -16388,4 +16460,4 @@ type DexErrorCode = LookupErrorCode;
16388
16460
  type DexError = SodaxError<DexErrorCode>;
16389
16461
  declare const isDexError: (e: unknown) => e is SodaxError<LookupErrorCode>;
16390
16462
 
16391
- export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, type AggregatedReserveData, type AllowanceCheckErrorCode, type AllowanceInfo, type AllowanceResponse, type AllowanceTransferDetails, type ApiResponse, type ApproveErrorCode, type ApyRange, type AssetDepositAction, type AssetEntry, AssetService, type AssetServiceConstructorParams, type AssetWithdrawAction, type AutoSwapPreferences, BackendApiService, type BalnLockParams, type BalnMigrateAction, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, BitcoinSpokeService, type BitcoinTransactionResult, type BitcoinUTXO, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeAction, type BridgeAllowanceCheckError, type BridgeAllowanceCheckErrorCode, type BridgeApproveError, type BridgeApproveErrorCode, type BridgeCreateIntentError, type BridgeCreateIntentErrorCode, type BridgeError, type BridgeErrorCode, 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 CreateViemPublicClientParams, CustomSorobanServer, CustomStellarAccount, type DepositParams, type DepositSimulationParams, type DestinationParamsType, type DetailedLock, type DexError, type DexErrorCode, DexService, type DexServiceConstructorParams, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, type EnrichedToken, type Erc20ApproveParams, type Erc20IsAllowanceParams, 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 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 GetRelayRequestParamType, type GetRelayResponse, type GetSpokeServiceType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, type GetTxReceiptType, type GetUserRouterParams, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, 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, 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 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, NearSpokeService, type OnDemandBtcPayload, type OptionalRaw, type OptionalSkipSimulation, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerAction, type PartnerError, type PartnerErrorCode, type PartnerFeeClaimAssetBalance, 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, RadfiApiError, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiErrorBody, type RadfiMaxSpentResponse, RadfiProvider, 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 ResponseAddressType, type ResponseSigningType, type RevertMigrationOrchestrationError, type RevertMigrationOrchestrationErrorCode, type RewardInfoHumanized, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, type SendMessageParams, type SetSwapPreferenceAction, type SetSwapPreferenceParams, Sodax, SodaxError, type SodaxErrorCode, type SodaxErrorContext, type SodaxErrorJSON, type SodaxFeature, 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, 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, StellarSpokeService, type SubmitTxParams, type SubmitTxResponse, SuiSpokeService, SupportedMigrationTokens, type SwapAction, type SwapActionParams, type SwapCreateIntentError, type SwapCreateIntentErrorCode, type SwapError, type SwapErrorCode, type SwapResponse, SwapService, type SwapServiceConstructorParams, 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 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, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, connectionAbi, 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, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexError, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isHubChainKeyType, isIconAddress, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNearChainKeyType, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKeyType, isStellarWalletProviderType, isSubmitSwapTxResponse, isSubmitSwapTxStatusResponse, isSuiChainKeyType, isSwapCreateIntentError, isSwapError, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, lookupFailed, mapRelayFailure, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, nativeToUSD, normalize, normalizeBN, normalizePsbtToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, reverseEncodeAddress, serializeAddressData, sleep, sodaxInvariant, sonicWalletFactoryAbi, spokeAssetManagerAbi, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, swapInvariant, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
16463
+ export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, type AggregatedReserveData, type AllowanceCheckErrorCode, type AllowanceInfo, type AllowanceResponse, type AllowanceTransferDetails, type ApiResponse, type ApproveErrorCode, type ApyRange, type AssetDepositAction, type AssetEntry, AssetService, type AssetServiceConstructorParams, type AssetWithdrawAction, type AutoSwapPreferences, BackendApiService, type BalnLockParams, type BalnMigrateAction, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, BitcoinSpokeService, type BitcoinTransactionResult, type BitcoinUTXO, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeAction, type BridgeAllowanceCheckError, type BridgeAllowanceCheckErrorCode, type BridgeApproveError, type BridgeApproveErrorCode, type BridgeCreateIntentError, type BridgeCreateIntentErrorCode, type BridgeError, type BridgeErrorCode, 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 CreateViemPublicClientParams, CustomSorobanServer, CustomStellarAccount, type DepositParams, type DepositSimulationParams, type DestinationParamsType, type DetailedLock, type DexError, type DexErrorCode, DexService, type DexServiceConstructorParams, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, type EnrichedToken, type Erc20ApproveParams, type Erc20IsAllowanceParams, 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 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 GetRelayRequestParamType, type GetRelayResponse, type GetSpokeServiceType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, type GetTxReceiptType, type GetUserRouterParams, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, 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, 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 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, NearSpokeService, type OnDemandBtcPayload, type OptionalRaw, type OptionalSkipSimulation, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerAction, type PartnerError, type PartnerErrorCode, type PartnerFeeClaimAssetBalance, 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, RadfiApiError, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiErrorBody, type RadfiMaxSpentResponse, RadfiProvider, 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 ResponseAddressType, type ResponseSigningType, type RevertMigrationOrchestrationError, type RevertMigrationOrchestrationErrorCode, type RewardInfoHumanized, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, type SendMessageParams, type SetSwapPreferenceAction, type SetSwapPreferenceParams, Sodax, SodaxError, type SodaxErrorCode, type SodaxErrorContext, type SodaxErrorJSON, type SodaxFeature, 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, 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, StellarSpokeService, type SubmitTxParams, type SubmitTxResponse, SuiSpokeService, SupportedMigrationTokens, type SwapAction, type SwapActionParams, type SwapCreateIntentError, type SwapCreateIntentErrorCode, type SwapError, type SwapErrorCode, type SwapResponse, SwapService, type SwapServiceConstructorParams, 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 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, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, connectionAbi, 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, isBalnMigrateParams, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexError, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isHubChainKeyType, isIconAddress, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNearChainKeyType, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKeyType, isStellarWalletProviderType, isSubmitSwapTxResponse, isSubmitSwapTxStatusResponse, isSuiChainKeyType, isSwapCreateIntentError, isSwapError, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, nativeToUSD, normalize, normalizeBN, normalizePsbtToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, reverseEncodeAddress, serializeAddressData, sleep, sodaxInvariant, sonicWalletFactoryAbi, spokeAssetManagerAbi, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, swapInvariant, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { getAbiItem, isAddress, toHex, hexToBytes, encodeAbiParameters, parseAbiParameters, defineChain, encodeFunctionData, erc20Abi as erc20Abi$1, createPublicClient, http, bytesToHex, keccak256, fromHex, encodePacked, parseEventLogs, decodeAbiParameters, maxUint160, maxUint48 } from 'viem';
1
+ import { getAbiItem, isAddress, toHex, hexToBytes, encodeAbiParameters, parseAbiParameters, defineChain, encodeFunctionData, erc20Abi as erc20Abi$1, createPublicClient, http, bytesToHex, keccak256, fromHex, encodePacked, decodeAbiParameters, parseEventLogs, maxUint160, maxUint48 } from 'viem';
2
2
  import { bcs } from '@mysten/sui/bcs';
3
3
  import { PublicKey, Connection, VersionedTransaction, SystemProgram, ComputeBudgetProgram, TransactionMessage, TransactionInstruction } from '@solana/web3.js';
4
4
  import { rpc, Address, xdr, Account, Horizon, Contract, TransactionBuilder, nativeToScVal, TimeoutInfinite, scValToBigInt, Operation, Asset, FeeBumpTransaction } from '@stellar/stellar-sdk';
@@ -282,6 +282,7 @@ var HubVaultSymbols = [
282
282
  "sodaBNB",
283
283
  "sodaETH",
284
284
  "sodaBTC",
285
+ "sodaWBTC",
285
286
  "sodaSUI",
286
287
  "sodaINJ",
287
288
  "sodaXLM",
@@ -340,6 +341,15 @@ var SodaTokens = {
340
341
  hubAsset: "0x7A1A5555842Ad2D0eD274d09b5c4406a95799D5d",
341
342
  vault: "0x7A1A5555842Ad2D0eD274d09b5c4406a95799D5d"
342
343
  },
344
+ sodaWBTC: {
345
+ symbol: "sodaWBTC",
346
+ name: "Soda Wrapped BTC",
347
+ decimals: 18,
348
+ address: "0x811C3fCc13f9c2a23AE2Ae2DCadacFAC6eb5f0eB",
349
+ chainKey: ChainKeys.SONIC_MAINNET,
350
+ hubAsset: "0x811C3fCc13f9c2a23AE2Ae2DCadacFAC6eb5f0eB",
351
+ vault: "0x811C3fCc13f9c2a23AE2Ae2DCadacFAC6eb5f0eB"
352
+ },
343
353
  sodaSOL: {
344
354
  symbol: "sodaSOL",
345
355
  name: "Soda SOL",
@@ -943,7 +953,8 @@ var arbitrumSupportedTokens = {
943
953
  address: "0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40",
944
954
  chainKey: ChainKeys.ARBITRUM_MAINNET,
945
955
  hubAsset: "0x96Fc8540736f1598b7E235e6dE8814062b3b5d3B",
946
- vault: SodaTokens.sodaBTC.address
956
+ vault: SodaTokens.sodaBTC.address,
957
+ access: "withdrawOnly"
947
958
  },
948
959
  WBTC: {
949
960
  symbol: "WBTC",
@@ -952,7 +963,17 @@ var arbitrumSupportedTokens = {
952
963
  address: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f",
953
964
  chainKey: ChainKeys.ARBITRUM_MAINNET,
954
965
  hubAsset: "0xfB0ACB1b2720B620935F50a6dd3F7FEA52b2FCBe",
955
- vault: SodaTokens.sodaBTC.address
966
+ vault: SodaTokens.sodaWBTC.address
967
+ },
968
+ WBTC_LEGACY: {
969
+ symbol: "WBTC.legacy",
970
+ name: "Wrapped BTC (Legacy)",
971
+ decimals: 8,
972
+ address: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f",
973
+ chainKey: ChainKeys.ARBITRUM_MAINNET,
974
+ hubAsset: "0xfB0ACB1b2720B620935F50a6dd3F7FEA52b2FCBe",
975
+ vault: SodaTokens.sodaBTC.address,
976
+ access: "withdrawOnly"
956
977
  },
957
978
  USDC: {
958
979
  symbol: "USDC",
@@ -1107,7 +1128,8 @@ var baseSupportedTokens = {
1107
1128
  address: "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",
1108
1129
  chainKey: ChainKeys.BASE_MAINNET,
1109
1130
  hubAsset: "0x2803a23a3BA6b09e57D1c71deC0D9eFdBB00A27F",
1110
- vault: SodaTokens.sodaBTC.address
1131
+ vault: SodaTokens.sodaBTC.address,
1132
+ access: "withdrawOnly"
1111
1133
  },
1112
1134
  SODA: {
1113
1135
  symbol: "SODA",
@@ -2150,7 +2172,17 @@ var ethereumSupportedTokens = {
2150
2172
  address: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
2151
2173
  chainKey: ChainKeys.ETHEREUM_MAINNET,
2152
2174
  hubAsset: "0x4ccbe4c2cf2aeed19314790622efd71dc0b67acb",
2153
- vault: SodaTokens.sodaBTC.address
2175
+ vault: SodaTokens.sodaWBTC.address
2176
+ },
2177
+ WBTC_LEGACY: {
2178
+ symbol: "WBTC.legacy",
2179
+ name: "Wrapped Bitcoin (Legacy)",
2180
+ decimals: 8,
2181
+ address: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
2182
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
2183
+ hubAsset: "0x4ccbe4c2cf2aeed19314790622efd71dc0b67acb",
2184
+ vault: SodaTokens.sodaBTC.address,
2185
+ access: "withdrawOnly"
2154
2186
  },
2155
2187
  sUSDat: {
2156
2188
  symbol: "sUSDat",
@@ -3154,6 +3186,7 @@ var moneyMarketSupportedTokens = {
3154
3186
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.ETH,
3155
3187
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.bnUSD,
3156
3188
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.WBTC,
3189
+ spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.WBTC_LEGACY,
3157
3190
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.weETH,
3158
3191
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.wstETH,
3159
3192
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.tBTC,
@@ -3281,6 +3314,7 @@ var moneyMarketSupportedTokens = {
3281
3314
  spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.wstETH,
3282
3315
  spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.USDT,
3283
3316
  spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.WBTC,
3317
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.WBTC_LEGACY,
3284
3318
  spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.LL
3285
3319
  ],
3286
3320
  [ChainKeys.REDBELLY_MAINNET]: [
@@ -3871,7 +3905,7 @@ function isValidWalletProviderForChainKey(chainKey, walletProvider) {
3871
3905
  }
3872
3906
 
3873
3907
  // ../types/dist/index.js
3874
- var CONFIG_VERSION = 205;
3908
+ var CONFIG_VERSION = 207;
3875
3909
  function isEvmSpokeChainConfig(value) {
3876
3910
  return typeof value === "object" && value !== null && value.chain.type === "EVM" && value.chain.key !== HUB_CHAIN_KEY;
3877
3911
  }
@@ -13125,9 +13159,42 @@ var universalRouterAbi = [
13125
13159
  type: "function"
13126
13160
  }
13127
13161
  ];
13162
+
13163
+ // src/shared/utils/deepMerge.ts
13164
+ function deepMerge(target, source) {
13165
+ const result = { ...target };
13166
+ for (const key of Object.keys(source)) {
13167
+ const sourceVal = source[key];
13168
+ const targetVal = target[key];
13169
+ if (sourceVal !== void 0 && typeof sourceVal === "object" && sourceVal !== null && !Array.isArray(sourceVal) && typeof targetVal === "object" && targetVal !== null && !Array.isArray(targetVal)) {
13170
+ result[key] = deepMerge(
13171
+ targetVal,
13172
+ sourceVal
13173
+ );
13174
+ } else if (sourceVal !== void 0) {
13175
+ result[key] = sourceVal;
13176
+ }
13177
+ }
13178
+ return result;
13179
+ }
13180
+
13181
+ // src/shared/config/mergeSodaxConfig.ts
13182
+ function mergeSodaxConfig(base2, override) {
13183
+ const merged = deepMerge(base2, override);
13184
+ if (override.fee !== void 0) {
13185
+ merged.fee = override.fee;
13186
+ }
13187
+ if (override.bridge?.partnerFee !== void 0) {
13188
+ merged.bridge.partnerFee = override.bridge.partnerFee;
13189
+ }
13190
+ return merged;
13191
+ }
13192
+
13193
+ // src/shared/config/ConfigService.ts
13128
13194
  var ConfigService = class {
13129
13195
  sodax;
13130
13196
  api;
13197
+ userConfig;
13131
13198
  initialized = false;
13132
13199
  // data structures for quick lookup
13133
13200
  supportedHubAssetsSet;
@@ -13139,9 +13206,10 @@ var ConfigService = class {
13139
13206
  stakedATokenAddressesSet;
13140
13207
  chainToSupportedTokenAddressMap;
13141
13208
  hubAssetToXTokenMap;
13142
- constructor({ api, config }) {
13209
+ constructor({ api, config, userConfig }) {
13143
13210
  this.api = api;
13144
13211
  this.sodax = config;
13212
+ this.userConfig = userConfig;
13145
13213
  this.loadSodaxConfigDataStructures(config);
13146
13214
  }
13147
13215
  async initialize() {
@@ -13154,8 +13222,9 @@ var ConfigService = class {
13154
13222
  `Dynamic config version is less than the current version, resorting to the default one. Current version: ${CONFIG_VERSION}, response version: ${response.version}`
13155
13223
  );
13156
13224
  } else {
13157
- this.sodax = response.config;
13158
- this.loadSodaxConfigDataStructures(this.sodax);
13225
+ const next = this.userConfig ? mergeSodaxConfig(response.config, this.userConfig) : response.config;
13226
+ this.loadSodaxConfigDataStructures(next);
13227
+ this.sodax = next;
13159
13228
  this.initialized = true;
13160
13229
  }
13161
13230
  return { ok: true, value: void 0 };
@@ -13336,9 +13405,9 @@ var ConfigService = class {
13336
13405
  ])
13337
13406
  );
13338
13407
  this.loadSpokeChainConfigDataStructures(sodaxConfig2);
13339
- this.moneyMarketReserveAssetsSet = new Set(this.moneyMarket.supportedReserveAssets);
13408
+ this.moneyMarketReserveAssetsSet = new Set(sodaxConfig2.moneyMarket.supportedReserveAssets);
13340
13409
  this.stakedATokenAddressesSet = new Set(
13341
- Object.keys(this.dex.statATokenAddresses).map((address) => address.toLowerCase())
13410
+ Object.keys(sodaxConfig2.dex.statATokenAddresses).map((address) => address.toLowerCase())
13342
13411
  );
13343
13412
  }
13344
13413
  loadSpokeChainDataStructures(sodaxConfig2) {
@@ -13492,24 +13561,6 @@ function getEvmViemChain(key) {
13492
13561
  }
13493
13562
  }
13494
13563
  }
13495
-
13496
- // src/shared/utils/deepMerge.ts
13497
- function deepMerge(target, source) {
13498
- const result = { ...target };
13499
- for (const key of Object.keys(source)) {
13500
- const sourceVal = source[key];
13501
- const targetVal = target[key];
13502
- if (sourceVal !== void 0 && typeof sourceVal === "object" && sourceVal !== null && !Array.isArray(sourceVal) && typeof targetVal === "object" && targetVal !== null && !Array.isArray(targetVal)) {
13503
- result[key] = deepMerge(
13504
- targetVal,
13505
- sourceVal
13506
- );
13507
- } else if (sourceVal !== void 0) {
13508
- result[key] = sourceVal;
13509
- }
13510
- }
13511
- return result;
13512
- }
13513
13564
  var EvmVaultTokenService = class {
13514
13565
  constructor() {
13515
13566
  }
@@ -21351,6 +21402,66 @@ var EvmSolverService = class _EvmSolverService {
21351
21402
  };
21352
21403
  return [encodePacked(["uint8", "bytes"], [intentData.type, intentData.data]), feeAmount];
21353
21404
  }
21405
+ /**
21406
+ * Recovers the partner fee amount embedded in an intent's `data` field.
21407
+ *
21408
+ * Exact inverse of {@link createIntentFeeData}: `'0x'` means no fee (`0n`); otherwise the first
21409
+ * byte is the {@link IntentDataType} tag (from the `encodePacked(['uint8','bytes'], …)` envelope)
21410
+ * and the remainder is the ABI-encoded `(uint256 fee, address receiver)` struct.
21411
+ *
21412
+ * @param data - The intent's `data` field (`'0x'` when no fee was configured).
21413
+ * @returns The fee amount in the input token's smallest unit (`0n` when no fee data is present, or
21414
+ * when the leading type byte is not {@link IntentDataType.FEE} — in which case it logs and degrades to `0n`).
21415
+ */
21416
+ static decodeIntentFeeAmount(data) {
21417
+ if (data === "0x" || data.length <= 2) {
21418
+ return 0n;
21419
+ }
21420
+ const typeByte = Number.parseInt(data.slice(2, 4), 16);
21421
+ if (typeByte !== 1 /* FEE */) {
21422
+ console.error(`[decodeIntentFeeAmount] Unknown IntentData type byte: ${typeByte}. Gracefully returning 0n.`);
21423
+ return 0n;
21424
+ }
21425
+ const [feeAmount] = decodeAbiParameters(
21426
+ [
21427
+ { name: "fee", type: "uint256" },
21428
+ { name: "receiver", type: "address" }
21429
+ ],
21430
+ `0x${data.slice(4)}`
21431
+ );
21432
+ return feeAmount;
21433
+ }
21434
+ /**
21435
+ * Re-derives the byte-identical relay payload that `createIntent` originally produced, from a
21436
+ * fully-populated `Intent` alone.
21437
+ *
21438
+ * Mirrors the two payload shapes built at intent-creation time:
21439
+ * - Hub (Sonic) source — raw `createIntent(intent)` calldata (no approval, no multicall), matching
21440
+ * {@link SonicSpokeService.createSwapIntent}.
21441
+ * - Spoke source — the `[approve(intentsContract, gross), createIntent(intent)]` multicall, matching
21442
+ * {@link constructCreateIntentData}. The gross approval amount is recovered as
21443
+ * `intent.inputAmount + feeAmount`, where `feeAmount` comes from {@link decodeIntentFeeAmount}.
21444
+ *
21445
+ * Byte-identity holds because this reuses the exact encode primitives (`encodeCreateIntent`,
21446
+ * `Erc20Service.encodeApprove`, `encodeContractCalls`) that produced the original — the only
21447
+ * originally-random input, `intentId`, is already carried on the `Intent`.
21448
+ *
21449
+ * @param intent - The fully-populated intent (e.g. from `createIntent` or `getIntent`).
21450
+ * @param intentsContract - The hub-chain intents contract address (`config.solver.intentsContract`).
21451
+ * @param isHubSource - `true` when the intent's source chain is the hub (Sonic).
21452
+ * @returns The byte-identical relay payload `Hex`.
21453
+ */
21454
+ static reconstructCreateIntentData(intent, intentsContract, isHubSource) {
21455
+ const createIntentCall = _EvmSolverService.encodeCreateIntent(intent, intentsContract);
21456
+ if (isHubSource) {
21457
+ return createIntentCall.data;
21458
+ }
21459
+ const grossInputAmount = intent.inputAmount + _EvmSolverService.decodeIntentFeeAmount(intent.data);
21460
+ return encodeContractCalls([
21461
+ Erc20Service.encodeApprove(intent.inputToken, intentsContract, grossInputAmount),
21462
+ createIntentCall
21463
+ ]);
21464
+ }
21354
21465
  /**
21355
21466
  * Reads an `Intent` struct from a hub-chain transaction receipt.
21356
21467
  *
@@ -26035,6 +26146,34 @@ var SwapService = class {
26035
26146
  return { ok: false, error };
26036
26147
  }
26037
26148
  }
26149
+ /**
26150
+ * Re-derives the byte-identical relay extra data (`{ address, payload }`) for a swap intent from a
26151
+ * fully-populated `Intent` alone — no on-chain call, no original `createIntent` return value needed.
26152
+ *
26153
+ * The `payload` matches exactly what `createIntent` relayed when the intent was first created:
26154
+ * - Sonic-hub source — raw `createIntent(intent)` calldata.
26155
+ * - Any spoke source — the `[approve, createIntent]` multicall (uniform across all spokes).
26156
+ *
26157
+ * Byte-identity is possible because the only originally-random field, `intentId`, is already
26158
+ * carried on the `Intent`; everything else in the payload is a pure function of the intent and
26159
+ * the configured intents contract. Use this to rebuild relay submission data for a manual relay
26160
+ * step when the runtime `relayData` from `createIntent` is no longer available.
26161
+ *
26162
+ * @param intent - A fully-populated intent (e.g. from `getIntent(txHash)` or the `intent` field
26163
+ * returned by `createIntent`).
26164
+ * @returns A `Result` containing `RelayExtraData`: `{ address: Hex; payload: Hex }`.
26165
+ */
26166
+ reconstructRelayData(intent) {
26167
+ try {
26168
+ invariant(this.config.isValidIntentRelayChainId(intent.srcChain), `Invalid intent.srcChain: ${intent.srcChain}`);
26169
+ invariant(this.config.isValidIntentRelayChainId(intent.dstChain), `Invalid intent.dstChain: ${intent.dstChain}`);
26170
+ const isHubSource = intent.srcChain === getIntentRelayChainId(HUB_CHAIN_KEY);
26171
+ const payload = EvmSolverService.reconstructCreateIntentData(intent, this.solver.intentsContract, isHubSource);
26172
+ return { ok: true, value: { address: intent.creator, payload } };
26173
+ } catch (error) {
26174
+ return { ok: false, error };
26175
+ }
26176
+ }
26038
26177
  /**
26039
26178
  * Fetches a previously created `Intent` from the hub chain by its transaction hash.
26040
26179
  *
@@ -31325,7 +31464,7 @@ var AssetService = class {
31325
31464
  calls.push(Erc4626Service.encodeRedeem(dexToken, amount, userAddress, userAddress));
31326
31465
  }
31327
31466
  calls.push(EvmVaultTokenService.encodeWithdraw(assetConfig.vault, assetConfig.hubAsset, vaultAmount));
31328
- const translatedAmount = EvmVaultTokenService.translateIncomingDecimals(assetConfig.decimals, vaultAmount);
31467
+ const translatedAmount = EvmVaultTokenService.translateOutgoingDecimals(assetConfig.decimals, vaultAmount);
31329
31468
  if (dstChainKey === this.hubProvider.chainConfig.chain.key) {
31330
31469
  if (assetConfig.hubAsset.toLowerCase() === this.config.spokeChainConfig[dstChainKey].addresses.wrappedSonic.toLowerCase()) {
31331
31470
  const withdrawToCall = {
@@ -36624,9 +36763,9 @@ var Sodax = class {
36624
36763
  spoke;
36625
36764
  // spoke service enabling spoke chain operations
36626
36765
  constructor(config) {
36627
- this.instanceConfig = config ? deepMerge(sodaxConfig, config) : sodaxConfig;
36766
+ this.instanceConfig = config ? mergeSodaxConfig(sodaxConfig, config) : sodaxConfig;
36628
36767
  this.backendApi = new BackendApiService(this.instanceConfig.api);
36629
- this.config = new ConfigService({ api: this.backendApi, config: this.instanceConfig });
36768
+ this.config = new ConfigService({ api: this.backendApi, config: this.instanceConfig, userConfig: config });
36630
36769
  this.hubProvider = new EvmHubProvider({ config: this.config });
36631
36770
  this.spoke = new SpokeService({ config: this.config, hubProvider: this.hubProvider });
36632
36771
  this.swaps = new SwapService({
@@ -36701,4 +36840,4 @@ var isPartnerError = isCodeMember(PARTNER_CODES);
36701
36840
  (*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
36702
36841
  */
36703
36842
 
36704
- export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, AssetService, BITCOIN_CHAIN_KEYS, BITCOIN_CHAIN_KEYS_SET, BTC_WALLET_ADDRESS_TYPES, BackendApiService, BalnSwapService, BigIntToHex, BigNumberZeroDecimal, BitcoinSpokeService, BnUSDMigrationService, BridgeService, CHAIN_KEYS, CONFIG_VERSION, CREATE_INTENT_CODES, ChainKeys, ChainTypeArr, ClService, ConfigService, CustomSorobanServer, CustomStellarAccount, 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, 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, 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, IntentDataType, IntentFilledEventAbi, IntentRelayChainIdToChainKey, IntentsAbi, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, LockupMultiplier, LockupPeriod, MAX_UINT256, MigrationService, MintPositionEventAbi, MoneyMarketDataService, MoneyMarketService, NEAR_CHAIN_KEYS, NEAR_CHAIN_KEYS_SET, NEAR_DEFAULT_GAS, NearSpokeService, PartnerFeeClaimService, PartnerService, Permit2Service, ProtocolIntentsAbi, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, 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, STACKS_CHAIN_KEYS, STACKS_CHAIN_KEYS_SET, STELLAR_CHAIN_KEYS, STELLAR_CHAIN_KEYS_SET, SUI_CHAIN_KEYS, SUI_CHAIN_KEYS_SET, SodaTokens, Sodax, SodaxError, SolanaSpokeService, SolverApiService, SolverIntentErrorCode, SolverIntentStatusCode, SonicSpokeService, SpokeService, StacksSpokeService, StakingLogic, StakingService, StatATokenAddresses, StellarSpokeService, SuiSpokeService, SupportedMigrationTokens, SwapService, 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, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, concentratedLiquidityConfig, connectionAbi, 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, getSupportedSolverTokens, getTransactionPackets, getbnUSDToken, hexToBigInt, hexToSolanaAddress, hubConfig, hyper, hyperevmSupportedTokens, iconSupportedTokens, injectiveSupportedTokens, intentCreationFailed, isBalnMigrateParams, isBitcoinChainKey, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexError, isEvmChainKey, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKey, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isHubChainKey, isHubChainKeyType, isIconAddress, isIconChainKey, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKey, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, 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, isStacksChainKey, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKey, isStellarChainKeyType, isStellarWalletProviderType, isSubmitSwapTxResponse, isSubmitSwapTxStatusResponse, isSuiChainKey, isSuiChainKeyType, isSupportedBitcoinAddressType, isSwapCreateIntentError, isSwapError, isSwapSupportedToken, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, isValidWalletProviderForChainKey, kaiaSupportedTokens, lightlinkSupportedTokens, lookupFailed, mapRelayFailure, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, moneyMarketConfig, moneyMarketReserveAssets, moneyMarketSupportedTokens, nativeToUSD, nearSupportedTokens, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizePsbtToBase64, normalizedToUsd, optimismSupportedTokens, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, polygonSupportedTokens, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, redbellySupportedTokens, relayConfig, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, reverseEncodeAddress, serializeAddressData, sleep, sodaxConfig, sodaxInvariant, solanaSupportedTokens, solverConfig, sonicSupportedTokens, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, spokeChainKeysSet, stacksSupportedTokens, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, stellarSupportedTokens, submitTransaction, suiSupportedTokens, supportedSpokeChains, supportedTokensByChain, swapExactInSingleParamsAbi, swapInvariant, swapSupportedTokens, swapsConfig, uiPoolDataAbi, universalRouterAbi, unknownFailed, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
36843
+ export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, AssetService, BITCOIN_CHAIN_KEYS, BITCOIN_CHAIN_KEYS_SET, BTC_WALLET_ADDRESS_TYPES, BackendApiService, BalnSwapService, BigIntToHex, BigNumberZeroDecimal, BitcoinSpokeService, BnUSDMigrationService, BridgeService, CHAIN_KEYS, CONFIG_VERSION, CREATE_INTENT_CODES, ChainKeys, ChainTypeArr, ClService, ConfigService, CustomSorobanServer, CustomStellarAccount, 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, 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, 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, IntentDataType, IntentFilledEventAbi, IntentRelayChainIdToChainKey, IntentsAbi, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, LockupMultiplier, LockupPeriod, MAX_UINT256, MigrationService, MintPositionEventAbi, MoneyMarketDataService, MoneyMarketService, NEAR_CHAIN_KEYS, NEAR_CHAIN_KEYS_SET, NEAR_DEFAULT_GAS, NearSpokeService, PartnerFeeClaimService, PartnerService, Permit2Service, ProtocolIntentsAbi, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, 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, STACKS_CHAIN_KEYS, STACKS_CHAIN_KEYS_SET, STELLAR_CHAIN_KEYS, STELLAR_CHAIN_KEYS_SET, SUI_CHAIN_KEYS, SUI_CHAIN_KEYS_SET, SodaTokens, Sodax, SodaxError, SolanaSpokeService, SolverApiService, SolverIntentErrorCode, SolverIntentStatusCode, SonicSpokeService, SpokeService, StacksSpokeService, StakingLogic, StakingService, StatATokenAddresses, StellarSpokeService, SuiSpokeService, SupportedMigrationTokens, SwapService, 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, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, concentratedLiquidityConfig, connectionAbi, 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, getSupportedSolverTokens, getTransactionPackets, getbnUSDToken, hexToBigInt, hexToSolanaAddress, hubConfig, hyper, hyperevmSupportedTokens, iconSupportedTokens, injectiveSupportedTokens, intentCreationFailed, isBalnMigrateParams, isBitcoinChainKey, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexError, isEvmChainKey, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKey, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isHubChainKey, isHubChainKeyType, isIconAddress, isIconChainKey, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKey, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, 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, isStacksChainKey, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKey, isStellarChainKeyType, isStellarWalletProviderType, isSubmitSwapTxResponse, isSubmitSwapTxStatusResponse, isSuiChainKey, isSuiChainKeyType, isSupportedBitcoinAddressType, isSwapCreateIntentError, isSwapError, isSwapSupportedToken, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, isValidWalletProviderForChainKey, kaiaSupportedTokens, lightlinkSupportedTokens, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, moneyMarketConfig, moneyMarketReserveAssets, moneyMarketSupportedTokens, nativeToUSD, nearSupportedTokens, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizePsbtToBase64, normalizedToUsd, optimismSupportedTokens, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, polygonSupportedTokens, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, redbellySupportedTokens, relayConfig, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, reverseEncodeAddress, serializeAddressData, sleep, sodaxConfig, sodaxInvariant, solanaSupportedTokens, solverConfig, sonicSupportedTokens, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, spokeChainKeysSet, stacksSupportedTokens, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, stellarSupportedTokens, submitTransaction, suiSupportedTokens, supportedSpokeChains, supportedTokensByChain, swapExactInSingleParamsAbi, swapInvariant, swapSupportedTokens, swapsConfig, uiPoolDataAbi, universalRouterAbi, unknownFailed, 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.0.0-rc.7",
7
+ "version": "2.0.0-rc.9",
8
8
  "license": "MIT",
9
9
  "description": "Sodax SDK",
10
10
  "keywords": [
@@ -65,8 +65,8 @@
65
65
  "near-api-js": "7.2.0",
66
66
  "rlp": "3.0.0",
67
67
  "viem": "2.29.2",
68
- "@sodax/libs": "2.0.0-rc.7",
69
- "@sodax/types": "2.0.0-rc.7"
68
+ "@sodax/libs": "2.0.0-rc.9",
69
+ "@sodax/types": "2.0.0-rc.9"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@arethetypeswrong/cli": "0.17.4",