@lifi/perps-sdk 0.0.0-preview-b4dca87 → 0.0.0-preview-e927c9c

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 (61) hide show
  1. package/dist/cjs/client/PerpsClient.d.ts.map +1 -1
  2. package/dist/cjs/client/PerpsClient.js.map +1 -1
  3. package/dist/cjs/services/getActivity.d.ts.map +1 -1
  4. package/dist/cjs/services/getActivity.js.map +1 -1
  5. package/dist/cjs/services/getFills.d.ts.map +1 -1
  6. package/dist/cjs/services/getFills.js.map +1 -1
  7. package/dist/cjs/services/getOrder.d.ts.map +1 -1
  8. package/dist/cjs/services/getOrder.js.map +1 -1
  9. package/dist/cjs/services/getOrders.d.ts.map +1 -1
  10. package/dist/cjs/services/getOrders.js.map +1 -1
  11. package/dist/cjs/services/getPositions.d.ts.map +1 -1
  12. package/dist/cjs/services/getPositions.js.map +1 -1
  13. package/dist/cjs/version.d.ts +1 -1
  14. package/dist/cjs/version.js +1 -1
  15. package/dist/esm/client/PerpsClient.d.ts +29 -13
  16. package/dist/esm/client/PerpsClient.d.ts.map +1 -1
  17. package/dist/esm/client/PerpsClient.js +29 -13
  18. package/dist/esm/client/PerpsClient.js.map +1 -1
  19. package/dist/esm/services/getActivity.d.ts +4 -2
  20. package/dist/esm/services/getActivity.d.ts.map +1 -1
  21. package/dist/esm/services/getActivity.js +4 -2
  22. package/dist/esm/services/getActivity.js.map +1 -1
  23. package/dist/esm/services/getFills.d.ts +4 -2
  24. package/dist/esm/services/getFills.d.ts.map +1 -1
  25. package/dist/esm/services/getFills.js +4 -2
  26. package/dist/esm/services/getFills.js.map +1 -1
  27. package/dist/esm/services/getOrder.d.ts +4 -2
  28. package/dist/esm/services/getOrder.d.ts.map +1 -1
  29. package/dist/esm/services/getOrder.js +4 -2
  30. package/dist/esm/services/getOrder.js.map +1 -1
  31. package/dist/esm/services/getOrders.d.ts +10 -1
  32. package/dist/esm/services/getOrders.d.ts.map +1 -1
  33. package/dist/esm/services/getOrders.js +10 -1
  34. package/dist/esm/services/getOrders.js.map +1 -1
  35. package/dist/esm/services/getPositions.d.ts +4 -2
  36. package/dist/esm/services/getPositions.d.ts.map +1 -1
  37. package/dist/esm/services/getPositions.js +4 -2
  38. package/dist/esm/services/getPositions.js.map +1 -1
  39. package/dist/esm/version.d.ts +1 -1
  40. package/dist/esm/version.js +1 -1
  41. package/dist/types/client/PerpsClient.d.ts +29 -13
  42. package/dist/types/client/PerpsClient.d.ts.map +1 -1
  43. package/dist/types/services/getActivity.d.ts +4 -2
  44. package/dist/types/services/getActivity.d.ts.map +1 -1
  45. package/dist/types/services/getFills.d.ts +4 -2
  46. package/dist/types/services/getFills.d.ts.map +1 -1
  47. package/dist/types/services/getOrder.d.ts +4 -2
  48. package/dist/types/services/getOrder.d.ts.map +1 -1
  49. package/dist/types/services/getOrders.d.ts +10 -1
  50. package/dist/types/services/getOrders.d.ts.map +1 -1
  51. package/dist/types/services/getPositions.d.ts +4 -2
  52. package/dist/types/services/getPositions.d.ts.map +1 -1
  53. package/dist/types/version.d.ts +1 -1
  54. package/package.json +1 -1
  55. package/src/client/PerpsClient.ts +29 -13
  56. package/src/services/getActivity.ts +4 -2
  57. package/src/services/getFills.ts +4 -2
  58. package/src/services/getOrder.ts +4 -2
  59. package/src/services/getOrders.ts +10 -1
  60. package/src/services/getPositions.ts +4 -2
  61. package/src/version.ts +1 -1
@@ -6,8 +6,10 @@ import { requireProvider } from '../client/requireProvider.js';
6
6
  *
7
7
  * @throws {PerpsError} When the provider plugin is not registered, or on
8
8
  * backend / network / parsing errors.
9
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
10
- * Lighter auth token or an Ondo session) and none resolves.
9
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
10
+ * Lighter auth token or an Ondo session) and none is stored.
11
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
12
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
11
13
  * @example
12
14
  * ```ts
13
15
  * const { items, pagination } = await getActivity(client, {
@@ -1 +1 @@
1
- {"version":3,"file":"getActivity.js","sourceRoot":"","sources":["../../../src/services/getActivity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAuB9D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,MAAsB,EACtB,MAAyB,EACzB,OAA2B;IAE3B,OAAO,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,CACzD;QACE,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,IAAI,EAAE,MAAM,CAAC,IAAI;KAClB,EACD,OAAO,CACR,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"getActivity.js","sourceRoot":"","sources":["../../../src/services/getActivity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAuB9D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,MAAsB,EACtB,MAAyB,EACzB,OAA2B;IAE3B,OAAO,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,CACzD;QACE,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,IAAI,EAAE,MAAM,CAAC,IAAI;KAClB,EACD,OAAO,CACR,CAAA;AACH,CAAC"}
@@ -26,8 +26,10 @@ export interface GetFillsParams {
26
26
  *
27
27
  * @throws {PerpsError} When the provider plugin is not registered, or on
28
28
  * backend / network / parsing errors.
29
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
30
- * Lighter auth token or an Ondo session) and none resolves.
29
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
30
+ * Lighter auth token or an Ondo session) and none is stored.
31
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
32
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
31
33
  * @example
32
34
  * ```ts
