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
|
@@ -1,405 +1,14 @@
|
|
|
1
|
-
import { Contract } from 'ethers';
|
|
2
|
-
export declare enum TokenStatus {
|
|
3
|
-
Invalid = 0,
|
|
4
|
-
Tradable = 1,
|
|
5
|
-
InDuel = 2,
|
|
6
|
-
Killed = 3,
|
|
7
|
-
DEX = 4
|
|
8
|
-
}
|
|
9
|
-
export declare enum TokenVersion {
|
|
10
|
-
TOKEN_LEGACY_MINT_NO_PERMIT = 0,
|
|
11
|
-
TOKEN_LEGACY_MINT_NO_PERMIT_DUPLICATE = 1,
|
|
12
|
-
TOKEN_V2_PERMIT = 2,
|
|
13
|
-
TOKEN_GOPLUS = 3,
|
|
14
|
-
TOKEN_TAXED = 4,
|
|
15
|
-
TOKEN_TAXED_V2 = 5,
|
|
16
|
-
TOKEN_TAXED_V3 = 6,
|
|
17
|
-
TOKEN_V3_PERMIT = 7
|
|
18
|
-
}
|
|
19
|
-
/** newTokenV7 feeConfigs 槽位类型 */
|
|
20
|
-
export declare enum FeeType {
|
|
21
|
-
NONE = 0,
|
|
22
|
-
MARKETING_OR_VAULT = 1,
|
|
23
|
-
DIVIDEND = 2,
|
|
24
|
-
DEFLATION = 3,
|
|
25
|
-
LP_BPS = 4
|
|
26
|
-
}
|
|
27
|
-
export declare enum DexThreshType {
|
|
28
|
-
TWO_THIRDS = 0,
|
|
29
|
-
FOUR_FIFTHS = 1,
|
|
30
|
-
HALF = 2,
|
|
31
|
-
_95_PERCENT = 3,
|
|
32
|
-
_81_PERCENT = 4,
|
|
33
|
-
_1_PERCENT = 5
|
|
34
|
-
}
|
|
35
|
-
export declare enum MigratorType {
|
|
36
|
-
V3_MIGRATOR = 0,
|
|
37
|
-
V2_MIGRATOR = 1,
|
|
38
|
-
/** PCS Infinity CL 迁移(newTokenV7 / TOKEN_V3_PERMIT) */
|
|
39
|
-
PCS_INFINITY_CL_MIGRATOR = 3
|
|
40
|
-
}
|
|
41
1
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
* 决定代币迁移到哪个 DEX
|
|
56
|
-
* - BSC: DEX0 = PancakeSwap
|
|
57
|
-
* - xLayer: DEX0 = PotatoSwap
|
|
58
|
-
* - Monad: DEX0 = Uniswap, DEX1 = PancakeSwap, DEX2 = Monday
|
|
59
|
-
*/
|
|
60
|
-
export declare enum DEXId {
|
|
61
|
-
DEX0 = 0,
|
|
62
|
-
DEX1 = 1,
|
|
63
|
-
DEX2 = 2
|
|
64
|
-
}
|
|
65
|
-
export type TokenStateV2 = {
|
|
66
|
-
status: number;
|
|
67
|
-
reserve: bigint;
|
|
68
|
-
circulatingSupply: bigint;
|
|
69
|
-
price: bigint;
|
|
70
|
-
tokenVersion: number;
|
|
71
|
-
r: bigint;
|
|
72
|
-
dexSupplyThresh: bigint;
|
|
73
|
-
};
|
|
74
|
-
export type TokenStateV3 = {
|
|
75
|
-
status: number;
|
|
76
|
-
reserve: bigint;
|
|
77
|
-
circulatingSupply: bigint;
|
|
78
|
-
price: bigint;
|
|
79
|
-
tokenVersion: number;
|
|
80
|
-
r: bigint;
|
|
81
|
-
dexSupplyThresh: bigint;
|
|
82
|
-
quoteTokenAddress: string;
|
|
83
|
-
nativeToQuoteSwapEnabled: boolean;
|
|
84
|
-
};
|
|
85
|
-
export type TokenStateV4 = {
|
|
86
|
-
status: number;
|
|
87
|
-
reserve: bigint;
|
|
88
|
-
circulatingSupply: bigint;
|
|
89
|
-
price: bigint;
|
|
90
|
-
tokenVersion: number;
|
|
91
|
-
r: bigint;
|
|
92
|
-
dexSupplyThresh: bigint;
|
|
93
|
-
quoteTokenAddress: string;
|
|
94
|
-
nativeToQuoteSwapEnabled: boolean;
|
|
95
|
-
extensionID: `0x${string}`;
|
|
96
|
-
};
|
|
97
|
-
export type TokenStateV5 = {
|
|
98
|
-
status: number;
|
|
99
|
-
reserve: bigint;
|
|
100
|
-
circulatingSupply: bigint;
|
|
101
|
-
price: bigint;
|
|
102
|
-
tokenVersion: number;
|
|
103
|
-
r: bigint;
|
|
104
|
-
h: bigint;
|
|
105
|
-
k: bigint;
|
|
106
|
-
dexSupplyThresh: bigint;
|
|
107
|
-
quoteTokenAddress: string;
|
|
108
|
-
nativeToQuoteSwapEnabled: boolean;
|
|
109
|
-
extensionID: `0x${string}`;
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* TokenStateV7 - 包含毕业相关信息(pool, progress, lpFeeProfile)
|
|
113
|
-
* 用于 XLayer 等支持 V7 的链
|
|
114
|
-
*/
|
|
115
|
-
export type TokenStateV7 = TokenStateV5 & {
|
|
116
|
-
taxRate: bigint;
|
|
117
|
-
pool: string;
|
|
118
|
-
progress: bigint;
|
|
119
|
-
lpFeeProfile: number;
|
|
120
|
-
};
|
|
121
|
-
/**
|
|
122
|
-
* 将 lpFeeProfile 转换为 V3 fee 值
|
|
123
|
-
*/
|
|
124
|
-
export declare function lpFeeProfileToV3Fee(profile: number): number;
|
|
125
|
-
/**
|
|
126
|
-
* Flap Portal 支持的链
|
|
127
|
-
*/
|
|
128
|
-
export type FlapChain = 'BSC' | 'BASE' | 'XLAYER' | 'MORPH' | 'MONAD';
|
|
129
|
-
/**
|
|
130
|
-
* Flap Portal 配置
|
|
131
|
-
*/
|
|
132
|
-
export type PortalConfig = {
|
|
133
|
-
chain: FlapChain;
|
|
134
|
-
rpcUrl: string;
|
|
135
|
-
addressOverride?: string;
|
|
136
|
-
buyFeeRate?: number;
|
|
137
|
-
sellFeeRate?: number;
|
|
138
|
-
};
|
|
139
|
-
export type QuoteExactInputParams = {
|
|
140
|
-
inputToken: string;
|
|
141
|
-
outputToken: string;
|
|
142
|
-
inputAmount: bigint;
|
|
143
|
-
};
|
|
144
|
-
export type ExactInputParams = {
|
|
145
|
-
inputToken: string;
|
|
146
|
-
outputToken: string;
|
|
147
|
-
inputAmount: bigint;
|
|
148
|
-
minOutputAmount: bigint;
|
|
149
|
-
permitData?: string;
|
|
150
|
-
};
|
|
151
|
-
export type ExactInputV3Params = {
|
|
152
|
-
inputToken: string;
|
|
153
|
-
outputToken: string;
|
|
154
|
-
inputAmount: bigint;
|
|
155
|
-
minOutputAmount: bigint;
|
|
156
|
-
permitData?: string;
|
|
157
|
-
extensionData?: string;
|
|
158
|
-
};
|
|
159
|
-
export type NewTokenV3Params = {
|
|
160
|
-
name: string;
|
|
161
|
-
symbol: string;
|
|
162
|
-
meta: string;
|
|
163
|
-
dexThresh: number;
|
|
164
|
-
salt: string;
|
|
165
|
-
taxRate: number;
|
|
166
|
-
migratorType: number;
|
|
167
|
-
quoteToken: string;
|
|
168
|
-
quoteAmt: bigint;
|
|
169
|
-
beneficiary: string;
|
|
170
|
-
permitData?: string;
|
|
171
|
-
extensionID: string;
|
|
172
|
-
extensionData?: string;
|
|
173
|
-
};
|
|
174
|
-
/**
|
|
175
|
-
* newTokenV4 参数
|
|
176
|
-
* 相比 V3 新增了 DEX 选择和 LP 费率配置
|
|
177
|
-
*/
|
|
178
|
-
export type NewTokenV4Params = {
|
|
179
|
-
name: string;
|
|
180
|
-
symbol: string;
|
|
181
|
-
meta: string;
|
|
182
|
-
dexThresh: number;
|
|
183
|
-
salt: string;
|
|
184
|
-
taxRate: number;
|
|
185
|
-
migratorType: number;
|
|
186
|
-
quoteToken: string;
|
|
187
|
-
quoteAmt: bigint;
|
|
188
|
-
beneficiary: string;
|
|
189
|
-
permitData?: string;
|
|
190
|
-
extensionID: string;
|
|
191
|
-
extensionData?: string;
|
|
192
|
-
dexId: number;
|
|
193
|
-
lpFeeProfile: number;
|
|
194
|
-
};
|
|
195
|
-
/**
|
|
196
|
-
* newTokenV5 参数
|
|
197
|
-
* 相比 V4 新增了 Tax Token V2 高级税收分配功能
|
|
198
|
-
* 当 taxRate > 0 时,支持多种税收分配方式:营销、销毁、分红、流动性
|
|
199
|
-
*/
|
|
200
|
-
export type NewTokenV5Params = {
|
|
201
|
-
name: string;
|
|
202
|
-
symbol: string;
|
|
203
|
-
meta: string;
|
|
204
|
-
dexThresh: number;
|
|
205
|
-
salt: string;
|
|
206
|
-
taxRate: number;
|
|
207
|
-
migratorType: number;
|
|
208
|
-
quoteToken: string;
|
|
209
|
-
quoteAmt: bigint;
|
|
210
|
-
beneficiary: string;
|
|
211
|
-
permitData?: string;
|
|
212
|
-
extensionID: string;
|
|
213
|
-
extensionData?: string;
|
|
214
|
-
dexId: number;
|
|
215
|
-
lpFeeProfile: number;
|
|
216
|
-
taxDuration: bigint;
|
|
217
|
-
antiFarmerDuration: bigint;
|
|
218
|
-
mktBps: number;
|
|
219
|
-
deflationBps: number;
|
|
220
|
-
dividendBps: number;
|
|
221
|
-
lpBps: number;
|
|
222
|
-
minimumShareBalance: bigint;
|
|
223
|
-
};
|
|
224
|
-
/**
|
|
225
|
-
* 税收分配配置(用于 UI)
|
|
226
|
-
* 注意:mktBps + deflationBps + dividendBps + lpBps 必须等于 10000 (100%)
|
|
227
|
-
*/
|
|
228
|
-
export type TaxDistributionConfig = {
|
|
229
|
-
mktBps: number;
|
|
230
|
-
deflationBps: number;
|
|
231
|
-
dividendBps: number;
|
|
232
|
-
lpBps: number;
|
|
233
|
-
minimumShareBalance?: bigint;
|
|
234
|
-
};
|
|
235
|
-
/**
|
|
236
|
-
* 验证税收分配是否有效
|
|
237
|
-
*/
|
|
238
|
-
export declare function validateTaxDistribution(config: TaxDistributionConfig): {
|
|
239
|
-
valid: boolean;
|
|
240
|
-
error?: string;
|
|
241
|
-
};
|
|
242
|
-
export declare class FlapPortal {
|
|
243
|
-
private rpcUrl;
|
|
244
|
-
protected portal: string;
|
|
245
|
-
protected contract: Contract;
|
|
246
|
-
private buyFeeRate;
|
|
247
|
-
private sellFeeRate;
|
|
248
|
-
constructor(cfg: PortalConfig);
|
|
249
|
-
getTokenV2(token: string): Promise<TokenStateV2>;
|
|
250
|
-
getTokenV3(token: string): Promise<TokenStateV3>;
|
|
251
|
-
getTokenV4(token: string): Promise<TokenStateV4>;
|
|
252
|
-
getTokenV5(token: string): Promise<TokenStateV5>;
|
|
253
|
-
/**
|
|
254
|
-
* 获取代币状态 V7(包含毕业相关信息)
|
|
255
|
-
* 注意:仅部分链支持 V7(如 XLayer v5.7+),不支持的链会 revert
|
|
256
|
-
*/
|
|
257
|
-
getTokenV7(token: string): Promise<TokenStateV7>;
|
|
258
|
-
/**
|
|
259
|
-
* 计算距离毕业还需多少 OKB/ETH(含手续费)
|
|
260
|
-
* @param state TokenStateV5 或 TokenStateV7
|
|
261
|
-
* @returns 毕业相关信息
|
|
262
|
-
*/
|
|
263
|
-
computeRemainingToGraduation(state: TokenStateV5 | TokenStateV7): {
|
|
264
|
-
remainingOkb: string;
|
|
265
|
-
graduationReserve: string;
|
|
266
|
-
currentReserve: string;
|
|
267
|
-
isGraduated: boolean;
|
|
268
|
-
progressPercent: string;
|
|
269
|
-
};
|
|
270
|
-
computePriceAndProgress(state: TokenStateV5): {
|
|
271
|
-
price: string;
|
|
272
|
-
progress: string;
|
|
273
|
-
};
|
|
274
|
-
quoteBuy(state: TokenStateV5, inputEth: string): string;
|
|
275
|
-
quoteSell(state: TokenStateV5, inputToken: string): string;
|
|
276
|
-
previewBuy(token: string, ethAmount: bigint): Promise<bigint>;
|
|
277
|
-
previewSell(token: string, tokenAmount: bigint): Promise<bigint>;
|
|
278
|
-
quoteExactInput(params: QuoteExactInputParams): Promise<bigint>;
|
|
279
|
-
getFeeRate(): Promise<{
|
|
280
|
-
buyFeeRate: bigint;
|
|
281
|
-
sellFeeRate: bigint;
|
|
282
|
-
}>;
|
|
283
|
-
nonce(): Promise<bigint>;
|
|
284
|
-
version(): Promise<string>;
|
|
285
|
-
getLocks(token: string): Promise<bigint[]>;
|
|
286
|
-
}
|
|
287
|
-
export declare class FlapPortalWriter extends FlapPortal {
|
|
288
|
-
private wallet;
|
|
289
|
-
constructor(cfg: PortalConfig, privateKey: string);
|
|
290
|
-
buy(token: string, to: string, minAmount: bigint, msgValue: bigint): Promise<any>;
|
|
291
|
-
sell(token: string, amount: bigint, minEth: bigint): Promise<any>;
|
|
292
|
-
swapExactInput(params: ExactInputParams, msgValue?: bigint): Promise<any>;
|
|
293
|
-
swapExactInputBuy(params: ExactInputParams, msgValue?: bigint): Promise<any>;
|
|
294
|
-
swapExactInputSell(params: ExactInputParams): Promise<any>;
|
|
295
|
-
swapExactInputV3(params: ExactInputV3Params, msgValue?: bigint): Promise<any>;
|
|
296
|
-
newTokenV2(args: {
|
|
297
|
-
name: string;
|
|
298
|
-
symbol: string;
|
|
299
|
-
meta: string;
|
|
300
|
-
dexThresh: number;
|
|
301
|
-
salt: string;
|
|
302
|
-
taxRate: number;
|
|
303
|
-
migratorType: number;
|
|
304
|
-
quoteToken: string;
|
|
305
|
-
quoteAmt: bigint;
|
|
306
|
-
beneficiary: string;
|
|
307
|
-
permitData?: string;
|
|
308
|
-
msgValue?: bigint;
|
|
309
|
-
}): Promise<any>;
|
|
310
|
-
newTokenV3(args: NewTokenV3Params & {
|
|
311
|
-
msgValue?: bigint;
|
|
312
|
-
}): Promise<any>;
|
|
313
|
-
/**
|
|
314
|
-
* 创建代币 V4 版本
|
|
315
|
-
* 相比 V3 新增了 DEX 选择和 LP 费率配置
|
|
316
|
-
*
|
|
317
|
-
* @param args 创建代币参数
|
|
318
|
-
* @param args.dexId DEX ID,选择迁移到哪个 DEX(使用 DEXId 枚举)
|
|
319
|
-
* @param args.lpFeeProfile LP 费率档位(使用 V3LPFeeProfile 枚举)
|
|
320
|
-
*
|
|
321
|
-
* @example
|
|
322
|
-
* ```typescript
|
|
323
|
-
* await portal.newTokenV4({
|
|
324
|
-
* name: 'My Token',
|
|
325
|
-
* symbol: 'MTK',
|
|
326
|
-
* meta: 'bafkreicwlkpvrcqg4bbhyp2fnhdwbqos5ghka6gdjra3tdkgxxs74hqsze',
|
|
327
|
-
* dexThresh: DexThreshType.FOUR_FIFTHS,
|
|
328
|
-
* salt: '0x...',
|
|
329
|
-
* taxRate: 0,
|
|
330
|
-
* migratorType: MigratorType.V3_MIGRATOR,
|
|
331
|
-
* quoteToken: '0x0000000000000000000000000000000000000000',
|
|
332
|
-
* quoteAmt: 0n,
|
|
333
|
-
* beneficiary: '0x...',
|
|
334
|
-
* extensionID: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
|
335
|
-
* dexId: DEXId.DEX0,
|
|
336
|
-
* lpFeeProfile: V3LPFeeProfile.LP_FEE_PROFILE_STANDARD,
|
|
337
|
-
* msgValue: parseEther('0.01'),
|
|
338
|
-
* });
|
|
339
|
-
* ```
|
|
340
|
-
*
|
|
341
|
-
* @note BNB 链上使用 LP_FEE_PROFILE_LOW (0.01%) 需要白名单地址
|
|
342
|
-
*/
|
|
343
|
-
newTokenV4(args: NewTokenV4Params & {
|
|
344
|
-
msgValue?: bigint;
|
|
345
|
-
}): Promise<any>;
|
|
346
|
-
/**
|
|
347
|
-
* 创建 Token V5(支持 Tax Token V2 高级税收分配)
|
|
348
|
-
*
|
|
349
|
-
* 当 taxRate > 0 时,支持以下税收分配:
|
|
350
|
-
* - mktBps: 营销分配(发送到 beneficiary 地址)
|
|
351
|
-
* - deflationBps: 通缩销毁(直接销毁)
|
|
352
|
-
* - dividendBps: 持有者分红(发送到分红合约)
|
|
353
|
-
* - lpBps: 流动性提供(LP 发送到 dead address)
|
|
354
|
-
*
|
|
355
|
-
* 注意:mktBps + deflationBps + dividendBps + lpBps 必须等于 10000 (100%)
|
|
356
|
-
*
|
|
357
|
-
* @example
|
|
358
|
-
* ```typescript
|
|
359
|
-
* // 创建一个 3% 税率的代币,税收分配:40% 营销,30% 销毁,20% 分红,10% 流动性
|
|
360
|
-
* await portal.newTokenV5({
|
|
361
|
-
* name: 'My Tax Token',
|
|
362
|
-
* symbol: 'MTT',
|
|
363
|
-
* meta: 'bafkrei...',
|
|
364
|
-
* dexThresh: DexThreshType.FOUR_FIFTHS,
|
|
365
|
-
* salt: '0x...',
|
|
366
|
-
* taxRate: 300, // 3%
|
|
367
|
-
* migratorType: MigratorType.V2_MIGRATOR, // 税代币必须使用 V2 迁移器
|
|
368
|
-
* quoteToken: '0x0000000000000000000000000000000000000000',
|
|
369
|
-
* quoteAmt: 0n,
|
|
370
|
-
* beneficiary: '0x...',
|
|
371
|
-
* extensionID: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
|
372
|
-
* dexId: DEXId.DEX0,
|
|
373
|
-
* lpFeeProfile: V3LPFeeProfile.LP_FEE_PROFILE_STANDARD,
|
|
374
|
-
* taxDuration: 365n * 24n * 60n * 60n, // 1 年
|
|
375
|
-
* antiFarmerDuration: 60n * 60n, // 1 小时
|
|
376
|
-
* mktBps: 4000, // 40%
|
|
377
|
-
* deflationBps: 3000, // 30%
|
|
378
|
-
* dividendBps: 2000, // 20%
|
|
379
|
-
* lpBps: 1000, // 10%
|
|
380
|
-
* minimumShareBalance: 10000n * 10n ** 18n, // 10K 代币
|
|
381
|
-
* msgValue: parseEther('0.01'),
|
|
382
|
-
* });
|
|
383
|
-
* ```
|
|
384
|
-
*
|
|
385
|
-
* @note 税代币(taxRate > 0)必须使用 V2_MIGRATOR
|
|
386
|
-
*/
|
|
387
|
-
newTokenV5(args: NewTokenV5Params & {
|
|
388
|
-
msgValue?: bigint;
|
|
389
|
-
}): Promise<any>;
|
|
390
|
-
claim(token: string): Promise<{
|
|
391
|
-
txHash: string;
|
|
392
|
-
tokenAmount: bigint;
|
|
393
|
-
ethAmount: bigint;
|
|
394
|
-
}>;
|
|
395
|
-
delegateClaim(token: string): Promise<{
|
|
396
|
-
txHash: string;
|
|
397
|
-
tokenAmount: bigint;
|
|
398
|
-
ethAmount: bigint;
|
|
399
|
-
}>;
|
|
400
|
-
/**
|
|
401
|
-
* 获取当前使用的 Portal 合约地址
|
|
402
|
-
* 用于事件监听等场景
|
|
403
|
-
*/
|
|
404
|
-
getContractAddress(): string;
|
|
405
|
-
}
|
|
2
|
+
* Flap Portal barrel
|
|
3
|
+
*
|
|
4
|
+
* 原超长文件按职责拆分为:
|
|
5
|
+
* - types.ts:enum + 类型定义 + lpFeeProfileToV3Fee / validateTaxDistribution
|
|
6
|
+
* - reader.ts:FlapPortal 只读查询类
|
|
7
|
+
* - writer.ts:FlapPortalWriter 写操作类
|
|
8
|
+
*
|
|
9
|
+
* 对外 export 符号与路径保持不变。
|
|
10
|
+
*/
|
|
11
|
+
export { TokenStatus, TokenVersion, FeeType, DexThreshType, MigratorType, V3LPFeeProfile, DEXId, lpFeeProfileToV3Fee, validateTaxDistribution, } from './types.js';
|
|
12
|
+
export type { FlapChain, PortalConfig, TokenStateV2, TokenStateV3, TokenStateV4, TokenStateV5, TokenStateV7, QuoteExactInputParams, ExactInputParams, ExactInputV3Params, NewTokenV3Params, NewTokenV4Params, NewTokenV5Params, TaxDistributionConfig, } from './types.js';
|
|
13
|
+
export { FlapPortal } from './reader.js';
|
|
14
|
+
export { FlapPortalWriter } from './writer.js';
|