zklighter-perps 0.573.0-circleci.b3eec85.devin-1790172978-integer-enum-postprocess → 0.573.0-circleci.bb5322b.devin-1790172978-integer-enum-postprocess

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/models/Account.ts CHANGED
@@ -36,7 +36,7 @@ export interface Account {
36
36
  * @type {number}
37
37
  * @memberof Account
38
38
  */
39
- account_type: number;
39
+ account_type: AccountAccountTypeEnum;
40
40
  /**
41
41
  *
42
42
  * @type {number}
@@ -102,9 +102,33 @@ export interface Account {
102
102
  * @type {number}
103
103
  * @memberof Account
104
104
  */
105
- account_trading_mode?: number;
105
+ account_trading_mode?: AccountAccountTradingModeEnum;
106
106
  }
107
107
 
108
+
109
+ /**
110
+ * @export
111
+ */
112
+ export const AccountAccountTypeEnum = {
113
+ Master: 0,
114
+ Sub: 1,
115
+ PublicPool: 2,
116
+ InsuranceFund: 3,
117
+ LighterStakingPool: 4,
118
+ TreasurySub: 5
119
+ } as const;
120
+ export type AccountAccountTypeEnum = typeof AccountAccountTypeEnum[keyof typeof AccountAccountTypeEnum];
121
+
122
+ /**
123
+ * @export
124
+ */
125
+ export const AccountAccountTradingModeEnum = {
126
+ Simple: 0,
127
+ Unified: 1
128
+ } as const;
129
+ export type AccountAccountTradingModeEnum = typeof AccountAccountTradingModeEnum[keyof typeof AccountAccountTradingModeEnum];
130
+
131
+
108
132
  /**
109
133
  * Check if a given object implements the Account interface.
110
134
  */
@@ -108,7 +108,7 @@ export interface AccountPosition {
108
108
  * @type {number}
109
109
  * @memberof AccountPosition
110
110
  */
111
- margin_mode: number;
111
+ margin_mode: AccountPositionMarginModeEnum;
112
112
  /**
113
113
  *
114
114
  * @type {number}
@@ -129,6 +129,17 @@ export interface AccountPosition {
129
129
  total_discount: string;
130
130
  }
131
131
 
132
+
133
+ /**
134
+ * @export
135
+ */
136
+ export const AccountPositionMarginModeEnum = {
137
+ Cross: 0,
138
+ Isolated: 1
139
+ } as const;
140
+ export type AccountPositionMarginModeEnum = typeof AccountPositionMarginModeEnum[keyof typeof AccountPositionMarginModeEnum];
141
+
142
+
132
143
  /**
133
144
  * Check if a given object implements the AccountPosition interface.
134
145
  */
@@ -67,7 +67,7 @@ export interface AccountStats {
67
67
  * @type {number}
68
68
  * @memberof AccountStats
69
69
  */
70
- account_trading_mode?: number;
70
+ account_trading_mode?: AccountStatsAccountTradingModeEnum;
71
71
  /**
72
72
  *
73
73
  * @type {AccountMarginStats}
@@ -82,6 +82,17 @@ export interface AccountStats {
82
82
  total_stats: AccountMarginStats;
83
83
  }
84
84
 
85
+
86
+ /**
87
+ * @export
88
+ */
89
+ export const AccountStatsAccountTradingModeEnum = {
90
+ Simple: 0,
91
+ Unified: 1
92
+ } as const;
93
+ export type AccountStatsAccountTradingModeEnum = typeof AccountStatsAccountTradingModeEnum[keyof typeof AccountStatsAccountTradingModeEnum];
94
+
95
+
85
96
  /**
86
97
  * Check if a given object implements the AccountStats interface.
87
98
  */
@@ -85,7 +85,7 @@ export interface DetailedAccount {
85
85
  * @type {number}
86
86
  * @memberof DetailedAccount
87
87
  */
88
- account_type: number;
88
+ account_type: DetailedAccountAccountTypeEnum;
89
89
  /**
90
90
  *
91
91
  * @type {number}
@@ -151,7 +151,7 @@ export interface DetailedAccount {
151
151
  * @type {number}
152
152
  * @memberof DetailedAccount
153
153
  */
154
- account_trading_mode?: number;
154
+ account_trading_mode?: DetailedAccountAccountTradingModeEnum;
155
155
  /**
156
156
  *
157
157
  * @type {number}
@@ -286,6 +286,30 @@ export interface DetailedAccount {
286
286
  approved_integrators?: Array<ApprovedIntegrator>;
287
287
  }
288
288
 
289
+
290
+ /**
291
+ * @export
292
+ */
293
+ export const DetailedAccountAccountTypeEnum = {
294
+ Master: 0,
295
+ Sub: 1,
296
+ PublicPool: 2,
297
+ InsuranceFund: 3,
298
+ LighterStakingPool: 4,
299
+ TreasurySub: 5
300
+ } as const;
301
+ export type DetailedAccountAccountTypeEnum = typeof DetailedAccountAccountTypeEnum[keyof typeof DetailedAccountAccountTypeEnum];
302
+
303
+ /**
304
+ * @export
305
+ */
306
+ export const DetailedAccountAccountTradingModeEnum = {
307
+ Simple: 0,
308
+ Unified: 1
309
+ } as const;
310
+ export type DetailedAccountAccountTradingModeEnum = typeof DetailedAccountAccountTradingModeEnum[keyof typeof DetailedAccountAccountTradingModeEnum];
311
+
312
+
289
313
  /**
290
314
  * Check if a given object implements the DetailedAccount interface.
291
315
  */
@@ -24,7 +24,7 @@ export interface MarketConfig {
24
24
  * @type {number}
25
25
  * @memberof MarketConfig
26
26
  */
27
- market_margin_mode: number;
27
+ market_margin_mode: MarketConfigMarketMarginModeEnum;
28
28
  /**
29
29
  *
30
30
  * @type {number}
@@ -69,6 +69,17 @@ export interface MarketConfig {
69
69
  rfq_enabled: boolean;
70
70
  }
71
71
 
72
+
73
+ /**
74
+ * @export
75
+ */
76
+ export const MarketConfigMarketMarginModeEnum = {
77
+ All: 0,
78
+ IsolatedForNonPools: 1
79
+ } as const;
80
+ export type MarketConfigMarketMarginModeEnum = typeof MarketConfigMarketMarginModeEnum[keyof typeof MarketConfigMarketMarginModeEnum];
81
+
82
+
72
83
  /**
73
84
  * Check if a given object implements the MarketConfig interface.
74
85
  */
@@ -43,7 +43,7 @@ export interface PublicPoolInfo {
43
43
  * @type {number}
44
44
  * @memberof PublicPoolInfo
45
45
  */
46
- status: number;
46
+ status: PublicPoolInfoStatusEnum;
47
47
  /**
48
48
  *
49
49
  * @type {string}
@@ -100,6 +100,17 @@ export interface PublicPoolInfo {
100
100
  strategies: Array<Strategy>;
101
101
  }
102
102
 
103
+
104
+ /**
105
+ * @export
106
+ */
107
+ export const PublicPoolInfoStatusEnum = {
108
+ Active: 0,
109
+ Frozen: 1
110
+ } as const;
111
+ export type PublicPoolInfoStatusEnum = typeof PublicPoolInfoStatusEnum[keyof typeof PublicPoolInfoStatusEnum];
112
+
113
+
103
114
  /**
104
115
  * Check if a given object implements the PublicPoolInfo interface.
105
116
  */
@@ -67,7 +67,7 @@ export interface PublicPoolMetadata {
67
67
  * @type {number}
68
68
  * @memberof PublicPoolMetadata
69
69
  */
70
- account_type: number;
70
+ account_type: PublicPoolMetadataAccountTypeEnum;
71
71
  /**
72
72
  *
73
73
  * @type {string}
@@ -97,7 +97,7 @@ export interface PublicPoolMetadata {
97
97
  * @type {number}
98
98
  * @memberof PublicPoolMetadata
99
99
  */
100
- status: number;
100
+ status: PublicPoolMetadataStatusEnum;
101
101
  /**
102
102
  *
103
103
  * @type {string}
@@ -142,6 +142,30 @@ export interface PublicPoolMetadata {
142
142
  assets: Array<AccountAsset>;
143
143
  }
144
144
 
145
+
146
+ /**
147
+ * @export
148
+ */
149
+ export const PublicPoolMetadataAccountTypeEnum = {
150
+ Master: 0,
151
+ Sub: 1,
152
+ PublicPool: 2,
153
+ InsuranceFund: 3,
154
+ LighterStakingPool: 4,
155
+ TreasurySub: 5
156
+ } as const;
157
+ export type PublicPoolMetadataAccountTypeEnum = typeof PublicPoolMetadataAccountTypeEnum[keyof typeof PublicPoolMetadataAccountTypeEnum];
158
+
159
+ /**
160
+ * @export
161
+ */
162
+ export const PublicPoolMetadataStatusEnum = {
163
+ Active: 0,
164
+ Frozen: 1
165
+ } as const;
166
+ export type PublicPoolMetadataStatusEnum = typeof PublicPoolMetadataStatusEnum[keyof typeof PublicPoolMetadataStatusEnum];
167
+
168
+
145
169
  /**
146
170
  * Check if a given object implements the PublicPoolMetadata interface.
147
171
  */
@@ -55,7 +55,7 @@ export interface RFQEntry {
55
55
  * @type {number}
56
56
  * @memberof RFQEntry
57
57
  */
58
- direction: number;
58
+ direction: RFQEntryDirectionEnum;
59
59
  /**
60
60
  *
61
61
  * @type {string}
@@ -101,6 +101,16 @@ export interface RFQEntry {
101
101
  }
102
102
 
103
103
 
104
+ /**
105
+ * @export
106
+ */
107
+ export const RFQEntryDirectionEnum = {
108
+ Hidden: -1,
109
+ Sell: 0,
110
+ Buy: 1
111
+ } as const;
112
+ export type RFQEntryDirectionEnum = typeof RFQEntryDirectionEnum[keyof typeof RFQEntryDirectionEnum];
113
+
104
114
  /**
105
115
  * @export
106
116
  */
@@ -67,7 +67,7 @@ export interface RespCreateRFQ {
67
67
  * @type {number}
68
68
  * @memberof RespCreateRFQ
69
69
  */
70
- direction: number;
70
+ direction: RespCreateRFQDirectionEnum;
71
71
  /**
72
72
  *
73
73
  * @type {string}
@@ -113,6 +113,16 @@ export interface RespCreateRFQ {
113
113
  }
114
114
 
115
115
 
116
+ /**
117
+ * @export
118
+ */
119
+ export const RespCreateRFQDirectionEnum = {
120
+ Hidden: -1,
121
+ Sell: 0,
122
+ Buy: 1
123
+ } as const;
124
+ export type RespCreateRFQDirectionEnum = typeof RespCreateRFQDirectionEnum[keyof typeof RespCreateRFQDirectionEnum];
125
+
116
126
  /**
117
127
  * @export
118
128
  */
@@ -67,7 +67,7 @@ export interface RespGetRFQ {
67
67
  * @type {number}
68
68
  * @memberof RespGetRFQ
69
69
  */
70
- direction: number;
70
+ direction: RespGetRFQDirectionEnum;
71
71
  /**
72
72
  *
73
73
  * @type {string}
@@ -113,6 +113,16 @@ export interface RespGetRFQ {
113
113
  }
114
114
 
115
115
 
116
+ /**
117
+ * @export
118
+ */
119
+ export const RespGetRFQDirectionEnum = {
120
+ Hidden: -1,
121
+ Sell: 0,
122
+ Buy: 1
123
+ } as const;
124
+ export type RespGetRFQDirectionEnum = typeof RespGetRFQDirectionEnum[keyof typeof RespGetRFQDirectionEnum];
125
+
116
126
  /**
117
127
  * @export
118
128
  */
@@ -67,7 +67,7 @@ export interface RespRespondToRFQ {
67
67
  * @type {number}
68
68
  * @memberof RespRespondToRFQ
69
69
  */
70
- direction: number;
70
+ direction: RespRespondToRFQDirectionEnum;
71
71
  /**
72
72
  *
73
73
  * @type {string}
@@ -113,6 +113,16 @@ export interface RespRespondToRFQ {
113
113
  }
114
114
 
115
115
 
116
+ /**
117
+ * @export
118
+ */
119
+ export const RespRespondToRFQDirectionEnum = {
120
+ Hidden: -1,
121
+ Sell: 0,
122
+ Buy: 1
123
+ } as const;
124
+ export type RespRespondToRFQDirectionEnum = typeof RespRespondToRFQDirectionEnum[keyof typeof RespRespondToRFQDirectionEnum];
125
+
116
126
  /**
117
127
  * @export
118
128
  */
@@ -67,7 +67,7 @@ export interface RespUpdateRFQ {
67
67
  * @type {number}
68
68
  * @memberof RespUpdateRFQ
69
69
  */
70
- direction: number;
70
+ direction: RespUpdateRFQDirectionEnum;
71
71
  /**
72
72
  *
73
73
  * @type {string}
@@ -113,6 +113,16 @@ export interface RespUpdateRFQ {
113
113
  }
114
114
 
115
115
 
116
+ /**
117
+ * @export
118
+ */
119
+ export const RespUpdateRFQDirectionEnum = {
120
+ Hidden: -1,
121
+ Sell: 0,
122
+ Buy: 1
123
+ } as const;
124
+ export type RespUpdateRFQDirectionEnum = typeof RespUpdateRFQDirectionEnum[keyof typeof RespUpdateRFQDirectionEnum];
125
+
116
126
  /**
117
127
  * @export
118
128
  */
package/openapi.json CHANGED
@@ -7175,8 +7175,24 @@
7175
7175
  },
7176
7176
  "account_type": {
7177
7177
  "type": "integer",
7178
- "format": "uint8",
7179
- "example": "1"
7178
+ "format": "int32",
7179
+ "example": "1",
7180
+ "enum": [
7181
+ 0,
7182
+ 1,
7183
+ 2,
7184
+ 3,
7185
+ 4,
7186
+ 5
7187
+ ],
7188
+ "x-enum-varnames": [
7189
+ "Master",
7190
+ "Sub",
7191
+ "PublicPool",
7192
+ "InsuranceFund",
7193
+ "LighterStakingPool",
7194
+ "TreasurySub"
7195
+ ]
7180
7196
  },
7181
7197
  "index": {
7182
7198
  "type": "integer",
@@ -7227,8 +7243,16 @@
7227
7243
  },
7228
7244
  "account_trading_mode": {
7229
7245
  "type": "integer",
7230
- "format": "uint8",
7231
- "example": "1"
7246
+ "format": "int32",
7247
+ "example": "1",
7248
+ "enum": [
7249
+ 0,
7250
+ 1
7251
+ ],
7252
+ "x-enum-varnames": [
7253
+ "Simple",
7254
+ "Unified"
7255
+ ]
7232
7256
  }
7233
7257
  },
7234
7258
  "title": "Account",
@@ -7771,7 +7795,15 @@
7771
7795
  "margin_mode": {
7772
7796
  "type": "integer",
7773
7797
  "format": "int32",
7774
- "example": "1"
7798
+ "example": "1",
7799
+ "enum": [
7800
+ 0,
7801
+ 1
7802
+ ],
7803
+ "x-enum-varnames": [
7804
+ "Cross",
7805
+ "Isolated"
7806
+ ]
7775
7807
  },
7776
7808
  "margin_set_flag": {
7777
7809
  "type": "integer",
@@ -7837,8 +7869,16 @@
7837
7869
  },
7838
7870
  "account_trading_mode": {
7839
7871
  "type": "integer",
7840
- "format": "uint8",
7841
- "example": "1"
7872
+ "format": "int32",
7873
+ "example": "1",
7874
+ "enum": [
7875
+ 0,
7876
+ 1
7877
+ ],
7878
+ "x-enum-varnames": [
7879
+ "Simple",
7880
+ "Unified"
7881
+ ]
7842
7882
  },
7843
7883
  "cross_stats": {
7844
7884
  "$ref": "#/definitions/AccountMarginStats"
@@ -9395,8 +9435,24 @@
9395
9435
  },
9396
9436
  "account_type": {
9397
9437
  "type": "integer",
9398
- "format": "uint8",
9399
- "example": "1"
9438
+ "format": "int32",
9439
+ "example": "1",
9440
+ "enum": [
9441
+ 0,
9442
+ 1,
9443
+ 2,
9444
+ 3,
9445
+ 4,
9446
+ 5
9447
+ ],
9448
+ "x-enum-varnames": [
9449
+ "Master",
9450
+ "Sub",
9451
+ "PublicPool",
9452
+ "InsuranceFund",
9453
+ "LighterStakingPool",
9454
+ "TreasurySub"
9455
+ ]
9400
9456
  },
9401
9457
  "index": {
9402
9458
  "type": "integer",
@@ -9447,8 +9503,16 @@
9447
9503
  },
9448
9504
  "account_trading_mode": {
9449
9505
  "type": "integer",
9450
- "format": "uint8",
9451
- "example": "1"
9506
+ "format": "int32",
9507
+ "example": "1",
9508
+ "enum": [
9509
+ 0,
9510
+ 1
9511
+ ],
9512
+ "x-enum-varnames": [
9513
+ "Simple",
9514
+ "Unified"
9515
+ ]
9452
9516
  },
9453
9517
  "account_index": {
9454
9518
  "type": "integer",
@@ -11405,7 +11469,15 @@
11405
11469
  "properties": {
11406
11470
  "market_margin_mode": {
11407
11471
  "type": "integer",
11408
- "format": "int32"
11472
+ "format": "int32",
11473
+ "enum": [
11474
+ 0,
11475
+ 1
11476
+ ],
11477
+ "x-enum-varnames": [
11478
+ "All",
11479
+ "IsolatedForNonPools"
11480
+ ]
11409
11481
  },
11410
11482
  "insurance_fund_account_index": {
11411
11483
  "type": "integer",
@@ -13413,8 +13485,16 @@
13413
13485
  "properties": {
13414
13486
  "status": {
13415
13487
  "type": "integer",
13416
- "format": "uint8",
13417
- "example": "0"
13488
+ "format": "int32",
13489
+ "example": "0",
13490
+ "enum": [
13491
+ 0,
13492
+ 1
13493
+ ],
13494
+ "x-enum-varnames": [
13495
+ "Active",
13496
+ "Frozen"
13497
+ ]
13418
13498
  },
13419
13499
  "operator_fee": {
13420
13500
  "type": "string",
@@ -13504,8 +13584,24 @@
13504
13584
  },
13505
13585
  "account_type": {
13506
13586
  "type": "integer",
13507
- "format": "uint8",
13508
- "example": "1"
13587
+ "format": "int32",
13588
+ "example": "1",
13589
+ "enum": [
13590
+ 0,
13591
+ 1,
13592
+ 2,
13593
+ 3,
13594
+ 4,
13595
+ 5
13596
+ ],
13597
+ "x-enum-varnames": [
13598
+ "Master",
13599
+ "Sub",
13600
+ "PublicPool",
13601
+ "InsuranceFund",
13602
+ "LighterStakingPool",
13603
+ "TreasurySub"
13604
+ ]
13509
13605
  },
13510
13606
  "name": {
13511
13607
  "type": "string"
@@ -13526,8 +13622,16 @@
13526
13622
  },
13527
13623
  "status": {
13528
13624
  "type": "integer",
13529
- "format": "uint8",
13530
- "example": "0"
13625
+ "format": "int32",
13626
+ "example": "0",
13627
+ "enum": [
13628
+ 0,
13629
+ 1
13630
+ ],
13631
+ "x-enum-varnames": [
13632
+ "Active",
13633
+ "Frozen"
13634
+ ]
13531
13635
  },
13532
13636
  "operator_fee": {
13533
13637
  "type": "string",
@@ -13654,7 +13758,17 @@
13654
13758
  },
13655
13759
  "direction": {
13656
13760
  "type": "integer",
13657
- "format": "int16"
13761
+ "format": "int32",
13762
+ "enum": [
13763
+ -1,
13764
+ 0,
13765
+ 1
13766
+ ],
13767
+ "x-enum-varnames": [
13768
+ "Hidden",
13769
+ "Sell",
13770
+ "Buy"
13771
+ ]
13658
13772
  },
13659
13773
  "base_amount": {
13660
13774
  "type": "string"
@@ -17265,7 +17379,17 @@
17265
17379
  },
17266
17380
  "direction": {
17267
17381
  "type": "integer",
17268
- "format": "int16"
17382
+ "format": "int32",
17383
+ "enum": [
17384
+ -1,
17385
+ 0,
17386
+ 1
17387
+ ],
17388
+ "x-enum-varnames": [
17389
+ "Hidden",
17390
+ "Sell",
17391
+ "Buy"
17392
+ ]
17269
17393
  },
17270
17394
  "base_amount": {
17271
17395
  "type": "string"
@@ -17861,7 +17985,17 @@
17861
17985
  },
17862
17986
  "direction": {
17863
17987
  "type": "integer",
17864
- "format": "int16"
17988
+ "format": "int32",
17989
+ "enum": [
17990
+ -1,
17991
+ 0,
17992
+ 1
17993
+ ],
17994
+ "x-enum-varnames": [
17995
+ "Hidden",
17996
+ "Sell",
17997
+ "Buy"
17998
+ ]
17865
17999
  },
17866
18000
  "base_amount": {
17867
18001
  "type": "string"
@@ -18279,7 +18413,17 @@
18279
18413
  },
18280
18414
  "direction": {
18281
18415
  "type": "integer",
18282
- "format": "int16"
18416
+ "format": "int32",
18417
+ "enum": [
18418
+ -1,
18419
+ 0,
18420
+ 1
18421
+ ],
18422
+ "x-enum-varnames": [
18423
+ "Hidden",
18424
+ "Sell",
18425
+ "Buy"
18426
+ ]
18283
18427
  },
18284
18428
  "base_amount": {
18285
18429
  "type": "string"
@@ -18611,7 +18755,17 @@
18611
18755
  },
18612
18756
  "direction": {
18613
18757
  "type": "integer",
18614
- "format": "int16"
18758
+ "format": "int32",
18759
+ "enum": [
18760
+ -1,
18761
+ 0,
18762
+ 1
18763
+ ],
18764
+ "x-enum-varnames": [
18765
+ "Hidden",
18766
+ "Sell",
18767
+ "Buy"
18768
+ ]
18615
18769
  },
18616
18770
  "base_amount": {
18617
18771
  "type": "string"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "0.573.0-circleci.b3eec85.devin-1790172978-integer-enum-postprocess",
3
+ "version": "0.573.0-circleci.bb5322b.devin-1790172978-integer-enum-postprocess",
4
4
  "description": "Lighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {