@lifi/perps-sdk 31.1.0 → 31.1.1

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
@@ -88,6 +88,29 @@ so either disables registry-level reuse and request coalescing. Such hooks still
88
88
  run on every `sync()`. This cache applies only to reference registries, not account,
89
89
  price, or authenticated trading responses.
90
90
 
91
+ ## Platform notices
92
+
93
+ `getMeta(client)` returns the API `version` and the `notices` that the backend
94
+ serves. The scope of a `Notice` comes from `providerKeys`:
95
+
96
+ - A notice without `providerKeys` is global. It applies to all users.
97
+ - A notice with `providerKeys` applies only to the listed providers. An
98
+ imported provider notice always lists one or more providers.
99
+
100
+ All `Notice` times are Unix epoch milliseconds. The visibility interval is
101
+ `[validFrom, validTo)`: it includes `validFrom` and excludes `validTo`. An
102
+ absent bound has no limit. The visibility bounds do not describe a maintenance
103
+ window. `startsAt`, `endsAt`, and `resolvedAt` describe the event. An absent
104
+ `endsAt` means that the end is not known, and a scheduled `endsAt` does not
105
+ prove recovery.
106
+
107
+ `id` identifies a notice across polls. `revision` is an opaque value that
108
+ changes when the user-facing content changes. `lastCheckedAt` is the last
109
+ successful observation of the source, not the last poll attempt.
110
+
111
+ The SDK returns the notices as the backend serves them. It does not filter
112
+ them by visibility, scope, or acknowledgement. The caller does that work.
113
+
91
114
  ## High-level client
92
115
 
93
116
  `PerpsClient` owns the end-to-end action pipeline. Its trade wrappers include
