zklighter-perps 1.0.20 → 1.0.22

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.
@@ -478,8 +478,7 @@ export type GetAccountByEnum = typeof GetAccountByEnum[keyof typeof GetAccountBy
478
478
  * @export
479
479
  */
480
480
  export const GetAccountPnlByEnum = {
481
- Index: 'index',
482
- L1Address: 'l1_address'
481
+ Index: 'index'
483
482
  } as const;
484
483
  export type GetAccountPnlByEnum = typeof GetAccountPnlByEnum[keyof typeof GetAccountPnlByEnum];
485
484
  /**
@@ -702,16 +702,14 @@ export class TransactionApi extends runtime.BaseAPI {
702
702
  * @export
703
703
  */
704
704
  export const GetAccountPendingTxsByEnum = {
705
- AccountIndex: 'account_index',
706
- L1Address: 'l1_address'
705
+ AccountIndex: 'account_index'
707
706
  } as const;
708
707
  export type GetAccountPendingTxsByEnum = typeof GetAccountPendingTxsByEnum[keyof typeof GetAccountPendingTxsByEnum];
709
708
  /**
710
709
  * @export
711
710
  */
712
711
  export const GetAccountTxsByEnum = {
713
- AccountIndex: 'account_index',
714
- L1Address: 'l1_address'
712
+ AccountIndex: 'account_index'
715
713
  } as const;
716
714
  export type GetAccountTxsByEnum = typeof GetAccountTxsByEnum[keyof typeof GetAccountTxsByEnum];
717
715
  /**
package/models/Account.ts CHANGED
@@ -67,6 +67,12 @@ export interface Account {
67
67
  * @memberof Account
68
68
  */
69
69
  collateral: string;
70
+ /**
71
+ *
72
+ * @type {boolean}
73
+ * @memberof Account
74
+ */
75
+ is_sub_account: boolean;
70
76
  }
71
77
 
72
78
  /**
@@ -79,6 +85,7 @@ export function instanceOfAccount(value: object): value is Account {
79
85
  if (!('open_order_count' in value) || value['open_order_count'] === undefined) return false;
80
86
  if (!('status' in value) || value['status'] === undefined) return false;
81
87
  if (!('collateral' in value) || value['collateral'] === undefined) return false;
88
+ if (!('is_sub_account' in value) || value['is_sub_account'] === undefined) return false;
82
89
  return true;
83
90
  }
84
91
 
@@ -100,6 +107,7 @@ export function AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): A
100
107
  'open_order_count': json['open_order_count'],
101
108
  'status': json['status'],
102
109
  'collateral': json['collateral'],
110
+ 'is_sub_account': json['is_sub_account'],
103
111
  };
104
112
  }
105
113
 
@@ -117,6 +125,7 @@ export function AccountToJSON(value?: Account | null): any {
117
125
  'open_order_count': value['open_order_count'],
118
126
  'status': value['status'],
119
127
  'collateral': value['collateral'],
128
+ 'is_sub_account': value['is_sub_account'],
120
129
  };
121
130
  }
122
131
 
@@ -25,6 +25,12 @@ export interface AccountPosition {
25
25
  * @memberof AccountPosition
26
26
  */
27
27
  market_id: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof AccountPosition
32
+ */
33
+ ooc: number;
28
34
  /**
29
35
  *
30
36
  * @type {string}
@@ -80,6 +86,7 @@ export interface AccountPosition {
80
86
  */
