@gearbox-protocol/sdk 13.0.0-next.3 → 13.0.0-next.31
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/cjs/abi/310/iSecuritizeDegenNFT.js +263 -0
- package/dist/cjs/abi/310/iSecuritizeKYCFactory.js +278 -0
- package/dist/cjs/dev/AccountOpener.js +45 -5
- package/dist/cjs/dev/providers.js +12 -0
- package/dist/cjs/history/assembleOperations.js +103 -0
- package/dist/cjs/history/classifyMulticallOperations.js +157 -0
- package/dist/cjs/history/errors.js +91 -0
- package/dist/cjs/history/extractProtocolCalls.js +53 -0
- package/dist/cjs/history/extractTransfers.js +168 -0
- package/dist/cjs/history/findFacadeCalls.js +84 -0
- package/dist/cjs/history/index.js +39 -0
- package/dist/cjs/history/inner-operations.js +16 -0
- package/dist/cjs/history/internal-types.js +16 -0
- package/dist/cjs/history/mapOperations.js +79 -0
- package/dist/cjs/history/package.json +1 -0
- package/dist/cjs/history/parseCreditAccountTransaction.js +86 -0
- package/dist/cjs/history/populateContractsRegister.js +68 -0
- package/dist/cjs/history/toLegacyOperation.js +182 -0
- package/dist/cjs/{plugins/adapters/contracts/YearnV2AdapterContract.js → history/trace-utils.js} +36 -21
- package/dist/cjs/history/types.js +16 -0
- package/dist/cjs/plugins/adapters/AdaptersPlugin.js +13 -106
- package/dist/cjs/plugins/adapters/abi/index.js +2 -0
- package/dist/cjs/plugins/adapters/abi/targetContractAbi.js +5168 -0
- package/dist/cjs/plugins/adapters/contracts/AbstractAdapter.js +102 -3
- package/dist/cjs/plugins/adapters/contracts/AccountMigratorAdapterContract.js +8 -1
- package/dist/cjs/plugins/adapters/contracts/BalancerV3RouterAdapterContract.js +40 -30
- package/dist/cjs/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.js +21 -11
- package/dist/cjs/plugins/adapters/contracts/CamelotV3AdapterContract.js +31 -21
- package/dist/cjs/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.js +91 -25
- package/dist/cjs/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.js +63 -25
- package/dist/cjs/plugins/adapters/contracts/Curve2AssetsAdapterContract.js +68 -31
- package/dist/cjs/plugins/adapters/contracts/Curve3AssetsAdapterContract.js +68 -31
- package/dist/cjs/plugins/adapters/contracts/Curve4AssetsAdapterContract.js +73 -31
- package/dist/cjs/plugins/adapters/contracts/CurveV1AdapterDeposit.js +80 -33
- package/dist/cjs/plugins/adapters/contracts/CurveV1AdapterStETHContract.js +62 -26
- package/dist/cjs/plugins/adapters/contracts/CurveV1StableNGAdapterContract.js +80 -34
- package/dist/cjs/plugins/adapters/contracts/DaiUsdsAdapterContract.js +39 -14
- package/dist/cjs/plugins/adapters/contracts/ERC4626AdapterContract.js +55 -27
- package/dist/cjs/plugins/adapters/contracts/ERC4626ReferralAdapterContract.js +39 -14
- package/dist/cjs/plugins/adapters/contracts/FluidDexAdapterContract.js +27 -14
- package/dist/cjs/plugins/adapters/contracts/InfinifiGatewayAdapterContract.js +45 -23
- package/dist/cjs/plugins/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.js +23 -14
- package/dist/cjs/plugins/adapters/contracts/KelpLRTDepositPoolAdapterContract.js +22 -12
- package/dist/cjs/plugins/adapters/contracts/KelpLRTWithdrawalManagerAdapterContract.js +26 -16
- package/dist/cjs/plugins/adapters/contracts/LidoV1AdapterContract.js +39 -17
- package/dist/cjs/plugins/adapters/contracts/MellowClaimerAdapterContract.js +21 -11
- package/dist/cjs/plugins/adapters/contracts/MellowDVVAdapterContract.js +38 -14
- package/dist/cjs/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.js +71 -42
- package/dist/cjs/plugins/adapters/contracts/MellowWrapperAdapterContract.js +21 -11
- package/dist/cjs/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +36 -17
- package/dist/cjs/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +38 -21
- package/dist/cjs/plugins/adapters/contracts/PendleRouterAdapterContract.js +63 -53
- package/dist/cjs/plugins/adapters/contracts/StakingRewardsAdapterContract.js +62 -37
- package/dist/cjs/plugins/adapters/contracts/TraderJoeRouterAdapterContract.js +35 -25
- package/dist/cjs/plugins/adapters/contracts/UniswapV2AdapterContract.js +35 -21
- package/dist/cjs/plugins/adapters/contracts/UniswapV3AdapterContract.js +32 -23
- package/dist/cjs/plugins/adapters/contracts/UniswapV4AdapterContract.js +41 -27
- package/dist/cjs/plugins/adapters/contracts/UpshiftVaultAdapterContract.js +34 -17
- package/dist/cjs/plugins/adapters/contracts/VelodromeV2AdapterContract.js +35 -25
- package/dist/cjs/plugins/adapters/contracts/WstETHV1AdapterContract.js +31 -11
- package/dist/cjs/plugins/adapters/contracts/deprecated/BalancerV2VaultAdapterContract.js +585 -0
- package/dist/cjs/plugins/adapters/contracts/deprecated/EqualizerRouterAdapterContract.js +262 -0
- package/dist/cjs/plugins/adapters/contracts/deprecated/InfraredVaultAdapterContract.js +296 -0
- package/dist/cjs/plugins/adapters/contracts/deprecated/KodiakIslandGatewayAdapterContract.js +415 -0
- package/dist/cjs/plugins/adapters/contracts/deprecated/MellowDepositQueueAdapterContract.js +74 -0
- package/dist/cjs/plugins/adapters/contracts/{MellowRedeemQueueAdapterContract.js → deprecated/MellowRedeemQueueAdapterContract.js} +33 -14
- package/dist/cjs/plugins/adapters/contracts/deprecated/MellowVaultAdapterContract.js +233 -0
- package/dist/cjs/plugins/adapters/contracts/deprecated/YearnV2AdapterContract.js +359 -0
- package/dist/cjs/plugins/adapters/contracts/deprecated/index.js +36 -0
- package/dist/cjs/plugins/adapters/contracts/index.js +3 -17
- package/dist/cjs/plugins/adapters/contracts/types.js +0 -9
- package/dist/cjs/plugins/adapters/createAdapter.js +140 -0
- package/dist/cjs/plugins/adapters/index.js +6 -0
- package/dist/cjs/plugins/adapters/legacyAdapterOperations.js +16 -0
- package/dist/cjs/plugins/adapters/transferHelpers.js +127 -0
- package/dist/cjs/sdk/accounts/AbstractCreditAccountsService.js +464 -105
- package/dist/cjs/sdk/accounts/CreditAccountsServiceV300.js +9 -4
- package/dist/cjs/sdk/accounts/CreditAccountsServiceV310.js +16 -5
- package/dist/cjs/sdk/base/BaseContract.js +54 -3
- package/dist/cjs/sdk/base/ChainContractsRegister.js +34 -1
- package/dist/cjs/sdk/base/Construct.js +11 -3
- package/dist/cjs/sdk/base/PlaceholderContract.js +2 -2
- package/dist/cjs/sdk/base/TokensMeta.js +161 -22
- package/dist/cjs/sdk/base/errors.js +35 -0
- package/dist/cjs/sdk/base/index.js +2 -0
- package/dist/cjs/sdk/chain/chains.js +2 -1
- package/dist/cjs/sdk/market/MarketRegister.js +2 -2
- package/dist/cjs/sdk/market/MarketSuite.js +3 -0
- package/dist/cjs/sdk/{pools/extraZappers.js → market/ZapperRegister.js} +110 -6
- package/dist/cjs/sdk/market/adapters/PlaceholderAdapterContracts.js +10 -4
- package/dist/cjs/sdk/market/adapters/{factory.js → createAdapter.js} +3 -3
- package/dist/cjs/sdk/market/adapters/index.js +2 -2
- package/dist/cjs/sdk/market/credit/CreditFacadeV310BaseContract.js +108 -0
- package/dist/cjs/sdk/market/credit/CreditFacadeV310Contract.js +3 -40
- package/dist/cjs/sdk/market/credit/index.js +2 -0
- package/dist/cjs/sdk/market/index.js +3 -1
- package/dist/cjs/sdk/market/pool/PoolSuite.js +3 -0
- package/dist/cjs/sdk/market/pool/PoolV300Contract.js +3 -0
- package/dist/cjs/sdk/market/pool/PoolV310Contract.js +17 -2
- package/dist/cjs/sdk/market/pool/SecuritizeKYCFactory.js +97 -0
- package/dist/cjs/sdk/market/pool/index.js +2 -0
- package/dist/cjs/sdk/market/pricefeeds/PythPriceFeed.js +20 -0
- package/dist/cjs/sdk/market/types.js +16 -0
- package/dist/cjs/sdk/pools/PoolService.js +181 -91
- package/dist/cjs/sdk/sdk-legacy/core/creditAccount.js +2 -0
- package/dist/cjs/sdk/utils/AddressMap.js +1 -1
- package/dist/cjs/sdk/utils/abi-decode.js +43 -2
- package/dist/cjs/sdk/utils/viem/sendRawTx.js +16 -0
- package/dist/esm/abi/310/iSecuritizeDegenNFT.js +239 -0
- package/dist/esm/abi/310/iSecuritizeKYCFactory.js +254 -0
- package/dist/esm/dev/AccountOpener.js +47 -6
- package/dist/esm/dev/providers.js +12 -0
- package/dist/esm/history/assembleOperations.js +79 -0
- package/dist/esm/history/classifyMulticallOperations.js +137 -0
- package/dist/esm/history/errors.js +62 -0
- package/dist/esm/history/extractProtocolCalls.js +32 -0
- package/dist/esm/history/extractTransfers.js +148 -0
- package/dist/esm/history/findFacadeCalls.js +63 -0
- package/dist/esm/history/index.js +9 -0
- package/dist/esm/history/inner-operations.js +0 -0
- package/dist/esm/history/internal-types.js +0 -0
- package/dist/esm/history/mapOperations.js +55 -0
- package/dist/esm/history/package.json +1 -0
- package/dist/esm/history/parseCreditAccountTransaction.js +62 -0
- package/dist/esm/history/populateContractsRegister.js +52 -0
- package/dist/esm/history/toLegacyOperation.js +157 -0
- package/dist/esm/history/trace-utils.js +36 -0
- package/dist/esm/history/types.js +0 -0
- package/dist/esm/plugins/adapters/AdaptersPlugin.js +14 -148
- package/dist/esm/plugins/adapters/abi/index.js +1 -0
- package/dist/esm/plugins/adapters/abi/targetContractAbi.js +5113 -0
- package/dist/esm/plugins/adapters/contracts/AbstractAdapter.js +111 -4
- package/dist/esm/plugins/adapters/contracts/AccountMigratorAdapterContract.js +8 -1
- package/dist/esm/plugins/adapters/contracts/BalancerV3RouterAdapterContract.js +40 -30
- package/dist/esm/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.js +21 -11
- package/dist/esm/plugins/adapters/contracts/CamelotV3AdapterContract.js +31 -21
- package/dist/esm/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.js +100 -26
- package/dist/esm/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.js +65 -25
- package/dist/esm/plugins/adapters/contracts/Curve2AssetsAdapterContract.js +70 -31
- package/dist/esm/plugins/adapters/contracts/Curve3AssetsAdapterContract.js +70 -31
- package/dist/esm/plugins/adapters/contracts/Curve4AssetsAdapterContract.js +75 -31
- package/dist/esm/plugins/adapters/contracts/CurveV1AdapterDeposit.js +82 -33
- package/dist/esm/plugins/adapters/contracts/CurveV1AdapterStETHContract.js +64 -26
- package/dist/esm/plugins/adapters/contracts/CurveV1StableNGAdapterContract.js +85 -34
- package/dist/esm/plugins/adapters/contracts/DaiUsdsAdapterContract.js +41 -14
- package/dist/esm/plugins/adapters/contracts/ERC4626AdapterContract.js +57 -27
- package/dist/esm/plugins/adapters/contracts/ERC4626ReferralAdapterContract.js +41 -14
- package/dist/esm/plugins/adapters/contracts/FluidDexAdapterContract.js +29 -14
- package/dist/esm/plugins/adapters/contracts/InfinifiGatewayAdapterContract.js +47 -23
- package/dist/esm/plugins/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.js +29 -15
- package/dist/esm/plugins/adapters/contracts/KelpLRTDepositPoolAdapterContract.js +27 -12
- package/dist/esm/plugins/adapters/contracts/KelpLRTWithdrawalManagerAdapterContract.js +31 -16
- package/dist/esm/plugins/adapters/contracts/LidoV1AdapterContract.js +41 -17
- package/dist/esm/plugins/adapters/contracts/MellowClaimerAdapterContract.js +23 -11
- package/dist/esm/plugins/adapters/contracts/MellowDVVAdapterContract.js +40 -14
- package/dist/esm/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.js +74 -43
- package/dist/esm/plugins/adapters/contracts/MellowWrapperAdapterContract.js +23 -11
- package/dist/esm/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +38 -17
- package/dist/esm/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +44 -22
- package/dist/esm/plugins/adapters/contracts/PendleRouterAdapterContract.js +65 -53
- package/dist/esm/plugins/adapters/contracts/StakingRewardsAdapterContract.js +64 -37
- package/dist/esm/plugins/adapters/contracts/TraderJoeRouterAdapterContract.js +35 -25
- package/dist/esm/plugins/adapters/contracts/UniswapV2AdapterContract.js +36 -22
- package/dist/esm/plugins/adapters/contracts/UniswapV3AdapterContract.js +33 -24
- package/dist/esm/plugins/adapters/contracts/UniswapV4AdapterContract.js +45 -28
- package/dist/esm/plugins/adapters/contracts/UpshiftVaultAdapterContract.js +40 -18
- package/dist/esm/plugins/adapters/contracts/VelodromeV2AdapterContract.js +35 -25
- package/dist/esm/plugins/adapters/contracts/WstETHV1AdapterContract.js +33 -11
- package/dist/esm/plugins/adapters/contracts/deprecated/BalancerV2VaultAdapterContract.js +559 -0
- package/dist/esm/plugins/adapters/contracts/deprecated/EqualizerRouterAdapterContract.js +236 -0
- package/dist/esm/plugins/adapters/contracts/deprecated/InfraredVaultAdapterContract.js +272 -0
- package/dist/esm/plugins/adapters/contracts/deprecated/KodiakIslandGatewayAdapterContract.js +390 -0
- package/dist/esm/plugins/adapters/contracts/deprecated/MellowDepositQueueAdapterContract.js +52 -0
- package/dist/esm/plugins/adapters/contracts/deprecated/MellowRedeemQueueAdapterContract.js +45 -0
- package/dist/esm/plugins/adapters/contracts/deprecated/MellowVaultAdapterContract.js +209 -0
- package/dist/esm/plugins/adapters/contracts/deprecated/YearnV2AdapterContract.js +336 -0
- package/dist/esm/plugins/adapters/contracts/deprecated/index.js +8 -0
- package/dist/esm/plugins/adapters/contracts/index.js +1 -8
- package/dist/esm/plugins/adapters/contracts/types.js +0 -8
- package/dist/esm/plugins/adapters/createAdapter.js +158 -0
- package/dist/esm/plugins/adapters/index.js +3 -0
- package/dist/esm/plugins/adapters/legacyAdapterOperations.js +0 -0
- package/dist/esm/plugins/adapters/transferHelpers.js +95 -0
- package/dist/esm/sdk/accounts/AbstractCreditAccountsService.js +464 -105
- package/dist/esm/sdk/accounts/CreditAccountsServiceV300.js +9 -4
- package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +16 -5
- package/dist/esm/sdk/base/BaseContract.js +56 -3
- package/dist/esm/sdk/base/ChainContractsRegister.js +34 -1
- package/dist/esm/sdk/base/Construct.js +11 -3
- package/dist/esm/sdk/base/PlaceholderContract.js +2 -2
- package/dist/esm/sdk/base/TokensMeta.js +165 -21
- package/dist/esm/sdk/base/errors.js +11 -0
- package/dist/esm/sdk/base/index.js +1 -0
- package/dist/esm/sdk/chain/chains.js +2 -1
- package/dist/esm/sdk/market/MarketRegister.js +2 -2
- package/dist/esm/sdk/market/MarketSuite.js +3 -0
- package/dist/esm/sdk/{pools/extraZappers.js → market/ZapperRegister.js} +109 -2
- package/dist/esm/sdk/market/adapters/PlaceholderAdapterContracts.js +14 -5
- package/dist/esm/sdk/market/adapters/index.js +1 -1
- package/dist/esm/sdk/market/credit/CreditFacadeV310BaseContract.js +86 -0
- package/dist/esm/sdk/market/credit/CreditFacadeV310Contract.js +3 -43
- package/dist/esm/sdk/market/credit/index.js +1 -0
- package/dist/esm/sdk/market/index.js +1 -0
- package/dist/esm/sdk/market/pool/PoolSuite.js +3 -0
- package/dist/esm/sdk/market/pool/PoolV300Contract.js +3 -0
- package/dist/esm/sdk/market/pool/PoolV310Contract.js +17 -2
- package/dist/esm/sdk/market/pool/SecuritizeKYCFactory.js +73 -0
- package/dist/esm/sdk/market/pool/index.js +1 -0
- package/dist/esm/sdk/market/pricefeeds/PythPriceFeed.js +21 -1
- package/dist/esm/sdk/market/types.js +0 -0
- package/dist/esm/sdk/pools/PoolService.js +182 -98
- package/dist/esm/sdk/sdk-legacy/core/creditAccount.js +2 -0
- package/dist/esm/sdk/utils/AddressMap.js +1 -1
- package/dist/esm/sdk/utils/abi-decode.js +43 -2
- package/dist/esm/sdk/utils/viem/sendRawTx.js +19 -1
- package/dist/types/abi/310/iSecuritizeDegenNFT.d.ts +324 -0
- package/dist/types/abi/310/iSecuritizeKYCFactory.d.ts +322 -0
- package/dist/types/dev/providers.d.ts +5 -5
- package/dist/types/history/assembleOperations.d.ts +22 -0
- package/dist/types/history/classifyMulticallOperations.d.ts +35 -0
- package/dist/types/history/errors.d.ts +30 -0
- package/dist/types/history/extractProtocolCalls.d.ts +8 -0
- package/dist/types/history/extractTransfers.d.ts +22 -0
- package/dist/types/history/findFacadeCalls.d.ts +9 -0
- package/dist/types/history/index.d.ts +6 -0
- package/dist/types/history/inner-operations.d.ts +57 -0
- package/dist/types/history/internal-types.d.ts +47 -0
- package/dist/types/history/mapOperations.d.ts +27 -0
- package/dist/types/history/parseCreditAccountTransaction.d.ts +27 -0
- package/dist/types/history/populateContractsRegister.d.ts +19 -0
- package/dist/types/history/toLegacyOperation.d.ts +18 -0
- package/dist/types/history/trace-utils.d.ts +12 -0
- package/dist/types/history/types.d.ts +71 -0
- package/dist/types/plugins/adapters/abi/index.d.ts +1 -0
- package/dist/types/plugins/adapters/abi/targetContractAbi.d.ts +8262 -0
- package/dist/types/plugins/adapters/contracts/AbstractAdapter.d.ts +50 -8
- package/dist/types/plugins/adapters/contracts/AccountMigratorAdapterContract.d.ts +238 -4
- package/dist/types/plugins/adapters/contracts/BalancerV3RouterAdapterContract.d.ts +113 -4
- package/dist/types/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.d.ts +37 -4
- package/dist/types/plugins/adapters/contracts/CamelotV3AdapterContract.d.ts +210 -4
- package/dist/types/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.d.ts +407 -8
- package/dist/types/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.d.ts +208 -5
- package/dist/types/plugins/adapters/contracts/Curve2AssetsAdapterContract.d.ts +1244 -10
- package/dist/types/plugins/adapters/contracts/Curve3AssetsAdapterContract.d.ts +1244 -10
- package/dist/types/plugins/adapters/contracts/Curve4AssetsAdapterContract.d.ts +1244 -10
- package/dist/types/plugins/adapters/contracts/CurveV1AdapterDeposit.d.ts +575 -11
- package/dist/types/plugins/adapters/contracts/CurveV1AdapterStETHContract.d.ts +1244 -10
- package/dist/types/plugins/adapters/contracts/CurveV1StableNGAdapterContract.d.ts +1213 -11
- package/dist/types/plugins/adapters/contracts/DaiUsdsAdapterContract.d.ts +60 -6
- package/dist/types/plugins/adapters/contracts/ERC4626AdapterContract.d.ts +483 -6
- package/dist/types/plugins/adapters/contracts/ERC4626ReferralAdapterContract.d.ts +58 -6
- package/dist/types/plugins/adapters/contracts/FluidDexAdapterContract.d.ts +123 -6
- package/dist/types/plugins/adapters/contracts/InfinifiGatewayAdapterContract.d.ts +133 -8
- package/dist/types/plugins/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.d.ts +155 -5
- package/dist/types/plugins/adapters/contracts/KelpLRTDepositPoolAdapterContract.d.ts +240 -6
- package/dist/types/plugins/adapters/contracts/KelpLRTWithdrawalManagerAdapterContract.d.ts +356 -6
- package/dist/types/plugins/adapters/contracts/LidoV1AdapterContract.d.ts +94 -7
- package/dist/types/plugins/adapters/contracts/MellowClaimerAdapterContract.d.ts +38 -5
- package/dist/types/plugins/adapters/contracts/MellowDVVAdapterContract.d.ts +479 -6
- package/dist/types/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.d.ts +483 -7
- package/dist/types/plugins/adapters/contracts/MellowWrapperAdapterContract.d.ts +48 -5
- package/dist/types/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.d.ts +42 -7
- package/dist/types/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.d.ts +186 -7
- package/dist/types/plugins/adapters/contracts/PendleRouterAdapterContract.d.ts +1010 -5
- package/dist/types/plugins/adapters/contracts/StakingRewardsAdapterContract.d.ts +71 -8
- package/dist/types/plugins/adapters/contracts/TraderJoeRouterAdapterContract.d.ts +123 -4
- package/dist/types/plugins/adapters/contracts/UniswapV2AdapterContract.d.ts +747 -5
- package/dist/types/plugins/adapters/contracts/UniswapV3AdapterContract.d.ts +171 -4
- package/dist/types/plugins/adapters/contracts/UniswapV4AdapterContract.d.ts +96 -5
- package/dist/types/plugins/adapters/contracts/UpshiftVaultAdapterContract.d.ts +74 -7
- package/dist/types/plugins/adapters/contracts/VelodromeV2AdapterContract.d.ts +109 -4
- package/dist/types/plugins/adapters/contracts/WstETHV1AdapterContract.d.ts +267 -5
- package/dist/types/plugins/adapters/contracts/deprecated/BalancerV2VaultAdapterContract.d.ts +1664 -0
- package/dist/types/plugins/adapters/contracts/deprecated/EqualizerRouterAdapterContract.d.ts +611 -0
- package/dist/types/plugins/adapters/contracts/deprecated/InfraredVaultAdapterContract.d.ts +686 -0
- package/dist/types/plugins/adapters/contracts/deprecated/KodiakIslandGatewayAdapterContract.d.ts +1270 -0
- package/dist/types/plugins/adapters/contracts/deprecated/MellowDepositQueueAdapterContract.d.ts +19 -0
- package/dist/types/plugins/adapters/contracts/deprecated/MellowRedeemQueueAdapterContract.d.ts +18 -0
- package/dist/types/plugins/adapters/contracts/deprecated/MellowVaultAdapterContract.d.ts +531 -0
- package/dist/types/plugins/adapters/contracts/deprecated/YearnV2AdapterContract.d.ts +662 -0
- package/dist/types/plugins/adapters/contracts/deprecated/index.d.ts +8 -0
- package/dist/types/plugins/adapters/contracts/index.d.ts +1 -8
- package/dist/types/plugins/adapters/contracts/types.d.ts +0 -6
- package/dist/types/plugins/adapters/createAdapter.d.ts +7 -0
- package/dist/types/plugins/adapters/index.d.ts +3 -0
- package/dist/types/plugins/adapters/legacyAdapterOperations.d.ts +200 -0
- package/dist/types/plugins/adapters/transferHelpers.d.ts +60 -0
- package/dist/types/plugins/adapters/types.d.ts +59 -1
- package/dist/types/sdk/accounts/AbstractCreditAccountsService.d.ts +123 -27
- package/dist/types/sdk/accounts/CreditAccountsServiceV310.d.ts +1 -1
- package/dist/types/sdk/accounts/types.d.ts +108 -8
- package/dist/types/sdk/base/BaseContract.d.ts +15 -2
- package/dist/types/sdk/base/ChainContractsRegister.d.ts +11 -1
- package/dist/types/sdk/base/Construct.d.ts +6 -3
- package/dist/types/sdk/base/PlaceholderContract.d.ts +2 -2
- package/dist/types/sdk/base/TokensMeta.d.ts +30 -5
- package/dist/types/sdk/base/errors.d.ts +3 -0
- package/dist/types/sdk/base/index.d.ts +1 -0
- package/dist/types/sdk/base/token-types.d.ts +10 -2
- package/dist/types/sdk/base/types.d.ts +31 -0
- package/dist/types/sdk/chain/chains.d.ts +1 -1
- package/dist/types/sdk/market/MarketRegister.d.ts +2 -2
- package/dist/types/sdk/market/MarketSuite.d.ts +2 -0
- package/dist/types/sdk/market/ZapperRegister.d.ts +17 -0
- package/dist/types/sdk/market/adapters/PlaceholderAdapterContracts.d.ts +9 -4
- package/dist/types/sdk/market/adapters/index.d.ts +1 -1
- package/dist/types/sdk/market/credit/CreditFacadeV310BaseContract.d.ts +856 -0
- package/dist/types/sdk/market/credit/CreditFacadeV310Contract.d.ts +6 -848
- package/dist/types/sdk/market/credit/index.d.ts +1 -0
- package/dist/types/sdk/market/index.d.ts +1 -0
- package/dist/types/sdk/market/pool/PoolSuite.d.ts +2 -0
- package/dist/types/sdk/market/pool/PoolV300Contract.d.ts +2 -0
- package/dist/types/sdk/market/pool/PoolV310Contract.d.ts +6 -2
- package/dist/types/sdk/market/pool/SecuritizeKYCFactory.d.ts +345 -0
- package/dist/types/sdk/market/pool/index.d.ts +1 -0
- package/dist/types/sdk/market/pricefeeds/PythPriceFeed.d.ts +21 -1
- package/dist/types/sdk/market/types.d.ts +10 -0
- package/dist/types/sdk/pools/PoolService.d.ts +4 -4
- package/dist/types/sdk/pools/types.d.ts +25 -16
- package/dist/types/sdk/sdk-legacy/core/creditAccount.d.ts +1 -0
- package/dist/types/sdk/sdk-legacy/payload/creditAccount.d.ts +1 -0
- package/dist/types/sdk/utils/AddressMap.d.ts +1 -1
- package/dist/types/sdk/utils/abi-decode.d.ts +14 -1
- package/dist/types/sdk/utils/viem/sendRawTx.d.ts +5 -1
- package/package.json +16 -11
- package/dist/cjs/plugins/adapters/contracts/BalancerV2VaultAdapterContract.js +0 -51
- package/dist/cjs/plugins/adapters/contracts/EqualizerRouterAdapterContract.js +0 -58
- package/dist/cjs/plugins/adapters/contracts/InfraredVaultAdapterContract.js +0 -49
- package/dist/cjs/plugins/adapters/contracts/KodiakIslandGatewayAdapterContract.js +0 -56
- package/dist/cjs/plugins/adapters/contracts/MellowDepositQueueAdapterContract.js +0 -51
- package/dist/cjs/plugins/adapters/contracts/MellowVaultAdapterContract.js +0 -46
- package/dist/esm/plugins/adapters/contracts/BalancerV2VaultAdapterContract.js +0 -27
- package/dist/esm/plugins/adapters/contracts/EqualizerRouterAdapterContract.js +0 -34
- package/dist/esm/plugins/adapters/contracts/InfraredVaultAdapterContract.js +0 -25
- package/dist/esm/plugins/adapters/contracts/KodiakIslandGatewayAdapterContract.js +0 -32
- package/dist/esm/plugins/adapters/contracts/MellowDepositQueueAdapterContract.js +0 -27
- package/dist/esm/plugins/adapters/contracts/MellowRedeemQueueAdapterContract.js +0 -24
- package/dist/esm/plugins/adapters/contracts/MellowVaultAdapterContract.js +0 -22
- package/dist/esm/plugins/adapters/contracts/YearnV2AdapterContract.js +0 -22
- package/dist/types/plugins/adapters/contracts/BalancerV2VaultAdapterContract.d.ts +0 -482
- package/dist/types/plugins/adapters/contracts/EqualizerRouterAdapterContract.d.ts +0 -225
- package/dist/types/plugins/adapters/contracts/InfraredVaultAdapterContract.d.ts +0 -198
- package/dist/types/plugins/adapters/contracts/KodiakIslandGatewayAdapterContract.d.ts +0 -396
- package/dist/types/plugins/adapters/contracts/MellowDepositQueueAdapterContract.d.ts +0 -13
- package/dist/types/plugins/adapters/contracts/MellowRedeemQueueAdapterContract.d.ts +0 -12
- package/dist/types/plugins/adapters/contracts/MellowVaultAdapterContract.d.ts +0 -203
- package/dist/types/plugins/adapters/contracts/YearnV2AdapterContract.d.ts +0 -185
- package/dist/types/sdk/pools/extraZappers.d.ts +0 -9
- /package/dist/esm/sdk/market/adapters/{factory.js → createAdapter.js} +0 -0
- /package/dist/types/sdk/market/adapters/{factory.d.ts → createAdapter.d.ts} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./CreditConfiguratorV300Contract.js";
|
|
2
2
|
export * from "./CreditConfiguratorV310Contract.js";
|
|
3
3
|
export * from "./CreditFacadeV300Contract.js";
|
|
4
|
+
export * from "./CreditFacadeV310BaseContract.js";
|
|
4
5
|
export * from "./CreditFacadeV310Contract.js";
|
|
5
6
|
export * from "./CreditManagerV300Contract.js";
|
|
6
7
|
export * from "./CreditManagerV310Contract.js";
|
|
@@ -6,6 +6,7 @@ import type { PoolSuiteStateHuman } from "../../types/index.js";
|
|
|
6
6
|
import type { MarketConfiguratorContract } from "../MarketConfiguratorContract.js";
|
|
7
7
|
import { GaugeContract } from "./GaugeContract.js";
|
|
8
8
|
import { LinearInterestRateModelContract } from "./LinearInterestRateModelContract.js";
|
|
9
|
+
import type { SecuritizeKYCFactory } from "./SecuritizeKYCFactory.js";
|
|
9
10
|
import { TumblerContract } from "./TumblerContract.js";
|
|
10
11
|
import type { IInterestRateModelContract, IRateKeeperContract, PoolContract, PoolQuotaKeeperContract } from "./types.js";
|
|
11
12
|
export declare class PoolSuite extends SDKConstruct {
|
|
@@ -20,6 +21,7 @@ export declare class PoolSuite extends SDKConstruct {
|
|
|
20
21
|
get linearModel(): LinearInterestRateModelContract;
|
|
21
22
|
get marketConfigurator(): MarketConfiguratorContract;
|
|
22
23
|
get underlying(): Address;
|
|
24
|
+
getKYCFactory(): Promise<SecuritizeKYCFactory | undefined>;
|
|
23
25
|
get dirty(): boolean;
|
|
24
26
|
get watchAddresses(): Set<Address>;
|
|
25
27
|
stateHuman(raw?: boolean): PoolSuiteStateHuman;
|
|
@@ -3,6 +3,7 @@ import type { ConstructOptions, CreditManagerDebtParams, PoolState } from "../..
|
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
4
|
import type { PoolStateHuman } from "../../types/index.js";
|
|
5
5
|
import { AddressMap } from "../../utils/index.js";
|
|
6
|
+
import type { SecuritizeKYCFactory } from "./SecuritizeKYCFactory.js";
|
|
6
7
|
declare const abi: readonly [{
|
|
7
8
|
readonly type: "function";
|
|
8
9
|
readonly name: "DOMAIN_SEPARATOR";
|
|
@@ -1100,6 +1101,7 @@ export interface PoolV300Contract extends Omit<PoolState, "baseParams" | "credit
|
|
|
1100
1101
|
export declare class PoolV300Contract extends BaseContract<abi> {
|
|
1101
1102
|
readonly creditManagerDebtParams: AddressMap<CreditManagerDebtParams>;
|
|
1102
1103
|
constructor(options: ConstructOptions, data: PoolState);
|
|
1104
|
+
getKYCFactory(): Promise<SecuritizeKYCFactory | undefined>;
|
|
1103
1105
|
stateHuman(raw?: boolean): PoolStateHuman;
|
|
1104
1106
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
1105
1107
|
protected stringifyFunctionParams(params: DecodeFunctionDataReturnType<abi>): string[];
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { ContractEventName, DecodeFunctionDataReturnType, Log } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { CreditManagerDebtParams, PoolState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
4
5
|
import type { PoolStateHuman } from "../../types/index.js";
|
|
5
6
|
import { AddressMap } from "../../utils/index.js";
|
|
7
|
+
import { SecuritizeKYCFactory } from "./SecuritizeKYCFactory.js";
|
|
6
8
|
declare const abi: readonly [{
|
|
7
9
|
readonly type: "function";
|
|
8
10
|
readonly inputs: readonly [];
|
|
@@ -1130,8 +1132,10 @@ type abi = typeof abi;
|
|
|
1130
1132
|
export interface PoolV310Contract extends Omit<PoolState, "baseParams" | "creditManagerDebtParams" | "name">, BaseContract<abi> {
|
|
1131
1133
|
}
|
|
1132
1134
|
export declare class PoolV310Contract extends BaseContract<abi> {
|
|
1135
|
+
#private;
|
|
1133
1136
|
readonly creditManagerDebtParams: AddressMap<CreditManagerDebtParams>;
|
|
1134
|
-
constructor(
|
|
1137
|
+
constructor(sdk: GearboxSDK, data: PoolState);
|
|
1138
|
+
getKYCFactory(): Promise<SecuritizeKYCFactory | undefined>;
|
|
1135
1139
|
stateHuman(raw?: boolean): PoolStateHuman;
|
|
1136
1140
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
1137
1141
|
protected stringifyFunctionParams(params: DecodeFunctionDataReturnType<abi>): string[];
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
import type { Address } from "viem";
|
|
2
|
+
import type { ConstructOptions } from "../../base/index.js";
|
|
3
|
+
import { BaseContract } from "../../base/index.js";
|
|
4
|
+
import type { MultiCall, RawTx } from "../../types/index.js";
|
|
5
|
+
declare const abi: readonly [{
|
|
6
|
+
readonly type: "function";
|
|
7
|
+
readonly name: "contractType";
|
|
8
|
+
readonly inputs: readonly [];
|
|
9
|
+
readonly outputs: readonly [{
|
|
10
|
+
readonly name: "";
|
|
11
|
+
readonly type: "bytes32";
|
|
12
|
+
readonly internalType: "bytes32";
|
|
13
|
+
}];
|
|
14
|
+
readonly stateMutability: "view";
|
|
15
|
+
}, {
|
|
16
|
+
readonly type: "function";
|
|
17
|
+
readonly name: "getCreditAccounts";
|
|
18
|
+
readonly inputs: readonly [{
|
|
19
|
+
readonly name: "investor";
|
|
20
|
+
readonly type: "address";
|
|
21
|
+
readonly internalType: "address";
|
|
22
|
+
}];
|
|
23
|
+
readonly outputs: readonly [{
|
|
24
|
+
readonly name: "";
|
|
25
|
+
readonly type: "address[]";
|
|
26
|
+
readonly internalType: "address[]";
|
|
27
|
+
}];
|
|
28
|
+
readonly stateMutability: "view";
|
|
29
|
+
}, {
|
|
30
|
+
readonly type: "function";
|
|
31
|
+
readonly name: "getDegenNFT";
|
|
32
|
+
readonly inputs: readonly [];
|
|
33
|
+
readonly outputs: readonly [{
|
|
34
|
+
readonly name: "";
|
|
35
|
+
readonly type: "address";
|
|
36
|
+
readonly internalType: "address";
|
|
37
|
+
}];
|
|
38
|
+
readonly stateMutability: "view";
|
|
39
|
+
}, {
|
|
40
|
+
readonly type: "function";
|
|
41
|
+
readonly name: "getInvestor";
|
|
42
|
+
readonly inputs: readonly [{
|
|
43
|
+
readonly name: "creditAccount";
|
|
44
|
+
readonly type: "address";
|
|
45
|
+
readonly internalType: "address";
|
|
46
|
+
}];
|
|
47
|
+
readonly outputs: readonly [{
|
|
48
|
+
readonly name: "";
|
|
49
|
+
readonly type: "address";
|
|
50
|
+
readonly internalType: "address";
|
|
51
|
+
}];
|
|
52
|
+
readonly stateMutability: "view";
|
|
53
|
+
}, {
|
|
54
|
+
readonly type: "function";
|
|
55
|
+
readonly name: "getWallet";
|
|
56
|
+
readonly inputs: readonly [{
|
|
57
|
+
readonly name: "creditAccount";
|
|
58
|
+
readonly type: "address";
|
|
59
|
+
readonly internalType: "address";
|
|
60
|
+
}];
|
|
61
|
+
readonly outputs: readonly [{
|
|
62
|
+
readonly name: "";
|
|
63
|
+
readonly type: "address";
|
|
64
|
+
readonly internalType: "address";
|
|
65
|
+
}];
|
|
66
|
+
readonly stateMutability: "view";
|
|
67
|
+
}, {
|
|
68
|
+
readonly type: "function";
|
|
69
|
+
readonly name: "isCreditAccount";
|
|
70
|
+
readonly inputs: readonly [{
|
|
71
|
+
readonly name: "creditAccount";
|
|
72
|
+
readonly type: "address";
|
|
73
|
+
readonly internalType: "address";
|
|
74
|
+
}];
|
|
75
|
+
readonly outputs: readonly [{
|
|
76
|
+
readonly name: "";
|
|
77
|
+
readonly type: "bool";
|
|
78
|
+
readonly internalType: "bool";
|
|
79
|
+
}];
|
|
80
|
+
readonly stateMutability: "view";
|
|
81
|
+
}, {
|
|
82
|
+
readonly type: "function";
|
|
83
|
+
readonly name: "isFrozen";
|
|
84
|
+
readonly inputs: readonly [{
|
|
85
|
+
readonly name: "creditAccount";
|
|
86
|
+
readonly type: "address";
|
|
87
|
+
readonly internalType: "address";
|
|
88
|
+
}];
|
|
89
|
+
readonly outputs: readonly [{
|
|
90
|
+
readonly name: "";
|
|
91
|
+
readonly type: "bool";
|
|
92
|
+
readonly internalType: "bool";
|
|
93
|
+
}];
|
|
94
|
+
readonly stateMutability: "view";
|
|
95
|
+
}, {
|
|
96
|
+
readonly type: "function";
|
|
97
|
+
readonly name: "multicall";
|
|
98
|
+
readonly inputs: readonly [{
|
|
99
|
+
readonly name: "creditAccount";
|
|
100
|
+
readonly type: "address";
|
|
101
|
+
readonly internalType: "address";
|
|
102
|
+
}, {
|
|
103
|
+
readonly name: "calls";
|
|
104
|
+
readonly type: "tuple[]";
|
|
105
|
+
readonly internalType: "struct MultiCall[]";
|
|
106
|
+
readonly components: readonly [{
|
|
107
|
+
readonly name: "target";
|
|
108
|
+
readonly type: "address";
|
|
109
|
+
readonly internalType: "address";
|
|
110
|
+
}, {
|
|
111
|
+
readonly name: "callData";
|
|
112
|
+
readonly type: "bytes";
|
|
113
|
+
readonly internalType: "bytes";
|
|
114
|
+
}];
|
|
115
|
+
}, {
|
|
116
|
+
readonly name: "tokensToRegister";
|
|
117
|
+
readonly type: "address[]";
|
|
118
|
+
readonly internalType: "address[]";
|
|
119
|
+
}];
|
|
120
|
+
readonly outputs: readonly [];
|
|
121
|
+
readonly stateMutability: "nonpayable";
|
|
122
|
+
}, {
|
|
123
|
+
readonly type: "function";
|
|
124
|
+
readonly name: "openCreditAccount";
|
|
125
|
+
readonly inputs: readonly [{
|
|
126
|
+
readonly name: "creditManager";
|
|
127
|
+
readonly type: "address";
|
|
128
|
+
readonly internalType: "address";
|
|
129
|
+
}, {
|
|
130
|
+
readonly name: "calls";
|
|
131
|
+
readonly type: "tuple[]";
|
|
132
|
+
readonly internalType: "struct MultiCall[]";
|
|
133
|
+
readonly components: readonly [{
|
|
134
|
+
readonly name: "target";
|
|
135
|
+
readonly type: "address";
|
|
136
|
+
readonly internalType: "address";
|
|
137
|
+
}, {
|
|
138
|
+
readonly name: "callData";
|
|
139
|
+
readonly type: "bytes";
|
|
140
|
+
readonly internalType: "bytes";
|
|
141
|
+
}];
|
|
142
|
+
}, {
|
|
143
|
+
readonly name: "tokensToRegister";
|
|
144
|
+
readonly type: "address[]";
|
|
145
|
+
readonly internalType: "address[]";
|
|
146
|
+
}];
|
|
147
|
+
readonly outputs: readonly [{
|
|
148
|
+
readonly name: "creditAccount";
|
|
149
|
+
readonly type: "address";
|
|
150
|
+
readonly internalType: "address";
|
|
151
|
+
}, {
|
|
152
|
+
readonly name: "wallet";
|
|
153
|
+
readonly type: "address";
|
|
154
|
+
readonly internalType: "address";
|
|
155
|
+
}];
|
|
156
|
+
readonly stateMutability: "nonpayable";
|
|
157
|
+
}, {
|
|
158
|
+
readonly type: "function";
|
|
159
|
+
readonly name: "precomputeWalletAddress";
|
|
160
|
+
readonly inputs: readonly [{
|
|
161
|
+
readonly name: "creditManager";
|
|
162
|
+
readonly type: "address";
|
|
163
|
+
readonly internalType: "address";
|
|
164
|
+
}, {
|
|
165
|
+
readonly name: "investor";
|
|
166
|
+
readonly type: "address";
|
|
167
|
+
readonly internalType: "address";
|
|
168
|
+
}];
|
|
169
|
+
readonly outputs: readonly [{
|
|
170
|
+
readonly name: "";
|
|
171
|
+
readonly type: "address";
|
|
172
|
+
readonly internalType: "address";
|
|
173
|
+
}];
|
|
174
|
+
readonly stateMutability: "view";
|
|
175
|
+
}, {
|
|
176
|
+
readonly type: "function";
|
|
177
|
+
readonly name: "serialize";
|
|
178
|
+
readonly inputs: readonly [];
|
|
179
|
+
readonly outputs: readonly [{
|
|
180
|
+
readonly name: "serializedData";
|
|
181
|
+
readonly type: "bytes";
|
|
182
|
+
readonly internalType: "bytes";
|
|
183
|
+
}];
|
|
184
|
+
readonly stateMutability: "view";
|
|
185
|
+
}, {
|
|
186
|
+
readonly type: "function";
|
|
187
|
+
readonly name: "setFrozenStatus";
|
|
188
|
+
readonly inputs: readonly [{
|
|
189
|
+
readonly name: "creditAccount";
|
|
190
|
+
readonly type: "address";
|
|
191
|
+
readonly internalType: "address";
|
|
192
|
+
}, {
|
|
193
|
+
readonly name: "frozen";
|
|
194
|
+
readonly type: "bool";
|
|
195
|
+
readonly internalType: "bool";
|
|
196
|
+
}];
|
|
197
|
+
readonly outputs: readonly [];
|
|
198
|
+
readonly stateMutability: "nonpayable";
|
|
199
|
+
}, {
|
|
200
|
+
readonly type: "function";
|
|
201
|
+
readonly name: "setInvestor";
|
|
202
|
+
readonly inputs: readonly [{
|
|
203
|
+
readonly name: "creditAccount";
|
|
204
|
+
readonly type: "address";
|
|
205
|
+
readonly internalType: "address";
|
|
206
|
+
}, {
|
|
207
|
+
readonly name: "investor";
|
|
208
|
+
readonly type: "address";
|
|
209
|
+
readonly internalType: "address";
|
|
210
|
+
}];
|
|
211
|
+
readonly outputs: readonly [];
|
|
212
|
+
readonly stateMutability: "nonpayable";
|
|
213
|
+
}, {
|
|
214
|
+
readonly type: "function";
|
|
215
|
+
readonly name: "version";
|
|
216
|
+
readonly inputs: readonly [];
|
|
217
|
+
readonly outputs: readonly [{
|
|
218
|
+
readonly name: "";
|
|
219
|
+
readonly type: "uint256";
|
|
220
|
+
readonly internalType: "uint256";
|
|
221
|
+
}];
|
|
222
|
+
readonly stateMutability: "view";
|
|
223
|
+
}, {
|
|
224
|
+
readonly type: "event";
|
|
225
|
+
readonly name: "CreateWallet";
|
|
226
|
+
readonly inputs: readonly [{
|
|
227
|
+
readonly name: "creditAccount";
|
|
228
|
+
readonly type: "address";
|
|
229
|
+
readonly indexed: true;
|
|
230
|
+
readonly internalType: "address";
|
|
231
|
+
}, {
|
|
232
|
+
readonly name: "wallet";
|
|
233
|
+
readonly type: "address";
|
|
234
|
+
readonly indexed: true;
|
|
235
|
+
readonly internalType: "address";
|
|
236
|
+
}, {
|
|
237
|
+
readonly name: "investor";
|
|
238
|
+
readonly type: "address";
|
|
239
|
+
readonly indexed: true;
|
|
240
|
+
readonly internalType: "address";
|
|
241
|
+
}];
|
|
242
|
+
readonly anonymous: false;
|
|
243
|
+
}, {
|
|
244
|
+
readonly type: "event";
|
|
245
|
+
readonly name: "SetFrozenStatus";
|
|
246
|
+
readonly inputs: readonly [{
|
|
247
|
+
readonly name: "creditAccount";
|
|
248
|
+
readonly type: "address";
|
|
249
|
+
readonly indexed: true;
|
|
250
|
+
readonly internalType: "address";
|
|
251
|
+
}, {
|
|
252
|
+
readonly name: "frozen";
|
|
253
|
+
readonly type: "bool";
|
|
254
|
+
readonly indexed: false;
|
|
255
|
+
readonly internalType: "bool";
|
|
256
|
+
}];
|
|
257
|
+
readonly anonymous: false;
|
|
258
|
+
}, {
|
|
259
|
+
readonly type: "event";
|
|
260
|
+
readonly name: "SetInvestor";
|
|
261
|
+
readonly inputs: readonly [{
|
|
262
|
+
readonly name: "creditAccount";
|
|
263
|
+
readonly type: "address";
|
|
264
|
+
readonly indexed: true;
|
|
265
|
+
readonly internalType: "address";
|
|
266
|
+
}, {
|
|
267
|
+
readonly name: "oldInvestor";
|
|
268
|
+
readonly type: "address";
|
|
269
|
+
readonly indexed: true;
|
|
270
|
+
readonly internalType: "address";
|
|
271
|
+
}, {
|
|
272
|
+
readonly name: "newInvestor";
|
|
273
|
+
readonly type: "address";
|
|
274
|
+
readonly indexed: true;
|
|
275
|
+
readonly internalType: "address";
|
|
276
|
+
}];
|
|
277
|
+
readonly anonymous: false;
|
|
278
|
+
}, {
|
|
279
|
+
readonly type: "error";
|
|
280
|
+
readonly name: "CallerIsNotInvestorException";
|
|
281
|
+
readonly inputs: readonly [{
|
|
282
|
+
readonly name: "caller";
|
|
283
|
+
readonly type: "address";
|
|
284
|
+
readonly internalType: "address";
|
|
285
|
+
}, {
|
|
286
|
+
readonly name: "creditAccount";
|
|
287
|
+
readonly type: "address";
|
|
288
|
+
readonly internalType: "address";
|
|
289
|
+
}];
|
|
290
|
+
}, {
|
|
291
|
+
readonly type: "error";
|
|
292
|
+
readonly name: "FrozenCreditAccountException";
|
|
293
|
+
readonly inputs: readonly [{
|
|
294
|
+
readonly name: "creditAccount";
|
|
295
|
+
readonly type: "address";
|
|
296
|
+
readonly internalType: "address";
|
|
297
|
+
}];
|
|
298
|
+
}, {
|
|
299
|
+
readonly type: "error";
|
|
300
|
+
readonly name: "InvalidCreditManagerException";
|
|
301
|
+
readonly inputs: readonly [{
|
|
302
|
+
readonly name: "creditManager";
|
|
303
|
+
readonly type: "address";
|
|
304
|
+
readonly internalType: "address";
|
|
305
|
+
}];
|
|
306
|
+
}, {
|
|
307
|
+
readonly type: "error";
|
|
308
|
+
readonly name: "InvalidUnderlyingTokenException";
|
|
309
|
+
readonly inputs: readonly [{
|
|
310
|
+
readonly name: "underlying";
|
|
311
|
+
readonly type: "address";
|
|
312
|
+
readonly internalType: "address";
|
|
313
|
+
}];
|
|
314
|
+
}, {
|
|
315
|
+
readonly type: "error";
|
|
316
|
+
readonly name: "UnknownCreditAccountException";
|
|
317
|
+
readonly inputs: readonly [{
|
|
318
|
+
readonly name: "creditAccount";
|
|
319
|
+
readonly type: "address";
|
|
320
|
+
readonly internalType: "address";
|
|
321
|
+
}];
|
|
322
|
+
}, {
|
|
323
|
+
readonly type: "error";
|
|
324
|
+
readonly name: "ZeroAddressException";
|
|
325
|
+
readonly inputs: readonly [];
|
|
326
|
+
}];
|
|
327
|
+
type abi = typeof abi;
|
|
328
|
+
export declare class SecuritizeKYCFactory extends BaseContract<abi> {
|
|
329
|
+
#private;
|
|
330
|
+
private investorCache;
|
|
331
|
+
constructor(options: ConstructOptions, address: Address);
|
|
332
|
+
precomputeWalletAddress(creditManager: Address, investor: Address): Promise<Address>;
|
|
333
|
+
getWallet(creditAccount: Address): Promise<Address>;
|
|
334
|
+
/**
|
|
335
|
+
* Returns the investor address for a credit account.
|
|
336
|
+
* @param creditAccount - Credit account address
|
|
337
|
+
* @param fromCache - If true, use and update an in-memory cache (creditAccount -> investor). On cache miss, loads from contract and stores the result for future calls.
|
|
338
|
+
*/
|
|
339
|
+
getInvestor(creditAccount: Address, fromCache?: boolean): Promise<Address>;
|
|
340
|
+
getDSTokens(): Promise<Address[]>;
|
|
341
|
+
multicall(creditAccount: Address, calls: MultiCall[], tokensToRegister: Address[]): RawTx;
|
|
342
|
+
openCreditAccount(creditManager: Address, calls: MultiCall[], tokensToRegister: Address[]): RawTx;
|
|
343
|
+
getDegenNFT(): Promise<Address>;
|
|
344
|
+
}
|
|
345
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Address, Hex } from "viem";
|
|
1
|
+
import type { Address, ContractFunctionParameters, Hex } from "viem";
|
|
2
2
|
import type { ConstructOptions } from "../../base/Construct.js";
|
|
3
3
|
import type { RawTx } from "../../types/index.js";
|
|
4
4
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
@@ -217,6 +217,20 @@ declare const abi: readonly [{
|
|
|
217
217
|
readonly inputs: readonly [];
|
|
218
218
|
}];
|
|
219
219
|
type abi = typeof abi;
|
|
220
|
+
declare const iPythAbi: readonly [{
|
|
221
|
+
readonly name: "getUpdateFee";
|
|
222
|
+
readonly type: "function";
|
|
223
|
+
readonly stateMutability: "view";
|
|
224
|
+
readonly inputs: readonly [{
|
|
225
|
+
readonly type: "bytes[]";
|
|
226
|
+
readonly name: "updateData";
|
|
227
|
+
}];
|
|
228
|
+
readonly outputs: readonly [{
|
|
229
|
+
readonly type: "uint256";
|
|
230
|
+
readonly name: "feeAmount";
|
|
231
|
+
}];
|
|
232
|
+
}];
|
|
233
|
+
type iPythAbi = typeof iPythAbi;
|
|
220
234
|
export declare class PythPriceFeed extends AbstractPriceFeedContract<abi> implements IUpdatablePriceFeedContract {
|
|
221
235
|
readonly token: Address;
|
|
222
236
|
readonly priceFeedId: Hex;
|
|
@@ -224,5 +238,11 @@ export declare class PythPriceFeed extends AbstractPriceFeedContract<abi> implem
|
|
|
224
238
|
readonly maxConfToPriceRatio?: bigint;
|
|
225
239
|
constructor(options: ConstructOptions, args: PartialPriceFeedTreeNode);
|
|
226
240
|
createPriceUpdateTx(data: `0x${string}`): RawTx;
|
|
241
|
+
/**
|
|
242
|
+
* Returns contract function parameters for the getUpdateFee function on original Pyth contract
|
|
243
|
+
* @param calldata
|
|
244
|
+
* @returns
|
|
245
|
+
*/
|
|
246
|
+
getUpdateFeeParams(calldata: Hex): ContractFunctionParameters<iPythAbi, "view", "getUpdateFee">;
|
|
227
247
|
}
|
|
228
248
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AbiParametersToPrimitiveTypes, ExtractAbiFunction } from "abitype";
|
|
2
|
+
import type { Address } from "viem";
|
|
3
|
+
import type { peripheryCompressorAbi } from "../../abi/compressors/peripheryCompressor.js";
|
|
4
|
+
import type { Unarray } from "../base/index.js";
|
|
5
|
+
type CompressorZapperData = Unarray<AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof peripheryCompressorAbi, "getZappers">["outputs"]>>;
|
|
6
|
+
export interface ZapperData extends CompressorZapperData {
|
|
7
|
+
pool: Address;
|
|
8
|
+
type: "migration" | "kyc" | "base";
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { Address } from "viem";
|
|
2
2
|
import { SDKConstruct } from "../base/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import type { AddLiquidityProps, DepositMetadata, IPoolsService, PoolServiceCall, RemoveLiquidityProps, ZapperData } from "./types.js";
|
|
3
|
+
import type { AddLiquidityProps, DepositMetadata, IPoolsService, PoolServiceCall, RemoveLiquidityProps, WithdrawalMetadata } from "./types.js";
|
|
5
4
|
export declare class PoolService extends SDKConstruct implements IPoolsService {
|
|
6
5
|
#private;
|
|
7
|
-
get zappers(): AddressMap<ZapperData[]>;
|
|
8
|
-
loadZappers(force?: boolean): Promise<void>;
|
|
9
6
|
getDepositTokensIn(pool: Address): Address[];
|
|
10
7
|
getDepositTokensOut(pool: Address, tokenIn: Address): Address[];
|
|
11
8
|
getDepositMetadata(pool: Address, tokenIn: Address, tokenOut?: Address): DepositMetadata;
|
|
12
9
|
addLiquidity(props: AddLiquidityProps): PoolServiceCall | undefined;
|
|
10
|
+
getWithdrawalTokensIn(pool: Address): Address[];
|
|
11
|
+
getWithdrawalTokensOut(pool: Address, tokenIn: Address): Address[];
|
|
13
12
|
removeLiquidity(props: RemoveLiquidityProps): PoolServiceCall;
|
|
13
|
+
getWithdrawalMetadata(pool: Address, tokenIn: Address, tokenOut?: Address): WithdrawalMetadata;
|
|
14
14
|
}
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import type { Abi
|
|
1
|
+
import type { Abi } from "abitype";
|
|
2
2
|
import type { Address, ContractFunctionArgs, ContractFunctionName } from "viem";
|
|
3
|
-
import type {
|
|
4
|
-
import type { Unarray } from "../base/index.js";
|
|
3
|
+
import type { ZapperData } from "../market/index.js";
|
|
5
4
|
import type { Asset } from "../router/index.js";
|
|
6
|
-
import type { PoolData_Legacy } from "../sdk-legacy/index.js";
|
|
7
|
-
import type { AddressMap } from "../utils/index.js";
|
|
8
|
-
type CompressorZapperData = Unarray<AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof peripheryCompressorAbi, "getZappers">["outputs"]>>;
|
|
9
|
-
export interface ZapperData extends CompressorZapperData {
|
|
10
|
-
pool: Address;
|
|
11
|
-
}
|
|
12
5
|
interface PermitResult {
|
|
13
6
|
r: Address;
|
|
14
7
|
s: Address;
|
|
@@ -38,9 +31,9 @@ export interface AddLiquidityProps {
|
|
|
38
31
|
export interface RemoveLiquidityProps {
|
|
39
32
|
pool: Address;
|
|
40
33
|
amount: bigint;
|
|
41
|
-
|
|
34
|
+
wallet: Address;
|
|
42
35
|
permit: PermitResult | undefined;
|
|
43
|
-
|
|
36
|
+
meta: WithdrawalMetadata;
|
|
44
37
|
}
|
|
45
38
|
export interface DepositMetadata {
|
|
46
39
|
/**
|
|
@@ -57,16 +50,32 @@ export interface DepositMetadata {
|
|
|
57
50
|
* If true, user can avoid approval step and deposit with permit
|
|
58
51
|
*/
|
|
59
52
|
permissible: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Type of deposit
|
|
55
|
+
*/
|
|
56
|
+
type: "kyc-on-demand" | "kyc-default" | "classic";
|
|
60
57
|
}
|
|
61
|
-
export interface
|
|
58
|
+
export interface WithdrawalMetadata {
|
|
62
59
|
/**
|
|
63
|
-
*
|
|
60
|
+
* Zapper that will perform the deposit, undefined in case of direct pool underlying deposit
|
|
64
61
|
*/
|
|
65
|
-
|
|
62
|
+
zapper?: ZapperData;
|
|
66
63
|
/**
|
|
67
|
-
*
|
|
64
|
+
* Before deposit user will nedd to call approve method on token that he wants to deposit,
|
|
65
|
+
* this is the spender address that will be used to call approve method.
|
|
66
|
+
*
|
|
68
67
|
*/
|
|
69
|
-
|
|
68
|
+
approveTarget?: Address;
|
|
69
|
+
/**
|
|
70
|
+
* If true, user can avoid approval step and deposit with permit
|
|
71
|
+
*/
|
|
72
|
+
permissible: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Type of deposit
|
|
75
|
+
*/
|
|
76
|
+
type: "kyc-on-demand" | "kyc-default" | "classic";
|
|
77
|
+
}
|
|
78
|
+
export interface IPoolsService {
|
|
70
79
|
/**
|
|
71
80
|
* Returns list of tokens that can be deposited to a pool
|
|
72
81
|
* @param pool
|
|
@@ -103,6 +103,7 @@ export declare class CreditAccountData_Legacy {
|
|
|
103
103
|
readonly underlying: Address;
|
|
104
104
|
readonly expirationDate: number;
|
|
105
105
|
readonly version: number;
|
|
106
|
+
readonly investor: Address;
|
|
106
107
|
readonly enabledTokensMask: bigint;
|
|
107
108
|
readonly healthFactor: number;
|
|
108
109
|
readonly baseBorrowRateWithoutFee: number;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import { type Abi, type DecodeFunctionDataReturnType } from "viem";
|
|
1
|
+
import { type Abi, type DecodeFunctionDataReturnType, type Hex } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* Given an ABI and calldata (or 4-byte selector), returns the function
|
|
4
|
+
* signature (e.g. `"balanceOf(address)"`) by matching against selectors
|
|
5
|
+
* computed from the ABI's function items.
|
|
6
|
+
*
|
|
7
|
+
* @throws if no matching function is found in the ABI
|
|
8
|
+
*/
|
|
9
|
+
export declare function getFunctionSignature(abi: Abi | readonly unknown[], calldataOrSelector: Hex): string;
|
|
2
10
|
/**
|
|
3
11
|
* Converts decoded function args (as decoded by viem, i.e. as array) to named map of args
|
|
4
12
|
* Can return undefined if function is not found in ABI
|
|
@@ -8,3 +16,8 @@ import { type Abi, type DecodeFunctionDataReturnType } from "viem";
|
|
|
8
16
|
* @returns
|
|
9
17
|
*/
|
|
10
18
|
export declare function functionArgsToMap<T extends Abi | readonly unknown[]>(abi: T, functionName: string, args: DecodeFunctionDataReturnType<T>["args"]): Record<string, string>;
|
|
19
|
+
/**
|
|
20
|
+
* Converts decoded function args to a named record preserving original types.
|
|
21
|
+
* Unlike {@link functionArgsToMap}, values are not stringified.
|
|
22
|
+
*/
|
|
23
|
+
export declare function functionArgsToRecord<T extends Abi | readonly unknown[]>(abi: T, functionName: string, args: DecodeFunctionDataReturnType<T>["args"]): Record<string, unknown>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { Account, Chain, Client, SendTransactionRequest, SendTransactionReturnType, Transport } from "viem";
|
|
2
|
-
import { type SendTransactionParameters } from "viem/actions";
|
|
2
|
+
import { type EstimateGasParameters, type SendTransactionParameters } from "viem/actions";
|
|
3
3
|
import type { RawTx } from "../../types/index.js";
|
|
4
4
|
export type SendRawTxParameters<chain extends Chain, account extends Account | undefined, request extends SendTransactionRequest<chain, chainOverride>, chainOverride extends Chain | undefined = undefined> = Omit<SendTransactionParameters<chain, account, chainOverride, request>, "data" | "to" | "value"> & {
|
|
5
5
|
tx: Pick<RawTx, "to" | "callData" | "value">;
|
|
6
6
|
};
|
|
7
7
|
export declare function sendRawTx<chain extends Chain, account extends Account | undefined, const request extends SendTransactionRequest<chain, chainOverride>, chainOverride extends Chain | undefined>(client: Client<Transport, chain, account>, params: SendRawTxParameters<chain, account, request, chainOverride>): Promise<SendTransactionReturnType>;
|
|
8
|
+
export type EstimateRawTxGasParameters<chain extends Chain> = Omit<EstimateGasParameters<chain>, "data" | "to" | "value"> & {
|
|
9
|
+
tx: Pick<RawTx, "to" | "callData" | "value">;
|
|
10
|
+
};
|
|
11
|
+
export declare function estimateRawTxGas<chain extends Chain, account extends Account | undefined>(client: Client<Transport, chain, account>, params: EstimateRawTxGasParameters<chain>): Promise<bigint>;
|