@compass-labs/api-sdk 2.1.26-rc.1 → 2.1.26-rc.11
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/codeSamples_typescript.yaml +1 -1
- package/dist/commonjs/funcs/earnEarnManage.d.ts +4 -1
- package/dist/commonjs/funcs/earnEarnManage.d.ts.map +1 -1
- package/dist/commonjs/funcs/earnEarnManage.js +4 -1
- package/dist/commonjs/funcs/earnEarnManage.js.map +1 -1
- package/dist/commonjs/funcs/earnEarnPositions.js +1 -2
- package/dist/commonjs/funcs/earnEarnPositions.js.map +1 -1
- package/dist/commonjs/models/components/aaveposition.d.ts +0 -4
- package/dist/commonjs/models/components/aaveposition.d.ts.map +1 -1
- package/dist/commonjs/models/components/aaveposition.js +0 -1
- package/dist/commonjs/models/components/aaveposition.js.map +1 -1
- package/dist/commonjs/models/components/compassapibackendv2modelsearnreadresponsepositionsvaultposition.d.ts +0 -4
- package/dist/commonjs/models/components/compassapibackendv2modelsearnreadresponsepositionsvaultposition.d.ts.map +1 -1
- package/dist/commonjs/models/components/compassapibackendv2modelsearnreadresponsepositionsvaultposition.js +0 -1
- package/dist/commonjs/models/components/compassapibackendv2modelsearnreadresponsepositionsvaultposition.js.map +1 -1
- package/dist/commonjs/models/components/depositevent.d.ts +0 -4
- package/dist/commonjs/models/components/depositevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/depositevent.js +0 -2
- package/dist/commonjs/models/components/depositevent.js.map +1 -1
- package/dist/commonjs/models/components/fee.d.ts +6 -5
- package/dist/commonjs/models/components/fee.d.ts.map +1 -1
- package/dist/commonjs/models/components/fee.js +2 -1
- package/dist/commonjs/models/components/fee.js.map +1 -1
- package/dist/commonjs/models/components/withdrawalevent.d.ts +0 -4
- package/dist/commonjs/models/components/withdrawalevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/withdrawalevent.js +0 -2
- package/dist/commonjs/models/components/withdrawalevent.js.map +1 -1
- package/dist/commonjs/models/operations/v2earnpositions.d.ts +3 -8
- package/dist/commonjs/models/operations/v2earnpositions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/v2earnpositions.js +1 -7
- package/dist/commonjs/models/operations/v2earnpositions.js.map +1 -1
- package/dist/commonjs/sdk/earn.d.ts +4 -1
- package/dist/commonjs/sdk/earn.d.ts.map +1 -1
- package/dist/commonjs/sdk/earn.js +4 -1
- package/dist/commonjs/sdk/earn.js.map +1 -1
- package/dist/esm/funcs/earnEarnManage.d.ts +4 -1
- package/dist/esm/funcs/earnEarnManage.d.ts.map +1 -1
- package/dist/esm/funcs/earnEarnManage.js +4 -1
- package/dist/esm/funcs/earnEarnManage.js.map +1 -1
- package/dist/esm/funcs/earnEarnPositions.js +1 -2
- package/dist/esm/funcs/earnEarnPositions.js.map +1 -1
- package/dist/esm/models/components/aaveposition.d.ts +0 -4
- package/dist/esm/models/components/aaveposition.d.ts.map +1 -1
- package/dist/esm/models/components/aaveposition.js +0 -1
- package/dist/esm/models/components/aaveposition.js.map +1 -1
- package/dist/esm/models/components/compassapibackendv2modelsearnreadresponsepositionsvaultposition.d.ts +0 -4
- package/dist/esm/models/components/compassapibackendv2modelsearnreadresponsepositionsvaultposition.d.ts.map +1 -1
- package/dist/esm/models/components/compassapibackendv2modelsearnreadresponsepositionsvaultposition.js +0 -1
- package/dist/esm/models/components/compassapibackendv2modelsearnreadresponsepositionsvaultposition.js.map +1 -1
- package/dist/esm/models/components/depositevent.d.ts +0 -4
- package/dist/esm/models/components/depositevent.d.ts.map +1 -1
- package/dist/esm/models/components/depositevent.js +0 -2
- package/dist/esm/models/components/depositevent.js.map +1 -1
- package/dist/esm/models/components/fee.d.ts +6 -5
- package/dist/esm/models/components/fee.d.ts.map +1 -1
- package/dist/esm/models/components/fee.js +2 -1
- package/dist/esm/models/components/fee.js.map +1 -1
- package/dist/esm/models/components/withdrawalevent.d.ts +0 -4
- package/dist/esm/models/components/withdrawalevent.d.ts.map +1 -1
- package/dist/esm/models/components/withdrawalevent.js +0 -2
- package/dist/esm/models/components/withdrawalevent.js.map +1 -1
- package/dist/esm/models/operations/v2earnpositions.d.ts +3 -8
- package/dist/esm/models/operations/v2earnpositions.d.ts.map +1 -1
- package/dist/esm/models/operations/v2earnpositions.js +1 -7
- package/dist/esm/models/operations/v2earnpositions.js.map +1 -1
- package/dist/esm/sdk/earn.d.ts +4 -1
- package/dist/esm/sdk/earn.d.ts.map +1 -1
- package/dist/esm/sdk/earn.js +4 -1
- package/dist/esm/sdk/earn.js.map +1 -1
- package/docs/models/components/aaveposition.md +0 -2
- package/docs/models/components/compassapibackendv2modelsearnreadresponsepositionsvaultposition.md +0 -2
- package/docs/models/components/denomination.md +2 -2
- package/docs/models/components/depositevent.md +7 -9
- package/docs/models/components/fee.md +5 -5
- package/docs/models/components/feeamount.md +1 -1
- package/docs/models/components/userposition.md +0 -2
- package/docs/models/components/withdrawalevent.md +9 -11
- package/docs/models/operations/v2earnpositionsrequest.md +2 -4
- package/docs/sdks/earn/README.md +6 -5
- package/package.json +1 -1
- package/src/funcs/earnEarnManage.ts +4 -1
- package/src/funcs/earnEarnPositions.ts +1 -2
- package/src/models/components/aaveposition.ts +0 -5
- package/src/models/components/compassapibackendv2modelsearnreadresponsepositionsvaultposition.ts +0 -5
- package/src/models/components/depositevent.ts +0 -8
- package/src/models/components/fee.ts +6 -5
- package/src/models/components/withdrawalevent.ts +0 -8
- package/src/models/operations/v2earnpositions.ts +4 -15
- package/src/sdk/earn.ts +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compassapibackendv2modelsearnreadresponsepositionsvaultposition.d.ts","sourceRoot":"","sources":["../../../../src/models/components/compassapibackendv2modelsearnreadresponsepositionsvaultposition.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,WAAW,EAA6B,MAAM,kBAAkB,CAAC;AAE1E,MAAM,MAAM,+DAA+D,GAAG;IAC5E;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"compassapibackendv2modelsearnreadresponsepositionsvaultposition.d.ts","sourceRoot":"","sources":["../../../../src/models/components/compassapibackendv2modelsearnreadresponsepositionsvaultposition.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,WAAW,EAA6B,MAAM,kBAAkB,CAAC;AAE1E,MAAM,MAAM,+DAA+D,GAAG;IAC5E;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,uBAAuB,EAAE,MAAM,CAAC;IAChC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,GAAG,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,6EAA6E,EACxF,CAAC,CAAC,OAAO,CACP,+DAA+D,EAC/D,CAAC,CAAC,UAAU,EACZ,OAAO,CAeP,CAAC;AAEL,wBAAgB,uEAAuE,CACrF,UAAU,EAAE,MAAM,GACjB,eAAe,CAChB,+DAA+D,EAC/D,kBAAkB,CACnB,CAQA"}
|
|
@@ -8,7 +8,6 @@ import { PositionPnL$inboundSchema } from "./positionpnl.js";
|
|
|
8
8
|
/** @internal */
|
|
9
9
|
export const CompassApiBackendV2ModelsEarnReadResponsePositionsVaultPosition$inboundSchema = z.object({
|
|
10
10
|
type: z.literal("VAULT"),
|
|
11
|
-
id: z.string(),
|
|
12
11
|
vault_address: z.string(),
|
|
13
12
|
amount_in_underlying_token: z.string(),
|
|
14
13
|
token_name: z.string(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compassapibackendv2modelsearnreadresponsepositionsvaultposition.js","sourceRoot":"","sources":["../../../../src/models/components/compassapibackendv2modelsearnreadresponsepositionsvaultposition.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAAe,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"compassapibackendv2modelsearnreadresponsepositionsvaultposition.js","sourceRoot":"","sources":["../../../../src/models/components/compassapibackendv2modelsearnreadresponsepositionsvaultposition.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAAe,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AA6B1E,gBAAgB;AAChB,MAAM,CAAC,MAAM,6EAA6E,GAKpF,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IACxB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,0BAA0B,EAAE,CAAC,CAAC,MAAM,EAAE;IACtC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC,QAAQ,EAAE;CACtD,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,eAAe,EAAE,cAAc;QAC/B,4BAA4B,EAAE,yBAAyB;QACvD,YAAY,EAAE,WAAW;QACzB,YAAY,EAAE,WAAW;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEL,MAAM,UAAU,uEAAuE,CACrF,UAAkB;IAKlB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,6EAA6E;SAC1E,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACzB,6FAA6F,CAC9F,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depositevent.d.ts","sourceRoot":"","sources":["../../../../src/models/components/depositevent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"depositevent.d.ts","sourceRoot":"","sources":["../../../../src/models/components/depositevent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAChD,YAAY,EACZ,CAAC,CAAC,UAAU,EACZ,OAAO,CAeP,CAAC;AAEH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAMnD"}
|
|
@@ -7,7 +7,6 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
/** @internal */
|
|
8
8
|
export const DepositEvent$inboundSchema = z.object({
|
|
9
9
|
block_number: z.number().int(),
|
|
10
|
-
block_timestamp: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
11
10
|
transaction_hash: z.string(),
|
|
12
11
|
assets_deposited: z.string(),
|
|
13
12
|
units_received: z.string(),
|
|
@@ -15,7 +14,6 @@ export const DepositEvent$inboundSchema = z.object({
|
|
|
15
14
|
}).transform((v) => {
|
|
16
15
|
return remap$(v, {
|
|
17
16
|
"block_number": "blockNumber",
|
|
18
|
-
"block_timestamp": "blockTimestamp",
|
|
19
17
|
"transaction_hash": "transactionHash",
|
|
20
18
|
"assets_deposited": "assetsDeposited",
|
|
21
19
|
"units_received": "unitsReceived",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depositevent.js","sourceRoot":"","sources":["../../../../src/models/components/depositevent.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"depositevent.js","sourceRoot":"","sources":["../../../../src/models/components/depositevent.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AA8BjD,gBAAgB;AAChB,MAAM,CAAC,MAAM,0BAA0B,GAInC,CAAC,CAAC,MAAM,CAAC;IACX,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC9B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,cAAc,EAAE,aAAa;QAC7B,kBAAkB,EAAE,iBAAiB;QACrC,kBAAkB,EAAE,iBAAiB;QACrC,gBAAgB,EAAE,eAAe;QACjC,eAAe,EAAE,aAAa;KAC/B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,oBAAoB,CAClC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,0BAA0B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACtD,0CAA0C,CAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
2
|
import { ClosedEnum } from "../../types/enums.js";
|
|
3
3
|
/**
|
|
4
|
-
* The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens).
|
|
4
|
+
* The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens). If `denomination` is 'PERFORMANCE', this is a percentage of realized profit calculated using FIFO cost basis (e.g., 10 for 10% of profit).
|
|
5
5
|
*/
|
|
6
6
|
export type FeeAmount = number | string;
|
|
7
7
|
/**
|
|
8
|
-
* The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount)
|
|
8
|
+
* The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount), 'FIXED' for a fixed token amount (e.g., 0.1 means 0.1 tokens), or 'PERFORMANCE' for a fee based on realized profit using FIFO cost basis (e.g., 10 means 10% of profit).
|
|
9
9
|
*/
|
|
10
10
|
export declare const Denomination: {
|
|
11
11
|
readonly Percentage: "PERCENTAGE";
|
|
12
12
|
readonly Fixed: "FIXED";
|
|
13
|
+
readonly Performance: "PERFORMANCE";
|
|
13
14
|
};
|
|
14
15
|
/**
|
|
15
|
-
* The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount)
|
|
16
|
+
* The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount), 'FIXED' for a fixed token amount (e.g., 0.1 means 0.1 tokens), or 'PERFORMANCE' for a fee based on realized profit using FIFO cost basis (e.g., 10 means 10% of profit).
|
|
16
17
|
*/
|
|
17
18
|
export type Denomination = ClosedEnum<typeof Denomination>;
|
|
18
19
|
export type Fee = {
|
|
@@ -21,11 +22,11 @@ export type Fee = {
|
|
|
21
22
|
*/
|
|
22
23
|
recipient: string;
|
|
23
24
|
/**
|
|
24
|
-
* The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens).
|
|
25
|
+
* The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens). If `denomination` is 'PERFORMANCE', this is a percentage of realized profit calculated using FIFO cost basis (e.g., 10 for 10% of profit).
|
|
25
26
|
*/
|
|
26
27
|
amount: number | string;
|
|
27
28
|
/**
|
|
28
|
-
* The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount)
|
|
29
|
+
* The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount), 'FIXED' for a fixed token amount (e.g., 0.1 means 0.1 tokens), or 'PERFORMANCE' for a fee based on realized profit using FIFO cost basis (e.g., 10 means 10% of profit).
|
|
29
30
|
*/
|
|
30
31
|
denomination?: Denomination | undefined;
|
|
31
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fee.d.ts","sourceRoot":"","sources":["../../../../src/models/components/fee.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"fee.d.ts","sourceRoot":"","sources":["../../../../src/models/components/fee.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3D,MAAM,MAAM,GAAG,GAAG;IAChB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjD,gBAAgB;AAChB,eAAO,MAAM,wBAAwB,EAAE,CAAC,CAAC,OAAO,CAC9C,kBAAkB,EAClB,CAAC,CAAC,UAAU,EACZ,SAAS,CAC0B,CAAC;AAEtC,wBAAgB,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAE5D;AAED,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,YAAY,CACjD,CAAC;AAE7B,gBAAgB;AAChB,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,kBAAkB,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,UAAU,EAAE,GAAG,CAKtE,CAAC;AAEL,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAE1C"}
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v3";
|
|
5
5
|
/**
|
|
6
|
-
* The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount)
|
|
6
|
+
* The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount), 'FIXED' for a fixed token amount (e.g., 0.1 means 0.1 tokens), or 'PERFORMANCE' for a fee based on realized profit using FIFO cost basis (e.g., 10 means 10% of profit).
|
|
7
7
|
*/
|
|
8
8
|
export const Denomination = {
|
|
9
9
|
Percentage: "PERCENTAGE",
|
|
10
10
|
Fixed: "FIXED",
|
|
11
|
+
Performance: "PERFORMANCE",
|
|
11
12
|
};
|
|
12
13
|
/** @internal */
|
|
13
14
|
export const FeeAmount$outboundSchema = z.union([z.number(), z.string()]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fee.js","sourceRoot":"","sources":["../../../../src/models/components/fee.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAQ5B;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,UAAU,EAAE,YAAY;IACxB,KAAK,EAAE,OAAO;
|
|
1
|
+
{"version":3,"file":"fee.js","sourceRoot":"","sources":["../../../../src/models/components/fee.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAQ5B;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,UAAU,EAAE,YAAY;IACxB,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,aAAa;CAClB,CAAC;AAwBX,gBAAgB;AAChB,MAAM,CAAC,MAAM,wBAAwB,GAIjC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAEtC,MAAM,UAAU,eAAe,CAAC,SAAoB;IAClD,OAAO,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;AACnE,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,2BAA2B,GACtC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AAS7B,gBAAgB;AAChB,MAAM,CAAC,MAAM,kBAAkB,GAA+C,CAAC;KAC5E,MAAM,CAAC;IACN,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,YAAY,EAAE,2BAA2B,CAAC,QAAQ,EAAE;CACrD,CAAC,CAAC;AAEL,MAAM,UAAU,SAAS,CAAC,GAAQ;IAChC,OAAO,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawalevent.d.ts","sourceRoot":"","sources":["../../../../src/models/components/withdrawalevent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"withdrawalevent.d.ts","sourceRoot":"","sources":["../../../../src/models/components/withdrawalevent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,OAAO,CACnD,eAAe,EACf,CAAC,CAAC,UAAU,EACZ,OAAO,CAmBP,CAAC;AAEH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAMtD"}
|
|
@@ -7,7 +7,6 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
/** @internal */
|
|
8
8
|
export const WithdrawalEvent$inboundSchema = z.object({
|
|
9
9
|
block_number: z.number().int(),
|
|
10
|
-
block_timestamp: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
11
10
|
transaction_hash: z.string(),
|
|
12
11
|
assets_received: z.string(),
|
|
13
12
|
units_withdrawn: z.string(),
|
|
@@ -17,7 +16,6 @@ export const WithdrawalEvent$inboundSchema = z.object({
|
|
|
17
16
|
}).transform((v) => {
|
|
18
17
|
return remap$(v, {
|
|
19
18
|
"block_number": "blockNumber",
|
|
20
|
-
"block_timestamp": "blockTimestamp",
|
|
21
19
|
"transaction_hash": "transactionHash",
|
|
22
20
|
"assets_received": "assetsReceived",
|
|
23
21
|
"units_withdrawn": "unitsWithdrawn",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawalevent.js","sourceRoot":"","sources":["../../../../src/models/components/withdrawalevent.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAs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@@ export type V2EarnPositionsRequest = {
|
|
|
17
17
|
limit?: number | undefined;
|
|
18
18
|
chain: V2EarnPositionsChain;
|
|
19
19
|
/**
|
|
20
|
-
* The address of the
|
|
20
|
+
* The address of the owner of the earn account to get positions for.
|
|
21
21
|
*/
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* How many days back from the current time to include in the blockchain scan.
|
|
25
|
-
*/
|
|
26
|
-
days?: number | undefined;
|
|
22
|
+
owner: string;
|
|
27
23
|
};
|
|
28
24
|
/** @internal */
|
|
29
25
|
export declare const V2EarnPositionsChain$outboundSchema: z.ZodNativeEnum<typeof V2EarnPositionsChain>;
|
|
@@ -32,8 +28,7 @@ export type V2EarnPositionsRequest$Outbound = {
|
|
|
32
28
|
offset?: number | undefined;
|
|
33
29
|
limit?: number | undefined;
|
|
34
30
|
chain: string;
|
|
35
|
-
|
|
36
|
-
days?: number | undefined;
|
|
31
|
+
owner: string;
|
|
37
32
|
};
|
|
38
33
|
/** @internal */
|
|
39
34
|
export declare const V2EarnPositionsRequest$outboundSchema: z.ZodType<V2EarnPositionsRequest$Outbound, z.ZodTypeDef, V2EarnPositionsRequest>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2earnpositions.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/v2earnpositions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"v2earnpositions.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/v2earnpositions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,eAAO,MAAM,oBAAoB;;;;CAIvB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE3E,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,KAAK,EAAE,oBAAoB,CAAC;IAC5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,aAAa,CAC/D,OAAO,oBAAoB,CACS,CAAC;AAEvC,gBAAgB;AAChB,MAAM,MAAM,+BAA+B,GAAG;IAC5C,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,qCAAqC,EAAE,CAAC,CAAC,OAAO,CAC3D,+BAA+B,EAC/B,CAAC,CAAC,UAAU,EACZ,sBAAsB,CAMtB,CAAC;AAEH,wBAAgB,4BAA4B,CAC1C,sBAAsB,EAAE,sBAAsB,GAC7C,MAAM,CAIR"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v3";
|
|
5
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
5
|
export const V2EarnPositionsChain = {
|
|
7
6
|
Arbitrum: "arbitrum",
|
|
8
7
|
Base: "base",
|
|
@@ -15,12 +14,7 @@ export const V2EarnPositionsRequest$outboundSchema = z.object({
|
|
|
15
14
|
offset: z.number().int().optional(),
|
|
16
15
|
limit: z.number().int().optional(),
|
|
17
16
|
chain: V2EarnPositionsChain$outboundSchema,
|
|
18
|
-
|
|
19
|
-
days: z.number().int().optional(),
|
|
20
|
-
}).transform((v) => {
|
|
21
|
-
return remap$(v, {
|
|
22
|
-
userAddress: "user_address",
|
|
23
|
-
});
|
|
17
|
+
owner: z.string(),
|
|
24
18
|
});
|
|
25
19
|
export function v2EarnPositionsRequestToJSON(v2EarnPositionsRequest) {
|
|
26
20
|
return JSON.stringify(V2EarnPositionsRequest$outboundSchema.parse(v2EarnPositionsRequest));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2earnpositions.js","sourceRoot":"","sources":["../../../../src/models/operations/v2earnpositions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"v2earnpositions.js","sourceRoot":"","sources":["../../../../src/models/operations/v2earnpositions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;CACZ,CAAC;AAmBX,gBAAgB;AAChB,MAAM,CAAC,MAAM,mCAAmC,GAE5C,CAAC,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAUvC,gBAAgB;AAChB,MAAM,CAAC,MAAM,qCAAqC,GAI9C,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACnC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAClC,KAAK,EAAE,mCAAmC;IAC1C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAEH,MAAM,UAAU,4BAA4B,CAC1C,sBAA8C;IAE9C,OAAO,IAAI,CAAC,SAAS,CACnB,qCAAqC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CACpE,CAAC;AACJ,CAAC"}
|
package/dist/esm/sdk/earn.d.ts
CHANGED
|
@@ -81,7 +81,10 @@ export declare class Earn extends ClientSDK {
|
|
|
81
81
|
*
|
|
82
82
|
* If `WITHDRAW` is selected for `action`, tokens will be withdrawn from the selected venue address back into the Earn Account associated with the `owner` wallet.
|
|
83
83
|
*
|
|
84
|
-
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as
|
|
84
|
+
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as:
|
|
85
|
+
* - `FIXED`: a fixed token amount (e.g., 0.1 means 0.1 tokens)
|
|
86
|
+
* - `PERCENTAGE`: a percentage of the transaction amount (e.g., 1.5 means 1.5%)
|
|
87
|
+
* - `PERFORMANCE`: a percentage of realized profit using FIFO cost basis (e.g., 10 means 10% of profit). Only applicable for withdrawals.
|
|
85
88
|
*
|
|
86
89
|
* 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.
|
|
87
90
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earn.d.ts","sourceRoot":"","sources":["../../../src/sdk/earn.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,IAAK,SAAQ,SAAS;IACjC;;;;;OAKG;IACG,aAAa,CACjB,OAAO,EAAE,UAAU,CAAC,sBAAsB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQ5C;;;;;;;OAOG;IACG,UAAU,CACd,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAA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AAiB,CACrB,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQ5C;;;;;;;;;;;;OAYG;IACG,YAAY,CAChB,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC;IAQ3C;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACG,UAAU,CACd,OAAO,EAAE,UAAU,CAAC,iBAAiB,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAQzC;;;;;OAKG;IACG,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,eAAe,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC;IAQvC;;;;;;;;;;;;;;;;;;OAkBG;IACG,UAAU,CACd,OAAO,EAAE,UAAU,CAAC,eAAe,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC;CAOxC"}
|
package/dist/esm/sdk/earn.js
CHANGED
|
@@ -101,7 +101,10 @@ export class Earn extends ClientSDK {
|
|
|
101
101
|
*
|
|
102
102
|
* If `WITHDRAW` is selected for `action`, tokens will be withdrawn from the selected venue address back into the Earn Account associated with the `owner` wallet.
|
|
103
103
|
*
|
|
104
|
-
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as
|
|
104
|
+
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as:
|
|
105
|
+
* - `FIXED`: a fixed token amount (e.g., 0.1 means 0.1 tokens)
|
|
106
|
+
* - `PERCENTAGE`: a percentage of the transaction amount (e.g., 1.5 means 1.5%)
|
|
107
|
+
* - `PERFORMANCE`: a percentage of realized profit using FIFO cost basis (e.g., 10 means 10% of profit). Only applicable for withdrawals.
|
|
105
108
|
*
|
|
106
109
|
* 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.
|
|
107
110
|
*/
|
package/dist/esm/sdk/earn.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earn.js","sourceRoot":"","sources":["../../../src/sdk/earn.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,IAAK,SAAQ,SAAS;IACjC;;;;;OAKG;IACH,KAAK,CAAC,aAAa,CACjB,OAA0C,EAC1C,OAAwB;QAExB,OAAO,WAAW,CAAC,iBAAiB,CAClC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,UAAU,CACd,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,cAAc,CAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAC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Ac,CAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -7,7 +7,6 @@ import { AavePosition } from "@compass-labs/api-sdk/models/components";
|
|
|
7
7
|
|
|
8
8
|
let value: AavePosition = {
|
|
9
9
|
type: "AAVE",
|
|
10
|
-
id: "<id>",
|
|
11
10
|
amountInUnderlyingToken: "<value>",
|
|
12
11
|
tokenName: "<value>",
|
|
13
12
|
};
|
|
@@ -18,7 +17,6 @@ let value: AavePosition = {
|
|
|
18
17
|
| Field | Type | Required | Description | Example |
|
|
19
18
|
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
|
|
20
19
|
| `type` | *"AAVE"* | :heavy_check_mark: | The market type discriminator. | |
|
|
21
|
-
| `id` | *string* | :heavy_check_mark: | Base64-encoded position identifier. | |
|
|
22
20
|
| `vaultAddress` | *"None"* | :heavy_minus_sign: | N/A | None |
|
|
23
21
|
| `amountInUnderlyingToken` | *string* | :heavy_check_mark: | The user's position value denominated in the supplied asset. | |
|
|
24
22
|
| `tokenName` | *string* | :heavy_check_mark: | Symbol of the Aave reserve asset (e.g., USDC). | |
|
package/docs/models/components/compassapibackendv2modelsearnreadresponsepositionsvaultposition.md
CHANGED
|
@@ -7,7 +7,6 @@ import { CompassApiBackendV2ModelsEarnReadResponsePositionsVaultPosition } from
|
|
|
7
7
|
|
|
8
8
|
let value: CompassApiBackendV2ModelsEarnReadResponsePositionsVaultPosition = {
|
|
9
9
|
type: "VAULT",
|
|
10
|
-
id: "<id>",
|
|
11
10
|
vaultAddress: "<value>",
|
|
12
11
|
amountInUnderlyingToken: "<value>",
|
|
13
12
|
tokenName: "<value>",
|
|
@@ -20,7 +19,6 @@ let value: CompassApiBackendV2ModelsEarnReadResponsePositionsVaultPosition = {
|
|
|
20
19
|
| Field | Type | Required | Description |
|
|
21
20
|
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
|
|
22
21
|
| `type` | *"VAULT"* | :heavy_check_mark: | The market type discriminator. |
|
|
23
|
-
| `id` | *string* | :heavy_check_mark: | Base64-encoded position identifier. |
|
|
24
22
|
| `vaultAddress` | *string* | :heavy_check_mark: | The vault address you are depositing to. |
|
|
25
23
|
| `amountInUnderlyingToken` | *string* | :heavy_check_mark: | The user's position value denominated in the underlying token. |
|
|
26
24
|
| `tokenName` | *string* | :heavy_check_mark: | Symbol of the underlying token (e.g., USDC). |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Denomination
|
|
2
2
|
|
|
3
|
-
The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount)
|
|
3
|
+
The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount), 'FIXED' for a fixed token amount (e.g., 0.1 means 0.1 tokens), or 'PERFORMANCE' for a fee based on realized profit using FIFO cost basis (e.g., 10 means 10% of profit).
|
|
4
4
|
|
|
5
5
|
## Example Usage
|
|
6
6
|
|
|
@@ -13,5 +13,5 @@ let value: Denomination = "PERCENTAGE";
|
|
|
13
13
|
## Values
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
"PERCENTAGE" | "FIXED"
|
|
16
|
+
"PERCENTAGE" | "FIXED" | "PERFORMANCE"
|
|
17
17
|
```
|
|
@@ -9,7 +9,6 @@ import { DepositEvent } from "@compass-labs/api-sdk/models/components";
|
|
|
9
9
|
|
|
10
10
|
let value: DepositEvent = {
|
|
11
11
|
blockNumber: 328246,
|
|
12
|
-
blockTimestamp: new Date("2026-02-17T17:21:39.534Z"),
|
|
13
12
|
transactionHash: "<value>",
|
|
14
13
|
assetsDeposited: "<value>",
|
|
15
14
|
unitsReceived: "<value>",
|
|
@@ -19,11 +18,10 @@ let value: DepositEvent = {
|
|
|
19
18
|
|
|
20
19
|
## Fields
|
|
21
20
|
|
|
22
|
-
| Field
|
|
23
|
-
|
|
|
24
|
-
| `blockNumber`
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `costPerUnit` | *string* | :heavy_check_mark: | Cost basis per unit at time of deposit |
|
|
21
|
+
| Field | Type | Required | Description |
|
|
22
|
+
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
|
|
23
|
+
| `blockNumber` | *number* | :heavy_check_mark: | Block number when deposit occurred |
|
|
24
|
+
| `transactionHash` | *string* | :heavy_check_mark: | Transaction hash of the deposit |
|
|
25
|
+
| `assetsDeposited` | *string* | :heavy_check_mark: | Amount of underlying asset deposited |
|
|
26
|
+
| `unitsReceived` | *string* | :heavy_check_mark: | Shares (vault) or aTokens (Aave) received |
|
|
27
|
+
| `costPerUnit` | *string* | :heavy_check_mark: | Cost basis per unit at time of deposit |
|
|
@@ -14,8 +14,8 @@ let value: Fee = {
|
|
|
14
14
|
|
|
15
15
|
## Fields
|
|
16
16
|
|
|
17
|
-
| Field
|
|
18
|
-
|
|
|
19
|
-
| `recipient`
|
|
20
|
-
| `amount`
|
|
21
|
-
| `denomination`
|
|
17
|
+
| Field | Type | Required | Description | Example |
|
|
18
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
19
|
+
| `recipient` | *string* | :heavy_check_mark: | The wallet address that will receive the fee. | |
|
|
20
|
+
| `amount` | *components.FeeAmount* | :heavy_check_mark: | The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens). If `denomination` is 'PERFORMANCE', this is a percentage of realized profit calculated using FIFO cost basis (e.g., 10 for 10% of profit). | |
|
|
21
|
+
| `denomination` | [components.Denomination](../../models/components/denomination.md) | :heavy_minus_sign: | The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount), 'FIXED' for a fixed token amount (e.g., 0.1 means 0.1 tokens), or 'PERFORMANCE' for a fee based on realized profit using FIFO cost basis (e.g., 10 means 10% of profit). | PERCENTAGE |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FeeAmount
|
|
2
2
|
|
|
3
|
-
The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens).
|
|
3
|
+
The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens). If `denomination` is 'PERFORMANCE', this is a percentage of realized profit calculated using FIFO cost basis (e.g., 10 for 10% of profit).
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
## Supported Types
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
```typescript
|
|
9
9
|
const value: components.AavePosition = {
|
|
10
10
|
type: "AAVE",
|
|
11
|
-
id: "<id>",
|
|
12
11
|
amountInUnderlyingToken: "<value>",
|
|
13
12
|
tokenName: "<value>",
|
|
14
13
|
};
|
|
@@ -20,7 +19,6 @@ const value: components.AavePosition = {
|
|
|
20
19
|
const value:
|
|
21
20
|
components.CompassApiBackendV2ModelsEarnReadResponsePositionsVaultPosition = {
|
|
22
21
|
type: "VAULT",
|
|
23
|
-
id: "<id>",
|
|
24
22
|
vaultAddress: "<value>",
|
|
25
23
|
amountInUnderlyingToken: "<value>",
|
|
26
24
|
tokenName: "<value>",
|
|
@@ -9,7 +9,6 @@ import { WithdrawalEvent } from "@compass-labs/api-sdk/models/components";
|
|
|
9
9
|
|
|
10
10
|
let value: WithdrawalEvent = {
|
|
11
11
|
blockNumber: 460436,
|
|
12
|
-
blockTimestamp: new Date("2026-06-27T20:19:44.790Z"),
|
|
13
12
|
transactionHash: "<value>",
|
|
14
13
|
assetsReceived: "<value>",
|
|
15
14
|
unitsWithdrawn: "<value>",
|
|
@@ -21,13 +20,12 @@ let value: WithdrawalEvent = {
|
|
|
21
20
|
|
|
22
21
|
## Fields
|
|
23
22
|
|
|
24
|
-
| Field
|
|
25
|
-
|
|
|
26
|
-
| `blockNumber`
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `feeCharged` | *string* | :heavy_check_mark: | Performance fee charged on this withdrawal |
|
|
23
|
+
| Field | Type | Required | Description |
|
|
24
|
+
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
|
|
25
|
+
| `blockNumber` | *number* | :heavy_check_mark: | Block number when withdrawal occurred |
|
|
26
|
+
| `transactionHash` | *string* | :heavy_check_mark: | Transaction hash of the withdrawal |
|
|
27
|
+
| `assetsReceived` | *string* | :heavy_check_mark: | Amount of underlying asset received |
|
|
28
|
+
| `unitsWithdrawn` | *string* | :heavy_check_mark: | Shares (vault) or aTokens (Aave) burned |
|
|
29
|
+
| `costBasisConsumed` | *string* | :heavy_check_mark: | FIFO cost basis of units withdrawn |
|
|
30
|
+
| `realizedPnl` | *string* | :heavy_check_mark: | Profit/loss: assets_received - cost_basis_consumed |
|
|
31
|
+
| `feeCharged` | *string* | :heavy_check_mark: | Performance fee charged on this withdrawal |
|
|
@@ -9,8 +9,7 @@ let value: V2EarnPositionsRequest = {
|
|
|
9
9
|
offset: 0,
|
|
10
10
|
limit: 100,
|
|
11
11
|
chain: "base",
|
|
12
|
-
|
|
13
|
-
days: 30,
|
|
12
|
+
owner: "0x673C9Cc7D4e2C91bE83D1f556e8e224E6AdDEF12",
|
|
14
13
|
};
|
|
15
14
|
```
|
|
16
15
|
|
|
@@ -21,5 +20,4 @@ let value: V2EarnPositionsRequest = {
|
|
|
21
20
|
| `offset` | *number* | :heavy_minus_sign: | The offset of the first item to return. | 0 |
|
|
22
21
|
| `limit` | *number* | :heavy_minus_sign: | The number of items to return. | 100 |
|
|
23
22
|
| `chain` | [operations.V2EarnPositionsChain](../../models/operations/v2earnpositionschain.md) | :heavy_check_mark: | N/A | base |
|
|
24
|
-
| `
|
|
25
|
-
| `days` | *number* | :heavy_minus_sign: | How many days back from the current time to include in the blockchain scan. | 30 |
|
|
23
|
+
| `owner` | *string* | :heavy_check_mark: | The address of the owner of the earn account to get positions for. | 0x673C9Cc7D4e2C91bE83D1f556e8e224E6AdDEF12 |
|
package/docs/sdks/earn/README.md
CHANGED
|
@@ -32,8 +32,7 @@ async function run() {
|
|
|
32
32
|
offset: 0,
|
|
33
33
|
limit: 100,
|
|
34
34
|
chain: "base",
|
|
35
|
-
|
|
36
|
-
days: 30,
|
|
35
|
+
owner: "0x673C9Cc7D4e2C91bE83D1f556e8e224E6AdDEF12",
|
|
37
36
|
});
|
|
38
37
|
|
|
39
38
|
console.log(result);
|
|
@@ -61,8 +60,7 @@ async function run() {
|
|
|
61
60
|
offset: 0,
|
|
62
61
|
limit: 100,
|
|
63
62
|
chain: "base",
|
|
64
|
-
|
|
65
|
-
days: 30,
|
|
63
|
+
owner: "0x673C9Cc7D4e2C91bE83D1f556e8e224E6AdDEF12",
|
|
66
64
|
});
|
|
67
65
|
if (res.ok) {
|
|
68
66
|
const { value: result } = res;
|
|
@@ -447,7 +445,10 @@ If `DEPOSIT` is selected for `action`, tokens will be deposited into the selecte
|
|
|
447
445
|
|
|
448
446
|
If `WITHDRAW` is selected for `action`, tokens will be withdrawn from the selected venue address back into the Earn Account associated with the `owner` wallet.
|
|
449
447
|
|
|
450
|
-
A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as
|
|
448
|
+
A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as:
|
|
449
|
+
- `FIXED`: a fixed token amount (e.g., 0.1 means 0.1 tokens)
|
|
450
|
+
- `PERCENTAGE`: a percentage of the transaction amount (e.g., 1.5 means 1.5%)
|
|
451
|
+
- `PERFORMANCE`: a percentage of realized profit using FIFO cost basis (e.g., 10 means 10% of profit). Only applicable for withdrawals.
|
|
451
452
|
|
|
452
453
|
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.
|
|
453
454
|
|
package/package.json
CHANGED
|
@@ -41,7 +41,10 @@ import { Result } from "../types/fp.js";
|
|
|
41
41
|
*
|
|
42
42
|
* If `WITHDRAW` is selected for `action`, tokens will be withdrawn from the selected venue address back into the Earn Account associated with the `owner` wallet.
|
|
43
43
|
*
|
|
44
|
-
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as
|
|
44
|
+
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as:
|
|
45
|
+
* - `FIXED`: a fixed token amount (e.g., 0.1 means 0.1 tokens)
|
|
46
|
+
* - `PERCENTAGE`: a percentage of the transaction amount (e.g., 1.5 means 1.5%)
|
|
47
|
+
* - `PERFORMANCE`: a percentage of realized profit using FIFO cost basis (e.g., 10 means 10% of profit). Only applicable for withdrawals.
|
|
45
48
|
*
|
|
46
49
|
* 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.
|
|
47
50
|
*/
|
|
@@ -93,10 +93,9 @@ async function $do(
|
|
|
93
93
|
|
|
94
94
|
const query = encodeFormQuery({
|
|
95
95
|
"chain": payload.chain,
|
|
96
|
-
"days": payload.days,
|
|
97
96
|
"limit": payload.limit,
|
|
98
97
|
"offset": payload.offset,
|
|
99
|
-
"
|
|
98
|
+
"owner": payload.owner,
|
|
100
99
|
});
|
|
101
100
|
|
|
102
101
|
const headers = new Headers(compactMap({
|