zklighter-perps 1.0.157 → 1.0.159

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.
@@ -76,11 +76,9 @@ models/PnLEntry.ts
76
76
  models/PositionFunding.ts
77
77
  models/PositionFundings.ts
78
78
  models/PriceLevel.ts
79
- models/PublicPool.ts
80
79
  models/PublicPoolInfo.ts
81
80
  models/PublicPoolMetadata.ts
82
81
  models/PublicPoolShare.ts
83
- models/PublicPools.ts
84
82
  models/ReferralCode.ts
85
83
  models/ReferralPointEntry.ts
86
84
  models/ReferralPoints.ts
@@ -113,7 +111,6 @@ models/ReqGetOrderBookDetails.ts
113
111
  models/ReqGetOrderBookOrders.ts
114
112
  models/ReqGetOrderBooks.ts
115
113
  models/ReqGetPositionFunding.ts
116
- models/ReqGetPublicPools.ts
117
114
  models/ReqGetPublicPoolsMetadata.ts
118
115
  models/ReqGetRangeWithCursor.ts
119
116
  models/ReqGetRangeWithIndex.ts
@@ -25,7 +25,6 @@ import type {
25
25
  Leaderboard,
26
26
  LiquidationInfos,
27
27
  PositionFundings,
28
- PublicPools,
29
28
  RespChangeAccountTier,
30
29
  RespPublicPoolsMetadata,
31
30
  ResultCode,
@@ -52,8 +51,6 @@ import {
52
51
  LiquidationInfosToJSON,
53
52
  PositionFundingsFromJSON,
54
53
  PositionFundingsToJSON,
55
- PublicPoolsFromJSON,
56
- PublicPoolsToJSON,
57
54
  RespChangeAccountTierFromJSON,
58
55
  RespChangeAccountTierToJSON,
59
56
  RespPublicPoolsMetadataFromJSON,
@@ -151,15 +148,6 @@ export interface PositionFundingRequest {
151
148
  side?: PositionFundingSideEnum;
152
149
  }
153
150
 
154
- export interface PublicPoolsRequest {
155
- index: number;
156
- limit: number;
157
- authorization?: string;
158
- auth?: string;
159
- filter?: PublicPoolsFilterEnum;
160
- account_index?: number;
161
- }
162
-
163
151
  export interface PublicPoolsMetadataRequest {
164
152
  index: number;
165
153
  limit: number;
@@ -906,72 +894,6 @@ export class AccountApi extends runtime.BaseAPI {
906
894
  return await response.value();
907
895
  }
908
896
 
909
- /**
910
- * Get public pools
911
- * publicPools
912
- */
913
- async publicPoolsRaw(requestParameters: PublicPoolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublicPools>> {
914
- if (requestParameters['index'] == null) {
915
- throw new runtime.RequiredError(
916
- 'index',
917
- 'Required parameter "index" was null or undefined when calling publicPools().'
918
- );
919
- }
920
-
921
- if (requestParameters['limit'] == null) {
922
- throw new runtime.RequiredError(
923
- 'limit',
924
- 'Required parameter "limit" was null or undefined when calling publicPools().'
925
- );
926
- }
927
-
928
- const queryParameters: any = {};
929
-
930
- if (requestParameters['auth'] != null) {
931
- queryParameters['auth'] = requestParameters['auth'];
932
- }
933
-
934
- if (requestParameters['filter'] != null) {
935
- queryParameters['filter'] = requestParameters['filter'];
936
- }
937
-
938
- if (requestParameters['index'] != null) {
939
- queryParameters['index'] = requestParameters['index'];
940
- }
941
-
942
- if (requestParameters['limit'] != null) {
943
- queryParameters['limit'] = requestParameters['limit'];
944
- }
945
-
946
- if (requestParameters['account_index'] != null) {
947
- queryParameters['account_index'] = requestParameters['account_index'];
948
- }
949
-
950
- const headerParameters: runtime.HTTPHeaders = {};
951
-
952
- if (requestParameters['authorization'] != null) {
953
- headerParameters['authorization'] = String(requestParameters['authorization']);
954
- }
955
-
956
- const response = await this.request({
957
- path: `/api/v1/publicPools`,
958
- method: 'GET',
959
- headers: headerParameters,
960
- query: queryParameters,
961
- }, initOverrides);
962
-
963
- return new runtime.JSONApiResponse(response, (jsonValue) => PublicPoolsFromJSON(jsonValue));
964
- }
965
-
966
- /**
967
- * Get public pools
968
- * publicPools
969
- */
970
- async publicPools(requestParameters: PublicPoolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublicPools> {
971
- const response = await this.publicPoolsRaw(requestParameters, initOverrides);
972
- return await response.value();
973
- }
974
-
975
897
  /**
976
898
  * Get public pools metadata
977
899
  * publicPoolsMetadata
@@ -1093,16 +1015,6 @@ export const PositionFundingSideEnum = {
1093
1015
  All: 'all'
1094
1016
  } as const;
1095
1017
  export type PositionFundingSideEnum = typeof PositionFundingSideEnum[keyof typeof PositionFundingSideEnum];
1096
- /**
1097
- * @export
1098
- */
1099
- export const PublicPoolsFilterEnum = {
1100
- All: 'all',
1101
- User: 'user',
1102
- Protocol: 'protocol',
1103
- AccountIndex: 'account_index'
1104
- } as const;
1105
- export type PublicPoolsFilterEnum = typeof PublicPoolsFilterEnum[keyof typeof PublicPoolsFilterEnum];
1106
1018
  /**
1107
1019
  * @export
1108
1020
  */
@@ -43,6 +43,12 @@ export interface AccountLimits {
43
43
  * @memberof AccountLimits
44
44
  */
45
45
  user_tier: string;
46
+ /**
47
+ *
48
+ * @type {boolean}
49
+ * @memberof AccountLimits
50
+ */
51
+ can_create_public_pool: boolean;
46
52
  }
47
53
 
48
54
  /**
@@ -52,6 +58,7 @@ export function instanceOfAccountLimits(value: object): value is AccountLimits {
52
58
  if (!('code' in value) || value['code'] === undefined) return false;
53
59
  if (!('max_llp_percentage' in value) || value['max_llp_percentage'] === undefined) return false;
54
60
  if (!('user_tier' in value) || value['user_tier'] === undefined) return false;
61
+ if (!('can_create_public_pool' in value) || value['can_create_public_pool'] === undefined) return false;
55
62
  return true;
56
63
  }
57
64
 
@@ -69,6 +76,7 @@ export function AccountLimitsFromJSONTyped(json: any, ignoreDiscriminator: boole
69
76
  'message': json['message'] == null ? undefined : json['message'],
70
77
  'max_llp_percentage': json['max_llp_percentage'],
71
78
  'user_tier': json['user_tier'],
79
+ 'can_create_public_pool': json['can_create_public_pool'],
72
80
  };
73
81
  }
74
82
 
@@ -82,6 +90,7 @@ export function AccountLimitsToJSON(value?: AccountLimits | null): any {
82
90
  'message': value['message'],
83
91
  'max_llp_percentage': value['max_llp_percentage'],
84
92
  'user_tier': value['user_tier'],
93
+ 'can_create_public_pool': value['can_create_public_pool'],
85
94
  };
86
95
  }
87
96
 
package/models/index.ts CHANGED
@@ -64,11 +64,9 @@ export * from './PnLEntry';
64
64
  export * from './PositionFunding';
65
65
  export * from './PositionFundings';
66
66
  export * from './PriceLevel';
67
- export * from './PublicPool';
68
67
  export * from './PublicPoolInfo';
69
68
  export * from './PublicPoolMetadata';
70
69
  export * from './PublicPoolShare';
71
- export * from './PublicPools';
72
70
  export * from './ReferralCode';
73
71
  export * from './ReferralPointEntry';
74
72
  export * from './ReferralPoints';
@@ -101,7 +99,6 @@ export * from './ReqGetOrderBookDetails';
101
99
  export * from './ReqGetOrderBookOrders';
102
100
  export * from './ReqGetOrderBooks';
103
101
  export * from './ReqGetPositionFunding';
104
- export * from './ReqGetPublicPools';
105
102
  export * from './ReqGetPublicPoolsMetadata';
106
103
  export * from './ReqGetRangeWithCursor';
107
104
  export * from './ReqGetRangeWithIndex';
package/openapi.json CHANGED
@@ -2098,82 +2098,6 @@
2098
2098
  "description": "Get accounts position fundings"
2099
2099
  }
2100
2100
  },
2101
- "/api/v1/publicPools": {
2102
- "get": {
2103
- "summary": "publicPools",
2104
- "operationId": "publicPools",
2105
- "responses": {
2106
- "200": {
2107
- "description": "A successful response.",
2108
- "schema": {
2109
- "$ref": "#/definitions/PublicPools"
2110
- }
2111
- },
2112
- "400": {
2113
- "description": "Bad request",
2114
- "schema": {
2115
- "$ref": "#/definitions/ResultCode"
2116
- }
2117
- }
2118
- },
2119
- "parameters": [
2120
- {
2121
- "name": "authorization",
2122
- "in": "header",
2123
- "required": false,
2124
- "type": "string"
2125
- },
2126
- {
2127
- "name": "auth",
2128
- "in": "query",
2129
- "required": false,
2130
- "type": "string"
2131
- },
2132
- {
2133
- "name": "filter",
2134
- "in": "query",
2135
- "required": false,
2136
- "type": "string",
2137
- "enum": [
2138
- "all",
2139
- "user",
2140
- "protocol",
2141
- "account_index"
2142
- ]
2143
- },
2144
- {
2145
- "name": "index",
2146
- "in": "query",
2147
- "required": true,
2148
- "type": "integer",
2149
- "format": "int64"
2150
- },
2151
- {
2152
- "name": "limit",
2153
- "in": "query",
2154
- "required": true,
2155
- "type": "integer",
2156
- "format": "int64",
2157
- "minimum": 1,
2158
- "maximum": 100
2159
- },
2160
- {
2161
- "name": "account_index",
2162
- "in": "query",
2163
- "required": false,
2164
- "type": "integer",
2165
- "format": "int64"
2166
- }
2167
- ],
2168
- "tags": [
2169
- "account"
2170
- ],
2171
- "consumes": [
2172
- "multipart/form-data"
2173
- ],
2174
- "description": "Get public pools"
2175
- }
2176
- },
2177
2101
  "/api/v1/publicPoolsMetadata": {
2178
2102
  "get": {
2179
2103
  "summary": "publicPoolsMetadata",
@@ -3216,13 +3140,19 @@
3216
3140
  "user_tier": {
3217
3141
  "type": "string",
3218
3142
  "example": "std"
3143
+ },
3144
+ "can_create_public_pool": {
3145
+ "type": "boolean",
3146
+ "format": "boolean",
3147
+ "example": "true"
3219
3148
  }
3220
3149
  },
3221
3150
  "title": "AccountLimits",
3222
3151
  "required": [
3223
3152
  "code",
3224
3153
  "max_llp_percentage",
3225
- "user_tier"
3154
+ "user_tier",
3155
+ "can_create_public_pool"
3226
3156
  ]
3227
3157
  },
3228
3158
  "AccountMarginStats": {
@@ -5926,121 +5856,6 @@
5926
5856
  "size"
5927
5857
  ]
5928
5858
  },
5929
- "PublicPool": {
5930
- "type": "object",
5931
- "properties": {
5932
- "code": {
5933
- "type": "integer",
5934
- "format": "int32",
5935
- "example": "200"
5936
- },
5937
- "message": {
5938
- "type": "string"
5939
- },
5940
- "account_type": {
5941
- "type": "integer",
5942
- "format": "uint8",
5943
- "example": "1"
5944
- },
5945
- "index": {
5946
- "type": "integer",
5947
- "format": "int64",
5948
- "example": "1"
5949
- },
5950
- "l1_address": {
5951
- "type": "string",
5952
- "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
5953
- },
5954
- "cancel_all_time": {
5955
- "type": "integer",
5956
- "format": "int64",
5957
- "example": "1640995200"
5958
- },
5959
- "total_order_count": {
5960
- "type": "integer",
5961
- "format": "int64",
5962
- "example": "100"
5963
- },
5964
- "total_isolated_order_count": {
5965
- "type": "integer",
5966
- "format": "int64",
5967
- "example": "100"
5968
- },
5969
- "pending_order_count": {
5970
- "type": "integer",
5971
- "format": "int64",
5972
- "example": "100"
5973
- },
5974
- "available_balance": {
5975
- "type": "string",
5976
- "example": "19995"
5977
- },
5978
- "status": {
5979
- "type": "integer",
5980
- "format": "uint8",
5981
- "example": "1"
5982
- },
5983
- "collateral": {
5984
- "type": "string",
5985
- "example": "46342"
5986
- },
5987
- "account_index": {
5988
- "type": "integer",
5989
- "format": "int64"
5990
- },
5991
- "name": {
5992
- "type": "string"
5993
- },
5994
- "description": {
5995
- "type": "string"
5996
- },
5997
- "can_invite": {
5998
- "type": "boolean",
5999
- "format": "boolean",
6000
- "description": " Remove After FE uses L1 meta endpoint"
6001
- },
6002
- "referral_points_percentage": {
6003
- "type": "string",
6004
- "description": " Remove After FE uses L1 meta endpoint"
6005
- },
6006
- "total_asset_value": {
6007
- "type": "string",
6008
- "example": "19995"
6009
- },
6010
- "cross_asset_value": {
6011
- "type": "string",
6012
- "example": "19995"
6013
- },
6014
- "pool_info": {
6015
- "$ref": "#/definitions/PublicPoolInfo"
6016
- },
6017
- "account_share": {
6018
- "$ref": "#/definitions/PublicPoolShare"
6019
- }
6020
- },
6021
- "title": "PublicPool",
6022
- "required": [
6023
- "code",
6024
- "account_type",
6025
- "index",
6026
- "l1_address",
6027
- "cancel_all_time",
6028
- "total_order_count",
6029
- "total_isolated_order_count",
6030
- "pending_order_count",
6031
- "available_balance",
6032
- "status",
6033
- "collateral",
6034
- "account_index",
6035
- "name",
6036
- "description",
6037
- "can_invite",
6038
- "referral_points_percentage",
6039
- "total_asset_value",
6040
- "cross_asset_value",
6041
- "pool_info"
6042
- ]
6043
- },
6044
5859
  "PublicPoolInfo": {
6045
5860
  "type": "object",
6046
5861
  "properties": {
@@ -6191,35 +6006,6 @@
6191
6006
  "entry_usdc"
6192
6007
  ]
6193
6008
  },
6194
- "PublicPools": {
6195
- "type": "object",
6196
- "properties": {
6197
- "code": {
6198
- "type": "integer",
6199
- "format": "int32",
6200
- "example": "200"
6201
- },
6202
- "message": {
6203
- "type": "string"
6204
- },
6205
- "total": {
6206
- "type": "integer",
6207
- "format": "int64"
6208
- },
6209
- "public_pools": {
6210
- "type": "array",
6211
- "items": {
6212
- "$ref": "#/definitions/PublicPool"
6213
- }
6214
- }
6215
- },
6216
- "title": "PublicPools",
6217
- "required": [
6218
- "code",
6219
- "total",
6220
- "public_pools"
6221
- ]
6222
- },
6223
6009
  "ReferralCode": {
6224
6010
  "type": "object",
6225
6011
  "properties": {
@@ -7154,42 +6940,6 @@
7154
6940
  "limit"
7155
6941
  ]
7156
6942
  },
7157
- "ReqGetPublicPools": {
7158
- "type": "object",
7159
- "properties": {
7160
- "auth": {
7161
- "type": "string"
7162
- },
7163
- "filter": {
7164
- "type": "string",
7165
- "enum": [
7166
- "all",
7167
- "user",
7168
- "protocol",
7169
- "account_index"
7170
- ]
7171
- },
7172
- "index": {
7173
- "type": "integer",
7174
- "format": "int64"
7175
- },
7176
- "limit": {
7177
- "type": "integer",
7178
- "format": "int64",
7179
- "maximum": 100,
7180
- "minimum": 1
7181
- },
7182
- "account_index": {
7183
- "type": "integer",
7184
- "format": "int64"
7185
- }
7186
- },
7187
- "title": "ReqGetPublicPools",
7188
- "required": [
7189
- "index",
7190
- "limit"
7191
- ]
7192
- },
7193
6943
  "ReqGetPublicPoolsMetadata": {
7194
6944
  "type": "object",
7195
6945
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.157",
3
+ "version": "1.0.159",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {