four-flap-meme-sdk 3.0.0 → 4.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/dist/bundle/four-meme/approve-tokenmanager.d.ts +2 -2
- package/dist/bundle/four-meme/approve-tokenmanager.js +3 -3
- package/dist/bundle/four-meme/core/buy-flow.d.ts +5 -0
- package/dist/bundle/four-meme/core/buy-flow.js +147 -0
- package/dist/bundle/four-meme/core/constants.d.ts +6 -0
- package/dist/bundle/four-meme/core/constants.js +15 -0
- package/dist/bundle/four-meme/core/create-token.d.ts +5 -0
- package/dist/bundle/four-meme/core/create-token.js +137 -0
- package/dist/bundle/four-meme/core/index.d.ts +14 -0
- package/dist/bundle/four-meme/core/index.js +14 -0
- package/dist/bundle/four-meme/core/sell-flow.d.ts +5 -0
- package/dist/bundle/four-meme/core/sell-flow.js +240 -0
- package/dist/bundle/four-meme/core-helpers.js +1 -1
- package/dist/bundle/four-meme/core.d.ts +7 -4
- package/dist/bundle/four-meme/core.js +5 -513
- package/dist/bundle/four-meme/pancake-proxy/approve.d.ts +15 -0
- package/dist/bundle/four-meme/pancake-proxy/approve.js +113 -0
- package/dist/bundle/four-meme/pancake-proxy/buy.d.ts +8 -0
- package/dist/bundle/four-meme/pancake-proxy/buy.js +143 -0
- package/dist/bundle/four-meme/pancake-proxy/constants.d.ts +25 -0
- package/dist/bundle/four-meme/pancake-proxy/constants.js +14 -0
- package/dist/bundle/four-meme/pancake-proxy/helpers.d.ts +45 -0
- package/dist/bundle/four-meme/pancake-proxy/helpers.js +232 -0
- package/dist/bundle/four-meme/pancake-proxy/index.d.ts +15 -0
- package/dist/bundle/four-meme/pancake-proxy/index.js +15 -0
- package/dist/bundle/four-meme/pancake-proxy/sell.d.ts +8 -0
- package/dist/bundle/four-meme/pancake-proxy/sell.js +194 -0
- package/dist/bundle/four-meme/pancake-proxy.d.ts +4 -20
- package/dist/bundle/four-meme/pancake-proxy.js +3 -670
- package/dist/bundle/four-meme/private/buy.d.ts +16 -0
- package/dist/bundle/four-meme/private/buy.js +225 -0
- package/dist/bundle/four-meme/private/index.d.ts +11 -0
- package/dist/bundle/four-meme/private/index.js +11 -0
- package/dist/bundle/four-meme/private/sell.d.ts +18 -0
- package/dist/bundle/four-meme/private/sell.js +245 -0
- package/dist/bundle/four-meme/private.d.ts +5 -25
- package/dist/bundle/four-meme/private.js +5 -463
- package/dist/bundle/four-meme/swap/batch.d.ts +8 -0
- package/dist/bundle/four-meme/swap/batch.js +170 -0
- package/dist/bundle/four-meme/swap/bundle.d.ts +8 -0
- package/dist/bundle/four-meme/swap/bundle.js +147 -0
- package/dist/bundle/four-meme/swap/index.d.ts +14 -0
- package/dist/bundle/four-meme/swap/index.js +13 -0
- package/dist/bundle/four-meme/swap/quick-batch.d.ts +8 -0
- package/dist/bundle/four-meme/swap/quick-batch.js +206 -0
- package/dist/bundle/four-meme/swap-buy-first/helpers.d.ts +20 -0
- package/dist/bundle/four-meme/swap-buy-first/helpers.js +39 -0
- package/dist/bundle/four-meme/swap-buy-first/index.d.ts +12 -0
- package/dist/bundle/four-meme/swap-buy-first/index.js +11 -0
- package/dist/bundle/four-meme/swap-buy-first/multi-wallet.d.ts +20 -0
- package/dist/bundle/four-meme/swap-buy-first/multi-wallet.js +198 -0
- package/dist/bundle/four-meme/swap-buy-first/single.d.ts +7 -0
- package/dist/bundle/four-meme/swap-buy-first/single.js +232 -0
- package/dist/bundle/four-meme/swap-buy-first.d.ts +4 -3
- package/dist/bundle/four-meme/swap-buy-first.js +4 -451
- package/dist/bundle/four-meme/swap-hop-helpers.d.ts +2 -2
- package/dist/bundle/four-meme/swap-sign-helpers.d.ts +2 -2
- package/dist/bundle/four-meme/swap-sign-helpers.js +1 -1
- package/dist/bundle/four-meme/swap.d.ts +4 -14
- package/dist/bundle/four-meme/swap.js +4 -502
- package/dist/bundle/four-meme/types/index.d.ts +1 -1
- package/dist/bundle/four-meme/utils-disperse.d.ts +1 -1
- package/dist/bundle/four-meme/utils-disperse.js +1 -1
- package/dist/bundle/four-meme/utils-pairwise.d.ts +1 -1
- package/dist/bundle/four-meme/utils-pairwise.js +1 -1
- package/dist/bundle/four-meme/utils-sweep/context.d.ts +39 -0
- package/dist/bundle/four-meme/utils-sweep/context.js +7 -0
- package/dist/bundle/four-meme/utils-sweep/erc20-no-hop.d.ts +5 -0
- package/dist/bundle/four-meme/utils-sweep/erc20-no-hop.js +162 -0
- package/dist/bundle/four-meme/utils-sweep/index.d.ts +13 -0
- package/dist/bundle/four-meme/utils-sweep/index.js +13 -0
- package/dist/bundle/four-meme/utils-sweep/main.d.ts +8 -0
- package/dist/bundle/four-meme/utils-sweep/main.js +114 -0
- package/dist/bundle/four-meme/utils-sweep/native-no-hop.d.ts +5 -0
- package/dist/bundle/four-meme/utils-sweep/native-no-hop.js +156 -0
- package/dist/bundle/four-meme/utils-sweep/with-hops.d.ts +6 -0
- package/dist/bundle/four-meme/utils-sweep/with-hops.js +382 -0
- package/dist/bundle/four-meme/utils-sweep.d.ts +3 -4
- package/dist/bundle/four-meme/utils-sweep.js +3 -740
- package/dist/bundle/internal.d.ts +2 -2
- package/dist/bundle/sign-context-helpers.d.ts +1 -26
- package/dist/bundle/sign-context-helpers.js +1 -63
- package/dist/bundle/submit/blockrazor.d.ts +94 -0
- package/dist/bundle/submit/blockrazor.js +122 -0
- package/dist/bundle/submit/direct.d.ts +118 -0
- package/dist/bundle/submit/direct.js +484 -0
- package/dist/bundle/submit/helpers.d.ts +7 -0
- package/dist/bundle/submit/helpers.js +15 -0
- package/dist/bundle/submit/index.d.ts +14 -0
- package/dist/bundle/submit/index.js +14 -0
- package/dist/bundle/submit/merkle.d.ts +84 -0
- package/dist/bundle/submit/merkle.js +121 -0
- package/dist/bundle/submit.d.ts +3 -286
- package/dist/bundle/submit.js +3 -724
- package/dist/chains/bsc/four/types.d.ts +1 -1
- package/dist/chains/bsc/index.d.ts +1 -1
- package/dist/chains/bsc/index.js +2 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-build.d.ts +25 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-build.js +177 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-constants.d.ts +30 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-constants.js +24 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-helpers.d.ts +11 -149
- package/dist/chains/bsc/pancake/bundle-buy-first-helpers.js +12 -74
- package/dist/chains/bsc/pancake/bundle-buy-first-multi-wallet.d.ts +9 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-multi-wallet.js +225 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-plan.d.ts +14 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-plan.js +64 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-profit.d.ts +12 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-profit.js +22 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-quote.d.ts +15 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-quote.js +122 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-types.d.ts +179 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-types.js +1 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-validate.d.ts +2 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-validate.js +41 -0
- package/dist/chains/bsc/pancake/bundle-buy-first.d.ts +1 -1
- package/dist/chains/bsc/pancake/bundle-buy-first.js +8 -578
- package/dist/chains/bsc/pancake/bundle-swap-helpers.d.ts +11 -239
- package/dist/chains/bsc/pancake/bundle-swap-helpers.js +12 -564
- package/dist/chains/bsc/pancake/bundle-swap-types.d.ts +183 -0
- package/dist/chains/bsc/pancake/bundle-swap-types.js +17 -0
- package/dist/chains/bsc/pancake/bundle-swap.d.ts +10 -132
- package/dist/chains/bsc/pancake/bundle-swap.js +12 -1003
- package/dist/chains/bsc/pancake/hop-chain.d.ts +18 -0
- package/dist/chains/bsc/pancake/hop-chain.js +227 -0
- package/dist/chains/bsc/pancake/quote.d.ts +14 -0
- package/dist/chains/bsc/pancake/quote.js +84 -0
- package/dist/chains/bsc/pancake/swap-batch.d.ts +42 -0
- package/dist/chains/bsc/pancake/swap-batch.js +283 -0
- package/dist/chains/bsc/pancake/swap-build.d.ts +19 -0
- package/dist/chains/bsc/pancake/swap-build.js +226 -0
- package/dist/chains/bsc/pancake/swap-cross.d.ts +42 -0
- package/dist/chains/bsc/pancake/swap-cross.js +140 -0
- package/dist/chains/bsc/pancake/swap-quick.d.ts +54 -0
- package/dist/chains/bsc/pancake/swap-quick.js +424 -0
- package/dist/chains/bsc/pancake/swap-single.d.ts +2 -0
- package/dist/chains/bsc/pancake/swap-single.js +182 -0
- package/dist/chains/bsc/platforms/four/index.d.ts +21 -3
- package/dist/chains/bsc/platforms/four/index.js +28 -3
- package/dist/chains/eni/batch-router/transfer-disperse.d.ts +37 -0
- package/dist/chains/eni/batch-router/transfer-disperse.js +302 -0
- package/dist/chains/eni/batch-router/transfer-shared.d.ts +9 -0
- package/dist/chains/eni/batch-router/transfer-shared.js +10 -0
- package/dist/chains/eni/batch-router/transfer-sweep.d.ts +51 -0
- package/dist/chains/eni/batch-router/transfer-sweep.js +364 -0
- package/dist/chains/eni/batch-router/transfer.d.ts +4 -74
- package/dist/chains/eni/batch-router/transfer.js +2 -647
- package/dist/chains/eni/index.d.ts +2 -0
- package/dist/chains/eni/index.js +4 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-profit.d.ts +17 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-profit.js +30 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-submit.d.ts +12 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-submit.js +396 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-tx.d.ts +20 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-tx.js +165 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct.d.ts +3 -32
- package/dist/chains/eni/platforms/daoaas/portal-direct.js +3 -571
- package/dist/chains/eni/submit.js +1 -1
- package/dist/chains/xlayer/constants.d.ts +0 -2
- package/dist/chains/xlayer/constants.js +0 -2
- package/dist/chains/xlayer/eip7702/auth.d.ts +16 -0
- package/dist/chains/xlayer/eip7702/auth.js +81 -0
- package/dist/chains/xlayer/eip7702/bundle-create-buy.d.ts +22 -0
- package/dist/chains/xlayer/eip7702/bundle-create-buy.js +201 -0
- package/dist/chains/xlayer/eip7702/bundle-create-helpers.d.ts +114 -0
- package/dist/chains/xlayer/eip7702/bundle-create-helpers.js +139 -0
- package/dist/chains/xlayer/eip7702/bundle-create-to-dex.d.ts +24 -0
- package/dist/chains/xlayer/eip7702/bundle-create-to-dex.js +233 -0
- package/dist/chains/xlayer/eip7702/bundle-create.d.ts +3 -35
- package/dist/chains/xlayer/eip7702/bundle-create.js +3 -746
- package/dist/chains/xlayer/eip7702/bundle-graduate-buy.d.ts +22 -0
- package/dist/chains/xlayer/eip7702/bundle-graduate-buy.js +214 -0
- package/dist/chains/xlayer/eip7702/bundle-sell.js +1 -1
- package/dist/chains/xlayer/eip7702/bundle-swap-batch.d.ts +31 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-batch.js +216 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-helpers.d.ts +21 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-helpers.js +206 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-multi.d.ts +33 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-multi.js +146 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-single.d.ts +31 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-single.js +177 -0
- package/dist/chains/xlayer/eip7702/bundle-swap.d.ts +6 -61
- package/dist/chains/xlayer/eip7702/bundle-swap.js +3 -712
- package/dist/chains/xlayer/eip7702/bytes.d.ts +4 -0
- package/dist/chains/xlayer/eip7702/bytes.js +31 -0
- package/dist/chains/xlayer/eip7702/gas.d.ts +19 -0
- package/dist/chains/xlayer/eip7702/gas.js +152 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-disperse.d.ts +5 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-disperse.js +196 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-pairwise.d.ts +5 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-pairwise.js +188 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-sweep.d.ts +5 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-sweep.js +220 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer.d.ts +8 -4
- package/dist/chains/xlayer/eip7702/multi-hop-transfer.js +5 -591
- package/dist/chains/xlayer/eip7702/profit.d.ts +32 -0
- package/dist/chains/xlayer/eip7702/profit.js +59 -0
- package/dist/chains/xlayer/eip7702/provider.d.ts +3 -0
- package/dist/chains/xlayer/eip7702/provider.js +17 -0
- package/dist/chains/xlayer/eip7702/time.d.ts +2 -0
- package/dist/chains/xlayer/eip7702/time.js +10 -0
- package/dist/chains/xlayer/eip7702/tx-build.d.ts +10 -0
- package/dist/chains/xlayer/eip7702/tx-build.js +128 -0
- package/dist/chains/xlayer/eip7702/utils.d.ts +19 -85
- package/dist/chains/xlayer/eip7702/utils.js +19 -484
- package/dist/chains/xlayer/eip7702/volume-bundle.d.ts +13 -0
- package/dist/chains/xlayer/eip7702/volume-bundle.js +250 -0
- package/dist/chains/xlayer/eip7702/volume-internal.d.ts +13 -0
- package/dist/chains/xlayer/eip7702/volume-internal.js +169 -0
- package/dist/chains/xlayer/eip7702/volume-make.d.ts +8 -0
- package/dist/chains/xlayer/eip7702/volume-make.js +38 -0
- package/dist/chains/xlayer/eip7702/volume-single-round.d.ts +17 -0
- package/dist/chains/xlayer/eip7702/volume-single-round.js +44 -0
- package/dist/chains/xlayer/eip7702/volume-swap.d.ts +18 -0
- package/dist/chains/xlayer/eip7702/volume-swap.js +30 -0
- package/dist/chains/xlayer/eip7702/volume-wash.d.ts +8 -0
- package/dist/chains/xlayer/eip7702/volume-wash.js +191 -0
- package/dist/chains/xlayer/eip7702/volume.d.ts +7 -35
- package/dist/chains/xlayer/eip7702/volume.js +5 -697
- package/dist/chains/xlayer/eip7702/wallet.d.ts +6 -0
- package/dist/chains/xlayer/eip7702/wallet.js +17 -0
- package/dist/chains/xlayer/eoa/aa-types.d.ts +176 -0
- package/dist/chains/xlayer/eoa/aa-types.js +6 -0
- package/dist/chains/xlayer/eoa/constants.d.ts +0 -2
- package/dist/chains/xlayer/eoa/constants.js +0 -2
- package/dist/chains/xlayer/eoa/context.d.ts +8 -0
- package/dist/chains/xlayer/eoa/context.js +23 -0
- package/dist/chains/xlayer/eoa/encoders.d.ts +147 -0
- package/dist/chains/xlayer/eoa/encoders.js +147 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-cross.d.ts +5 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-cross.js +113 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-helpers.d.ts +10 -123
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-helpers.js +10 -225
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-pure.d.ts +50 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-pure.js +170 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-quick.d.ts +5 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-quick.js +257 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-types.d.ts +99 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-types.js +11 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap.d.ts +5 -47
- package/dist/chains/xlayer/eoa/eoa-bundle-swap.js +3 -522
- package/dist/chains/xlayer/eoa/eoa-types.d.ts +776 -0
- package/dist/chains/xlayer/eoa/eoa-types.js +6 -0
- package/dist/chains/xlayer/eoa/eoa-wash-volume.d.ts +8 -0
- package/dist/chains/xlayer/eoa/eoa-wash-volume.js +8 -0
- package/dist/chains/xlayer/eoa/format.d.ts +34 -0
- package/dist/chains/xlayer/eoa/format.js +56 -0
- package/dist/chains/xlayer/eoa/hop-chain.d.ts +4 -0
- package/dist/chains/xlayer/eoa/hop-chain.js +87 -0
- package/dist/chains/xlayer/eoa/nonce-map.d.ts +20 -0
- package/dist/chains/xlayer/eoa/nonce-map.js +51 -0
- package/dist/chains/xlayer/eoa/portal-ops.d.ts +9 -292
- package/dist/chains/xlayer/eoa/portal-ops.js +9 -486
- package/dist/chains/xlayer/eoa/query.d.ts +117 -0
- package/dist/chains/xlayer/eoa/query.js +285 -0
- package/dist/chains/xlayer/eoa/quote.d.ts +6 -0
- package/dist/chains/xlayer/eoa/quote.js +90 -0
- package/dist/chains/xlayer/eoa/types.d.ts +9 -959
- package/dist/chains/xlayer/eoa/types.js +9 -49
- package/dist/core/clients/blockrazor.js +1 -1
- package/dist/core/clients/merkle.js +1 -1
- package/dist/core/erc20/allowances.d.ts +104 -0
- package/dist/core/erc20/allowances.js +205 -0
- package/dist/core/erc20/approve.d.ts +141 -0
- package/dist/core/erc20/approve.js +325 -0
- package/dist/core/erc20/helpers.d.ts +20 -0
- package/dist/core/erc20/helpers.js +109 -0
- package/dist/core/erc20/index.d.ts +13 -0
- package/dist/core/erc20/index.js +12 -0
- package/dist/core/gas/bundle-gas.d.ts +6 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/quote/index.d.ts +1 -0
- package/dist/core/quote/index.js +1 -0
- package/dist/core/quote/quote-helpers.d.ts +78 -0
- package/dist/core/quote/quote-helpers.js +289 -0
- package/dist/core/quote/types.d.ts +1 -0
- package/dist/core/quote/types.js +1 -0
- package/dist/core/sign-context-helpers.d.ts +29 -0
- package/dist/core/sign-context-helpers.js +63 -0
- package/dist/domains/dex/direct-router-helpers.d.ts +16 -268
- package/dist/domains/dex/direct-router-helpers.js +16 -535
- package/dist/domains/dex/direct-router-types.d.ts +104 -0
- package/dist/domains/dex/direct-router-types.js +81 -0
- package/dist/domains/dex/direct-router-v2-buy.d.ts +2 -0
- package/dist/domains/dex/direct-router-v2-buy.js +249 -0
- package/dist/domains/dex/direct-router-v2-sell.d.ts +5 -0
- package/dist/domains/dex/direct-router-v2-sell.js +270 -0
- package/dist/domains/dex/direct-router-v2.d.ts +9 -0
- package/dist/domains/dex/direct-router-v2.js +9 -0
- package/dist/domains/dex/direct-router-v3.d.ts +17 -0
- package/dist/domains/dex/direct-router-v3.js +432 -0
- package/dist/domains/dex/direct-router.d.ts +11 -26
- package/dist/domains/dex/direct-router.js +10 -977
- package/dist/domains/dex/dyo-encode.d.ts +62 -0
- package/dist/domains/dex/dyo-encode.js +124 -0
- package/dist/domains/dex/profit.d.ts +24 -0
- package/dist/domains/dex/profit.js +86 -0
- package/dist/domains/dex/provider.d.ts +10 -0
- package/dist/domains/dex/provider.js +27 -0
- package/dist/domains/dex/quote.d.ts +7 -0
- package/dist/domains/dex/quote.js +52 -0
- package/dist/domains/dex/router.d.ts +56 -0
- package/dist/domains/dex/router.js +193 -0
- package/dist/domains/flap/portal-bundle/batch.d.ts +9 -0
- package/dist/domains/flap/portal-bundle/batch.js +193 -0
- package/dist/domains/flap/portal-bundle/create.d.ts +5 -0
- package/dist/domains/flap/portal-bundle/create.js +153 -0
- package/dist/domains/flap/portal-bundle/helpers.d.ts +32 -0
- package/dist/domains/flap/portal-bundle/helpers.js +50 -0
- package/dist/domains/flap/portal-bundle/index.d.ts +16 -0
- package/dist/domains/flap/portal-bundle/index.js +15 -0
- package/dist/domains/flap/portal-bundle/private.d.ts +5 -0
- package/dist/domains/flap/portal-bundle/private.js +198 -0
- package/dist/domains/flap/portal-bundle/types.d.ts +102 -0
- package/dist/domains/flap/portal-bundle/types.js +1 -0
- package/dist/domains/flap/portal-bundle-merkle/core-batch.d.ts +13 -0
- package/dist/domains/flap/portal-bundle-merkle/core-batch.js +376 -0
- package/dist/domains/flap/portal-bundle-merkle/core-helpers.d.ts +75 -7
- package/dist/domains/flap/portal-bundle-merkle/core-helpers.js +259 -20
- package/dist/domains/flap/portal-bundle-merkle/core.d.ts +2 -13
- package/dist/domains/flap/portal-bundle-merkle/core.js +12 -629
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/constants.d.ts +70 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/constants.js +90 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/index.d.ts +12 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/index.js +11 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/main.d.ts +15 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/main.js +432 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/types.d.ts +113 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/types.js +4 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex.d.ts +4 -127
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex.js +4 -527
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/constants.d.ts +42 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/constants.js +81 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/index.d.ts +12 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/index.js +11 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/main.d.ts +15 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/main.js +339 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/types.d.ts +72 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/types.js +4 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex.d.ts +4 -85
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex.js +4 -425
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/approve.d.ts +12 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/approve.js +102 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/buy.d.ts +5 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/buy.js +135 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/helpers.d.ts +52 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/helpers.js +267 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/index.d.ts +14 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/index.js +14 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/sell.d.ts +5 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/sell.js +195 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy.d.ts +3 -24
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy.js +3 -700
- package/dist/domains/flap/portal-bundle-merkle/private/buy.d.ts +9 -0
- package/dist/domains/flap/portal-bundle-merkle/private/buy.js +188 -0
- package/dist/domains/flap/portal-bundle-merkle/private/helpers.d.ts +36 -0
- package/dist/domains/flap/portal-bundle-merkle/private/helpers.js +127 -0
- package/dist/domains/flap/portal-bundle-merkle/private/index.d.ts +12 -0
- package/dist/domains/flap/portal-bundle-merkle/private/index.js +12 -0
- package/dist/domains/flap/portal-bundle-merkle/private/sell.d.ts +9 -0
- package/dist/domains/flap/portal-bundle-merkle/private/sell.js +191 -0
- package/dist/domains/flap/portal-bundle-merkle/private.d.ts +5 -15
- package/dist/domains/flap/portal-bundle-merkle/private.js +5 -494
- package/dist/domains/flap/portal-bundle-merkle/swap-batch.js +3 -2
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-chain.d.ts +4 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-chain.js +43 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-constants.d.ts +13 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-constants.js +21 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-helpers.d.ts +11 -121
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-helpers.js +11 -109
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-multi-wallet.d.ts +20 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-multi-wallet.js +223 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-plan.d.ts +32 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-plan.js +66 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-profit.d.ts +22 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-profit.js +22 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-quote.d.ts +51 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-quote.js +149 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-types.d.ts +87 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-types.js +1 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first.js +5 -404
- package/dist/domains/flap/portal-bundle-merkle/swap-helpers.d.ts +0 -1
- package/dist/domains/flap/portal-bundle-merkle/swap-helpers.js +0 -7
- package/dist/domains/flap/portal-bundle-merkle/swap-planning.js +1 -1
- package/dist/domains/flap/portal-bundle-merkle/swap-quick-batch.js +3 -2
- package/dist/domains/flap/portal-bundle-merkle/swap-single.js +3 -2
- package/dist/domains/flap/portal-bundle-merkle/utils/disperse.d.ts +2 -0
- package/dist/domains/flap/portal-bundle-merkle/utils/disperse.js +275 -0
- package/dist/domains/flap/portal-bundle-merkle/utils/index.d.ts +11 -0
- package/dist/domains/flap/portal-bundle-merkle/utils/index.js +11 -0
- package/dist/domains/flap/portal-bundle-merkle/utils/sweep.d.ts +9 -0
- package/dist/domains/flap/portal-bundle-merkle/utils/sweep.js +570 -0
- package/dist/domains/flap/portal-bundle-merkle/utils.d.ts +5 -8
- package/dist/domains/flap/portal-bundle-merkle/utils.js +5 -841
- package/dist/domains/flap/portal-bundle.d.ts +5 -117
- package/dist/domains/flap/portal-bundle.js +5 -587
- package/dist/domains/flap/portal.d.ts +13 -404
- package/dist/domains/flap/portal.js +12 -619
- package/dist/domains/flap/reader.d.ts +51 -0
- package/dist/domains/flap/reader.js +275 -0
- package/dist/domains/flap/types.d.ts +246 -0
- package/dist/domains/flap/types.js +104 -0
- package/dist/domains/flap/vault/constants.d.ts +220 -0
- package/dist/domains/flap/vault/constants.js +173 -0
- package/dist/domains/flap/vault/encode.d.ts +39 -0
- package/dist/domains/flap/vault/encode.js +135 -0
- package/dist/domains/flap/vault/index.d.ts +15 -0
- package/dist/domains/flap/vault/index.js +14 -0
- package/dist/domains/flap/vault/query.d.ts +40 -0
- package/dist/domains/flap/vault/query.js +104 -0
- package/dist/domains/flap/vault/types.d.ts +147 -0
- package/dist/domains/flap/vault/types.js +29 -0
- package/dist/domains/flap/vault.d.ts +3 -413
- package/dist/domains/flap/vault.js +3 -467
- package/dist/domains/flap/writer.d.ts +124 -0
- package/dist/domains/flap/writer.js +255 -0
- package/dist/domains/four/contracts/tm-bundle-batch.d.ts +35 -0
- package/dist/domains/four/contracts/tm-bundle-batch.js +286 -0
- package/dist/domains/four/contracts/tm-bundle-create.d.ts +2 -0
- package/dist/domains/four/contracts/tm-bundle-create.js +304 -0
- package/dist/domains/four/contracts/tm-bundle-helpers.d.ts +2 -1
- package/dist/domains/four/contracts/tm-bundle-helpers.js +3 -0
- package/dist/domains/four/contracts/tm-bundle-private.d.ts +36 -0
- package/dist/domains/four/contracts/tm-bundle-private.js +164 -0
- package/dist/domains/four/contracts/tm-bundle.d.ts +10 -71
- package/dist/domains/four/contracts/tm-bundle.js +9 -738
- package/dist/domains/lp-inspect/inspect-helpers.d.ts +25 -0
- package/dist/domains/lp-inspect/inspect-helpers.js +343 -0
- package/dist/domains/lp-inspect/inspect.d.ts +8 -0
- package/dist/domains/lp-inspect/inspect.js +332 -0
- package/dist/domains/lp-inspect/lp-inspect.d.ts +9 -37
- package/dist/domains/lp-inspect/lp-inspect.js +9 -775
- package/dist/domains/lp-inspect/registry.d.ts +43 -0
- package/dist/domains/lp-inspect/registry.js +127 -0
- package/dist/domains/merkle/index.d.ts +1 -1
- package/dist/exports/root-bundle-and-tooling.d.ts +9 -1
- package/dist/exports/root-bundle-and-tooling.js +8 -1
- package/dist/exports/root-foundations.d.ts +1 -1
- package/dist/exports/root-foundations.js +1 -1
- package/dist/exports/root-swap-dex-and-xlayer.d.ts +4 -4
- package/dist/exports/root-swap-dex-and-xlayer.js +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/utils/swap-helpers.js +1 -1
- package/package.json +1 -81
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lp-inspect — 注册表(registry)
|
|
3
|
+
*
|
|
4
|
+
* DEX/稳定币注册、链配置获取、报价代币列表等注册表相关 API。
|
|
5
|
+
*/
|
|
6
|
+
import type { ChainDexConfig, DexConfig } from './types.js';
|
|
7
|
+
export declare function getFactoryFromRouter(routerAddress: string, rpcUrl: string, routerType?: 'v2' | 'v3'): Promise<{
|
|
8
|
+
v2Factory?: string;
|
|
9
|
+
v3Factory?: string;
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* 动态注册 DYORSwap(从 Router 获取 Factory)
|
|
13
|
+
*/
|
|
14
|
+
export declare function registerDYORSwap(rpcUrl: string): Promise<boolean>;
|
|
15
|
+
/** 注册新的 DEX */
|
|
16
|
+
export declare function registerDex(chain: string, dexKey: string, config: DexConfig): void;
|
|
17
|
+
/** 注册新的稳定币 */
|
|
18
|
+
export declare function registerStableCoin(chain: string, coin: {
|
|
19
|
+
address: string;
|
|
20
|
+
symbol: string;
|
|
21
|
+
decimals: number;
|
|
22
|
+
}): void;
|
|
23
|
+
/** 获取链配置(优先运行时配置) */
|
|
24
|
+
export declare function getChainConfig(chain: string): ChainDexConfig | undefined;
|
|
25
|
+
/** 获取支持的 DEX 列表 */
|
|
26
|
+
export declare function getSupportedDexes(chain: string): Array<{
|
|
27
|
+
key: string;
|
|
28
|
+
name: string;
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
/** 获取支持的稳定币列表 */
|
|
32
|
+
export declare function getSupportedStableCoins(chain: string): Array<{
|
|
33
|
+
address: string;
|
|
34
|
+
symbol: string;
|
|
35
|
+
decimals: number;
|
|
36
|
+
}>;
|
|
37
|
+
/** 获取所有报价代币(包装原生 + 稳定币) */
|
|
38
|
+
export declare function getQuoteTokens(chain: string): Array<{
|
|
39
|
+
address: string;
|
|
40
|
+
symbol: string;
|
|
41
|
+
decimals: number;
|
|
42
|
+
isNative: boolean;
|
|
43
|
+
}>;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lp-inspect — 注册表(registry)
|
|
3
|
+
*
|
|
4
|
+
* DEX/稳定币注册、链配置获取、报价代币列表等注册表相关 API。
|
|
5
|
+
*/
|
|
6
|
+
import { Contract } from 'ethers';
|
|
7
|
+
import { createProvider } from '../../utils/provider-factory.js';
|
|
8
|
+
import { ADDRESSES } from '../../core/constants/index.js';
|
|
9
|
+
import { getErrorMessageFromUnknown } from '../../core/index.js';
|
|
10
|
+
import { CHAIN_DEX_CONFIGS, runtimeConfigs } from './lp-inspect-helpers.js';
|
|
11
|
+
export async function getFactoryFromRouter(routerAddress, rpcUrl, routerType = 'v2') {
|
|
12
|
+
const provider = createProvider(rpcUrl);
|
|
13
|
+
const result = {};
|
|
14
|
+
// V2 Router ABI: factory()
|
|
15
|
+
const V2_ROUTER_ABI = ['function factory() view returns (address)'];
|
|
16
|
+
// V3 SwapRouter02 ABI: factory() 和 factoryV2()
|
|
17
|
+
const V3_ROUTER_ABI = ['function factory() view returns (address)', 'function factoryV2() view returns (address)'];
|
|
18
|
+
try {
|
|
19
|
+
if (routerType === 'v2') {
|
|
20
|
+
const router = new Contract(routerAddress, V2_ROUTER_ABI, provider);
|
|
21
|
+
result.v2Factory = await router.factory();
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
// V3 SwapRouter02 可能同时有 V2 和 V3 Factory
|
|
25
|
+
const router = new Contract(routerAddress, V3_ROUTER_ABI, provider);
|
|
26
|
+
// ✅ 并行获取 V3 和 V2 Factory
|
|
27
|
+
const [v3Factory, v2Factory] = await Promise.all([
|
|
28
|
+
router.factory().catch(() => undefined),
|
|
29
|
+
router.factoryV2().catch(() => undefined),
|
|
30
|
+
]);
|
|
31
|
+
if (v3Factory)
|
|
32
|
+
result.v3Factory = v3Factory;
|
|
33
|
+
if (v2Factory)
|
|
34
|
+
result.v2Factory = v2Factory;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
console.error(`❌ 获取 Factory 地址失败:`, getErrorMessageFromUnknown(error));
|
|
39
|
+
}
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 动态注册 DYORSwap(从 Router 获取 Factory)
|
|
44
|
+
*/
|
|
45
|
+
export async function registerDYORSwap(rpcUrl) {
|
|
46
|
+
const DYORSWAP_ROUTER = ADDRESSES.XLAYER.DyorSwapRouter;
|
|
47
|
+
try {
|
|
48
|
+
// 从 Router 获取 Factory 地址
|
|
49
|
+
const factories = await getFactoryFromRouter(DYORSWAP_ROUTER, rpcUrl, 'v3');
|
|
50
|
+
if (factories.v2Factory || factories.v3Factory) {
|
|
51
|
+
const chainConfig = getChainConfig('XLAYER');
|
|
52
|
+
if (chainConfig && chainConfig.dexes.DYORSWAP) {
|
|
53
|
+
if (factories.v2Factory) {
|
|
54
|
+
chainConfig.dexes.DYORSWAP.v2Factory = factories.v2Factory;
|
|
55
|
+
}
|
|
56
|
+
if (factories.v3Factory) {
|
|
57
|
+
chainConfig.dexes.DYORSWAP.v3Factory = factories.v3Factory;
|
|
58
|
+
}
|
|
59
|
+
chainConfig.dexes.DYORSWAP.enabled = true;
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
console.error('❌ 注册 DYORSwap 失败:', getErrorMessageFromUnknown(error));
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/** 注册新的 DEX */
|
|
71
|
+
export function registerDex(chain, dexKey, config) {
|
|
72
|
+
const chainConfig = getChainConfig(chain);
|
|
73
|
+
if (chainConfig) {
|
|
74
|
+
chainConfig.dexes[dexKey] = config;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/** 注册新的稳定币 */
|
|
78
|
+
export function registerStableCoin(chain, coin) {
|
|
79
|
+
const chainConfig = getChainConfig(chain);
|
|
80
|
+
if (chainConfig) {
|
|
81
|
+
// 检查是否已存在
|
|
82
|
+
const exists = chainConfig.stableCoins.some((c) => c.address.toLowerCase() === coin.address.toLowerCase());
|
|
83
|
+
if (!exists) {
|
|
84
|
+
chainConfig.stableCoins.push(coin);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/** 获取链配置(优先运行时配置) */
|
|
89
|
+
export function getChainConfig(chain) {
|
|
90
|
+
if (runtimeConfigs[chain]) {
|
|
91
|
+
return runtimeConfigs[chain];
|
|
92
|
+
}
|
|
93
|
+
if (CHAIN_DEX_CONFIGS[chain]) {
|
|
94
|
+
// 深拷贝到运行时配置
|
|
95
|
+
runtimeConfigs[chain] = JSON.parse(JSON.stringify(CHAIN_DEX_CONFIGS[chain]));
|
|
96
|
+
return runtimeConfigs[chain];
|
|
97
|
+
}
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
/** 获取支持的 DEX 列表 */
|
|
101
|
+
export function getSupportedDexes(chain) {
|
|
102
|
+
const config = getChainConfig(chain);
|
|
103
|
+
if (!config)
|
|
104
|
+
return [];
|
|
105
|
+
return Object.entries(config.dexes).map(([key, dex]) => ({
|
|
106
|
+
key,
|
|
107
|
+
name: dex.name,
|
|
108
|
+
enabled: dex.enabled,
|
|
109
|
+
}));
|
|
110
|
+
}
|
|
111
|
+
/** 获取支持的稳定币列表 */
|
|
112
|
+
export function getSupportedStableCoins(chain) {
|
|
113
|
+
const config = getChainConfig(chain);
|
|
114
|
+
if (!config)
|
|
115
|
+
return [];
|
|
116
|
+
return config.stableCoins;
|
|
117
|
+
}
|
|
118
|
+
/** 获取所有报价代币(包装原生 + 稳定币) */
|
|
119
|
+
export function getQuoteTokens(chain) {
|
|
120
|
+
const config = getChainConfig(chain);
|
|
121
|
+
if (!config)
|
|
122
|
+
return [];
|
|
123
|
+
return [
|
|
124
|
+
{ address: config.wrappedNative, symbol: config.wrappedNativeSymbol, decimals: 18, isNative: true },
|
|
125
|
+
...config.stableCoins.map((c) => ({ ...c, isNative: false })),
|
|
126
|
+
];
|
|
127
|
+
}
|
|
@@ -9,4 +9,4 @@ export { pairwiseTransferWithBundleMerkle } from '../../bundle/four-meme/utils-p
|
|
|
9
9
|
export { fourBundleSwapMerkle, fourBatchSwapMerkle, fourQuickBatchSwapMerkle } from '../../bundle/four-meme/swap.js';
|
|
10
10
|
export { fourBundleBuyFirstMerkle } from '../../bundle/four-meme/swap-buy-first.js';
|
|
11
11
|
export { submitBundleToMerkle, submitBundleToBlockRazor, submitDirectToRpc, submitDirectToRpcSmart, type MerkleSubmitConfig, type SubmitBundleResult, type BlockRazorSubmitConfig, type DirectSubmitConfig, } from '../../bundle/submit.js';
|
|
12
|
-
export type { DisperseSignParams, DisperseMerkleResult, SweepSignParams, SweepMerkleResult, FourBundleSwapSignParams, FourSwapResult, FourBatchSwapSignParams, FourBatchSwapResult, FourQuickBatchSwapSignParams, FourQuickBatchSwapResult, PairwiseTransferSignParams, PairwiseTransferMerkleResult, } from '../../bundle/four-meme/types.js';
|
|
12
|
+
export type { DisperseSignParams, DisperseMerkleResult, SweepSignParams, SweepMerkleResult, FourBundleSwapSignParams, FourSwapResult, FourBatchSwapSignParams, FourBatchSwapResult, FourQuickBatchSwapSignParams, FourQuickBatchSwapResult, PairwiseTransferSignParams, PairwiseTransferMerkleResult, } from '../../bundle/four-meme/types/index.js';
|
|
@@ -13,7 +13,15 @@ export { createTokenWithBundleBuy as flapCreateTokenWithBundleBuy, batchBuyWithB
|
|
|
13
13
|
export { fourPrivateBuy, fourPrivateSell, fourBatchPrivateBuy, fourBatchPrivateSell, type FourPrivateBuyParams, type FourPrivateSellParams, type FourBatchPrivateBuyParams, type FourBatchPrivateSellParams, } from '../domains/four/contracts/tm-bundle.js';
|
|
14
14
|
export { flapPrivateBuy, flapPrivateSell, flapBatchPrivateBuy, flapBatchPrivateSell, type FlapPrivateBuyParams, type FlapPrivateSellParams, type FlapBatchPrivateBuyParams, type FlapBatchPrivateSellParams, type FlapBatchPrivateSellResult, } from '../domains/flap/portal-bundle.js';
|
|
15
15
|
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 '../domains/flap/portal-bundle-merkle/index.js';
|
|
16
|
-
export { createTokenWithBundleBuyMerkle as fourCreateTokenWithBundleBuyMerkle, batchBuyWithBundleMerkle as fourBatchBuyWithBundleMerkle, batchSellWithBundleMerkle as fourBatchSellWithBundleMerkle,
|
|
16
|
+
export { createTokenWithBundleBuyMerkle as fourCreateTokenWithBundleBuyMerkle, batchBuyWithBundleMerkle as fourBatchBuyWithBundleMerkle, batchSellWithBundleMerkle as fourBatchSellWithBundleMerkle, } from '../bundle/four-meme/core.js';
|
|
17
|
+
export { fourPrivateBuyMerkle, fourPrivateSellMerkle, fourBatchPrivateBuyMerkle, fourBatchPrivateSellMerkle, } from '../bundle/four-meme/private.js';
|
|
18
|
+
export { disperseWithBundleMerkle } from '../bundle/four-meme/utils-disperse.js';
|
|
19
|
+
export { sweepWithBundleMerkle } from '../bundle/four-meme/utils-sweep.js';
|
|
20
|
+
export { pairwiseTransferWithBundleMerkle } from '../bundle/four-meme/utils-pairwise.js';
|
|
21
|
+
export { fourPancakeProxyBatchBuyMerkle, fourPancakeProxyBatchSellMerkle, approveFourPancakeProxy, approveFourPancakeProxyBatch, } from '../bundle/four-meme/pancake-proxy.js';
|
|
22
|
+
export { approveFourTokenManagerBatch } from '../bundle/four-meme/approve-tokenmanager.js';
|
|
23
|
+
export { submitBundleToMerkle, submitMultipleBundles, submitMultipleBundlesParallel, submitBundleToBlockRazor, submitMultipleBundlesToBlockRazor, submitMultipleBundlesToBlockRazorParallel, type MerkleSubmitConfig, type SubmitBundleResult, type BlockRazorSubmitConfig, type BlockRazorSubmitResult, } from '../bundle/submit.js';
|
|
24
|
+
export type { FourBundleMerkleConfig, FourSignConfig, FourCreateWithBundleBuySignParams, FourBatchBuySignParams, FourBatchSellSignParams, FourPrivateBuySignParams, FourPrivateSellSignParams, FourBatchPrivateBuySignParams, FourBatchPrivateSellSignParams, FourPancakeProxyBatchBuySignParams, FourPancakeProxyBatchSellSignParams, DisperseSignParams as FourDisperseSignParams, SweepSignParams as FourSweepSignParams, FourCreateWithBundleBuyMerkleParams, FourCreateWithBundleBuyMerkleResult, FourBatchBuyMerkleParams, FourBatchBuyMerkleResult, FourBatchSellMerkleParams, FourBatchSellMerkleResult, FourPrivateBuyMerkleParams, FourPrivateSellMerkleParams, FourBatchPrivateBuyMerkleParams, FourBatchPrivateSellMerkleParams, FourBatchPrivateMerkleResult, FourPrivateTransactionResult, DisperseMerkleParams, DisperseMerkleResult, SweepMerkleParams, SweepMerkleResult, FourPancakeProxyBatchBuyParams, FourPancakeProxyBatchBuyResult, FourPancakeProxyBatchSellParams, FourPancakeProxyBatchSellResult, FourPancakeProxyApprovalParams, FourPancakeProxyApprovalBatchParams, FourPancakeProxyApprovalBatchResult, ApproveFourTokenManagerBatchParams, ApproveFourTokenManagerBatchResult, } from '../bundle/four-meme/types/index.js';
|
|
17
25
|
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 '../domains/four/index.js';
|
|
18
26
|
export { PinataClient, type PinataConfig } from '../domains/flap/pinata.js';
|
|
19
27
|
export { pinFileToIPFSWithJWT, pinImageByPath, pinFileToIPFSWithJWTWeb, pinDataURLWithJWTWeb, dataURLToBlob, type PinataPinResp, } from '../domains/flap/pinata.js';
|
|
@@ -13,7 +13,14 @@ export { createTokenWithBundleBuy as flapCreateTokenWithBundleBuy, batchBuyWithB
|
|
|
13
13
|
export { fourPrivateBuy, fourPrivateSell, fourBatchPrivateBuy, fourBatchPrivateSell, } from '../domains/four/contracts/tm-bundle.js';
|
|
14
14
|
export { flapPrivateBuy, flapPrivateSell, flapBatchPrivateBuy, flapBatchPrivateSell, } from '../domains/flap/portal-bundle.js';
|
|
15
15
|
export { createTokenWithBundleBuyMerkle as flapCreateTokenWithBundleBuyMerkle, batchBuyWithBundleMerkle as flapBatchBuyWithBundleMerkle, batchSellWithBundleMerkle as flapBatchSellWithBundleMerkle, flapPrivateBuyMerkle, flapPrivateSellMerkle, flapBatchPrivateBuyMerkle, flapBatchPrivateSellMerkle, pancakeProxyBatchBuyMerkle, pancakeProxyBatchSellMerkle, approvePancakeProxy, approvePancakeProxyBatch, flapDisperseWithBundleMerkle, flapSweepWithBundleMerkle, } from '../domains/flap/portal-bundle-merkle/index.js';
|
|
16
|
-
export { createTokenWithBundleBuyMerkle as fourCreateTokenWithBundleBuyMerkle, batchBuyWithBundleMerkle as fourBatchBuyWithBundleMerkle, batchSellWithBundleMerkle as fourBatchSellWithBundleMerkle,
|
|
16
|
+
export { createTokenWithBundleBuyMerkle as fourCreateTokenWithBundleBuyMerkle, batchBuyWithBundleMerkle as fourBatchBuyWithBundleMerkle, batchSellWithBundleMerkle as fourBatchSellWithBundleMerkle, } from '../bundle/four-meme/core.js';
|
|
17
|
+
export { fourPrivateBuyMerkle, fourPrivateSellMerkle, fourBatchPrivateBuyMerkle, fourBatchPrivateSellMerkle, } from '../bundle/four-meme/private.js';
|
|
18
|
+
export { disperseWithBundleMerkle } from '../bundle/four-meme/utils-disperse.js';
|
|
19
|
+
export { sweepWithBundleMerkle } from '../bundle/four-meme/utils-sweep.js';
|
|
20
|
+
export { pairwiseTransferWithBundleMerkle } from '../bundle/four-meme/utils-pairwise.js';
|
|
21
|
+
export { fourPancakeProxyBatchBuyMerkle, fourPancakeProxyBatchSellMerkle, approveFourPancakeProxy, approveFourPancakeProxyBatch, } from '../bundle/four-meme/pancake-proxy.js';
|
|
22
|
+
export { approveFourTokenManagerBatch } from '../bundle/four-meme/approve-tokenmanager.js';
|
|
23
|
+
export { submitBundleToMerkle, submitMultipleBundles, submitMultipleBundlesParallel, submitBundleToBlockRazor, submitMultipleBundlesToBlockRazor, submitMultipleBundlesToBlockRazorParallel, } from '../bundle/submit.js';
|
|
17
24
|
// ✅ Four.meme TaxToken 工具(税币识别/查询/领取奖励)
|
|
18
25
|
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 '../domains/four/index.js';
|
|
19
26
|
export { PinataClient } from '../domains/flap/pinata.js';
|
|
@@ -11,7 +11,7 @@ export { ERC20_ABI, ERC20_BALANCE_ABI, ERC20_ALLOWANCE_ABI, MULTICALL3_ABI, V2_R
|
|
|
11
11
|
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, QUOTE_CONFIG, QUOTE_V3_FEE_TIERS, } from '../core/constants/index.js';
|
|
12
12
|
export { buildProfitHopTransactions, PROFIT_HOP_COUNT } from '../utils/bundle-helpers.js';
|
|
13
13
|
export { isExclusiveOnChain, isExclusiveOffChain } from '../utils/mpcExclusive.js';
|
|
14
|
-
export { ensureSellApprovalV1, checkSellApprovalV1, ensureSellApprovalV2, checkSellApprovalV2, ensureSellApproval, checkSellApproval, ensureFlapSellApproval, checkFlapSellApproval, ensureFlapSellApprovalBatch, checkFlapSellApprovalBatch, checkAllowance, approveToken, checkAllowanceBatch, approveTokenBatch, checkAllowanceRaw, approveTokenRaw, checkAllowanceBatchRaw, approveTokenBatchRaw, } from '../core/erc20.js';
|
|
14
|
+
export { ensureSellApprovalV1, checkSellApprovalV1, ensureSellApprovalV2, checkSellApprovalV2, ensureSellApproval, checkSellApproval, ensureFlapSellApproval, checkFlapSellApproval, ensureFlapSellApprovalBatch, checkFlapSellApprovalBatch, checkAllowance, approveToken, checkAllowanceBatch, approveTokenBatch, checkAllowanceRaw, approveTokenRaw, checkAllowanceBatchRaw, approveTokenBatchRaw, } from '../core/erc20/index.js';
|
|
15
15
|
export { parseFourError, type FourErrorCode } from '../utils/errors.js';
|
|
16
16
|
export { getTokenManagerV1, getTokenManagerV2, getTokenManagerHelper3, getTokenManagerV1Writer, getTokenManagerV2Writer, getTokenManagerHelper3Writer, getTokenManagerAddress, type ChainName, } from '../utils/contract-factory.js';
|
|
17
17
|
export { FourClient, buildLoginMessage, type FourConfig, type GenerateNonceReq, type LoginReq, type CreateTokenReq, type CreateTokenResp, type FourTokenTaxInfo, } from '../core/clients/four.js';
|
|
@@ -46,7 +46,7 @@ ensureFlapSellApproval, checkFlapSellApproval, ensureFlapSellApprovalBatch, chec
|
|
|
46
46
|
// ✅ 智能路由授权方法(自动选择 spender,适用于 Flap、Four、V2、V3)
|
|
47
47
|
checkAllowance, approveToken, checkAllowanceBatch, approveTokenBatch,
|
|
48
48
|
// ✅ 底层授权方法(手动指定 spender,适用于任意合约)
|
|
49
|
-
checkAllowanceRaw, approveTokenRaw, checkAllowanceBatchRaw, approveTokenBatchRaw, } from '../core/erc20.js';
|
|
49
|
+
checkAllowanceRaw, approveTokenRaw, checkAllowanceBatchRaw, approveTokenBatchRaw, } from '../core/erc20/index.js';
|
|
50
50
|
export { parseFourError } from '../utils/errors.js';
|
|
51
51
|
export { getTokenManagerV1, getTokenManagerV2, getTokenManagerHelper3, getTokenManagerV1Writer, getTokenManagerV2Writer, getTokenManagerHelper3Writer, getTokenManagerAddress, } from '../utils/contract-factory.js';
|
|
52
52
|
export { FourClient, buildLoginMessage, } from '../core/clients/four.js';
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* 由 src/index.ts 聚合引用,请勿在本目录写实现逻辑。
|
|
5
5
|
* v2:包根不再导出 `PROFIT_CONFIG` / 报价 `V3_FEE_TIERS`;迁移说明见 README.zh-CN.md。
|
|
6
6
|
*/
|
|
7
|
-
export { fourBundleSwapMerkle, fourBatchSwapMerkle, fourQuickBatchSwapMerkle, type FourSwapSignConfig, type FourSwapConfig, type FourBundleSwapSignParams, type FourBundleSwapParams, type FourSwapResult, type FourBatchSwapSignParams, type FourBatchSwapResult, type FourQuickBatchSwapSignParams, type FourQuickBatchSwapResult, } from '../
|
|
7
|
+
export { fourBundleSwapMerkle, fourBatchSwapMerkle, fourQuickBatchSwapMerkle, type FourSwapSignConfig, type FourSwapConfig, type FourBundleSwapSignParams, type FourBundleSwapParams, type FourSwapResult, type FourBatchSwapSignParams, type FourBatchSwapResult, type FourQuickBatchSwapSignParams, type FourQuickBatchSwapResult, } from '../bundle/four-meme/swap.js';
|
|
8
8
|
export { flapBundleSwapMerkle, flapBatchSwapMerkle, flapQuickBatchSwapMerkle, flapCrossSwapMerkle, } from '../domains/flap/portal-bundle-merkle/swap.js';
|
|
9
9
|
export type { FlapSwapSignConfig, FlapSwapConfig, FlapBundleSwapSignParams, FlapBundleSwapParams, FlapSwapResult, } from '../domains/flap/portal-bundle-merkle/swap-helpers.js';
|
|
10
10
|
export type { FlapBatchSwapSignParams, FlapBatchSwapResult, FlapQuickBatchSwapSignParams, FlapQuickBatchSwapResult, FlapCrossSwapParams, FlapCrossSwapResult, } from '../domains/flap/portal-bundle-merkle/swap.js';
|
|
11
11
|
export { pancakeBundleSwapMerkle, pancakeBatchSwapMerkle, pancakeQuickBatchSwapMerkle, pancakeCrossSwapMerkle, type PancakeBatchSwapSignParams, type PancakeBatchSwapResult, type PancakeQuickBatchSwapParams, type PancakeQuickBatchSwapResult, type PancakeCrossSwapParams, type PancakeCrossSwapResult, } from '../chains/bsc/pancake/bundle-swap.js';
|
|
12
12
|
export type { PancakeSwapSignConfig, PancakeSwapConfig, PancakeBundleSwapSignParams, PancakeBundleSwapParams, PancakeSwapResult, SwapRouteType, RouteParams, V2RouteParams, V3SingleRouteParams, V3MultiRouteParams, } from '../chains/bsc/pancake/bundle-swap-helpers.js';
|
|
13
|
-
export { fourBundleBuyFirstMerkle, type FourBuyFirstConfig, type FourBundleBuyFirstParams, type FourBuyFirstSignConfig, type FourBundleBuyFirstSignParams, type FourBuyFirstResult, } from '../
|
|
13
|
+
export { fourBundleBuyFirstMerkle, type FourBuyFirstConfig, type FourBundleBuyFirstParams, type FourBuyFirstSignConfig, type FourBundleBuyFirstSignParams, type FourBuyFirstResult, } from '../bundle/four-meme/swap-buy-first.js';
|
|
14
14
|
export { flapBundleBuyFirstMerkle } from '../domains/flap/portal-bundle-merkle/swap-buy-first.js';
|
|
15
15
|
export type { FlapBuyFirstSignConfig, FlapBuyFirstConfig, FlapBundleBuyFirstSignParams, FlapBundleBuyFirstParams, FlapBuyFirstResult, } from '../domains/flap/portal-bundle-merkle/swap-buy-first-helpers.js';
|
|
16
16
|
export { pancakeBundleBuyFirstMerkle } from '../chains/bsc/pancake/bundle-buy-first.js';
|
|
@@ -20,8 +20,8 @@ export { flapBundleCreateToDex, type CreateToDexChain, type CreateToDexSignConfi
|
|
|
20
20
|
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, buildVaultExtensionParams, getVaultFactoryAddress, getVaultPortalAddress, queryVaultDataSchema, queryVaultUISchema, queryVaultDescription, validateVaultFactory, getVaultInfo, isValidContract, } from '../domains/flap/vault.js';
|
|
21
21
|
export { quoteV2, quoteV3, quote, getTokenToNativeQuote, getNativeToTokenQuote,
|
|
22
22
|
/** 链名字符串版 WETH/WBNB 地址(与 shared/constants.getWrappedNativeAddress(chainId) 签名不同) */
|
|
23
|
-
getWrappedNativeAddress, getStableCoins, } from '../
|
|
24
|
-
export { submitDirectToRpc, submitDirectToRpcSequential, submitDirectToRpcSequentialNoWait, submitDirectToRpcParallel, submitDirectToRpcSmart, submitDirectToRpcSmart as xlayerBundleSubmit, type DirectSubmitConfig, type DirectSubmitResult, type DirectTxResult, } from '../
|
|
23
|
+
getWrappedNativeAddress, getStableCoins, } from '../core/quote/quote-helpers.js';
|
|
24
|
+
export { submitDirectToRpc, submitDirectToRpcSequential, submitDirectToRpcSequentialNoWait, submitDirectToRpcParallel, submitDirectToRpcSmart, submitDirectToRpcSmart as xlayerBundleSubmit, type DirectSubmitConfig, type DirectSubmitResult, type DirectTxResult, } from '../bundle/submit.js';
|
|
25
25
|
export { submitBundleToEni, submitEniParallelThenProfit, type EniBundleSubmitConfig, type EniBundleSubmitResult, } from '../chains/eni/submit.js';
|
|
26
26
|
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 '../domains/dex/index.js';
|
|
27
27
|
export * as XLayer from '../chains/xlayer/eoa/index.js';
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
// 捆绑换手功能(Bundle Swap)
|
|
9
9
|
// ============================================================
|
|
10
10
|
// Four内盘换手
|
|
11
|
-
export { fourBundleSwapMerkle, fourBatchSwapMerkle, fourQuickBatchSwapMerkle, } from '../
|
|
11
|
+
export { fourBundleSwapMerkle, fourBatchSwapMerkle, fourQuickBatchSwapMerkle, } from '../bundle/four-meme/swap.js';
|
|
12
12
|
// Flap内盘换手
|
|
13
13
|
export { flapBundleSwapMerkle, flapBatchSwapMerkle, flapQuickBatchSwapMerkle, flapCrossSwapMerkle, } from '../domains/flap/portal-bundle-merkle/swap.js';
|
|
14
14
|
// PancakeSwap V2/V3通用换手
|
|
15
15
|
export { pancakeBundleSwapMerkle, pancakeBatchSwapMerkle, pancakeQuickBatchSwapMerkle, pancakeCrossSwapMerkle, } from '../chains/bsc/pancake/bundle-swap.js';
|
|
16
16
|
// 先买后卖(Buy-First)入口
|
|
17
|
-
export { fourBundleBuyFirstMerkle, } from '../
|
|
17
|
+
export { fourBundleBuyFirstMerkle, } from '../bundle/four-meme/swap-buy-first.js';
|
|
18
18
|
export { flapBundleBuyFirstMerkle } from '../domains/flap/portal-bundle-merkle/swap-buy-first.js';
|
|
19
19
|
export { pancakeBundleBuyFirstMerkle } from '../chains/bsc/pancake/bundle-buy-first.js';
|
|
20
20
|
// ✅ 内盘买到外盘(Bonding Curve → DEX)- 已存在代币
|
|
@@ -26,9 +26,9 @@ export { NONE_EXTENSION_ID, VAULT_TYPE_LABELS, VAULT_TYPE_CATEGORIES, VAULT_FACT
|
|
|
26
26
|
// ✅ V2/V3 报价工具(QUOTE_CONFIG / QUOTE_V3_FEE_TIERS 见 root-foundations / core/constants/quote)
|
|
27
27
|
export { quoteV2, quoteV3, quote, getTokenToNativeQuote, getNativeToTokenQuote,
|
|
28
28
|
/** 链名字符串版 WETH/WBNB 地址(与 shared/constants.getWrappedNativeAddress(chainId) 签名不同) */
|
|
29
|
-
getWrappedNativeAddress, getStableCoins, } from '../
|
|
29
|
+
getWrappedNativeAddress, getStableCoins, } from '../core/quote/quote-helpers.js';
|
|
30
30
|
// ✅ Monad 等不支持 Bundle 的链:逐笔 RPC 广播方法(服务器端使用)
|
|
31
|
-
export { submitDirectToRpc, submitDirectToRpcSequential, submitDirectToRpcSequentialNoWait, submitDirectToRpcParallel, submitDirectToRpcSmart, submitDirectToRpcSmart as xlayerBundleSubmit, } from '../
|
|
31
|
+
export { submitDirectToRpc, submitDirectToRpcSequential, submitDirectToRpcSequentialNoWait, submitDirectToRpcParallel, submitDirectToRpcSmart, submitDirectToRpcSmart as xlayerBundleSubmit, } from '../bundle/submit.js';
|
|
32
32
|
// ✅ ENI Bundle 提交
|
|
33
33
|
export { submitBundleToEni, submitEniParallelThenProfit, } from '../chains/eni/submit.js';
|
|
34
34
|
// ============================================================
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* - **实现**:`core/` · `domains/*` · `chains/` · `bundle/` · 瘦 `utils/`
|
|
5
5
|
* - **扁平再导出**:`exports/root-*.ts`
|
|
6
|
-
* -
|
|
6
|
+
* - **公共入口**:只走包根;见 `package.json#exports` / docs/PUBLIC_API.md §2
|
|
7
7
|
*/
|
|
8
8
|
export * from './exports/root-foundations.js';
|
|
9
9
|
export * from './exports/root-bundle-and-tooling.js';
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* - **实现**:`core/` · `domains/*` · `chains/` · `bundle/` · 瘦 `utils/`
|
|
5
5
|
* - **扁平再导出**:`exports/root-*.ts`
|
|
6
|
-
* -
|
|
6
|
+
* - **公共入口**:只走包根;见 `package.json#exports` / docs/PUBLIC_API.md §2
|
|
7
7
|
*/
|
|
8
8
|
export * from './exports/root-foundations.js';
|
|
9
9
|
export * from './exports/root-bundle-and-tooling.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* 换手交易通用工具函数
|
|
3
3
|
*/
|
|
4
4
|
import { ethers, Contract } from 'ethers';
|
|
5
|
-
import { batchCheckAllowances } from '../core/erc20.js';
|
|
5
|
+
import { batchCheckAllowances } from '../core/erc20/index.js';
|
|
6
6
|
import { ERC20_ABI } from '../abis/common.js';
|
|
7
7
|
import { NonceManager, getOptimizedGasPrice } from './bundle-helpers.js';
|
|
8
8
|
const APPROVAL_THRESHOLD = ethers.MaxUint256 / 2n;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "four-flap-meme-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "SDK for Flap bonding curve and four.meme TokenManager",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,86 +22,6 @@
|
|
|
22
22
|
"types": "./dist/index.d.ts",
|
|
23
23
|
"default": "./dist/index.js"
|
|
24
24
|
},
|
|
25
|
-
"./core": {
|
|
26
|
-
"types": "./dist/core/index.d.ts",
|
|
27
|
-
"default": "./dist/core/index.js"
|
|
28
|
-
},
|
|
29
|
-
"./flap": {
|
|
30
|
-
"types": "./dist/domains/flap/index.d.ts",
|
|
31
|
-
"default": "./dist/domains/flap/index.js"
|
|
32
|
-
},
|
|
33
|
-
"./four": {
|
|
34
|
-
"types": "./dist/domains/four/index.d.ts",
|
|
35
|
-
"default": "./dist/domains/four/index.js"
|
|
36
|
-
},
|
|
37
|
-
"./dex": {
|
|
38
|
-
"types": "./dist/domains/dex/index.d.ts",
|
|
39
|
-
"default": "./dist/domains/dex/index.js"
|
|
40
|
-
},
|
|
41
|
-
"./merkle": {
|
|
42
|
-
"types": "./dist/domains/merkle/index.d.ts",
|
|
43
|
-
"default": "./dist/domains/merkle/index.js"
|
|
44
|
-
},
|
|
45
|
-
"./vanity": {
|
|
46
|
-
"types": "./dist/domains/vanity/index.d.ts",
|
|
47
|
-
"default": "./dist/domains/vanity/index.js"
|
|
48
|
-
},
|
|
49
|
-
"./quote": {
|
|
50
|
-
"types": "./dist/domains/quote/index.d.ts",
|
|
51
|
-
"default": "./dist/domains/quote/index.js"
|
|
52
|
-
},
|
|
53
|
-
"./lp-inspect": {
|
|
54
|
-
"types": "./dist/domains/lp-inspect/index.d.ts",
|
|
55
|
-
"default": "./dist/domains/lp-inspect/index.js"
|
|
56
|
-
},
|
|
57
|
-
"./holders": {
|
|
58
|
-
"types": "./dist/domains/holders/index.d.ts",
|
|
59
|
-
"default": "./dist/domains/holders/index.js"
|
|
60
|
-
},
|
|
61
|
-
"./private-sale": {
|
|
62
|
-
"types": "./dist/domains/private-sale/index.d.ts",
|
|
63
|
-
"default": "./dist/domains/private-sale/index.js"
|
|
64
|
-
},
|
|
65
|
-
"./bundle": {
|
|
66
|
-
"types": "./dist/bundle/index.d.ts",
|
|
67
|
-
"default": "./dist/bundle/index.js"
|
|
68
|
-
},
|
|
69
|
-
"./flows": {
|
|
70
|
-
"types": "./dist/domains/flows/index.d.ts",
|
|
71
|
-
"default": "./dist/domains/flows/index.js"
|
|
72
|
-
},
|
|
73
|
-
"./chains": {
|
|
74
|
-
"types": "./dist/chains/index.d.ts",
|
|
75
|
-
"default": "./dist/chains/index.js"
|
|
76
|
-
},
|
|
77
|
-
"./chains/bsc": {
|
|
78
|
-
"types": "./dist/chains/bsc/index.d.ts",
|
|
79
|
-
"default": "./dist/chains/bsc/index.js"
|
|
80
|
-
},
|
|
81
|
-
"./chains/bsc/iro": {
|
|
82
|
-
"types": "./dist/chains/bsc/iro.d.ts",
|
|
83
|
-
"default": "./dist/chains/bsc/iro.js"
|
|
84
|
-
},
|
|
85
|
-
"./chains/xlayer": {
|
|
86
|
-
"types": "./dist/chains/xlayer/index.d.ts",
|
|
87
|
-
"default": "./dist/chains/xlayer/index.js"
|
|
88
|
-
},
|
|
89
|
-
"./chains/xlayer/eip7702": {
|
|
90
|
-
"types": "./dist/chains/xlayer/eip7702/index.d.ts",
|
|
91
|
-
"default": "./dist/chains/xlayer/eip7702/index.js"
|
|
92
|
-
},
|
|
93
|
-
"./chains/eni": {
|
|
94
|
-
"types": "./dist/chains/eni/index.d.ts",
|
|
95
|
-
"default": "./dist/chains/eni/index.js"
|
|
96
|
-
},
|
|
97
|
-
"./chains/monad": {
|
|
98
|
-
"types": "./dist/chains/monad/index.d.ts",
|
|
99
|
-
"default": "./dist/chains/monad/index.js"
|
|
100
|
-
},
|
|
101
|
-
"./utils": {
|
|
102
|
-
"types": "./dist/utils/index.d.ts",
|
|
103
|
-
"default": "./dist/utils/index.js"
|
|
104
|
-
},
|
|
105
25
|
"./package.json": "./package.json"
|
|
106
26
|
},
|
|
107
27
|
"keywords": [
|