@sodax/sdk 0.0.1-rc.36 → 0.0.1-rc.38

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.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  import { getAbiItem, defineChain, encodeAbiParameters, parseAbiParameters, fromHex, createPublicClient, http, toHex, erc20Abi as erc20Abi$1, encodeFunctionData, decodeAbiParameters, encodePacked, parseEventLogs, keccak256, isAddress } from 'viem';
2
- import { nibiru, polygon, bsc, optimism, base, arbitrum, avalanche, sonic } from 'viem/chains';
3
- import { SONIC_MAINNET_CHAIN_ID, SPOKE_CHAIN_IDS, ICON_MAINNET_CHAIN_ID, SUI_MAINNET_CHAIN_ID, STELLAR_MAINNET_CHAIN_ID, INJECTIVE_MAINNET_CHAIN_ID, HYPEREVM_MAINNET_CHAIN_ID, POLYGON_MAINNET_CHAIN_ID, BSC_MAINNET_CHAIN_ID, OPTIMISM_MAINNET_CHAIN_ID, BASE_MAINNET_CHAIN_ID, ARBITRUM_MAINNET_CHAIN_ID, NIBIRU_MAINNET_CHAIN_ID, AVALANCHE_MAINNET_CHAIN_ID, SOLANA_MAINNET_CHAIN_ID } from '@sodax/types';
2
+ import { lightlinkPhoenix, nibiru, polygon, bsc, optimism, base, arbitrum, avalanche, sonic } from 'viem/chains';
3
+ import { SONIC_MAINNET_CHAIN_ID, CHAIN_IDS, ICON_MAINNET_CHAIN_ID, SUI_MAINNET_CHAIN_ID, STELLAR_MAINNET_CHAIN_ID, INJECTIVE_MAINNET_CHAIN_ID, LIGHTLINK_MAINNET_CHAIN_ID, HYPEREVM_MAINNET_CHAIN_ID, POLYGON_MAINNET_CHAIN_ID, BSC_MAINNET_CHAIN_ID, OPTIMISM_MAINNET_CHAIN_ID, BASE_MAINNET_CHAIN_ID, ARBITRUM_MAINNET_CHAIN_ID, NIBIRU_MAINNET_CHAIN_ID, AVALANCHE_MAINNET_CHAIN_ID, SOLANA_MAINNET_CHAIN_ID } from '@sodax/types';
4
4
  export * from '@sodax/types';
5
5
  import { ChainGrpcWasmApi, TxGrpcApi, toBase64, fromBase64 } from '@injectivelabs/sdk-ts';
6
6
  import { getNetworkEndpoints, Network } from '@injectivelabs/networks';
7
- import * as IconSdkRaw from 'icon-sdk-js';
8
- import { SorobanRpc, Horizon, Contract, TransactionBuilder, BASE_FEE, nativeToScVal, TimeoutInfinite, rpc, scValToBigInt, Operation, Address, Account, FeeBumpTransaction } from '@stellar/stellar-sdk';
7
+ import { IconService, CallBuilder, Converter, CallTransactionBuilder } from 'icon-sdk-js';
8
+ import { SorobanRpc, Account, Horizon, Contract, TransactionBuilder, BASE_FEE, nativeToScVal, TimeoutInfinite, rpc, scValToBigInt, Operation, Address, Asset, FeeBumpTransaction } from '@stellar/stellar-sdk';
9
9
  import { bcs } from '@mysten/sui/bcs';
10
10
  import { SuiClient, getFullnodeUrl } from '@mysten/sui/client';
11
11
  import { Transaction } from '@mysten/sui/transactions';
@@ -6120,22 +6120,6 @@ var DEFAULT_BACKEND_API_HEADERS = {
6120
6120
  Accept: "application/json"
6121
6121
  };
6122
6122
  var VAULT_TOKEN_DECIMALS = 18;
