four-flap-meme-sdk 1.9.49 → 2.0.0
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/README.en.md +41 -6
- package/README.md +31 -0
- package/README.zh-CN.md +41 -6
- package/dist/abis/common.js +74 -68
- package/dist/abis/flap/vault.js +9 -7
- package/dist/abis/index.d.ts +3 -4
- package/dist/abis/index.js +3 -4
- package/dist/bundle-core/__tests__/config-helpers.test.js +28 -0
- package/dist/bundle-core/__tests__/facade-parity.test.js +33 -0
- package/dist/bundle-core/__tests__/sign-context-helpers.test.d.ts +1 -0
- package/dist/bundle-core/__tests__/sign-context-helpers.test.js +60 -0
- package/dist/bundle-core/__tests__/sign-fixture.test.d.ts +1 -0
- package/dist/bundle-core/__tests__/sign-fixture.test.js +220 -0
- package/dist/bundle-core/__tests__/sign-fixtures.d.ts +10 -0
- package/dist/bundle-core/__tests__/sign-fixtures.js +16 -0
- package/dist/bundle-core/config-helpers.d.ts +36 -0
- package/dist/bundle-core/config-helpers.js +57 -0
- package/dist/bundle-core/errors.d.ts +50 -0
- package/dist/bundle-core/errors.js +34 -0
- package/dist/bundle-core/four-meme/approve-tokenmanager.d.ts +7 -0
- package/dist/bundle-core/four-meme/approve-tokenmanager.js +99 -0
- package/dist/bundle-core/four-meme/core-helpers.d.ts +8 -0
- package/dist/bundle-core/four-meme/core-helpers.js +40 -0
- package/dist/bundle-core/four-meme/core.d.ts +4 -0
- package/dist/bundle-core/four-meme/core.js +515 -0
- package/dist/bundle-core/four-meme/pancake-proxy.d.ts +28 -0
- package/dist/bundle-core/four-meme/pancake-proxy.js +679 -0
- package/dist/bundle-core/four-meme/private.d.ts +27 -0
- package/dist/bundle-core/four-meme/private.js +465 -0
- package/dist/bundle-core/four-meme/sign-context-helpers.d.ts +2 -0
- package/dist/bundle-core/four-meme/sign-context-helpers.js +2 -0
- package/dist/bundle-core/four-meme/swap-buy-first.d.ts +8 -0
- package/dist/bundle-core/four-meme/swap-buy-first.js +493 -0
- package/dist/bundle-core/four-meme/swap-hop-helpers.d.ts +6 -0
- package/dist/bundle-core/four-meme/swap-hop-helpers.js +63 -0
- package/dist/bundle-core/four-meme/swap-internal.d.ts +3 -0
- package/dist/bundle-core/four-meme/swap-internal.js +18 -0
- package/dist/bundle-core/four-meme/swap-sign-helpers.d.ts +27 -0
- package/dist/bundle-core/four-meme/swap-sign-helpers.js +105 -0
- package/dist/bundle-core/four-meme/swap.d.ts +17 -0
- package/dist/bundle-core/four-meme/swap.js +505 -0
- package/dist/bundle-core/four-meme/types/buy-first.d.ts +50 -0
- package/dist/bundle-core/four-meme/types/buy-first.js +1 -0
- package/dist/bundle-core/four-meme/types/core-flow.d.ts +63 -0
- package/dist/bundle-core/four-meme/types/core-flow.js +1 -0
- package/dist/bundle-core/four-meme/types/index.d.ts +600 -0
- package/dist/bundle-core/four-meme/types/index.js +1 -0
- package/dist/bundle-core/four-meme/types/swap-internal.d.ts +19 -0
- package/dist/bundle-core/four-meme/types/swap-internal.js +1 -0
- package/dist/bundle-core/four-meme/types.d.ts +1 -0
- package/dist/bundle-core/four-meme/types.js +1 -0
- package/dist/bundle-core/four-meme/utils-disperse.d.ts +7 -0
- package/dist/bundle-core/four-meme/utils-disperse.js +396 -0
- package/dist/bundle-core/four-meme/utils-pairwise.d.ts +8 -0
- package/dist/bundle-core/four-meme/utils-pairwise.js +328 -0
- package/dist/bundle-core/four-meme/utils-sweep.d.ts +8 -0
- package/dist/bundle-core/four-meme/utils-sweep.js +744 -0
- package/dist/bundle-core/index.d.ts +8 -0
- package/dist/bundle-core/index.js +8 -0
- package/dist/bundle-core/internal.d.ts +21 -0
- package/dist/bundle-core/internal.js +182 -0
- package/dist/bundle-core/sign-context-helpers.d.ts +25 -0
- package/dist/bundle-core/sign-context-helpers.js +67 -0
- package/dist/bundle-core/submit.d.ts +293 -0
- package/dist/bundle-core/submit.js +727 -0
- package/dist/bundle-core/types/index.d.ts +8 -0
- package/dist/bundle-core/types/index.js +1 -0
- package/dist/bundle-core/types.d.ts +1 -0
- package/dist/bundle-core/types.js +1 -0
- package/dist/chains/bsc/four/approve-tokenmanager.d.ts +1 -26
- package/dist/chains/bsc/four/approve-tokenmanager.js +1 -116
- package/dist/chains/bsc/four/config.d.ts +5 -70
- package/dist/chains/bsc/four/config.js +2 -115
- package/dist/chains/bsc/four/core.d.ts +1 -4
- package/dist/chains/bsc/four/core.js +1 -589
- package/dist/chains/bsc/four/disperse.d.ts +12 -0
- package/dist/chains/bsc/four/disperse.js +470 -0
- package/dist/chains/bsc/four/index.d.ts +6 -6
- package/dist/chains/bsc/four/index.js +6 -6
- package/dist/chains/bsc/four/internal.d.ts +2 -50
- package/dist/chains/bsc/four/internal.js +2 -237
- package/dist/chains/bsc/four/pairwise.d.ts +7 -0
- package/dist/chains/bsc/four/pairwise.js +308 -0
- package/dist/chains/bsc/four/pancake-proxy.d.ts +1 -28
- package/dist/chains/bsc/four/pancake-proxy.js +1 -688
- package/dist/chains/bsc/four/private.d.ts +1 -27
- package/dist/chains/bsc/four/private.js +1 -477
- package/dist/chains/bsc/four/submit.d.ts +2 -315
- package/dist/chains/bsc/four/submit.js +2 -746
- package/dist/chains/bsc/four/swap-buy-first.d.ts +2 -55
- package/dist/chains/bsc/four/swap-buy-first.js +2 -506
- package/dist/chains/bsc/four/swap-internal.d.ts +1 -3
- package/dist/chains/bsc/four/swap-internal.js +1 -18
- package/dist/chains/bsc/four/swap.d.ts +2 -144
- package/dist/chains/bsc/four/swap.js +2 -760
- package/dist/chains/bsc/four/sweep.d.ts +13 -0
- package/dist/chains/bsc/four/sweep.js +788 -0
- package/dist/chains/bsc/four/types.d.ts +1 -476
- package/dist/chains/bsc/four/utils-disperse.d.ts +1 -0
- package/dist/chains/bsc/four/utils-disperse.js +1 -0
- package/dist/chains/bsc/four/utils-pairwise.d.ts +1 -0
- package/dist/chains/bsc/four/utils-pairwise.js +1 -0
- package/dist/chains/bsc/four/utils-sweep.d.ts +1 -0
- package/dist/chains/bsc/four/utils-sweep.js +1 -0
- package/dist/chains/bsc/four/utils.d.ts +5 -18
- package/dist/chains/bsc/four/utils.js +5 -1534
- package/dist/chains/bsc/pancake/bundle-buy-first-helpers.d.ts +159 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-helpers.js +117 -0
- package/dist/chains/bsc/pancake/bundle-buy-first.d.ts +1 -91
- package/dist/chains/bsc/pancake/bundle-buy-first.js +97 -207
- package/dist/chains/bsc/pancake/bundle-swap-helpers.d.ts +241 -0
- package/dist/chains/bsc/pancake/bundle-swap-helpers.js +565 -0
- package/dist/chains/bsc/pancake/bundle-swap.d.ts +1 -79
- package/dist/chains/bsc/pancake/bundle-swap.js +111 -686
- package/dist/chains/bsc/pancake/index.d.ts +4 -2
- package/dist/chains/bsc/pancake/index.js +1 -3
- package/dist/chains/bsc/platforms/iro/factory.js +3 -1
- package/dist/chains/bsc/platforms/iro/index.d.ts +5 -5
- package/dist/chains/bsc/platforms/iro/index.js +3 -3
- package/dist/chains/bsc/platforms/iro/pool.js +31 -10
- package/dist/chains/bsc/platforms/iro/token.js +4 -1
- package/dist/chains/eni/batch-router/bundle-approve.js +4 -3
- package/dist/chains/eni/batch-router/transfer.js +54 -23
- package/dist/chains/eni/batch-router/utils.js +32 -6
- package/dist/chains/eni/bundler/sign.js +4 -4
- package/dist/chains/eni/bundler/submit.js +1 -4
- package/dist/chains/eni/constants.js +1 -1
- package/dist/chains/eni/index.d.ts +1 -1
- package/dist/chains/eni/platforms/daoaas/create.js +2 -2
- package/dist/chains/eni/platforms/daoaas/index.d.ts +3 -3
- package/dist/chains/eni/platforms/daoaas/index.js +3 -3
- package/dist/chains/eni/platforms/daoaas/meta.js +8 -4
- package/dist/chains/eni/platforms/daoaas/portal-direct.js +28 -43
- package/dist/chains/eni/platforms/daoaas/portal.js +10 -6
- package/dist/chains/eni/platforms/dswap/liquidity.js +58 -26
- package/dist/chains/eni/platforms/fair-launch/index.d.ts +2 -2
- package/dist/chains/eni/platforms/fair-launch/index.js +1 -1
- package/dist/chains/eni/platforms/fair-launch/launcher.js +87 -47
- package/dist/chains/eni/platforms/fair-launch/pool.js +4 -1
- package/dist/chains/eni/platforms/fair-launch/presets.js +2 -2
- package/dist/chains/eni/platforms/iro/factory.js +3 -1
- package/dist/chains/eni/platforms/iro/index.d.ts +6 -6
- package/dist/chains/eni/platforms/iro/index.js +4 -4
- package/dist/chains/eni/platforms/iro/pool.js +90 -26
- package/dist/chains/eni/platforms/iro/token.js +107 -31
- package/dist/chains/eni/platforms/iro/whitelist.js +6 -18
- package/dist/chains/eni/submit.js +5 -13
- package/dist/chains/xlayer/eip7702/bundle-approve.d.ts +2 -26
- package/dist/chains/xlayer/eip7702/bundle-approve.js +11 -20
- package/dist/chains/xlayer/eip7702/bundle-buy.d.ts +2 -6
- package/dist/chains/xlayer/eip7702/bundle-buy.js +13 -51
- package/dist/chains/xlayer/eip7702/bundle-create.js +93 -56
- package/dist/chains/xlayer/eip7702/bundle-sell.d.ts +2 -6
- package/dist/chains/xlayer/eip7702/bundle-sell.js +26 -74
- package/dist/chains/xlayer/eip7702/bundle-swap.d.ts +3 -65
- package/dist/chains/xlayer/eip7702/bundle-swap.js +51 -68
- package/dist/chains/xlayer/eip7702/constants.d.ts +1 -16
- package/dist/chains/xlayer/eip7702/constants.js +3 -21
- package/dist/chains/xlayer/eip7702/index.d.ts +27 -46
- package/dist/chains/xlayer/eip7702/index.js +27 -81
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-helpers.d.ts +79 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-helpers.js +1 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer.d.ts +2 -203
- package/dist/chains/xlayer/eip7702/multi-hop-transfer.js +58 -291
- package/dist/chains/xlayer/eip7702/transfer-context-helpers.d.ts +26 -0
- package/dist/chains/xlayer/eip7702/transfer-context-helpers.js +57 -0
- package/dist/chains/xlayer/eip7702/types.d.ts +88 -0
- package/dist/chains/xlayer/eip7702/utils.d.ts +0 -3
- package/dist/chains/xlayer/eip7702/utils.js +23 -28
- package/dist/chains/xlayer/eip7702/volume-helpers.d.ts +148 -0
- package/dist/chains/xlayer/eip7702/volume-helpers.js +48 -0
- package/dist/chains/xlayer/eip7702/volume.d.ts +6 -184
- package/dist/chains/xlayer/eip7702/volume.js +83 -158
- package/dist/chains/xlayer/eoa/constants.js +1 -1
- package/dist/chains/xlayer/eoa/dex-helpers.js +5 -5
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-helpers.d.ts +126 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-helpers.js +228 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap.d.ts +1 -95
- package/dist/chains/xlayer/eoa/eoa-bundle-swap.js +64 -276
- package/dist/chains/xlayer/eoa/eoa-wash-volume.d.ts +1 -1
- package/dist/chains/xlayer/eoa/eoa-wash-volume.js +14 -14
- package/dist/chains/xlayer/eoa/index.d.ts +10 -6
- package/dist/chains/xlayer/eoa/index.js +8 -23
- package/dist/chains/xlayer/eoa/portal-ops.js +7 -2
- package/dist/chains/xlayer/eoa/router-manager.js +3 -3
- package/dist/chains/xlayer/eoa/types-core.d.ts +363 -0
- package/dist/chains/xlayer/eoa/types-core.js +53 -0
- package/dist/chains/xlayer/eoa/types-create.d.ts +413 -0
- package/dist/chains/xlayer/eoa/types-create.js +9 -0
- package/dist/chains/xlayer/eoa/types-volume.d.ts +209 -0
- package/dist/chains/xlayer/eoa/types-volume.js +13 -0
- package/dist/chains/xlayer/eoa/types.d.ts +2 -2
- package/dist/chains/xlayer/eoa/types.js +1 -3
- package/dist/contracts/helper3.d.ts +20 -17
- package/dist/contracts/helper3.js +56 -20
- package/dist/contracts/tm-bundle-helpers.d.ts +88 -0
- package/dist/contracts/tm-bundle-helpers.js +72 -0
- package/dist/contracts/tm-bundle-merkle/approve-tokenmanager.d.ts +1 -26
- package/dist/contracts/tm-bundle-merkle/approve-tokenmanager.js +1 -117
- package/dist/contracts/tm-bundle-merkle/config.d.ts +5 -70
- package/dist/contracts/tm-bundle-merkle/config.js +2 -115
- package/dist/contracts/tm-bundle-merkle/core.d.ts +1 -4
- package/dist/contracts/tm-bundle-merkle/core.js +1 -588
- package/dist/contracts/tm-bundle-merkle/index.d.ts +5 -5
- package/dist/contracts/tm-bundle-merkle/index.js +5 -5
- package/dist/contracts/tm-bundle-merkle/internal.d.ts +2 -50
- package/dist/contracts/tm-bundle-merkle/internal.js +2 -236
- package/dist/contracts/tm-bundle-merkle/pancake-proxy.d.ts +1 -28
- package/dist/contracts/tm-bundle-merkle/pancake-proxy.js +1 -687
- package/dist/contracts/tm-bundle-merkle/private.d.ts +1 -27
- package/dist/contracts/tm-bundle-merkle/private.js +1 -476
- package/dist/contracts/tm-bundle-merkle/submit.d.ts +3 -314
- package/dist/contracts/tm-bundle-merkle/submit.js +3 -919
- package/dist/contracts/tm-bundle-merkle/swap-buy-first.d.ts +2 -55
- package/dist/contracts/tm-bundle-merkle/swap-buy-first.js +2 -505
- package/dist/contracts/tm-bundle-merkle/swap-internal.d.ts +1 -3
- package/dist/contracts/tm-bundle-merkle/swap-internal.js +1 -18
- package/dist/contracts/tm-bundle-merkle/swap.d.ts +2 -144
- package/dist/contracts/tm-bundle-merkle/swap.js +2 -757
- package/dist/contracts/tm-bundle-merkle/types.d.ts +1 -476
- package/dist/contracts/tm-bundle-merkle/utils-disperse.d.ts +1 -0
- package/dist/contracts/tm-bundle-merkle/utils-disperse.js +1 -0
- package/dist/contracts/tm-bundle-merkle/utils-pairwise.d.ts +1 -0
- package/dist/contracts/tm-bundle-merkle/utils-pairwise.js +1 -0
- package/dist/contracts/tm-bundle-merkle/utils-sweep.d.ts +1 -0
- package/dist/contracts/tm-bundle-merkle/utils-sweep.js +1 -0
- package/dist/contracts/tm-bundle-merkle/utils.d.ts +5 -6
- package/dist/contracts/tm-bundle-merkle/utils.js +5 -6
- package/dist/contracts/tm-bundle.d.ts +3 -51
- package/dist/contracts/tm-bundle.js +102 -142
- package/dist/contracts/tm.d.ts +3 -2
- package/dist/contracts/tm.js +36 -32
- package/dist/contracts/tm1.js +9 -4
- package/dist/contracts/tm2.js +9 -4
- package/dist/dex/direct-router-helpers.d.ts +264 -0
- package/dist/dex/direct-router-helpers.js +539 -0
- package/dist/dex/direct-router.d.ts +3 -125
- package/dist/dex/direct-router.js +237 -652
- package/dist/dex/types.d.ts +81 -0
- package/dist/dex/types.js +1 -0
- package/dist/exports/root-bundle-and-tooling.d.ts +27 -0
- package/dist/exports/root-bundle-and-tooling.js +30 -0
- package/dist/exports/root-eni-and-bsc-iro.d.ts +26 -0
- package/dist/exports/root-eni-and-bsc-iro.js +66 -0
- package/dist/exports/root-foundations.d.ts +35 -0
- package/dist/exports/root-foundations.js +70 -0
- package/dist/exports/root-swap-dex-and-xlayer.d.ts +30 -0
- package/dist/exports/root-swap-dex-and-xlayer.js +78 -0
- package/dist/flows/create.d.ts +2 -2
- package/dist/flows/create.js +6 -6
- package/dist/flows/index.d.ts +1 -0
- package/dist/flows/index.js +1 -0
- package/dist/index.d.ts +20 -91
- package/dist/index.js +20 -215
- package/dist/shared/abis/common.d.ts +2 -83
- package/dist/shared/abis/common.js +2 -252
- package/dist/shared/abis/index.d.ts +5 -6
- package/dist/shared/abis/index.js +5 -7
- package/dist/shared/clients/blockrazor.js +41 -24
- package/dist/shared/clients/club48.js +30 -26
- package/dist/shared/clients/emitservice.js +2 -0
- package/dist/shared/clients/four.js +23 -18
- package/dist/shared/clients/index.d.ts +8 -0
- package/dist/shared/clients/index.js +8 -0
- package/dist/shared/clients/merkle.js +26 -30
- package/dist/shared/constants/addresses.d.ts +1 -1
- package/dist/shared/constants/addresses.js +11 -2
- package/dist/shared/constants/chains.d.ts +1 -1
- package/dist/shared/constants/chains.js +1 -1
- package/dist/shared/constants/gas.d.ts +1 -1
- package/dist/shared/constants/gas.js +2 -6
- package/dist/shared/constants/index.d.ts +1 -0
- package/dist/shared/constants/index.js +1 -0
- package/dist/shared/constants/quote.d.ts +30 -0
- package/dist/shared/constants/quote.js +37 -0
- package/dist/shared/flap/__tests__/curve.test.js +3 -3
- package/dist/shared/flap/abi.js +1 -1
- package/dist/shared/flap/constants.d.ts +1 -1
- package/dist/shared/flap/constants.js +2 -2
- package/dist/shared/flap/curve.js +3 -0
- package/dist/shared/flap/errors.d.ts +1 -4
- package/dist/shared/flap/errors.js +21 -3
- package/dist/shared/flap/index.d.ts +2 -2
- package/dist/shared/flap/index.js +2 -2
- package/dist/shared/flap/meta.d.ts +16 -18
- package/dist/shared/flap/meta.js +14 -26
- package/dist/shared/flap/permit.js +6 -5
- package/dist/shared/flap/pinata.d.ts +9 -2
- package/dist/shared/flap/pinata.js +20 -18
- package/dist/shared/flap/portal-bundle-merkle/config.d.ts +3 -72
- package/dist/shared/flap/portal-bundle-merkle/config.js +4 -124
- package/dist/shared/flap/portal-bundle-merkle/core-helpers.d.ts +32 -0
- package/dist/shared/flap/portal-bundle-merkle/core-helpers.js +83 -0
- package/dist/shared/flap/portal-bundle-merkle/core.d.ts +0 -4
- package/dist/shared/flap/portal-bundle-merkle/core.js +66 -156
- package/dist/shared/flap/portal-bundle-merkle/create-to-dex.js +81 -86
- package/dist/shared/flap/portal-bundle-merkle/curve-to-dex.js +100 -92
- package/dist/shared/flap/portal-bundle-merkle/index.d.ts +11 -7
- package/dist/shared/flap/portal-bundle-merkle/index.js +4 -7
- package/dist/shared/flap/portal-bundle-merkle/pancake-proxy.js +71 -68
- package/dist/shared/flap/portal-bundle-merkle/private.js +61 -114
- package/dist/shared/flap/portal-bundle-merkle/swap-buy-first-helpers.d.ts +125 -0
- package/dist/shared/flap/portal-bundle-merkle/swap-buy-first-helpers.js +113 -0
- package/dist/shared/flap/portal-bundle-merkle/swap-buy-first.d.ts +1 -64
- package/dist/shared/flap/portal-bundle-merkle/swap-buy-first.js +66 -247
- package/dist/shared/flap/portal-bundle-merkle/swap-helpers.d.ts +149 -0
- package/dist/shared/flap/portal-bundle-merkle/swap-helpers.js +259 -0
- package/dist/shared/flap/portal-bundle-merkle/swap.d.ts +2 -71
- package/dist/shared/flap/portal-bundle-merkle/swap.js +103 -410
- package/dist/shared/flap/portal-bundle-merkle/types.d.ts +73 -3
- package/dist/shared/flap/portal-bundle-merkle/utils-helpers.d.ts +100 -0
- package/dist/shared/flap/portal-bundle-merkle/utils-helpers.js +133 -0
- package/dist/shared/flap/portal-bundle-merkle/utils.d.ts +1 -80
- package/dist/shared/flap/portal-bundle-merkle/utils.js +145 -265
- package/dist/shared/flap/portal-bundle.js +54 -42
- package/dist/shared/flap/portal.js +32 -10
- package/dist/shared/flap/vanity.js +4 -7
- package/dist/shared/flap/vault.d.ts +1 -1
- package/dist/shared/flap/vault.js +54 -48
- package/dist/shared/flap 2/__tests__/curve.test.d.ts +1 -0
- package/dist/shared/flap 2/portal-bundle-merkle/types.js +1 -0
- package/dist/shared/foundation/dex/v3-path.d.ts +6 -0
- package/dist/shared/foundation/dex/v3-path.js +35 -0
- package/dist/shared/foundation/gas/bundle-gas.d.ts +39 -0
- package/dist/shared/foundation/gas/bundle-gas.js +93 -0
- package/dist/shared/foundation/gas/profit-hop.d.ts +20 -0
- package/dist/shared/foundation/gas/profit-hop.js +72 -0
- package/dist/shared/foundation/index.d.ts +13 -0
- package/dist/shared/foundation/index.js +12 -0
- package/dist/shared/foundation/nonce/nonce-manager.d.ts +17 -0
- package/dist/shared/foundation/nonce/nonce-manager.js +180 -0
- package/dist/shared/foundation/normalize-unknown.d.ts +9 -0
- package/dist/shared/foundation/normalize-unknown.js +29 -0
- package/dist/shared/foundation/sdk-logger.d.ts +13 -0
- package/dist/shared/foundation/sdk-logger.js +12 -0
- package/dist/shared/foundation/tx/build-request.d.ts +17 -0
- package/dist/shared/foundation/tx/build-request.js +25 -0
- package/dist/shared/foundation/tx/sign-batch.d.ts +5 -0
- package/dist/shared/foundation/tx/sign-batch.js +26 -0
- package/dist/shared/foundation/tx/wallet-sign-patch.d.ts +1 -0
- package/dist/shared/foundation/tx/wallet-sign-patch.js +18 -0
- package/dist/shared/foundation/types/airdrop-sweep.d.ts +79 -0
- package/dist/shared/foundation/types/airdrop-sweep.js +1 -0
- package/dist/shared/foundation/types/erc20.d.ts +65 -0
- package/dist/shared/foundation/types/erc20.js +1 -0
- package/dist/shared/foundation/types/holders-maker.d.ts +64 -0
- package/dist/shared/foundation/types/holders-maker.js +1 -0
- package/dist/shared/foundation/types/index.d.ts +7 -0
- package/dist/shared/foundation/types/index.js +1 -0
- package/dist/shared/foundation/types/lp-inspect.d.ts +102 -0
- package/dist/shared/foundation/types/lp-inspect.js +1 -0
- package/dist/shared/foundation/types/multicall.d.ts +5 -0
- package/dist/shared/foundation/types/multicall.js +1 -0
- package/dist/shared/foundation/types/private-sale.d.ts +35 -0
- package/dist/shared/foundation/types/private-sale.js +1 -0
- package/dist/shared/foundation/types/quote-helpers.d.ts +17 -0
- package/dist/shared/foundation/types/quote-helpers.js +1 -0
- package/dist/shared/four/tax-token.d.ts +1 -1
- package/dist/shared/four/tax-token.js +27 -7
- package/dist/shared/index.d.ts +4 -0
- package/dist/shared/index.js +4 -0
- package/dist/types/distribute.d.ts +72 -0
- package/dist/types/distribute.js +1 -0
- package/dist/types 2/errors.d.ts +27 -0
- package/dist/types 2/errors.js +34 -0
- package/dist/utils/airdrop-sweep-types.d.ts +1 -0
- package/dist/utils/airdrop-sweep-types.js +1 -0
- package/dist/utils/airdrop-sweep.d.ts +4 -76
- package/dist/utils/airdrop-sweep.js +38 -52
- package/dist/utils/bundle-helpers.d.ts +9 -243
- package/dist/utils/bundle-helpers.js +10 -584
- package/dist/utils/constants.d.ts +5 -61
- package/dist/utils/constants.js +5 -80
- package/dist/utils/contract-factory.d.ts +2 -4
- package/dist/utils/contract-factory.js +25 -18
- package/dist/utils/erc20-types.d.ts +1 -0
- package/dist/utils/erc20-types.js +1 -0
- package/dist/utils/erc20.d.ts +8 -90
- package/dist/utils/erc20.js +94 -153
- package/dist/utils/errors.d.ts +10 -22
- package/dist/utils/errors.js +61 -79
- package/dist/utils/holders-maker/addresses.d.ts +12 -0
- package/dist/utils/holders-maker/addresses.js +15 -0
- package/dist/utils/holders-maker/buy-tx.d.ts +44 -0
- package/dist/utils/holders-maker/buy-tx.js +278 -0
- package/dist/utils/holders-maker/constants.d.ts +6 -0
- package/dist/utils/holders-maker/constants.js +7 -0
- package/dist/utils/holders-maker/disperse.d.ts +18 -0
- package/dist/utils/holders-maker/disperse.js +90 -0
- package/dist/utils/holders-maker/routing.d.ts +4 -0
- package/dist/utils/holders-maker/routing.js +45 -0
- package/dist/utils/holders-maker/transfer-tx.d.ts +4 -0
- package/dist/utils/holders-maker/transfer-tx.js +67 -0
- package/dist/utils/holders-maker-helpers.d.ts +9 -0
- package/dist/utils/holders-maker-helpers.js +9 -0
- package/dist/utils/holders-maker-types.d.ts +1 -0
- package/dist/utils/holders-maker-types.js +1 -0
- package/dist/utils/holders-maker.d.ts +2 -138
- package/dist/utils/holders-maker.js +23 -651
- package/dist/utils/hop-chains.d.ts +35 -0
- package/dist/utils/hop-chains.js +215 -0
- package/dist/utils/lp-inspect-helpers.d.ts +9 -0
- package/dist/utils/lp-inspect-helpers.js +109 -0
- package/dist/utils/lp-inspect-types.d.ts +1 -0
- package/dist/utils/lp-inspect-types.js +1 -0
- package/dist/utils/lp-inspect.d.ts +2 -112
- package/dist/utils/lp-inspect.js +63 -195
- package/dist/utils/mpcExclusive.d.ts +2 -5
- package/dist/utils/mpcExclusive.js +4 -3
- package/dist/utils/private-sale-types.d.ts +1 -0
- package/dist/utils/private-sale-types.js +1 -0
- package/dist/utils/private-sale.d.ts +2 -58
- package/dist/utils/private-sale.js +2 -7
- package/dist/utils/provider-factory.d.ts +4 -0
- package/dist/utils/provider-factory.js +10 -0
- package/dist/utils/quote-helpers-types.d.ts +1 -0
- package/dist/utils/quote-helpers-types.js +1 -0
- package/dist/utils/quote-helpers.d.ts +4 -45
- package/dist/utils/quote-helpers.js +15 -65
- package/dist/utils/stealth-transfer.d.ts +2 -28
- package/dist/utils/stealth-transfer.js +30 -14
- package/dist/utils/swap-helpers.d.ts +0 -3
- package/dist/utils/swap-helpers.js +6 -9
- package/dist/utils/types/airdrop-sweep.d.ts +1 -0
- package/dist/utils/types/airdrop-sweep.js +1 -0
- package/dist/utils/types/contract-factory.d.ts +1 -0
- package/dist/utils/types/contract-factory.js +1 -0
- package/dist/utils/types/erc20.d.ts +1 -0
- package/dist/utils/types/erc20.js +1 -0
- package/dist/utils/types/errors.d.ts +1 -0
- package/dist/utils/types/errors.js +1 -0
- package/dist/utils/types/holders-maker.d.ts +1 -0
- package/dist/utils/types/holders-maker.js +1 -0
- package/dist/utils/types/hop-chains.d.ts +8 -0
- package/dist/utils/types/hop-chains.js +1 -0
- package/dist/utils/types/index.d.ts +13 -0
- package/dist/utils/types/index.js +1 -0
- package/dist/utils/types/lp-inspect.d.ts +1 -0
- package/dist/utils/types/lp-inspect.js +1 -0
- package/dist/utils/types/mpc-exclusive.d.ts +5 -0
- package/dist/utils/types/mpc-exclusive.js +1 -0
- package/dist/utils/types/private-sale.d.ts +1 -0
- package/dist/utils/types/private-sale.js +1 -0
- package/dist/utils/types/quote-helpers.d.ts +1 -0
- package/dist/utils/types/quote-helpers.js +1 -0
- package/dist/utils/types/stealth-transfer.d.ts +44 -0
- package/dist/utils/types/stealth-transfer.js +1 -0
- package/dist/utils/types/wallet.d.ts +25 -0
- package/dist/utils/types/wallet.js +1 -0
- package/dist/utils/wallet.d.ts +2 -25
- package/dist/utils/wallet.js +9 -10
- package/package.json +55 -2
- package/src/abis/contracts/TaxToken.json +969 -0
- package/src/abis/contracts/TokenManager.json +836 -0
- package/src/abis/contracts/TokenManager2.json +136 -0
- package/src/abis/contracts/TokenManagerHelper3.json +993 -0
- /package/dist/{shared 2/flap/__tests__/curve.test.d.ts → bundle-core/__tests__/config-helpers.test.d.ts} +0 -0
- /package/dist/{shared 2/flap/portal-bundle-merkle/types.js → bundle-core/__tests__/facade-parity.test.d.ts} +0 -0
- /package/dist/{shared 2/abis → shared/abis 2}/TaxToken.json +0 -0
- /package/dist/{shared 2/abis → shared/abis 2}/TokenManager.json +0 -0
- /package/dist/{shared 2/abis → shared/abis 2}/TokenManager2.json +0 -0
- /package/dist/{shared 2/abis → shared/abis 2}/TokenManagerHelper3.json +0 -0
- /package/dist/{shared 2/abis → shared/abis 2}/common.d.ts +0 -0
- /package/dist/{shared 2/abis → shared/abis 2}/common.js +0 -0
- /package/dist/{shared 2/abis → shared/abis 2}/index.d.ts +0 -0
- /package/dist/{shared 2/abis → shared/abis 2}/index.js +0 -0
- /package/dist/{shared 2/clients → shared/clients 2}/blockrazor.d.ts +0 -0
- /package/dist/{shared 2/clients → shared/clients 2}/blockrazor.js +0 -0
- /package/dist/{shared 2/clients → shared/clients 2}/club48.d.ts +0 -0
- /package/dist/{shared 2/clients → shared/clients 2}/club48.js +0 -0
- /package/dist/{shared 2/clients → shared/clients 2}/emitservice.d.ts +0 -0
- /package/dist/{shared 2/clients → shared/clients 2}/emitservice.js +0 -0
- /package/dist/{shared 2/clients → shared/clients 2}/four.d.ts +0 -0
- /package/dist/{shared 2/clients → shared/clients 2}/four.js +0 -0
- /package/dist/{shared 2/clients → shared/clients 2}/merkle.d.ts +0 -0
- /package/dist/{shared 2/clients → shared/clients 2}/merkle.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/__tests__/curve.test.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/abi.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/abi.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/constants.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/constants.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/curve.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/curve.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/errors.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/errors.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/index.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/index.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/ipfs.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/ipfs.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/meta.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/meta.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/permit.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/permit.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/pinata.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/pinata.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/config.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/config.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/core.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/core.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/create-to-dex.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/create-to-dex.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/curve-to-dex.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/curve-to-dex.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/index.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/index.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/pancake-proxy.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/pancake-proxy.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/private.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/private.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/swap-buy-first.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/swap-buy-first.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/swap.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/swap.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/types.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/utils.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle-merkle/utils.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal-bundle.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/portal.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/vanity.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/vanity.js +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/vault.d.ts +0 -0
- /package/dist/{shared 2/flap → shared/flap 2}/vault.js +0 -0
- /package/dist/{shared 2/four → shared/four 2}/index.d.ts +0 -0
- /package/dist/{shared 2/four → shared/four 2}/index.js +0 -0
- /package/dist/{shared 2/four → shared/four 2}/tax-token.d.ts +0 -0
- /package/dist/{shared 2/four → shared/four 2}/tax-token.js +0 -0
- /package/dist/{shared 2/index.d.ts → shared/index 2.js} +0 -0
- /package/dist/{shared 2/index.js → shared/index.d 2.ts} +0 -0
|
@@ -72,6 +72,16 @@ export function createCachedProvider(rpcUrl, chainId, chainName) {
|
|
|
72
72
|
export function clearProviderCache() {
|
|
73
73
|
providerCache.clear();
|
|
74
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* ENI 专用 Provider(staticNetwork,适合批量 RPC)
|
|
77
|
+
*/
|
|
78
|
+
export function createEniProvider(rpcUrl, chainId = 173) {
|
|
79
|
+
return new JsonRpcProvider(rpcUrl, chainId, {
|
|
80
|
+
staticNetwork: true,
|
|
81
|
+
batchMaxCount: 20,
|
|
82
|
+
batchStallTime: 30,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
75
85
|
/**
|
|
76
86
|
* XLayer 专用 Provider 创建函数
|
|
77
87
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { SupportedChain, QuoteParams, QuoteResult, } from '../shared/foundation/types/quote-helpers.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,51 +7,9 @@
|
|
|
7
7
|
* - ERC20 → 原生代币转换报价
|
|
8
8
|
*/
|
|
9
9
|
import { JsonRpcProvider } from 'ethers';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare const QUOTE_CONFIG: {
|
|
14
|
-
readonly BSC: {
|
|
15
|
-
readonly v2Router: "0x10ED43C718714eb63d5aA57B78B54704E256024E";
|
|
16
|
-
readonly v3Quoter: "0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997";
|
|
17
|
-
readonly wrappedNative: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c";
|
|
18
|
-
readonly stableCoins: readonly ["0x55d398326f99059fF775485246999027B3197955", "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d", "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56"];
|
|
19
|
-
};
|
|
20
|
-
readonly MONAD: {
|
|
21
|
-
readonly v2Router: "0xb1bc24c34e88f7d43d5923034e3a14b24daacff9";
|
|
22
|
-
readonly v3Quoter: "";
|
|
23
|
-
readonly wrappedNative: "0x3bd359c1119da7da1d913d1c4d2b7c461115433a";
|
|
24
|
-
readonly stableCoins: readonly [];
|
|
25
|
-
};
|
|
26
|
-
readonly XLAYER: {
|
|
27
|
-
readonly v2Router: "0x881fb2f98c13d521009464e7d1cbf16e1b394e8e";
|
|
28
|
-
readonly v3Quoter: "0x5A6f3723346aF54a4D0693bfC1718D64d4915C3e";
|
|
29
|
-
readonly wrappedNative: "0xe538905cf8410324e03a5a23c1c177a474d59b2b";
|
|
30
|
-
readonly stableCoins: readonly ["0x1E4a5963aBFD975d8c9021ce480b42188849D41d", "0x74b7f16337b8972027f6196a17a631ac6de26d22", "0x779ded0c9e1022225f8e0630b35a9b54be713736"];
|
|
31
|
-
};
|
|
32
|
-
readonly ENI: {
|
|
33
|
-
readonly v2Router: "0x97ed8be49d9a8b86247090aa41e908e76b8fcf22";
|
|
34
|
-
readonly v3Quoter: "";
|
|
35
|
-
readonly wrappedNative: "0x6d1e851446f4d004ae2a72f9afed85e8829a205e";
|
|
36
|
-
readonly stableCoins: readonly ["0xDC1a8A35b0BaA3229b13f348ED708a2fd50b5e3a", "0xaFF944b96c1BAEA587159ec446280E468B32ee15"];
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
export type SupportedChain = keyof typeof QUOTE_CONFIG;
|
|
40
|
-
export interface QuoteParams {
|
|
41
|
-
provider: JsonRpcProvider;
|
|
42
|
-
tokenIn: string;
|
|
43
|
-
tokenOut: string;
|
|
44
|
-
amountIn: bigint;
|
|
45
|
-
chain: string;
|
|
46
|
-
version?: 'v2' | 'v3';
|
|
47
|
-
fee?: number;
|
|
48
|
-
routerOverride?: string;
|
|
49
|
-
}
|
|
50
|
-
export interface QuoteResult {
|
|
51
|
-
amountOut: bigint;
|
|
52
|
-
path?: string[];
|
|
53
|
-
fee?: number;
|
|
54
|
-
}
|
|
10
|
+
import { QUOTE_CONFIG, QUOTE_V3_FEE_TIERS } from '../shared/constants/quote.js';
|
|
11
|
+
import type { QuoteParams, QuoteResult } from './types/quote-helpers.js';
|
|
12
|
+
export { QUOTE_CONFIG, QUOTE_V3_FEE_TIERS };
|
|
55
13
|
/**
|
|
56
14
|
* V2 报价(直接路径 + 多跳路径)
|
|
57
15
|
* ✅ 优化:并行尝试直接路径和多跳路径
|
|
@@ -117,3 +75,4 @@ export declare function getWrappedNativeAddress(chain: string): string;
|
|
|
117
75
|
* 获取链的稳定币列表
|
|
118
76
|
*/
|
|
119
77
|
export declare function getStableCoins(chain: string): string[];
|
|
78
|
+
export type { SupportedChain, QuoteParams, QuoteResult } from './types/quote-helpers.js';
|
|
@@ -7,55 +7,10 @@
|
|
|
7
7
|
* - ERC20 → 原生代币转换报价
|
|
8
8
|
*/
|
|
9
9
|
import { Contract } from 'ethers';
|
|
10
|
-
import { V2_ROUTER_QUOTE_ABI, V3_QUOTER_ABI } from '../
|
|
11
|
-
|
|
12
|
-
// 常量配置
|
|
13
|
-
// ============================================================================
|
|
14
|
-
// ✅ V2_ROUTER_ABI 和 V3_QUOTER_ABI 从公共模块导入
|
|
10
|
+
import { V2_ROUTER_QUOTE_ABI, V3_QUOTER_ABI } from '../abis/common.js';
|
|
11
|
+
import { QUOTE_CONFIG, QUOTE_V3_FEE_TIERS } from '../shared/constants/quote.js';
|
|
15
12
|
const V2_ROUTER_ABI = V2_ROUTER_QUOTE_ABI;
|
|
16
|
-
|
|
17
|
-
export const V3_FEE_TIERS = [100, 500, 2500, 10000]; // 0.01%, 0.05%, 0.25%, 1%
|
|
18
|
-
/** 各链的报价配置 */
|
|
19
|
-
export const QUOTE_CONFIG = {
|
|
20
|
-
BSC: {
|
|
21
|
-
v2Router: '0x10ED43C718714eb63d5aA57B78B54704E256024E', // PancakeSwap V2 Router
|
|
22
|
-
v3Quoter: '0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997', // PancakeSwap V3 Quoter
|
|
23
|
-
wrappedNative: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', // WBNB
|
|
24
|
-
stableCoins: [
|
|
25
|
-
'0x55d398326f99059fF775485246999027B3197955', // USDT
|
|
26
|
-
'0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d', // USDC
|
|
27
|
-
'0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56', // BUSD
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
MONAD: {
|
|
31
|
-
v2Router: '0xb1bc24c34e88f7d43d5923034e3a14b24daacff9', // PancakeSwap V2
|
|
32
|
-
v3Quoter: '', // TODO: 添加 Monad V3 Quoter
|
|
33
|
-
wrappedNative: '0x3bd359c1119da7da1d913d1c4d2b7c461115433a', // WMON
|
|
34
|
-
stableCoins: [],
|
|
35
|
-
},
|
|
36
|
-
XLAYER: {
|
|
37
|
-
v2Router: '0x881fb2f98c13d521009464e7d1cbf16e1b394e8e', // PotatoSwap V2
|
|
38
|
-
v3Quoter: '0x5A6f3723346aF54a4D0693bfC1718D64d4915C3e', // ✅ PotatoSwap V3 QuoterV2
|
|
39
|
-
wrappedNative: '0xe538905cf8410324e03a5a23c1c177a474d59b2b', // WOKB
|
|
40
|
-
stableCoins: [
|
|
41
|
-
'0x1E4a5963aBFD975d8c9021ce480b42188849D41d', // USDT
|
|
42
|
-
'0x74b7f16337b8972027f6196a17a631ac6de26d22', // USDC
|
|
43
|
-
'0x779ded0c9e1022225f8e0630b35a9b54be713736', // USD₮0
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
ENI: {
|
|
47
|
-
v2Router: '0x97ed8be49d9a8b86247090aa41e908e76b8fcf22', // DSWAP V2 Router
|
|
48
|
-
v3Quoter: '',
|
|
49
|
-
wrappedNative: '0x6d1e851446f4d004ae2a72f9afed85e8829a205e', // WEGAS
|
|
50
|
-
stableCoins: [
|
|
51
|
-
'0xDC1a8A35b0BaA3229b13f348ED708a2fd50b5e3a', // USDT (18 decimals)
|
|
52
|
-
'0xaFF944b96c1BAEA587159ec446280E468B32ee15', // USDC (18 decimals)
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
// ============================================================================
|
|
57
|
-
// V2 报价
|
|
58
|
-
// ============================================================================
|
|
13
|
+
export { QUOTE_CONFIG, QUOTE_V3_FEE_TIERS };
|
|
59
14
|
/**
|
|
60
15
|
* V2 报价(直接路径 + 多跳路径)
|
|
61
16
|
* ✅ 优化:并行尝试直接路径和多跳路径
|
|
@@ -74,7 +29,6 @@ export async function quoteV2(provider, tokenIn, tokenOut, amountIn, chain, rout
|
|
|
74
29
|
const chainUpper = chain.toUpperCase();
|
|
75
30
|
const config = QUOTE_CONFIG[chainUpper];
|
|
76
31
|
if (!config) {
|
|
77
|
-
console.warn(`[quoteV2] 不支持的链: ${chain}`);
|
|
78
32
|
return { amountOut: 0n };
|
|
79
33
|
}
|
|
80
34
|
const routerAddress = routerOverride || config.v2Router;
|
|
@@ -110,7 +64,6 @@ export async function quoteV2(provider, tokenIn, tokenOut, amountIn, chain, rout
|
|
|
110
64
|
return { amountOut: result.amountOut, path: result.path };
|
|
111
65
|
}
|
|
112
66
|
}
|
|
113
|
-
console.warn(`[quoteV2] 所有路径均失败`);
|
|
114
67
|
return { amountOut: 0n };
|
|
115
68
|
}
|
|
116
69
|
// ============================================================================
|
|
@@ -135,18 +88,18 @@ export async function quoteV3(provider, tokenIn, tokenOut, amountIn, chain, pref
|
|
|
135
88
|
const chainUpper = chain.toUpperCase();
|
|
136
89
|
const config = QUOTE_CONFIG[chainUpper];
|
|
137
90
|
if (!config) {
|
|
138
|
-
console.warn(`[quoteV3] 不支持的链: ${chain}`);
|
|
139
91
|
return { amountOut: 0n };
|
|
140
92
|
}
|
|
141
93
|
if (!config.v3Quoter) {
|
|
142
|
-
console.warn(`[quoteV3] 该链不支持 V3 Quoter: ${chain}`);
|
|
143
94
|
return { amountOut: 0n };
|
|
144
95
|
}
|
|
145
96
|
const quoter = new Contract(config.v3Quoter, V3_QUOTER_ABI, provider);
|
|
146
97
|
const tokenInLower = tokenIn.toLowerCase();
|
|
147
98
|
const tokenOutLower = tokenOut.toLowerCase();
|
|
148
99
|
// 如果指定了费率,优先尝试;否则尝试所有费率
|
|
149
|
-
const feesToTry = preferredFee
|
|
100
|
+
const feesToTry = preferredFee
|
|
101
|
+
? [preferredFee, ...QUOTE_V3_FEE_TIERS.filter((f) => f !== preferredFee)]
|
|
102
|
+
: [...QUOTE_V3_FEE_TIERS];
|
|
150
103
|
// ✅ 策略 1:并行尝试所有费率的直接路径
|
|
151
104
|
const directQuotePromises = feesToTry.map(async (fee) => {
|
|
152
105
|
try {
|
|
@@ -155,7 +108,7 @@ export async function quoteV3(provider, tokenIn, tokenOut, amountIn, chain, pref
|
|
|
155
108
|
tokenOut,
|
|
156
109
|
amountIn,
|
|
157
110
|
fee,
|
|
158
|
-
sqrtPriceLimitX96: 0n
|
|
111
|
+
sqrtPriceLimitX96: 0n,
|
|
159
112
|
});
|
|
160
113
|
const amountOut = Array.isArray(result) ? result[0] : result;
|
|
161
114
|
return { amountOut: amountOut || 0n, fee, success: amountOut && amountOut > 0n };
|
|
@@ -172,19 +125,19 @@ export async function quoteV3(provider, tokenIn, tokenOut, amountIn, chain, pref
|
|
|
172
125
|
}
|
|
173
126
|
}
|
|
174
127
|
// ✅ 策略 2:并行尝试多跳路径(通过稳定币)
|
|
175
|
-
const validStableCoins = config.stableCoins.filter(sc => {
|
|
128
|
+
const validStableCoins = config.stableCoins.filter((sc) => {
|
|
176
129
|
const stableLower = sc.toLowerCase();
|
|
177
130
|
return tokenInLower !== stableLower && tokenOutLower !== stableLower;
|
|
178
131
|
});
|
|
179
132
|
// 并行尝试所有稳定币的第一跳
|
|
180
|
-
const firstHopPromises = validStableCoins.flatMap(stableCoin => feesToTry.map(async (fee1) => {
|
|
133
|
+
const firstHopPromises = validStableCoins.flatMap((stableCoin) => feesToTry.map(async (fee1) => {
|
|
181
134
|
try {
|
|
182
135
|
const midResult = await quoter.quoteExactInputSingle.staticCall({
|
|
183
136
|
tokenIn,
|
|
184
137
|
tokenOut: stableCoin,
|
|
185
138
|
amountIn,
|
|
186
139
|
fee: fee1,
|
|
187
|
-
sqrtPriceLimitX96: 0n
|
|
140
|
+
sqrtPriceLimitX96: 0n,
|
|
188
141
|
});
|
|
189
142
|
const midAmount = Array.isArray(midResult) ? midResult[0] : midResult;
|
|
190
143
|
return { midAmount: midAmount || 0n, stableCoin, fee1, success: midAmount && midAmount > 0n };
|
|
@@ -194,17 +147,17 @@ export async function quoteV3(provider, tokenIn, tokenOut, amountIn, chain, pref
|
|
|
194
147
|
}
|
|
195
148
|
}));
|
|
196
149
|
const firstHopResults = await Promise.all(firstHopPromises);
|
|
197
|
-
const successfulFirstHops = firstHopResults.filter(r => r.success);
|
|
150
|
+
const successfulFirstHops = firstHopResults.filter((r) => r.success);
|
|
198
151
|
// 对成功的第一跳,并行尝试第二跳
|
|
199
152
|
const stableFees = [100, 500, 2500];
|
|
200
|
-
const secondHopPromises = successfulFirstHops.flatMap(hop => stableFees.map(async (fee2) => {
|
|
153
|
+
const secondHopPromises = successfulFirstHops.flatMap((hop) => stableFees.map(async (fee2) => {
|
|
201
154
|
try {
|
|
202
155
|
const finalResult = await quoter.quoteExactInputSingle.staticCall({
|
|
203
156
|
tokenIn: hop.stableCoin,
|
|
204
157
|
tokenOut,
|
|
205
158
|
amountIn: hop.midAmount,
|
|
206
159
|
fee: fee2,
|
|
207
|
-
sqrtPriceLimitX96: 0n
|
|
160
|
+
sqrtPriceLimitX96: 0n,
|
|
208
161
|
});
|
|
209
162
|
const amountOut = Array.isArray(finalResult) ? finalResult[0] : finalResult;
|
|
210
163
|
return { amountOut: amountOut || 0n, fee1: hop.fee1, fee2, success: amountOut && amountOut > 0n };
|
|
@@ -220,7 +173,6 @@ export async function quoteV3(provider, tokenIn, tokenOut, amountIn, chain, pref
|
|
|
220
173
|
return { amountOut: result.amountOut, fee: result.fee1 };
|
|
221
174
|
}
|
|
222
175
|
}
|
|
223
|
-
console.warn(`[quoteV3] 所有路径均失败`);
|
|
224
176
|
return { amountOut: 0n };
|
|
225
177
|
}
|
|
226
178
|
// ============================================================================
|
|
@@ -260,7 +212,6 @@ export async function getTokenToNativeQuote(provider, tokenAddress, tokenAmount,
|
|
|
260
212
|
const chainUpper = chain.toUpperCase();
|
|
261
213
|
const config = QUOTE_CONFIG[chainUpper];
|
|
262
214
|
if (!config) {
|
|
263
|
-
console.warn(`[getTokenToNativeQuote] 不支持的链: ${chain}`);
|
|
264
215
|
return 0n;
|
|
265
216
|
}
|
|
266
217
|
const tokenLower = tokenAddress.toLowerCase();
|
|
@@ -277,7 +228,7 @@ export async function getTokenToNativeQuote(provider, tokenAddress, tokenAmount,
|
|
|
277
228
|
chain,
|
|
278
229
|
version,
|
|
279
230
|
fee,
|
|
280
|
-
routerOverride
|
|
231
|
+
routerOverride,
|
|
281
232
|
});
|
|
282
233
|
return result.amountOut;
|
|
283
234
|
}
|
|
@@ -298,7 +249,6 @@ export async function getNativeToTokenQuote(provider, tokenAddress, nativeAmount
|
|
|
298
249
|
const chainUpper = chain.toUpperCase();
|
|
299
250
|
const config = QUOTE_CONFIG[chainUpper];
|
|
300
251
|
if (!config) {
|
|
301
|
-
console.warn(`[getNativeToTokenQuote] 不支持的链: ${chain}`);
|
|
302
252
|
return 0n;
|
|
303
253
|
}
|
|
304
254
|
const tokenLower = tokenAddress.toLowerCase();
|
|
@@ -314,7 +264,7 @@ export async function getNativeToTokenQuote(provider, tokenAddress, nativeAmount
|
|
|
314
264
|
amountIn: nativeAmount,
|
|
315
265
|
chain,
|
|
316
266
|
version,
|
|
317
|
-
fee
|
|
267
|
+
fee,
|
|
318
268
|
});
|
|
319
269
|
return result.amountOut;
|
|
320
270
|
}
|
|
@@ -1,31 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type StealthTransferResult
|
|
3
|
-
bundleUuid: string;
|
|
4
|
-
txs: string[];
|
|
5
|
-
hopAddresses: string[];
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* 简化版隐秘转账参数
|
|
9
|
-
* - 仅需人类可读金额与(可选)代币地址,其余自动处理
|
|
10
|
-
* - 未提供 tokenAddress → 原生币模式;提供 tokenAddress → 自动读取 decimals 转换为 wei 的代币模式
|
|
11
|
-
*/
|
|
12
|
-
export type StealthTransferSimpleParams = {
|
|
13
|
-
rpcUrl: string;
|
|
14
|
-
chainId: number;
|
|
15
|
-
rootPrivateKey: string;
|
|
16
|
-
finalTo: string;
|
|
17
|
-
hopCount: number;
|
|
18
|
-
amount: string;
|
|
19
|
-
tokenAddress?: string;
|
|
20
|
-
tokenHolderPrivateKey?: string;
|
|
21
|
-
bundleEndpoint?: string;
|
|
22
|
-
gasPriceGwei?: string;
|
|
23
|
-
gasLimit?: bigint;
|
|
24
|
-
blockOffset?: number;
|
|
25
|
-
spMode?: SoulPointSignatureMode;
|
|
26
|
-
spPrivateKey?: string;
|
|
27
|
-
spVMode?: VNormalizationMode;
|
|
28
|
-
};
|
|
1
|
+
import type { StealthTransferResult, StealthTransferSimpleParams } from './types/stealth-transfer.js';
|
|
2
|
+
export type { StealthTransferResult, StealthTransferSimpleParams } from './types/stealth-transfer.js';
|
|
29
3
|
/**
|
|
30
4
|
* 隐秘转账(简化版)
|
|
31
5
|
* - 原生模式:amount 按 parseEther 转 wei
|
|
@@ -54,8 +54,8 @@ async function _stealthTransferInternal(params) {
|
|
|
54
54
|
throw new Error(`insufficient balance: need ${needed.toString()}, have ${rootBal.toString()}`);
|
|
55
55
|
}
|
|
56
56
|
// ✅ 并行预取所有 nonce
|
|
57
|
-
const allAddresses = [rootAddr, ...hops.map(w => w.address)];
|
|
58
|
-
const nonces = await Promise.all(allAddresses.map(addr => provider.getTransactionCount(addr, 'pending')));
|
|
57
|
+
const allAddresses = [rootAddr, ...hops.map((w) => w.address)];
|
|
58
|
+
const nonces = await Promise.all(allAddresses.map((addr) => provider.getTransactionCount(addr, 'pending')));
|
|
59
59
|
const signed = [];
|
|
60
60
|
const hopAddresses = [];
|
|
61
61
|
if (mode !== 'erc20') {
|
|
@@ -95,7 +95,7 @@ async function _stealthTransferInternal(params) {
|
|
|
95
95
|
const erc20Iface = new ethers.Interface(['function transfer(address,uint256) returns (bool)']);
|
|
96
96
|
const transferGas = erc20?.transferGasLimit ?? GAS_LIMITS.ERC20_TRANSFER;
|
|
97
97
|
// 填充 hopAddresses
|
|
98
|
-
hops.forEach(hop => hopAddresses.push(hop.address));
|
|
98
|
+
hops.forEach((hop) => hopAddresses.push(hop.address));
|
|
99
99
|
// ✅ 并行签名所有 gas 注资交易(root -> hop[i])
|
|
100
100
|
const fundTxs = await Promise.all(hops.map((hop, i) => root.signTransaction({
|
|
101
101
|
to: hop.address,
|
|
@@ -108,7 +108,7 @@ async function _stealthTransferInternal(params) {
|
|
|
108
108
|
})));
|
|
109
109
|
signed.push(...fundTxs);
|
|
110
110
|
// 代币持有者:可选独立私钥,未提供则用 root
|
|
111
|
-
const tokenOwner =
|
|
111
|
+
const tokenOwner = erc20?.holderPrivateKey && erc20.holderPrivateKey.length > 0
|
|
112
112
|
? new ethers.Wallet(erc20.holderPrivateKey, provider)
|
|
113
113
|
: root;
|
|
114
114
|
// tokenOwner -> hop0: ERC20 transfer 全量 token
|
|
@@ -148,9 +148,7 @@ async function _stealthTransferInternal(params) {
|
|
|
148
148
|
const bundleUuid = await club48.sendBundle({
|
|
149
149
|
txs: signed,
|
|
150
150
|
maxBlockNumber: (await provider.getBlockNumber()) + blockOffset,
|
|
151
|
-
}, spPrivateKey
|
|
152
|
-
? { spMode: spMode ?? 'timestampPersonalSign', spPrivateKey, spVMode }
|
|
153
|
-
: undefined);
|
|
151
|
+
}, spPrivateKey ? { spMode: spMode ?? 'timestampPersonalSign', spPrivateKey, spVMode } : undefined);
|
|
154
152
|
return { bundleUuid, txs: signed, hopAddresses };
|
|
155
153
|
}
|
|
156
154
|
/**
|
|
@@ -160,16 +158,25 @@ async function _stealthTransferInternal(params) {
|
|
|
160
158
|
* - 自动生成 hopCount 个中转地址,并通过 48.club Bundle 原子提交
|
|
161
159
|
*/
|
|
162
160
|
export async function stealthTransfer(params) {
|
|
163
|
-
const { rpcUrl, chainId, rootPrivateKey, finalTo, hopCount, amount, tokenAddress, tokenHolderPrivateKey, bundleEndpoint, gasPriceGwei, gasLimit, blockOffset, spMode, spPrivateKey, spVMode } = params;
|
|
161
|
+
const { rpcUrl, chainId, rootPrivateKey, finalTo, hopCount, amount, tokenAddress, tokenHolderPrivateKey, bundleEndpoint, gasPriceGwei, gasLimit, blockOffset, spMode, spPrivateKey, spVMode, } = params;
|
|
164
162
|
if (!tokenAddress) {
|
|
165
163
|
// 原生:直接 parseEther
|
|
166
164
|
const amountWei = ethers.parseEther(amount);
|
|
167
165
|
return await _stealthTransferInternal({
|
|
168
|
-
rpcUrl,
|
|
166
|
+
rpcUrl,
|
|
167
|
+
chainId,
|
|
168
|
+
rootPrivateKey,
|
|
169
|
+
finalTo,
|
|
170
|
+
hopCount,
|
|
169
171
|
amountWei,
|
|
170
172
|
mode: 'native',
|
|
171
|
-
bundleEndpoint,
|
|
172
|
-
|
|
173
|
+
bundleEndpoint,
|
|
174
|
+
gasPriceGwei,
|
|
175
|
+
gasLimit,
|
|
176
|
+
blockOffset,
|
|
177
|
+
spMode,
|
|
178
|
+
spPrivateKey,
|
|
179
|
+
spVMode,
|
|
173
180
|
});
|
|
174
181
|
}
|
|
175
182
|
// ERC20:自动读取 decimals(读取失败则回退 18)
|
|
@@ -186,11 +193,20 @@ export async function stealthTransfer(params) {
|
|
|
186
193
|
}
|
|
187
194
|
const amountWei = ethers.parseUnits(amount, decimals);
|
|
188
195
|
return await _stealthTransferInternal({
|
|
189
|
-
rpcUrl,
|
|
196
|
+
rpcUrl,
|
|
197
|
+
chainId,
|
|
198
|
+
rootPrivateKey,
|
|
199
|
+
finalTo,
|
|
200
|
+
hopCount,
|
|
190
201
|
amountWei,
|
|
191
202
|
mode: 'erc20',
|
|
192
203
|
erc20: { address: tokenAddress, holderPrivateKey: tokenHolderPrivateKey },
|
|
193
|
-
bundleEndpoint,
|
|
194
|
-
|
|
204
|
+
bundleEndpoint,
|
|
205
|
+
gasPriceGwei,
|
|
206
|
+
gasLimit,
|
|
207
|
+
blockOffset,
|
|
208
|
+
spMode,
|
|
209
|
+
spPrivateKey,
|
|
210
|
+
spVMode,
|
|
195
211
|
});
|
|
196
212
|
}
|
|
@@ -39,6 +39,3 @@ export declare function calculateSwapLoss(sellAmount: bigint, buyAmount: bigint)
|
|
|
39
39
|
* 验证钱包BNB余额
|
|
40
40
|
*/
|
|
41
41
|
export declare function validateBNBBalance(provider: JsonRpcProvider, walletAddress: string, requiredBNB: bigint, purpose: string): Promise<void>;
|
|
42
|
-
/**
|
|
43
|
-
* 格式化换手结果日志
|
|
44
|
-
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { ethers, Contract } from 'ethers';
|
|
5
5
|
import { batchCheckAllowances } from './erc20.js';
|
|
6
|
-
import { ERC20_ABI } from '../
|
|
6
|
+
import { ERC20_ABI } from '../abis/common.js';
|
|
7
7
|
const APPROVAL_THRESHOLD = ethers.MaxUint256 / 2n;
|
|
8
8
|
/**
|
|
9
9
|
* 获取 Gas Limit(授权专用)
|
|
@@ -43,7 +43,7 @@ export async function ensureTokenApproval(provider, merkle, wallet, tokenAddress
|
|
|
43
43
|
// ✅ 使用 getApprovalGasLimit 函数处理 Gas Limit(与 pancake-proxy.ts 一致)
|
|
44
44
|
const approveGasLimit = getApprovalGasLimit(config, 80000);
|
|
45
45
|
// ✅ 使用 getOptimizedGasPrice 处理 Gas Price(与 pancake-proxy.ts 一致)
|
|
46
|
-
const gasPriceConfig = {
|
|
46
|
+
const gasPriceConfig = {};
|
|
47
47
|
if (config.minGasPriceGwei !== undefined) {
|
|
48
48
|
gasPriceConfig.baseGasPrice = ethers.parseUnits(String(config.minGasPriceGwei), 'gwei');
|
|
49
49
|
gasPriceConfig.multiplierPercent = 0;
|
|
@@ -65,7 +65,7 @@ export async function ensureTokenApproval(provider, merkle, wallet, tokenAddress
|
|
|
65
65
|
gasLimit: approveGasLimit,
|
|
66
66
|
gasPrice,
|
|
67
67
|
chainId,
|
|
68
|
-
type: config.txType ?? 0
|
|
68
|
+
type: config.txType ?? 0,
|
|
69
69
|
});
|
|
70
70
|
// 清理临时 nonce 缓存
|
|
71
71
|
nonceManager.clearTemp();
|
|
@@ -75,7 +75,7 @@ export async function ensureTokenApproval(provider, merkle, wallet, tokenAddress
|
|
|
75
75
|
transactions: [signedTx],
|
|
76
76
|
blockOffset,
|
|
77
77
|
minTimestamp: 0,
|
|
78
|
-
maxTimestamp: 0
|
|
78
|
+
maxTimestamp: 0,
|
|
79
79
|
});
|
|
80
80
|
// 等待确认
|
|
81
81
|
const results = await merkle.waitForBundleConfirmation(bundleResult.txHashes, 1, config.waitTimeoutMs ?? 120000);
|
|
@@ -112,7 +112,7 @@ export async function calculateSellAmount(provider, tokenAddress, walletAddress,
|
|
|
112
112
|
const decimals = await getTokenDecimals(provider, tokenAddress);
|
|
113
113
|
return {
|
|
114
114
|
amount: ethers.parseUnits(sellAmount, decimals),
|
|
115
|
-
decimals
|
|
115
|
+
decimals,
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
// 百分比:需要 decimals 和 balance
|
|
@@ -123,7 +123,7 @@ export async function calculateSellAmount(provider, tokenAddress, walletAddress,
|
|
|
123
123
|
// ✅ 并行获取 decimals 和 balance
|
|
124
124
|
const [decimals, balance] = await Promise.all([
|
|
125
125
|
getTokenDecimals(provider, tokenAddress),
|
|
126
|
-
getTokenBalance(provider, tokenAddress, walletAddress)
|
|
126
|
+
getTokenBalance(provider, tokenAddress, walletAddress),
|
|
127
127
|
]);
|
|
128
128
|
const amount = (balance * BigInt(Math.floor(sellPercentage * 100))) / 10000n;
|
|
129
129
|
return { amount, decimals };
|
|
@@ -150,6 +150,3 @@ export async function validateBNBBalance(provider, walletAddress, requiredBNB, p
|
|
|
150
150
|
`实际 ${ethers.formatEther(balance)} BNB`);
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
/**
|
|
154
|
-
* 格式化换手结果日志
|
|
155
|
-
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { BundleSubmitResult, SignedTransactionsResult, AirdropDisperseParams, AirdropDisperseSignParams, AirdropSweepParams, AirdropSweepSignParams, DisperseParams, DisperseSignParams, SweepParams, SweepSignParams, } from '../../shared/foundation/types/airdrop-sweep.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ChainName = 'BSC' | 'BASE' | 'ARBITRUM_ONE';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { EnsureAllowanceResult, EnsureAllowanceBatchItemResult, ApproveTokenBatchParams, ApproveTokenBatchRawParams, ApproveTokenBatchResult, ApproveTokenBatchSignResult, } from '../../shared/foundation/types/erc20.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type FourErrorCode = 'GW' | 'ZA' | 'TO' | 'Slippage' | 'More BNB' | 'FR' | 'SO';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { HoldersMakerChain, HoldersMakerTradeType, BaseTokenType, HoldersMakerConfig, HoldersMakerParams, TransactionLayer, BatchResult, HoldersMakerResult, } from '../../shared/foundation/types/holders-maker.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** utils 层类型 facade(唯一源见 `shared/foundation/types/` 或同目录模块专用类型) */
|
|
2
|
+
export type * from './holders-maker.js';
|
|
3
|
+
export type * from './lp-inspect.js';
|
|
4
|
+
export type * from './airdrop-sweep.js';
|
|
5
|
+
export type * from './private-sale.js';
|
|
6
|
+
export type * from './quote-helpers.js';
|
|
7
|
+
export type * from './erc20.js';
|
|
8
|
+
export type * from './wallet.js';
|
|
9
|
+
export type * from './stealth-transfer.js';
|
|
10
|
+
export type * from './errors.js';
|
|
11
|
+
export type * from './mpc-exclusive.js';
|
|
12
|
+
export type * from './contract-factory.js';
|
|
13
|
+
export type * from './hop-chains.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { DexConfig, ChainDexConfig, PoolPairInfo, V3PoolInfo, DexPoolInfo, BestPoolInfo, LPPlatform, LPInfo, InspectOptions, } from '../../shared/foundation/types/lp-inspect.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { PrivateSaleSignConfig, PrivateSaleTransferParams, BatchPrivateSaleParams, PrivateSaleResult, } from '../../shared/foundation/types/private-sale.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { SupportedChain, QuoteParams, QuoteResult } from '../../shared/foundation/types/quote-helpers.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { SoulPointSignatureMode, VNormalizationMode } from '../../shared/clients/club48.js';
|
|
2
|
+
export type StealthTransferResult = {
|
|
3
|
+
bundleUuid: string;
|
|
4
|
+
txs: string[];
|
|
5
|
+
hopAddresses: string[];
|
|
6
|
+
};
|
|
7
|
+
export type StealthTransferSimpleParams = {
|
|
8
|
+
rpcUrl: string;
|
|
9
|
+
chainId: number;
|
|
10
|
+
rootPrivateKey: string;
|
|
11
|
+
finalTo: string;
|
|
12
|
+
hopCount: number;
|
|
13
|
+
amount: string;
|
|
14
|
+
tokenAddress?: string;
|
|
15
|
+
tokenHolderPrivateKey?: string;
|
|
16
|
+
bundleEndpoint?: string;
|
|
17
|
+
gasPriceGwei?: string;
|
|
18
|
+
gasLimit?: bigint;
|
|
19
|
+
blockOffset?: number;
|
|
20
|
+
spMode?: SoulPointSignatureMode;
|
|
21
|
+
spPrivateKey?: string;
|
|
22
|
+
spVMode?: VNormalizationMode;
|
|
23
|
+
};
|
|
24
|
+
export type InternalStealthParams = {
|
|
25
|
+
rpcUrl: string;
|
|
26
|
+
chainId: number;
|
|
27
|
+
rootPrivateKey: string;
|
|
28
|
+
finalTo: string;
|
|
29
|
+
hopCount: number;
|
|
30
|
+
amountWei: bigint;
|
|
31
|
+
bundleEndpoint?: string;
|
|
32
|
+
gasPriceGwei?: string;
|
|
33
|
+
gasLimit?: bigint;
|
|
34
|
+
blockOffset?: number;
|
|
35
|
+
mode: 'native' | 'erc20';
|
|
36
|
+
erc20?: {
|
|
37
|
+
address: string;
|
|
38
|
+
holderPrivateKey?: string;
|
|
39
|
+
transferGasLimit?: bigint;
|
|
40
|
+
};
|
|
41
|
+
spMode?: SoulPointSignatureMode;
|
|
42
|
+
spPrivateKey?: string;
|
|
43
|
+
spVMode?: VNormalizationMode;
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type GeneratedWallet = {
|
|
2
|
+
address: string;
|
|
3
|
+
privateKey: string;
|
|
4
|
+
};
|
|
5
|
+
export type PrivateKeyValidation = {
|
|
6
|
+
privateKey: string;
|
|
7
|
+
valid: boolean;
|
|
8
|
+
address?: string;
|
|
9
|
+
normalized?: string;
|
|
10
|
+
error?: string;
|
|
11
|
+
};
|
|
12
|
+
export type MulticallResult = {
|
|
13
|
+
address: string;
|
|
14
|
+
balance: bigint;
|
|
15
|
+
success: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type MultiTokenBalancesResult = {
|
|
18
|
+
address: string;
|
|
19
|
+
native: string;
|
|
20
|
+
tokens: Array<{
|
|
21
|
+
token: string;
|
|
22
|
+
balance: string;
|
|
23
|
+
}>;
|
|
24
|
+
success: boolean;
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|