33
35
  * const { items, pagination } = await getFills(client, {
@@ -1 +1 @@
1
- {"version":3,"file":"getFills.d.ts","sourceRoot":"","sources":["../../../src/services/getFills.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,aAAa,CAAC,CAWxB"}
1
+ {"version":3,"file":"getFills.d.ts","sourceRoot":"","sources":["../../../src/services/getFills.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,aAAa,CAAC,CAWxB"}
@@ -6,8 +6,10 @@ import { requireProvider } from '../client/requireProvider.js';
6
6
  *
7
7
  * @throws {PerpsError} When the provider plugin is not registered, or on
8
8
  * backend / network / parsing errors.
9
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
10
- * Lighter auth token or an Ondo session) and none resolves.
9
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
10
+ * Lighter auth token or an Ondo session) and none is stored.
11
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
12
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
11
13
  * @example
12
14
  * ```ts
13
15
  * const { items, pagination } = await getFills(client, {
@@ -1 +1 @@
1
- {"version":3,"file":"getFills.js","sourceRoot":"","sources":["../../../src/services/getFills.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAsB9D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,MAAsB,EACtB,MAAsB,EACtB,OAA2B;IAE3B,OAAO,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,CACtD;QACE,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,EACD,OAAO,CACR,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"getFills.js","sourceRoot":"","sources":["../../../src/services/getFills.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAsB9D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,MAAsB,EACtB,MAAsB,EACtB,OAA2B;IAE3B,OAAO,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,CACtD;QACE,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,EACD,OAAO,CACR,CAAA;AACH,CAAC"}
@@ -20,8 +20,10 @@ export interface GetOrderParams {
20
20
  *
21
21
  * @throws {PerpsError} When the provider plugin is not registered, or on
22
22
  * backend / network / parsing errors.
23
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
24
- * Lighter auth token or an Ondo session) and none resolves.
23
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
24
+ * Lighter auth token or an Ondo session) and none is stored.
25
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
26
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
25
27
  * @example
26
28
  * ```ts
27
29
  * const order = await getOrder(client, {
@@ -1 +1 @@
1
- {"version":3,"file":"getOrder.d.ts","sourceRoot":"","sources":["../../../src/services/getOrder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAA;CACX;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,KAAK,CAAC,CAKhB"}
1
+ {"version":3,"file":"getOrder.d.ts","sourceRoot":"","sources":["../../../src/services/getOrder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAA;CACX;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,KAAK,CAAC,CAKhB"}
@@ -6,8 +6,10 @@ import { requireProvider } from '../client/requireProvider.js';
6
6
  *
7
7
  * @throws {PerpsError} When the provider plugin is not registered, or on
8
8
  * backend / network / parsing errors.
9
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
10
- * Lighter auth token or an Ondo session) and none resolves.
9
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
10
+ * Lighter auth token or an Ondo session) and none is stored.
11
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
12
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
11
13
  * @example
12
14
  * ```ts
13
15
  * const order = await getOrder(client, {
@@ -1 +1 @@
1
- {"version":3,"file":"getOrder.js","sourceRoot":"","sources":["../../../src/services/getOrder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAgB9D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,MAAsB,EACtB,MAAsB,EACtB,OAA2B;IAE3B,OAAO,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,CACtD,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAC1C,OAAO,CACR,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"getOrder.js","sourceRoot":"","sources":["../../../src/services/getOrder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAgB9D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,MAAsB,EACtB,MAAsB,EACtB,OAA2B;IAE3B,OAAO,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,CACtD,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAC1C,OAAO,CACR,CAAA;AACH,CAAC"}
@@ -18,6 +18,15 @@ export interface GetOrdersParams {
18
18
  /** Opaque pagination cursor from the previous response. */
19
19
  cursor?: string;
20
20
  }
21
- /** Read account orders with active lifecycle statuses as the default filter. */
21
+ /**
22
+ * Read account orders with active lifecycle statuses as the default filter.
23
+ *
24
+ * @throws {PerpsError} When the provider plugin is not registered, or on
25
+ * backend / network / parsing errors.
26
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
27
+ * Lighter auth token or an Ondo session) and none is stored.
28
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
29
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
30
+ */
22
31
  export declare function getOrders(client: PerpsSDKClient, params: GetOrdersParams, options?: SDKRequestOptions): Promise<OrdersResponse>;
23
32
  //# sourceMappingURL=getOrders.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getOrders.d.ts","sourceRoot":"","sources":["../../../src/services/getOrders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACpE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAG1D;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAA;IACxB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,gFAAgF;AAChF,wBAAsB,SAAS,CAC7B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,cAAc,CAAC,CAWzB"}
1
+ {"version":3,"file":"getOrders.d.ts","sourceRoot":"","sources":["../../../src/services/getOrders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACpE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAG1D;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAA;IACxB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;GASG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,cAAc,CAAC,CAWzB"}
@@ -1,6 +1,15 @@
1
1
  import { requireProvider } from '../client/requireProvider.js';
2
2
  import { ACTIVE_ORDER_STATUSES } from '../utils/orderClassification.js';
3
- /** Read account orders with active lifecycle statuses as the default filter. */
3
+ /**
4
+ * Read account orders with active lifecycle statuses as the default filter.
5
+ *
6
+ * @throws {PerpsError} When the provider plugin is not registered, or on
7
+ * backend / network / parsing errors.
8
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
9
+ * Lighter auth token or an Ondo session) and none is stored.
10
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
11
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
12
+ */
4
13
  export async function getOrders(client, params, options) {
5
14
  return requireProvider(client, params.provider).getOrders({
6
15
  address: params.address,
@@ -1 +1 @@
1
- {"version":3,"file":"getOrders.js","sourceRoot":"","sources":["../../../src/services/getOrders.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAG9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AAmBvE,gFAAgF;AAChF,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,MAAsB,EACtB,MAAuB,EACvB,OAA2B;IAE3B,OAAO,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CACvD;QACE,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,CAAC,GAAG,qBAAqB,CAAC;QACvD,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM,EAAE,MAAM,CAAC,MAAM;KACtB,EACD,OAAO,CACR,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"getOrders.js","sourceRoot":"","sources":["../../../src/services/getOrders.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAG9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AAmBvE;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,MAAsB,EACtB,MAAuB,EACvB,OAA2B;IAE3B,OAAO,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CACvD;QACE,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,CAAC,GAAG,qBAAqB,CAAC;QACvD,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM,EAAE,MAAM,CAAC,MAAM;KACtB,EACD,OAAO,CACR,CAAA;AACH,CAAC"}
@@ -24,8 +24,10 @@ export interface GetPositionsParams {
24
24
  *
25
25
  * @throws {PerpsError} When the provider plugin is not registered, or on
26
26
  * backend / network / parsing errors.
27
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
28
- * Lighter auth token or an Ondo session) and none resolves.
27
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
28
+ * Lighter auth token or an Ondo session) and none is stored.
29
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
30
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
29
31
  * @example
30
32
  * ```ts
31
33
  * const { positions } = await getPositions(client, {
@@ -1 +1 @@
1
- {"version":3,"file":"getPositions.d.ts","sourceRoot":"","sources":["../../../src/services/getPositions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAU5B"}
1
+ {"version":3,"file":"getPositions.d.ts","sourceRoot":"","sources":["../../../src/services/getPositions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAU5B"}
@@ -6,8 +6,10 @@ import { requireProvider } from '../client/requireProvider.js';
6
6
  *
7
7
  * @throws {PerpsError} When the provider plugin is not registered, or on
8
8
  * backend / network / parsing errors.
9
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
10
- * Lighter auth token or an Ondo session) and none resolves.
9
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
10
+ * Lighter auth token or an Ondo session) and none is stored.
11
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
12
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
11
13
  * @example
12
14
  * ```ts
13
15
  * const { positions } = await getPositions(client, {
@@ -1 +1 @@
1
- {"version":3,"file":"getPositions.js","sourceRoot":"","sources":["../../../src/services/getPositions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAoB9D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAAsB,EACtB,MAA0B,EAC1B,OAA2B;IAE3B,OAAO,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,YAAY,CAC1D;QACE,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM,EAAE,MAAM,CAAC,MAAM;KACtB,EACD,OAAO,CACR,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"getPositions.js","sourceRoot":"","sources":["../../../src/services/getPositions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAoB9D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAAsB,EACtB,MAA0B,EAC1B,OAA2B;IAE3B,OAAO,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,YAAY,CAC1D;QACE,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM,EAAE,MAAM,CAAC,MAAM;KACtB,EACD,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 = "0.0.0-preview-b4dca87";
12
+ export declare const version = "0.0.0-preview-e927c9c";
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 = '0.0.0-preview-b4dca87';
12
+ export const version = '0.0.0-preview-e927c9c';
13
13
  //# sourceMappingURL=version.js.map
@@ -54,15 +54,19 @@ export declare class PerpsClient {
54
54
  /**
55
55
  * Read active or historical orders from the selected venue.
56
56
  *
57
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
58
- * Lighter auth token or an Ondo session) and none resolves.
57
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
58
+ * Lighter auth token or an Ondo session) and none is stored.
59
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
60
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
59
61
  */
60
62
  getOrders(params: GetOrdersParams, options?: SDKRequestOptions): Promise<OrdersResponse>;
61
63
  /**
62
64
  * Read one venue order through the provider's unified mapper.
63
65
  *
64
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
65
- * Lighter auth token or an Ondo session) and none resolves.
66
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
67
+ * Lighter auth token or an Ondo session) and none is stored.
68
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
69
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
66
70
  */
67
71
  getOrder(params: GetOrderParams, options?: SDKRequestOptions): Promise<Order>;
68
72
  /**
@@ -178,6 +182,9 @@ export declare class PerpsClient {
178
182
  * @throws {PerpsError} When the provider plugin is not registered,
179
183
  * `ValidationError` for a spot market, or any other `PerpsError` when the
180
184
  * venue read fails or carries no usable value.
185
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (an
186
+ * Ondo session) and none is stored.
187
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
181
188
  * @public
182
189
  */
183
190
  getMarketSettings(params: {
@@ -191,14 +198,19 @@ export declare class PerpsClient {
191
198
  * account displays read the account-scoped
192
199
  * {@link AccountSummary.availableMargin} instead.
193
200
  *
194
- * Providers that read a per-market figure answer it directly. For every
195
- * other provider this falls back to the account summary, so both sides
196
- * equal `availableMargin` and the asset is the market's quote asset.
201
+ * Providers that read a per-market figure answer it directly. A provider
202
+ * that has no per-market figure for the market (a Hyperliquid or Lighter
203
+ * spot market) resolves `undefined`, and this falls back to the account
204
+ * summary, so both sides equal `availableMargin` and the asset is the
205
+ * market's quote asset. A provider read that throws propagates and never
206
+ * falls back.
197
207
  *
198
208
  * @throws {PerpsError} When the provider plugin is not registered, or the
199
209
  * market is unknown to the provider's market registry.
200
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
201
- * Lighter auth token or an Ondo session) and none resolves.
210
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
211
+ * Lighter auth token or an Ondo session) and none is stored.
212
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
213
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
202
214
  * @public
203
215
  */
204
216
  getAvailableToTrade(params: {
@@ -270,8 +282,10 @@ export declare class PerpsClient {
270
282
  * @throws {PerpsError} When the provider plugin is not registered, when
271
283
  * either the plugin read or the asset sync fails, when a row's
272
284
  * `withdrawalFee` is not a non-negative decimal.
273
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
274
- * Lighter auth token or an Ondo session) and none resolves.
285
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
286
+ * Lighter auth token or an Ondo session) and none is stored.
287
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
288
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
275
289
  * @public
276
290
  */
277
291
  getWithdrawableBalances(params: GetWithdrawableBalancesParams): Promise<WithdrawableBalance[] | undefined>;
@@ -281,8 +295,10 @@ export declare class PerpsClient {
281
295
  *
282
296
  * @throws {PerpsError} When the provider plugin is not registered, when it
283
297
  * declares no portfolio history read, or when the venue read fails.
284
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
285
- * Lighter auth token or an Ondo session) and none resolves.
298
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
299
+ * Lighter auth token or an Ondo session) and none is stored.
300
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
301
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
286
302
  * @public
287
303
  */
288
304
  getPortfolioHistory(params: GetPortfolioHistoryParams, options?: SDKRequestOptions): Promise<PortfolioHistoryResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":"PerpsClient.d.ts","sourceRoot":"","sources":["../../../src/client/PerpsClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,eAAe,EACf,cAAc,EACd,eAAe,EAEf,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,SAAS,EACT,cAAc,EACd,cAAc,EACd,KAAK,EACL,cAAc,EACd,wBAAwB,EACxB,QAAQ,EAGR,WAAW,EACX,WAAW,EAEZ,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAEL,UAAU,EAKX,MAAM,mBAAmB,CAAA;AAE1B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAOnC,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,KAAK,EACV,wBAAwB,EACxB,kBAAkB,EAClB,qBAAqB,EACrB,8BAA8B,EAC9B,uBAAuB,EAGvB,gBAAgB,EAChB,oBAAoB,EACpB,yBAAyB,EACzB,cAAc,EACd,6BAA6B,EAC7B,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EACpB,aAAa,EACb,qBAAqB,EACrB,kB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b,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,qBAAqB,CAAC;IAUjC;;;;;;;;;OASG;IACG,OAAO,CAAC,CAAC,SAAS,UAAU,EAAE,MAAM,EAAE;QAC1C,QAAQ,EAAE,MAAM,CAAA;QAChB,OAAO,EAAE,OAAO,CAAA;QAChB,MAAM,EAAE,CAAC,CAAA;QACT,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,CAAA;QAC1B;sEAC8D;QAC9D,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAA;KACpD,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAKlC,uEAAuE;YACzD,SAAS;IAyDvB;;;;;;;;;;;;OAYG;IACG,gBAAgB,CACpB,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,qBAAqB,CAAC;IASjC;;;;;;;;OAQG;IACG,kBAAkB,CACtB,MAAM,EAAE,8BAA8B,GACrC,OAAO,CAAC,qBAAqB,CAAC;IASjC;;;;;;;;;;;;;;;OAeG;IACG,iBAAiB,CAAC,CAAC,SAAS,cAAc,EAC9C,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAC,GACjC,OAAO,CAAC,qBAAqB,CAAC;CA+ClC"}
@@ -27,8 +27,10 @@ export interface GetActivityParams {
27
27
  *
28
28
  * @throws {PerpsError} When the provider plugin is not registered, or on
29
29
  * backend / network / parsing errors.
30
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
31
- * Lighter auth token or an Ondo session) and none resolves.
30
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
31
+ * Lighter auth token or an Ondo session) and none is stored.
32
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
33
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
32
34
  * @example
33
35
  * ```ts
34
36
  * const { items, pagination } = await getActivity(client, {
@@ -1 +1 @@
1
- {"version":3,"file":"getActivity.d.ts","sourceRoot":"","sources":["../../../src/services/getActivity.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AChE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,YAAY,EAAE,CAAA;CACtB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,iBAAiB,EACzB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,kBAAkB,CAAC,CAY7B"}
@@ -26,8 +26,10 @@ export interface GetFillsParams {
26
26
  *
27
27
  * @throws {PerpsError} When the provider plugin is not registered, or on
28
28
  * backend / network / parsing errors.
29
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
30
- * Lighter auth token or an Ondo session) and none resolves.
29
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
30
+ * Lighter auth token or an Ondo session) and none is stored.
31
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
32
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
31
33
  * @example
32
34
  * ```ts
33
35
  * const { items, pagination } = await getFills(client, {
@@ -1 +1 @@
1
- {"version":3,"file":"getFills.d.ts","sourceRoot":"","sources":["../../../src/services/getFills.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,aAAa,CAAC,CAWxB"}
1
+ {"version":3,"file":"getFills.d.ts","sourceRoot":"","sources":["../../../src/services/getFills.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,aAAa,CAAC,CAWxB"}
@@ -20,8 +20,10 @@ export interface GetOrderParams {
20
20
  *
21
21
  * @throws {PerpsError} When the provider plugin is not registered, or on
22
22
  * backend / network / parsing errors.
23
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
24
- * Lighter auth token or an Ondo session) and none resolves.
23
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
24
+ * Lighter auth token or an Ondo session) and none is stored.
25
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
26
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
25
27
  * @example
26
28
  * ```ts
27
29
  * const order = await getOrder(client, {
@@ -1 +1 @@
1
- {"version":3,"file":"getOrder.d.ts","sourceRoot":"","sources":["../../../src/services/getOrder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAA;CACX;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,KAAK,CAAC,CAKhB"}
1
+ {"version":3,"file":"getOrder.d.ts","sourceRoot":"","sources":["../../../src/services/getOrder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAA;CACX;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,KAAK,CAAC,CAKhB"}
@@ -18,6 +18,15 @@ export interface GetOrdersParams {
18
18
  /** Opaque pagination cursor from the previous response. */
19
19
  cursor?: string;
20
20
  }
21
- /** Read account orders with active lifecycle statuses as the default filter. */
21
+ /**
22
+ * Read account orders with active lifecycle statuses as the default filter.
23
+ *
24
+ * @throws {PerpsError} When the provider plugin is not registered, or on
25
+ * backend / network / parsing errors.
26
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
27
+ * Lighter auth token or an Ondo session) and none is stored.
28
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
29
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
30
+ */
22
31
  export declare function getOrders(client: PerpsSDKClient, params: GetOrdersParams, options?: SDKRequestOptions): Promise<OrdersResponse>;
23
32
  //# sourceMappingURL=getOrders.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getOrders.d.ts","sourceRoot":"","sources":["../../../src/services/getOrders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACpE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAG1D;;;;GAIG;AACH,MAAM,WAAW,e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GetPositionsParams {
24
24
  *
25
25
  * @throws {PerpsError} When the provider plugin is not registered, or on
26
26
  * backend / network / parsing errors.
27
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
28
- * Lighter auth token or an Ondo session) and none resolves.
27
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
28
+ * Lighter auth token or an Ondo session) and none is stored.
29
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
30
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
29
31
  * @example
30
32
  * ```ts
31
33
  * const { positions } = await getPositions(client, {
@@ -1 +1 @@
1
- {"version":3,"file":"getPositions.d.ts","sourceRoot":"","sources":["../../../src/services/getPositions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAU5B"}
1
+ {"version":3,"file":"getPositions.d.ts","sourceRoot":"","sources":["../../../src/services/getPositions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAU5B"}
@@ -9,5 +9,5 @@ export declare const name = "@lifi/perps-sdk";
9
9
  *
10
10
  * @public
11
11
  */
12
- export declare const version = "0.0.0-preview-b4dca87";
12
+ export declare const version = "0.0.0-preview-e927c9c";
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": "0.0.0-preview-b4dca87",
3
+ "version": "0.0.0-preview-e927c9c",
4
4
  "description": "LI.FI Perps SDK for perpetuals trading",
5
5
  "homepage": "https://github.com/lifinance/perps-sdk",
6
6
  "bugs": {
@@ -363,8 +363,10 @@ export class PerpsClient {
363
363
  /**
364
364
  * Read active or historical orders from the selected venue.
365
365
  *
366
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
367
- * Lighter auth token or an Ondo session) and none resolves.
366
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
367
+ * Lighter auth token or an Ondo session) and none is stored.
368
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
369
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
368
370
  */
369
371
  async getOrders(
370
372
  params: GetOrdersParams,
@@ -376,8 +378,10 @@ export class PerpsClient {
376
378
  /**
377
379
  * Read one venue order through the provider's unified mapper.
378
380
  *
379
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
380
- * Lighter auth token or an Ondo session) and none resolves.
381
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
382
+ * Lighter auth token or an Ondo session) and none is stored.
383
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
384
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
381
385
  */
382
386
  async getOrder(
383
387
  params: GetOrderParams,
@@ -664,6 +668,9 @@ export class PerpsClient {
664
668
  * @throws {PerpsError} When the provider plugin is not registered,
665
669
  * `ValidationError` for a spot market, or any other `PerpsError` when the
666
670
  * venue read fails or carries no usable value.
671
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (an
672
+ * Ondo session) and none is stored.
673
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
667
674
  * @public
668
675
  */
669
676
  async getMarketSettings(params: {
@@ -684,14 +691,19 @@ export class PerpsClient {
684
691
  * account displays read the account-scoped
685
692
  * {@link AccountSummary.availableMargin} instead.
686
693
  *
687
- * Providers that read a per-market figure answer it directly. For every
688
- * other provider this falls back to the account summary, so both sides
689
- * equal `availableMargin` and the asset is the market's quote asset.
694
+ * Providers that read a per-market figure answer it directly. A provider
695
+ * that has no per-market figure for the market (a Hyperliquid or Lighter
696
+ * spot market) resolves `undefined`, and this falls back to the account
697
+ * summary, so both sides equal `availableMargin` and the asset is the
698
+ * market's quote asset. A provider read that throws propagates and never
699
+ * falls back.
690
700
  *
691
701
  * @throws {PerpsError} When the provider plugin is not registered, or the
692
702
  * market is unknown to the provider's market registry.
693
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
694
- * Lighter auth token or an Ondo session) and none resolves.
703
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
704
+ * Lighter auth token or an Ondo session) and none is stored.
705
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
706
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
695
707
  * @public
696
708
  */
697
709
  async getAvailableToTrade(
@@ -825,8 +837,10 @@ export class PerpsClient {
825
837
  * @throws {PerpsError} When the provider plugin is not registered, when
826
838
  * either the plugin read or the asset sync fails, when a row's
827
839
  * `withdrawalFee` is not a non-negative decimal.
828
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
829
- * Lighter auth token or an Ondo session) and none resolves.
840
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
841
+ * Lighter auth token or an Ondo session) and none is stored.
842
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
843
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
830
844
  * @public
831
845
  */
832
846
  async getWithdrawableBalances(
@@ -891,8 +905,10 @@ export class PerpsClient {
891
905
  *
892
906
  * @throws {PerpsError} When the provider plugin is not registered, when it
893
907
  * declares no portfolio history read, or when the venue read fails.
894
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
895
- * Lighter auth token or an Ondo session) and none resolves.
908
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
909
+ * Lighter auth token or an Ondo session) and none is stored.
910
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
911
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
896
912
  * @public
897
913
  */
898
914
  async getPortfolioHistory(
@@ -30,8 +30,10 @@ export interface GetActivityParams {
30
30
  *
31
31
  * @throws {PerpsError} When the provider plugin is not registered, or on
32
32
  * backend / network / parsing errors.
33
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
34
- * Lighter auth token or an Ondo session) and none resolves.
33
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
34
+ * Lighter auth token or an Ondo session) and none is stored.
35
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
36
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
35
37
  * @example
36
38
  * ```ts
37
39
  * const { items, pagination } = await getActivity(client, {
@@ -29,8 +29,10 @@ export interface GetFillsParams {
29
29
  *
30
30
  * @throws {PerpsError} When the provider plugin is not registered, or on
31
31
  * backend / network / parsing errors.
32
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
33
- * Lighter auth token or an Ondo session) and none resolves.
32
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
33
+ * Lighter auth token or an Ondo session) and none is stored.
34
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
35
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
34
36
  * @example
35
37
  * ```ts
36
38
  * const { items, pagination } = await getFills(client, {
@@ -23,8 +23,10 @@ export interface GetOrderParams {
23
23
  *
24
24
  * @throws {PerpsError} When the provider plugin is not registered, or on
25
25
  * backend / network / parsing errors.
26
- * @throws {PerpsError} `Unauthorized` when the venue needs a credential (a
27
- * Lighter auth token or an Ondo session) and none resolves.
26
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
27
+ * Lighter auth token or an Ondo session) and none is stored.
28
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
29
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
28
30
  * @example
29
31
  * ```ts
30
32
  * const order = await getOrder(client, {
@@ -22,7 +22,16 @@ export interface GetOrdersParams {
22
22
  cursor?: string
23
23
  }
24
24
 
25
- /** Read account orders with active lifecycle statuses as the default filter. */
25
+ /**
26
+ * Read account orders with active lifecycle statuses as the default filter.
27
+ *
28
+ * @throws {PerpsError} When the provider plugin is not registered, or on
29
+ * backend / network / parsing errors.
30
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
31
+ * Lighter auth token or an Ondo session) and none is stored.
32
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
33
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
34
+ */
26
35
  export async function getOrders(
27
36
  client: PerpsSDKClient,
28
37
  params: GetOrdersParams,