aftermath-ts-sdk 4.0.0 → 4.1.0-dev.bc92529

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/index.js CHANGED
@@ -15381,39 +15381,15 @@ var init_perpetuals = __esm({
15381
15381
  // =========================================================================
15382
15382
  // Rebates
15383
15383
  // =========================================================================
15384
- /**
15385
- * Calculate rewards and rebates for one or more perpetuals accounts.
15386
- *
15387
- * Computes per-account maker and taker reward allocations, fee-tier rebates,
15388
- * and volume-based metrics. When `accountIds` is omitted or empty, all eligible
15389
- * accounts are included.
15390
- *
15391
- * **Note:** All data returned is for the current epoch only.
15392
- *
15393
- * @param inputs.totalMakerRewards - Total maker reward pool to distribute.
15394
- * @param inputs.totalTakerRewards - Total taker reward pool to distribute.
15395
- * @param inputs.accountIds - Optional list of account IDs.
15396
- * @returns `ApiPerpetualsCurrentRebateRewardsResponse` with per-account reward and rebate data.
15397
- *
15398
- * @example
15399
- * ```ts
15400
- * const { totalQScoreFinal, rewards } = await perps.getCurrentRebateRewards({
15401
- * totalMakerRewards: 10000,
15402
- * totalTakerRewards: 5000,
15403
- * });
15404
- * ```
15405
- */
15406
- async getCurrentRebateRewards(inputs) {
15407
- return this.fetchApi("rebates/rewards", inputs);
15408
- }
15384
+ // =========================================================================
15385
+ // Rebates (CSV)
15386
+ // =========================================================================
15409
15387
  /**
15410
15388
  * Generate a CSV-formatted rebate report for perpetuals market makers.
15411
15389
  *
15412
- * Computes per-account reward allocations and fee-tier rebate adjustments,
15413
- * returning the result as a CSV string. When `aggregated` is true, the CSV
15414
- * groups rewards by owner address instead of per-account.
15415
- *
15416
- * **Note:** All data returned is for the current epoch only.
15390
+ * **Currently unavailable:** the backend removed
15391
+ * `/api/perpetuals/rebates/create-csv-rebates`, so this request fails until
15392
+ * a replacement endpoint ships. Kept so existing callers still compile.
15417
15393
  *
15418
15394
  * @param inputs - {@link ApiPerpetualsCreateCsvRebatesBody}.
15419
15395
  * @returns `ApiPerpetualsCreateCsvRebatesResponse` containing the CSV string.
@@ -15424,8 +15400,10 @@ var init_perpetuals = __esm({
15424
15400
  /**
15425
15401
  * Generate a CSV-formatted referral rebate report.
15426
15402
  *
15427
- * Calculates referrer commissions and referee discounts based on trading
15428
- * fees within the specified epoch, returning the result as a CSV string.
15403
+ * **Currently unavailable:** the backend removed
15404
+ * `/api/perpetuals/rebates/create-referral-csv-rebates`, so this request
15405
+ * fails until a replacement endpoint ships. Kept so existing callers still
15406
+ * compile.
15429
15407
  *
15430
15408
  * @param inputs - {@link ApiPerpetualsCreateReferralCsvRebatesBody}.
15431
15409
  * @returns `ApiPerpetualsCreateReferralCsvRebatesResponse` containing the CSV string.
@@ -18589,6 +18567,32 @@ var init_rewards = __esm({
18589
18567
  * @returns The total points across all reward epochs and domains.
18590
18568
  * @throws `AftermathTransportError` when the API request or response fails.
18591
18569
  */
18570
+ /**
18571
+ * Computes the distribution of the maker and taker reward pools across
18572
+ * perpetuals accounts.
18573
+ *
18574
+ * Returns per-account maker and taker reward allocations, fee-tier rebates
18575
+ * and volume metrics. When `accountIds` is omitted or empty the API includes
18576
+ * every eligible account, so pass an explicit list to scope the result.
18577
+ *
18578
+ * **Note:** All data returned is for the current epoch only.
18579
+ *
18580
+ * @param inputs - {@link ApiRewardsDistributionBody}.
18581
+ * @returns Per-account reward and rebate breakdown for the current epoch.
18582
+ * @throws `AftermathTransportError` when the API request or response fails.
18583
+ *
18584
+ * @example
18585
+ * ```ts
18586
+ * const { totalQScoreFinal, rewards } = await rewards.getDistribution({
18587
+ * totalMakerRewards: 10000,
18588
+ * totalTakerRewards: 5000,
18589
+ * calculationVariables: { ... },
18590
+ * });
18591
+ * ```
18592
+ */
18593
+ async getDistribution(inputs) {
18594
+ return this.fetchApi("distribution", inputs);
18595
+ }
18592
18596
  async getPoints(inputs) {
18593
18597
  return this.fetchApi(
18594
18598
  "points",