@compass-labs/api-sdk 0.5.5 → 0.5.7
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 +6 -6
- package/bin/mcp-server.js +15 -14
- package/bin/mcp-server.js.map +11 -11
- 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 +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.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/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 +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.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/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/transactionbatching/README.md +10 -9
- 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 +2 -2
- 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/sdk/transactionbatching.ts +10 -9
|
@@ -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"}
|
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
|
|
6
6
|
### Available Operations
|
|
7
7
|
|
|
8
|
-
* [authorization](#authorization) -
|
|
9
|
-
* [execute](#execute) -
|
|
10
|
-
* [aaveLoop](#aaveloop) -
|
|
8
|
+
* [authorization](#authorization) - Enable transaction bundling.
|
|
9
|
+
* [execute](#execute) - Construct Bundled Transaction
|
|
10
|
+
* [aaveLoop](#aaveloop) - AAVE leverage long/short
|
|
11
11
|
|
|
12
12
|
## authorization
|
|
13
13
|
|
|
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
|
### Example Usage
|
|
22
22
|
|
|
@@ -95,7 +95,8 @@ run();
|
|
|
95
95
|
|
|
96
96
|
## execute
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
Bundle arbitrary transactions together into a single multicall transaction using
|
|
99
|
+
EIP-7702.
|
|
99
100
|
|
|
100
101
|
This endpoint allows bundling multiple contract calls into a single atomic
|
|
101
102
|
transaction, reducing gas costs and ensuring all operations succeed or fail
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
25
25
|
import { Result } from "../types/fp.js";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* AAVE leverage long/short
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
31
|
* Execute an Aave looping strategy that involves repeated supply and borrow
|
|
@@ -25,15 +25,15 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
25
25
|
import { Result } from "../types/fp.js";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Enable transaction bundling.
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
* Get authorization
|
|
31
|
+
* Get authorization for bundling transactions.
|
|
32
32
|
*
|
|
33
|
-
*
|
|
34
|
-
* ordering when batching multiple actions into a single
|
|
35
|
-
* includes a nonce and chain ID to guarantee
|
|
36
|
-
* targeting.
|
|
33
|
+
* Currently this is required for every transaction bundle to prevent replay attacks
|
|
34
|
+
* and ensure transaction ordering when batching multiple actions into a single
|
|
35
|
+
* transaction. The authorization includes a nonce and chain ID to guarantee
|
|
36
|
+
* transaction uniqueness and proper network targeting.
|
|
37
37
|
*/
|
|
38
38
|
export function transactionBatchingAuthorization(
|
|
39
39
|
client: CompassApiSDKCore,
|
|
@@ -25,10 +25,11 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
25
25
|
import { Result } from "../types/fp.js";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Construct Bundled Transaction
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
*
|
|
31
|
+
* Bundle arbitrary transactions together into a single multicall transaction using
|
|
32
|
+
* EIP-7702.
|
|
32
33
|
*
|
|
33
34
|
* This endpoint allows bundling multiple contract calls into a single atomic
|
|
34
35
|
* transaction, reducing gas costs and ensuring all operations succeed or fail
|
package/src/lib/config.ts
CHANGED
|
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "0.0.1",
|
|
64
|
-
sdkVersion: "0.5.
|
|
64
|
+
sdkVersion: "0.5.7",
|
|
65
65
|
genVersion: "2.618.0",
|
|
66
66
|
userAgent:
|
|
67
|
-
"speakeasy-sdk/typescript 0.5.
|
|
67
|
+
"speakeasy-sdk/typescript 0.5.7 2.618.0 0.0.1 @compass-labs/api-sdk",
|
|
68
68
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -12,7 +12,7 @@ const args = {
|
|
|
12
12
|
|
|
13
13
|
export const tool$transactionBatchingAaveLoop: ToolDefinition<typeof args> = {
|
|
14
14
|
name: "transaction-batching-aave-loop",
|
|
15
|
-
description: `
|
|
15
|
+
description: `AAVE leverage long/short
|
|
16
16
|
|
|
17
17
|
Execute an Aave looping strategy that involves repeated supply and borrow
|
|
18
18
|
operations.
|
|
@@ -14,14 +14,14 @@ export const tool$transactionBatchingAuthorization: ToolDefinition<
|
|
|
14
14
|
typeof args
|
|
15
15
|
> = {
|
|
16
16
|
name: "transaction-batching-authorization",
|
|
17
|
-
description: `
|
|
17
|
+
description: `Enable transaction bundling.
|
|
18
18
|
|
|
19
|
-
Get authorization
|
|
19
|
+
Get authorization for bundling transactions.
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
ordering when batching multiple actions into a single
|
|
23
|
-
includes a nonce and chain ID to guarantee
|
|
24
|
-
targeting.`,
|
|
21
|
+
Currently this is required for every transaction bundle to prevent replay attacks
|
|
22
|
+
and ensure transaction ordering when batching multiple actions into a single
|
|
23
|
+
transaction. The authorization includes a nonce and chain ID to guarantee
|
|
24
|
+
transaction uniqueness and proper network targeting.`,
|
|
25
25
|
args,
|
|
26
26
|
tool: async (client, args, ctx) => {
|
|
27
27
|
const [result, apiCall] = await transactionBatchingAuthorization(
|
|
@@ -12,9 +12,10 @@ const args = {
|
|
|
12
12
|
|
|
13
13
|
export const tool$transactionBatchingExecute: ToolDefinition<typeof args> = {
|
|
14
14
|
name: "transaction-batching-execute",
|
|
15
|
-
description: `
|
|
15
|
+
description: `Construct Bundled Transaction
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Bundle arbitrary transactions together into a single multicall transaction using
|
|
18
|
+
EIP-7702.
|
|
18
19
|
|
|
19
20
|
This endpoint allows bundling multiple contract calls into a single atomic
|
|
20
21
|
transaction, reducing gas costs and ensuring all operations succeed or fail
|
|
@@ -11,15 +11,15 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
11
11
|
|
|
12
12
|
export class TransactionBatching extends ClientSDK {
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Enable transaction bundling.
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
|
-
* Get authorization
|
|
17
|
+
* Get authorization for bundling transactions.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
* ordering when batching multiple actions into a single
|
|
21
|
-
* includes a nonce and chain ID to guarantee
|
|
22
|
-
* targeting.
|
|
19
|
+
* Currently this is required for every transaction bundle to prevent replay attacks
|
|
20
|
+
* and ensure transaction ordering when batching multiple actions into a single
|
|
21
|
+
* transaction. The authorization includes a nonce and chain ID to guarantee
|
|
22
|
+
* transaction uniqueness and proper network targeting.
|
|
23
23
|
*/
|
|
24
24
|
async authorization(
|
|
25
25
|
request: components.MulticallAuthorizationRequest,
|
|
@@ -33,10 +33,11 @@ export class TransactionBatching extends ClientSDK {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Construct Bundled Transaction
|
|
37
37
|
*
|
|
38
38
|
* @remarks
|
|
39
|
-
*
|
|
39
|
+
* Bundle arbitrary transactions together into a single multicall transaction using
|
|
40
|
+
* EIP-7702.
|
|
40
41
|
*
|
|
41
42
|
* This endpoint allows bundling multiple contract calls into a single atomic
|
|
42
43
|
* transaction, reducing gas costs and ensuring all operations succeed or fail
|
|
@@ -55,7 +56,7 @@ export class TransactionBatching extends ClientSDK {
|
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
/**
|
|
58
|
-
*
|
|
59
|
+
* AAVE leverage long/short
|
|
59
60
|
*
|
|
60
61
|
* @remarks
|
|
61
62
|
* Execute an Aave looping strategy that involves repeated supply and borrow
|