@0xmonaco/types 1.0.74 → 1.0.76

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.
Files changed (58) hide show
  1. package/dist/api/index.d.ts +0 -7
  2. package/dist/applications/index.d.ts +14 -15
  3. package/dist/applications/index.js +2 -2
  4. package/dist/applications/requests.d.ts +70 -15
  5. package/dist/applications/requests.js +2 -3
  6. package/dist/applications/responses.d.ts +35 -39
  7. package/dist/applications/responses.js +1 -1
  8. package/dist/buildercodes/index.d.ts +3 -4
  9. package/dist/buildercodes/responses.d.ts +10 -3
  10. package/dist/buildercodes/responses.js +24 -4
  11. package/dist/fees/responses.js +2 -2
  12. package/dist/managed-markets/index.d.ts +21 -2
  13. package/dist/margin-accounts/index.d.ts +72 -12
  14. package/dist/market/index.d.ts +76 -6
  15. package/dist/pitpass/index.d.ts +16 -11
  16. package/dist/pitpass/index.js +1 -1
  17. package/dist/pitpass/responses.d.ts +21 -0
  18. package/dist/pitpass/responses.js +43 -14
  19. package/dist/positions/index.d.ts +81 -14
  20. package/dist/profile/index.d.ts +114 -44
  21. package/dist/sdk/index.d.ts +12 -4
  22. package/dist/trading/index.d.ts +1 -1
  23. package/dist/trading/orders.d.ts +6 -32
  24. package/dist/trading/responses.d.ts +9 -14
  25. package/dist/validation/applications.d.ts +51 -0
  26. package/dist/validation/applications.js +45 -0
  27. package/dist/validation/index.d.ts +2 -0
  28. package/dist/validation/index.js +2 -0
  29. package/dist/validation/managed-markets.d.ts +17 -0
  30. package/dist/validation/managed-markets.js +17 -0
  31. package/dist/validation/margin-accounts.d.ts +10 -3
  32. package/dist/validation/margin-accounts.js +17 -6
  33. package/dist/validation/market.d.ts +45 -0
  34. package/dist/validation/market.js +43 -0
  35. package/dist/validation/positions.d.ts +5 -3
  36. package/dist/validation/positions.js +12 -5
  37. package/dist/validation/profile.d.ts +19 -2
  38. package/dist/validation/profile.js +36 -4
  39. package/dist/validation/trading.d.ts +2 -2
  40. package/dist/validation/vault.d.ts +14 -0
  41. package/dist/validation/vault.js +14 -0
  42. package/dist/websocket/base.d.ts +56 -6
  43. package/dist/websocket/client.d.ts +8 -3
  44. package/dist/websocket/events/index.d.ts +1 -0
  45. package/dist/websocket/events/index.js +1 -0
  46. package/dist/websocket/events/instrument-events.d.ts +27 -1
  47. package/dist/websocket/events/instrument-events.js +6 -1
  48. package/dist/websocket/events/market-stats-events.d.ts +41 -5
  49. package/dist/websocket/events/market-stats-events.js +3 -2
  50. package/dist/websocket/events/orders-events.d.ts +30 -3
  51. package/dist/websocket/events/position-events.d.ts +15 -0
  52. package/dist/websocket/events/position-valuation-events.d.ts +60 -0
  53. package/dist/websocket/events/position-valuation-events.js +15 -0
  54. package/dist/wire/operations.d.ts +1 -1
  55. package/dist/wire/operations.js +2 -0
  56. package/dist/wire/schema.d.ts +906 -284
  57. package/dist/withdrawals/index.d.ts +27 -6
  58. package/package.json +2 -2
@@ -60,16 +60,32 @@ export interface WithdrawalsAPI extends BaseAPI {
60
60
  getWithdrawal(withdrawalIndex: number): Promise<WithdrawalResponse>;
61
61
  /**
62
62
  * List the caller's pending withdrawals (those still awaiting on-chain root
63
- * confirmation). Authenticated and scoped to the caller. Newest first, paged.
63
+ * confirmation). Authenticated and scoped to the caller. Newest first.
64
+ *
65
+ * Cursor-paged: omit `pageToken` (or send `""`) to start, then follow
66
+ * `nextPageToken` until it comes back empty. Page-number pagination was
67
+ * removed (0XM-2788).
64
68
  */
65
69
  listPendingWithdrawals(params?: ListPendingWithdrawalsParams): Promise<ListPendingWithdrawalsResponse>;
66
70
  }
67
71
  /** Query parameters for {@link WithdrawalsAPI.listPendingWithdrawals}. */
68
72
  export interface ListPendingWithdrawalsParams {
69
- /** Page number, 1-based. Defaults to 1. */
70
- page?: number;
71
- /** Items per page (1–100). Defaults to 20. */
73
+ /** Items per page (1–1000). Defaults to 20. A larger value is rejected, not clamped. */
72
74
  pageSize?: number;
75
+ /**
76
+ * Pagination cursor with two states:
77
+ *
78
+ * - Omitted or `""`: start a walk from the newest pending withdrawal.
79
+ * - Non-empty: an opaque cursor from a previous response's `nextPageToken`;
80
+ * the walk resumes immediately after that position.
81
+ *
82
+ * The walk seeks on `(createdAt, withdrawalIndex)` descending. `createdAt` is
83
+ * always set and `withdrawalIndex` is the row's primary key, so the key is
84
+ * total and immutable and a withdrawal requested mid-walk cannot make the
85
+ * walk repeat or drop a row. The filters must match the request that minted
86
+ * the token, or the request is rejected with a `400`.
87
+ */
88
+ pageToken?: string;
73
89
  }
74
90
  /**
75
91
  * A single pending withdrawal in a {@link ListPendingWithdrawalsResponse}. A
@@ -105,10 +121,15 @@ export interface ListPendingWithdrawalsResponse {
105
121
  withdrawals: PendingWithdrawal[];
106
122
  /** Total number of pending withdrawals for the caller. */
107
123
  total: number;
108
- /** Current page number. */
109
- page: number;
110
124
  /** Items per page. */
111
125
  pageSize: number;
112
126
  /** Total number of pages. */
113
127
  totalPages: number;
128
+ /**
129
+ * Cursor for the next page, minted from the last row of an over-fetched read:
130
+ * this listing is one ordered read, so a page shorter than `pageSize` proves
131
+ * the walk is exhausted and an empty string here is definitive. Pass it back
132
+ * as `pageToken`; do not drive the walk off `total` or `totalPages`.
133
+ */
134
+ nextPageToken: string;
114
135
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/types",
3
- "version": "1.0.74",
3
+ "version": "1.0.76",
4
4
  "type": "module",
5
5
  "homepage": "https://docs.0xmonaco.com/sdk/typescript",
6
6
  "main": "./dist/index.js",
@@ -16,7 +16,7 @@
16
16
  "lint": "biome lint ."
17
17
  },
18
18
  "dependencies": {
19
- "@0xmonaco/contracts": "1.0.74",
19
+ "@0xmonaco/contracts": "1.0.76",
20
20
  "zod": "^4.1.12"
21
21
  },
22
22
  "peerDependencies": {