@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.
Files changed (79) hide show
  1. package/FUNCTIONS.md +6 -26
  2. package/README.md +47 -78
  3. package/bin/mcp-server.js +19 -18
  4. package/bin/mcp-server.js.map +12 -12
  5. package/dist/commonjs/funcs/transactionBatchingAaveLoop.d.ts +1 -1
  6. package/dist/commonjs/funcs/transactionBatchingAaveLoop.js +1 -1
  7. package/dist/commonjs/funcs/transactionBatchingAuthorization.d.ts +6 -6
  8. package/dist/commonjs/funcs/transactionBatchingAuthorization.js +6 -6
  9. package/dist/commonjs/funcs/transactionBatchingExecute.d.ts +3 -2
  10. package/dist/commonjs/funcs/transactionBatchingExecute.d.ts.map +1 -1
  11. package/dist/commonjs/funcs/transactionBatchingExecute.js +3 -2
  12. package/dist/commonjs/funcs/transactionBatchingExecute.js.map +1 -1
  13. package/dist/commonjs/lib/config.d.ts +3 -3
  14. package/dist/commonjs/lib/config.js +3 -3
  15. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  16. package/dist/commonjs/mcp-server/server.js +1 -1
  17. package/dist/commonjs/mcp-server/tools/transactionBatchingAaveLoop.js +1 -1
  18. package/dist/commonjs/mcp-server/tools/transactionBatchingAuthorization.js +6 -6
  19. package/dist/commonjs/mcp-server/tools/transactionBatchingAuthorization.js.map +1 -1
  20. package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.d.ts.map +1 -1
  21. package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.js +3 -2
  22. package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.js.map +1 -1
  23. package/dist/commonjs/models/errors/apierror.d.ts +14 -2
  24. package/dist/commonjs/models/errors/apierror.d.ts.map +1 -1
  25. package/dist/commonjs/models/errors/apierror.js +1 -1
  26. package/dist/commonjs/models/errors/apierror.js.map +1 -1
  27. package/dist/commonjs/sdk/transactionbatching.d.ts +10 -9
  28. package/dist/commonjs/sdk/transactionbatching.d.ts.map +1 -1
  29. package/dist/commonjs/sdk/transactionbatching.js +10 -9
  30. package/dist/commonjs/sdk/transactionbatching.js.map +1 -1
  31. package/dist/esm/funcs/transactionBatchingAaveLoop.d.ts +1 -1
  32. package/dist/esm/funcs/transactionBatchingAaveLoop.js +1 -1
  33. package/dist/esm/funcs/transactionBatchingAuthorization.d.ts +6 -6
  34. package/dist/esm/funcs/transactionBatchingAuthorization.js +6 -6
  35. package/dist/esm/funcs/transactionBatchingExecute.d.ts +3 -2
  36. package/dist/esm/funcs/transactionBatchingExecute.d.ts.map +1 -1
  37. package/dist/esm/funcs/transactionBatchingExecute.js +3 -2
  38. package/dist/esm/funcs/transactionBatchingExecute.js.map +1 -1
  39. package/dist/esm/lib/config.d.ts +3 -3
  40. package/dist/esm/lib/config.js +3 -3
  41. package/dist/esm/mcp-server/mcp-server.js +1 -1
  42. package/dist/esm/mcp-server/server.js +1 -1
  43. package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.js +1 -1
  44. package/dist/esm/mcp-server/tools/transactionBatchingAuthorization.js +6 -6
  45. package/dist/esm/mcp-server/tools/transactionBatchingAuthorization.js.map +1 -1
  46. package/dist/esm/mcp-server/tools/transactionBatchingExecute.d.ts.map +1 -1
  47. package/dist/esm/mcp-server/tools/transactionBatchingExecute.js +3 -2
  48. package/dist/esm/mcp-server/tools/transactionBatchingExecute.js.map +1 -1
  49. package/dist/esm/models/errors/apierror.d.ts +14 -2
  50. package/dist/esm/models/errors/apierror.d.ts.map +1 -1
  51. package/dist/esm/models/errors/apierror.js +1 -1
  52. package/dist/esm/models/errors/apierror.js.map +1 -1
  53. package/dist/esm/sdk/transactionbatching.d.ts +10 -9
  54. package/dist/esm/sdk/transactionbatching.d.ts.map +1 -1
  55. package/dist/esm/sdk/transactionbatching.js +10 -9
  56. package/dist/esm/sdk/transactionbatching.js.map +1 -1
  57. package/docs/sdks/aavev3/README.md +83 -199
  58. package/docs/sdks/aerodromeslipstream/README.md +39 -79
  59. package/docs/sdks/morpho/README.md +84 -182
  60. package/docs/sdks/pendle/README.md +53 -113
  61. package/docs/sdks/sky/README.md +27 -51
  62. package/docs/sdks/smartaccount/README.md +5 -9
  63. package/docs/sdks/token/README.md +24 -56
  64. package/docs/sdks/transactionbatching/README.md +25 -36
  65. package/docs/sdks/uniswapv3/README.md +60 -132
  66. package/docs/sdks/universal/README.md +50 -106
  67. package/jsr.json +1 -1
  68. package/package.json +1 -1
  69. package/src/funcs/transactionBatchingAaveLoop.ts +1 -1
  70. package/src/funcs/transactionBatchingAuthorization.ts +6 -6
  71. package/src/funcs/transactionBatchingExecute.ts +3 -2
  72. package/src/lib/config.ts +3 -3
  73. package/src/mcp-server/mcp-server.ts +1 -1
  74. package/src/mcp-server/server.ts +1 -1
  75. package/src/mcp-server/tools/transactionBatchingAaveLoop.ts +1 -1
  76. package/src/mcp-server/tools/transactionBatchingAuthorization.ts +6 -6
  77. package/src/mcp-server/tools/transactionBatchingExecute.ts +3 -2
  78. package/src/models/errors/apierror.ts +18 -3
  79. 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,CA6BvE,CAAC"}
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: `Execute Tx Batching
12
+ description: `Construct Bundled Transaction
13
13
 
