@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
|
@@ -216,6 +216,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
216
216
|
async function run() {
|
|
217
217
|
const result = await compassApiSDK.aaveV3.userPositionSummary({
|
|
218
218
|
chain: "arbitrum:mainnet",
|
|
219
|
+
user: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
219
220
|
});
|
|
220
221
|
|
|
221
222
|
// Handle the result
|
|
@@ -242,6 +243,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
242
243
|
async function run() {
|
|
243
244
|
const res = await aaveV3UserPositionSummary(compassApiSDK, {
|
|
244
245
|
chain: "arbitrum:mainnet",
|
|
246
|
+
user: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
245
247
|
});
|
|
246
248
|
|
|
247
249
|
if (!res.ok) {
|
|
@@ -301,6 +303,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
301
303
|
async function run() {
|
|
302
304
|
const result = await compassApiSDK.aaveV3.userPositionPerToken({
|
|
303
305
|
chain: "arbitrum:mainnet",
|
|
306
|
+
user: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
304
307
|
token: "USDC",
|
|
305
308
|
});
|
|
306
309
|
|
|
@@ -328,6 +331,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
328
331
|
async function run() {
|
|
329
332
|
const res = await aaveV3UserPositionPerToken(compassApiSDK, {
|
|
330
333
|
chain: "arbitrum:mainnet",
|
|
334
|
+
user: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
331
335
|
token: "USDC",
|
|
332
336
|
});
|
|
333
337
|
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# TransactionBatching
|
|
2
|
+
(*transactionBatching*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [authorization](#authorization) - Get EIP-7702 Authorization
|
|
9
|
+
* [execute](#execute) - Execute Tx Batching
|
|
10
|
+
|
|
11
|
+
## authorization
|
|
12
|
+
|
|
13
|
+
Get authorization data for EIP-7702 batching operations.
|
|
14
|
+
|
|
15
|
+
This authorization is required to prevent replay attacks and ensure transaction
|
|
16
|
+
ordering when batching multiple actions into a single transaction. The authorization
|
|
17
|
+
includes a nonce and chain ID to guarantee transaction uniqueness and proper network
|
|
18
|
+
targeting.
|
|
19
|
+
|
|
20
|
+
### Example Usage
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
24
|
+
|
|
25
|
+
const compassApiSDK = new CompassApiSDK({
|
|
26
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
async function run() {
|
|
30
|
+
const result = await compassApiSDK.transactionBatching.authorization({
|
|
31
|
+
chain: "ethereum:mainnet",
|
|
32
|
+
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// Handle the result
|
|
36
|
+
console.log(result);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
run();
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Standalone function
|
|
43
|
+
|
|
44
|
+
The standalone function version of this method:
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
48
|
+
import { transactionBatchingAuthorization } from "@compass-labs/api-sdk/funcs/transactionBatchingAuthorization.js";
|
|
49
|
+
|
|
50
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
51
|
+
// You can create one instance of it to use across an application.
|
|
52
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
53
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
async function run() {
|
|
57
|
+
const res = await transactionBatchingAuthorization(compassApiSDK, {
|
|
58
|
+
chain: "ethereum:mainnet",
|
|
59
|
+
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
if (!res.ok) {
|
|
63
|
+
throw res.error;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const { value: result } = res;
|
|
67
|
+
|
|
68
|
+
// Handle the result
|
|
69
|
+
console.log(result);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
run();
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Parameters
|
|
76
|
+
|
|
77
|
+
| Parameter | Type | Required | Description |
|
|
78
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
79
|
+
| `request` | [components.MulticallAuthorizationRequest](../../models/components/multicallauthorizationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
80
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
81
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
82
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
83
|
+
|
|
84
|
+
### Response
|
|
85
|
+
|
|
86
|
+
**Promise\<[components.MulticallAuthorizationResponse](../../models/components/multicallauthorizationresponse.md)\>**
|
|
87
|
+
|
|
88
|
+
### Errors
|
|
89
|
+
|
|
90
|
+
| Error Type | Status Code | Content Type |
|
|
91
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
92
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
93
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
94
|
+
|
|
95
|
+
## execute
|
|
96
|
+
|
|
97
|
+
Execute a batch of transactions in a single multicall using EIP-7702.
|
|
98
|
+
|
|
99
|
+
This endpoint allows bundling multiple contract calls into a single atomic
|
|
100
|
+
transaction, reducing gas costs and ensuring all operations succeed or fail
|
|
101
|
+
together. The transaction must be authorized using the /authorization endpoint to
|
|
102
|
+
prevent replay attacks.
|
|
103
|
+
|
|
104
|
+
### Example Usage
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
108
|
+
|
|
109
|
+
const compassApiSDK = new CompassApiSDK({
|
|
110
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
async function run() {
|
|
114
|
+
const result = await compassApiSDK.transactionBatching.execute({
|
|
115
|
+
chain: "ethereum:mainnet",
|
|
116
|
+
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
117
|
+
signedAuthorization: {
|
|
118
|
+
nonce: 259799,
|
|
119
|
+
address: "91533 Simonis View",
|
|
120
|
+
chainId: 7933,
|
|
121
|
+
r: "<value>",
|
|
122
|
+
s: "<value>",
|
|
123
|
+
yParity: 755397,
|
|
124
|
+
},
|
|
125
|
+
actions: [
|
|
126
|
+
{
|
|
127
|
+
actionType: "UNWRAP_WETH",
|
|
128
|
+
body: {
|
|
129
|
+
tokenIn: "KNC",
|
|
130
|
+
tokenOut: "MKR",
|
|
131
|
+
tickSpacing: 500,
|
|
132
|
+
amountOut: 1.5,
|
|
133
|
+
amountInMaximum: 1.6,
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
// Handle the result
|
|
140
|
+
console.log(result);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
run();
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Standalone function
|
|
147
|
+
|
|
148
|
+
The standalone function version of this method:
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
152
|
+
import { transactionBatchingExecute } from "@compass-labs/api-sdk/funcs/transactionBatchingExecute.js";
|
|
153
|
+
|
|
154
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
155
|
+
// You can create one instance of it to use across an application.
|
|
156
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
157
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
async function run() {
|
|
161
|
+
const res = await transactionBatchingExecute(compassApiSDK, {
|
|
162
|
+
chain: "ethereum:mainnet",
|
|
163
|
+
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
164
|
+
signedAuthorization: {
|
|
165
|
+
nonce: 259799,
|
|
166
|
+
address: "91533 Simonis View",
|
|
167
|
+
chainId: 7933,
|
|
168
|
+
r: "<value>",
|
|
169
|
+
s: "<value>",
|
|
170
|
+
yParity: 755397,
|
|
171
|
+
},
|
|
172
|
+
actions: [
|
|
173
|
+
{
|
|
174
|
+
actionType: "UNWRAP_WETH",
|
|
175
|
+
body: {
|
|
176
|
+
tokenIn: "KNC",
|
|
177
|
+
tokenOut: "MKR",
|
|
178
|
+
tickSpacing: 500,
|
|
179
|
+
amountOut: 1.5,
|
|
180
|
+
amountInMaximum: 1.6,
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
if (!res.ok) {
|
|
187
|
+
throw res.error;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const { value: result } = res;
|
|
191
|
+
|
|
192
|
+
// Handle the result
|
|
193
|
+
console.log(result);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
run();
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Parameters
|
|
200
|
+
|
|
201
|
+
| Parameter | Type | Required | Description |
|
|
202
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
203
|
+
| `request` | [components.MulticallExecuteRequest](../../models/components/multicallexecuterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
204
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
205
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
206
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
207
|
+
|
|
208
|
+
### Response
|
|
209
|
+
|
|
210
|
+
**Promise\<[components.UnsignedMulticallTransaction](../../models/components/unsignedmulticalltransaction.md)\>**
|
|
211
|
+
|
|
212
|
+
### Errors
|
|
213
|
+
|
|
214
|
+
| Error Type | Status Code | Content Type |
|
|
215
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
216
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
217
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -7,15 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
* [portfolio](#portfolio) - List user portfolio
|
|
9
9
|
* [visualizePortfolio](#visualizeportfolio) - Visualize user portfolio
|
|
10
|
-
* [priceUsd](#priceusd) - Token price
|
|
11
10
|
* [supportedTokens](#supportedtokens) - List supported tokens
|
|
12
|
-
* [balance](#balance) - User Token Balance
|
|
13
11
|
* [allowance](#allowance) - Get allowance - Protocol
|
|
14
12
|
* [ens](#ens) - Resolve ENS
|
|
15
13
|
* [wrapEth](#wrapeth) - Wrap ETH
|
|
16
14
|
* [unwrapWeth](#unwrapweth) - Unwrap WETH
|
|
17
|
-
* [transferErc20](#transfererc20) - Transfer Token
|
|
18
|
-
* [transferNativeToken](#transfernativetoken) - Transfer ETH
|
|
19
15
|
* [allowanceSet](#allowanceset) - Set Allowance - Protocol
|
|
20
16
|
|
|
21
17
|
## portfolio
|
|
@@ -179,90 +175,6 @@ run();
|
|
|
179
175
|
| errors.HTTPValidationError | 422 | application/json |
|
|
180
176
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
181
177
|
|
|
182
|
-
## priceUsd
|
|
183
|
-
|
|
184
|
-
Retrieves the price of the specified token relative to USD using Chainlink's on-
|
|
185
|
-
chain price feeds.
|
|
186
|
-
|
|
187
|
-
Chainlink is a decentralized oracle that aggregates price data from off-chain
|
|
188
|
-
sources. This ensures the price is tamper-resistant but the price might be stale
|
|
189
|
-
with the update frequency of the oracle.
|
|
190
|
-
|
|
191
|
-
### Example Usage
|
|
192
|
-
|
|
193
|
-
```typescript
|
|
194
|
-
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
195
|
-
|
|
196
|
-
const compassApiSDK = new CompassApiSDK({
|
|
197
|
-
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
async function run() {
|
|
201
|
-
const result = await compassApiSDK.universal.priceUsd({
|
|
202
|
-
chain: "arbitrum:mainnet",
|
|
203
|
-
token: "WBTC",
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
// Handle the result
|
|
207
|
-
console.log(result);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
run();
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### Standalone function
|
|
214
|
-
|
|
215
|
-
The standalone function version of this method:
|
|
216
|
-
|
|
217
|
-
```typescript
|
|
218
|
-
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
219
|
-
import { universalPriceUsd } from "@compass-labs/api-sdk/funcs/universalPriceUsd.js";
|
|
220
|
-
|
|
221
|
-
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
222
|
-
// You can create one instance of it to use across an application.
|
|
223
|
-
const compassApiSDK = new CompassApiSDKCore({
|
|
224
|
-
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
async function run() {
|
|
228
|
-
const res = await universalPriceUsd(compassApiSDK, {
|
|
229
|
-
chain: "arbitrum:mainnet",
|
|
230
|
-
token: "WBTC",
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
if (!res.ok) {
|
|
234
|
-
throw res.error;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
const { value: result } = res;
|
|
238
|
-
|
|
239
|
-
// Handle the result
|
|
240
|
-
console.log(result);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
run();
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
### Parameters
|
|
247
|
-
|
|
248
|
-
| Parameter | Type | Required | Description |
|
|
249
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
250
|
-
| `request` | [operations.GenericPriceUsdRequest](../../models/operations/genericpriceusdrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
251
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
252
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
253
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
254
|
-
|
|
255
|
-
### Response
|
|
256
|
-
|
|
257
|
-
**Promise\<[components.PriceResponse](../../models/components/priceresponse.md)\>**
|
|
258
|
-
|
|
259
|
-
### Errors
|
|
260
|
-
|
|
261
|
-
| Error Type | Status Code | Content Type |
|
|
262
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
263
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
264
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
265
|
-
|
|
266
178
|
## supportedTokens
|
|
267
179
|
|
|
268
180
|
Get the list of supported tokens on a chain by the Compass API.
|
|
@@ -340,85 +252,6 @@ run();
|
|
|
340
252
|
| errors.HTTPValidationError | 422 | application/json |
|
|
341
253
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
342
254
|
|
|
343
|
-
## balance
|
|
344
|
-
|
|
345
|
-
Returns the balance of a specific ERC20 token for a given user address.
|
|
346
|
-
|
|
347
|
-
### Example Usage
|
|
348
|
-
|
|
349
|
-
```typescript
|
|
350
|
-
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
351
|
-
|
|
352
|
-
const compassApiSDK = new CompassApiSDK({
|
|
353
|
-
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
354
|
-
});
|
|
355
|
-
|
|
356
|
-
async function run() {
|
|
357
|
-
const result = await compassApiSDK.universal.balance({
|
|
358
|
-
chain: "arbitrum:mainnet",
|
|
359
|
-
token: "USDC",
|
|
360
|
-
});
|
|
361
|
-
|
|
362
|
-
// Handle the result
|
|
363
|
-
console.log(result);
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
run();
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
### Standalone function
|
|
370
|
-
|
|
371
|
-
The standalone function version of this method:
|
|
372
|
-
|
|
373
|
-
```typescript
|
|
374
|
-
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
375
|
-
import { universalBalance } from "@compass-labs/api-sdk/funcs/universalBalance.js";
|
|
376
|
-
|
|
377
|
-
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
378
|
-
// You can create one instance of it to use across an application.
|
|
379
|
-
const compassApiSDK = new CompassApiSDKCore({
|
|
380
|
-
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
381
|
-
});
|
|
382
|
-
|
|
383
|
-
async function run() {
|
|
384
|
-
const res = await universalBalance(compassApiSDK, {
|
|
385
|
-
chain: "arbitrum:mainnet",
|
|
386
|
-
token: "USDC",
|
|
387
|
-
});
|
|
388
|
-
|
|
389
|
-
if (!res.ok) {
|
|
390
|
-
throw res.error;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
const { value: result } = res;
|
|
394
|
-
|
|
395
|
-
// Handle the result
|
|
396
|
-
console.log(result);
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
run();
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
### Parameters
|
|
403
|
-
|
|
404
|
-
| Parameter | Type | Required | Description |
|
|
405
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
406
|
-
| `request` | [operations.GenericBalanceRequest](../../models/operations/genericbalancerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
407
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
408
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
409
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
410
|
-
|
|
411
|
-
### Response
|
|
412
|
-
|
|
413
|
-
**Promise\<[components.BalanceInfoResponse](../../models/components/balanceinforesponse.md)\>**
|
|
414
|
-
|
|
415
|
-
### Errors
|
|
416
|
-
|
|
417
|
-
| Error Type | Status Code | Content Type |
|
|
418
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
419
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
420
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
421
|
-
|
|
422
255
|
## allowance
|
|
423
256
|
|
|
424
257
|
In decentralized finance (DeFi) protocols such as Uniswap or AAVE, users must set
|
|
@@ -750,174 +583,6 @@ run();
|
|
|
750
583
|
| errors.HTTPValidationError | 422 | application/json |
|
|
751
584
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
752
585
|
|
|
753
|
-
## transferErc20
|
|
754
|
-
|
|
755
|
-
Sends ERC20 tokens from the sender's address to the specified recipient.
|
|
756
|
-
|
|
757
|
-
### Example Usage
|
|
758
|
-
|
|
759
|
-
```typescript
|
|
760
|
-
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
761
|
-
|
|
762
|
-
const compassApiSDK = new CompassApiSDK({
|
|
763
|
-
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
764
|
-
});
|
|
765
|
-
|
|
766
|
-
async function run() {
|
|
767
|
-
const result = await compassApiSDK.universal.transferErc20({
|
|
768
|
-
amount: 1.5,
|
|
769
|
-
token: "osETH",
|
|
770
|
-
to: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc44",
|
|
771
|
-
chain: "base:mainnet",
|
|
772
|
-
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
773
|
-
});
|
|
774
|
-
|
|
775
|
-
// Handle the result
|
|
776
|
-
console.log(result);
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
run();
|
|
780
|
-
```
|
|
781
|
-
|
|
782
|
-
### Standalone function
|
|
783
|
-
|
|
784
|
-
The standalone function version of this method:
|
|
785
|
-
|
|
786
|
-
```typescript
|
|
787
|
-
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
788
|
-
import { universalTransferErc20 } from "@compass-labs/api-sdk/funcs/universalTransferErc20.js";
|
|
789
|
-
|
|
790
|
-
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
791
|
-
// You can create one instance of it to use across an application.
|
|
792
|
-
const compassApiSDK = new CompassApiSDKCore({
|
|
793
|
-
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
794
|
-
});
|
|
795
|
-
|
|
796
|
-
async function run() {
|
|
797
|
-
const res = await universalTransferErc20(compassApiSDK, {
|
|
798
|
-
amount: 1.5,
|
|
799
|
-
token: "osETH",
|
|
800
|
-
to: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc44",
|
|
801
|
-
chain: "base:mainnet",
|
|
802
|
-
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
803
|
-
});
|
|
804
|
-
|
|
805
|
-
if (!res.ok) {
|
|
806
|
-
throw res.error;
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
const { value: result } = res;
|
|
810
|
-
|
|
811
|
-
// Handle the result
|
|
812
|
-
console.log(result);
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
run();
|
|
816
|
-
```
|
|
817
|
-
|
|
818
|
-
### Parameters
|
|
819
|
-
|
|
820
|
-
| Parameter | Type | Required | Description |
|
|
821
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
822
|
-
| `request` | [components.TransferErc20Request](../../models/components/transfererc20request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
823
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
824
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
825
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
826
|
-
|
|
827
|
-
### Response
|
|
828
|
-
|
|
829
|
-
**Promise\<[components.UnsignedTransaction](../../models/components/unsignedtransaction.md)\>**
|
|
830
|
-
|
|
831
|
-
### Errors
|
|
832
|
-
|
|
833
|
-
| Error Type | Status Code | Content Type |
|
|
834
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
835
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
836
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
837
|
-
|
|
838
|
-
## transferNativeToken
|
|
839
|
-
|
|
840
|
-
Sends native ETH from the sender's address to the specified recipient.
|
|
841
|
-
|
|
842
|
-
### Example Usage
|
|
843
|
-
|
|
844
|
-
```typescript
|
|
845
|
-
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
846
|
-
|
|
847
|
-
const compassApiSDK = new CompassApiSDK({
|
|
848
|
-
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
849
|
-
});
|
|
850
|
-
|
|
851
|
-
async function run() {
|
|
852
|
-
const result = await compassApiSDK.universal.transferNativeToken({
|
|
853
|
-
amount: 1.5,
|
|
854
|
-
to: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc44",
|
|
855
|
-
chain: "arbitrum:mainnet",
|
|
856
|
-
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
857
|
-
});
|
|
858
|
-
|
|
859
|
-
// Handle the result
|
|
860
|
-
console.log(result);
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
run();
|
|
864
|
-
```
|
|
865
|
-
|
|
866
|
-
### Standalone function
|
|
867
|
-
|
|
868
|
-
The standalone function version of this method:
|
|
869
|
-
|
|
870
|
-
```typescript
|
|
871
|
-
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
872
|
-
import { universalTransferNativeToken } from "@compass-labs/api-sdk/funcs/universalTransferNativeToken.js";
|
|
873
|
-
|
|
874
|
-
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
875
|
-
// You can create one instance of it to use across an application.
|
|
876
|
-
const compassApiSDK = new CompassApiSDKCore({
|
|
877
|
-
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
878
|
-
});
|
|
879
|
-
|
|
880
|
-
async function run() {
|
|
881
|
-
const res = await universalTransferNativeToken(compassApiSDK, {
|
|
882
|
-
amount: 1.5,
|
|
883
|
-
to: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc44",
|
|
884
|
-
chain: "arbitrum:mainnet",
|
|
885
|
-
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
886
|
-
});
|
|
887
|
-
|
|
888
|
-
if (!res.ok) {
|
|
889
|
-
throw res.error;
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
const { value: result } = res;
|
|
893
|
-
|
|
894
|
-
// Handle the result
|
|
895
|
-
console.log(result);
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
run();
|
|
899
|
-
```
|
|
900
|
-
|
|
901
|
-
### Parameters
|
|
902
|
-
|
|
903
|
-
| Parameter | Type | Required | Description |
|
|
904
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
905
|
-
| `request` | [components.TransferEthRequest](../../models/components/transferethrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
906
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
907
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
908
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
909
|
-
|
|
910
|
-
### Response
|
|
911
|
-
|
|
912
|
-
**Promise\<[components.UnsignedTransaction](../../models/components/unsignedtransaction.md)\>**
|
|
913
|
-
|
|
914
|
-
### Errors
|
|
915
|
-
|
|
916
|
-
| Error Type | Status Code | Content Type |
|
|
917
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
918
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
919
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
920
|
-
|
|
921
586
|
## allowanceSet
|
|
922
587
|
|
|
923
588
|
This endpoint allows users to modify the token allowance for a specific protocol.
|
package/jsr.json
CHANGED