81
87
  export function instanceOfAccountPosition(value: object): value is AccountPosition {
82
88
  if (!('market_id' in value) || value['market_id'] === undefined) return false;
89
+ if (!('ooc' in value) || value['ooc'] === undefined) return false;
83
90
  if (!('name' in value) || value['name'] === undefined) return false;
84
91
  if (!('symbol' in value) || value['symbol'] === undefined) return false;
85
92
  if (!('sign' in value) || value['sign'] === undefined) return false;
@@ -102,6 +109,7 @@ export function AccountPositionFromJSONTyped(json: any, ignoreDiscriminator: boo
102
109
  return {
103
110
 
104
111
  'market_id': json['market_id'],
112
+ 'ooc': json['ooc'],
105
113
  'name': json['name'],
106
114
  'symbol': json['symbol'],
107
115
  'sign': json['sign'],
@@ -120,6 +128,7 @@ export function AccountPositionToJSON(value?: AccountPosition | null): any {
120
128
  return {
121
129
 
122
130
  'market_id': value['market_id'],
131
+ 'ooc': value['ooc'],
123
132
  'name': value['name'],
124
133
  'symbol': value['symbol'],
125
134
  'sign': value['sign'],
@@ -80,6 +80,12 @@ export interface DetailedAccount {
80
80
  * @memberof DetailedAccount
81
81
  */
82
82
  collateral?: string;
83
+ /**
84
+ *
85
+ * @type {boolean}
86
+ * @memberof DetailedAccount
87
+ */
88
+ is_sub_account?: boolean;
83
89
  /**
84
90
  *
85
91
  * @type {Array<AccountPosition>}
@@ -128,6 +134,7 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
128
134
  'open_order_count': json['open_order_count'] == null ? undefined : json['open_order_count'],
129
135
  'status': json['status'] == null ? undefined : json['status'],
130
136
  'collateral': json['collateral'] == null ? undefined : json['collateral'],
137
+ 'is_sub_account': json['is_sub_account'] == null ? undefined : json['is_sub_account'],
131
138
  'positions': ((json['positions'] as Array<any>).map(AccountPositionFromJSON)),
132
139
  'total_asset_value': json['total_asset_value'],
133
140
  'market_stats': ((json['market_stats'] as Array<any>).map(AccountMarketStatsFromJSON)),
@@ -148,6 +155,7 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
148
155
  'open_order_count': value['open_order_count'],
149
156
  'status': value['status'],
150
157
  'collateral': value['collateral'],
158
+ 'is_sub_account': value['is_sub_account'],
151
159
  'positions': ((value['positions'] as Array<any>).map(AccountPositionToJSON)),
152
160
  'total_asset_value': value['total_asset_value'],
153
161
  'market_stats': ((value['market_stats'] as Array<any>).map(AccountMarketStatsToJSON)),
@@ -24,25 +24,28 @@ export interface Liquidation {
24
24
  * @type {number}
25
25
  * @memberof Liquidation
26
26
  */
27
- LiquidationId?: number;
27
+ liquidation_id: number;
28
28
  /**
29
29
  *
30
30
  * @type {number}
31
31
  * @memberof Liquidation
32
32
  */
33
- AccountIndex?: number;
33
+ account_index: number;
34
34
  /**
35
35
  *
36
36
  * @type {number}
37
37
  * @memberof Liquidation
38
38
  */
39
- LiquidationType?: number;
39
+ liquidation_type: number;
40
40
  }
41
41
 
42
42
  /**
43
43
  * Check if a given object implements the Liquidation interface.
44
44
  */
45
45
  export function instanceOfLiquidation(value: object): value is Liquidation {
46
+ if (!('liquidation_id' in value) || value['liquidation_id'] === undefined) return false;
47
+ if (!('account_index' in value) || value['account_index'] === undefined) return false;
48
+ if (!('liquidation_type' in value) || value['liquidation_type'] === undefined) return false;
46
49
  return true;
47
50
  }
48
51
 
@@ -56,9 +59,9 @@ export function LiquidationFromJSONTyped(json: any, ignoreDiscriminator: boolean
56
59
  }
57
60
  return {
58
61
 
59
- 'LiquidationId': json['LiquidationId'] == null ? undefined : json['LiquidationId'],
60
- 'AccountIndex': json['AccountIndex'] == null ? undefined : json['AccountIndex'],
61
- 'LiquidationType': json['LiquidationType'] == null ? undefined : json['LiquidationType'],
62
+ 'liquidation_id': json['liquidation_id'],
63
+ 'account_index': json['account_index'],
64
+ 'liquidation_type': json['liquidation_type'],
62
65
  };
63
66
  }
64
67
 
@@ -68,9 +71,9 @@ export function LiquidationToJSON(value?: Liquidation | null): any {
68
71
  }
69
72
  return {
70
73
 
71
- 'LiquidationId': value['LiquidationId'],
72
- 'AccountIndex': value['AccountIndex'],
73
- 'LiquidationType': value['LiquidationType'],
74
+ 'liquidation_id': value['liquidation_id'],
75
+ 'account_index': value['account_index'],
76
+ 'liquidation_type': value['liquidation_type'],
74
77
  };
75
78
  }
76
79
 
@@ -44,8 +44,7 @@ export interface ReqGetAccountPendingTxs {
44
44
  * @export
45
45
  */
46
46
  export const ReqGetAccountPendingTxsByEnum = {
47
- AccountIndex: 'account_index',
48
- L1Address: 'l1_address'
47
+ AccountIndex: 'account_index'
49
48
  } as const;
50
49
  export type ReqGetAccountPendingTxsByEnum = typeof ReqGetAccountPendingTxsByEnum[keyof typeof ReqGetAccountPendingTxsByEnum];
51
50
 
@@ -62,8 +62,7 @@ export interface ReqGetAccountPnL {
62
62
  * @export
63
63
  */
64
64
  export const ReqGetAccountPnLByEnum = {
65
- Index: 'index',
66
- L1Address: 'l1_address'
65
+ Index: 'index'
67
66
  } as const;
68
67
  export type ReqGetAccountPnLByEnum = typeof ReqGetAccountPnLByEnum[keyof typeof ReqGetAccountPnLByEnum];
69
68
 
@@ -56,8 +56,7 @@ export interface ReqGetAccountTxs {
56
56
  * @export
57
57
  */
58
58
  export const ReqGetAccountTxsByEnum = {
59
- AccountIndex: 'account_index',
60
- L1Address: 'l1_address'
59
+ AccountIndex: 'account_index'
61
60
  } as const;
62
61
  export type ReqGetAccountTxsByEnum = typeof ReqGetAccountTxsByEnum[keyof typeof ReqGetAccountTxsByEnum];
63
62
 
@@ -38,8 +38,7 @@ export interface ReqGetByAccount {
38
38
  * @export
39
39
  */
40
40
  export const ReqGetByAccountByEnum = {
41
- AccountIndex: 'account_index',
42
- L1Address: 'l1_address'
41
+ AccountIndex: 'account_index'
43
42
  } as const;
44
43
  export type ReqGetByAccountByEnum = typeof ReqGetByAccountByEnum[keyof typeof ReqGetByAccountByEnum];
45
44
 
package/openapi.json CHANGED
@@ -278,8 +278,7 @@
278
278
  "required": true,
279
279
  "type": "string",
280
280
  "enum": [
281
- "account_index",
282
- "l1_address"
281
+ "account_index"
283
282
  ]
284
283
  },
285
284
  {
@@ -346,8 +345,7 @@
346
345
  "required": true,
347
346
  "type": "string",
348
347
  "enum": [
349
- "account_index",
350
- "l1_address"
348
+ "account_index"
351
349
  ]
352
350
  },
353
351
  {
@@ -1320,8 +1318,7 @@
1320
1318
  "required": true,
1321
1319
  "type": "string",
1322
1320
  "enum": [
1323
- "index",
1324
- "l1_address"
1321
+ "index"
1325
1322
  ]
1326
1323
  },
1327
1324
  {
@@ -1818,6 +1815,11 @@
1818
1815
  "collateral": {
1819
1816
  "type": "string",
1820
1817
  "example": "46342"
1818
+ },
1819
+ "is_sub_account": {
1820
+ "type": "boolean",
1821
+ "format": "boolean",
1822
+ "example": "false"
1821
1823
  }
1822
1824
  },
1823
1825
  "title": "Account",
@@ -1827,7 +1829,8 @@
1827
1829
  "cancel_all_time",
1828
1830
  "open_order_count",
1829
1831
  "status",
1830
- "collateral"
1832
+ "collateral",
1833
+ "is_sub_account"
1831
1834
  ]
1832
1835
  },
1833
1836
  "AccountApiKeys": {
@@ -1933,6 +1936,11 @@
1933
1936
  "format": "uin16",
1934
1937
  "example": "1"
1935
1938
  },
1939
+ "ooc": {
1940
+ "type": "integer",
1941
+ "format": "int64",
1942
+ "example": "3"
1943
+ },
1936
1944
  "name": {
1937
1945
  "type": "string",
1938
1946
  "example": "Ethereum"
@@ -1970,6 +1978,7 @@
1970
1978
  "title": "AccountPosition",
1971
1979
  "required": [
1972
1980
  "market_id",
1981
+ "ooc",
1973
1982
  "name",
1974
1983
  "symbol",
1975
1984
  "sign",
@@ -2335,6 +2344,11 @@
2335
2344
  "type": "string",
2336
2345
  "example": "46342"
2337
2346
  },
2347
+ "is_sub_account": {
2348
+ "type": "boolean",
2349
+ "format": "boolean",
2350
+ "example": "false"
2351
+ },
2338
2352
  "positions": {
2339
2353
  "type": "array",
2340
2354
  "items": {
@@ -2712,20 +2726,28 @@
2712
2726
  "Liquidation": {
2713
2727
  "type": "object",
2714
2728
  "properties": {
2715
- "LiquidationId": {
2729
+ "liquidation_id": {
2716
2730
  "type": "integer",
2717
- "format": "int64"
2731
+ "format": "int64",
2732
+ "example": "1"
2718
2733
  },
2719
- "AccountIndex": {
2734
+ "account_index": {
2720
2735
  "type": "integer",
2721
- "format": "int64"
2736
+ "format": "int64",
2737
+ "example": "1"
2722
2738
  },
2723
- "LiquidationType": {
2739
+ "liquidation_type": {
2724
2740
  "type": "integer",
2725
- "format": "uint8"
2741
+ "format": "uint8",
2742
+ "example": "1"
2726
2743
  }
2727
2744
  },
2728
- "title": "Liquidation"
2745
+ "title": "Liquidation",
2746
+ "required": [
2747
+ "liquidation_id",
2748
+ "account_index",
2749
+ "liquidation_type"
2750
+ ]
2729
2751
  },
2730
2752
  "MarketInfo": {
2731
2753
  "type": "object",
@@ -3575,8 +3597,7 @@
3575
3597
  "by": {
3576
3598
  "type": "string",
3577
3599
  "enum": [
3578
- "account_index",
3579
- "l1_address"
3600
+ "account_index"
3580
3601
  ]
3581
3602
  },
3582
3603
  "value": {
@@ -3598,8 +3619,7 @@
3598
3619
  "by": {
3599
3620
  "type": "string",
3600
3621
  "enum": [
3601
- "index",
3602
- "l1_address"
3622
+ "index"
3603
3623
  ]
3604
3624
  },
3605
3625
  "value": {
@@ -3655,8 +3675,7 @@
3655
3675
  "by": {
3656
3676
  "type": "string",
3657
3677
  "enum": [
3658
- "account_index",
3659
- "l1_address"
3678
+ "account_index"
3660
3679
  ]
3661
3680
  },
3662
3681
  "value": {
@@ -3718,8 +3737,7 @@
3718
3737
  "by": {
3719
3738
  "type": "string",
3720
3739
  "enum": [
3721
- "account_index",
3722
- "l1_address"
3740
+ "account_index"
3723
3741
  ]
3724
3742
  },
3725
3743
  "value": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {