zklighter-perps 1.0.21 → 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
 
@@ -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": {
@@ -2341,6 +2344,11 @@
2341
2344
  "type": "string",
2342
2345
  "example": "46342"
2343
2346
  },
2347
+ "is_sub_account": {
2348
+ "type": "boolean",
2349
+ "format": "boolean",
2350
+ "example": "false"
2351
+ },
2344
2352
  "positions": {
2345
2353
  "type": "array",
2346
2354
  "items": {
@@ -2718,20 +2726,28 @@
2718
2726
  "Liquidation": {
2719
2727
  "type": "object",
2720
2728
  "properties": {
2721
- "LiquidationId": {
2729
+ "liquidation_id": {
2722
2730
  "type": "integer",
2723
- "format": "int64"
2731
+ "format": "int64",
2732
+ "example": "1"
2724
2733
  },
2725
- "AccountIndex": {
2734
+ "account_index": {
2726
2735
  "type": "integer",
2727
- "format": "int64"
2736
+ "format": "int64",
2737
+ "example": "1"
2728
2738
  },
2729
- "LiquidationType": {
2739
+ "liquidation_type": {
2730
2740
  "type": "integer",
2731
- "format": "uint8"
2741
+ "format": "uint8",
2742
+ "example": "1"
2732
2743
  }
2733
2744
  },
2734
- "title": "Liquidation"
2745
+ "title": "Liquidation",
2746
+ "required": [
2747
+ "liquidation_id",
2748
+ "account_index",
2749
+ "liquidation_type"
2750
+ ]
2735
2751
  },
2736
2752
  "MarketInfo": {
2737
2753
  "type": "object",
@@ -3581,8 +3597,7 @@
3581
3597
  "by": {
3582
3598
  "type": "string",
3583
3599
  "enum": [
3584
- "account_index",
3585
- "l1_address"
3600
+ "account_index"
3586
3601
  ]
3587
3602
  },
3588
3603
  "value": {
@@ -3604,8 +3619,7 @@
3604
3619
  "by": {
3605
3620
  "type": "string",
3606
3621
  "enum": [
3607
- "index",
3608
- "l1_address"
3622
+ "index"
3609
3623
  ]
3610
3624
  },
3611
3625
  "value": {
@@ -3661,8 +3675,7 @@
3661
3675
  "by": {
3662
3676
  "type": "string",
3663
3677
  "enum": [
3664
- "account_index",
3665
- "l1_address"
3678
+ "account_index"
3666
3679
  ]
3667
3680
  },
3668
3681
  "value": {
@@ -3724,8 +3737,7 @@
3724
3737
  "by": {
3725
3738
  "type": "string",
3726
3739
  "enum": [
3727
- "account_index",
3728
- "l1_address"
3740
+ "account_index"
3729
3741
  ]
3730
3742
  },
3731
3743
  "value": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {