four-flap-meme-sdk 2.2.2 → 2.2.4

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.
Files changed (472) hide show
  1. package/README.en.md +41 -6
  2. package/README.md +31 -0
  3. package/README.zh-CN.md +41 -6
  4. package/dist/__tests__/subpath-exports.test.d.ts +1 -0
  5. package/dist/__tests__/subpath-exports.test.js +64 -0
  6. package/dist/abis/common.d.ts +85 -0
  7. package/dist/abis/common.js +264 -0
  8. package/dist/abis/contracts/TaxToken.json +969 -0
  9. package/dist/abis/contracts/TokenManager2.json +136 -0
  10. package/dist/abis/contracts/index.d.ts +5 -0
  11. package/dist/abis/contracts/index.js +5 -0
  12. package/dist/abis/flap/index.d.ts +3 -0
  13. package/dist/abis/flap/index.js +3 -0
  14. package/dist/abis/flap/portal-events.d.ts +6 -0
  15. package/dist/abis/flap/portal-events.js +17 -0
  16. package/dist/abis/flap/portal.d.ts +6 -0
  17. package/dist/abis/flap/portal.js +37 -0
  18. package/dist/abis/flap/vault.d.ts +171 -0
  19. package/dist/abis/flap/vault.js +91 -0
  20. package/dist/abis/index.d.ts +8 -0
  21. package/dist/abis/index.js +11 -0
  22. package/dist/bundle-core/__tests__/config-helpers.test.d.ts +1 -0
  23. package/dist/bundle-core/__tests__/config-helpers.test.js +28 -0
  24. package/dist/bundle-core/__tests__/facade-parity.test.d.ts +1 -0
  25. package/dist/bundle-core/__tests__/facade-parity.test.js +33 -0
  26. package/dist/bundle-core/__tests__/sign-context-helpers.test.d.ts +1 -0
  27. package/dist/bundle-core/__tests__/sign-context-helpers.test.js +60 -0
  28. package/dist/bundle-core/__tests__/sign-fixture.test.d.ts +1 -0
  29. package/dist/bundle-core/__tests__/sign-fixture.test.js +220 -0
  30. package/dist/bundle-core/__tests__/sign-fixtures.d.ts +10 -0
  31. package/dist/bundle-core/__tests__/sign-fixtures.js +16 -0
  32. package/dist/bundle-core/config-helpers.d.ts +36 -0
  33. package/dist/bundle-core/config-helpers.js +57 -0
  34. package/dist/bundle-core/errors.d.ts +50 -0
  35. package/dist/bundle-core/errors.js +35 -0
  36. package/dist/bundle-core/four-meme/approve-tokenmanager.d.ts +7 -0
  37. package/dist/bundle-core/four-meme/approve-tokenmanager.js +99 -0
  38. package/dist/bundle-core/four-meme/core-helpers.d.ts +8 -0
  39. package/dist/bundle-core/four-meme/core-helpers.js +40 -0
  40. package/dist/bundle-core/four-meme/core.d.ts +4 -0
  41. package/dist/bundle-core/four-meme/core.js +515 -0
  42. package/dist/bundle-core/four-meme/pancake-proxy.d.ts +28 -0
  43. package/dist/bundle-core/four-meme/pancake-proxy.js +679 -0
  44. package/dist/bundle-core/four-meme/private.d.ts +27 -0
  45. package/dist/bundle-core/four-meme/private.js +465 -0
  46. package/dist/bundle-core/four-meme/sign-context-helpers.d.ts +2 -0
  47. package/dist/bundle-core/four-meme/sign-context-helpers.js +2 -0
  48. package/dist/bundle-core/four-meme/swap-buy-first.d.ts +8 -0
  49. package/dist/bundle-core/four-meme/swap-buy-first.js +493 -0
  50. package/dist/bundle-core/four-meme/swap-hop-helpers.d.ts +6 -0
  51. package/dist/bundle-core/four-meme/swap-hop-helpers.js +63 -0
  52. package/dist/bundle-core/four-meme/swap-internal.d.ts +3 -0
  53. package/dist/bundle-core/four-meme/swap-internal.js +18 -0
  54. package/dist/bundle-core/four-meme/swap-sign-helpers.d.ts +27 -0
  55. package/dist/bundle-core/four-meme/swap-sign-helpers.js +105 -0
  56. package/dist/bundle-core/four-meme/swap.d.ts +17 -0
  57. package/dist/bundle-core/four-meme/swap.js +505 -0
  58. package/dist/bundle-core/four-meme/types/buy-first.d.ts +50 -0
  59. package/dist/bundle-core/four-meme/types/buy-first.js +1 -0
  60. package/dist/bundle-core/four-meme/types/core-flow.d.ts +63 -0
  61. package/dist/bundle-core/four-meme/types/core-flow.js +1 -0
  62. package/dist/bundle-core/four-meme/types/index.d.ts +600 -0
  63. package/dist/bundle-core/four-meme/types/index.js +1 -0
  64. package/dist/bundle-core/four-meme/types/swap-internal.d.ts +19 -0
  65. package/dist/bundle-core/four-meme/types/swap-internal.js +1 -0
  66. package/dist/bundle-core/four-meme/types.d.ts +1 -0
  67. package/dist/bundle-core/four-meme/types.js +1 -0
  68. package/dist/bundle-core/four-meme/utils-disperse.d.ts +7 -0
  69. package/dist/bundle-core/four-meme/utils-disperse.js +396 -0
  70. package/dist/bundle-core/four-meme/utils-pairwise.d.ts +8 -0
  71. package/dist/bundle-core/four-meme/utils-pairwise.js +328 -0
  72. package/dist/bundle-core/four-meme/utils-sweep.d.ts +8 -0
  73. package/dist/bundle-core/four-meme/utils-sweep.js +744 -0
  74. package/dist/bundle-core/index.d.ts +8 -0
  75. package/dist/bundle-core/index.js +8 -0
  76. package/dist/bundle-core/internal.d.ts +21 -0
  77. package/dist/bundle-core/internal.js +182 -0
  78. package/dist/bundle-core/sign-context-helpers.d.ts +25 -0
  79. package/dist/bundle-core/sign-context-helpers.js +67 -0
  80. package/dist/bundle-core/submit.d.ts +293 -0
  81. package/dist/bundle-core/submit.js +727 -0
  82. package/dist/bundle-core/types/index.d.ts +8 -0
  83. package/dist/bundle-core/types/index.js +1 -0
  84. package/dist/bundle-core/types.d.ts +1 -0
  85. package/dist/bundle-core/types.js +1 -0
  86. package/dist/chains/bsc/four/approve-tokenmanager.d.ts +1 -26
  87. package/dist/chains/bsc/four/approve-tokenmanager.js +1 -113
  88. package/dist/chains/bsc/four/config.d.ts +5 -67
  89. package/dist/chains/bsc/four/config.js +2 -114
  90. package/dist/chains/bsc/four/core.d.ts +1 -4
  91. package/dist/chains/bsc/four/core.js +1 -592
  92. package/dist/chains/bsc/four/index.d.ts +6 -6
  93. package/dist/chains/bsc/four/index.js +6 -6
  94. package/dist/chains/bsc/four/internal.d.ts +2 -46
  95. package/dist/chains/bsc/four/internal.js +2 -239
  96. package/dist/chains/bsc/four/pancake-proxy.d.ts +1 -28
  97. package/dist/chains/bsc/four/pancake-proxy.js +1 -687
  98. package/dist/chains/bsc/four/private.d.ts +1 -27
  99. package/dist/chains/bsc/four/private.js +1 -477
  100. package/dist/chains/bsc/four/submit.d.ts +2 -315
  101. package/dist/chains/bsc/four/submit.js +2 -752
  102. package/dist/chains/bsc/four/swap-buy-first.d.ts +2 -55
  103. package/dist/chains/bsc/four/swap-buy-first.js +2 -507
  104. package/dist/chains/bsc/four/swap-internal.d.ts +1 -3
  105. package/dist/chains/bsc/four/swap-internal.js +1 -18
  106. package/dist/chains/bsc/four/swap.d.ts +2 -144
  107. package/dist/chains/bsc/four/swap.js +2 -766
  108. package/dist/chains/bsc/four/types.d.ts +1 -476
  109. package/dist/chains/bsc/four/utils-disperse.d.ts +1 -0
  110. package/dist/chains/bsc/four/utils-disperse.js +1 -0
  111. package/dist/chains/bsc/four/utils-pairwise.d.ts +1 -0
  112. package/dist/chains/bsc/four/utils-pairwise.js +1 -0
  113. package/dist/chains/bsc/four/utils-sweep.d.ts +1 -0
  114. package/dist/chains/bsc/four/utils-sweep.js +1 -0
  115. package/dist/chains/bsc/four/utils.d.ts +5 -18
  116. package/dist/chains/bsc/four/utils.js +5 -1552
  117. package/dist/chains/bsc/iro.d.ts +5 -0
  118. package/dist/chains/bsc/iro.js +4 -0
  119. package/dist/chains/bsc/pancake/bundle-buy-first-helpers.d.ts +159 -0
  120. package/dist/chains/bsc/pancake/bundle-buy-first-helpers.js +117 -0
  121. package/dist/chains/bsc/pancake/bundle-buy-first.d.ts +1 -91
  122. package/dist/chains/bsc/pancake/bundle-buy-first.js +97 -212
  123. package/dist/chains/bsc/pancake/bundle-swap-helpers.d.ts +241 -0
  124. package/dist/chains/bsc/pancake/bundle-swap-helpers.js +565 -0
  125. package/dist/chains/bsc/pancake/bundle-swap.d.ts +1 -79
  126. package/dist/chains/bsc/pancake/bundle-swap.js +114 -726
  127. package/dist/chains/bsc/pancake/index.d.ts +4 -2
  128. package/dist/chains/bsc/pancake/index.js +1 -3
  129. package/dist/chains/bsc/platforms/iro/factory.d.ts +2 -2
  130. package/dist/chains/bsc/platforms/iro/factory.js +3 -1
  131. package/dist/chains/bsc/platforms/iro/index.d.ts +5 -5
  132. package/dist/chains/bsc/platforms/iro/index.js +3 -3
  133. package/dist/chains/bsc/platforms/iro/pool.js +31 -10
  134. package/dist/chains/bsc/platforms/iro/token.js +4 -1
  135. package/dist/chains/eni/batch-router/bundle-approve.js +4 -3
  136. package/dist/chains/eni/batch-router/transfer.js +55 -25
  137. package/dist/chains/eni/batch-router/utils.js +32 -6
  138. package/dist/chains/eni/bundler/sign.js +5 -6
  139. package/dist/chains/eni/bundler/submit.js +1 -4
  140. package/dist/chains/eni/constants.js +1 -1
  141. package/dist/chains/eni/flat-aliases.d.ts +10 -0
  142. package/dist/chains/eni/flat-aliases.js +8 -0
  143. package/dist/chains/eni/index.d.ts +2 -1
  144. package/dist/chains/eni/index.js +1 -0
  145. package/dist/chains/eni/platforms/daoaas/create.js +2 -2
  146. package/dist/chains/eni/platforms/daoaas/index.d.ts +3 -3
  147. package/dist/chains/eni/platforms/daoaas/index.js +3 -3
  148. package/dist/chains/eni/platforms/daoaas/meta.js +9 -6
  149. package/dist/chains/eni/platforms/daoaas/portal-direct.js +28 -44
  150. package/dist/chains/eni/platforms/daoaas/portal.js +10 -6
  151. package/dist/chains/eni/platforms/dswap/liquidity.js +58 -26
  152. package/dist/chains/eni/platforms/fair-launch/index.d.ts +2 -2
  153. package/dist/chains/eni/platforms/fair-launch/index.js +1 -1
  154. package/dist/chains/eni/platforms/fair-launch/launcher.js +87 -46
  155. package/dist/chains/eni/platforms/fair-launch/pool.js +4 -1
  156. package/dist/chains/eni/platforms/fair-launch/presets.js +2 -2
  157. package/dist/chains/eni/platforms/iro/factory.d.ts +2 -2
  158. package/dist/chains/eni/platforms/iro/factory.js +3 -1
  159. package/dist/chains/eni/platforms/iro/index.d.ts +6 -6
  160. package/dist/chains/eni/platforms/iro/index.js +4 -4
  161. package/dist/chains/eni/platforms/iro/pool.js +90 -26
  162. package/dist/chains/eni/platforms/iro/token.js +107 -31
  163. package/dist/chains/eni/platforms/iro/whitelist.js +6 -18
  164. package/dist/chains/eni/submit.d.ts +43 -0
  165. package/dist/chains/eni/submit.js +286 -0
  166. package/dist/chains/index.d.ts +13 -0
  167. package/dist/chains/index.js +13 -0
  168. package/dist/chains/xlayer/eip7702/bundle-approve.d.ts +2 -26
  169. package/dist/chains/xlayer/eip7702/bundle-approve.js +11 -21
  170. package/dist/chains/xlayer/eip7702/bundle-buy.d.ts +2 -6
  171. package/dist/chains/xlayer/eip7702/bundle-buy.js +13 -51
  172. package/dist/chains/xlayer/eip7702/bundle-create.js +93 -59
  173. package/dist/chains/xlayer/eip7702/bundle-sell.d.ts +2 -6
  174. package/dist/chains/xlayer/eip7702/bundle-sell.js +29 -111
  175. package/dist/chains/xlayer/eip7702/bundle-swap.d.ts +3 -65
  176. package/dist/chains/xlayer/eip7702/bundle-swap.js +51 -245
  177. package/dist/chains/xlayer/eip7702/constants.d.ts +1 -16
  178. package/dist/chains/xlayer/eip7702/constants.js +3 -21
  179. package/dist/chains/xlayer/eip7702/flat-aliases.d.ts +13 -0
  180. package/dist/chains/xlayer/eip7702/flat-aliases.js +10 -0
  181. package/dist/chains/xlayer/eip7702/index.d.ts +28 -46
  182. package/dist/chains/xlayer/eip7702/index.js +28 -81
  183. package/dist/chains/xlayer/eip7702/multi-hop-transfer-helpers.d.ts +79 -0
  184. package/dist/chains/xlayer/eip7702/multi-hop-transfer-helpers.js +1 -0
  185. package/dist/chains/xlayer/eip7702/multi-hop-transfer.d.ts +2 -203
  186. package/dist/chains/xlayer/eip7702/multi-hop-transfer.js +63 -307
  187. package/dist/chains/xlayer/eip7702/transfer-context-helpers.d.ts +26 -0
  188. package/dist/chains/xlayer/eip7702/transfer-context-helpers.js +57 -0
  189. package/dist/chains/xlayer/eip7702/types.d.ts +88 -0
  190. package/dist/chains/xlayer/eip7702/utils.d.ts +0 -3
  191. package/dist/chains/xlayer/eip7702/utils.js +23 -28
  192. package/dist/chains/xlayer/eip7702/volume-helpers.d.ts +148 -0
  193. package/dist/chains/xlayer/eip7702/volume-helpers.js +48 -0
  194. package/dist/chains/xlayer/eip7702/volume.d.ts +6 -184
  195. package/dist/chains/xlayer/eip7702/volume.js +89 -164
  196. package/dist/chains/xlayer/eoa/constants.js +1 -1
  197. package/dist/chains/xlayer/eoa/dex-helpers.js +5 -5
  198. package/dist/chains/xlayer/eoa/eoa-bundle-swap-helpers.d.ts +126 -0
  199. package/dist/chains/xlayer/eoa/eoa-bundle-swap-helpers.js +228 -0
  200. package/dist/chains/xlayer/eoa/eoa-bundle-swap.d.ts +1 -95
  201. package/dist/chains/xlayer/eoa/eoa-bundle-swap.js +66 -299
  202. package/dist/chains/xlayer/eoa/eoa-wash-volume.d.ts +1 -1
  203. package/dist/chains/xlayer/eoa/eoa-wash-volume.js +18 -23
  204. package/dist/chains/xlayer/eoa/index.d.ts +10 -6
  205. package/dist/chains/xlayer/eoa/index.js +8 -23
  206. package/dist/chains/xlayer/eoa/portal-ops.js +7 -2
  207. package/dist/chains/xlayer/eoa/router-manager.js +3 -3
  208. package/dist/chains/xlayer/eoa/types.d.ts +2 -2
  209. package/dist/chains/xlayer/eoa/types.js +1 -3
  210. package/dist/chains/xlayer/index.d.ts +3 -2
  211. package/dist/chains/xlayer/index.js +4 -7
  212. package/dist/contracts/helper3.d.ts +20 -5
  213. package/dist/contracts/helper3.js +56 -20
  214. package/dist/contracts/tm-bundle-helpers.d.ts +88 -0
  215. package/dist/contracts/tm-bundle-helpers.js +72 -0
  216. package/dist/contracts/tm-bundle-merkle/approve-tokenmanager.d.ts +1 -26
  217. package/dist/contracts/tm-bundle-merkle/approve-tokenmanager.js +1 -113
  218. package/dist/contracts/tm-bundle-merkle/config.d.ts +5 -67
  219. package/dist/contracts/tm-bundle-merkle/config.js +2 -114
  220. package/dist/contracts/tm-bundle-merkle/core.d.ts +1 -4
  221. package/dist/contracts/tm-bundle-merkle/core.js +1 -591
  222. package/dist/contracts/tm-bundle-merkle/index.d.ts +5 -5
  223. package/dist/contracts/tm-bundle-merkle/index.js +5 -5
  224. package/dist/contracts/tm-bundle-merkle/internal.d.ts +2 -46
  225. package/dist/contracts/tm-bundle-merkle/internal.js +2 -238
  226. package/dist/contracts/tm-bundle-merkle/pancake-proxy.d.ts +1 -28
  227. package/dist/contracts/tm-bundle-merkle/pancake-proxy.js +1 -686
  228. package/dist/contracts/tm-bundle-merkle/private.d.ts +1 -27
  229. package/dist/contracts/tm-bundle-merkle/private.js +1 -476
  230. package/dist/contracts/tm-bundle-merkle/submit.d.ts +3 -314
  231. package/dist/contracts/tm-bundle-merkle/submit.js +3 -928
  232. package/dist/contracts/tm-bundle-merkle/swap-buy-first.d.ts +2 -55
  233. package/dist/contracts/tm-bundle-merkle/swap-buy-first.js +2 -506
  234. package/dist/contracts/tm-bundle-merkle/swap-internal.d.ts +1 -3
  235. package/dist/contracts/tm-bundle-merkle/swap-internal.js +1 -18
  236. package/dist/contracts/tm-bundle-merkle/swap.d.ts +2 -144
  237. package/dist/contracts/tm-bundle-merkle/swap.js +2 -764
  238. package/dist/contracts/tm-bundle-merkle/types.d.ts +1 -476
  239. package/dist/contracts/tm-bundle-merkle/utils-disperse.d.ts +1 -0
  240. package/dist/contracts/tm-bundle-merkle/utils-disperse.js +1 -0
  241. package/dist/contracts/tm-bundle-merkle/utils-pairwise.d.ts +1 -0
  242. package/dist/contracts/tm-bundle-merkle/utils-pairwise.js +1 -0
  243. package/dist/contracts/tm-bundle-merkle/utils-sweep.d.ts +1 -0
  244. package/dist/contracts/tm-bundle-merkle/utils-sweep.js +1 -0
  245. package/dist/contracts/tm-bundle-merkle/utils.d.ts +6 -18
  246. package/dist/contracts/tm-bundle-merkle/utils.js +6 -1501
  247. package/dist/contracts/tm-bundle.d.ts +3 -51
  248. package/dist/contracts/tm-bundle.js +108 -177
  249. package/dist/contracts/tm.d.ts +3 -2
  250. package/dist/contracts/tm.js +37 -32
  251. package/dist/contracts/tm1.js +9 -4
  252. package/dist/contracts/tm2.js +9 -4
  253. package/dist/dex/direct-router-helpers.d.ts +264 -0
  254. package/dist/dex/direct-router-helpers.js +539 -0
  255. package/dist/dex/direct-router.d.ts +3 -125
  256. package/dist/dex/direct-router.js +237 -666
  257. package/dist/dex/types.d.ts +81 -0
  258. package/dist/dex/types.js +1 -0
  259. package/dist/exports/root-bundle-and-tooling.d.ts +27 -0
  260. package/dist/exports/root-bundle-and-tooling.js +30 -0
  261. package/dist/exports/root-eni-and-bsc-iro.d.ts +26 -0
  262. package/dist/exports/root-eni-and-bsc-iro.js +66 -0
  263. package/dist/exports/root-foundations.d.ts +35 -0
  264. package/dist/exports/root-foundations.js +70 -0
  265. package/dist/exports/root-swap-dex-and-xlayer.d.ts +30 -0
  266. package/dist/exports/root-swap-dex-and-xlayer.js +78 -0
  267. package/dist/flap/index.d.ts +10 -0
  268. package/dist/flap/index.js +8 -0
  269. package/dist/flows/create.d.ts +2 -1
  270. package/dist/flows/create.js +6 -6
  271. package/dist/flows/index.d.ts +1 -0
  272. package/dist/flows/index.js +1 -0
  273. package/dist/index.d.ts +20 -85
  274. package/dist/index.js +20 -215
  275. package/dist/merkle/index.d.ts +12 -0
  276. package/dist/merkle/index.js +11 -0
  277. package/dist/shared/abis/common.d.ts +2 -83
  278. package/dist/shared/abis/common.js +2 -252
  279. package/dist/shared/abis/index.d.ts +5 -6
  280. package/dist/shared/abis/index.js +5 -7
  281. package/dist/shared/clients/blockrazor.js +39 -25
  282. package/dist/shared/clients/club48.d.ts +2 -2
  283. package/dist/shared/clients/club48.js +34 -29
  284. package/dist/shared/clients/emitservice.js +2 -0
  285. package/dist/shared/clients/four.d.ts +21 -6
  286. package/dist/shared/clients/four.js +29 -24
  287. package/dist/shared/clients/index.d.ts +8 -0
  288. package/dist/shared/clients/index.js +8 -0
  289. package/dist/shared/clients/merkle.js +27 -34
  290. package/dist/shared/constants/addresses.d.ts +1 -1
  291. package/dist/shared/constants/addresses.js +11 -2
  292. package/dist/shared/constants/chains.d.ts +1 -1
  293. package/dist/shared/constants/chains.js +1 -1
  294. package/dist/shared/constants/gas.d.ts +1 -1
  295. package/dist/shared/constants/gas.js +2 -6
  296. package/dist/shared/constants/index.d.ts +3 -0
  297. package/dist/shared/constants/index.js +1 -0
  298. package/dist/shared/constants/quote.d.ts +30 -0
  299. package/dist/shared/constants/quote.js +37 -0
  300. package/dist/shared/flap/abi.js +1 -1
  301. package/dist/shared/flap/constants.d.ts +1 -2
  302. package/dist/shared/flap/constants.js +2 -3
  303. package/dist/shared/flap/curve.js +3 -0
  304. package/dist/shared/flap/errors.d.ts +1 -4
  305. package/dist/shared/flap/errors.js +20 -1
  306. package/dist/shared/flap/index.d.ts +5 -4
  307. package/dist/shared/flap/index.js +5 -4
  308. package/dist/shared/flap/meta.d.ts +22 -18
  309. package/dist/shared/flap/meta.js +12 -17
  310. package/dist/shared/flap/permit.js +5 -2
  311. package/dist/shared/flap/pinata.d.ts +22 -6
  312. package/dist/shared/flap/pinata.js +21 -26
  313. package/dist/shared/flap/portal-bundle-merkle/config.d.ts +3 -72
  314. package/dist/shared/flap/portal-bundle-merkle/config.js +4 -124
  315. package/dist/shared/flap/portal-bundle-merkle/core-helpers.d.ts +32 -0
  316. package/dist/shared/flap/portal-bundle-merkle/core-helpers.js +83 -0
  317. package/dist/shared/flap/portal-bundle-merkle/core.d.ts +0 -4
  318. package/dist/shared/flap/portal-bundle-merkle/core.js +96 -277
  319. package/dist/shared/flap/portal-bundle-merkle/create-to-dex.d.ts +7 -2
  320. package/dist/shared/flap/portal-bundle-merkle/create-to-dex.js +107 -206
  321. package/dist/shared/flap/portal-bundle-merkle/curve-to-dex.js +100 -92
  322. package/dist/shared/flap/portal-bundle-merkle/index.d.ts +11 -7
  323. package/dist/shared/flap/portal-bundle-merkle/index.js +4 -7
  324. package/dist/shared/flap/portal-bundle-merkle/pancake-proxy.js +71 -68
  325. package/dist/shared/flap/portal-bundle-merkle/private.js +61 -114
  326. package/dist/shared/flap/portal-bundle-merkle/swap-buy-first-helpers.d.ts +125 -0
  327. package/dist/shared/flap/portal-bundle-merkle/swap-buy-first-helpers.js +113 -0
  328. package/dist/shared/flap/portal-bundle-merkle/swap-buy-first.d.ts +1 -64
  329. package/dist/shared/flap/portal-bundle-merkle/swap-buy-first.js +66 -247
  330. package/dist/shared/flap/portal-bundle-merkle/swap-helpers.d.ts +149 -0
  331. package/dist/shared/flap/portal-bundle-merkle/swap-helpers.js +259 -0
  332. package/dist/shared/flap/portal-bundle-merkle/swap.d.ts +2 -71
  333. package/dist/shared/flap/portal-bundle-merkle/swap.js +103 -410
  334. package/dist/shared/flap/portal-bundle-merkle/types.d.ts +88 -9
  335. package/dist/shared/flap/portal-bundle-merkle/utils.d.ts +1 -80
  336. package/dist/shared/flap/portal-bundle-merkle/utils.js +145 -265
  337. package/dist/shared/flap/portal-bundle.js +55 -56
  338. package/dist/shared/flap/portal-create-token.d.ts +80 -0
  339. package/dist/shared/flap/portal-create-token.js +257 -0
  340. package/dist/shared/flap/portal.d.ts +14 -3
  341. package/dist/shared/flap/portal.js +50 -25
  342. package/dist/shared/flap/vanity.d.ts +1 -5
  343. package/dist/shared/flap/vanity.js +6 -17
  344. package/dist/shared/flap/vault.d.ts +17 -124
  345. package/dist/shared/flap/vault.js +67 -148
  346. package/dist/shared/foundation/dex/v3-path.d.ts +6 -0
  347. package/dist/shared/foundation/dex/v3-path.js +35 -0
  348. package/dist/shared/foundation/gas/bundle-gas.d.ts +49 -0
  349. package/dist/shared/foundation/gas/bundle-gas.js +93 -0
  350. package/dist/shared/foundation/gas/profit-hop.d.ts +20 -0
  351. package/dist/shared/foundation/gas/profit-hop.js +72 -0
  352. package/dist/shared/foundation/index.d.ts +13 -0
  353. package/dist/shared/foundation/index.js +12 -0
  354. package/dist/shared/foundation/nonce/nonce-manager.d.ts +17 -0
  355. package/dist/shared/foundation/nonce/nonce-manager.js +183 -0
  356. package/dist/shared/foundation/normalize-unknown.d.ts +9 -0
  357. package/dist/shared/foundation/normalize-unknown.js +29 -0
  358. package/dist/shared/foundation/sdk-logger.d.ts +13 -0
  359. package/dist/shared/foundation/sdk-logger.js +12 -0
  360. package/dist/shared/foundation/tx/build-request.d.ts +17 -0
  361. package/dist/shared/foundation/tx/build-request.js +25 -0
  362. package/dist/shared/foundation/tx/sign-batch.d.ts +5 -0
  363. package/dist/shared/foundation/tx/sign-batch.js +26 -0
  364. package/dist/shared/foundation/tx/wallet-sign-patch.d.ts +1 -0
  365. package/dist/shared/foundation/tx/wallet-sign-patch.js +18 -0
  366. package/dist/shared/foundation/types/airdrop-sweep.d.ts +79 -0
  367. package/dist/shared/foundation/types/airdrop-sweep.js +1 -0
  368. package/dist/shared/foundation/types/erc20.d.ts +65 -0
  369. package/dist/shared/foundation/types/erc20.js +1 -0
  370. package/dist/shared/foundation/types/holders-maker.d.ts +64 -0
  371. package/dist/shared/foundation/types/holders-maker.js +1 -0
  372. package/dist/shared/foundation/types/index.d.ts +7 -0
  373. package/dist/shared/foundation/types/index.js +1 -0
  374. package/dist/shared/foundation/types/lp-inspect.d.ts +102 -0
  375. package/dist/shared/foundation/types/lp-inspect.js +1 -0
  376. package/dist/shared/foundation/types/multicall.d.ts +5 -0
  377. package/dist/shared/foundation/types/multicall.js +1 -0
  378. package/dist/shared/foundation/types/private-sale.d.ts +35 -0
  379. package/dist/shared/foundation/types/private-sale.js +1 -0
  380. package/dist/shared/foundation/types/quote-helpers.d.ts +17 -0
  381. package/dist/shared/foundation/types/quote-helpers.js +1 -0
  382. package/dist/shared/four/tax-token.d.ts +1 -1
  383. package/dist/shared/four/tax-token.js +27 -7
  384. package/dist/shared/index.d.ts +6 -0
  385. package/dist/shared/index.js +4 -0
  386. package/dist/types/errors.d.ts +27 -0
  387. package/dist/types/errors.js +34 -0
  388. package/dist/utils/airdrop-sweep.d.ts +4 -76
  389. package/dist/utils/airdrop-sweep.js +42 -55
  390. package/dist/utils/bundle-helpers.d.ts +9 -243
  391. package/dist/utils/bundle-helpers.js +10 -584
  392. package/dist/utils/constants.d.ts +5 -61
  393. package/dist/utils/constants.js +5 -80
  394. package/dist/utils/contract-factory.d.ts +2 -4
  395. package/dist/utils/contract-factory.js +25 -18
  396. package/dist/utils/erc20.d.ts +7 -89
  397. package/dist/utils/erc20.js +94 -125
  398. package/dist/utils/errors.d.ts +12 -1
  399. package/dist/utils/errors.js +60 -1
  400. package/dist/utils/holders-maker/addresses.d.ts +12 -0
  401. package/dist/utils/holders-maker/addresses.js +15 -0
  402. package/dist/utils/holders-maker/buy-tx.d.ts +44 -0
  403. package/dist/utils/holders-maker/buy-tx.js +278 -0
  404. package/dist/utils/holders-maker/constants.d.ts +6 -0
  405. package/dist/utils/holders-maker/constants.js +7 -0
  406. package/dist/utils/holders-maker/disperse.d.ts +18 -0
  407. package/dist/utils/holders-maker/disperse.js +90 -0
  408. package/dist/utils/holders-maker/routing.d.ts +4 -0
  409. package/dist/utils/holders-maker/routing.js +45 -0
  410. package/dist/utils/holders-maker/transfer-tx.d.ts +4 -0
  411. package/dist/utils/holders-maker/transfer-tx.js +67 -0
  412. package/dist/utils/holders-maker-helpers.d.ts +9 -0
  413. package/dist/utils/holders-maker-helpers.js +9 -0
  414. package/dist/utils/holders-maker.d.ts +2 -138
  415. package/dist/utils/holders-maker.js +26 -661
  416. package/dist/utils/hop-chains.d.ts +35 -0
  417. package/dist/utils/hop-chains.js +215 -0
  418. package/dist/utils/lp-inspect-helpers.d.ts +9 -0
  419. package/dist/utils/lp-inspect-helpers.js +109 -0
  420. package/dist/utils/lp-inspect.d.ts +2 -112
  421. package/dist/utils/lp-inspect.js +73 -223
  422. package/dist/utils/mpcExclusive.d.ts +2 -5
  423. package/dist/utils/mpcExclusive.js +4 -3
  424. package/dist/utils/private-sale.d.ts +2 -58
  425. package/dist/utils/private-sale.js +4 -15
  426. package/dist/utils/provider-factory.d.ts +4 -0
  427. package/dist/utils/provider-factory.js +10 -0
  428. package/dist/utils/quote-helpers.d.ts +4 -45
  429. package/dist/utils/quote-helpers.js +17 -74
  430. package/dist/utils/stealth-transfer.d.ts +2 -28
  431. package/dist/utils/stealth-transfer.js +31 -15
  432. package/dist/utils/swap-helpers.d.ts +2 -15
  433. package/dist/utils/swap-helpers.js +6 -11
  434. package/dist/utils/types/airdrop-sweep.d.ts +1 -0
  435. package/dist/utils/types/airdrop-sweep.js +1 -0
  436. package/dist/utils/types/contract-factory.d.ts +1 -0
  437. package/dist/utils/types/contract-factory.js +1 -0
  438. package/dist/utils/types/erc20.d.ts +1 -0
  439. package/dist/utils/types/erc20.js +1 -0
  440. package/dist/utils/types/errors.d.ts +1 -0
  441. package/dist/utils/types/errors.js +1 -0
  442. package/dist/utils/types/holders-maker.d.ts +1 -0
  443. package/dist/utils/types/holders-maker.js +1 -0
  444. package/dist/utils/types/hop-chains.d.ts +8 -0
  445. package/dist/utils/types/hop-chains.js +1 -0
  446. package/dist/utils/types/index.d.ts +13 -0
  447. package/dist/utils/types/index.js +1 -0
  448. package/dist/utils/types/lp-inspect.d.ts +1 -0
  449. package/dist/utils/types/lp-inspect.js +1 -0
  450. package/dist/utils/types/mpc-exclusive.d.ts +5 -0
  451. package/dist/utils/types/mpc-exclusive.js +1 -0
  452. package/dist/utils/types/private-sale.d.ts +1 -0
  453. package/dist/utils/types/private-sale.js +1 -0
  454. package/dist/utils/types/quote-helpers.d.ts +1 -0
  455. package/dist/utils/types/quote-helpers.js +1 -0
  456. package/dist/utils/types/stealth-transfer.d.ts +44 -0
  457. package/dist/utils/types/stealth-transfer.js +1 -0
  458. package/dist/utils/types/wallet.d.ts +25 -0
  459. package/dist/utils/types/wallet.js +1 -0
  460. package/dist/utils/wallet.d.ts +2 -25
  461. package/dist/utils/wallet.js +13 -10
  462. package/dist/vanity/index.d.ts +5 -0
  463. package/dist/vanity/index.js +5 -0
  464. package/package.json +160 -4
  465. package/src/abis/contracts/TaxToken.json +969 -0
  466. package/src/abis/contracts/TokenManager.json +836 -0
  467. package/src/abis/contracts/TokenManager2.json +136 -0
  468. package/src/abis/contracts/TokenManagerHelper3.json +993 -0
  469. package/dist/shared/abis/TaxToken.json +0 -105
  470. package/dist/shared/abis/TokenManager2.json +0 -60
  471. /package/dist/{shared/abis → abis/contracts}/TokenManager.json +0 -0
  472. /package/dist/{shared/abis → abis/contracts}/TokenManagerHelper3.json +0 -0
