@lifi/perps-sdk 0.0.0-preview-7bd1054 → 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.
- package/dist/cjs/client/PerpsClient.d.ts.map +1 -1
- package/dist/cjs/client/PerpsClient.js.map +1 -1
- package/dist/cjs/services/getActivity.d.ts.map +1 -1
- package/dist/cjs/services/getActivity.js.map +1 -1
- package/dist/cjs/services/getFills.d.ts.map +1 -1
- package/dist/cjs/services/getFills.js.map +1 -1
- package/dist/cjs/services/getOrder.d.ts.map +1 -1
- package/dist/cjs/services/getOrder.js.map +1 -1
- package/dist/cjs/services/getOrders.d.ts.map +1 -1
- package/dist/cjs/services/getOrders.js.map +1 -1
- package/dist/cjs/services/getPositions.d.ts.map +1 -1
- package/dist/cjs/services/getPositions.js.map +1 -1
- package/dist/cjs/types/withdrawal.d.ts +5 -5
- package/dist/cjs/types/withdrawal.d.ts.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client/PerpsClient.d.ts +37 -5
- package/dist/esm/client/PerpsClient.d.ts.map +1 -1
- package/dist/esm/client/PerpsClient.js +37 -5
- package/dist/esm/client/PerpsClient.js.map +1 -1
- package/dist/esm/services/getActivity.d.ts +4 -0
- package/dist/esm/services/getActivity.d.ts.map +1 -1
- package/dist/esm/services/getActivity.js +4 -0
- package/dist/esm/services/getActivity.js.map +1 -1
- package/dist/esm/services/getFills.d.ts +4 -0
- package/dist/esm/services/getFills.d.ts.map +1 -1
- package/dist/esm/services/getFills.js +4 -0
- package/dist/esm/services/getFills.js.map +1 -1
- package/dist/esm/services/getOrder.d.ts +4 -0
- package/dist/esm/services/getOrder.d.ts.map +1 -1
- package/dist/esm/services/getOrder.js +4 -0
- package/dist/esm/services/getOrder.js.map +1 -1
- package/dist/esm/services/getOrders.d.ts +10 -1
- package/dist/esm/services/getOrders.d.ts.map +1 -1
- package/dist/esm/services/getOrders.js +10 -1
- package/dist/esm/services/getOrders.js.map +1 -1
- package/dist/esm/services/getPositions.d.ts +4 -0
- package/dist/esm/services/getPositions.d.ts.map +1 -1
- package/dist/esm/services/getPositions.js +4 -0
- package/dist/esm/services/getPositions.js.map +1 -1
- package/dist/esm/types/withdrawal.d.ts +5 -5
- package/dist/esm/types/withdrawal.d.ts.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/client/PerpsClient.d.ts +37 -5
- package/dist/types/client/PerpsClient.d.ts.map +1 -1
- package/dist/types/services/getActivity.d.ts +4 -0
- package/dist/types/services/getActivity.d.ts.map +1 -1
- package/dist/types/services/getFills.d.ts +4 -0
- package/dist/types/services/getFills.d.ts.map +1 -1
- package/dist/types/services/getOrder.d.ts +4 -0
- package/dist/types/services/getOrder.d.ts.map +1 -1
- package/dist/types/services/getOrders.d.ts +10 -1
- package/dist/types/services/getOrders.d.ts.map +1 -1
- package/dist/types/services/getPositions.d.ts +4 -0
- package/dist/types/services/getPositions.d.ts.map +1 -1
- package/dist/types/types/withdrawal.d.ts +5 -5
- package/dist/types/types/withdrawal.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/client/PerpsClient.ts +37 -5
- package/src/services/getActivity.ts +4 -0
- package/src/services/getFills.ts +4 -0
- package/src/services/getOrder.ts +4 -0
- package/src/services/getOrders.ts +10 -1
- package/src/services/getPositions.ts +4 -0
- package/src/types/withdrawal.ts +5 -10
- package/src/version.ts +1 -1
|
@@ -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
|
|
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"}
|
|
@@ -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 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
|
|
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,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
|
|
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,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
|
|
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
|
|
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
|
|
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
|
-
/**
|
|
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
|
|
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
|
-
/**
|
|
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
|
|
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":[],"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
|
|
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,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
|
|
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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActionType, Asset,
|
|
1
|
+
import type { ActionType, Asset, WithdrawalRoute } from '@lifi/perps-types';
|
|
2
2
|
import type { Address } from 'viem';
|
|
3
3
|
export type { WithdrawalRoute };
|
|
4
4
|
/**
|
|
@@ -12,13 +12,13 @@ export interface ProviderWithdrawableBalance {
|
|
|
12
12
|
assetId: string;
|
|
13
13
|
route: WithdrawalRoute;
|
|
14
14
|
/** Withdrawable amount in the asset's own units. Always greater than zero. */
|
|
15
|
-
available:
|
|
15
|
+
available: string;
|
|
16
16
|
/**
|
|
17
17
|
* Flat venue fee on a withdrawal from this row, in the asset's own units.
|
|
18
18
|
* Absent when the venue publishes no fee for the asset. The client rejects
|
|
19
19
|
* a value that is not a non-negative decimal.
|
|
20
20
|
*/
|
|
21
|
-
withdrawalFee?:
|
|
21
|
+
withdrawalFee?: string;
|
|
22
22
|
/**
|
|
23
23
|
* `true` when the venue takes `withdrawalFee` out of the requested amount,
|
|
24
24
|
* `false` when it charges the fee in addition. Set together with
|
|
@@ -37,7 +37,7 @@ export interface WithdrawableBalance {
|
|
|
37
37
|
asset: Asset;
|
|
38
38
|
route: WithdrawalRoute;
|
|
39
39
|
/** Withdrawable amount in the asset's own units. */
|
|
40
|
-
available:
|
|
40
|
+
available: string;
|
|
41
41
|
/**
|
|
42
42
|
* Flat venue fee on a withdrawal from this row, in the asset's own units.
|
|
43
43
|
* Absent when the venue publishes no fee for the asset. With
|
|
@@ -48,7 +48,7 @@ export interface WithdrawableBalance {
|
|
|
48
48
|
* is zero or negative when the fee is at or above `available`, and the row
|
|
49
49
|
* then funds no withdrawal.
|
|
50
50
|
*/
|
|
51
|
-
withdrawalFee?:
|
|
51
|
+
withdrawalFee?: string;
|
|
52
52
|
/**
|
|
53
53
|
* Present only together with `withdrawalFee`. Absent on a row from a
|
|
54
54
|
* provider plugin that does not report it; absence means unknown, not
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawal.d.ts","sourceRoot":"","sources":["../../../src/types/withdrawal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"withdrawal.d.ts","sourceRoot":"","sources":["../../../src/types/withdrawal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,YAAY,EAAE,eAAe,EAAE,CAAA;AAE/B;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,eAAe,CAAA;IACtB,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAA;IACjB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,KAAK,CAAA;IACZ,KAAK,EAAE,eAAe,CAAA;IACtB,oDAAoD;IACpD,SAAS,EAAE,MAAM,CAAA;IACjB;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,OAAO,CAAA;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,eAAe,CAAA;IACrB,qEAAqE;IACrE,KAAK,EAAE,UAAU,EAAE,CAAA;CACpB;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,yBAAyB,CAAA"}
|
package/dist/esm/version.d.ts
CHANGED
package/dist/esm/version.js
CHANGED
|
@@ -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
|
-
/**
|
|
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
|
-
/**
|
|
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.
|
|
185
|
-
*
|
|
186
|
-
*
|
|
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,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EACpB,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACf,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAEV,iBAAiB,EACjB,eAAe,EAChB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAGV,cAAc,EACd,kBAAkB,EAEnB,MAAM,sBAAsB,CAA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,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
|
|
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
|
|
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
|
|
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
|
-
/**
|
|
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
|
|
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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,4 +1,4 @@
|
|
|
1
|
-
import type { ActionType, Asset,
|
|
1
|
+
import type { ActionType, Asset, WithdrawalRoute } from '@lifi/perps-types';
|
|
2
2
|
import type { Address } from 'viem';
|
|
3
3
|
export type { WithdrawalRoute };
|
|
4
4
|
/**
|
|
@@ -12,13 +12,13 @@ export interface ProviderWithdrawableBalance {
|
|
|
12
12
|
assetId: string;
|
|
13
13
|
route: WithdrawalRoute;
|
|
14
14
|
/** Withdrawable amount in the asset's own units. Always greater than zero. */
|
|
15
|
-
available:
|
|
15
|
+
available: string;
|
|
16
16
|
/**
|
|
17
17
|
* Flat venue fee on a withdrawal from this row, in the asset's own units.
|
|
18
18
|
* Absent when the venue publishes no fee for the asset. The client rejects
|
|
19
19
|
* a value that is not a non-negative decimal.
|
|
20
20
|
*/
|
|
21
|
-
withdrawalFee?:
|
|
21
|
+
withdrawalFee?: string;
|
|
22
22
|
/**
|
|
23
23
|
* `true` when the venue takes `withdrawalFee` out of the requested amount,
|
|
24
24
|
* `false` when it charges the fee in addition. Set together with
|
|
@@ -37,7 +37,7 @@ export interface WithdrawableBalance {
|
|
|
37
37
|
asset: Asset;
|
|
38
38
|
route: WithdrawalRoute;
|
|
39
39
|
/** Withdrawable amount in the asset's own units. */
|
|
40
|
-
available:
|
|
40
|
+
available: string;
|
|
41
41
|
/**
|
|
42
42
|
* Flat venue fee on a withdrawal from this row, in the asset's own units.
|
|
43
43
|
* Absent when the venue publishes no fee for the asset. With
|
|
@@ -48,7 +48,7 @@ export interface WithdrawableBalance {
|
|
|
48
48
|
* is zero or negative when the fee is at or above `available`, and the row
|
|
49
49
|
* then funds no withdrawal.
|
|
50
50
|
*/
|
|
51
|
-
withdrawalFee?:
|
|
51
|
+
withdrawalFee?: string;
|
|
52
52
|
/**
|
|
53
53
|
* Present only together with `withdrawalFee`. Absent on a row from a
|
|
54
54
|
* provider plugin that does not report it; absence means unknown, not
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawal.d.ts","sourceRoot":"","sources":["../../../src/types/withdrawal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"withdrawal.d.ts","sourceRoot":"","sources":["../../../src/types/withdrawal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,YAAY,EAAE,eAAe,EAAE,CAAA;AAE/B;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,eAAe,CAAA;IACtB,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAA;IACjB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,KAAK,CAAA;IACZ,KAAK,EAAE,eAAe,CAAA;IACtB,oDAAoD;IACpD,SAAS,EAAE,MAAM,CAAA;IACjB;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,OAAO,CAAA;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,eAAe,CAAA;IACrB,qEAAqE;IACrE,KAAK,EAAE,UAAU,EAAE,CAAA;CACpB;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,yBAAyB,CAAA"}
|
package/dist/types/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifi/perps-sdk",
|
|
3
|
-
"version": "0.0.0-preview-
|
|
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": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"big.js": "^7.0.1",
|
|
47
47
|
"partysocket": "^1.1.19",
|
|
48
48
|
"viem": "^2.55.18",
|
|
49
|
-
"@lifi/perps-types": "^
|
|
49
|
+
"@lifi/perps-types": "^18.0.0"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|