@compass-labs/api-sdk 0.0.7 → 0.0.9
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 +7 -8
- package/bin/mcp-server.js +2389 -1146
- package/bin/mcp-server.js.map +48 -24
- package/dist/commonjs/funcs/transactionBatchingAuthorization.d.ts +22 -0
- package/dist/commonjs/funcs/transactionBatchingAuthorization.d.ts.map +1 -0
- package/dist/commonjs/funcs/{universalTransferErc20.js → transactionBatchingAuthorization.js} +14 -9
- package/dist/commonjs/funcs/transactionBatchingAuthorization.js.map +1 -0
- package/dist/commonjs/funcs/transactionBatchingExecute.d.ts +22 -0
- package/dist/commonjs/funcs/transactionBatchingExecute.d.ts.map +1 -0
- package/dist/commonjs/funcs/{universalTransferNativeToken.js → transactionBatchingExecute.js} +14 -9
- package/dist/commonjs/funcs/transactionBatchingExecute.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +5 -9
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/transactionBatchingAuthorization.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/transactionBatchingAuthorization.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/{universalTransferErc20.js → transactionBatchingAuthorization.js} +14 -9
- package/dist/commonjs/mcp-server/tools/transactionBatchingAuthorization.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/{universalTransferNativeToken.js → transactionBatchingExecute.js} +14 -9
- package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.js.map +1 -0
- package/dist/commonjs/models/components/aaveborrowparams.d.ts +82 -0
- package/dist/commonjs/models/components/aaveborrowparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/aaveborrowparams.js +111 -0
- package/dist/commonjs/models/components/aaveborrowparams.js.map +1 -0
- package/dist/commonjs/models/components/aaverepayparams.d.ts +82 -0
- package/dist/commonjs/models/components/aaverepayparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/aaverepayparams.js +111 -0
- package/dist/commonjs/models/components/aaverepayparams.js.map +1 -0
- package/dist/commonjs/models/components/aavesupplyparams.d.ts +72 -0
- package/dist/commonjs/models/components/aavesupplyparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/aavesupplyparams.js +106 -0
- package/dist/commonjs/models/components/aavesupplyparams.js.map +1 -0
- package/dist/commonjs/models/components/aavewithdrawparams.d.ts +72 -0
- package/dist/commonjs/models/components/aavewithdrawparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/aavewithdrawparams.js +97 -0
- package/dist/commonjs/models/components/aavewithdrawparams.js.map +1 -0
- package/dist/commonjs/models/components/aerodromeaddliquidityethparams.d.ts +177 -0
- package/dist/commonjs/models/components/aerodromeaddliquidityethparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/aerodromeaddliquidityethparams.js +191 -0
- package/dist/commonjs/models/components/aerodromeaddliquidityethparams.js.map +1 -0
- package/dist/commonjs/models/components/aerodromeaddliquidityparams.d.ts +186 -0
- package/dist/commonjs/models/components/aerodromeaddliquidityparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/aerodromeaddliquidityparams.js +197 -0
- package/dist/commonjs/models/components/aerodromeaddliquidityparams.js.map +1 -0
- package/dist/commonjs/models/components/aerodromeremoveliquidityethrequest.d.ts +151 -0
- package/dist/commonjs/models/components/aerodromeremoveliquidityethrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/aerodromeremoveliquidityethrequest.js +167 -0
- package/dist/commonjs/models/components/aerodromeremoveliquidityethrequest.js.map +1 -0
- package/dist/commonjs/models/components/aerodromeremoveliquidityrequest.d.ts +161 -0
- package/dist/commonjs/models/components/aerodromeremoveliquidityrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/aerodromeremoveliquidityrequest.js +173 -0
- package/dist/commonjs/models/components/aerodromeremoveliquidityrequest.js.map +1 -0
- package/dist/commonjs/models/components/aerodromeslipstreambuyexactlyparams.d.ts +114 -0
- package/dist/commonjs/models/components/aerodromeslipstreambuyexactlyparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/aerodromeslipstreambuyexactlyparams.js +141 -0
- package/dist/commonjs/models/components/aerodromeslipstreambuyexactlyparams.js.map +1 -0
- package/dist/commonjs/models/components/aerodromeslipstreamincreaseliquidityprovisionparams.d.ts +156 -0
- package/dist/commonjs/models/components/aerodromeslipstreamincreaseliquidityprovisionparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/aerodromeslipstreamincreaseliquidityprovisionparams.js +194 -0
- package/dist/commonjs/models/components/aerodromeslipstreamincreaseliquidityprovisionparams.js.map +1 -0
- package/dist/commonjs/models/components/aerodromeslipstreammintliquidityprovisionparams.d.ts +187 -0
- package/dist/commonjs/models/components/aerodromeslipstreammintliquidityprovisionparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/aerodromeslipstreammintliquidityprovisionparams.js +209 -0
- package/dist/commonjs/models/components/aerodromeslipstreammintliquidityprovisionparams.js.map +1 -0
- package/dist/commonjs/models/components/aerodromeslipstreamsellexactlyparams.d.ts +114 -0
- package/dist/commonjs/models/components/aerodromeslipstreamsellexactlyparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/aerodromeslipstreamsellexactlyparams.js +141 -0
- package/dist/commonjs/models/components/aerodromeslipstreamsellexactlyparams.js.map +1 -0
- package/dist/commonjs/models/components/aerodromeslipstreamwithdrawliquidityprovisionparams.d.ts +69 -0
- package/dist/commonjs/models/components/aerodromeslipstreamwithdrawliquidityprovisionparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/aerodromeslipstreamwithdrawliquidityprovisionparams.js +107 -0
- package/dist/commonjs/models/components/aerodromeslipstreamwithdrawliquidityprovisionparams.js.map +1 -0
- package/dist/commonjs/models/components/aerodromeswapethfortokenparams.d.ts +109 -0
- package/dist/commonjs/models/components/aerodromeswapethfortokenparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/aerodromeswapethfortokenparams.js +137 -0
- package/dist/commonjs/models/components/aerodromeswapethfortokenparams.js.map +1 -0
- package/dist/commonjs/models/components/aerodromeswaptokenforethparams.d.ts +109 -0
- package/dist/commonjs/models/components/aerodromeswaptokenforethparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/aerodromeswaptokenforethparams.js +137 -0
- package/dist/commonjs/models/components/aerodromeswaptokenforethparams.js.map +1 -0
- package/dist/commonjs/models/components/aerodromeswaptokensparams.d.ts +128 -0
- package/dist/commonjs/models/components/aerodromeswaptokensparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/aerodromeswaptokensparams.js +141 -0
- package/dist/commonjs/models/components/aerodromeswaptokensparams.js.map +1 -0
- package/dist/commonjs/models/components/contractname.d.ts +96 -0
- package/dist/commonjs/models/components/contractname.d.ts.map +1 -0
- package/dist/commonjs/models/components/contractname.js +85 -0
- package/dist/commonjs/models/components/contractname.js.map +1 -0
- package/dist/commonjs/models/components/increaseallowanceanyparams.d.ts +83 -0
- package/dist/commonjs/models/components/increaseallowanceanyparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/increaseallowanceanyparams.js +107 -0
- package/dist/commonjs/models/components/increaseallowanceanyparams.js.map +1 -0
- package/dist/commonjs/models/components/increaseallowanceparams.d.ts +122 -0
- package/dist/commonjs/models/components/increaseallowanceparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/increaseallowanceparams.js +133 -0
- package/dist/commonjs/models/components/increaseallowanceparams.js.map +1 -0
- package/dist/commonjs/models/components/increaseallowancerequest.d.ts +8 -8
- package/dist/commonjs/models/components/increaseallowancerequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/increaseallowancerequest.js +13 -13
- package/dist/commonjs/models/components/increaseallowancerequest.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +34 -4
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +34 -4
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/multicallaction.d.ts +79 -0
- package/dist/commonjs/models/components/multicallaction.d.ts.map +1 -0
- package/dist/commonjs/models/components/multicallaction.js +239 -0
- package/dist/commonjs/models/components/multicallaction.js.map +1 -0
- package/dist/commonjs/models/components/multicallactiontype.d.ts +100 -0
- package/dist/commonjs/models/components/multicallactiontype.d.ts.map +1 -0
- package/dist/commonjs/models/components/multicallactiontype.js +84 -0
- package/dist/commonjs/models/components/multicallactiontype.js.map +1 -0
- package/dist/commonjs/models/components/multicallauthorizationrequest.d.ts +47 -0
- package/dist/commonjs/models/components/multicallauthorizationrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/{priceresponse.js → multicallauthorizationrequest.js} +22 -28
- package/dist/commonjs/models/components/multicallauthorizationrequest.js.map +1 -0
- package/dist/commonjs/models/components/multicallauthorizationresponse.d.ts +45 -0
- package/dist/commonjs/models/components/multicallauthorizationresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/multicallauthorizationresponse.js +73 -0
- package/dist/commonjs/models/components/multicallauthorizationresponse.js.map +1 -0
- package/dist/commonjs/models/components/multicallexecuterequest.d.ts +50 -0
- package/dist/commonjs/models/components/multicallexecuterequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/{balanceinforesponse.js → multicallexecuterequest.js} +30 -30
- package/dist/commonjs/models/components/multicallexecuterequest.js.map +1 -0
- package/dist/commonjs/models/components/signedauthorization.d.ts +81 -0
- package/dist/commonjs/models/components/signedauthorization.d.ts.map +1 -0
- package/dist/commonjs/models/components/signedauthorization.js +131 -0
- package/dist/commonjs/models/components/signedauthorization.js.map +1 -0
- package/dist/commonjs/models/components/tokentransfererc20params.d.ts +75 -0
- package/dist/commonjs/models/components/tokentransfererc20params.d.ts.map +1 -0
- package/dist/commonjs/models/components/tokentransfererc20params.js +97 -0
- package/dist/commonjs/models/components/tokentransfererc20params.js.map +1 -0
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts +121 -0
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.js +144 -0
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.js.map +1 -0
- package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionparams.d.ts +148 -0
- package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionparams.js +186 -0
- package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionparams.js.map +1 -0
- package/dist/commonjs/models/components/uniswapmintliquidityprovisionparams.d.ts +189 -0
- package/dist/commonjs/models/components/uniswapmintliquidityprovisionparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/uniswapmintliquidityprovisionparams.js +200 -0
- package/dist/commonjs/models/components/uniswapmintliquidityprovisionparams.js.map +1 -0
- package/dist/commonjs/models/components/uniswapsellexactlyparams.d.ts +124 -0
- package/dist/commonjs/models/components/uniswapsellexactlyparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/uniswapsellexactlyparams.js +144 -0
- package/dist/commonjs/models/components/uniswapsellexactlyparams.js.map +1 -0
- package/dist/commonjs/models/components/uniswapwithdrawliquidityprovisionparams.d.ts +69 -0
- package/dist/commonjs/models/components/uniswapwithdrawliquidityprovisionparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/uniswapwithdrawliquidityprovisionparams.js +107 -0
- package/dist/commonjs/models/components/uniswapwithdrawliquidityprovisionparams.js.map +1 -0
- package/dist/commonjs/models/components/unsignedmulticalltransaction.d.ts +78 -0
- package/dist/commonjs/models/components/unsignedmulticalltransaction.d.ts.map +1 -0
- package/dist/commonjs/models/components/unsignedmulticalltransaction.js +88 -0
- package/dist/commonjs/models/components/unsignedmulticalltransaction.js.map +1 -0
- package/dist/commonjs/models/components/unwrapwethparams.d.ts +59 -0
- package/dist/commonjs/models/components/unwrapwethparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/unwrapwethparams.js +92 -0
- package/dist/commonjs/models/components/unwrapwethparams.js.map +1 -0
- package/dist/commonjs/models/components/wrapethparams.d.ts +59 -0
- package/dist/commonjs/models/components/wrapethparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/wrapethparams.js +92 -0
- package/dist/commonjs/models/components/wrapethparams.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +0 -2
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +0 -2
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/transactionbatching.d.ts +29 -0
- package/dist/commonjs/sdk/transactionbatching.d.ts.map +1 -0
- package/dist/commonjs/sdk/transactionbatching.js +42 -0
- package/dist/commonjs/sdk/transactionbatching.js.map +1 -0
- package/dist/commonjs/sdk/universal.d.ts +0 -33
- package/dist/commonjs/sdk/universal.d.ts.map +1 -1
- package/dist/commonjs/sdk/universal.js +0 -45
- package/dist/commonjs/sdk/universal.js.map +1 -1
- package/dist/esm/funcs/transactionBatchingAuthorization.d.ts +22 -0
- package/dist/esm/funcs/transactionBatchingAuthorization.d.ts.map +1 -0
- package/dist/esm/funcs/{universalTransferNativeToken.js → transactionBatchingAuthorization.js} +13 -8
- package/dist/esm/funcs/transactionBatchingAuthorization.js.map +1 -0
- package/dist/esm/funcs/transactionBatchingExecute.d.ts +22 -0
- package/dist/esm/funcs/transactionBatchingExecute.d.ts.map +1 -0
- package/dist/esm/funcs/{universalTransferErc20.js → transactionBatchingExecute.js} +13 -8
- package/dist/esm/funcs/transactionBatchingExecute.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +5 -9
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/transactionBatchingAuthorization.d.ts +8 -0
- package/dist/esm/mcp-server/tools/transactionBatchingAuthorization.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/transactionBatchingAuthorization.js +33 -0
- package/dist/esm/mcp-server/tools/transactionBatchingAuthorization.js.map +1 -0
- package/dist/esm/mcp-server/tools/transactionBatchingExecute.d.ts +8 -0
- package/dist/esm/mcp-server/tools/transactionBatchingExecute.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/transactionBatchingExecute.js +33 -0
- package/dist/esm/mcp-server/tools/transactionBatchingExecute.js.map +1 -0
- package/dist/esm/models/components/aaveborrowparams.d.ts +82 -0
- package/dist/esm/models/components/aaveborrowparams.d.ts.map +1 -0
- package/dist/esm/models/components/aaveborrowparams.js +71 -0
- package/dist/esm/models/components/aaveborrowparams.js.map +1 -0
- package/dist/esm/models/components/aaverepayparams.d.ts +82 -0
- package/dist/esm/models/components/aaverepayparams.d.ts.map +1 -0
- package/dist/esm/models/components/aaverepayparams.js +71 -0
- package/dist/esm/models/components/aaverepayparams.js.map +1 -0
- package/dist/esm/models/components/aavesupplyparams.d.ts +72 -0
- package/dist/esm/models/components/aavesupplyparams.d.ts.map +1 -0
- package/dist/esm/models/components/aavesupplyparams.js +66 -0
- package/dist/esm/models/components/aavesupplyparams.js.map +1 -0
- package/dist/esm/models/components/aavewithdrawparams.d.ts +72 -0
- package/dist/esm/models/components/aavewithdrawparams.d.ts.map +1 -0
- package/dist/esm/models/components/aavewithdrawparams.js +57 -0
- package/dist/esm/models/components/aavewithdrawparams.js.map +1 -0
- package/dist/esm/models/components/aerodromeaddliquidityethparams.d.ts +177 -0
- package/dist/esm/models/components/aerodromeaddliquidityethparams.d.ts.map +1 -0
- package/dist/esm/models/components/aerodromeaddliquidityethparams.js +145 -0
- package/dist/esm/models/components/aerodromeaddliquidityethparams.js.map +1 -0
- package/dist/esm/models/components/aerodromeaddliquidityparams.d.ts +186 -0
- package/dist/esm/models/components/aerodromeaddliquidityparams.d.ts.map +1 -0
- package/dist/esm/models/components/aerodromeaddliquidityparams.js +151 -0
- package/dist/esm/models/components/aerodromeaddliquidityparams.js.map +1 -0
- package/dist/esm/models/components/aerodromeremoveliquidityethrequest.d.ts +151 -0
- package/dist/esm/models/components/aerodromeremoveliquidityethrequest.d.ts.map +1 -0
- package/dist/esm/models/components/aerodromeremoveliquidityethrequest.js +123 -0
- package/dist/esm/models/components/aerodromeremoveliquidityethrequest.js.map +1 -0
- package/dist/esm/models/components/aerodromeremoveliquidityrequest.d.ts +161 -0
- package/dist/esm/models/components/aerodromeremoveliquidityrequest.d.ts.map +1 -0
- package/dist/esm/models/components/aerodromeremoveliquidityrequest.js +129 -0
- package/dist/esm/models/components/aerodromeremoveliquidityrequest.js.map +1 -0
- package/dist/esm/models/components/aerodromeslipstreambuyexactlyparams.d.ts +114 -0
- package/dist/esm/models/components/aerodromeslipstreambuyexactlyparams.d.ts.map +1 -0
- package/dist/esm/models/components/aerodromeslipstreambuyexactlyparams.js +99 -0
- package/dist/esm/models/components/aerodromeslipstreambuyexactlyparams.js.map +1 -0
- package/dist/esm/models/components/aerodromeslipstreamincreaseliquidityprovisionparams.d.ts +156 -0
- package/dist/esm/models/components/aerodromeslipstreamincreaseliquidityprovisionparams.d.ts.map +1 -0
- package/dist/esm/models/components/aerodromeslipstreamincreaseliquidityprovisionparams.js +148 -0
- package/dist/esm/models/components/aerodromeslipstreamincreaseliquidityprovisionparams.js.map +1 -0
- package/dist/esm/models/components/aerodromeslipstreammintliquidityprovisionparams.d.ts +187 -0
- package/dist/esm/models/components/aerodromeslipstreammintliquidityprovisionparams.d.ts.map +1 -0
- package/dist/esm/models/components/aerodromeslipstreammintliquidityprovisionparams.js +163 -0
- package/dist/esm/models/components/aerodromeslipstreammintliquidityprovisionparams.js.map +1 -0
- package/dist/esm/models/components/aerodromeslipstreamsellexactlyparams.d.ts +114 -0
- package/dist/esm/models/components/aerodromeslipstreamsellexactlyparams.d.ts.map +1 -0
- package/dist/esm/models/components/aerodromeslipstreamsellexactlyparams.js +99 -0
- package/dist/esm/models/components/aerodromeslipstreamsellexactlyparams.js.map +1 -0
- package/dist/esm/models/components/aerodromeslipstreamwithdrawliquidityprovisionparams.d.ts +69 -0
- package/dist/esm/models/components/aerodromeslipstreamwithdrawliquidityprovisionparams.d.ts.map +1 -0
- package/dist/esm/models/components/aerodromeslipstreamwithdrawliquidityprovisionparams.js +67 -0
- package/dist/esm/models/components/aerodromeslipstreamwithdrawliquidityprovisionparams.js.map +1 -0
- package/dist/esm/models/components/aerodromeswapethfortokenparams.d.ts +109 -0
- package/dist/esm/models/components/aerodromeswapethfortokenparams.d.ts.map +1 -0
- package/dist/esm/models/components/aerodromeswapethfortokenparams.js +95 -0
- package/dist/esm/models/components/aerodromeswapethfortokenparams.js.map +1 -0
- package/dist/esm/models/components/aerodromeswaptokenforethparams.d.ts +109 -0
- package/dist/esm/models/components/aerodromeswaptokenforethparams.d.ts.map +1 -0
- package/dist/esm/models/components/aerodromeswaptokenforethparams.js +95 -0
- package/dist/esm/models/components/aerodromeswaptokenforethparams.js.map +1 -0
- package/dist/esm/models/components/aerodromeswaptokensparams.d.ts +128 -0
- package/dist/esm/models/components/aerodromeswaptokensparams.d.ts.map +1 -0
- package/dist/esm/models/components/aerodromeswaptokensparams.js +99 -0
- package/dist/esm/models/components/aerodromeswaptokensparams.js.map +1 -0
- package/dist/esm/models/components/contractname.d.ts +96 -0
- package/dist/esm/models/components/contractname.d.ts.map +1 -0
- package/dist/esm/models/components/contractname.js +49 -0
- package/dist/esm/models/components/contractname.js.map +1 -0
- package/dist/esm/models/components/increaseallowanceanyparams.d.ts +83 -0
- package/dist/esm/models/components/increaseallowanceanyparams.d.ts.map +1 -0
- package/dist/esm/models/components/increaseallowanceanyparams.js +67 -0
- package/dist/esm/models/components/increaseallowanceanyparams.js.map +1 -0
- package/dist/esm/models/components/increaseallowanceparams.d.ts +122 -0
- package/dist/esm/models/components/increaseallowanceparams.d.ts.map +1 -0
- package/dist/esm/models/components/increaseallowanceparams.js +93 -0
- package/dist/esm/models/components/increaseallowanceparams.js.map +1 -0
- package/dist/esm/models/components/increaseallowancerequest.d.ts +8 -8
- package/dist/esm/models/components/increaseallowancerequest.d.ts.map +1 -1
- package/dist/esm/models/components/increaseallowancerequest.js +12 -12
- package/dist/esm/models/components/increaseallowancerequest.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +34 -4
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +34 -4
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/multicallaction.d.ts +79 -0
- package/dist/esm/models/components/multicallaction.d.ts.map +1 -0
- package/dist/esm/models/components/multicallaction.js +199 -0
- package/dist/esm/models/components/multicallaction.js.map +1 -0
- package/dist/esm/models/components/multicallactiontype.d.ts +100 -0
- package/dist/esm/models/components/multicallactiontype.d.ts.map +1 -0
- package/dist/esm/models/components/multicallactiontype.js +48 -0
- package/dist/esm/models/components/multicallactiontype.js.map +1 -0
- package/dist/esm/models/components/multicallauthorizationrequest.d.ts +47 -0
- package/dist/esm/models/components/multicallauthorizationrequest.d.ts.map +1 -0
- package/dist/esm/models/components/multicallauthorizationrequest.js +34 -0
- package/dist/esm/models/components/multicallauthorizationrequest.js.map +1 -0
- package/dist/esm/models/components/multicallauthorizationresponse.d.ts +45 -0
- package/dist/esm/models/components/multicallauthorizationresponse.d.ts.map +1 -0
- package/dist/esm/models/components/multicallauthorizationresponse.js +35 -0
- package/dist/esm/models/components/multicallauthorizationresponse.js.map +1 -0
- package/dist/esm/models/components/multicallexecuterequest.d.ts +50 -0
- package/dist/esm/models/components/multicallexecuterequest.d.ts.map +1 -0
- package/dist/esm/models/components/multicallexecuterequest.js +49 -0
- package/dist/esm/models/components/multicallexecuterequest.js.map +1 -0
- package/dist/esm/models/components/signedauthorization.d.ts +81 -0
- package/dist/esm/models/components/signedauthorization.d.ts.map +1 -0
- package/dist/esm/models/components/signedauthorization.js +89 -0
- package/dist/esm/models/components/signedauthorization.js.map +1 -0
- package/dist/esm/models/components/tokentransfererc20params.d.ts +75 -0
- package/dist/esm/models/components/tokentransfererc20params.d.ts.map +1 -0
- package/dist/esm/models/components/tokentransfererc20params.js +57 -0
- package/dist/esm/models/components/tokentransfererc20params.js.map +1 -0
- package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts +121 -0
- package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts.map +1 -0
- package/dist/esm/models/components/uniswapbuyexactlyparams.js +102 -0
- package/dist/esm/models/components/uniswapbuyexactlyparams.js.map +1 -0
- package/dist/esm/models/components/uniswapincreaseliquidityprovisionparams.d.ts +148 -0
- package/dist/esm/models/components/uniswapincreaseliquidityprovisionparams.d.ts.map +1 -0
- package/dist/esm/models/components/uniswapincreaseliquidityprovisionparams.js +140 -0
- package/dist/esm/models/components/uniswapincreaseliquidityprovisionparams.js.map +1 -0
- package/dist/esm/models/components/uniswapmintliquidityprovisionparams.d.ts +189 -0
- package/dist/esm/models/components/uniswapmintliquidityprovisionparams.d.ts.map +1 -0
- package/dist/esm/models/components/uniswapmintliquidityprovisionparams.js +154 -0
- package/dist/esm/models/components/uniswapmintliquidityprovisionparams.js.map +1 -0
- package/dist/esm/models/components/uniswapsellexactlyparams.d.ts +124 -0
- package/dist/esm/models/components/uniswapsellexactlyparams.d.ts.map +1 -0
- package/dist/esm/models/components/uniswapsellexactlyparams.js +102 -0
- package/dist/esm/models/components/uniswapsellexactlyparams.js.map +1 -0
- package/dist/esm/models/components/uniswapwithdrawliquidityprovisionparams.d.ts +69 -0
- package/dist/esm/models/components/uniswapwithdrawliquidityprovisionparams.d.ts.map +1 -0
- package/dist/esm/models/components/uniswapwithdrawliquidityprovisionparams.js +67 -0
- package/dist/esm/models/components/uniswapwithdrawliquidityprovisionparams.js.map +1 -0
- package/dist/esm/models/components/unsignedmulticalltransaction.d.ts +78 -0
- package/dist/esm/models/components/unsignedmulticalltransaction.d.ts.map +1 -0
- package/dist/esm/models/components/unsignedmulticalltransaction.js +50 -0
- package/dist/esm/models/components/unsignedmulticalltransaction.js.map +1 -0
- package/dist/esm/models/components/unwrapwethparams.d.ts +59 -0
- package/dist/esm/models/components/unwrapwethparams.d.ts.map +1 -0
- package/dist/esm/models/components/unwrapwethparams.js +52 -0
- package/dist/esm/models/components/unwrapwethparams.js.map +1 -0
- package/dist/esm/models/components/wrapethparams.d.ts +59 -0
- package/dist/esm/models/components/wrapethparams.d.ts.map +1 -0
- package/dist/esm/models/components/wrapethparams.js +52 -0
- package/dist/esm/models/components/wrapethparams.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +0 -2
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +0 -2
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/transactionbatching.d.ts +29 -0
- package/dist/esm/sdk/transactionbatching.d.ts.map +1 -0
- package/dist/esm/sdk/transactionbatching.js +38 -0
- package/dist/esm/sdk/transactionbatching.js.map +1 -0
- package/dist/esm/sdk/universal.d.ts +0 -33
- package/dist/esm/sdk/universal.d.ts.map +1 -1
- package/dist/esm/sdk/universal.js +0 -45
- package/dist/esm/sdk/universal.js.map +1 -1
- package/docs/sdks/aavev3/README.md +4 -0
- package/docs/sdks/transactionbatching/README.md +217 -0
- package/docs/sdks/universal/README.md +0 -335
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/{universalTransferNativeToken.ts → transactionBatchingAuthorization.ts} +18 -12
- package/src/funcs/{universalTransferErc20.ts → transactionBatchingExecute.ts} +17 -12
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +5 -9
- package/src/mcp-server/tools/transactionBatchingAuthorization.ts +44 -0
- package/src/mcp-server/tools/transactionBatchingExecute.ts +42 -0
- package/src/models/components/aaveborrowparams.ts +173 -0
- package/src/models/components/aaverepayparams.ts +171 -0
- package/src/models/components/aavesupplyparams.ts +155 -0
- package/src/models/components/aavewithdrawparams.ts +146 -0
- package/src/models/components/aerodromeaddliquidityethparams.ts +392 -0
- package/src/models/components/aerodromeaddliquidityparams.ts +382 -0
- package/src/models/components/aerodromeremoveliquidityethrequest.ts +357 -0
- package/src/models/components/aerodromeremoveliquidityrequest.ts +363 -0
- package/src/models/components/aerodromeslipstreambuyexactlyparams.ts +276 -0
- package/src/models/components/aerodromeslipstreamincreaseliquidityprovisionparams.ts +412 -0
- package/src/models/components/aerodromeslipstreammintliquidityprovisionparams.ts +461 -0
- package/src/models/components/aerodromeslipstreamsellexactlyparams.ts +276 -0
- package/src/models/components/aerodromeslipstreamwithdrawliquidityprovisionparams.ts +180 -0
- package/src/models/components/aerodromeswapethfortokenparams.ts +249 -0
- package/src/models/components/aerodromeswaptokenforethparams.ts +249 -0
- package/src/models/components/aerodromeswaptokensparams.ts +260 -0
- package/src/models/components/contractname.ts +64 -0
- package/src/models/components/increaseallowanceanyparams.ts +172 -0
- package/src/models/components/increaseallowanceparams.ts +204 -0
- package/src/models/components/increaseallowancerequest.ts +21 -14
- package/src/models/components/index.ts +34 -4
- package/src/models/components/multicallaction.ts +490 -0
- package/src/models/components/multicallactiontype.ts +59 -0
- package/src/models/components/multicallauthorizationrequest.ts +88 -0
- package/src/models/components/multicallauthorizationresponse.ts +88 -0
- package/src/models/components/multicallexecuterequest.ts +112 -0
- package/src/models/components/signedauthorization.ts +172 -0
- package/src/models/components/tokentransfererc20params.ts +151 -0
- package/src/models/components/uniswapbuyexactlyparams.ts +259 -0
- package/src/models/components/uniswapincreaseliquidityprovisionparams.ts +405 -0
- package/src/models/components/uniswapmintliquidityprovisionparams.ts +454 -0
- package/src/models/components/uniswapsellexactlyparams.ts +267 -0
- package/src/models/components/uniswapwithdrawliquidityprovisionparams.ts +175 -0
- package/src/models/components/unsignedmulticalltransaction.ts +140 -0
- package/src/models/components/unwrapwethparams.ts +125 -0
- package/src/models/components/wrapethparams.ts +121 -0
- package/src/models/operations/index.ts +0 -2
- package/src/sdk/sdk.ts +8 -0
- package/src/sdk/transactionbatching.ts +55 -0
- package/src/sdk/universal.ts +0 -77
- package/dist/commonjs/funcs/universalBalance.d.ts +0 -18
- package/dist/commonjs/funcs/universalBalance.d.ts.map +0 -1
- package/dist/commonjs/funcs/universalBalance.js +0 -122
- package/dist/commonjs/funcs/universalBalance.js.map +0 -1
- package/dist/commonjs/funcs/universalPriceUsd.d.ts +0 -23
- package/dist/commonjs/funcs/universalPriceUsd.d.ts.map +0 -1
- package/dist/commonjs/funcs/universalPriceUsd.js +0 -126
- package/dist/commonjs/funcs/universalPriceUsd.js.map +0 -1
- package/dist/commonjs/funcs/universalTransferErc20.d.ts +0 -17
- package/dist/commonjs/funcs/universalTransferErc20.d.ts.map +0 -1
- package/dist/commonjs/funcs/universalTransferErc20.js.map +0 -1
- package/dist/commonjs/funcs/universalTransferNativeToken.d.ts +0 -17
- package/dist/commonjs/funcs/universalTransferNativeToken.d.ts.map +0 -1
- package/dist/commonjs/funcs/universalTransferNativeToken.js.map +0 -1
- package/dist/commonjs/mcp-server/tools/universalBalance.d.ts +0 -8
- package/dist/commonjs/mcp-server/tools/universalBalance.d.ts.map +0 -1
- package/dist/commonjs/mcp-server/tools/universalBalance.js +0 -64
- package/dist/commonjs/mcp-server/tools/universalBalance.js.map +0 -1
- package/dist/commonjs/mcp-server/tools/universalPriceUsd.d.ts +0 -8
- package/dist/commonjs/mcp-server/tools/universalPriceUsd.d.ts.map +0 -1
- package/dist/commonjs/mcp-server/tools/universalPriceUsd.js +0 -69
- package/dist/commonjs/mcp-server/tools/universalPriceUsd.js.map +0 -1
- package/dist/commonjs/mcp-server/tools/universalTransferErc20.d.ts +0 -8
- package/dist/commonjs/mcp-server/tools/universalTransferErc20.d.ts.map +0 -1
- package/dist/commonjs/mcp-server/tools/universalTransferErc20.js.map +0 -1
- package/dist/commonjs/mcp-server/tools/universalTransferNativeToken.d.ts +0 -8
- package/dist/commonjs/mcp-server/tools/universalTransferNativeToken.d.ts.map +0 -1
- package/dist/commonjs/mcp-server/tools/universalTransferNativeToken.js.map +0 -1
- package/dist/commonjs/models/components/balanceinforesponse.d.ts +0 -56
- package/dist/commonjs/models/components/balanceinforesponse.d.ts.map +0 -1
- package/dist/commonjs/models/components/balanceinforesponse.js.map +0 -1
- package/dist/commonjs/models/components/priceresponse.d.ts +0 -32
- package/dist/commonjs/models/components/priceresponse.d.ts.map +0 -1
- package/dist/commonjs/models/components/priceresponse.js.map +0 -1
- package/dist/commonjs/models/components/transfererc20request.d.ts +0 -86
- package/dist/commonjs/models/components/transfererc20request.d.ts.map +0 -1
- package/dist/commonjs/models/components/transfererc20request.js +0 -102
- package/dist/commonjs/models/components/transfererc20request.js.map +0 -1
- package/dist/commonjs/models/components/transferethrequest.d.ts +0 -75
- package/dist/commonjs/models/components/transferethrequest.d.ts.map +0 -1
- package/dist/commonjs/models/components/transferethrequest.js +0 -99
- package/dist/commonjs/models/components/transferethrequest.js.map +0 -1
- package/dist/commonjs/models/operations/genericbalance.d.ts +0 -246
- package/dist/commonjs/models/operations/genericbalance.d.ts.map +0 -1
- package/dist/commonjs/models/operations/genericbalance.js +0 -165
- package/dist/commonjs/models/operations/genericbalance.js.map +0 -1
- package/dist/commonjs/models/operations/genericpriceusd.d.ts +0 -244
- package/dist/commonjs/models/operations/genericpriceusd.d.ts.map +0 -1
- package/dist/commonjs/models/operations/genericpriceusd.js +0 -163
- package/dist/commonjs/models/operations/genericpriceusd.js.map +0 -1
- package/dist/esm/funcs/universalBalance.d.ts +0 -18
- package/dist/esm/funcs/universalBalance.d.ts.map +0 -1
- package/dist/esm/funcs/universalBalance.js +0 -86
- package/dist/esm/funcs/universalBalance.js.map +0 -1
- package/dist/esm/funcs/universalPriceUsd.d.ts +0 -23
- package/dist/esm/funcs/universalPriceUsd.d.ts.map +0 -1
- package/dist/esm/funcs/universalPriceUsd.js +0 -90
- package/dist/esm/funcs/universalPriceUsd.js.map +0 -1
- package/dist/esm/funcs/universalTransferErc20.d.ts +0 -17
- package/dist/esm/funcs/universalTransferErc20.d.ts.map +0 -1
- package/dist/esm/funcs/universalTransferErc20.js.map +0 -1
- package/dist/esm/funcs/universalTransferNativeToken.d.ts +0 -17
- package/dist/esm/funcs/universalTransferNativeToken.d.ts.map +0 -1
- package/dist/esm/funcs/universalTransferNativeToken.js.map +0 -1
- package/dist/esm/mcp-server/tools/universalBalance.d.ts +0 -8
- package/dist/esm/mcp-server/tools/universalBalance.d.ts.map +0 -1
- package/dist/esm/mcp-server/tools/universalBalance.js +0 -28
- package/dist/esm/mcp-server/tools/universalBalance.js.map +0 -1
- package/dist/esm/mcp-server/tools/universalPriceUsd.d.ts +0 -8
- package/dist/esm/mcp-server/tools/universalPriceUsd.d.ts.map +0 -1
- package/dist/esm/mcp-server/tools/universalPriceUsd.js +0 -33
- package/dist/esm/mcp-server/tools/universalPriceUsd.js.map +0 -1
- package/dist/esm/mcp-server/tools/universalTransferErc20.d.ts +0 -8
- package/dist/esm/mcp-server/tools/universalTransferErc20.d.ts.map +0 -1
- package/dist/esm/mcp-server/tools/universalTransferErc20.js +0 -28
- package/dist/esm/mcp-server/tools/universalTransferErc20.js.map +0 -1
- package/dist/esm/mcp-server/tools/universalTransferNativeToken.d.ts +0 -8
- package/dist/esm/mcp-server/tools/universalTransferNativeToken.d.ts.map +0 -1
- package/dist/esm/mcp-server/tools/universalTransferNativeToken.js +0 -28
- package/dist/esm/mcp-server/tools/universalTransferNativeToken.js.map +0 -1
- package/dist/esm/models/components/balanceinforesponse.d.ts +0 -56
- package/dist/esm/models/components/balanceinforesponse.d.ts.map +0 -1
- package/dist/esm/models/components/balanceinforesponse.js +0 -49
- package/dist/esm/models/components/balanceinforesponse.js.map +0 -1
- package/dist/esm/models/components/priceresponse.d.ts +0 -32
- package/dist/esm/models/components/priceresponse.d.ts.map +0 -1
- package/dist/esm/models/components/priceresponse.js +0 -40
- package/dist/esm/models/components/priceresponse.js.map +0 -1
- package/dist/esm/models/components/transfererc20request.d.ts +0 -86
- package/dist/esm/models/components/transfererc20request.d.ts.map +0 -1
- package/dist/esm/models/components/transfererc20request.js +0 -62
- package/dist/esm/models/components/transfererc20request.js.map +0 -1
- package/dist/esm/models/components/transferethrequest.d.ts +0 -75
- package/dist/esm/models/components/transferethrequest.d.ts.map +0 -1
- package/dist/esm/models/components/transferethrequest.js +0 -59
- package/dist/esm/models/components/transferethrequest.js.map +0 -1
- package/dist/esm/models/operations/genericbalance.d.ts +0 -246
- package/dist/esm/models/operations/genericbalance.d.ts.map +0 -1
- package/dist/esm/models/operations/genericbalance.js +0 -127
- package/dist/esm/models/operations/genericbalance.js.map +0 -1
- package/dist/esm/models/operations/genericpriceusd.d.ts +0 -244
- package/dist/esm/models/operations/genericpriceusd.d.ts.map +0 -1
- package/dist/esm/models/operations/genericpriceusd.js +0 -125
- package/dist/esm/models/operations/genericpriceusd.js.map +0 -1
- package/src/funcs/universalBalance.ts +0 -170
- package/src/funcs/universalPriceUsd.ts +0 -174
- package/src/mcp-server/tools/universalBalance.ts +0 -37
- package/src/mcp-server/tools/universalPriceUsd.ts +0 -42
- package/src/mcp-server/tools/universalTransferErc20.ts +0 -37
- package/src/mcp-server/tools/universalTransferNativeToken.ts +0 -37
- package/src/models/components/balanceinforesponse.ts +0 -114
- package/src/models/components/priceresponse.ts +0 -74
- package/src/models/components/transfererc20request.ts +0 -164
- package/src/models/components/transferethrequest.ts +0 -147
- package/src/models/operations/genericbalance.ts +0 -205
- package/src/models/operations/genericpriceusd.ts +0 -201
|
@@ -25,18 +25,23 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
25
25
|
import { Result } from "../types/fp.js";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Get EIP-7702 Authorization
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
*
|
|
31
|
+
* Get authorization data for EIP-7702 batching operations.
|
|
32
|
+
*
|
|
33
|
+
* This authorization is required to prevent replay attacks and ensure transaction
|
|
34
|
+
* ordering when batching multiple actions into a single transaction. The authorization
|
|
35
|
+
* includes a nonce and chain ID to guarantee transaction uniqueness and proper network
|
|
36
|
+
* targeting.
|
|
32
37
|
*/
|
|
33
|
-
export function
|
|
38
|
+
export function transactionBatchingAuthorization(
|
|
34
39
|
client: CompassApiSDKCore,
|
|
35
|
-
request: components.
|
|
40
|
+
request: components.MulticallAuthorizationRequest,
|
|
36
41
|
options?: RequestOptions,
|
|
37
42
|
): APIPromise<
|
|
38
43
|
Result<
|
|
39
|
-
components.
|
|
44
|
+
components.MulticallAuthorizationResponse,
|
|
40
45
|
| errors.HTTPValidationError
|
|
41
46
|
| APIError
|
|
42
47
|
| SDKValidationError
|
|
@@ -56,12 +61,12 @@ export function universalTransferNativeToken(
|
|
|
56
61
|
|
|
57
62
|
async function $do(
|
|
58
63
|
client: CompassApiSDKCore,
|
|
59
|
-
request: components.
|
|
64
|
+
request: components.MulticallAuthorizationRequest,
|
|
60
65
|
options?: RequestOptions,
|
|
61
66
|
): Promise<
|
|
62
67
|
[
|
|
63
68
|
Result<
|
|
64
|
-
components.
|
|
69
|
+
components.MulticallAuthorizationResponse,
|
|
65
70
|
| errors.HTTPValidationError
|
|
66
71
|
| APIError
|
|
67
72
|
| SDKValidationError
|
|
@@ -76,7 +81,8 @@ async function $do(
|
|
|
76
81
|
> {
|
|
77
82
|
const parsed = safeParse(
|
|
78
83
|
request,
|
|
79
|
-
(value) =>
|
|
84
|
+
(value) =>
|
|
85
|
+
components.MulticallAuthorizationRequest$outboundSchema.parse(value),
|
|
80
86
|
"Input validation failed",
|
|
81
87
|
);
|
|
82
88
|
if (!parsed.ok) {
|
|
@@ -85,7 +91,7 @@ async function $do(
|
|
|
85
91
|
const payload = parsed.value;
|
|
86
92
|
const body = encodeJSON("body", payload, { explode: true });
|
|
87
93
|
|
|
88
|
-
const path = pathToFunc("/v0/
|
|
94
|
+
const path = pathToFunc("/v0/multicall/authorization")();
|
|
89
95
|
|
|
90
96
|
const headers = new Headers(compactMap({
|
|
91
97
|
"Content-Type": "application/json",
|
|
@@ -98,7 +104,7 @@ async function $do(
|
|
|
98
104
|
|
|
99
105
|
const context = {
|
|
100
106
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
101
|
-
operationID: "
|
|
107
|
+
operationID: "multicall_authorization",
|
|
102
108
|
oAuth2Scopes: [],
|
|
103
109
|
|
|
104
110
|
resolvedSecurity: requestSecurity,
|
|
@@ -140,7 +146,7 @@ async function $do(
|
|
|
140
146
|
};
|
|
141
147
|
|
|
142
148
|
const [result] = await M.match<
|
|
143
|
-
components.
|
|
149
|
+
components.MulticallAuthorizationResponse,
|
|
144
150
|
| errors.HTTPValidationError
|
|
145
151
|
| APIError
|
|
146
152
|
| SDKValidationError
|
|
@@ -150,7 +156,7 @@ async function $do(
|
|
|
150
156
|
| RequestTimeoutError
|
|
151
157
|
| ConnectionError
|
|
152
158
|
>(
|
|
153
|
-
M.json(200, components.
|
|
159
|
+
M.json(200, components.MulticallAuthorizationResponse$inboundSchema),
|
|
154
160
|
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
155
161
|
M.fail("4XX"),
|
|
156
162
|
M.fail("5XX"),
|
|
@@ -25,18 +25,23 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
25
25
|
import { Result } from "../types/fp.js";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Execute Tx Batching
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
*
|
|
31
|
+
* Execute a batch of transactions in a single multicall using EIP-7702.
|
|
32
|
+
*
|
|
33
|
+
* This endpoint allows bundling multiple contract calls into a single atomic
|
|
34
|
+
* transaction, reducing gas costs and ensuring all operations succeed or fail
|
|
35
|
+
* together. The transaction must be authorized using the /authorization endpoint to
|
|
36
|
+
* prevent replay attacks.
|
|
32
37
|
*/
|
|
33
|
-
export function
|
|
38
|
+
export function transactionBatchingExecute(
|
|
34
39
|
client: CompassApiSDKCore,
|
|
35
|
-
request: components.
|
|
40
|
+
request: components.MulticallExecuteRequest,
|
|
36
41
|
options?: RequestOptions,
|
|
37
42
|
): APIPromise<
|
|
38
43
|
Result<
|
|
39
|
-
components.
|
|
44
|
+
components.UnsignedMulticallTransaction,
|
|
40
45
|
| errors.HTTPValidationError
|
|
41
46
|
| APIError
|
|
42
47
|
| SDKValidationError
|
|
@@ -56,12 +61,12 @@ export function universalTransferErc20(
|
|
|
56
61
|
|
|
57
62
|
async function $do(
|
|
58
63
|
client: CompassApiSDKCore,
|
|
59
|
-
request: components.
|
|
64
|
+
request: components.MulticallExecuteRequest,
|
|
60
65
|
options?: RequestOptions,
|
|
61
66
|
): Promise<
|
|
62
67
|
[
|
|
63
68
|
Result<
|
|
64
|
-
components.
|
|
69
|
+
components.UnsignedMulticallTransaction,
|
|
65
70
|
| errors.HTTPValidationError
|
|
66
71
|
| APIError
|
|
67
72
|
| SDKValidationError
|
|
@@ -76,7 +81,7 @@ async function $do(
|
|
|
76
81
|
> {
|
|
77
82
|
const parsed = safeParse(
|
|
78
83
|
request,
|
|
79
|
-
(value) => components.
|
|
84
|
+
(value) => components.MulticallExecuteRequest$outboundSchema.parse(value),
|
|
80
85
|
"Input validation failed",
|
|
81
86
|
);
|
|
82
87
|
if (!parsed.ok) {
|
|
@@ -85,7 +90,7 @@ async function $do(
|
|
|
85
90
|
const payload = parsed.value;
|
|
86
91
|
const body = encodeJSON("body", payload, { explode: true });
|
|
87
92
|
|
|
88
|
-
const path = pathToFunc("/v0/
|
|
93
|
+
const path = pathToFunc("/v0/multicall/execute")();
|
|
89
94
|
|
|
90
95
|
const headers = new Headers(compactMap({
|
|
91
96
|
"Content-Type": "application/json",
|
|
@@ -98,7 +103,7 @@ async function $do(
|
|
|
98
103
|
|
|
99
104
|
const context = {
|
|
100
105
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
101
|
-
operationID: "
|
|
106
|
+
operationID: "multicall_execute",
|
|
102
107
|
oAuth2Scopes: [],
|
|
103
108
|
|
|
104
109
|
resolvedSecurity: requestSecurity,
|
|
@@ -140,7 +145,7 @@ async function $do(
|
|
|
140
145
|
};
|
|
141
146
|
|
|
142
147
|
const [result] = await M.match<
|
|
143
|
-
components.
|
|
148
|
+
components.UnsignedMulticallTransaction,
|
|
144
149
|
| errors.HTTPValidationError
|
|
145
150
|
| APIError
|
|
146
151
|
| SDKValidationError
|
|
@@ -150,7 +155,7 @@ async function $do(
|
|
|
150
155
|
| RequestTimeoutError
|
|
151
156
|
| ConnectionError
|
|
152
157
|
>(
|
|
153
|
-
M.json(200, components.
|
|
158
|
+
M.json(200, components.UnsignedMulticallTransaction$inboundSchema),
|
|
154
159
|
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
155
160
|
M.fail("4XX"),
|
|
156
161
|
M.fail("5XX"),
|
package/src/lib/config.ts
CHANGED
|
@@ -57,8 +57,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
57
57
|
export const SDK_METADATA = {
|
|
58
58
|
language: "typescript",
|
|
59
59
|
openapiDocVersion: "0.0.1",
|
|
60
|
-
sdkVersion: "0.0.
|
|
60
|
+
sdkVersion: "0.0.9",
|
|
61
61
|
genVersion: "2.596.2",
|
|
62
62
|
userAgent:
|
|
63
|
-
"speakeasy-sdk/typescript 0.0.
|
|
63
|
+
"speakeasy-sdk/typescript 0.0.9 2.596.2 0.0.1 @compass-labs/api-sdk",
|
|
64
64
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -43,6 +43,8 @@ import { tool$tokenAddress } from "./tools/tokenAddress.js";
|
|
|
43
43
|
import { tool$tokenBalance } from "./tools/tokenBalance.js";
|
|
44
44
|
import { tool$tokenPrice } from "./tools/tokenPrice.js";
|
|
45
45
|
import { tool$tokenTransfer } from "./tools/tokenTransfer.js";
|
|
46
|
+
import { tool$transactionBatchingAuthorization } from "./tools/transactionBatchingAuthorization.js";
|
|
47
|
+
import { tool$transactionBatchingExecute } from "./tools/transactionBatchingExecute.js";
|
|
46
48
|
import { tool$uniswapV3LiquidityProvisionIncrease } from "./tools/uniswapV3LiquidityProvisionIncrease.js";
|
|
47
49
|
import { tool$uniswapV3LiquidityProvisionInRange } from "./tools/uniswapV3LiquidityProvisionInRange.js";
|
|
48
50
|
import { tool$uniswapV3LiquidityProvisionMint } from "./tools/uniswapV3LiquidityProvisionMint.js";
|
|
@@ -55,13 +57,9 @@ import { tool$uniswapV3SwapBuyExactly } from "./tools/uniswapV3SwapBuyExactly.js
|
|
|
55
57
|
import { tool$uniswapV3SwapSellExactly } from "./tools/uniswapV3SwapSellExactly.js";
|
|
56
58
|
import { tool$universalAllowance } from "./tools/universalAllowance.js";
|
|
57
59
|
import { tool$universalAllowanceSet } from "./tools/universalAllowanceSet.js";
|
|
58
|
-
import { tool$universalBalance } from "./tools/universalBalance.js";
|
|
59
60
|
import { tool$universalEns } from "./tools/universalEns.js";
|
|
60
61
|
import { tool$universalPortfolio } from "./tools/universalPortfolio.js";
|
|
61
|
-
import { tool$universalPriceUsd } from "./tools/universalPriceUsd.js";
|
|
62
62
|
import { tool$universalSupportedTokens } from "./tools/universalSupportedTokens.js";
|
|
63
|
-
import { tool$universalTransferErc20 } from "./tools/universalTransferErc20.js";
|
|
64
|
-
import { tool$universalTransferNativeToken } from "./tools/universalTransferNativeToken.js";
|
|
65
63
|
import { tool$universalUnwrapWeth } from "./tools/universalUnwrapWeth.js";
|
|
66
64
|
import { tool$universalVisualizePortfolio } from "./tools/universalVisualizePortfolio.js";
|
|
67
65
|
import { tool$universalWrapEth } from "./tools/universalWrapEth.js";
|
|
@@ -76,7 +74,7 @@ export function createMCPServer(deps: {
|
|
|
76
74
|
}) {
|
|
77
75
|
const server = new McpServer({
|
|
78
76
|
name: "CompassApiSDK",
|
|
79
|
-
version: "0.0.
|
|
77
|
+
version: "0.0.9",
|
|
80
78
|
});
|
|
81
79
|
|
|
82
80
|
const client = new CompassApiSDKCore({
|
|
@@ -148,16 +146,14 @@ export function createMCPServer(deps: {
|
|
|
148
146
|
tool(tool$uniswapV3LiquidityProvisionWithdraw);
|
|
149
147
|
tool(tool$universalPortfolio);
|
|
150
148
|
tool(tool$universalVisualizePortfolio);
|
|
151
|
-
tool(tool$universalPriceUsd);
|
|
152
149
|
tool(tool$universalSupportedTokens);
|
|
153
|
-
tool(tool$universalBalance);
|
|
154
150
|
tool(tool$universalAllowance);
|
|
155
151
|
tool(tool$universalEns);
|
|
156
152
|
tool(tool$universalWrapEth);
|
|
157
153
|
tool(tool$universalUnwrapWeth);
|
|
158
|
-
tool(tool$universalTransferErc20);
|
|
159
|
-
tool(tool$universalTransferNativeToken);
|
|
160
154
|
tool(tool$universalAllowanceSet);
|
|
155
|
+
tool(tool$transactionBatchingAuthorization);
|
|
156
|
+
tool(tool$transactionBatchingExecute);
|
|
161
157
|
|
|
162
158
|
return server;
|
|
163
159
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { transactionBatchingAuthorization } from "../../funcs/transactionBatchingAuthorization.js";
|
|
6
|
+
import * as components from "../../models/components/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: components.MulticallAuthorizationRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$transactionBatchingAuthorization: ToolDefinition<
|
|
14
|
+
typeof args
|
|
15
|
+
> = {
|
|
16
|
+
name: "transaction-batching-authorization",
|
|
17
|
+
description: `Get EIP-7702 Authorization
|
|
18
|
+
|
|
19
|
+
Get authorization data for EIP-7702 batching operations.
|
|
20
|
+
|
|
21
|
+
This authorization is required to prevent replay attacks and ensure transaction
|
|
22
|
+
ordering when batching multiple actions into a single transaction. The authorization
|
|
23
|
+
includes a nonce and chain ID to guarantee transaction uniqueness and proper network
|
|
24
|
+
targeting.`,
|
|
25
|
+
args,
|
|
26
|
+
tool: async (client, args, ctx) => {
|
|
27
|
+
const [result, apiCall] = await transactionBatchingAuthorization(
|
|
28
|
+
client,
|
|
29
|
+
args.request,
|
|
30
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
31
|
+
).$inspect();
|
|
32
|
+
|
|
33
|
+
if (!result.ok) {
|
|
34
|
+
return {
|
|
35
|
+
content: [{ type: "text", text: result.error.message }],
|
|
36
|
+
isError: true,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const value = result.value;
|
|
41
|
+
|
|
42
|
+
return formatResult(value, apiCall);
|
|
43
|
+
},
|
|
44
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { transactionBatchingExecute } from "../../funcs/transactionBatchingExecute.js";
|
|
6
|
+
import * as components from "../../models/components/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: components.MulticallExecuteRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$transactionBatchingExecute: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "transaction-batching-execute",
|
|
15
|
+
description: `Execute Tx Batching
|
|
16
|
+
|
|
17
|
+
Execute a batch of transactions in a single multicall using EIP-7702.
|
|
18
|
+
|
|
19
|
+
This endpoint allows bundling multiple contract calls into a single atomic
|
|
20
|
+
transaction, reducing gas costs and ensuring all operations succeed or fail
|
|
21
|
+
together. The transaction must be authorized using the /authorization endpoint to
|
|
22
|
+
prevent replay attacks.`,
|
|
23
|
+
args,
|
|
24
|
+
tool: async (client, args, ctx) => {
|
|
25
|
+
const [result, apiCall] = await transactionBatchingExecute(
|
|
26
|
+
client,
|
|
27
|
+
args.request,
|
|
28
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
29
|
+
).$inspect();
|
|
30
|
+
|
|
31
|
+
if (!result.ok) {
|
|
32
|
+
return {
|
|
33
|
+
content: [{ type: "text", text: result.error.message }],
|
|
34
|
+
isError: true,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const value = result.value;
|
|
39
|
+
|
|
40
|
+
return formatResult(value, apiCall);
|
|
41
|
+
},
|
|
42
|
+
};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
InterestRateMode,
|
|
12
|
+
InterestRateMode$inboundSchema,
|
|
13
|
+
InterestRateMode$outboundSchema,
|
|
14
|
+
} from "./interestratemode.js";
|
|
15
|
+
import {
|
|
16
|
+
TokenEnum,
|
|
17
|
+
TokenEnum$inboundSchema,
|
|
18
|
+
TokenEnum$outboundSchema,
|
|
19
|
+
} from "./tokenenum.js";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The amount of the asset to borrow
|
|
23
|
+
*/
|
|
24
|
+
export type AaveBorrowParamsAmount = number | string;
|
|
25
|
+
|
|
26
|
+
export type AaveBorrowParams = {
|
|
27
|
+
/**
|
|
28
|
+
* A class representing the token.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
*
|
|
32
|
+
* This class is used to represent the token in the system. Notice individual
|
|
33
|
+
* endpoints' documentation where per chain tokens are presented.
|
|
34
|
+
*/
|
|
35
|
+
token: TokenEnum;
|
|
36
|
+
/**
|
|
37
|
+
* The amount of the asset to borrow
|
|
38
|
+
*/
|
|
39
|
+
amount: number | string;
|
|
40
|
+
/**
|
|
41
|
+
* On AAVE there are 2 different interest modes.
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
*
|
|
45
|
+
* A stable (but typically higher rate), or a variable rate.
|
|
46
|
+
*/
|
|
47
|
+
interestRateMode: InterestRateMode;
|
|
48
|
+
/**
|
|
49
|
+
* The address on behalf of whom the supply is made
|
|
50
|
+
*/
|
|
51
|
+
onBehalfOf?: string | null | undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const AaveBorrowParamsAmount$inboundSchema: z.ZodType<
|
|
56
|
+
AaveBorrowParamsAmount,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
unknown
|
|
59
|
+
> = z.union([z.number(), z.string()]);
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export type AaveBorrowParamsAmount$Outbound = number | string;
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const AaveBorrowParamsAmount$outboundSchema: z.ZodType<
|
|
66
|
+
AaveBorrowParamsAmount$Outbound,
|
|
67
|
+
z.ZodTypeDef,
|
|
68
|
+
AaveBorrowParamsAmount
|
|
69
|
+
> = z.union([z.number(), z.string()]);
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @internal
|
|
73
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
74
|
+
*/
|
|
75
|
+
export namespace AaveBorrowParamsAmount$ {
|
|
76
|
+
/** @deprecated use `AaveBorrowParamsAmount$inboundSchema` instead. */
|
|
77
|
+
export const inboundSchema = AaveBorrowParamsAmount$inboundSchema;
|
|
78
|
+
/** @deprecated use `AaveBorrowParamsAmount$outboundSchema` instead. */
|
|
79
|
+
export const outboundSchema = AaveBorrowParamsAmount$outboundSchema;
|
|
80
|
+
/** @deprecated use `AaveBorrowParamsAmount$Outbound` instead. */
|
|
81
|
+
export type Outbound = AaveBorrowParamsAmount$Outbound;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function aaveBorrowParamsAmountToJSON(
|
|
85
|
+
aaveBorrowParamsAmount: AaveBorrowParamsAmount,
|
|
86
|
+
): string {
|
|
87
|
+
return JSON.stringify(
|
|
88
|
+
AaveBorrowParamsAmount$outboundSchema.parse(aaveBorrowParamsAmount),
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function aaveBorrowParamsAmountFromJSON(
|
|
93
|
+
jsonString: string,
|
|
94
|
+
): SafeParseResult<AaveBorrowParamsAmount, SDKValidationError> {
|
|
95
|
+
return safeParse(
|
|
96
|
+
jsonString,
|
|
97
|
+
(x) => AaveBorrowParamsAmount$inboundSchema.parse(JSON.parse(x)),
|
|
98
|
+
`Failed to parse 'AaveBorrowParamsAmount' from JSON`,
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** @internal */
|
|
103
|
+
export const AaveBorrowParams$inboundSchema: z.ZodType<
|
|
104
|
+
AaveBorrowParams,
|
|
105
|
+
z.ZodTypeDef,
|
|
106
|
+
unknown
|
|
107
|
+
> = z.object({
|
|
108
|
+
token: TokenEnum$inboundSchema,
|
|
109
|
+
amount: z.union([z.number(), z.string()]),
|
|
110
|
+
interest_rate_mode: InterestRateMode$inboundSchema,
|
|
111
|
+
on_behalf_of: z.nullable(z.string()).optional(),
|
|
112
|
+
}).transform((v) => {
|
|
113
|
+
return remap$(v, {
|
|
114
|
+
"interest_rate_mode": "interestRateMode",
|
|
115
|
+
"on_behalf_of": "onBehalfOf",
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
/** @internal */
|
|
120
|
+
export type AaveBorrowParams$Outbound = {
|
|
121
|
+
token: string;
|
|
122
|
+
amount: number | string;
|
|
123
|
+
interest_rate_mode: string;
|
|
124
|
+
on_behalf_of?: string | null | undefined;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/** @internal */
|
|
128
|
+
export const AaveBorrowParams$outboundSchema: z.ZodType<
|
|
129
|
+
AaveBorrowParams$Outbound,
|
|
130
|
+
z.ZodTypeDef,
|
|
131
|
+
AaveBorrowParams
|
|
132
|
+
> = z.object({
|
|
133
|
+
token: TokenEnum$outboundSchema,
|
|
134
|
+
amount: z.union([z.number(), z.string()]),
|
|
135
|
+
interestRateMode: InterestRateMode$outboundSchema,
|
|
136
|
+
onBehalfOf: z.nullable(z.string()).optional(),
|
|
137
|
+
}).transform((v) => {
|
|
138
|
+
return remap$(v, {
|
|
139
|
+
interestRateMode: "interest_rate_mode",
|
|
140
|
+
onBehalfOf: "on_behalf_of",
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @internal
|
|
146
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
147
|
+
*/
|
|
148
|
+
export namespace AaveBorrowParams$ {
|
|
149
|
+
/** @deprecated use `AaveBorrowParams$inboundSchema` instead. */
|
|
150
|
+
export const inboundSchema = AaveBorrowParams$inboundSchema;
|
|
151
|
+
/** @deprecated use `AaveBorrowParams$outboundSchema` instead. */
|
|
152
|
+
export const outboundSchema = AaveBorrowParams$outboundSchema;
|
|
153
|
+
/** @deprecated use `AaveBorrowParams$Outbound` instead. */
|
|
154
|
+
export type Outbound = AaveBorrowParams$Outbound;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function aaveBorrowParamsToJSON(
|
|
158
|
+
aaveBorrowParams: AaveBorrowParams,
|
|
159
|
+
): string {
|
|
160
|
+
return JSON.stringify(
|
|
161
|
+
AaveBorrowParams$outboundSchema.parse(aaveBorrowParams),
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export function aaveBorrowParamsFromJSON(
|
|
166
|
+
jsonString: string,
|
|
167
|
+
): SafeParseResult<AaveBorrowParams, SDKValidationError> {
|
|
168
|
+
return safeParse(
|
|
169
|
+
jsonString,
|
|
170
|
+
(x) => AaveBorrowParams$inboundSchema.parse(JSON.parse(x)),
|
|
171
|
+
`Failed to parse 'AaveBorrowParams' from JSON`,
|
|
172
|
+
);
|
|
173
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
InterestRateMode,
|
|
12
|
+
InterestRateMode$inboundSchema,
|
|
13
|
+
InterestRateMode$outboundSchema,
|
|
14
|
+
} from "./interestratemode.js";
|
|
15
|
+
import {
|
|
16
|
+
TokenEnum,
|
|
17
|
+
TokenEnum$inboundSchema,
|
|
18
|
+
TokenEnum$outboundSchema,
|
|
19
|
+
} from "./tokenenum.js";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The amount of the asset to repay
|
|
23
|
+
*/
|
|
24
|
+
export type AaveRepayParamsAmount = number | string;
|
|
25
|
+
|
|
26
|
+
export type AaveRepayParams = {
|
|
27
|
+
/**
|
|
28
|
+
* A class representing the token.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
*
|
|
32
|
+
* This class is used to represent the token in the system. Notice individual
|
|
33
|
+
* endpoints' documentation where per chain tokens are presented.
|
|
34
|
+
*/
|
|
35
|
+
token: TokenEnum;
|
|
36
|
+
/**
|
|
37
|
+
* The amount of the asset to repay
|
|
38
|
+
*/
|
|
39
|
+
amount: number | string;
|
|
40
|
+
/**
|
|
41
|
+
* On AAVE there are 2 different interest modes.
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
*
|
|
45
|
+
* A stable (but typically higher rate), or a variable rate.
|
|
46
|
+
*/
|
|
47
|
+
interestRateMode: InterestRateMode;
|
|
48
|
+
/**
|
|
49
|
+
* The address on behalf of whom the supply is made
|
|
50
|
+
*/
|
|
51
|
+
onBehalfOf?: string | null | undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const AaveRepayParamsAmount$inboundSchema: z.ZodType<
|
|
56
|
+
AaveRepayParamsAmount,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
unknown
|
|
59
|
+
> = z.union([z.number(), z.string()]);
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export type AaveRepayParamsAmount$Outbound = number | string;
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const AaveRepayParamsAmount$outboundSchema: z.ZodType<
|
|
66
|
+
AaveRepayParamsAmount$Outbound,
|
|
67
|
+
z.ZodTypeDef,
|
|
68
|
+
AaveRepayParamsAmount
|
|
69
|
+
> = z.union([z.number(), z.string()]);
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @internal
|
|
73
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
74
|
+
*/
|
|
75
|
+
export namespace AaveRepayParamsAmount$ {
|
|
76
|
+
/** @deprecated use `AaveRepayParamsAmount$inboundSchema` instead. */
|
|
77
|
+
export const inboundSchema = AaveRepayParamsAmount$inboundSchema;
|
|
78
|
+
/** @deprecated use `AaveRepayParamsAmount$outboundSchema` instead. */
|
|
79
|
+
export const outboundSchema = AaveRepayParamsAmount$outboundSchema;
|
|
80
|
+
/** @deprecated use `AaveRepayParamsAmount$Outbound` instead. */
|
|
81
|
+
export type Outbound = AaveRepayParamsAmount$Outbound;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function aaveRepayParamsAmountToJSON(
|
|
85
|
+
aaveRepayParamsAmount: AaveRepayParamsAmount,
|
|
86
|
+
): string {
|
|
87
|
+
return JSON.stringify(
|
|
88
|
+
AaveRepayParamsAmount$outboundSchema.parse(aaveRepayParamsAmount),
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function aaveRepayParamsAmountFromJSON(
|
|
93
|
+
jsonString: string,
|
|
94
|
+
): SafeParseResult<AaveRepayParamsAmount, SDKValidationError> {
|
|
95
|
+
return safeParse(
|
|
96
|
+
jsonString,
|
|
97
|
+
(x) => AaveRepayParamsAmount$inboundSchema.parse(JSON.parse(x)),
|
|
98
|
+
`Failed to parse 'AaveRepayParamsAmount' from JSON`,
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** @internal */
|
|
103
|
+
export const AaveRepayParams$inboundSchema: z.ZodType<
|
|
104
|
+
AaveRepayParams,
|
|
105
|
+
z.ZodTypeDef,
|
|
106
|
+
unknown
|
|
107
|
+
> = z.object({
|
|
108
|
+
token: TokenEnum$inboundSchema,
|
|
109
|
+
amount: z.union([z.number(), z.string()]),
|
|
110
|
+
interest_rate_mode: InterestRateMode$inboundSchema,
|
|
111
|
+
on_behalf_of: z.nullable(z.string()).optional(),
|
|
112
|
+
}).transform((v) => {
|
|
113
|
+
return remap$(v, {
|
|
114
|
+
"interest_rate_mode": "interestRateMode",
|
|
115
|
+
"on_behalf_of": "onBehalfOf",
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
/** @internal */
|
|
120
|
+
export type AaveRepayParams$Outbound = {
|
|
121
|
+
token: string;
|
|
122
|
+
amount: number | string;
|
|
123
|
+
interest_rate_mode: string;
|
|
124
|
+
on_behalf_of?: string | null | undefined;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/** @internal */
|
|
128
|
+
export const AaveRepayParams$outboundSchema: z.ZodType<
|
|
129
|
+
AaveRepayParams$Outbound,
|
|
130
|
+
z.ZodTypeDef,
|
|
131
|
+
AaveRepayParams
|
|
132
|
+
> = z.object({
|
|
133
|
+
token: TokenEnum$outboundSchema,
|
|
134
|
+
amount: z.union([z.number(), z.string()]),
|
|
135
|
+
interestRateMode: InterestRateMode$outboundSchema,
|
|
136
|
+
onBehalfOf: z.nullable(z.string()).optional(),
|
|
137
|
+
}).transform((v) => {
|
|
138
|
+
return remap$(v, {
|
|
139
|
+
interestRateMode: "interest_rate_mode",
|
|
140
|
+
onBehalfOf: "on_behalf_of",
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @internal
|
|
146
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
147
|
+
*/
|
|
148
|
+
export namespace AaveRepayParams$ {
|
|
149
|
+
/** @deprecated use `AaveRepayParams$inboundSchema` instead. */
|
|
150
|
+
export const inboundSchema = AaveRepayParams$inboundSchema;
|
|
151
|
+
/** @deprecated use `AaveRepayParams$outboundSchema` instead. */
|
|
152
|
+
export const outboundSchema = AaveRepayParams$outboundSchema;
|
|
153
|
+
/** @deprecated use `AaveRepayParams$Outbound` instead. */
|
|
154
|
+
export type Outbound = AaveRepayParams$Outbound;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function aaveRepayParamsToJSON(
|
|
158
|
+
aaveRepayParams: AaveRepayParams,
|
|
159
|
+
): string {
|
|
160
|
+
return JSON.stringify(AaveRepayParams$outboundSchema.parse(aaveRepayParams));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function aaveRepayParamsFromJSON(
|
|
164
|
+
jsonString: string,
|
|
165
|
+
): SafeParseResult<AaveRepayParams, SDKValidationError> {
|
|
166
|
+
return safeParse(
|
|
167
|
+
jsonString,
|
|
168
|
+
(x) => AaveRepayParams$inboundSchema.parse(JSON.parse(x)),
|
|
169
|
+
`Failed to parse 'AaveRepayParams' from JSON`,
|
|
170
|
+
);
|
|
171
|
+
}
|