@compass-labs/api-sdk 0.0.16 → 0.0.18
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 +2 -0
- package/bin/mcp-server.js +898 -447
- package/bin/mcp-server.js.map +29 -13
- package/dist/commonjs/funcs/aaveV3HistoricalTransactions.d.ts +23 -0
- package/dist/commonjs/funcs/aaveV3HistoricalTransactions.d.ts.map +1 -0
- package/dist/commonjs/funcs/aaveV3HistoricalTransactions.js +128 -0
- package/dist/commonjs/funcs/aaveV3HistoricalTransactions.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 +3 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/aaveV3HistoricalTransactions.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/aaveV3HistoricalTransactions.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/aaveV3HistoricalTransactions.js +69 -0
- package/dist/commonjs/mcp-server/tools/aaveV3HistoricalTransactions.js.map +1 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionbase.d.ts +57 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionbase.d.ts.map +1 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionbase.js +97 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionbase.js.map +1 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.d.ts +39 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.js +76 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.js.map +1 -0
- package/dist/commonjs/models/components/action.d.ts +43 -0
- package/dist/commonjs/models/components/action.d.ts.map +1 -0
- package/dist/commonjs/models/components/action.js +66 -0
- package/dist/commonjs/models/components/action.js.map +1 -0
- package/dist/commonjs/models/components/borrow.d.ts +42 -0
- package/dist/commonjs/models/components/borrow.d.ts.map +1 -0
- package/dist/commonjs/models/components/borrow.js +83 -0
- package/dist/commonjs/models/components/borrow.js.map +1 -0
- package/dist/commonjs/models/components/collateralreserve.d.ts +31 -0
- package/dist/commonjs/models/components/collateralreserve.d.ts.map +1 -0
- package/dist/commonjs/models/components/collateralreserve.js +71 -0
- package/dist/commonjs/models/components/collateralreserve.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +13 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +13 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/liquidationcall.d.ts +41 -0
- package/dist/commonjs/models/components/liquidationcall.d.ts.map +1 -0
- package/dist/commonjs/models/components/liquidationcall.js +81 -0
- package/dist/commonjs/models/components/liquidationcall.js.map +1 -0
- package/dist/commonjs/models/components/multicallauthorizationrequest.d.ts +2 -0
- package/dist/commonjs/models/components/multicallauthorizationrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/multicallauthorizationrequest.js.map +1 -1
- package/dist/commonjs/models/components/principalreserve.d.ts +31 -0
- package/dist/commonjs/models/components/principalreserve.d.ts.map +1 -0
- package/dist/commonjs/models/components/principalreserve.js +71 -0
- package/dist/commonjs/models/components/principalreserve.js.map +1 -0
- package/dist/commonjs/models/components/redeemunderlying.d.ts +34 -0
- package/dist/commonjs/models/components/redeemunderlying.d.ts.map +1 -0
- package/dist/commonjs/models/components/redeemunderlying.js +74 -0
- package/dist/commonjs/models/components/redeemunderlying.js.map +1 -0
- package/dist/commonjs/models/components/repay.d.ts +34 -0
- package/dist/commonjs/models/components/repay.d.ts.map +1 -0
- package/dist/commonjs/models/components/repay.js +75 -0
- package/dist/commonjs/models/components/repay.js.map +1 -0
- package/dist/commonjs/models/components/reserve.d.ts +31 -0
- package/dist/commonjs/models/components/reserve.d.ts.map +1 -0
- package/dist/commonjs/models/components/reserve.js +71 -0
- package/dist/commonjs/models/components/reserve.js.map +1 -0
- package/dist/commonjs/models/components/supply.d.ts +34 -0
- package/dist/commonjs/models/components/supply.d.ts.map +1 -0
- package/dist/commonjs/models/components/supply.js +75 -0
- package/dist/commonjs/models/components/supply.js.map +1 -0
- package/dist/commonjs/models/components/swapborrowrate.d.ts +38 -0
- package/dist/commonjs/models/components/swapborrowrate.d.ts.map +1 -0
- package/dist/commonjs/models/components/swapborrowrate.js +78 -0
- package/dist/commonjs/models/components/swapborrowrate.js.map +1 -0
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts +3 -27
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.js +5 -28
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.js.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.d.ts +3 -27
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.js +5 -28
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.js.map +1 -1
- package/dist/commonjs/models/components/uniswapsellexactlyparams.d.ts +18 -42
- package/dist/commonjs/models/components/uniswapsellexactlyparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapsellexactlyparams.js +22 -47
- package/dist/commonjs/models/components/uniswapsellexactlyparams.js.map +1 -1
- package/dist/commonjs/models/components/uniswapsellexactlyrequest.d.ts +18 -42
- package/dist/commonjs/models/components/uniswapsellexactlyrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapsellexactlyrequest.js +22 -47
- package/dist/commonjs/models/components/uniswapsellexactlyrequest.js.map +1 -1
- package/dist/commonjs/models/components/usageascollateral.d.ts +34 -0
- package/dist/commonjs/models/components/usageascollateral.d.ts.map +1 -0
- package/dist/commonjs/models/components/usageascollateral.js +74 -0
- package/dist/commonjs/models/components/usageascollateral.js.map +1 -0
- package/dist/commonjs/models/operations/aavehistoricaltransactions.d.ts +73 -0
- package/dist/commonjs/models/operations/aavehistoricaltransactions.d.ts.map +1 -0
- package/dist/commonjs/models/operations/aavehistoricaltransactions.js +107 -0
- package/dist/commonjs/models/operations/aavehistoricaltransactions.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/sdk/aavev3.d.ts +12 -0
- package/dist/commonjs/sdk/aavev3.d.ts.map +1 -1
- package/dist/commonjs/sdk/aavev3.js +15 -0
- package/dist/commonjs/sdk/aavev3.js.map +1 -1
- package/dist/esm/funcs/aaveV3HistoricalTransactions.d.ts +23 -0
- package/dist/esm/funcs/aaveV3HistoricalTransactions.d.ts.map +1 -0
- package/dist/esm/funcs/aaveV3HistoricalTransactions.js +92 -0
- package/dist/esm/funcs/aaveV3HistoricalTransactions.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 +3 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/aaveV3HistoricalTransactions.d.ts +8 -0
- package/dist/esm/mcp-server/tools/aaveV3HistoricalTransactions.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/aaveV3HistoricalTransactions.js +33 -0
- package/dist/esm/mcp-server/tools/aaveV3HistoricalTransactions.js.map +1 -0
- package/dist/esm/models/components/aavehistoricaltransactionbase.d.ts +57 -0
- package/dist/esm/models/components/aavehistoricaltransactionbase.d.ts.map +1 -0
- package/dist/esm/models/components/aavehistoricaltransactionbase.js +59 -0
- package/dist/esm/models/components/aavehistoricaltransactionbase.js.map +1 -0
- package/dist/esm/models/components/aavehistoricaltransactionsresponse.d.ts +39 -0
- package/dist/esm/models/components/aavehistoricaltransactionsresponse.d.ts.map +1 -0
- package/dist/esm/models/components/aavehistoricaltransactionsresponse.js +38 -0
- package/dist/esm/models/components/aavehistoricaltransactionsresponse.js.map +1 -0
- package/dist/esm/models/components/action.d.ts +43 -0
- package/dist/esm/models/components/action.d.ts.map +1 -0
- package/dist/esm/models/components/action.js +30 -0
- package/dist/esm/models/components/action.js.map +1 -0
- package/dist/esm/models/components/borrow.d.ts +42 -0
- package/dist/esm/models/components/borrow.d.ts.map +1 -0
- package/dist/esm/models/components/borrow.js +45 -0
- package/dist/esm/models/components/borrow.js.map +1 -0
- package/dist/esm/models/components/collateralreserve.d.ts +31 -0
- package/dist/esm/models/components/collateralreserve.d.ts.map +1 -0
- package/dist/esm/models/components/collateralreserve.js +33 -0
- package/dist/esm/models/components/collateralreserve.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +13 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +13 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/liquidationcall.d.ts +41 -0
- package/dist/esm/models/components/liquidationcall.d.ts.map +1 -0
- package/dist/esm/models/components/liquidationcall.js +43 -0
- package/dist/esm/models/components/liquidationcall.js.map +1 -0
- package/dist/esm/models/components/multicallauthorizationrequest.d.ts +2 -0
- package/dist/esm/models/components/multicallauthorizationrequest.d.ts.map +1 -1
- package/dist/esm/models/components/multicallauthorizationrequest.js.map +1 -1
- package/dist/esm/models/components/principalreserve.d.ts +31 -0
- package/dist/esm/models/components/principalreserve.d.ts.map +1 -0
- package/dist/esm/models/components/principalreserve.js +33 -0
- package/dist/esm/models/components/principalreserve.js.map +1 -0
- package/dist/esm/models/components/redeemunderlying.d.ts +34 -0
- package/dist/esm/models/components/redeemunderlying.d.ts.map +1 -0
- package/dist/esm/models/components/redeemunderlying.js +36 -0
- package/dist/esm/models/components/redeemunderlying.js.map +1 -0
- package/dist/esm/models/components/repay.d.ts +34 -0
- package/dist/esm/models/components/repay.d.ts.map +1 -0
- package/dist/esm/models/components/repay.js +37 -0
- package/dist/esm/models/components/repay.js.map +1 -0
- package/dist/esm/models/components/reserve.d.ts +31 -0
- package/dist/esm/models/components/reserve.d.ts.map +1 -0
- package/dist/esm/models/components/reserve.js +33 -0
- package/dist/esm/models/components/reserve.js.map +1 -0
- package/dist/esm/models/components/supply.d.ts +34 -0
- package/dist/esm/models/components/supply.d.ts.map +1 -0
- package/dist/esm/models/components/supply.js +37 -0
- package/dist/esm/models/components/supply.js.map +1 -0
- package/dist/esm/models/components/swapborrowrate.d.ts +38 -0
- package/dist/esm/models/components/swapborrowrate.d.ts.map +1 -0
- package/dist/esm/models/components/swapborrowrate.js +40 -0
- package/dist/esm/models/components/swapborrowrate.js.map +1 -0
- package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts +3 -27
- package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyparams.js +4 -25
- package/dist/esm/models/components/uniswapbuyexactlyparams.js.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyrequest.d.ts +3 -27
- package/dist/esm/models/components/uniswapbuyexactlyrequest.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyrequest.js +4 -25
- package/dist/esm/models/components/uniswapbuyexactlyrequest.js.map +1 -1
- package/dist/esm/models/components/uniswapsellexactlyparams.d.ts +18 -42
- package/dist/esm/models/components/uniswapsellexactlyparams.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapsellexactlyparams.js +19 -42
- package/dist/esm/models/components/uniswapsellexactlyparams.js.map +1 -1
- package/dist/esm/models/components/uniswapsellexactlyrequest.d.ts +18 -42
- package/dist/esm/models/components/uniswapsellexactlyrequest.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapsellexactlyrequest.js +19 -42
- package/dist/esm/models/components/uniswapsellexactlyrequest.js.map +1 -1
- package/dist/esm/models/components/usageascollateral.d.ts +34 -0
- package/dist/esm/models/components/usageascollateral.d.ts.map +1 -0
- package/dist/esm/models/components/usageascollateral.js +36 -0
- package/dist/esm/models/components/usageascollateral.js.map +1 -0
- package/dist/esm/models/operations/aavehistoricaltransactions.d.ts +73 -0
- package/dist/esm/models/operations/aavehistoricaltransactions.d.ts.map +1 -0
- package/dist/esm/models/operations/aavehistoricaltransactions.js +69 -0
- package/dist/esm/models/operations/aavehistoricaltransactions.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/sdk/aavev3.d.ts +12 -0
- package/dist/esm/sdk/aavev3.d.ts.map +1 -1
- package/dist/esm/sdk/aavev3.js +15 -0
- package/dist/esm/sdk/aavev3.js.map +1 -1
- package/docs/sdks/aavev3/README.md +85 -0
- package/docs/sdks/transactionbatching/README.md +2 -2
- package/docs/sdks/uniswapv3/README.md +6 -6
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/aaveV3HistoricalTransactions.ts +177 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/aaveV3HistoricalTransactions.ts +42 -0
- package/src/models/components/aavehistoricaltransactionbase.ts +155 -0
- package/src/models/components/aavehistoricaltransactionsresponse.ts +91 -0
- package/src/models/components/action.ts +36 -0
- package/src/models/components/borrow.ts +89 -0
- package/src/models/components/collateralreserve.ts +70 -0
- package/src/models/components/index.ts +13 -0
- package/src/models/components/liquidationcall.ts +96 -0
- package/src/models/components/multicallauthorizationrequest.ts +2 -0
- package/src/models/components/principalreserve.ts +70 -0
- package/src/models/components/redeemunderlying.ts +80 -0
- package/src/models/components/repay.ts +73 -0
- package/src/models/components/reserve.ts +63 -0
- package/src/models/components/supply.ts +73 -0
- package/src/models/components/swapborrowrate.ts +84 -0
- package/src/models/components/uniswapbuyexactlyparams.ts +7 -66
- package/src/models/components/uniswapbuyexactlyrequest.ts +7 -71
- package/src/models/components/uniswapsellexactlyparams.ts +33 -99
- package/src/models/components/uniswapsellexactlyrequest.ts +33 -103
- package/src/models/components/usageascollateral.ts +80 -0
- package/src/models/operations/aavehistoricaltransactions.ts +136 -0
- package/src/models/operations/index.ts +1 -0
- package/src/sdk/aavev3.ts +23 -0
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* [liquidityChange](#liquiditychange) - Liquidity index
|
|
10
10
|
* [userPositionSummary](#userpositionsummary) - Positions - total
|
|
11
11
|
* [userPositionPerToken](#userpositionpertoken) - Positions - per token
|
|
12
|
+
* [historicalTransactions](#historicaltransactions) - Historical transactions
|
|
12
13
|
* [supply](#supply) - Supply/Lend
|
|
13
14
|
* [borrow](#borrow) - Borrow
|
|
14
15
|
* [repay](#repay) - Repay loans
|
|
@@ -368,6 +369,90 @@ run();
|
|
|
368
369
|
| errors.HTTPValidationError | 422 | application/json |
|
|
369
370
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
370
371
|
|
|
372
|
+
## historicalTransactions
|
|
373
|
+
|
|
374
|
+
This endpoint retrieves historical transactions for a user on the AAVE platform.
|
|
375
|
+
|
|
376
|
+
It returns a list of transactions including deposits, withdrawals, borrows, and
|
|
377
|
+
repayments. Each transaction includes details such as the token, amount, timestamp,
|
|
378
|
+
and transaction type. This provides a comprehensive view of the user's historical
|
|
379
|
+
activity within the AAVE protocol.
|
|
380
|
+
|
|
381
|
+
### Example Usage
|
|
382
|
+
|
|
383
|
+
```typescript
|
|
384
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
385
|
+
|
|
386
|
+
const compassApiSDK = new CompassApiSDK({
|
|
387
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
async function run() {
|
|
391
|
+
const result = await compassApiSDK.aaveV3.historicalTransactions({
|
|
392
|
+
chain: "arbitrum:mainnet",
|
|
393
|
+
userAddress: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
// Handle the result
|
|
397
|
+
console.log(result);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
run();
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### Standalone function
|
|
404
|
+
|
|
405
|
+
The standalone function version of this method:
|
|
406
|
+
|
|
407
|
+
```typescript
|
|
408
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
409
|
+
import { aaveV3HistoricalTransactions } from "@compass-labs/api-sdk/funcs/aaveV3HistoricalTransactions.js";
|
|
410
|
+
|
|
411
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
412
|
+
// You can create one instance of it to use across an application.
|
|
413
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
414
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
415
|
+
});
|
|
416
|
+
|
|
417
|
+
async function run() {
|
|
418
|
+
const res = await aaveV3HistoricalTransactions(compassApiSDK, {
|
|
419
|
+
chain: "arbitrum:mainnet",
|
|
420
|
+
userAddress: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
if (!res.ok) {
|
|
424
|
+
throw res.error;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
const { value: result } = res;
|
|
428
|
+
|
|
429
|
+
// Handle the result
|
|
430
|
+
console.log(result);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
run();
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
### Parameters
|
|
437
|
+
|
|
438
|
+
| Parameter | Type | Required | Description |
|
|
439
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
440
|
+
| `request` | [operations.AaveHistoricalTransactionsRequest](../../models/operations/aavehistoricaltransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
441
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
442
|
+
| `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. |
|
|
443
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
444
|
+
|
|
445
|
+
### Response
|
|
446
|
+
|
|
447
|
+
**Promise\<[components.AaveHistoricalTransactionsResponse](../../models/components/aavehistoricaltransactionsresponse.md)\>**
|
|
448
|
+
|
|
449
|
+
### Errors
|
|
450
|
+
|
|
451
|
+
| Error Type | Status Code | Content Type |
|
|
452
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
453
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
454
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
455
|
+
|
|
371
456
|
## supply
|
|
372
457
|
|
|
373
458
|
By supplying assets, users can earn interest on their deposits.
|
|
@@ -130,7 +130,7 @@ async function run() {
|
|
|
130
130
|
tokenOut: "USDC",
|
|
131
131
|
fee: "0.01",
|
|
132
132
|
amountOut: 1.5,
|
|
133
|
-
|
|
133
|
+
maxSlippagePercent: 0.5,
|
|
134
134
|
wrapEth: true,
|
|
135
135
|
},
|
|
136
136
|
},
|
|
@@ -178,7 +178,7 @@ async function run() {
|
|
|
178
178
|
tokenOut: "USDC",
|
|
179
179
|
fee: "0.01",
|
|
180
180
|
amountOut: 1.5,
|
|
181
|
-
|
|
181
|
+
maxSlippagePercent: 0.5,
|
|
182
182
|
wrapEth: true,
|
|
183
183
|
},
|
|
184
184
|
},
|
|
@@ -473,7 +473,7 @@ async function run() {
|
|
|
473
473
|
tokenOut: "cbETH",
|
|
474
474
|
fee: "1.0",
|
|
475
475
|
amountOut: 1.5,
|
|
476
|
-
|
|
476
|
+
maxSlippagePercent: 0.5,
|
|
477
477
|
chain: "ethereum:mainnet",
|
|
478
478
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
479
479
|
});
|
|
@@ -505,7 +505,7 @@ async function run() {
|
|
|
505
505
|
tokenOut: "cbETH",
|
|
506
506
|
fee: "1.0",
|
|
507
507
|
amountOut: 1.5,
|
|
508
|
-
|
|
508
|
+
maxSlippagePercent: 0.5,
|
|
509
509
|
chain: "ethereum:mainnet",
|
|
510
510
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
511
511
|
});
|
|
@@ -567,8 +567,8 @@ async function run() {
|
|
|
567
567
|
tokenIn: "FXS",
|
|
568
568
|
tokenOut: "LUSD",
|
|
569
569
|
fee: "0.05",
|
|
570
|
-
|
|
571
|
-
|
|
570
|
+
amount: 1.5,
|
|
571
|
+
maxSlippagePercent: 0.5,
|
|
572
572
|
chain: "arbitrum:mainnet",
|
|
573
573
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
574
574
|
});
|
|
@@ -599,8 +599,8 @@ async function run() {
|
|
|
599
599
|
tokenIn: "FXS",
|
|
600
600
|
tokenOut: "LUSD",
|
|
601
601
|
fee: "0.05",
|
|
602
|
-
|
|
603
|
-
|
|
602
|
+
amount: 1.5,
|
|
603
|
+
maxSlippagePercent: 0.5,
|
|
604
604
|
chain: "arbitrum:mainnet",
|
|
605
605
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
606
606
|
});
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { CompassApiSDKCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
14
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Historical transactions
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* This endpoint retrieves historical transactions for a user on the AAVE platform.
|
|
33
|
+
*
|
|
34
|
+
* It returns a list of transactions including deposits, withdrawals, borrows, and
|
|
35
|
+
* repayments. Each transaction includes details such as the token, amount, timestamp,
|
|
36
|
+
* and transaction type. This provides a comprehensive view of the user's historical
|
|
37
|
+
* activity within the AAVE protocol.
|
|
38
|
+
*/
|
|
39
|
+
export function aaveV3HistoricalTransactions(
|
|
40
|
+
client: CompassApiSDKCore,
|
|
41
|
+
request: operations.AaveHistoricalTransactionsRequest,
|
|
42
|
+
options?: RequestOptions,
|
|
43
|
+
): APIPromise<
|
|
44
|
+
Result<
|
|
45
|
+
components.AaveHistoricalTransactionsResponse,
|
|
46
|
+
| errors.HTTPValidationError
|
|
47
|
+
| APIError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
| UnexpectedClientError
|
|
50
|
+
| InvalidRequestError
|
|
51
|
+
| RequestAbortedError
|
|
52
|
+
| RequestTimeoutError
|
|
53
|
+
| ConnectionError
|
|
54
|
+
>
|
|
55
|
+
> {
|
|
56
|
+
return new APIPromise($do(
|
|
57
|
+
client,
|
|
58
|
+
request,
|
|
59
|
+
options,
|
|
60
|
+
));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function $do(
|
|
64
|
+
client: CompassApiSDKCore,
|
|
65
|
+
request: operations.AaveHistoricalTransactionsRequest,
|
|
66
|
+
options?: RequestOptions,
|
|
67
|
+
): Promise<
|
|
68
|
+
[
|
|
69
|
+
Result<
|
|
70
|
+
components.AaveHistoricalTransactionsResponse,
|
|
71
|
+
| errors.HTTPValidationError
|
|
72
|
+
| APIError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| InvalidRequestError
|
|
76
|
+
| RequestAbortedError
|
|
77
|
+
| RequestTimeoutError
|
|
78
|
+
| ConnectionError
|
|
79
|
+
>,
|
|
80
|
+
APICall,
|
|
81
|
+
]
|
|
82
|
+
> {
|
|
83
|
+
const parsed = safeParse(
|
|
84
|
+
request,
|
|
85
|
+
(value) =>
|
|
86
|
+
operations.AaveHistoricalTransactionsRequest$outboundSchema.parse(value),
|
|
87
|
+
"Input validation failed",
|
|
88
|
+
);
|
|
89
|
+
if (!parsed.ok) {
|
|
90
|
+
return [parsed, { status: "invalid" }];
|
|
91
|
+
}
|
|
92
|
+
const payload = parsed.value;
|
|
93
|
+
const body = null;
|
|
94
|
+
|
|
95
|
+
const path = pathToFunc("/v0/aave/historical_transactions/get")();
|
|
96
|
+
|
|
97
|
+
const query = encodeFormQuery({
|
|
98
|
+
"chain": payload.chain,
|
|
99
|
+
"limit": payload.limit,
|
|
100
|
+
"offset": payload.offset,
|
|
101
|
+
"user_address": payload.user_address,
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
const headers = new Headers(compactMap({
|
|
105
|
+
Accept: "application/json",
|
|
106
|
+
}));
|
|
107
|
+
|
|
108
|
+
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
109
|
+
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
110
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
111
|
+
|
|
112
|
+
const context = {
|
|
113
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
114
|
+
operationID: "aave_historical_transactions",
|
|
115
|
+
oAuth2Scopes: [],
|
|
116
|
+
|
|
117
|
+
resolvedSecurity: requestSecurity,
|
|
118
|
+
|
|
119
|
+
securitySource: client._options.apiKeyAuth,
|
|
120
|
+
retryConfig: options?.retries
|
|
121
|
+
|| client._options.retryConfig
|
|
122
|
+
|| { strategy: "none" },
|
|
123
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const requestRes = client._createRequest(context, {
|
|
127
|
+
security: requestSecurity,
|
|
128
|
+
method: "GET",
|
|
129
|
+
baseURL: options?.serverURL,
|
|
130
|
+
path: path,
|
|
131
|
+
headers: headers,
|
|
132
|
+
query: query,
|
|
133
|
+
body: body,
|
|
134
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
135
|
+
}, options);
|
|
136
|
+
if (!requestRes.ok) {
|
|
137
|
+
return [requestRes, { status: "invalid" }];
|
|
138
|
+
}
|
|
139
|
+
const req = requestRes.value;
|
|
140
|
+
|
|
141
|
+
const doResult = await client._do(req, {
|
|
142
|
+
context,
|
|
143
|
+
errorCodes: ["422", "4XX", "5XX"],
|
|
144
|
+
retryConfig: context.retryConfig,
|
|
145
|
+
retryCodes: context.retryCodes,
|
|
146
|
+
});
|
|
147
|
+
if (!doResult.ok) {
|
|
148
|
+
return [doResult, { status: "request-error", request: req }];
|
|
149
|
+
}
|
|
150
|
+
const response = doResult.value;
|
|
151
|
+
|
|
152
|
+
const responseFields = {
|
|
153
|
+
HttpMeta: { Response: response, Request: req },
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
const [result] = await M.match<
|
|
157
|
+
components.AaveHistoricalTransactionsResponse,
|
|
158
|
+
| errors.HTTPValidationError
|
|
159
|
+
| APIError
|
|
160
|
+
| SDKValidationError
|
|
161
|
+
| UnexpectedClientError
|
|
162
|
+
| InvalidRequestError
|
|
163
|
+
| RequestAbortedError
|
|
164
|
+
| RequestTimeoutError
|
|
165
|
+
| ConnectionError
|
|
166
|
+
>(
|
|
167
|
+
M.json(200, components.AaveHistoricalTransactionsResponse$inboundSchema),
|
|
168
|
+
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
169
|
+
M.fail("4XX"),
|
|
170
|
+
M.fail("5XX"),
|
|
171
|
+
)(response, { extraFields: responseFields });
|
|
172
|
+
if (!result.ok) {
|
|
173
|
+
return [result, { status: "complete", request: req, response }];
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return [result, { status: "complete", request: req, response }];
|
|
177
|
+
}
|
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.18",
|
|
61
61
|
genVersion: "2.597.9",
|
|
62
62
|
userAgent:
|
|
63
|
-
"speakeasy-sdk/typescript 0.0.
|
|
63
|
+
"speakeasy-sdk/typescript 0.0.18 2.597.9 0.0.1 @compass-labs/api-sdk",
|
|
64
64
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
import { MCPScope } from "./scopes.js";
|
|
15
15
|
import { createRegisterTool } from "./tools.js";
|
|
16
16
|
import { tool$aaveV3Borrow } from "./tools/aaveV3Borrow.js";
|
|
17
|
+
import { tool$aaveV3HistoricalTransactions } from "./tools/aaveV3HistoricalTransactions.js";
|
|
17
18
|
import { tool$aaveV3LiquidityChange } from "./tools/aaveV3LiquidityChange.js";
|
|
18
19
|
import { tool$aaveV3Repay } from "./tools/aaveV3Repay.js";
|
|
19
20
|
import { tool$aaveV3Supply } from "./tools/aaveV3Supply.js";
|
|
@@ -79,7 +80,7 @@ export function createMCPServer(deps: {
|
|
|
79
80
|
}) {
|
|
80
81
|
const server = new McpServer({
|
|
81
82
|
name: "CompassApiSDK",
|
|
82
|
-
version: "0.0.
|
|
83
|
+
version: "0.0.18",
|
|
83
84
|
});
|
|
84
85
|
|
|
85
86
|
const client = new CompassApiSDKCore({
|
|
@@ -113,6 +114,7 @@ export function createMCPServer(deps: {
|
|
|
113
114
|
tool(tool$aaveV3LiquidityChange);
|
|
114
115
|
tool(tool$aaveV3UserPositionSummary);
|
|
115
116
|
tool(tool$aaveV3UserPositionPerToken);
|
|
117
|
+
tool(tool$aaveV3HistoricalTransactions);
|
|
116
118
|
tool(tool$aaveV3Supply);
|
|
117
119
|
tool(tool$aaveV3Borrow);
|
|
118
120
|
tool(tool$aaveV3Repay);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { aaveV3HistoricalTransactions } from "../../funcs/aaveV3HistoricalTransactions.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.AaveHistoricalTransactionsRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$aaveV3HistoricalTransactions: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "aave-v3-historical-transactions",
|
|
15
|
+
description: `Historical transactions
|
|
16
|
+
|
|
17
|
+
This endpoint retrieves historical transactions for a user on the AAVE platform.
|
|
18
|
+
|
|
19
|
+
It returns a list of transactions including deposits, withdrawals, borrows, and
|
|
20
|
+
repayments. Each transaction includes details such as the token, amount, timestamp,
|
|
21
|
+
and transaction type. This provides a comprehensive view of the user's historical
|
|
22
|
+
activity within the AAVE protocol.`,
|
|
23
|
+
args,
|
|
24
|
+
tool: async (client, args, ctx) => {
|
|
25
|
+
const [result, apiCall] = await aaveV3HistoricalTransactions(
|
|
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,155 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
Action,
|
|
11
|
+
Action$inboundSchema,
|
|
12
|
+
Action$outboundSchema,
|
|
13
|
+
} from "./action.js";
|
|
14
|
+
import {
|
|
15
|
+
Borrow,
|
|
16
|
+
Borrow$inboundSchema,
|
|
17
|
+
Borrow$Outbound,
|
|
18
|
+
Borrow$outboundSchema,
|
|
19
|
+
} from "./borrow.js";
|
|
20
|
+
import {
|
|
21
|
+
LiquidationCall,
|
|
22
|
+
LiquidationCall$inboundSchema,
|
|
23
|
+
LiquidationCall$Outbound,
|
|
24
|
+
LiquidationCall$outboundSchema,
|
|
25
|
+
} from "./liquidationcall.js";
|
|
26
|
+
import {
|
|
27
|
+
RedeemUnderlying,
|
|
28
|
+
RedeemUnderlying$inboundSchema,
|
|
29
|
+
RedeemUnderlying$Outbound,
|
|
30
|
+
RedeemUnderlying$outboundSchema,
|
|
31
|
+
} from "./redeemunderlying.js";
|
|
32
|
+
import {
|
|
33
|
+
Repay,
|
|
34
|
+
Repay$inboundSchema,
|
|
35
|
+
Repay$Outbound,
|
|
36
|
+
Repay$outboundSchema,
|
|
37
|
+
} from "./repay.js";
|
|
38
|
+
import {
|
|
39
|
+
Supply,
|
|
40
|
+
Supply$inboundSchema,
|
|
41
|
+
Supply$Outbound,
|
|
42
|
+
Supply$outboundSchema,
|
|
43
|
+
} from "./supply.js";
|
|
44
|
+
import {
|
|
45
|
+
SwapBorrowRate,
|
|
46
|
+
SwapBorrowRate$inboundSchema,
|
|
47
|
+
SwapBorrowRate$Outbound,
|
|
48
|
+
SwapBorrowRate$outboundSchema,
|
|
49
|
+
} from "./swapborrowrate.js";
|
|
50
|
+
import {
|
|
51
|
+
UsageAsCollateral,
|
|
52
|
+
UsageAsCollateral$inboundSchema,
|
|
53
|
+
UsageAsCollateral$Outbound,
|
|
54
|
+
UsageAsCollateral$outboundSchema,
|
|
55
|
+
} from "./usageascollateral.js";
|
|
56
|
+
|
|
57
|
+
export type AaveHistoricalTransactionBase = {
|
|
58
|
+
id: string;
|
|
59
|
+
timestamp: number;
|
|
60
|
+
txHash: string;
|
|
61
|
+
action: Action;
|
|
62
|
+
supply?: Supply | null | undefined;
|
|
63
|
+
redeemUnderlying?: RedeemUnderlying | null | undefined;
|
|
64
|
+
borrow?: Borrow | null | undefined;
|
|
65
|
+
usageAsCollateral?: UsageAsCollateral | null | undefined;
|
|
66
|
+
repay?: Repay | null | undefined;
|
|
67
|
+
swapBorrowRate?: SwapBorrowRate | null | undefined;
|
|
68
|
+
liquidationCall?: LiquidationCall | null | undefined;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const AaveHistoricalTransactionBase$inboundSchema: z.ZodType<
|
|
73
|
+
AaveHistoricalTransactionBase,
|
|
74
|
+
z.ZodTypeDef,
|
|
75
|
+
unknown
|
|
76
|
+
> = z.object({
|
|
77
|
+
id: z.string(),
|
|
78
|
+
timestamp: z.number().int(),
|
|
79
|
+
txHash: z.string(),
|
|
80
|
+
action: Action$inboundSchema,
|
|
81
|
+
supply: z.nullable(Supply$inboundSchema).optional(),
|
|
82
|
+
redeemUnderlying: z.nullable(RedeemUnderlying$inboundSchema).optional(),
|
|
83
|
+
borrow: z.nullable(Borrow$inboundSchema).optional(),
|
|
84
|
+
usageAsCollateral: z.nullable(UsageAsCollateral$inboundSchema).optional(),
|
|
85
|
+
repay: z.nullable(Repay$inboundSchema).optional(),
|
|
86
|
+
swapBorrowRate: z.nullable(SwapBorrowRate$inboundSchema).optional(),
|
|
87
|
+
liquidationCall: z.nullable(LiquidationCall$inboundSchema).optional(),
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
export type AaveHistoricalTransactionBase$Outbound = {
|
|
92
|
+
id: string;
|
|
93
|
+
timestamp: number;
|
|
94
|
+
txHash: string;
|
|
95
|
+
action: string;
|
|
96
|
+
supply?: Supply$Outbound | null | undefined;
|
|
97
|
+
redeemUnderlying?: RedeemUnderlying$Outbound | null | undefined;
|
|
98
|
+
borrow?: Borrow$Outbound | null | undefined;
|
|
99
|
+
usageAsCollateral?: UsageAsCollateral$Outbound | null | undefined;
|
|
100
|
+
repay?: Repay$Outbound | null | undefined;
|
|
101
|
+
swapBorrowRate?: SwapBorrowRate$Outbound | null | undefined;
|
|
102
|
+
liquidationCall?: LiquidationCall$Outbound | null | undefined;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/** @internal */
|
|
106
|
+
export const AaveHistoricalTransactionBase$outboundSchema: z.ZodType<
|
|
107
|
+
AaveHistoricalTransactionBase$Outbound,
|
|
108
|
+
z.ZodTypeDef,
|
|
109
|
+
AaveHistoricalTransactionBase
|
|
110
|
+
> = z.object({
|
|
111
|
+
id: z.string(),
|
|
112
|
+
timestamp: z.number().int(),
|
|
113
|
+
txHash: z.string(),
|
|
114
|
+
action: Action$outboundSchema,
|
|
115
|
+
supply: z.nullable(Supply$outboundSchema).optional(),
|
|
116
|
+
redeemUnderlying: z.nullable(RedeemUnderlying$outboundSchema).optional(),
|
|
117
|
+
borrow: z.nullable(Borrow$outboundSchema).optional(),
|
|
118
|
+
usageAsCollateral: z.nullable(UsageAsCollateral$outboundSchema).optional(),
|
|
119
|
+
repay: z.nullable(Repay$outboundSchema).optional(),
|
|
120
|
+
swapBorrowRate: z.nullable(SwapBorrowRate$outboundSchema).optional(),
|
|
121
|
+
liquidationCall: z.nullable(LiquidationCall$outboundSchema).optional(),
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @internal
|
|
126
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
127
|
+
*/
|
|
128
|
+
export namespace AaveHistoricalTransactionBase$ {
|
|
129
|
+
/** @deprecated use `AaveHistoricalTransactionBase$inboundSchema` instead. */
|
|
130
|
+
export const inboundSchema = AaveHistoricalTransactionBase$inboundSchema;
|
|
131
|
+
/** @deprecated use `AaveHistoricalTransactionBase$outboundSchema` instead. */
|
|
132
|
+
export const outboundSchema = AaveHistoricalTransactionBase$outboundSchema;
|
|
133
|
+
/** @deprecated use `AaveHistoricalTransactionBase$Outbound` instead. */
|
|
134
|
+
export type Outbound = AaveHistoricalTransactionBase$Outbound;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function aaveHistoricalTransactionBaseToJSON(
|
|
138
|
+
aaveHistoricalTransactionBase: AaveHistoricalTransactionBase,
|
|
139
|
+
): string {
|
|
140
|
+
return JSON.stringify(
|
|
141
|
+
AaveHistoricalTransactionBase$outboundSchema.parse(
|
|
142
|
+
aaveHistoricalTransactionBase,
|
|
143
|
+
),
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function aaveHistoricalTransactionBaseFromJSON(
|
|
148
|
+
jsonString: string,
|
|
149
|
+
): SafeParseResult<AaveHistoricalTransactionBase, SDKValidationError> {
|
|
150
|
+
return safeParse(
|
|
151
|
+
jsonString,
|
|
152
|
+
(x) => AaveHistoricalTransactionBase$inboundSchema.parse(JSON.parse(x)),
|
|
153
|
+
`Failed to parse 'AaveHistoricalTransactionBase' from JSON`,
|
|
154
|
+
);
|
|
155
|
+
}
|