@sodax/sdk 2.2.0 → 2.3.0-rc.2

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
@@ -96,8 +96,8 @@ function serializeCause(cause, depth) {
96
96
  }
97
97
  function sanitizeContext(value, depth) {
98
98
  const out = {};
99
- for (const [key, v10] of Object.entries(value)) {
100
- out[key] = sanitizeValue(v10, depth + 1);
99
+ for (const [key, v11] of Object.entries(value)) {
100
+ out[key] = sanitizeValue(v11, depth + 1);
101
101
  }
102
102
  return out;
103
103
  }
@@ -108,13 +108,13 @@ function sanitizeValue(value, depth) {
108
108
  if (t === "bigint") return value.toString();
109
109
  if (t === "string" || t === "number" || t === "boolean") return value;
110
110
  if (t === "function" || t === "symbol") return safeString(value);
111
- if (Array.isArray(value)) return value.map((v10) => sanitizeValue(v10, depth + 1));
111
+ if (Array.isArray(value)) return value.map((v11) => sanitizeValue(v11, depth + 1));
112
112
  if (value instanceof Date) return value.toISOString();
113
113
  if (value instanceof Map) {
114
- return Array.from(value.entries()).map(([k, v10]) => [sanitizeValue(k, depth + 1), sanitizeValue(v10, depth + 1)]);
114
+ return Array.from(value.entries()).map(([k, v11]) => [sanitizeValue(k, depth + 1), sanitizeValue(v11, depth + 1)]);
115
115
  }
116
116
  if (value instanceof Set) {
117
- return Array.from(value.values()).map((v10) => sanitizeValue(v10, depth + 1));
117
+ return Array.from(value.values()).map((v11) => sanitizeValue(v11, depth + 1));
118
118
  }
119
119
  if (value instanceof Error) return { name: value.name, message: value.message };
120
120
  if (t === "object") {
@@ -126,9 +126,9 @@ function sanitizeValue(value, depth) {
126
126
  }
127
127
  return safeString(value);
128
128
  }
129
- function safeString(v10) {
129
+ function safeString(v11) {
130
130
  try {
131
- return String(v10);
131
+ return String(v11);
132
132
  } catch {
133
133
  return "[unserializable]";
134
134
  }
@@ -290,7 +290,7 @@ var CHAIN_KEYS = Object.values(ChainKeys);
290
290
  var spokeChainKeysSet = new Set(CHAIN_KEYS);
291
291
 
292
292
  // ../types/dist/chains/tokens.js
293
- var TOKEN_LOGO_BASE_URL = "https://raw.githubusercontent.com/icon-project/sodax-sdks/main/packages/assets/token";
293
+ var TOKEN_LOGO_BASE_URL = "https://raw.githubusercontent.com/gosodax/sodax-sdks/main/packages/assets/token";
294
294
  var tokenLogoSlug = (symbol) => symbol.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
295
295
  var tokenLogo = (symbol) => `${TOKEN_LOGO_BASE_URL}/${tokenLogoSlug(symbol)}.png`;
296
296
  var StatATokenAddresses = {
@@ -351,7 +351,31 @@ var HubVaultSymbols = [
351
351
  "TSM",
352
352
  "AMD",
353
353
  "INTC",
354
- "BABA"
354
+ "BABA",
355
+ "AMC",
356
+ "HIMS",
357
+ "LLY",
358
+ "COST",
359
+ "TTWO",
360
+ "RBLX",
361
+ "IBM",
362
+ "MRNA",
363
+ "LULU",
364
+ "SNAP",
365
+ "WYFI",
366
+ "RIVN",
367
+ "NFLX",
368
+ "BULL",
369
+ "QUBT",
370
+ "NET",
371
+ "SKHY",
372
+ "JNJ",
373
+ "UPS",
374
+ "DJT",
375
+ "RDDT",
376
+ "GLD",
377
+ "sodaADA",
378
+ "sodaZEC"
355
379
  ];
356
380
  var SodaTokens = {
357
381
  sodaBNB: {
@@ -854,6 +878,244 @@ var SodaTokens = {
854
878
  chainKey: ChainKeys.SONIC_MAINNET,
855
879
  hubAsset: "0x1BeD0547D76F6424e9A3465b36F6dcDCF798A5cf",
856
880
  vault: "0x1BeD0547D76F6424e9A3465b36F6dcDCF798A5cf"
881
+ },
882
+ AMC: {
883
+ symbol: "AMC",
884
+ isRwa: true,
885
+ name: "AMC Entertainment \u2022 Robinhood Token",
886
+ decimals: 18,
887
+ address: "0x8f7357Ec98e6eBAE8Cfb75802AFFc7c9a774dFBd",
888
+ chainKey: ChainKeys.SONIC_MAINNET,
889
+ hubAsset: "0x8f7357Ec98e6eBAE8Cfb75802AFFc7c9a774dFBd",
890
+ vault: "0x8f7357Ec98e6eBAE8Cfb75802AFFc7c9a774dFBd"
891
+ },
892
+ HIMS: {
893
+ symbol: "HIMS",
894
+ isRwa: true,
895
+ name: "Hims & Hers Health \u2022 Robinhood Token",
896
+ decimals: 18,
897
+ address: "0xFb31A6c21439C1e3101e0470a9F3299ECB295b93",
898
+ chainKey: ChainKeys.SONIC_MAINNET,
899
+ hubAsset: "0xFb31A6c21439C1e3101e0470a9F3299ECB295b93",
900
+ vault: "0xFb31A6c21439C1e3101e0470a9F3299ECB295b93"
901
+ },
902
+ LLY: {
903
+ symbol: "LLY",
904
+ isRwa: true,
905
+ name: "Eli Lilly \u2022 Robinhood Token",
906
+ decimals: 18,
907
+ address: "0xa6F481B22349DeA3739089e67D32A8A07078bB53",
908
+ chainKey: ChainKeys.SONIC_MAINNET,
909
+ hubAsset: "0xa6F481B22349DeA3739089e67D32A8A07078bB53",
910
+ vault: "0xa6F481B22349DeA3739089e67D32A8A07078bB53"
911
+ },
912
+ COST: {
913
+ symbol: "COST",
914
+ isRwa: true,
915
+ name: "Costco \u2022 Robinhood Token",
916
+ decimals: 18,
917
+ address: "0x6893A6c578f449AA0f748CA6B2A9Fc50Fed91C30",
918
+ chainKey: ChainKeys.SONIC_MAINNET,
919
+ hubAsset: "0x6893A6c578f449AA0f748CA6B2A9Fc50Fed91C30",
920
+ vault: "0x6893A6c578f449AA0f748CA6B2A9Fc50Fed91C30"
921
+ },
922
+ TTWO: {
923
+ symbol: "TTWO",
924
+ isRwa: true,
925
+ name: "Take-Two Interactive Software \u2022 Robinhood Token",
926
+ decimals: 18,
927
+ address: "0xd56534102359A4b69E81Cf6eFa6835EABd116c44",
928
+ chainKey: ChainKeys.SONIC_MAINNET,
929
+ hubAsset: "0xd56534102359A4b69E81Cf6eFa6835EABd116c44",
930
+ vault: "0xd56534102359A4b69E81Cf6eFa6835EABd116c44"
931
+ },
932
+ RBLX: {
933
+ symbol: "RBLX",
934
+ isRwa: true,
935
+ name: "Roblox \u2022 Robinhood Token",
936
+ decimals: 18,
937
+ address: "0xC0D7a1f4cE9AaF981502DA15C8EbAEC21F1678Da",
938
+ chainKey: ChainKeys.SONIC_MAINNET,
939
+ hubAsset: "0xC0D7a1f4cE9AaF981502DA15C8EbAEC21F1678Da",
940
+ vault: "0xC0D7a1f4cE9AaF981502DA15C8EbAEC21F1678Da"
941
+ },
942
+ IBM: {
943
+ symbol: "IBM",
944
+ isRwa: true,
945
+ name: "IBM \u2022 Robinhood Token",
946
+ decimals: 18,
947
+ address: "0x6cF19BAD00110C5F4f584b11d3ac935794AE1300",
948
+ chainKey: ChainKeys.SONIC_MAINNET,
949
+ hubAsset: "0x6cF19BAD00110C5F4f584b11d3ac935794AE1300",
950
+ vault: "0x6cF19BAD00110C5F4f584b11d3ac935794AE1300"
951
+ },
952
+ MRNA: {
953
+ symbol: "MRNA",
954
+ isRwa: true,
955
+ name: "Moderna \u2022 Robinhood Token",
956
+ decimals: 18,
957
+ address: "0xd5fb16C3fAfaCa3032b0d715d00E72e11Dc799B6",
958
+ chainKey: ChainKeys.SONIC_MAINNET,
959
+ hubAsset: "0xd5fb16C3fAfaCa3032b0d715d00E72e11Dc799B6",
960
+ vault: "0xd5fb16C3fAfaCa3032b0d715d00E72e11Dc799B6"
961
+ },
962
+ LULU: {
963
+ symbol: "LULU",
964
+ isRwa: true,
965
+ name: "Lululemon \u2022 Robinhood Token",
966
+ decimals: 18,
967
+ address: "0x44d7BeFa3fF3BE055910d7591aaA12FD6907F0eb",
968
+ chainKey: ChainKeys.SONIC_MAINNET,
969
+ hubAsset: "0x44d7BeFa3fF3BE055910d7591aaA12FD6907F0eb",
970
+ vault: "0x44d7BeFa3fF3BE055910d7591aaA12FD6907F0eb"
971
+ },
972
+ SNAP: {
973
+ symbol: "SNAP",
974
+ isRwa: true,
975
+ name: "Snap \u2022 Robinhood Token",
976
+ decimals: 18,
977
+ address: "0x5E0cBeCFAc572F6Ec0C254CAF9DE20D476814C9F",
978
+ chainKey: ChainKeys.SONIC_MAINNET,
979
+ hubAsset: "0x5E0cBeCFAc572F6Ec0C254CAF9DE20D476814C9F",
980
+ vault: "0x5E0cBeCFAc572F6Ec0C254CAF9DE20D476814C9F"
981
+ },
982
+ WYFI: {
983
+ symbol: "WYFI",
984
+ isRwa: true,
985
+ name: "WhiteFiber, Inc. \u2022 Robinhood Token",
986
+ decimals: 18,
987
+ address: "0x94b01A709d83A871034B468a720a420abAa61F69",
988
+ chainKey: ChainKeys.SONIC_MAINNET,
989
+ hubAsset: "0x94b01A709d83A871034B468a720a420abAa61F69",
990
+ vault: "0x94b01A709d83A871034B468a720a420abAa61F69"
991
+ },
992
+ RIVN: {
993
+ symbol: "RIVN",
994
+ isRwa: true,
995
+ name: "Rivian Automotive \u2022 Robinhood Token",
996
+ decimals: 18,
997
+ address: "0xd37e433ACd08911904Ce3368482E67D569811faC",
998
+ chainKey: ChainKeys.SONIC_MAINNET,
999
+ hubAsset: "0xd37e433ACd08911904Ce3368482E67D569811faC",
1000
+ vault: "0xd37e433ACd08911904Ce3368482E67D569811faC"
1001
+ },
1002
+ NFLX: {
1003
+ symbol: "NFLX",
1004
+ isRwa: true,
1005
+ name: "Netflix \u2022 Robinhood Token",
1006
+ decimals: 18,
1007
+ address: "0xc866d70B8a4BAf9a200Fbe9b9db802A0dA32330A",
1008
+ chainKey: ChainKeys.SONIC_MAINNET,
1009
+ hubAsset: "0xc866d70B8a4BAf9a200Fbe9b9db802A0dA32330A",
1010
+ vault: "0xc866d70B8a4BAf9a200Fbe9b9db802A0dA32330A"
1011
+ },
1012
+ BULL: {
1013
+ symbol: "BULL",
1014
+ isRwa: true,
1015
+ name: "Webull \u2022 Robinhood Token",
1016
+ decimals: 18,
1017
+ address: "0xd01969b6effb9c9AAE68F1B5a8505d5738dc29A3",
1018
+ chainKey: ChainKeys.SONIC_MAINNET,
1019
+ hubAsset: "0xd01969b6effb9c9AAE68F1B5a8505d5738dc29A3",
1020
+ vault: "0xd01969b6effb9c9AAE68F1B5a8505d5738dc29A3"
1021
+ },
1022
+ QUBT: {
1023
+ symbol: "QUBT",
1024
+ isRwa: true,
1025
+ name: "Quantum Computing \u2022 Robinhood Token",
1026
+ decimals: 18,
1027
+ address: "0x2A6B3ABB63f3b5f002B7683f4eb32f68e3e4103E",
1028
+ chainKey: ChainKeys.SONIC_MAINNET,
1029
+ hubAsset: "0x2A6B3ABB63f3b5f002B7683f4eb32f68e3e4103E",
1030
+ vault: "0x2A6B3ABB63f3b5f002B7683f4eb32f68e3e4103E"
1031
+ },
1032
+ NET: {
1033
+ symbol: "NET",
1034
+ isRwa: true,
1035
+ name: "Cloudflare, Inc. Class A common stock \u2022 Robinhood Token",
1036
+ decimals: 18,
1037
+ address: "0x4658eD29E62701242695a7aF0B534De56956432B",
1038
+ chainKey: ChainKeys.SONIC_MAINNET,
1039
+ hubAsset: "0x4658eD29E62701242695a7aF0B534De56956432B",
1040
+ vault: "0x4658eD29E62701242695a7aF0B534De56956432B"
1041
+ },
1042
+ SKHY: {
1043
+ symbol: "SKHY",
1044
+ isRwa: true,
1045
+ name: "SK hynix Inc. American Depositary Shares \u2022 Robinhood Token",
1046
+ decimals: 18,
1047
+ address: "0x72E4ad33c018016ee983c8d43C1F739Be1043c54",
1048
+ chainKey: ChainKeys.SONIC_MAINNET,
1049
+ hubAsset: "0x72E4ad33c018016ee983c8d43C1F739Be1043c54",
1050
+ vault: "0x72E4ad33c018016ee983c8d43C1F739Be1043c54"
1051
+ },
1052
+ JNJ: {
1053
+ symbol: "JNJ",
1054
+ isRwa: true,
1055
+ name: "Johnson & Johnson \u2022 Robinhood Token",
1056
+ decimals: 18,
1057
+ address: "0x34107FD696CCeFb833256C028c670aC95A4612A5",
1058
+ chainKey: ChainKeys.SONIC_MAINNET,
1059
+ hubAsset: "0x34107FD696CCeFb833256C028c670aC95A4612A5",
1060
+ vault: "0x34107FD696CCeFb833256C028c670aC95A4612A5"
1061
+ },
1062
+ UPS: {
1063
+ symbol: "UPS",
1064
+ isRwa: true,
1065
+ name: "UPS \u2022 Robinhood Token",
1066
+ decimals: 18,
1067
+ address: "0x17b78F0626c85591D14E4DEFfe1AA14cb86d1A3D",
1068
+ chainKey: ChainKeys.SONIC_MAINNET,
1069
+ hubAsset: "0x17b78F0626c85591D14E4DEFfe1AA14cb86d1A3D",
1070
+ vault: "0x17b78F0626c85591D14E4DEFfe1AA14cb86d1A3D"
1071
+ },
1072
+ DJT: {
1073
+ symbol: "DJT",
1074
+ isRwa: true,
1075
+ name: "Trump Media & Technology Group \u2022 Robinhood Token",
1076
+ decimals: 18,
1077
+ address: "0xeeb7355B245A50f7a91CFc7adbcE008E6c548960",
1078
+ chainKey: ChainKeys.SONIC_MAINNET,
1079
+ hubAsset: "0xeeb7355B245A50f7a91CFc7adbcE008E6c548960",
1080
+ vault: "0xeeb7355B245A50f7a91CFc7adbcE008E6c548960"
1081
+ },
1082
+ RDDT: {
1083
+ symbol: "RDDT",
1084
+ isRwa: true,
1085
+ name: "Reddit \u2022 Robinhood Token",
1086
+ decimals: 18,
1087
+ address: "0x9106D29aee2bB2218ecb913aC2fAca242f315c9b",
1088
+ chainKey: ChainKeys.SONIC_MAINNET,
1089
+ hubAsset: "0x9106D29aee2bB2218ecb913aC2fAca242f315c9b",
1090
+ vault: "0x9106D29aee2bB2218ecb913aC2fAca242f315c9b"
1091
+ },
1092
+ GLD: {
1093
+ symbol: "GLD",
1094
+ isRwa: true,
1095
+ name: "SPDR Gold Trust \u2022 Robinhood Token",
1096
+ decimals: 18,
1097
+ address: "0x308f76Fc48196afb8C953f22d37d072eF3ceE0B8",
1098
+ chainKey: ChainKeys.SONIC_MAINNET,
1099
+ hubAsset: "0x308f76Fc48196afb8C953f22d37d072eF3ceE0B8",
1100
+ vault: "0x308f76Fc48196afb8C953f22d37d072eF3ceE0B8"
1101
+ },
1102
+ sodaADA: {
1103
+ symbol: "sodaADA",
1104
+ name: "SODA ADA",
1105
+ decimals: 18,
1106
+ address: "0xa3e161c014b6285f06425f9fd78aa83b60c1ab9e",
1107
+ chainKey: ChainKeys.SONIC_MAINNET,
1108
+ hubAsset: "0xa3e161c014b6285f06425f9fd78aa83b60c1ab9e",
1109
+ vault: "0xa3e161c014b6285f06425f9fd78aa83b60c1ab9e"
1110
+ },
1111
+ sodaZEC: {
1112
+ symbol: "sodaZEC",
1113
+ name: "SODA ZEC",
1114
+ decimals: 18,
1115
+ address: "0xf4af0aa80f079d5bff230c5b12109fa19b24f558",
1116
+ chainKey: ChainKeys.SONIC_MAINNET,
1117
+ hubAsset: "0xf4af0aa80f079d5bff230c5b12109fa19b24f558",
1118
+ vault: "0xf4af0aa80f079d5bff230c5b12109fa19b24f558"
857
1119
  }
858
1120
  };
859
1121
  var LsodaSymbols = ["lsodaWEETH", "lsodaWSTETH", "lsodaJITOSOL", "lsodaSUSDS"];
@@ -1395,6 +1657,216 @@ var solanaSupportedTokens = {
1395
1657
  chainKey: ChainKeys.SOLANA_MAINNET,
1396
1658
  hubAsset: "0x0a3a93b7303a582b2ab84cfb3493fdb9d160a3ef",
1397
1659
  vault: "0x0a3a93b7303a582b2ab84cfb3493fdb9d160a3ef"
1660
+ },
1661
+ "2Z": {
1662
+ symbol: "2Z",
1663
+ name: "DoubleZero",
1664
+ decimals: 8,
1665
+ address: "J6pQQ3FAcJQeWPPGppWRb4nM8jU3wLyYbRrLh7feMfvd",
1666
+ chainKey: ChainKeys.SOLANA_MAINNET,
1667
+ hubAsset: "0xe27f9c0e27a71743a1e43f585b9f17c6a9c2493f",
1668
+ vault: "0xe27f9c0e27a71743a1e43f585b9f17c6a9c2493f"
1669
+ },
1670
+ ANSEM: {
1671
+ symbol: "ANSEM",
1672
+ name: "The Black Bull",
1673
+ decimals: 6,
1674
+ address: "9cRCn9rGT8V2imeM2BaKs13yhMEais3ruM3rPvTGpump",
1675
+ chainKey: ChainKeys.SOLANA_MAINNET,
1676
+ hubAsset: "0x0392de493dc89cf5dac2f06ce4a60c590008e537",
1677
+ vault: "0x0392de493dc89cf5dac2f06ce4a60c590008e537"
1678
+ },
1679
+ BP: {
1680
+ symbol: "BP",
1681
+ name: "Backpack",
1682
+ decimals: 9,
1683
+ address: "BPxxfRCXkUVhig4HS1Lh7kZqV6SPJhzfEk4x6fVBjPCy",
1684
+ chainKey: ChainKeys.SOLANA_MAINNET,
1685
+ hubAsset: "0x9a1e90e1f591ac516781c5dc0523d998015dca74",
1686
+ vault: "0x9a1e90e1f591ac516781c5dc0523d998015dca74"
1687
+ },
1688
+ CARDS: {
1689
+ symbol: "CARDS",
1690
+ name: "Collector Crypt",
1691
+ decimals: 6,
1692
+ address: "CARDSccUMFKoPRZxt5vt3ksUbxEFEcnZ3H2pd3dKxYjp",
1693
+ chainKey: ChainKeys.SOLANA_MAINNET,
1694
+ hubAsset: "0xe639567bc448c8fe4c34b3c074fffea2047c77d2",
1695
+ vault: "0xe639567bc448c8fe4c34b3c074fffea2047c77d2"
1696
+ },
1697
+ CASH: {
1698
+ symbol: "CASH",
1699
+ name: "CASH",
1700
+ decimals: 6,
1701
+ address: "CASHx9KJUStyftLFWGvEVf59SGeG9sh5FfcnZMVPCASH",
1702
+ chainKey: ChainKeys.SOLANA_MAINNET,
1703
+ hubAsset: "0x28e5589c8030d0f53961db173e9bf1e0f59e716a",
1704
+ vault: "0x28e5589c8030d0f53961db173e9bf1e0f59e716a"
1705
+ },
1706
+ Fartcoin: {
1707
+ symbol: "Fartcoin",
1708
+ name: "Fartcoin",
1709
+ decimals: 6,
1710
+ address: "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump",
1711
+ chainKey: ChainKeys.SOLANA_MAINNET,
1712
+ hubAsset: "0x7127c0a5cab393a6b0b311684130c985a00eb06a",
1713
+ vault: "0x7127c0a5cab393a6b0b311684130c985a00eb06a"
1714
+ },
1715
+ GLDx: {
1716
+ symbol: "GLDx",
1717
+ isRwa: true,
1718
+ name: "Gold xStock",
1719
+ decimals: 8,
1720
+ address: "Xsv9hRk1z5ystj9MhnA7Lq4vjSsLwzL2nxrwmwtD3re",
1721
+ chainKey: ChainKeys.SOLANA_MAINNET,
1722
+ hubAsset: "0x236d062ba08cea4e28e006ab8d14c5b407bcfa0d",
1723
+ vault: "0x236d062ba08cea4e28e006ab8d14c5b407bcfa0d"
1724
+ },
1725
+ HOODx: {
1726
+ symbol: "HOODx",
1727
+ isRwa: true,
1728
+ name: "Robinhood xStock",
1729
+ decimals: 8,
1730
+ address: "XsvNBAYkrDRNhA7wPHQfX3ZUXZyZLdnCQDfHZ56bzpg",
1731
+ chainKey: ChainKeys.SOLANA_MAINNET,
1732
+ hubAsset: "0xd9c608fc37d1c7714ea1d1019197473d2b94e46e",
1733
+ vault: "0xd9c608fc37d1c7714ea1d1019197473d2b94e46e"
1734
+ },
1735
+ HYPE: {
1736
+ symbol: "HYPE",
1737
+ name: "Wormhole Bridged HYPE",
1738
+ decimals: 9,
1739
+ address: "98sMhvDwXj1RQi5c5Mndm3vPe9cBqPrbLaufMXFNMh5g",
1740
+ chainKey: ChainKeys.SOLANA_MAINNET,
1741
+ hubAsset: "0xe16bde1138dde975d84b43e99998fb6baee4bd8f",
1742
+ vault: SodaTokens.sodaHYPE.address
1743
+ },
1744
+ hyUSD: {
1745
+ symbol: "hyUSD",
1746
+ name: "Hylo USD",
1747
+ decimals: 6,
1748
+ address: "5YMkXAYccHSGnHn9nob9xEvv6Pvka9DZWH7nTbotTu9E",
1749
+ chainKey: ChainKeys.SOLANA_MAINNET,
1750
+ hubAsset: "0x5e2d86db5d93354de1ff2f70591509cf47cd878c",
1751
+ vault: "0x5e2d86db5d93354de1ff2f70591509cf47cd878c"
1752
+ },
1753
+ KMNO: {
1754
+ symbol: "KMNO",
1755
+ name: "Kamino",
1756
+ decimals: 6,
1757
+ address: "KMNo3nJsBXfcpJTVhZcXLW7RmTwTt4GVFE7suUBo9sS",
1758
+ chainKey: ChainKeys.SOLANA_MAINNET,
1759
+ hubAsset: "0x96e788fc83ef83c3201e4763fabe8e2dedf6eca7",
1760
+ vault: "0x96e788fc83ef83c3201e4763fabe8e2dedf6eca7"
1761
+ },
1762
+ LBTC: {
1763
+ symbol: "LBTC",
1764
+ name: "Lombard BTC",
1765
+ decimals: 8,
1766
+ address: "LBTCgU4b3wsFKsPwBn1rRZDx5DoFutM6RPiEt1TPDsY",
1767
+ chainKey: ChainKeys.SOLANA_MAINNET,
1768
+ hubAsset: "0x0abcce0b778587f9d6c83064d857027797220507",
1769
+ vault: SodaTokens.sodaBTC.address
1770
+ },
1771
+ MET: {
1772
+ symbol: "MET",
1773
+ name: "Meteora",
1774
+ decimals: 6,
1775
+ address: "METvsvVRapdj9cFLzq4Tr43xK4tAjQfwX76z3n6mWQL",
1776
+ chainKey: ChainKeys.SOLANA_MAINNET,
1777
+ hubAsset: "0xf6c71a67a7def6f87b0867113e366fcbba71b55f",
1778
+ vault: "0xf6c71a67a7def6f87b0867113e366fcbba71b55f"
1779
+ },
1780
+ ONYC: {
1781
+ symbol: "ONYC",
1782
+ name: "OnRe Tokenized Reinsurance",
1783
+ decimals: 9,
1784
+ address: "5Y8NV33Vv7WbnLfq3zBcKSdYPrk7g2KoiQoe7M2tcxp5",
1785
+ chainKey: ChainKeys.SOLANA_MAINNET,
1786
+ hubAsset: "0xacc1adb3095706e0fd7b70b2cab2b331bc95d32a",
1787
+ vault: "0xacc1adb3095706e0fd7b70b2cab2b331bc95d32a"
1788
+ },
1789
+ PENGU: {
1790
+ symbol: "PENGU",
1791
+ name: "Pudgy Penguins",
1792
+ decimals: 6,
1793
+ address: "2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv",
1794
+ chainKey: ChainKeys.SOLANA_MAINNET,
1795
+ hubAsset: "0x0cea0541b3790e8b54eef79fe243b9d1ba909add",
1796
+ vault: "0x0cea0541b3790e8b54eef79fe243b9d1ba909add"
1797
+ },
1798
+ PRIME: {
1799
+ symbol: "PRIME",
1800
+ name: "Hastra PRIME",
1801
+ decimals: 6,
1802
+ address: "3b8X44fLF9ooXaUm3hhSgjpmVs6rZZ3pPoGnGahc3Uu7",
1803
+ chainKey: ChainKeys.SOLANA_MAINNET,
1804
+ hubAsset: "0xc848404d5c99c10a554094a53e71d0305fbac518",
1805
+ vault: "0xc848404d5c99c10a554094a53e71d0305fbac518"
1806
+ },
1807
+ SPCXx: {
1808
+ symbol: "SPCXx",
1809
+ isRwa: true,
1810
+ name: "SpaceX xStock",
1811
+ decimals: 8,
1812
+ address: "Xs3oZwbHvqis4NYcf4YKWmEia2eC84wSiVrcYcTqpH8",
1813
+ chainKey: ChainKeys.SOLANA_MAINNET,
1814
+ hubAsset: "0x760bc9d7dede486a235e58992815ff54bc1b3269",
1815
+ vault: "0x760bc9d7dede486a235e58992815ff54bc1b3269"
1816
+ },
1817
+ STONK: {
1818
+ symbol: "STONK",
1819
+ name: "STONK",
1820
+ decimals: 9,
1821
+ address: "6GmAFSYs4gk3FDao5FzzySQpPZaWsa4rUJHacpMpUNgx",
1822
+ chainKey: ChainKeys.SOLANA_MAINNET,
1823
+ hubAsset: "0x02a88631e2fe0dd2169b6e9452e65e98b2c6f27e",
1824
+ vault: "0x02a88631e2fe0dd2169b6e9452e65e98b2c6f27e"
1825
+ },
1826
+ syrupUSDC: {
1827
+ symbol: "syrupUSDC",
1828
+ name: "syrupUSDC",
1829
+ decimals: 6,
1830
+ address: "AvZZF1YaZDziPY2RCK4oJrRVrbN3mTD9NL24hPeaZeUj",
1831
+ chainKey: ChainKeys.SOLANA_MAINNET,
1832
+ hubAsset: "0x2941198088fdac45d983798d1246f073fc36330f",
1833
+ vault: "0x2941198088fdac45d983798d1246f073fc36330f"
1834
+ },
1835
+ TRUMP: {
1836
+ symbol: "TRUMP",
1837
+ name: "Official Trump",
1838
+ decimals: 6,
1839
+ address: "6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
1840
+ chainKey: ChainKeys.SOLANA_MAINNET,
1841
+ hubAsset: "0xf5291267892347830b1a7b92a4061e8c28cc06fb",
1842
+ vault: "0xf5291267892347830b1a7b92a4061e8c28cc06fb"
1843
+ },
1844
+ USX: {
1845
+ symbol: "USX",
1846
+ name: "USX",
1847
+ decimals: 6,
1848
+ address: "6FrrzDk5mQARGc1TDYoyVnSyRdds1t4PbtohCD6p3tgG",
1849
+ chainKey: ChainKeys.SOLANA_MAINNET,
1850
+ hubAsset: "0x4f8b6611700fbf8aabfbcd595e0b33d23de89dd5",
1851
+ vault: "0x4f8b6611700fbf8aabfbcd595e0b33d23de89dd5"
1852
+ },
1853
+ xBTC: {
1854
+ symbol: "xBTC",
1855
+ name: "OKX Wrapped BTC",
1856
+ decimals: 8,
1857
+ address: "CtzPWv73Sn1dMGVU3ZtLv9yWSyUAanBni19YWDaznnkn",
1858
+ chainKey: ChainKeys.SOLANA_MAINNET,
1859
+ hubAsset: "0x4a47a698603c31e59d4c464d86dc6d54c60106df",
1860
+ vault: SodaTokens.sodaBTC.address
1861
+ },
1862
+ ZEC: {
1863
+ symbol: "ZEC",
1864
+ name: "OmniBridge Bridged Zcash (Solana)",
1865
+ decimals: 8,
1866
+ address: "A7bdiYdS5GjqGFtxf17ppRHtDKPkkRqbKtR27dxvQXaS",
1867
+ chainKey: ChainKeys.SOLANA_MAINNET,
1868
+ hubAsset: "0xdfce285d5bb2da89fab4212d06683a4699e90560",
1869
+ vault: SodaTokens.sodaZEC.address
1398
1870
  }
1399
1871
  };
1400
1872
  var avalancheSupportedTokens = {
@@ -1662,6 +2134,24 @@ var arbitrumSupportedTokens = {
1662
2134
  chainKey: ChainKeys.ARBITRUM_MAINNET,
1663
2135
  hubAsset: "0x68ff591a66f6b6c77bdf6463d88e8cb5578c8a53",
1664
2136
  vault: "0x68ff591a66f6b6c77bdf6463d88e8cb5578c8a53"
2137
+ },
2138
+ CHIP: {
2139
+ symbol: "CHIP",
2140
+ name: "USD.AI",
2141
+ decimals: 18,
2142
+ address: "0x0c1c1c109fe34733fca54b82d7b46b75cfb71f6e",
2143
+ chainKey: ChainKeys.ARBITRUM_MAINNET,
2144
+ hubAsset: "0x87a879e35027f55655a3b4540cf71e27c28e8116",
2145
+ vault: "0x87a879e35027f55655a3b4540cf71e27c28e8116"
2146
+ },
2147
+ RAIN: {
2148
+ symbol: "RAIN",
2149
+ name: "Rain",
2150
+ decimals: 18,
2151
+ address: "0x25118290e6a5f4139381d072181157035864099d",
2152
+ chainKey: ChainKeys.ARBITRUM_MAINNET,
2153
+ hubAsset: "0x1ec7afdbd09dcd9e7bc9ec651a0826aa6bfd3ede",
2154
+ vault: "0x1ec7afdbd09dcd9e7bc9ec651a0826aa6bfd3ede"
1665
2155
  }
1666
2156
  };
1667
2157
  var baseSupportedTokens = {
@@ -1800,6 +2290,51 @@ var baseSupportedTokens = {
1800
2290
  chainKey: ChainKeys.BASE_MAINNET,
1801
2291
  hubAsset: "0x7e1af5084ac6f15afa97a5525b2e35a804e80b01",
1802
2292
  vault: "0x7e1af5084ac6f15afa97a5525b2e35a804e80b01"
2293
+ },
2294
+ AAVE: {
2295
+ symbol: "AAVE",
2296
+ name: "Aave",
2297
+ decimals: 18,
2298
+ address: "0x63706e401c06ac8513145b7687a14804d17f814b",
2299
+ chainKey: ChainKeys.BASE_MAINNET,
2300
+ hubAsset: "0x4e525b4b09092ef4b8e142daf13eb20e0b2191c3",
2301
+ vault: "0x4e525b4b09092ef4b8e142daf13eb20e0b2191c3"
2302
+ },
2303
+ JitoSOL: {
2304
+ symbol: "JitoSOL",
2305
+ name: "Jito Staked SOL",
2306
+ decimals: 9,
2307
+ address: "0x97be14dd8f994a5364573bc035d85309e7cb34de",
2308
+ chainKey: ChainKeys.BASE_MAINNET,
2309
+ hubAsset: "0x16153346be11f0a3bfd586d4bd087199a94dae3c",
2310
+ vault: SodaTokens.sodaJITOSOL.address
2311
+ },
2312
+ SOL: {
2313
+ symbol: "SOL",
2314
+ name: "Base Bridged SOL (Base)",
2315
+ decimals: 9,
2316
+ address: "0x311935cd80b76769bf2ecc9d8ab7635b2139cf82",
2317
+ chainKey: ChainKeys.BASE_MAINNET,
2318
+ hubAsset: "0x53b6274b1d0d655084dda1c0a9f2330256374b84",
2319
+ vault: SodaTokens.sodaSOL.address
2320
+ },
2321
+ VVV: {
2322
+ symbol: "VVV",
2323
+ name: "Venice Token",
2324
+ decimals: 18,
2325
+ address: "0xacfe6019ed1a7dc6f7b508c02d1b04ec88cc21bf",
2326
+ chainKey: ChainKeys.BASE_MAINNET,
2327
+ hubAsset: "0x8451569f3b251670df4fef74721517bcbd4af00e",
2328
+ vault: "0x8451569f3b251670df4fef74721517bcbd4af00e"
2329
+ },
2330
+ ZEN: {
2331
+ symbol: "ZEN",
2332
+ name: "Horizen",
2333
+ decimals: 18,
2334
+ address: "0xf43eb8de897fbc7f2502483b2bef7bb9ea179229",
2335
+ chainKey: ChainKeys.BASE_MAINNET,
2336
+ hubAsset: "0x61d95d519907daa3cf505420b0d3c8607cd9f921",
2337
+ vault: "0x61d95d519907daa3cf505420b0d3c8607cd9f921"
1803
2338
  }
1804
2339
  };
1805
2340
  var optimismSupportedTokens = {
@@ -2065,6 +2600,51 @@ var bscSupportedTokens = {
2065
2600
  chainKey: ChainKeys.BSC_MAINNET,
2066
2601
  hubAsset: "0xdab003b59749fe08fad6e0e7685f31bbcf4cbd6e",
2067
2602
  vault: "0xdab003b59749fe08fad6e0e7685f31bbcf4cbd6e"
2603
+ },
2604
+ FF: {
2605
+ symbol: "FF",
2606
+ name: "Falcon Finance",
2607
+ decimals: 18,
2608
+ address: "0xac23b90a79504865d52b49b327328411a23d4db2",
2609
+ chainKey: ChainKeys.BSC_MAINNET,
2610
+ hubAsset: "0x2a3c409f26b0ac54889172f20441c25941b3c745",
2611
+ vault: "0x2a3c409f26b0ac54889172f20441c25941b3c745"
2612
+ },
2613
+ PENDLE: {
2614
+ symbol: "PENDLE",
2615
+ name: "Pendle",
2616
+ decimals: 18,
2617
+ address: "0xb3ed0a426155b79b898849803e3b36552f7ed507",
2618
+ chainKey: ChainKeys.BSC_MAINNET,
2619
+ hubAsset: "0xc059a10554d4e9a1dc4792db40ddf5137973b473",
2620
+ vault: "0xc059a10554d4e9a1dc4792db40ddf5137973b473"
2621
+ },
2622
+ STABLE: {
2623
+ symbol: "STABLE",
2624
+ name: "Stable",
2625
+ decimals: 18,
2626
+ address: "0x011ebe7d75e2c9d1e0bd0be0bef5c36f0a90075f",
2627
+ chainKey: ChainKeys.BSC_MAINNET,
2628
+ hubAsset: "0x4b7f7a7fcb3b45d41ab6c6727b0c1aeedc62aea7",
2629
+ vault: "0x4b7f7a7fcb3b45d41ab6c6727b0c1aeedc62aea7"
2630
+ },
2631
+ TUSD: {
2632
+ symbol: "TUSD",
2633
+ name: "TrueUSD",
2634
+ decimals: 18,
2635
+ address: "0x40af3827f39d0eacbf4a168f8d4ee67c121d11c9",
2636
+ chainKey: ChainKeys.BSC_MAINNET,
2637
+ hubAsset: "0x0ab0d545288137382d388ec679641de9f231f7fa",
2638
+ vault: "0x0ab0d545288137382d388ec679641de9f231f7fa"
2639
+ },
2640
+ U: {
2641
+ symbol: "U",
2642
+ name: "United Stables",
2643
+ decimals: 18,
2644
+ address: "0xce24439f2d9c6a2289f741120fe202248b666666",
2645
+ chainKey: ChainKeys.BSC_MAINNET,
2646
+ hubAsset: "0xd0c38d58d592ef223c5331673a189795e0f5510c",
2647
+ vault: "0xd0c38d58d592ef223c5331673a189795e0f5510c"
2068
2648
  }
2069
2649
  };
2070
2650
  var polygonSupportedTokens = {
@@ -2885,6 +3465,226 @@ var stellarSupportedTokens = {
2885
3465
  hubAsset: "0x83ac05C492188B46dd15d5611dEEFA6b23c7D479",
2886
3466
  vault: SodaTokens.BABA.address
2887
3467
  },
3468
+ AMC: {
3469
+ symbol: "AMC",
3470
+ isRwa: true,
3471
+ name: "AMC Entertainment",
3472
+ decimals: 7,
3473
+ address: "CAEBWGQGYLLN3KHAGEW6VNDS7FQL3MAIDPMAU6P3AHHI5YW5VGOE72LL",
3474
+ chainKey: ChainKeys.STELLAR_MAINNET,
3475
+ hubAsset: "0x471D107F02D5DD5aF08346d01b07D2fA13F65115",
3476
+ vault: SodaTokens.AMC.address
3477
+ },
3478
+ HIMS: {
3479
+ symbol: "HIMS",
3480
+ isRwa: true,
3481
+ name: "Hims & Hers Health",
3482
+ decimals: 7,
3483
+ address: "CCCDVTRZNHCG52ZXSNTBLMZC2GQXMR3YZY7MZWQFQ3DAUF52LZD6N6SV",
3484
+ chainKey: ChainKeys.STELLAR_MAINNET,
3485
+ hubAsset: "0x849B9ec418261192904089aBd3E80f1EB17AA83a",
3486
+ vault: SodaTokens.HIMS.address
3487
+ },
3488
+ LLY: {
3489
+ symbol: "LLY",
3490
+ isRwa: true,
3491
+ name: "Eli Lilly",
3492
+ decimals: 7,
3493
+ address: "CAR37LJDK2PHTO2NJKKYGHQGP2SY5QIM4WADLDYWGH3THY2O3XU53KI5",
3494
+ chainKey: ChainKeys.STELLAR_MAINNET,
3495
+ hubAsset: "0x20dDDBff2D8fDce44D95920e4748e1CaE004FeC3",
3496
+ vault: SodaTokens.LLY.address
3497
+ },
3498
+ COST: {
3499
+ symbol: "COST",
3500
+ isRwa: true,
3501
+ name: "Costco",
3502
+ decimals: 7,
3503
+ address: "CBACMBV6OO6MB6S4NB4V7IPFKPOZCVL22GZG3QIRVUXDPT3B33PIQGUK",
3504
+ chainKey: ChainKeys.STELLAR_MAINNET,
3505
+ hubAsset: "0x689812d91ef4D11acCA310B8aE5577135919cdF0",
3506
+ vault: SodaTokens.COST.address
3507
+ },
3508
+ TTWO: {
3509
+ symbol: "TTWO",
3510
+ isRwa: true,
3511
+ name: "Take-Two Interactive Software",
3512
+ decimals: 7,
3513
+ address: "CCUIUDZ7ZDBVSOBJG2HO2TNUDLOUBMKZB46NMFKIKITOOUDUKSSOOUI2",
3514
+ chainKey: ChainKeys.STELLAR_MAINNET,
3515
+ hubAsset: "0x7FaabA42Bb7140f3e3A022052B320BA66D82eB99",
3516
+ vault: SodaTokens.TTWO.address
3517
+ },
3518
+ RBLX: {
3519
+ symbol: "RBLX",
3520
+ isRwa: true,
3521
+ name: "Roblox",
3522
+ decimals: 7,
3523
+ address: "CA7QG7YKEIZRO7CWBJOTZ3SSDSLPOZOGIJFFXHNYWFU5Q32ZHYISMUAS",
3524
+ chainKey: ChainKeys.STELLAR_MAINNET,
3525
+ hubAsset: "0xaB7730d17B135e91A7b6Ec09a5e216e8873EF365",
3526
+ vault: SodaTokens.RBLX.address
3527
+ },
3528
+ IBM: {
3529
+ symbol: "IBM",
3530
+ isRwa: true,
3531
+ name: "IBM",
3532
+ decimals: 7,
3533
+ address: "CAD7GTZSDJOMR7N66CQT7TX6253WW6UC25MBV7GTZWD2A4EEQD2F64DM",
3534
+ chainKey: ChainKeys.STELLAR_MAINNET,
3535
+ hubAsset: "0xcA7Ffa5C53E63A9b58c48BB0CC2200e192CC1eAd",
3536
+ vault: SodaTokens.IBM.address
3537
+ },
3538
+ MRNA: {
3539
+ symbol: "MRNA",
3540
+ isRwa: true,
3541
+ name: "Moderna",
3542
+ decimals: 7,
3543
+ address: "CB5DSRUATRWXLUTWBIYHBZ4NPUODQWBSM3K3LKSASXCVTPTINX5TGYR6",
3544
+ chainKey: ChainKeys.STELLAR_MAINNET,
3545
+ hubAsset: "0x9603C58bF10DBBdda5ACD0b702D3C094b7d120fD",
3546
+ vault: SodaTokens.MRNA.address
3547
+ },
3548
+ LULU: {
3549
+ symbol: "LULU",
3550
+ isRwa: true,
3551
+ name: "Lululemon",
3552
+ decimals: 7,
3553
+ address: "CAOURCGE6GBFMP2NCP7IU2NFS4TTQTUD47OV65I25QUNE5K4D3U7HQ6G",
3554
+ chainKey: ChainKeys.STELLAR_MAINNET,
3555
+ hubAsset: "0x6e92098f60D06Dd71d2599098970Bb176d4362C0",
3556
+ vault: SodaTokens.LULU.address
3557
+ },
3558
+ SNAP: {
3559
+ symbol: "SNAP",
3560
+ isRwa: true,
3561
+ name: "Snap",
3562
+ decimals: 7,
3563
+ address: "CBZJXY6XMLMEAT6CGIWX7XWOYUZULCCZ37CPHLHR3XBV2FNI3WFIEHAT",
3564
+ chainKey: ChainKeys.STELLAR_MAINNET,
3565
+ hubAsset: "0xD87110E103aFbF0a66EbAd9d41C1C837A8818331",
3566
+ vault: SodaTokens.SNAP.address
3567
+ },
3568
+ WYFI: {
3569
+ symbol: "WYFI",
3570
+ isRwa: true,
3571
+ name: "WhiteFiber, Inc.",
3572
+ decimals: 7,
3573
+ address: "CAGFLIVHJ3P7Z5LUC74SJY4FFILFO2C3NBHQUQYYDMMANAOV2BHLW6VQ",
3574
+ chainKey: ChainKeys.STELLAR_MAINNET,
3575
+ hubAsset: "0x71eAA758eD96E9520d7c16273C4A9A4839E76703",
3576
+ vault: SodaTokens.WYFI.address
3577
+ },
3578
+ RIVN: {
3579
+ symbol: "RIVN",
3580
+ isRwa: true,
3581
+ name: "Rivian Automotive",
3582
+ decimals: 7,
3583
+ address: "CDVW2KKRGBHWAMYXD5KFRC65XCNQ6QMPF27TCJGK56EB4DVO4BANRC3H",
3584
+ chainKey: ChainKeys.STELLAR_MAINNET,
3585
+ hubAsset: "0x475bB93b8d57804a70dc4ec60F7B916e19eA2e41",
3586
+ vault: SodaTokens.RIVN.address
3587
+ },
3588
+ NFLX: {
3589
+ symbol: "NFLX",
3590
+ isRwa: true,
3591
+ name: "Netflix",
3592
+ decimals: 7,
3593
+ address: "CB5REEJVITH4X6OKVK3DK7JOTTF66MNUGYTIVVWHVZ27LXF7YOWWGFMB",
3594
+ chainKey: ChainKeys.STELLAR_MAINNET,
3595
+ hubAsset: "0xF3682dFEFE513DB0AD4442E017B454F3f50504D0",
3596
+ vault: SodaTokens.NFLX.address
3597
+ },
3598
+ BULL: {
3599
+ symbol: "BULL",
3600
+ isRwa: true,
3601
+ name: "Webull",
3602
+ decimals: 7,
3603
+ address: "CBEHZ6M6YMFFZRSYOKBOXOP3Y4WKTOLTFIQ4HLJ7SCTXL6GCOT7XSCJP",
3604
+ chainKey: ChainKeys.STELLAR_MAINNET,
3605
+ hubAsset: "0x57c0050Cf12e0a0996549FF9502F32a4e16D40D0",
3606
+ vault: SodaTokens.BULL.address
3607
+ },
3608
+ QUBT: {
3609
+ symbol: "QUBT",
3610
+ isRwa: true,
3611
+ name: "Quantum Computing",
3612
+ decimals: 7,
3613
+ address: "CAU6WBKWYDOEJMZLEJPKBSR7YG5FY7XIXNQH7FB6G4PJYBJHDZKERVOQ",
3614
+ chainKey: ChainKeys.STELLAR_MAINNET,
3615
+ hubAsset: "0x7B751c01B2350Af27C030ecA45260ddFf460ef92",
3616
+ vault: SodaTokens.QUBT.address
3617
+ },
3618
+ NET: {
3619
+ symbol: "NET",
3620
+ isRwa: true,
3621
+ name: "Cloudflare, Inc. Class A common stock",
3622
+ decimals: 7,
3623
+ address: "CANVGKHGU2E4ZHWUQMDG54DHO6GAOGUZB6QFF5WCQN46ZISQV7AAL3PN",
3624
+ chainKey: ChainKeys.STELLAR_MAINNET,
3625
+ hubAsset: "0x19CA1536e5D139c172D5E58778579DEd6F6c4BCB",
3626
+ vault: SodaTokens.NET.address
3627
+ },
3628
+ SKHY: {
3629
+ symbol: "SKHY",
3630
+ isRwa: true,
3631
+ name: "SK hynix Inc. American Depositary Shares",
3632
+ decimals: 7,
3633
+ address: "CBLDWO73ZGWFNWNHGN7JFNMOKIBUCPGSDNEJY2QS4LTDBJDUP52YA7IU",
3634
+ chainKey: ChainKeys.STELLAR_MAINNET,
3635
+ hubAsset: "0x691A0cD41a87ca258946af2CAd245b15161183FA",
3636
+ vault: SodaTokens.SKHY.address
3637
+ },
3638
+ JNJ: {
3639
+ symbol: "JNJ",
3640
+ isRwa: true,
3641
+ name: "Johnson & Johnson",
3642
+ decimals: 7,
3643
+ address: "CBQNN6DIY2VSS75U5563LUWQLTVFKKPW3RQFRMIGTLMCN4QAOHAENMGY",
3644
+ chainKey: ChainKeys.STELLAR_MAINNET,
3645
+ hubAsset: "0xA2039a69dCfa7557923bBACA8672D28785AF52F7",
3646
+ vault: SodaTokens.JNJ.address
3647
+ },
3648
+ UPS: {
3649
+ symbol: "UPS",
3650
+ isRwa: true,
3651
+ name: "UPS",
3652
+ decimals: 7,
3653
+ address: "CCTOGJ6YDHLVGKEFFRIHH7CCLETLEEZV4YMQ3PL7SI23GEMGK5JK3SRB",
3654
+ chainKey: ChainKeys.STELLAR_MAINNET,
3655
+ hubAsset: "0xdD7daA1e8E91dD46a7A02a27DB28e0CcBbC3C292",
3656
+ vault: SodaTokens.UPS.address
3657
+ },
3658
+ DJT: {
3659
+ symbol: "DJT",
3660
+ isRwa: true,
3661
+ name: "Trump Media & Technology Group",
3662
+ decimals: 7,
3663
+ address: "CBTD75GNN5MQ5O4HGGNDNPYVCJYSGGPU66J25WAM3CQ7GNOK6ZDC2YJX",
3664
+ chainKey: ChainKeys.STELLAR_MAINNET,
3665
+ hubAsset: "0xA4d07826cf232bd982a320f6ACB2A1188D5F44aa",
3666
+ vault: SodaTokens.DJT.address
3667
+ },
3668
+ RDDT: {
3669
+ symbol: "RDDT",
3670
+ isRwa: true,
3671
+ name: "Reddit",
3672
+ decimals: 7,
3673
+ address: "CCL6EU763SIZW4LWKZHRMM5HF75GHLWNFLL7TVMFN42ZL35UYEEPGZJ6",
3674
+ chainKey: ChainKeys.STELLAR_MAINNET,
3675
+ hubAsset: "0x9da4d4abb624684a39a881D9cBd383314e42ab19",
3676
+ vault: SodaTokens.RDDT.address
3677
+ },
3678
+ GLD: {
3679
+ symbol: "GLD",
3680
+ isRwa: true,
3681
+ name: "SPDR Gold Trust",
3682
+ decimals: 7,
3683
+ address: "CB7ZOXYL3NZMO4J3WRG6DVQDS5VYABSKLH4SF6FEYHVEXTNYAPXZI4DC",
3684
+ chainKey: ChainKeys.STELLAR_MAINNET,
3685
+ hubAsset: "0xBb2db74ad01e2F5F828f1cb1E7568010Fa728B95",
3686
+ vault: SodaTokens.GLD.address
3687
+ },
2888
3688
  EURC: {
2889
3689
  symbol: "EURC",
2890
3690
  name: "EURC",
@@ -3048,6 +3848,15 @@ var suiSupportedTokens = {
3048
3848
  chainKey: ChainKeys.SUI_MAINNET,
3049
3849
  hubAsset: "0x2037d840f01e903e09e33b146f2dd3fa4a4d2c21",
3050
3850
  vault: "0x2037d840f01e903e09e33b146f2dd3fa4a4d2c21"
3851
+ },
3852
+ USDY: {
3853
+ symbol: "USDY",
3854
+ name: "Ondo US Dollar Yield",
3855
+ decimals: 6,
3856
+ address: "0x960b531667636f39e85867775f52f6b1f220a058c4de786905bdf761e06a56bb::usdy::USDY",
3857
+ chainKey: ChainKeys.SUI_MAINNET,
3858
+ hubAsset: "0x04dc969dc822f1b45d354b8fc296b23f5b924176",
3859
+ vault: "0x04dc969dc822f1b45d354b8fc296b23f5b924176"
3051
3860
  }
3052
3861
  };
3053
3862
  var iconSupportedTokens = {
@@ -3446,6 +4255,123 @@ var ethereumSupportedTokens = {
3446
4255
  chainKey: ChainKeys.ETHEREUM_MAINNET,
3447
4256
  hubAsset: "0x081e274ec570bdb023f1b41c54df0f3f73da8924",
3448
4257
  vault: "0x081e274ec570bdb023f1b41c54df0f3f73da8924"
4258
+ },
4259
+ AUSD: {
4260
+ symbol: "AUSD",
4261
+ name: "AUSD",
4262
+ decimals: 6,
4263
+ address: "0x00000000efe302beaa2b3e6e1b18d08d69a9012a",
4264
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4265
+ hubAsset: "0xa5c8482ba138872dc844dd4b15aaa21490d064ec",
4266
+ vault: "0xa5c8482ba138872dc844dd4b15aaa21490d064ec"
4267
+ },
4268
+ cirBTC: {
4269
+ symbol: "cirBTC",
4270
+ name: "Circle Wrapped BTC",
4271
+ decimals: 8,
4272
+ address: "0x72dfb2e44f59c5ad2bafe84314e5b99a7cd5075e",
4273
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4274
+ hubAsset: "0x1316179f1c6b6f2658f96bfe0bab59d0b03c7fd3",
4275
+ vault: SodaTokens.sodaBTC.address
4276
+ },
4277
+ CRV: {
4278
+ symbol: "CRV",
4279
+ name: "Curve DAO",
4280
+ decimals: 18,
4281
+ address: "0xd533a949740bb3306d119cc777fa900ba034cd52",
4282
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4283
+ hubAsset: "0x0f39fe572ff21675ba88dab6a60f824eae12a897",
4284
+ vault: "0x0f39fe572ff21675ba88dab6a60f824eae12a897"
4285
+ },
4286
+ EURC: {
4287
+ symbol: "EURC",
4288
+ name: "EURC",
4289
+ decimals: 6,
4290
+ address: "0x1abaea1f7c830bd89acc67ec4af516284b1bc33c",
4291
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4292
+ hubAsset: "0x0e5bf34dfd21c45934c342c3bc6bc76bf467b365",
4293
+ vault: "0x0e5bf34dfd21c45934c342c3bc6bc76bf467b365"
4294
+ },
4295
+ ICP: {
4296
+ symbol: "ICP",
4297
+ name: "Internet Computer",
4298
+ decimals: 8,
4299
+ address: "0x00f3c42833c3170159af4e92dbb451fb3f708917",
4300
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4301
+ hubAsset: "0x33ffb6bbe55f7e1081efe5ce95c2767937154b52",
4302
+ vault: "0x33ffb6bbe55f7e1081efe5ce95c2767937154b52"
4303
+ },
4304
+ kBTC: {
4305
+ symbol: "kBTC",
4306
+ name: "Kraken Wrapped BTC",
4307
+ decimals: 8,
4308
+ address: "0x73e0c0d45e048d25fc26fa3159b0aa04bfa4db98",
4309
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4310
+ hubAsset: "0xa42f8bae7a463f492ca81df8ab319a1177df586c",
4311
+ vault: SodaTokens.sodaBTC.address
4312
+ },
4313
+ NEAR: {
4314
+ symbol: "NEAR",
4315
+ name: "Rainbow Bridged Near (Ethereum)",
4316
+ decimals: 24,
4317
+ address: "0x85f17cf997934a597031b2e18a9ab6ebd4b9f6a4",
4318
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4319
+ hubAsset: "0x9295415078420d6d736aafa303430e24e89b0740",
4320
+ vault: SodaTokens.sodaNEAR.address
4321
+ },
4322
+ ONDO: {
4323
+ symbol: "ONDO",
4324
+ name: "Ondo",
4325
+ decimals: 18,
4326
+ address: "0xfaba6f8e4a5e8ab82f62fe7c39859fa577269be3",
4327
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4328
+ hubAsset: "0xe1fc12564dfb98c5aca98354ae4810d608600fa4",
4329
+ vault: "0xe1fc12564dfb98c5aca98354ae4810d608600fa4"
4330
+ },
4331
+ QNT: {
4332
+ symbol: "QNT",
4333
+ name: "Quant",
4334
+ decimals: 18,
4335
+ address: "0x4a220e6096b25eadb88358cb44068a3248254675",
4336
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4337
+ hubAsset: "0x65094257d27a71ffe4d7e9fef63c5243c885a7d1",
4338
+ vault: "0x65094257d27a71ffe4d7e9fef63c5243c885a7d1"
4339
+ },
4340
+ SOL: {
4341
+ symbol: "SOL",
4342
+ name: "Wormhole Bridged WSOL",
4343
+ decimals: 9,
4344
+ address: "0xd31a59c85ae9d8edefec411d448f90841571b89c",
4345
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4346
+ hubAsset: "0x3bb9c57dc70f33aa67fc33d7f88b9a2c5b1b392f",
4347
+ vault: SodaTokens.sodaSOL.address
4348
+ },
4349
+ tBTC: {
4350
+ symbol: "tBTC",
4351
+ name: "tBTC",
4352
+ decimals: 18,
4353
+ address: "0x18084fba666a33d37592fa2633fd49a74dd93a88",
4354
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4355
+ hubAsset: "0x79ce2f30c941308286f09ef5d815a14ad5830be3",
4356
+ vault: SodaTokens.sodaBTC.address
4357
+ },
4358
+ wM: {
4359
+ symbol: "wM",
4360
+ name: "WrappedM by M0",
4361
+ decimals: 6,
4362
+ address: "0x437cc33344a0b27a429f795ff6b469c72698b291",
4363
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4364
+ hubAsset: "0x512188ae67298355088c659c29bb2f78650c066a",
4365
+ vault: "0x512188ae67298355088c659c29bb2f78650c066a"
4366
+ },
4367
+ wTAO: {
4368
+ symbol: "wTAO",
4369
+ name: "Wrapped TAO",
4370
+ decimals: 9,
4371
+ address: "0x77e06c9eccf2e797fd462a92b6d7642ef85b0a44",
4372
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4373
+ hubAsset: "0xf0db27b881f28794b3a18bee0be18570ca60b966",
4374
+ vault: "0xf0db27b881f28794b3a18bee0be18570ca60b966"
3449
4375
  }
3450
4376
  };
3451
4377
  var kaiaSupportedTokens = {
@@ -3870,6 +4796,226 @@ var hederaSupportedTokens = {
3870
4796
  chainKey: ChainKeys.HEDERA_MAINNET,
3871
4797
  hubAsset: "0x5e69df859F7c2b170E5fdAdbD59d06C2CD287753",
3872
4798
  vault: SodaTokens.BABA.address
4799
+ },
4800
+ AMC: {
4801
+ symbol: "AMC",
4802
+ isRwa: true,
4803
+ name: "AMC Entertainment",
4804
+ decimals: 8,
4805
+ address: "0x0000000000000000000000000000000000a6d310",
4806
+ chainKey: ChainKeys.HEDERA_MAINNET,
4807
+ hubAsset: "0xb86Ace2530E54C98088566dD39550b4B061F47BD",
4808
+ vault: SodaTokens.AMC.address
4809
+ },
4810
+ HIMS: {
4811
+ symbol: "HIMS",
4812
+ isRwa: true,
4813
+ name: "Hims & Hers Health",
4814
+ decimals: 8,
4815
+ address: "0x0000000000000000000000000000000000a6d311",
4816
+ chainKey: ChainKeys.HEDERA_MAINNET,
4817
+ hubAsset: "0x28a4d8ef8f19e38B0C5c7EBfC865BB489E7C45d9",
4818
+ vault: SodaTokens.HIMS.address
4819
+ },
4820
+ LLY: {
4821
+ symbol: "LLY",
4822
+ isRwa: true,
4823
+ name: "Eli Lilly",
4824
+ decimals: 8,
4825
+ address: "0x0000000000000000000000000000000000a6d312",
4826
+ chainKey: ChainKeys.HEDERA_MAINNET,
4827
+ hubAsset: "0x31FC4A71799De07E901ea0b93aD8f641F0B89b6e",
4828
+ vault: SodaTokens.LLY.address
4829
+ },
4830
+ COST: {
4831
+ symbol: "COST",
4832
+ isRwa: true,
4833
+ name: "Costco",
4834
+ decimals: 8,
4835
+ address: "0x0000000000000000000000000000000000a6d313",
4836
+ chainKey: ChainKeys.HEDERA_MAINNET,
4837
+ hubAsset: "0x475248AffC8646323Eb610090751Cb40B3204122",
4838
+ vault: SodaTokens.COST.address
4839
+ },
4840
+ TTWO: {
4841
+ symbol: "TTWO",
4842
+ isRwa: true,
4843
+ name: "Take-Two Interactive Software",
4844
+ decimals: 8,
4845
+ address: "0x0000000000000000000000000000000000a6d314",
4846
+ chainKey: ChainKeys.HEDERA_MAINNET,
4847
+ hubAsset: "0xA56E033e2DF215d1F7d3BB82B8FbDC5564cE1F80",
4848
+ vault: SodaTokens.TTWO.address
4849
+ },
4850
+ RBLX: {
4851
+ symbol: "RBLX",
4852
+ isRwa: true,
4853
+ name: "Roblox",
4854
+ decimals: 8,
4855
+ address: "0x0000000000000000000000000000000000a6d315",
4856
+ chainKey: ChainKeys.HEDERA_MAINNET,
4857
+ hubAsset: "0xDBfeB85cc06DE2BB219b053Aa17e04F92921E340",
4858
+ vault: SodaTokens.RBLX.address
4859
+ },
4860
+ IBM: {
4861
+ symbol: "IBM",
4862
+ isRwa: true,
4863
+ name: "IBM",
4864
+ decimals: 8,
4865
+ address: "0x0000000000000000000000000000000000a6d316",
4866
+ chainKey: ChainKeys.HEDERA_MAINNET,
4867
+ hubAsset: "0xd05531715d7DAC111D964763549b96592aD517Be",
4868
+ vault: SodaTokens.IBM.address
4869
+ },
4870
+ MRNA: {
4871
+ symbol: "MRNA",
4872
+ isRwa: true,
4873
+ name: "Moderna",
4874
+ decimals: 8,
4875
+ address: "0x0000000000000000000000000000000000a6d317",
4876
+ chainKey: ChainKeys.HEDERA_MAINNET,
4877
+ hubAsset: "0x85677b9b106F5Aac4A299Bf877e1f9d5aAab32AF",
4878
+ vault: SodaTokens.MRNA.address
4879
+ },
4880
+ LULU: {
4881
+ symbol: "LULU",
4882
+ isRwa: true,
4883
+ name: "Lululemon",
4884
+ decimals: 8,
4885
+ address: "0x0000000000000000000000000000000000a6d318",
4886
+ chainKey: ChainKeys.HEDERA_MAINNET,
4887
+ hubAsset: "0xCEB98aB1FCaF8730b52e620BDf76142809Fc918f",
4888
+ vault: SodaTokens.LULU.address
4889
+ },
4890
+ SNAP: {
4891
+ symbol: "SNAP",
4892
+ isRwa: true,
4893
+ name: "Snap",
4894
+ decimals: 8,
4895
+ address: "0x0000000000000000000000000000000000a6d319",
4896
+ chainKey: ChainKeys.HEDERA_MAINNET,
4897
+ hubAsset: "0xc49A760E018F0beB56AF90965e933766E95b33Eb",
4898
+ vault: SodaTokens.SNAP.address
4899
+ },
4900
+ WYFI: {
4901
+ symbol: "WYFI",
4902
+ isRwa: true,
4903
+ name: "WhiteFiber, Inc.",
4904
+ decimals: 8,
4905
+ address: "0x0000000000000000000000000000000000a6d31a",
4906
+ chainKey: ChainKeys.HEDERA_MAINNET,
4907
+ hubAsset: "0x40b8Db998c3ADB40D3D70840A61d1E5A429B9ee9",
4908
+ vault: SodaTokens.WYFI.address
4909
+ },
4910
+ RIVN: {
4911
+ symbol: "RIVN",
4912
+ isRwa: true,
4913
+ name: "Rivian Automotive",
4914
+ decimals: 8,
4915
+ address: "0x0000000000000000000000000000000000a6d31e",
4916
+ chainKey: ChainKeys.HEDERA_MAINNET,
4917
+ hubAsset: "0xFBAb60A36F411f9FE480470375a9d874D44B0C30",
4918
+ vault: SodaTokens.RIVN.address
4919
+ },
4920
+ NFLX: {
4921
+ symbol: "NFLX",
4922
+ isRwa: true,
4923
+ name: "Netflix",
4924
+ decimals: 8,
4925
+ address: "0x0000000000000000000000000000000000a6d320",
4926
+ chainKey: ChainKeys.HEDERA_MAINNET,
4927
+ hubAsset: "0x9a3936491230DF8f9cc31A359e01F9b7aE39734f",
4928
+ vault: SodaTokens.NFLX.address
4929
+ },
4930
+ BULL: {
4931
+ symbol: "BULL",
4932
+ isRwa: true,
4933
+ name: "Webull",
4934
+ decimals: 8,
4935
+ address: "0x0000000000000000000000000000000000a6d321",
4936
+ chainKey: ChainKeys.HEDERA_MAINNET,
4937
+ hubAsset: "0x4f2aa602a0AC19FBB522b92ad0D38CECA2fc339B",
4938
+ vault: SodaTokens.BULL.address
4939
+ },
4940
+ QUBT: {
4941
+ symbol: "QUBT",
4942
+ isRwa: true,
4943
+ name: "Quantum Computing",
4944
+ decimals: 8,
4945
+ address: "0x0000000000000000000000000000000000a6d322",
4946
+ chainKey: ChainKeys.HEDERA_MAINNET,
4947
+ hubAsset: "0xbd94DD5D028cDC2AB9d6aB3E2E1A7f437971aab4",
4948
+ vault: SodaTokens.QUBT.address
4949
+ },
4950
+ NET: {
4951
+ symbol: "NET",
4952
+ isRwa: true,
4953
+ name: "Cloudflare, Inc. Class A common stock",
4954
+ decimals: 8,
4955
+ address: "0x0000000000000000000000000000000000a6d323",
4956
+ chainKey: ChainKeys.HEDERA_MAINNET,
4957
+ hubAsset: "0x923b3cd076C856e4f4f9a3BCc1849e5e5B166C7B",
4958
+ vault: SodaTokens.NET.address
4959
+ },
4960
+ SKHY: {
4961
+ symbol: "SKHY",
4962
+ isRwa: true,
4963
+ name: "SK hynix Inc. American Depositary Shares",
4964
+ decimals: 8,
4965
+ address: "0x0000000000000000000000000000000000a6d324",
4966
+ chainKey: ChainKeys.HEDERA_MAINNET,
4967
+ hubAsset: "0x09023C636A3dc9c12c6E5673E17b6C0c4FA04EeD",
4968
+ vault: SodaTokens.SKHY.address
4969
+ },
4970
+ JNJ: {
4971
+ symbol: "JNJ",
4972
+ isRwa: true,
4973
+ name: "Johnson & Johnson",
4974
+ decimals: 8,
4975
+ address: "0x0000000000000000000000000000000000a6d327",
4976
+ chainKey: ChainKeys.HEDERA_MAINNET,
4977
+ hubAsset: "0xb2FD95F47cCd1e120a66a56fF4E147DB7AA08cfb",
4978
+ vault: SodaTokens.JNJ.address
4979
+ },
4980
+ UPS: {
4981
+ symbol: "UPS",
4982
+ isRwa: true,
4983
+ name: "UPS",
4984
+ decimals: 8,
4985
+ address: "0x0000000000000000000000000000000000a6d328",
4986
+ chainKey: ChainKeys.HEDERA_MAINNET,
4987
+ hubAsset: "0xc99c1FA55072B9e5a4616655B2D1A3fE7C9E990D",
4988
+ vault: SodaTokens.UPS.address
4989
+ },
4990
+ DJT: {
4991
+ symbol: "DJT",
4992
+ isRwa: true,
4993
+ name: "Trump Media & Technology Group",
4994
+ decimals: 8,
4995
+ address: "0x0000000000000000000000000000000000a567db",
4996
+ chainKey: ChainKeys.HEDERA_MAINNET,
4997
+ hubAsset: "0xD07524eeba69A5026597837eB46849f76dE1c187",
4998
+ vault: SodaTokens.DJT.address
4999
+ },
5000
+ RDDT: {
5001
+ symbol: "RDDT",
5002
+ isRwa: true,
5003
+ name: "Reddit",
5004
+ decimals: 8,
5005
+ address: "0x0000000000000000000000000000000000a567dd",
5006
+ chainKey: ChainKeys.HEDERA_MAINNET,
5007
+ hubAsset: "0xA32ABCa3605d1D84812F68E6c8bb773CaB8C2764",
5008
+ vault: SodaTokens.RDDT.address
5009
+ },
5010
+ GLD: {
5011
+ symbol: "GLD",
5012
+ isRwa: true,
5013
+ name: "SPDR Gold Trust",
5014
+ decimals: 8,
5015
+ address: "0x0000000000000000000000000000000000a567ef",
5016
+ chainKey: ChainKeys.HEDERA_MAINNET,
5017
+ hubAsset: "0x2A515DCe2ed73611B7ac2D63Aa1906A8D2c533EE",
5018
+ vault: SodaTokens.GLD.address
3873
5019
  }
3874
5020
  };
3875
5021
  var robinhoodSupportedTokens = {
@@ -4154,6 +5300,226 @@ var robinhoodSupportedTokens = {
4154
5300
  hubAsset: "0xf721a074bd9fc05ba1f7cb432149a74acfb49d73",
4155
5301
  vault: SodaTokens.BABA.address
4156
5302
  },
5303
+ AMC: {
5304
+ symbol: "AMC",
5305
+ isRwa: true,
5306
+ name: "AMC Entertainment",
5307
+ decimals: 18,
5308
+ address: "0x05a3d1Cd21d0C88145E82600E62e7E496e0F222B",
5309
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5310
+ hubAsset: "0x21cb0fab867942b44da9e2ff15dd865fb0d1a79e",
5311
+ vault: SodaTokens.AMC.address
5312
+ },
5313
+ HIMS: {
5314
+ symbol: "HIMS",
5315
+ isRwa: true,
5316
+ name: "Hims & Hers Health",
5317
+ decimals: 18,
5318
+ address: "0xCceE82fE024c36fA15E1005edE3E9e4787e23D09",
5319
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5320
+ hubAsset: "0x88422f01ba064aae528af488d3165b89b0e36467",
5321
+ vault: SodaTokens.HIMS.address
5322
+ },
5323
+ LLY: {
5324
+ symbol: "LLY",
5325
+ isRwa: true,
5326
+ name: "Eli Lilly",
5327
+ decimals: 18,
5328
+ address: "0x8005d266423c7ea827372c9c864491e5786600ea",
5329
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5330
+ hubAsset: "0x6ece6a22ea9ded1b146ba9e435bb31709a5e69b4",
5331
+ vault: SodaTokens.LLY.address
5332
+ },
5333
+ COST: {
5334
+ symbol: "COST",
5335
+ isRwa: true,
5336
+ name: "Costco",
5337
+ decimals: 18,
5338
+ address: "0x4EA005168D7F09a7A0Ba9D1DEf21a479950E44C2",
5339
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5340
+ hubAsset: "0xd6f93276dec116a3a0226a55266b90a03559adde",
5341
+ vault: SodaTokens.COST.address
5342
+ },
5343
+ TTWO: {
5344
+ symbol: "TTWO",
5345
+ isRwa: true,
5346
+ name: "Take-Two Interactive Software",
5347
+ decimals: 18,
5348
+ address: "0x5e81213613b6B86EaB4c6c50d718d34359459786",
5349
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5350
+ hubAsset: "0x125f946c4a7a82f6d1d14b82ae5ec6508a2a19e9",
5351
+ vault: SodaTokens.TTWO.address
5352
+ },
5353
+ RBLX: {
5354
+ symbol: "RBLX",
5355
+ isRwa: true,
5356
+ name: "Roblox",
5357
+ decimals: 18,
5358
+ address: "0xF0C4BF4C582cb3836e98394b1d4e7B7281101bE8",
5359
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5360
+ hubAsset: "0x22f63920a0c17f2565d01b88915a6f4281e41a95",
5361
+ vault: SodaTokens.RBLX.address
5362
+ },
5363
+ IBM: {
5364
+ symbol: "IBM",
5365
+ isRwa: true,
5366
+ name: "IBM",
5367
+ decimals: 18,
5368
+ address: "0x980dcf6766FA79f5Cf0c4AAdb3ab477ff15a9619",
5369
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5370
+ hubAsset: "0x3602c728c42bcf17d69b8a102e602c8a8fee3062",
5371
+ vault: SodaTokens.IBM.address
5372
+ },
5373
+ MRNA: {
5374
+ symbol: "MRNA",
5375
+ isRwa: true,
5376
+ name: "Moderna",
5377
+ decimals: 18,
5378
+ address: "0x43B07D15cE533bEc5476d70C22a78a1B2B662155",
5379
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5380
+ hubAsset: "0xda1db915a200f77cc4c7623b57fbe09f707fe7c9",
5381
+ vault: SodaTokens.MRNA.address
5382
+ },
5383
+ LULU: {
5384
+ symbol: "LULU",
5385
+ isRwa: true,
5386
+ name: "Lululemon",
5387
+ decimals: 18,
5388
+ address: "0x4e62068525Ab11FE768e29dfD00ef909B9803016",
5389
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5390
+ hubAsset: "0x42bc735dd95fca1719ba88682ef87c664a68fc08",
5391
+ vault: SodaTokens.LULU.address
5392
+ },
5393
+ SNAP: {
5394
+ symbol: "SNAP",
5395
+ isRwa: true,
5396
+ name: "Snap",
5397
+ decimals: 18,
5398
+ address: "0xF6589F11Bc40b669e584073F428B05562F568733",
5399
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5400
+ hubAsset: "0x77b96d73980b6cafe2b698a8c6adcb446de59653",
5401
+ vault: SodaTokens.SNAP.address
5402
+ },
5403
+ WYFI: {
5404
+ symbol: "WYFI",
5405
+ isRwa: true,
5406
+ name: "WhiteFiber, Inc.",
5407
+ decimals: 18,
5408
+ address: "0x9e7ABD3C9139D14E4c86DcE0e455AAB7A0C2FB3E",
5409
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5410
+ hubAsset: "0xb78266b11eff88e4b2bbfe653d636fa9d5fab5dd",
5411
+ vault: SodaTokens.WYFI.address
5412
+ },
5413
+ RIVN: {
5414
+ symbol: "RIVN",
5415
+ isRwa: true,
5416
+ name: "Rivian Automotive",
5417
+ decimals: 18,
5418
+ address: "0xB1BF26c1D20ff267A4f93550d1E0d06ac40a114B",
5419
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5420
+ hubAsset: "0x39f3b4c27d01db634315801a9263b50dcb9fe927",
5421
+ vault: SodaTokens.RIVN.address
5422
+ },
5423
+ NFLX: {
5424
+ symbol: "NFLX",
5425
+ isRwa: true,
5426
+ name: "Netflix",
5427
+ decimals: 18,
5428
+ address: "0xE0444EF8BF4eD74f74FD73686e2ddF4C1c5591E8",
5429
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5430
+ hubAsset: "0xbab4c41f3829dbd17c2e3cbd9b5fb11adbd487aa",
5431
+ vault: SodaTokens.NFLX.address
5432
+ },
5433
+ BULL: {
5434
+ symbol: "BULL",
5435
+ isRwa: true,
5436
+ name: "Webull",
5437
+ decimals: 18,
5438
+ address: "0xceF9027c7d6985b85f0BA431125073529A947A68",
5439
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5440
+ hubAsset: "0xbf7a5f902583144beb36d666fd7704b27d22c7c6",
5441
+ vault: SodaTokens.BULL.address
5442
+ },
5443
+ QUBT: {
5444
+ symbol: "QUBT",
5445
+ isRwa: true,
5446
+ name: "Quantum Computing",
5447
+ decimals: 18,
5448
+ address: "0x59818904ab4cE163b3cE4FfB64f2D6Ca02c434B4",
5449
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5450
+ hubAsset: "0x5e9f6b86b806c1602429bf9362b3eec8aa4f9235",
5451
+ vault: SodaTokens.QUBT.address
5452
+ },
5453
+ NET: {
5454
+ symbol: "NET",
5455
+ isRwa: true,
5456
+ name: "Cloudflare, Inc. Class A common stock",
5457
+ decimals: 18,
5458
+ address: "0x116F00968269B7bfbaD4109cE591d6E74c0601d4",
5459
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5460
+ hubAsset: "0xcc519c76fda41c3894021cd411d7df141a5c94e1",
5461
+ vault: SodaTokens.NET.address
5462
+ },
5463
+ SKHY: {
5464
+ symbol: "SKHY",
5465
+ isRwa: true,
5466
+ name: "SK hynix Inc. American Depositary Shares",
5467
+ decimals: 18,
5468
+ address: "0x84CAb63bc87912E71ad199ff14A0bA45de68FeF8",
5469
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5470
+ hubAsset: "0x04e561fb6e22b5e6bf2f4c5134afb3dad2265aa0",
5471
+ vault: SodaTokens.SKHY.address
5472
+ },
5473
+ JNJ: {
5474
+ symbol: "JNJ",
5475
+ isRwa: true,
5476
+ name: "Johnson & Johnson",
5477
+ decimals: 18,
5478
+ address: "0x03DfbBE0AC4E7bCDaFd08eD41A400326B77D8c80",
5479
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5480
+ hubAsset: "0x42f1912c483e1974ca7601e4e02164e0dfb57ceb",
5481
+ vault: SodaTokens.JNJ.address
5482
+ },
5483
+ UPS: {
5484
+ symbol: "UPS",
5485
+ isRwa: true,
5486
+ name: "UPS",
5487
+ decimals: 18,
5488
+ address: "0xf23250dac154D05Bb671CB0d0eBEf3c635c79CE2",
5489
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5490
+ hubAsset: "0xdb3394a4b4c8d1dd145945eb706624e307919051",
5491
+ vault: SodaTokens.UPS.address
5492
+ },
5493
+ DJT: {
5494
+ symbol: "DJT",
5495
+ isRwa: true,
5496
+ name: "Trump Media & Technology Group",
5497
+ decimals: 18,
5498
+ address: "0x1D11f0496982706C5e14A514D4E79F2e6BdE4516",
5499
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5500
+ hubAsset: "0x2027aa4839be98f9021c1608754cd793833e24ea",
5501
+ vault: SodaTokens.DJT.address
5502
+ },
5503
+ RDDT: {
5504
+ symbol: "RDDT",
5505
+ isRwa: true,
5506
+ name: "Reddit",
5507
+ decimals: 18,
5508
+ address: "0x05b37Fb53A299a1b874A619e1c4C404D52C36F4C",
5509
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5510
+ hubAsset: "0xec85b1ac463f8987c72d13dd3df4e4dc2f263dcf",
5511
+ vault: SodaTokens.RDDT.address
5512
+ },
5513
+ GLD: {
5514
+ symbol: "GLD",
5515
+ isRwa: true,
5516
+ name: "SPDR Gold Trust",
5517
+ decimals: 18,
5518
+ address: "0xC9a981FEE1F9DEc688bb123ccDeCc63D0deBFC4e",
5519
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5520
+ hubAsset: "0xe72fa58dc1ab501d530fbc98de2973f9cfaf37bc",
5521
+ vault: SodaTokens.GLD.address
5522
+ },
4157
5523
  PONS: {
4158
5524
  symbol: "PONS",
4159
5525
  name: "Pons",
@@ -4162,6 +5528,33 @@ var robinhoodSupportedTokens = {
4162
5528
  chainKey: ChainKeys.ROBINHOOD_MAINNET,
4163
5529
  hubAsset: "0x9cf6640c73dd4c278cfa08a8b8773e7b22420582",
4164
5530
  vault: "0x9cf6640c73dd4c278cfa08a8b8773e7b22420582"
5531
+ },
5532
+ AI: {
5533
+ symbol: "AI",
5534
+ name: "Artificial Inu",
5535
+ decimals: 18,
5536
+ address: "0x2e8c31162b855a2ffa90f6f8634643ad6f111e18",
5537
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5538
+ hubAsset: "0x1c56aaf3fc5a4517132d8bdc636a798f31ccf4b0",
5539
+ vault: "0x1c56aaf3fc5a4517132d8bdc636a798f31ccf4b0"
5540
+ },
5541
+ CASHCAT: {
5542
+ symbol: "CASHCAT",
5543
+ name: "Cash Cat",
5544
+ decimals: 18,
5545
+ address: "0x020bfc650a365f8bb26819deaabf3e21291018b4",
5546
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5547
+ hubAsset: "0x79150886ae702f6de9d36eb8748fcb9fcb483c2b",
5548
+ vault: "0x79150886ae702f6de9d36eb8748fcb9fcb483c2b"
5549
+ },
5550
+ TAO: {
5551
+ symbol: "TAO",
5552
+ name: "ForeverMoney Wrapped TAO",
5553
+ decimals: 18,
5554
+ address: "0xf3081494b87e8d5fb7960f066e931d1d0e6e3d67",
5555
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5556
+ hubAsset: "0x4318e2fb5192256106e624565a64b6bb1c41e807",
5557
+ vault: "0x4318e2fb5192256106e624565a64b6bb1c41e807"
4165
5558
  }
4166
5559
  };
4167
5560
  var stacksSupportedTokens = {
@@ -4273,7 +5666,7 @@ var RelayChainIdMap = {
4273
5666
  };
4274
5667
  var INTENT_CHAIN_IDS = Object.values(RelayChainIdMap);
4275
5668
  var IntentRelayChainIdToChainKey = new Map(Object.entries(RelayChainIdMap).map(([chainKey, chainId]) => [chainId, chainKey]));
4276
- var CHAIN_LOGO_BASE_URL = "https://raw.githubusercontent.com/icon-project/sodax-sdks/main/packages/assets/chain";
5669
+ var CHAIN_LOGO_BASE_URL = "https://raw.githubusercontent.com/gosodax/sodax-sdks/main/packages/assets/chain";
4277
5670
  var chainLogo = (key) => `${CHAIN_LOGO_BASE_URL}/${key}.png`;
4278
5671
  var baseChainInfo = {
4279
5672
  [ChainKeys.SONIC_MAINNET]: {
@@ -5056,6 +6449,116 @@ var spokeChainConfig = {
5056
6449
  contractId: "CDARDTMGSEXTYJDSKDEAA52DCYX3OZEP7SOLSF5CT3QSSAGBETWH7LO3",
5057
6450
  assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
5058
6451
  },
6452
+ {
6453
+ assetCode: "AMC",
6454
+ contractId: "CAEBWGQGYLLN3KHAGEW6VNDS7FQL3MAIDPMAU6P3AHHI5YW5VGOE72LL",
6455
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6456
+ },
6457
+ {
6458
+ assetCode: "HIMS",
6459
+ contractId: "CCCDVTRZNHCG52ZXSNTBLMZC2GQXMR3YZY7MZWQFQ3DAUF52LZD6N6SV",
6460
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6461
+ },
6462
+ {
6463
+ assetCode: "LLY",
6464
+ contractId: "CAR37LJDK2PHTO2NJKKYGHQGP2SY5QIM4WADLDYWGH3THY2O3XU53KI5",
6465
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6466
+ },
6467
+ {
6468
+ assetCode: "COST",
6469
+ contractId: "CBACMBV6OO6MB6S4NB4V7IPFKPOZCVL22GZG3QIRVUXDPT3B33PIQGUK",
6470
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6471
+ },
6472
+ {
6473
+ assetCode: "TTWO",
6474
+ contractId: "CCUIUDZ7ZDBVSOBJG2HO2TNUDLOUBMKZB46NMFKIKITOOUDUKSSOOUI2",
6475
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6476
+ },
6477
+ {
6478
+ assetCode: "RBLX",
6479
+ contractId: "CA7QG7YKEIZRO7CWBJOTZ3SSDSLPOZOGIJFFXHNYWFU5Q32ZHYISMUAS",
6480
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6481
+ },
6482
+ {
6483
+ assetCode: "IBM",
6484
+ contractId: "CAD7GTZSDJOMR7N66CQT7TX6253WW6UC25MBV7GTZWD2A4EEQD2F64DM",
6485
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6486
+ },
6487
+ {
6488
+ assetCode: "MRNA",
6489
+ contractId: "CB5DSRUATRWXLUTWBIYHBZ4NPUODQWBSM3K3LKSASXCVTPTINX5TGYR6",
6490
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6491
+ },
6492
+ {
6493
+ assetCode: "LULU",
6494
+ contractId: "CAOURCGE6GBFMP2NCP7IU2NFS4TTQTUD47OV65I25QUNE5K4D3U7HQ6G",
6495
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6496
+ },
6497
+ {
6498
+ assetCode: "SNAP",
6499
+ contractId: "CBZJXY6XMLMEAT6CGIWX7XWOYUZULCCZ37CPHLHR3XBV2FNI3WFIEHAT",
6500
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6501
+ },
6502
+ {
6503
+ assetCode: "WYFI",
6504
+ contractId: "CAGFLIVHJ3P7Z5LUC74SJY4FFILFO2C3NBHQUQYYDMMANAOV2BHLW6VQ",
6505
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6506
+ },
6507
+ {
6508
+ assetCode: "RIVN",
6509
+ contractId: "CDVW2KKRGBHWAMYXD5KFRC65XCNQ6QMPF27TCJGK56EB4DVO4BANRC3H",
6510
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6511
+ },
6512
+ {
6513
+ assetCode: "NFLX",
6514
+ contractId: "CB5REEJVITH4X6OKVK3DK7JOTTF66MNUGYTIVVWHVZ27LXF7YOWWGFMB",
6515
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6516
+ },
6517
+ {
6518
+ assetCode: "BULL",
6519
+ contractId: "CBEHZ6M6YMFFZRSYOKBOXOP3Y4WKTOLTFIQ4HLJ7SCTXL6GCOT7XSCJP",
6520
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6521
+ },
6522
+ {
6523
+ assetCode: "QUBT",
6524
+ contractId: "CAU6WBKWYDOEJMZLEJPKBSR7YG5FY7XIXNQH7FB6G4PJYBJHDZKERVOQ",
6525
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6526
+ },
6527
+ {
6528
+ assetCode: "NET",
6529
+ contractId: "CANVGKHGU2E4ZHWUQMDG54DHO6GAOGUZB6QFF5WCQN46ZISQV7AAL3PN",
6530
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6531
+ },
6532
+ {
6533
+ assetCode: "SKHY",
6534
+ contractId: "CBLDWO73ZGWFNWNHGN7JFNMOKIBUCPGSDNEJY2QS4LTDBJDUP52YA7IU",
6535
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6536
+ },
6537
+ {
6538
+ assetCode: "JNJ",
6539
+ contractId: "CBQNN6DIY2VSS75U5563LUWQLTVFKKPW3RQFRMIGTLMCN4QAOHAENMGY",
6540
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6541
+ },
6542
+ {
6543
+ assetCode: "UPS",
6544
+ contractId: "CCTOGJ6YDHLVGKEFFRIHH7CCLETLEEZV4YMQ3PL7SI23GEMGK5JK3SRB",
6545
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6546
+ },
6547
+ {
6548
+ assetCode: "DJT",
6549
+ contractId: "CBTD75GNN5MQ5O4HGGNDNPYVCJYSGGPU66J25WAM3CQ7GNOK6ZDC2YJX",
6550
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6551
+ },
6552
+ {
6553
+ assetCode: "RDDT",
6554
+ contractId: "CCL6EU763SIZW4LWKZHRMM5HF75GHLWNFLL7TVMFN42ZL35UYEEPGZJ6",
6555
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6556
+ },
6557
+ {
6558
+ assetCode: "GLD",
6559
+ contractId: "CB7ZOXYL3NZMO4J3WRG6DVQDS5VYABSKLH4SF6FEYHVEXTNYAPXZI4DC",
6560
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6561
+ },
5059
6562
  {
5060
6563
  assetCode: "EURC",
5061
6564
  contractId: "CDTKPWPLOURQA2SGTKTUQOWRCBZEORB4BWBOMJ3D3ZTQQSGE5F6JBQLV",
@@ -5767,7 +7270,29 @@ var swapSupportedTokens = {
5767
7270
  SodaTokens.TSM,
5768
7271
  SodaTokens.AMD,
5769
7272
  SodaTokens.INTC,
5770
- SodaTokens.BABA
7273
+ SodaTokens.BABA,
7274
+ SodaTokens.AMC,
7275
+ SodaTokens.HIMS,
7276
+ SodaTokens.LLY,
7277
+ SodaTokens.COST,
7278
+ SodaTokens.TTWO,
7279
+ SodaTokens.RBLX,
7280
+ SodaTokens.IBM,
7281
+ SodaTokens.MRNA,
7282
+ SodaTokens.LULU,
7283
+ SodaTokens.SNAP,
7284
+ SodaTokens.WYFI,
7285
+ SodaTokens.RIVN,
7286
+ SodaTokens.NFLX,
7287
+ SodaTokens.BULL,
7288
+ SodaTokens.QUBT,
7289
+ SodaTokens.NET,
7290
+ SodaTokens.SKHY,
7291
+ SodaTokens.JNJ,
7292
+ SodaTokens.UPS,
7293
+ SodaTokens.DJT,
7294
+ SodaTokens.RDDT,
7295
+ SodaTokens.GLD
5771
7296
  ],
5772
7297
  [ChainKeys.AVALANCHE_MAINNET]: [
5773
7298
  spokeChainConfig[ChainKeys.AVALANCHE_MAINNET].supportedTokens.AVAX,
@@ -5798,8 +7323,10 @@ var swapSupportedTokens = {
5798
7323
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.SODA,
5799
7324
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.cbBTC,
5800
7325
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.GMX,
5801
- spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.DAI
7326
+ spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.DAI,
5802
7327
  // spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.USDS, // NOTE: Not Implemented
7328
+ spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.CHIP,
7329
+ spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.RAIN
5803
7330
  ],
5804
7331
  [ChainKeys.BASE_MAINNET]: [
5805
7332
  spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.ETH,
@@ -5812,8 +7339,13 @@ var swapSupportedTokens = {
5812
7339
  spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.cbETH,
5813
7340
  spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.SODA,
5814
7341
  spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.EURC,
5815
- spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.MORPHO
7342
+ spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.MORPHO,
5816
7343
  // spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.USDS, // NOTE: Not Implemented
7344
+ spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.AAVE,
7345
+ spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.JitoSOL,
7346
+ spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.SOL,
7347
+ spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.VVV,
7348
+ spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.ZEN
5817
7349
  ],
5818
7350
  [ChainKeys.OPTIMISM_MAINNET]: [
5819
7351
  spokeChainConfig[ChainKeys.OPTIMISM_MAINNET].supportedTokens.ETH,
@@ -5850,12 +7382,16 @@ var swapSupportedTokens = {
5850
7382
  spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.USD1,
5851
7383
  spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.ASTER,
5852
7384
  spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.XRP,
5853
- spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.ADA,
5854
7385
  spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.DOGE,
5855
7386
  spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.SOL,
5856
7387
  spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.DOT,
5857
7388
  spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.LINK,
5858
- spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.UNI
7389
+ spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.UNI,
7390
+ spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.FF,
7391
+ spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.PENDLE,
7392
+ spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.STABLE,
7393
+ spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.TUSD,
7394
+ spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.U
5859
7395
  ],
5860
7396
  [ChainKeys.HYPEREVM_MAINNET]: [
5861
7397
  spokeChainConfig[ChainKeys.HYPEREVM_MAINNET].supportedTokens.HYPE,
@@ -5917,7 +7453,28 @@ var swapSupportedTokens = {
5917
7453
  spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.USDG,
5918
7454
  spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.JupUSD,
5919
7455
  spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.USDe,
5920
- spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.USELESS
7456
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.USELESS,
7457
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens["2Z"],
7458
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.BP,
7459
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.CARDS,
7460
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.CASH,
7461
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.Fartcoin,
7462
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.GLDx,
7463
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.HOODx,
7464
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.HYPE,
7465
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.hyUSD,
7466
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.KMNO,
7467
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.LBTC,
7468
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.MET,
7469
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.ONYC,
7470
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.PENGU,
7471
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.SPCXx,
7472
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.STONK,
7473
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.syrupUSDC,
7474
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.TRUMP,
7475
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.USX,
7476
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.xBTC,
7477
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.ZEC
5921
7478
  ],
5922
7479
  [ChainKeys.ICON_MAINNET]: [
5923
7480
  spokeChainConfig[ChainKeys.ICON_MAINNET].supportedTokens.ICX,
@@ -5972,6 +7529,28 @@ var swapSupportedTokens = {
5972
7529
  spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.AMD,
5973
7530
  spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.INTC,
5974
7531
  spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.BABA,
7532
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.AMC,
7533
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.HIMS,
7534
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.LLY,
7535
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.COST,
7536
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.TTWO,
7537
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.RBLX,
7538
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.IBM,
7539
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.MRNA,
7540
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.LULU,
7541
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.SNAP,
7542
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.WYFI,
7543
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.RIVN,
7544
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.NFLX,
7545
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.BULL,
7546
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.QUBT,
7547
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.NET,
7548
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.SKHY,
7549
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.JNJ,
7550
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.UPS,
7551
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.DJT,
7552
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.RDDT,
7553
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.GLD,
5975
7554
  spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.EURC
5976
7555
  ],
5977
7556
  [ChainKeys.SUI_MAINNET]: [
@@ -5990,7 +7569,8 @@ var swapSupportedTokens = {
5990
7569
  spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.WAL,
5991
7570
  spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.NAVX,
5992
7571
  spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.USDsui,
5993
- spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.WBTC
7572
+ spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.WBTC,
7573
+ spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.USDY
5994
7574
  ],
5995
7575
  [ChainKeys.INJECTIVE_MAINNET]: [
5996
7576
  spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.INJ,
@@ -6035,8 +7615,20 @@ var swapSupportedTokens = {
6035
7615
  spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.rETH,
6036
7616
  spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.GHO,
6037
7617
  spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.USDG,
6038
- spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.LIT
7618
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.LIT,
6039
7619
  // spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.USDS, // NOTE: Not Implemented
7620
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.AUSD,
7621
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.cirBTC,
7622
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.CRV,
7623
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.EURC,
7624
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.ICP,
7625
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.kBTC,
7626
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.NEAR,
7627
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.ONDO,
7628
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.QNT,
7629
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.SOL,
7630
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.tBTC,
7631
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.wTAO
6040
7632
  ],
6041
7633
  [ChainKeys.REDBELLY_MAINNET]: [
6042
7634
  spokeChainConfig[ChainKeys.REDBELLY_MAINNET].supportedTokens.RBNT,
@@ -6109,7 +7701,29 @@ var swapSupportedTokens = {
6109
7701
  spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.TSM,
6110
7702
  spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.AMD,
6111
7703
  spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.INTC,
6112
- spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.BABA
7704
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.BABA,
7705
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.AMC,
7706
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.HIMS,
7707
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.LLY,
7708
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.COST,
7709
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.TTWO,
7710
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.RBLX,
7711
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.IBM,
7712
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.MRNA,
7713
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.LULU,
7714
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.SNAP,
7715
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.WYFI,
7716
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.RIVN,
7717
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.NFLX,
7718
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.BULL,
7719
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.QUBT,
7720
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.NET,
7721
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.SKHY,
7722
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.JNJ,
7723
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.UPS,
7724
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.DJT,
7725
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.RDDT,
7726
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.GLD
6113
7727
  ],
6114
7728
  [ChainKeys.ROBINHOOD_MAINNET]: [
6115
7729
  spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.ETH,
@@ -6142,11 +7756,37 @@ var swapSupportedTokens = {
6142
7756
  spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.AMD,
6143
7757
  spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.INTC,
6144
7758
  spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.BABA,
6145
- spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.PONS
7759
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.AMC,
7760
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.HIMS,
7761
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.LLY,
7762
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.COST,
7763
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.TTWO,
7764
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.RBLX,
7765
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.IBM,
7766
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.MRNA,
7767
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.LULU,
7768
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.SNAP,
7769
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.WYFI,
7770
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.RIVN,
7771
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.NFLX,
7772
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.BULL,
7773
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.QUBT,
7774
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.NET,
7775
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.SKHY,
7776
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.JNJ,
7777
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.UPS,
7778
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.DJT,
7779
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.RDDT,
7780
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.GLD,
7781
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.PONS,
7782
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.AI,
7783
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.CASHCAT,
7784
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.TAO
6146
7785
  ]
6147
7786
  };
6148
7787
  var stagingSwapSupportedTokens = {
6149
- [ChainKeys.SONIC_MAINNET]: [],
7788
+ // ADA vault liquidity is insufficient to sell in production.
7789
+ [ChainKeys.SONIC_MAINNET]: [SodaTokens.sodaADA],
6150
7790
  [ChainKeys.AVALANCHE_MAINNET]: [],
6151
7791
  [ChainKeys.ARBITRUM_MAINNET]: [],
6152
7792
  [ChainKeys.BASE_MAINNET]: [
@@ -6158,12 +7798,17 @@ var stagingSwapSupportedTokens = {
6158
7798
  spokeChainConfig[ChainKeys.POLYGON_MAINNET].supportedTokens.USDT,
6159
7799
  spokeChainConfig[ChainKeys.POLYGON_MAINNET].supportedTokens.wstETH
6160
7800
  ],
6161
- [ChainKeys.BSC_MAINNET]: [],
7801
+ [ChainKeys.BSC_MAINNET]: [spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.ADA],
6162
7802
  [ChainKeys.HYPEREVM_MAINNET]: [],
6163
7803
  [ChainKeys.LIGHTLINK_MAINNET]: [
6164
7804
  spokeChainConfig[ChainKeys.LIGHTLINK_MAINNET].supportedTokens["HYPE.LL"]
6165
7805
  ],
6166
- [ChainKeys.SOLANA_MAINNET]: [],
7806
+ [ChainKeys.SOLANA_MAINNET]: [
7807
+ // Meteora swaps do not support this Token-2022 token.
7808
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.ANSEM,
7809
+ // No correct production price feed.
7810
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.PRIME
7811
+ ],
6167
7812
  [ChainKeys.ICON_MAINNET]: [],
6168
7813
  [ChainKeys.STELLAR_MAINNET]: [],
6169
7814
  [ChainKeys.SUI_MAINNET]: [spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.USDT],
@@ -6172,14 +7817,15 @@ var stagingSwapSupportedTokens = {
6172
7817
  [ChainKeys.BITCOIN_MAINNET]: [],
6173
7818
  [ChainKeys.ETHEREUM_MAINNET]: [
6174
7819
  spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.wstETH,
6175
- spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.weETH
7820
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.weETH,
7821
+ // The production pool is empty.
7822
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.wM
6176
7823
  ],
6177
7824
  [ChainKeys.REDBELLY_MAINNET]: [],
6178
7825
  [ChainKeys.KAIA_MAINNET]: [],
6179
7826
  [ChainKeys.STACKS_MAINNET]: [],
6180
7827
  // Hedera promoted to production — see swapSupportedTokens
6181
7828
  [ChainKeys.HEDERA_MAINNET]: [],
6182
- // Robinhood Chain promoted to production — see swapSupportedTokens
6183
7829
  [ChainKeys.ROBINHOOD_MAINNET]: []
6184
7830
  };
6185
7831
  var swapsConfig = {
@@ -6487,7 +8133,7 @@ function isValidWalletProviderForChainKey(chainKey, walletProvider) {
6487
8133
  }
6488
8134
 
6489
8135
  // ../types/dist/index.js
6490
- var CONFIG_VERSION = 2020099;
8136
+ var CONFIG_VERSION = 2030002;
6491
8137
  var RC_STABLE = 99;
6492
8138
  var MIN_CONFIG_VERSION = 1e6;
6493
8139
  var MAX_CONFIG_VERSION = 99999999;
@@ -6740,12 +8386,12 @@ function canonicalizeBitcoinAddress(address$1) {
6740
8386
  }
6741
8387
  }
6742
8388
  function normalizePsbtToBase64(signedPsbt) {
6743
- const isHex3 = /^[0-9a-fA-F]+$/.test(signedPsbt);
6744
- return isHex3 ? Buffer.from(signedPsbt, "hex").toString("base64") : signedPsbt;
8389
+ const isHex4 = /^[0-9a-fA-F]+$/.test(signedPsbt);
8390
+ return isHex4 ? Buffer.from(signedPsbt, "hex").toString("base64") : signedPsbt;
6745
8391
  }
6746
8392
  function normalizeSignatureToBase64(signature) {
6747
- const isHex3 = /^[0-9a-fA-F]+$/.test(signature);
6748
- return isHex3 ? Buffer.from(signature, "hex").toString("base64") : signature;
8393
+ const isHex4 = /^[0-9a-fA-F]+$/.test(signature);
8394
+ return isHex4 ? Buffer.from(signature, "hex").toString("base64") : signature;
6749
8395
  }
6750
8396
  function isNativeBitcoinTransfer(config, chainKey, token) {
6751
8397
  return isBitcoinChainKeyType(chainKey) && !!token && isNativeBitcoinToken(config.getChainConfig(chainKey), token.address);
@@ -7150,7 +8796,8 @@ function mapRelayFailure(error, ctx) {
7150
8796
  const baseCtx = {
7151
8797
  action: ctx.action,
7152
8798
  srcChainKey: ctx.srcChainKey,
7153
- dstChainKey: ctx.dstChainKey
8799
+ dstChainKey: ctx.dstChainKey,
8800
+ ...ctx.srcTxHash !== void 0 && { srcTxHash: ctx.srcTxHash }
7154
8801
  };
7155
8802
  if (message === RELAY_ERROR_CODES.RELAY_TIMEOUT) {
7156
8803
  return new SodaxError("RELAY_TIMEOUT", "Relay packet did not arrive within timeout", {
@@ -7235,9 +8882,11 @@ function isWalletRejection(error) {
7235
8882
  if (typeof error !== "object") return false;
7236
8883
  const o = error;
7237
8884
  if (o.name === "UserRejectedRequestError") return true;
8885
+ if (o.name === "AtomicReadyWalletRejectedUpgradeError") return true;
7238
8886
  if (o.name === "WalletSignTransactionError" && matchRejectionText(o.message)) return true;
7239
8887
  if (o.name === "WalletConnectionError" && matchRejectionText(o.message)) return true;
7240
8888
  if (o.code === 4001) return true;
8889
+ if (o.code === 5750) return true;
7241
8890
  if (o.code === "ACTION_REJECTED") return true;
7242
8891
  if (o.code === "CANCEL_SIGNING") return true;
7243
8892
  if (o.code === "CANCEL_JSON-RPC") return true;
@@ -7299,6 +8948,13 @@ function allowanceCheckFailed(feature, cause, context) {
7299
8948
  context: { phase: "allowanceCheck", ...context }
7300
8949
  });
7301
8950
  }
8951
+ function withErrorContext(error, context) {
8952
+ return new SodaxError(error.code, error.message, {
8953
+ feature: error.feature,
8954
+ cause: error.cause,
8955
+ context: { ...error.context, ...context }
8956
+ });
8957
+ }
7302
8958
  function gasEstimationFailed(feature, cause, context) {
7303
8959
  return new SodaxError("GAS_ESTIMATION_FAILED", messageOf(cause, "Gas estimation failed"), {
7304
8960
  feature,
@@ -16619,7 +18275,7 @@ function mergeSodaxConfig(base2, override) {
16619
18275
  }
16620
18276
  function encodeContractCalls(calls) {
16621
18277
  return encodeAbiParameters(parseAbiParameters("(address,uint256,bytes)[]"), [
16622
- calls.map((v10) => [v10.address, v10.value, v10.data])
18278
+ calls.map((v11) => [v11.address, v11.value, v11.data])
16623
18279
  ]);
16624
18280
  }
16625
18281
  async function waitForTransactionReceipt(hash, provider) {
@@ -16732,6 +18388,172 @@ function getEvmViemChain(key) {
16732
18388
  }
16733
18389
  }
16734
18390
  }
18391
+
18392
+ // src/shared/utils/evmAtomicBatch.ts
18393
+ function canSendAtomicBatch(walletProvider) {
18394
+ return typeof walletProvider.getAtomicBatchSupport === "function" && typeof walletProvider.sendAtomicBatch === "function" && typeof walletProvider.waitForBatch === "function";
18395
+ }
18396
+ async function readAtomicBatchSupport(walletProvider, chainId) {
18397
+ try {
18398
+ return await walletProvider.getAtomicBatchSupport(chainId);
18399
+ } catch {
18400
+ return "unsupported";
18401
+ }
18402
+ }
18403
+ var BATCH_REFUSED_CODES = /* @__PURE__ */ new Set([4200, -32601, 5700, 5710, 5740, 5760]);
18404
+ var MAX_CAUSE_DEPTH2 = 5;
18405
+ var UPGRADE_DECLINED_CODE = 5750;
18406
+ function isAtomicBatchRefused(error) {
18407
+ return hasErrorCode(error, (code) => BATCH_REFUSED_CODES.has(code));
18408
+ }
18409
+ function isAccountUpgradeDeclined(error) {
18410
+ return hasErrorCode(error, (code) => code === UPGRADE_DECLINED_CODE);
18411
+ }
18412
+ function hasErrorCode(error, matches) {
18413
+ let current = error;
18414
+ for (let depth = 0; depth < MAX_CAUSE_DEPTH2 && typeof current === "object" && current !== null; depth++) {
18415
+ const code = "code" in current ? current.code : void 0;
18416
+ if (typeof code === "number" && matches(code)) return true;
18417
+ current = "cause" in current ? current.cause : void 0;
18418
+ }
18419
+ return false;
18420
+ }
18421
+
18422
+ // src/shared/utils/approvalBatch.ts
18423
+ function approvalBatchWaitMs(timeout) {
18424
+ return Math.max(resolveTimeoutMs(timeout, DEFAULT_RELAY_TX_TIMEOUT), DEFAULT_RELAY_TX_TIMEOUT);
18425
+ }
18426
+ var ATOMIC_BATCH_REFUSED = "atomic-batch-refused";
18427
+ var ATOMIC_BATCH_UNCONFIRMED = "atomic-batch-unconfirmed";
18428
+ var ACCOUNT_UPGRADE_DECLINED = "account-upgrade-declined";
18429
+ var BATCH_NOTHING_LANDED_CODES = /* @__PURE__ */ new Set([400, 500]);
18430
+ async function resolveApprovalStrategy({
18431
+ srcChainKey,
18432
+ walletProvider,
18433
+ allowAccountUpgrade = true
18434
+ }) {
18435
+ if (isEvmSpokeOnlyChainKeyType(srcChainKey) && isEvmWalletProviderType(walletProvider) && canSendAtomicBatch(walletProvider)) {
18436
+ const support = await readAtomicBatchSupport(walletProvider, getEvmViemChain(srcChainKey).id);
18437
+ if (support === "supported" || support === "ready" && allowAccountUpgrade) return "atomic-batch";
18438
+ }
18439
+ return "sequential";
18440
+ }
18441
+ async function sendApprovalBatch({
18442
+ walletProvider,
18443
+ srcChainKey,
18444
+ txs,
18445
+ timeoutMs,
18446
+ feature,
18447
+ context,
18448
+ onBatchSent
18449
+ }) {
18450
+ if (!canSendAtomicBatch(walletProvider)) {
18451
+ return {
18452
+ ok: false,
18453
+ error: new SodaxError("INTENT_CREATION_FAILED", "Wallet provider does not implement EIP-5792 batches", {
18454
+ feature,
18455
+ context: { ...context, phase: "intentCreation", reason: ATOMIC_BATCH_REFUSED }
18456
+ })
18457
+ };
18458
+ }
18459
+ let batchId;
18460
+ try {
18461
+ batchId = await walletProvider.sendAtomicBatch(txs, { expectedChainId: getEvmViemChain(srcChainKey).id });
18462
+ } catch (error) {
18463
+ const reason = isAtomicBatchRefused(error) ? ATOMIC_BATCH_REFUSED : isAccountUpgradeDeclined(error) ? ACCOUNT_UPGRADE_DECLINED : void 0;
18464
+ return { ok: false, error: intentCreationFailed(feature, error, { ...context, ...reason && { reason } }) };
18465
+ }
18466
+ try {
18467
+ onBatchSent?.(batchId);
18468
+ } catch {
18469
+ }
18470
+ return confirmApprovalBatch({ walletProvider, batchId, callCount: txs.length, timeoutMs, feature, context });
18471
+ }
18472
+ async function confirmApprovalBatch({
18473
+ walletProvider,
18474
+ batchId,
18475
+ callCount,
18476
+ timeoutMs,
18477
+ feature,
18478
+ context
18479
+ }) {
18480
+ const unconfirmed = (cause) => ({
18481
+ ok: false,
18482
+ error: new SodaxError("TX_VERIFICATION_FAILED", "Atomic approval batch was sent but not confirmed", {
18483
+ feature,
18484
+ cause,
18485
+ context: {
18486
+ ...context,
18487
+ phase: "verify",
18488
+ reason: ATOMIC_BATCH_UNCONFIRMED,
18489
+ batchId,
18490
+ ...callCount !== void 0 && { callCount }
18491
+ }
18492
+ })
18493
+ });
18494
+ if (!canSendAtomicBatch(walletProvider)) return unconfirmed();
18495
+ try {
18496
+ const batch = await walletProvider.waitForBatch(batchId, { timeout: Math.max(1, timeoutMs) });
18497
+ if (batch.status !== "success" && !BATCH_NOTHING_LANDED_CODES.has(batch.statusCode)) return unconfirmed();
18498
+ if (batch.status !== "success") {
18499
+ return {
18500
+ ok: false,
18501
+ error: new SodaxError("INTENT_CREATION_FAILED", "Atomic approval batch did not succeed", {
18502
+ feature,
18503
+ context: {
18504
+ ...context,
18505
+ phase: "intentCreation",
18506
+ reason: "atomic-batch-failed",
18507
+ batchId,
18508
+ statusCode: batch.statusCode
18509
+ }
18510
+ })
18511
+ };
18512
+ }
18513
+ const { receipts } = batch;
18514
+ const oneTx = new Set(receipts.map((receipt) => receipt.transactionHash)).size === 1;
18515
+ const depositReceipt = oneTx || receipts.length === callCount ? receipts.at(-1) : void 0;
18516
+ if (depositReceipt?.status !== "success") return unconfirmed();
18517
+ return { ok: true, value: { txHash: depositReceipt.transactionHash, batchId } };
18518
+ } catch (error) {
18519
+ return unconfirmed(error);
18520
+ }
18521
+ }
18522
+ async function confirmApproval({
18523
+ waitForTxReceipt,
18524
+ txHash,
18525
+ chainKey,
18526
+ feature,
18527
+ context
18528
+ }) {
18529
+ const receipt = await waitForTxReceipt({ txHash, chainKey });
18530
+ if (receipt.ok && receipt.value.status === "success") return { ok: true, value: void 0 };
18531
+ return {
18532
+ ok: false,
18533
+ error: new SodaxError("APPROVE_FAILED", `Approval transaction ${txHash} did not confirm`, {
18534
+ feature,
18535
+ cause: receipt.ok ? receipt.value : receipt.error,
18536
+ context: { ...context, phase: "approve", reason: "approve-not-confirmed", approveTxHash: txHash }
18537
+ })
18538
+ };
18539
+ }
18540
+ function isAtomicBatchRefusal(error) {
18541
+ return isSodaxError(error) && error.code === "INTENT_CREATION_FAILED" && error.context?.reason === ATOMIC_BATCH_REFUSED;
18542
+ }
18543
+ async function runWithApproval({
18544
+ strategy,
18545
+ notRequired,
18546
+ atomicBatch,
18547
+ sequential,
18548
+ onBatchRefused
18549
+ }) {
18550
+ if (strategy === "not-required") return { result: await notRequired(), approvalStrategy: strategy };
18551
+ if (strategy === "sequential") return { result: await sequential(false), approvalStrategy: strategy };
18552
+ const batched = await atomicBatch();
18553
+ if (batched.ok || !isAtomicBatchRefusal(batched.error)) return { result: batched, approvalStrategy: "atomic-batch" };
18554
+ onBatchRefused?.(batched.error);
18555
+ return { result: await sequential(true), approvalStrategy: "sequential" };
18556
+ }
16735
18557
  var EvmVaultTokenService = class {
16736
18558
  constructor() {
16737
18559
  }
@@ -17717,7 +19539,11 @@ var StacksSpokeService = class {
17717
19539
  async getWalletBalances(params) {
17718
19540
  const { srcChainKey, srcAddress, tokens } = params;
17719
19541
  const collector = createBalanceCollector({ logger: this.config.logger, chainKey: srcChainKey });
17720
- await settleWalletBalances(collector, tokens, (token) => this.getWalletBalance({ srcChainKey, srcAddress, token }));
19542
+ await settleWalletBalances(
19543
+ collector,
19544
+ tokens,
19545
+ (token) => this.getWalletBalance({ srcChainKey, srcAddress, token })
19546
+ );
17721
19547
  return collector.finish();
17722
19548
  }
17723
19549
  /**
@@ -19522,22 +21348,22 @@ function createHmacDrbg(hashLen, qByteLen, hmacFn) {
19522
21348
  const byte0 = Uint8Array.of(0);
19523
21349
  const byte1 = Uint8Array.of(1);
19524
21350
  const _maxDrbgIters = 1e3;
19525
- let v10 = u8n(hashLen);
21351
+ let v11 = u8n(hashLen);
19526
21352
  let k = u8n(hashLen);
19527
21353
  let i = 0;
19528
21354
  const reset = () => {
19529
- v10.fill(1);
21355
+ v11.fill(1);
19530
21356
  k.fill(0);
19531
21357
  i = 0;
19532
21358
  };
19533
- const h = (...msgs) => hmacFn(k, concatBytes(v10, ...msgs));
21359
+ const h = (...msgs) => hmacFn(k, concatBytes(v11, ...msgs));
19534
21360
  const reseed = (seed = NULL) => {
19535
21361
  k = h(byte0, seed);
19536
- v10 = h();
21362
+ v11 = h();
19537
21363
  if (seed.length === 0)
19538
21364
  return;
19539
21365
  k = h(byte1, seed);
19540
- v10 = h();
21366
+ v11 = h();
19541
21367
  };
19542
21368
  const gen = () => {
19543
21369
  if (i++ >= _maxDrbgIters)
@@ -19545,10 +21371,10 @@ function createHmacDrbg(hashLen, qByteLen, hmacFn) {
19545
21371
  let len = 0;
19546
21372
  const out = [];
19547
21373
  while (len < qByteLen) {
19548
- v10 = h();
19549
- const sl = v10.slice();
21374
+ v11 = h();
21375
+ const sl = v11.slice();
19550
21376
  out.push(sl);
19551
- len += v10.length;
21377
+ len += v11.length;
19552
21378
  }
19553
21379
  return concatBytes(...out);
19554
21380
  };
@@ -19574,7 +21400,7 @@ function validateObject(object4, fields = {}, optFields = {}) {
19574
21400
  if (current !== expectedType || val === null)
19575
21401
  throw new Error(`param "${fieldName}" is invalid: expected ${expectedType}, got ${current}`);
19576
21402
  }
19577
- const iter = (f, isOpt) => Object.entries(f).forEach(([k, v10]) => checkField(k, v10, isOpt));
21403
+ const iter = (f, isOpt) => Object.entries(f).forEach(([k, v11]) => checkField(k, v11, isOpt));
19578
21404
  iter(fields, false);
19579
21405
  iter(optFields, true);
19580
21406
  }
@@ -19645,9 +21471,9 @@ function sqrt3mod4(Fp, n) {
19645
21471
  function sqrt5mod8(Fp, n) {
19646
21472
  const p5div8 = (Fp.ORDER - _5n) / _8n;
19647
21473
  const n2 = Fp.mul(n, _2n);
19648
- const v10 = Fp.pow(n2, p5div8);
19649
- const nv = Fp.mul(n, v10);
19650
- const i = Fp.mul(Fp.mul(nv, _2n), v10);
21474
+ const v11 = Fp.pow(n2, p5div8);
21475
+ const nv = Fp.mul(n, v11);
21476
+ const i = Fp.mul(Fp.mul(nv, _2n), v11);
19651
21477
  const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));
19652
21478
  assertIsSquare(Fp, root, n);
19653
21479
  return root;
@@ -20229,9 +22055,9 @@ function edwards(params, extraOpts = {}) {
20229
22055
  validateObject(extraOpts, {}, { uvRatio: "function" });
20230
22056
  const MASK = _2n2 << BigInt(Fn.BYTES * 8) - _1n4;
20231
22057
  const modP = (n) => Fp.create(n);
20232
- const uvRatio2 = extraOpts.uvRatio || ((u, v10) => {
22058
+ const uvRatio2 = extraOpts.uvRatio || ((u, v11) => {
20233
22059
  try {
20234
- return { isValid: true, value: Fp.sqrt(Fp.div(u, v10)) };
22060
+ return { isValid: true, value: Fp.sqrt(Fp.div(u, v11)) };
20235
22061
  } catch (e) {
20236
22062
  return { isValid: false, value: _0n4 };
20237
22063
  }
@@ -20327,8 +22153,8 @@ function edwards(params, extraOpts = {}) {
20327
22153
  aInRange("point.y", y, _0n4, max);
20328
22154
  const y2 = modP(y * y);
20329
22155
  const u = modP(y2 - _1n4);
20330
- const v10 = modP(d * y2 - a);
20331
- let { isValid, value: x } = uvRatio2(u, v10);
22156
+ const v11 = modP(d * y2 - a);
22157
+ let { isValid, value: x } = uvRatio2(u, v11);
20332
22158
  if (!isValid)
20333
22159
  throw new Error("bad point: invalid y coordinate");
20334
22160
  const isXOdd = (x & _1n4) === _1n4;
@@ -20668,13 +22494,13 @@ function adjustScalarBytes(bytes) {
20668
22494
  return bytes;
20669
22495
  }
20670
22496
  var ED25519_SQRT_M1 = /* @__PURE__ */ BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");
20671
- function uvRatio(u, v10) {
22497
+ function uvRatio(u, v11) {
20672
22498
  const P = ed25519_CURVE_p;
20673
- const v32 = mod(v10 * v10 * v10, P);
20674
- const v72 = mod(v32 * v32 * v10, P);
22499
+ const v32 = mod(v11 * v11 * v11, P);
22500
+ const v72 = mod(v32 * v32 * v11, P);
20675
22501
  const pow = ed25519_pow_2_252_3(u * v72).pow_p_5_8;
20676
22502
  let x = mod(u * v32 * pow, P);
20677
- const vx2 = mod(v10 * x * x, P);
22503
+ const vx2 = mod(v11 * x * x, P);
20678
22504
  const root1 = x;
20679
22505
  const root2 = mod(x * ED25519_SQRT_M1, P);
20680
22506
  const useRoot1 = vx2 === u;
@@ -21005,7 +22831,7 @@ function findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio, protocol
21005
22831
  return findSeatPriceForProtocolAfter49(validators, maxNumberOfSeats, minimumStakeRatio);
21006
22832
  }
21007
22833
  function findSeatPriceForProtocolBefore49(validators, numSeats) {
21008
- const stakes = validators.map((v10) => BigInt(v10.stake)).sort(sortBigIntAsc);
22834
+ const stakes = validators.map((v11) => BigInt(v11.stake)).sort(sortBigIntAsc);
21009
22835
  const num = BigInt(numSeats);
21010
22836
  const stakesSum = stakes.reduce((a, b) => a + b);
21011
22837
  if (stakesSum < num) {
@@ -21034,7 +22860,7 @@ function findSeatPriceForProtocolAfter49(validators, maxNumberOfSeats, minimumSt
21034
22860
  if (minimumStakeRatio.length != 2) {
21035
22861
  throw Error("minimumStakeRatio should have 2 elements");
21036
22862
  }
21037
- const stakes = validators.map((v10) => BigInt(v10.stake)).sort(sortBigIntAsc);
22863
+ const stakes = validators.map((v11) => BigInt(v11.stake)).sort(sortBigIntAsc);
21038
22864
  const stakesSum = stakes.reduce((a, b) => a + b);
21039
22865
  if (validators.length < maxNumberOfSeats) {
21040
22866
  return stakesSum * BigInt(minimumStakeRatio[0]) / BigInt(minimumStakeRatio[1]);
@@ -21206,10 +23032,10 @@ var DER = {
21206
23032
  if (length < 128)
21207
23033
  throw new E("tlv.decode(long): not minimal encoding");
21208
23034
  }
21209
- const v10 = data.subarray(pos, pos + length);
21210
- if (v10.length !== length)
23035
+ const v11 = data.subarray(pos, pos + length);
23036
+ if (v11.length !== length)
21211
23037
  throw new E("tlv.decode: wrong value length");
21212
- return { v: v10, l: data.subarray(pos + length) };
23038
+ return { v: v11, l: data.subarray(pos + length) };
21213
23039
  }
21214
23040
  },
21215
23041
  // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,
@@ -21956,14 +23782,14 @@ function ecdsa(Point, hash, ecdsaOpts = {}) {
21956
23782
  return false;
21957
23783
  const { r, s } = sig;
21958
23784
  const h = bits2int_modN(message);
21959
- const is3 = Fn.inv(s);
21960
- const u1 = Fn.create(h * is3);
21961
- const u2 = Fn.create(r * is3);
23785
+ const is4 = Fn.inv(s);
23786
+ const u1 = Fn.create(h * is4);
23787
+ const u2 = Fn.create(r * is4);
21962
23788
  const R = Point.BASE.multiplyUnsafe(u1).add(P.multiplyUnsafe(u2));
21963
23789
  if (R.is0())
21964
23790
  return false;
21965
- const v10 = Fn.create(R.x);
21966
- return v10 === r;
23791
+ const v11 = Fn.create(R.x);
23792
+ return v11 === r;
21967
23793
  } catch (e) {
21968
23794
  return false;
21969
23795
  }
@@ -24858,7 +26684,11 @@ var NearSpokeService = class {
24858
26684
  async getWalletBalances(params) {
24859
26685
  const { srcChainKey, srcAddress, tokens } = params;
24860
26686
  const collector = createBalanceCollector({ logger: this.config.logger, chainKey: srcChainKey });
24861
- await settleWalletBalances(collector, tokens, (token) => this.getWalletBalance({ srcChainKey, srcAddress, token }));
26687
+ await settleWalletBalances(
26688
+ collector,
26689
+ tokens,
26690
+ (token) => this.getWalletBalance({ srcChainKey, srcAddress, token })
26691
+ );
24862
26692
  return collector.finish();
24863
26693
  }
24864
26694
  /**
@@ -27141,7 +28971,11 @@ var SolanaSpokeService = class _SolanaSpokeService {
27141
28971
  async getWalletBalances(params) {
27142
28972
  const { srcChainKey, srcAddress, tokens } = params;
27143
28973
  const collector = createBalanceCollector({ logger: this.config.logger, chainKey: srcChainKey });
27144
- await settleWalletBalances(collector, tokens, (token) => this.getWalletBalance({ srcChainKey, srcAddress, token }));
28974
+ await settleWalletBalances(
28975
+ collector,
28976
+ tokens,
28977
+ (token) => this.getWalletBalance({ srcChainKey, srcAddress, token })
28978
+ );
27145
28979
  return collector.finish();
27146
28980
  }
27147
28981
  /**
@@ -27997,9 +29831,9 @@ var SpokeService = class _SpokeService {
27997
29831
  * Sign and broadcast the approval plan for an ERC-20 on the hub or an EVM spoke.
27998
29832
  *
27999
29833
  * A token of the TetherToken lineage rejects an allowance change from one non-zero value to
28000
- * another, so a wallet holding a stale allowance needs `approve(0)` first. The transactions cannot
28001
- * be batched: each one is only valid once its predecessor has been mined. The hash of the last is
28002
- * returned, so the contract callers see is unchanged.
29834
+ * another, so a wallet holding a stale allowance needs `approve(0)` first. Sent as separate
29835
+ * transactions, each is only valid once its predecessor has been mined, so this waits between them
29836
+ * (an EIP-5792 atomic batch can carry both, in order). The hash of the last is returned.
28003
29837
  */
28004
29838
  async executeErc20ApprovalPlan(params) {
28005
29839
  const { walletProvider } = params;
@@ -29872,12 +31706,195 @@ var EvmHubProvider = class {
29872
31706
  });
29873
31707
  }
29874
31708
  };
31709
+ var ChainKeySchema = v.custom((input) => typeof input === "string");
31710
+ var SpokeChainKeySchema = v.custom((input) => typeof input === "string");
31711
+ var AddressSchema = v.custom((input) => typeof input === "string");
31712
+ var XTokenSchema = v.object({
31713
+ symbol: v.string(),
31714
+ name: v.string(),
31715
+ decimals: v.number(),
31716
+ address: v.string(),
31717
+ chainKey: ChainKeySchema,
31718
+ hubAsset: AddressSchema,
31719
+ vault: AddressSchema,
31720
+ access: v.optional(v.picklist(["withdrawOnly", "depositOnly"]))
31721
+ });
31722
+ var IntentStructSchema = v.object({
31723
+ intentId: v.string(),
31724
+ creator: v.string(),
31725
+ inputToken: v.string(),
31726
+ outputToken: v.string(),
31727
+ inputAmount: v.string(),
31728
+ minOutputAmount: v.string(),
31729
+ deadline: v.string(),
31730
+ allowPartialFill: v.boolean(),
31731
+ srcChain: v.number(),
31732
+ dstChain: v.number(),
31733
+ srcAddress: v.string(),
31734
+ dstAddress: v.string(),
31735
+ solver: v.string(),
31736
+ data: v.string()
31737
+ });
31738
+ var FillEventSchema = v.object({
31739
+ eventType: v.literal("intent-filled"),
31740
+ // The hub-chain fill tx; an empty one is no use as `fill_tx_hash`.
31741
+ txHash: v.pipe(v.string(), v.nonEmpty()),
31742
+ // Terminality. An intent created with `allowPartialFill` emits a fill event per fill, so the
31743
+ // event alone does not mean the intent is done — only `remainingInput === '0'` does. Required:
31744
+ // without it there is no proof of completion, and claiming SOLVED on a partial fill would report
31745
+ // an unfinished swap as complete.
31746
+ intentState: v.object({
31747
+ remainingInput: v.string()
31748
+ })
31749
+ });
31750
+ var IntentEventTypeSchema = v.object({ eventType: v.string() });
31751
+ var IntentResponseSchema = v.object({
31752
+ intentHash: v.string(),
31753
+ txHash: v.string(),
31754
+ logIndex: v.number(),
31755
+ chainId: v.number(),
31756
+ blockNumber: v.number(),
31757
+ open: v.boolean(),
31758
+ intent: IntentStructSchema,
31759
+ events: v.array(v.unknown())
31760
+ });
31761
+ var UserIntentsResponseSchema = v.object({
31762
+ total: v.number(),
31763
+ offset: v.number(),
31764
+ limit: v.number(),
31765
+ items: v.array(IntentResponseSchema)
31766
+ });
31767
+ var OrderbookResponseSchema = v.object({
31768
+ total: v.number(),
31769
+ data: v.array(
31770
+ v.object({
31771
+ intentState: v.object({
31772
+ exists: v.boolean(),
31773
+ remainingInput: v.string(),
31774
+ receivedOutput: v.string(),
31775
+ pendingPayment: v.boolean()
31776
+ }),
31777
+ intentData: v.object({
31778
+ intentId: v.string(),
31779
+ creator: v.string(),
31780
+ inputToken: v.string(),
31781
+ outputToken: v.string(),
31782
+ inputAmount: v.string(),
31783
+ minOutputAmount: v.string(),
31784
+ deadline: v.string(),
31785
+ allowPartialFill: v.boolean(),
31786
+ srcChain: v.number(),
31787
+ dstChain: v.number(),
31788
+ srcAddress: v.string(),
31789
+ dstAddress: v.string(),
31790
+ solver: v.string(),
31791
+ data: v.string(),
31792
+ intentHash: v.string(),
31793
+ txHash: v.string(),
31794
+ blockNumber: v.number()
31795
+ })
31796
+ })
31797
+ )
31798
+ });
31799
+ var MoneyMarketPositionSchema = v.object({
31800
+ userAddress: v.string(),
31801
+ positions: v.array(
31802
+ v.object({
31803
+ reserveAddress: v.string(),
31804
+ aTokenAddress: v.string(),
31805
+ variableDebtTokenAddress: v.string(),
31806
+ aTokenBalance: v.string(),
31807
+ variableDebtTokenBalance: v.string(),
31808
+ blockNumber: v.number()
31809
+ })
31810
+ )
31811
+ });
31812
+ var MoneyMarketAssetSchema = v.object({
31813
+ reserveAddress: v.string(),
31814
+ aTokenAddress: v.string(),
31815
+ totalATokenBalance: v.string(),
31816
+ variableDebtTokenAddress: v.string(),
31817
+ totalVariableDebtTokenBalance: v.string(),
31818
+ liquidityRate: v.string(),
31819
+ symbol: v.string(),
31820
+ totalSuppliers: v.number(),
31821
+ totalBorrowers: v.number(),
31822
+ variableBorrowRate: v.string(),
31823
+ stableBorrowRate: v.string(),
31824
+ liquidityIndex: v.string(),
31825
+ variableBorrowIndex: v.string(),
31826
+ blockNumber: v.number()
31827
+ });
31828
+ var MoneyMarketAssetsSchema = v.array(MoneyMarketAssetSchema);
31829
+ var MoneyMarketAssetBorrowersSchema = v.object({
31830
+ borrowers: v.array(v.string()),
31831
+ total: v.number(),
31832
+ offset: v.number(),
31833
+ limit: v.number()
31834
+ });
31835
+ var MoneyMarketAssetSuppliersSchema = v.object({
31836
+ suppliers: v.array(v.string()),
31837
+ total: v.number(),
31838
+ offset: v.number(),
31839
+ limit: v.number()
31840
+ });
31841
+ var MoneyMarketBorrowersSchema = v.object({
31842
+ borrowers: v.array(v.string()),
31843
+ total: v.number(),
31844
+ offset: v.number(),
31845
+ limit: v.number()
31846
+ });
31847
+ var GetChainsResponseSchema = v.array(SpokeChainKeySchema);
31848
+ var TokensByChainMapSchema = v.custom(
31849
+ (input) => typeof input === "object" && input !== null && Object.values(input).every((tokens) => Array.isArray(tokens) && tokens.every((t) => v.is(XTokenSchema, t)))
31850
+ );
31851
+ var TokensListSchema = v.array(XTokenSchema);
31852
+ var ReserveAssetsSchema = v.array(AddressSchema);
31853
+ var ORACLE_CANDLE_INTERVALS = ["1m", "5m", "1h", "1d"];
31854
+ var OracleCandleIntervalSchema = v.picklist(ORACLE_CANDLE_INTERVALS);
31855
+ var OracleMarketsResponseSchema = v.object({
31856
+ quote: v.string(),
31857
+ intervals: v.array(
31858
+ v.object({
31859
+ key: v.string(),
31860
+ label: v.string(),
31861
+ seconds: v.number()
31862
+ })
31863
+ ),
31864
+ symbols: v.array(v.string())
31865
+ });
31866
+ var OracleCandlesResponseSchema = v.object({
31867
+ symbol: v.string(),
31868
+ quote: v.string(),
31869
+ interval: OracleCandleIntervalSchema,
31870
+ candles: v.array(
31871
+ v.object({
31872
+ timestamp: v.number(),
31873
+ open: v.string(),
31874
+ high: v.string(),
31875
+ low: v.string(),
31876
+ close: v.string(),
31877
+ final: v.optional(v.boolean())
31878
+ })
31879
+ )
31880
+ });
31881
+ var isFillEvent = (value) => v.is(FillEventSchema, value);
31882
+ var isOracleCandleInterval = (value) => v.is(OracleCandleIntervalSchema, value);
29875
31883
 
29876
31884
  // src/backendApi/detailedStatusRouting.ts
29877
31885
  var DETAILED_STATUS_NOT_DELIVERED = "relay_not_delivered";
29878
31886
  function isBackendSubmitTxAbandoned(data) {
29879
31887
  return data.status === "failed" || Boolean(data.abandonedAt);
29880
31888
  }
31889
+ function readIntentJournalOutcome(intent) {
31890
+ const settled = intent.events.filter(isFillEvent).find((fill) => fill.intentState.remainingInput === "0");
31891
+ if (settled) return { kind: "solved", fillTxHash: settled.txHash };
31892
+ const eventTypes = intent.events.flatMap((event) => v.is(IntentEventTypeSchema, event) ? [event.eventType] : []);
31893
+ if (!intent.open && eventTypes.includes("intent-cancelled") && !eventTypes.includes("intent-filled")) {
31894
+ return { kind: "cancelled" };
31895
+ }
31896
+ return void 0;
31897
+ }
29881
31898
  async function resolveDeliveredPacket(params) {
29882
31899
  const { srcChainKey, srcTxHash, relayerApiEndpoint, backendAnswered } = params;
29883
31900
  const relayChainId = getIntentRelayChainId(srcChainKey);
@@ -30308,181 +32325,6 @@ async function runBackendSubmitTx({
30308
32325
  });
30309
32326
  return polled.ok ? { ok: true, value: polled.value } : { ok: false, cause: polled.cause };
30310
32327
  }
30311
- var ChainKeySchema = v.custom((input) => typeof input === "string");
30312
- var SpokeChainKeySchema = v.custom((input) => typeof input === "string");
30313
- var AddressSchema = v.custom((input) => typeof input === "string");
30314
- var XTokenSchema = v.object({
30315
- symbol: v.string(),
30316
- name: v.string(),
30317
- decimals: v.number(),
30318
- address: v.string(),
30319
- chainKey: ChainKeySchema,
30320
- hubAsset: AddressSchema,
30321
- vault: AddressSchema,
30322
- access: v.optional(v.picklist(["withdrawOnly", "depositOnly"]))
30323
- });
30324
- var IntentStructSchema = v.object({
30325
- intentId: v.string(),
30326
- creator: v.string(),
30327
- inputToken: v.string(),
30328
- outputToken: v.string(),
30329
- inputAmount: v.string(),
30330
- minOutputAmount: v.string(),
30331
- deadline: v.string(),
30332
- allowPartialFill: v.boolean(),
30333
- srcChain: v.number(),
30334
- dstChain: v.number(),
30335
- srcAddress: v.string(),
30336
- dstAddress: v.string(),
30337
- solver: v.string(),
30338
- data: v.string()
30339
- });
30340
- var FillEventSchema = v.object({
30341
- eventType: v.literal("intent-filled"),
30342
- // The hub-chain fill tx; an empty one is no use as `fill_tx_hash`.
30343
- txHash: v.pipe(v.string(), v.nonEmpty()),
30344
- // Terminality. An intent created with `allowPartialFill` emits a fill event per fill, so the
30345
- // event alone does not mean the intent is done — only `remainingInput === '0'` does. Required:
30346
- // without it there is no proof of completion, and claiming SOLVED on a partial fill would report
30347
- // an unfinished swap as complete.
30348
- intentState: v.object({
30349
- remainingInput: v.string()
30350
- })
30351
- });
30352
- var IntentResponseSchema = v.object({
30353
- intentHash: v.string(),
30354
- txHash: v.string(),
30355
- logIndex: v.number(),
30356
- chainId: v.number(),
30357
- blockNumber: v.number(),
30358
- open: v.boolean(),
30359
- intent: IntentStructSchema,
30360
- events: v.array(v.unknown())
30361
- });
30362
- var UserIntentsResponseSchema = v.object({
30363
- total: v.number(),
30364
- offset: v.number(),
30365
- limit: v.number(),
30366
- items: v.array(IntentResponseSchema)
30367
- });
30368
- var OrderbookResponseSchema = v.object({
30369
- total: v.number(),
30370
- data: v.array(
30371
- v.object({
30372
- intentState: v.object({
30373
- exists: v.boolean(),
30374
- remainingInput: v.string(),
30375
- receivedOutput: v.string(),
30376
- pendingPayment: v.boolean()
30377
- }),
30378
- intentData: v.object({
30379
- intentId: v.string(),
30380
- creator: v.string(),
30381
- inputToken: v.string(),
30382
- outputToken: v.string(),
30383
- inputAmount: v.string(),
30384
- minOutputAmount: v.string(),
30385
- deadline: v.string(),
30386
- allowPartialFill: v.boolean(),
30387
- srcChain: v.number(),
30388
- dstChain: v.number(),
30389
- srcAddress: v.string(),
30390
- dstAddress: v.string(),
30391
- solver: v.string(),
30392
- data: v.string(),
30393
- intentHash: v.string(),
30394
- txHash: v.string(),
30395
- blockNumber: v.number()
30396
- })
30397
- })
30398
- )
30399
- });
30400
- var MoneyMarketPositionSchema = v.object({
30401
- userAddress: v.string(),
30402
- positions: v.array(
30403
- v.object({
30404
- reserveAddress: v.string(),
30405
- aTokenAddress: v.string(),
30406
- variableDebtTokenAddress: v.string(),
30407
- aTokenBalance: v.string(),
30408
- variableDebtTokenBalance: v.string(),
30409
- blockNumber: v.number()
30410
- })
30411
- )
30412
- });
30413
- var MoneyMarketAssetSchema = v.object({
30414
- reserveAddress: v.string(),
30415
- aTokenAddress: v.string(),
30416
- totalATokenBalance: v.string(),
30417
- variableDebtTokenAddress: v.string(),
30418
- totalVariableDebtTokenBalance: v.string(),
30419
- liquidityRate: v.string(),
30420
- symbol: v.string(),
30421
- totalSuppliers: v.number(),
30422
- totalBorrowers: v.number(),
30423
- variableBorrowRate: v.string(),
30424
- stableBorrowRate: v.string(),
30425
- liquidityIndex: v.string(),
30426
- variableBorrowIndex: v.string(),
30427
- blockNumber: v.number()
30428
- });
30429
- var MoneyMarketAssetsSchema = v.array(MoneyMarketAssetSchema);
30430
- var MoneyMarketAssetBorrowersSchema = v.object({
30431
- borrowers: v.array(v.string()),
30432
- total: v.number(),
30433
- offset: v.number(),
30434
- limit: v.number()
30435
- });
30436
- var MoneyMarketAssetSuppliersSchema = v.object({
30437
- suppliers: v.array(v.string()),
30438
- total: v.number(),
30439
- offset: v.number(),
30440
- limit: v.number()
30441
- });
30442
- var MoneyMarketBorrowersSchema = v.object({
30443
- borrowers: v.array(v.string()),
30444
- total: v.number(),
30445
- offset: v.number(),
30446
- limit: v.number()
30447
- });
30448
- var GetChainsResponseSchema = v.array(SpokeChainKeySchema);
30449
- var TokensByChainMapSchema = v.custom(
30450
- (input) => typeof input === "object" && input !== null && Object.values(input).every((tokens) => Array.isArray(tokens) && tokens.every((t) => v.is(XTokenSchema, t)))
30451
- );
30452
- var TokensListSchema = v.array(XTokenSchema);
30453
- var ReserveAssetsSchema = v.array(AddressSchema);
30454
- var ORACLE_CANDLE_INTERVALS = ["1m", "5m", "1h", "1d"];
30455
- var OracleCandleIntervalSchema = v.picklist(ORACLE_CANDLE_INTERVALS);
30456
- var OracleMarketsResponseSchema = v.object({
30457
- quote: v.string(),
30458
- intervals: v.array(
30459
- v.object({
30460
- key: v.string(),
30461
- label: v.string(),
30462
- seconds: v.number()
30463
- })
30464
- ),
30465
- symbols: v.array(v.string())
30466
- });
30467
- var OracleCandlesResponseSchema = v.object({
30468
- symbol: v.string(),
30469
- quote: v.string(),
30470
- interval: OracleCandleIntervalSchema,
30471
- candles: v.array(
30472
- v.object({
30473
- timestamp: v.number(),
30474
- open: v.string(),
30475
- high: v.string(),
30476
- low: v.string(),
30477
- close: v.string(),
30478
- final: v.optional(v.boolean())
30479
- })
30480
- )
30481
- });
30482
-
30483
- // src/backendApi/guards.ts
30484
- var isFillEvent = (value) => v.is(FillEventSchema, value);
30485
- var isOracleCandleInterval = (value) => v.is(OracleCandleIntervalSchema, value);
30486
32328
  function decodePacketIntentTarget(payload) {
30487
32329
  try {
30488
32330
  const hex = payload.startsWith("0x") ? payload.slice(2) : payload;
@@ -30502,6 +32344,11 @@ function selectSolvedIntentPacket(packets, intentsContract) {
30502
32344
  return packets.reduce((highest, packet) => packet.conn_sn > highest.conn_sn ? packet : highest);
30503
32345
  }
30504
32346
 
32347
+ // src/swap/intentDepositSpender.ts
32348
+ function intentDepositSpender(config, srcChainKey) {
32349
+ return isHubChainKeyType(srcChainKey) ? config.solver.intentsContract : config.getChainConfig(srcChainKey).addresses.assetManager;
32350
+ }
32351
+
30505
32352
  // src/swap/speed-tier.ts
30506
32353
  var SPEED_TIER_SECONDS = {
30507
32354
  /** Either token's vault is a money-market-reserve (sodaAsset). */
@@ -30529,6 +32376,25 @@ function estimateSwapSpeedTier({ srcToken, dstToken }, isSodaAssetRelated) {
30529
32376
  }
30530
32377
  return { tier: secondsToTier(estimatedSeconds), estimatedSeconds };
30531
32378
  }
32379
+ function summarizeSwapStatus(status) {
32380
+ if (status.source === "backend") {
32381
+ const { status: backendStatus, result } = status.data;
32382
+ return {
32383
+ state: backendStatus === "solved" || backendStatus === "failed" ? backendStatus : "pending",
32384
+ hubTxHash: asHex(result?.dstIntentTxHash),
32385
+ fillTxHash: asHex(result?.fillTxHash)
32386
+ };
32387
+ }
32388
+ const { status: solverStatus, fill_tx_hash } = status.data;
32389
+ return {
32390
+ state: solverStatus === SolverIntentStatusCode.SOLVED ? "solved" : solverStatus === SolverIntentStatusCode.FAILED ? "failed" : "pending",
32391
+ hubTxHash: status.dstTxHash,
32392
+ fillTxHash: asHex(fill_tx_hash)
32393
+ };
32394
+ }
32395
+ function asHex(value) {
32396
+ return value && isHex(value) ? value : void 0;
32397
+ }
30532
32398
 
30533
32399
  // src/swap/errors.ts
30534
32400
  var swapInvariant = createInvariant("swap");
@@ -30552,6 +32418,9 @@ var SWAP_ERROR_CODES = /* @__PURE__ */ new Set([
30552
32418
  var isSwapCreateIntentError = isCodeMember(CREATE_INTENT_CODES);
30553
32419
  var isPostExecutionError = isCodeMember(POST_EXECUTION_ERROR_CODES);
30554
32420
  var isSwapError = isCodeMember(SWAP_ERROR_CODES);
32421
+ var isSwapWithApprovalError = isCodeMember(
32422
+ /* @__PURE__ */ new Set([...SWAP_ERROR_CODES, "APPROVE_FAILED", "ALLOWANCE_CHECK_FAILED"])
32423
+ );
30555
32424
 
30556
32425
  // src/swap/SwapService.ts
30557
32426
  var RECONCILE_TIMEOUT_MS = 5e3;
@@ -30566,13 +32435,14 @@ var SwapService = class {
30566
32435
  relayerApiEndpoint;
30567
32436
  // backend swaps-API client
30568
32437
  backendApi;
32438
+ useBackendSubmitTxOverride;
30569
32439
  /**
30570
32440
  * Effective 2-step submit-tx flow (`swaps.useBackendSubmitTx`, default on). Read live off
30571
32441
  * `ConfigService`, like {@link SwapService.partnerFee}, so the config object and the behavior can
30572
- * never disagree.
32442
+ * never disagree — unless a direct constructor caller passed the deprecated override.
30573
32443
  */
30574
32444
  get useBackendSubmitTx() {
30575
- return this.config.swapUseBackendSubmitTx;
32445
+ return this.useBackendSubmitTxOverride ?? this.config.swapUseBackendSubmitTx;
30576
32446
  }
30577
32447
  /**
30578
32448
  * Effective swap partner fee (`swaps.partnerFee`, else the global `fee`). Read live off
@@ -30583,13 +32453,14 @@ var SwapService = class {
30583
32453
  get partnerFee() {
30584
32454
  return this.config.swapPartnerFee;
30585
32455
  }
30586
- constructor({ config, hubProvider, spoke, backendApi }) {
32456
+ constructor({ config, hubProvider, spoke, backendApi, useBackendSubmitTx }) {
30587
32457
  this.solver = config.solver;
30588
32458
  this.relayerApiEndpoint = config.relay.relayerApiEndpoint;
30589
32459
  this.config = config;
30590
32460
  this.hubProvider = hubProvider;
30591
32461
  this.spoke = spoke;
30592
32462
  this.backendApi = backendApi;
32463
+ this.useBackendSubmitTxOverride = useBackendSubmitTx;
30593
32464
  }
30594
32465
  /**
30595
32466
  * Estimates the gas cost for a raw (unsigned) transaction on a spoke chain.
@@ -30676,10 +32547,14 @@ var SwapService = class {
30676
32547
  * polled and passes {@link DETAILED_STATUS_SOLVER_TIMEOUT_MS}. Both go through here so the
30677
32548
  * durable-intent reconcile below is written once.
30678
32549
  *
30679
- * `timeoutMs` bounds the solver request alone. The reconcile that a failed or NOT_FOUND solver read
30680
- * falls through to carries its own {@link RECONCILE_TIMEOUT_MS}, so a bounded call can cost both.
32550
+ * `timeoutMs` bounds the solver request alone. The reconcile that a non-final solver read falls
32551
+ * through to carries its own {@link RECONCILE_TIMEOUT_MS}, so a bounded call can cost both.
32552
+ *
32553
+ * `reconcileNonFinal` is for `getDetailedStatus` alone: it reconciles an in-flight answer as well as
32554
+ * a `NOT_FOUND`, and reads a journal cancel as `FAILED`. The solver can keep reporting a cancelled
32555
+ * intent in flight, and nothing else ends that poll. `getStatus` leaves it off and keeps its answers.
30681
32556
  */
30682
- async resolveSolverStatus(request, timeoutMs) {
32557
+ async resolveSolverStatus(request, { timeoutMs, reconcileNonFinal = false } = {}) {
30683
32558
  const solverResult = await SolverApiService.getStatus(
30684
32559
  request,
30685
32560
  this.solver,
@@ -30687,12 +32562,20 @@ var SwapService = class {
30687
32562
  timeoutMs,
30688
32563
  this.config.apiKey
30689
32564
  );
30690
- const forgotten = !solverResult.ok || solverResult.value.status === SolverIntentStatusCode.NOT_FOUND;
30691
- if (!forgotten) return solverResult;
32565
+ const status = solverResult.ok ? solverResult.value.status : void 0;
32566
+ if (status === SolverIntentStatusCode.SOLVED || status === SolverIntentStatusCode.FAILED) return solverResult;
32567
+ const forgotten = !solverResult.ok || status === SolverIntentStatusCode.NOT_FOUND;
32568
+ if (!forgotten && !reconcileNonFinal) return solverResult;
30692
32569
  const timeout = Math.min(RECONCILE_TIMEOUT_MS, this.backendApi.requestTimeoutMs);
30693
32570
  const intent = await this.backendApi.getIntentByTxHash(request.intent_tx_hash, { timeout });
30694
- const settled = intent.ok ? intent.value.events.filter(isFillEvent).find((fill) => fill.intentState.remainingInput === "0") : void 0;
30695
- if (settled) return { ok: true, value: { status: SolverIntentStatusCode.SOLVED, fill_tx_hash: settled.txHash } };
32571
+ const outcome = intent.ok ? readIntentJournalOutcome(intent.value) : void 0;
32572
+ if (outcome?.kind === "solved") {
32573
+ return { ok: true, value: { status: SolverIntentStatusCode.SOLVED, fill_tx_hash: outcome.fillTxHash } };
32574
+ }
32575
+ if (outcome?.kind === "cancelled" && reconcileNonFinal) {
32576
+ return { ok: true, value: { status: SolverIntentStatusCode.FAILED } };
32577
+ }
32578
+ if (!forgotten) return solverResult;
30696
32579
  const backendAnswered = intent.ok || isSodaxError(intent.error) && intent.error.context?.status === 404;
30697
32580
  if (solverResult.ok && !backendAnswered) {
30698
32581
  return {
@@ -30710,9 +32593,14 @@ var SwapService = class {
30710
32593
  /**
30711
32594
  * Reads a swap's status from its source-chain transaction — the identifier a caller always holds.
30712
32595
  *
30713
- * **Routes; does not translate.** Returns the backend submit-tx record while it is in play,
30714
- * otherwise the solver's answer via the hub tx hash resolved from the relay packet. The result is
30715
- * tagged with `source` (discriminate on it) and carries that source's payload unmodified.
32596
+ * **Routes; defines no status of its own.** Returns the backend submit-tx record while it is in
32597
+ * play, otherwise the solver's answer via the hub tx hash resolved from the relay packet. The result
32598
+ * is tagged with `source` (discriminate on it).
32599
+ *
32600
+ * The solver arm is reconciled against the backend's durable intent record: a settling fill reads
32601
+ * `SOLVED`, and a cancel with nothing filled reads `FAILED` even while the solver still reports the
32602
+ * intent in flight. A cancelled intent is already refunded, so do not offer to cancel it again.
32603
+ * Otherwise it carries the solver's answer unmodified, and the backend arm its record unmodified.
30716
32604
  *
30717
32605
  * **Any** unusable backend response routes to the solver — a 404, a transport or server error, or
30718
32606
  * a record the backend gave up on. See `docs/SWAPS.md` § Get Detailed Status for why.
@@ -30746,7 +32634,7 @@ var SwapService = class {
30746
32634
  if (!dstTxHash.ok) return dstTxHash;
30747
32635
  const solver = await this.resolveSolverStatus(
30748
32636
  { intent_tx_hash: dstTxHash.value },
30749
- DETAILED_STATUS_SOLVER_TIMEOUT_MS
32637
+ { timeoutMs: DETAILED_STATUS_SOLVER_TIMEOUT_MS, reconcileNonFinal: true }
30750
32638
  );
30751
32639
  if (!solver.ok) {
30752
32640
  return { ok: false, error: this.detailedStatusLookupFailed(solver.error, params.srcChainKey) };
@@ -30916,19 +32804,7 @@ var SwapService = class {
30916
32804
  if (!createIntentResult.ok) {
30917
32805
  return { ok: false, error: createIntentResult.error };
30918
32806
  }
30919
- const created = createIntentResult.value;
30920
- const timeoutMs = resolveTimeoutMs(_params.timeout, DEFAULT_RELAY_TX_TIMEOUT);
30921
- if (this.useBackendSubmitTx) {
30922
- const submitted = await this.submitTx(_params, created, createSubmitTxAttempt(timeoutMs));
30923
- if (submitted.ok) return submitted;
30924
- this.config.logger.warn(
30925
- "[swap] backend submit-tx did not complete; falling back to the client-side relay",
30926
- {
30927
- error: submitted.error
30928
- }
30929
- );
30930
- }
30931
- return this.fallbackSwapSteps(_params, created, timeoutMs);
32807
+ return await this.completeSwap(_params, createIntentResult.value);
30932
32808
  } catch (error) {
30933
32809
  if (isSwapError(error)) return { ok: false, error };
30934
32810
  return {
@@ -30954,6 +32830,262 @@ var SwapService = class {
30954
32830
  }
30955
32831
  );
30956
32832
  }
32833
+ /**
32834
+ * Which approval path {@link swapWithApproval} would take for these params, so a UI can say up front
32835
+ * whether the swap costs one signature or two. Read-only; sends nothing.
32836
+ *
32837
+ * `'atomic-batch'` needs an EVM spoke source and a wallet that reports EIP-5792 atomic support for
32838
+ * that chain — `'supported'`, or `'ready'` (the wallet asks the user to upgrade the account on the
32839
+ * first batch; pass `allowAccountUpgrade: false` to treat such a wallet as unable to batch). The Sonic
32840
+ * hub, a Stellar source that needs a trustline, and wallets without batch support get `'sequential'`;
32841
+ * other non-EVM sources have no allowance and get `'not-required'`.
32842
+ *
32843
+ * @returns `ALLOWANCE_CHECK_FAILED` when the allowance read fails; otherwise the strategy.
32844
+ */
32845
+ async getApprovalStrategy(_params) {
32846
+ const { params, walletProvider, allowAccountUpgrade = true } = _params;
32847
+ const srcChainKey = params.srcChainKey;
32848
+ const allowance = await this.isAllowanceValid(_params);
32849
+ if (!allowance.ok) {
32850
+ return {
32851
+ ok: false,
32852
+ error: allowanceCheckFailed("swap", allowance.error, {
32853
+ srcChainKey,
32854
+ dstChainKey: params.dstChainKey,
32855
+ action: "swapWithApproval"
32856
+ })
32857
+ };
32858
+ }
32859
+ if (allowance.value) return { ok: true, value: "not-required" };
32860
+ return { ok: true, value: await resolveApprovalStrategy({ srcChainKey, walletProvider, allowAccountUpgrade }) };
32861
+ }
32862
+ /**
32863
+ * {@link swap} with the source-token approval folded in. Picks a path with
32864
+ * {@link getApprovalStrategy}: no approval when the allowance already suffices; on an EIP-5792
32865
+ * wallet, approve and the swap transaction as **one atomic batch — one signature**; otherwise
32866
+ * approve, wait for it to confirm, then the swap transaction. Completion (backend submit-tx with
32867
+ * the client-side relay fallback) is exactly `swap()`'s.
32868
+ *
32869
+ * A wallet that refuses the batch before signing anything (e.g. EIP-5792 5760, atomicity not
32870
+ * supported) falls back to the two-step path. A batch the user saw is never retried as separate
32871
+ * transactions:
32872
+ * - rejected → `USER_REJECTED`; a declined account upgrade (5750) adds `context.reason:`
32873
+ * {@link ACCOUNT_UPGRADE_DECLINED}, after which `allowAccountUpgrade: false` swaps without one;
32874
+ * - never included or fully reverted (EIP-5792 400 / 500) → `INTENT_CREATION_FAILED` with
32875
+ * `context.reason: 'atomic-batch-failed'`;
32876
+ * - anything else short of a confirmed deposit receipt (not confirmed within `timeout`, a partial
32877
+ * revert, receipts that do not identify the deposit) → `TX_VERIFICATION_FAILED` with
32878
+ * `context.reason:` {@link ATOMIC_BATCH_UNCONFIRMED}, `context.batchId` and `context.callCount`. It may
32879
+ * have landed — do not send it again; call again with `resumeBatchId` and `resumeBatchCallCount` to
32880
+ * finish it once it does.
32881
+ *
32882
+ * @returns A `Result<SwapWithApprovalResponse, SwapWithApprovalError>` — `swap()`'s response plus the
32883
+ * `approvalStrategy` that ran. Errors are `swap()`'s codes plus `APPROVE_FAILED` and
32884
+ * `ALLOWANCE_CHECK_FAILED`.
32885
+ */
32886
+ async swapWithApproval(_params) {
32887
+ const { params } = _params;
32888
+ const srcChainKey = params.srcChainKey;
32889
+ const baseCtx = { srcChainKey, dstChainKey: params.dstChainKey, action: "swapWithApproval" };
32890
+ return this.config.analytics.trackResult(
32891
+ "swap",
32892
+ "swapWithApproval",
32893
+ async () => {
32894
+ try {
32895
+ if (_params.resumeBatchId !== void 0) return await this.resumeAtomicBatch(_params, _params.resumeBatchId);
32896
+ const strategy = await this.getApprovalStrategy(_params);
32897
+ if (!strategy.ok) return strategy;
32898
+ const { result: created, approvalStrategy } = await runWithApproval({
32899
+ strategy: strategy.value,
32900
+ notRequired: () => this.createIntent(_params),
32901
+ atomicBatch: () => this.createIntentInAtomicBatch(_params),
32902
+ sequential: (afterRefusedBatch) => this.approveThenCreateIntent(_params, afterRefusedBatch),
32903
+ onBatchRefused: (error) => this.config.logger.warn("[swapWithApproval] wallet refused the atomic batch; approving separately", {
32904
+ error
32905
+ })
32906
+ });
32907
+ if (!created.ok) return created;
32908
+ const completed = await this.completeSwap(_params, created.value);
32909
+ if (!completed.ok) return completed;
32910
+ return { ok: true, value: { ...completed.value, approvalStrategy } };
32911
+ } catch (error) {
32912
+ if (isSwapWithApprovalError(error)) return { ok: false, error };
32913
+ return { ok: false, error: unknownFailed("swap", error, baseCtx) };
32914
+ }
32915
+ },
32916
+ {
32917
+ start: () => ({
32918
+ srcChainKey,
32919
+ dstChainKey: params.dstChainKey,
32920
+ srcAddress: params.srcAddress,
32921
+ dstAddress: params.dstAddress
32922
+ }),
32923
+ success: (value) => ({
32924
+ srcChainKey,
32925
+ dstChainKey: params.dstChainKey,
32926
+ srcTxHash: value.intentDeliveryInfo.srcTxHash,
32927
+ dstTxHash: value.intentDeliveryInfo.dstTxHash,
32928
+ approvalStrategy: value.approvalStrategy
32929
+ }),
32930
+ failure: (error) => ({ code: error.code })
32931
+ }
32932
+ );
32933
+ }
32934
+ /**
32935
+ * Approve + deposit as one EIP-5792 atomic batch, in broadcast order (`[reset?, approve, deposit]`),
32936
+ * then hand back the batch's transaction hash as the intent tx, for {@link completeSwap}.
32937
+ */
32938
+ async createIntentInAtomicBatch(_params) {
32939
+ const { params, walletProvider, extras, skipSimulation } = _params;
32940
+ const srcChainKey = params.srcChainKey;
32941
+ swapInvariant(
32942
+ isEvmSpokeOnlyChainKeyType(srcChainKey) && isEvmWalletProviderType(walletProvider),
32943
+ "Atomic batches need an EVM spoke source and an EVM wallet provider"
32944
+ );
32945
+ swapInvariant(canSendAtomicBatch(walletProvider), "Wallet provider does not implement EIP-5792 batches");
32946
+ const ctx = {
32947
+ srcChainKey,
32948
+ dstChainKey: params.dstChainKey,
32949
+ action: "swapWithApproval",
32950
+ approvalStrategy: "atomic-batch"
32951
+ };
32952
+ const [approval, created] = await Promise.all([
32953
+ this.buildApproveTxs({ params, raw: true }),
32954
+ this.createIntent({ params, extras, skipSimulation, raw: true })
32955
+ ]);
32956
+ if (!approval.ok) {
32957
+ return {
32958
+ ok: false,
32959
+ error: isSwapWithApprovalError(approval.error) ? withErrorContext(approval.error, ctx) : approveFailed("swap", approval.error, ctx)
32960
+ };
32961
+ }
32962
+ if (!created.ok) return created;
32963
+ const { resetTx, approveTx } = approval.value;
32964
+ const depositTx = created.value.tx;
32965
+ const txs = resetTx ? [resetTx, approveTx, depositTx] : [approveTx, depositTx];
32966
+ const sent = await sendApprovalBatch({
32967
+ walletProvider,
32968
+ srcChainKey,
32969
+ txs,
32970
+ timeoutMs: approvalBatchWaitMs(_params.timeout),
32971
+ feature: "swap",
32972
+ context: ctx
32973
+ });
32974
+ if (!sent.ok) return sent;
32975
+ return {
32976
+ ok: true,
32977
+ value: {
32978
+ tx: sent.value.txHash,
32979
+ intent: created.value.intent,
32980
+ relayData: created.value.relayData
32981
+ }
32982
+ };
32983
+ }
32984
+ /**
32985
+ * Finishes a batch an earlier call left {@link ATOMIC_BATCH_UNCONFIRMED}, without sending anything to
32986
+ * the wallet: waits for it again, relays its deposit client-side and notifies the solver. The
32987
+ * original intent went with that call, so it is read back from the hub tx the relay delivers.
32988
+ */
32989
+ async resumeAtomicBatch(_params, batchId) {
32990
+ const { params, walletProvider } = _params;
32991
+ const srcChainKey = params.srcChainKey;
32992
+ swapInvariant(
32993
+ isEvmSpokeOnlyChainKeyType(srcChainKey) && isEvmWalletProviderType(walletProvider) && canSendAtomicBatch(walletProvider),
32994
+ "Resuming an atomic batch needs an EVM spoke source and an EIP-5792 wallet provider"
32995
+ );
32996
+ const ctx = {
32997
+ srcChainKey,
32998
+ dstChainKey: params.dstChainKey,
32999
+ action: "swapWithApproval",
33000
+ approvalStrategy: "atomic-batch"
33001
+ };
33002
+ const timeoutMs = approvalBatchWaitMs(_params.timeout);
33003
+ const deposit = await confirmApprovalBatch({
33004
+ walletProvider,
33005
+ batchId,
33006
+ callCount: _params.resumeBatchCallCount,
33007
+ timeoutMs,
33008
+ feature: "swap",
33009
+ context: ctx
33010
+ });
33011
+ if (!deposit.ok) return deposit;
33012
+ const srcTxHash = deposit.value.txHash;
33013
+ const txCtx = { ...ctx, srcTxHash };
33014
+ const packet = await relayTxAndWaitPacket({
33015
+ srcTxHash,
33016
+ chainKey: srcChainKey,
33017
+ relayerApiEndpoint: this.relayerApiEndpoint,
33018
+ timeout: Math.max(timeoutMs, RELAY_FALLBACK_FLOOR_MS)
33019
+ });
33020
+ if (!packet.ok) return { ok: false, error: mapRelayFailure(packet.error, { feature: "swap", ...txCtx }) };
33021
+ const dstTxHash = packet.value.dst_tx_hash;
33022
+ const intent = await this.getIntent(dstTxHash);
33023
+ if (!intent.ok) return { ok: false, error: unknownFailed("swap", intent.error, txCtx) };
33024
+ const solved = await this.postExecution({ intent_tx_hash: dstTxHash });
33025
+ if (!solved.ok) return { ok: false, error: withErrorContext(solved.error, { srcChainKey, srcTxHash, dstTxHash }) };
33026
+ return {
33027
+ ok: true,
33028
+ value: {
33029
+ solverExecutionResponse: solved.value,
33030
+ intent: intent.value,
33031
+ intentDeliveryInfo: {
33032
+ srcChainKey,
33033
+ srcTxHash,
33034
+ srcAddress: params.srcAddress,
33035
+ dstChainKey: params.dstChainKey,
33036
+ dstTxHash,
33037
+ dstAddress: params.dstAddress
33038
+ },
33039
+ approvalStrategy: "atomic-batch"
33040
+ }
33041
+ };
33042
+ }
33043
+ /** Approve, wait for the approval to confirm, then create the intent — two or more signatures. */
33044
+ async approveThenCreateIntent(_params, validated = false) {
33045
+ const { params, extras, skipSimulation } = _params;
33046
+ const ctx = {
33047
+ srcChainKey: params.srcChainKey,
33048
+ dstChainKey: params.dstChainKey,
33049
+ action: "swapWithApproval",
33050
+ approvalStrategy: "sequential"
33051
+ };
33052
+ if (!validated) {
33053
+ const preflight = await this.createIntent({ params, extras, skipSimulation, raw: true });
33054
+ if (!preflight.ok) return preflight;
33055
+ }
33056
+ const approved = await this.approve(_params);
33057
+ if (!approved.ok) {
33058
+ return {
33059
+ ok: false,
33060
+ error: isSwapWithApprovalError(approved.error) ? withErrorContext(approved.error, ctx) : approveFailed("swap", approved.error, ctx)
33061
+ };
33062
+ }
33063
+ const confirmed = await confirmApproval({
33064
+ waitForTxReceipt: (receiptParams) => this.spoke.waitForTxReceipt(receiptParams),
33065
+ txHash: approved.value,
33066
+ chainKey: params.srcChainKey,
33067
+ feature: "swap",
33068
+ context: ctx
33069
+ });
33070
+ if (!confirmed.ok) return confirmed;
33071
+ return this.createIntent(_params);
33072
+ }
33073
+ /**
33074
+ * Completes a swap whose intent tx is already broadcast: the backend 2-step attempt when
33075
+ * `useBackendSubmitTx` is on, falling back to {@link fallbackSwapSteps} on any non-success.
33076
+ * Shared by `swap()` and `swapWithApproval()`, which differ only in how the intent tx is created.
33077
+ */
33078
+ async completeSwap(_params, created) {
33079
+ const timeoutMs = resolveTimeoutMs(_params.timeout, DEFAULT_RELAY_TX_TIMEOUT);
33080
+ if (this.useBackendSubmitTx) {
33081
+ const submitted = await this.submitTx(_params, created, createSubmitTxAttempt(timeoutMs));
33082
+ if (submitted.ok) return submitted;
33083
+ this.config.logger.warn("[swap] backend submit-tx did not complete; falling back to the client-side relay", {
33084
+ error: submitted.error
33085
+ });
33086
+ }
33087
+ return this.fallbackSwapSteps(_params, created, timeoutMs);
33088
+ }
30957
33089
  /**
30958
33090
  * Client-side swap completion (opt-out via `swaps.useBackendSubmitTx: false`): verify the broadcast intent
30959
33091
  * tx landed, then relay it to the hub — or use it directly when the source IS the hub — then notify the
@@ -30967,14 +33099,14 @@ var SwapService = class {
30967
33099
  async fallbackSwapSteps(_params, created, timeoutMs) {
30968
33100
  const { params } = _params;
30969
33101
  const srcChainKey = params.srcChainKey;
30970
- const baseCtx = { srcChainKey, dstChainKey: params.dstChainKey };
30971
33102
  const { tx: spokeTxHash, intent, relayData } = created;
33103
+ const txCtx = { srcChainKey, dstChainKey: params.dstChainKey, action: "swap", srcTxHash: spokeTxHash };
30972
33104
  const verifyTxHashResult = await this.spoke.verifyTxHash({
30973
33105
  txHash: created.tx,
30974
33106
  chainKey: srcChainKey
30975
33107
  });
30976
33108
  if (!verifyTxHashResult.ok) {
30977
- return { ok: false, error: verifyFailed("swap", verifyTxHashResult.error, { ...baseCtx, action: "swap" }) };
33109
+ return { ok: false, error: verifyFailed("swap", verifyTxHashResult.error, txCtx) };
30978
33110
  }
30979
33111
  let dstIntentTxHash;
30980
33112
  if (isHubChainKeyType(srcChainKey)) {
@@ -30993,7 +33125,7 @@ var SwapService = class {
30993
33125
  timeout: Math.max(timeoutMs, RELAY_FALLBACK_FLOOR_MS)
30994
33126
  });
30995
33127
  if (!packet.ok) {
30996
- return { ok: false, error: mapRelayFailure(packet.error, { feature: "swap", action: "swap", ...baseCtx }) };
33128
+ return { ok: false, error: mapRelayFailure(packet.error, { feature: "swap", ...txCtx }) };
30997
33129
  }
30998
33130
  dstIntentTxHash = packet.value.dst_tx_hash;
30999
33131
  }
@@ -31001,7 +33133,14 @@ var SwapService = class {
31001
33133
  intent_tx_hash: dstIntentTxHash
31002
33134
  });
31003
33135
  if (!postExecResult.ok) {
31004
- return { ok: false, error: postExecResult.error };
33136
+ return {
33137
+ ok: false,
33138
+ error: withErrorContext(postExecResult.error, {
33139
+ srcChainKey,
33140
+ srcTxHash: spokeTxHash,
33141
+ dstTxHash: dstIntentTxHash
33142
+ })
33143
+ };
31005
33144
  }
31006
33145
  return {
31007
33146
  ok: true,
@@ -31107,7 +33246,7 @@ var SwapService = class {
31107
33246
  token: params.inputToken,
31108
33247
  amount: params.inputAmount,
31109
33248
  owner: params.srcAddress,
31110
- spender: this.solver.intentsContract
33249
+ spender: intentDepositSpender(this.config, srcChainKey)
31111
33250
  });
31112
33251
  }
31113
33252
  if (isEvmSpokeOnlyChainKeyType(srcChainKey)) {
@@ -31116,7 +33255,7 @@ var SwapService = class {
31116
33255
  token: params.inputToken,
31117
33256
  amount: params.inputAmount,
31118
33257
  owner: params.srcAddress,
31119
- spender: this.config.getChainConfig(srcChainKey).addresses.assetManager
33258
+ spender: intentDepositSpender(this.config, srcChainKey)
31120
33259
  });
31121
33260
  }
31122
33261
  if (isStellarChainKeyType(srcChainKey)) {
@@ -31160,7 +33299,7 @@ var SwapService = class {
31160
33299
  isOptionalEvmWalletProviderType(_params.walletProvider),
31161
33300
  "Invalid wallet provider. Expected Evm wallet provider."
31162
33301
  );
31163
- const spender = isHubChainKeyType(params.srcChainKey) ? this.solver.intentsContract : this.config.getChainConfig(params.srcChainKey).addresses.assetManager;
33302
+ const spender = intentDepositSpender(this.config, params.srcChainKey);
31164
33303
  const coreParams = {
31165
33304
  srcChainKey: params.srcChainKey,
31166
33305
  owner: params.srcAddress,
@@ -31231,7 +33370,7 @@ var SwapService = class {
31231
33370
  const wrapApproveFailure = (cause) => approveFailed("swap", cause);
31232
33371
  try {
31233
33372
  if (isHubChainKeyType(params.srcChainKey) || isEvmSpokeOnlyChainKeyType(params.srcChainKey)) {
31234
- const spender = isHubChainKeyType(params.srcChainKey) ? this.solver.intentsContract : this.config.getChainConfig(params.srcChainKey).addresses.assetManager;
33373
+ const spender = intentDepositSpender(this.config, params.srcChainKey);
31235
33374
  const result = await this.spoke.buildApproveTxs({
31236
33375
  srcChainKey: params.srcChainKey,
31237
33376
  owner: params.srcAddress,
@@ -35724,6 +37863,9 @@ var BRIDGE_CODES = /* @__PURE__ */ new Set([
35724
37863
  "UNKNOWN"
35725
37864
  ]);
35726
37865
  var isBridgeOrchestrationError = isCodeMember(ORCHESTRATION_CODES);
37866
+ var isBridgeWithApprovalError = isCodeMember(
37867
+ /* @__PURE__ */ new Set([...ORCHESTRATION_CODES, "APPROVE_FAILED", "ALLOWANCE_CHECK_FAILED"])
37868
+ );
35727
37869
  var isBridgeCreateIntentError = isCodeMember(CREATE_INTENT_CODES);
35728
37870
  var isBridgeApproveError = isCodeMember(APPROVE_CODES);
35729
37871
  var isBridgeAllowanceCheckError = isCodeMember(ALLOWANCE_CHECK_CODES);
@@ -36028,16 +38170,7 @@ var BridgeService = class {
36028
38170
  try {
36029
38171
  const created = await this.createBridgeIntent(_params);
36030
38172
  if (!created.ok) return { ok: false, error: created.error };
36031
- const timeoutMs = resolveTimeoutMs(_params.timeout, DEFAULT_RELAY_TX_TIMEOUT);
36032
- if (this.useBackendSubmitTx) {
36033
- const submitted = await this.submitTx(_params, created.value, createSubmitTxAttempt(timeoutMs));
36034
- if (submitted.ok) return submitted;
36035
- this.config.logger.warn(
36036
- "[bridge] backend submit-tx did not complete; falling back to the client-side relay",
36037
- { error: submitted.error }
36038
- );
36039
- }
36040
- return this.fallbackBridgeSteps(_params, created.value, timeoutMs);
38173
+ return await this.completeBridge(_params, created.value);
36041
38174
  } catch (error) {
36042
38175
  if (isBridgeOrchestrationError(error)) return { ok: false, error };
36043
38176
  return {
@@ -36064,6 +38197,229 @@ var BridgeService = class {
36064
38197
  }
36065
38198
  );
36066
38199
  }
38200
+ /**
38201
+ * Which approval path {@link bridgeWithApproval} would take for these params, so a UI can say up
38202
+ * front whether the bridge costs one signature or two. Read-only; sends nothing.
38203
+ *
38204
+ * `'atomic-batch'` needs an EVM spoke source and a wallet that reports EIP-5792 atomic support for
38205
+ * that chain (`'supported'`, or `'ready'` unless `allowAccountUpgrade: false`). The Sonic hub,
38206
+ * Stellar and wallets without batch support get `'sequential'`; other non-EVM sources have no
38207
+ * allowance and get `'not-required'`.
38208
+ *
38209
+ * @returns `isAllowanceValid`'s error — `VALIDATION_FAILED` for invalid params, `ALLOWANCE_CHECK_FAILED`
38210
+ * when the read fails — or the strategy.
38211
+ */
38212
+ async getApprovalStrategy(_params) {
38213
+ const { params, walletProvider, allowAccountUpgrade = true } = _params;
38214
+ const allowance = await this.isAllowanceValid(_params);
38215
+ if (!allowance.ok) {
38216
+ return {
38217
+ ok: false,
38218
+ error: withErrorContext(allowance.error, {
38219
+ srcChainKey: params.srcChainKey,
38220
+ dstChainKey: params.dstChainKey,
38221
+ action: "bridgeWithApproval"
38222
+ })
38223
+ };
38224
+ }
38225
+ if (allowance.value) return { ok: true, value: "not-required" };
38226
+ return {
38227
+ ok: true,
38228
+ value: await resolveApprovalStrategy({ srcChainKey: params.srcChainKey, walletProvider, allowAccountUpgrade })
38229
+ };
38230
+ }
38231
+ /**
38232
+ * {@link bridge} with the source-token approval folded in. Picks a path with
38233
+ * {@link getApprovalStrategy}: no approval when the allowance already suffices; on an EIP-5792
38234
+ * wallet, approve and the deposit as **one atomic batch — one signature**; otherwise approve, wait
38235
+ * for it to confirm, then the deposit. Completion is exactly `bridge()`'s.
38236
+ *
38237
+ * A wallet that refuses the batch before signing anything falls back to the two-step path. A batch
38238
+ * the user saw is never retried as separate transactions:
38239
+ * - rejected → `USER_REJECTED`; a declined account upgrade (5750) adds `context.reason:
38240
+ * 'account-upgrade-declined'`, after which `allowAccountUpgrade: false` bridges without one;
38241
+ * - never included or fully reverted (EIP-5792 400 / 500) → `INTENT_CREATION_FAILED` with
38242
+ * `context.reason: 'atomic-batch-failed'`;
38243
+ * - anything else short of a confirmed deposit receipt → `TX_VERIFICATION_FAILED` with
38244
+ * `context.reason:` {@link ATOMIC_BATCH_UNCONFIRMED}, `context.batchId` and `context.callCount`. It may
38245
+ * have landed — do not send it again; call again with `resumeBatchId` and `resumeBatchCallCount` to
38246
+ * finish it once it does.
38247
+ *
38248
+ * @returns `bridge()`'s `TxHashPair` plus the `approvalStrategy` that ran. Errors are `bridge()`'s
38249
+ * codes plus `APPROVE_FAILED` and `ALLOWANCE_CHECK_FAILED`.
38250
+ */
38251
+ async bridgeWithApproval(_params) {
38252
+ const { params } = _params;
38253
+ const baseCtx = { srcChainKey: params.srcChainKey, dstChainKey: params.dstChainKey, action: "bridgeWithApproval" };
38254
+ return this.config.analytics.trackResult(
38255
+ "bridge",
38256
+ "bridgeWithApproval",
38257
+ async () => {
38258
+ try {
38259
+ if (_params.resumeBatchId !== void 0) return await this.resumeAtomicBatch(_params, _params.resumeBatchId);
38260
+ const strategy = await this.getApprovalStrategy(_params);
38261
+ if (!strategy.ok) return strategy;
38262
+ const { result: created, approvalStrategy } = await runWithApproval({
38263
+ strategy: strategy.value,
38264
+ notRequired: () => this.createBridgeIntent(_params),
38265
+ atomicBatch: () => this.createBridgeIntentInAtomicBatch(_params),
38266
+ sequential: (afterRefusedBatch) => this.approveThenCreateBridgeIntent(_params, afterRefusedBatch),
38267
+ onBatchRefused: (error) => this.config.logger.warn("[bridgeWithApproval] wallet refused the atomic batch; approving separately", {
38268
+ error
38269
+ })
38270
+ });
38271
+ if (!created.ok) return created;
38272
+ const completed = await this.completeBridge(_params, created.value);
38273
+ if (!completed.ok) return completed;
38274
+ return { ok: true, value: { ...completed.value, approvalStrategy } };
38275
+ } catch (error) {
38276
+ if (isBridgeWithApprovalError(error)) return { ok: false, error };
38277
+ return { ok: false, error: executionFailed("bridge", error, baseCtx) };
38278
+ }
38279
+ },
38280
+ {
38281
+ start: () => ({
38282
+ srcChainKey: params.srcChainKey,
38283
+ dstChainKey: params.dstChainKey,
38284
+ srcToken: params.srcToken,
38285
+ dstToken: params.dstToken,
38286
+ amount: params.amount,
38287
+ srcAddress: params.srcAddress,
38288
+ recipient: params.recipient
38289
+ }),
38290
+ success: (value) => ({
38291
+ srcChainTxHash: value.srcChainTxHash,
38292
+ dstChainTxHash: value.dstChainTxHash,
38293
+ approvalStrategy: value.approvalStrategy
38294
+ }),
38295
+ failure: (error) => ({ code: error.code })
38296
+ }
38297
+ );
38298
+ }
38299
+ /**
38300
+ * Approve + deposit as one EIP-5792 atomic batch, in broadcast order (`[reset?, approve, deposit]`),
38301
+ * then hand back the batch's transaction hash as the deposit tx, for {@link completeBridge}.
38302
+ */
38303
+ async createBridgeIntentInAtomicBatch(_params) {
38304
+ const { params, walletProvider, extras, skipSimulation } = _params;
38305
+ const srcChainKey = params.srcChainKey;
38306
+ bridgeInvariant(
38307
+ isEvmSpokeOnlyChainKeyType(srcChainKey) && isEvmWalletProviderType(walletProvider),
38308
+ "Atomic batches need an EVM spoke source and an EVM wallet provider"
38309
+ );
38310
+ const ctx = {
38311
+ srcChainKey,
38312
+ dstChainKey: params.dstChainKey,
38313
+ action: "bridgeWithApproval",
38314
+ approvalStrategy: "atomic-batch"
38315
+ };
38316
+ const [approval, created] = await Promise.all([
38317
+ this.buildApproveTxs({ params, raw: true }),
38318
+ this.createBridgeIntent({ params, extras, skipSimulation, raw: true })
38319
+ ]);
38320
+ if (!approval.ok) return { ok: false, error: withErrorContext(approval.error, ctx) };
38321
+ if (!created.ok) return { ok: false, error: withErrorContext(created.error, ctx) };
38322
+ const { resetTx, approveTx } = approval.value;
38323
+ const depositTx = created.value.tx;
38324
+ const sent = await sendApprovalBatch({
38325
+ walletProvider,
38326
+ srcChainKey,
38327
+ txs: resetTx ? [resetTx, approveTx, depositTx] : [approveTx, depositTx],
38328
+ timeoutMs: approvalBatchWaitMs(_params.timeout),
38329
+ feature: "bridge",
38330
+ context: ctx
38331
+ });
38332
+ if (!sent.ok) return sent;
38333
+ return {
38334
+ ok: true,
38335
+ value: {
38336
+ tx: sent.value.txHash,
38337
+ relayData: created.value.relayData
38338
+ }
38339
+ };
38340
+ }
38341
+ /**
38342
+ * Finishes a batch an earlier call left {@link ATOMIC_BATCH_UNCONFIRMED}, without sending anything to
38343
+ * the wallet: waits for it again, then relays its deposit client-side and waits for the settlement packet.
38344
+ */
38345
+ async resumeAtomicBatch(_params, batchId) {
38346
+ const { params, walletProvider } = _params;
38347
+ const srcChainKey = params.srcChainKey;
38348
+ bridgeInvariant(
38349
+ isEvmSpokeOnlyChainKeyType(srcChainKey) && isEvmWalletProviderType(walletProvider) && canSendAtomicBatch(walletProvider),
38350
+ "Resuming an atomic batch needs an EVM spoke source and an EIP-5792 wallet provider"
38351
+ );
38352
+ const ctx = {
38353
+ srcChainKey,
38354
+ dstChainKey: params.dstChainKey,
38355
+ action: "bridgeWithApproval",
38356
+ approvalStrategy: "atomic-batch"
38357
+ };
38358
+ const timeoutMs = approvalBatchWaitMs(_params.timeout);
38359
+ const deposit = await confirmApprovalBatch({
38360
+ walletProvider,
38361
+ batchId,
38362
+ callCount: _params.resumeBatchCallCount,
38363
+ timeoutMs,
38364
+ feature: "bridge",
38365
+ context: ctx
38366
+ });
38367
+ if (!deposit.ok) return deposit;
38368
+ const srcTxHash = deposit.value.txHash;
38369
+ const txCtx = { ...ctx, srcTxHash };
38370
+ const packet = await relayTxAndWaitPacket({
38371
+ srcTxHash,
38372
+ chainKey: srcChainKey,
38373
+ relayerApiEndpoint: this.config.relay.relayerApiEndpoint,
38374
+ timeout: Math.max(timeoutMs, RELAY_FALLBACK_FLOOR_MS)
38375
+ });
38376
+ if (!packet.ok) return { ok: false, error: mapRelayFailure(packet.error, { feature: "bridge", ...txCtx }) };
38377
+ return {
38378
+ ok: true,
38379
+ value: { srcChainTxHash: srcTxHash, dstChainTxHash: packet.value.dst_tx_hash, approvalStrategy: "atomic-batch" }
38380
+ };
38381
+ }
38382
+ /** Approve, wait for the approval to confirm, then send the deposit — two or more signatures. */
38383
+ async approveThenCreateBridgeIntent(_params, validated = false) {
38384
+ const { params, extras, skipSimulation } = _params;
38385
+ const ctx = {
38386
+ srcChainKey: params.srcChainKey,
38387
+ dstChainKey: params.dstChainKey,
38388
+ action: "bridgeWithApproval",
38389
+ approvalStrategy: "sequential"
38390
+ };
38391
+ if (!validated) {
38392
+ const preflight = await this.createBridgeIntent({ params, extras, skipSimulation, raw: true });
38393
+ if (!preflight.ok) return { ok: false, error: withErrorContext(preflight.error, ctx) };
38394
+ }
38395
+ const approved = await this.approve(_params);
38396
+ if (!approved.ok) return { ok: false, error: withErrorContext(approved.error, ctx) };
38397
+ const confirmed = await confirmApproval({
38398
+ waitForTxReceipt: (receiptParams) => this.spoke.waitForTxReceipt(receiptParams),
38399
+ txHash: approved.value,
38400
+ chainKey: params.srcChainKey,
38401
+ feature: "bridge",
38402
+ context: ctx
38403
+ });
38404
+ if (!confirmed.ok) return confirmed;
38405
+ return this.createBridgeIntent(_params);
38406
+ }
38407
+ /**
38408
+ * Completes a bridge whose deposit tx is already broadcast: the backend submit-tx attempt when
38409
+ * `useBackendSubmitTx` is on, falling back to {@link fallbackBridgeSteps} on any non-success.
38410
+ * Shared by `bridge()` and `bridgeWithApproval()`, which differ only in how the deposit is sent.
38411
+ */
38412
+ async completeBridge(_params, created) {
38413
+ const timeoutMs = resolveTimeoutMs(_params.timeout, DEFAULT_RELAY_TX_TIMEOUT);
38414
+ if (this.useBackendSubmitTx) {
38415
+ const submitted = await this.submitTx(_params, created, createSubmitTxAttempt(timeoutMs));
38416
+ if (submitted.ok) return submitted;
38417
+ this.config.logger.warn("[bridge] backend submit-tx did not complete; falling back to the client-side relay", {
38418
+ error: submitted.error
38419
+ });
38420
+ }
38421
+ return this.fallbackBridgeSteps(_params, created, timeoutMs);
38422
+ }
36067
38423
  /**
36068
38424
  * Client-side bridge completion (opt-out via `bridge.useBackendSubmitTx: false`): verify the broadcast
36069
38425
  * spoke-deposit tx, then relay it to the hub and wait for the settlement packet. Extracted verbatim from
@@ -36076,13 +38432,18 @@ var BridgeService = class {
36076
38432
  */
36077
38433
  async fallbackBridgeSteps(_params, created, timeoutMs) {
36078
38434
  const { params } = _params;
36079
- const baseCtx = { srcChainKey: params.srcChainKey, dstChainKey: params.dstChainKey };
38435
+ const txCtx = {
38436
+ srcChainKey: params.srcChainKey,
38437
+ dstChainKey: params.dstChainKey,
38438
+ action: "bridge",
38439
+ srcTxHash: created.tx
38440
+ };
36080
38441
  const verifyTxHashResult = await this.spoke.verifyTxHash({
36081
38442
  txHash: created.tx,
36082
38443
  chainKey: params.srcChainKey
36083
38444
  });
36084
38445
  if (!verifyTxHashResult.ok) {
36085
- return { ok: false, error: verifyFailed("bridge", verifyTxHashResult.error, baseCtx) };
38446
+ return { ok: false, error: verifyFailed("bridge", verifyTxHashResult.error, txCtx) };
36086
38447
  }
36087
38448
  const packetResult = await relayTxAndWaitPacket({
36088
38449
  srcTxHash: created.tx,
@@ -36098,15 +38459,7 @@ var BridgeService = class {
36098
38459
  timeout: Math.max(timeoutMs, RELAY_FALLBACK_FLOOR_MS)
36099
38460
  });
36100
38461
  if (!packetResult.ok) {
36101
- return {
36102
- ok: false,
36103
- error: mapRelayFailure(packetResult.error, {
36104
- feature: "bridge",
36105
- action: "bridge",
36106
- srcChainKey: baseCtx.srcChainKey,
36107
- dstChainKey: baseCtx.dstChainKey
36108
- })
36109
- };
38462
+ return { ok: false, error: mapRelayFailure(packetResult.error, { feature: "bridge", ...txCtx }) };
36110
38463
  }
36111
38464
  return {
36112
38465
  ok: true,
@@ -44653,6 +47006,9 @@ var isLeverageYieldPostExecutionError = isCodeMember(
44653
47006
  LEVERAGE_YIELD_POST_EXECUTION_CODES
44654
47007
  );
44655
47008
  var isLeverageYieldSwapError = isCodeMember(LEVERAGE_YIELD_SWAP_CODES);
47009
+ var isVaultSwapWithApprovalError = isCodeMember(
47010
+ /* @__PURE__ */ new Set([...LEVERAGE_YIELD_SWAP_CODES, "APPROVE_FAILED", "ALLOWANCE_CHECK_FAILED"])
47011
+ );
44656
47012
  var isLeverageYieldError = isCodeMember(LEVERAGE_YIELD_CODES);
44657
47013
 
44658
47014
  // src/leverageYield/positionFunding.ts
@@ -44709,6 +47065,7 @@ var INTENT_DEADLINE_BUFFER_SECONDS = 5 * 60;
44709
47065
  var RECONCILE_TIMEOUT_MS2 = 5e3;
44710
47066
  var DETAILED_STATUS_SOLVER_TIMEOUT_MS2 = 5e3;
44711
47067
  var BITCOIN_UNSUPPORTED_MESSAGE = "Bitcoin is not a supported source chain for leverage positions; use a supported spoke or the hub";
47068
+ var VAULT_BITCOIN_UNSUPPORTED_MESSAGE = "Bitcoin is not a supported chain for leverage-yield vault swaps; use a supported spoke or the hub";
44712
47069
  var ANY_SOLVER_ADDRESS = "0x0000000000000000000000000000000000000000";
44713
47070
  var MAX_WITHDRAW_DUST_BUFFER = 1000n;
44714
47071
  function pctToRay(aprPct) {
@@ -44765,7 +47122,7 @@ var LeverageYieldService = class {
44765
47122
  }
44766
47123
  /** Looks up a vault by its `name` field. Returns `undefined` when not registered. */
44767
47124
  getVault(name) {
44768
- return this.listVaults().find((v10) => v10.name === name);
47125
+ return this.listVaults().find((v11) => v11.name === name);
44769
47126
  }
44770
47127
  /**
44771
47128
  * Looks up a registered vault by its on-chain proxy address (case-insensitive).
@@ -44773,7 +47130,7 @@ var LeverageYieldService = class {
44773
47130
  */
44774
47131
  getVaultByAddress(address) {
44775
47132
  const normalized = address.toLowerCase();
44776
- return this.listVaults().find((v10) => v10.vault.toLowerCase() === normalized);
47133
+ return this.listVaults().find((v11) => v11.vault.toLowerCase() === normalized);
44777
47134
  }
44778
47135
  /**
44779
47136
  * Resolves the intent `deadline`: returns the caller-supplied value verbatim, otherwise
@@ -44873,6 +47230,10 @@ var LeverageYieldService = class {
44873
47230
  async deposit(params) {
44874
47231
  const baseCtx = { srcChainKey: params.srcChainKey, action: "deposit" };
44875
47232
  try {
47233
+ leverageYieldInvariant(!isBitcoinChainKeyType(params.srcChainKey), VAULT_BITCOIN_UNSUPPORTED_MESSAGE, {
47234
+ ...baseCtx,
47235
+ field: "srcChainKey"
47236
+ });
44876
47237
  leverageYieldInvariant(params.inputAmount > 0n, "inputAmount must be greater than 0", {
44877
47238
  ...baseCtx,
44878
47239
  field: "inputAmount"
@@ -44932,6 +47293,15 @@ var LeverageYieldService = class {
44932
47293
  async withdraw(params) {
44933
47294
  const baseCtx = { srcChainKey: params.srcChainKey, action: "withdraw" };
44934
47295
  try {
47296
+ leverageYieldInvariant(!isBitcoinChainKeyType(params.srcChainKey), VAULT_BITCOIN_UNSUPPORTED_MESSAGE, {
47297
+ ...baseCtx,
47298
+ field: "srcChainKey"
47299
+ });
47300
+ leverageYieldInvariant(!isBitcoinChainKeyType(params.dstChainKey), VAULT_BITCOIN_UNSUPPORTED_MESSAGE, {
47301
+ ...baseCtx,
47302
+ dstChainKey: params.dstChainKey,
47303
+ field: "dstChainKey"
47304
+ });
44935
47305
  leverageYieldInvariant(params.inputAmount > 0n, "inputAmount must be greater than 0", {
44936
47306
  ...baseCtx,
44937
47307
  field: "inputAmount"
@@ -45000,6 +47370,14 @@ var LeverageYieldService = class {
45000
47370
  const { params, skipSimulation, hubWalletSwap, partnerFee = this.config.leverageYieldPartnerFee } = _params;
45001
47371
  const baseCtx = { srcChainKey: params.srcChainKey, dstChainKey: params.dstChainKey };
45002
47372
  try {
47373
+ leverageYieldInvariant(!isBitcoinChainKeyType(params.srcChainKey), VAULT_BITCOIN_UNSUPPORTED_MESSAGE, {
47374
+ ...baseCtx,
47375
+ field: "srcChainKey"
47376
+ });
47377
+ leverageYieldInvariant(!isBitcoinChainKeyType(params.dstChainKey), VAULT_BITCOIN_UNSUPPORTED_MESSAGE, {
47378
+ ...baseCtx,
47379
+ field: "dstChainKey"
47380
+ });
45003
47381
  leverageYieldInvariant(
45004
47382
  isUndefinedOrValidWalletProviderForChainKey(params.srcChainKey, _params.walletProvider),
45005
47383
  `Invalid wallet provider for chain key: ${params.srcChainKey}`,
@@ -45027,25 +47405,10 @@ var LeverageYieldService = class {
45027
47405
  `Invalid spoke chain (params.dstChain): ${params.dstChainKey}`,
45028
47406
  { ...baseCtx, field: "dstChainKey" }
45029
47407
  );
45030
- if (isBitcoinChainKey(params.dstChainKey) && params.outputToken === "BTC") {
45031
- leverageYieldInvariant(
45032
- params.minOutputAmount >= 546n,
45033
- `Invalid minOutputAmount (params.minOutputAmount): ${params.minOutputAmount}`,
45034
- { ...baseCtx, field: "minOutputAmount" }
45035
- );
45036
- }
45037
- const personalAddress = params.srcAddress;
45038
- let walletAddress = personalAddress;
45039
- if (isBitcoinChainKeyType(params.srcChainKey) && _params.raw === false) {
45040
- leverageYieldInvariant(
45041
- isBitcoinWalletProviderType(_params.walletProvider),
45042
- `Invalid wallet provider for chain key: ${params.srcChainKey}`,
45043
- baseCtx
45044
- );
45045
- walletAddress = await this.spoke.bitcoin.getEffectiveWalletAddress(personalAddress);
45046
- await this.spoke.bitcoin.radfi.ensureRadfiAccessToken(_params.walletProvider);
45047
- }
45048
- const creatorHubWalletAddress = await this.hubProvider.getUserHubWalletAddress(walletAddress, params.srcChainKey);
47408
+ const creatorHubWalletAddress = await this.hubProvider.getUserHubWalletAddress(
47409
+ params.srcAddress,
47410
+ params.srcChainKey
47411
+ );
45049
47412
  if (hubWalletSwap) {
45050
47413
  const [data2, intent2, feeAmount2] = EvmSolverService.constructCreateIntentData(
45051
47414
  { ...params, srcChainKey: hubChainKey, srcAddress: creatorHubWalletAddress },
@@ -45055,12 +47418,7 @@ var LeverageYieldService = class {
45055
47418
  );
45056
47419
  const coreSendMessageParams = {
45057
47420
  srcChainKey: params.srcChainKey,
45058
- // Personal address — NOT the resolved trading `walletAddress`. SpokeService.sendMessage
45059
- // re-resolves the effective (Bitcoin trading) address itself; passing the already-resolved
45060
- // trading address here would double-resolve it (getTradingWallet(tradingAddress) →
45061
- // "Trading wallet not found"). The trading address is used only for the hub-wallet
45062
- // derivation above (creatorHubWalletAddress). Mirrors MoneyMarketService borrow/withdraw.
45063
- srcAddress: personalAddress,
47421
+ srcAddress: params.srcAddress,
45064
47422
  dstChainKey: hubChainKey,
45065
47423
  dstAddress: creatorHubWalletAddress,
45066
47424
  payload: data2,
@@ -45113,17 +47471,14 @@ var LeverageYieldService = class {
45113
47471
  };
45114
47472
  }
45115
47473
  const [data, intent, feeAmount] = EvmSolverService.constructCreateIntentData(
45116
- {
45117
- ...params,
45118
- srcAddress: walletAddress
45119
- },
47474
+ params,
45120
47475
  creatorHubWalletAddress,
45121
47476
  this.config,
45122
47477
  partnerFee
45123
47478
  );
45124
47479
  const coreDepositParams = {
45125
47480
  srcChainKey: params.srcChainKey,
45126
- srcAddress: walletAddress,
47481
+ srcAddress: params.srcAddress,
45127
47482
  to: creatorHubWalletAddress,
45128
47483
  token: params.inputToken,
45129
47484
  amount: params.inputAmount,
@@ -45200,17 +47555,7 @@ var LeverageYieldService = class {
45200
47555
  if (!createIntentResult.ok) {
45201
47556
  return { ok: false, error: createIntentResult.error };
45202
47557
  }
45203
- const created = createIntentResult.value;
45204
- const timeoutMs = resolveTimeoutMs(_params.timeout, DEFAULT_RELAY_TX_TIMEOUT);
45205
- if (this.useBackendSubmitTx) {
45206
- const submitted = await this.submitTx(_params, created, createSubmitTxAttempt(timeoutMs));
45207
- if (submitted.ok) return submitted;
45208
- this.config.logger.warn(
45209
- "[leverageYield] backend submit-tx did not complete; falling back to the client-side relay",
45210
- { error: submitted.error }
45211
- );
45212
- }
45213
- return this.fallbackVaultSwapSteps(_params, created, timeoutMs);
47558
+ return await this.completeVaultSwap(_params, createIntentResult.value);
45214
47559
  } catch (error) {
45215
47560
  if (isLeverageYieldSwapError(error)) return { ok: false, error };
45216
47561
  return {
@@ -45238,6 +47583,374 @@ var LeverageYieldService = class {
45238
47583
  }
45239
47584
  );
45240
47585
  }
47586
+ /**
47587
+ * Which approval path {@link vaultSwapWithApproval} would take for a vault swap's source token, so a
47588
+ * UI can say up front whether a deposit costs one signature or two. Read-only; sends nothing. Not
47589
+ * the hub-side {@link approve} / {@link isAllowanceValid}, which cover depositing into a vault directly.
47590
+ *
47591
+ * A withdraw (`hubWalletSwap`) spends from the hub wallet and is always `'not-required'`. A deposit
47592
+ * approves the same spender a swap does. `'atomic-batch'` needs an EVM spoke source and a wallet
47593
+ * that reports EIP-5792 atomic support for that chain (`'supported'`, or `'ready'` unless
47594
+ * `allowAccountUpgrade: false`); the Sonic hub, Stellar and wallets without batch support get
47595
+ * `'sequential'`.
47596
+ *
47597
+ * @returns `ALLOWANCE_CHECK_FAILED` when the allowance read fails; otherwise the strategy.
47598
+ */
47599
+ async getApprovalStrategy(_params) {
47600
+ const { params, walletProvider, hubWalletSwap, allowAccountUpgrade = true } = _params;
47601
+ if (hubWalletSwap) return { ok: true, value: "not-required" };
47602
+ const allowance = await this.isDepositAllowanceValid(params);
47603
+ if (!allowance.ok) {
47604
+ return {
47605
+ ok: false,
47606
+ error: allowanceCheckFailed("leverageYield", allowance.error, {
47607
+ srcChainKey: params.srcChainKey,
47608
+ dstChainKey: params.dstChainKey,
47609
+ action: "vaultSwapWithApproval"
47610
+ })
47611
+ };
47612
+ }
47613
+ if (allowance.value) return { ok: true, value: "not-required" };
47614
+ return {
47615
+ ok: true,
47616
+ value: await resolveApprovalStrategy({ srcChainKey: params.srcChainKey, walletProvider, allowAccountUpgrade })
47617
+ };
47618
+ }
47619
+ /**
47620
+ * {@link vaultSwap} with a deposit's source-token approval folded in. Picks a path with
47621
+ * {@link getApprovalStrategy}: none when the allowance already suffices (and never for a withdraw);
47622
+ * on an EIP-5792 wallet, approve and the deposit as **one atomic batch — one signature**; otherwise
47623
+ * approve, wait for it to confirm, then the deposit. Intent creation, the leverage-yield partner fee
47624
+ * and completion (backend submit-tx with its `operation`, then the client-side fallback) are exactly
47625
+ * `vaultSwap()`'s.
47626
+ *
47627
+ * A wallet that refuses the batch before signing anything falls back to the two-step path. A batch
47628
+ * the user saw is never retried as separate transactions:
47629
+ * - rejected → `USER_REJECTED`; a declined account upgrade (5750) adds `context.reason:
47630
+ * 'account-upgrade-declined'`, after which `allowAccountUpgrade: false` deposits without one;
47631
+ * - never included or fully reverted (EIP-5792 400 / 500) → `INTENT_CREATION_FAILED` with
47632
+ * `context.reason: 'atomic-batch-failed'`;
47633
+ * - anything else short of a confirmed deposit receipt → `TX_VERIFICATION_FAILED` with
47634
+ * `context.reason:` {@link ATOMIC_BATCH_UNCONFIRMED}, `context.batchId` and `context.callCount`. It may
47635
+ * have landed — do not send it again; call again with `resumeBatchId` and `resumeBatchCallCount` to
47636
+ * finish it once it does.
47637
+ *
47638
+ * @returns `vaultSwap()`'s response plus the `approvalStrategy` that ran. Errors are `vaultSwap()`'s
47639
+ * codes plus `APPROVE_FAILED` and `ALLOWANCE_CHECK_FAILED`.
47640
+ */
47641
+ async vaultSwapWithApproval(_params) {
47642
+ const { params } = _params;
47643
+ const baseCtx = {
47644
+ srcChainKey: params.srcChainKey,
47645
+ dstChainKey: params.dstChainKey,
47646
+ action: "vaultSwapWithApproval"
47647
+ };
47648
+ return this.config.analytics.trackResult(
47649
+ "leverageYield",
47650
+ "vaultSwapWithApproval",
47651
+ async () => {
47652
+ try {
47653
+ if (_params.resumeBatchId !== void 0) return await this.resumeAtomicBatch(_params, _params.resumeBatchId);
47654
+ const strategy = await this.getApprovalStrategy(_params);
47655
+ if (!strategy.ok) return strategy;
47656
+ const { result: created, approvalStrategy } = await runWithApproval({
47657
+ strategy: strategy.value,
47658
+ notRequired: () => this.createVaultIntent(_params),
47659
+ atomicBatch: () => this.createVaultIntentInAtomicBatch(_params),
47660
+ sequential: (afterRefusedBatch) => this.approveThenCreateVaultIntent(_params, afterRefusedBatch),
47661
+ onBatchRefused: (error) => this.config.logger.warn("[vaultSwapWithApproval] wallet refused the atomic batch; approving separately", {
47662
+ error
47663
+ })
47664
+ });
47665
+ if (!created.ok) return created;
47666
+ const completed = await this.completeVaultSwap(_params, created.value);
47667
+ if (!completed.ok) return completed;
47668
+ return { ok: true, value: { ...completed.value, approvalStrategy } };
47669
+ } catch (error) {
47670
+ if (isVaultSwapWithApprovalError(error)) return { ok: false, error };
47671
+ return { ok: false, error: unknownFailed("leverageYield", error, baseCtx) };
47672
+ }
47673
+ },
47674
+ {
47675
+ start: () => ({
47676
+ srcChainKey: params.srcChainKey,
47677
+ dstChainKey: params.dstChainKey,
47678
+ srcAddress: params.srcAddress,
47679
+ dstAddress: params.dstAddress,
47680
+ inputToken: params.inputToken,
47681
+ outputToken: params.outputToken,
47682
+ inputAmount: params.inputAmount
47683
+ }),
47684
+ success: (value) => ({
47685
+ intentId: value.intent.intentId,
47686
+ srcTxHash: value.intentDeliveryInfo.srcTxHash,
47687
+ dstTxHash: value.intentDeliveryInfo.dstTxHash,
47688
+ approvalStrategy: value.approvalStrategy
47689
+ }),
47690
+ failure: (error) => ({ code: error.code })
47691
+ }
47692
+ );
47693
+ }
47694
+ /**
47695
+ * Approve + deposit as one EIP-5792 atomic batch, in broadcast order (`[reset?, approve, deposit]`),
47696
+ * then hand back the batch's transaction hash as the intent tx, for {@link completeVaultSwap}.
47697
+ */
47698
+ async createVaultIntentInAtomicBatch(_params) {
47699
+ const { params, walletProvider, extras, skipSimulation, partnerFee } = _params;
47700
+ const srcChainKey = params.srcChainKey;
47701
+ leverageYieldInvariant(
47702
+ isEvmSpokeOnlyChainKeyType(srcChainKey) && isEvmWalletProviderType(walletProvider),
47703
+ "Atomic batches need an EVM spoke source and an EVM wallet provider"
47704
+ );
47705
+ const ctx = {
47706
+ srcChainKey,
47707
+ dstChainKey: params.dstChainKey,
47708
+ action: "vaultSwapWithApproval",
47709
+ approvalStrategy: "atomic-batch"
47710
+ };
47711
+ const [approval, created] = await Promise.all([
47712
+ this.buildDepositApproveTxs(params, srcChainKey),
47713
+ this.createVaultIntent({ params, extras, skipSimulation, partnerFee, raw: true })
47714
+ ]);
47715
+ if (!approval.ok) return { ok: false, error: approveFailed("leverageYield", approval.error, ctx) };
47716
+ if (!created.ok) return { ok: false, error: withErrorContext(created.error, ctx) };
47717
+ const { resetTx, approveTx } = approval.value;
47718
+ const depositTx = created.value.tx;
47719
+ const sent = await sendApprovalBatch({
47720
+ walletProvider,
47721
+ srcChainKey,
47722
+ txs: resetTx ? [resetTx, approveTx, depositTx] : [approveTx, depositTx],
47723
+ timeoutMs: approvalBatchWaitMs(_params.timeout),
47724
+ feature: "leverageYield",
47725
+ context: ctx
47726
+ });
47727
+ if (!sent.ok) return sent;
47728
+ return {
47729
+ ok: true,
47730
+ value: {
47731
+ tx: sent.value.txHash,
47732
+ intent: created.value.intent,
47733
+ relayData: created.value.relayData
47734
+ }
47735
+ };
47736
+ }
47737
+ /**
47738
+ * Finishes a batch an earlier call left {@link ATOMIC_BATCH_UNCONFIRMED}, without sending anything to
47739
+ * the wallet: waits for it again, relays its deposit client-side and notifies the solver. The
47740
+ * original intent went with that call, so it is read back from the hub tx the relay delivers.
47741
+ */
47742
+ async resumeAtomicBatch(_params, batchId) {
47743
+ const { params, walletProvider } = _params;
47744
+ const srcChainKey = params.srcChainKey;
47745
+ leverageYieldInvariant(
47746
+ isEvmSpokeOnlyChainKeyType(srcChainKey) && isEvmWalletProviderType(walletProvider) && canSendAtomicBatch(walletProvider),
47747
+ "Resuming an atomic batch needs an EVM spoke source and an EIP-5792 wallet provider"
47748
+ );
47749
+ const ctx = {
47750
+ srcChainKey,
47751
+ dstChainKey: params.dstChainKey,
47752
+ action: "vaultSwapWithApproval",
47753
+ approvalStrategy: "atomic-batch"
47754
+ };
47755
+ const timeoutMs = approvalBatchWaitMs(_params.timeout);
47756
+ const deposit = await confirmApprovalBatch({
47757
+ walletProvider,
47758
+ batchId,
47759
+ callCount: _params.resumeBatchCallCount,
47760
+ timeoutMs,
47761
+ feature: "leverageYield",
47762
+ context: ctx
47763
+ });
47764
+ if (!deposit.ok) return deposit;
47765
+ const srcTxHash = deposit.value.txHash;
47766
+ const txCtx = { ...ctx, srcTxHash };
47767
+ const packet = await relayTxAndWaitPacket({
47768
+ srcTxHash,
47769
+ chainKey: srcChainKey,
47770
+ relayerApiEndpoint: this.config.relay.relayerApiEndpoint,
47771
+ timeout: Math.max(timeoutMs, RELAY_FALLBACK_FLOOR_MS)
47772
+ });
47773
+ if (!packet.ok) return { ok: false, error: mapRelayFailure(packet.error, { feature: "leverageYield", ...txCtx }) };
47774
+ const dstTxHash = packet.value.dst_tx_hash;
47775
+ let intent;
47776
+ try {
47777
+ intent = await EvmSolverService.getIntent(dstTxHash, this.config, this.hubProvider.publicClient);
47778
+ } catch (error) {
47779
+ return { ok: false, error: unknownFailed("leverageYield", error, { ...txCtx, dstTxHash }) };
47780
+ }
47781
+ const solved = await this.notifySolver({ intent_tx_hash: dstTxHash });
47782
+ if (!solved.ok) return { ok: false, error: withErrorContext(solved.error, { srcChainKey, srcTxHash, dstTxHash }) };
47783
+ return {
47784
+ ok: true,
47785
+ value: {
47786
+ solverExecutionResponse: solved.value,
47787
+ intent,
47788
+ intentDeliveryInfo: {
47789
+ srcChainKey,
47790
+ srcTxHash,
47791
+ srcAddress: params.srcAddress,
47792
+ dstChainKey: params.dstChainKey,
47793
+ dstTxHash,
47794
+ dstAddress: params.dstAddress
47795
+ },
47796
+ approvalStrategy: "atomic-batch"
47797
+ }
47798
+ };
47799
+ }
47800
+ /** Approve, wait for the approval to confirm, then send the deposit — two or more signatures. */
47801
+ async approveThenCreateVaultIntent(_params, validated = false) {
47802
+ const { params, extras, skipSimulation, partnerFee } = _params;
47803
+ const ctx = {
47804
+ srcChainKey: params.srcChainKey,
47805
+ dstChainKey: params.dstChainKey,
47806
+ action: "vaultSwapWithApproval",
47807
+ approvalStrategy: "sequential"
47808
+ };
47809
+ if (!validated) {
47810
+ const preflight = await this.createVaultIntent({
47811
+ params,
47812
+ extras,
47813
+ skipSimulation,
47814
+ partnerFee,
47815
+ raw: true
47816
+ });
47817
+ if (!preflight.ok) return { ok: false, error: withErrorContext(preflight.error, ctx) };
47818
+ }
47819
+ const approved = await this.approveDeposit(_params);
47820
+ if (!approved.ok) {
47821
+ return {
47822
+ ok: false,
47823
+ error: isLeverageYieldApproveError(approved.error) ? withErrorContext(approved.error, ctx) : approveFailed("leverageYield", approved.error, ctx)
47824
+ };
47825
+ }
47826
+ const confirmed = await confirmApproval({
47827
+ waitForTxReceipt: (receiptParams) => this.spoke.waitForTxReceipt(receiptParams),
47828
+ txHash: approved.value,
47829
+ chainKey: params.srcChainKey,
47830
+ feature: "leverageYield",
47831
+ context: ctx
47832
+ });
47833
+ if (!confirmed.ok) return confirmed;
47834
+ return this.createVaultIntent(_params);
47835
+ }
47836
+ /** Whether the deposit's source-token allowance already covers `inputAmount`. */
47837
+ async isDepositAllowanceValid(params) {
47838
+ try {
47839
+ const { srcChainKey } = params;
47840
+ if (isHubChainKeyType(srcChainKey)) {
47841
+ return await this.spoke.isAllowanceValid({
47842
+ srcChainKey,
47843
+ token: params.inputToken,
47844
+ amount: params.inputAmount,
47845
+ owner: params.srcAddress,
47846
+ spender: intentDepositSpender(this.config, srcChainKey)
47847
+ });
47848
+ }
47849
+ if (isEvmSpokeOnlyChainKeyType(srcChainKey)) {
47850
+ return await this.spoke.isAllowanceValid({
47851
+ srcChainKey,
47852
+ token: params.inputToken,
47853
+ amount: params.inputAmount,
47854
+ owner: params.srcAddress,
47855
+ spender: intentDepositSpender(this.config, srcChainKey)
47856
+ });
47857
+ }
47858
+ if (isStellarChainKeyType(srcChainKey)) {
47859
+ return await this.spoke.isAllowanceValid({
47860
+ srcChainKey,
47861
+ token: params.inputToken,
47862
+ amount: params.inputAmount,
47863
+ owner: params.srcAddress
47864
+ });
47865
+ }
47866
+ return { ok: true, value: true };
47867
+ } catch (error) {
47868
+ return { ok: false, error };
47869
+ }
47870
+ }
47871
+ /** The deposit's unsigned approval leg(s) on an EVM spoke, for the atomic batch. */
47872
+ async buildDepositApproveTxs(params, srcChainKey) {
47873
+ try {
47874
+ return await this.spoke.buildApproveTxs({
47875
+ srcChainKey,
47876
+ owner: params.srcAddress,
47877
+ token: params.inputToken,
47878
+ amount: params.inputAmount,
47879
+ spender: intentDepositSpender(this.config, srcChainKey),
47880
+ raw: true
47881
+ });
47882
+ } catch (error) {
47883
+ return { ok: false, error };
47884
+ }
47885
+ }
47886
+ /** Signs and sends the deposit's approval (hub, EVM spoke or Stellar); resolves at broadcast. */
47887
+ async approveDeposit(_params) {
47888
+ const { params, walletProvider } = _params;
47889
+ try {
47890
+ if (isHubChainKeyType(params.srcChainKey) || isEvmSpokeOnlyChainKeyType(params.srcChainKey)) {
47891
+ leverageYieldInvariant(
47892
+ isOptionalEvmWalletProviderType(walletProvider),
47893
+ "Invalid wallet provider. Expected Evm wallet provider."
47894
+ );
47895
+ const result = await this.spoke.approve({
47896
+ srcChainKey: params.srcChainKey,
47897
+ owner: params.srcAddress,
47898
+ token: params.inputToken,
47899
+ amount: params.inputAmount,
47900
+ spender: intentDepositSpender(this.config, params.srcChainKey),
47901
+ raw: false,
47902
+ walletProvider
47903
+ });
47904
+ if (!result.ok) return result;
47905
+ return {
47906
+ ok: true,
47907
+ value: result.value
47908
+ };
47909
+ }
47910
+ if (isStellarChainKeyType(params.srcChainKey)) {
47911
+ leverageYieldInvariant(
47912
+ isOptionalStellarWalletProviderType(walletProvider),
47913
+ "Invalid wallet provider. Expected Stellar wallet provider."
47914
+ );
47915
+ const result = await this.spoke.approve({
47916
+ srcChainKey: params.srcChainKey,
47917
+ token: params.inputToken,
47918
+ amount: params.inputAmount,
47919
+ owner: params.srcAddress,
47920
+ raw: false,
47921
+ walletProvider
47922
+ });
47923
+ if (!result.ok) return result;
47924
+ return {
47925
+ ok: true,
47926
+ value: result.value
47927
+ };
47928
+ }
47929
+ leverageYieldInvariant(false, "Approve only supported for hub (Sonic), EVM spokes, and Stellar", {
47930
+ srcChainKey: params.srcChainKey,
47931
+ field: "srcChainKey"
47932
+ });
47933
+ } catch (error) {
47934
+ return { ok: false, error };
47935
+ }
47936
+ }
47937
+ /**
47938
+ * Completes a vault swap whose intent tx is already broadcast: the backend submit-tx attempt when
47939
+ * `useBackendSubmitTx` is on, falling back to {@link fallbackVaultSwapSteps} on any non-success.
47940
+ * Shared by `vaultSwap()` and `vaultSwapWithApproval()`, which differ only in how the intent tx is sent.
47941
+ */
47942
+ async completeVaultSwap(_params, created) {
47943
+ const timeoutMs = resolveTimeoutMs(_params.timeout, DEFAULT_RELAY_TX_TIMEOUT);
47944
+ if (this.useBackendSubmitTx) {
47945
+ const submitted = await this.submitTx(_params, created, createSubmitTxAttempt(timeoutMs));
47946
+ if (submitted.ok) return submitted;
47947
+ this.config.logger.warn(
47948
+ "[leverageYield] backend submit-tx did not complete; falling back to the client-side relay",
47949
+ { error: submitted.error }
47950
+ );
47951
+ }
47952
+ return this.fallbackVaultSwapSteps(_params, created, timeoutMs);
47953
+ }
45241
47954
  /**
45242
47955
  * Client-side vault-swap completion (the opt-out path, and the fallback): verify the broadcast
45243
47956
  * intent tx landed,
@@ -45249,14 +47962,19 @@ var LeverageYieldService = class {
45249
47962
  async fallbackVaultSwapSteps(_params, created, timeoutMs) {
45250
47963
  const { params } = _params;
45251
47964
  const srcChainKey = params.srcChainKey;
45252
- const baseCtx = { srcChainKey, dstChainKey: params.dstChainKey, action: "vaultSwap" };
45253
47965
  const { tx: spokeTxHash, intent, relayData } = created;
47966
+ const txCtx = {
47967
+ srcChainKey,
47968
+ dstChainKey: params.dstChainKey,
47969
+ action: "vaultSwap",
47970
+ srcTxHash: spokeTxHash
47971
+ };
45254
47972
  const verifyTxHashResult = await this.spoke.verifyTxHash({
45255
47973
  txHash: spokeTxHash,
45256
47974
  chainKey: srcChainKey
45257
47975
  });
45258
47976
  if (!verifyTxHashResult.ok) {
45259
- return { ok: false, error: verifyFailed("leverageYield", verifyTxHashResult.error, baseCtx) };
47977
+ return { ok: false, error: verifyFailed("leverageYield", verifyTxHashResult.error, txCtx) };
45260
47978
  }
45261
47979
  let dstIntentTxHash;
45262
47980
  if (isHubChainKeyType(srcChainKey)) {
@@ -45274,7 +47992,7 @@ var LeverageYieldService = class {
45274
47992
  timeout: Math.max(timeoutMs, RELAY_FALLBACK_FLOOR_MS)
45275
47993
  });
45276
47994
  if (!packet.ok) {
45277
- return { ok: false, error: mapRelayFailure(packet.error, { feature: "leverageYield", ...baseCtx }) };
47995
+ return { ok: false, error: mapRelayFailure(packet.error, { feature: "leverageYield", ...txCtx }) };
45278
47996
  }
45279
47997
  dstIntentTxHash = packet.value.dst_tx_hash;
45280
47998
  }
@@ -45282,7 +48000,14 @@ var LeverageYieldService = class {
45282
48000
  intent_tx_hash: dstIntentTxHash
45283
48001
  });
45284
48002
  if (!postExecResult.ok) {
45285
- return { ok: false, error: postExecResult.error };
48003
+ return {
48004
+ ok: false,
48005
+ error: withErrorContext(postExecResult.error, {
48006
+ srcChainKey,
48007
+ srcTxHash: spokeTxHash,
48008
+ dstTxHash: dstIntentTxHash
48009
+ })
48010
+ };
45286
48011
  }
45287
48012
  return {
45288
48013
  ok: true,
@@ -45483,17 +48208,25 @@ var LeverageYieldService = class {
45483
48208
  * unreadable backend into an error, which is right for a polled read that would otherwise spend a
45484
48209
  * budget on an unverified miss, and wrong to impose on a surface that already ships without it.
45485
48210
  *
48211
+ * Every non-final answer is reconciled, an in-flight one included, and a journal cancel reads
48212
+ * `FAILED`: the solver can keep reporting a cancelled intent in flight, and nothing else ends that poll.
48213
+ *
45486
48214
  * `timeoutMs` bounds the solver request alone. The reconcile carries its own
45487
48215
  * {@link RECONCILE_TIMEOUT_MS}, so a bounded call can cost both.
45488
48216
  */
45489
48217
  async resolveSolverStatus(request, timeoutMs, apiKey) {
45490
48218
  const solverResult = await this.solverStatus(request, timeoutMs, apiKey);
45491
- const forgotten = !solverResult.ok || solverResult.value.status === SolverIntentStatusCode.NOT_FOUND;
45492
- if (!forgotten) return solverResult;
48219
+ const status = solverResult.ok ? solverResult.value.status : void 0;
48220
+ if (status === SolverIntentStatusCode.SOLVED || status === SolverIntentStatusCode.FAILED) return solverResult;
48221
+ const forgotten = !solverResult.ok || status === SolverIntentStatusCode.NOT_FOUND;
45493
48222
  const timeout = Math.min(RECONCILE_TIMEOUT_MS2, this.backendApi.requestTimeoutMs);
45494
48223
  const intent = await this.backendApi.getIntentByTxHash(request.intent_tx_hash, { timeout, apiKey });
45495
- const settled = intent.ok ? intent.value.events.filter(isFillEvent).find((fill) => fill.intentState.remainingInput === "0") : void 0;
45496
- if (settled) return { ok: true, value: { status: SolverIntentStatusCode.SOLVED, fill_tx_hash: settled.txHash } };
48224
+ const outcome = intent.ok ? readIntentJournalOutcome(intent.value) : void 0;
48225
+ if (outcome?.kind === "solved") {
48226
+ return { ok: true, value: { status: SolverIntentStatusCode.SOLVED, fill_tx_hash: outcome.fillTxHash } };
48227
+ }
48228
+ if (outcome?.kind === "cancelled") return { ok: true, value: { status: SolverIntentStatusCode.FAILED } };
48229
+ if (!forgotten) return solverResult;
45497
48230
  const backendAnswered = intent.ok || isSodaxError(intent.error) && intent.error.context?.status === 404;
45498
48231
  if (solverResult.ok && !backendAnswered) {
45499
48232
  return {
@@ -45512,9 +48245,14 @@ var LeverageYieldService = class {
45512
48245
  * Reads a vault swap's status from its source-chain transaction — the identifier a caller always
45513
48246
  * holds after `vaultSwap()`.
45514
48247
  *
45515
- * **Routes; does not translate.** Returns the backend submit-tx record while it is in play,
45516
- * otherwise the solver's answer via the hub tx hash resolved from the relay packet. The result is
45517
- * tagged with `source` (discriminate on it) and carries that source's payload unmodified.
48248
+ * **Routes; defines no status of its own.** Returns the backend submit-tx record while it is in
48249
+ * play, otherwise the solver's answer via the hub tx hash resolved from the relay packet. The result
48250
+ * is tagged with `source` (discriminate on it).
48251
+ *
48252
+ * The solver arm is reconciled against the backend's durable intent record: a settling fill reads
48253
+ * `SOLVED`, and a cancel with nothing filled reads `FAILED` even while the solver still reports the
48254
+ * intent in flight. Otherwise it carries the solver's answer unmodified, and the backend arm its
48255
+ * record unmodified.
45518
48256
  *
45519
48257
  * `sodax.api.leverageYield.getSubmitTxStatus` cannot answer for every vault swap. Sometimes there
45520
48258
  * is no record — `useBackendSubmitTx: false`, or the submit was rejected. More often the record
@@ -45534,8 +48272,8 @@ var LeverageYieldService = class {
45534
48272
  *
45535
48273
  * @param params - `srcChainKey` and `srcTxHash` of the source-chain vault-swap transaction.
45536
48274
  * @param config - Optional per-request override. Its `apiKey` reaches every keyed leg — the
45537
- * submit-tx record read, the solver read, and the durable-intent read a solver `NOT_FOUND` falls
45538
- * back to — so one override keys the whole call. The relay leg is unauthenticated and takes none.
48275
+ * submit-tx record read, the solver read, and the durable-intent read a non-final solver answer
48276
+ * falls back to — so one override keys the whole call. The relay leg is unauthenticated and takes none.
45539
48277
  * @returns A `Result` containing a {@link DetailedLeverageYieldStatus}. Fails with `LOOKUP_FAILED`
45540
48278
  * when no source can answer yet. Branch on `error.context.reason`:
45541
48279
  * `DETAILED_STATUS_NOT_DELIVERED` is the ambiguous miss a caller should bound with a retry
@@ -47956,4 +50694,4 @@ function isNoRouteRefusal(error) {
47956
50694
  (*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
47957
50695
  */
47958
50696
 
47959
- export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, AssetService, BACKEND_API_BASE_PATH, BITCOIN_CHAIN_KEYS, BITCOIN_CHAIN_KEYS_SET, BITCOIN_DUST_SATS, BOUND_API_HOST, BOUND_COMPANION_HOSTS, BTC_WALLET_ADDRESS_TYPES, BackendApiService, BackendHttpError, BalnSwapService, BigIntToHex, BigNumberZeroDecimal, BitcoinSpokeService, BnUSDMigrationService, BridgeApiService, BridgeService, CHAIN_KEYS, CHAIN_LOGO_BASE_URL, CONFIG_VERSION, CREATE_INTENT_CODES, ChainKeys, ChainTypeArr, ClService, ConfigService, CustomSorobanServer, CustomStellarAccount, DEFAULT_API_BASE_URL, DEFAULT_BACKEND_API_ENDPOINT, DEFAULT_BACKEND_API_HEADERS, DEFAULT_BACKEND_API_TIMEOUT, DEFAULT_DEADLINE_OFFSET, DEFAULT_MAX_RETRY, DEFAULT_RELAYER_API_ENDPOINT, DEFAULT_RELAY_TX_TIMEOUT, DEFAULT_RETRY_DELAY_MS, DEFAULT_SPONSORING_API_ENDPOINT, DEPRECATED_BOUND_HOSTS, DETAILED_STATUS_NOT_DELIVERED, DexService, EVM_CHAIN_ID_TO_KEY, EVM_CHAIN_KEYS, EVM_CHAIN_KEYS_SET, EVM_SPOKE_ONLY_CHAIN_KEYS, EVM_SPOKE_ONLY_CHAIN_KEYS_SET, Erc20Service, Erc4626Service, EvmAssetManagerService, EvmHubProvider, EvmSolverService, EvmSpokeService, EvmVaultTokenService, FEE_PERCENTAGE_SCALE, GAS_ESTIMATION_CODES, HALF_RAY, HALF_WAD, HUB_CHAIN_KEY, HookKind, HookService, HttpRelayError, HubVaultSymbols, ICON_CHAIN_KEYS, ICON_CHAIN_KEYS_SET, ICON_TX_RESULT_WAIT_MAX_RETRY, INJECTIVE_CHAIN_KEYS, INJECTIVE_CHAIN_KEYS_SET, INTENT_CHAIN_IDS, IconSpokeService, IcxMigrationService, Injective20Token, InjectiveSpokeService, IntentCreatedEventAbi, IntentDataService, IntentDataType, IntentFilledEventAbi, IntentRelayChainIdToChainKey, IntentsAbi, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, LeverageYieldApiService, LeverageYieldService, LockupMultiplier, LockupPeriod, LsodaSymbols, LsodaTokens, MAX_POSITION_FEE_BPS, MAX_UINT256, MigrationService, MintPositionEventAbi, MoneyMarketDataService, MoneyMarketService, NEAR_CHAIN_KEYS, NEAR_CHAIN_KEYS_SET, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, ORACLE_CANDLE_INTERVALS, PartnerFeeClaimService, PartnerService, Permit2Service, ProtocolIntentsAbi, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RELAY_FALLBACK_FLOOR_MS, RELAY_REQUEST_TIMEOUT_MS, RadfiApiError, RadfiProvider, RecoveryService, RelayChainIdMap, SDK_VERSION, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, SOLANA_CHAIN_KEYS, SOLANA_CHAIN_KEYS_SET, SONIC_CHAIN_KEYS, SONIC_CHAIN_KEYS_SET, SPEED_TIER_SECONDS, SPEED_TIER_THRESHOLDS, SPONSORING_API_ERROR_CODES, SPONSORING_API_STELLAR_BASE_PATH, SPONSOR_CONFIG_TTL_MS, STACKS_CHAIN_KEYS, STACKS_CHAIN_KEYS_SET, STELLAR_BASE_RESERVE_TTL_MS, STELLAR_CHAIN_KEYS, STELLAR_CHAIN_KEYS_SET, STELLAR_TRUSTLINE_MIN_XLM_STROOPS, SUI_CHAIN_KEYS, SUI_CHAIN_KEYS_SET, SodaTokens, Sodax, SodaxError, SolanaSpokeService, SolverApiService, SolverIntentErrorCode, SolverIntentStatusCode, SonicSpokeService, SpokeService, SponsoringApiService, SponsoringService, StacksSpokeService, StakingLogic, StakingService, StatATokenAddresses, StellarSpokeService, SuiGrpcTransport, SuiSpokeService, SupportedMigrationTokens, SwapService, SwapsApiService, TOKEN_LOGO_BASE_URL, USD_DECIMALS, UiPoolDataProviderService, VAULT_TOKEN_DECIMALS, WAD, WAD_RAY_RATIO, WEI_DECIMALS, adjustAmountByFee, allowanceCheckFailed, apiConfig, approveFailed, arbitrumSupportedTokens, assetManagerAbi, avalancheSupportedTokens, balnSwapAbi, baseChainInfo, baseSupportedTokens, binomialApproximatedRayPow, bitcoinSupportedTokens, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bridgeConfig, bridgeInvariant, bscSupportedTokens, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, canonicalizeBitcoinAddress, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, classifySponsorError, concentratedLiquidityConfig, configVersionFor, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createBalanceCollector, createInvariant, deepMerge, defaultHookAbi, detectBitcoinAddressType, dexConfig, dexInvariant, dexPools, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, encodeTokenIdentifier, erc20Abi, erc4626Abi, estimateBitcoinTxSize, estimateSwapSpeedTier, ethereumSupportedTokens, executionFailed, formatBasisPoints, formatConfigVersion, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getChainKeyFromRelayChainId, getChainType, getCompoundedBalance, getConcentratedLiquidityConfig, getConnectionIdl, getConnectionProgram, getEvmChainKeyByChainId, getEvmViemChain, getIconAddressBytes, getIntentRelayChainId, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getSolverConfig, getSpokeHook, getSpokeHooks, getStagingSolverTokens, getSupportedSolverTokens, getTransactionPackets, getbnUSDToken, hederaSupportedTokens, hexToBigInt, hexToSolanaAddress, hubConfig, hyper, hyperevmSupportedTokens, iconSupportedTokens, injectiveSupportedTokens, intentCreationFailed, isApprovalSupportedChainKeyType, isAuthFailure, isAuthStatus, isBackendHttpError, isBalnMigrateParams, isBitcoinChainKey, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexApproveError, isDexCreateIntentError, isDexError, isEvmChainKey, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKey, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isFillEvent, isHookSupportedToken, isHubChainKey, isHubChainKeyType, isIconAddress, isIconChainKey, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKey, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNativeBitcoinToken, isNativeBitcoinTransfer, isNativeToken, isNearChainKey, isNearChainKeyType, isNewbnUSDChainId, isNewbnUSDToken, isNoRouteRefusal, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isOracleCandleInterval, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRealWorldAsset, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKey, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKey, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeChainKey, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isSponsoringConfigError, isSponsoringLookupError, isSponsoringOrchestrationError, isStacksChainKey, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKey, isStellarChainKeyType, isStellarWalletProviderType, isSuiChainKey, isSuiChainKeyType, isSupportedBitcoinAddressType, isSwapCreateIntentError, isSwapError, isSwapSupportedToken, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, isValidBitcoinAddress, isValidInjectiveAddress, isValidNearAccountId, isValidWalletProviderForChainKey, kaiaSupportedTokens, leverageYieldConfig, leverageYieldInvariant, leverageYieldVaults, leveragedNetApyPct, lightlinkSupportedTokens, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, moneyMarketConfig, moneyMarketReserveAssets, moneyMarketSupportedTokens, nativeToUSD, nearSupportedTokens, newbnUSDSpokeChainIds, noopAnalytics, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, optimismSupportedTokens, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseConfigVersion, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, polygonSupportedTokens, poolAbi, poolKeyAbi, projectLeverageLeg, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, redbellySupportedTokens, relayConfig, relayTxAndWaitPacket, reportPositionIntent, requestAddress, requestJsonRpc, requestSigning, resolveAnalytics, resolveLogger, resolvePositionFundingAddress, retry, reverseEncodeAddress, robinhoodChain, robinhoodSupportedTokens, serializeAddressData, settleWalletBalances, silentLogger, sizeLeverageBorrow, sleep, sodaxConfig, sodaxInvariant, solanaSupportedTokens, solverConfig, sonicSupportedTokens, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, spokeChainKeysSet, spokeHooks, sponsoringInvariant, stacksSupportedTokens, stagingSwapSupportedTokens, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, stellarSupportedTokens, submitTransaction, suiSupportedTokens, supportedSpokeChains, supportedTokensByChain, swapExactInSingleParamsAbi, swapInvariant, swapSupportedTokens, swapsConfig, timeToBreakevenYears, toCreateBridgeIntentParamsV2, toSuiExecutionResult, toSuiExecutionStatus, toSuiPaginatedCoins, tokenLogo, tokenLogoSlug, uiPoolDataAbi, universalRouterAbi, unknownFailed, usesBip322MessageSigning, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
50697
+ export { ACCOUNT_UPGRADE_DECLINED, ALLOWANCE_CHECK_CODES, APPROVE_CODES, ATOMIC_BATCH_REFUSED, ATOMIC_BATCH_UNCONFIRMED, AssetService, BACKEND_API_BASE_PATH, BITCOIN_CHAIN_KEYS, BITCOIN_CHAIN_KEYS_SET, BITCOIN_DUST_SATS, BOUND_API_HOST, BOUND_COMPANION_HOSTS, BTC_WALLET_ADDRESS_TYPES, BackendApiService, BackendHttpError, BalnSwapService, BigIntToHex, BigNumberZeroDecimal, BitcoinSpokeService, BnUSDMigrationService, BridgeApiService, BridgeService, CHAIN_KEYS, CHAIN_LOGO_BASE_URL, CONFIG_VERSION, CREATE_INTENT_CODES, ChainKeys, ChainTypeArr, ClService, ConfigService, CustomSorobanServer, CustomStellarAccount, DEFAULT_API_BASE_URL, DEFAULT_BACKEND_API_ENDPOINT, DEFAULT_BACKEND_API_HEADERS, DEFAULT_BACKEND_API_TIMEOUT, DEFAULT_DEADLINE_OFFSET, DEFAULT_MAX_RETRY, DEFAULT_RELAYER_API_ENDPOINT, DEFAULT_RELAY_TX_TIMEOUT, DEFAULT_RETRY_DELAY_MS, DEFAULT_SPONSORING_API_ENDPOINT, DEPRECATED_BOUND_HOSTS, DETAILED_STATUS_NOT_DELIVERED, DexService, EVM_CHAIN_ID_TO_KEY, EVM_CHAIN_KEYS, EVM_CHAIN_KEYS_SET, EVM_SPOKE_ONLY_CHAIN_KEYS, EVM_SPOKE_ONLY_CHAIN_KEYS_SET, Erc20Service, Erc4626Service, EvmAssetManagerService, EvmHubProvider, EvmSolverService, EvmSpokeService, EvmVaultTokenService, FEE_PERCENTAGE_SCALE, GAS_ESTIMATION_CODES, HALF_RAY, HALF_WAD, HUB_CHAIN_KEY, HookKind, HookService, HttpRelayError, HubVaultSymbols, ICON_CHAIN_KEYS, ICON_CHAIN_KEYS_SET, ICON_TX_RESULT_WAIT_MAX_RETRY, INJECTIVE_CHAIN_KEYS, INJECTIVE_CHAIN_KEYS_SET, INTENT_CHAIN_IDS, IconSpokeService, IcxMigrationService, Injective20Token, InjectiveSpokeService, IntentCreatedEventAbi, IntentDataService, IntentDataType, IntentFilledEventAbi, IntentRelayChainIdToChainKey, IntentsAbi, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, LeverageYieldApiService, LeverageYieldService, LockupMultiplier, LockupPeriod, LsodaSymbols, LsodaTokens, MAX_POSITION_FEE_BPS, MAX_UINT256, MigrationService, MintPositionEventAbi, MoneyMarketDataService, MoneyMarketService, NEAR_CHAIN_KEYS, NEAR_CHAIN_KEYS_SET, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, ORACLE_CANDLE_INTERVALS, PartnerFeeClaimService, PartnerService, Permit2Service, ProtocolIntentsAbi, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RELAY_FALLBACK_FLOOR_MS, RELAY_REQUEST_TIMEOUT_MS, RadfiApiError, RadfiProvider, RecoveryService, RelayChainIdMap, SDK_VERSION, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, SOLANA_CHAIN_KEYS, SOLANA_CHAIN_KEYS_SET, SONIC_CHAIN_KEYS, SONIC_CHAIN_KEYS_SET, SPEED_TIER_SECONDS, SPEED_TIER_THRESHOLDS, SPONSORING_API_ERROR_CODES, SPONSORING_API_STELLAR_BASE_PATH, SPONSOR_CONFIG_TTL_MS, STACKS_CHAIN_KEYS, STACKS_CHAIN_KEYS_SET, STELLAR_BASE_RESERVE_TTL_MS, STELLAR_CHAIN_KEYS, STELLAR_CHAIN_KEYS_SET, STELLAR_TRUSTLINE_MIN_XLM_STROOPS, SUI_CHAIN_KEYS, SUI_CHAIN_KEYS_SET, SodaTokens, Sodax, SodaxError, SolanaSpokeService, SolverApiService, SolverIntentErrorCode, SolverIntentStatusCode, SonicSpokeService, SpokeService, SponsoringApiService, SponsoringService, StacksSpokeService, StakingLogic, StakingService, StatATokenAddresses, StellarSpokeService, SuiGrpcTransport, SuiSpokeService, SupportedMigrationTokens, SwapService, SwapsApiService, TOKEN_LOGO_BASE_URL, USD_DECIMALS, UiPoolDataProviderService, VAULT_TOKEN_DECIMALS, WAD, WAD_RAY_RATIO, WEI_DECIMALS, adjustAmountByFee, allowanceCheckFailed, apiConfig, approveFailed, arbitrumSupportedTokens, assetManagerAbi, avalancheSupportedTokens, balnSwapAbi, baseChainInfo, baseSupportedTokens, binomialApproximatedRayPow, bitcoinSupportedTokens, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bridgeConfig, bridgeInvariant, bscSupportedTokens, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, canonicalizeBitcoinAddress, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, classifySponsorError, concentratedLiquidityConfig, configVersionFor, confirmApprovalBatch, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createBalanceCollector, createInvariant, deepMerge, defaultHookAbi, detectBitcoinAddressType, dexConfig, dexInvariant, dexPools, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, encodeTokenIdentifier, erc20Abi, erc4626Abi, estimateBitcoinTxSize, estimateSwapSpeedTier, ethereumSupportedTokens, executionFailed, formatBasisPoints, formatConfigVersion, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getChainKeyFromRelayChainId, getChainType, getCompoundedBalance, getConcentratedLiquidityConfig, getConnectionIdl, getConnectionProgram, getEvmChainKeyByChainId, getEvmViemChain, getIconAddressBytes, getIntentRelayChainId, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getSolverConfig, getSpokeHook, getSpokeHooks, getStagingSolverTokens, getSupportedSolverTokens, getTransactionPackets, getbnUSDToken, hederaSupportedTokens, hexToBigInt, hexToSolanaAddress, hubConfig, hyper, hyperevmSupportedTokens, iconSupportedTokens, injectiveSupportedTokens, intentCreationFailed, isApprovalSupportedChainKeyType, isAtomicBatchRefusal, isAuthFailure, isAuthStatus, isBackendHttpError, isBalnMigrateParams, isBitcoinChainKey, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isBridgeWithApprovalError, isCodeMember, isDexApproveError, isDexCreateIntentError, isDexError, isEvmChainKey, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKey, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isFillEvent, isHookSupportedToken, isHubChainKey, isHubChainKeyType, isIconAddress, isIconChainKey, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKey, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNativeBitcoinToken, isNativeBitcoinTransfer, isNativeToken, isNearChainKey, isNearChainKeyType, isNewbnUSDChainId, isNewbnUSDToken, isNoRouteRefusal, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isOracleCandleInterval, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRealWorldAsset, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKey, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKey, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeChainKey, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isSponsoringConfigError, isSponsoringLookupError, isSponsoringOrchestrationError, isStacksChainKey, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKey, isStellarChainKeyType, isStellarWalletProviderType, isSuiChainKey, isSuiChainKeyType, isSupportedBitcoinAddressType, isSwapCreateIntentError, isSwapError, isSwapSupportedToken, isSwapWithApprovalError, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, isValidBitcoinAddress, isValidInjectiveAddress, isValidNearAccountId, isValidWalletProviderForChainKey, isVaultSwapWithApprovalError, kaiaSupportedTokens, leverageYieldConfig, leverageYieldInvariant, leverageYieldVaults, leveragedNetApyPct, lightlinkSupportedTokens, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, moneyMarketConfig, moneyMarketReserveAssets, moneyMarketSupportedTokens, nativeToUSD, nearSupportedTokens, newbnUSDSpokeChainIds, noopAnalytics, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, optimismSupportedTokens, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseConfigVersion, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, polygonSupportedTokens, poolAbi, poolKeyAbi, projectLeverageLeg, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, redbellySupportedTokens, relayConfig, relayTxAndWaitPacket, reportPositionIntent, requestAddress, requestJsonRpc, requestSigning, resolveAnalytics, resolveApprovalStrategy, resolveLogger, resolvePositionFundingAddress, retry, reverseEncodeAddress, robinhoodChain, robinhoodSupportedTokens, sendApprovalBatch, serializeAddressData, settleWalletBalances, silentLogger, sizeLeverageBorrow, sleep, sodaxConfig, sodaxInvariant, solanaSupportedTokens, solverConfig, sonicSupportedTokens, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, spokeChainKeysSet, spokeHooks, sponsoringInvariant, stacksSupportedTokens, stagingSwapSupportedTokens, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, stellarSupportedTokens, submitTransaction, suiSupportedTokens, summarizeSwapStatus, supportedSpokeChains, supportedTokensByChain, swapExactInSingleParamsAbi, swapInvariant, swapSupportedTokens, swapsConfig, timeToBreakevenYears, toCreateBridgeIntentParamsV2, toSuiExecutionResult, toSuiExecutionStatus, toSuiPaginatedCoins, tokenLogo, tokenLogoSlug, uiPoolDataAbi, universalRouterAbi, unknownFailed, usesBip322MessageSigning, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, withErrorContext, wrappedSonicAbi };