14
- Execute a batch of transactions in a single multicall using EIP-7702.
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;;;;;;;wBAOS;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
+ {"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
- readonly rawResponse: Response;
3
- readonly body: string;
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;aAMf,WAAW,EAAE,QAAQ;aACrB,IAAI,EAAE,MAAM;IAN9B,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,SAAgB,WAAW,EAAE,MAAM,CAAC;gBAGlC,OAAO,EAAE,MAAM,EACC,WAAW,EAAE,QAAQ,EACrB,IAAI,GAAE,MAAW;CAepC"}
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;IAIjC,YACE,OAAe,EACC,WAAqB,EACrB,OAAe,EAAE;QAEjC,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;QAEtD,KAAK,CACH,GAAG,OAAO,YAAY,UAAU,iBAAiB,WAAW,SAAS,UAAU,EAAE,CAClF,CAAC;QATc,gBAAW,GAAX,WAAW,CAAU;QACrB,SAAI,GAAJ,IAAI,CAAa;QAUjC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;CACF"}
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
- * Get EIP-7702 Authorization
5
+ * Enable transaction bundling.
6
6
  *
7
7
  * @remarks
8
- * Get authorization data for EIP-7702 batching operations.
8
+ * Get authorization for bundling transactions.
9
9
  *
10
- * This authorization is required to prevent replay attacks and ensure transaction
11
- * ordering when batching multiple actions into a single transaction. The authorization
12
- * includes a nonce and chain ID to guarantee transaction uniqueness and proper network
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
- * Execute Tx Batching
17
+ * Construct Bundled Transaction
18
18
  *
19
19
  * @remarks
20
- * Execute a batch of transactions in a single multicall using EIP-7702.
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
- * Execute Aave Loop Strategy
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;;;;;;;;;;OAUG;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"}
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
- * Get EIP-7702 Authorization
11
+ * Enable transaction bundling.
12
12
  *
13
13
  * @remarks
14
- * Get authorization data for EIP-7702 batching operations.
14
+ * Get authorization for bundling transactions.
15
15
  *
16
- * This authorization is required to prevent replay attacks and ensure transaction
17
- * ordering when batching multiple actions into a single transaction. The authorization
18
- * includes a nonce and chain ID to guarantee transaction uniqueness and proper network
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
- * Execute Tx Batching
25
+ * Construct Bundled Transaction
26
26
  *
27
27
  * @remarks
28
- * Execute a batch of transactions in a single multicall using EIP-7702.
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
- * Execute Aave Loop Strategy
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;;;;;;;;;;OAUG;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"}
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
- chain: "arbitrum:mainnet",
78
- token: "USDC",
79
- });
80
-
81
- if (!res.ok) {
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
- chain: "ethereum:mainnet",
158
- token: "USDC",
159
- days: 7,
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
- chain: "ethereum:mainnet",
240
- token: "USDC",
241
- days: 7,
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
- chain: "arbitrum:mainnet",
325
- token: "USDC",
326
- });
327
-
328
- if (!res.ok) {
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
- chain: "arbitrum:mainnet",
411
- token: "USDC",
412
- });
413
-
414
- if (!res.ok) {
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
- chain: "arbitrum:mainnet",
502
- token: "USDC",
503
- startBlock: 0,
504
- endBlock: 319407231,
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
- chain: "arbitrum:mainnet",
590
- user: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
591
- });
592
-
593
- if (!res.ok) {
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
- chain: "arbitrum:mainnet",
678
- user: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
679
- token: "USDC",
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
- chain: "arbitrum:mainnet",
763
- userAddress: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
764
- });
765
-
766
- if (!res.ok) {
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
- if (!res.ok) {
858
- throw res.error;
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
- if (!res.ok) {
946
- throw res.error;
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
- if (!res.ok) {
1038
- throw res.error;
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
- if (!res.ok) {
1131
- throw res.error;
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();