@compass-labs/api-sdk 2.1.0 → 2.1.1
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 -2
- package/bin/mcp-server.js +11 -11
- package/bin/mcp-server.js.map +9 -9
- package/dist/commonjs/funcs/earnEarnCreateAccount.d.ts +4 -4
- package/dist/commonjs/funcs/earnEarnCreateAccount.js +4 -4
- package/dist/commonjs/funcs/earnEarnManage.d.ts +2 -2
- package/dist/commonjs/funcs/earnEarnManage.js +2 -2
- package/dist/commonjs/funcs/earnEarnPositionsPositionId.d.ts +1 -1
- package/dist/commonjs/funcs/earnEarnPositionsPositionId.js +1 -1
- package/dist/commonjs/funcs/earnEarnTransfer.d.ts +3 -3
- package/dist/commonjs/funcs/earnEarnTransfer.js +3 -3
- package/dist/commonjs/mcp-server/tools/earnEarnCreateAccount.js +4 -4
- package/dist/commonjs/mcp-server/tools/earnEarnManage.js +2 -2
- package/dist/commonjs/mcp-server/tools/earnEarnManage.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/earnEarnPositionsPositionId.js +1 -1
- package/dist/commonjs/mcp-server/tools/earnEarnTransfer.js +3 -3
- package/dist/commonjs/mcp-server/tools/earnEarnTransfer.js.map +1 -1
- package/dist/commonjs/sdk/earn.d.ts +10 -10
- package/dist/commonjs/sdk/earn.js +10 -10
- package/dist/esm/funcs/earnEarnCreateAccount.d.ts +4 -4
- package/dist/esm/funcs/earnEarnCreateAccount.js +4 -4
- package/dist/esm/funcs/earnEarnManage.d.ts +2 -2
- package/dist/esm/funcs/earnEarnManage.js +2 -2
- package/dist/esm/funcs/earnEarnPositionsPositionId.d.ts +1 -1
- package/dist/esm/funcs/earnEarnPositionsPositionId.js +1 -1
- package/dist/esm/funcs/earnEarnTransfer.d.ts +3 -3
- package/dist/esm/funcs/earnEarnTransfer.js +3 -3
- package/dist/esm/mcp-server/tools/earnEarnCreateAccount.js +4 -4
- package/dist/esm/mcp-server/tools/earnEarnManage.js +2 -2
- package/dist/esm/mcp-server/tools/earnEarnManage.js.map +1 -1
- package/dist/esm/mcp-server/tools/earnEarnPositionsPositionId.js +1 -1
- package/dist/esm/mcp-server/tools/earnEarnTransfer.js +3 -3
- package/dist/esm/mcp-server/tools/earnEarnTransfer.js.map +1 -1
- package/dist/esm/sdk/earn.d.ts +10 -10
- package/dist/esm/sdk/earn.js +10 -10
- package/package.json +1 -1
- package/src/funcs/earnEarnCreateAccount.ts +4 -4
- package/src/funcs/earnEarnManage.ts +2 -2
- package/src/funcs/earnEarnPositionsPositionId.ts +1 -1
- package/src/funcs/earnEarnTransfer.ts +3 -3
- package/src/mcp-server/tools/earnEarnCreateAccount.ts +4 -4
- package/src/mcp-server/tools/earnEarnManage.ts +2 -2
- package/src/mcp-server/tools/earnEarnPositionsPositionId.ts +1 -1
- package/src/mcp-server/tools/earnEarnTransfer.ts +3 -3
- package/src/sdk/earn.ts +10 -10
|
@@ -12,15 +12,15 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* Create earn account
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Create
|
|
15
|
+
* Create an Earn Account.
|
|
16
16
|
*
|
|
17
|
-
* Before creating Earn positions
|
|
17
|
+
* Before creating Earn positions, the `owner` must create an Earn Account associated with their wallet address.
|
|
18
18
|
*
|
|
19
19
|
* Only the `owner` has the authority to sign transactions for this account. This can be done in one of two ways:
|
|
20
20
|
*
|
|
21
|
-
* 1) The `owner` signs
|
|
21
|
+
* 1) **No gas-sponsorship:** The `owner` signs a transaction and submits it to the network for execution. The `owner` covers the cost of gas in this case.
|
|
22
22
|
*
|
|
23
|
-
* 2) The `owner` does an off-chain EIP-712 signature and submits this signature to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
|
|
23
|
+
* 2) **Gas-sponsorship:** The `owner` does an off-chain EIP-712 signature and submits this signature to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`). Here, another wallet address is set as `sender`. This wallet will sign, submit and cover the gas fees of the transaction.
|
|
24
24
|
*
|
|
25
25
|
* The creation of an Earn Account itself can be a gas-sponsored transaction by setting the `sender` to the wallet which will sign and send the transaction.
|
|
26
26
|
*/
|
|
@@ -50,15 +50,15 @@ const async_js_1 = require("../types/async.js");
|
|
|
50
50
|
* Create earn account
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* Create
|
|
53
|
+
* Create an Earn Account.
|
|
54
54
|
*
|
|
55
|
-
* Before creating Earn positions
|
|
55
|
+
* Before creating Earn positions, the `owner` must create an Earn Account associated with their wallet address.
|
|
56
56
|
*
|
|
57
57
|
* Only the `owner` has the authority to sign transactions for this account. This can be done in one of two ways:
|
|
58
58
|
*
|
|
59
|
-
* 1) The `owner` signs
|
|
59
|
+
* 1) **No gas-sponsorship:** The `owner` signs a transaction and submits it to the network for execution. The `owner` covers the cost of gas in this case.
|
|
60
60
|
*
|
|
61
|
-
* 2) The `owner` does an off-chain EIP-712 signature and submits this signature to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
|
|
61
|
+
* 2) **Gas-sponsorship:** The `owner` does an off-chain EIP-712 signature and submits this signature to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`). Here, another wallet address is set as `sender`. This wallet will sign, submit and cover the gas fees of the transaction.
|
|
62
62
|
*
|
|
63
63
|
* The creation of an Earn Account itself can be a gas-sponsored transaction by setting the `sender` to the wallet which will sign and send the transaction.
|
|
64
64
|
*/
|
|
@@ -22,9 +22,9 @@ import { Result } from "../types/fp.js";
|
|
|
22
22
|
*
|
|
23
23
|
* If `WITHDRAW` is selected, tokens will be withdrawn from the market to the `owner`'s Earn Account.
|
|
24
24
|
*
|
|
25
|
-
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as a `FIXED` amount or a `PERCENTAGE`.
|
|
25
|
+
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as a `FIXED` amount or a `PERCENTAGE` of `amount`.
|
|
26
26
|
*
|
|
27
|
-
* The transaction can be gas-sponsored by an arbitrary wallet address
|
|
27
|
+
* The transaction can be gas-sponsored by an arbitrary wallet address which will sign, submit and pay the required gas for the transaction. If `gas_sponsorship` is set to `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`) where the `sender` of the transaction can be set.
|
|
28
28
|
*/
|
|
29
29
|
export declare function earnEarnManage(client: CompassApiSDKCore, request: components.EarnManageRequest, options?: RequestOptions): APIPromise<Result<components.EarnManageResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
30
30
|
//# sourceMappingURL=earnEarnManage.d.ts.map
|
|
@@ -60,9 +60,9 @@ const async_js_1 = require("../types/async.js");
|
|
|
60
60
|
*
|
|
61
61
|
* If `WITHDRAW` is selected, tokens will be withdrawn from the market to the `owner`'s Earn Account.
|
|
62
62
|
*
|
|
63
|
-
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as a `FIXED` amount or a `PERCENTAGE`.
|
|
63
|
+
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as a `FIXED` amount or a `PERCENTAGE` of `amount`.
|
|
64
64
|
*
|
|
65
|
-
* The transaction can be gas-sponsored by an arbitrary wallet address
|
|
65
|
+
* The transaction can be gas-sponsored by an arbitrary wallet address which will sign, submit and pay the required gas for the transaction. If `gas_sponsorship` is set to `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`) where the `sender` of the transaction can be set.
|
|
66
66
|
*/
|
|
67
67
|
function earnEarnManage(client, request, options) {
|
|
68
68
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -10,7 +10,7 @@ import * as operations from "../models/operations/index.js";
|
|
|
10
10
|
import { APIPromise } from "../types/async.js";
|
|
11
11
|
import { Result } from "../types/fp.js";
|
|
12
12
|
/**
|
|
13
|
-
* Get
|
|
13
|
+
* Get earn position
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
16
|
* This endpoint fetches a single Compass Earn position by its encoded ID.
|
|
@@ -48,7 +48,7 @@ const errors = __importStar(require("../models/errors/index.js"));
|
|
|
48
48
|
const operations = __importStar(require("../models/operations/index.js"));
|
|
49
49
|
const async_js_1 = require("../types/async.js");
|
|
50
50
|
/**
|
|
51
|
-
* Get
|
|
51
|
+
* Get earn position
|
|
52
52
|
*
|
|
53
53
|
* @remarks
|
|
54
54
|
* This endpoint fetches a single Compass Earn position by its encoded ID.
|
|
@@ -12,14 +12,14 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* Transfer tokens to/from account
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Transfer tokens to and from
|
|
15
|
+
* Transfer tokens to and from an Earn Account.
|
|
16
16
|
*
|
|
17
17
|
* If `DEPOSIT`'` is selected, tokens will be transferred from the `owner`'s wallet into their Earn Account.
|
|
18
18
|
*
|
|
19
19
|
* If `WITHDRAW` is selected, tokens will be transferred from the `owner`'s Earn Account into their wallet.
|
|
20
20
|
*
|
|
21
|
-
* If a gas-sponsored `DEPOSIT` transfer is desired for a given token, a one-time Permit2 allowance must be set before proceeding. This is common practice for many other applications and, for many
|
|
22
|
-
* Once the one-time allowance is set for a given token, EIP-712 typed data will be returned and can be signed off-chain by the user. This signature can then be submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
|
|
21
|
+
* If a gas-sponsored `DEPOSIT` transfer is desired for a given token, a one-time Permit2 allowance must be set before proceeding. This is common practice for many other applications and, for many `owner`s, this one-time allowance will already have been set for the token they would like to transfer.
|
|
22
|
+
* Once the one-time allowance is set for a given token and `gas_sponsorship` is set to 'true', EIP-712 typed data will be returned and can be signed off-chain by the user. This signature can then be submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`) where a `sender` can be set for the transaction.
|
|
23
23
|
*/
|
|
24
24
|
export declare function earnEarnTransfer(client: CompassApiSDKCore, request: components.EarnTransferRequest, options?: RequestOptions): APIPromise<Result<components.EarnTransferResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
25
25
|
//# sourceMappingURL=earnEarnTransfer.d.ts.map
|
|
@@ -50,14 +50,14 @@ const async_js_1 = require("../types/async.js");
|
|
|
50
50
|
* Transfer tokens to/from account
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* Transfer tokens to and from
|
|
53
|
+
* Transfer tokens to and from an Earn Account.
|
|
54
54
|
*
|
|
55
55
|
* If `DEPOSIT`'` is selected, tokens will be transferred from the `owner`'s wallet into their Earn Account.
|
|
56
56
|
*
|
|
57
57
|
* If `WITHDRAW` is selected, tokens will be transferred from the `owner`'s Earn Account into their wallet.
|
|
58
58
|
*
|
|
59
|
-
* If a gas-sponsored `DEPOSIT` transfer is desired for a given token, a one-time Permit2 allowance must be set before proceeding. This is common practice for many other applications and, for many
|
|
60
|
-
* Once the one-time allowance is set for a given token, EIP-712 typed data will be returned and can be signed off-chain by the user. This signature can then be submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
|
|
59
|
+
* If a gas-sponsored `DEPOSIT` transfer is desired for a given token, a one-time Permit2 allowance must be set before proceeding. This is common practice for many other applications and, for many `owner`s, this one-time allowance will already have been set for the token they would like to transfer.
|
|
60
|
+
* Once the one-time allowance is set for a given token and `gas_sponsorship` is set to 'true', EIP-712 typed data will be returned and can be signed off-chain by the user. This signature can then be submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`) where a `sender` can be set for the transaction.
|
|
61
61
|
*/
|
|
62
62
|
function earnEarnTransfer(client, request, options) {
|
|
63
63
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -47,15 +47,15 @@ exports.tool$earnEarnCreateAccount = {
|
|
|
47
47
|
name: "earn-earn-create-account",
|
|
48
48
|
description: `Create earn account
|
|
49
49
|
|
|
50
|
-
Create
|
|
50
|
+
Create an Earn Account.
|
|
51
51
|
|
|
52
|
-
Before creating Earn positions
|
|
52
|
+
Before creating Earn positions, the \`owner\` must create an Earn Account associated with their wallet address.
|
|
53
53
|
|
|
54
54
|
Only the \`owner\` has the authority to sign transactions for this account. This can be done in one of two ways:
|
|
55
55
|
|
|
56
|
-
1) The \`owner\` signs
|
|
56
|
+
1) **No gas-sponsorship:** The \`owner\` signs a transaction and submits it to the network for execution. The \`owner\` covers the cost of gas in this case.
|
|
57
57
|
|
|
58
|
-
2) The \`owner\` does an off-chain EIP-712 signature and submits this signature to the 'Prepare gas-sponsored transaction' endpoint (\`/gas_sponsorship/prepare\`).
|
|
58
|
+
2) **Gas-sponsorship:** The \`owner\` does an off-chain EIP-712 signature and submits this signature to the 'Prepare gas-sponsored transaction' endpoint (\`/gas_sponsorship/prepare\`). Here, another wallet address is set as \`sender\`. This wallet will sign, submit and cover the gas fees of the transaction.
|
|
59
59
|
|
|
60
60
|
The creation of an Earn Account itself can be a gas-sponsored transaction by setting the \`sender\` to the wallet which will sign and send the transaction.`,
|
|
61
61
|
args,
|
|
@@ -57,9 +57,9 @@ If \`DEPOSIT\` is selected for \`action\`, tokens will be deposited to the marke
|
|
|
57
57
|
|
|
58
58
|
If \`WITHDRAW\` is selected, tokens will be withdrawn from the market to the \`owner\`'s Earn Account.
|
|
59
59
|
|
|
60
|
-
A fee can be configured. This fee is deducted from the total \`amount\`. It can be expressed as a \`FIXED\` amount or a \`PERCENTAGE\`.
|
|
60
|
+
A fee can be configured. This fee is deducted from the total \`amount\`. It can be expressed as a \`FIXED\` amount or a \`PERCENTAGE\` of \`amount\`.
|
|
61
61
|
|
|
62
|
-
The transaction can be gas-sponsored by an arbitrary wallet address
|
|
62
|
+
The transaction can be gas-sponsored by an arbitrary wallet address which will sign, submit and pay the required gas for the transaction. If \`gas_sponsorship\` is set to \`true\`, EIP-712 typed data will be returned that must be signed by the \`owner\` and submitted to the 'Prepare gas-sponsored transaction' endpoint (\`/gas_sponsorship/prepare\`) where the \`sender\` of the transaction can be set.`,
|
|
63
63
|
args,
|
|
64
64
|
tool: async (client, args, ctx) => {
|
|
65
65
|
const [result, apiCall] = await (0, earnEarnManage_js_1.earnEarnManage)(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earnEarnManage.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/earnEarnManage.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,qEAA+D;AAC/D,6EAA+D;AAC/D,0CAA2D;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,+BAA+B;CACpD,CAAC;AAEW,QAAA,mBAAmB,GAAgC;IAC9D,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"earnEarnManage.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/earnEarnManage.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,qEAA+D;AAC/D,6EAA+D;AAC/D,0CAA2D;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,+BAA+B;CACpD,CAAC;AAEW,QAAA,mBAAmB,GAAgC;IAC9D,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE;;;;;;;;;;;;;;mZAcoY;IACjZ,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,IAAA,kCAAc,EAC5C,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,IAAA,uBAAY,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF,CAAC"}
|
|
@@ -45,7 +45,7 @@ const args = {
|
|
|
45
45
|
};
|
|
46
46
|
exports.tool$earnEarnPositionsPositionId = {
|
|
47
47
|
name: "earn-earn-positions-position-id",
|
|
48
|
-
description: `Get
|
|
48
|
+
description: `Get earn position
|
|
49
49
|
|
|
50
50
|
This endpoint fetches a single Compass Earn position by its encoded ID.`,
|
|
51
51
|
args,
|
|
@@ -47,14 +47,14 @@ exports.tool$earnEarnTransfer = {
|
|
|
47
47
|
name: "earn-earn-transfer",
|
|
48
48
|
description: `Transfer tokens to/from account
|
|
49
49
|
|
|
50
|
-
Transfer tokens to and from
|
|
50
|
+
Transfer tokens to and from an Earn Account.
|
|
51
51
|
|
|
52
52
|
If \`DEPOSIT\`'\` is selected, tokens will be transferred from the \`owner\`'s wallet into their Earn Account.
|
|
53
53
|
|
|
54
54
|
If \`WITHDRAW\` is selected, tokens will be transferred from the \`owner\`'s Earn Account into their wallet.
|
|
55
55
|
|
|
56
|
-
If a gas-sponsored \`DEPOSIT\` transfer is desired for a given token, a one-time Permit2 allowance must be set before proceeding. This is common practice for many other applications and, for many
|
|
57
|
-
Once the one-time allowance is set for a given token, EIP-712 typed data will be returned and can be signed off-chain by the user. This signature can then be submitted to the 'Prepare gas-sponsored transaction' endpoint (\`/gas_sponsorship/prepare\`).`,
|
|
56
|
+
If a gas-sponsored \`DEPOSIT\` transfer is desired for a given token, a one-time Permit2 allowance must be set before proceeding. This is common practice for many other applications and, for many \`owner\`s, this one-time allowance will already have been set for the token they would like to transfer.
|
|
57
|
+
Once the one-time allowance is set for a given token and \`gas_sponsorship\` is set to 'true', EIP-712 typed data will be returned and can be signed off-chain by the user. This signature can then be submitted to the 'Prepare gas-sponsored transaction' endpoint (\`/gas_sponsorship/prepare\`) where a \`sender\` can be set for the transaction.`,
|
|
58
58
|
args,
|
|
59
59
|
tool: async (client, args, ctx) => {
|
|
60
60
|
const [result, apiCall] = await (0, earnEarnTransfer_js_1.earnEarnTransfer)(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earnEarnTransfer.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/earnEarnTransfer.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yEAAmE;AACnE,6EAA+D;AAC/D,0CAA2D;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,iCAAiC;CACtD,CAAC;AAEW,QAAA,qBAAqB,GAAgC;IAChE,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"earnEarnTransfer.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/earnEarnTransfer.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yEAAmE;AACnE,6EAA+D;AAC/D,0CAA2D;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,iCAAiC;CACtD,CAAC;AAEW,QAAA,qBAAqB,GAAgC;IAChE,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE;;;;;;;;;uVASwU;IACrV,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,IAAA,sCAAgB,EAC9C,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,IAAA,uBAAY,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF,CAAC"}
|
|
@@ -10,7 +10,7 @@ export declare class Earn extends ClientSDK {
|
|
|
10
10
|
*/
|
|
11
11
|
earnPositions(request: operations.V2EarnPositionsRequest, options?: RequestOptions): Promise<components.EarnPositionsResponse>;
|
|
12
12
|
/**
|
|
13
|
-
* Get
|
|
13
|
+
* Get earn position
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
16
|
* This endpoint fetches a single Compass Earn position by its encoded ID.
|
|
@@ -27,15 +27,15 @@ export declare class Earn extends ClientSDK {
|
|
|
27
27
|
* Create earn account
|
|
28
28
|
*
|
|
29
29
|
* @remarks
|
|
30
|
-
* Create
|
|
30
|
+
* Create an Earn Account.
|
|
31
31
|
*
|
|
32
|
-
* Before creating Earn positions
|
|
32
|
+
* Before creating Earn positions, the `owner` must create an Earn Account associated with their wallet address.
|
|
33
33
|
*
|
|
34
34
|
* Only the `owner` has the authority to sign transactions for this account. This can be done in one of two ways:
|
|
35
35
|
*
|
|
36
|
-
* 1) The `owner` signs
|
|
36
|
+
* 1) **No gas-sponsorship:** The `owner` signs a transaction and submits it to the network for execution. The `owner` covers the cost of gas in this case.
|
|
37
37
|
*
|
|
38
|
-
* 2) The `owner` does an off-chain EIP-712 signature and submits this signature to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
|
|
38
|
+
* 2) **Gas-sponsorship:** The `owner` does an off-chain EIP-712 signature and submits this signature to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`). Here, another wallet address is set as `sender`. This wallet will sign, submit and cover the gas fees of the transaction.
|
|
39
39
|
*
|
|
40
40
|
* The creation of an Earn Account itself can be a gas-sponsored transaction by setting the `sender` to the wallet which will sign and send the transaction.
|
|
41
41
|
*/
|
|
@@ -44,14 +44,14 @@ export declare class Earn extends ClientSDK {
|
|
|
44
44
|
* Transfer tokens to/from account
|
|
45
45
|
*
|
|
46
46
|
* @remarks
|
|
47
|
-
* Transfer tokens to and from
|
|
47
|
+
* Transfer tokens to and from an Earn Account.
|
|
48
48
|
*
|
|
49
49
|
* If `DEPOSIT`'` is selected, tokens will be transferred from the `owner`'s wallet into their Earn Account.
|
|
50
50
|
*
|
|
51
51
|
* If `WITHDRAW` is selected, tokens will be transferred from the `owner`'s Earn Account into their wallet.
|
|
52
52
|
*
|
|
53
|
-
* If a gas-sponsored `DEPOSIT` transfer is desired for a given token, a one-time Permit2 allowance must be set before proceeding. This is common practice for many other applications and, for many
|
|
54
|
-
* Once the one-time allowance is set for a given token, EIP-712 typed data will be returned and can be signed off-chain by the user. This signature can then be submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
|
|
53
|
+
* If a gas-sponsored `DEPOSIT` transfer is desired for a given token, a one-time Permit2 allowance must be set before proceeding. This is common practice for many other applications and, for many `owner`s, this one-time allowance will already have been set for the token they would like to transfer.
|
|
54
|
+
* Once the one-time allowance is set for a given token and `gas_sponsorship` is set to 'true', EIP-712 typed data will be returned and can be signed off-chain by the user. This signature can then be submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`) where a `sender` can be set for the transaction.
|
|
55
55
|
*/
|
|
56
56
|
earnTransfer(request: components.EarnTransferRequest, options?: RequestOptions): Promise<components.EarnTransferResponse>;
|
|
57
57
|
/**
|
|
@@ -68,9 +68,9 @@ export declare class Earn extends ClientSDK {
|
|
|
68
68
|
*
|
|
69
69
|
* If `WITHDRAW` is selected, tokens will be withdrawn from the market to the `owner`'s Earn Account.
|
|
70
70
|
*
|
|
71
|
-
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as a `FIXED` amount or a `PERCENTAGE`.
|
|
71
|
+
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as a `FIXED` amount or a `PERCENTAGE` of `amount`.
|
|
72
72
|
*
|
|
73
|
-
* The transaction can be gas-sponsored by an arbitrary wallet address
|
|
73
|
+
* The transaction can be gas-sponsored by an arbitrary wallet address which will sign, submit and pay the required gas for the transaction. If `gas_sponsorship` is set to `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`) where the `sender` of the transaction can be set.
|
|
74
74
|
*/
|
|
75
75
|
earnManage(request: components.EarnManageRequest, options?: RequestOptions): Promise<components.EarnManageResponse>;
|
|
76
76
|
}
|
|
@@ -23,7 +23,7 @@ class Earn extends sdks_js_1.ClientSDK {
|
|
|
23
23
|
return (0, fp_js_1.unwrapAsync)((0, earnEarnPositions_js_1.earnEarnPositions)(this, request, options));
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* Get
|
|
26
|
+
* Get earn position
|
|
27
27
|
*
|
|
28
28
|
* @remarks
|
|
29
29
|
* This endpoint fetches a single Compass Earn position by its encoded ID.
|
|
@@ -44,15 +44,15 @@ class Earn extends sdks_js_1.ClientSDK {
|
|
|
44
44
|
* Create earn account
|
|
45
45
|
*
|
|
46
46
|
* @remarks
|
|
47
|
-
* Create
|
|
47
|
+
* Create an Earn Account.
|
|
48
48
|
*
|
|
49
|
-
* Before creating Earn positions
|
|
49
|
+
* Before creating Earn positions, the `owner` must create an Earn Account associated with their wallet address.
|
|
50
50
|
*
|
|
51
51
|
* Only the `owner` has the authority to sign transactions for this account. This can be done in one of two ways:
|
|
52
52
|
*
|
|
53
|
-
* 1) The `owner` signs
|
|
53
|
+
* 1) **No gas-sponsorship:** The `owner` signs a transaction and submits it to the network for execution. The `owner` covers the cost of gas in this case.
|
|
54
54
|
*
|
|
55
|
-
* 2) The `owner` does an off-chain EIP-712 signature and submits this signature to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
|
|
55
|
+
* 2) **Gas-sponsorship:** The `owner` does an off-chain EIP-712 signature and submits this signature to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`). Here, another wallet address is set as `sender`. This wallet will sign, submit and cover the gas fees of the transaction.
|
|
56
56
|
*
|
|
57
57
|
* The creation of an Earn Account itself can be a gas-sponsored transaction by setting the `sender` to the wallet which will sign and send the transaction.
|
|
58
58
|
*/
|
|
@@ -63,14 +63,14 @@ class Earn extends sdks_js_1.ClientSDK {
|
|
|
63
63
|
* Transfer tokens to/from account
|
|
64
64
|
*
|
|
65
65
|
* @remarks
|
|
66
|
-
* Transfer tokens to and from
|
|
66
|
+
* Transfer tokens to and from an Earn Account.
|
|
67
67
|
*
|
|
68
68
|
* If `DEPOSIT`'` is selected, tokens will be transferred from the `owner`'s wallet into their Earn Account.
|
|
69
69
|
*
|
|
70
70
|
* If `WITHDRAW` is selected, tokens will be transferred from the `owner`'s Earn Account into their wallet.
|
|
71
71
|
*
|
|
72
|
-
* If a gas-sponsored `DEPOSIT` transfer is desired for a given token, a one-time Permit2 allowance must be set before proceeding. This is common practice for many other applications and, for many
|
|
73
|
-
* Once the one-time allowance is set for a given token, EIP-712 typed data will be returned and can be signed off-chain by the user. This signature can then be submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
|
|
72
|
+
* If a gas-sponsored `DEPOSIT` transfer is desired for a given token, a one-time Permit2 allowance must be set before proceeding. This is common practice for many other applications and, for many `owner`s, this one-time allowance will already have been set for the token they would like to transfer.
|
|
73
|
+
* Once the one-time allowance is set for a given token and `gas_sponsorship` is set to 'true', EIP-712 typed data will be returned and can be signed off-chain by the user. This signature can then be submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`) where a `sender` can be set for the transaction.
|
|
74
74
|
*/
|
|
75
75
|
async earnTransfer(request, options) {
|
|
76
76
|
return (0, fp_js_1.unwrapAsync)((0, earnEarnTransfer_js_1.earnEarnTransfer)(this, request, options));
|
|
@@ -89,9 +89,9 @@ class Earn extends sdks_js_1.ClientSDK {
|
|
|
89
89
|
*
|
|
90
90
|
* If `WITHDRAW` is selected, tokens will be withdrawn from the market to the `owner`'s Earn Account.
|
|
91
91
|
*
|
|
92
|
-
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as a `FIXED` amount or a `PERCENTAGE`.
|
|
92
|
+
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as a `FIXED` amount or a `PERCENTAGE` of `amount`.
|
|
93
93
|
*
|
|
94
|
-
* The transaction can be gas-sponsored by an arbitrary wallet address
|
|
94
|
+
* The transaction can be gas-sponsored by an arbitrary wallet address which will sign, submit and pay the required gas for the transaction. If `gas_sponsorship` is set to `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`) where the `sender` of the transaction can be set.
|
|
95
95
|
*/
|
|
96
96
|
async earnManage(request, options) {
|
|
97
97
|
return (0, fp_js_1.unwrapAsync)((0, earnEarnManage_js_1.earnEarnManage)(this, request, options));
|
|
@@ -12,15 +12,15 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* Create earn account
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Create
|
|
15
|
+
* Create an Earn Account.
|
|
16
16
|
*
|
|
17
|
-
* Before creating Earn positions
|
|
17
|
+
* Before creating Earn positions, the `owner` must create an Earn Account associated with their wallet address.
|
|
18
18
|
*
|
|
19
19
|
* Only the `owner` has the authority to sign transactions for this account. This can be done in one of two ways:
|
|
20
20
|
*
|
|
21
|
-
* 1) The `owner` signs
|
|
21
|
+
* 1) **No gas-sponsorship:** The `owner` signs a transaction and submits it to the network for execution. The `owner` covers the cost of gas in this case.
|
|
22
22
|
*
|
|
23
|
-
* 2) The `owner` does an off-chain EIP-712 signature and submits this signature to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
|
|
23
|
+
* 2) **Gas-sponsorship:** The `owner` does an off-chain EIP-712 signature and submits this signature to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`). Here, another wallet address is set as `sender`. This wallet will sign, submit and cover the gas fees of the transaction.
|
|
24
24
|
*
|
|
25
25
|
* The creation of an Earn Account itself can be a gas-sponsored transaction by setting the `sender` to the wallet which will sign and send the transaction.
|
|
26
26
|
*/
|
|
@@ -14,15 +14,15 @@ import { APIPromise } from "../types/async.js";
|
|
|
14
14
|
* Create earn account
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
|
-
* Create
|
|
17
|
+
* Create an Earn Account.
|
|
18
18
|
*
|
|
19
|
-
* Before creating Earn positions
|
|
19
|
+
* Before creating Earn positions, the `owner` must create an Earn Account associated with their wallet address.
|
|
20
20
|
*
|
|
21
21
|
* Only the `owner` has the authority to sign transactions for this account. This can be done in one of two ways:
|
|
22
22
|
*
|
|
23
|
-
* 1) The `owner` signs
|
|
23
|
+
* 1) **No gas-sponsorship:** The `owner` signs a transaction and submits it to the network for execution. The `owner` covers the cost of gas in this case.
|
|
24
24
|
*
|
|
25
|
-
* 2) The `owner` does an off-chain EIP-712 signature and submits this signature to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
|
|
25
|
+
* 2) **Gas-sponsorship:** The `owner` does an off-chain EIP-712 signature and submits this signature to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`). Here, another wallet address is set as `sender`. This wallet will sign, submit and cover the gas fees of the transaction.
|
|
26
26
|
*
|
|
27
27
|
* The creation of an Earn Account itself can be a gas-sponsored transaction by setting the `sender` to the wallet which will sign and send the transaction.
|
|
28
28
|
*/
|
|
@@ -22,9 +22,9 @@ import { Result } from "../types/fp.js";
|
|
|
22
22
|
*
|
|
23
23
|
* If `WITHDRAW` is selected, tokens will be withdrawn from the market to the `owner`'s Earn Account.
|
|
24
24
|
*
|
|
25
|
-
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as a `FIXED` amount or a `PERCENTAGE`.
|
|
25
|
+
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as a `FIXED` amount or a `PERCENTAGE` of `amount`.
|
|
26
26
|
*
|
|
27
|
-
* The transaction can be gas-sponsored by an arbitrary wallet address
|
|
27
|
+
* The transaction can be gas-sponsored by an arbitrary wallet address which will sign, submit and pay the required gas for the transaction. If `gas_sponsorship` is set to `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`) where the `sender` of the transaction can be set.
|
|
28
28
|
*/
|
|
29
29
|
export declare function earnEarnManage(client: CompassApiSDKCore, request: components.EarnManageRequest, options?: RequestOptions): APIPromise<Result<components.EarnManageResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
30
30
|
//# sourceMappingURL=earnEarnManage.d.ts.map
|
|
@@ -24,9 +24,9 @@ import { APIPromise } from "../types/async.js";
|
|
|
24
24
|
*
|
|
25
25
|
* If `WITHDRAW` is selected, tokens will be withdrawn from the market to the `owner`'s Earn Account.
|
|
26
26
|
*
|
|
27
|
-
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as a `FIXED` amount or a `PERCENTAGE`.
|
|
27
|
+
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as a `FIXED` amount or a `PERCENTAGE` of `amount`.
|
|
28
28
|
*
|
|
29
|
-
* The transaction can be gas-sponsored by an arbitrary wallet address
|
|
29
|
+
* The transaction can be gas-sponsored by an arbitrary wallet address which will sign, submit and pay the required gas for the transaction. If `gas_sponsorship` is set to `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`) where the `sender` of the transaction can be set.
|
|
30
30
|
*/
|
|
31
31
|
export function earnEarnManage(client, request, options) {
|
|
32
32
|
return new APIPromise($do(client, request, options));
|
|
@@ -10,7 +10,7 @@ import * as operations from "../models/operations/index.js";
|
|
|
10
10
|
import { APIPromise } from "../types/async.js";
|
|
11
11
|
import { Result } from "../types/fp.js";
|
|
12
12
|
/**
|
|
13
|
-
* Get
|
|
13
|
+
* Get earn position
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
16
|
* This endpoint fetches a single Compass Earn position by its encoded ID.
|
|
@@ -12,7 +12,7 @@ import * as errors from "../models/errors/index.js";
|
|
|
12
12
|
import * as operations from "../models/operations/index.js";
|
|
13
13
|
import { APIPromise } from "../types/async.js";
|
|
14
14
|
/**
|
|
15
|
-
* Get
|
|
15
|
+
* Get earn position
|
|
16
16
|
*
|
|
17
17
|
* @remarks
|
|
18
18
|
* This endpoint fetches a single Compass Earn position by its encoded ID.
|
|
@@ -12,14 +12,14 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* Transfer tokens to/from account
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Transfer tokens to and from
|
|
15
|
+
* Transfer tokens to and from an Earn Account.
|
|
16
16
|
*
|
|
17
17
|
* If `DEPOSIT`'` is selected, tokens will be transferred from the `owner`'s wallet into their Earn Account.
|
|
18
18
|
*
|
|
19
19
|
* If `WITHDRAW` is selected, tokens will be transferred from the `owner`'s Earn Account into their wallet.
|
|
20
20
|
*
|
|
21
|
-
* If a gas-sponsored `DEPOSIT` transfer is desired for a given token, a one-time Permit2 allowance must be set before proceeding. This is common practice for many other applications and, for many
|
|
22
|
-
* Once the one-time allowance is set for a given token, EIP-712 typed data will be returned and can be signed off-chain by the user. This signature can then be submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
|
|
21
|
+
* If a gas-sponsored `DEPOSIT` transfer is desired for a given token, a one-time Permit2 allowance must be set before proceeding. This is common practice for many other applications and, for many `owner`s, this one-time allowance will already have been set for the token they would like to transfer.
|
|
22
|
+
* Once the one-time allowance is set for a given token and `gas_sponsorship` is set to 'true', EIP-712 typed data will be returned and can be signed off-chain by the user. This signature can then be submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`) where a `sender` can be set for the transaction.
|
|
23
23
|
*/
|
|
24
24
|
export declare function earnEarnTransfer(client: CompassApiSDKCore, request: components.EarnTransferRequest, options?: RequestOptions): APIPromise<Result<components.EarnTransferResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
25
25
|
//# sourceMappingURL=earnEarnTransfer.d.ts.map
|
|
@@ -14,14 +14,14 @@ import { APIPromise } from "../types/async.js";
|
|
|
14
14
|
* Transfer tokens to/from account
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
|
-
* Transfer tokens to and from
|
|
17
|
+
* Transfer tokens to and from an Earn Account.
|
|
18
18
|
*
|
|
19
19
|
* If `DEPOSIT`'` is selected, tokens will be transferred from the `owner`'s wallet into their Earn Account.
|
|
20
20
|
*
|
|
21
21
|
* If `WITHDRAW` is selected, tokens will be transferred from the `owner`'s Earn Account into their wallet.
|
|
22
22
|
*
|
|
23
|
-
* If a gas-sponsored `DEPOSIT` transfer is desired for a given token, a one-time Permit2 allowance must be set before proceeding. This is common practice for many other applications and, for many
|
|
24
|
-
* Once the one-time allowance is set for a given token, EIP-712 typed data will be returned and can be signed off-chain by the user. This signature can then be submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
|
|
23
|
+
* If a gas-sponsored `DEPOSIT` transfer is desired for a given token, a one-time Permit2 allowance must be set before proceeding. This is common practice for many other applications and, for many `owner`s, this one-time allowance will already have been set for the token they would like to transfer.
|
|
24
|
+
* Once the one-time allowance is set for a given token and `gas_sponsorship` is set to 'true', EIP-712 typed data will be returned and can be signed off-chain by the user. This signature can then be submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`) where a `sender` can be set for the transaction.
|
|
25
25
|
*/
|
|
26
26
|
export function earnEarnTransfer(client, request, options) {
|
|
27
27
|
return new APIPromise($do(client, request, options));
|
|
@@ -11,15 +11,15 @@ export const tool$earnEarnCreateAccount = {
|
|
|
11
11
|
name: "earn-earn-create-account",
|
|
12
12
|
description: `Create earn account
|
|
13
13
|
|
|
14
|
-
Create
|
|
14
|
+
Create an Earn Account.
|
|
15
15
|
|
|
16
|
-
Before creating Earn positions
|
|
16
|
+
Before creating Earn positions, the \`owner\` must create an Earn Account associated with their wallet address.
|
|
17
17
|
|
|
18
18
|
Only the \`owner\` has the authority to sign transactions for this account. This can be done in one of two ways:
|
|
19
19
|
|
|
20
|
-
1) The \`owner\` signs
|
|
20
|
+
1) **No gas-sponsorship:** The \`owner\` signs a transaction and submits it to the network for execution. The \`owner\` covers the cost of gas in this case.
|
|
21
21
|
|
|
22
|
-
2) The \`owner\` does an off-chain EIP-712 signature and submits this signature to the 'Prepare gas-sponsored transaction' endpoint (\`/gas_sponsorship/prepare\`).
|
|
22
|
+
2) **Gas-sponsorship:** The \`owner\` does an off-chain EIP-712 signature and submits this signature to the 'Prepare gas-sponsored transaction' endpoint (\`/gas_sponsorship/prepare\`). Here, another wallet address is set as \`sender\`. This wallet will sign, submit and cover the gas fees of the transaction.
|
|
23
23
|
|
|
24
24
|
The creation of an Earn Account itself can be a gas-sponsored transaction by setting the \`sender\` to the wallet which will sign and send the transaction.`,
|
|
25
25
|
args,
|
|
@@ -21,9 +21,9 @@ If \`DEPOSIT\` is selected for \`action\`, tokens will be deposited to the marke
|
|
|
21
21
|
|
|
22
22
|
If \`WITHDRAW\` is selected, tokens will be withdrawn from the market to the \`owner\`'s Earn Account.
|
|
23
23
|
|
|
24
|
-
A fee can be configured. This fee is deducted from the total \`amount\`. It can be expressed as a \`FIXED\` amount or a \`PERCENTAGE\`.
|
|
24
|
+
A fee can be configured. This fee is deducted from the total \`amount\`. It can be expressed as a \`FIXED\` amount or a \`PERCENTAGE\` of \`amount\`.
|
|
25
25
|
|
|
26
|
-
The transaction can be gas-sponsored by an arbitrary wallet address
|
|
26
|
+
The transaction can be gas-sponsored by an arbitrary wallet address which will sign, submit and pay the required gas for the transaction. If \`gas_sponsorship\` is set to \`true\`, EIP-712 typed data will be returned that must be signed by the \`owner\` and submitted to the 'Prepare gas-sponsored transaction' endpoint (\`/gas_sponsorship/prepare\`) where the \`sender\` of the transaction can be set.`,
|
|
27
27
|
args,
|
|
28
28
|
tool: async (client, args, ctx) => {
|
|
29
29
|
const [result, apiCall] = await earnEarnManage(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earnEarnManage.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/earnEarnManage.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAC;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,+BAA+B;CACpD,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAgC;IAC9D,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"earnEarnManage.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/earnEarnManage.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAC;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,+BAA+B;CACpD,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAgC;IAC9D,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE;;;;;;;;;;;;;;mZAcoY;IACjZ,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,cAAc,CAC5C,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"}
|
|
@@ -9,7 +9,7 @@ const args = {
|
|
|
9
9
|
};
|
|
10
10
|
export const tool$earnEarnPositionsPositionId = {
|
|
11
11
|
name: "earn-earn-positions-position-id",
|
|
12
|
-
description: `Get
|
|
12
|
+
description: `Get earn position
|
|
13
13
|
|
|
14
14
|
This endpoint fetches a single Compass Earn position by its encoded ID.`,
|
|
15
15
|
args,
|
|
@@ -11,14 +11,14 @@ export const tool$earnEarnTransfer = {
|
|
|
11
11
|
name: "earn-earn-transfer",
|
|
12
12
|
description: `Transfer tokens to/from account
|
|
13
13
|
|
|
14
|
-
Transfer tokens to and from
|
|
14
|
+
Transfer tokens to and from an Earn Account.
|
|
15
15
|
|
|
16
16
|
If \`DEPOSIT\`'\` is selected, tokens will be transferred from the \`owner\`'s wallet into their Earn Account.
|
|
17
17
|
|
|
18
18
|
If \`WITHDRAW\` is selected, tokens will be transferred from the \`owner\`'s Earn Account into their wallet.
|
|
19
19
|
|
|
20
|
-
If a gas-sponsored \`DEPOSIT\` transfer is desired for a given token, a one-time Permit2 allowance must be set before proceeding. This is common practice for many other applications and, for many
|
|
21
|
-
Once the one-time allowance is set for a given token, EIP-712 typed data will be returned and can be signed off-chain by the user. This signature can then be submitted to the 'Prepare gas-sponsored transaction' endpoint (\`/gas_sponsorship/prepare\`).`,
|
|
20
|
+
If a gas-sponsored \`DEPOSIT\` transfer is desired for a given token, a one-time Permit2 allowance must be set before proceeding. This is common practice for many other applications and, for many \`owner\`s, this one-time allowance will already have been set for the token they would like to transfer.
|
|
21
|
+
Once the one-time allowance is set for a given token and \`gas_sponsorship\` is set to 'true', EIP-712 typed data will be returned and can be signed off-chain by the user. This signature can then be submitted to the 'Prepare gas-sponsored transaction' endpoint (\`/gas_sponsorship/prepare\`) where a \`sender\` can be set for the transaction.`,
|
|
22
22
|
args,
|
|
23
23
|
tool: async (client, args, ctx) => {
|
|
24
24
|
const [result, apiCall] = await earnEarnTransfer(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earnEarnTransfer.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/earnEarnTransfer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAC;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,iCAAiC;CACtD,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAgC;IAChE,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"earnEarnTransfer.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/earnEarnTransfer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAC;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,iCAAiC;CACtD,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAgC;IAChE,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE;;;;;;;;;uVASwU;IACrV,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,gBAAgB,CAC9C,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"}
|