package/dist/index.d.ts CHANGED
@@ -1,85 +1,20 @@
1
- export * as chains from './chains/index.js';
2
- export * as Abis from './shared/abis/index.js';
3
- export { ERC20_ABI, ERC20_BALANCE_ABI, ERC20_ALLOWANCE_ABI, MULTICALL3_ABI, V2_ROUTER_ABI, V2_ROUTER_QUOTE_ABI, V3_ROUTER02_ABI, V3_ROUTER_LEGACY_ABI, V3_QUOTER_ABI, V2_FACTORY_ABI, V2_PAIR_ABI, V3_FACTORY_ABI, V3_POOL_ABI, FLAP_PORTAL_ABI, TM2_ABI, HELPER3_ABI, } from './shared/abis/common.js';
4
- export { CHAINS, CHAIN_ID_MAP, getChainById, getChainName, getDefaultRpcUrl, isKnownChain, isBscChain, isXLayerChain, isMonadChain, isEniChain, getConfirmationTimeout, GAS_LIMITS, GAS_CONFIG, calculateGasLimit, getTransferGasLimit, ADDRESSES, getMulticall3Address, getFlapPortalAddress, isZeroAddress, isNativeToken, ENI_SPENDERS, getEniSpenders, getProfitRecipient, getAllProfitRecipients, getProfitRateBps, calculateProfitAmount, calculateProfitHopGasCost, getTransferFeePerAddress, TRANSFER_FEE_PER_ADDRESS, } from './shared/constants/index.js';
5
- export { buildProfitHopTransactions, PROFIT_HOP_COUNT, } from './utils/bundle-helpers.js';
6
- export { CHAIN, DEFAULT_DEADLINE_MINUTES, } from './utils/constants.js';
7
- export { isExclusiveOnChain, isExclusiveOffChain } from './utils/mpcExclusive.js';
8
- export { ensureSellApprovalV1, checkSellApprovalV1, ensureSellApprovalV2, checkSellApprovalV2, ensureSellApproval, checkSellApproval, ensureFlapSellApproval, checkFlapSellApproval, ensureFlapSellApprovalBatch, checkFlapSellApprovalBatch, checkAllowance, approveToken, checkAllowanceBatch, approveTokenBatch, checkAllowanceRaw, approveTokenRaw, checkAllowanceBatchRaw, approveTokenBatchRaw, type EnsureAllowanceBatchItemResult, type ApproveTokenBatchParams, type ApproveTokenBatchRawParams, type ApproveTokenBatchResult, type ApproveTokenBatchSignResult } from './utils/erc20.js';
9
- export { parseFourError, type FourErrorCode } from './utils/errors.js';
10
- export { getTokenManagerV1, getTokenManagerV2, getTokenManagerHelper3, getTokenManagerV1Writer, getTokenManagerV2Writer, getTokenManagerHelper3Writer, getTokenManagerAddress, type ChainName } from './utils/contract-factory.js';
11
- export { FourClient, buildLoginMessage, type FourConfig, type GenerateNonceReq, type LoginReq, type CreateTokenReq, type CreateTokenResp, type FourTokenTaxInfo } from './shared/clients/four.js';
12
- export { createTokenOnChain, tryBuy, trySell, buyTokenWithFunds, sellToken, tradeBuy, tradeSell, type CreateOnChainParams, type TryBuyResult, type TrySellResult } from './contracts/tm.js';
13
- export { TM1, type FourChainV1 } from './contracts/tm1.js';
14
- export { TM2, type FourChainV2 } from './contracts/tm2.js';
15
- export { Helper3, Helper3Writer } from './contracts/helper3.js';
16
- export { CDPV2 } from './shared/flap/curve.js';
17
- export { FlapPortal, FlapPortalWriter, type FlapChain, type PortalConfig, type TokenStateV2, type TokenStateV3, type TokenStateV4, type TokenStateV5, type TokenStateV7, type QuoteExactInputParams, type ExactInputParams, type ExactInputV3Params, type NewTokenV3Params, type NewTokenV4Params, type NewTokenV5Params, type TaxDistributionConfig, validateTaxDistribution, TokenStatus, TokenVersion, DexThreshType, MigratorType, V3LPFeeProfile, lpFeeProfileToV3Fee, DEXId } from './shared/flap/portal.js';
18
- export { uploadTokenMeta, type TokenMetaInput } from './shared/flap/ipfs.js';
19
- export { buildPermitPiggybackAuto } from './shared/flap/permit.js';
20
- export { predictVanityTokenAddressByChain, findSaltEndingByChain } from './shared/flap/vanity.js';
21
- export { FLAP_DEFAULT_FEE_RATES, FLAP_IPFS_API_URL, FLAP_VANITY_SUFFIX, FLAP_DEX_THRESHOLDS, FLAP_TOTAL_SUPPLY, ZERO_ADDRESS, CHAIN_TAX_SUPPORT, getVanitySuffix, isChainSupportTax } from './shared/flap/constants.js';
22
- export { parseFlapError, getFlapErrorMessage, getFlapErrorMessageEn, type FlapErrorCode } from './shared/flap/errors.js';
23
- export { getFlapMetaByAddress, getFlapMetasByAddresses } from './shared/flap/meta.js';
24
- export { createTokenFlow, type CreateTokenFlowInput, type CreateTokenFlowOutput } from './flows/create.js';
25
- export { Club48Client, sendBatchPrivateTransactions, sendBackrunBundle, type BundleParams, type BundleStatus, type Club48Config } from './shared/clients/club48.js';
26
- export { MerkleClient, createMerkleClient, type MerkleConfig, type BundleParams as MerkleBundleParams, type SendBundleOptions, type BundleResult, type TransactionResult } from './shared/clients/merkle.js';
27
- export { BlockRazorClient, createBlockRazorClient, BLOCKRAZOR_BUILDER_EOA, type BlockRazorConfig, type BlockRazorBundleParams, type SendBundleOptions as BlockRazorSendBundleOptions, type BundleResult as BlockRazorBundleResult, type TransactionResult as BlockRazorTransactionResult, type IncentiveTransactionParams } from './shared/clients/blockrazor.js';
28
- export { EmitServiceClient, submitToEmitServiceBlockRazor, type EmitServiceClientConfig, type EmitServiceSubmitRequest, type EmitServiceSubmitResponse, type EmitServiceSubmitResponseData, type EmitServiceRouteConfigResponse, } from './shared/clients/emitservice.js';
29
- export { NonceManager, getOptimizedGasPrice, estimateGasWithSafety, estimateGasBatch, buildTransaction, signTransactionsBatch, signTransactionsBatchMultiWallet, validateSignedTransactions, getDeadline, encodeV3Path, decodeV3Path, getGasLimit, getGasPriceConfig, getTxType, getChainId, type GasPriceConfig, type GasEstimateConfig, type BuildTransactionOptions, type CommonBundleConfig, } from './utils/bundle-helpers.js';
30
- export { createTokenWithBundleBuy as fourCreateTokenWithBundleBuy, batchBuyWithBundle as fourBatchBuyWithBundle, batchSellWithBundle as fourBatchSellWithBundle, type FourBundleConfig, type FourCreateWithBundleBuyParams, type FourCreateWithBundleBuyResult, type FourBatchBuyParams, type FourBatchBuyResult, type FourBatchSellParams, type FourBatchSellResult } from './contracts/tm-bundle.js';
31
- export { createTokenWithBundleBuy as flapCreateTokenWithBundleBuy, batchBuyWithBundle as flapBatchBuyWithBundle, batchSellWithBundle as flapBatchSellWithBundle, type FlapBundleConfig, type FlapChainForBundle, type FlapCreateWithBundleBuyParams, type FlapCreateWithBundleBuyResult, type FlapBatchBuyParams, type FlapBatchBuyResult, type FlapBatchSellParams, type FlapBatchSellResult } from './shared/flap/portal-bundle.js';
32
- export { fourPrivateBuy, fourPrivateSell, fourBatchPrivateBuy, fourBatchPrivateSell, type FourPrivateBuyParams, type FourPrivateSellParams, type FourBatchPrivateBuyParams, type FourBatchPrivateSellParams } from './contracts/tm-bundle.js';
33
- export { flapPrivateBuy, flapPrivateSell, flapBatchPrivateBuy, flapBatchPrivateSell, type FlapPrivateBuyParams, type FlapPrivateSellParams, type FlapBatchPrivateBuyParams, type FlapBatchPrivateSellParams, type FlapBatchPrivateSellResult } from './shared/flap/portal-bundle.js';
34
- export { createTokenWithBundleBuyMerkle as flapCreateTokenWithBundleBuyMerkle, batchBuyWithBundleMerkle as flapBatchBuyWithBundleMerkle, batchSellWithBundleMerkle as flapBatchSellWithBundleMerkle, flapPrivateBuyMerkle, flapPrivateSellMerkle, flapBatchPrivateBuyMerkle, flapBatchPrivateSellMerkle, pancakeProxyBatchBuyMerkle, pancakeProxyBatchSellMerkle, approvePancakeProxy, approvePancakeProxyBatch, flapDisperseWithBundleMerkle, flapSweepWithBundleMerkle, type FlapBundleMerkleConfig, type FlapSignConfig, type FlapProfitMode, type FlapChainForMerkleBundle, type FlapCreateWithBundleBuySignParams, type FlapCreateWithBundleBuyMerkleParams, type FlapCreateWithBundleBuyMerkleResult, type FlapBatchBuySignParams, type FlapBatchBuyMerkleParams, type FlapBatchBuyMerkleResult, type FlapBatchSellSignParams, type FlapBatchSellMerkleParams, type FlapBatchSellMerkleResult, type MerkleTransactionStatus, type MerkleBundleStatus, type FlapPrivateBuyMerkleParams, type FlapPrivateSellMerkleParams, type FlapBatchPrivateBuyMerkleParams, type FlapBatchPrivateSellMerkleParams, type FlapBatchPrivateMerkleResult, type FlapPrivateTransactionResult, type PancakeProxyBatchBuyParams, type PancakeProxyBatchBuyResult, type PancakeProxyBatchSellParams, type PancakeProxyBatchSellResult, type PancakeProxyApprovalParams, type PancakeProxyApprovalBatchParams, type PancakeProxyApprovalBatchResult, type FlapDisperseSignParams, type FlapDisperseMerkleResult, type FlapSweepSignParams, type FlapSweepMerkleResult } from './shared/flap/portal-bundle-merkle/index.js';
35
- export { createTokenWithBundleBuyMerkle as fourCreateTokenWithBundleBuyMerkle, batchBuyWithBundleMerkle as fourBatchBuyWithBundleMerkle, batchSellWithBundleMerkle as fourBatchSellWithBundleMerkle, fourPrivateBuyMerkle, fourPrivateSellMerkle, fourBatchPrivateBuyMerkle, fourBatchPrivateSellMerkle, disperseWithBundleMerkle, sweepWithBundleMerkle, pairwiseTransferWithBundleMerkle, fourPancakeProxyBatchBuyMerkle, fourPancakeProxyBatchSellMerkle, approveFourPancakeProxy, approveFourPancakeProxyBatch, approveFourTokenManagerBatch, submitBundleToMerkle, submitMultipleBundles, submitMultipleBundlesParallel, submitBundleToBlockRazor, submitMultipleBundlesToBlockRazor, submitMultipleBundlesToBlockRazorParallel, type MerkleSubmitConfig, type SubmitBundleResult, type BlockRazorSubmitConfig, type BlockRazorSubmitResult, type FourBundleMerkleConfig, type FourSignConfig, type FourCreateWithBundleBuySignParams, type FourBatchBuySignParams, type FourBatchSellSignParams, type FourPrivateBuySignParams, type FourPrivateSellSignParams, type FourBatchPrivateBuySignParams, type FourBatchPrivateSellSignParams, type FourPancakeProxyBatchBuySignParams, type FourPancakeProxyBatchSellSignParams, type DisperseSignParams as FourDisperseSignParams, type SweepSignParams as FourSweepSignParams, type FourCreateWithBundleBuyMerkleParams, type FourCreateWithBundleBuyMerkleResult, type FourBatchBuyMerkleParams, type FourBatchBuyMerkleResult, type FourBatchSellMerkleParams, type FourBatchSellMerkleResult, type FourPrivateBuyMerkleParams, type FourPrivateSellMerkleParams, type FourBatchPrivateBuyMerkleParams, type FourBatchPrivateSellMerkleParams, type FourBatchPrivateMerkleResult, type FourPrivateTransactionResult, type DisperseMerkleParams, type DisperseMerkleResult, type SweepMerkleParams, type SweepMerkleResult, type FourPancakeProxyBatchBuyParams, type FourPancakeProxyBatchBuyResult, type FourPancakeProxyBatchSellParams, type FourPancakeProxyBatchSellResult, type FourPancakeProxyApprovalParams, type FourPancakeProxyApprovalBatchParams, type FourPancakeProxyApprovalBatchResult, type ApproveFourTokenManagerBatchParams, type ApproveFourTokenManagerBatchResult } from './chains/bsc/four/index.js';
36
- export { isTaxToken as fourIsTaxToken, isAntiSniperFeeMode as fourIsAntiSniperFeeMode, getCreatorType as fourGetCreatorType, getTaxTokenInfo as fourGetTaxTokenInfo, getClaimableFee as fourGetClaimableFee, getClaimedFee as fourGetClaimedFee, getUserRewardInfo as fourGetUserRewardInfo, buildClaimFeeTx as fourBuildClaimFeeTx, buildBatchClaimFeeTxs as fourBuildBatchClaimFeeTxs, validateFourTokenTaxInfo, TAX_TOKEN_ABI, TransferMode as FourTransferMode, type TaxTokenConfig as FourTaxTokenConfig, type TaxTokenRewardStats as FourTaxTokenRewardStats, type TaxTokenUserInfo as FourTaxTokenUserInfo, type TaxTokenInfo as FourTaxTokenInfo, } from './shared/four/index.js';
37
- export { PinataClient, type PinataConfig } from './shared/flap/pinata.js';
38
- export { pinFileToIPFSWithJWT, pinImageByPath, pinFileToIPFSWithJWTWeb, pinDataURLWithJWTWeb, dataURLToBlob, type PinataPinResp } from './shared/flap/pinata.js';
39
- export { generateWallets, type GeneratedWallet } from './utils/wallet.js';
40
- export { getTokenBalancesWithMulticall, type MulticallResult, type MultiTokenBalancesResult } from './utils/wallet.js';
41
- export { validatePrivateKeys, type PrivateKeyValidation } from './utils/wallet.js';
42
- export { stealthTransfer, type StealthTransferResult, type StealthTransferSimpleParams } from './utils/stealth-transfer.js';
43
- export { holdersMaker, estimateHoldersMakerCost, type HoldersMakerChain, type TradeType as HoldersMakerTradeType, type BaseTokenType, type HoldersMakerConfig, type HoldersMakerParams, type BatchResult as HoldersMakerBatchResult, type HoldersMakerResult, } from './utils/holders-maker.js';
44
- export { privateSaleMerkle, batchPrivateSaleMerkle, type PrivateSaleSignConfig, type PrivateSaleTransferParams, type BatchPrivateSaleParams, type PrivateSaleResult, } from './utils/private-sale.js';
45
- export { inspectTokenLP, getFactoryFromRouter, registerDYORSwap, registerDex, getChainConfig, type LPInfo, type LPPlatform, type InspectOptions, type DexConfig, type ChainDexConfig, } from './utils/lp-inspect.js';
46
- export { disperseWithBundle, sweepWithBundle, type DisperseSignParams, type SweepSignParams, type SignedTransactionsResult, type DisperseParams, type SweepParams, type BundleSubmitResult } from './utils/airdrop-sweep.js';
47
- export { fourBundleSwapMerkle, fourBatchSwapMerkle, fourQuickBatchSwapMerkle, type FourSwapSignConfig, type FourSwapConfig, type FourBundleSwapSignParams, type FourBundleSwapParams, type FourSwapResult, type FourBatchSwapSignParams, type FourBatchSwapResult, type FourQuickBatchSwapSignParams, type FourQuickBatchSwapResult } from './chains/bsc/four/swap.js';
48
- export { flapBundleSwapMerkle, flapBatchSwapMerkle, flapQuickBatchSwapMerkle, flapCrossSwapMerkle, type FlapSwapSignConfig, type FlapSwapConfig, type FlapBundleSwapSignParams, type FlapBundleSwapParams, type FlapSwapResult, type FlapBatchSwapSignParams, type FlapBatchSwapResult, type FlapQuickBatchSwapSignParams, type FlapQuickBatchSwapResult, type FlapCrossSwapParams, type FlapCrossSwapResult } from './shared/flap/portal-bundle-merkle/swap.js';
49
- export { pancakeBundleSwapMerkle, pancakeBatchSwapMerkle, pancakeQuickBatchSwapMerkle, pancakeCrossSwapMerkle, type PancakeSwapSignConfig, type PancakeBundleSwapSignParams, type PancakeSwapConfig, type PancakeBundleSwapParams, type PancakeSwapResult, type PancakeBatchSwapSignParams, type PancakeBatchSwapResult, type PancakeQuickBatchSwapParams, type PancakeQuickBatchSwapResult, type PancakeCrossSwapParams, type PancakeCrossSwapResult, type SwapRouteType, type V2RouteParams, type V3SingleRouteParams, type V3MultiRouteParams, type RouteParams } from './chains/bsc/pancake/bundle-swap.js';
50
- export { fourBundleBuyFirstMerkle, type FourBuyFirstConfig, type FourBundleBuyFirstParams, type FourBuyFirstSignConfig, type FourBundleBuyFirstSignParams, type FourBuyFirstResult } from './chains/bsc/four/swap-buy-first.js';
51
- export { flapBundleBuyFirstMerkle, type FlapBuyFirstSignConfig, type FlapBuyFirstConfig, type FlapBundleBuyFirstSignParams, type FlapBundleBuyFirstParams, type FlapBuyFirstResult } from './shared/flap/portal-bundle-merkle/swap-buy-first.js';
52
- export { pancakeBundleBuyFirstMerkle, type PancakeBuyFirstSignConfig, type PancakeBuyFirstConfig, type PancakeBundleBuyFirstSignParams, type PancakeBundleBuyFirstParams, type PancakeBuyFirstResult } from './chains/bsc/pancake/bundle-buy-first.js';
53
- export { flapBundleCurveToDex, type CurveToDexChain, type DexPoolType, type CurveToDexSignConfig, type CurveBuyerConfig, type DexBuyerConfig, type FlapCurveToDexParams, type FlapCurveToDexResult } from './shared/flap/portal-bundle-merkle/curve-to-dex.js';
54
- export { flapBundleCreateToDex, type CreateToDexChain, type CreateToDexSignConfig, type CreateTokenInfo, type FlapCreateToDexParams, type FlapCreateToDexResult } from './shared/flap/portal-bundle-merkle/create-to-dex.js';
55
- export { NONE_EXTENSION_ID, VAULT_TYPE_LABELS, VAULT_TYPE_CATEGORIES, VAULT_FACTORY_ADDRESSES, VAULT_PORTAL_ADDRESSES, VAULT_PORTAL_ABI, VAULT_EXTRA_CONFIG, FLAP_GUARDIAN_ADDRESSES, VAULT_FACTORY_ABI, VAULT_FACTORY_V2_ABI, VAULT_BASE_ABI, VAULT_BASE_V2_ABI, type VaultType, type TaxVaultConfig, type VaultInfo, type FieldDescriptor, type VaultDataSchema, type ApproveAction, type VaultMethodSchema, type VaultUISchema, encodeVaultData, buildVaultParams, buildNewTokenV6WithVaultParams, buildVaultExtensionParams, getVaultLaunchVanityOptions, TOKEN_TAXED_V3_VERSION, getVaultFactoryAddress, getVaultPortalAddress, queryVaultDataSchema, queryVaultUISchema, queryVaultDescription, validateVaultFactory, getVaultInfo, isValidContract, } from './shared/flap/vault.js';
56
- export { PROFIT_CONFIG } from './shared/constants/index.js';
57
- export { quoteV2, quoteV3, quote, getTokenToNativeQuote, getNativeToTokenQuote, getWrappedNativeAddress, // ✅ 来自 quote-helpers,与 shared/constants 同名但实现可能不同
58
- getStableCoins, V3_FEE_TIERS, // ✅ 来自 quote-helpers
59
- QUOTE_CONFIG, type QuoteParams, type QuoteResult, type SupportedChain, } from './utils/quote-helpers.js';
60
- export { submitDirectToRpc, submitDirectToRpcSequential, submitDirectToRpcSequentialNoWait, submitDirectToRpcParallel, submitDirectToRpcSmart, submitDirectToRpcSmart as xlayerBundleSubmit, type DirectSubmitConfig, type DirectSubmitResult, type DirectTxResult } from './chains/bsc/four/submit.js';
61
- export { submitBundleToEni, submitEniParallelThenProfit, type EniBundleSubmitConfig, type EniBundleSubmitResult, } from './contracts/tm-bundle-merkle/submit.js';
62
- export { directV2BatchBuy, directV2BatchSell, directV3BatchBuy, directV3BatchSell, getRouterAddress, DIRECT_ROUTERS, type DirectV2BuyParams, type DirectV2SellParams, type DirectV3BuyParams, type DirectV3SellParams, type DirectRouterResult, type DirectRouterSignConfig, type DexKey, type RouterVersion, } from './dex/index.js';
63
- export * as XLayer from './chains/xlayer/eoa/index.js';
64
- export { createPortalQuery as xlayerCreatePortalQuery, PortalQuery as XLayerPortalQuery, encodeBuyCall as xlayerEncodeBuyCall, encodeSellCall as xlayerEncodeSellCall, encodeApproveCall as xlayerEncodeApproveCall, parseOkb as xlayerParseOkb, formatOkb as xlayerFormatOkb, XLAYER_CHAIN_ID, FLAP_PORTAL as XLAYER_FLAP_PORTAL, ENTRYPOINT_V06 as XLAYER_ENTRYPOINT, SIMPLE_ACCOUNT_FACTORY as XLAYER_FACTORY, PARTICLE_BUNDLER_URL as XLAYER_BUNDLER_URL, WOKB as XLAYER_WOKB, POTATOSWAP_V2_ROUTER as XLAYER_POTATOSWAP_ROUTER, signEoaWashBuyTransactions as xlayerSignEoaWashBuyTransactions, signEoaWashSellTransactions as xlayerSignEoaWashSellTransactions, signEoaWashVolumeTransactions as xlayerSignEoaWashVolumeTransactions, type EoaWashPoolType as XLayerEoaWashPoolType, type EoaWashVolumeParams as XLayerEoaWashVolumeParams, type EoaWashVolumeResult as XLayerEoaWashVolumeResult, xlayerQuickBatchSwapMerkle, xlayerCrossSwapMerkle, xlayerPureCrossSwapMerkle, type XLayerEoaSwapConfig, type XLayerQuickBatchSwapParams, type XLayerQuickBatchSwapResult, type XLayerCrossSwapParams, type XLayerCrossSwapResult, type XLayerPureCrossSwapParams, type XLayerPureCrossSwapResult, type BundleSwapParams as XLayerBundleSwapParams, type BundleSwapSignParams as XLayerBundleSwapSignParams, type BundleBatchSwapParams as XLayerBundleBatchSwapParams, type BundleBatchSwapSignParams as XLayerBundleBatchSwapSignParams, type BuyFirstParams as XLayerBuyFirstParams, type BuyFirstResult as XLayerBuyFirstResult, } from './chains/xlayer/eoa/index.js';
65
- export * as XLayerEIP7702 from './chains/xlayer/eip7702/index.js';
66
- export { bundleBuy as xlayerEip7702BundleBuy, bundleSell as xlayerEip7702BundleSell, bundleApprove as xlayerEip7702BundleApprove, bundleApproveMultiSpenders as xlayerEip7702BundleApproveMultiSpenders, bundleSwap as xlayerEip7702BundleSwap, bundleBatchSwap as xlayerEip7702BundleBatchSwap, bundleMultiSwap as xlayerEip7702BundleMultiSwap, disperse as xlayerEip7702Disperse, sweep as xlayerEip7702Sweep, pairwiseTransfer as xlayerEip7702PairwiseTransfer, disperseWithHops as xlayerEip7702DisperseWithHops, sweepWithHops as xlayerEip7702SweepWithHops, washVolume as xlayerEip7702WashVolume, bundleVolume as xlayerEip7702BundleVolume, singleRoundVolume as xlayerEip7702SingleRoundVolume, makeVolume as xlayerEip7702MakeVolume, makeVolumeWithSwap as xlayerEip7702MakeVolumeWithSwap, checkApprovalStatus as xlayerEip7702CheckApprovalStatus, getProfitRecipient as xlayerEip7702GetProfitRecipient, calculateProfitAmount as xlayerEip7702CalculateProfitAmount, calculateProfitAmountByUserType as xlayerEip7702CalculateProfitAmountByUserType, calculateProfitAmountByTxCount as xlayerEip7702CalculateProfitAmountByTxCount, getProfitRateBps as xlayerEip7702GetProfitRateBps, getProfitRateBpsDouble as xlayerEip7702GetProfitRateBpsDouble, buildEIP7702Transaction as xlayerEip7702BuildTransaction, signAuthorization as xlayerEip7702SignAuthorization, signAuthorizationsBatch as xlayerEip7702SignAuthorizationsBatch, UNIFIED_DELEGATE_ADDRESS as XLAYER_EIP7702_DELEGATE_ADDRESS, MULTICALL3_ADDRESS as XLAYER_EIP7702_MULTICALL3, PROFIT_CONFIG as XLAYER_EIP7702_PROFIT_CONFIG, WOKB_ADDRESS as XLAYER_EIP7702_WOKB_ADDRESS, POTATOSWAP_V2_ROUTER as XLAYER_EIP7702_V2_ROUTER, POTATOSWAP_V3_ROUTER as XLAYER_EIP7702_V3_ROUTER, DYORSWAP_ROUTER as XLAYER_EIP7702_DYORSWAP_ROUTER, FLAP_PORTAL_ADDRESS as XLAYER_EIP7702_FLAP_PORTAL, type BundleBuyParams as XLayerEip7702BundleBuyParams, type BundleBuyResult as XLayerEip7702BundleBuyResult, type BundleSellParams as XLayerEip7702BundleSellParams, type BundleSellResult as XLayerEip7702BundleSellResult, type BundleApproveParams as XLayerEip7702BundleApproveParams, type BundleApproveResult as XLayerEip7702BundleApproveResult, type BundleApproveMultiSpendersParams as XLayerEip7702BundleApproveMultiSpendersParams, type BundleApproveMultiSpendersResult as XLayerEip7702BundleApproveMultiSpendersResult, type BundleSwapParams as XLayerEip7702BundleSwapParams, type BundleSwapResult as XLayerEip7702BundleSwapResult, type BundleMultiSwapParams as XLayerEip7702BundleMultiSwapParams, type BundleMultiSwapResult as XLayerEip7702BundleMultiSwapResult, type UserType as XLayerEip7702UserType, type DisperseParams as XLayerEip7702DisperseParams, type SweepParams as XLayerEip7702SweepParams, type PairwiseTransferParams as XLayerEip7702PairwiseTransferParams, type PairwiseTransferResult as XLayerEip7702PairwiseTransferResult, type TransferResult as XLayerEip7702TransferResult, type WashVolumeParams as XLayerEip7702WashVolumeParams, type WashVolumeResult as XLayerEip7702WashVolumeResult, type BundleVolumeParams as XLayerEip7702BundleVolumeParams, type BundleVolumeResult as XLayerEip7702BundleVolumeResult, type MakeVolumeParams as XLayerEip7702MakeVolumeParams, type MakeVolumeSignResult as XLayerEip7702MakeVolumeResult, type VolumeMode as XLayerEip7702VolumeMode, type PoolType as XLayerEip7702PoolType, type VolumeProgress as XLayerEip7702VolumeProgress, type EIP7702Config as XLayerEip7702Config, type Authorization as XLayerEip7702Authorization, type Call3Value as XLayerEip7702Call, type GeneratedWallet as XLayerEip7702GeneratedWallet, type TradeType as XLayerEip7702TradeType, type RouterType as XLayerEip7702RouterType, bundleCreateBuy as xlayerEip7702BundleCreateBuy, bundleCreateToDex as xlayerEip7702BundleCreateToDex, bundleGraduateBuy as xlayerEip7702BundleGraduateBuy, type TokenInfo as XLayerEip7702TokenInfo, type CreateTokenParams as XLayerEip7702CreateTokenParams, type AmountMode as XLayerEip7702AmountMode, type BundleCreateBuyParams as XLayerEip7702BundleCreateBuyParams, type BundleCreateBuyResult as XLayerEip7702BundleCreateBuyResult, type BundleCreateToDexParams as XLayerEip7702BundleCreateToDexParams, type BundleCreateToDexResult as XLayerEip7702BundleCreateToDexResult, type BundleGraduateBuyParams as XLayerEip7702BundleGraduateBuyParams, type BundleGraduateBuyResult as XLayerEip7702BundleGraduateBuyResult, } from './chains/xlayer/eip7702/index.js';
67
- export * as ENI from './chains/eni/index.js';
68
- export * as EniBatchRouter from './chains/eni/batch-router/index.js';
69
- export { DaoaasPortalQuery as EniPortalQuery, createPortalQuery as eniCreatePortalQuery, encodeBuyCall as eniEncodeBuyCall, encodeSellCall as eniEncodeSellCall, encodeCreateCall as eniEncodeCreateCall, applySlippage as eniApplySlippage, formatEgas as eniFormatEgas, parseEgas as eniParseEgas, directBuy as eniDirectBuy, directSell as eniDirectSell, directBatchBuy as eniDirectBatchBuy, directBatchSell as eniDirectBatchSell, directBuyForSubmit as eniDirectBuyForSubmit, directSellForSubmit as eniDirectSellForSubmit, directBatchBuyForSubmit as eniDirectBatchBuyForSubmit, directBatchSellForSubmit as eniDirectBatchSellForSubmit, directQuickSwap as eniDirectQuickSwap, directQuickSwapForSubmit as eniDirectQuickSwapForSubmit, buildProfitTransfer as eniBuildProfitTransfer, createToken as eniCreateToken, createTokenForSubmit as eniCreateTokenForSubmit, getGraduationInfo as eniGetGraduationInfo, batchGetGraduationInfo as eniBatchGetGraduationInfo, getTokenMeta as eniGetTokenMeta, getFairLaunchTokenMeta as eniGetFairLaunchTokenMeta, getTokenMetasBatch as eniGetTokenMetasBatch, DaoaasTokenStatus as EniDaoaasTokenStatus, ENI_CHAIN_ID, ENI_RPC_URL, DAOAAS_PORTAL as ENI_DAOAAS_PORTAL, DSWAP_V2_ROUTER as ENI_DSWAP_V2_ROUTER, DSWAP_V2_FACTORY as ENI_DSWAP_V2_FACTORY, DSWAP_V2_PAIR_ABI as ENI_DSWAP_V2_PAIR_ABI, WEGAS as ENI_WEGAS, } from './chains/eni/index.js';
70
- export type { DaoaasTokenState as EniDaoaasTokenState, DaoaasBuyParams as EniDaoaasBuyParams, DaoaasSellParams as EniDaoaasSellParams, DaoaasCreateParams as EniDaoaasCreateParams, DaoaasBatchBuyParams as EniDaoaasBatchBuyParams, DaoaasBatchSellParams as EniDaoaasBatchSellParams, DaoaasQuickSwapParams as EniDaoaasQuickSwapParams, DaoaasTxResult as EniDaoaasTxResult, DaoaasBatchResult as EniDaoaasBatchResult, DaoaasSubmitResult as EniDaoaasSubmitResult, PortalQueryConfig as EniPortalQueryConfig, GraduationInfo as EniGraduationInfo, DaoaasTokenMeta as EniDaoaasTokenMeta, } from './chains/eni/index.js';
71
- export { TokenLaunchType as EniTokenLaunchType, FairLauncherQuery as EniFairLauncherQuery, launchToken as eniLaunchToken, launchTokenForSubmit as eniLaunchTokenForSubmit, setTokenTradeStartTime as eniSetTokenTradeStartTime, encodeLaunchTokenCall as eniEncodeLaunchTokenCall, standardPreset as eniStandardPreset, liquidityProvidingPreset as eniLiquidityProvidingPreset, dividendPreset as eniDividendPreset, dividendBuybackPreset as eniDividendBuybackPreset, deflationaryPreset as eniDeflationaryPreset, validateLaunchParams as eniValidateLaunchParams, detectLaunchType as eniDetectLaunchType, } from './chains/eni/index.js';
72
- export type { LaunchParams as EniLaunchParams, FairLaunchTokenInfo as EniFairLaunchTokenInfo, FairLaunchQueryConfig as EniFairLaunchQueryConfig, FairLaunchCreateParams as EniFairLaunchCreateParams, FairLaunchCreateResult as EniFairLaunchCreateResult, } from './chains/eni/index.js';
73
- export { FairPoolQuery as EniFairPoolQuery, claimFromPool as eniClaimFromPool, claimFromPoolForSubmit as eniClaimFromPoolForSubmit, batchClaimForSubmit as eniBatchClaimForSubmit, } from './chains/eni/index.js';
74
- export type { PoolOverview as EniPoolOverview, PoolClaimParams as EniPoolClaimParams, PoolClaimResult as EniPoolClaimResult, } from './chains/eni/index.js';
75
- export { batchBuyPortal as eniBatchBuyPortal, batchBuyV2 as eniBatchBuyV2, batchSellPortal as eniBatchSellPortal, batchSellV2 as eniBatchSellV2, atomicSwapPortal as eniAtomicSwapPortal, batchSwapPortal as eniBatchSwapPortal, atomicSwapV2 as eniAtomicSwapV2, batchSwapV2 as eniBatchSwapV2, batchApprove as eniBatchApprove, washVolume as eniWashVolume, washVolumeV2 as eniWashVolumeV2, batchTransferEgas as eniBatchTransferEgas, batchTransferToken as eniBatchTransferToken, batchSweepToken as eniBatchSweepToken, batchSweepEgas as eniBatchSweepEgas, eniDisperseForSubmit, eniSweepForSubmit, validateBatchParams as eniValidateBatchParams, encodeBatchBuy as eniEncodeBatchBuy, encodeBatchSell as eniEncodeBatchSell, encodeAtomicSwap as eniEncodeAtomicSwap, encodeBatchSwap as eniEncodeBatchSwap, encodeAtomicSwapV2 as eniEncodeAtomicSwapV2, encodeBatchSwapV2 as eniEncodeBatchSwapV2, encodeBatchTransfer as eniEncodeBatchTransfer, encodeBatchSweepToken as eniEncodeBatchSweepToken, buildBatchRouterTx as eniBuildBatchRouterTx, estimateGas as eniEstimateGas, BATCH_ROUTER_ADDRESS as ENI_BATCH_ROUTER_ADDRESS, BATCH_ROUTER_ABI as ENI_BATCH_ROUTER_ABI, MAX_BATCH_SIZE as ENI_MAX_BATCH_SIZE, } from './chains/eni/batch-router/index.js';
76
- export type { BatchRouterConfig as EniBatchRouterConfig, BatchBuyParams as EniBatchBuyParams, BatchBuyResult as EniBatchBuyResult, BatchSellParams as EniBatchSellParams, BatchSellResult as EniBatchSellResult, AtomicSwapParams as EniAtomicSwapParams, AtomicSwapResult as EniAtomicSwapResult, BatchApproveParams as EniBatchApproveParams, BatchApproveResult as EniBatchApproveResult, BatchTransferParams as EniBatchTransferParams, BatchTransferResult as EniBatchTransferResult, WashVolumeParams as EniWashVolumeParams, WashVolumeResult as EniWashVolumeResult, BatchSweepTokenParams as EniBatchSweepTokenParams, BatchSweepTokenResult as EniBatchSweepTokenResult, BatchSweepEgasParams as EniBatchSweepEgasParams, BatchTransferTokenParams as EniBatchTransferTokenParams, EniDisperseParams, EniDisperseResult, EniSweepParams, EniSweepResult, } from './chains/eni/batch-router/index.js';
77
- export { getLPPairInfo as eniGetLPPairInfo, batchGetLPPairInfo as eniBatchGetLPPairInfo, getPairAddress as eniGetPairAddress, addLiquidityETHForSubmit as eniAddLiquidityETHForSubmit, removeLiquidityETHForSubmit as eniRemoveLiquidityETHForSubmit, addLiquidityForSubmit as eniAddLiquidityForSubmit, removeLiquidityForSubmit as eniRemoveLiquidityForSubmit, } from './chains/eni/index.js';
78
- export type { LPPairInfo as EniLPPairInfo, GetLPInfoParams as EniGetLPInfoParams, AddLiquidityETHParams as EniAddLiquidityETHParams, RemoveLiquidityETHParams as EniRemoveLiquidityETHParams, AddLiquidityParams as EniAddLiquidityParams, RemoveLiquidityParams as EniRemoveLiquidityParams, LiquidityForSubmitResult as EniLiquidityForSubmitResult, } from './chains/eni/index.js';
79
- export { EniIroFactoryQuery, eniIroEncodeCreateProjectCall, eniIroCreateProject, eniIroParseCreateProjectEvent, EniIroTokenQuery, eniIroSubscribe, eniIroPledge, eniIroBatchSubscribe, eniIroBatchSubscribeForSubmit, EniIroPoolQuery, eniIroPoolRemovePledge, eniIroPoolExtract, eniIroPoolTransferAwards, eniIroBatchExtract, ENI_IRO_FACTORY_ADDRESS, ENI_IRO_OWNER_ADDRESS, ENI_IRO_SELL_FEE_CONTRACT, ENI_IROSWAP_V2_ROUTER, ENI_IROSWAP_V2_FACTORY, ENI_IRO_FACTORY_ABI, ENI_IRO_TOKEN_ABI, ENI_IRO_POOL_ABI, ENI_IRO_PLATFORM_URL, setEniIroApiBase, eniIroApiCreateProject, eniIroApiUploadImage, eniIroGetTokenWhiteList, eniIroAddTokenWhiteListForSubmit, eniIroBatchAddTokenWhiteListForSubmit, eniIroRemoveTokenWhiteListForSubmit, ENI_IRO_OWNER_WHITELIST_ABI, } from './chains/eni/index.js';
80
- export type { EniIroCreateProjectParams, EniIroSubscribeParams, EniIroPledgeParams, EniIroTokenInfo, EniIroTxResult, EniIroCreateProjectResult, EniIroQueryConfig, EniIroCreateParams, EniIroBatchSubscribeForSubmitParams, EniIroBatchSubscribeForSubmitResult, EniWhitelistManageConfig, EniAddWhitelistParams, EniBatchAddWhitelistParams, EniRemoveWhitelistParams, EniGetWhitelistParams, } from './chains/eni/index.js';
81
- export * as EniBundler from './chains/eni/bundler/index.js';
82
- export { signOperation as eniBundlerSignOp, signTokenPull as eniBundlerSignTokenPull, signOperationsBatch as eniBundlerSignOpsBatch, getBundlerNonce as eniBundlerGetNonce, buildExecuteBatch as eniBundlerBuildExecuteBatch, buildPullAndExecute as eniBundlerBuildPullAndExecute, ENI_BUNDLER_ADDRESS, } from './chains/eni/bundler/index.js';
83
- export type { SignedOpParams as EniBundlerSignedOp, TokenPullParams as EniBundlerTokenPull, SignOpInput as EniBundlerSignOpInput, BundleSubmitResult as EniBundlerSubmitResult, } from './chains/eni/bundler/index.js';
84
- export { IroFactoryQuery as BscIroFactoryQuery, iroCreateProject as bscIroCreateProject, iroEncodeCreateProjectCall as bscIroEncodeCreateProjectCall, iroParseCreateProjectEvent as bscIroParseCreateProjectEvent, IroTokenQuery as BscIroTokenQuery, iroSubscribe as bscIroSubscribe, iroPledge as bscIroPledge, iroBatchSubscribe as bscIroBatchSubscribe, iroBatchSubscribeForSubmit as bscIroBatchSubscribeForSubmit, IroPoolQuery as BscIroPoolQuery, iroPoolRemovePledge as bscIroPoolRemovePledge, iroPoolExtract as bscIroPoolExtract, iroPoolTransferAwards as bscIroPoolTransferAwards, iroBatchExtract as bscIroBatchExtract, IRO_FACTORY_ADDRESS as BSC_IRO_FACTORY_ADDRESS, IRO_FACTORY_ABI as BSC_IRO_FACTORY_ABI, IRO_TOKEN_ABI as BSC_IRO_TOKEN_ABI, IRO_POOL_ABI as BSC_IRO_POOL_ABI, IRO_PLATFORM_URL as BSC_IRO_PLATFORM_URL, IRO_TESTNET_PLATFORM_URL as BSC_IRO_TESTNET_PLATFORM_URL, setIroApiBase as setBscIroApiBase, setIroTestApiBase as setBscIroTestApiBase, iroApiCreateProject as bscIroApiCreateProject, iroApiUploadImage as bscIroApiUploadImage, } from './chains/bsc/index.js';
85
- export type { WhiteListQuota as BscIroWhiteListQuota, IroCreateProjectParams as BscIroCreateProjectParams, IroFactoryTokenInfo as BscIroFactoryTokenInfo, IroSubscribeParams as BscIroSubscribeParams, IroPledgeParams as BscIroPledgeParams, IroTokenPrice as BscIroTokenPrice, IroPoolRemovePledgeParams as BscIroPoolRemovePledgeParams, IroPoolExtractParams as BscIroPoolExtractParams, IroPoolTransferAwardsParams as BscIroPoolTransferAwardsParams, IroTokenInfo as BscIroTokenInfo, IroTxResult as BscIroTxResult, IroCreateProjectResult as BscIroCreateProjectResult, IroQueryConfig as BscIroQueryConfig, IroCreateParams as BscIroCreateParams, IroApiCreateProjectRequest as BscIroApiCreateProjectRequest, IroBatchSubscribeForSubmitParams as BscIroBatchSubscribeForSubmitParams, IroBatchSubscribeForSubmitResult as BscIroBatchSubscribeForSubmitResult, } from './chains/bsc/platforms/iro/index.js';
1
+ /**
2
+ * SDK 公共 API 聚合入口
3
+ *
4
+ * - **实现代码**分布于 `chains/`、`contracts/`、`shared/`、`utils/`、`dex/` 等目录。
5
+ * - **扁平再导出**按域拆分至 `exports/root-*.ts`,避免单文件维护成本过高;修改导出时请编辑对应分片。
6
+ * - **命名空间导出**(`foundation` / `bundleCore` / `flows`)供新代码按层引用;`chains` 见 `root-foundations`。
7
+ *
8
+ * @see docs/ARCHITECTURE_AUDIT.zh-CN.md · docs/SDK_RESTRUCTURE.zh-CN.md · docs/MIGRATION_EXPORTS.zh-CN.md
9
+ * @see 子路径:`four-flap-meme-sdk/foundation` · `four-flap-meme-sdk/bundle-core` · `four-flap-meme-sdk/flows` · `four-flap-meme-sdk/constants`
10
+ */
11
+ export * from './exports/root-foundations.js';
12
+ export * from './exports/root-bundle-and-tooling.js';
13
+ export * from './exports/root-swap-dex-and-xlayer.js';
14
+ export * from './exports/root-eni-and-bsc-iro.js';
15
+ /** 横向基础:错误收口、Logger、共享类型、Nonce/Gas/Tx 工具 */
16
+ export * as foundation from './shared/foundation/index.js';
17
+ /** Bundle 共享核心:internal、submit、config-helpers、four-meme 实现 */
18
+ export * as bundleCore from './bundle-core/index.js';
19
+ /** 高层业务流程 */
20
+ export * as flows from './flows/index.js';
package/dist/index.js CHANGED
@@ -1,215 +1,20 @@
1
- // ============================================================================
2
- // 按链分模块导出(新架构)
3
- // ============================================================================
4
- export * as chains from './chains/index.js';
5
- // ============================================================================
6
- // 公共 ABI(统一管理)
7
- // ============================================================================
8
- export * as Abis from './shared/abis/index.js';
9
- // export * as Sol from './sol/index.js';
10
- export { ERC20_ABI, ERC20_BALANCE_ABI, ERC20_ALLOWANCE_ABI, MULTICALL3_ABI, V2_ROUTER_ABI, V2_ROUTER_QUOTE_ABI, V3_ROUTER02_ABI, V3_ROUTER_LEGACY_ABI, V3_QUOTER_ABI, V2_FACTORY_ABI, V2_PAIR_ABI, V3_FACTORY_ABI, V3_POOL_ABI, FLAP_PORTAL_ABI, TM2_ABI, HELPER3_ABI, } from './shared/abis/common.js';
11
- // ============================================================================
12
- // 公共常量(新的统一入口 - shared/constants)
13
- // ============================================================================
14
- export {
15
- // 链配置
16
- CHAINS, CHAIN_ID_MAP, getChainById, getChainName, getDefaultRpcUrl, isKnownChain, isBscChain, isXLayerChain, isMonadChain, isEniChain, getConfirmationTimeout,
17
- // Gas 常量
18
- GAS_LIMITS, GAS_CONFIG, calculateGasLimit, getTransferGasLimit,
19
- // 合约地址
20
- ADDRESSES, getMulticall3Address, getFlapPortalAddress, isZeroAddress, isNativeToken, ENI_SPENDERS, getEniSpenders,
21
- // 利润配置
22
- getProfitRecipient, getAllProfitRecipients, getProfitRateBps, calculateProfitAmount, calculateProfitHopGasCost, getTransferFeePerAddress, TRANSFER_FEE_PER_ADDRESS, } from './shared/constants/index.js';
23
- export { buildProfitHopTransactions, PROFIT_HOP_COUNT, } from './utils/bundle-helpers.js';
24
- // ============================================================================
25
- // 公共常量(向后兼容别名)
26
- // ============================================================================
27
- export { CHAIN, DEFAULT_DEADLINE_MINUTES, } from './utils/constants.js';
28
- export { isExclusiveOnChain, isExclusiveOffChain } from './utils/mpcExclusive.js';
29
- export {
30
- // Four.meme V1 授权
31
- ensureSellApprovalV1, checkSellApprovalV1,
32
- // Four.meme V2 授权
33
- ensureSellApprovalV2, checkSellApprovalV2,
34
- // Four.meme 通用授权(默认 V2)
35
- ensureSellApproval, checkSellApproval,
36
- // Flap Protocol 授权
37
- ensureFlapSellApproval, checkFlapSellApproval, ensureFlapSellApprovalBatch, checkFlapSellApprovalBatch,
38
- // ✅ 智能路由授权方法(自动选择 spender,适用于 Flap、Four、V2、V3)
39
- checkAllowance, approveToken, checkAllowanceBatch, approveTokenBatch,
40
- // ✅ 底层授权方法(手动指定 spender,适用于任意合约)
41
- checkAllowanceRaw, approveTokenRaw, checkAllowanceBatchRaw, approveTokenBatchRaw } from './utils/erc20.js';
42
- export { parseFourError } from './utils/errors.js';
43
- export { getTokenManagerV1, getTokenManagerV2, getTokenManagerHelper3, getTokenManagerV1Writer, getTokenManagerV2Writer, getTokenManagerHelper3Writer, getTokenManagerAddress } from './utils/contract-factory.js';
44
- export { FourClient, buildLoginMessage } from './shared/clients/four.js';
45
- export { createTokenOnChain, tryBuy, trySell, buyTokenWithFunds, sellToken, tradeBuy, tradeSell } from './contracts/tm.js';
46
- export { TM1 } from './contracts/tm1.js';
47
- export { TM2 } from './contracts/tm2.js';
48
- export { Helper3, Helper3Writer } from './contracts/helper3.js';
49
- export { CDPV2 } from './shared/flap/curve.js';
50
- export { FlapPortal, FlapPortalWriter, validateTaxDistribution, TokenStatus, TokenVersion, DexThreshType, MigratorType, V3LPFeeProfile, lpFeeProfileToV3Fee, DEXId } from './shared/flap/portal.js';
51
- export { uploadTokenMeta } from './shared/flap/ipfs.js';
52
- export { buildPermitPiggybackAuto } from './shared/flap/permit.js';
53
- export { predictVanityTokenAddressByChain, findSaltEndingByChain } from './shared/flap/vanity.js';
54
- export { FLAP_DEFAULT_FEE_RATES, FLAP_IPFS_API_URL, FLAP_VANITY_SUFFIX, FLAP_DEX_THRESHOLDS, FLAP_TOTAL_SUPPLY, ZERO_ADDRESS, CHAIN_TAX_SUPPORT, getVanitySuffix, isChainSupportTax } from './shared/flap/constants.js';
55
- export { parseFlapError, getFlapErrorMessage, getFlapErrorMessageEn } from './shared/flap/errors.js';
56
- export { getFlapMetaByAddress, getFlapMetasByAddresses } from './shared/flap/meta.js';
57
- export { createTokenFlow } from './flows/create.js';
58
- export { Club48Client, sendBatchPrivateTransactions, sendBackrunBundle } from './shared/clients/club48.js';
59
- export { MerkleClient, createMerkleClient } from './shared/clients/merkle.js';
60
- export { BlockRazorClient, createBlockRazorClient, BLOCKRAZOR_BUILDER_EOA } from './shared/clients/blockrazor.js';
61
- export { EmitServiceClient, submitToEmitServiceBlockRazor, } from './shared/clients/emitservice.js';
62
- export { NonceManager, getOptimizedGasPrice, estimateGasWithSafety, estimateGasBatch, buildTransaction, signTransactionsBatch, signTransactionsBatchMultiWallet, validateSignedTransactions, getDeadline, encodeV3Path, decodeV3Path, getGasLimit, getGasPriceConfig, getTxType, getChainId, } from './utils/bundle-helpers.js';
63
- export { createTokenWithBundleBuy as fourCreateTokenWithBundleBuy, batchBuyWithBundle as fourBatchBuyWithBundle, batchSellWithBundle as fourBatchSellWithBundle } from './contracts/tm-bundle.js';
64
- export { createTokenWithBundleBuy as flapCreateTokenWithBundleBuy, batchBuyWithBundle as flapBatchBuyWithBundle, batchSellWithBundle as flapBatchSellWithBundle } from './shared/flap/portal-bundle.js';
65
- export { fourPrivateBuy, fourPrivateSell, fourBatchPrivateBuy, fourBatchPrivateSell } from './contracts/tm-bundle.js';
66
- export { flapPrivateBuy, flapPrivateSell, flapBatchPrivateBuy, flapBatchPrivateSell } from './shared/flap/portal-bundle.js';
67
- export { createTokenWithBundleBuyMerkle as flapCreateTokenWithBundleBuyMerkle, batchBuyWithBundleMerkle as flapBatchBuyWithBundleMerkle, batchSellWithBundleMerkle as flapBatchSellWithBundleMerkle, flapPrivateBuyMerkle, flapPrivateSellMerkle, flapBatchPrivateBuyMerkle, flapBatchPrivateSellMerkle, pancakeProxyBatchBuyMerkle, pancakeProxyBatchSellMerkle, approvePancakeProxy, approvePancakeProxyBatch, flapDisperseWithBundleMerkle, flapSweepWithBundleMerkle } from './shared/flap/portal-bundle-merkle/index.js';
68
- export { createTokenWithBundleBuyMerkle as fourCreateTokenWithBundleBuyMerkle, batchBuyWithBundleMerkle as fourBatchBuyWithBundleMerkle, batchSellWithBundleMerkle as fourBatchSellWithBundleMerkle, fourPrivateBuyMerkle, fourPrivateSellMerkle, fourBatchPrivateBuyMerkle, fourBatchPrivateSellMerkle, disperseWithBundleMerkle, sweepWithBundleMerkle, pairwiseTransferWithBundleMerkle, fourPancakeProxyBatchBuyMerkle, fourPancakeProxyBatchSellMerkle, approveFourPancakeProxy, approveFourPancakeProxyBatch, approveFourTokenManagerBatch, submitBundleToMerkle, submitMultipleBundles, submitMultipleBundlesParallel, submitBundleToBlockRazor, submitMultipleBundlesToBlockRazor, submitMultipleBundlesToBlockRazorParallel } from './chains/bsc/four/index.js';
69
- // ✅ Four.meme TaxToken 工具(税币识别/查询/领取奖励)
70
- export { isTaxToken as fourIsTaxToken, isAntiSniperFeeMode as fourIsAntiSniperFeeMode, getCreatorType as fourGetCreatorType, getTaxTokenInfo as fourGetTaxTokenInfo, getClaimableFee as fourGetClaimableFee, getClaimedFee as fourGetClaimedFee, getUserRewardInfo as fourGetUserRewardInfo, buildClaimFeeTx as fourBuildClaimFeeTx, buildBatchClaimFeeTxs as fourBuildBatchClaimFeeTxs, validateFourTokenTaxInfo, TAX_TOKEN_ABI, TransferMode as FourTransferMode, } from './shared/four/index.js';
71
- export { PinataClient } from './shared/flap/pinata.js';
72
- export { pinFileToIPFSWithJWT, pinImageByPath, pinFileToIPFSWithJWTWeb, pinDataURLWithJWTWeb, dataURLToBlob } from './shared/flap/pinata.js';
73
- export { generateWallets } from './utils/wallet.js';
74
- export { getTokenBalancesWithMulticall } from './utils/wallet.js';
75
- export { validatePrivateKeys } from './utils/wallet.js';
76
- export { stealthTransfer } from './utils/stealth-transfer.js';
77
- // ✅ 刷持有人(一键完成:生成钱包 → 分发资金 → 批量买入)
78
- export { holdersMaker, estimateHoldersMakerCost, } from './utils/holders-maker.js';
79
- // ✅ 私募转账签名(带贿赂和利润提取)
80
- export { privateSaleMerkle, batchPrivateSaleMerkle, } from './utils/private-sale.js';
81
- export { inspectTokenLP, getFactoryFromRouter, registerDYORSwap, registerDex, getChainConfig, } from './utils/lp-inspect.js';
82
- export { disperseWithBundle, sweepWithBundle } from './utils/airdrop-sweep.js';
83
- // ============================================================
84
- // 捆绑换手功能(Bundle Swap)
85
- // ============================================================
86
- // Four内盘换手
87
- export { fourBundleSwapMerkle, fourBatchSwapMerkle, fourQuickBatchSwapMerkle } from './chains/bsc/four/swap.js';
88
- // Flap内盘换手
89
- export { flapBundleSwapMerkle, flapBatchSwapMerkle, flapQuickBatchSwapMerkle, flapCrossSwapMerkle } from './shared/flap/portal-bundle-merkle/swap.js';
90
- // PancakeSwap V2/V3通用换手
91
- export { pancakeBundleSwapMerkle, pancakeBatchSwapMerkle, pancakeQuickBatchSwapMerkle, pancakeCrossSwapMerkle } from './chains/bsc/pancake/bundle-swap.js';
92
- // 先买后卖(Buy-First)入口
93
- export { fourBundleBuyFirstMerkle } from './chains/bsc/four/swap-buy-first.js';
94
- export { flapBundleBuyFirstMerkle } from './shared/flap/portal-bundle-merkle/swap-buy-first.js';
95
- export { pancakeBundleBuyFirstMerkle } from './chains/bsc/pancake/bundle-buy-first.js';
96
- // ✅ 内盘买到外盘(Bonding Curve → DEX)- 已存在代币
97
- export { flapBundleCurveToDex } from './shared/flap/portal-bundle-merkle/curve-to-dex.js';
98
- // ✅ 发币 + 一键买到外盘(Create → Curve → DEX)- 新代币
99
- export { flapBundleCreateToDex } from './shared/flap/portal-bundle-merkle/create-to-dex.js';
100
- // ✅ Tax Vault 金库模块(基于 VaultPortal + VaultFactory 规范)
101
- export { NONE_EXTENSION_ID, VAULT_TYPE_LABELS, VAULT_TYPE_CATEGORIES, VAULT_FACTORY_ADDRESSES, VAULT_PORTAL_ADDRESSES, VAULT_PORTAL_ABI, VAULT_EXTRA_CONFIG, FLAP_GUARDIAN_ADDRESSES, VAULT_FACTORY_ABI, VAULT_FACTORY_V2_ABI, VAULT_BASE_ABI, VAULT_BASE_V2_ABI, encodeVaultData, buildVaultParams, buildNewTokenV6WithVaultParams, buildVaultExtensionParams, getVaultLaunchVanityOptions, TOKEN_TAXED_V3_VERSION, getVaultFactoryAddress, getVaultPortalAddress, queryVaultDataSchema, queryVaultUISchema, queryVaultDescription, validateVaultFactory, getVaultInfo, isValidContract, } from './shared/flap/vault.js';
102
- // ✅ 硬编码利润配置(统一管理)- 从 shared/constants 导出
103
- export { PROFIT_CONFIG } from './shared/constants/index.js';
104
- // ✅ V2/V3 报价工具(统一管理)
105
- export { quoteV2, quoteV3, quote, getTokenToNativeQuote, getNativeToTokenQuote, getWrappedNativeAddress, // ✅ 来自 quote-helpers,与 shared/constants 同名但实现可能不同
106
- getStableCoins, V3_FEE_TIERS, // ✅ 来自 quote-helpers
107
- QUOTE_CONFIG, } from './utils/quote-helpers.js';
108
- // ✅ Monad 等不支持 Bundle 的链:逐笔 RPC 广播方法(服务器端使用)
109
- export { submitDirectToRpc, submitDirectToRpcSequential, submitDirectToRpcSequentialNoWait, submitDirectToRpcParallel, submitDirectToRpcSmart, submitDirectToRpcSmart as xlayerBundleSubmit } from './chains/bsc/four/submit.js';
110
- // ✅ ENI Bundle 提交
111
- export { submitBundleToEni, submitEniParallelThenProfit, } from './contracts/tm-bundle-merkle/submit.js';
112
- // ============================================================
113
- // ✅ DEX 直接交易(不走代理合约)
114
- // ============================================================
115
- export {
116
- // V2 直接交易
117
- directV2BatchBuy, directV2BatchSell,
118
- // V3 直接交易
119
- directV3BatchBuy, directV3BatchSell,
120
- // 辅助函数
121
- getRouterAddress,
122
- // 常量
123
- DIRECT_ROUTERS, } from './dex/index.js';
124
- // ============================================================
125
- // ✅ XLayer SDK(EOA 模式 + EIP-7702)
126
- // ============================================================
127
- export * as XLayer from './chains/xlayer/eoa/index.js';
128
- export {
129
- // Portal 操作
130
- createPortalQuery as xlayerCreatePortalQuery, PortalQuery as XLayerPortalQuery, encodeBuyCall as xlayerEncodeBuyCall, encodeSellCall as xlayerEncodeSellCall, encodeApproveCall as xlayerEncodeApproveCall,
131
- // 工具函数
132
- parseOkb as xlayerParseOkb, formatOkb as xlayerFormatOkb,
133
- // 常量
134
- XLAYER_CHAIN_ID, FLAP_PORTAL as XLAYER_FLAP_PORTAL, ENTRYPOINT_V06 as XLAYER_ENTRYPOINT, SIMPLE_ACCOUNT_FACTORY as XLAYER_FACTORY, PARTICLE_BUNDLER_URL as XLAYER_BUNDLER_URL, WOKB as XLAYER_WOKB, POTATOSWAP_V2_ROUTER as XLAYER_POTATOSWAP_ROUTER,
135
- // ✅ EOA 刷量
136
- signEoaWashBuyTransactions as xlayerSignEoaWashBuyTransactions, signEoaWashSellTransactions as xlayerSignEoaWashSellTransactions, signEoaWashVolumeTransactions as xlayerSignEoaWashVolumeTransactions,
137
- // ✅ XLayer EOA 模式换手(推荐使用)
138
- xlayerQuickBatchSwapMerkle, xlayerCrossSwapMerkle, xlayerPureCrossSwapMerkle, } from './chains/xlayer/eoa/index.js';
139
- // ============================================================
140
- // ✅ XLayer EIP-7702 Bundle 模式 (新版 API - EOA 使用智能合约能力)
141
- // ============================================================
142
- export * as XLayerEIP7702 from './chains/xlayer/eip7702/index.js';
143
- // EIP-7702 批量操作(注意使用 eip7702 前缀避免与 AA 模式冲突)
144
- export { bundleBuy as xlayerEip7702BundleBuy, bundleSell as xlayerEip7702BundleSell, bundleApprove as xlayerEip7702BundleApprove, bundleApproveMultiSpenders as xlayerEip7702BundleApproveMultiSpenders, bundleSwap as xlayerEip7702BundleSwap, bundleBatchSwap as xlayerEip7702BundleBatchSwap, bundleMultiSwap as xlayerEip7702BundleMultiSwap,
145
- // 转账功能
146
- disperse as xlayerEip7702Disperse, sweep as xlayerEip7702Sweep, pairwiseTransfer as xlayerEip7702PairwiseTransfer,
147
- // 向后兼容
148
- disperseWithHops as xlayerEip7702DisperseWithHops, sweepWithHops as xlayerEip7702SweepWithHops,
149
- // 刷量
150
- washVolume as xlayerEip7702WashVolume, bundleVolume as xlayerEip7702BundleVolume, singleRoundVolume as xlayerEip7702SingleRoundVolume, makeVolume as xlayerEip7702MakeVolume, makeVolumeWithSwap as xlayerEip7702MakeVolumeWithSwap,
151
- // 工具函数
152
- checkApprovalStatus as xlayerEip7702CheckApprovalStatus, getProfitRecipient as xlayerEip7702GetProfitRecipient, calculateProfitAmount as xlayerEip7702CalculateProfitAmount, calculateProfitAmountByUserType as xlayerEip7702CalculateProfitAmountByUserType, calculateProfitAmountByTxCount as xlayerEip7702CalculateProfitAmountByTxCount, getProfitRateBps as xlayerEip7702GetProfitRateBps, getProfitRateBpsDouble as xlayerEip7702GetProfitRateBpsDouble, buildEIP7702Transaction as xlayerEip7702BuildTransaction, signAuthorization as xlayerEip7702SignAuthorization, signAuthorizationsBatch as xlayerEip7702SignAuthorizationsBatch,
153
- // 常量
154
- UNIFIED_DELEGATE_ADDRESS as XLAYER_EIP7702_DELEGATE_ADDRESS, MULTICALL3_ADDRESS as XLAYER_EIP7702_MULTICALL3, PROFIT_CONFIG as XLAYER_EIP7702_PROFIT_CONFIG, WOKB_ADDRESS as XLAYER_EIP7702_WOKB_ADDRESS, POTATOSWAP_V2_ROUTER as XLAYER_EIP7702_V2_ROUTER, POTATOSWAP_V3_ROUTER as XLAYER_EIP7702_V3_ROUTER, DYORSWAP_ROUTER as XLAYER_EIP7702_DYORSWAP_ROUTER, FLAP_PORTAL_ADDRESS as XLAYER_EIP7702_FLAP_PORTAL,
155
- // 代币创建与发射
156
- bundleCreateBuy as xlayerEip7702BundleCreateBuy, bundleCreateToDex as xlayerEip7702BundleCreateToDex, bundleGraduateBuy as xlayerEip7702BundleGraduateBuy, } from './chains/xlayer/eip7702/index.js';
157
- // ============================================================
158
- // ✅ ENI SDK(Phase 1 Direct + Phase 2 BatchRouter)
159
- // ============================================================
160
- export * as ENI from './chains/eni/index.js';
161
- export * as EniBatchRouter from './chains/eni/batch-router/index.js';
162
- export {
163
- // DAOaaS Portal 查询
164
- DaoaasPortalQuery as EniPortalQuery, createPortalQuery as eniCreatePortalQuery, encodeBuyCall as eniEncodeBuyCall, encodeSellCall as eniEncodeSellCall, encodeCreateCall as eniEncodeCreateCall, applySlippage as eniApplySlippage, formatEgas as eniFormatEgas, parseEgas as eniParseEgas,
165
- // Phase 1 Direct 模式交易
166
- directBuy as eniDirectBuy, directSell as eniDirectSell, directBatchBuy as eniDirectBatchBuy, directBatchSell as eniDirectBatchSell, directBuyForSubmit as eniDirectBuyForSubmit, directSellForSubmit as eniDirectSellForSubmit, directBatchBuyForSubmit as eniDirectBatchBuyForSubmit, directBatchSellForSubmit as eniDirectBatchSellForSubmit, directQuickSwap as eniDirectQuickSwap, directQuickSwapForSubmit as eniDirectQuickSwapForSubmit, buildProfitTransfer as eniBuildProfitTransfer,
167
- // 代币创建
168
- createToken as eniCreateToken, createTokenForSubmit as eniCreateTokenForSubmit,
169
- // 毕业状态
170
- getGraduationInfo as eniGetGraduationInfo, batchGetGraduationInfo as eniBatchGetGraduationInfo,
171
- // 代币元数据
172
- getTokenMeta as eniGetTokenMeta, getFairLaunchTokenMeta as eniGetFairLaunchTokenMeta, getTokenMetasBatch as eniGetTokenMetasBatch,
173
- // 枚举/常量
174
- DaoaasTokenStatus as EniDaoaasTokenStatus, ENI_CHAIN_ID, ENI_RPC_URL, DAOAAS_PORTAL as ENI_DAOAAS_PORTAL, DSWAP_V2_ROUTER as ENI_DSWAP_V2_ROUTER, DSWAP_V2_FACTORY as ENI_DSWAP_V2_FACTORY, DSWAP_V2_PAIR_ABI as ENI_DSWAP_V2_PAIR_ABI, WEGAS as ENI_WEGAS, } from './chains/eni/index.js';
175
- // ENI Fair Launch (公平发射 5 种模式)
176
- export { TokenLaunchType as EniTokenLaunchType, FairLauncherQuery as EniFairLauncherQuery, launchToken as eniLaunchToken, launchTokenForSubmit as eniLaunchTokenForSubmit, setTokenTradeStartTime as eniSetTokenTradeStartTime, encodeLaunchTokenCall as eniEncodeLaunchTokenCall, standardPreset as eniStandardPreset, liquidityProvidingPreset as eniLiquidityProvidingPreset, dividendPreset as eniDividendPreset, dividendBuybackPreset as eniDividendBuybackPreset, deflationaryPreset as eniDeflationaryPreset, validateLaunchParams as eniValidateLaunchParams, detectLaunchType as eniDetectLaunchType, } from './chains/eni/index.js';
177
- // ENI Fair Launch Pool (认购买入)
178
- export { FairPoolQuery as EniFairPoolQuery, claimFromPool as eniClaimFromPool, claimFromPoolForSubmit as eniClaimFromPoolForSubmit, batchClaimForSubmit as eniBatchClaimForSubmit, } from './chains/eni/index.js';
179
- // ENI BatchRouter Phase 2 (原子化批量操作)
180
- export {
181
- // 批量买卖
182
- batchBuyPortal as eniBatchBuyPortal, batchBuyV2 as eniBatchBuyV2, batchSellPortal as eniBatchSellPortal, batchSellV2 as eniBatchSellV2,
183
- // 原子换手
184
- atomicSwapPortal as eniAtomicSwapPortal, batchSwapPortal as eniBatchSwapPortal, atomicSwapV2 as eniAtomicSwapV2, batchSwapV2 as eniBatchSwapV2,
185
- // 批量授权
186
- batchApprove as eniBatchApprove,
187
- // 刷量
188
- washVolume as eniWashVolume, washVolumeV2 as eniWashVolumeV2,
189
- // 分发 / 归集
190
- batchTransferEgas as eniBatchTransferEgas, batchTransferToken as eniBatchTransferToken, batchSweepToken as eniBatchSweepToken, batchSweepEgas as eniBatchSweepEgas, eniDisperseForSubmit, eniSweepForSubmit,
191
- // 工具
192
- validateBatchParams as eniValidateBatchParams, encodeBatchBuy as eniEncodeBatchBuy, encodeBatchSell as eniEncodeBatchSell, encodeAtomicSwap as eniEncodeAtomicSwap, encodeBatchSwap as eniEncodeBatchSwap, encodeAtomicSwapV2 as eniEncodeAtomicSwapV2, encodeBatchSwapV2 as eniEncodeBatchSwapV2, encodeBatchTransfer as eniEncodeBatchTransfer, encodeBatchSweepToken as eniEncodeBatchSweepToken, buildBatchRouterTx as eniBuildBatchRouterTx, estimateGas as eniEstimateGas,
193
- // 常量
194
- BATCH_ROUTER_ADDRESS as ENI_BATCH_ROUTER_ADDRESS, BATCH_ROUTER_ABI as ENI_BATCH_ROUTER_ABI, MAX_BATCH_SIZE as ENI_MAX_BATCH_SIZE, } from './chains/eni/batch-router/index.js';
195
- // ENI DSWAP V2 流动性管理
196
- export { getLPPairInfo as eniGetLPPairInfo, batchGetLPPairInfo as eniBatchGetLPPairInfo, getPairAddress as eniGetPairAddress, addLiquidityETHForSubmit as eniAddLiquidityETHForSubmit, removeLiquidityETHForSubmit as eniRemoveLiquidityETHForSubmit, addLiquidityForSubmit as eniAddLiquidityForSubmit, removeLiquidityForSubmit as eniRemoveLiquidityForSubmit, } from './chains/eni/index.js';
197
- // ENI IRO (Initial Rights Offering)
198
- export { EniIroFactoryQuery, eniIroEncodeCreateProjectCall, eniIroCreateProject, eniIroParseCreateProjectEvent, EniIroTokenQuery, eniIroSubscribe, eniIroPledge, eniIroBatchSubscribe, eniIroBatchSubscribeForSubmit, EniIroPoolQuery, eniIroPoolRemovePledge, eniIroPoolExtract, eniIroPoolTransferAwards, eniIroBatchExtract, ENI_IRO_FACTORY_ADDRESS, ENI_IRO_OWNER_ADDRESS, ENI_IRO_SELL_FEE_CONTRACT, ENI_IROSWAP_V2_ROUTER, ENI_IROSWAP_V2_FACTORY, ENI_IRO_FACTORY_ABI, ENI_IRO_TOKEN_ABI, ENI_IRO_POOL_ABI, ENI_IRO_PLATFORM_URL, setEniIroApiBase, eniIroApiCreateProject, eniIroApiUploadImage, eniIroGetTokenWhiteList, eniIroAddTokenWhiteListForSubmit, eniIroBatchAddTokenWhiteListForSubmit, eniIroRemoveTokenWhiteListForSubmit, ENI_IRO_OWNER_WHITELIST_ABI, } from './chains/eni/index.js';
199
- // ✅ ENI Bundler — EIP-712 元交易多签名者原子执行
200
- export * as EniBundler from './chains/eni/bundler/index.js';
201
- export { signOperation as eniBundlerSignOp, signTokenPull as eniBundlerSignTokenPull, signOperationsBatch as eniBundlerSignOpsBatch, getBundlerNonce as eniBundlerGetNonce, buildExecuteBatch as eniBundlerBuildExecuteBatch, buildPullAndExecute as eniBundlerBuildPullAndExecute, ENI_BUNDLER_ADDRESS, } from './chains/eni/bundler/index.js';
202
- // ============================================================
203
- // ✅ BSC IRO 发币平台
204
- // ============================================================
205
- export {
206
- // Factory
207
- IroFactoryQuery as BscIroFactoryQuery, iroCreateProject as bscIroCreateProject, iroEncodeCreateProjectCall as bscIroEncodeCreateProjectCall, iroParseCreateProjectEvent as bscIroParseCreateProjectEvent,
208
- // Token
209
- IroTokenQuery as BscIroTokenQuery, iroSubscribe as bscIroSubscribe, iroPledge as bscIroPledge, iroBatchSubscribe as bscIroBatchSubscribe, iroBatchSubscribeForSubmit as bscIroBatchSubscribeForSubmit,
210
- // Pool
211
- IroPoolQuery as BscIroPoolQuery, iroPoolRemovePledge as bscIroPoolRemovePledge, iroPoolExtract as bscIroPoolExtract, iroPoolTransferAwards as bscIroPoolTransferAwards, iroBatchExtract as bscIroBatchExtract,
212
- // 常量
213
- IRO_FACTORY_ADDRESS as BSC_IRO_FACTORY_ADDRESS, IRO_FACTORY_ABI as BSC_IRO_FACTORY_ABI, IRO_TOKEN_ABI as BSC_IRO_TOKEN_ABI, IRO_POOL_ABI as BSC_IRO_POOL_ABI,
214
- // API (IRO 平台后端)
215
- IRO_PLATFORM_URL as BSC_IRO_PLATFORM_URL, IRO_TESTNET_PLATFORM_URL as BSC_IRO_TESTNET_PLATFORM_URL, setIroApiBase as setBscIroApiBase, setIroTestApiBase as setBscIroTestApiBase, iroApiCreateProject as bscIroApiCreateProject, iroApiUploadImage as bscIroApiUploadImage, } from './chains/bsc/index.js';
1
+ /**
2
+ * SDK 公共 API 聚合入口
3
+ *
4
+ * - **实现代码**分布于 `chains/`、`contracts/`、`shared/`、`utils/`、`dex/` 等目录。
5
+ * - **扁平再导出**按域拆分至 `exports/root-*.ts`,避免单文件维护成本过高;修改导出时请编辑对应分片。
6
+ * - **命名空间导出**(`foundation` / `bundleCore` / `flows`)供新代码按层引用;`chains` 见 `root-foundations`。
7
+ *
8
+ * @see docs/ARCHITECTURE_AUDIT.zh-CN.md · docs/SDK_RESTRUCTURE.zh-CN.md · docs/MIGRATION_EXPORTS.zh-CN.md
9
+ * @see 子路径:`four-flap-meme-sdk/foundation` · `four-flap-meme-sdk/bundle-core` · `four-flap-meme-sdk/flows` · `four-flap-meme-sdk/constants`
10
+ */
11
+ export * from './exports/root-foundations.js';
12
+ export * from './exports/root-bundle-and-tooling.js';
13
+ export * from './exports/root-swap-dex-and-xlayer.js';
14
+ export * from './exports/root-eni-and-bsc-iro.js';
15
+ /** 横向基础:错误收口、Logger、共享类型、Nonce/Gas/Tx 工具 */
16
+ export * as foundation from './shared/foundation/index.js';
17
+ /** Bundle 共享核心:internal、submit、config-helpers、four-meme 实现 */
18
+ export * as bundleCore from './bundle-core/index.js';
19
+ /** 高层业务流程 */
20
+ export * as flows from './flows/index.js';
@@ -0,0 +1,12 @@
1
+ /**
2
+ * BSC Four.meme Merkle Bundle 横向入口
3
+ *
4
+ * memeweb 分发 / 换手 / 提交可统一走 `four-flap-meme-sdk/merkle`,避免拉包根。
5
+ */
6
+ export { disperseWithBundleMerkle } from '../bundle-core/four-meme/utils-disperse.js';
7
+ export { sweepWithBundleMerkle } from '../bundle-core/four-meme/utils-sweep.js';
8
+ export { pairwiseTransferWithBundleMerkle } from '../bundle-core/four-meme/utils-pairwise.js';
9
+ export { fourBundleSwapMerkle, fourBatchSwapMerkle, fourQuickBatchSwapMerkle } from '../bundle-core/four-meme/swap.js';
10
+ export { fourBundleBuyFirstMerkle } from '../bundle-core/four-meme/swap-buy-first.js';
11
+ export { submitBundleToMerkle, submitBundleToBlockRazor, submitDirectToRpc, submitDirectToRpcSmart, type MerkleSubmitConfig, type SubmitBundleResult, type BlockRazorSubmitConfig, type DirectSubmitConfig, } from '../bundle-core/submit.js';
12
+ export type { DisperseSignParams, DisperseMerkleResult, SweepSignParams, SweepMerkleResult, FourBundleSwapSignParams, FourSwapResult, FourBatchSwapSignParams, FourBatchSwapResult, FourQuickBatchSwapSignParams, FourQuickBatchSwapResult, PairwiseTransferSignParams, PairwiseTransferMerkleResult, } from '../bundle-core/four-meme/types.js';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * BSC Four.meme Merkle Bundle 横向入口
3
+ *
4
+ * memeweb 分发 / 换手 / 提交可统一走 `four-flap-meme-sdk/merkle`,避免拉包根。
5
+ */
6
+ export { disperseWithBundleMerkle } from '../bundle-core/four-meme/utils-disperse.js';
7
+ export { sweepWithBundleMerkle } from '../bundle-core/four-meme/utils-sweep.js';
8
+ export { pairwiseTransferWithBundleMerkle } from '../bundle-core/four-meme/utils-pairwise.js';
9
+ export { fourBundleSwapMerkle, fourBatchSwapMerkle, fourQuickBatchSwapMerkle } from '../bundle-core/four-meme/swap.js';
10
+ export { fourBundleBuyFirstMerkle } from '../bundle-core/four-meme/swap-buy-first.js';
11
+ export { submitBundleToMerkle, submitBundleToBlockRazor, submitDirectToRpc, submitDirectToRpcSmart, } from '../bundle-core/submit.js';
@@ -1,85 +1,4 @@
1
1
  /**
2
- * 公共 ABI 定义
3
- *
4
- * 将重复的 ABI 提取到这里,统一管理
2
+ * @deprecated 兼容路径 — 唯一数据源见 `src/abis/common.ts`
5
3
  */
