@pear-protocol/core-sdk 2.14.1 → 2.16.0
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/dist/core/index.d.ts +740 -167
- package/dist/core/index.js +27 -0
- package/dist/vaults/index.d.ts +2 -2
- package/package.json +3 -3
package/dist/core/index.js
CHANGED
|
@@ -205,12 +205,14 @@ class Core {
|
|
|
205
205
|
}, "get")
|
|
206
206
|
};
|
|
207
207
|
fills = {
|
|
208
|
+
/** Read one position's assigned quantities and fees at the original receipt price. */
|
|
208
209
|
details: /* @__PURE__ */ __name(async (positionId, headers) => {
|
|
209
210
|
return await this.client.fetch(`/fills/${positionId}`, {
|
|
210
211
|
method: "GET",
|
|
211
212
|
headers
|
|
212
213
|
});
|
|
213
214
|
}, "details"),
|
|
215
|
+
/** Page raw receipts with all position assignments, leaving query defaults to the server. */
|
|
214
216
|
list: /* @__PURE__ */ __name(async (query, headers) => {
|
|
215
217
|
return await this.client.fetch(`/fills`, {
|
|
216
218
|
method: "GET",
|
|
@@ -218,6 +220,7 @@ class Core {
|
|
|
218
220
|
query
|
|
219
221
|
});
|
|
220
222
|
}, "list"),
|
|
223
|
+
/** Read account-owned provisional receipts awaiting fee collection. */
|
|
221
224
|
provisionals: /* @__PURE__ */ __name(async (headers) => {
|
|
222
225
|
return await this.client.fetch(`/fills/provisionals-lite`, {
|
|
223
226
|
method: "GET",
|
|
@@ -505,6 +508,30 @@ class Core {
|
|
|
505
508
|
});
|
|
506
509
|
}, "referees")
|
|
507
510
|
};
|
|
511
|
+
rewards = {
|
|
512
|
+
/** Return the authenticated referrer's reward accrual and payout availability. */
|
|
513
|
+
summary: /* @__PURE__ */ __name(async (headers) => {
|
|
514
|
+
return await this.client.fetch(`/rewards`, {
|
|
515
|
+
method: "GET",
|
|
516
|
+
headers
|
|
517
|
+
});
|
|
518
|
+
}, "summary"),
|
|
519
|
+
/** Create or resume the referrer's reward claim (session login only); an in-flight claim keeps its stored destination. */
|
|
520
|
+
claim: /* @__PURE__ */ __name(async (body, headers) => {
|
|
521
|
+
return await this.client.fetch(`/rewards/claims`, {
|
|
522
|
+
method: "POST",
|
|
523
|
+
headers,
|
|
524
|
+
body
|
|
525
|
+
});
|
|
526
|
+
}, "claim"),
|
|
527
|
+
/** Return the lifecycle of one reward claim owned by the authenticated referrer. */
|
|
528
|
+
claimStatus: /* @__PURE__ */ __name(async (claimId, headers) => {
|
|
529
|
+
return await this.client.fetch(`/rewards/claims/${encodeURIComponent(claimId)}`, {
|
|
530
|
+
method: "GET",
|
|
531
|
+
headers
|
|
532
|
+
});
|
|
533
|
+
}, "claimStatus")
|
|
534
|
+
};
|
|
508
535
|
schedules = {
|
|
509
536
|
list: /* @__PURE__ */ __name(async (query, headers) => {
|
|
510
537
|
return await this.client.fetch(`/schedules`, {
|
package/dist/vaults/index.d.ts
CHANGED
|
@@ -393,8 +393,8 @@ declare class Vaults {
|
|
|
393
393
|
positions: {
|
|
394
394
|
status: "CLOSED";
|
|
395
395
|
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
|
|
396
|
-
netPnl: `-${string}` | `+${string}`;
|
|
397
396
|
positionId: string;
|
|
397
|
+
netPnl: `-${string}` | `+${string}`;
|
|
398
398
|
closedAt: string;
|
|
399
399
|
grossPnl: `-${string}` | `+${string}`;
|
|
400
400
|
openedAt: string;
|
|
@@ -408,7 +408,7 @@ declare class Vaults {
|
|
|
408
408
|
entryVwap?: string | undefined;
|
|
409
409
|
exitVwap?: string | undefined;
|
|
410
410
|
}[];
|
|
411
|
-
closedReason?: "
|
|
411
|
+
closedReason?: "USER" | "LIQUIDATED" | "NETTED" | undefined;
|
|
412
412
|
}[];
|
|
413
413
|
nextCursor?: string | undefined;
|
|
414
414
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pear-protocol/core-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.16.0",
|
|
4
4
|
"description": "Pear Protocol Core SDK",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"typecheck": "bunx --package bun@1.4.3 bun --check --threads=2"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@pear-protocol/types": "^2.
|
|
30
|
-
"@pear-protocol/utils": "^1.
|
|
29
|
+
"@pear-protocol/types": "^2.24.0",
|
|
30
|
+
"@pear-protocol/utils": "^1.6.0",
|
|
31
31
|
"qs": "^6.14.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|