@ar.io/sdk 3.6.2-alpha.1 → 3.7.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/README.md CHANGED
@@ -72,6 +72,7 @@ This is the home of [ar.io] SDK. This SDK provides functionality for interacting
72
72
  - [Epochs](#epochs)
73
73
  - [`getCurrentEpoch()`](#getcurrentepoch)
74
74
  - [`getEpoch({ epochIndex })`](#getepoch-epochindex-)
75
+ - [`getEligibleEpochRewards({ epochIndex }, { cursor, limit, sortBy, sortOrder })](#geteligibleepochrewards-epochindex---cursor-limit-sortby-sortorder-)
75
76
  - [`getObservations({ epochIndex })`](#getobservations-epochindex-)
76
77
  - [`getDistributions({ epochIndex })`](#getdistributions-epochindex-)
77
78
  - [`saveObservations({ reportTxId, failedGateways })`](#saveobservations-reporttxid-failedgateways-)
@@ -1615,12 +1616,6 @@ const epoch = await ario.getEpoch({ epochIndex: 0 });
1615
1616
  "totalDistributedRewards": 100000000,
1616
1617
  "distributedTimestamp": 1720720621424,
1617
1618
  "rewards": {
1618
- "eligible": {
1619
- "IPdwa3Mb_9pDD8c2IaJx6aad51Ss-_TfStVwBuhtXMs": {
1620
- "operatorReward": 100000000,
1621
- "delegateRewards": {}
1622
- }
1623
- },
1624
1619
  "distributed": {
1625
1620
  "IPdwa3Mb_9pDD8c2IaJx6aad51Ss-_TfStVwBuhtXMs": 100000000
1626
1621
  }
@@ -1631,6 +1626,39 @@ const epoch = await ario.getEpoch({ epochIndex: 0 });
1631
1626
 
1632
1627
  </details>
1633
1628
 
1629
+ #### `getEligibleEpochRewards({ epochIndex }, { cursor, limit, sortBy, sortOrder })
1630
+
1631
+ Returns the eligible epoch rewards for the specified block height. If no epoch index is provided, the current epoch is used.
1632
+
1633
+ ```typescript
1634
+ const ario = ARIO.init();
1635
+ const rewards = await ario.getEligibleEpochRewards({ epochIndex: 0 });
1636
+ ```
1637
+
1638
+ <details>
1639
+ <summary>Output</summary>
1640
+
1641
+ ```json
1642
+ {
1643
+ "sortOrder": "desc",
1644
+ "hasMore": true,
1645
+ "totalItems": 37,
1646
+ "limit": 1,
1647
+ "sortBy": "cursorId",
1648
+ "items": [
1649
+ {
1650
+ "cursorId": "xN_aVln30LmoCffwmk5_kRkcyQZyZWy1o_TNtM_CTm0_xN_aVln30LmoCffwmk5_kRkcyQZyZWy1o_TNtM_CTm0",
1651
+ "recipient": "xN_aVln30LmoCffwmk5_kRkcyQZyZWy1o_TNtM_CTm0",
1652
+ "gatewayAddress": "xN_aVln30LmoCffwmk5_kRkcyQZyZWy1o_TNtM_CTm0",
1653
+ "eligibleReward": 2627618704,
1654
+ "type": "operatorReward"
1655
+ }
1656
+ ],
1657
+ "nextCursor": "xN_aVln30LmoCffwmk5_kRkcyQZyZWy1o_TNtM_CTm0_xN_aVln30LmoCffwmk5_kRkcyQZyZWy1o_TNtM_CTm0"
1658
+ }
1659
+ ```
1660
+ </details>
1661
+
1634
1662
  #### `getObservations({ epochIndex })`
1635
1663
 
1636
1664
  Returns the epoch-indexed observation list. If no epoch index is provided, the current epoch is used.