6123
- var INTENT_RELAY_CHAIN_IDS = {
6124
- AVAX: 6n,
6125
- SUI: 21n,
6126
- SONIC: 146n,
6127
- STELLAR: 27n,
6128
- INJ: 19n,
6129
- SOL: 1n,
6130
- ICON: 1768124270n,
6131
- BASE: 30n,
6132
- BINANCE: 4n,
6133
- OPTIMISM: 24n,
6134
- POLYGON: 5n,
6135
- ARBITRUM: 23n,
6136
- NIBIRU: 7235938n,
6137
- HYPER: 26745n
6138
- };
6139
6123
  var EVM_CHAIN_IDS = [
6140
6124
  AVALANCHE_MAINNET_CHAIN_ID,
6141
6125
  ARBITRUM_MAINNET_CHAIN_ID,
@@ -6145,34 +6129,25 @@ var EVM_CHAIN_IDS = [
6145
6129
  OPTIMISM_MAINNET_CHAIN_ID,
6146
6130
  POLYGON_MAINNET_CHAIN_ID,
6147
6131
  NIBIRU_MAINNET_CHAIN_ID,
6148
- HYPEREVM_MAINNET_CHAIN_ID
6149
- ];
6150
- var EVM_SPOKE_CHAIN_IDS = [
6151
- AVALANCHE_MAINNET_CHAIN_ID,
6152
- ARBITRUM_MAINNET_CHAIN_ID,
6153
- BASE_MAINNET_CHAIN_ID,
6154
- BSC_MAINNET_CHAIN_ID,
6155
- OPTIMISM_MAINNET_CHAIN_ID,
6156
- POLYGON_MAINNET_CHAIN_ID,
6157
- NIBIRU_MAINNET_CHAIN_ID,
6158
- SONIC_MAINNET_CHAIN_ID,
6159
- HYPEREVM_MAINNET_CHAIN_ID
6132
+ HYPEREVM_MAINNET_CHAIN_ID,
6133
+ LIGHTLINK_MAINNET_CHAIN_ID
6160
6134
  ];
6161
6135
  var ChainIdToIntentRelayChainId = {
6162
- [AVALANCHE_MAINNET_CHAIN_ID]: INTENT_RELAY_CHAIN_IDS.AVAX,
6163
- [ARBITRUM_MAINNET_CHAIN_ID]: INTENT_RELAY_CHAIN_IDS.ARBITRUM,
6164
- [BASE_MAINNET_CHAIN_ID]: INTENT_RELAY_CHAIN_IDS.BASE,
6165
- [BSC_MAINNET_CHAIN_ID]: INTENT_RELAY_CHAIN_IDS.BINANCE,
6166
- [INJECTIVE_MAINNET_CHAIN_ID]: INTENT_RELAY_CHAIN_IDS.INJ,
6167
- [SONIC_MAINNET_CHAIN_ID]: INTENT_RELAY_CHAIN_IDS.SONIC,
6168
- [OPTIMISM_MAINNET_CHAIN_ID]: INTENT_RELAY_CHAIN_IDS.OPTIMISM,
6169
- [POLYGON_MAINNET_CHAIN_ID]: INTENT_RELAY_CHAIN_IDS.POLYGON,
6170
- [SOLANA_MAINNET_CHAIN_ID]: INTENT_RELAY_CHAIN_IDS.SOL,
6171
- [SUI_MAINNET_CHAIN_ID]: INTENT_RELAY_CHAIN_IDS.SUI,
6172
- [STELLAR_MAINNET_CHAIN_ID]: INTENT_RELAY_CHAIN_IDS.STELLAR,
6173
- [ICON_MAINNET_CHAIN_ID]: INTENT_RELAY_CHAIN_IDS.ICON,
6174
- [NIBIRU_MAINNET_CHAIN_ID]: INTENT_RELAY_CHAIN_IDS.NIBIRU,
6175
- [HYPEREVM_MAINNET_CHAIN_ID]: INTENT_RELAY_CHAIN_IDS.HYPER
6136
+ [AVALANCHE_MAINNET_CHAIN_ID]: 6n,
6137
+ [ARBITRUM_MAINNET_CHAIN_ID]: 23n,
6138
+ [BASE_MAINNET_CHAIN_ID]: 30n,
6139
+ [BSC_MAINNET_CHAIN_ID]: 4n,
6140
+ [INJECTIVE_MAINNET_CHAIN_ID]: 19n,
6141
+ [SONIC_MAINNET_CHAIN_ID]: 146n,
6142
+ [OPTIMISM_MAINNET_CHAIN_ID]: 24n,
6143
+ [POLYGON_MAINNET_CHAIN_ID]: 5n,
6144
+ [SOLANA_MAINNET_CHAIN_ID]: 1n,
6145
+ [SUI_MAINNET_CHAIN_ID]: 21n,
6146
+ [STELLAR_MAINNET_CHAIN_ID]: 27n,
6147
+ [ICON_MAINNET_CHAIN_ID]: 1768124270n,
6148
+ [NIBIRU_MAINNET_CHAIN_ID]: 7235938n,
6149
+ [HYPEREVM_MAINNET_CHAIN_ID]: 26745n,
6150
+ [LIGHTLINK_MAINNET_CHAIN_ID]: 27756n
6176
6151
  };
6177
6152
  var getIntentRelayChainId = (chainId) => ChainIdToIntentRelayChainId[chainId];
6178
6153
  var hyper = /* @__PURE__ */ defineChain({
@@ -6219,6 +6194,8 @@ function getEvmViemChain(id) {
6219
6194
  return nibiru;
6220
6195
  case HYPEREVM_MAINNET_CHAIN_ID:
6221
6196
  return hyper;
6197
+ case LIGHTLINK_MAINNET_CHAIN_ID:
6198
+ return lightlinkPhoenix;
6222
6199
  default:
6223
6200
  throw new Error(`Unsupported EVM chain ID: ${id}`);
6224
6201
  }
@@ -6934,6 +6911,119 @@ var spokeChainConfig = {
6934
6911
  }
6935
6912
  }
6936
6913
  },
6914
+ [LIGHTLINK_MAINNET_CHAIN_ID]: {
6915
+ chain: {
6916
+ name: "lightlink phoenix",
6917
+ id: LIGHTLINK_MAINNET_CHAIN_ID,
6918
+ type: "EVM"
6919
+ },
6920
+ addresses: {
6921
+ assetManager: "0x4A1C82744cDDeE675A255fB289Cb0917A482e7C7",
6922
+ connection: "0x6D2126DB97dd88AfA85127253807D04A066b6746"
6923
+ },
6924
+ nativeToken: "0x0000000000000000000000000000000000000000",
6925
+ bnUSD: "0x36134A03dcD03Bbe858B8F7ED28a71AAC608F9E7",
6926
+ supportedTokens: {
6927
+ ETH: {
6928
+ symbol: "ETH",
6929
+ name: "ETH",
6930
+ decimals: 18,
6931
+ address: "0x0000000000000000000000000000000000000000",
6932
+ xChainId: LIGHTLINK_MAINNET_CHAIN_ID
6933
+ },
6934
+ bnUSD: {
6935
+ symbol: "bnUSD",
6936
+ name: "bnUSD",
6937
+ decimals: 18,
6938
+ address: "0x36134A03dcD03Bbe858B8F7ED28a71AAC608F9E7",
6939
+ xChainId: LIGHTLINK_MAINNET_CHAIN_ID
6940
+ },
6941
+ SODA: {
6942
+ symbol: "SODA",
6943
+ name: "SODAX",
6944
+ decimals: 18,
6945
+ address: "0x6BC8C37cba91F76E68C9e6d689A9C21E4d32079B",
6946
+ xChainId: LIGHTLINK_MAINNET_CHAIN_ID
6947
+ },
6948
+ USDC: {
6949
+ symbol: "USDC",
6950
+ name: "USD Coin",
6951
+ decimals: 6,
6952
+ address: "0xbCF8C1B03bBDDA88D579330BDF236B58F8bb2cFd",
6953
+ xChainId: LIGHTLINK_MAINNET_CHAIN_ID
6954
+ },
6955
+ "BTC.LL": {
6956
+ symbol: "BTC.LL",
6957
+ name: "Bitcoin LightLINK",
6958
+ decimals: 18,
6959
+ address: "0x5E921D8B7709b409132628258A53449D1fD82341",
6960
+ xChainId: LIGHTLINK_MAINNET_CHAIN_ID
6961
+ },
6962
+ "AVAX.LL": {
6963
+ symbol: "AVAX.LL",
6964
+ name: "Avalanche LightLINK",
6965
+ decimals: 18,
6966
+ address: "0x373d9c5390535e9e30185E52826d45b76df09aBb",
6967
+ xChainId: LIGHTLINK_MAINNET_CHAIN_ID
6968
+ },
6969
+ "BNB.LL": {
6970
+ symbol: "BNB.LL",
6971
+ name: "BNB LightLINK",
6972
+ decimals: 18,
6973
+ address: "0xe80c2B7674dCdF47b199697E2c61730231b8da89",
6974
+ xChainId: LIGHTLINK_MAINNET_CHAIN_ID
6975
+ },
6976
+ "SOL.LL": {
6977
+ symbol: "SOL.LL",
6978
+ name: "Solana LightLINK",
6979
+ decimals: 18,
6980
+ address: "0xba9af7029Ae5c1054Fc367d5D6a47Dc3D5c0D6bA",
6981
+ xChainId: LIGHTLINK_MAINNET_CHAIN_ID
6982
+ },
6983
+ "XLM.LL": {
6984
+ symbol: "XLM.LL",
6985
+ name: "Stellar LightLINK",
6986
+ decimals: 18,
6987
+ address: "0x03beDD719b6d8de11f5B2671b2f30085a626F8Da",
6988
+ xChainId: LIGHTLINK_MAINNET_CHAIN_ID
6989
+ },
6990
+ "INJ.LL": {
6991
+ symbol: "INJ.LL",
6992
+ name: "Injective LightLINK",
6993
+ decimals: 18,
6994
+ address: "0x8a4C8B1A899Fa9D9246a112E8D43EC0C97b77B8C",
6995
+ xChainId: LIGHTLINK_MAINNET_CHAIN_ID
6996
+ },
6997
+ "SUI.LL": {
6998
+ symbol: "SUI.LL",
6999
+ name: "Sui LightLINK",
7000
+ decimals: 18,
7001
+ address: "0x59e68e2F5147F74F27FD173397a7419C1e5d9999",
7002
+ xChainId: LIGHTLINK_MAINNET_CHAIN_ID
7003
+ },
7004
+ "S.LL": {
7005
+ symbol: "S.LL",
7006
+ name: "Sonic LightLINK",
7007
+ decimals: 18,
7008
+ address: "0xb3A47798CB6585Ea0d31a7986f2a04b25C60247f",
7009
+ xChainId: LIGHTLINK_MAINNET_CHAIN_ID
7010
+ },
7011
+ "POL.LL": {
7012
+ symbol: "POL.LL",
7013
+ name: "Polygon LightLINK",
7014
+ decimals: 18,
7015
+ address: "0xE963bfb4757fC8Ae66BC68E11e636f8fbafAfCb4",
7016
+ xChainId: LIGHTLINK_MAINNET_CHAIN_ID
7017
+ },
7018
+ "HYPE.LL": {
7019
+ symbol: "HYPE.LL",
7020
+ name: "HyperEVM LightLINK",
7021
+ decimals: 18,
7022
+ address: "0x127b64fb645279F8aca786c507b94dde81F02d16",
7023
+ xChainId: LIGHTLINK_MAINNET_CHAIN_ID
7024
+ }
7025
+ }
7026
+ },
6937
7027
  [INJECTIVE_MAINNET_CHAIN_ID]: {
6938
7028
  addresses: {
6939
7029
  assetManager: "inj1dg6tm62uup53wn2kn97caeqfwt0sukx3qjk8rw",
@@ -6995,6 +7085,23 @@ var spokeChainConfig = {
6995
7085
  rateLimit: "CB6G3ULISTTBPXUN3BI6ADHQGWJEN7BPQINHL45TCB6TDFM5QWU24HAY",
6996
7086
  testToken: ""
6997
7087
  },
7088
+ trustlineConfigs: [
7089
+ {
7090
+ assetCode: "USDC",
7091
+ contractId: "CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75",
7092
+ assetIssuer: "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"
7093
+ },
7094
+ {
7095
+ assetCode: "bnUSD",
7096
+ contractId: "CD6YBFFWMU2UJHX2NGRJ7RN76IJVTCC7MRA46DUBXNB7E6W7H7JRJ2CX",
7097
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
7098
+ },
7099
+ {
7100
+ assetCode: "SODA",
7101
+ contractId: "CAH5LKJC2ZB4RVUVEVL2QWJWNJLHQE2UF767ILLQ5EQ4O3OURR2XIUGM",
7102
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
7103
+ }
7104
+ ],
6998
7105
  supportedTokens: {
6999
7106
  bnUSD: {
7000
7107
  symbol: "bnUSD",
@@ -7210,7 +7317,8 @@ var hubVaults = {
7210
7317
  address: "0x62ecc3eeb80a162c57624b3ff80313fe69f5203e",
7211
7318
  reserves: [
7212
7319
  // hub asset addresses contained in the vault
7213
- "0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38"
7320
+ "0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38",
7321
+ "0xb592d2631ccf245119532e025d11188cfadb6777"
7214
7322
  ]
7215
7323
  },
7216
7324
  [SodaTokens.sodaNIBI.symbol]: {
@@ -7305,8 +7413,10 @@ var hubVaults = {
7305
7413
  // Arbitrum ETH hub asset
7306
7414
  "0x57fc2ac5701e463ae261adbd6c99fbeb48ce5293",
7307
7415
  // BSC ETH hub asset
7308
- "0x50c42deacd8fc9773493ed674b675be577f2634b"
7416
+ "0x50c42deacd8fc9773493ed674b675be577f2634b",
7309
7417
  // Sonic WETH hub asset
7418
+ "0x19920ef8fe1a9d51fdb0914abbb2f970c74dca68"
7419
+ // Lightlink ETH hub asset
7310
7420
  ]
7311
7421
  },
7312
7422
  [SodaTokens.sodaBTC.symbol]: {
@@ -7415,7 +7525,7 @@ var bnUSDLegacySpokeChainIds = [
7415
7525
  SUI_MAINNET_CHAIN_ID,
7416
7526
  STELLAR_MAINNET_CHAIN_ID
7417
7527
  ];
7418
- var newbnUSDSpokeChainIds = SPOKE_CHAIN_IDS.filter((chainId) => chainId !== ICON_MAINNET_CHAIN_ID);
7528
+ var newbnUSDSpokeChainIds = CHAIN_IDS.filter((chainId) => chainId !== ICON_MAINNET_CHAIN_ID);
7419
7529
  var bnUSDLegacyTokens = [
7420
7530
  spokeChainConfig[ICON_MAINNET_CHAIN_ID].supportedTokens.bnUSD,
7421
7531
  spokeChainConfig[SUI_MAINNET_CHAIN_ID].supportedTokens.legacybnUSD,
@@ -7449,14 +7559,14 @@ var getAllLegacybnUSDTokens = () => {
7449
7559
  var hubAssets = {
7450
7560
  [SONIC_MAINNET_CHAIN_ID]: {
7451
7561
  [spokeChainConfig[SONIC_MAINNET_CHAIN_ID].nativeToken]: {
7452
- asset: spokeChainConfig[SONIC_MAINNET_CHAIN_ID].supportedTokens.S.address,
7562
+ asset: spokeChainConfig[SONIC_MAINNET_CHAIN_ID].supportedTokens.wS.address,
7453
7563
  decimal: 18,
7454
7564
  symbol: "S",
7455
7565
  name: "Sonic",
7456
7566
  vault: hubVaults.sodaS.address
7457
7567
  },
7458
7568
  [spokeChainConfig[SONIC_MAINNET_CHAIN_ID].bnUSD]: {
7459
- asset: "0x289cDa1043b4Ce26BDCa3c12E534f56b24308A5B",
7569
+ asset: spokeChainConfig[SONIC_MAINNET_CHAIN_ID].bnUSD,
7460
7570
  decimal: 18,
7461
7571
  symbol: "bnUSD",
7462
7572
  name: "bnUSD",
@@ -7829,6 +7939,106 @@ var hubAssets = {
7829
7939
  vault: hubVaults.sodaSODA.address
7830
7940
  }
7831
7941
  },
7942
+ [LIGHTLINK_MAINNET_CHAIN_ID]: {
7943
+ [spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].nativeToken]: {
7944
+ asset: "0x19920ef8fe1a9d51fdb0914abbb2f970c74dca68",
7945
+ decimal: 18,
7946
+ symbol: "ETH",
7947
+ name: "ETH",
7948
+ vault: hubVaults.sodaETH.address
7949
+ },
7950
+ [spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].bnUSD]: {
7951
+ asset: "0x14ab2ab7a76838b9205488efc3f700d0632ce8c7",
7952
+ decimal: 18,
7953
+ symbol: "bnUSD",
7954
+ name: "bnUSD",
7955
+ vault: hubVaults.bnUSD.address
7956
+ },
7957
+ [spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens.SODA.address]: {
7958
+ asset: "0xe4faab621fb6716e32057b7ea7356219936519ac",
7959
+ decimal: 18,
7960
+ symbol: "SODA",
7961
+ name: "SODAX",
7962
+ vault: hubVaults.sodaSODA.address
7963
+ },
7964
+ [spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens.USDC.address]: {
7965
+ asset: "0xe5159e2a89aeec2fc63d6c25adda3541670af101",
7966
+ decimal: 6,
7967
+ symbol: "USDC",
7968
+ name: "USD Coin",
7969
+ vault: hubVaults.sodaUSDC.address
7970
+ },
7971
+ [spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["BTC.LL"].address]: {
7972
+ asset: "0x54582cdb0c145398b532e34f0851ffc1bbc88b4e",
7973
+ decimal: 18,
7974
+ symbol: "BTC.LL",
7975
+ name: "Bitcoin LightLINK",
7976
+ vault: hubVaults.sodaBTC.address
7977
+ },
7978
+ [spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["AVAX.LL"].address]: {
7979
+ asset: "0x415ff3ea8c905ef65cd82665c5534d0e4ff9221a",
7980
+ decimal: 18,
7981
+ symbol: "AVAX.LL",
7982
+ name: "Avalanche LightLINK",
7983
+ vault: hubVaults.sodaAVAX.address
7984
+ },
7985
+ [spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["BNB.LL"].address]: {
7986
+ asset: "0xd32e524da9d64db4c37a50f1ee197b591e97dc05",
7987
+ decimal: 18,
7988
+ symbol: "BNB.LL",
7989
+ name: "BNB LightLINK",
7990
+ vault: hubVaults.sodaBNB.address
7991
+ },
7992
+ [spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["SOL.LL"].address]: {
7993
+ asset: "0xd70c16f1e2c4207dc4c44bc69c8a1b82b50cf9e2",
7994
+ decimal: 18,
7995
+ symbol: "SOL.LL",
7996
+ name: "Solana LightLINK",
7997
+ vault: hubVaults.sodaSOL.address
7998
+ },
7999
+ [spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["XLM.LL"].address]: {
8000
+ asset: "0x18008b18964bc2c90521a7596ff9988743c97fd4",
8001
+ decimal: 18,
8002
+ symbol: "XLM.LL",
8003
+ name: "Stellar LightLINK",
8004
+ vault: hubVaults.sodaXLM.address
8005
+ },
8006
+ [spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["INJ.LL"].address]: {
8007
+ asset: "0xb036daab0c772b080babb84b8695c3ca858925b6",
8008
+ decimal: 18,
8009
+ symbol: "INJ.LL",
8010
+ name: "Injective LightLINK",
8011
+ vault: hubVaults.sodaINJ.address
8012
+ },
8013
+ [spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["SUI.LL"].address]: {
8014
+ asset: "0x425852cca84e5f44d7b8ebb964b21bde585b4571",
8015
+ decimal: 18,
8016
+ symbol: "SUI.LL",
8017
+ name: "Sui LightLINK",
8018
+ vault: hubVaults.sodaSUI.address
8019
+ },
8020
+ [spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["S.LL"].address]: {
8021
+ asset: "0xb592d2631ccf245119532e025d11188cfadb6777",
8022
+ decimal: 18,
8023
+ symbol: "S.LL",
8024
+ name: "Sonic LightLINK",
8025
+ vault: hubVaults.sodaS.address
8026
+ },
8027
+ [spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["POL.LL"].address]: {
8028
+ asset: "0x15ba35f87f259b9b50d53a2fec271bb10020b090",
8029
+ decimal: 18,
8030
+ symbol: "POL.LL",
8031
+ name: "Polygon LightLINK",
8032
+ vault: hubVaults.sodaPOL.address
8033
+ },
8034
+ [spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["HYPE.LL"].address]: {
8035
+ asset: "0xea7e97b4597f724844426c32248ba80bd29c75f8",
8036
+ decimal: 18,
8037
+ symbol: "HYPE.LL",
8038
+ name: "HyperEVM LightLINK",
8039
+ vault: hubVaults.sodaHYPE.address
8040
+ }
8041
+ },
7832
8042
  [INJECTIVE_MAINNET_CHAIN_ID]: {
7833
8043
  [spokeChainConfig[INJECTIVE_MAINNET_CHAIN_ID].supportedTokens.INJ.address]: {
7834
8044
  asset: "0xd375590b4955f6ea5623f799153f9b787a3bd319",
@@ -8025,7 +8235,7 @@ var hubAssets = {
8025
8235
  decimal: 18,
8026
8236
  symbol: "wICX",
8027
8237
  name: "ICON",
8028
- vault: "0x0000000000000000000000000000000000000000"
8238
+ vault: "0x"
8029
8239
  },
8030
8240
  [spokeChainConfig[ICON_MAINNET_CHAIN_ID].bnUSD]: {
8031
8241
  asset: "0x654dddf32a9a2ac53f5fb54bf1e93f66791f8047",
@@ -8106,6 +8316,7 @@ var solverSupportedTokens = {
8106
8316
  spokeChainConfig[BSC_MAINNET_CHAIN_ID].supportedTokens.USDC
8107
8317
  ],
8108
8318
  [HYPEREVM_MAINNET_CHAIN_ID]: [],
8319
+ [LIGHTLINK_MAINNET_CHAIN_ID]: [],
8109
8320
  [SOLANA_MAINNET_CHAIN_ID]: [
8110
8321
  spokeChainConfig[SOLANA_MAINNET_CHAIN_ID].supportedTokens.SOL,
8111
8322
  spokeChainConfig[SOLANA_MAINNET_CHAIN_ID].supportedTokens.bnUSD,
@@ -8215,6 +8426,21 @@ var moneyMarketSupportedTokens = {
8215
8426
  spokeChainConfig[HYPEREVM_MAINNET_CHAIN_ID].supportedTokens.bnUSD,
8216
8427
  spokeChainConfig[HYPEREVM_MAINNET_CHAIN_ID].supportedTokens.SODA
8217
8428
  ],
8429
+ [LIGHTLINK_MAINNET_CHAIN_ID]: [
8430
+ spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens.ETH,
8431
+ spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens.bnUSD,
8432
+ spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens.USDC,
8433
+ spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["AVAX.LL"],
8434
+ spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["BNB.LL"],
8435
+ spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["SOL.LL"],
8436
+ spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["XLM.LL"],
8437
+ spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["INJ.LL"],
8438
+ spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["SUI.LL"],
8439
+ spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["S.LL"],
8440
+ spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["POL.LL"],
8441
+ spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens["HYPE.LL"],
8442
+ spokeChainConfig[LIGHTLINK_MAINNET_CHAIN_ID].supportedTokens.SODA
8443
+ ],
8218
8444
  [SOLANA_MAINNET_CHAIN_ID]: [
8219
8445
  spokeChainConfig[SOLANA_MAINNET_CHAIN_ID].supportedTokens.SOL,
8220
8446
  spokeChainConfig[SOLANA_MAINNET_CHAIN_ID].supportedTokens.bnUSD,
@@ -8291,7 +8517,7 @@ var supportedHubAssets = new Set(
8291
8517
  var supportedSodaAssets = new Set(
8292
8518
  Object.values(hubAssets).flatMap((assets) => Object.values(assets).map((info) => info.vault.toLowerCase()))
8293
8519
  );
8294
- var spokeChainIdsSet = new Set(SPOKE_CHAIN_IDS);
8520
+ var spokeChainIdsSet = new Set(CHAIN_IDS);
8295
8521
  var getOriginalAssetInfoFromVault = (chainId, vault) => {
8296
8522
  const assets = hubAssets[chainId];
8297
8523
  if (!assets) {
@@ -8314,7 +8540,7 @@ var isValidHubAsset = (hubAsset) => supportedHubAssets.has(hubAsset.toLowerCase(
8314
8540
  var isValidVault = (vault) => supportedSodaAssets.has(vault.toLowerCase());
8315
8541
  var isValidChainHubAsset = (chainId, hubAsset) => chainIdToHubAssetsMap.get(chainId)?.has(hubAsset.toLowerCase()) ?? false;
8316
8542
  var isValidSpokeChainId = (chainId) => spokeChainIdsSet.has(chainId);
8317
- var isValidIntentRelayChainId = (chainId) => Object.values(INTENT_RELAY_CHAIN_IDS).some((id) => id === chainId);
8543
+ var isValidIntentRelayChainId = (chainId) => Object.values(ChainIdToIntentRelayChainId).some((id) => id === chainId);
8318
8544
  var supportedHubChains = Object.keys(hubChainConfig);
8319
8545
  var supportedSpokeChains = Object.keys(spokeChainConfig);
8320
8546
  var intentRelayChainIdToSpokeChainIdMap = new Map(
@@ -8472,7 +8698,6 @@ var InjectiveSpokeProvider = class {
8472
8698
  return num.toString();
8473
8699
  }
8474
8700
  };
8475
- var IconSdk = "default" in IconSdkRaw.default ? IconSdkRaw.default : IconSdkRaw;
8476
8701
  var IconSpokeProvider = class {
8477
8702
  walletProvider;
8478
8703
  chainConfig;
@@ -8481,7 +8706,7 @@ var IconSpokeProvider = class {
8481
8706
  constructor(walletProvider, chainConfig, rpcUrl = "https://ctz.solidwallet.io/api/v3", debugRpcUrl = "https://ctz.solidwallet.io/api/v3d") {
8482
8707
  this.walletProvider = walletProvider;
8483
8708
  this.chainConfig = chainConfig;
8484
- this.iconService = new IconSdk.IconService(new IconSdk.IconService.HttpProvider(rpcUrl));
8709
+ this.iconService = new IconService(new IconService.HttpProvider(rpcUrl));
8485
8710
  this.debugRpcUrl = debugRpcUrl;
8486
8711
  }
8487
8712
  };
@@ -8551,42 +8776,6 @@ var EvmSpokeProvider = class {
8551
8776
  }
8552
8777
  }
8553
8778
  };
8554
- var CustomStellarAccount = class {
8555
- accountId;
8556
- sequenceNumber;
8557
- startingSequenceNumber;
8558
- constructor({ account_id, sequence }) {
8559
- this.accountId = account_id;
8560
- this.sequenceNumber = BigInt(sequence);
8561
- this.startingSequenceNumber = BigInt(sequence);
8562
- }
8563
- getSequenceNumber() {
8564
- return this.sequenceNumber;
8565
- }
8566
- getStartingSequenceNumber() {
8567
- return this.startingSequenceNumber;
8568
- }
8569
- getAccountId() {
8570
- return this.accountId;
8571
- }
8572
- getAccountClone() {
8573
- return new Account(this.accountId, this.sequenceNumber.toString());
8574
- }
8575
- incrementSequenceNumber() {
8576
- this.sequenceNumber++;
8577
- }
8578
- decrementSequenceNumber() {
8579
- if (this.sequenceNumber > this.startingSequenceNumber) {
8580
- this.sequenceNumber--;
8581
- }
8582
- throw new Error(
8583
- `Sequence number cannot be decremented below the starting sequence number: ${this.startingSequenceNumber}`
8584
- );
8585
- }
8586
- resetSequenceNumber() {
8587
- this.sequenceNumber = this.startingSequenceNumber;
8588
- }
8589
- };
8590
8779
  var CustomSorobanServer = class extends SorobanRpc.Server {
8591
8780
  customHeaders;
8592
8781
  constructor(serverUrl, customHeaders) {
@@ -8679,6 +8868,44 @@ var CustomSorobanServer = class extends SorobanRpc.Server {
8679
8868
  return response.json().then((json) => json.result);
8680
8869
  }
8681
8870
  };
8871
+
8872
+ // src/entities/stellar/StellarSpokeProvider.ts
8873
+ var CustomStellarAccount = class {
8874
+ accountId;
8875
+ sequenceNumber;
8876
+ startingSequenceNumber;
8877
+ constructor({ account_id, sequence }) {
8878
+ this.accountId = account_id;
8879
+ this.sequenceNumber = BigInt(sequence);
8880
+ this.startingSequenceNumber = BigInt(sequence);
8881
+ }
8882
+ getSequenceNumber() {
8883
+ return this.sequenceNumber;
8884
+ }
8885
+ getStartingSequenceNumber() {
8886
+ return this.startingSequenceNumber;
8887
+ }
8888
+ getAccountId() {
8889
+ return this.accountId;
8890
+ }
8891
+ getAccountClone() {
8892
+ return new Account(this.accountId, this.sequenceNumber.toString());
8893
+ }
8894
+ incrementSequenceNumber() {
8895
+ this.sequenceNumber++;
8896
+ }
8897
+ decrementSequenceNumber() {
8898
+ if (this.sequenceNumber > this.startingSequenceNumber) {
8899
+ this.sequenceNumber--;
8900
+ }
8901
+ throw new Error(
8902
+ `Sequence number cannot be decremented below the starting sequence number: ${this.startingSequenceNumber}`
8903
+ );
8904
+ }
8905
+ resetSequenceNumber() {
8906
+ this.sequenceNumber = this.startingSequenceNumber;
8907
+ }
8908
+ };
8682
8909
  var StellarSpokeProvider = class {
8683
8910
  server;
8684
8911
  sorobanServer;
@@ -10074,8 +10301,6 @@ async function estimateStepCost(rawTx, debugRpcUrl) {
10074
10301
  }
10075
10302
 
10076
10303
  // src/services/spoke/IconSpokeService.ts
10077
- var IconSdk2 = "default" in IconSdkRaw.default ? IconSdkRaw.default : IconSdkRaw;
10078
- var { Converter, CallTransactionBuilder, CallBuilder } = IconSdk2;
10079
10304
  var IconSpokeService = class _IconSpokeService {
10080
10305
  constructor() {
10081
10306
  }
@@ -10510,6 +10735,83 @@ var SolanaSpokeService = class _SolanaSpokeService {
10510
10735
  var StellarSpokeService = class _StellarSpokeService {
10511
10736
  constructor() {
10512
10737
  }
10738
+ /**
10739
+ * Check if the user has sufficent trustline established for the token.
10740
+ * @param token - The token address to check the trustline for.
10741
+ * @param amount - The amount of tokens to check the trustline for.
10742
+ * @param spokeProvider - The Stellar spoke provider.
10743
+ * @returns True if the user has sufficent trustline established for the token, false otherwise.
10744
+ */
10745
+ static async hasSufficientTrustline(token, amount, spokeProvider) {
10746
+ if (token.toLowerCase() === spokeProvider.chainConfig.nativeToken.toLowerCase() || token.toLowerCase() === spokeChainConfig[STELLAR_MAINNET_CHAIN_ID].supportedTokens.legacybnUSD.address.toLowerCase()) {
10747
+ return true;
10748
+ }
10749
+ const trustlineConfig = spokeProvider.chainConfig.trustlineConfigs.find(
10750
+ (config) => config.contractId.toLowerCase() === token.toLowerCase()
10751
+ );
10752
+ if (!trustlineConfig) {
10753
+ throw new Error(`Trustline config not found for token: ${token}`);
10754
+ }
10755
+ const walletAddress = await spokeProvider.walletProvider.getWalletAddress();
10756
+ const { balances } = await spokeProvider.server.accounts().accountId(walletAddress).call();
10757
+ const tokenBalance = balances.find(
10758
+ (balance2) => "limit" in balance2 && "balance" in balance2 && "asset_code" in balance2 && trustlineConfig.assetCode.toLowerCase() === balance2.asset_code?.toLowerCase() && "asset_issuer" in balance2 && trustlineConfig.assetIssuer.toLowerCase() === balance2.asset_issuer?.toLowerCase()
10759
+ );
10760
+ if (!tokenBalance) {
10761
+ console.error(`No token balances found for token: ${token}`);
10762
+ return false;
10763
+ }
10764
+ const limit = parseToStroops(tokenBalance.limit);
10765
+ const balance = parseToStroops(tokenBalance.balance);
10766
+ const availableTrustAmount = limit - balance;
10767
+ return availableTrustAmount >= amount;
10768
+ }
10769
+ /**
10770
+ * Request a trustline for a given token and amount.
10771
+ * @param token - The token address to request the trustline for.
10772
+ * @param amount - The amount of tokens to request the trustline for.
10773
+ * @param spokeProvider - The spoke provider.
10774
+ * @param raw - Whether to return the raw transaction data.
10775
+ * @returns The transaction result.
10776
+ */
10777
+ static async requestTrustline(token, amount, spokeProvider, raw) {
10778
+ try {
10779
+ const asset = spokeProvider.chainConfig.trustlineConfigs.find(
10780
+ (t) => t.contractId.toLowerCase() === token.toLowerCase()
10781
+ );
10782
+ if (!asset) {
10783
+ throw new Error(`Asset ${token} not found. Cannot proceed with trustline.`);
10784
+ }
10785
+ const [network, walletAddress] = await Promise.all([
10786
+ spokeProvider.sorobanServer.getNetwork(),
10787
+ spokeProvider.walletProvider.getWalletAddress()
10788
+ ]);
10789
+ const accountResponse = await spokeProvider.server.loadAccount(walletAddress);
10790
+ const stellarAccount = new CustomStellarAccount(accountResponse);
10791
+ const transaction = new TransactionBuilder(stellarAccount.getAccountClone(), {
10792
+ fee: BASE_FEE,
10793
+ networkPassphrase: network.passphrase
10794
+ }).addOperation(
10795
+ Operation.changeTrust({
10796
+ asset: new Asset(asset?.assetCode, asset?.assetIssuer)
10797
+ })
10798
+ ).setTimeout(STELLAR_DEFAULT_TX_TIMEOUT_SECONDS).build();
10799
+ if (raw) {
10800
+ const transactionXdr = transaction.toXDR();
10801
+ return {
10802
+ from: walletAddress,
10803
+ to: spokeProvider.chainConfig.addresses.assetManager,
10804
+ value: amount,
10805
+ data: transactionXdr
10806
+ };
10807
+ }
10808
+ const hash = await spokeProvider.signAndSendTransaction(transaction);
10809
+ return `${hash}`;
10810
+ } catch (error) {
10811
+ console.error("Error during requestTrustline:", error);
10812
+ throw error;
10813
+ }
10814
+ }
10513
10815
  /**
10514
10816
  * Estimate the gas for a transaction.
10515
10817
  * @param rawTx - The raw transaction to estimate the gas for.
@@ -10727,11 +11029,8 @@ var SonicSpokeService = class _SonicSpokeService {
10727
11029
  return spokeProvider.walletProvider.sendTransaction(rawTx);
10728
11030
  }
10729
11031
  static async createSwapIntent(createIntentParams, creatorHubWalletAddress, solverConfig2, fee, spokeProvider, hubProvider, raw) {
10730
- let inputToken = getHubAssetInfo(createIntentParams.srcChain, createIntentParams.inputToken)?.asset;
10731
- if (createIntentParams.srcChain === hubProvider.chainConfig.chain.id && createIntentParams.inputToken.toLowerCase() === hubProvider.chainConfig.nativeToken.toLowerCase()) {
10732
- inputToken = hubProvider.chainConfig.nativeToken;
10733
- }
10734
- const outputToken = getHubAssetInfo(createIntentParams.dstChain, createIntentParams.outputToken)?.asset;
11032
+ const inputToken = createIntentParams.inputToken;
11033
+ const outputToken = createIntentParams.dstChain !== SONIC_MAINNET_CHAIN_ID ? getHubAssetInfo(createIntentParams.dstChain, createIntentParams.outputToken)?.asset : createIntentParams.outputToken;
10735
11034
  invariant12(
10736
11035
  inputToken,
10737
11036
  `hub asset not found for spoke chain token (intent.inputToken): ${createIntentParams.inputToken}`
@@ -11048,7 +11347,7 @@ function isJsonRpcPayloadResponse(value) {
11048
11347
  return typeof value === "object" && value !== null && "id" in value && "result" in value && typeof value.result === "string";
11049
11348
  }
11050
11349
  function isIntentRelayChainId(value) {
11051
- return typeof value === "bigint" && value >= 0n && Object.values(INTENT_RELAY_CHAIN_IDS).includes(value);
11350
+ return typeof value === "bigint" && value >= 0n && Object.values(ChainIdToIntentRelayChainId).includes(value);
11052
11351
  }
11053
11352
  function isPartnerFeeAmount(value) {
11054
11353
  return typeof value === "object" && value !== null && "address" in value && "amount" in value;
@@ -11668,11 +11967,8 @@ var EvmSolverService = class _EvmSolverService {
11668
11967
  * @returns {Promise<[Hex, Intent, bigint]>} The encoded contract call, intent and fee amount
11669
11968
  */
11670
11969
  static constructCreateIntentData(createIntentParams, creatorHubWalletAddress, solverConfig2, fee, hubProvider) {
11671
- let inputToken = getHubAssetInfo(createIntentParams.srcChain, createIntentParams.inputToken)?.asset;
11672
- if (createIntentParams.srcChain === hubProvider.chainConfig.chain.id && createIntentParams.inputToken.toLowerCase() === hubProvider.chainConfig.nativeToken.toLowerCase()) {
11673
- inputToken = hubProvider.chainConfig.wrappedNativeToken;
11674
- }
11675
- const outputToken = getHubAssetInfo(createIntentParams.dstChain, createIntentParams.outputToken)?.asset;
11970
+ const inputToken = createIntentParams.srcChain !== SONIC_MAINNET_CHAIN_ID ? getHubAssetInfo(createIntentParams.srcChain, createIntentParams.inputToken)?.asset : createIntentParams.inputToken;
11971
+ const outputToken = createIntentParams.dstChain !== SONIC_MAINNET_CHAIN_ID ? getHubAssetInfo(createIntentParams.dstChain, createIntentParams.outputToken)?.asset : createIntentParams.outputToken;
11676
11972
  invariant12(
11677
11973
  inputToken,
11678
11974
  `hub asset not found for spoke chain token (intent.inputToken): ${createIntentParams.inputToken}`
@@ -12447,6 +12743,12 @@ var SolverService = class {
12447
12743
  spokeProvider
12448
12744
  );
12449
12745
  }
12746
+ if (spokeProvider instanceof StellarSpokeProvider) {
12747
+ return {
12748
+ ok: true,
12749
+ value: await StellarSpokeService.hasSufficientTrustline(params.inputToken, params.inputAmount, spokeProvider)
12750
+ };
12751
+ }
12450
12752
  return {
12451
12753
  ok: true,
12452
12754
  value: true
@@ -12528,9 +12830,21 @@ var SolverService = class {
12528
12830
  value: result
12529
12831
  };
12530
12832
  }
12833
+ if (spokeProvider instanceof StellarSpokeProvider) {
12834
+ const result = await StellarSpokeService.requestTrustline(
12835
+ params.inputToken,
12836
+ params.inputAmount,
12837
+ spokeProvider,
12838
+ raw
12839
+ );
12840
+ return {
12841
+ ok: true,
12842
+ value: result
12843
+ };
12844
+ }
12531
12845
  return {
12532
12846
  ok: false,
12533
- error: new Error("Approve only supported for EVM spoke chains")
12847
+ error: new Error("Approve only supported for EVM (approve) and Stellar (trustline) spoke chains")
12534
12848
  };
12535
12849
  } catch (error) {
12536
12850
  return {
@@ -13333,6 +13647,12 @@ var MigrationService = class {
13333
13647
  evmSpokeProvider
13334
13648
  );
13335
13649
  }
13650
+ if (isUnifiedBnUSDMigrateParams(params) && spokeProvider instanceof StellarSpokeProvider) {
13651
+ return {
13652
+ ok: true,
13653
+ value: await StellarSpokeService.hasSufficientTrustline(params.srcbnUSD, params.amount, spokeProvider)
13654
+ };
13655
+ }
13336
13656
  return {
13337
13657
  ok: true,
13338
13658
  value: true
@@ -13359,6 +13679,29 @@ var MigrationService = class {
13359
13679
  evmSpokeProvider
13360
13680
  );
13361
13681
  }
13682
+ if (isUnifiedBnUSDMigrateParams(params) && spokeProvider.chainConfig.chain.type === "EVM") {
13683
+ const evmSpokeProvider = spokeProvider;
13684
+ let spender;
13685
+ const wallet = await spokeProvider.walletProvider.getWalletAddress();
13686
+ if (spokeProvider instanceof SonicSpokeProvider) {
13687
+ spender = await SonicSpokeService.getUserRouter(wallet, spokeProvider);
13688
+ } else {
13689
+ spender = evmSpokeProvider.chainConfig.addresses.assetManager;
13690
+ }
13691
+ return await Erc20Service.isAllowanceValid(
13692
+ params.srcbnUSD,
13693
+ params.amount,
13694
+ wallet,
13695
+ spender,
13696
+ evmSpokeProvider
13697
+ );
13698
+ }
13699
+ if (isUnifiedBnUSDMigrateParams(params) && spokeProvider instanceof StellarSpokeProvider) {
13700
+ return {
13701
+ ok: true,
13702
+ value: await StellarSpokeService.hasSufficientTrustline(params.srcbnUSD, params.amount, spokeProvider)
13703
+ };
13704
+ }
13362
13705
  if (spokeProvider instanceof SonicSpokeProvider && isIcxCreateRevertMigrationParams(params)) {
13363
13706
  const wallet = await spokeProvider.walletProvider.getWalletAddress();
13364
13707
  const userRouter = await SonicSpokeService.getUserRouter(wallet, spokeProvider);
@@ -13421,6 +13764,13 @@ var MigrationService = class {
13421
13764
  value: result
13422
13765
  };
13423
13766
  }
13767
+ if (isUnifiedBnUSDMigrateParams(params) && spokeProvider instanceof StellarSpokeProvider) {
13768
+ const result = await StellarSpokeService.requestTrustline(params.srcbnUSD, params.amount, spokeProvider, raw);
13769
+ return {
13770
+ ok: true,
13771
+ value: result
13772
+ };
13773
+ }
13424
13774
  return {
13425
13775
  ok: false,
13426
13776
  error: new Error("Invalid params for migrate action")
@@ -13451,6 +13801,13 @@ var MigrationService = class {
13451
13801
  value: result
13452
13802
  };
13453
13803
  }
13804
+ if (isUnifiedBnUSDMigrateParams(params) && spokeProvider instanceof StellarSpokeProvider) {
13805
+ const result = await StellarSpokeService.requestTrustline(params.srcbnUSD, params.amount, spokeProvider, raw);
13806
+ return {
13807
+ ok: true,
13808
+ value: result
13809
+ };
13810
+ }
13454
13811
  if (spokeProvider instanceof SonicSpokeProvider && isIcxCreateRevertMigrationParams(params)) {
13455
13812
  const wallet = await spokeProvider.walletProvider.getWalletAddress();
13456
13813
  const userRouter = await SonicSpokeService.getUserRouter(wallet, spokeProvider);
@@ -13544,6 +13901,14 @@ var MigrationService = class {
13544
13901
  if (!packetResult.ok) {
13545
13902
  return packetResult;
13546
13903
  }
13904
+ if (!(params.srcChainId === SONIC_MAINNET_CHAIN_ID || params.dstChainId === SONIC_MAINNET_CHAIN_ID)) {
13905
+ await waitUntilIntentExecuted({
13906
+ intentRelayChainId: getIntentRelayChainId(SONIC_MAINNET_CHAIN_ID).toString(),
13907
+ spokeTxHash: packetResult.value.dst_tx_hash,
13908
+ timeout,
13909
+ apiUrl: this.config.relayerApiEndpoint
13910
+ });
13911
+ }
13547
13912
  return { ok: true, value: [spokeTxHash, packetResult.value.dst_tx_hash] };
13548
13913
  } catch (error) {
13549
13914
  return {
@@ -13911,7 +14276,6 @@ var MigrationService = class {
13911
14276
  const txResult = await SpokeService.deposit(
13912
14277
  {
13913
14278
  from: walletAddress,
13914
- to: creatorHubWalletAddress,
13915
14279
  token: params.srcbnUSD,
13916
14280
  amount: params.amount,
13917
14281
  data: migrationData
@@ -14626,6 +14990,26 @@ var BridgeService = class {
14626
14990
  value: allowanceResult.value
14627
14991
  };
14628
14992
  }
14993
+ if (spokeProvider instanceof StellarSpokeProvider) {
14994
+ const allowanceResult = await StellarSpokeService.hasSufficientTrustline(
14995
+ params.srcAsset,
14996
+ params.amount,
14997
+ spokeProvider
14998
+ );
14999
+ if (!allowanceResult) {
15000
+ return {
15001
+ ok: false,
15002
+ error: {
15003
+ code: "ALLOWANCE_CHECK_FAILED",
15004
+ error: allowanceResult
15005
+ }
15006
+ };
15007
+ }
15008
+ return {
15009
+ ok: true,
15010
+ value: allowanceResult
15011
+ };
15012
+ }
14629
15013
  if (spokeProvider instanceof SonicSpokeProvider) {
14630
15014
  invariant12(isAddress(params.srcAsset), "Invalid source asset address for Sonic chain");
14631
15015
  const userRouter = await SonicSpokeService.getUserRouter(walletAddress, spokeProvider);
@@ -14694,6 +15078,13 @@ var BridgeService = class {
14694
15078
  value: result
14695
15079
  };
14696
15080
  }
15081
+ if (spokeProvider instanceof StellarSpokeProvider) {
15082
+ const result = await StellarSpokeService.requestTrustline(params.srcAsset, params.amount, spokeProvider, raw);
15083
+ return {
15084
+ ok: true,
15085
+ value: result
15086
+ };
15087
+ }
14697
15088
  if (spokeProvider instanceof SonicSpokeProvider) {
14698
15089
  invariant12(isAddress(params.srcAsset), "Invalid source asset address for Sonic chain");
14699
15090
  const userRouter = await SonicSpokeService.getUserRouter(
@@ -14909,7 +15300,19 @@ var BridgeService = class {
14909
15300
  }
14910
15301
  const encodedRecipientAddress = encodeAddress(params.dstChainId, params.recipient);
14911
15302
  if (params.dstChainId === this.hubProvider.chainConfig.chain.id) {
14912
- calls.push(Erc20Service.encodeTransfer(dstAssetInfo.asset, encodedRecipientAddress, translatedWithdrawAmount));
15303
+ if (params.dstAsset.toLowerCase() === this.hubProvider.chainConfig.nativeToken.toLowerCase()) {
15304
+ calls.push({
15305
+ address: dstAssetInfo.asset,
15306
+ value: 0n,
15307
+ data: encodeFunctionData({
15308
+ abi: wrappedSonicAbi,
15309
+ functionName: "withdrawTo",
15310
+ args: [encodedRecipientAddress, translatedWithdrawAmount]
15311
+ })
15312
+ });
15313
+ } else {
15314
+ calls.push(Erc20Service.encodeTransfer(dstAssetInfo.asset, encodedRecipientAddress, translatedWithdrawAmount));
15315
+ }
14913
15316
  } else {
14914
15317
  invariant12(dstAssetInfo, `Unsupported hub chain (${params.dstChainId}) token: ${params.dstAsset}`);
14915
15318
  calls.push(
@@ -15217,6 +15620,9 @@ async function deriveUserWalletAddress(spokeProvider, hubProvider, walletAddress
15217
15620
  const address = walletAddress ?? await spokeProvider.walletProvider.getWalletAddress();
15218
15621
  return spokeProvider.chainConfig.chain.id === hubProvider.chainConfig.chain.id ? address : await WalletAbstractionService.getUserAbstractedWalletAddress(address, spokeProvider, hubProvider);
15219
15622
  }
15623
+ function parseToStroops(amount) {
15624
+ return BigInt(Math.round(Number.parseFloat(amount) * 1e7));
15625
+ }
15220
15626
  var BigNumberZeroDecimal = BigNumber.clone({
15221
15627
  DECIMAL_PLACES: 0,
15222
15628
  ROUNDING_MODE: BigNumber.ROUND_DOWN
@@ -16750,6 +17156,12 @@ var MoneyMarketService = class _MoneyMarketService {
16750
17156
  `Unsupported spoke chain (${spokeProvider.chainConfig.chain.id}) token: ${params.token}`
16751
17157
  );
16752
17158
  const walletAddress = await spokeProvider.walletProvider.getWalletAddress();
17159
+ if (spokeProvider instanceof StellarSpokeProvider && (params.action === "supply" || params.action === "repay")) {
17160
+ return {
17161
+ ok: true,
17162
+ value: await StellarSpokeService.hasSufficientTrustline(params.token, params.amount, spokeProvider)
17163
+ };
17164
+ }
16753
17165
  if (spokeProvider instanceof EvmSpokeProvider && (params.action === "supply" || params.action === "repay")) {
16754
17166
  return await Erc20Service.isAllowanceValid(
16755
17167
  params.token,
@@ -16847,6 +17259,17 @@ var MoneyMarketService = class _MoneyMarketService {
16847
17259
  `Unsupported spoke chain (${spokeProvider.chainConfig.chain.id}) token: ${params.token}`
16848
17260
  );
16849
17261
  const walletAddress = await spokeProvider.walletProvider.getWalletAddress();
17262
+ if (spokeProvider instanceof StellarSpokeProvider) {
17263
+ invariant12(
17264
+ params.action === "supply" || params.action === "repay",
17265
+ "Invalid action (only supply and repay are supported on stellar)"
17266
+ );
17267
+ const result = await StellarSpokeService.requestTrustline(params.token, params.amount, spokeProvider, raw);
17268
+ return {
17269
+ ok: true,
17270
+ value: result
17271
+ };
17272
+ }
16850
17273
  if (spokeProvider instanceof EvmSpokeProvider) {
16851
17274
  invariant12(
16852
17275
  params.action === "supply" || params.action === "repay",
@@ -17551,14 +17974,9 @@ var MoneyMarketService = class _MoneyMarketService {
17551
17974
  const calls = [];
17552
17975
  const assetConfig = getHubAssetInfo(spokeChainId, token);
17553
17976
  invariant12(assetConfig, `hub asset not found for spoke chain token (token): ${token}`);
17554
- let assetAddress = assetConfig.asset;
17977
+ const assetAddress = assetConfig.asset;
17555
17978
  const vaultAddress = assetConfig.vault;
17556
17979
  const lendingPool = this.config.lendingPool;
17557
- if (spokeChainId === this.hubProvider.chainConfig.chain.id) {
17558
- if (token.toLowerCase() === spokeChainConfig[this.hubProvider.chainConfig.chain.id].nativeToken.toLowerCase()) {
17559
- assetAddress = spokeChainConfig[this.hubProvider.chainConfig.chain.id].supportedTokens.wS.address;
17560
- }
17561
- }
17562
17980
  calls.push(Erc20Service.encodeApprove(assetAddress, vaultAddress, amount));
17563
17981
  calls.push(EvmVaultTokenService.encodeDeposit(vaultAddress, assetAddress, amount));
17564
17982
  const translatedAmount = EvmVaultTokenService.translateIncomingDecimals(assetConfig.decimal, amount);
@@ -17588,15 +18006,10 @@ var MoneyMarketService = class _MoneyMarketService {
17588
18006
  );
17589
18007
  const assetConfig = getHubAssetInfo(spokeChainId, token);
17590
18008
  invariant12(assetConfig, `hub asset not found for spoke chain token (token): ${token}`);
17591
- let assetAddress = assetConfig.asset;
18009
+ const assetAddress = assetConfig.asset;
17592
18010
  const vaultAddress = assetConfig.vault;
17593
18011
  const bnUSDVault = this.config.bnUSDVault;
17594
18012
  const bnUSD = this.config.bnUSD;
17595
- if (spokeChainId === this.hubProvider.chainConfig.chain.id) {
17596
- if (token.toLowerCase() === spokeChainConfig[this.hubProvider.chainConfig.chain.id].nativeToken.toLowerCase()) {
17597
- assetAddress = spokeChainConfig[this.hubProvider.chainConfig.chain.id].supportedTokens.wS.address;
17598
- }
17599
- }
17600
18013
  const feeAmount = calculateFeeAmount(amount, this.config.partnerFee);
17601
18014
  const calls = [];
17602
18015
  if (bnUSDVault && bnUSD && bnUSDVault.toLowerCase() === vaultAddress.toLowerCase()) {
@@ -17717,15 +18130,10 @@ var MoneyMarketService = class _MoneyMarketService {
17717
18130
  if (!assetConfig) {
17718
18131
  throw new Error("[buildRepayData] Hub asset not found");
17719
18132
  }
17720
- let assetAddress = assetConfig.asset;
18133
+ const assetAddress = assetConfig.asset;
17721
18134
  const vaultAddress = assetConfig.vault;
17722
18135
  const bnUSDVault = this.config.bnUSDVault;
17723
18136
  const bnUSD = this.config.bnUSD;
17724
- if (spokeChainId === this.hubProvider.chainConfig.chain.id) {
17725
- if (token.toLowerCase() === spokeChainConfig[this.hubProvider.chainConfig.chain.id].nativeToken.toLowerCase()) {
17726
- assetAddress = spokeChainConfig[this.hubProvider.chainConfig.chain.id].supportedTokens.wS.address;
17727
- }
17728
- }
17729
18137
  calls.push(Erc20Service.encodeApprove(assetAddress, vaultAddress, amount));
17730
18138
  calls.push(EvmVaultTokenService.encodeDeposit(vaultAddress, assetAddress, amount));
17731
18139
  const translatedAmount = EvmVaultTokenService.translateIncomingDecimals(assetConfig.decimal, amount);
@@ -17911,6 +18319,6 @@ var SolverIntentErrorCode = /* @__PURE__ */ ((SolverIntentErrorCode2) => {
17911
18319
  return SolverIntentErrorCode2;
17912
18320
  })(SolverIntentErrorCode || {});
17913
18321
 
17914
- export { BackendApiService, BalnSwapService, BigIntToHex, BigNumberZeroDecimal, BnUSDMigrationService, BridgeService, ChainIdToIntentRelayChainId, 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, EVM_CHAIN_IDS, EVM_SPOKE_CHAIN_IDS, Erc20Service, EvmAssetManagerService, EvmHubProvider, EvmSolverService, EvmSpokeProvider, EvmSpokeService, EvmVaultTokenService, EvmWalletAbstraction, FEE_PERCENTAGE_SCALE, HALF_RAY, HALF_WAD, HubVaultSymbols, ICON_TX_RESULT_WAIT_MAX_RETRY, INTENT_RELAY_CHAIN_IDS, IconSpokeProvider, IcxMigrationService, InjectiveSpokeProvider, IntentCreatedEventAbi, IntentDataType, IntentsAbi, LTV_PRECISION, LendingPoolService, LockupMultiplier, LockupPeriod, MAX_UINT256, MigrationService, MoneyMarketDataService, MoneyMarketService, RAY, RAY_DECIMALS, SECONDS_PER_YEAR, STELLAR_DEFAULT_TX_TIMEOUT_SECONDS, STELLAR_PRIORITY_FEE, SodaTokens, SodaTokensAsHubAssets, SodaVaultTokensSet, Sodax, SolanaSpokeProvider, SolverIntentErrorCode, SolverIntentStatusCode, SolverService, SonicSpokeProvider, SonicSpokeService, SpokeService, StellarSpokeProvider, SuiSpokeProvider, SuiSpokeService, SupportedMigrationTokens, USD_DECIMALS, UiPoolDataProviderService, VAULT_TOKEN_DECIMALS, WAD, WAD_RAY_RATIO, WEI_DECIMALS, WalletAbstractionService, adjustAmountByFee, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bnUSDNewTokens, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, chainIdToHubAssetsMap, connectionAbi, deriveUserWalletAddress, encodeAddress, encodeContractCalls, erc20Abi, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getCompoundedBalance, getEvmViemChain, getHubAssetInfo, getHubChainConfig, getHubVaultTokenByAddress, getIconAddressBytes, getIntentRelayChainId, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getMoneyMarketConfig, getOriginalAssetAddress, getOriginalAssetInfoFromVault, getOriginalTokenFromOriginalAssetAddress, getPacket, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getSolverConfig, getSpokeChainIdFromIntentRelayChainId, getSupportedMoneyMarketTokens, getSupportedSolverTokens, getTransactionPackets, hexToBigInt, hubAssetToOriginalAssetMap, hubAssets, hubVaultTokensMap, hubVaults, hubVaultsAddressSet, hyper, intentRelayChainIdToSpokeChainIdMap, isBalnMigrateParams, isConfiguredMoneyMarketConfig, isConfiguredSolverConfig, isEvmHubChainConfig, isEvmInitializedConfig, isEvmSpokeChainConfig, isEvmSpokeProvider, isEvmUninitializedBrowserConfig, isEvmUninitializedConfig, isEvmUninitializedPrivateKeyConfig, isIconAddress, isIconSpokeProvider, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveSpokeProvider, isIntentCreationFailedError, isIntentCreationUnknownError, isIntentPostExecutionFailedError, isIntentRelayChainId, isIntentSubmitTxFailedError, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isMoneyMarketBorrowUnknownError, isMoneyMarketCreateBorrowIntentFailedError, isMoneyMarketCreateRepayIntentFailedError, isMoneyMarketCreateSupplyIntentFailedError, isMoneyMarketCreateWithdrawIntentFailedError, isMoneyMarketRelayTimeoutError, isMoneyMarketRepayUnknownError, isMoneyMarketReserveAsset, isMoneyMarketReserveHubAsset, isMoneyMarketSubmitTxFailedError, isMoneyMarketSupplyUnknownError, isMoneyMarketSupportedToken, isMoneyMarketWithdrawUnknownError, isNativeToken, isNewbnUSDChainId, isNewbnUSDToken, isPartnerFeeAmount, isPartnerFeePercentage, isResponseAddressType, isResponseSigningType, isSodaVaultToken, isSolanaSpokeProvider, isSolverSupportedToken, isSonicSpokeProvider, isStellarSpokeProvider, isSuiSpokeProvider, isUnifiedBnUSDMigrateParams, isValidChainHubAsset, isValidHubAsset, isValidIntentRelayChainId, isValidOriginalAssetAddress, isValidSpokeChainId, isValidVault, isWaitUntilIntentExecutedFailed, moneyMarketReserveAssets, moneyMarketReserveHubAssetsSet, moneyMarketSupportedTokens, nativeToUSD, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizedToUsd, originalAssetTohubAssetMap, poolAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, spokeChainIdsSet, submitTransaction, supportedHubAssets, supportedHubChains, supportedSodaAssets, supportedSpokeChains, supportedTokensPerChain, uiPoolDataAbi, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, wadToRay, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
18322
+ export { BackendApiService, BalnSwapService, BigIntToHex, BigNumberZeroDecimal, BnUSDMigrationService, BridgeService, ChainIdToIntentRelayChainId, 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, EVM_CHAIN_IDS, Erc20Service, EvmAssetManagerService, EvmHubProvider, EvmSolverService, EvmSpokeProvider, EvmSpokeService, EvmVaultTokenService, EvmWalletAbstraction, FEE_PERCENTAGE_SCALE, HALF_RAY, HALF_WAD, HubVaultSymbols, ICON_TX_RESULT_WAIT_MAX_RETRY, IconSpokeProvider, IcxMigrationService, InjectiveSpokeProvider, IntentCreatedEventAbi, IntentDataType, IntentsAbi, LTV_PRECISION, LendingPoolService, LockupMultiplier, LockupPeriod, MAX_UINT256, MigrationService, MoneyMarketDataService, MoneyMarketService, RAY, RAY_DECIMALS, SECONDS_PER_YEAR, STELLAR_DEFAULT_TX_TIMEOUT_SECONDS, STELLAR_PRIORITY_FEE, SodaTokens, SodaTokensAsHubAssets, SodaVaultTokensSet, Sodax, SolanaSpokeProvider, SolverIntentErrorCode, SolverIntentStatusCode, SolverService, SonicSpokeProvider, SonicSpokeService, SpokeService, StellarSpokeProvider, StellarSpokeService, SuiSpokeProvider, SuiSpokeService, SupportedMigrationTokens, USD_DECIMALS, UiPoolDataProviderService, VAULT_TOKEN_DECIMALS, WAD, WAD_RAY_RATIO, WEI_DECIMALS, WalletAbstractionService, adjustAmountByFee, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bnUSDNewTokens, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, chainIdToHubAssetsMap, connectionAbi, deriveUserWalletAddress, encodeAddress, encodeContractCalls, erc20Abi, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getCompoundedBalance, getEvmViemChain, getHubAssetInfo, getHubChainConfig, getHubVaultTokenByAddress, getIconAddressBytes, getIntentRelayChainId, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getMoneyMarketConfig, getOriginalAssetAddress, getOriginalAssetInfoFromVault, getOriginalTokenFromOriginalAssetAddress, getPacket, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getSolverConfig, getSpokeChainIdFromIntentRelayChainId, getSupportedMoneyMarketTokens, getSupportedSolverTokens, getTransactionPackets, hexToBigInt, hubAssetToOriginalAssetMap, hubAssets, hubVaultTokensMap, hubVaults, hubVaultsAddressSet, hyper, intentRelayChainIdToSpokeChainIdMap, isBalnMigrateParams, isConfiguredMoneyMarketConfig, isConfiguredSolverConfig, isEvmHubChainConfig, isEvmInitializedConfig, isEvmSpokeChainConfig, isEvmSpokeProvider, isEvmUninitializedBrowserConfig, isEvmUninitializedConfig, isEvmUninitializedPrivateKeyConfig, isIconAddress, isIconSpokeProvider, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveSpokeProvider, isIntentCreationFailedError, isIntentCreationUnknownError, isIntentPostExecutionFailedError, isIntentRelayChainId, isIntentSubmitTxFailedError, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isMoneyMarketBorrowUnknownError, isMoneyMarketCreateBorrowIntentFailedError, isMoneyMarketCreateRepayIntentFailedError, isMoneyMarketCreateSupplyIntentFailedError, isMoneyMarketCreateWithdrawIntentFailedError, isMoneyMarketRelayTimeoutError, isMoneyMarketRepayUnknownError, isMoneyMarketReserveAsset, isMoneyMarketReserveHubAsset, isMoneyMarketSubmitTxFailedError, isMoneyMarketSupplyUnknownError, isMoneyMarketSupportedToken, isMoneyMarketWithdrawUnknownError, isNativeToken, isNewbnUSDChainId, isNewbnUSDToken, isPartnerFeeAmount, isPartnerFeePercentage, isResponseAddressType, isResponseSigningType, isSodaVaultToken, isSolanaSpokeProvider, isSolverSupportedToken, isSonicSpokeProvider, isStellarSpokeProvider, isSuiSpokeProvider, isUnifiedBnUSDMigrateParams, isValidChainHubAsset, isValidHubAsset, isValidIntentRelayChainId, isValidOriginalAssetAddress, isValidSpokeChainId, isValidVault, isWaitUntilIntentExecutedFailed, moneyMarketReserveAssets, moneyMarketReserveHubAssetsSet, moneyMarketSupportedTokens, nativeToUSD, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizedToUsd, originalAssetTohubAssetMap, parseToStroops, poolAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, spokeChainIdsSet, submitTransaction, supportedHubAssets, supportedHubChains, supportedSodaAssets, supportedSpokeChains, supportedTokensPerChain, uiPoolDataAbi, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, wadToRay, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
17915
18323
  //# sourceMappingURL=index.mjs.map
17916
18324
  //# sourceMappingURL=index.mjs.map