@lifi/perps-sdk 21.0.0 → 21.1.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.
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 +37 -5
  16. package/dist/esm/client/PerpsClient.d.ts.map +1 -1
  17. package/dist/esm/client/PerpsClient.js +37 -5
  18. package/dist/esm/client/PerpsClient.js.map +1 -1
  19. package/dist/esm/services/getActivity.d.ts +4 -0
  20. package/dist/esm/services/getActivity.d.ts.map +1 -1
  21. package/dist/esm/services/getActivity.js +4 -0
  22. package/dist/esm/services/getActivity.js.map +1 -1
  23. package/dist/esm/services/getFills.d.ts +4 -0
  24. package/dist/esm/services/getFills.d.ts.map +1 -1
  25. package/dist/esm/services/getFills.js +4 -0
  26. package/dist/esm/services/getFills.js.map +1 -1
  27. package/dist/esm/services/getOrder.d.ts +4 -0
  28. package/dist/esm/services/getOrder.d.ts.map +1 -1
  29. package/dist/esm/services/getOrder.js +4 -0
  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 -0
  36. package/dist/esm/services/getPositions.d.ts.map +1 -1
  37. package/dist/esm/services/getPositions.js +4 -0
  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 +37 -5
  42. package/dist/types/client/PerpsClient.d.ts.map +1 -1
  43. package/dist/types/services/getActivity.d.ts +4 -0
  44. package/dist/types/services/getActivity.d.ts.map +1 -1
  45. package/dist/types/services/getFills.d.ts +4 -0
  46. package/dist/types/services/getFills.d.ts.map +1 -1
  47. package/dist/types/services/getOrder.d.ts +4 -0
  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 -0
  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 +37 -5
  56. package/src/services/getActivity.ts +4 -0
  57. package/src/services/getFills.ts +4 -0
  58. package/src/services/getOrder.ts +4 -0
  59. package/src/services/getOrders.ts +10 -1
  60. package/src/services/getPositions.ts +4 -0
  61. package/src/version.ts +1 -1
@@ -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;;;;;;;;;;;;;;;;GAgBG;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,6 +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} `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.
29
33
  * @example
30
34
  * ```ts
31
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,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EAAsE;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,6 +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} `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.
9
13
  * @example
10
14
  * ```ts
11
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;;;;;;;;;;;;;;;;GAgBG;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,6 +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} `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.
23
27
  * @example
24
28
  * ```ts
25
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;;;;;;;;;;;;;;;;GAgBG;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,6 +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} `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.
9
13
  * @example
10
14
  * ```ts
11
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;;;;;;;;;;;;;;;;GAgBG;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,6 +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} `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.
27
31
  * @example
28
32
  * ```ts
