@elizaos/plugin-wallet 2.0.0-beta.1 → 2.0.3-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -45
- package/auto-enable.ts +1 -1
- package/dist/actions/failure-codes.d.ts +12 -0
- package/dist/actions/index.d.ts +1 -0
- package/dist/analytics/birdeye/actions/wallet-search-address.d.ts +7 -0
- package/dist/analytics/birdeye/birdeye-task.d.ts +27 -0
- package/dist/analytics/birdeye/birdeye.d.ts +140 -0
- package/dist/analytics/birdeye/constants.d.ts +68 -0
- package/dist/analytics/birdeye/providers/agent-portfolio-provider.d.ts +8 -0
- package/dist/analytics/birdeye/providers/market.d.ts +18 -0
- package/dist/analytics/birdeye/providers/portfolio-factory.d.ts +10 -0
- package/dist/analytics/birdeye/providers/trending.d.ts +19 -0
- package/dist/analytics/birdeye/providers/wallet.d.ts +5 -0
- package/dist/analytics/birdeye/search-category.d.ts +52 -0
- package/dist/analytics/birdeye/service.d.ts +94 -0
- package/dist/analytics/birdeye/types/api/common.d.ts +199 -0
- package/dist/analytics/birdeye/types/api/defi.d.ts +187 -0
- package/dist/analytics/birdeye/types/api/pair.d.ts +182 -0
- package/dist/analytics/birdeye/types/api/search.d.ts +64 -0
- package/dist/analytics/birdeye/types/api/token.d.ts +580 -0
- package/dist/analytics/birdeye/types/api/trader.d.ts +70 -0
- package/dist/analytics/birdeye/types/api/wallet.d.ts +161 -0
- package/dist/analytics/birdeye/types/shared.d.ts +83 -0
- package/dist/analytics/birdeye/utils.d.ts +74 -0
- package/dist/analytics/dexscreener/errors.d.ts +2 -0
- package/dist/analytics/dexscreener/index.d.ts +3 -0
- package/dist/analytics/dexscreener/search-category.d.ts +3 -0
- package/dist/analytics/dexscreener/service.d.ts +34 -0
- package/dist/analytics/dexscreener/types.d.ts +131 -0
- package/dist/analytics/lpinfo/index.d.ts +31 -0
- package/dist/analytics/lpinfo/kamino/index.d.ts +7 -0
- package/dist/analytics/lpinfo/kamino/providers/kaminoLiquidityProvider.d.ts +6 -0
- package/dist/analytics/lpinfo/kamino/providers/kaminoPoolProvider.d.ts +6 -0
- package/dist/analytics/lpinfo/kamino/providers/kaminoProvider.d.ts +6 -0
- package/dist/analytics/lpinfo/kamino/services/kaminoLiquidityService.d.ts +203 -0
- package/dist/analytics/lpinfo/kamino/services/kaminoService.d.ts +171 -0
- package/dist/analytics/lpinfo/steer/index.d.ts +7 -0
- package/dist/analytics/lpinfo/steer/providers/steerLiquidityProvider.d.ts +6 -0
- package/dist/analytics/lpinfo/steer/services/steerLiquidityService.d.ts +208 -0
- package/dist/analytics/lpinfo/steer/steer-display-types.d.ts +97 -0
- package/dist/analytics/news/index.d.ts +32 -0
- package/dist/analytics/news/interfaces/types.d.ts +177 -0
- package/dist/analytics/news/providers/defiNewsProvider.d.ts +106 -0
- package/dist/analytics/news/services/newsDataService.d.ts +72 -0
- package/dist/analytics/news/utils/formatters.d.ts +54 -0
- package/dist/analytics/token-info/action.d.ts +6 -0
- package/dist/analytics/token-info/index.d.ts +3 -0
- package/dist/analytics/token-info/params.d.ts +10 -0
- package/dist/analytics/token-info/providers.d.ts +4 -0
- package/dist/analytics/token-info/service.d.ts +19 -0
- package/dist/analytics/token-info/types.d.ts +45 -0
- package/dist/api/wallet-routes.d.ts +100 -0
- package/dist/audit/audit-log.d.ts +29 -0
- package/dist/browser-shim/build-shim.d.ts +31 -0
- package/dist/browser-shim/index.d.ts +1 -0
- package/dist/chains/evm/actions/helpers.d.ts +31 -0
- package/dist/chains/evm/actions/swap.d.ts +53 -0
- package/dist/chains/evm/actions/transfer.d.ts +10 -0
- package/dist/chains/evm/bridge-router.d.ts +44 -0
- package/dist/chains/evm/build.d.ts +2 -0
- package/dist/chains/evm/chain-handler.d.ts +37 -0
- package/dist/chains/evm/constants.d.ts +16 -0
- package/dist/chains/evm/dex/aerodrome/index.d.ts +6 -0
- package/dist/chains/evm/dex/aerodrome/services/AerodromeLpService.d.ts +27 -0
- package/dist/chains/evm/dex/aerodrome/types.d.ts +435 -0
- package/dist/chains/evm/dex/pancakeswp/index.d.ts +6 -0
- package/dist/chains/evm/dex/pancakeswp/services/PancakeSwapV3LpService.d.ts +28 -0
- package/dist/chains/evm/dex/pancakeswp/types.d.ts +19 -0
- package/dist/chains/evm/dex/uniswap/index.d.ts +6 -0
- package/dist/chains/evm/dex/uniswap/services/UniswapV3LpService.d.ts +28 -0
- package/dist/chains/evm/dex/uniswap/types.d.ts +458 -0
- package/dist/chains/evm/generated/specs/spec-helpers.d.ts +35 -0
- package/dist/chains/evm/generated/specs/specs.d.ts +99 -0
- package/dist/chains/evm/gov-router.d.ts +6 -0
- package/dist/chains/evm/index.browser.d.ts +3 -0
- package/dist/chains/evm/index.d.ts +6 -0
- package/dist/chains/evm/prompts.d.ts +24 -0
- package/dist/chains/evm/providers/get-balance.d.ts +2 -0
- package/dist/chains/evm/providers/wallet.d.ts +35 -0
- package/dist/chains/evm/routes/sign.d.ts +13 -0
- package/dist/chains/evm/rpc-providers.d.ts +26 -0
- package/dist/chains/evm/service.d.ts +26 -0
- package/dist/chains/evm/templates/index.d.ts +1 -0
- package/dist/chains/evm/types/index.d.ts +296 -0
- package/dist/chains/evm/vitest.config.d.ts +2 -0
- package/dist/chains/registry.d.ts +3 -0
- package/dist/chains/solana/actions/confirmation.d.ts +9 -0
- package/dist/chains/solana/bn.d.ts +6 -0
- package/dist/chains/solana/build.d.ts +2 -0
- package/dist/chains/solana/constants.d.ts +2 -0
- package/dist/chains/solana/dex/meteora/e2e/scenarios.d.ts +10 -0
- package/dist/chains/solana/dex/meteora/e2e/test-utils.d.ts +28 -0
- package/dist/chains/solana/dex/meteora/index.d.ts +3 -0
- package/dist/chains/solana/dex/meteora/providers/positionProvider.d.ts +9 -0
- package/dist/chains/solana/dex/meteora/services/MeteoraLpService.d.ts +37 -0
- package/dist/chains/solana/dex/meteora/utils/dlmm.d.ts +6 -0
- package/dist/chains/solana/dex/meteora/utils/loadWallet.d.ts +14 -0
- package/dist/chains/solana/dex/meteora/utils/sendTransaction.d.ts +2 -0
- package/dist/chains/solana/dex/orca/index.d.ts +6 -0
- package/dist/chains/solana/dex/orca/providers/positionProvider.d.ts +10 -0
- package/dist/chains/solana/dex/orca/services/srv_orca.d.ts +10 -0
- package/dist/chains/solana/dex/orca/types.d.ts +61 -0
- package/dist/chains/solana/dex/orca/utils/loadWallet.d.ts +1 -0
- package/dist/chains/solana/dex/orca/utils/sendTransaction.d.ts +2 -0
- package/dist/chains/solana/dex/raydium/index.d.ts +6 -0
- package/dist/chains/solana/dex/raydium/providers/positionProvider.d.ts +10 -0
- package/dist/chains/solana/dex/raydium/services/srv_raydium.d.ts +104 -0
- package/dist/chains/solana/dex/raydium/types.d.ts +42 -0
- package/dist/chains/solana/environment.d.ts +15 -0
- package/dist/chains/solana/generated/specs/spec-helpers.d.ts +35 -0
- package/dist/chains/solana/generated/specs/specs.d.ts +73 -0
- package/dist/chains/solana/index.browser.d.ts +3 -0
- package/dist/chains/solana/index.d.ts +7 -0
- package/dist/chains/solana/keypairUtils.d.ts +7 -0
- package/dist/chains/solana/prompts.d.ts +12 -0
- package/dist/chains/solana/providers/wallet.d.ts +2 -0
- package/dist/chains/solana/routes/index.d.ts +2 -0
- package/dist/chains/solana/routes/sign.d.ts +16 -0
- package/dist/chains/solana/service.d.ts +237 -0
- package/dist/chains/solana/types.d.ts +377 -0
- package/dist/chains/solana/vitest.config.d.ts +2 -0
- package/dist/chains/wallet-action.d.ts +3 -0
- package/dist/contracts.d.ts +58 -0
- package/dist/core-augmentation.d.ts +9 -0
- package/dist/index.d.mts +27 -34727
- package/dist/index.d.ts +27 -0
- package/dist/index.mjs +28246 -21186
- package/dist/index.mjs.map +153 -0
- package/dist/lib/server-wallet-trade.d.ts +22 -0
- package/dist/lib/server-wallet-trade.js +333 -0
- package/dist/lib/server-wallet-trade.js.map +11 -0
- package/dist/lib/wallet-export-guard.d.ts +45 -0
- package/dist/lp/actions/liquidity.d.ts +2 -0
- package/dist/lp/e2e/real-token-tests.d.ts +6 -0
- package/dist/lp/e2e/scenarios.d.ts +9 -0
- package/dist/lp/e2e/test-utils.d.ts +28 -0
- package/dist/lp/lp-manager-entry.d.ts +18 -0
- package/dist/lp/services/ConcentratedLiquidityService.d.ts +32 -0
- package/dist/lp/services/DexInteractionService.d.ts +34 -0
- package/dist/lp/services/LpManagementService.d.ts +116 -0
- package/dist/lp/services/UserLpProfileService.d.ts +18 -0
- package/dist/lp/services/VaultService.d.ts +21 -0
- package/dist/lp/services/YieldOptimizationService.d.ts +59 -0
- package/dist/lp/services/__tests__/MockLpService.d.ts +17 -0
- package/dist/lp/types.d.ts +439 -0
- package/dist/lp/utils/solanaClient.d.ts +26 -0
- package/dist/plugin.d.ts +7 -0
- package/dist/policy/policy.d.ts +14 -0
- package/dist/providers/canonical-provider.d.ts +19 -0
- package/dist/providers/wallet-provider.d.ts +5 -0
- package/dist/register-routes.d.ts +1 -0
- package/dist/routes/plugin.d.ts +14 -0
- package/dist/routes/wallet-market-overview-route.d.ts +7 -0
- package/dist/sdk/abi.d.ts +396 -0
- package/dist/sdk/bridge/abis.d.ts +63 -0
- package/dist/sdk/bridge/client.d.ts +48 -0
- package/dist/sdk/bridge/index.d.ts +14 -0
- package/dist/sdk/bridge/solana.d.ts +131 -0
- package/dist/sdk/bridge/types.d.ts +92 -0
- package/dist/sdk/convenience.d.ts +104 -0
- package/dist/sdk/escrow/MutualStakeEscrow.d.ts +75 -0
- package/dist/sdk/escrow/types.d.ts +58 -0
- package/dist/sdk/escrow/verifiers.d.ts +25 -0
- package/dist/sdk/identity/erc8004.d.ts +304 -0
- package/dist/sdk/identity/reputation.d.ts +317 -0
- package/dist/sdk/identity/uaid.d.ts +192 -0
- package/dist/sdk/identity/validation.d.ts +282 -0
- package/dist/sdk/index.d.ts +133 -0
- package/dist/sdk/index.js +5284 -0
- package/dist/sdk/index.js.map +40 -0
- package/dist/sdk/policy/SpendingPolicy.d.ts +105 -0
- package/dist/sdk/policy/UptoBillingPolicy.d.ts +87 -0
- package/dist/sdk/router/PaymentRouter.d.ts +77 -0
- package/dist/sdk/router/index.d.ts +2 -0
- package/dist/sdk/swap/SwapModule.d.ts +47 -0
- package/dist/sdk/swap/abi.d.ts +50 -0
- package/dist/sdk/swap/index.d.ts +11 -0
- package/dist/sdk/swap/types.d.ts +101 -0
- package/dist/sdk/tokens/decimals.d.ts +64 -0
- package/dist/sdk/tokens/registry.d.ts +81 -0
- package/dist/sdk/tokens/solana.d.ts +107 -0
- package/dist/sdk/tokens/transfers.d.ts +94 -0
- package/dist/sdk/types.d.ts +129 -0
- package/dist/sdk/wallet-core.d.ts +29450 -0
- package/dist/sdk/x402/budget.d.ts +51 -0
- package/dist/sdk/x402/chains/abstract/index.d.ts +134 -0
- package/dist/sdk/x402/client.d.ts +66 -0
- package/dist/sdk/x402/index.d.ts +8 -0
- package/dist/sdk/x402/middleware.d.ts +37 -0
- package/dist/sdk/x402/multi-asset.d.ts +53 -0
- package/dist/sdk/x402/types.d.ts +109 -0
- package/dist/security/wallet-context-safety.d.ts +7 -0
- package/dist/security/wallet-financial-confirmation.d.ts +23 -0
- package/dist/services/wallet-backend-service.d.ts +39 -0
- package/dist/types/wallet-router.d.ts +130 -0
- package/dist/utils/intent-trajectory.d.ts +34 -0
- package/dist/wallet/backend.d.ts +41 -0
- package/dist/wallet/errors.d.ts +17 -0
- package/dist/wallet/index.d.ts +6 -0
- package/dist/wallet/local-eoa-backend.d.ts +37 -0
- package/dist/wallet/pending.d.ts +47 -0
- package/dist/wallet/select-backend.d.ts +11 -0
- package/dist/wallet/steward-backend.d.ts +22 -0
- package/dist/wallet-action.d.ts +1 -0
- package/dist/wallet-action.js +6292 -0
- package/dist/wallet-action.js.map +44 -0
- package/package.json +35 -21
- package/registry-entry.json +134 -0
- package/src/analytics/birdeye/actions/wallet-search-address.ts +85 -5
- package/src/analytics/birdeye/birdeye-task.ts +25 -9
- package/src/analytics/birdeye/birdeye.ts +6 -7
- package/src/analytics/birdeye/constants.ts +0 -1
- package/src/analytics/birdeye/providers/agent-portfolio-provider.ts +0 -1
- package/src/analytics/birdeye/providers/market.ts +51 -45
- package/src/analytics/birdeye/providers/portfolio-factory.ts +79 -38
- package/src/analytics/birdeye/providers/trending.ts +43 -46
- package/src/analytics/birdeye/providers/wallet.ts +0 -1
- package/src/analytics/birdeye/search-category.test.ts +1 -1
- package/src/analytics/birdeye/search-category.ts +77 -12
- package/src/analytics/birdeye/service.test.ts +146 -0
- package/src/analytics/birdeye/service.ts +220 -105
- package/src/analytics/birdeye/types/api/common.ts +0 -1
- package/src/analytics/birdeye/types/api/defi.ts +0 -1
- package/src/analytics/birdeye/types/api/pair.ts +0 -1
- package/src/analytics/birdeye/types/api/search.ts +0 -1
- package/src/analytics/birdeye/types/api/token.ts +0 -1
- package/src/analytics/birdeye/types/api/trader.ts +0 -1
- package/src/analytics/birdeye/types/api/wallet.ts +0 -1
- package/src/analytics/birdeye/types/shared.ts +0 -11
- package/src/analytics/birdeye/utils.test.ts +69 -0
- package/src/analytics/birdeye/utils.ts +11 -8
- package/src/analytics/dexscreener/search-category.ts +0 -1
- package/src/analytics/dexscreener/service.ts +7 -12
- package/src/analytics/dexscreener/types.ts +0 -1
- package/src/analytics/lpinfo/index.ts +5 -2
- package/src/analytics/lpinfo/kamino/README.md +2 -2
- package/src/analytics/lpinfo/kamino/index.ts +9 -2
- package/src/analytics/lpinfo/kamino/providers/kaminoLiquidityProvider.ts +6 -26
- package/src/analytics/lpinfo/kamino/providers/kaminoPoolProvider.ts +11 -12
- package/src/analytics/lpinfo/kamino/providers/kaminoProvider.ts +76 -32
- package/src/analytics/lpinfo/kamino/services/kaminoLiquidityService.ts +78 -38
- package/src/analytics/lpinfo/kamino/services/kaminoService.ts +71 -31
- package/src/analytics/lpinfo/steer/index.ts +7 -2
- package/src/analytics/lpinfo/steer/providers/steerLiquidityProvider.ts +25 -26
- package/src/analytics/lpinfo/steer/services/steerLiquidityService.ts +367 -149
- package/src/analytics/news/index.ts +7 -2
- package/src/analytics/news/interfaces/types.ts +0 -1
- package/src/analytics/news/providers/defiNewsProvider.ts +17 -44
- package/src/analytics/news/services/newsDataService.ts +1 -22
- package/src/analytics/news/utils/formatters.test.ts +60 -0
- package/src/analytics/news/utils/formatters.ts +0 -1
- package/src/analytics/token-info/action.ts +52 -212
- package/src/analytics/token-info/index.ts +1 -1
- package/src/analytics/token-info/params.test.ts +69 -0
- package/src/analytics/token-info/params.ts +13 -11
- package/src/analytics/token-info/providers.ts +46 -17
- package/src/analytics/token-info/service.ts +3 -3
- package/src/analytics/token-info/types.ts +2 -2
- package/src/api/wallet-routes.test.ts +56 -0
- package/src/api/wallet-routes.ts +1728 -0
- package/src/audit/audit-log.ts +57 -2
- package/src/browser-shim/build-shim.ts +1 -1
- package/src/browser-shim/shim.template.js +107 -117
- package/src/chains/{wallet-router.test.ts → __tests__/wallet-router.test.ts} +57 -10
- package/src/chains/evm/actions/helpers.ts +9 -7
- package/src/chains/evm/actions/swap.ts +176 -22
- package/src/chains/evm/actions/transfer.ts +29 -22
- package/src/chains/evm/biome.json +1 -1
- package/src/chains/evm/build.ts +6 -1
- package/src/chains/evm/constants.ts +19 -0
- package/src/chains/evm/contracts/artifacts/OZGovernor.json +25 -1682
- package/src/chains/evm/dex/aerodrome/index.ts +6 -1
- package/src/chains/evm/dex/aerodrome/services/AerodromeLpService.ts +41 -15
- package/src/chains/evm/dex/aerodrome/types.ts +1 -2
- package/src/chains/evm/dex/pancakeswp/index.ts +6 -1
- package/src/chains/evm/dex/pancakeswp/services/PancakeSwapV3LpService.ts +54 -17
- package/src/chains/evm/dex/pancakeswp/types.ts +1 -2
- package/src/chains/evm/dex/uniswap/index.ts +6 -1
- package/src/chains/evm/dex/uniswap/services/UniswapV3LpService.ts +20 -9
- package/src/chains/evm/dex/uniswap/types.ts +1 -2
- package/src/chains/evm/gov-router.ts +3 -1
- package/src/chains/evm/index.browser.ts +1 -1
- package/src/chains/evm/index.ts +5 -1
- package/src/chains/evm/prompts.ts +5 -0
- package/src/chains/evm/providers/get-balance.ts +1 -1
- package/src/chains/evm/providers/wallet.ts +80 -9
- package/src/chains/evm/routes/sign.ts +35 -26
- package/src/chains/evm/rpc-providers.ts +1 -1
- package/src/chains/evm/types/index.ts +22 -2
- package/src/chains/registry.ts +1 -1
- package/src/chains/wallet-action.ts +301 -91
- package/src/index.ts +9 -5
- package/src/lib/wallet-export-guard.test.ts +233 -0
- package/src/lib/wallet-export-guard.ts +1 -1
- package/src/lp/actions/liquidity.ts +53 -26
- package/src/lp/e2e/real-token-tests.ts +0 -1
- package/src/lp/e2e/scenarios.ts +1 -2
- package/src/lp/e2e/test-utils.ts +20 -7
- package/src/lp/lp-manager-entry.ts +2 -5
- package/src/lp/services/ConcentratedLiquidityService.ts +3 -10
- package/src/lp/services/DexInteractionService.ts +1 -2
- package/src/lp/services/LpManagementService.test.ts +0 -1
- package/src/lp/services/LpManagementService.ts +75 -35
- package/src/lp/services/UserLpProfileService.ts +2 -3
- package/src/lp/services/VaultService.ts +10 -4
- package/src/lp/services/YieldOptimizationService.ts +29 -13
- package/src/lp/services/__tests__/MockLpService.ts +1 -2
- package/src/lp/types.ts +9 -13
- package/src/lp/utils/solanaClient.ts +4 -2
- package/src/plugin.routes.test.ts +24 -0
- package/src/plugin.ts +30 -13
- package/src/providers/canonical-provider.ts +1 -1
- package/src/providers/{unified-wallet-provider.ts → wallet-provider.ts} +3 -3
- package/src/routes/__fixtures__/coingecko-markets.recorded.json +97 -0
- package/src/routes/wallet-market-overview-route.ts +1 -1
- package/src/routes/wallet-market-overview.contract.test.ts +139 -0
- package/src/routes/wallet-market-overview.real.test.ts +83 -0
- package/src/sdk/escrow/MutualStakeEscrow.ts +1 -2
- package/src/sdk/identity/erc8004.ts +1 -1
- package/src/sdk/identity/validation.ts +3 -4
- package/src/sdk/index.ts +2 -2
- package/src/sdk/policy/SpendingPolicy.ts +1 -1
- package/src/sdk/router/PaymentRouter.ts +8 -11
- package/src/sdk/swap/SwapModule.ts +1 -1
- package/src/sdk/tokens/registry.ts +1 -1
- package/src/sdk/x402/middleware.ts +2 -8
- package/src/security/__tests__/wallet-context-safety.test.ts +79 -0
- package/src/security/__tests__/wallet-financial-confirmation.test.ts +88 -0
- package/src/security/wallet-context-safety.ts +128 -0
- package/src/security/wallet-financial-confirmation.ts +150 -0
- package/src/services/wallet-backend-service.ts +15 -1
- package/src/utils/intent-trajectory.ts +2 -2
- package/src/wallet/steward-backend.ts +4 -4
- package/dist/LpManagementService-BWrQ5-cO.mjs +0 -353
- package/dist/MockLpService-D_Apn4Fd.mjs +0 -99
- package/dist/aerodrome-CfnESC32.mjs +0 -890
- package/dist/chunk-hT5z_Zn9.mjs +0 -35
- package/dist/lib/server-wallet-trade.d.mts +0 -34
- package/dist/lib/server-wallet-trade.mjs +0 -306
- package/dist/meteora-BPX39hZo.mjs +0 -22640
- package/dist/orca-Bybp1HXO.mjs +0 -249
- package/dist/pancakeswp-CkEXlXti.mjs +0 -604
- package/dist/plugin-ZO_MTyd0.mjs +0 -529
- package/dist/raydium-rfaM9yEf.mjs +0 -539
- package/dist/sdk/index.d.mts +0 -32492
- package/dist/sdk/index.mjs +0 -6415
- package/dist/types-D5252NZk.mjs +0 -487
- package/dist/uniswap-CReXgXVN.mjs +0 -573
- package/dist/wallet-action.d.mts +0 -6
- package/dist/wallet-action.mjs +0 -820
- package/src/analytics/birdeye/tasks/birdeye.ts +0 -232
- package/src/analytics/lpinfo/index.d.ts +0 -7
- package/src/chains/evm/contracts/artifacts/TimelockController.json +0 -1007
- package/src/chains/evm/contracts/artifacts/VoteToken.json +0 -895
- package/src/lp/tasks/LpAutoRebalanceTask.ts +0 -117
- package/src/lp/tasks/__tests__/LpAutoRebalanceTask.test.ts +0 -370
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
import type { Address } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* Aerodrome DEX specific types
|
|
4
|
+
* Aerodrome is a ve(3,3) DEX on Base, fork of Velodrome
|
|
5
|
+
*/
|
|
6
|
+
export type AerodromePoolType = "volatile" | "stable";
|
|
7
|
+
export interface AerodromePool {
|
|
8
|
+
address: Address;
|
|
9
|
+
token0: Address;
|
|
10
|
+
token1: Address;
|
|
11
|
+
stable: boolean;
|
|
12
|
+
reserve0: bigint;
|
|
13
|
+
reserve1: bigint;
|
|
14
|
+
totalSupply: bigint;
|
|
15
|
+
}
|
|
16
|
+
export interface AerodromeGauge {
|
|
17
|
+
address: Address;
|
|
18
|
+
pool: Address;
|
|
19
|
+
rewardToken: Address;
|
|
20
|
+
rewardsPerSecond: bigint;
|
|
21
|
+
}
|
|
22
|
+
export declare const AERODROME_ADDRESSES: {
|
|
23
|
+
8453: {
|
|
24
|
+
router: Address;
|
|
25
|
+
factory: Address;
|
|
26
|
+
voter: Address;
|
|
27
|
+
aero: Address;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare const AERODROME_ROUTER_ABI: readonly [{
|
|
31
|
+
readonly inputs: readonly [{
|
|
32
|
+
readonly name: "tokenA";
|
|
33
|
+
readonly type: "address";
|
|
34
|
+
}, {
|
|
35
|
+
readonly name: "tokenB";
|
|
36
|
+
readonly type: "address";
|
|
37
|
+
}, {
|
|
38
|
+
readonly name: "stable";
|
|
39
|
+
readonly type: "bool";
|
|
40
|
+
}, {
|
|
41
|
+
readonly name: "amountADesired";
|
|
42
|
+
readonly type: "uint256";
|
|
43
|
+
}, {
|
|
44
|
+
readonly name: "amountBDesired";
|
|
45
|
+
readonly type: "uint256";
|
|
46
|
+
}, {
|
|
47
|
+
readonly name: "amountAMin";
|
|
48
|
+
readonly type: "uint256";
|
|
49
|
+
}, {
|
|
50
|
+
readonly name: "amountBMin";
|
|
51
|
+
readonly type: "uint256";
|
|
52
|
+
}, {
|
|
53
|
+
readonly name: "to";
|
|
54
|
+
readonly type: "address";
|
|
55
|
+
}, {
|
|
56
|
+
readonly name: "deadline";
|
|
57
|
+
readonly type: "uint256";
|
|
58
|
+
}];
|
|
59
|
+
readonly name: "addLiquidity";
|
|
60
|
+
readonly outputs: readonly [{
|
|
61
|
+
readonly name: "amountA";
|
|
62
|
+
readonly type: "uint256";
|
|
63
|
+
}, {
|
|
64
|
+
readonly name: "amountB";
|
|
65
|
+
readonly type: "uint256";
|
|
66
|
+
}, {
|
|
67
|
+
readonly name: "liquidity";
|
|
68
|
+
readonly type: "uint256";
|
|
69
|
+
}];
|
|
70
|
+
readonly stateMutability: "nonpayable";
|
|
71
|
+
readonly type: "function";
|
|
72
|
+
}, {
|
|
73
|
+
readonly inputs: readonly [{
|
|
74
|
+
readonly name: "token";
|
|
75
|
+
readonly type: "address";
|
|
76
|
+
}, {
|
|
77
|
+
readonly name: "stable";
|
|
78
|
+
readonly type: "bool";
|
|
79
|
+
}, {
|
|
80
|
+
readonly name: "amountTokenDesired";
|
|
81
|
+
readonly type: "uint256";
|
|
82
|
+
}, {
|
|
83
|
+
readonly name: "amountTokenMin";
|
|
84
|
+
readonly type: "uint256";
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "amountETHMin";
|
|
87
|
+
readonly type: "uint256";
|
|
88
|
+
}, {
|
|
89
|
+
readonly name: "to";
|
|
90
|
+
readonly type: "address";
|
|
91
|
+
}, {
|
|
92
|
+
readonly name: "deadline";
|
|
93
|
+
readonly type: "uint256";
|
|
94
|
+
}];
|
|
95
|
+
readonly name: "addLiquidityETH";
|
|
96
|
+
readonly outputs: readonly [{
|
|
97
|
+
readonly name: "amountToken";
|
|
98
|
+
readonly type: "uint256";
|
|
99
|
+
}, {
|
|
100
|
+
readonly name: "amountETH";
|
|
101
|
+
readonly type: "uint256";
|
|
102
|
+
}, {
|
|
103
|
+
readonly name: "liquidity";
|
|
104
|
+
readonly type: "uint256";
|
|
105
|
+
}];
|
|
106
|
+
readonly stateMutability: "payable";
|
|
107
|
+
readonly type: "function";
|
|
108
|
+
}, {
|
|
109
|
+
readonly inputs: readonly [{
|
|
110
|
+
readonly name: "tokenA";
|
|
111
|
+
readonly type: "address";
|
|
112
|
+
}, {
|
|
113
|
+
readonly name: "tokenB";
|
|
114
|
+
readonly type: "address";
|
|
115
|
+
}, {
|
|
116
|
+
readonly name: "stable";
|
|
117
|
+
readonly type: "bool";
|
|
118
|
+
}, {
|
|
119
|
+
readonly name: "liquidity";
|
|
120
|
+
readonly type: "uint256";
|
|
121
|
+
}, {
|
|
122
|
+
readonly name: "amountAMin";
|
|
123
|
+
readonly type: "uint256";
|
|
124
|
+
}, {
|
|
125
|
+
readonly name: "amountBMin";
|
|
126
|
+
readonly type: "uint256";
|
|
127
|
+
}, {
|
|
128
|
+
readonly name: "to";
|
|
129
|
+
readonly type: "address";
|
|
130
|
+
}, {
|
|
131
|
+
readonly name: "deadline";
|
|
132
|
+
readonly type: "uint256";
|
|
133
|
+
}];
|
|
134
|
+
readonly name: "removeLiquidity";
|
|
135
|
+
readonly outputs: readonly [{
|
|
136
|
+
readonly name: "amountA";
|
|
137
|
+
readonly type: "uint256";
|
|
138
|
+
}, {
|
|
139
|
+
readonly name: "amountB";
|
|
140
|
+
readonly type: "uint256";
|
|
141
|
+
}];
|
|
142
|
+
readonly stateMutability: "nonpayable";
|
|
143
|
+
readonly type: "function";
|
|
144
|
+
}, {
|
|
145
|
+
readonly inputs: readonly [{
|
|
146
|
+
readonly name: "token";
|
|
147
|
+
readonly type: "address";
|
|
148
|
+
}, {
|
|
149
|
+
readonly name: "stable";
|
|
150
|
+
readonly type: "bool";
|
|
151
|
+
}, {
|
|
152
|
+
readonly name: "liquidity";
|
|
153
|
+
readonly type: "uint256";
|
|
154
|
+
}, {
|
|
155
|
+
readonly name: "amountTokenMin";
|
|
156
|
+
readonly type: "uint256";
|
|
157
|
+
}, {
|
|
158
|
+
readonly name: "amountETHMin";
|
|
159
|
+
readonly type: "uint256";
|
|
160
|
+
}, {
|
|
161
|
+
readonly name: "to";
|
|
162
|
+
readonly type: "address";
|
|
163
|
+
}, {
|
|
164
|
+
readonly name: "deadline";
|
|
165
|
+
readonly type: "uint256";
|
|
166
|
+
}];
|
|
167
|
+
readonly name: "removeLiquidityETH";
|
|
168
|
+
readonly outputs: readonly [{
|
|
169
|
+
readonly name: "amountToken";
|
|
170
|
+
readonly type: "uint256";
|
|
171
|
+
}, {
|
|
172
|
+
readonly name: "amountETH";
|
|
173
|
+
readonly type: "uint256";
|
|
174
|
+
}];
|
|
175
|
+
readonly stateMutability: "nonpayable";
|
|
176
|
+
readonly type: "function";
|
|
177
|
+
}, {
|
|
178
|
+
readonly inputs: readonly [{
|
|
179
|
+
readonly name: "tokenA";
|
|
180
|
+
readonly type: "address";
|
|
181
|
+
}, {
|
|
182
|
+
readonly name: "tokenB";
|
|
183
|
+
readonly type: "address";
|
|
184
|
+
}, {
|
|
185
|
+
readonly name: "stable";
|
|
186
|
+
readonly type: "bool";
|
|
187
|
+
}];
|
|
188
|
+
readonly name: "getReserves";
|
|
189
|
+
readonly outputs: readonly [{
|
|
190
|
+
readonly name: "reserveA";
|
|
191
|
+
readonly type: "uint256";
|
|
192
|
+
}, {
|
|
193
|
+
readonly name: "reserveB";
|
|
194
|
+
readonly type: "uint256";
|
|
195
|
+
}];
|
|
196
|
+
readonly stateMutability: "view";
|
|
197
|
+
readonly type: "function";
|
|
198
|
+
}, {
|
|
199
|
+
readonly inputs: readonly [{
|
|
200
|
+
readonly name: "amountIn";
|
|
201
|
+
readonly type: "uint256";
|
|
202
|
+
}, {
|
|
203
|
+
readonly name: "tokenIn";
|
|
204
|
+
readonly type: "address";
|
|
205
|
+
}, {
|
|
206
|
+
readonly name: "tokenOut";
|
|
207
|
+
readonly type: "address";
|
|
208
|
+
}];
|
|
209
|
+
readonly name: "getAmountOut";
|
|
210
|
+
readonly outputs: readonly [{
|
|
211
|
+
readonly name: "amount";
|
|
212
|
+
readonly type: "uint256";
|
|
213
|
+
}, {
|
|
214
|
+
readonly name: "stable";
|
|
215
|
+
readonly type: "bool";
|
|
216
|
+
}];
|
|
217
|
+
readonly stateMutability: "view";
|
|
218
|
+
readonly type: "function";
|
|
219
|
+
}];
|
|
220
|
+
export declare const AERODROME_FACTORY_ABI: readonly [{
|
|
221
|
+
readonly inputs: readonly [{
|
|
222
|
+
readonly name: "tokenA";
|
|
223
|
+
readonly type: "address";
|
|
224
|
+
}, {
|
|
225
|
+
readonly name: "tokenB";
|
|
226
|
+
readonly type: "address";
|
|
227
|
+
}, {
|
|
228
|
+
readonly name: "stable";
|
|
229
|
+
readonly type: "bool";
|
|
230
|
+
}];
|
|
231
|
+
readonly name: "getPool";
|
|
232
|
+
readonly outputs: readonly [{
|
|
233
|
+
readonly name: "";
|
|
234
|
+
readonly type: "address";
|
|
235
|
+
}];
|
|
236
|
+
readonly stateMutability: "view";
|
|
237
|
+
readonly type: "function";
|
|
238
|
+
}, {
|
|
239
|
+
readonly inputs: readonly [];
|
|
240
|
+
readonly name: "allPools";
|
|
241
|
+
readonly outputs: readonly [{
|
|
242
|
+
readonly name: "";
|
|
243
|
+
readonly type: "address[]";
|
|
244
|
+
}];
|
|
245
|
+
readonly stateMutability: "view";
|
|
246
|
+
readonly type: "function";
|
|
247
|
+
}, {
|
|
248
|
+
readonly inputs: readonly [];
|
|
249
|
+
readonly name: "allPoolsLength";
|
|
250
|
+
readonly outputs: readonly [{
|
|
251
|
+
readonly name: "";
|
|
252
|
+
readonly type: "uint256";
|
|
253
|
+
}];
|
|
254
|
+
readonly stateMutability: "view";
|
|
255
|
+
readonly type: "function";
|
|
256
|
+
}, {
|
|
257
|
+
readonly inputs: readonly [{
|
|
258
|
+
readonly name: "index";
|
|
259
|
+
readonly type: "uint256";
|
|
260
|
+
}];
|
|
261
|
+
readonly name: "allPools";
|
|
262
|
+
readonly outputs: readonly [{
|
|
263
|
+
readonly name: "";
|
|
264
|
+
readonly type: "address";
|
|
265
|
+
}];
|
|
266
|
+
readonly stateMutability: "view";
|
|
267
|
+
readonly type: "function";
|
|
268
|
+
}];
|
|
269
|
+
export declare const AERODROME_POOL_ABI: readonly [{
|
|
270
|
+
readonly inputs: readonly [];
|
|
271
|
+
readonly name: "token0";
|
|
272
|
+
readonly outputs: readonly [{
|
|
273
|
+
readonly type: "address";
|
|
274
|
+
}];
|
|
275
|
+
readonly stateMutability: "view";
|
|
276
|
+
readonly type: "function";
|
|
277
|
+
}, {
|
|
278
|
+
readonly inputs: readonly [];
|
|
279
|
+
readonly name: "token1";
|
|
280
|
+
readonly outputs: readonly [{
|
|
281
|
+
readonly type: "address";
|
|
282
|
+
}];
|
|
283
|
+
readonly stateMutability: "view";
|
|
284
|
+
readonly type: "function";
|
|
285
|
+
}, {
|
|
286
|
+
readonly inputs: readonly [];
|
|
287
|
+
readonly name: "stable";
|
|
288
|
+
readonly outputs: readonly [{
|
|
289
|
+
readonly type: "bool";
|
|
290
|
+
}];
|
|
291
|
+
readonly stateMutability: "view";
|
|
292
|
+
readonly type: "function";
|
|
293
|
+
}, {
|
|
294
|
+
readonly inputs: readonly [];
|
|
295
|
+
readonly name: "reserve0";
|
|
296
|
+
readonly outputs: readonly [{
|
|
297
|
+
readonly type: "uint256";
|
|
298
|
+
}];
|
|
299
|
+
readonly stateMutability: "view";
|
|
300
|
+
readonly type: "function";
|
|
301
|
+
}, {
|
|
302
|
+
readonly inputs: readonly [];
|
|
303
|
+
readonly name: "reserve1";
|
|
304
|
+
readonly outputs: readonly [{
|
|
305
|
+
readonly type: "uint256";
|
|
306
|
+
}];
|
|
307
|
+
readonly stateMutability: "view";
|
|
308
|
+
readonly type: "function";
|
|
309
|
+
}, {
|
|
310
|
+
readonly inputs: readonly [];
|
|
311
|
+
readonly name: "totalSupply";
|
|
312
|
+
readonly outputs: readonly [{
|
|
313
|
+
readonly type: "uint256";
|
|
314
|
+
}];
|
|
315
|
+
readonly stateMutability: "view";
|
|
316
|
+
readonly type: "function";
|
|
317
|
+
}, {
|
|
318
|
+
readonly inputs: readonly [{
|
|
319
|
+
readonly name: "account";
|
|
320
|
+
readonly type: "address";
|
|
321
|
+
}];
|
|
322
|
+
readonly name: "balanceOf";
|
|
323
|
+
readonly outputs: readonly [{
|
|
324
|
+
readonly type: "uint256";
|
|
325
|
+
}];
|
|
326
|
+
readonly stateMutability: "view";
|
|
327
|
+
readonly type: "function";
|
|
328
|
+
}, {
|
|
329
|
+
readonly inputs: readonly [];
|
|
330
|
+
readonly name: "getReserves";
|
|
331
|
+
readonly outputs: readonly [{
|
|
332
|
+
readonly name: "_reserve0";
|
|
333
|
+
readonly type: "uint256";
|
|
334
|
+
}, {
|
|
335
|
+
readonly name: "_reserve1";
|
|
336
|
+
readonly type: "uint256";
|
|
337
|
+
}, {
|
|
338
|
+
readonly name: "_blockTimestampLast";
|
|
339
|
+
readonly type: "uint256";
|
|
340
|
+
}];
|
|
341
|
+
readonly stateMutability: "view";
|
|
342
|
+
readonly type: "function";
|
|
343
|
+
}, {
|
|
344
|
+
readonly inputs: readonly [{
|
|
345
|
+
readonly name: "spender";
|
|
346
|
+
readonly type: "address";
|
|
347
|
+
}, {
|
|
348
|
+
readonly name: "amount";
|
|
349
|
+
readonly type: "uint256";
|
|
350
|
+
}];
|
|
351
|
+
readonly name: "approve";
|
|
352
|
+
readonly outputs: readonly [{
|
|
353
|
+
readonly type: "bool";
|
|
354
|
+
}];
|
|
355
|
+
readonly stateMutability: "nonpayable";
|
|
356
|
+
readonly type: "function";
|
|
357
|
+
}, {
|
|
358
|
+
readonly inputs: readonly [{
|
|
359
|
+
readonly name: "owner";
|
|
360
|
+
readonly type: "address";
|
|
361
|
+
}, {
|
|
362
|
+
readonly name: "spender";
|
|
363
|
+
readonly type: "address";
|
|
364
|
+
}];
|
|
365
|
+
readonly name: "allowance";
|
|
366
|
+
readonly outputs: readonly [{
|
|
367
|
+
readonly type: "uint256";
|
|
368
|
+
}];
|
|
369
|
+
readonly stateMutability: "view";
|
|
370
|
+
readonly type: "function";
|
|
371
|
+
}];
|
|
372
|
+
export declare const ERC20_ABI: readonly [{
|
|
373
|
+
readonly inputs: readonly [];
|
|
374
|
+
readonly name: "symbol";
|
|
375
|
+
readonly outputs: readonly [{
|
|
376
|
+
readonly type: "string";
|
|
377
|
+
}];
|
|
378
|
+
readonly stateMutability: "view";
|
|
379
|
+
readonly type: "function";
|
|
380
|
+
}, {
|
|
381
|
+
readonly inputs: readonly [];
|
|
382
|
+
readonly name: "decimals";
|
|
383
|
+
readonly outputs: readonly [{
|
|
384
|
+
readonly type: "uint8";
|
|
385
|
+
}];
|
|
386
|
+
readonly stateMutability: "view";
|
|
387
|
+
readonly type: "function";
|
|
388
|
+
}, {
|
|
389
|
+
readonly inputs: readonly [];
|
|
390
|
+
readonly name: "name";
|
|
391
|
+
readonly outputs: readonly [{
|
|
392
|
+
readonly type: "string";
|
|
393
|
+
}];
|
|
394
|
+
readonly stateMutability: "view";
|
|
395
|
+
readonly type: "function";
|
|
396
|
+
}, {
|
|
397
|
+
readonly inputs: readonly [{
|
|
398
|
+
readonly name: "account";
|
|
399
|
+
readonly type: "address";
|
|
400
|
+
}];
|
|
401
|
+
readonly name: "balanceOf";
|
|
402
|
+
readonly outputs: readonly [{
|
|
403
|
+
readonly type: "uint256";
|
|
404
|
+
}];
|
|
405
|
+
readonly stateMutability: "view";
|
|
406
|
+
readonly type: "function";
|
|
407
|
+
}, {
|
|
408
|
+
readonly inputs: readonly [{
|
|
409
|
+
readonly name: "spender";
|
|
410
|
+
readonly type: "address";
|
|
411
|
+
}, {
|
|
412
|
+
readonly name: "amount";
|
|
413
|
+
readonly type: "uint256";
|
|
414
|
+
}];
|
|
415
|
+
readonly name: "approve";
|
|
416
|
+
readonly outputs: readonly [{
|
|
417
|
+
readonly type: "bool";
|
|
418
|
+
}];
|
|
419
|
+
readonly stateMutability: "nonpayable";
|
|
420
|
+
readonly type: "function";
|
|
421
|
+
}, {
|
|
422
|
+
readonly inputs: readonly [{
|
|
423
|
+
readonly name: "owner";
|
|
424
|
+
readonly type: "address";
|
|
425
|
+
}, {
|
|
426
|
+
readonly name: "spender";
|
|
427
|
+
readonly type: "address";
|
|
428
|
+
}];
|
|
429
|
+
readonly name: "allowance";
|
|
430
|
+
readonly outputs: readonly [{
|
|
431
|
+
readonly type: "uint256";
|
|
432
|
+
}];
|
|
433
|
+
readonly stateMutability: "view";
|
|
434
|
+
readonly type: "function";
|
|
435
|
+
}];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Plugin } from "@elizaos/core";
|
|
2
|
+
import { PancakeSwapV3LpService } from "./services/PancakeSwapV3LpService.ts";
|
|
3
|
+
export declare const pancakeswapPlugin: Plugin;
|
|
4
|
+
export * from "./types.ts";
|
|
5
|
+
export { PancakeSwapV3LpService };
|
|
6
|
+
export default pancakeswapPlugin;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type IAgentRuntime, Service } from "@elizaos/core";
|
|
2
|
+
import { type Address } from "viem";
|
|
3
|
+
import type { EvmAddLiquidityParams, EvmDex, EvmPoolInfo, EvmPositionDetails, EvmRemoveLiquidityParams, EvmTransactionResult, IEvmLpService } from "../../../../../lp/types.ts";
|
|
4
|
+
export declare class PancakeSwapV3LpService extends Service implements IEvmLpService {
|
|
5
|
+
static readonly serviceType = "pancakeswap-v3-lp";
|
|
6
|
+
readonly capabilityDescription = "Provides PancakeSwap V3 liquidity pool management for EVM chains.";
|
|
7
|
+
private publicClients;
|
|
8
|
+
private walletClients;
|
|
9
|
+
private rpcUrls;
|
|
10
|
+
constructor(runtime?: IAgentRuntime);
|
|
11
|
+
private initializeRpcUrls;
|
|
12
|
+
private getPublicClient;
|
|
13
|
+
private getWalletClient;
|
|
14
|
+
static start(runtime: IAgentRuntime): Promise<PancakeSwapV3LpService>;
|
|
15
|
+
stop(): Promise<void>;
|
|
16
|
+
getDexName(): EvmDex;
|
|
17
|
+
getSupportedChainIds(): number[];
|
|
18
|
+
supportsChain(chainId: number): boolean;
|
|
19
|
+
getPools(chainId: number, tokenA?: Address, tokenB?: Address, feeTier?: number): Promise<EvmPoolInfo[]>;
|
|
20
|
+
private getPoolInfo;
|
|
21
|
+
addLiquidity(params: EvmAddLiquidityParams): Promise<EvmTransactionResult>;
|
|
22
|
+
removeLiquidity(params: EvmRemoveLiquidityParams): Promise<EvmTransactionResult>;
|
|
23
|
+
private getPositionFromContract;
|
|
24
|
+
getPositionDetails(chainId: number, owner: Address, poolAddress: Address, tokenId?: bigint): Promise<EvmPositionDetails | null>;
|
|
25
|
+
getAllPositions(chainId: number, owner: Address): Promise<EvmPositionDetails[]>;
|
|
26
|
+
getMarketData(poolAddresses: Address[]): Promise<Record<string, Partial<EvmPoolInfo>>>;
|
|
27
|
+
private approveToken;
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Address } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* PancakeSwap V3 specific types
|
|
4
|
+
* PancakeSwap V3 is based on Uniswap V3 with some modifications
|
|
5
|
+
*/
|
|
6
|
+
export declare const PANCAKESWAP_V3_FEE_TIERS: {
|
|
7
|
+
readonly LOWEST: 100;
|
|
8
|
+
readonly LOW: 500;
|
|
9
|
+
readonly MEDIUM: 2500;
|
|
10
|
+
readonly HIGH: 10000;
|
|
11
|
+
};
|
|
12
|
+
export type PancakeSwapV3FeeTier = (typeof PANCAKESWAP_V3_FEE_TIERS)[keyof typeof PANCAKESWAP_V3_FEE_TIERS];
|
|
13
|
+
export declare const PANCAKESWAP_V3_ADDRESSES: Record<number, {
|
|
14
|
+
factory: Address;
|
|
15
|
+
nonfungiblePositionManager: Address;
|
|
16
|
+
swapRouter: Address;
|
|
17
|
+
quoter: Address;
|
|
18
|
+
}>;
|
|
19
|
+
export { ERC20_ABI, UNISWAP_V3_FACTORY_ABI as PANCAKESWAP_V3_FACTORY_ABI, UNISWAP_V3_POOL_ABI as PANCAKESWAP_V3_POOL_ABI, UNISWAP_V3_POSITION_MANAGER_ABI as PANCAKESWAP_V3_POSITION_MANAGER_ABI, } from "../uniswap/types.ts";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type IAgentRuntime, Service } from "@elizaos/core";
|
|
2
|
+
import { type Address } from "viem";
|
|
3
|
+
import type { EvmAddLiquidityParams, EvmDex, EvmPoolInfo, EvmPositionDetails, EvmRemoveLiquidityParams, EvmTransactionResult, IEvmLpService } from "../../../../../lp/types.ts";
|
|
4
|
+
export declare class UniswapV3LpService extends Service implements IEvmLpService {
|
|
5
|
+
static readonly serviceType = "uniswap-v3-lp";
|
|
6
|
+
readonly capabilityDescription = "Provides Uniswap V3 liquidity pool management for EVM chains.";
|
|
7
|
+
private publicClients;
|
|
8
|
+
private walletClients;
|
|
9
|
+
private rpcUrls;
|
|
10
|
+
constructor(runtime?: IAgentRuntime);
|
|
11
|
+
private initializeRpcUrls;
|
|
12
|
+
private getPublicClient;
|
|
13
|
+
private getWalletClient;
|
|
14
|
+
static start(runtime: IAgentRuntime): Promise<UniswapV3LpService>;
|
|
15
|
+
stop(): Promise<void>;
|
|
16
|
+
getDexName(): EvmDex;
|
|
17
|
+
getSupportedChainIds(): number[];
|
|
18
|
+
supportsChain(chainId: number): boolean;
|
|
19
|
+
getPools(chainId: number, tokenA?: Address, tokenB?: Address, feeTier?: number): Promise<EvmPoolInfo[]>;
|
|
20
|
+
private getPoolInfo;
|
|
21
|
+
addLiquidity(params: EvmAddLiquidityParams): Promise<EvmTransactionResult>;
|
|
22
|
+
removeLiquidity(params: EvmRemoveLiquidityParams): Promise<EvmTransactionResult>;
|
|
23
|
+
private getPositionFromContract;
|
|
24
|
+
getPositionDetails(chainId: number, owner: Address, poolAddress: Address, tokenId?: bigint): Promise<EvmPositionDetails | null>;
|
|
25
|
+
getAllPositions(chainId: number, owner: Address): Promise<EvmPositionDetails[]>;
|
|
26
|
+
getMarketData(poolAddresses: Address[]): Promise<Record<string, Partial<EvmPoolInfo>>>;
|
|
27
|
+
private approveToken;
|
|
28
|
+
}
|