@pear-protocol/core-sdk 2.14.0 → 2.15.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 +53 -1
- package/dist/core/index.js +24 -0
- package/package.json +2 -2
package/dist/core/index.d.ts
CHANGED
|
@@ -2379,13 +2379,24 @@ declare class Core {
|
|
|
2379
2379
|
get: (query?: HttpTypes.QuoteFeeParamsInput, headers?: ClientHeaders) => Promise<{
|
|
2380
2380
|
baseBps: string;
|
|
2381
2381
|
discounts: {
|
|
2382
|
-
scope: "user" | "connector" | "all" | "client_id";
|
|
2382
|
+
scope: "user" | "connector" | "all" | "client_id" | "referral";
|
|
2383
2383
|
rate: string;
|
|
2384
2384
|
}[];
|
|
2385
2385
|
finalBps: string;
|
|
2386
2386
|
feeRecipient?: string | undefined;
|
|
2387
2387
|
overrideBps?: string | undefined;
|
|
2388
2388
|
overrideScope?: "user" | "client_id" | undefined;
|
|
2389
|
+
stpearPricing?: {
|
|
2390
|
+
scheduleVersion: string;
|
|
2391
|
+
observedBalance: string;
|
|
2392
|
+
observedAt: string;
|
|
2393
|
+
tierDiscountRate: string;
|
|
2394
|
+
feeWithoutStpearBps: string;
|
|
2395
|
+
observedBlock?: string | undefined;
|
|
2396
|
+
tierName?: string | undefined;
|
|
2397
|
+
tierMinimumBalance?: string | undefined;
|
|
2398
|
+
nextTierMinimumBalance?: string | undefined;
|
|
2399
|
+
} | undefined;
|
|
2389
2400
|
}>;
|
|
2390
2401
|
recipient: (query: HttpTypes.GetFeeRecipientParamsInput, headers?: ClientHeaders) => Promise<{
|
|
2391
2402
|
recipient?: string | undefined;
|
|
@@ -6379,6 +6390,8 @@ declare class Core {
|
|
|
6379
6390
|
status: "BOUND";
|
|
6380
6391
|
tradeCount: number;
|
|
6381
6392
|
volumeUsd: string;
|
|
6393
|
+
feesPaid: string;
|
|
6394
|
+
earned: string;
|
|
6382
6395
|
address?: HttpTypes.EthereumAddress | undefined;
|
|
6383
6396
|
referredAt?: number | undefined;
|
|
6384
6397
|
} | {
|
|
@@ -6388,6 +6401,45 @@ declare class Core {
|
|
|
6388
6401
|
nextCursor?: string | undefined;
|
|
6389
6402
|
}>;
|
|
6390
6403
|
};
|
|
6404
|
+
rewards: {
|
|
6405
|
+
/** Return the authenticated referrer's reward accrual and payout availability. */
|
|
6406
|
+
summary: (headers?: ClientHeaders) => Promise<{
|
|
6407
|
+
accrual: {
|
|
6408
|
+
status: "DISABLED";
|
|
6409
|
+
} | {
|
|
6410
|
+
status: "AVAILABLE";
|
|
6411
|
+
accrual: {
|
|
6412
|
+
earned: string;
|
|
6413
|
+
pendingMaturity: string;
|
|
6414
|
+
pendingFunding: string;
|
|
6415
|
+
claimable: string;
|
|
6416
|
+
paid: string;
|
|
6417
|
+
};
|
|
6418
|
+
};
|
|
6419
|
+
payout: {
|
|
6420
|
+
status: "DISABLED";
|
|
6421
|
+
} | {
|
|
6422
|
+
status: "AVAILABLE";
|
|
6423
|
+
};
|
|
6424
|
+
}>;
|
|
6425
|
+
/** Create or resume the referrer's reward claim (session login only); an in-flight claim keeps its stored destination. */
|
|
6426
|
+
claim: (body: HttpTypes.CreateRewardClaim, headers?: ClientHeaders) => Promise<{
|
|
6427
|
+
status: "TRANSFER_INTENT_READY" | "PAYOUT_PENDING" | "PAID" | "RELEASED" | "NO_CLAIMABLE_BALANCE" | "CLAIMABILITY_DISABLED" | "NO_CAPACITY" | "MISSING_BALANCE" | "STALE_BALANCE" | "PAYOUT_DISABLED";
|
|
6428
|
+
claimId?: string | undefined;
|
|
6429
|
+
}>;
|
|
6430
|
+
/** Return the lifecycle of one reward claim owned by the authenticated referrer. */
|
|
6431
|
+
claimStatus: (claimId: string, headers?: ClientHeaders) => Promise<{
|
|
6432
|
+
claimId: string;
|
|
6433
|
+
status: "TRANSFER_INTENT_READY" | "PAYOUT_PENDING" | "PAID" | "RELEASED" | "NO_CLAIMABLE_BALANCE" | "CLAIMABILITY_DISABLED" | "NO_CAPACITY" | "MISSING_BALANCE" | "STALE_BALANCE" | "PAYOUT_DISABLED";
|
|
6434
|
+
payoutDestination: string;
|
|
6435
|
+
entitledAmount: string;
|
|
6436
|
+
createdAt: string;
|
|
6437
|
+
updatedAt: string;
|
|
6438
|
+
reservedAmount?: string | undefined;
|
|
6439
|
+
transferIntentCreatedAt?: string | undefined;
|
|
6440
|
+
verifiedAt?: string | undefined;
|
|
6441
|
+
}>;
|
|
6442
|
+
};
|
|
6391
6443
|
schedules: {
|
|
6392
6444
|
list: (query: HttpTypes.ScheduleListParamsInput, headers?: ClientHeaders) => Promise<{
|
|
6393
6445
|
limit: number;
|
package/dist/core/index.js
CHANGED
|
@@ -505,6 +505,30 @@ class Core {
|
|
|
505
505
|
});
|
|
506
506
|
}, "referees")
|
|
507
507
|
};
|
|
508
|
+
rewards = {
|
|
509
|
+
/** Return the authenticated referrer's reward accrual and payout availability. */
|
|
510
|
+
summary: /* @__PURE__ */ __name(async (headers) => {
|
|
511
|
+
return await this.client.fetch(`/rewards`, {
|
|
512
|
+
method: "GET",
|
|
513
|
+
headers
|
|
514
|
+
});
|
|
515
|
+
}, "summary"),
|
|
516
|
+
/** Create or resume the referrer's reward claim (session login only); an in-flight claim keeps its stored destination. */
|
|
517
|
+
claim: /* @__PURE__ */ __name(async (body, headers) => {
|
|
518
|
+
return await this.client.fetch(`/rewards/claims`, {
|
|
519
|
+
method: "POST",
|
|
520
|
+
headers,
|
|
521
|
+
body
|
|
522
|
+
});
|
|
523
|
+
}, "claim"),
|
|
524
|
+
/** Return the lifecycle of one reward claim owned by the authenticated referrer. */
|
|
525
|
+
claimStatus: /* @__PURE__ */ __name(async (claimId, headers) => {
|
|
526
|
+
return await this.client.fetch(`/rewards/claims/${encodeURIComponent(claimId)}`, {
|
|
527
|
+
method: "GET",
|
|
528
|
+
headers
|
|
529
|
+
});
|
|
530
|
+
}, "claimStatus")
|
|
531
|
+
};
|
|
508
532
|
schedules = {
|
|
509
533
|
list: /* @__PURE__ */ __name(async (query, headers) => {
|
|
510
534
|
return await this.client.fetch(`/schedules`, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pear-protocol/core-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
4
4
|
"description": "Pear Protocol Core SDK",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"typecheck": "bunx --package bun@1.4.3 bun --check --threads=2"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@pear-protocol/types": "^2.
|
|
29
|
+
"@pear-protocol/types": "^2.22.0",
|
|
30
30
|
"@pear-protocol/utils": "^1.5.0",
|
|
31
31
|
"qs": "^6.14.0"
|
|
32
32
|
},
|