6
- /** 完整 ERC20 ABI */
7
- export declare const ERC20_ABI: string[];
8
- /** 精简 ERC20 ABI(余额查询 + decimals) */
9
- export declare const ERC20_BALANCE_ABI: string[];
10
- /** ERC20 授权相关 ABI */
11
- export declare const ERC20_ALLOWANCE_ABI: string[];
12
- export declare const MULTICALL3_ABI: string[];
13
- /** V2 Router 完整 ABI */
14
- export declare const V2_ROUTER_ABI: string[];
15
- /** V2 Router 精简 ABI(只用于报价) */
16
- export declare const V2_ROUTER_QUOTE_ABI: string[];
17
- /** V3 SwapRouter02 ABI(新版,deadline 在 multicall 中传递) */
18
- export declare const V3_ROUTER02_ABI: (string | {
19
- inputs: {
20
- components: {
21
- name: string;
22
- type: string;
23
- }[];
24
- name: string;
25
- type: string;
26
- }[];
27
- name: string;
28
- outputs: {
29
- name: string;
30
- type: string;
31
- }[];
32
- stateMutability: string;
33
- type: string;
34
- })[];
35
- /** V3 SwapRouter 旧版 ABI(deadline 在 struct 内部) */
36
- export declare const V3_ROUTER_LEGACY_ABI: (string | {
37
- inputs: {
38
- components: {
39
- name: string;
40
- type: string;
41
- }[];
42
- name: string;
43
- type: string;
44
- }[];
45
- name: string;
46
- outputs: {
47
- name: string;
48
- type: string;
49
- }[];
50
- stateMutability: string;
51
- type: string;
52
- })[];
53
- /**
54
- * SwapRouter02 的 V2 方法 ABI
55
- *
56
- * 注意:SwapRouter02 的 V2 方法只有 token-to-token 交换
57
- * 没有 swapExactETHForTokens / swapExactTokensForETH
58
- * 必须通过 multicall 组合 wrapETH/unwrapWETH9 来处理原生代币
59
- */
60
- export declare const SWAP_ROUTER02_V2_ABI: string[];
61
- /** V3 QuoterV2 ABI */
62
- export declare const V3_QUOTER_ABI: {
63
- inputs: {
64
- components: {
65
- name: string;
66
- type: string;
67
- }[];
68
- name: string;
69
- type: string;
70
- }[];
71
- name: string;
72
- outputs: {
73
- name: string;
74
- type: string;
75
- }[];
76
- stateMutability: string;
77
- type: string;
78
- }[];
79
- export declare const V2_FACTORY_ABI: string[];
80
- export declare const V2_PAIR_ABI: string[];
81
- export declare const V3_FACTORY_ABI: string[];
82
- export declare const V3_POOL_ABI: string[];
83
- export declare const FLAP_PORTAL_ABI: string[];
84
- export declare const TM2_ABI: string[];
85
- export declare const HELPER3_ABI: string[];
4
+ export * from '../../abis/common.js';