@polygonlabs/staking-api-client 1.10.0 → 2.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # @polygonlabs/staking-api-client
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#375](https://github.com/0xPolygon/staking-api/pull/375) [`506cc1a`](https://github.com/0xPolygon/staking-api/commit/506cc1af65bf315293729dd8c019a149a90dd423) Thanks [@shan8851](https://github.com/shan8851)! - Remove the eight deprecated offset-paginated list operations; use the cursor `/page` operations instead
8
+
9
+ The API no longer serves these routes: `GET` and `HEAD` requests to them answer `410 Gone` with a
10
+ `application/problem+json` body and a `Link` header naming the replacement, and the schemas and client no longer
11
+ include their operations, types or TanStack Query helpers:
12
+
13
+ | Removed route | Use instead |
14
+ | --------------------------------------------------------- | -------------------------------------------------------------- |
15
+ | `GET /api/v2/validators/{validatorId}/checkpoints-signed` | `GET /api/v2/validators/{validatorId}/checkpoints-signed/page` |
16
+ | `GET /api/v3/validators/{validatorId}/checkpoints-signed` | `GET /api/v3/validators/{validatorId}/checkpoints-signed/page` |
17
+ | `GET /api/v2/delegators` | `GET /api/v2/delegators/page` |
18
+ | `GET /api/v3/delegators` | `GET /api/v3/delegators/page` |
19
+ | `GET /api/v2/validators/{validatorId}/delegators` | `GET /api/v2/validators/{validatorId}/delegators/page` |
20
+ | `GET /api/v3/validators/{validatorId}/delegators` | `GET /api/v3/validators/{validatorId}/delegators/page` |
21
+ | `GET /api/v2/notification/all` | `GET /api/v2/notification/all/page` |
22
+ | `GET /api/v3/notification/all` | `GET /api/v3/notification/all/page` |
23
+
24
+ Notification search (`searchString`) is no longer available: the notification `/page` operations
25
+ support `filterBy` but not `searchString`, and they omit the offset feed's static `filter` list.
26
+
27
+ The `Deprecation`, `Sunset` and `Link` headers that announced the removal are gone with the routes.
28
+ The schemas package no longer exports `GetAllNotificationsQuery`, `NotificationArrayResponse`,
29
+ `V2DelegatorArrayResponse`, `CheckpointsSignedV3Response` or `DelegatorsListV3Response`. See
30
+ `MIGRATION.md` in the client package for the paging changes.
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies [[`506cc1a`](https://github.com/0xPolygon/staking-api/commit/506cc1af65bf315293729dd8c019a149a90dd423)]:
35
+ - @polygonlabs/staking-api-schemas@2.0.0
36
+
3
37
  ## 1.10.0
4
38
 
5
39
  ### Minor Changes
package/MIGRATION.md CHANGED
@@ -42,16 +42,16 @@ const typedData = {
42
42
  The body carries `validatorId`, `expiry`, `name`, `description`, `logoUrl` and `url` (add) or
43
43
  `validatorUrl` (update), all required, with exactly the values signed.
44
44
 
45
- ## Offset-paginated list operations → cursor pages (deprecated in 1.9.0, removed in 2.0.0)
45
+ ## Offset-paginated list operations removed → cursor pages (deprecated in 1.9.0, removed in 2.0.0)
46
46
 
47
- The offset-paginated list operations are deprecated and will be removed from the API on
48
- **2026-11-20** and from the client in 2.0.0. Until then the server answers them as before, with
49
- `Deprecation`, `Sunset` and `Link: rel="successor-version"` response headers.
47
+ The offset-paginated list operations were deprecated in 1.9.0 and are removed from the client in
48
+ 2.0.0 and from the API (they now answer `410 Gone`, with a `Link: rel="successor-version"` header and a problem
49
+ body pointing at the replacement) after the **2026-11-20** sunset.
50
50
 
51
51
  Offset paging costs more the deeper the page; a cursor page costs the same at any depth. Each
52
- deprecated operation has a cursor-paginated successor on the same path plus `/page`:
52
+ removed operation has a cursor-paginated successor on the same path plus `/page`:
53
53
 
54
- | Deprecated operation | Successor |
54
+ | Removed operation | Successor |
55
55
  | ----------------------------------- | ------------------------------ |
56
56
  | `getCheckpointsSignedByValidatorV2` | `getCheckpointsSignedPageV2` |
57
57
  | `getCheckpointsSignedByValidatorV3` | `getCheckpointsSignedPageV3` |
@@ -76,6 +76,10 @@ What changes when you switch:
76
76
  available (checkpoints-signed, notifications), it and the signed/missed counters are on the
77
77
  first page only; cursor pages carry `pagination: { limit, nextCursor }` and the rows. The
78
78
  delegator pages carry no `total`.
79
+ - **Notification search and filter list are not carried over.** The notification `/page`
80
+ operations take `filterBy` but not `searchString`, so free-text search over notifications is no
81
+ longer available. They also omit the offset feed's static `filter` list of filter types and the
82
+ `filterBy` echo in `pagination`; `filterBy` itself still works.
79
83
  - **Errors** on the cursor operations are HTTP errors (4xx/5xx) rather than a
80
84
  `{ success: false }` body at 200.
81
85
 
@@ -83,5 +87,5 @@ The README's cursor-paging section has a complete page loop and a TanStack Query
83
87
  `useInfiniteQuery` example.
84
88
 
85
89
  `getAllValidatorsV2`/`V3` and `getDelegationsByUserV2`/`V3` also take `offset` but are not
86
- deprecated. For the whole validator set in one call, `getValidatorSetV3` is cheaper than paging
90
+ removed. For the whole validator set in one call, `getValidatorSetV3` is cheaper than paging
87
91
  `getAllValidatorsV3`.
package/README.md CHANGED
@@ -35,8 +35,8 @@ const { data } = await getAllValidatorsV3();
35
35
  ## Paging through lists
36
36
 
37
37
  Use the cursor operations (`*PageV2` / `*PageV3`, served on the `/page`
38
- routes) for every paged list. The offset operations (`limit`/`offset`) are
39
- being deprecated: a deep offset makes the server walk and bill every
38
+ routes) for every paged list. The offset list operations were removed
39
+ in 2.0.0 (see `MIGRATION.md`): a deep offset makes the server walk and bill every
40
40
  skipped row, while a cursor page is a single index seek, and its fixed URL
41
41
  lets the Cloudflare edge serve it once for every client.
42
42