@@ -1 +1 @@
1
- {"version":3,"file":"getMeta.d.ts","sourceRoot":"","sources":["../../../src/services/getMeta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAE7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAgB1D,wBAAsB,OAAO,CAC3B,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAOf"}
1
+ {"version":3,"file":"getMeta.d.ts","sourceRoot":"","sources":["../../../src/services/getMeta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAE7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAmB1D,wBAAsB,OAAO,CAC3B,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAOf"}
@@ -1 +1 @@
1
- {"version":3,"file":"getMeta.js","sourceRoot":"","sources":["../../../src/services/getMeta.ts"],"names":[],"mappings":";;AAmBA,0BAUC;AA5BD,wDAAiD;AAkB1C,KAAK,UAAU,OAAO,CAC3B,MAAsB,EACtB,OAA2B;IAE3B,OAAO,IAAA,oBAAO,EACZ,MAAM,CAAC,MAAM,EACb,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,EAC9B,EAAE,EACF,OAAO,CACR,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"getMeta.js","sourceRoot":"","sources":["../../../src/services/getMeta.ts"],"names":[],"mappings":";;AAsBA,0BAUC;AA/BD,wDAAiD;AAqB1C,KAAK,UAAU,OAAO,CAC3B,MAAsB,EACtB,OAA2B;IAE3B,OAAO,IAAA,oBAAO,EACZ,MAAM,CAAC,MAAM,EACb,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,EAC9B,EAAE,EACF,OAAO,CACR,CAAA;AACH,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export declare const name = "@lifi/perps-sdk";
2
- export declare const version = "31.1.0";
2
+ export declare const version = "31.1.1";
3
3
  //# sourceMappingURL=version.d.ts.map
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = exports.name = void 0;
4
4
  exports.name = '@lifi/perps-sdk';
5
- exports.version = '31.1.0';
5
+ exports.version = '31.1.1';
6
6
  //# sourceMappingURL=version.js.map
@@ -2,9 +2,12 @@ import type { Meta } from '@lifi/perps-types';
2
2
  import type { SDKRequestOptions } from '../types/config.js';
3
3
  import type { PerpsSDKClient } from '../types/provider.js';
4
4
  /**
5
- * Get platform metadata: the API version and any active platform-level notices.
5
+ * Get platform metadata: the API version and the notices the backend serves.
6
+ * A notice without `providerKeys` is global; a notice with `providerKeys` is
7
+ * scoped to those providers. The SDK returns notices as served and does not
8
+ * filter them by `validFrom` / `validTo`.
6
9
  *
7
- * @returns Platform version and the list of active notices
10
+ * @returns Platform version and the global and provider-scoped notices
8
11
  * @throws {PerpsError} On API error responses
9
12
  * @throws {PerpsError} On network or parsing errors
10
13
  *
@@ -1 +1 @@
1
- {"version":3,"file":"getMeta.d.ts","sourceRoot":"","sources":["../../../src/services/getMeta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAE7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;;;;;;;;;;GAaG;AACH,wBAAsB,OAAO,CAC3B,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAOf"}
1
+ {"version":3,"file":"getMeta.d.ts","sourceRoot":"","sources":["../../../src/services/getMeta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAE7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,OAAO,CAC3B,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAOf"}
@@ -1,8 +1,11 @@
1
1
  import { request } from '../transport/request.js';
2
2
  /**
3
- * Get platform metadata: the API version and any active platform-level notices.
3
+ * Get platform metadata: the API version and the notices the backend serves.
4
+ * A notice without `providerKeys` is global; a notice with `providerKeys` is
5
+ * scoped to those providers. The SDK returns notices as served and does not
6
+ * filter them by `validFrom` / `validTo`.
4
7
  *
5
- * @returns Platform version and the list of active notices
8
+ * @returns Platform version and the global and provider-scoped notices
6
9
  * @throws {PerpsError} On API error responses
7
10
  * @throws {PerpsError} On network or parsing errors
8
11
  *
@@ -1 +1 @@
1
- {"version":3,"file":"getMeta.js","sourceRoot":"","sources":["../../../src/services/getMeta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAIjD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,MAAsB,EACtB,OAA2B;IAE3B,OAAO,OAAO,CACZ,MAAM,CAAC,MAAM,EACb,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,EAC9B,EAAE,EACF,OAAO,CACR,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"getMeta.js","sourceRoot":"","sources":["../../../src/services/getMeta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAIjD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,MAAsB,EACtB,OAA2B;IAE3B,OAAO,OAAO,CACZ,MAAM,CAAC,MAAM,EACb,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,EAC9B,EAAE,EACF,OAAO,CACR,CAAA;AACH,CAAC"}
@@ -9,5 +9,5 @@ export declare const name = "@lifi/perps-sdk";
9
9
  *
10
10
  * @public
11
11
  */
12
- export declare const version = "31.1.0";
12
+ export declare const version = "31.1.1";
13
13
  //# sourceMappingURL=version.d.ts.map
@@ -9,5 +9,5 @@ export const name = '@lifi/perps-sdk';
9
9
  *
10
10
  * @public
11
11
  */
12
- export const version = '31.1.0';
12
+ export const version = '31.1.1';
13
13
  //# sourceMappingURL=version.js.map
@@ -2,9 +2,12 @@ import type { Meta } from '@lifi/perps-types';
2
2
  import type { SDKRequestOptions } from '../types/config.js';
3
3
  import type { PerpsSDKClient } from '../types/provider.js';
4
4
  /**
5
- * Get platform metadata: the API version and any active platform-level notices.
5
+ * Get platform metadata: the API version and the notices the backend serves.
6
+ * A notice without `providerKeys` is global; a notice with `providerKeys` is
7
+ * scoped to those providers. The SDK returns notices as served and does not
8
+ * filter them by `validFrom` / `validTo`.
6
9
  *
7
- * @returns Platform version and the list of active notices
10
+ * @returns Platform version and the global and provider-scoped notices
8
11
  * @throws {PerpsError} On API error responses
9
12
  * @throws {PerpsError} On network or parsing errors
10
13
  *
@@ -1 +1 @@
1
- {"version":3,"file":"getMeta.d.ts","sourceRoot":"","sources":["../../../src/services/getMeta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAE7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;;;;;;;;;;GAaG;AACH,wBAAsB,OAAO,CAC3B,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAOf"}
1
+ {"version":3,"file":"getMeta.d.ts","sourceRoot":"","sources":["../../../src/services/getMeta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAE7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,OAAO,CAC3B,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAOf"}
@@ -9,5 +9,5 @@ export declare const name = "@lifi/perps-sdk";
9
9
  *
10
10
  * @public
11
11
  */
12
- export declare const version = "31.1.0";
12
+ export declare const version = "31.1.1";
13
13
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/perps-sdk",
3
- "version": "31.1.0",
3
+ "version": "31.1.1",
4
4
  "description": "LI.FI Perps SDK for perpetuals trading",
5
5
  "homepage": "https://github.com/lifinance/perps-sdk",
6
6
  "bugs": {
@@ -45,7 +45,7 @@
45
45
  "@lifi/types": "^18.3.0",
46
46
  "big.js": "^7.0.1",
47
47
  "partysocket": "^1.1.19",
48
- "@lifi/perps-types": "^27.1.0"
48
+ "@lifi/perps-types": "^27.2.0"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "viem": ">=2.57.11 <2.57.12"
@@ -4,9 +4,12 @@ import type { SDKRequestOptions } from '../types/config.js'
4
4
  import type { PerpsSDKClient } from '../types/provider.js'
5
5
 
6
6
  /**
7
- * Get platform metadata: the API version and any active platform-level notices.
7
+ * Get platform metadata: the API version and the notices the backend serves.
8
+ * A notice without `providerKeys` is global; a notice with `providerKeys` is
9
+ * scoped to those providers. The SDK returns notices as served and does not
10
+ * filter them by `validFrom` / `validTo`.
8
11
  *
9
- * @returns Platform version and the list of active notices
12
+ * @returns Platform version and the global and provider-scoped notices
10
13
  * @throws {PerpsError} On API error responses
11
14
  * @throws {PerpsError} On network or parsing errors
12
15
  *
package/src/version.ts CHANGED
@@ -10,4 +10,4 @@ export const name = '@lifi/perps-sdk'
10
10
  *
11
11
  * @public
12
12
  */
13
- export const version = '31.1.0'
13
+ export const version = '31.1.1'