29
33
  * const { positions } = await getPositions(client, {
@@ -1 +1 @@
1
- {"version":3,"file":"getPositions.d.ts","sourceRoot":"","sources":["../../../src/services/getPositions.ts"],"names":[],"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M,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,6 +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} `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.
9
13
  * @example
10
14
  * ```ts
11
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;;;;;;;;;;;;;;;GAeG;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 = "21.0.0";
12
+ export declare const version = "21.1.0";
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 = '21.0.0';
12
+ export const version = '21.1.0';
13
13
  //# sourceMappingURL=version.js.map
@@ -51,9 +51,23 @@ export declare class PerpsClient {
51
51
  * `providers` option. The plugin owns signer identity and write-side signing.
52
52
  */
53
53
  private requireProvider;
54
- /** Read active or historical orders from the selected venue. */
54
+ /**
55
+ * Read active or historical orders from the selected venue.
56
+ *
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.
61
+ */
55
62
  getOrders(params: GetOrdersParams, options?: SDKRequestOptions): Promise<OrdersResponse>;
56
- /** Read one venue order through the provider's unified mapper. */
63
+ /**
64
+ * Read one venue order through the provider's unified mapper.
65
+ *
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.
70
+ */
57
71
  getOrder(params: GetOrderParams, options?: SDKRequestOptions): Promise<Order>;
58
72
  /**
59
73
  * Ask the provider plugin for the signer-bearing wire fields of `action` —
@@ -168,6 +182,9 @@ export declare class PerpsClient {
168
182
  * @throws {PerpsError} When the provider plugin is not registered,
169
183
  * `ValidationError` for a spot market, or any other `PerpsError` when the
170
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.
171
188
  * @public
172
189
  */
173
190
  getMarketSettings(params: {
@@ -181,12 +198,19 @@ export declare class PerpsClient {
181
198
  * account displays read the account-scoped
182
199
  * {@link AccountSummary.availableMargin} instead.
183
200
  *
184
- * Providers that read a per-market figure answer it directly. For every
185
- * other provider this falls back to the account summary, so both sides
186
- * 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.
187
207
  *
188
208
  * @throws {PerpsError} When the provider plugin is not registered, or the
189
209
  * market is unknown to the provider's market registry.
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.
190
214
  * @public
191
215
  */
192
216
  getAvailableToTrade(params: {
@@ -258,6 +282,10 @@ export declare class PerpsClient {
258
282
  * @throws {PerpsError} When the provider plugin is not registered, when
259
283
  * either the plugin read or the asset sync fails, when a row's
260
284
  * `withdrawalFee` is not a non-negative decimal.
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.
261
289
  * @public
262
290
  */
263
291
  getWithdrawableBalances(params: GetWithdrawableBalancesParams): Promise<WithdrawableBalance[] | undefined>;
@@ -267,6 +295,10 @@ export declare class PerpsClient {
267
295
  *
268
296
  * @throws {PerpsError} When the provider plugin is not registered, when it
269
297
  * declares no portfolio history read, or when the venue read fails.
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.
270
302
  * @public
271
303
  */
272
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,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,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAStE;;;;;;;;;OASG;IACG,SAAS,CACb,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,6 +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} `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.
30
34
  * @example
31
35
  * ```ts
32
36
  * const { items, pagination } = await getActivity(client, {
@@ -1 +1 @@
1
- {"version":3,"file":"getActivity.d.ts","sourceRoot":"","sources":["../../../src/services/getActivity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACzE,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,iBAAiB;IAChC,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,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,YAAY,EAAE,CAAA;CACtB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,iBAAiB,EACzB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,kBAAkB,CAAC,CAY7B"}
1
+ {"version":3,"file":"getActivity.d.ts","sourceRoot":"","sources":["../../../src/services/getActivity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACzE,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,iBAAiB;IAChC,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,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,6 +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} `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.
29
33
  * @example
30
34
  * ```ts
31
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;;;;;;;;;;;;;;;;GAgBG;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,6 +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} `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.
23
27
  * @example
24
28
  * ```ts
25
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;;;;;;;;;;;;;;;;GAgBG;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,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"}
@@ -24,6 +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} `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.
27
31
  * @example
28
32
  * ```ts
29
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;;;;;;;;;;;;;;;GAeG;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 = "21.0.0";
12
+ export declare const version = "21.1.0";
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": "21.0.0",
3
+ "version": "21.1.0",
4
4
  "description": "LI.FI Perps SDK for perpetuals trading",
5
5
  "homepage": "https://github.com/lifinance/perps-sdk",
6
6
  "bugs": {
@@ -360,7 +360,14 @@ export class PerpsClient {
360
360
  return resolveProvider(this.sdkClient, provider)
361
361
  }
362
362
 
363
- /** Read active or historical orders from the selected venue. */
363
+ /**
364
+ * Read active or historical orders from the selected venue.
365
+ *
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.
370
+ */
364
371
  async getOrders(
365
372
  params: GetOrdersParams,
366
373
  options?: SDKRequestOptions
@@ -368,7 +375,14 @@ export class PerpsClient {
368
375
  return fetchOrders(this.sdkClient, params, options)
369
376
  }
370
377
 
371
- /** Read one venue order through the provider's unified mapper. */
378
+ /**
379
+ * Read one venue order through the provider's unified mapper.
380
+ *
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.
385
+ */
372
386
  async getOrder(
373
387
  params: GetOrderParams,
374
388
  options?: SDKRequestOptions
@@ -654,6 +668,9 @@ export class PerpsClient {
654
668
  * @throws {PerpsError} When the provider plugin is not registered,
655
669
  * `ValidationError` for a spot market, or any other `PerpsError` when the
656
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.
657
674
  * @public
658
675
  */
659
676
  async getMarketSettings(params: {
@@ -674,12 +691,19 @@ export class PerpsClient {
674
691
  * account displays read the account-scoped
675
692
  * {@link AccountSummary.availableMargin} instead.
676
693
  *
677
- * Providers that read a per-market figure answer it directly. For every
678
- * other provider this falls back to the account summary, so both sides
679
- * 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.
680
700
  *
681
701
  * @throws {PerpsError} When the provider plugin is not registered, or the
682
702
  * market is unknown to the provider's market registry.
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.
683
707
  * @public
684
708
  */
685
709
  async getAvailableToTrade(
@@ -813,6 +837,10 @@ export class PerpsClient {
813
837
  * @throws {PerpsError} When the provider plugin is not registered, when
814
838
  * either the plugin read or the asset sync fails, when a row's
815
839
  * `withdrawalFee` is not a non-negative decimal.
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.
816
844
  * @public
817
845
  */
818
846
  async getWithdrawableBalances(
@@ -880,6 +908,10 @@ export class PerpsClient {
880
908
  *
881
909
  * @throws {PerpsError} When the provider plugin is not registered, when it
882
910
  * declares no portfolio history read, or when the venue read fails.
911
+ * @throws {PerpsError} `SetupRequired` when the venue needs a credential (a
912
+ * Lighter auth token or an Ondo session) and none is stored.
913
+ * @throws {PerpsError} `Unauthorized` when the venue rejects the credential.
914
+ * @throws {PerpsError} `AccountNotFound` when the wallet has no venue account.
883
915
  * @public
884
916
  */
885
917
  async getPortfolioHistory(
@@ -30,6 +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} `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.
33
37
  * @example
34
38
  * ```ts
35
39
  * const { items, pagination } = await getActivity(client, {
@@ -29,6 +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} `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.
32
36
  * @example
33
37
  * ```ts
34
38
  * const { items, pagination } = await getFills(client, {
@@ -23,6 +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} `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.
26
30
  * @example
27
31
  * ```ts
28
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,
@@ -27,6 +27,10 @@ export interface GetPositionsParams {
27
27
  *
28
28
  * @throws {PerpsError} When the provider plugin is not registered, or on
29
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.
30
34
  * @example
31
35
  * ```ts
32
36
  * const { positions } = await getPositions(client, {
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 = '21.0.0'
13
+ export const version = '21.1.0'