@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.cjs CHANGED
@@ -123,8 +123,8 @@ function serializeCause(cause, depth) {
123
123
  }
124
124
  function sanitizeContext(value, depth) {
125
125
  const out = {};
126
- for (const [key, v10] of Object.entries(value)) {
127
- out[key] = sanitizeValue(v10, depth + 1);
126
+ for (const [key, v11] of Object.entries(value)) {
127
+ out[key] = sanitizeValue(v11, depth + 1);
128
128
  }
129
129
  return out;
130
130
  }
@@ -135,13 +135,13 @@ function sanitizeValue(value, depth) {
135
135
  if (t === "bigint") return value.toString();
136
136
  if (t === "string" || t === "number" || t === "boolean") return value;
137
137
  if (t === "function" || t === "symbol") return safeString(value);
138
- if (Array.isArray(value)) return value.map((v10) => sanitizeValue(v10, depth + 1));
138
+ if (Array.isArray(value)) return value.map((v11) => sanitizeValue(v11, depth + 1));
139
139
  if (value instanceof Date) return value.toISOString();
140
140
  if (value instanceof Map) {
141
- return Array.from(value.entries()).map(([k, v10]) => [sanitizeValue(k, depth + 1), sanitizeValue(v10, depth + 1)]);
141
+ return Array.from(value.entries()).map(([k, v11]) => [sanitizeValue(k, depth + 1), sanitizeValue(v11, depth + 1)]);
142
142
  }
143
143
  if (value instanceof Set) {
144
- return Array.from(value.values()).map((v10) => sanitizeValue(v10, depth + 1));
144
+ return Array.from(value.values()).map((v11) => sanitizeValue(v11, depth + 1));
145
145
  }
146
146
  if (value instanceof Error) return { name: value.name, message: value.message };
147
147
  if (t === "object") {
@@ -153,9 +153,9 @@ function sanitizeValue(value, depth) {
153
153
  }
154
154
  return safeString(value);
155
155
  }
156
- function safeString(v10) {
156
+ function safeString(v11) {
157
157
  try {
158
- return String(v10);
158
+ return String(v11);
159
159
  } catch {
160
160
  return "[unserializable]";
161
161
  }
@@ -317,7 +317,7 @@ var CHAIN_KEYS = Object.values(ChainKeys);
317
317
  var spokeChainKeysSet = new Set(CHAIN_KEYS);
318
318
 
319
319
  // ../types/dist/chains/tokens.js
320
- var TOKEN_LOGO_BASE_URL = "https://raw.githubusercontent.com/icon-project/sodax-sdks/main/packages/assets/token";
320
+ var TOKEN_LOGO_BASE_URL = "https://raw.githubusercontent.com/gosodax/sodax-sdks/main/packages/assets/token";
321
321
  var tokenLogoSlug = (symbol) => symbol.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
322
322
  var tokenLogo = (symbol) => `${TOKEN_LOGO_BASE_URL}/${tokenLogoSlug(symbol)}.png`;
323
323
  var StatATokenAddresses = {
@@ -378,7 +378,31 @@ var HubVaultSymbols = [
378
378
  "TSM",
379
379
  "AMD",
380
380
  "INTC",
381
- "BABA"
381
+ "BABA",
382
+ "AMC",
383
+ "HIMS",
384
+ "LLY",
385
+ "COST",
386
+ "TTWO",
387
+ "RBLX",
388
+ "IBM",
389
+ "MRNA",
390
+ "LULU",
391
+ "SNAP",
392
+ "WYFI",
393
+ "RIVN",
394
+ "NFLX",
395
+ "BULL",
396
+ "QUBT",
397
+ "NET",
398
+ "SKHY",
399
+ "JNJ",
400
+ "UPS",
401
+ "DJT",
402
+ "RDDT",
403
+ "GLD",
404
+ "sodaADA",
405
+ "sodaZEC"
382
406
  ];
383
407
  var SodaTokens = {
384
408
  sodaBNB: {
@@ -881,6 +905,244 @@ var SodaTokens = {
881
905
  chainKey: ChainKeys.SONIC_MAINNET,
882
906
  hubAsset: "0x1BeD0547D76F6424e9A3465b36F6dcDCF798A5cf",
883
907
  vault: "0x1BeD0547D76F6424e9A3465b36F6dcDCF798A5cf"
908
+ },
909
+ AMC: {
910
+ symbol: "AMC",
911
+ isRwa: true,
912
+ name: "AMC Entertainment \u2022 Robinhood Token",
913
+ decimals: 18,
914
+ address: "0x8f7357Ec98e6eBAE8Cfb75802AFFc7c9a774dFBd",
915
+ chainKey: ChainKeys.SONIC_MAINNET,
916
+ hubAsset: "0x8f7357Ec98e6eBAE8Cfb75802AFFc7c9a774dFBd",
917
+ vault: "0x8f7357Ec98e6eBAE8Cfb75802AFFc7c9a774dFBd"
918
+ },
919
+ HIMS: {
920
+ symbol: "HIMS",
921
+ isRwa: true,
922
+ name: "Hims & Hers Health \u2022 Robinhood Token",
923
+ decimals: 18,
924
+ address: "0xFb31A6c21439C1e3101e0470a9F3299ECB295b93",
925
+ chainKey: ChainKeys.SONIC_MAINNET,
926
+ hubAsset: "0xFb31A6c21439C1e3101e0470a9F3299ECB295b93",
927
+ vault: "0xFb31A6c21439C1e3101e0470a9F3299ECB295b93"
928
+ },
929
+ LLY: {
930
+ symbol: "LLY",
931
+ isRwa: true,
932
+ name: "Eli Lilly \u2022 Robinhood Token",
933
+ decimals: 18,
934
+ address: "0xa6F481B22349DeA3739089e67D32A8A07078bB53",
935
+ chainKey: ChainKeys.SONIC_MAINNET,
936
+ hubAsset: "0xa6F481B22349DeA3739089e67D32A8A07078bB53",
937
+ vault: "0xa6F481B22349DeA3739089e67D32A8A07078bB53"
938
+ },
939
+ COST: {
940
+ symbol: "COST",
941
+ isRwa: true,
942
+ name: "Costco \u2022 Robinhood Token",
943
+ decimals: 18,
944
+ address: "0x6893A6c578f449AA0f748CA6B2A9Fc50Fed91C30",
945
+ chainKey: ChainKeys.SONIC_MAINNET,
946
+ hubAsset: "0x6893A6c578f449AA0f748CA6B2A9Fc50Fed91C30",
947
+ vault: "0x6893A6c578f449AA0f748CA6B2A9Fc50Fed91C30"
948
+ },
949
+ TTWO: {
950
+ symbol: "TTWO",
951
+ isRwa: true,
952
+ name: "Take-Two Interactive Software \u2022 Robinhood Token",
953
+ decimals: 18,
954
+ address: "0xd56534102359A4b69E81Cf6eFa6835EABd116c44",
955
+ chainKey: ChainKeys.SONIC_MAINNET,
956
+ hubAsset: "0xd56534102359A4b69E81Cf6eFa6835EABd116c44",
957
+ vault: "0xd56534102359A4b69E81Cf6eFa6835EABd116c44"
958
+ },
959
+ RBLX: {
960
+ symbol: "RBLX",
961
+ isRwa: true,
962
+ name: "Roblox \u2022 Robinhood Token",
963
+ decimals: 18,
964
+ address: "0xC0D7a1f4cE9AaF981502DA15C8EbAEC21F1678Da",
965
+ chainKey: ChainKeys.SONIC_MAINNET,
966
+ hubAsset: "0xC0D7a1f4cE9AaF981502DA15C8EbAEC21F1678Da",
967
+ vault: "0xC0D7a1f4cE9AaF981502DA15C8EbAEC21F1678Da"
968
+ },
969
+ IBM: {
970
+ symbol: "IBM",
971
+ isRwa: true,
972
+ name: "IBM \u2022 Robinhood Token",
973
+ decimals: 18,
974
+ address: "0x6cF19BAD00110C5F4f584b11d3ac935794AE1300",
975
+ chainKey: ChainKeys.SONIC_MAINNET,
976
+ hubAsset: "0x6cF19BAD00110C5F4f584b11d3ac935794AE1300",
977
+ vault: "0x6cF19BAD00110C5F4f584b11d3ac935794AE1300"
978
+ },
979
+ MRNA: {
980
+ symbol: "MRNA",
981
+ isRwa: true,
982
+ name: "Moderna \u2022 Robinhood Token",
983
+ decimals: 18,
984
+ address: "0xd5fb16C3fAfaCa3032b0d715d00E72e11Dc799B6",
985
+ chainKey: ChainKeys.SONIC_MAINNET,
986
+ hubAsset: "0xd5fb16C3fAfaCa3032b0d715d00E72e11Dc799B6",
987
+ vault: "0xd5fb16C3fAfaCa3032b0d715d00E72e11Dc799B6"
988
+ },
989
+ LULU: {
990
+ symbol: "LULU",
991
+ isRwa: true,
992
+ name: "Lululemon \u2022 Robinhood Token",
993
+ decimals: 18,
994
+ address: "0x44d7BeFa3fF3BE055910d7591aaA12FD6907F0eb",
995
+ chainKey: ChainKeys.SONIC_MAINNET,
996
+ hubAsset: "0x44d7BeFa3fF3BE055910d7591aaA12FD6907F0eb",
997
+ vault: "0x44d7BeFa3fF3BE055910d7591aaA12FD6907F0eb"
998
+ },
999
+ SNAP: {
1000
+ symbol: "SNAP",
1001
+ isRwa: true,
1002
+ name: "Snap \u2022 Robinhood Token",
1003
+ decimals: 18,
1004
+ address: "0x5E0cBeCFAc572F6Ec0C254CAF9DE20D476814C9F",
1005
+ chainKey: ChainKeys.SONIC_MAINNET,
1006
+ hubAsset: "0x5E0cBeCFAc572F6Ec0C254CAF9DE20D476814C9F",
1007
+ vault: "0x5E0cBeCFAc572F6Ec0C254CAF9DE20D476814C9F"
1008
+ },
1009
+ WYFI: {
1010
+ symbol: "WYFI",
1011
+ isRwa: true,
1012
+ name: "WhiteFiber, Inc. \u2022 Robinhood Token",
1013
+ decimals: 18,
1014
+ address: "0x94b01A709d83A871034B468a720a420abAa61F69",
1015
+ chainKey: ChainKeys.SONIC_MAINNET,
1016
+ hubAsset: "0x94b01A709d83A871034B468a720a420abAa61F69",
1017
+ vault: "0x94b01A709d83A871034B468a720a420abAa61F69"
1018
+ },
1019
+ RIVN: {
1020
+ symbol: "RIVN",
1021
+ isRwa: true,
1022
+ name: "Rivian Automotive \u2022 Robinhood Token",
1023
+ decimals: 18,
1024
+ address: "0xd37e433ACd08911904Ce3368482E67D569811faC",
1025
+ chainKey: ChainKeys.SONIC_MAINNET,
1026
+ hubAsset: "0xd37e433ACd08911904Ce3368482E67D569811faC",
1027
+ vault: "0xd37e433ACd08911904Ce3368482E67D569811faC"
1028
+ },
1029
+ NFLX: {
1030
+ symbol: "NFLX",
1031
+ isRwa: true,
1032
+ name: "Netflix \u2022 Robinhood Token",
1033
+ decimals: 18,
1034
+ address: "0xc866d70B8a4BAf9a200Fbe9b9db802A0dA32330A",
1035
+ chainKey: ChainKeys.SONIC_MAINNET,
1036
+ hubAsset: "0xc866d70B8a4BAf9a200Fbe9b9db802A0dA32330A",
1037
+ vault: "0xc866d70B8a4BAf9a200Fbe9b9db802A0dA32330A"
1038
+ },
1039
+ BULL: {
1040
+ symbol: "BULL",
1041
+ isRwa: true,
1042
+ name: "Webull \u2022 Robinhood Token",
1043
+ decimals: 18,
1044
+ address: "0xd01969b6effb9c9AAE68F1B5a8505d5738dc29A3",
1045
+ chainKey: ChainKeys.SONIC_MAINNET,
1046
+ hubAsset: "0xd01969b6effb9c9AAE68F1B5a8505d5738dc29A3",
1047
+ vault: "0xd01969b6effb9c9AAE68F1B5a8505d5738dc29A3"
1048
+ },
1049
+ QUBT: {
1050
+ symbol: "QUBT",
1051
+ isRwa: true,
1052
+ name: "Quantum Computing \u2022 Robinhood Token",
1053
+ decimals: 18,
1054
+ address: "0x2A6B3ABB63f3b5f002B7683f4eb32f68e3e4103E",
1055
+ chainKey: ChainKeys.SONIC_MAINNET,
1056
+ hubAsset: "0x2A6B3ABB63f3b5f002B7683f4eb32f68e3e4103E",
1057
+ vault: "0x2A6B3ABB63f3b5f002B7683f4eb32f68e3e4103E"
1058
+ },
1059
+ NET: {
1060
+ symbol: "NET",
1061
+ isRwa: true,
1062
+ name: "Cloudflare, Inc. Class A common stock \u2022 Robinhood Token",
1063
+ decimals: 18,
1064
+ address: "0x4658eD29E62701242695a7aF0B534De56956432B",
1065
+ chainKey: ChainKeys.SONIC_MAINNET,
1066
+ hubAsset: "0x4658eD29E62701242695a7aF0B534De56956432B",
1067
+ vault: "0x4658eD29E62701242695a7aF0B534De56956432B"
1068
+ },
1069
+ SKHY: {
1070
+ symbol: "SKHY",
1071
+ isRwa: true,
1072
+ name: "SK hynix Inc. American Depositary Shares \u2022 Robinhood Token",
1073
+ decimals: 18,
1074
+ address: "0x72E4ad33c018016ee983c8d43C1F739Be1043c54",
1075
+ chainKey: ChainKeys.SONIC_MAINNET,
1076
+ hubAsset: "0x72E4ad33c018016ee983c8d43C1F739Be1043c54",
1077
+ vault: "0x72E4ad33c018016ee983c8d43C1F739Be1043c54"
1078
+ },
1079
+ JNJ: {
1080
+ symbol: "JNJ",
1081
+ isRwa: true,
1082
+ name: "Johnson & Johnson \u2022 Robinhood Token",
1083
+ decimals: 18,
1084
+ address: "0x34107FD696CCeFb833256C028c670aC95A4612A5",
1085
+ chainKey: ChainKeys.SONIC_MAINNET,
1086
+ hubAsset: "0x34107FD696CCeFb833256C028c670aC95A4612A5",
1087
+ vault: "0x34107FD696CCeFb833256C028c670aC95A4612A5"
1088
+ },
1089
+ UPS: {
1090
+ symbol: "UPS",
1091
+ isRwa: true,
1092
+ name: "UPS \u2022 Robinhood Token",
1093
+ decimals: 18,
1094
+ address: "0x17b78F0626c85591D14E4DEFfe1AA14cb86d1A3D",
1095
+ chainKey: ChainKeys.SONIC_MAINNET,
1096
+ hubAsset: "0x17b78F0626c85591D14E4DEFfe1AA14cb86d1A3D",
1097
+ vault: "0x17b78F0626c85591D14E4DEFfe1AA14cb86d1A3D"
1098
+ },
1099
+ DJT: {
1100
+ symbol: "DJT",
1101
+ isRwa: true,
1102
+ name: "Trump Media & Technology Group \u2022 Robinhood Token",
1103
+ decimals: 18,
1104
+ address: "0xeeb7355B245A50f7a91CFc7adbcE008E6c548960",
1105
+ chainKey: ChainKeys.SONIC_MAINNET,
1106
+ hubAsset: "0xeeb7355B245A50f7a91CFc7adbcE008E6c548960",
1107
+ vault: "0xeeb7355B245A50f7a91CFc7adbcE008E6c548960"
1108
+ },
1109
+ RDDT: {
1110
+ symbol: "RDDT",
1111
+ isRwa: true,
1112
+ name: "Reddit \u2022 Robinhood Token",
1113
+ decimals: 18,
1114
+ address: "0x9106D29aee2bB2218ecb913aC2fAca242f315c9b",
1115
+ chainKey: ChainKeys.SONIC_MAINNET,
1116
+ hubAsset: "0x9106D29aee2bB2218ecb913aC2fAca242f315c9b",
1117
+ vault: "0x9106D29aee2bB2218ecb913aC2fAca242f315c9b"
1118
+ },
1119
+ GLD: {
1120
+ symbol: "GLD",
1121
+ isRwa: true,
1122
+ name: "SPDR Gold Trust \u2022 Robinhood Token",
1123
+ decimals: 18,
1124
+ address: "0x308f76Fc48196afb8C953f22d37d072eF3ceE0B8",
1125
+ chainKey: ChainKeys.SONIC_MAINNET,
1126
+ hubAsset: "0x308f76Fc48196afb8C953f22d37d072eF3ceE0B8",
1127
+ vault: "0x308f76Fc48196afb8C953f22d37d072eF3ceE0B8"
1128
+ },
1129
+ sodaADA: {
1130
+ symbol: "sodaADA",
1131
+ name: "SODA ADA",
1132
+ decimals: 18,
1133
+ address: "0xa3e161c014b6285f06425f9fd78aa83b60c1ab9e",
1134
+ chainKey: ChainKeys.SONIC_MAINNET,
1135
+ hubAsset: "0xa3e161c014b6285f06425f9fd78aa83b60c1ab9e",
1136
+ vault: "0xa3e161c014b6285f06425f9fd78aa83b60c1ab9e"
1137
+ },
1138
+ sodaZEC: {
1139
+ symbol: "sodaZEC",
1140
+ name: "SODA ZEC",
1141
+ decimals: 18,
1142
+ address: "0xf4af0aa80f079d5bff230c5b12109fa19b24f558",
1143
+ chainKey: ChainKeys.SONIC_MAINNET,
1144
+ hubAsset: "0xf4af0aa80f079d5bff230c5b12109fa19b24f558",
1145
+ vault: "0xf4af0aa80f079d5bff230c5b12109fa19b24f558"
884
1146
  }
885
1147
  };
886
1148
  var LsodaSymbols = ["lsodaWEETH", "lsodaWSTETH", "lsodaJITOSOL", "lsodaSUSDS"];
@@ -1422,6 +1684,216 @@ var solanaSupportedTokens = {
1422
1684
  chainKey: ChainKeys.SOLANA_MAINNET,
1423
1685
  hubAsset: "0x0a3a93b7303a582b2ab84cfb3493fdb9d160a3ef",
1424
1686
  vault: "0x0a3a93b7303a582b2ab84cfb3493fdb9d160a3ef"
1687
+ },
1688
+ "2Z": {
1689
+ symbol: "2Z",
1690
+ name: "DoubleZero",
1691
+ decimals: 8,
1692
+ address: "J6pQQ3FAcJQeWPPGppWRb4nM8jU3wLyYbRrLh7feMfvd",
1693
+ chainKey: ChainKeys.SOLANA_MAINNET,
1694
+ hubAsset: "0xe27f9c0e27a71743a1e43f585b9f17c6a9c2493f",
1695
+ vault: "0xe27f9c0e27a71743a1e43f585b9f17c6a9c2493f"
1696
+ },
1697
+ ANSEM: {
1698
+ symbol: "ANSEM",
1699
+ name: "The Black Bull",
1700
+ decimals: 6,
1701
+ address: "9cRCn9rGT8V2imeM2BaKs13yhMEais3ruM3rPvTGpump",
1702
+ chainKey: ChainKeys.SOLANA_MAINNET,
1703
+ hubAsset: "0x0392de493dc89cf5dac2f06ce4a60c590008e537",
1704
+ vault: "0x0392de493dc89cf5dac2f06ce4a60c590008e537"
1705
+ },
1706
+ BP: {
1707
+ symbol: "BP",
1708
+ name: "Backpack",
1709
+ decimals: 9,
1710
+ address: "BPxxfRCXkUVhig4HS1Lh7kZqV6SPJhzfEk4x6fVBjPCy",
1711
+ chainKey: ChainKeys.SOLANA_MAINNET,
1712
+ hubAsset: "0x9a1e90e1f591ac516781c5dc0523d998015dca74",
1713
+ vault: "0x9a1e90e1f591ac516781c5dc0523d998015dca74"
1714
+ },
1715
+ CARDS: {
1716
+ symbol: "CARDS",
1717
+ name: "Collector Crypt",
1718
+ decimals: 6,
1719
+ address: "CARDSccUMFKoPRZxt5vt3ksUbxEFEcnZ3H2pd3dKxYjp",
1720
+ chainKey: ChainKeys.SOLANA_MAINNET,
1721
+ hubAsset: "0xe639567bc448c8fe4c34b3c074fffea2047c77d2",
1722
+ vault: "0xe639567bc448c8fe4c34b3c074fffea2047c77d2"
1723
+ },
1724
+ CASH: {
1725
+ symbol: "CASH",
1726
+ name: "CASH",
1727
+ decimals: 6,
1728
+ address: "CASHx9KJUStyftLFWGvEVf59SGeG9sh5FfcnZMVPCASH",
1729
+ chainKey: ChainKeys.SOLANA_MAINNET,
1730
+ hubAsset: "0x28e5589c8030d0f53961db173e9bf1e0f59e716a",
1731
+ vault: "0x28e5589c8030d0f53961db173e9bf1e0f59e716a"
1732
+ },
1733
+ Fartcoin: {
1734
+ symbol: "Fartcoin",
1735
+ name: "Fartcoin",
1736
+ decimals: 6,
1737
+ address: "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump",
1738
+ chainKey: ChainKeys.SOLANA_MAINNET,
1739
+ hubAsset: "0x7127c0a5cab393a6b0b311684130c985a00eb06a",
1740
+ vault: "0x7127c0a5cab393a6b0b311684130c985a00eb06a"
1741
+ },
1742
+ GLDx: {
1743
+ symbol: "GLDx",
1744
+ isRwa: true,
1745
+ name: "Gold xStock",
1746
+ decimals: 8,
1747
+ address: "Xsv9hRk1z5ystj9MhnA7Lq4vjSsLwzL2nxrwmwtD3re",
1748
+ chainKey: ChainKeys.SOLANA_MAINNET,
1749
+ hubAsset: "0x236d062ba08cea4e28e006ab8d14c5b407bcfa0d",
1750
+ vault: "0x236d062ba08cea4e28e006ab8d14c5b407bcfa0d"
1751
+ },
1752
+ HOODx: {
1753
+ symbol: "HOODx",
1754
+ isRwa: true,
1755
+ name: "Robinhood xStock",
1756
+ decimals: 8,
1757
+ address: "XsvNBAYkrDRNhA7wPHQfX3ZUXZyZLdnCQDfHZ56bzpg",
1758
+ chainKey: ChainKeys.SOLANA_MAINNET,
1759
+ hubAsset: "0xd9c608fc37d1c7714ea1d1019197473d2b94e46e",
1760
+ vault: "0xd9c608fc37d1c7714ea1d1019197473d2b94e46e"
1761
+ },
1762
+ HYPE: {
1763
+ symbol: "HYPE",
1764
+ name: "Wormhole Bridged HYPE",
1765
+ decimals: 9,
1766
+ address: "98sMhvDwXj1RQi5c5Mndm3vPe9cBqPrbLaufMXFNMh5g",
1767
+ chainKey: ChainKeys.SOLANA_MAINNET,
1768
+ hubAsset: "0xe16bde1138dde975d84b43e99998fb6baee4bd8f",
1769
+ vault: SodaTokens.sodaHYPE.address
1770
+ },
1771
+ hyUSD: {
1772
+ symbol: "hyUSD",
1773
+ name: "Hylo USD",
1774
+ decimals: 6,
1775
+ address: "5YMkXAYccHSGnHn9nob9xEvv6Pvka9DZWH7nTbotTu9E",
1776
+ chainKey: ChainKeys.SOLANA_MAINNET,
1777
+ hubAsset: "0x5e2d86db5d93354de1ff2f70591509cf47cd878c",
1778
+ vault: "0x5e2d86db5d93354de1ff2f70591509cf47cd878c"
1779
+ },
1780
+ KMNO: {
1781
+ symbol: "KMNO",
1782
+ name: "Kamino",
1783
+ decimals: 6,
1784
+ address: "KMNo3nJsBXfcpJTVhZcXLW7RmTwTt4GVFE7suUBo9sS",
1785
+ chainKey: ChainKeys.SOLANA_MAINNET,
1786
+ hubAsset: "0x96e788fc83ef83c3201e4763fabe8e2dedf6eca7",
1787
+ vault: "0x96e788fc83ef83c3201e4763fabe8e2dedf6eca7"
1788
+ },
1789
+ LBTC: {
1790
+ symbol: "LBTC",
1791
+ name: "Lombard BTC",
1792
+ decimals: 8,
1793
+ address: "LBTCgU4b3wsFKsPwBn1rRZDx5DoFutM6RPiEt1TPDsY",
1794
+ chainKey: ChainKeys.SOLANA_MAINNET,
1795
+ hubAsset: "0x0abcce0b778587f9d6c83064d857027797220507",
1796
+ vault: SodaTokens.sodaBTC.address
1797
+ },
1798
+ MET: {
1799
+ symbol: "MET",
1800
+ name: "Meteora",
1801
+ decimals: 6,
1802
+ address: "METvsvVRapdj9cFLzq4Tr43xK4tAjQfwX76z3n6mWQL",
1803
+ chainKey: ChainKeys.SOLANA_MAINNET,
1804
+ hubAsset: "0xf6c71a67a7def6f87b0867113e366fcbba71b55f",
1805
+ vault: "0xf6c71a67a7def6f87b0867113e366fcbba71b55f"
1806
+ },
1807
+ ONYC: {
1808
+ symbol: "ONYC",
1809
+ name: "OnRe Tokenized Reinsurance",
1810
+ decimals: 9,
1811
+ address: "5Y8NV33Vv7WbnLfq3zBcKSdYPrk7g2KoiQoe7M2tcxp5",
1812
+ chainKey: ChainKeys.SOLANA_MAINNET,
1813
+ hubAsset: "0xacc1adb3095706e0fd7b70b2cab2b331bc95d32a",
1814
+ vault: "0xacc1adb3095706e0fd7b70b2cab2b331bc95d32a"
1815
+ },
1816
+ PENGU: {
1817
+ symbol: "PENGU",
1818
+ name: "Pudgy Penguins",
1819
+ decimals: 6,
1820
+ address: "2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv",
1821
+ chainKey: ChainKeys.SOLANA_MAINNET,
1822
+ hubAsset: "0x0cea0541b3790e8b54eef79fe243b9d1ba909add",
1823
+ vault: "0x0cea0541b3790e8b54eef79fe243b9d1ba909add"
1824
+ },
1825
+ PRIME: {
1826
+ symbol: "PRIME",
1827
+ name: "Hastra PRIME",
1828
+ decimals: 6,
1829
+ address: "3b8X44fLF9ooXaUm3hhSgjpmVs6rZZ3pPoGnGahc3Uu7",
1830
+ chainKey: ChainKeys.SOLANA_MAINNET,
1831
+ hubAsset: "0xc848404d5c99c10a554094a53e71d0305fbac518",
1832
+ vault: "0xc848404d5c99c10a554094a53e71d0305fbac518"
1833
+ },
1834
+ SPCXx: {
1835
+ symbol: "SPCXx",
1836
+ isRwa: true,
1837
+ name: "SpaceX xStock",
1838
+ decimals: 8,
1839
+ address: "Xs3oZwbHvqis4NYcf4YKWmEia2eC84wSiVrcYcTqpH8",
1840
+ chainKey: ChainKeys.SOLANA_MAINNET,
1841
+ hubAsset: "0x760bc9d7dede486a235e58992815ff54bc1b3269",
1842
+ vault: "0x760bc9d7dede486a235e58992815ff54bc1b3269"
1843
+ },
1844
+ STONK: {
1845
+ symbol: "STONK",
1846
+ name: "STONK",
1847
+ decimals: 9,
1848
+ address: "6GmAFSYs4gk3FDao5FzzySQpPZaWsa4rUJHacpMpUNgx",
1849
+ chainKey: ChainKeys.SOLANA_MAINNET,
1850
+ hubAsset: "0x02a88631e2fe0dd2169b6e9452e65e98b2c6f27e",
1851
+ vault: "0x02a88631e2fe0dd2169b6e9452e65e98b2c6f27e"
1852
+ },
1853
+ syrupUSDC: {
1854
+ symbol: "syrupUSDC",
1855
+ name: "syrupUSDC",
1856
+ decimals: 6,
1857
+ address: "AvZZF1YaZDziPY2RCK4oJrRVrbN3mTD9NL24hPeaZeUj",
1858
+ chainKey: ChainKeys.SOLANA_MAINNET,
1859
+ hubAsset: "0x2941198088fdac45d983798d1246f073fc36330f",
1860
+ vault: "0x2941198088fdac45d983798d1246f073fc36330f"
1861
+ },
1862
+ TRUMP: {
1863
+ symbol: "TRUMP",
1864
+ name: "Official Trump",
1865
+ decimals: 6,
1866
+ address: "6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
1867
+ chainKey: ChainKeys.SOLANA_MAINNET,
1868
+ hubAsset: "0xf5291267892347830b1a7b92a4061e8c28cc06fb",
1869
+ vault: "0xf5291267892347830b1a7b92a4061e8c28cc06fb"
1870
+ },
1871
+ USX: {
1872
+ symbol: "USX",
1873
+ name: "USX",
1874
+ decimals: 6,
1875
+ address: "6FrrzDk5mQARGc1TDYoyVnSyRdds1t4PbtohCD6p3tgG",
1876
+ chainKey: ChainKeys.SOLANA_MAINNET,
1877
+ hubAsset: "0x4f8b6611700fbf8aabfbcd595e0b33d23de89dd5",
1878
+ vault: "0x4f8b6611700fbf8aabfbcd595e0b33d23de89dd5"
1879
+ },
1880
+ xBTC: {
1881
+ symbol: "xBTC",
1882
+ name: "OKX Wrapped BTC",
1883
+ decimals: 8,
1884
+ address: "CtzPWv73Sn1dMGVU3ZtLv9yWSyUAanBni19YWDaznnkn",
1885
+ chainKey: ChainKeys.SOLANA_MAINNET,
1886
+ hubAsset: "0x4a47a698603c31e59d4c464d86dc6d54c60106df",
1887
+ vault: SodaTokens.sodaBTC.address
1888
+ },
1889
+ ZEC: {
1890
+ symbol: "ZEC",
1891
+ name: "OmniBridge Bridged Zcash (Solana)",
1892
+ decimals: 8,
1893
+ address: "A7bdiYdS5GjqGFtxf17ppRHtDKPkkRqbKtR27dxvQXaS",
1894
+ chainKey: ChainKeys.SOLANA_MAINNET,
1895
+ hubAsset: "0xdfce285d5bb2da89fab4212d06683a4699e90560",
1896
+ vault: SodaTokens.sodaZEC.address
1425
1897
  }
1426
1898
  };
1427
1899
  var avalancheSupportedTokens = {
@@ -1689,6 +2161,24 @@ var arbitrumSupportedTokens = {
1689
2161
  chainKey: ChainKeys.ARBITRUM_MAINNET,
1690
2162
  hubAsset: "0x68ff591a66f6b6c77bdf6463d88e8cb5578c8a53",
1691
2163
  vault: "0x68ff591a66f6b6c77bdf6463d88e8cb5578c8a53"
2164
+ },
2165
+ CHIP: {
2166
+ symbol: "CHIP",
2167
+ name: "USD.AI",
2168
+ decimals: 18,
2169
+ address: "0x0c1c1c109fe34733fca54b82d7b46b75cfb71f6e",
2170
+ chainKey: ChainKeys.ARBITRUM_MAINNET,
2171
+ hubAsset: "0x87a879e35027f55655a3b4540cf71e27c28e8116",
2172
+ vault: "0x87a879e35027f55655a3b4540cf71e27c28e8116"
2173
+ },
2174
+ RAIN: {
2175
+ symbol: "RAIN",
2176
+ name: "Rain",
2177
+ decimals: 18,
2178
+ address: "0x25118290e6a5f4139381d072181157035864099d",
2179
+ chainKey: ChainKeys.ARBITRUM_MAINNET,
2180
+ hubAsset: "0x1ec7afdbd09dcd9e7bc9ec651a0826aa6bfd3ede",
2181
+ vault: "0x1ec7afdbd09dcd9e7bc9ec651a0826aa6bfd3ede"
1692
2182
  }
1693
2183
  };
1694
2184
  var baseSupportedTokens = {
@@ -1827,6 +2317,51 @@ var baseSupportedTokens = {
1827
2317
  chainKey: ChainKeys.BASE_MAINNET,
1828
2318
  hubAsset: "0x7e1af5084ac6f15afa97a5525b2e35a804e80b01",
1829
2319
  vault: "0x7e1af5084ac6f15afa97a5525b2e35a804e80b01"
2320
+ },
2321
+ AAVE: {
2322
+ symbol: "AAVE",
2323
+ name: "Aave",
2324
+ decimals: 18,
2325
+ address: "0x63706e401c06ac8513145b7687a14804d17f814b",
2326
+ chainKey: ChainKeys.BASE_MAINNET,
2327
+ hubAsset: "0x4e525b4b09092ef4b8e142daf13eb20e0b2191c3",
2328
+ vault: "0x4e525b4b09092ef4b8e142daf13eb20e0b2191c3"
2329
+ },
2330
+ JitoSOL: {
2331
+ symbol: "JitoSOL",
2332
+ name: "Jito Staked SOL",
2333
+ decimals: 9,
2334
+ address: "0x97be14dd8f994a5364573bc035d85309e7cb34de",
2335
+ chainKey: ChainKeys.BASE_MAINNET,
2336
+ hubAsset: "0x16153346be11f0a3bfd586d4bd087199a94dae3c",
2337
+ vault: SodaTokens.sodaJITOSOL.address
2338
+ },
2339
+ SOL: {
2340
+ symbol: "SOL",
2341
+ name: "Base Bridged SOL (Base)",
2342
+ decimals: 9,
2343
+ address: "0x311935cd80b76769bf2ecc9d8ab7635b2139cf82",
2344
+ chainKey: ChainKeys.BASE_MAINNET,
2345
+ hubAsset: "0x53b6274b1d0d655084dda1c0a9f2330256374b84",
2346
+ vault: SodaTokens.sodaSOL.address
2347
+ },
2348
+ VVV: {
2349
+ symbol: "VVV",
2350
+ name: "Venice Token",
2351
+ decimals: 18,
2352
+ address: "0xacfe6019ed1a7dc6f7b508c02d1b04ec88cc21bf",
2353
+ chainKey: ChainKeys.BASE_MAINNET,
2354
+ hubAsset: "0x8451569f3b251670df4fef74721517bcbd4af00e",
2355
+ vault: "0x8451569f3b251670df4fef74721517bcbd4af00e"
2356
+ },
2357
+ ZEN: {
2358
+ symbol: "ZEN",
2359
+ name: "Horizen",
2360
+ decimals: 18,
2361
+ address: "0xf43eb8de897fbc7f2502483b2bef7bb9ea179229",
2362
+ chainKey: ChainKeys.BASE_MAINNET,
2363
+ hubAsset: "0x61d95d519907daa3cf505420b0d3c8607cd9f921",
2364
+ vault: "0x61d95d519907daa3cf505420b0d3c8607cd9f921"
1830
2365
  }
1831
2366
  };
1832
2367
  var optimismSupportedTokens = {
@@ -2092,6 +2627,51 @@ var bscSupportedTokens = {
2092
2627
  chainKey: ChainKeys.BSC_MAINNET,
2093
2628
  hubAsset: "0xdab003b59749fe08fad6e0e7685f31bbcf4cbd6e",
2094
2629
  vault: "0xdab003b59749fe08fad6e0e7685f31bbcf4cbd6e"
2630
+ },
2631
+ FF: {
2632
+ symbol: "FF",
2633
+ name: "Falcon Finance",
2634
+ decimals: 18,
2635
+ address: "0xac23b90a79504865d52b49b327328411a23d4db2",
2636
+ chainKey: ChainKeys.BSC_MAINNET,
2637
+ hubAsset: "0x2a3c409f26b0ac54889172f20441c25941b3c745",
2638
+ vault: "0x2a3c409f26b0ac54889172f20441c25941b3c745"
2639
+ },
2640
+ PENDLE: {
2641
+ symbol: "PENDLE",
2642
+ name: "Pendle",
2643
+ decimals: 18,
2644
+ address: "0xb3ed0a426155b79b898849803e3b36552f7ed507",
2645
+ chainKey: ChainKeys.BSC_MAINNET,
2646
+ hubAsset: "0xc059a10554d4e9a1dc4792db40ddf5137973b473",
2647
+ vault: "0xc059a10554d4e9a1dc4792db40ddf5137973b473"
2648
+ },
2649
+ STABLE: {
2650
+ symbol: "STABLE",
2651
+ name: "Stable",
2652
+ decimals: 18,
2653
+ address: "0x011ebe7d75e2c9d1e0bd0be0bef5c36f0a90075f",
2654
+ chainKey: ChainKeys.BSC_MAINNET,
2655
+ hubAsset: "0x4b7f7a7fcb3b45d41ab6c6727b0c1aeedc62aea7",
2656
+ vault: "0x4b7f7a7fcb3b45d41ab6c6727b0c1aeedc62aea7"
2657
+ },
2658
+ TUSD: {
2659
+ symbol: "TUSD",
2660
+ name: "TrueUSD",
2661
+ decimals: 18,
2662
+ address: "0x40af3827f39d0eacbf4a168f8d4ee67c121d11c9",
2663
+ chainKey: ChainKeys.BSC_MAINNET,
2664
+ hubAsset: "0x0ab0d545288137382d388ec679641de9f231f7fa",
2665
+ vault: "0x0ab0d545288137382d388ec679641de9f231f7fa"
2666
+ },
2667
+ U: {
2668
+ symbol: "U",
2669
+ name: "United Stables",
2670
+ decimals: 18,
2671
+ address: "0xce24439f2d9c6a2289f741120fe202248b666666",
2672
+ chainKey: ChainKeys.BSC_MAINNET,
2673
+ hubAsset: "0xd0c38d58d592ef223c5331673a189795e0f5510c",
2674
+ vault: "0xd0c38d58d592ef223c5331673a189795e0f5510c"
2095
2675
  }
2096
2676
  };
2097
2677
  var polygonSupportedTokens = {
@@ -2912,6 +3492,226 @@ var stellarSupportedTokens = {
2912
3492
  hubAsset: "0x83ac05C492188B46dd15d5611dEEFA6b23c7D479",
2913
3493
  vault: SodaTokens.BABA.address
2914
3494
  },
3495
+ AMC: {
3496
+ symbol: "AMC",
3497
+ isRwa: true,
3498
+ name: "AMC Entertainment",
3499
+ decimals: 7,
3500
+ address: "CAEBWGQGYLLN3KHAGEW6VNDS7FQL3MAIDPMAU6P3AHHI5YW5VGOE72LL",
3501
+ chainKey: ChainKeys.STELLAR_MAINNET,
3502
+ hubAsset: "0x471D107F02D5DD5aF08346d01b07D2fA13F65115",
3503
+ vault: SodaTokens.AMC.address
3504
+ },
3505
+ HIMS: {
3506
+ symbol: "HIMS",
3507
+ isRwa: true,
3508
+ name: "Hims & Hers Health",
3509
+ decimals: 7,
3510
+ address: "CCCDVTRZNHCG52ZXSNTBLMZC2GQXMR3YZY7MZWQFQ3DAUF52LZD6N6SV",
3511
+ chainKey: ChainKeys.STELLAR_MAINNET,
3512
+ hubAsset: "0x849B9ec418261192904089aBd3E80f1EB17AA83a",
3513
+ vault: SodaTokens.HIMS.address
3514
+ },
3515
+ LLY: {
3516
+ symbol: "LLY",
3517
+ isRwa: true,
3518
+ name: "Eli Lilly",
3519
+ decimals: 7,
3520
+ address: "CAR37LJDK2PHTO2NJKKYGHQGP2SY5QIM4WADLDYWGH3THY2O3XU53KI5",
3521
+ chainKey: ChainKeys.STELLAR_MAINNET,
3522
+ hubAsset: "0x20dDDBff2D8fDce44D95920e4748e1CaE004FeC3",
3523
+ vault: SodaTokens.LLY.address
3524
+ },
3525
+ COST: {
3526
+ symbol: "COST",
3527
+ isRwa: true,
3528
+ name: "Costco",
3529
+ decimals: 7,
3530
+ address: "CBACMBV6OO6MB6S4NB4V7IPFKPOZCVL22GZG3QIRVUXDPT3B33PIQGUK",
3531
+ chainKey: ChainKeys.STELLAR_MAINNET,
3532
+ hubAsset: "0x689812d91ef4D11acCA310B8aE5577135919cdF0",
3533
+ vault: SodaTokens.COST.address
3534
+ },
3535
+ TTWO: {
3536
+ symbol: "TTWO",
3537
+ isRwa: true,
3538
+ name: "Take-Two Interactive Software",
3539
+ decimals: 7,
3540
+ address: "CCUIUDZ7ZDBVSOBJG2HO2TNUDLOUBMKZB46NMFKIKITOOUDUKSSOOUI2",
3541
+ chainKey: ChainKeys.STELLAR_MAINNET,
3542
+ hubAsset: "0x7FaabA42Bb7140f3e3A022052B320BA66D82eB99",
3543
+ vault: SodaTokens.TTWO.address
3544
+ },
3545
+ RBLX: {
3546
+ symbol: "RBLX",
3547
+ isRwa: true,
3548
+ name: "Roblox",
3549
+ decimals: 7,
3550
+ address: "CA7QG7YKEIZRO7CWBJOTZ3SSDSLPOZOGIJFFXHNYWFU5Q32ZHYISMUAS",
3551
+ chainKey: ChainKeys.STELLAR_MAINNET,
3552
+ hubAsset: "0xaB7730d17B135e91A7b6Ec09a5e216e8873EF365",
3553
+ vault: SodaTokens.RBLX.address
3554
+ },
3555
+ IBM: {
3556
+ symbol: "IBM",
3557
+ isRwa: true,
3558
+ name: "IBM",
3559
+ decimals: 7,
3560
+ address: "CAD7GTZSDJOMR7N66CQT7TX6253WW6UC25MBV7GTZWD2A4EEQD2F64DM",
3561
+ chainKey: ChainKeys.STELLAR_MAINNET,
3562
+ hubAsset: "0xcA7Ffa5C53E63A9b58c48BB0CC2200e192CC1eAd",
3563
+ vault: SodaTokens.IBM.address
3564
+ },
3565
+ MRNA: {
3566
+ symbol: "MRNA",
3567
+ isRwa: true,
3568
+ name: "Moderna",
3569
+ decimals: 7,
3570
+ address: "CB5DSRUATRWXLUTWBIYHBZ4NPUODQWBSM3K3LKSASXCVTPTINX5TGYR6",
3571
+ chainKey: ChainKeys.STELLAR_MAINNET,
3572
+ hubAsset: "0x9603C58bF10DBBdda5ACD0b702D3C094b7d120fD",
3573
+ vault: SodaTokens.MRNA.address
3574
+ },
3575
+ LULU: {
3576
+ symbol: "LULU",
3577
+ isRwa: true,
3578
+ name: "Lululemon",
3579
+ decimals: 7,
3580
+ address: "CAOURCGE6GBFMP2NCP7IU2NFS4TTQTUD47OV65I25QUNE5K4D3U7HQ6G",
3581
+ chainKey: ChainKeys.STELLAR_MAINNET,
3582
+ hubAsset: "0x6e92098f60D06Dd71d2599098970Bb176d4362C0",
3583
+ vault: SodaTokens.LULU.address
3584
+ },
3585
+ SNAP: {
3586
+ symbol: "SNAP",
3587
+ isRwa: true,
3588
+ name: "Snap",
3589
+ decimals: 7,
3590
+ address: "CBZJXY6XMLMEAT6CGIWX7XWOYUZULCCZ37CPHLHR3XBV2FNI3WFIEHAT",
3591
+ chainKey: ChainKeys.STELLAR_MAINNET,
3592
+ hubAsset: "0xD87110E103aFbF0a66EbAd9d41C1C837A8818331",
3593
+ vault: SodaTokens.SNAP.address
3594
+ },
3595
+ WYFI: {
3596
+ symbol: "WYFI",
3597
+ isRwa: true,
3598
+ name: "WhiteFiber, Inc.",
3599
+ decimals: 7,
3600
+ address: "CAGFLIVHJ3P7Z5LUC74SJY4FFILFO2C3NBHQUQYYDMMANAOV2BHLW6VQ",
3601
+ chainKey: ChainKeys.STELLAR_MAINNET,
3602
+ hubAsset: "0x71eAA758eD96E9520d7c16273C4A9A4839E76703",
3603
+ vault: SodaTokens.WYFI.address
3604
+ },
3605
+ RIVN: {
3606
+ symbol: "RIVN",
3607
+ isRwa: true,
3608
+ name: "Rivian Automotive",
3609
+ decimals: 7,
3610
+ address: "CDVW2KKRGBHWAMYXD5KFRC65XCNQ6QMPF27TCJGK56EB4DVO4BANRC3H",
3611
+ chainKey: ChainKeys.STELLAR_MAINNET,
3612
+ hubAsset: "0x475bB93b8d57804a70dc4ec60F7B916e19eA2e41",
3613
+ vault: SodaTokens.RIVN.address
3614
+ },
3615
+ NFLX: {
3616
+ symbol: "NFLX",
3617
+ isRwa: true,
3618
+ name: "Netflix",
3619
+ decimals: 7,
3620
+ address: "CB5REEJVITH4X6OKVK3DK7JOTTF66MNUGYTIVVWHVZ27LXF7YOWWGFMB",
3621
+ chainKey: ChainKeys.STELLAR_MAINNET,
3622
+ hubAsset: "0xF3682dFEFE513DB0AD4442E017B454F3f50504D0",
3623
+ vault: SodaTokens.NFLX.address
3624
+ },
3625
+ BULL: {
3626
+ symbol: "BULL",
3627
+ isRwa: true,
3628
+ name: "Webull",
3629
+ decimals: 7,
3630
+ address: "CBEHZ6M6YMFFZRSYOKBOXOP3Y4WKTOLTFIQ4HLJ7SCTXL6GCOT7XSCJP",
3631
+ chainKey: ChainKeys.STELLAR_MAINNET,
3632
+ hubAsset: "0x57c0050Cf12e0a0996549FF9502F32a4e16D40D0",
3633
+ vault: SodaTokens.BULL.address
3634
+ },
3635
+ QUBT: {
3636
+ symbol: "QUBT",
3637
+ isRwa: true,
3638
+ name: "Quantum Computing",
3639
+ decimals: 7,
3640
+ address: "CAU6WBKWYDOEJMZLEJPKBSR7YG5FY7XIXNQH7FB6G4PJYBJHDZKERVOQ",
3641
+ chainKey: ChainKeys.STELLAR_MAINNET,
3642
+ hubAsset: "0x7B751c01B2350Af27C030ecA45260ddFf460ef92",
3643
+ vault: SodaTokens.QUBT.address
3644
+ },
3645
+ NET: {
3646
+ symbol: "NET",
3647
+ isRwa: true,
3648
+ name: "Cloudflare, Inc. Class A common stock",
3649
+ decimals: 7,
3650
+ address: "CANVGKHGU2E4ZHWUQMDG54DHO6GAOGUZB6QFF5WCQN46ZISQV7AAL3PN",
3651
+ chainKey: ChainKeys.STELLAR_MAINNET,
3652
+ hubAsset: "0x19CA1536e5D139c172D5E58778579DEd6F6c4BCB",
3653
+ vault: SodaTokens.NET.address
3654
+ },
3655
+ SKHY: {
3656
+ symbol: "SKHY",
3657
+ isRwa: true,
3658
+ name: "SK hynix Inc. American Depositary Shares",
3659
+ decimals: 7,
3660
+ address: "CBLDWO73ZGWFNWNHGN7JFNMOKIBUCPGSDNEJY2QS4LTDBJDUP52YA7IU",
3661
+ chainKey: ChainKeys.STELLAR_MAINNET,
3662
+ hubAsset: "0x691A0cD41a87ca258946af2CAd245b15161183FA",
3663
+ vault: SodaTokens.SKHY.address
3664
+ },
3665
+ JNJ: {
3666
+ symbol: "JNJ",
3667
+ isRwa: true,
3668
+ name: "Johnson & Johnson",
3669
+ decimals: 7,
3670
+ address: "CBQNN6DIY2VSS75U5563LUWQLTVFKKPW3RQFRMIGTLMCN4QAOHAENMGY",
3671
+ chainKey: ChainKeys.STELLAR_MAINNET,
3672
+ hubAsset: "0xA2039a69dCfa7557923bBACA8672D28785AF52F7",
3673
+ vault: SodaTokens.JNJ.address
3674
+ },
3675
+ UPS: {
3676
+ symbol: "UPS",
3677
+ isRwa: true,
3678
+ name: "UPS",
3679
+ decimals: 7,
3680
+ address: "CCTOGJ6YDHLVGKEFFRIHH7CCLETLEEZV4YMQ3PL7SI23GEMGK5JK3SRB",
3681
+ chainKey: ChainKeys.STELLAR_MAINNET,
3682
+ hubAsset: "0xdD7daA1e8E91dD46a7A02a27DB28e0CcBbC3C292",
3683
+ vault: SodaTokens.UPS.address
3684
+ },
3685
+ DJT: {
3686
+ symbol: "DJT",
3687
+ isRwa: true,
3688
+ name: "Trump Media & Technology Group",
3689
+ decimals: 7,
3690
+ address: "CBTD75GNN5MQ5O4HGGNDNPYVCJYSGGPU66J25WAM3CQ7GNOK6ZDC2YJX",
3691
+ chainKey: ChainKeys.STELLAR_MAINNET,
3692
+ hubAsset: "0xA4d07826cf232bd982a320f6ACB2A1188D5F44aa",
3693
+ vault: SodaTokens.DJT.address
3694
+ },
3695
+ RDDT: {
3696
+ symbol: "RDDT",
3697
+ isRwa: true,
3698
+ name: "Reddit",
3699
+ decimals: 7,
3700
+ address: "CCL6EU763SIZW4LWKZHRMM5HF75GHLWNFLL7TVMFN42ZL35UYEEPGZJ6",
3701
+ chainKey: ChainKeys.STELLAR_MAINNET,
3702
+ hubAsset: "0x9da4d4abb624684a39a881D9cBd383314e42ab19",
3703
+ vault: SodaTokens.RDDT.address
3704
+ },
3705
+ GLD: {
3706
+ symbol: "GLD",
3707
+ isRwa: true,
3708
+ name: "SPDR Gold Trust",
3709
+ decimals: 7,
3710
+ address: "CB7ZOXYL3NZMO4J3WRG6DVQDS5VYABSKLH4SF6FEYHVEXTNYAPXZI4DC",
3711
+ chainKey: ChainKeys.STELLAR_MAINNET,
3712
+ hubAsset: "0xBb2db74ad01e2F5F828f1cb1E7568010Fa728B95",
3713
+ vault: SodaTokens.GLD.address
3714
+ },
2915
3715
  EURC: {
2916
3716
  symbol: "EURC",
2917
3717
  name: "EURC",
@@ -3075,6 +3875,15 @@ var suiSupportedTokens = {
3075
3875
  chainKey: ChainKeys.SUI_MAINNET,
3076
3876
  hubAsset: "0x2037d840f01e903e09e33b146f2dd3fa4a4d2c21",
3077
3877
  vault: "0x2037d840f01e903e09e33b146f2dd3fa4a4d2c21"
3878
+ },
3879
+ USDY: {
3880
+ symbol: "USDY",
3881
+ name: "Ondo US Dollar Yield",
3882
+ decimals: 6,
3883
+ address: "0x960b531667636f39e85867775f52f6b1f220a058c4de786905bdf761e06a56bb::usdy::USDY",
3884
+ chainKey: ChainKeys.SUI_MAINNET,
3885
+ hubAsset: "0x04dc969dc822f1b45d354b8fc296b23f5b924176",
3886
+ vault: "0x04dc969dc822f1b45d354b8fc296b23f5b924176"
3078
3887
  }
3079
3888
  };
3080
3889
  var iconSupportedTokens = {
@@ -3473,6 +4282,123 @@ var ethereumSupportedTokens = {
3473
4282
  chainKey: ChainKeys.ETHEREUM_MAINNET,
3474
4283
  hubAsset: "0x081e274ec570bdb023f1b41c54df0f3f73da8924",
3475
4284
  vault: "0x081e274ec570bdb023f1b41c54df0f3f73da8924"
4285
+ },
4286
+ AUSD: {
4287
+ symbol: "AUSD",
4288
+ name: "AUSD",
4289
+ decimals: 6,
4290
+ address: "0x00000000efe302beaa2b3e6e1b18d08d69a9012a",
4291
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4292
+ hubAsset: "0xa5c8482ba138872dc844dd4b15aaa21490d064ec",
4293
+ vault: "0xa5c8482ba138872dc844dd4b15aaa21490d064ec"
4294
+ },
4295
+ cirBTC: {
4296
+ symbol: "cirBTC",
4297
+ name: "Circle Wrapped BTC",
4298
+ decimals: 8,
4299
+ address: "0x72dfb2e44f59c5ad2bafe84314e5b99a7cd5075e",
4300
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4301
+ hubAsset: "0x1316179f1c6b6f2658f96bfe0bab59d0b03c7fd3",
4302
+ vault: SodaTokens.sodaBTC.address
4303
+ },
4304
+ CRV: {
4305
+ symbol: "CRV",
4306
+ name: "Curve DAO",
4307
+ decimals: 18,
4308
+ address: "0xd533a949740bb3306d119cc777fa900ba034cd52",
4309
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4310
+ hubAsset: "0x0f39fe572ff21675ba88dab6a60f824eae12a897",
4311
+ vault: "0x0f39fe572ff21675ba88dab6a60f824eae12a897"
4312
+ },
4313
+ EURC: {
4314
+ symbol: "EURC",
4315
+ name: "EURC",
4316
+ decimals: 6,
4317
+ address: "0x1abaea1f7c830bd89acc67ec4af516284b1bc33c",
4318
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4319
+ hubAsset: "0x0e5bf34dfd21c45934c342c3bc6bc76bf467b365",
4320
+ vault: "0x0e5bf34dfd21c45934c342c3bc6bc76bf467b365"
4321
+ },
4322
+ ICP: {
4323
+ symbol: "ICP",
4324
+ name: "Internet Computer",
4325
+ decimals: 8,
4326
+ address: "0x00f3c42833c3170159af4e92dbb451fb3f708917",
4327
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4328
+ hubAsset: "0x33ffb6bbe55f7e1081efe5ce95c2767937154b52",
4329
+ vault: "0x33ffb6bbe55f7e1081efe5ce95c2767937154b52"
4330
+ },
4331
+ kBTC: {
4332
+ symbol: "kBTC",
4333
+ name: "Kraken Wrapped BTC",
4334
+ decimals: 8,
4335
+ address: "0x73e0c0d45e048d25fc26fa3159b0aa04bfa4db98",
4336
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4337
+ hubAsset: "0xa42f8bae7a463f492ca81df8ab319a1177df586c",
4338
+ vault: SodaTokens.sodaBTC.address
4339
+ },
4340
+ NEAR: {
4341
+ symbol: "NEAR",
4342
+ name: "Rainbow Bridged Near (Ethereum)",
4343
+ decimals: 24,
4344
+ address: "0x85f17cf997934a597031b2e18a9ab6ebd4b9f6a4",
4345
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4346
+ hubAsset: "0x9295415078420d6d736aafa303430e24e89b0740",
4347
+ vault: SodaTokens.sodaNEAR.address
4348
+ },
4349
+ ONDO: {
4350
+ symbol: "ONDO",
4351
+ name: "Ondo",
4352
+ decimals: 18,
4353
+ address: "0xfaba6f8e4a5e8ab82f62fe7c39859fa577269be3",
4354
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4355
+ hubAsset: "0xe1fc12564dfb98c5aca98354ae4810d608600fa4",
4356
+ vault: "0xe1fc12564dfb98c5aca98354ae4810d608600fa4"
4357
+ },
4358
+ QNT: {
4359
+ symbol: "QNT",
4360
+ name: "Quant",
4361
+ decimals: 18,
4362
+ address: "0x4a220e6096b25eadb88358cb44068a3248254675",
4363
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4364
+ hubAsset: "0x65094257d27a71ffe4d7e9fef63c5243c885a7d1",
4365
+ vault: "0x65094257d27a71ffe4d7e9fef63c5243c885a7d1"
4366
+ },
4367
+ SOL: {
4368
+ symbol: "SOL",
4369
+ name: "Wormhole Bridged WSOL",
4370
+ decimals: 9,
4371
+ address: "0xd31a59c85ae9d8edefec411d448f90841571b89c",
4372
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4373
+ hubAsset: "0x3bb9c57dc70f33aa67fc33d7f88b9a2c5b1b392f",
4374
+ vault: SodaTokens.sodaSOL.address
4375
+ },
4376
+ tBTC: {
4377
+ symbol: "tBTC",
4378
+ name: "tBTC",
4379
+ decimals: 18,
4380
+ address: "0x18084fba666a33d37592fa2633fd49a74dd93a88",
4381
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4382
+ hubAsset: "0x79ce2f30c941308286f09ef5d815a14ad5830be3",
4383
+ vault: SodaTokens.sodaBTC.address
4384
+ },
4385
+ wM: {
4386
+ symbol: "wM",
4387
+ name: "WrappedM by M0",
4388
+ decimals: 6,
4389
+ address: "0x437cc33344a0b27a429f795ff6b469c72698b291",
4390
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4391
+ hubAsset: "0x512188ae67298355088c659c29bb2f78650c066a",
4392
+ vault: "0x512188ae67298355088c659c29bb2f78650c066a"
4393
+ },
4394
+ wTAO: {
4395
+ symbol: "wTAO",
4396
+ name: "Wrapped TAO",
4397
+ decimals: 9,
4398
+ address: "0x77e06c9eccf2e797fd462a92b6d7642ef85b0a44",
4399
+ chainKey: ChainKeys.ETHEREUM_MAINNET,
4400
+ hubAsset: "0xf0db27b881f28794b3a18bee0be18570ca60b966",
4401
+ vault: "0xf0db27b881f28794b3a18bee0be18570ca60b966"
3476
4402
  }
3477
4403
  };
3478
4404
  var kaiaSupportedTokens = {
@@ -3897,6 +4823,226 @@ var hederaSupportedTokens = {
3897
4823
  chainKey: ChainKeys.HEDERA_MAINNET,
3898
4824
  hubAsset: "0x5e69df859F7c2b170E5fdAdbD59d06C2CD287753",
3899
4825
  vault: SodaTokens.BABA.address
4826
+ },
4827
+ AMC: {
4828
+ symbol: "AMC",
4829
+ isRwa: true,
4830
+ name: "AMC Entertainment",
4831
+ decimals: 8,
4832
+ address: "0x0000000000000000000000000000000000a6d310",
4833
+ chainKey: ChainKeys.HEDERA_MAINNET,
4834
+ hubAsset: "0xb86Ace2530E54C98088566dD39550b4B061F47BD",
4835
+ vault: SodaTokens.AMC.address
4836
+ },
4837
+ HIMS: {
4838
+ symbol: "HIMS",
4839
+ isRwa: true,
4840
+ name: "Hims & Hers Health",
4841
+ decimals: 8,
4842
+ address: "0x0000000000000000000000000000000000a6d311",
4843
+ chainKey: ChainKeys.HEDERA_MAINNET,
4844
+ hubAsset: "0x28a4d8ef8f19e38B0C5c7EBfC865BB489E7C45d9",
4845
+ vault: SodaTokens.HIMS.address
4846
+ },
4847
+ LLY: {
4848
+ symbol: "LLY",
4849
+ isRwa: true,
4850
+ name: "Eli Lilly",
4851
+ decimals: 8,
4852
+ address: "0x0000000000000000000000000000000000a6d312",
4853
+ chainKey: ChainKeys.HEDERA_MAINNET,
4854
+ hubAsset: "0x31FC4A71799De07E901ea0b93aD8f641F0B89b6e",
4855
+ vault: SodaTokens.LLY.address
4856
+ },
4857
+ COST: {
4858
+ symbol: "COST",
4859
+ isRwa: true,
4860
+ name: "Costco",
4861
+ decimals: 8,
4862
+ address: "0x0000000000000000000000000000000000a6d313",
4863
+ chainKey: ChainKeys.HEDERA_MAINNET,
4864
+ hubAsset: "0x475248AffC8646323Eb610090751Cb40B3204122",
4865
+ vault: SodaTokens.COST.address
4866
+ },
4867
+ TTWO: {
4868
+ symbol: "TTWO",
4869
+ isRwa: true,
4870
+ name: "Take-Two Interactive Software",
4871
+ decimals: 8,
4872
+ address: "0x0000000000000000000000000000000000a6d314",
4873
+ chainKey: ChainKeys.HEDERA_MAINNET,
4874
+ hubAsset: "0xA56E033e2DF215d1F7d3BB82B8FbDC5564cE1F80",
4875
+ vault: SodaTokens.TTWO.address
4876
+ },
4877
+ RBLX: {
4878
+ symbol: "RBLX",
4879
+ isRwa: true,
4880
+ name: "Roblox",
4881
+ decimals: 8,
4882
+ address: "0x0000000000000000000000000000000000a6d315",
4883
+ chainKey: ChainKeys.HEDERA_MAINNET,
4884
+ hubAsset: "0xDBfeB85cc06DE2BB219b053Aa17e04F92921E340",
4885
+ vault: SodaTokens.RBLX.address
4886
+ },
4887
+ IBM: {
4888
+ symbol: "IBM",
4889
+ isRwa: true,
4890
+ name: "IBM",
4891
+ decimals: 8,
4892
+ address: "0x0000000000000000000000000000000000a6d316",
4893
+ chainKey: ChainKeys.HEDERA_MAINNET,
4894
+ hubAsset: "0xd05531715d7DAC111D964763549b96592aD517Be",
4895
+ vault: SodaTokens.IBM.address
4896
+ },
4897
+ MRNA: {
4898
+ symbol: "MRNA",
4899
+ isRwa: true,
4900
+ name: "Moderna",
4901
+ decimals: 8,
4902
+ address: "0x0000000000000000000000000000000000a6d317",
4903
+ chainKey: ChainKeys.HEDERA_MAINNET,
4904
+ hubAsset: "0x85677b9b106F5Aac4A299Bf877e1f9d5aAab32AF",
4905
+ vault: SodaTokens.MRNA.address
4906
+ },
4907
+ LULU: {
4908
+ symbol: "LULU",
4909
+ isRwa: true,
4910
+ name: "Lululemon",
4911
+ decimals: 8,
4912
+ address: "0x0000000000000000000000000000000000a6d318",
4913
+ chainKey: ChainKeys.HEDERA_MAINNET,
4914
+ hubAsset: "0xCEB98aB1FCaF8730b52e620BDf76142809Fc918f",
4915
+ vault: SodaTokens.LULU.address
4916
+ },
4917
+ SNAP: {
4918
+ symbol: "SNAP",
4919
+ isRwa: true,
4920
+ name: "Snap",
4921
+ decimals: 8,
4922
+ address: "0x0000000000000000000000000000000000a6d319",
4923
+ chainKey: ChainKeys.HEDERA_MAINNET,
4924
+ hubAsset: "0xc49A760E018F0beB56AF90965e933766E95b33Eb",
4925
+ vault: SodaTokens.SNAP.address
4926
+ },
4927
+ WYFI: {
4928
+ symbol: "WYFI",
4929
+ isRwa: true,
4930
+ name: "WhiteFiber, Inc.",
4931
+ decimals: 8,
4932
+ address: "0x0000000000000000000000000000000000a6d31a",
4933
+ chainKey: ChainKeys.HEDERA_MAINNET,
4934
+ hubAsset: "0x40b8Db998c3ADB40D3D70840A61d1E5A429B9ee9",
4935
+ vault: SodaTokens.WYFI.address
4936
+ },
4937
+ RIVN: {
4938
+ symbol: "RIVN",
4939
+ isRwa: true,
4940
+ name: "Rivian Automotive",
4941
+ decimals: 8,
4942
+ address: "0x0000000000000000000000000000000000a6d31e",
4943
+ chainKey: ChainKeys.HEDERA_MAINNET,
4944
+ hubAsset: "0xFBAb60A36F411f9FE480470375a9d874D44B0C30",
4945
+ vault: SodaTokens.RIVN.address
4946
+ },
4947
+ NFLX: {
4948
+ symbol: "NFLX",
4949
+ isRwa: true,
4950
+ name: "Netflix",
4951
+ decimals: 8,
4952
+ address: "0x0000000000000000000000000000000000a6d320",
4953
+ chainKey: ChainKeys.HEDERA_MAINNET,
4954
+ hubAsset: "0x9a3936491230DF8f9cc31A359e01F9b7aE39734f",
4955
+ vault: SodaTokens.NFLX.address
4956
+ },
4957
+ BULL: {
4958
+ symbol: "BULL",
4959
+ isRwa: true,
4960
+ name: "Webull",
4961
+ decimals: 8,
4962
+ address: "0x0000000000000000000000000000000000a6d321",
4963
+ chainKey: ChainKeys.HEDERA_MAINNET,
4964
+ hubAsset: "0x4f2aa602a0AC19FBB522b92ad0D38CECA2fc339B",
4965
+ vault: SodaTokens.BULL.address
4966
+ },
4967
+ QUBT: {
4968
+ symbol: "QUBT",
4969
+ isRwa: true,
4970
+ name: "Quantum Computing",
4971
+ decimals: 8,
4972
+ address: "0x0000000000000000000000000000000000a6d322",
4973
+ chainKey: ChainKeys.HEDERA_MAINNET,
4974
+ hubAsset: "0xbd94DD5D028cDC2AB9d6aB3E2E1A7f437971aab4",
4975
+ vault: SodaTokens.QUBT.address
4976
+ },
4977
+ NET: {
4978
+ symbol: "NET",
4979
+ isRwa: true,
4980
+ name: "Cloudflare, Inc. Class A common stock",
4981
+ decimals: 8,
4982
+ address: "0x0000000000000000000000000000000000a6d323",
4983
+ chainKey: ChainKeys.HEDERA_MAINNET,
4984
+ hubAsset: "0x923b3cd076C856e4f4f9a3BCc1849e5e5B166C7B",
4985
+ vault: SodaTokens.NET.address
4986
+ },
4987
+ SKHY: {
4988
+ symbol: "SKHY",
4989
+ isRwa: true,
4990
+ name: "SK hynix Inc. American Depositary Shares",
4991
+ decimals: 8,
4992
+ address: "0x0000000000000000000000000000000000a6d324",
4993
+ chainKey: ChainKeys.HEDERA_MAINNET,
4994
+ hubAsset: "0x09023C636A3dc9c12c6E5673E17b6C0c4FA04EeD",
4995
+ vault: SodaTokens.SKHY.address
4996
+ },
4997
+ JNJ: {
4998
+ symbol: "JNJ",
4999
+ isRwa: true,
5000
+ name: "Johnson & Johnson",
5001
+ decimals: 8,
5002
+ address: "0x0000000000000000000000000000000000a6d327",
5003
+ chainKey: ChainKeys.HEDERA_MAINNET,
5004
+ hubAsset: "0xb2FD95F47cCd1e120a66a56fF4E147DB7AA08cfb",
5005
+ vault: SodaTokens.JNJ.address
5006
+ },
5007
+ UPS: {
5008
+ symbol: "UPS",
5009
+ isRwa: true,
5010
+ name: "UPS",
5011
+ decimals: 8,
5012
+ address: "0x0000000000000000000000000000000000a6d328",
5013
+ chainKey: ChainKeys.HEDERA_MAINNET,
5014
+ hubAsset: "0xc99c1FA55072B9e5a4616655B2D1A3fE7C9E990D",
5015
+ vault: SodaTokens.UPS.address
5016
+ },
5017
+ DJT: {
5018
+ symbol: "DJT",
5019
+ isRwa: true,
5020
+ name: "Trump Media & Technology Group",
5021
+ decimals: 8,
5022
+ address: "0x0000000000000000000000000000000000a567db",
5023
+ chainKey: ChainKeys.HEDERA_MAINNET,
5024
+ hubAsset: "0xD07524eeba69A5026597837eB46849f76dE1c187",
5025
+ vault: SodaTokens.DJT.address
5026
+ },
5027
+ RDDT: {
5028
+ symbol: "RDDT",
5029
+ isRwa: true,
5030
+ name: "Reddit",
5031
+ decimals: 8,
5032
+ address: "0x0000000000000000000000000000000000a567dd",
5033
+ chainKey: ChainKeys.HEDERA_MAINNET,
5034
+ hubAsset: "0xA32ABCa3605d1D84812F68E6c8bb773CaB8C2764",
5035
+ vault: SodaTokens.RDDT.address
5036
+ },
5037
+ GLD: {
5038
+ symbol: "GLD",
5039
+ isRwa: true,
5040
+ name: "SPDR Gold Trust",
5041
+ decimals: 8,
5042
+ address: "0x0000000000000000000000000000000000a567ef",
5043
+ chainKey: ChainKeys.HEDERA_MAINNET,
5044
+ hubAsset: "0x2A515DCe2ed73611B7ac2D63Aa1906A8D2c533EE",
5045
+ vault: SodaTokens.GLD.address
3900
5046
  }
3901
5047
  };
3902
5048
  var robinhoodSupportedTokens = {
@@ -4181,6 +5327,226 @@ var robinhoodSupportedTokens = {
4181
5327
  hubAsset: "0xf721a074bd9fc05ba1f7cb432149a74acfb49d73",
4182
5328
  vault: SodaTokens.BABA.address
4183
5329
  },
5330
+ AMC: {
5331
+ symbol: "AMC",
5332
+ isRwa: true,
5333
+ name: "AMC Entertainment",
5334
+ decimals: 18,
5335
+ address: "0x05a3d1Cd21d0C88145E82600E62e7E496e0F222B",
5336
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5337
+ hubAsset: "0x21cb0fab867942b44da9e2ff15dd865fb0d1a79e",
5338
+ vault: SodaTokens.AMC.address
5339
+ },
5340
+ HIMS: {
5341
+ symbol: "HIMS",
5342
+ isRwa: true,
5343
+ name: "Hims & Hers Health",
5344
+ decimals: 18,
5345
+ address: "0xCceE82fE024c36fA15E1005edE3E9e4787e23D09",
5346
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5347
+ hubAsset: "0x88422f01ba064aae528af488d3165b89b0e36467",
5348
+ vault: SodaTokens.HIMS.address
5349
+ },
5350
+ LLY: {
5351
+ symbol: "LLY",
5352
+ isRwa: true,
5353
+ name: "Eli Lilly",
5354
+ decimals: 18,
5355
+ address: "0x8005d266423c7ea827372c9c864491e5786600ea",
5356
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5357
+ hubAsset: "0x6ece6a22ea9ded1b146ba9e435bb31709a5e69b4",
5358
+ vault: SodaTokens.LLY.address
5359
+ },
5360
+ COST: {
5361
+ symbol: "COST",
5362
+ isRwa: true,
5363
+ name: "Costco",
5364
+ decimals: 18,
5365
+ address: "0x4EA005168D7F09a7A0Ba9D1DEf21a479950E44C2",
5366
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5367
+ hubAsset: "0xd6f93276dec116a3a0226a55266b90a03559adde",
5368
+ vault: SodaTokens.COST.address
5369
+ },
5370
+ TTWO: {
5371
+ symbol: "TTWO",
5372
+ isRwa: true,
5373
+ name: "Take-Two Interactive Software",
5374
+ decimals: 18,
5375
+ address: "0x5e81213613b6B86EaB4c6c50d718d34359459786",
5376
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5377
+ hubAsset: "0x125f946c4a7a82f6d1d14b82ae5ec6508a2a19e9",
5378
+ vault: SodaTokens.TTWO.address
5379
+ },
5380
+ RBLX: {
5381
+ symbol: "RBLX",
5382
+ isRwa: true,
5383
+ name: "Roblox",
5384
+ decimals: 18,
5385
+ address: "0xF0C4BF4C582cb3836e98394b1d4e7B7281101bE8",
5386
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5387
+ hubAsset: "0x22f63920a0c17f2565d01b88915a6f4281e41a95",
5388
+ vault: SodaTokens.RBLX.address
5389
+ },
5390
+ IBM: {
5391
+ symbol: "IBM",
5392
+ isRwa: true,
5393
+ name: "IBM",
5394
+ decimals: 18,
5395
+ address: "0x980dcf6766FA79f5Cf0c4AAdb3ab477ff15a9619",
5396
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5397
+ hubAsset: "0x3602c728c42bcf17d69b8a102e602c8a8fee3062",
5398
+ vault: SodaTokens.IBM.address
5399
+ },
5400
+ MRNA: {
5401
+ symbol: "MRNA",
5402
+ isRwa: true,
5403
+ name: "Moderna",
5404
+ decimals: 18,
5405
+ address: "0x43B07D15cE533bEc5476d70C22a78a1B2B662155",
5406
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5407
+ hubAsset: "0xda1db915a200f77cc4c7623b57fbe09f707fe7c9",
5408
+ vault: SodaTokens.MRNA.address
5409
+ },
5410
+ LULU: {
5411
+ symbol: "LULU",
5412
+ isRwa: true,
5413
+ name: "Lululemon",
5414
+ decimals: 18,
5415
+ address: "0x4e62068525Ab11FE768e29dfD00ef909B9803016",
5416
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5417
+ hubAsset: "0x42bc735dd95fca1719ba88682ef87c664a68fc08",
5418
+ vault: SodaTokens.LULU.address
5419
+ },
5420
+ SNAP: {
5421
+ symbol: "SNAP",
5422
+ isRwa: true,
5423
+ name: "Snap",
5424
+ decimals: 18,
5425
+ address: "0xF6589F11Bc40b669e584073F428B05562F568733",
5426
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5427
+ hubAsset: "0x77b96d73980b6cafe2b698a8c6adcb446de59653",
5428
+ vault: SodaTokens.SNAP.address
5429
+ },
5430
+ WYFI: {
5431
+ symbol: "WYFI",
5432
+ isRwa: true,
5433
+ name: "WhiteFiber, Inc.",
5434
+ decimals: 18,
5435
+ address: "0x9e7ABD3C9139D14E4c86DcE0e455AAB7A0C2FB3E",
5436
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5437
+ hubAsset: "0xb78266b11eff88e4b2bbfe653d636fa9d5fab5dd",
5438
+ vault: SodaTokens.WYFI.address
5439
+ },
5440
+ RIVN: {
5441
+ symbol: "RIVN",
5442
+ isRwa: true,
5443
+ name: "Rivian Automotive",
5444
+ decimals: 18,
5445
+ address: "0xB1BF26c1D20ff267A4f93550d1E0d06ac40a114B",
5446
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5447
+ hubAsset: "0x39f3b4c27d01db634315801a9263b50dcb9fe927",
5448
+ vault: SodaTokens.RIVN.address
5449
+ },
5450
+ NFLX: {
5451
+ symbol: "NFLX",
5452
+ isRwa: true,
5453
+ name: "Netflix",
5454
+ decimals: 18,
5455
+ address: "0xE0444EF8BF4eD74f74FD73686e2ddF4C1c5591E8",
5456
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5457
+ hubAsset: "0xbab4c41f3829dbd17c2e3cbd9b5fb11adbd487aa",
5458
+ vault: SodaTokens.NFLX.address
5459
+ },
5460
+ BULL: {
5461
+ symbol: "BULL",
5462
+ isRwa: true,
5463
+ name: "Webull",
5464
+ decimals: 18,
5465
+ address: "0xceF9027c7d6985b85f0BA431125073529A947A68",
5466
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5467
+ hubAsset: "0xbf7a5f902583144beb36d666fd7704b27d22c7c6",
5468
+ vault: SodaTokens.BULL.address
5469
+ },
5470
+ QUBT: {
5471
+ symbol: "QUBT",
5472
+ isRwa: true,
5473
+ name: "Quantum Computing",
5474
+ decimals: 18,
5475
+ address: "0x59818904ab4cE163b3cE4FfB64f2D6Ca02c434B4",
5476
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5477
+ hubAsset: "0x5e9f6b86b806c1602429bf9362b3eec8aa4f9235",
5478
+ vault: SodaTokens.QUBT.address
5479
+ },
5480
+ NET: {
5481
+ symbol: "NET",
5482
+ isRwa: true,
5483
+ name: "Cloudflare, Inc. Class A common stock",
5484
+ decimals: 18,
5485
+ address: "0x116F00968269B7bfbaD4109cE591d6E74c0601d4",
5486
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5487
+ hubAsset: "0xcc519c76fda41c3894021cd411d7df141a5c94e1",
5488
+ vault: SodaTokens.NET.address
5489
+ },
5490
+ SKHY: {
5491
+ symbol: "SKHY",
5492
+ isRwa: true,
5493
+ name: "SK hynix Inc. American Depositary Shares",
5494
+ decimals: 18,
5495
+ address: "0x84CAb63bc87912E71ad199ff14A0bA45de68FeF8",
5496
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5497
+ hubAsset: "0x04e561fb6e22b5e6bf2f4c5134afb3dad2265aa0",
5498
+ vault: SodaTokens.SKHY.address
5499
+ },
5500
+ JNJ: {
5501
+ symbol: "JNJ",
5502
+ isRwa: true,
5503
+ name: "Johnson & Johnson",
5504
+ decimals: 18,
5505
+ address: "0x03DfbBE0AC4E7bCDaFd08eD41A400326B77D8c80",
5506
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5507
+ hubAsset: "0x42f1912c483e1974ca7601e4e02164e0dfb57ceb",
5508
+ vault: SodaTokens.JNJ.address
5509
+ },
5510
+ UPS: {
5511
+ symbol: "UPS",
5512
+ isRwa: true,
5513
+ name: "UPS",
5514
+ decimals: 18,
5515
+ address: "0xf23250dac154D05Bb671CB0d0eBEf3c635c79CE2",
5516
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5517
+ hubAsset: "0xdb3394a4b4c8d1dd145945eb706624e307919051",
5518
+ vault: SodaTokens.UPS.address
5519
+ },
5520
+ DJT: {
5521
+ symbol: "DJT",
5522
+ isRwa: true,
5523
+ name: "Trump Media & Technology Group",
5524
+ decimals: 18,
5525
+ address: "0x1D11f0496982706C5e14A514D4E79F2e6BdE4516",
5526
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5527
+ hubAsset: "0x2027aa4839be98f9021c1608754cd793833e24ea",
5528
+ vault: SodaTokens.DJT.address
5529
+ },
5530
+ RDDT: {
5531
+ symbol: "RDDT",
5532
+ isRwa: true,
5533
+ name: "Reddit",
5534
+ decimals: 18,
5535
+ address: "0x05b37Fb53A299a1b874A619e1c4C404D52C36F4C",
5536
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5537
+ hubAsset: "0xec85b1ac463f8987c72d13dd3df4e4dc2f263dcf",
5538
+ vault: SodaTokens.RDDT.address
5539
+ },
5540
+ GLD: {
5541
+ symbol: "GLD",
5542
+ isRwa: true,
5543
+ name: "SPDR Gold Trust",
5544
+ decimals: 18,
5545
+ address: "0xC9a981FEE1F9DEc688bb123ccDeCc63D0deBFC4e",
5546
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5547
+ hubAsset: "0xe72fa58dc1ab501d530fbc98de2973f9cfaf37bc",
5548
+ vault: SodaTokens.GLD.address
5549
+ },
4184
5550
  PONS: {
4185
5551
  symbol: "PONS",
4186
5552
  name: "Pons",
@@ -4189,6 +5555,33 @@ var robinhoodSupportedTokens = {
4189
5555
  chainKey: ChainKeys.ROBINHOOD_MAINNET,
4190
5556
  hubAsset: "0x9cf6640c73dd4c278cfa08a8b8773e7b22420582",
4191
5557
  vault: "0x9cf6640c73dd4c278cfa08a8b8773e7b22420582"
5558
+ },
5559
+ AI: {
5560
+ symbol: "AI",
5561
+ name: "Artificial Inu",
5562
+ decimals: 18,
5563
+ address: "0x2e8c31162b855a2ffa90f6f8634643ad6f111e18",
5564
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5565
+ hubAsset: "0x1c56aaf3fc5a4517132d8bdc636a798f31ccf4b0",
5566
+ vault: "0x1c56aaf3fc5a4517132d8bdc636a798f31ccf4b0"
5567
+ },
5568
+ CASHCAT: {
5569
+ symbol: "CASHCAT",
5570
+ name: "Cash Cat",
5571
+ decimals: 18,
5572
+ address: "0x020bfc650a365f8bb26819deaabf3e21291018b4",
5573
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5574
+ hubAsset: "0x79150886ae702f6de9d36eb8748fcb9fcb483c2b",
5575
+ vault: "0x79150886ae702f6de9d36eb8748fcb9fcb483c2b"
5576
+ },
5577
+ TAO: {
5578
+ symbol: "TAO",
5579
+ name: "ForeverMoney Wrapped TAO",
5580
+ decimals: 18,
5581
+ address: "0xf3081494b87e8d5fb7960f066e931d1d0e6e3d67",
5582
+ chainKey: ChainKeys.ROBINHOOD_MAINNET,
5583
+ hubAsset: "0x4318e2fb5192256106e624565a64b6bb1c41e807",
5584
+ vault: "0x4318e2fb5192256106e624565a64b6bb1c41e807"
4192
5585
  }
4193
5586
  };
4194
5587
  var stacksSupportedTokens = {
@@ -4300,7 +5693,7 @@ var RelayChainIdMap = {
4300
5693
  };
4301
5694
  var INTENT_CHAIN_IDS = Object.values(RelayChainIdMap);
4302
5695
  var IntentRelayChainIdToChainKey = new Map(Object.entries(RelayChainIdMap).map(([chainKey, chainId]) => [chainId, chainKey]));
4303
- var CHAIN_LOGO_BASE_URL = "https://raw.githubusercontent.com/icon-project/sodax-sdks/main/packages/assets/chain";
5696
+ var CHAIN_LOGO_BASE_URL = "https://raw.githubusercontent.com/gosodax/sodax-sdks/main/packages/assets/chain";
4304
5697
  var chainLogo = (key) => `${CHAIN_LOGO_BASE_URL}/${key}.png`;
4305
5698
  var baseChainInfo = {
4306
5699
  [ChainKeys.SONIC_MAINNET]: {
@@ -5083,6 +6476,116 @@ var spokeChainConfig = {
5083
6476
  contractId: "CDARDTMGSEXTYJDSKDEAA52DCYX3OZEP7SOLSF5CT3QSSAGBETWH7LO3",
5084
6477
  assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
5085
6478
  },
6479
+ {
6480
+ assetCode: "AMC",
6481
+ contractId: "CAEBWGQGYLLN3KHAGEW6VNDS7FQL3MAIDPMAU6P3AHHI5YW5VGOE72LL",
6482
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6483
+ },
6484
+ {
6485
+ assetCode: "HIMS",
6486
+ contractId: "CCCDVTRZNHCG52ZXSNTBLMZC2GQXMR3YZY7MZWQFQ3DAUF52LZD6N6SV",
6487
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6488
+ },
6489
+ {
6490
+ assetCode: "LLY",
6491
+ contractId: "CAR37LJDK2PHTO2NJKKYGHQGP2SY5QIM4WADLDYWGH3THY2O3XU53KI5",
6492
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6493
+ },
6494
+ {
6495
+ assetCode: "COST",
6496
+ contractId: "CBACMBV6OO6MB6S4NB4V7IPFKPOZCVL22GZG3QIRVUXDPT3B33PIQGUK",
6497
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6498
+ },
6499
+ {
6500
+ assetCode: "TTWO",
6501
+ contractId: "CCUIUDZ7ZDBVSOBJG2HO2TNUDLOUBMKZB46NMFKIKITOOUDUKSSOOUI2",
6502
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6503
+ },
6504
+ {
6505
+ assetCode: "RBLX",
6506
+ contractId: "CA7QG7YKEIZRO7CWBJOTZ3SSDSLPOZOGIJFFXHNYWFU5Q32ZHYISMUAS",
6507
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6508
+ },
6509
+ {
6510
+ assetCode: "IBM",
6511
+ contractId: "CAD7GTZSDJOMR7N66CQT7TX6253WW6UC25MBV7GTZWD2A4EEQD2F64DM",
6512
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6513
+ },
6514
+ {
6515
+ assetCode: "MRNA",
6516
+ contractId: "CB5DSRUATRWXLUTWBIYHBZ4NPUODQWBSM3K3LKSASXCVTPTINX5TGYR6",
6517
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6518
+ },
6519
+ {
6520
+ assetCode: "LULU",
6521
+ contractId: "CAOURCGE6GBFMP2NCP7IU2NFS4TTQTUD47OV65I25QUNE5K4D3U7HQ6G",
6522
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6523
+ },
6524
+ {
6525
+ assetCode: "SNAP",
6526
+ contractId: "CBZJXY6XMLMEAT6CGIWX7XWOYUZULCCZ37CPHLHR3XBV2FNI3WFIEHAT",
6527
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6528
+ },
6529
+ {
6530
+ assetCode: "WYFI",
6531
+ contractId: "CAGFLIVHJ3P7Z5LUC74SJY4FFILFO2C3NBHQUQYYDMMANAOV2BHLW6VQ",
6532
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6533
+ },
6534
+ {
6535
+ assetCode: "RIVN",
6536
+ contractId: "CDVW2KKRGBHWAMYXD5KFRC65XCNQ6QMPF27TCJGK56EB4DVO4BANRC3H",
6537
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6538
+ },
6539
+ {
6540
+ assetCode: "NFLX",
6541
+ contractId: "CB5REEJVITH4X6OKVK3DK7JOTTF66MNUGYTIVVWHVZ27LXF7YOWWGFMB",
6542
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6543
+ },
6544
+ {
6545
+ assetCode: "BULL",
6546
+ contractId: "CBEHZ6M6YMFFZRSYOKBOXOP3Y4WKTOLTFIQ4HLJ7SCTXL6GCOT7XSCJP",
6547
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6548
+ },
6549
+ {
6550
+ assetCode: "QUBT",
6551
+ contractId: "CAU6WBKWYDOEJMZLEJPKBSR7YG5FY7XIXNQH7FB6G4PJYBJHDZKERVOQ",
6552
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6553
+ },
6554
+ {
6555
+ assetCode: "NET",
6556
+ contractId: "CANVGKHGU2E4ZHWUQMDG54DHO6GAOGUZB6QFF5WCQN46ZISQV7AAL3PN",
6557
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6558
+ },
6559
+ {
6560
+ assetCode: "SKHY",
6561
+ contractId: "CBLDWO73ZGWFNWNHGN7JFNMOKIBUCPGSDNEJY2QS4LTDBJDUP52YA7IU",
6562
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6563
+ },
6564
+ {
6565
+ assetCode: "JNJ",
6566
+ contractId: "CBQNN6DIY2VSS75U5563LUWQLTVFKKPW3RQFRMIGTLMCN4QAOHAENMGY",
6567
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6568
+ },
6569
+ {
6570
+ assetCode: "UPS",
6571
+ contractId: "CCTOGJ6YDHLVGKEFFRIHH7CCLETLEEZV4YMQ3PL7SI23GEMGK5JK3SRB",
6572
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6573
+ },
6574
+ {
6575
+ assetCode: "DJT",
6576
+ contractId: "CBTD75GNN5MQ5O4HGGNDNPYVCJYSGGPU66J25WAM3CQ7GNOK6ZDC2YJX",
6577
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6578
+ },
6579
+ {
6580
+ assetCode: "RDDT",
6581
+ contractId: "CCL6EU763SIZW4LWKZHRMM5HF75GHLWNFLL7TVMFN42ZL35UYEEPGZJ6",
6582
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6583
+ },
6584
+ {
6585
+ assetCode: "GLD",
6586
+ contractId: "CB7ZOXYL3NZMO4J3WRG6DVQDS5VYABSKLH4SF6FEYHVEXTNYAPXZI4DC",
6587
+ assetIssuer: "GDYUTHY75A7WUZJQDPOP66FB32BOYGZRXHWTWO4Q6LQTANT5X3V5HNFA"
6588
+ },
5086
6589
  {
5087
6590
  assetCode: "EURC",
5088
6591
  contractId: "CDTKPWPLOURQA2SGTKTUQOWRCBZEORB4BWBOMJ3D3ZTQQSGE5F6JBQLV",
@@ -5794,7 +7297,29 @@ var swapSupportedTokens = {
5794
7297
  SodaTokens.TSM,
5795
7298
  SodaTokens.AMD,
5796
7299
  SodaTokens.INTC,
5797
- SodaTokens.BABA
7300
+ SodaTokens.BABA,
7301
+ SodaTokens.AMC,
7302
+ SodaTokens.HIMS,
7303
+ SodaTokens.LLY,
7304
+ SodaTokens.COST,
7305
+ SodaTokens.TTWO,
7306
+ SodaTokens.RBLX,
7307
+ SodaTokens.IBM,
7308
+ SodaTokens.MRNA,
7309
+ SodaTokens.LULU,
7310
+ SodaTokens.SNAP,
7311
+ SodaTokens.WYFI,
7312
+ SodaTokens.RIVN,
7313
+ SodaTokens.NFLX,
7314
+ SodaTokens.BULL,
7315
+ SodaTokens.QUBT,
7316
+ SodaTokens.NET,
7317
+ SodaTokens.SKHY,
7318
+ SodaTokens.JNJ,
7319
+ SodaTokens.UPS,
7320
+ SodaTokens.DJT,
7321
+ SodaTokens.RDDT,
7322
+ SodaTokens.GLD
5798
7323
  ],
5799
7324
  [ChainKeys.AVALANCHE_MAINNET]: [
5800
7325
  spokeChainConfig[ChainKeys.AVALANCHE_MAINNET].supportedTokens.AVAX,
@@ -5825,8 +7350,10 @@ var swapSupportedTokens = {
5825
7350
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.SODA,
5826
7351
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.cbBTC,
5827
7352
  spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.GMX,
5828
- spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.DAI
7353
+ spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.DAI,
5829
7354
  // spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.USDS, // NOTE: Not Implemented
7355
+ spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.CHIP,
7356
+ spokeChainConfig[ChainKeys.ARBITRUM_MAINNET].supportedTokens.RAIN
5830
7357
  ],
5831
7358
  [ChainKeys.BASE_MAINNET]: [
5832
7359
  spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.ETH,
@@ -5839,8 +7366,13 @@ var swapSupportedTokens = {
5839
7366
  spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.cbETH,
5840
7367
  spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.SODA,
5841
7368
  spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.EURC,
5842
- spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.MORPHO
7369
+ spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.MORPHO,
5843
7370
  // spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.USDS, // NOTE: Not Implemented
7371
+ spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.AAVE,
7372
+ spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.JitoSOL,
7373
+ spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.SOL,
7374
+ spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.VVV,
7375
+ spokeChainConfig[ChainKeys.BASE_MAINNET].supportedTokens.ZEN
5844
7376
  ],
5845
7377
  [ChainKeys.OPTIMISM_MAINNET]: [
5846
7378
  spokeChainConfig[ChainKeys.OPTIMISM_MAINNET].supportedTokens.ETH,
@@ -5877,12 +7409,16 @@ var swapSupportedTokens = {
5877
7409
  spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.USD1,
5878
7410
  spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.ASTER,
5879
7411
  spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.XRP,
5880
- spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.ADA,
5881
7412
  spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.DOGE,
5882
7413
  spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.SOL,
5883
7414
  spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.DOT,
5884
7415
  spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.LINK,
5885
- spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.UNI
7416
+ spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.UNI,
7417
+ spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.FF,
7418
+ spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.PENDLE,
7419
+ spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.STABLE,
7420
+ spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.TUSD,
7421
+ spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.U
5886
7422
  ],
5887
7423
  [ChainKeys.HYPEREVM_MAINNET]: [
5888
7424
  spokeChainConfig[ChainKeys.HYPEREVM_MAINNET].supportedTokens.HYPE,
@@ -5944,7 +7480,28 @@ var swapSupportedTokens = {
5944
7480
  spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.USDG,
5945
7481
  spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.JupUSD,
5946
7482
  spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.USDe,
5947
- spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.USELESS
7483
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.USELESS,
7484
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens["2Z"],
7485
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.BP,
7486
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.CARDS,
7487
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.CASH,
7488
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.Fartcoin,
7489
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.GLDx,
7490
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.HOODx,
7491
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.HYPE,
7492
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.hyUSD,
7493
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.KMNO,
7494
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.LBTC,
7495
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.MET,
7496
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.ONYC,
7497
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.PENGU,
7498
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.SPCXx,
7499
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.STONK,
7500
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.syrupUSDC,
7501
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.TRUMP,
7502
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.USX,
7503
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.xBTC,
7504
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.ZEC
5948
7505
  ],
5949
7506
  [ChainKeys.ICON_MAINNET]: [
5950
7507
  spokeChainConfig[ChainKeys.ICON_MAINNET].supportedTokens.ICX,
@@ -5999,6 +7556,28 @@ var swapSupportedTokens = {
5999
7556
  spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.AMD,
6000
7557
  spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.INTC,
6001
7558
  spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.BABA,
7559
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.AMC,
7560
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.HIMS,
7561
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.LLY,
7562
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.COST,
7563
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.TTWO,
7564
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.RBLX,
7565
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.IBM,
7566
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.MRNA,
7567
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.LULU,
7568
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.SNAP,
7569
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.WYFI,
7570
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.RIVN,
7571
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.NFLX,
7572
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.BULL,
7573
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.QUBT,
7574
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.NET,
7575
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.SKHY,
7576
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.JNJ,
7577
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.UPS,
7578
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.DJT,
7579
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.RDDT,
7580
+ spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.GLD,
6002
7581
  spokeChainConfig[ChainKeys.STELLAR_MAINNET].supportedTokens.EURC
6003
7582
  ],
6004
7583
  [ChainKeys.SUI_MAINNET]: [
@@ -6017,7 +7596,8 @@ var swapSupportedTokens = {
6017
7596
  spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.WAL,
6018
7597
  spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.NAVX,
6019
7598
  spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.USDsui,
6020
- spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.WBTC
7599
+ spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.WBTC,
7600
+ spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.USDY
6021
7601
  ],
6022
7602
  [ChainKeys.INJECTIVE_MAINNET]: [
6023
7603
  spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.INJ,
@@ -6062,8 +7642,20 @@ var swapSupportedTokens = {
6062
7642
  spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.rETH,
6063
7643
  spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.GHO,
6064
7644
  spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.USDG,
6065
- spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.LIT
7645
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.LIT,
6066
7646
  // spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.USDS, // NOTE: Not Implemented
7647
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.AUSD,
7648
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.cirBTC,
7649
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.CRV,
7650
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.EURC,
7651
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.ICP,
7652
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.kBTC,
7653
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.NEAR,
7654
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.ONDO,
7655
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.QNT,
7656
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.SOL,
7657
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.tBTC,
7658
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.wTAO
6067
7659
  ],
6068
7660
  [ChainKeys.REDBELLY_MAINNET]: [
6069
7661
  spokeChainConfig[ChainKeys.REDBELLY_MAINNET].supportedTokens.RBNT,
@@ -6136,7 +7728,29 @@ var swapSupportedTokens = {
6136
7728
  spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.TSM,
6137
7729
  spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.AMD,
6138
7730
  spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.INTC,
6139
- spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.BABA
7731
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.BABA,
7732
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.AMC,
7733
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.HIMS,
7734
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.LLY,
7735
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.COST,
7736
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.TTWO,
7737
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.RBLX,
7738
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.IBM,
7739
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.MRNA,
7740
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.LULU,
7741
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.SNAP,
7742
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.WYFI,
7743
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.RIVN,
7744
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.NFLX,
7745
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.BULL,
7746
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.QUBT,
7747
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.NET,
7748
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.SKHY,
7749
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.JNJ,
7750
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.UPS,
7751
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.DJT,
7752
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.RDDT,
7753
+ spokeChainConfig[ChainKeys.HEDERA_MAINNET].supportedTokens.GLD
6140
7754
  ],
6141
7755
  [ChainKeys.ROBINHOOD_MAINNET]: [
6142
7756
  spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.ETH,
@@ -6169,11 +7783,37 @@ var swapSupportedTokens = {
6169
7783
  spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.AMD,
6170
7784
  spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.INTC,
6171
7785
  spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.BABA,
6172
- spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.PONS
7786
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.AMC,
7787
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.HIMS,
7788
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.LLY,
7789
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.COST,
7790
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.TTWO,
7791
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.RBLX,
7792
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.IBM,
7793
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.MRNA,
7794
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.LULU,
7795
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.SNAP,
7796
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.WYFI,
7797
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.RIVN,
7798
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.NFLX,
7799
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.BULL,
7800
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.QUBT,
7801
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.NET,
7802
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.SKHY,
7803
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.JNJ,
7804
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.UPS,
7805
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.DJT,
7806
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.RDDT,
7807
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.GLD,
7808
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.PONS,
7809
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.AI,
7810
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.CASHCAT,
7811
+ spokeChainConfig[ChainKeys.ROBINHOOD_MAINNET].supportedTokens.TAO
6173
7812
  ]
6174
7813
  };
6175
7814
  var stagingSwapSupportedTokens = {
6176
- [ChainKeys.SONIC_MAINNET]: [],
7815
+ // ADA vault liquidity is insufficient to sell in production.
7816
+ [ChainKeys.SONIC_MAINNET]: [SodaTokens.sodaADA],
6177
7817
  [ChainKeys.AVALANCHE_MAINNET]: [],
6178
7818
  [ChainKeys.ARBITRUM_MAINNET]: [],
6179
7819
  [ChainKeys.BASE_MAINNET]: [
@@ -6185,12 +7825,17 @@ var stagingSwapSupportedTokens = {
6185
7825
  spokeChainConfig[ChainKeys.POLYGON_MAINNET].supportedTokens.USDT,
6186
7826
  spokeChainConfig[ChainKeys.POLYGON_MAINNET].supportedTokens.wstETH
6187
7827
  ],
6188
- [ChainKeys.BSC_MAINNET]: [],
7828
+ [ChainKeys.BSC_MAINNET]: [spokeChainConfig[ChainKeys.BSC_MAINNET].supportedTokens.ADA],
6189
7829
  [ChainKeys.HYPEREVM_MAINNET]: [],
6190
7830
  [ChainKeys.LIGHTLINK_MAINNET]: [
6191
7831
  spokeChainConfig[ChainKeys.LIGHTLINK_MAINNET].supportedTokens["HYPE.LL"]
6192
7832
  ],
6193
- [ChainKeys.SOLANA_MAINNET]: [],
7833
+ [ChainKeys.SOLANA_MAINNET]: [
7834
+ // Meteora swaps do not support this Token-2022 token.
7835
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.ANSEM,
7836
+ // No correct production price feed.
7837
+ spokeChainConfig[ChainKeys.SOLANA_MAINNET].supportedTokens.PRIME
7838
+ ],
6194
7839
  [ChainKeys.ICON_MAINNET]: [],
6195
7840
  [ChainKeys.STELLAR_MAINNET]: [],
6196
7841
  [ChainKeys.SUI_MAINNET]: [spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.USDT],
@@ -6199,14 +7844,15 @@ var stagingSwapSupportedTokens = {
6199
7844
  [ChainKeys.BITCOIN_MAINNET]: [],
6200
7845
  [ChainKeys.ETHEREUM_MAINNET]: [
6201
7846
  spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.wstETH,
6202
- spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.weETH
7847
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.weETH,
7848
+ // The production pool is empty.
7849
+ spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.wM
6203
7850
  ],
6204
7851
  [ChainKeys.REDBELLY_MAINNET]: [],
6205
7852
  [ChainKeys.KAIA_MAINNET]: [],
6206
7853
  [ChainKeys.STACKS_MAINNET]: [],
6207
7854
  // Hedera promoted to production — see swapSupportedTokens
6208
7855
  [ChainKeys.HEDERA_MAINNET]: [],
6209
- // Robinhood Chain promoted to production — see swapSupportedTokens
6210
7856
  [ChainKeys.ROBINHOOD_MAINNET]: []
6211
7857
  };
6212
7858
  var swapsConfig = {
@@ -6514,7 +8160,7 @@ function isValidWalletProviderForChainKey(chainKey, walletProvider) {
6514
8160
  }
6515
8161
 
6516
8162
  // ../types/dist/index.js
6517
- var CONFIG_VERSION = 2020099;
8163
+ var CONFIG_VERSION = 2030002;
6518
8164
  var RC_STABLE = 99;
6519
8165
  var MIN_CONFIG_VERSION = 1e6;
6520
8166
  var MAX_CONFIG_VERSION = 99999999;
@@ -6767,12 +8413,12 @@ function canonicalizeBitcoinAddress(address) {
6767
8413
  }
6768
8414
  }
6769
8415
  function normalizePsbtToBase64(signedPsbt) {
6770
- const isHex3 = /^[0-9a-fA-F]+$/.test(signedPsbt);
6771
- return isHex3 ? Buffer.from(signedPsbt, "hex").toString("base64") : signedPsbt;
8416
+ const isHex4 = /^[0-9a-fA-F]+$/.test(signedPsbt);
8417
+ return isHex4 ? Buffer.from(signedPsbt, "hex").toString("base64") : signedPsbt;
6772
8418
  }
6773
8419
  function normalizeSignatureToBase64(signature) {
6774
- const isHex3 = /^[0-9a-fA-F]+$/.test(signature);
6775
- return isHex3 ? Buffer.from(signature, "hex").toString("base64") : signature;
8420
+ const isHex4 = /^[0-9a-fA-F]+$/.test(signature);
8421
+ return isHex4 ? Buffer.from(signature, "hex").toString("base64") : signature;
6776
8422
  }
6777
8423
  function isNativeBitcoinTransfer(config, chainKey, token) {
6778
8424
  return isBitcoinChainKeyType(chainKey) && !!token && isNativeBitcoinToken(config.getChainConfig(chainKey), token.address);
@@ -7177,7 +8823,8 @@ function mapRelayFailure(error, ctx) {
7177
8823
  const baseCtx = {
7178
8824
  action: ctx.action,
7179
8825
  srcChainKey: ctx.srcChainKey,
7180
- dstChainKey: ctx.dstChainKey
8826
+ dstChainKey: ctx.dstChainKey,
8827
+ ...ctx.srcTxHash !== void 0 && { srcTxHash: ctx.srcTxHash }
7181
8828
  };
7182
8829
  if (message === RELAY_ERROR_CODES.RELAY_TIMEOUT) {
7183
8830
  return new SodaxError("RELAY_TIMEOUT", "Relay packet did not arrive within timeout", {
@@ -7262,9 +8909,11 @@ function isWalletRejection(error) {
7262
8909
  if (typeof error !== "object") return false;
7263
8910
  const o = error;
7264
8911
  if (o.name === "UserRejectedRequestError") return true;
8912
+ if (o.name === "AtomicReadyWalletRejectedUpgradeError") return true;
7265
8913
  if (o.name === "WalletSignTransactionError" && matchRejectionText(o.message)) return true;
7266
8914
  if (o.name === "WalletConnectionError" && matchRejectionText(o.message)) return true;
7267
8915
  if (o.code === 4001) return true;
8916
+ if (o.code === 5750) return true;
7268
8917
  if (o.code === "ACTION_REJECTED") return true;
7269
8918
  if (o.code === "CANCEL_SIGNING") return true;
7270
8919
  if (o.code === "CANCEL_JSON-RPC") return true;
@@ -7326,6 +8975,13 @@ function allowanceCheckFailed(feature, cause, context) {
7326
8975
  context: { phase: "allowanceCheck", ...context }
7327
8976
  });
7328
8977
  }
8978
+ function withErrorContext(error, context) {
8979
+ return new SodaxError(error.code, error.message, {
8980
+ feature: error.feature,
8981
+ cause: error.cause,
8982
+ context: { ...error.context, ...context }
8983
+ });
8984
+ }
7329
8985
  function gasEstimationFailed(feature, cause, context) {
7330
8986
  return new SodaxError("GAS_ESTIMATION_FAILED", messageOf(cause, "Gas estimation failed"), {
7331
8987
  feature,
@@ -16646,7 +18302,7 @@ function mergeSodaxConfig(base2, override) {
16646
18302
  }
16647
18303
  function encodeContractCalls(calls) {
16648
18304
  return viem.encodeAbiParameters(viem.parseAbiParameters("(address,uint256,bytes)[]"), [
16649
- calls.map((v10) => [v10.address, v10.value, v10.data])
18305
+ calls.map((v11) => [v11.address, v11.value, v11.data])
16650
18306
  ]);
16651
18307
  }
16652
18308
  async function waitForTransactionReceipt(hash, provider) {
@@ -16759,6 +18415,172 @@ function getEvmViemChain(key) {
16759
18415
  }
16760
18416
  }
16761
18417
  }
18418
+
18419
+ // src/shared/utils/evmAtomicBatch.ts
18420
+ function canSendAtomicBatch(walletProvider) {
18421
+ return typeof walletProvider.getAtomicBatchSupport === "function" && typeof walletProvider.sendAtomicBatch === "function" && typeof walletProvider.waitForBatch === "function";
18422
+ }
18423
+ async function readAtomicBatchSupport(walletProvider, chainId) {
18424
+ try {
18425
+ return await walletProvider.getAtomicBatchSupport(chainId);
18426
+ } catch {
18427
+ return "unsupported";
18428
+ }
18429
+ }
18430
+ var BATCH_REFUSED_CODES = /* @__PURE__ */ new Set([4200, -32601, 5700, 5710, 5740, 5760]);
18431
+ var MAX_CAUSE_DEPTH2 = 5;
18432
+ var UPGRADE_DECLINED_CODE = 5750;
18433
+ function isAtomicBatchRefused(error) {
18434
+ return hasErrorCode(error, (code) => BATCH_REFUSED_CODES.has(code));
18435
+ }
18436
+ function isAccountUpgradeDeclined(error) {
18437
+ return hasErrorCode(error, (code) => code === UPGRADE_DECLINED_CODE);
18438
+ }
18439
+ function hasErrorCode(error, matches) {
18440
+ let current = error;
18441
+ for (let depth = 0; depth < MAX_CAUSE_DEPTH2 && typeof current === "object" && current !== null; depth++) {
18442
+ const code = "code" in current ? current.code : void 0;
18443
+ if (typeof code === "number" && matches(code)) return true;
18444
+ current = "cause" in current ? current.cause : void 0;
18445
+ }
18446
+ return false;
18447
+ }
18448
+
18449
+ // src/shared/utils/approvalBatch.ts
18450
+ function approvalBatchWaitMs(timeout) {
18451
+ return Math.max(resolveTimeoutMs(timeout, DEFAULT_RELAY_TX_TIMEOUT), DEFAULT_RELAY_TX_TIMEOUT);
18452
+ }
18453
+ var ATOMIC_BATCH_REFUSED = "atomic-batch-refused";
18454
+ var ATOMIC_BATCH_UNCONFIRMED = "atomic-batch-unconfirmed";
18455
+ var ACCOUNT_UPGRADE_DECLINED = "account-upgrade-declined";
18456
+ var BATCH_NOTHING_LANDED_CODES = /* @__PURE__ */ new Set([400, 500]);
18457
+ async function resolveApprovalStrategy({
18458
+ srcChainKey,
18459
+ walletProvider,
18460
+ allowAccountUpgrade = true
18461
+ }) {
18462
+ if (isEvmSpokeOnlyChainKeyType(srcChainKey) && isEvmWalletProviderType(walletProvider) && canSendAtomicBatch(walletProvider)) {
18463
+ const support = await readAtomicBatchSupport(walletProvider, getEvmViemChain(srcChainKey).id);
18464
+ if (support === "supported" || support === "ready" && allowAccountUpgrade) return "atomic-batch";
18465
+ }
18466
+ return "sequential";
18467
+ }
18468
+ async function sendApprovalBatch({
18469
+ walletProvider,
18470
+ srcChainKey,
18471
+ txs,
18472
+ timeoutMs,
18473
+ feature,
18474
+ context,
18475
+ onBatchSent
18476
+ }) {
18477
+ if (!canSendAtomicBatch(walletProvider)) {
18478
+ return {
18479
+ ok: false,
18480
+ error: new SodaxError("INTENT_CREATION_FAILED", "Wallet provider does not implement EIP-5792 batches", {
18481
+ feature,
18482
+ context: { ...context, phase: "intentCreation", reason: ATOMIC_BATCH_REFUSED }
18483
+ })
18484
+ };
18485
+ }
18486
+ let batchId;
18487
+ try {
18488
+ batchId = await walletProvider.sendAtomicBatch(txs, { expectedChainId: getEvmViemChain(srcChainKey).id });
18489
+ } catch (error) {
18490
+ const reason = isAtomicBatchRefused(error) ? ATOMIC_BATCH_REFUSED : isAccountUpgradeDeclined(error) ? ACCOUNT_UPGRADE_DECLINED : void 0;
18491
+ return { ok: false, error: intentCreationFailed(feature, error, { ...context, ...reason && { reason } }) };
18492
+ }
18493
+ try {
18494
+ onBatchSent?.(batchId);
18495
+ } catch {
18496
+ }
18497
+ return confirmApprovalBatch({ walletProvider, batchId, callCount: txs.length, timeoutMs, feature, context });
18498
+ }
18499
+ async function confirmApprovalBatch({
18500
+ walletProvider,
18501
+ batchId,
18502
+ callCount,
18503
+ timeoutMs,
18504
+ feature,
18505
+ context
18506
+ }) {
18507
+ const unconfirmed = (cause) => ({
18508
+ ok: false,
18509
+ error: new SodaxError("TX_VERIFICATION_FAILED", "Atomic approval batch was sent but not confirmed", {
18510
+ feature,
18511
+ cause,
18512
+ context: {
18513
+ ...context,
18514
+ phase: "verify",
18515
+ reason: ATOMIC_BATCH_UNCONFIRMED,
18516
+ batchId,
18517
+ ...callCount !== void 0 && { callCount }
18518
+ }
18519
+ })
18520
+ });
18521
+ if (!canSendAtomicBatch(walletProvider)) return unconfirmed();
18522
+ try {
18523
+ const batch = await walletProvider.waitForBatch(batchId, { timeout: Math.max(1, timeoutMs) });
18524
+ if (batch.status !== "success" && !BATCH_NOTHING_LANDED_CODES.has(batch.statusCode)) return unconfirmed();
18525
+ if (batch.status !== "success") {
18526
+ return {
18527
+ ok: false,
18528
+ error: new SodaxError("INTENT_CREATION_FAILED", "Atomic approval batch did not succeed", {
18529
+ feature,
18530
+ context: {
18531
+ ...context,
18532
+ phase: "intentCreation",
18533
+ reason: "atomic-batch-failed",
18534
+ batchId,
18535
+ statusCode: batch.statusCode
18536
+ }
18537
+ })
18538
+ };
18539
+ }
18540
+ const { receipts } = batch;
18541
+ const oneTx = new Set(receipts.map((receipt) => receipt.transactionHash)).size === 1;
18542
+ const depositReceipt = oneTx || receipts.length === callCount ? receipts.at(-1) : void 0;
18543
+ if (depositReceipt?.status !== "success") return unconfirmed();
18544
+ return { ok: true, value: { txHash: depositReceipt.transactionHash, batchId } };
18545
+ } catch (error) {
18546
+ return unconfirmed(error);
18547
+ }
18548
+ }
18549
+ async function confirmApproval({
18550
+ waitForTxReceipt,
18551
+ txHash,
18552
+ chainKey,
18553
+ feature,
18554
+ context
18555
+ }) {
18556
+ const receipt = await waitForTxReceipt({ txHash, chainKey });
18557
+ if (receipt.ok && receipt.value.status === "success") return { ok: true, value: void 0 };
18558
+ return {
18559
+ ok: false,
18560
+ error: new SodaxError("APPROVE_FAILED", `Approval transaction ${txHash} did not confirm`, {
18561
+ feature,
18562
+ cause: receipt.ok ? receipt.value : receipt.error,
18563
+ context: { ...context, phase: "approve", reason: "approve-not-confirmed", approveTxHash: txHash }
18564
+ })
18565
+ };
18566
+ }
18567
+ function isAtomicBatchRefusal(error) {
18568
+ return isSodaxError(error) && error.code === "INTENT_CREATION_FAILED" && error.context?.reason === ATOMIC_BATCH_REFUSED;
18569
+ }
18570
+ async function runWithApproval({
18571
+ strategy,
18572
+ notRequired,
18573
+ atomicBatch,
18574
+ sequential,
18575
+ onBatchRefused
18576
+ }) {
18577
+ if (strategy === "not-required") return { result: await notRequired(), approvalStrategy: strategy };
18578
+ if (strategy === "sequential") return { result: await sequential(false), approvalStrategy: strategy };
18579
+ const batched = await atomicBatch();
18580
+ if (batched.ok || !isAtomicBatchRefusal(batched.error)) return { result: batched, approvalStrategy: "atomic-batch" };
18581
+ onBatchRefused?.(batched.error);
18582
+ return { result: await sequential(true), approvalStrategy: "sequential" };
18583
+ }
16762
18584
  var EvmVaultTokenService = class {
16763
18585
  constructor() {
16764
18586
  }
@@ -17744,7 +19566,11 @@ var StacksSpokeService = class {
17744
19566
  async getWalletBalances(params) {
17745
19567
  const { srcChainKey, srcAddress, tokens } = params;
17746
19568
  const collector = createBalanceCollector({ logger: this.config.logger, chainKey: srcChainKey });
17747
- await settleWalletBalances(collector, tokens, (token) => this.getWalletBalance({ srcChainKey, srcAddress, token }));
19569
+ await settleWalletBalances(
19570
+ collector,
19571
+ tokens,
19572
+ (token) => this.getWalletBalance({ srcChainKey, srcAddress, token })
19573
+ );
17748
19574
  return collector.finish();
17749
19575
  }
17750
19576
  /**
@@ -19549,22 +21375,22 @@ function createHmacDrbg(hashLen, qByteLen, hmacFn) {
19549
21375
  const byte0 = Uint8Array.of(0);
19550
21376
  const byte1 = Uint8Array.of(1);
19551
21377
  const _maxDrbgIters = 1e3;
19552
- let v10 = u8n(hashLen);
21378
+ let v11 = u8n(hashLen);
19553
21379
  let k = u8n(hashLen);
19554
21380
  let i = 0;
19555
21381
  const reset = () => {
19556
- v10.fill(1);
21382
+ v11.fill(1);
19557
21383
  k.fill(0);
19558
21384
  i = 0;
19559
21385
  };
19560
- const h = (...msgs) => hmacFn(k, concatBytes(v10, ...msgs));
21386
+ const h = (...msgs) => hmacFn(k, concatBytes(v11, ...msgs));
19561
21387
  const reseed = (seed = NULL) => {
19562
21388
  k = h(byte0, seed);
19563
- v10 = h();
21389
+ v11 = h();
19564
21390
  if (seed.length === 0)
19565
21391
  return;
19566
21392
  k = h(byte1, seed);
19567
- v10 = h();
21393
+ v11 = h();
19568
21394
  };
19569
21395
  const gen = () => {
19570
21396
  if (i++ >= _maxDrbgIters)
@@ -19572,10 +21398,10 @@ function createHmacDrbg(hashLen, qByteLen, hmacFn) {
19572
21398
  let len = 0;
19573
21399
  const out = [];
19574
21400
  while (len < qByteLen) {
19575
- v10 = h();
19576
- const sl = v10.slice();
21401
+ v11 = h();
21402
+ const sl = v11.slice();
19577
21403
  out.push(sl);
19578
- len += v10.length;
21404
+ len += v11.length;
19579
21405
  }
19580
21406
  return concatBytes(...out);
19581
21407
  };
@@ -19601,7 +21427,7 @@ function validateObject(object4, fields = {}, optFields = {}) {
19601
21427
  if (current !== expectedType || val === null)
19602
21428
  throw new Error(`param "${fieldName}" is invalid: expected ${expectedType}, got ${current}`);
19603
21429
  }
19604
- const iter = (f, isOpt) => Object.entries(f).forEach(([k, v10]) => checkField(k, v10, isOpt));
21430
+ const iter = (f, isOpt) => Object.entries(f).forEach(([k, v11]) => checkField(k, v11, isOpt));
19605
21431
  iter(fields, false);
19606
21432
  iter(optFields, true);
19607
21433
  }
@@ -19672,9 +21498,9 @@ function sqrt3mod4(Fp, n) {
19672
21498
  function sqrt5mod8(Fp, n) {
19673
21499
  const p5div8 = (Fp.ORDER - _5n) / _8n;
19674
21500
  const n2 = Fp.mul(n, _2n);
19675
- const v10 = Fp.pow(n2, p5div8);
19676
- const nv = Fp.mul(n, v10);
19677
- const i = Fp.mul(Fp.mul(nv, _2n), v10);
21501
+ const v11 = Fp.pow(n2, p5div8);
21502
+ const nv = Fp.mul(n, v11);
21503
+ const i = Fp.mul(Fp.mul(nv, _2n), v11);
19678
21504
  const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));
19679
21505
  assertIsSquare(Fp, root, n);
19680
21506
  return root;
@@ -20256,9 +22082,9 @@ function edwards(params, extraOpts = {}) {
20256
22082
  validateObject(extraOpts, {}, { uvRatio: "function" });
20257
22083
  const MASK = _2n2 << BigInt(Fn.BYTES * 8) - _1n4;
20258
22084
  const modP = (n) => Fp.create(n);
20259
- const uvRatio2 = extraOpts.uvRatio || ((u, v10) => {
22085
+ const uvRatio2 = extraOpts.uvRatio || ((u, v11) => {
20260
22086
  try {
20261
- return { isValid: true, value: Fp.sqrt(Fp.div(u, v10)) };
22087
+ return { isValid: true, value: Fp.sqrt(Fp.div(u, v11)) };
20262
22088
  } catch (e) {
20263
22089
  return { isValid: false, value: _0n4 };
20264
22090
  }
@@ -20354,8 +22180,8 @@ function edwards(params, extraOpts = {}) {
20354
22180
  aInRange("point.y", y, _0n4, max);
20355
22181
  const y2 = modP(y * y);
20356
22182
  const u = modP(y2 - _1n4);
20357
- const v10 = modP(d * y2 - a);
20358
- let { isValid, value: x } = uvRatio2(u, v10);
22183
+ const v11 = modP(d * y2 - a);
22184
+ let { isValid, value: x } = uvRatio2(u, v11);
20359
22185
  if (!isValid)
20360
22186
  throw new Error("bad point: invalid y coordinate");
20361
22187
  const isXOdd = (x & _1n4) === _1n4;
@@ -20695,13 +22521,13 @@ function adjustScalarBytes(bytes) {
20695
22521
  return bytes;
20696
22522
  }
20697
22523
  var ED25519_SQRT_M1 = /* @__PURE__ */ BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");
20698
- function uvRatio(u, v10) {
22524
+ function uvRatio(u, v11) {
20699
22525
  const P = ed25519_CURVE_p;
20700
- const v32 = mod(v10 * v10 * v10, P);
20701
- const v72 = mod(v32 * v32 * v10, P);
22526
+ const v32 = mod(v11 * v11 * v11, P);
22527
+ const v72 = mod(v32 * v32 * v11, P);
20702
22528
  const pow = ed25519_pow_2_252_3(u * v72).pow_p_5_8;
20703
22529
  let x = mod(u * v32 * pow, P);
20704
- const vx2 = mod(v10 * x * x, P);
22530
+ const vx2 = mod(v11 * x * x, P);
20705
22531
  const root1 = x;
20706
22532
  const root2 = mod(x * ED25519_SQRT_M1, P);
20707
22533
  const useRoot1 = vx2 === u;
@@ -21032,7 +22858,7 @@ function findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio, protocol
21032
22858
  return findSeatPriceForProtocolAfter49(validators, maxNumberOfSeats, minimumStakeRatio);
21033
22859
  }
21034
22860
  function findSeatPriceForProtocolBefore49(validators, numSeats) {
21035
- const stakes = validators.map((v10) => BigInt(v10.stake)).sort(sortBigIntAsc);
22861
+ const stakes = validators.map((v11) => BigInt(v11.stake)).sort(sortBigIntAsc);
21036
22862
  const num = BigInt(numSeats);
21037
22863
  const stakesSum = stakes.reduce((a, b) => a + b);
21038
22864
  if (stakesSum < num) {
@@ -21061,7 +22887,7 @@ function findSeatPriceForProtocolAfter49(validators, maxNumberOfSeats, minimumSt
21061
22887
  if (minimumStakeRatio.length != 2) {
21062
22888
  throw Error("minimumStakeRatio should have 2 elements");
21063
22889
  }
21064
- const stakes = validators.map((v10) => BigInt(v10.stake)).sort(sortBigIntAsc);
22890
+ const stakes = validators.map((v11) => BigInt(v11.stake)).sort(sortBigIntAsc);
21065
22891
  const stakesSum = stakes.reduce((a, b) => a + b);
21066
22892
  if (validators.length < maxNumberOfSeats) {
21067
22893
  return stakesSum * BigInt(minimumStakeRatio[0]) / BigInt(minimumStakeRatio[1]);
@@ -21233,10 +23059,10 @@ var DER = {
21233
23059
  if (length < 128)
21234
23060
  throw new E("tlv.decode(long): not minimal encoding");
21235
23061
  }
21236
- const v10 = data.subarray(pos, pos + length);
21237
- if (v10.length !== length)
23062
+ const v11 = data.subarray(pos, pos + length);
23063
+ if (v11.length !== length)
21238
23064
  throw new E("tlv.decode: wrong value length");
21239
- return { v: v10, l: data.subarray(pos + length) };
23065
+ return { v: v11, l: data.subarray(pos + length) };
21240
23066
  }
21241
23067
  },
21242
23068
  // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,
@@ -21983,14 +23809,14 @@ function ecdsa(Point, hash, ecdsaOpts = {}) {
21983
23809
  return false;
21984
23810
  const { r, s } = sig;
21985
23811
  const h = bits2int_modN(message);
21986
- const is3 = Fn.inv(s);
21987
- const u1 = Fn.create(h * is3);
21988
- const u2 = Fn.create(r * is3);
23812
+ const is4 = Fn.inv(s);
23813
+ const u1 = Fn.create(h * is4);
23814
+ const u2 = Fn.create(r * is4);
21989
23815
  const R = Point.BASE.multiplyUnsafe(u1).add(P.multiplyUnsafe(u2));
21990
23816
  if (R.is0())
21991
23817
  return false;
21992
- const v10 = Fn.create(R.x);
21993
- return v10 === r;
23818
+ const v11 = Fn.create(R.x);
23819
+ return v11 === r;
21994
23820
  } catch (e) {
21995
23821
  return false;
21996
23822
  }
@@ -24885,7 +26711,11 @@ var NearSpokeService = class {
24885
26711
  async getWalletBalances(params) {
24886
26712
  const { srcChainKey, srcAddress, tokens } = params;
24887
26713
  const collector = createBalanceCollector({ logger: this.config.logger, chainKey: srcChainKey });
24888
- await settleWalletBalances(collector, tokens, (token) => this.getWalletBalance({ srcChainKey, srcAddress, token }));
26714
+ await settleWalletBalances(
26715
+ collector,
26716
+ tokens,
26717
+ (token) => this.getWalletBalance({ srcChainKey, srcAddress, token })
26718
+ );
24889
26719
  return collector.finish();
24890
26720
  }
24891
26721
  /**
@@ -27168,7 +28998,11 @@ var SolanaSpokeService = class _SolanaSpokeService {
27168
28998
  async getWalletBalances(params) {
27169
28999
  const { srcChainKey, srcAddress, tokens } = params;
27170
29000
  const collector = createBalanceCollector({ logger: this.config.logger, chainKey: srcChainKey });
27171
- await settleWalletBalances(collector, tokens, (token) => this.getWalletBalance({ srcChainKey, srcAddress, token }));
29001
+ await settleWalletBalances(
29002
+ collector,
29003
+ tokens,
29004
+ (token) => this.getWalletBalance({ srcChainKey, srcAddress, token })
29005
+ );
27172
29006
  return collector.finish();
27173
29007
  }
27174
29008
  /**
@@ -28024,9 +29858,9 @@ var SpokeService = class _SpokeService {
28024
29858
  * Sign and broadcast the approval plan for an ERC-20 on the hub or an EVM spoke.
28025
29859
  *
28026
29860
  * A token of the TetherToken lineage rejects an allowance change from one non-zero value to
28027
- * another, so a wallet holding a stale allowance needs `approve(0)` first. The transactions cannot
28028
- * be batched: each one is only valid once its predecessor has been mined. The hash of the last is
28029
- * returned, so the contract callers see is unchanged.
29861
+ * another, so a wallet holding a stale allowance needs `approve(0)` first. Sent as separate
29862
+ * transactions, each is only valid once its predecessor has been mined, so this waits between them
29863
+ * (an EIP-5792 atomic batch can carry both, in order). The hash of the last is returned.
28030
29864
  */
28031
29865
  async executeErc20ApprovalPlan(params) {
28032
29866
  const { walletProvider } = params;
@@ -29899,12 +31733,195 @@ var EvmHubProvider = class {
29899
31733
  });
29900
31734
  }
29901
31735
  };
31736
+ var ChainKeySchema = v__namespace.custom((input) => typeof input === "string");
31737
+ var SpokeChainKeySchema = v__namespace.custom((input) => typeof input === "string");
31738
+ var AddressSchema = v__namespace.custom((input) => typeof input === "string");
31739
+ var XTokenSchema = v__namespace.object({
31740
+ symbol: v__namespace.string(),
31741
+ name: v__namespace.string(),
31742
+ decimals: v__namespace.number(),
31743
+ address: v__namespace.string(),
31744
+ chainKey: ChainKeySchema,
31745
+ hubAsset: AddressSchema,
31746
+ vault: AddressSchema,
31747
+ access: v__namespace.optional(v__namespace.picklist(["withdrawOnly", "depositOnly"]))
31748
+ });
31749
+ var IntentStructSchema = v__namespace.object({
31750
+ intentId: v__namespace.string(),
31751
+ creator: v__namespace.string(),
31752
+ inputToken: v__namespace.string(),
31753
+ outputToken: v__namespace.string(),
31754
+ inputAmount: v__namespace.string(),
31755
+ minOutputAmount: v__namespace.string(),
31756
+ deadline: v__namespace.string(),
31757
+ allowPartialFill: v__namespace.boolean(),
31758
+ srcChain: v__namespace.number(),
31759
+ dstChain: v__namespace.number(),
31760
+ srcAddress: v__namespace.string(),
31761
+ dstAddress: v__namespace.string(),
31762
+ solver: v__namespace.string(),
31763
+ data: v__namespace.string()
31764
+ });
31765
+ var FillEventSchema = v__namespace.object({
31766
+ eventType: v__namespace.literal("intent-filled"),
31767
+ // The hub-chain fill tx; an empty one is no use as `fill_tx_hash`.
31768
+ txHash: v__namespace.pipe(v__namespace.string(), v__namespace.nonEmpty()),
31769
+ // Terminality. An intent created with `allowPartialFill` emits a fill event per fill, so the
31770
+ // event alone does not mean the intent is done — only `remainingInput === '0'` does. Required:
31771
+ // without it there is no proof of completion, and claiming SOLVED on a partial fill would report
31772
+ // an unfinished swap as complete.
31773
+ intentState: v__namespace.object({
31774
+ remainingInput: v__namespace.string()
31775
+ })
31776
+ });
31777
+ var IntentEventTypeSchema = v__namespace.object({ eventType: v__namespace.string() });
31778
+ var IntentResponseSchema = v__namespace.object({
31779
+ intentHash: v__namespace.string(),
31780
+ txHash: v__namespace.string(),
31781
+ logIndex: v__namespace.number(),
31782
+ chainId: v__namespace.number(),
31783
+ blockNumber: v__namespace.number(),
31784
+ open: v__namespace.boolean(),
31785
+ intent: IntentStructSchema,
31786
+ events: v__namespace.array(v__namespace.unknown())
31787
+ });
31788
+ var UserIntentsResponseSchema = v__namespace.object({
31789
+ total: v__namespace.number(),
31790
+ offset: v__namespace.number(),
31791
+ limit: v__namespace.number(),
31792
+ items: v__namespace.array(IntentResponseSchema)
31793
+ });
31794
+ var OrderbookResponseSchema = v__namespace.object({
31795
+ total: v__namespace.number(),
31796
+ data: v__namespace.array(
31797
+ v__namespace.object({
31798
+ intentState: v__namespace.object({
31799
+ exists: v__namespace.boolean(),
31800
+ remainingInput: v__namespace.string(),
31801
+ receivedOutput: v__namespace.string(),
31802
+ pendingPayment: v__namespace.boolean()
31803
+ }),
31804
+ intentData: v__namespace.object({
31805
+ intentId: v__namespace.string(),
31806
+ creator: v__namespace.string(),
31807
+ inputToken: v__namespace.string(),
31808
+ outputToken: v__namespace.string(),
31809
+ inputAmount: v__namespace.string(),
31810
+ minOutputAmount: v__namespace.string(),
31811
+ deadline: v__namespace.string(),
31812
+ allowPartialFill: v__namespace.boolean(),
31813
+ srcChain: v__namespace.number(),
31814
+ dstChain: v__namespace.number(),
31815
+ srcAddress: v__namespace.string(),
31816
+ dstAddress: v__namespace.string(),
31817
+ solver: v__namespace.string(),
31818
+ data: v__namespace.string(),
31819
+ intentHash: v__namespace.string(),
31820
+ txHash: v__namespace.string(),
31821
+ blockNumber: v__namespace.number()
31822
+ })
31823
+ })
31824
+ )
31825
+ });
31826
+ var MoneyMarketPositionSchema = v__namespace.object({
31827
+ userAddress: v__namespace.string(),
31828
+ positions: v__namespace.array(
31829
+ v__namespace.object({
31830
+ reserveAddress: v__namespace.string(),
31831
+ aTokenAddress: v__namespace.string(),
31832
+ variableDebtTokenAddress: v__namespace.string(),
31833
+ aTokenBalance: v__namespace.string(),
31834
+ variableDebtTokenBalance: v__namespace.string(),
31835
+ blockNumber: v__namespace.number()
31836
+ })
31837
+ )
31838
+ });
31839
+ var MoneyMarketAssetSchema = v__namespace.object({
31840
+ reserveAddress: v__namespace.string(),
31841
+ aTokenAddress: v__namespace.string(),
31842
+ totalATokenBalance: v__namespace.string(),
31843
+ variableDebtTokenAddress: v__namespace.string(),
31844
+ totalVariableDebtTokenBalance: v__namespace.string(),
31845
+ liquidityRate: v__namespace.string(),
31846
+ symbol: v__namespace.string(),
31847
+ totalSuppliers: v__namespace.number(),
31848
+ totalBorrowers: v__namespace.number(),
31849
+ variableBorrowRate: v__namespace.string(),
31850
+ stableBorrowRate: v__namespace.string(),
31851
+ liquidityIndex: v__namespace.string(),
31852
+ variableBorrowIndex: v__namespace.string(),
31853
+ blockNumber: v__namespace.number()
31854
+ });
31855
+ var MoneyMarketAssetsSchema = v__namespace.array(MoneyMarketAssetSchema);
31856
+ var MoneyMarketAssetBorrowersSchema = v__namespace.object({
31857
+ borrowers: v__namespace.array(v__namespace.string()),
31858
+ total: v__namespace.number(),
31859
+ offset: v__namespace.number(),
31860
+ limit: v__namespace.number()
31861
+ });
31862
+ var MoneyMarketAssetSuppliersSchema = v__namespace.object({
31863
+ suppliers: v__namespace.array(v__namespace.string()),
31864
+ total: v__namespace.number(),
31865
+ offset: v__namespace.number(),
31866
+ limit: v__namespace.number()
31867
+ });
31868
+ var MoneyMarketBorrowersSchema = v__namespace.object({
31869
+ borrowers: v__namespace.array(v__namespace.string()),
31870
+ total: v__namespace.number(),
31871
+ offset: v__namespace.number(),
31872
+ limit: v__namespace.number()
31873
+ });
31874
+ var GetChainsResponseSchema = v__namespace.array(SpokeChainKeySchema);
31875
+ var TokensByChainMapSchema = v__namespace.custom(
31876
+ (input) => typeof input === "object" && input !== null && Object.values(input).every((tokens) => Array.isArray(tokens) && tokens.every((t) => v__namespace.is(XTokenSchema, t)))
31877
+ );
31878
+ var TokensListSchema = v__namespace.array(XTokenSchema);
31879
+ var ReserveAssetsSchema = v__namespace.array(AddressSchema);
31880
+ var ORACLE_CANDLE_INTERVALS = ["1m", "5m", "1h", "1d"];
31881
+ var OracleCandleIntervalSchema = v__namespace.picklist(ORACLE_CANDLE_INTERVALS);
31882
+ var OracleMarketsResponseSchema = v__namespace.object({
31883
+ quote: v__namespace.string(),
31884
+ intervals: v__namespace.array(
31885
+ v__namespace.object({
31886
+ key: v__namespace.string(),
31887
+ label: v__namespace.string(),
31888
+ seconds: v__namespace.number()
31889
+ })
31890
+ ),
31891
+ symbols: v__namespace.array(v__namespace.string())
31892
+ });
31893
+ var OracleCandlesResponseSchema = v__namespace.object({
31894
+ symbol: v__namespace.string(),
31895
+ quote: v__namespace.string(),
31896
+ interval: OracleCandleIntervalSchema,
31897
+ candles: v__namespace.array(
31898
+ v__namespace.object({
31899
+ timestamp: v__namespace.number(),
31900
+ open: v__namespace.string(),
31901
+ high: v__namespace.string(),
31902
+ low: v__namespace.string(),
31903
+ close: v__namespace.string(),
31904
+ final: v__namespace.optional(v__namespace.boolean())
31905
+ })
31906
+ )
31907
+ });
31908
+ var isFillEvent = (value) => v__namespace.is(FillEventSchema, value);
31909
+ var isOracleCandleInterval = (value) => v__namespace.is(OracleCandleIntervalSchema, value);
29902
31910
 
29903
31911
  // src/backendApi/detailedStatusRouting.ts
29904
31912
  var DETAILED_STATUS_NOT_DELIVERED = "relay_not_delivered";
29905
31913
  function isBackendSubmitTxAbandoned(data) {
29906
31914
  return data.status === "failed" || Boolean(data.abandonedAt);
29907
31915
  }
31916
+ function readIntentJournalOutcome(intent) {
31917
+ const settled = intent.events.filter(isFillEvent).find((fill) => fill.intentState.remainingInput === "0");
31918
+ if (settled) return { kind: "solved", fillTxHash: settled.txHash };
31919
+ const eventTypes = intent.events.flatMap((event) => v__namespace.is(IntentEventTypeSchema, event) ? [event.eventType] : []);
31920
+ if (!intent.open && eventTypes.includes("intent-cancelled") && !eventTypes.includes("intent-filled")) {
31921
+ return { kind: "cancelled" };
31922
+ }
31923
+ return void 0;
31924
+ }
29908
31925
  async function resolveDeliveredPacket(params) {
29909
31926
  const { srcChainKey, srcTxHash, relayerApiEndpoint, backendAnswered } = params;
29910
31927
  const relayChainId = getIntentRelayChainId(srcChainKey);
@@ -30335,181 +32352,6 @@ async function runBackendSubmitTx({
30335
32352
  });
30336
32353
  return polled.ok ? { ok: true, value: polled.value } : { ok: false, cause: polled.cause };
30337
32354
  }
30338
- var ChainKeySchema = v__namespace.custom((input) => typeof input === "string");
30339
- var SpokeChainKeySchema = v__namespace.custom((input) => typeof input === "string");
30340
- var AddressSchema = v__namespace.custom((input) => typeof input === "string");
30341
- var XTokenSchema = v__namespace.object({
30342
- symbol: v__namespace.string(),
30343
- name: v__namespace.string(),
30344
- decimals: v__namespace.number(),
30345
- address: v__namespace.string(),
30346
- chainKey: ChainKeySchema,
30347
- hubAsset: AddressSchema,
30348
- vault: AddressSchema,
30349
- access: v__namespace.optional(v__namespace.picklist(["withdrawOnly", "depositOnly"]))
30350
- });
30351
- var IntentStructSchema = v__namespace.object({
30352
- intentId: v__namespace.string(),
30353
- creator: v__namespace.string(),
30354
- inputToken: v__namespace.string(),
30355
- outputToken: v__namespace.string(),
30356
- inputAmount: v__namespace.string(),
30357
- minOutputAmount: v__namespace.string(),
30358
- deadline: v__namespace.string(),
30359
- allowPartialFill: v__namespace.boolean(),
30360
- srcChain: v__namespace.number(),
30361
- dstChain: v__namespace.number(),
30362
- srcAddress: v__namespace.string(),
30363
- dstAddress: v__namespace.string(),
30364
- solver: v__namespace.string(),
30365
- data: v__namespace.string()
30366
- });
30367
- var FillEventSchema = v__namespace.object({
30368
- eventType: v__namespace.literal("intent-filled"),
30369
- // The hub-chain fill tx; an empty one is no use as `fill_tx_hash`.
30370
- txHash: v__namespace.pipe(v__namespace.string(), v__namespace.nonEmpty()),
30371
- // Terminality. An intent created with `allowPartialFill` emits a fill event per fill, so the
30372
- // event alone does not mean the intent is done — only `remainingInput === '0'` does. Required:
30373
- // without it there is no proof of completion, and claiming SOLVED on a partial fill would report
30374
- // an unfinished swap as complete.
30375
- intentState: v__namespace.object({
30376
- remainingInput: v__namespace.string()
30377
- })
30378
- });
30379
- var IntentResponseSchema = v__namespace.object({
30380
- intentHash: v__namespace.string(),
30381
- txHash: v__namespace.string(),
30382
- logIndex: v__namespace.number(),
30383
- chainId: v__namespace.number(),
30384
- blockNumber: v__namespace.number(),
30385
- open: v__namespace.boolean(),
30386
- intent: IntentStructSchema,
30387
- events: v__namespace.array(v__namespace.unknown())
30388
- });
30389
- var UserIntentsResponseSchema = v__namespace.object({
30390
- total: v__namespace.number(),
30391
- offset: v__namespace.number(),
30392
- limit: v__namespace.number(),
30393
- items: v__namespace.array(IntentResponseSchema)
30394
- });
30395
- var OrderbookResponseSchema = v__namespace.object({
30396
- total: v__namespace.number(),
30397
- data: v__namespace.array(
30398
- v__namespace.object({
30399
- intentState: v__namespace.object({
30400
- exists: v__namespace.boolean(),
30401
- remainingInput: v__namespace.string(),
30402
- receivedOutput: v__namespace.string(),
30403
- pendingPayment: v__namespace.boolean()
30404
- }),
30405
- intentData: v__namespace.object({
30406
- intentId: v__namespace.string(),
30407
- creator: v__namespace.string(),
30408
- inputToken: v__namespace.string(),
30409
- outputToken: v__namespace.string(),
30410
- inputAmount: v__namespace.string(),
30411
- minOutputAmount: v__namespace.string(),
30412
- deadline: v__namespace.string(),
30413
- allowPartialFill: v__namespace.boolean(),
30414
- srcChain: v__namespace.number(),
30415
- dstChain: v__namespace.number(),
30416
- srcAddress: v__namespace.string(),
30417
- dstAddress: v__namespace.string(),
30418
- solver: v__namespace.string(),
30419
- data: v__namespace.string(),
30420
- intentHash: v__namespace.string(),
30421
- txHash: v__namespace.string(),
30422
- blockNumber: v__namespace.number()
30423
- })
30424
- })
30425
- )
30426
- });
30427
- var MoneyMarketPositionSchema = v__namespace.object({
30428
- userAddress: v__namespace.string(),
30429
- positions: v__namespace.array(
30430
- v__namespace.object({
30431
- reserveAddress: v__namespace.string(),
30432
- aTokenAddress: v__namespace.string(),
30433
- variableDebtTokenAddress: v__namespace.string(),
30434
- aTokenBalance: v__namespace.string(),
30435
- variableDebtTokenBalance: v__namespace.string(),
30436
- blockNumber: v__namespace.number()
30437
- })
30438
- )
30439
- });
30440
- var MoneyMarketAssetSchema = v__namespace.object({
30441
- reserveAddress: v__namespace.string(),
30442
- aTokenAddress: v__namespace.string(),
30443
- totalATokenBalance: v__namespace.string(),
30444
- variableDebtTokenAddress: v__namespace.string(),
30445
- totalVariableDebtTokenBalance: v__namespace.string(),
30446
- liquidityRate: v__namespace.string(),
30447
- symbol: v__namespace.string(),
30448
- totalSuppliers: v__namespace.number(),
30449
- totalBorrowers: v__namespace.number(),
30450
- variableBorrowRate: v__namespace.string(),
30451
- stableBorrowRate: v__namespace.string(),
30452
- liquidityIndex: v__namespace.string(),
30453
- variableBorrowIndex: v__namespace.string(),
30454
- blockNumber: v__namespace.number()
30455
- });
30456
- var MoneyMarketAssetsSchema = v__namespace.array(MoneyMarketAssetSchema);
30457
- var MoneyMarketAssetBorrowersSchema = v__namespace.object({
30458
- borrowers: v__namespace.array(v__namespace.string()),
30459
- total: v__namespace.number(),
30460
- offset: v__namespace.number(),
30461
- limit: v__namespace.number()
30462
- });
30463
- var MoneyMarketAssetSuppliersSchema = v__namespace.object({
30464
- suppliers: v__namespace.array(v__namespace.string()),
30465
- total: v__namespace.number(),
30466
- offset: v__namespace.number(),
30467
- limit: v__namespace.number()
30468
- });
30469
- var MoneyMarketBorrowersSchema = v__namespace.object({
30470
- borrowers: v__namespace.array(v__namespace.string()),
30471
- total: v__namespace.number(),
30472
- offset: v__namespace.number(),
30473
- limit: v__namespace.number()
30474
- });
30475
- var GetChainsResponseSchema = v__namespace.array(SpokeChainKeySchema);
30476
- var TokensByChainMapSchema = v__namespace.custom(
30477
- (input) => typeof input === "object" && input !== null && Object.values(input).every((tokens) => Array.isArray(tokens) && tokens.every((t) => v__namespace.is(XTokenSchema, t)))
30478
- );
30479
- var TokensListSchema = v__namespace.array(XTokenSchema);
30480
- var ReserveAssetsSchema = v__namespace.array(AddressSchema);
30481
- var ORACLE_CANDLE_INTERVALS = ["1m", "5m", "1h", "1d"];
30482
- var OracleCandleIntervalSchema = v__namespace.picklist(ORACLE_CANDLE_INTERVALS);
30483
- var OracleMarketsResponseSchema = v__namespace.object({
30484
- quote: v__namespace.string(),
30485
- intervals: v__namespace.array(
30486
- v__namespace.object({
30487
- key: v__namespace.string(),
30488
- label: v__namespace.string(),
30489
- seconds: v__namespace.number()
30490
- })
30491
- ),
30492
- symbols: v__namespace.array(v__namespace.string())
30493
- });
30494
- var OracleCandlesResponseSchema = v__namespace.object({
30495
- symbol: v__namespace.string(),
30496
- quote: v__namespace.string(),
30497
- interval: OracleCandleIntervalSchema,
30498
- candles: v__namespace.array(
30499
- v__namespace.object({
30500
- timestamp: v__namespace.number(),
30501
- open: v__namespace.string(),
30502
- high: v__namespace.string(),
30503
- low: v__namespace.string(),
30504
- close: v__namespace.string(),
30505
- final: v__namespace.optional(v__namespace.boolean())
30506
- })
30507
- )
30508
- });
30509
-
30510
- // src/backendApi/guards.ts
30511
- var isFillEvent = (value) => v__namespace.is(FillEventSchema, value);
30512
- var isOracleCandleInterval = (value) => v__namespace.is(OracleCandleIntervalSchema, value);
30513
32355
  function decodePacketIntentTarget(payload) {
30514
32356
  try {
30515
32357
  const hex = payload.startsWith("0x") ? payload.slice(2) : payload;
@@ -30529,6 +32371,11 @@ function selectSolvedIntentPacket(packets, intentsContract) {
30529
32371
  return packets.reduce((highest, packet) => packet.conn_sn > highest.conn_sn ? packet : highest);
30530
32372
  }
30531
32373
 
32374
+ // src/swap/intentDepositSpender.ts
32375
+ function intentDepositSpender(config, srcChainKey) {
32376
+ return isHubChainKeyType(srcChainKey) ? config.solver.intentsContract : config.getChainConfig(srcChainKey).addresses.assetManager;
32377
+ }
32378
+
30532
32379
  // src/swap/speed-tier.ts
30533
32380
  var SPEED_TIER_SECONDS = {
30534
32381
  /** Either token's vault is a money-market-reserve (sodaAsset). */
@@ -30556,6 +32403,25 @@ function estimateSwapSpeedTier({ srcToken, dstToken }, isSodaAssetRelated) {
30556
32403
  }
30557
32404
  return { tier: secondsToTier(estimatedSeconds), estimatedSeconds };
30558
32405
  }
32406
+ function summarizeSwapStatus(status) {
32407
+ if (status.source === "backend") {
32408
+ const { status: backendStatus, result } = status.data;
32409
+ return {
32410
+ state: backendStatus === "solved" || backendStatus === "failed" ? backendStatus : "pending",
32411
+ hubTxHash: asHex(result?.dstIntentTxHash),
32412
+ fillTxHash: asHex(result?.fillTxHash)
32413
+ };
32414
+ }
32415
+ const { status: solverStatus, fill_tx_hash } = status.data;
32416
+ return {
32417
+ state: solverStatus === exports.SolverIntentStatusCode.SOLVED ? "solved" : solverStatus === exports.SolverIntentStatusCode.FAILED ? "failed" : "pending",
32418
+ hubTxHash: status.dstTxHash,
32419
+ fillTxHash: asHex(fill_tx_hash)
32420
+ };
32421
+ }
32422
+ function asHex(value) {
32423
+ return value && viem.isHex(value) ? value : void 0;
32424
+ }
30559
32425
 
30560
32426
  // src/swap/errors.ts
30561
32427
  var swapInvariant = createInvariant("swap");
@@ -30579,6 +32445,9 @@ var SWAP_ERROR_CODES = /* @__PURE__ */ new Set([
30579
32445
  var isSwapCreateIntentError = isCodeMember(CREATE_INTENT_CODES);
30580
32446
  var isPostExecutionError = isCodeMember(POST_EXECUTION_ERROR_CODES);
30581
32447
  var isSwapError = isCodeMember(SWAP_ERROR_CODES);
32448
+ var isSwapWithApprovalError = isCodeMember(
32449
+ /* @__PURE__ */ new Set([...SWAP_ERROR_CODES, "APPROVE_FAILED", "ALLOWANCE_CHECK_FAILED"])
32450
+ );
30582
32451
 
30583
32452
  // src/swap/SwapService.ts
30584
32453
  var RECONCILE_TIMEOUT_MS = 5e3;
@@ -30593,13 +32462,14 @@ var SwapService = class {
30593
32462
  relayerApiEndpoint;
30594
32463
  // backend swaps-API client
30595
32464
  backendApi;
32465
+ useBackendSubmitTxOverride;
30596
32466
  /**
30597
32467
  * Effective 2-step submit-tx flow (`swaps.useBackendSubmitTx`, default on). Read live off
30598
32468
  * `ConfigService`, like {@link SwapService.partnerFee}, so the config object and the behavior can
30599
- * never disagree.
32469
+ * never disagree — unless a direct constructor caller passed the deprecated override.
30600
32470
  */
30601
32471
  get useBackendSubmitTx() {
30602
- return this.config.swapUseBackendSubmitTx;
32472
+ return this.useBackendSubmitTxOverride ?? this.config.swapUseBackendSubmitTx;
30603
32473
  }
30604
32474
  /**
30605
32475
  * Effective swap partner fee (`swaps.partnerFee`, else the global `fee`). Read live off
@@ -30610,13 +32480,14 @@ var SwapService = class {
30610
32480
  get partnerFee() {
30611
32481
  return this.config.swapPartnerFee;
30612
32482
  }
30613
- constructor({ config, hubProvider, spoke, backendApi }) {
32483
+ constructor({ config, hubProvider, spoke, backendApi, useBackendSubmitTx }) {
30614
32484
  this.solver = config.solver;
30615
32485
  this.relayerApiEndpoint = config.relay.relayerApiEndpoint;
30616
32486
  this.config = config;
30617
32487
  this.hubProvider = hubProvider;
30618
32488
  this.spoke = spoke;
30619
32489
  this.backendApi = backendApi;
32490
+ this.useBackendSubmitTxOverride = useBackendSubmitTx;
30620
32491
  }
30621
32492
  /**
30622
32493
  * Estimates the gas cost for a raw (unsigned) transaction on a spoke chain.
@@ -30703,10 +32574,14 @@ var SwapService = class {
30703
32574
  * polled and passes {@link DETAILED_STATUS_SOLVER_TIMEOUT_MS}. Both go through here so the
30704
32575
  * durable-intent reconcile below is written once.
30705
32576
  *
30706
- * `timeoutMs` bounds the solver request alone. The reconcile that a failed or NOT_FOUND solver read
30707
- * falls through to carries its own {@link RECONCILE_TIMEOUT_MS}, so a bounded call can cost both.
32577
+ * `timeoutMs` bounds the solver request alone. The reconcile that a non-final solver read falls
32578
+ * through to carries its own {@link RECONCILE_TIMEOUT_MS}, so a bounded call can cost both.
32579
+ *
32580
+ * `reconcileNonFinal` is for `getDetailedStatus` alone: it reconciles an in-flight answer as well as
32581
+ * a `NOT_FOUND`, and reads a journal cancel as `FAILED`. The solver can keep reporting a cancelled
32582
+ * intent in flight, and nothing else ends that poll. `getStatus` leaves it off and keeps its answers.
30708
32583
  */
30709
- async resolveSolverStatus(request, timeoutMs) {
32584
+ async resolveSolverStatus(request, { timeoutMs, reconcileNonFinal = false } = {}) {
30710
32585
  const solverResult = await SolverApiService.getStatus(
30711
32586
  request,
30712
32587
  this.solver,
@@ -30714,12 +32589,20 @@ var SwapService = class {
30714
32589
  timeoutMs,
30715
32590
  this.config.apiKey
30716
32591
  );
30717
- const forgotten = !solverResult.ok || solverResult.value.status === exports.SolverIntentStatusCode.NOT_FOUND;
30718
- if (!forgotten) return solverResult;
32592
+ const status = solverResult.ok ? solverResult.value.status : void 0;
32593
+ if (status === exports.SolverIntentStatusCode.SOLVED || status === exports.SolverIntentStatusCode.FAILED) return solverResult;
32594
+ const forgotten = !solverResult.ok || status === exports.SolverIntentStatusCode.NOT_FOUND;
32595
+ if (!forgotten && !reconcileNonFinal) return solverResult;
30719
32596
  const timeout = Math.min(RECONCILE_TIMEOUT_MS, this.backendApi.requestTimeoutMs);
30720
32597
  const intent = await this.backendApi.getIntentByTxHash(request.intent_tx_hash, { timeout });
30721
- const settled = intent.ok ? intent.value.events.filter(isFillEvent).find((fill) => fill.intentState.remainingInput === "0") : void 0;
30722
- if (settled) return { ok: true, value: { status: exports.SolverIntentStatusCode.SOLVED, fill_tx_hash: settled.txHash } };
32598
+ const outcome = intent.ok ? readIntentJournalOutcome(intent.value) : void 0;
32599
+ if (outcome?.kind === "solved") {
32600
+ return { ok: true, value: { status: exports.SolverIntentStatusCode.SOLVED, fill_tx_hash: outcome.fillTxHash } };
32601
+ }
32602
+ if (outcome?.kind === "cancelled" && reconcileNonFinal) {
32603
+ return { ok: true, value: { status: exports.SolverIntentStatusCode.FAILED } };
32604
+ }
32605
+ if (!forgotten) return solverResult;
30723
32606
  const backendAnswered = intent.ok || isSodaxError(intent.error) && intent.error.context?.status === 404;
30724
32607
  if (solverResult.ok && !backendAnswered) {
30725
32608
  return {
@@ -30737,9 +32620,14 @@ var SwapService = class {
30737
32620
  /**
30738
32621
  * Reads a swap's status from its source-chain transaction — the identifier a caller always holds.
30739
32622
  *
30740
- * **Routes; does not translate.** Returns the backend submit-tx record while it is in play,
30741
- * otherwise the solver's answer via the hub tx hash resolved from the relay packet. The result is
30742
- * tagged with `source` (discriminate on it) and carries that source's payload unmodified.
32623
+ * **Routes; defines no status of its own.** Returns the backend submit-tx record while it is in
32624
+ * play, otherwise the solver's answer via the hub tx hash resolved from the relay packet. The result
32625
+ * is tagged with `source` (discriminate on it).
32626
+ *
32627
+ * The solver arm is reconciled against the backend's durable intent record: a settling fill reads
32628
+ * `SOLVED`, and a cancel with nothing filled reads `FAILED` even while the solver still reports the
32629
+ * intent in flight. A cancelled intent is already refunded, so do not offer to cancel it again.
32630
+ * Otherwise it carries the solver's answer unmodified, and the backend arm its record unmodified.
30743
32631
  *
30744
32632
  * **Any** unusable backend response routes to the solver — a 404, a transport or server error, or
30745
32633
  * a record the backend gave up on. See `docs/SWAPS.md` § Get Detailed Status for why.
@@ -30773,7 +32661,7 @@ var SwapService = class {
30773
32661
  if (!dstTxHash.ok) return dstTxHash;
30774
32662
  const solver = await this.resolveSolverStatus(
30775
32663
  { intent_tx_hash: dstTxHash.value },
30776
- DETAILED_STATUS_SOLVER_TIMEOUT_MS
32664
+ { timeoutMs: DETAILED_STATUS_SOLVER_TIMEOUT_MS, reconcileNonFinal: true }
30777
32665
  );
30778
32666
  if (!solver.ok) {
30779
32667
  return { ok: false, error: this.detailedStatusLookupFailed(solver.error, params.srcChainKey) };
@@ -30943,19 +32831,7 @@ var SwapService = class {
30943
32831
  if (!createIntentResult.ok) {
30944
32832
  return { ok: false, error: createIntentResult.error };
30945
32833
  }
30946
- const created = createIntentResult.value;
30947
- const timeoutMs = resolveTimeoutMs(_params.timeout, DEFAULT_RELAY_TX_TIMEOUT);
30948
- if (this.useBackendSubmitTx) {
30949
- const submitted = await this.submitTx(_params, created, createSubmitTxAttempt(timeoutMs));
30950
- if (submitted.ok) return submitted;
30951
- this.config.logger.warn(
30952
- "[swap] backend submit-tx did not complete; falling back to the client-side relay",
30953
- {
30954
- error: submitted.error
30955
- }
30956
- );
30957
- }
30958
- return this.fallbackSwapSteps(_params, created, timeoutMs);
32834
+ return await this.completeSwap(_params, createIntentResult.value);
30959
32835
  } catch (error) {
30960
32836
  if (isSwapError(error)) return { ok: false, error };
30961
32837
  return {
@@ -30981,6 +32857,262 @@ var SwapService = class {
30981
32857
  }
30982
32858
  );
30983
32859
  }
32860
+ /**
32861
+ * Which approval path {@link swapWithApproval} would take for these params, so a UI can say up front
32862
+ * whether the swap costs one signature or two. Read-only; sends nothing.
32863
+ *
32864
+ * `'atomic-batch'` needs an EVM spoke source and a wallet that reports EIP-5792 atomic support for
32865
+ * that chain — `'supported'`, or `'ready'` (the wallet asks the user to upgrade the account on the
32866
+ * first batch; pass `allowAccountUpgrade: false` to treat such a wallet as unable to batch). The Sonic
32867
+ * hub, a Stellar source that needs a trustline, and wallets without batch support get `'sequential'`;
32868
+ * other non-EVM sources have no allowance and get `'not-required'`.
32869
+ *
32870
+ * @returns `ALLOWANCE_CHECK_FAILED` when the allowance read fails; otherwise the strategy.
32871
+ */
32872
+ async getApprovalStrategy(_params) {
32873
+ const { params, walletProvider, allowAccountUpgrade = true } = _params;
32874
+ const srcChainKey = params.srcChainKey;
32875
+ const allowance = await this.isAllowanceValid(_params);
32876
+ if (!allowance.ok) {
32877
+ return {
32878
+ ok: false,
32879
+ error: allowanceCheckFailed("swap", allowance.error, {
32880
+ srcChainKey,
32881
+ dstChainKey: params.dstChainKey,
32882
+ action: "swapWithApproval"
32883
+ })
32884
+ };
32885
+ }
32886
+ if (allowance.value) return { ok: true, value: "not-required" };
32887
+ return { ok: true, value: await resolveApprovalStrategy({ srcChainKey, walletProvider, allowAccountUpgrade }) };
32888
+ }
32889
+ /**
32890
+ * {@link swap} with the source-token approval folded in. Picks a path with
32891
+ * {@link getApprovalStrategy}: no approval when the allowance already suffices; on an EIP-5792
32892
+ * wallet, approve and the swap transaction as **one atomic batch — one signature**; otherwise
32893
+ * approve, wait for it to confirm, then the swap transaction. Completion (backend submit-tx with
32894
+ * the client-side relay fallback) is exactly `swap()`'s.
32895
+ *
32896
+ * A wallet that refuses the batch before signing anything (e.g. EIP-5792 5760, atomicity not
32897
+ * supported) falls back to the two-step path. A batch the user saw is never retried as separate
32898
+ * transactions:
32899
+ * - rejected → `USER_REJECTED`; a declined account upgrade (5750) adds `context.reason:`
32900
+ * {@link ACCOUNT_UPGRADE_DECLINED}, after which `allowAccountUpgrade: false` swaps without one;
32901
+ * - never included or fully reverted (EIP-5792 400 / 500) → `INTENT_CREATION_FAILED` with
32902
+ * `context.reason: 'atomic-batch-failed'`;
32903
+ * - anything else short of a confirmed deposit receipt (not confirmed within `timeout`, a partial
32904
+ * revert, receipts that do not identify the deposit) → `TX_VERIFICATION_FAILED` with
32905
+ * `context.reason:` {@link ATOMIC_BATCH_UNCONFIRMED}, `context.batchId` and `context.callCount`. It may
32906
+ * have landed — do not send it again; call again with `resumeBatchId` and `resumeBatchCallCount` to
32907
+ * finish it once it does.
32908
+ *
32909
+ * @returns A `Result<SwapWithApprovalResponse, SwapWithApprovalError>` — `swap()`'s response plus the
32910
+ * `approvalStrategy` that ran. Errors are `swap()`'s codes plus `APPROVE_FAILED` and
32911
+ * `ALLOWANCE_CHECK_FAILED`.
32912
+ */
32913
+ async swapWithApproval(_params) {
32914
+ const { params } = _params;
32915
+ const srcChainKey = params.srcChainKey;
32916
+ const baseCtx = { srcChainKey, dstChainKey: params.dstChainKey, action: "swapWithApproval" };
32917
+ return this.config.analytics.trackResult(
32918
+ "swap",
32919
+ "swapWithApproval",
32920
+ async () => {
32921
+ try {
32922
+ if (_params.resumeBatchId !== void 0) return await this.resumeAtomicBatch(_params, _params.resumeBatchId);
32923
+ const strategy = await this.getApprovalStrategy(_params);
32924
+ if (!strategy.ok) return strategy;
32925
+ const { result: created, approvalStrategy } = await runWithApproval({
32926
+ strategy: strategy.value,
32927
+ notRequired: () => this.createIntent(_params),
32928
+ atomicBatch: () => this.createIntentInAtomicBatch(_params),
32929
+ sequential: (afterRefusedBatch) => this.approveThenCreateIntent(_params, afterRefusedBatch),
32930
+ onBatchRefused: (error) => this.config.logger.warn("[swapWithApproval] wallet refused the atomic batch; approving separately", {
32931
+ error
32932
+ })
32933
+ });
32934
+ if (!created.ok) return created;
32935
+ const completed = await this.completeSwap(_params, created.value);
32936
+ if (!completed.ok) return completed;
32937
+ return { ok: true, value: { ...completed.value, approvalStrategy } };
32938
+ } catch (error) {
32939
+ if (isSwapWithApprovalError(error)) return { ok: false, error };
32940
+ return { ok: false, error: unknownFailed("swap", error, baseCtx) };
32941
+ }
32942
+ },
32943
+ {
32944
+ start: () => ({
32945
+ srcChainKey,
32946
+ dstChainKey: params.dstChainKey,
32947
+ srcAddress: params.srcAddress,
32948
+ dstAddress: params.dstAddress
32949
+ }),
32950
+ success: (value) => ({
32951
+ srcChainKey,
32952
+ dstChainKey: params.dstChainKey,
32953
+ srcTxHash: value.intentDeliveryInfo.srcTxHash,
32954
+ dstTxHash: value.intentDeliveryInfo.dstTxHash,
32955
+ approvalStrategy: value.approvalStrategy
32956
+ }),
32957
+ failure: (error) => ({ code: error.code })
32958
+ }
32959
+ );
32960
+ }
32961
+ /**
32962
+ * Approve + deposit as one EIP-5792 atomic batch, in broadcast order (`[reset?, approve, deposit]`),
32963
+ * then hand back the batch's transaction hash as the intent tx, for {@link completeSwap}.
32964
+ */
32965
+ async createIntentInAtomicBatch(_params) {
32966
+ const { params, walletProvider, extras, skipSimulation } = _params;
32967
+ const srcChainKey = params.srcChainKey;
32968
+ swapInvariant(
32969
+ isEvmSpokeOnlyChainKeyType(srcChainKey) && isEvmWalletProviderType(walletProvider),
32970
+ "Atomic batches need an EVM spoke source and an EVM wallet provider"
32971
+ );
32972
+ swapInvariant(canSendAtomicBatch(walletProvider), "Wallet provider does not implement EIP-5792 batches");
32973
+ const ctx = {
32974
+ srcChainKey,
32975
+ dstChainKey: params.dstChainKey,
32976
+ action: "swapWithApproval",
32977
+ approvalStrategy: "atomic-batch"
32978
+ };
32979
+ const [approval, created] = await Promise.all([
32980
+ this.buildApproveTxs({ params, raw: true }),
32981
+ this.createIntent({ params, extras, skipSimulation, raw: true })
32982
+ ]);
32983
+ if (!approval.ok) {
32984
+ return {
32985
+ ok: false,
32986
+ error: isSwapWithApprovalError(approval.error) ? withErrorContext(approval.error, ctx) : approveFailed("swap", approval.error, ctx)
32987
+ };
32988
+ }
32989
+ if (!created.ok) return created;
32990
+ const { resetTx, approveTx } = approval.value;
32991
+ const depositTx = created.value.tx;
32992
+ const txs = resetTx ? [resetTx, approveTx, depositTx] : [approveTx, depositTx];
32993
+ const sent = await sendApprovalBatch({
32994
+ walletProvider,
32995
+ srcChainKey,
32996
+ txs,
32997
+ timeoutMs: approvalBatchWaitMs(_params.timeout),
32998
+ feature: "swap",
32999
+ context: ctx
33000
+ });
33001
+ if (!sent.ok) return sent;
33002
+ return {
33003
+ ok: true,
33004
+ value: {
33005
+ tx: sent.value.txHash,
33006
+ intent: created.value.intent,
33007
+ relayData: created.value.relayData
33008
+ }
33009
+ };
33010
+ }
33011
+ /**
33012
+ * Finishes a batch an earlier call left {@link ATOMIC_BATCH_UNCONFIRMED}, without sending anything to
33013
+ * the wallet: waits for it again, relays its deposit client-side and notifies the solver. The
33014
+ * original intent went with that call, so it is read back from the hub tx the relay delivers.
33015
+ */
33016
+ async resumeAtomicBatch(_params, batchId) {
33017
+ const { params, walletProvider } = _params;
33018
+ const srcChainKey = params.srcChainKey;
33019
+ swapInvariant(
33020
+ isEvmSpokeOnlyChainKeyType(srcChainKey) && isEvmWalletProviderType(walletProvider) && canSendAtomicBatch(walletProvider),
33021
+ "Resuming an atomic batch needs an EVM spoke source and an EIP-5792 wallet provider"
33022
+ );
33023
+ const ctx = {
33024
+ srcChainKey,
33025
+ dstChainKey: params.dstChainKey,
33026
+ action: "swapWithApproval",
33027
+ approvalStrategy: "atomic-batch"
33028
+ };
33029
+ const timeoutMs = approvalBatchWaitMs(_params.timeout);
33030
+ const deposit = await confirmApprovalBatch({
33031
+ walletProvider,
33032
+ batchId,
33033
+ callCount: _params.resumeBatchCallCount,
33034
+ timeoutMs,
33035
+ feature: "swap",
33036
+ context: ctx
33037
+ });
33038
+ if (!deposit.ok) return deposit;
33039
+ const srcTxHash = deposit.value.txHash;
33040
+ const txCtx = { ...ctx, srcTxHash };
33041
+ const packet = await relayTxAndWaitPacket({
33042
+ srcTxHash,
33043
+ chainKey: srcChainKey,
33044
+ relayerApiEndpoint: this.relayerApiEndpoint,
33045
+ timeout: Math.max(timeoutMs, RELAY_FALLBACK_FLOOR_MS)
33046
+ });
33047
+ if (!packet.ok) return { ok: false, error: mapRelayFailure(packet.error, { feature: "swap", ...txCtx }) };
33048
+ const dstTxHash = packet.value.dst_tx_hash;
33049
+ const intent = await this.getIntent(dstTxHash);
33050
+ if (!intent.ok) return { ok: false, error: unknownFailed("swap", intent.error, txCtx) };
33051
+ const solved = await this.postExecution({ intent_tx_hash: dstTxHash });
33052
+ if (!solved.ok) return { ok: false, error: withErrorContext(solved.error, { srcChainKey, srcTxHash, dstTxHash }) };
33053
+ return {
33054
+ ok: true,
33055
+ value: {
33056
+ solverExecutionResponse: solved.value,
33057
+ intent: intent.value,
33058
+ intentDeliveryInfo: {
33059
+ srcChainKey,
33060
+ srcTxHash,
33061
+ srcAddress: params.srcAddress,
33062
+ dstChainKey: params.dstChainKey,
33063
+ dstTxHash,
33064
+ dstAddress: params.dstAddress
33065
+ },
33066
+ approvalStrategy: "atomic-batch"
33067
+ }
33068
+ };
33069
+ }
33070
+ /** Approve, wait for the approval to confirm, then create the intent — two or more signatures. */
33071
+ async approveThenCreateIntent(_params, validated = false) {
33072
+ const { params, extras, skipSimulation } = _params;
33073
+ const ctx = {
33074
+ srcChainKey: params.srcChainKey,
33075
+ dstChainKey: params.dstChainKey,
33076
+ action: "swapWithApproval",
33077
+ approvalStrategy: "sequential"
33078
+ };
33079
+ if (!validated) {
33080
+ const preflight = await this.createIntent({ params, extras, skipSimulation, raw: true });
33081
+ if (!preflight.ok) return preflight;
33082
+ }
33083
+ const approved = await this.approve(_params);
33084
+ if (!approved.ok) {
33085
+ return {
33086
+ ok: false,
33087
+ error: isSwapWithApprovalError(approved.error) ? withErrorContext(approved.error, ctx) : approveFailed("swap", approved.error, ctx)
33088
+ };
33089
+ }
33090
+ const confirmed = await confirmApproval({
33091
+ waitForTxReceipt: (receiptParams) => this.spoke.waitForTxReceipt(receiptParams),
33092
+ txHash: approved.value,
33093
+ chainKey: params.srcChainKey,
33094
+ feature: "swap",
33095
+ context: ctx
33096
+ });
33097
+ if (!confirmed.ok) return confirmed;
33098
+ return this.createIntent(_params);
33099
+ }
33100
+ /**
33101
+ * Completes a swap whose intent tx is already broadcast: the backend 2-step attempt when
33102
+ * `useBackendSubmitTx` is on, falling back to {@link fallbackSwapSteps} on any non-success.
33103
+ * Shared by `swap()` and `swapWithApproval()`, which differ only in how the intent tx is created.
33104
+ */
33105
+ async completeSwap(_params, created) {
33106
+ const timeoutMs = resolveTimeoutMs(_params.timeout, DEFAULT_RELAY_TX_TIMEOUT);
33107
+ if (this.useBackendSubmitTx) {
33108
+ const submitted = await this.submitTx(_params, created, createSubmitTxAttempt(timeoutMs));
33109
+ if (submitted.ok) return submitted;
33110
+ this.config.logger.warn("[swap] backend submit-tx did not complete; falling back to the client-side relay", {
33111
+ error: submitted.error
33112
+ });
33113
+ }
33114
+ return this.fallbackSwapSteps(_params, created, timeoutMs);
33115
+ }
30984
33116
  /**
30985
33117
  * Client-side swap completion (opt-out via `swaps.useBackendSubmitTx: false`): verify the broadcast intent
30986
33118
  * tx landed, then relay it to the hub — or use it directly when the source IS the hub — then notify the
@@ -30994,14 +33126,14 @@ var SwapService = class {
30994
33126
  async fallbackSwapSteps(_params, created, timeoutMs) {
30995
33127
  const { params } = _params;
30996
33128
  const srcChainKey = params.srcChainKey;
30997
- const baseCtx = { srcChainKey, dstChainKey: params.dstChainKey };
30998
33129
  const { tx: spokeTxHash, intent, relayData } = created;
33130
+ const txCtx = { srcChainKey, dstChainKey: params.dstChainKey, action: "swap", srcTxHash: spokeTxHash };
30999
33131
  const verifyTxHashResult = await this.spoke.verifyTxHash({
31000
33132
  txHash: created.tx,
31001
33133
  chainKey: srcChainKey
31002
33134
  });
31003
33135
  if (!verifyTxHashResult.ok) {
31004
- return { ok: false, error: verifyFailed("swap", verifyTxHashResult.error, { ...baseCtx, action: "swap" }) };
33136
+ return { ok: false, error: verifyFailed("swap", verifyTxHashResult.error, txCtx) };
31005
33137
  }
31006
33138
  let dstIntentTxHash;
31007
33139
  if (isHubChainKeyType(srcChainKey)) {
@@ -31020,7 +33152,7 @@ var SwapService = class {
31020
33152
  timeout: Math.max(timeoutMs, RELAY_FALLBACK_FLOOR_MS)
31021
33153
  });
31022
33154
  if (!packet.ok) {
31023
- return { ok: false, error: mapRelayFailure(packet.error, { feature: "swap", action: "swap", ...baseCtx }) };
33155
+ return { ok: false, error: mapRelayFailure(packet.error, { feature: "swap", ...txCtx }) };
31024
33156
  }
31025
33157
  dstIntentTxHash = packet.value.dst_tx_hash;
31026
33158
  }
@@ -31028,7 +33160,14 @@ var SwapService = class {
31028
33160
  intent_tx_hash: dstIntentTxHash
31029
33161
  });
31030
33162
  if (!postExecResult.ok) {
31031
- return { ok: false, error: postExecResult.error };
33163
+ return {
33164
+ ok: false,
33165
+ error: withErrorContext(postExecResult.error, {
33166
+ srcChainKey,
33167
+ srcTxHash: spokeTxHash,
33168
+ dstTxHash: dstIntentTxHash
33169
+ })
33170
+ };
31032
33171
  }
31033
33172
  return {
31034
33173
  ok: true,
@@ -31134,7 +33273,7 @@ var SwapService = class {
31134
33273
  token: params.inputToken,
31135
33274
  amount: params.inputAmount,
31136
33275
  owner: params.srcAddress,
31137
- spender: this.solver.intentsContract
33276
+ spender: intentDepositSpender(this.config, srcChainKey)
31138
33277
  });
31139
33278
  }
31140
33279
  if (isEvmSpokeOnlyChainKeyType(srcChainKey)) {
@@ -31143,7 +33282,7 @@ var SwapService = class {
31143
33282
  token: params.inputToken,
31144
33283
  amount: params.inputAmount,
31145
33284
  owner: params.srcAddress,
31146
- spender: this.config.getChainConfig(srcChainKey).addresses.assetManager
33285
+ spender: intentDepositSpender(this.config, srcChainKey)
31147
33286
  });
31148
33287
  }
31149
33288
  if (isStellarChainKeyType(srcChainKey)) {
@@ -31187,7 +33326,7 @@ var SwapService = class {
31187
33326
  isOptionalEvmWalletProviderType(_params.walletProvider),
31188
33327
  "Invalid wallet provider. Expected Evm wallet provider."
31189
33328
  );
31190
- const spender = isHubChainKeyType(params.srcChainKey) ? this.solver.intentsContract : this.config.getChainConfig(params.srcChainKey).addresses.assetManager;
33329
+ const spender = intentDepositSpender(this.config, params.srcChainKey);
31191
33330
  const coreParams = {
31192
33331
  srcChainKey: params.srcChainKey,
31193
33332
  owner: params.srcAddress,
@@ -31258,7 +33397,7 @@ var SwapService = class {
31258
33397
  const wrapApproveFailure = (cause) => approveFailed("swap", cause);
31259
33398
  try {
31260
33399
  if (isHubChainKeyType(params.srcChainKey) || isEvmSpokeOnlyChainKeyType(params.srcChainKey)) {
31261
- const spender = isHubChainKeyType(params.srcChainKey) ? this.solver.intentsContract : this.config.getChainConfig(params.srcChainKey).addresses.assetManager;
33400
+ const spender = intentDepositSpender(this.config, params.srcChainKey);
31262
33401
  const result = await this.spoke.buildApproveTxs({
31263
33402
  srcChainKey: params.srcChainKey,
31264
33403
  owner: params.srcAddress,
@@ -35751,6 +37890,9 @@ var BRIDGE_CODES = /* @__PURE__ */ new Set([
35751
37890
  "UNKNOWN"
35752
37891
  ]);
35753
37892
  var isBridgeOrchestrationError = isCodeMember(ORCHESTRATION_CODES);
37893
+ var isBridgeWithApprovalError = isCodeMember(
37894
+ /* @__PURE__ */ new Set([...ORCHESTRATION_CODES, "APPROVE_FAILED", "ALLOWANCE_CHECK_FAILED"])
37895
+ );
35754
37896
  var isBridgeCreateIntentError = isCodeMember(CREATE_INTENT_CODES);
35755
37897
  var isBridgeApproveError = isCodeMember(APPROVE_CODES);
35756
37898
  var isBridgeAllowanceCheckError = isCodeMember(ALLOWANCE_CHECK_CODES);
@@ -36055,16 +38197,7 @@ var BridgeService = class {
36055
38197
  try {
36056
38198
  const created = await this.createBridgeIntent(_params);
36057
38199
  if (!created.ok) return { ok: false, error: created.error };
36058
- const timeoutMs = resolveTimeoutMs(_params.timeout, DEFAULT_RELAY_TX_TIMEOUT);
36059
- if (this.useBackendSubmitTx) {
36060
- const submitted = await this.submitTx(_params, created.value, createSubmitTxAttempt(timeoutMs));
36061
- if (submitted.ok) return submitted;
36062
- this.config.logger.warn(
36063
- "[bridge] backend submit-tx did not complete; falling back to the client-side relay",
36064
- { error: submitted.error }
36065
- );
36066
- }
36067
- return this.fallbackBridgeSteps(_params, created.value, timeoutMs);
38200
+ return await this.completeBridge(_params, created.value);
36068
38201
  } catch (error) {
36069
38202
  if (isBridgeOrchestrationError(error)) return { ok: false, error };
36070
38203
  return {
@@ -36091,6 +38224,229 @@ var BridgeService = class {
36091
38224
  }
36092
38225
  );
36093
38226
  }
38227
+ /**
38228
+ * Which approval path {@link bridgeWithApproval} would take for these params, so a UI can say up
38229
+ * front whether the bridge costs one signature or two. Read-only; sends nothing.
38230
+ *
38231
+ * `'atomic-batch'` needs an EVM spoke source and a wallet that reports EIP-5792 atomic support for
38232
+ * that chain (`'supported'`, or `'ready'` unless `allowAccountUpgrade: false`). The Sonic hub,
38233
+ * Stellar and wallets without batch support get `'sequential'`; other non-EVM sources have no
38234
+ * allowance and get `'not-required'`.
38235
+ *
38236
+ * @returns `isAllowanceValid`'s error — `VALIDATION_FAILED` for invalid params, `ALLOWANCE_CHECK_FAILED`
38237
+ * when the read fails — or the strategy.
38238
+ */
38239
+ async getApprovalStrategy(_params) {
38240
+ const { params, walletProvider, allowAccountUpgrade = true } = _params;
38241
+ const allowance = await this.isAllowanceValid(_params);
38242
+ if (!allowance.ok) {
38243
+ return {
38244
+ ok: false,
38245
+ error: withErrorContext(allowance.error, {
38246
+ srcChainKey: params.srcChainKey,
38247
+ dstChainKey: params.dstChainKey,
38248
+ action: "bridgeWithApproval"
38249
+ })
38250
+ };
38251
+ }
38252
+ if (allowance.value) return { ok: true, value: "not-required" };
38253
+ return {
38254
+ ok: true,
38255
+ value: await resolveApprovalStrategy({ srcChainKey: params.srcChainKey, walletProvider, allowAccountUpgrade })
38256
+ };
38257
+ }
38258
+ /**
38259
+ * {@link bridge} with the source-token approval folded in. Picks a path with
38260
+ * {@link getApprovalStrategy}: no approval when the allowance already suffices; on an EIP-5792
38261
+ * wallet, approve and the deposit as **one atomic batch — one signature**; otherwise approve, wait
38262
+ * for it to confirm, then the deposit. Completion is exactly `bridge()`'s.
38263
+ *
38264
+ * A wallet that refuses the batch before signing anything falls back to the two-step path. A batch
38265
+ * the user saw is never retried as separate transactions:
38266
+ * - rejected → `USER_REJECTED`; a declined account upgrade (5750) adds `context.reason:
38267
+ * 'account-upgrade-declined'`, after which `allowAccountUpgrade: false` bridges without one;
38268
+ * - never included or fully reverted (EIP-5792 400 / 500) → `INTENT_CREATION_FAILED` with
38269
+ * `context.reason: 'atomic-batch-failed'`;
38270
+ * - anything else short of a confirmed deposit receipt → `TX_VERIFICATION_FAILED` with
38271
+ * `context.reason:` {@link ATOMIC_BATCH_UNCONFIRMED}, `context.batchId` and `context.callCount`. It may
38272
+ * have landed — do not send it again; call again with `resumeBatchId` and `resumeBatchCallCount` to
38273
+ * finish it once it does.
38274
+ *
38275
+ * @returns `bridge()`'s `TxHashPair` plus the `approvalStrategy` that ran. Errors are `bridge()`'s
38276
+ * codes plus `APPROVE_FAILED` and `ALLOWANCE_CHECK_FAILED`.
38277
+ */
38278
+ async bridgeWithApproval(_params) {
38279
+ const { params } = _params;
38280
+ const baseCtx = { srcChainKey: params.srcChainKey, dstChainKey: params.dstChainKey, action: "bridgeWithApproval" };
38281
+ return this.config.analytics.trackResult(
38282
+ "bridge",
38283
+ "bridgeWithApproval",
38284
+ async () => {
38285
+ try {
38286
+ if (_params.resumeBatchId !== void 0) return await this.resumeAtomicBatch(_params, _params.resumeBatchId);
38287
+ const strategy = await this.getApprovalStrategy(_params);
38288
+ if (!strategy.ok) return strategy;
38289
+ const { result: created, approvalStrategy } = await runWithApproval({
38290
+ strategy: strategy.value,
38291
+ notRequired: () => this.createBridgeIntent(_params),
38292
+ atomicBatch: () => this.createBridgeIntentInAtomicBatch(_params),
38293
+ sequential: (afterRefusedBatch) => this.approveThenCreateBridgeIntent(_params, afterRefusedBatch),
38294
+ onBatchRefused: (error) => this.config.logger.warn("[bridgeWithApproval] wallet refused the atomic batch; approving separately", {
38295
+ error
38296
+ })
38297
+ });
38298
+ if (!created.ok) return created;
38299
+ const completed = await this.completeBridge(_params, created.value);
38300
+ if (!completed.ok) return completed;
38301
+ return { ok: true, value: { ...completed.value, approvalStrategy } };
38302
+ } catch (error) {
38303
+ if (isBridgeWithApprovalError(error)) return { ok: false, error };
38304
+ return { ok: false, error: executionFailed("bridge", error, baseCtx) };
38305
+ }
38306
+ },
38307
+ {
38308
+ start: () => ({
38309
+ srcChainKey: params.srcChainKey,
38310
+ dstChainKey: params.dstChainKey,
38311
+ srcToken: params.srcToken,
38312
+ dstToken: params.dstToken,
38313
+ amount: params.amount,
38314
+ srcAddress: params.srcAddress,
38315
+ recipient: params.recipient
38316
+ }),
38317
+ success: (value) => ({
38318
+ srcChainTxHash: value.srcChainTxHash,
38319
+ dstChainTxHash: value.dstChainTxHash,
38320
+ approvalStrategy: value.approvalStrategy
38321
+ }),
38322
+ failure: (error) => ({ code: error.code })
38323
+ }
38324
+ );
38325
+ }
38326
+ /**
38327
+ * Approve + deposit as one EIP-5792 atomic batch, in broadcast order (`[reset?, approve, deposit]`),
38328
+ * then hand back the batch's transaction hash as the deposit tx, for {@link completeBridge}.
38329
+ */
38330
+ async createBridgeIntentInAtomicBatch(_params) {
38331
+ const { params, walletProvider, extras, skipSimulation } = _params;
38332
+ const srcChainKey = params.srcChainKey;
38333
+ bridgeInvariant(
38334
+ isEvmSpokeOnlyChainKeyType(srcChainKey) && isEvmWalletProviderType(walletProvider),
38335
+ "Atomic batches need an EVM spoke source and an EVM wallet provider"
38336
+ );
38337
+ const ctx = {
38338
+ srcChainKey,
38339
+ dstChainKey: params.dstChainKey,
38340
+ action: "bridgeWithApproval",
38341
+ approvalStrategy: "atomic-batch"
38342
+ };
38343
+ const [approval, created] = await Promise.all([
38344
+ this.buildApproveTxs({ params, raw: true }),
38345
+ this.createBridgeIntent({ params, extras, skipSimulation, raw: true })
38346
+ ]);
38347
+ if (!approval.ok) return { ok: false, error: withErrorContext(approval.error, ctx) };
38348
+ if (!created.ok) return { ok: false, error: withErrorContext(created.error, ctx) };
38349
+ const { resetTx, approveTx } = approval.value;
38350
+ const depositTx = created.value.tx;
38351
+ const sent = await sendApprovalBatch({
38352
+ walletProvider,
38353
+ srcChainKey,
38354
+ txs: resetTx ? [resetTx, approveTx, depositTx] : [approveTx, depositTx],
38355
+ timeoutMs: approvalBatchWaitMs(_params.timeout),
38356
+ feature: "bridge",
38357
+ context: ctx
38358
+ });
38359
+ if (!sent.ok) return sent;
38360
+ return {
38361
+ ok: true,
38362
+ value: {
38363
+ tx: sent.value.txHash,
38364
+ relayData: created.value.relayData
38365
+ }
38366
+ };
38367
+ }
38368
+ /**
38369
+ * Finishes a batch an earlier call left {@link ATOMIC_BATCH_UNCONFIRMED}, without sending anything to
38370
+ * the wallet: waits for it again, then relays its deposit client-side and waits for the settlement packet.
38371
+ */
38372
+ async resumeAtomicBatch(_params, batchId) {
38373
+ const { params, walletProvider } = _params;
38374
+ const srcChainKey = params.srcChainKey;
38375
+ bridgeInvariant(
38376
+ isEvmSpokeOnlyChainKeyType(srcChainKey) && isEvmWalletProviderType(walletProvider) && canSendAtomicBatch(walletProvider),
38377
+ "Resuming an atomic batch needs an EVM spoke source and an EIP-5792 wallet provider"
38378
+ );
38379
+ const ctx = {
38380
+ srcChainKey,
38381
+ dstChainKey: params.dstChainKey,
38382
+ action: "bridgeWithApproval",
38383
+ approvalStrategy: "atomic-batch"
38384
+ };
38385
+ const timeoutMs = approvalBatchWaitMs(_params.timeout);
38386
+ const deposit = await confirmApprovalBatch({
38387
+ walletProvider,
38388
+ batchId,
38389
+ callCount: _params.resumeBatchCallCount,
38390
+ timeoutMs,
38391
+ feature: "bridge",
38392
+ context: ctx
38393
+ });
38394
+ if (!deposit.ok) return deposit;
38395
+ const srcTxHash = deposit.value.txHash;
38396
+ const txCtx = { ...ctx, srcTxHash };
38397
+ const packet = await relayTxAndWaitPacket({
38398
+ srcTxHash,
38399
+ chainKey: srcChainKey,
38400
+ relayerApiEndpoint: this.config.relay.relayerApiEndpoint,
38401
+ timeout: Math.max(timeoutMs, RELAY_FALLBACK_FLOOR_MS)
38402
+ });
38403
+ if (!packet.ok) return { ok: false, error: mapRelayFailure(packet.error, { feature: "bridge", ...txCtx }) };
38404
+ return {
38405
+ ok: true,
38406
+ value: { srcChainTxHash: srcTxHash, dstChainTxHash: packet.value.dst_tx_hash, approvalStrategy: "atomic-batch" }
38407
+ };
38408
+ }
38409
+ /** Approve, wait for the approval to confirm, then send the deposit — two or more signatures. */
38410
+ async approveThenCreateBridgeIntent(_params, validated = false) {
38411
+ const { params, extras, skipSimulation } = _params;
38412
+ const ctx = {
38413
+ srcChainKey: params.srcChainKey,
38414
+ dstChainKey: params.dstChainKey,
38415
+ action: "bridgeWithApproval",
38416
+ approvalStrategy: "sequential"
38417
+ };
38418
+ if (!validated) {
38419
+ const preflight = await this.createBridgeIntent({ params, extras, skipSimulation, raw: true });
38420
+ if (!preflight.ok) return { ok: false, error: withErrorContext(preflight.error, ctx) };
38421
+ }
38422
+ const approved = await this.approve(_params);
38423
+ if (!approved.ok) return { ok: false, error: withErrorContext(approved.error, ctx) };
38424
+ const confirmed = await confirmApproval({
38425
+ waitForTxReceipt: (receiptParams) => this.spoke.waitForTxReceipt(receiptParams),
38426
+ txHash: approved.value,
38427
+ chainKey: params.srcChainKey,
38428
+ feature: "bridge",
38429
+ context: ctx
38430
+ });
38431
+ if (!confirmed.ok) return confirmed;
38432
+ return this.createBridgeIntent(_params);
38433
+ }
38434
+ /**
38435
+ * Completes a bridge whose deposit tx is already broadcast: the backend submit-tx attempt when
38436
+ * `useBackendSubmitTx` is on, falling back to {@link fallbackBridgeSteps} on any non-success.
38437
+ * Shared by `bridge()` and `bridgeWithApproval()`, which differ only in how the deposit is sent.
38438
+ */
38439
+ async completeBridge(_params, created) {
38440
+ const timeoutMs = resolveTimeoutMs(_params.timeout, DEFAULT_RELAY_TX_TIMEOUT);
38441
+ if (this.useBackendSubmitTx) {
38442
+ const submitted = await this.submitTx(_params, created, createSubmitTxAttempt(timeoutMs));
38443
+ if (submitted.ok) return submitted;
38444
+ this.config.logger.warn("[bridge] backend submit-tx did not complete; falling back to the client-side relay", {
38445
+ error: submitted.error
38446
+ });
38447
+ }
38448
+ return this.fallbackBridgeSteps(_params, created, timeoutMs);
38449
+ }
36094
38450
  /**
36095
38451
  * Client-side bridge completion (opt-out via `bridge.useBackendSubmitTx: false`): verify the broadcast
36096
38452
  * spoke-deposit tx, then relay it to the hub and wait for the settlement packet. Extracted verbatim from
@@ -36103,13 +38459,18 @@ var BridgeService = class {
36103
38459
  */
36104
38460
  async fallbackBridgeSteps(_params, created, timeoutMs) {
36105
38461
  const { params } = _params;
36106
- const baseCtx = { srcChainKey: params.srcChainKey, dstChainKey: params.dstChainKey };
38462
+ const txCtx = {
38463
+ srcChainKey: params.srcChainKey,
38464
+ dstChainKey: params.dstChainKey,
38465
+ action: "bridge",
38466
+ srcTxHash: created.tx
38467
+ };
36107
38468
  const verifyTxHashResult = await this.spoke.verifyTxHash({
36108
38469
  txHash: created.tx,
36109
38470
  chainKey: params.srcChainKey
36110
38471
  });
36111
38472
  if (!verifyTxHashResult.ok) {
36112
- return { ok: false, error: verifyFailed("bridge", verifyTxHashResult.error, baseCtx) };
38473
+ return { ok: false, error: verifyFailed("bridge", verifyTxHashResult.error, txCtx) };
36113
38474
  }
36114
38475
  const packetResult = await relayTxAndWaitPacket({
36115
38476
  srcTxHash: created.tx,
@@ -36125,15 +38486,7 @@ var BridgeService = class {
36125
38486
  timeout: Math.max(timeoutMs, RELAY_FALLBACK_FLOOR_MS)
36126
38487
  });
36127
38488
  if (!packetResult.ok) {
36128
- return {
36129
- ok: false,
36130
- error: mapRelayFailure(packetResult.error, {
36131
- feature: "bridge",
36132
- action: "bridge",
36133
- srcChainKey: baseCtx.srcChainKey,
36134
- dstChainKey: baseCtx.dstChainKey
36135
- })
36136
- };
38489
+ return { ok: false, error: mapRelayFailure(packetResult.error, { feature: "bridge", ...txCtx }) };
36137
38490
  }
36138
38491
  return {
36139
38492
  ok: true,
@@ -44680,6 +47033,9 @@ var isLeverageYieldPostExecutionError = isCodeMember(
44680
47033
  LEVERAGE_YIELD_POST_EXECUTION_CODES
44681
47034
  );
44682
47035
  var isLeverageYieldSwapError = isCodeMember(LEVERAGE_YIELD_SWAP_CODES);
47036
+ var isVaultSwapWithApprovalError = isCodeMember(
47037
+ /* @__PURE__ */ new Set([...LEVERAGE_YIELD_SWAP_CODES, "APPROVE_FAILED", "ALLOWANCE_CHECK_FAILED"])
47038
+ );
44683
47039
  var isLeverageYieldError = isCodeMember(LEVERAGE_YIELD_CODES);
44684
47040
 
44685
47041
  // src/leverageYield/positionFunding.ts
@@ -44736,6 +47092,7 @@ var INTENT_DEADLINE_BUFFER_SECONDS = 5 * 60;
44736
47092
  var RECONCILE_TIMEOUT_MS2 = 5e3;
44737
47093
  var DETAILED_STATUS_SOLVER_TIMEOUT_MS2 = 5e3;
44738
47094
  var BITCOIN_UNSUPPORTED_MESSAGE = "Bitcoin is not a supported source chain for leverage positions; use a supported spoke or the hub";
47095
+ var VAULT_BITCOIN_UNSUPPORTED_MESSAGE = "Bitcoin is not a supported chain for leverage-yield vault swaps; use a supported spoke or the hub";
44739
47096
  var ANY_SOLVER_ADDRESS = "0x0000000000000000000000000000000000000000";
44740
47097
  var MAX_WITHDRAW_DUST_BUFFER = 1000n;
44741
47098
  function pctToRay(aprPct) {
@@ -44792,7 +47149,7 @@ var LeverageYieldService = class {
44792
47149
  }
44793
47150
  /** Looks up a vault by its `name` field. Returns `undefined` when not registered. */
44794
47151
  getVault(name) {
44795
- return this.listVaults().find((v10) => v10.name === name);
47152
+ return this.listVaults().find((v11) => v11.name === name);
44796
47153
  }
44797
47154
  /**
44798
47155
  * Looks up a registered vault by its on-chain proxy address (case-insensitive).
@@ -44800,7 +47157,7 @@ var LeverageYieldService = class {
44800
47157
  */
44801
47158
  getVaultByAddress(address) {
44802
47159
  const normalized = address.toLowerCase();
44803
- return this.listVaults().find((v10) => v10.vault.toLowerCase() === normalized);
47160
+ return this.listVaults().find((v11) => v11.vault.toLowerCase() === normalized);
44804
47161
  }
44805
47162
  /**
44806
47163
  * Resolves the intent `deadline`: returns the caller-supplied value verbatim, otherwise
@@ -44900,6 +47257,10 @@ var LeverageYieldService = class {
44900
47257
  async deposit(params) {
44901
47258
  const baseCtx = { srcChainKey: params.srcChainKey, action: "deposit" };
44902
47259
  try {
47260
+ leverageYieldInvariant(!isBitcoinChainKeyType(params.srcChainKey), VAULT_BITCOIN_UNSUPPORTED_MESSAGE, {
47261
+ ...baseCtx,
47262
+ field: "srcChainKey"
47263
+ });
44903
47264
  leverageYieldInvariant(params.inputAmount > 0n, "inputAmount must be greater than 0", {
44904
47265
  ...baseCtx,
44905
47266
  field: "inputAmount"
@@ -44959,6 +47320,15 @@ var LeverageYieldService = class {
44959
47320
  async withdraw(params) {
44960
47321
  const baseCtx = { srcChainKey: params.srcChainKey, action: "withdraw" };
44961
47322
  try {
47323
+ leverageYieldInvariant(!isBitcoinChainKeyType(params.srcChainKey), VAULT_BITCOIN_UNSUPPORTED_MESSAGE, {
47324
+ ...baseCtx,
47325
+ field: "srcChainKey"
47326
+ });
47327
+ leverageYieldInvariant(!isBitcoinChainKeyType(params.dstChainKey), VAULT_BITCOIN_UNSUPPORTED_MESSAGE, {
47328
+ ...baseCtx,
47329
+ dstChainKey: params.dstChainKey,
47330
+ field: "dstChainKey"
47331
+ });
44962
47332
  leverageYieldInvariant(params.inputAmount > 0n, "inputAmount must be greater than 0", {
44963
47333
  ...baseCtx,
44964
47334
  field: "inputAmount"
@@ -45027,6 +47397,14 @@ var LeverageYieldService = class {
45027
47397
  const { params, skipSimulation, hubWalletSwap, partnerFee = this.config.leverageYieldPartnerFee } = _params;
45028
47398
  const baseCtx = { srcChainKey: params.srcChainKey, dstChainKey: params.dstChainKey };
45029
47399
  try {
47400
+ leverageYieldInvariant(!isBitcoinChainKeyType(params.srcChainKey), VAULT_BITCOIN_UNSUPPORTED_MESSAGE, {
47401
+ ...baseCtx,
47402
+ field: "srcChainKey"
47403
+ });
47404
+ leverageYieldInvariant(!isBitcoinChainKeyType(params.dstChainKey), VAULT_BITCOIN_UNSUPPORTED_MESSAGE, {
47405
+ ...baseCtx,
47406
+ field: "dstChainKey"
47407
+ });
45030
47408
  leverageYieldInvariant(
45031
47409
  isUndefinedOrValidWalletProviderForChainKey(params.srcChainKey, _params.walletProvider),
45032
47410
  `Invalid wallet provider for chain key: ${params.srcChainKey}`,
@@ -45054,25 +47432,10 @@ var LeverageYieldService = class {
45054
47432
  `Invalid spoke chain (params.dstChain): ${params.dstChainKey}`,
45055
47433
  { ...baseCtx, field: "dstChainKey" }
45056
47434
  );
45057
- if (isBitcoinChainKey(params.dstChainKey) && params.outputToken === "BTC") {
45058
- leverageYieldInvariant(
45059
- params.minOutputAmount >= 546n,
45060
- `Invalid minOutputAmount (params.minOutputAmount): ${params.minOutputAmount}`,
45061
- { ...baseCtx, field: "minOutputAmount" }
45062
- );
45063
- }
45064
- const personalAddress = params.srcAddress;
45065
- let walletAddress = personalAddress;
45066
- if (isBitcoinChainKeyType(params.srcChainKey) && _params.raw === false) {
45067
- leverageYieldInvariant(
45068
- isBitcoinWalletProviderType(_params.walletProvider),
45069
- `Invalid wallet provider for chain key: ${params.srcChainKey}`,
45070
- baseCtx
45071
- );
45072
- walletAddress = await this.spoke.bitcoin.getEffectiveWalletAddress(personalAddress);
45073
- await this.spoke.bitcoin.radfi.ensureRadfiAccessToken(_params.walletProvider);
45074
- }
45075
- const creatorHubWalletAddress = await this.hubProvider.getUserHubWalletAddress(walletAddress, params.srcChainKey);
47435
+ const creatorHubWalletAddress = await this.hubProvider.getUserHubWalletAddress(
47436
+ params.srcAddress,
47437
+ params.srcChainKey
47438
+ );
45076
47439
  if (hubWalletSwap) {
45077
47440
  const [data2, intent2, feeAmount2] = EvmSolverService.constructCreateIntentData(
45078
47441
  { ...params, srcChainKey: hubChainKey, srcAddress: creatorHubWalletAddress },
@@ -45082,12 +47445,7 @@ var LeverageYieldService = class {
45082
47445
  );
45083
47446
  const coreSendMessageParams = {
45084
47447
  srcChainKey: params.srcChainKey,
45085
- // Personal address — NOT the resolved trading `walletAddress`. SpokeService.sendMessage
45086
- // re-resolves the effective (Bitcoin trading) address itself; passing the already-resolved
45087
- // trading address here would double-resolve it (getTradingWallet(tradingAddress) →
45088
- // "Trading wallet not found"). The trading address is used only for the hub-wallet
45089
- // derivation above (creatorHubWalletAddress). Mirrors MoneyMarketService borrow/withdraw.
45090
- srcAddress: personalAddress,
47448
+ srcAddress: params.srcAddress,
45091
47449
  dstChainKey: hubChainKey,
45092
47450
  dstAddress: creatorHubWalletAddress,
45093
47451
  payload: data2,
@@ -45140,17 +47498,14 @@ var LeverageYieldService = class {
45140
47498
  };
45141
47499
  }
45142
47500
  const [data, intent, feeAmount] = EvmSolverService.constructCreateIntentData(
45143
- {
45144
- ...params,
45145
- srcAddress: walletAddress
45146
- },
47501
+ params,
45147
47502
  creatorHubWalletAddress,
45148
47503
  this.config,
45149
47504
  partnerFee
45150
47505
  );
45151
47506
  const coreDepositParams = {
45152
47507
  srcChainKey: params.srcChainKey,
45153
- srcAddress: walletAddress,
47508
+ srcAddress: params.srcAddress,
45154
47509
  to: creatorHubWalletAddress,
45155
47510
  token: params.inputToken,
45156
47511
  amount: params.inputAmount,
@@ -45227,17 +47582,7 @@ var LeverageYieldService = class {
45227
47582
  if (!createIntentResult.ok) {
45228
47583
  return { ok: false, error: createIntentResult.error };
45229
47584
  }
45230
- const created = createIntentResult.value;
45231
- const timeoutMs = resolveTimeoutMs(_params.timeout, DEFAULT_RELAY_TX_TIMEOUT);
45232
- if (this.useBackendSubmitTx) {
45233
- const submitted = await this.submitTx(_params, created, createSubmitTxAttempt(timeoutMs));
45234
- if (submitted.ok) return submitted;
45235
- this.config.logger.warn(
45236
- "[leverageYield] backend submit-tx did not complete; falling back to the client-side relay",
45237
- { error: submitted.error }
45238
- );
45239
- }
45240
- return this.fallbackVaultSwapSteps(_params, created, timeoutMs);
47585
+ return await this.completeVaultSwap(_params, createIntentResult.value);
45241
47586
  } catch (error) {
45242
47587
  if (isLeverageYieldSwapError(error)) return { ok: false, error };
45243
47588
  return {
@@ -45265,6 +47610,374 @@ var LeverageYieldService = class {
45265
47610
  }
45266
47611
  );
45267
47612
  }
47613
+ /**
47614
+ * Which approval path {@link vaultSwapWithApproval} would take for a vault swap's source token, so a
47615
+ * UI can say up front whether a deposit costs one signature or two. Read-only; sends nothing. Not
47616
+ * the hub-side {@link approve} / {@link isAllowanceValid}, which cover depositing into a vault directly.
47617
+ *
47618
+ * A withdraw (`hubWalletSwap`) spends from the hub wallet and is always `'not-required'`. A deposit
47619
+ * approves the same spender a swap does. `'atomic-batch'` needs an EVM spoke source and a wallet
47620
+ * that reports EIP-5792 atomic support for that chain (`'supported'`, or `'ready'` unless
47621
+ * `allowAccountUpgrade: false`); the Sonic hub, Stellar and wallets without batch support get
47622
+ * `'sequential'`.
47623
+ *
47624
+ * @returns `ALLOWANCE_CHECK_FAILED` when the allowance read fails; otherwise the strategy.
47625
+ */
47626
+ async getApprovalStrategy(_params) {
47627
+ const { params, walletProvider, hubWalletSwap, allowAccountUpgrade = true } = _params;
47628
+ if (hubWalletSwap) return { ok: true, value: "not-required" };
47629
+ const allowance = await this.isDepositAllowanceValid(params);
47630
+ if (!allowance.ok) {
47631
+ return {
47632
+ ok: false,
47633
+ error: allowanceCheckFailed("leverageYield", allowance.error, {
47634
+ srcChainKey: params.srcChainKey,
47635
+ dstChainKey: params.dstChainKey,
47636
+ action: "vaultSwapWithApproval"
47637
+ })
47638
+ };
47639
+ }
47640
+ if (allowance.value) return { ok: true, value: "not-required" };
47641
+ return {
47642
+ ok: true,
47643
+ value: await resolveApprovalStrategy({ srcChainKey: params.srcChainKey, walletProvider, allowAccountUpgrade })
47644
+ };
47645
+ }
47646
+ /**
47647
+ * {@link vaultSwap} with a deposit's source-token approval folded in. Picks a path with
47648
+ * {@link getApprovalStrategy}: none when the allowance already suffices (and never for a withdraw);
47649
+ * on an EIP-5792 wallet, approve and the deposit as **one atomic batch — one signature**; otherwise
47650
+ * approve, wait for it to confirm, then the deposit. Intent creation, the leverage-yield partner fee
47651
+ * and completion (backend submit-tx with its `operation`, then the client-side fallback) are exactly
47652
+ * `vaultSwap()`'s.
47653
+ *
47654
+ * A wallet that refuses the batch before signing anything falls back to the two-step path. A batch
47655
+ * the user saw is never retried as separate transactions:
47656
+ * - rejected → `USER_REJECTED`; a declined account upgrade (5750) adds `context.reason:
47657
+ * 'account-upgrade-declined'`, after which `allowAccountUpgrade: false` deposits without one;
47658
+ * - never included or fully reverted (EIP-5792 400 / 500) → `INTENT_CREATION_FAILED` with
47659
+ * `context.reason: 'atomic-batch-failed'`;
47660
+ * - anything else short of a confirmed deposit receipt → `TX_VERIFICATION_FAILED` with
47661
+ * `context.reason:` {@link ATOMIC_BATCH_UNCONFIRMED}, `context.batchId` and `context.callCount`. It may
47662
+ * have landed — do not send it again; call again with `resumeBatchId` and `resumeBatchCallCount` to
47663
+ * finish it once it does.
47664
+ *
47665
+ * @returns `vaultSwap()`'s response plus the `approvalStrategy` that ran. Errors are `vaultSwap()`'s
47666
+ * codes plus `APPROVE_FAILED` and `ALLOWANCE_CHECK_FAILED`.
47667
+ */
47668
+ async vaultSwapWithApproval(_params) {
47669
+ const { params } = _params;
47670
+ const baseCtx = {
47671
+ srcChainKey: params.srcChainKey,
47672
+ dstChainKey: params.dstChainKey,
47673
+ action: "vaultSwapWithApproval"
47674
+ };
47675
+ return this.config.analytics.trackResult(
47676
+ "leverageYield",
47677
+ "vaultSwapWithApproval",
47678
+ async () => {
47679
+ try {
47680
+ if (_params.resumeBatchId !== void 0) return await this.resumeAtomicBatch(_params, _params.resumeBatchId);
47681
+ const strategy = await this.getApprovalStrategy(_params);
47682
+ if (!strategy.ok) return strategy;
47683
+ const { result: created, approvalStrategy } = await runWithApproval({
47684
+ strategy: strategy.value,
47685
+ notRequired: () => this.createVaultIntent(_params),
47686
+ atomicBatch: () => this.createVaultIntentInAtomicBatch(_params),
47687
+ sequential: (afterRefusedBatch) => this.approveThenCreateVaultIntent(_params, afterRefusedBatch),
47688
+ onBatchRefused: (error) => this.config.logger.warn("[vaultSwapWithApproval] wallet refused the atomic batch; approving separately", {
47689
+ error
47690
+ })
47691
+ });
47692
+ if (!created.ok) return created;
47693
+ const completed = await this.completeVaultSwap(_params, created.value);
47694
+ if (!completed.ok) return completed;
47695
+ return { ok: true, value: { ...completed.value, approvalStrategy } };
47696
+ } catch (error) {
47697
+ if (isVaultSwapWithApprovalError(error)) return { ok: false, error };
47698
+ return { ok: false, error: unknownFailed("leverageYield", error, baseCtx) };
47699
+ }
47700
+ },
47701
+ {
47702
+ start: () => ({
47703
+ srcChainKey: params.srcChainKey,
47704
+ dstChainKey: params.dstChainKey,
47705
+ srcAddress: params.srcAddress,
47706
+ dstAddress: params.dstAddress,
47707
+ inputToken: params.inputToken,
47708
+ outputToken: params.outputToken,
47709
+ inputAmount: params.inputAmount
47710
+ }),
47711
+ success: (value) => ({
47712
+ intentId: value.intent.intentId,
47713
+ srcTxHash: value.intentDeliveryInfo.srcTxHash,
47714
+ dstTxHash: value.intentDeliveryInfo.dstTxHash,
47715
+ approvalStrategy: value.approvalStrategy
47716
+ }),
47717
+ failure: (error) => ({ code: error.code })
47718
+ }
47719
+ );
47720
+ }
47721
+ /**
47722
+ * Approve + deposit as one EIP-5792 atomic batch, in broadcast order (`[reset?, approve, deposit]`),
47723
+ * then hand back the batch's transaction hash as the intent tx, for {@link completeVaultSwap}.
47724
+ */
47725
+ async createVaultIntentInAtomicBatch(_params) {
47726
+ const { params, walletProvider, extras, skipSimulation, partnerFee } = _params;
47727
+ const srcChainKey = params.srcChainKey;
47728
+ leverageYieldInvariant(
47729
+ isEvmSpokeOnlyChainKeyType(srcChainKey) && isEvmWalletProviderType(walletProvider),
47730
+ "Atomic batches need an EVM spoke source and an EVM wallet provider"
47731
+ );
47732
+ const ctx = {
47733
+ srcChainKey,
47734
+ dstChainKey: params.dstChainKey,
47735
+ action: "vaultSwapWithApproval",
47736
+ approvalStrategy: "atomic-batch"
47737
+ };
47738
+ const [approval, created] = await Promise.all([
47739
+ this.buildDepositApproveTxs(params, srcChainKey),
47740
+ this.createVaultIntent({ params, extras, skipSimulation, partnerFee, raw: true })
47741
+ ]);
47742
+ if (!approval.ok) return { ok: false, error: approveFailed("leverageYield", approval.error, ctx) };
47743
+ if (!created.ok) return { ok: false, error: withErrorContext(created.error, ctx) };
47744
+ const { resetTx, approveTx } = approval.value;
47745
+ const depositTx = created.value.tx;
47746
+ const sent = await sendApprovalBatch({
47747
+ walletProvider,
47748
+ srcChainKey,
47749
+ txs: resetTx ? [resetTx, approveTx, depositTx] : [approveTx, depositTx],
47750
+ timeoutMs: approvalBatchWaitMs(_params.timeout),
47751
+ feature: "leverageYield",
47752
+ context: ctx
47753
+ });
47754
+ if (!sent.ok) return sent;
47755
+ return {
47756
+ ok: true,
47757
+ value: {
47758
+ tx: sent.value.txHash,
47759
+ intent: created.value.intent,
47760
+ relayData: created.value.relayData
47761
+ }
47762
+ };
47763
+ }
47764
+ /**
47765
+ * Finishes a batch an earlier call left {@link ATOMIC_BATCH_UNCONFIRMED}, without sending anything to
47766
+ * the wallet: waits for it again, relays its deposit client-side and notifies the solver. The
47767
+ * original intent went with that call, so it is read back from the hub tx the relay delivers.
47768
+ */
47769
+ async resumeAtomicBatch(_params, batchId) {
47770
+ const { params, walletProvider } = _params;
47771
+ const srcChainKey = params.srcChainKey;
47772
+ leverageYieldInvariant(
47773
+ isEvmSpokeOnlyChainKeyType(srcChainKey) && isEvmWalletProviderType(walletProvider) && canSendAtomicBatch(walletProvider),
47774
+ "Resuming an atomic batch needs an EVM spoke source and an EIP-5792 wallet provider"
47775
+ );
47776
+ const ctx = {
47777
+ srcChainKey,
47778
+ dstChainKey: params.dstChainKey,
47779
+ action: "vaultSwapWithApproval",
47780
+ approvalStrategy: "atomic-batch"
47781
+ };
47782
+ const timeoutMs = approvalBatchWaitMs(_params.timeout);
47783
+ const deposit = await confirmApprovalBatch({
47784
+ walletProvider,
47785
+ batchId,
47786
+ callCount: _params.resumeBatchCallCount,
47787
+ timeoutMs,
47788
+ feature: "leverageYield",
47789
+ context: ctx
47790
+ });
47791
+ if (!deposit.ok) return deposit;
47792
+ const srcTxHash = deposit.value.txHash;
47793
+ const txCtx = { ...ctx, srcTxHash };
47794
+ const packet = await relayTxAndWaitPacket({
47795
+ srcTxHash,
47796
+ chainKey: srcChainKey,
47797
+ relayerApiEndpoint: this.config.relay.relayerApiEndpoint,
47798
+ timeout: Math.max(timeoutMs, RELAY_FALLBACK_FLOOR_MS)
47799
+ });
47800
+ if (!packet.ok) return { ok: false, error: mapRelayFailure(packet.error, { feature: "leverageYield", ...txCtx }) };
47801
+ const dstTxHash = packet.value.dst_tx_hash;
47802
+ let intent;
47803
+ try {
47804
+ intent = await EvmSolverService.getIntent(dstTxHash, this.config, this.hubProvider.publicClient);
47805
+ } catch (error) {
47806
+ return { ok: false, error: unknownFailed("leverageYield", error, { ...txCtx, dstTxHash }) };
47807
+ }
47808
+ const solved = await this.notifySolver({ intent_tx_hash: dstTxHash });
47809
+ if (!solved.ok) return { ok: false, error: withErrorContext(solved.error, { srcChainKey, srcTxHash, dstTxHash }) };
47810
+ return {
47811
+ ok: true,
47812
+ value: {
47813
+ solverExecutionResponse: solved.value,
47814
+ intent,
47815
+ intentDeliveryInfo: {
47816
+ srcChainKey,
47817
+ srcTxHash,
47818
+ srcAddress: params.srcAddress,
47819
+ dstChainKey: params.dstChainKey,
47820
+ dstTxHash,
47821
+ dstAddress: params.dstAddress
47822
+ },
47823
+ approvalStrategy: "atomic-batch"
47824
+ }
47825
+ };
47826
+ }
47827
+ /** Approve, wait for the approval to confirm, then send the deposit — two or more signatures. */
47828
+ async approveThenCreateVaultIntent(_params, validated = false) {
47829
+ const { params, extras, skipSimulation, partnerFee } = _params;
47830
+ const ctx = {
47831
+ srcChainKey: params.srcChainKey,
47832
+ dstChainKey: params.dstChainKey,
47833
+ action: "vaultSwapWithApproval",
47834
+ approvalStrategy: "sequential"
47835
+ };
47836
+ if (!validated) {
47837
+ const preflight = await this.createVaultIntent({
47838
+ params,
47839
+ extras,
47840
+ skipSimulation,
47841
+ partnerFee,
47842
+ raw: true
47843
+ });
47844
+ if (!preflight.ok) return { ok: false, error: withErrorContext(preflight.error, ctx) };
47845
+ }
47846
+ const approved = await this.approveDeposit(_params);
47847
+ if (!approved.ok) {
47848
+ return {
47849
+ ok: false,
47850
+ error: isLeverageYieldApproveError(approved.error) ? withErrorContext(approved.error, ctx) : approveFailed("leverageYield", approved.error, ctx)
47851
+ };
47852
+ }
47853
+ const confirmed = await confirmApproval({
47854
+ waitForTxReceipt: (receiptParams) => this.spoke.waitForTxReceipt(receiptParams),
47855
+ txHash: approved.value,
47856
+ chainKey: params.srcChainKey,
47857
+ feature: "leverageYield",
47858
+ context: ctx
47859
+ });
47860
+ if (!confirmed.ok) return confirmed;
47861
+ return this.createVaultIntent(_params);
47862
+ }
47863
+ /** Whether the deposit's source-token allowance already covers `inputAmount`. */
47864
+ async isDepositAllowanceValid(params) {
47865
+ try {
47866
+ const { srcChainKey } = params;
47867
+ if (isHubChainKeyType(srcChainKey)) {
47868
+ return await this.spoke.isAllowanceValid({
47869
+ srcChainKey,
47870
+ token: params.inputToken,
47871
+ amount: params.inputAmount,
47872
+ owner: params.srcAddress,
47873
+ spender: intentDepositSpender(this.config, srcChainKey)
47874
+ });
47875
+ }
47876
+ if (isEvmSpokeOnlyChainKeyType(srcChainKey)) {
47877
+ return await this.spoke.isAllowanceValid({
47878
+ srcChainKey,
47879
+ token: params.inputToken,
47880
+ amount: params.inputAmount,
47881
+ owner: params.srcAddress,
47882
+ spender: intentDepositSpender(this.config, srcChainKey)
47883
+ });
47884
+ }
47885
+ if (isStellarChainKeyType(srcChainKey)) {
47886
+ return await this.spoke.isAllowanceValid({
47887
+ srcChainKey,
47888
+ token: params.inputToken,
47889
+ amount: params.inputAmount,
47890
+ owner: params.srcAddress
47891
+ });
47892
+ }
47893
+ return { ok: true, value: true };
47894
+ } catch (error) {
47895
+ return { ok: false, error };
47896
+ }
47897
+ }
47898
+ /** The deposit's unsigned approval leg(s) on an EVM spoke, for the atomic batch. */
47899
+ async buildDepositApproveTxs(params, srcChainKey) {
47900
+ try {
47901
+ return await this.spoke.buildApproveTxs({
47902
+ srcChainKey,
47903
+ owner: params.srcAddress,
47904
+ token: params.inputToken,
47905
+ amount: params.inputAmount,
47906
+ spender: intentDepositSpender(this.config, srcChainKey),
47907
+ raw: true
47908
+ });
47909
+ } catch (error) {
47910
+ return { ok: false, error };
47911
+ }
47912
+ }
47913
+ /** Signs and sends the deposit's approval (hub, EVM spoke or Stellar); resolves at broadcast. */
47914
+ async approveDeposit(_params) {
47915
+ const { params, walletProvider } = _params;
47916
+ try {
47917
+ if (isHubChainKeyType(params.srcChainKey) || isEvmSpokeOnlyChainKeyType(params.srcChainKey)) {
47918
+ leverageYieldInvariant(
47919
+ isOptionalEvmWalletProviderType(walletProvider),
47920
+ "Invalid wallet provider. Expected Evm wallet provider."
47921
+ );
47922
+ const result = await this.spoke.approve({
47923
+ srcChainKey: params.srcChainKey,
47924
+ owner: params.srcAddress,
47925
+ token: params.inputToken,
47926
+ amount: params.inputAmount,
47927
+ spender: intentDepositSpender(this.config, params.srcChainKey),
47928
+ raw: false,
47929
+ walletProvider
47930
+ });
47931
+ if (!result.ok) return result;
47932
+ return {
47933
+ ok: true,
47934
+ value: result.value
47935
+ };
47936
+ }
47937
+ if (isStellarChainKeyType(params.srcChainKey)) {
47938
+ leverageYieldInvariant(
47939
+ isOptionalStellarWalletProviderType(walletProvider),
47940
+ "Invalid wallet provider. Expected Stellar wallet provider."
47941
+ );
47942
+ const result = await this.spoke.approve({
47943
+ srcChainKey: params.srcChainKey,
47944
+ token: params.inputToken,
47945
+ amount: params.inputAmount,
47946
+ owner: params.srcAddress,
47947
+ raw: false,
47948
+ walletProvider
47949
+ });
47950
+ if (!result.ok) return result;
47951
+ return {
47952
+ ok: true,
47953
+ value: result.value
47954
+ };
47955
+ }
47956
+ leverageYieldInvariant(false, "Approve only supported for hub (Sonic), EVM spokes, and Stellar", {
47957
+ srcChainKey: params.srcChainKey,
47958
+ field: "srcChainKey"
47959
+ });
47960
+ } catch (error) {
47961
+ return { ok: false, error };
47962
+ }
47963
+ }
47964
+ /**
47965
+ * Completes a vault swap whose intent tx is already broadcast: the backend submit-tx attempt when
47966
+ * `useBackendSubmitTx` is on, falling back to {@link fallbackVaultSwapSteps} on any non-success.
47967
+ * Shared by `vaultSwap()` and `vaultSwapWithApproval()`, which differ only in how the intent tx is sent.
47968
+ */
47969
+ async completeVaultSwap(_params, created) {
47970
+ const timeoutMs = resolveTimeoutMs(_params.timeout, DEFAULT_RELAY_TX_TIMEOUT);
47971
+ if (this.useBackendSubmitTx) {
47972
+ const submitted = await this.submitTx(_params, created, createSubmitTxAttempt(timeoutMs));
47973
+ if (submitted.ok) return submitted;
47974
+ this.config.logger.warn(
47975
+ "[leverageYield] backend submit-tx did not complete; falling back to the client-side relay",
47976
+ { error: submitted.error }
47977
+ );
47978
+ }
47979
+ return this.fallbackVaultSwapSteps(_params, created, timeoutMs);
47980
+ }
45268
47981
  /**
45269
47982
  * Client-side vault-swap completion (the opt-out path, and the fallback): verify the broadcast
45270
47983
  * intent tx landed,
@@ -45276,14 +47989,19 @@ var LeverageYieldService = class {
45276
47989
  async fallbackVaultSwapSteps(_params, created, timeoutMs) {
45277
47990
  const { params } = _params;
45278
47991
  const srcChainKey = params.srcChainKey;
45279
- const baseCtx = { srcChainKey, dstChainKey: params.dstChainKey, action: "vaultSwap" };
45280
47992
  const { tx: spokeTxHash, intent, relayData } = created;
47993
+ const txCtx = {
47994
+ srcChainKey,
47995
+ dstChainKey: params.dstChainKey,
47996
+ action: "vaultSwap",
47997
+ srcTxHash: spokeTxHash
47998
+ };
45281
47999
  const verifyTxHashResult = await this.spoke.verifyTxHash({
45282
48000
  txHash: spokeTxHash,
45283
48001
  chainKey: srcChainKey
45284
48002
  });
45285
48003
  if (!verifyTxHashResult.ok) {
45286
- return { ok: false, error: verifyFailed("leverageYield", verifyTxHashResult.error, baseCtx) };
48004
+ return { ok: false, error: verifyFailed("leverageYield", verifyTxHashResult.error, txCtx) };
45287
48005
  }
45288
48006
  let dstIntentTxHash;
45289
48007
  if (isHubChainKeyType(srcChainKey)) {
@@ -45301,7 +48019,7 @@ var LeverageYieldService = class {
45301
48019
  timeout: Math.max(timeoutMs, RELAY_FALLBACK_FLOOR_MS)
45302
48020
  });
45303
48021
  if (!packet.ok) {
45304
- return { ok: false, error: mapRelayFailure(packet.error, { feature: "leverageYield", ...baseCtx }) };
48022
+ return { ok: false, error: mapRelayFailure(packet.error, { feature: "leverageYield", ...txCtx }) };
45305
48023
  }
45306
48024
  dstIntentTxHash = packet.value.dst_tx_hash;
45307
48025
  }
@@ -45309,7 +48027,14 @@ var LeverageYieldService = class {
45309
48027
  intent_tx_hash: dstIntentTxHash
45310
48028
  });
45311
48029
  if (!postExecResult.ok) {
45312
- return { ok: false, error: postExecResult.error };
48030
+ return {
48031
+ ok: false,
48032
+ error: withErrorContext(postExecResult.error, {
48033
+ srcChainKey,
48034
+ srcTxHash: spokeTxHash,
48035
+ dstTxHash: dstIntentTxHash
48036
+ })
48037
+ };
45313
48038
  }
45314
48039
  return {
45315
48040
  ok: true,
@@ -45510,17 +48235,25 @@ var LeverageYieldService = class {
45510
48235
  * unreadable backend into an error, which is right for a polled read that would otherwise spend a
45511
48236
  * budget on an unverified miss, and wrong to impose on a surface that already ships without it.
45512
48237
  *
48238
+ * Every non-final answer is reconciled, an in-flight one included, and a journal cancel reads
48239
+ * `FAILED`: the solver can keep reporting a cancelled intent in flight, and nothing else ends that poll.
48240
+ *
45513
48241
  * `timeoutMs` bounds the solver request alone. The reconcile carries its own
45514
48242
  * {@link RECONCILE_TIMEOUT_MS}, so a bounded call can cost both.
45515
48243
  */
45516
48244
  async resolveSolverStatus(request, timeoutMs, apiKey) {
45517
48245
  const solverResult = await this.solverStatus(request, timeoutMs, apiKey);
45518
- const forgotten = !solverResult.ok || solverResult.value.status === exports.SolverIntentStatusCode.NOT_FOUND;
45519
- if (!forgotten) return solverResult;
48246
+ const status = solverResult.ok ? solverResult.value.status : void 0;
48247
+ if (status === exports.SolverIntentStatusCode.SOLVED || status === exports.SolverIntentStatusCode.FAILED) return solverResult;
48248
+ const forgotten = !solverResult.ok || status === exports.SolverIntentStatusCode.NOT_FOUND;
45520
48249
  const timeout = Math.min(RECONCILE_TIMEOUT_MS2, this.backendApi.requestTimeoutMs);
45521
48250
  const intent = await this.backendApi.getIntentByTxHash(request.intent_tx_hash, { timeout, apiKey });
45522
- const settled = intent.ok ? intent.value.events.filter(isFillEvent).find((fill) => fill.intentState.remainingInput === "0") : void 0;
45523
- if (settled) return { ok: true, value: { status: exports.SolverIntentStatusCode.SOLVED, fill_tx_hash: settled.txHash } };
48251
+ const outcome = intent.ok ? readIntentJournalOutcome(intent.value) : void 0;
48252
+ if (outcome?.kind === "solved") {
48253
+ return { ok: true, value: { status: exports.SolverIntentStatusCode.SOLVED, fill_tx_hash: outcome.fillTxHash } };
48254
+ }
48255
+ if (outcome?.kind === "cancelled") return { ok: true, value: { status: exports.SolverIntentStatusCode.FAILED } };
48256
+ if (!forgotten) return solverResult;
45524
48257
  const backendAnswered = intent.ok || isSodaxError(intent.error) && intent.error.context?.status === 404;
45525
48258
  if (solverResult.ok && !backendAnswered) {
45526
48259
  return {
@@ -45539,9 +48272,14 @@ var LeverageYieldService = class {
45539
48272
  * Reads a vault swap's status from its source-chain transaction — the identifier a caller always
45540
48273
  * holds after `vaultSwap()`.
45541
48274
  *
45542
- * **Routes; does not translate.** Returns the backend submit-tx record while it is in play,
45543
- * otherwise the solver's answer via the hub tx hash resolved from the relay packet. The result is
45544
- * tagged with `source` (discriminate on it) and carries that source's payload unmodified.
48275
+ * **Routes; defines no status of its own.** Returns the backend submit-tx record while it is in
48276
+ * play, otherwise the solver's answer via the hub tx hash resolved from the relay packet. The result
48277
+ * is tagged with `source` (discriminate on it).
48278
+ *
48279
+ * The solver arm is reconciled against the backend's durable intent record: a settling fill reads
48280
+ * `SOLVED`, and a cancel with nothing filled reads `FAILED` even while the solver still reports the
48281
+ * intent in flight. Otherwise it carries the solver's answer unmodified, and the backend arm its
48282
+ * record unmodified.
45545
48283
  *
45546
48284
  * `sodax.api.leverageYield.getSubmitTxStatus` cannot answer for every vault swap. Sometimes there
45547
48285
  * is no record — `useBackendSubmitTx: false`, or the submit was rejected. More often the record
@@ -45561,8 +48299,8 @@ var LeverageYieldService = class {
45561
48299
  *
45562
48300
  * @param params - `srcChainKey` and `srcTxHash` of the source-chain vault-swap transaction.
45563
48301
  * @param config - Optional per-request override. Its `apiKey` reaches every keyed leg — the
45564
- * submit-tx record read, the solver read, and the durable-intent read a solver `NOT_FOUND` falls
45565
- * back to — so one override keys the whole call. The relay leg is unauthenticated and takes none.
48302
+ * submit-tx record read, the solver read, and the durable-intent read a non-final solver answer
48303
+ * falls back to — so one override keys the whole call. The relay leg is unauthenticated and takes none.
45566
48304
  * @returns A `Result` containing a {@link DetailedLeverageYieldStatus}. Fails with `LOOKUP_FAILED`
45567
48305
  * when no source can answer yet. Branch on `error.context.reason`:
45568
48306
  * `DETAILED_STATUS_NOT_DELIVERED` is the ambiguous miss a caller should bound with a retry
@@ -47991,8 +50729,11 @@ Object.defineProperty(exports, "BridgeApiError", {
47991
50729
  enumerable: true,
47992
50730
  get: function () { return bridgeApi.BridgeApiError; }
47993
50731
  });
50732
+ exports.ACCOUNT_UPGRADE_DECLINED = ACCOUNT_UPGRADE_DECLINED;
47994
50733
  exports.ALLOWANCE_CHECK_CODES = ALLOWANCE_CHECK_CODES;
47995
50734
  exports.APPROVE_CODES = APPROVE_CODES;
50735
+ exports.ATOMIC_BATCH_REFUSED = ATOMIC_BATCH_REFUSED;
50736
+ exports.ATOMIC_BATCH_UNCONFIRMED = ATOMIC_BATCH_UNCONFIRMED;
47996
50737
  exports.AssetService = AssetService;
47997
50738
  exports.BACKEND_API_BASE_PATH = BACKEND_API_BASE_PATH;
47998
50739
  exports.BITCOIN_CHAIN_KEYS = BITCOIN_CHAIN_KEYS;
@@ -48189,6 +50930,7 @@ exports.clTickLensAbi = clTickLensAbi;
48189
50930
  exports.classifySponsorError = classifySponsorError;
48190
50931
  exports.concentratedLiquidityConfig = concentratedLiquidityConfig;
48191
50932
  exports.configVersionFor = configVersionFor;
50933
+ exports.confirmApprovalBatch = confirmApprovalBatch;
48192
50934
  exports.connectionAbi = connectionAbi;
48193
50935
  exports.consoleLogger = consoleLogger;
48194
50936
  exports.convertTransactionInstructionToRaw = convertTransactionInstructionToRaw;
@@ -48261,6 +51003,7 @@ exports.iconSupportedTokens = iconSupportedTokens;
48261
51003
  exports.injectiveSupportedTokens = injectiveSupportedTokens;
48262
51004
  exports.intentCreationFailed = intentCreationFailed;
48263
51005
  exports.isApprovalSupportedChainKeyType = isApprovalSupportedChainKeyType;
51006
+ exports.isAtomicBatchRefusal = isAtomicBatchRefusal;
48264
51007
  exports.isAuthFailure = isAuthFailure;
48265
51008
  exports.isAuthStatus = isAuthStatus;
48266
51009
  exports.isBackendHttpError = isBackendHttpError;
@@ -48274,6 +51017,7 @@ exports.isBridgeCreateIntentError = isBridgeCreateIntentError;
48274
51017
  exports.isBridgeError = isBridgeError;
48275
51018
  exports.isBridgeLookupError = isBridgeLookupError;
48276
51019
  exports.isBridgeOrchestrationError = isBridgeOrchestrationError;
51020
+ exports.isBridgeWithApprovalError = isBridgeWithApprovalError;
48277
51021
  exports.isCodeMember = isCodeMember;
48278
51022
  exports.isDexApproveError = isDexApproveError;
48279
51023
  exports.isDexCreateIntentError = isDexCreateIntentError;
@@ -48374,12 +51118,14 @@ exports.isSupportedBitcoinAddressType = isSupportedBitcoinAddressType;
48374
51118
  exports.isSwapCreateIntentError = isSwapCreateIntentError;
48375
51119
  exports.isSwapError = isSwapError;
48376
51120
  exports.isSwapSupportedToken = isSwapSupportedToken;
51121
+ exports.isSwapWithApprovalError = isSwapWithApprovalError;
48377
51122
  exports.isUndefinedOrValidWalletProviderForChainKey = isUndefinedOrValidWalletProviderForChainKey;
48378
51123
  exports.isUnifiedBnUSDMigrateParams = isUnifiedBnUSDMigrateParams;
48379
51124
  exports.isValidBitcoinAddress = isValidBitcoinAddress;
48380
51125
  exports.isValidInjectiveAddress = isValidInjectiveAddress;
48381
51126
  exports.isValidNearAccountId = isValidNearAccountId;
48382
51127
  exports.isValidWalletProviderForChainKey = isValidWalletProviderForChainKey;
51128
+ exports.isVaultSwapWithApprovalError = isVaultSwapWithApprovalError;
48383
51129
  exports.kaiaSupportedTokens = kaiaSupportedTokens;
48384
51130
  exports.leverageYieldConfig = leverageYieldConfig;
48385
51131
  exports.leverageYieldInvariant = leverageYieldInvariant;
@@ -48433,12 +51179,14 @@ exports.requestAddress = requestAddress;
48433
51179
  exports.requestJsonRpc = requestJsonRpc;
48434
51180
  exports.requestSigning = requestSigning;
48435
51181
  exports.resolveAnalytics = resolveAnalytics;
51182
+ exports.resolveApprovalStrategy = resolveApprovalStrategy;
48436
51183
  exports.resolveLogger = resolveLogger;
48437
51184
  exports.resolvePositionFundingAddress = resolvePositionFundingAddress;
48438
51185
  exports.retry = retry;
48439
51186
  exports.reverseEncodeAddress = reverseEncodeAddress;
48440
51187
  exports.robinhoodChain = robinhoodChain;
48441
51188
  exports.robinhoodSupportedTokens = robinhoodSupportedTokens;
51189
+ exports.sendApprovalBatch = sendApprovalBatch;
48442
51190
  exports.serializeAddressData = serializeAddressData;
48443
51191
  exports.settleWalletBalances = settleWalletBalances;
48444
51192
  exports.silentLogger = silentLogger;
@@ -48464,6 +51212,7 @@ exports.stataTokenFactoryAbi = stataTokenFactoryAbi;
48464
51212
  exports.stellarSupportedTokens = stellarSupportedTokens;
48465
51213
  exports.submitTransaction = submitTransaction;
48466
51214
  exports.suiSupportedTokens = suiSupportedTokens;
51215
+ exports.summarizeSwapStatus = summarizeSwapStatus;
48467
51216
  exports.supportedSpokeChains = supportedSpokeChains;
48468
51217
  exports.supportedTokensByChain = supportedTokensByChain;
48469
51218
  exports.swapExactInSingleParamsAbi = swapExactInSingleParamsAbi;
@@ -48491,4 +51240,5 @@ exports.waitForStacksTransaction = waitForStacksTransaction;
48491
51240
  exports.waitForTransactionReceipt = waitForTransactionReceipt;
48492
51241
  exports.waitUntilIntentExecuted = waitUntilIntentExecuted;
48493
51242
  exports.walletFactoryAbi = walletFactoryAbi;
51243
+ exports.withErrorContext = withErrorContext;
48494
51244
  exports.wrappedSonicAbi = wrappedSonicAbi;