@pear-protocol/core-sdk 2.14.1 → 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 +39 -0
- package/dist/core/index.js +24 -0
- package/package.json +1 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -6401,6 +6401,45 @@ declare class Core {
|
|
|
6401
6401
|
nextCursor?: string | undefined;
|
|
6402
6402
|
}>;
|
|
6403
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
|
+
};
|
|
6404
6443
|
schedules: {
|
|
6405
6444
|
list: (query: HttpTypes.ScheduleListParamsInput, headers?: ClientHeaders) => Promise<{
|
|
6406
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`, {
|