@compass-labs/api-sdk 0.5.6 → 0.5.8
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/FUNCTIONS.md +6 -26
- package/README.md +47 -78
- package/bin/mcp-server.js +19 -18
- package/bin/mcp-server.js.map +12 -12
- package/dist/commonjs/funcs/transactionBatchingAaveLoop.d.ts +1 -1
- package/dist/commonjs/funcs/transactionBatchingAaveLoop.js +1 -1
- package/dist/commonjs/funcs/transactionBatchingAuthorization.d.ts +6 -6
- package/dist/commonjs/funcs/transactionBatchingAuthorization.js +6 -6
- package/dist/commonjs/funcs/transactionBatchingExecute.d.ts +3 -2
- package/dist/commonjs/funcs/transactionBatchingExecute.d.ts.map +1 -1
- package/dist/commonjs/funcs/transactionBatchingExecute.js +3 -2
- package/dist/commonjs/funcs/transactionBatchingExecute.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/mcp-server/tools/transactionBatchingAaveLoop.js +1 -1
- package/dist/commonjs/mcp-server/tools/transactionBatchingAuthorization.js +6 -6
- package/dist/commonjs/mcp-server/tools/transactionBatchingAuthorization.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.js +3 -2
- package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.js.map +1 -1
- package/dist/commonjs/models/errors/apierror.d.ts +14 -2
- package/dist/commonjs/models/errors/apierror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/apierror.js +1 -1
- package/dist/commonjs/models/errors/apierror.js.map +1 -1
- package/dist/commonjs/sdk/transactionbatching.d.ts +10 -9
- package/dist/commonjs/sdk/transactionbatching.d.ts.map +1 -1
- package/dist/commonjs/sdk/transactionbatching.js +10 -9
- package/dist/commonjs/sdk/transactionbatching.js.map +1 -1
- package/dist/esm/funcs/transactionBatchingAaveLoop.d.ts +1 -1
- package/dist/esm/funcs/transactionBatchingAaveLoop.js +1 -1
- package/dist/esm/funcs/transactionBatchingAuthorization.d.ts +6 -6
- package/dist/esm/funcs/transactionBatchingAuthorization.js +6 -6
- package/dist/esm/funcs/transactionBatchingExecute.d.ts +3 -2
- package/dist/esm/funcs/transactionBatchingExecute.d.ts.map +1 -1
- package/dist/esm/funcs/transactionBatchingExecute.js +3 -2
- package/dist/esm/funcs/transactionBatchingExecute.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.js +1 -1
- package/dist/esm/mcp-server/tools/transactionBatchingAuthorization.js +6 -6
- package/dist/esm/mcp-server/tools/transactionBatchingAuthorization.js.map +1 -1
- package/dist/esm/mcp-server/tools/transactionBatchingExecute.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/transactionBatchingExecute.js +3 -2
- package/dist/esm/mcp-server/tools/transactionBatchingExecute.js.map +1 -1
- package/dist/esm/models/errors/apierror.d.ts +14 -2
- package/dist/esm/models/errors/apierror.d.ts.map +1 -1
- package/dist/esm/models/errors/apierror.js +1 -1
- package/dist/esm/models/errors/apierror.js.map +1 -1
- package/dist/esm/sdk/transactionbatching.d.ts +10 -9
- package/dist/esm/sdk/transactionbatching.d.ts.map +1 -1
- package/dist/esm/sdk/transactionbatching.js +10 -9
- package/dist/esm/sdk/transactionbatching.js.map +1 -1
- package/docs/sdks/aavev3/README.md +83 -199
- package/docs/sdks/aerodromeslipstream/README.md +39 -79
- package/docs/sdks/morpho/README.md +84 -182
- package/docs/sdks/pendle/README.md +53 -113
- package/docs/sdks/sky/README.md +27 -51
- package/docs/sdks/smartaccount/README.md +5 -9
- package/docs/sdks/token/README.md +24 -56
- package/docs/sdks/transactionbatching/README.md +25 -36
- package/docs/sdks/uniswapv3/README.md +60 -132
- package/docs/sdks/universal/README.md +50 -106
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/transactionBatchingAaveLoop.ts +1 -1
- package/src/funcs/transactionBatchingAuthorization.ts +6 -6
- package/src/funcs/transactionBatchingExecute.ts +3 -2
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/transactionBatchingAaveLoop.ts +1 -1
- package/src/mcp-server/tools/transactionBatchingAuthorization.ts +6 -6
- package/src/mcp-server/tools/transactionBatchingExecute.ts +3 -2
- package/src/models/errors/apierror.ts +18 -3
- package/src/sdk/transactionbatching.ts +10 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactionBatchingExecute.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/transactionBatchingExecute.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAE3D,QAAA,MAAM,IAAI;;CAET,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,cAAc,CAAC,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"transactionBatchingExecute.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/transactionBatchingExecute.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAE3D,QAAA,MAAM,IAAI;;CAET,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,cAAc,CAAC,OAAO,IAAI,CA8BvE,CAAC"}
|
|
@@ -9,9 +9,10 @@ const args = {
|
|
|
9
9
|
};
|
|
10
10
|
export const tool$transactionBatchingExecute = {
|
|
11
11
|
name: "transaction-batching-execute",
|
|
12
|
-
description: `
|
|
12
|
+
description: `Construct Bundled Transaction
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Bundle arbitrary transactions together into a single multicall transaction using
|
|
15
|
+
EIP-7702.
|
|
15
16
|
|
|
16
17
|
This endpoint allows bundling multiple contract calls into a single atomic
|
|
17
18
|
transaction, reducing gas costs and ensuring all operations succeed or fail
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactionBatchingExecute.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/transactionBatchingExecute.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAC;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,qCAAqC;CAC1D,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAgC;IAC1E,IAAI,EAAE,8BAA8B;IACpC,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"transactionBatchingExecute.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/transactionBatchingExecute.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAC;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,qCAAqC;CAC1D,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAgC;IAC1E,IAAI,EAAE,8BAA8B;IACpC,WAAW,EAAE;;;;;;;;wBAQS;IACtB,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,0BAA0B,CACxD,MAAM,EACN,IAAI,CAAC,OAAO,EACZ,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CACzC,CAAC,QAAQ,EAAE,CAAC;QAEb,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;gBACvD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAE3B,OAAO,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF,CAAC"}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
export declare class APIError extends Error {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* HTTP status code
|
|
4
|
+
*/
|
|
4
5
|
readonly statusCode: number;
|
|
6
|
+
/**
|
|
7
|
+
* HTTP content type
|
|
8
|
+
*/
|
|
5
9
|
readonly contentType: string;
|
|
10
|
+
/**
|
|
11
|
+
* HTTP body
|
|
12
|
+
*/
|
|
13
|
+
readonly body: string;
|
|
14
|
+
/**
|
|
15
|
+
* Raw response
|
|
16
|
+
*/
|
|
17
|
+
readonly rawResponse: Response;
|
|
6
18
|
constructor(message: string, rawResponse: Response, body?: string);
|
|
7
19
|
}
|
|
8
20
|
//# sourceMappingURL=apierror.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apierror.d.ts","sourceRoot":"","sources":["../../../../src/models/errors/apierror.ts"],"names":[],"mappings":"AAIA,qBAAa,QAAS,SAAQ,KAAK;
|
|
1
|
+
{"version":3,"file":"apierror.d.ts","sourceRoot":"","sources":["../../../../src/models/errors/apierror.ts"],"names":[],"mappings":"AAIA,qBAAa,QAAS,SAAQ,KAAK;IACjC;;OAEG;IACH,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC;;OAEG;IACH,SAAgB,WAAW,EAAE,MAAM,CAAC;IACpC;;OAEG;IACH,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,SAAgB,WAAW,EAAE,QAAQ,CAAC;gBAGpC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,QAAQ,EACrB,IAAI,GAAE,MAAW;CAgBpB"}
|
|
@@ -7,8 +7,8 @@ export class APIError extends Error {
|
|
|
7
7
|
const contentType = rawResponse.headers.get("content-type") || "";
|
|
8
8
|
const bodyString = body.length > 0 ? `\n${body}` : "";
|
|
9
9
|
super(`${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`);
|
|
10
|
-
this.rawResponse = rawResponse;
|
|
11
10
|
this.body = body;
|
|
11
|
+
this.rawResponse = rawResponse;
|
|
12
12
|
this.statusCode = statusCode;
|
|
13
13
|
this.contentType = contentType;
|
|
14
14
|
this.name = "APIError";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apierror.js","sourceRoot":"","sources":["../../../../src/models/errors/apierror.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,OAAO,QAAS,SAAQ,KAAK;
|
|
1
|
+
{"version":3,"file":"apierror.js","sourceRoot":"","sources":["../../../../src/models/errors/apierror.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,OAAO,QAAS,SAAQ,KAAK;IAkBjC,YACE,OAAe,EACf,WAAqB,EACrB,OAAe,EAAE;QAEjB,MAAM,UAAU,GAAG,WAAW,CAAC,MAAM,CAAC;QACtC,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;QAClE,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACtD,KAAK,CACH,GAAG,OAAO,YAAY,UAAU,iBAAiB,WAAW,SAAS,UAAU,EAAE,CAClF,CAAC;QAEF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;CACF"}
|
|
@@ -2,22 +2,23 @@ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
|
2
2
|
import * as components from "../models/components/index.js";
|
|
3
3
|
export declare class TransactionBatching extends ClientSDK {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Enable transaction bundling.
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
* Get authorization
|
|
8
|
+
* Get authorization for bundling transactions.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
* ordering when batching multiple actions into a single
|
|
12
|
-
* includes a nonce and chain ID to guarantee
|
|
13
|
-
* targeting.
|
|
10
|
+
* Currently this is required for every transaction bundle to prevent replay attacks
|
|
11
|
+
* and ensure transaction ordering when batching multiple actions into a single
|
|
12
|
+
* transaction. The authorization includes a nonce and chain ID to guarantee
|
|
13
|
+
* transaction uniqueness and proper network targeting.
|
|
14
14
|
*/
|
|
15
15
|
authorization(request: components.MulticallAuthorizationRequest, options?: RequestOptions): Promise<components.MulticallAuthorizationResponse>;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Construct Bundled Transaction
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
*
|
|
20
|
+
* Bundle arbitrary transactions together into a single multicall transaction using
|
|
21
|
+
* EIP-7702.
|
|
21
22
|
*
|
|
22
23
|
* This endpoint allows bundling multiple contract calls into a single atomic
|
|
23
24
|
* transaction, reducing gas costs and ensuring all operations succeed or fail
|
|
@@ -26,7 +27,7 @@ export declare class TransactionBatching extends ClientSDK {
|
|
|
26
27
|
*/
|
|
27
28
|
execute(request: components.MulticallExecuteRequest, options?: RequestOptions): Promise<components.UnsignedMulticallTransaction>;
|
|
28
29
|
/**
|
|
29
|
-
*
|
|
30
|
+
* AAVE leverage long/short
|
|
30
31
|
*
|
|
31
32
|
* @remarks
|
|
32
33
|
* Execute an Aave looping strategy that involves repeated supply and borrow
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactionbatching.d.ts","sourceRoot":"","sources":["../../../src/sdk/transactionbatching.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,mBAAoB,SAAQ,SAAS;IAChD;;;;;;;;;;OAUG;IACG,aAAa,CACjB,OAAO,EAAE,UAAU,CAAC,6BAA6B,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,8BAA8B,CAAC;IAQrD
|
|
1
|
+
{"version":3,"file":"transactionbatching.d.ts","sourceRoot":"","sources":["../../../src/sdk/transactionbatching.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,mBAAoB,SAAQ,SAAS;IAChD;;;;;;;;;;OAUG;IACG,aAAa,CACjB,OAAO,EAAE,UAAU,CAAC,6BAA6B,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,8BAA8B,CAAC;IAQrD;;;;;;;;;;;OAWG;IACG,OAAO,CACX,OAAO,EAAE,UAAU,CAAC,uBAAuB,EAC3C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,4BAA4B,CAAC;IAQnD;;;;;;;;;;;;;;;OAeG;IACG,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,eAAe,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,4BAA4B,CAAC;CAOpD"}
|
|
@@ -8,24 +8,25 @@ import { ClientSDK } from "../lib/sdks.js";
|
|
|
8
8
|
import { unwrapAsync } from "../types/fp.js";
|
|
9
9
|
export class TransactionBatching extends ClientSDK {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Enable transaction bundling.
|
|
12
12
|
*
|
|
13
13
|
* @remarks
|
|
14
|
-
* Get authorization
|
|
14
|
+
* Get authorization for bundling transactions.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
17
|
-
* ordering when batching multiple actions into a single
|
|
18
|
-
* includes a nonce and chain ID to guarantee
|
|
19
|
-
* targeting.
|
|
16
|
+
* Currently this is required for every transaction bundle to prevent replay attacks
|
|
17
|
+
* and ensure transaction ordering when batching multiple actions into a single
|
|
18
|
+
* transaction. The authorization includes a nonce and chain ID to guarantee
|
|
19
|
+
* transaction uniqueness and proper network targeting.
|
|
20
20
|
*/
|
|
21
21
|
async authorization(request, options) {
|
|
22
22
|
return unwrapAsync(transactionBatchingAuthorization(this, request, options));
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Construct Bundled Transaction
|
|
26
26
|
*
|
|
27
27
|
* @remarks
|
|
28
|
-
*
|
|
28
|
+
* Bundle arbitrary transactions together into a single multicall transaction using
|
|
29
|
+
* EIP-7702.
|
|
29
30
|
*
|
|
30
31
|
* This endpoint allows bundling multiple contract calls into a single atomic
|
|
31
32
|
* transaction, reducing gas costs and ensuring all operations succeed or fail
|
|
@@ -36,7 +37,7 @@ export class TransactionBatching extends ClientSDK {
|
|
|
36
37
|
return unwrapAsync(transactionBatchingExecute(this, request, options));
|
|
37
38
|
}
|
|
38
39
|
/**
|
|
39
|
-
*
|
|
40
|
+
* AAVE leverage long/short
|
|
40
41
|
*
|
|
41
42
|
* @remarks
|
|
42
43
|
* Execute an Aave looping strategy that involves repeated supply and borrow
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactionbatching.js","sourceRoot":"","sources":["../../../src/sdk/transactionbatching.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,gCAAgC,EAAE,MAAM,8CAA8C,CAAC;AAChG,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,mBAAoB,SAAQ,SAAS;IAChD;;;;;;;;;;OAUG;IACH,KAAK,CAAC,aAAa,CACjB,OAAiD,EACjD,OAAwB;QAExB,OAAO,WAAW,CAAC,gCAAgC,CACjD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"transactionbatching.js","sourceRoot":"","sources":["../../../src/sdk/transactionbatching.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,gCAAgC,EAAE,MAAM,8CAA8C,CAAC;AAChG,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,mBAAoB,SAAQ,SAAS;IAChD;;;;;;;;;;OAUG;IACH,KAAK,CAAC,aAAa,CACjB,OAAiD,EACjD,OAAwB;QAExB,OAAO,WAAW,CAAC,gCAAgC,CACjD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,OAAO,CACX,OAA2C,EAC3C,OAAwB;QAExB,OAAO,WAAW,CAAC,0BAA0B,CAC3C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAmC,EACnC,OAAwB;QAExB,OAAO,WAAW,CAAC,2BAA2B,CAC5C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -46,12 +46,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
async function run() {
|
|
49
|
-
const result = await compassApiSDK.aaveV3.rate({
|
|
50
|
-
chain: "arbitrum:mainnet",
|
|
51
|
-
token: "USDC",
|
|
52
|
-
});
|
|
49
|
+
const result = await compassApiSDK.aaveV3.rate({});
|
|
53
50
|
|
|
54
|
-
// Handle the result
|
|
55
51
|
console.log(result);
|
|
56
52
|
}
|
|
57
53
|
|
|
@@ -73,19 +69,13 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
73
69
|
});
|
|
74
70
|
|
|
75
71
|
async function run() {
|
|
76
|
-
const res = await aaveV3Rate(compassApiSDK, {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
throw res.error;
|
|
72
|
+
const res = await aaveV3Rate(compassApiSDK, {});
|
|
73
|
+
if (res.ok) {
|
|
74
|
+
const { value: result } = res;
|
|
75
|
+
console.log(result);
|
|
76
|
+
} else {
|
|
77
|
+
console.log("aaveV3Rate failed:", res.error);
|
|
83
78
|
}
|
|
84
|
-
|
|
85
|
-
const { value: result } = res;
|
|
86
|
-
|
|
87
|
-
// Handle the result
|
|
88
|
-
console.log(result);
|
|
89
79
|
}
|
|
90
80
|
|
|
91
81
|
run();
|
|
@@ -125,13 +115,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
125
115
|
});
|
|
126
116
|
|
|
127
117
|
async function run() {
|
|
128
|
-
const result = await compassApiSDK.aaveV3.avgRate({
|
|
129
|
-
chain: "ethereum:mainnet",
|
|
130
|
-
token: "USDC",
|
|
131
|
-
days: 7,
|
|
132
|
-
});
|
|
118
|
+
const result = await compassApiSDK.aaveV3.avgRate({});
|
|
133
119
|
|
|
134
|
-
// Handle the result
|
|
135
120
|
console.log(result);
|
|
136
121
|
}
|
|
137
122
|
|
|
@@ -153,20 +138,13 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
153
138
|
});
|
|
154
139
|
|
|
155
140
|
async function run() {
|
|
156
|
-
const res = await aaveV3AvgRate(compassApiSDK, {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
if (!res.ok) {
|
|
163
|
-
throw res.error;
|
|
141
|
+
const res = await aaveV3AvgRate(compassApiSDK, {});
|
|
142
|
+
if (res.ok) {
|
|
143
|
+
const { value: result } = res;
|
|
144
|
+
console.log(result);
|
|
145
|
+
} else {
|
|
146
|
+
console.log("aaveV3AvgRate failed:", res.error);
|
|
164
147
|
}
|
|
165
|
-
|
|
166
|
-
const { value: result } = res;
|
|
167
|
-
|
|
168
|
-
// Handle the result
|
|
169
|
-
console.log(result);
|
|
170
148
|
}
|
|
171
149
|
|
|
172
150
|
run();
|
|
@@ -207,13 +185,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
207
185
|
});
|
|
208
186
|
|
|
209
187
|
async function run() {
|
|
210
|
-
const result = await compassApiSDK.aaveV3.stdRate({
|
|
211
|
-
chain: "ethereum:mainnet",
|
|
212
|
-
token: "USDC",
|
|
213
|
-
days: 7,
|
|
214
|
-
});
|
|
188
|
+
const result = await compassApiSDK.aaveV3.stdRate({});
|
|
215
189
|
|
|
216
|
-
// Handle the result
|
|
217
190
|
console.log(result);
|
|
218
191
|
}
|
|
219
192
|
|
|
@@ -235,20 +208,13 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
235
208
|
});
|
|
236
209
|
|
|
237
210
|
async function run() {
|
|
238
|
-
const res = await aaveV3StdRate(compassApiSDK, {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
if (!res.ok) {
|
|
245
|
-
throw res.error;
|
|
211
|
+
const res = await aaveV3StdRate(compassApiSDK, {});
|
|
212
|
+
if (res.ok) {
|
|
213
|
+
const { value: result } = res;
|
|
214
|
+
console.log(result);
|
|
215
|
+
} else {
|
|
216
|
+
console.log("aaveV3StdRate failed:", res.error);
|
|
246
217
|
}
|
|
247
|
-
|
|
248
|
-
const { value: result } = res;
|
|
249
|
-
|
|
250
|
-
// Handle the result
|
|
251
|
-
console.log(result);
|
|
252
218
|
}
|
|
253
219
|
|
|
254
220
|
run();
|
|
@@ -293,12 +259,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
293
259
|
});
|
|
294
260
|
|
|
295
261
|
async function run() {
|
|
296
|
-
const result = await compassApiSDK.aaveV3.reserveOverview({
|
|
297
|
-
chain: "arbitrum:mainnet",
|
|
298
|
-
token: "USDC",
|
|
299
|
-
});
|
|
262
|
+
const result = await compassApiSDK.aaveV3.reserveOverview({});
|
|
300
263
|
|
|
301
|
-
// Handle the result
|
|
302
264
|
console.log(result);
|
|
303
265
|
}
|
|
304
266
|
|
|
@@ -320,19 +282,13 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
320
282
|
});
|
|
321
283
|
|
|
322
284
|
async function run() {
|
|
323
|
-
const res = await aaveV3ReserveOverview(compassApiSDK, {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
throw res.error;
|
|
285
|
+
const res = await aaveV3ReserveOverview(compassApiSDK, {});
|
|
286
|
+
if (res.ok) {
|
|
287
|
+
const { value: result } = res;
|
|
288
|
+
console.log(result);
|
|
289
|
+
} else {
|
|
290
|
+
console.log("aaveV3ReserveOverview failed:", res.error);
|
|
330
291
|
}
|
|
331
|
-
|
|
332
|
-
const { value: result } = res;
|
|
333
|
-
|
|
334
|
-
// Handle the result
|
|
335
|
-
console.log(result);
|
|
336
292
|
}
|
|
337
293
|
|
|
338
294
|
run();
|
|
@@ -379,12 +335,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
379
335
|
});
|
|
380
336
|
|
|
381
337
|
async function run() {
|
|
382
|
-
const result = await compassApiSDK.aaveV3.tokenPrice({
|
|
383
|
-
chain: "arbitrum:mainnet",
|
|
384
|
-
token: "USDC",
|
|
385
|
-
});
|
|
338
|
+
const result = await compassApiSDK.aaveV3.tokenPrice({});
|
|
386
339
|
|
|
387
|
-
// Handle the result
|
|
388
340
|
console.log(result);
|
|
389
341
|
}
|
|
390
342
|
|
|
@@ -406,19 +358,13 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
406
358
|
});
|
|
407
359
|
|
|
408
360
|
async function run() {
|
|
409
|
-
const res = await aaveV3TokenPrice(compassApiSDK, {
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
throw res.error;
|
|
361
|
+
const res = await aaveV3TokenPrice(compassApiSDK, {});
|
|
362
|
+
if (res.ok) {
|
|
363
|
+
const { value: result } = res;
|
|
364
|
+
console.log(result);
|
|
365
|
+
} else {
|
|
366
|
+
console.log("aaveV3TokenPrice failed:", res.error);
|
|
416
367
|
}
|
|
417
|
-
|
|
418
|
-
const { value: result } = res;
|
|
419
|
-
|
|
420
|
-
// Handle the result
|
|
421
|
-
console.log(result);
|
|
422
368
|
}
|
|
423
369
|
|
|
424
370
|
run();
|
|
@@ -468,14 +414,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
468
414
|
});
|
|
469
415
|
|
|
470
416
|
async function run() {
|
|
471
|
-
const result = await compassApiSDK.aaveV3.liquidityChange({
|
|
472
|
-
chain: "arbitrum:mainnet",
|
|
473
|
-
token: "USDC",
|
|
474
|
-
startBlock: 0,
|
|
475
|
-
endBlock: 319407231,
|
|
476
|
-
});
|
|
417
|
+
const result = await compassApiSDK.aaveV3.liquidityChange({});
|
|
477
418
|
|
|
478
|
-
// Handle the result
|
|
479
419
|
console.log(result);
|
|
480
420
|
}
|
|
481
421
|
|
|
@@ -497,21 +437,13 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
497
437
|
});
|
|
498
438
|
|
|
499
439
|
async function run() {
|
|
500
|
-
const res = await aaveV3LiquidityChange(compassApiSDK, {
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
if (!res.ok) {
|
|
508
|
-
throw res.error;
|
|
440
|
+
const res = await aaveV3LiquidityChange(compassApiSDK, {});
|
|
441
|
+
if (res.ok) {
|
|
442
|
+
const { value: result } = res;
|
|
443
|
+
console.log(result);
|
|
444
|
+
} else {
|
|
445
|
+
console.log("aaveV3LiquidityChange failed:", res.error);
|
|
509
446
|
}
|
|
510
|
-
|
|
511
|
-
const { value: result } = res;
|
|
512
|
-
|
|
513
|
-
// Handle the result
|
|
514
|
-
console.log(result);
|
|
515
447
|
}
|
|
516
448
|
|
|
517
449
|
run();
|
|
@@ -558,12 +490,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
558
490
|
});
|
|
559
491
|
|
|
560
492
|
async function run() {
|
|
561
|
-
const result = await compassApiSDK.aaveV3.userPositionSummary({
|
|
562
|
-
chain: "arbitrum:mainnet",
|
|
563
|
-
user: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
564
|
-
});
|
|
493
|
+
const result = await compassApiSDK.aaveV3.userPositionSummary({});
|
|
565
494
|
|
|
566
|
-
// Handle the result
|
|
567
495
|
console.log(result);
|
|
568
496
|
}
|
|
569
497
|
|
|
@@ -585,19 +513,13 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
585
513
|
});
|
|
586
514
|
|
|
587
515
|
async function run() {
|
|
588
|
-
const res = await aaveV3UserPositionSummary(compassApiSDK, {
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
throw res.error;
|
|
516
|
+
const res = await aaveV3UserPositionSummary(compassApiSDK, {});
|
|
517
|
+
if (res.ok) {
|
|
518
|
+
const { value: result } = res;
|
|
519
|
+
console.log(result);
|
|
520
|
+
} else {
|
|
521
|
+
console.log("aaveV3UserPositionSummary failed:", res.error);
|
|
595
522
|
}
|
|
596
|
-
|
|
597
|
-
const { value: result } = res;
|
|
598
|
-
|
|
599
|
-
// Handle the result
|
|
600
|
-
console.log(result);
|
|
601
523
|
}
|
|
602
524
|
|
|
603
525
|
run();
|
|
@@ -645,13 +567,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
645
567
|
});
|
|
646
568
|
|
|
647
569
|
async function run() {
|
|
648
|
-
const result = await compassApiSDK.aaveV3.userPositionPerToken({
|
|
649
|
-
chain: "arbitrum:mainnet",
|
|
650
|
-
user: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
651
|
-
token: "USDC",
|
|
652
|
-
});
|
|
570
|
+
const result = await compassApiSDK.aaveV3.userPositionPerToken({});
|
|
653
571
|
|
|
654
|
-
// Handle the result
|
|
655
572
|
console.log(result);
|
|
656
573
|
}
|
|
657
574
|
|
|
@@ -673,20 +590,13 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
673
590
|
});
|
|
674
591
|
|
|
675
592
|
async function run() {
|
|
676
|
-
const res = await aaveV3UserPositionPerToken(compassApiSDK, {
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
if (!res.ok) {
|
|
683
|
-
throw res.error;
|
|
593
|
+
const res = await aaveV3UserPositionPerToken(compassApiSDK, {});
|
|
594
|
+
if (res.ok) {
|
|
595
|
+
const { value: result } = res;
|
|
596
|
+
console.log(result);
|
|
597
|
+
} else {
|
|
598
|
+
console.log("aaveV3UserPositionPerToken failed:", res.error);
|
|
684
599
|
}
|
|
685
|
-
|
|
686
|
-
const { value: result } = res;
|
|
687
|
-
|
|
688
|
-
// Handle the result
|
|
689
|
-
console.log(result);
|
|
690
600
|
}
|
|
691
601
|
|
|
692
602
|
run();
|
|
@@ -731,12 +641,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
731
641
|
});
|
|
732
642
|
|
|
733
643
|
async function run() {
|
|
734
|
-
const result = await compassApiSDK.aaveV3.historicalTransactions({
|
|
735
|
-
chain: "arbitrum:mainnet",
|
|
736
|
-
userAddress: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
737
|
-
});
|
|
644
|
+
const result = await compassApiSDK.aaveV3.historicalTransactions({});
|
|
738
645
|
|
|
739
|
-
// Handle the result
|
|
740
646
|
console.log(result);
|
|
741
647
|
}
|
|
742
648
|
|
|
@@ -758,19 +664,13 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
758
664
|
});
|
|
759
665
|
|
|
760
666
|
async function run() {
|
|
761
|
-
const res = await aaveV3HistoricalTransactions(compassApiSDK, {
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
throw res.error;
|
|
667
|
+
const res = await aaveV3HistoricalTransactions(compassApiSDK, {});
|
|
668
|
+
if (res.ok) {
|
|
669
|
+
const { value: result } = res;
|
|
670
|
+
console.log(result);
|
|
671
|
+
} else {
|
|
672
|
+
console.log("aaveV3HistoricalTransactions failed:", res.error);
|
|
768
673
|
}
|
|
769
|
-
|
|
770
|
-
const { value: result } = res;
|
|
771
|
-
|
|
772
|
-
// Handle the result
|
|
773
|
-
console.log(result);
|
|
774
674
|
}
|
|
775
675
|
|
|
776
676
|
run();
|
|
@@ -825,7 +725,6 @@ async function run() {
|
|
|
825
725
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
826
726
|
});
|
|
827
727
|
|
|
828
|
-
// Handle the result
|
|
829
728
|
console.log(result);
|
|
830
729
|
}
|
|
831
730
|
|
|
@@ -853,15 +752,12 @@ async function run() {
|
|
|
853
752
|
chain: "arbitrum:mainnet",
|
|
854
753
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
855
754
|
});
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
755
|
+
if (res.ok) {
|
|
756
|
+
const { value: result } = res;
|
|
757
|
+
console.log(result);
|
|
758
|
+
} else {
|
|
759
|
+
console.log("aaveV3Supply failed:", res.error);
|
|
859
760
|
}
|
|
860
|
-
|
|
861
|
-
const { value: result } = res;
|
|
862
|
-
|
|
863
|
-
// Handle the result
|
|
864
|
-
console.log(result);
|
|
865
761
|
}
|
|
866
762
|
|
|
867
763
|
run();
|
|
@@ -912,7 +808,6 @@ async function run() {
|
|
|
912
808
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
913
809
|
});
|
|
914
810
|
|
|
915
|
-
// Handle the result
|
|
916
811
|
console.log(result);
|
|
917
812
|
}
|
|
918
813
|
|
|
@@ -941,15 +836,12 @@ async function run() {
|
|
|
941
836
|
chain: "base:mainnet",
|
|
942
837
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
943
838
|
});
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
839
|
+
if (res.ok) {
|
|
840
|
+
const { value: result } = res;
|
|
841
|
+
console.log(result);
|
|
842
|
+
} else {
|
|
843
|
+
console.log("aaveV3Borrow failed:", res.error);
|
|
947
844
|
}
|
|
948
|
-
|
|
949
|
-
const { value: result } = res;
|
|
950
|
-
|
|
951
|
-
// Handle the result
|
|
952
|
-
console.log(result);
|
|
953
845
|
}
|
|
954
846
|
|
|
955
847
|
run();
|
|
@@ -1004,7 +896,6 @@ async function run() {
|
|
|
1004
896
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
1005
897
|
});
|
|
1006
898
|
|
|
1007
|
-
// Handle the result
|
|
1008
899
|
console.log(result);
|
|
1009
900
|
}
|
|
1010
901
|
|
|
@@ -1033,15 +924,12 @@ async function run() {
|
|
|
1033
924
|
chain: "arbitrum:mainnet",
|
|
1034
925
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
1035
926
|
});
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
927
|
+
if (res.ok) {
|
|
928
|
+
const { value: result } = res;
|
|
929
|
+
console.log(result);
|
|
930
|
+
} else {
|
|
931
|
+
console.log("aaveV3Repay failed:", res.error);
|
|
1039
932
|
}
|
|
1040
|
-
|
|
1041
|
-
const { value: result } = res;
|
|
1042
|
-
|
|
1043
|
-
// Handle the result
|
|
1044
|
-
console.log(result);
|
|
1045
933
|
}
|
|
1046
934
|
|
|
1047
935
|
run();
|
|
@@ -1097,7 +985,6 @@ async function run() {
|
|
|
1097
985
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
1098
986
|
});
|
|
1099
987
|
|
|
1100
|
-
// Handle the result
|
|
1101
988
|
console.log(result);
|
|
1102
989
|
}
|
|
1103
990
|
|
|
@@ -1126,15 +1013,12 @@ async function run() {
|
|
|
1126
1013
|
chain: "base:mainnet",
|
|
1127
1014
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
1128
1015
|
});
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1016
|
+
if (res.ok) {
|
|
1017
|
+
const { value: result } = res;
|
|
1018
|
+
console.log(result);
|
|
1019
|
+
} else {
|
|
1020
|
+
console.log("aaveV3Withdraw failed:", res.error);
|
|
1132
1021
|
}
|
|
1133
|
-
|
|
1134
|
-
const { value: result } = res;
|
|
1135
|
-
|
|
1136
|
-
// Handle the result
|
|
1137
|
-
console.log(result);
|
|
1138
1022
|
}
|
|
1139
1023
|
|
|
1140
1024
|
run();
|