zklighter-perps 1.0.32 → 1.0.34
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/.openapi-generator/FILES +5 -3
- package/apis/AccountApi.ts +58 -0
- package/apis/InfoApi.ts +0 -46
- package/apis/TransactionApi.ts +94 -73
- package/models/AccountMetadata.ts +70 -0
- package/models/DetailedAccount.ts +33 -0
- package/models/PublicPool.ts +166 -0
- package/models/PublicPoolInfo.ts +97 -0
- package/models/PublicPools.ts +85 -0
- package/models/ReqGetPublicPools.ts +70 -0
- package/models/index.ts +5 -3
- package/openapi.json +273 -115
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -11,6 +11,7 @@ index.ts
|
|
|
11
11
|
models/Account.ts
|
|
12
12
|
models/AccountApiKeys.ts
|
|
13
13
|
models/AccountMarketStats.ts
|
|
14
|
+
models/AccountMetadata.ts
|
|
14
15
|
models/AccountPnL.ts
|
|
15
16
|
models/AccountPosition.ts
|
|
16
17
|
models/AccountStats.ts
|
|
@@ -47,7 +48,10 @@ models/Orders.ts
|
|
|
47
48
|
models/Permission.ts
|
|
48
49
|
models/PnLEntry.ts
|
|
49
50
|
models/PriceLevel.ts
|
|
51
|
+
models/PublicPool.ts
|
|
52
|
+
models/PublicPoolInfo.ts
|
|
50
53
|
models/PublicPoolShare.ts
|
|
54
|
+
models/PublicPools.ts
|
|
51
55
|
models/ReqDoFaucet.ts
|
|
52
56
|
models/ReqGetAccount.ts
|
|
53
57
|
models/ReqGetAccountActiveOrders.ts
|
|
@@ -69,6 +73,7 @@ models/ReqGetOrderBookDetails.ts
|
|
|
69
73
|
models/ReqGetOrderBookOrders.ts
|
|
70
74
|
models/ReqGetOrderBooks.ts
|
|
71
75
|
models/ReqGetPermission.ts
|
|
76
|
+
models/ReqGetPublicPools.ts
|
|
72
77
|
models/ReqGetRangeWithCursor.ts
|
|
73
78
|
models/ReqGetRangeWithIndex.ts
|
|
74
79
|
models/ReqGetRangeWithIndexSortable.ts
|
|
@@ -77,12 +82,9 @@ models/ReqGetRollbacks.ts
|
|
|
77
82
|
models/ReqGetTrades.ts
|
|
78
83
|
models/ReqGetTx.ts
|
|
79
84
|
models/ReqMarkNotifRead.ts
|
|
80
|
-
models/ReqSearch.ts
|
|
81
85
|
models/ResultCode.ts
|
|
82
86
|
models/Rollback.ts
|
|
83
87
|
models/Rollbacks.ts
|
|
84
|
-
models/Search.ts
|
|
85
|
-
models/SignBody.ts
|
|
86
88
|
models/SimpleOrder.ts
|
|
87
89
|
models/Status.ts
|
|
88
90
|
models/SubAccounts.ts
|
package/apis/AccountApi.ts
CHANGED
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
AccountPnL,
|
|
20
20
|
Accounts,
|
|
21
21
|
DetailedAccounts,
|
|
22
|
+
PublicPools,
|
|
22
23
|
ResultCode,
|
|
23
24
|
SubAccounts,
|
|
24
25
|
} from '../models/index';
|
|
@@ -31,6 +32,8 @@ import {
|
|
|
31
32
|
AccountsToJSON,
|
|
32
33
|
DetailedAccountsFromJSON,
|
|
33
34
|
DetailedAccountsToJSON,
|
|
35
|
+
PublicPoolsFromJSON,
|
|
36
|
+
PublicPoolsToJSON,
|
|
34
37
|
ResultCodeFromJSON,
|
|
35
38
|
ResultCodeToJSON,
|
|
36
39
|
SubAccountsFromJSON,
|
|
@@ -70,6 +73,11 @@ export interface PnlRequest {
|
|
|
70
73
|
count_back: number;
|
|
71
74
|
}
|
|
72
75
|
|
|
76
|
+
export interface PublicPoolsRequest {
|
|
77
|
+
index: number;
|
|
78
|
+
limit: number;
|
|
79
|
+
}
|
|
80
|
+
|
|
73
81
|
/**
|
|
74
82
|
*
|
|
75
83
|
*/
|
|
@@ -394,6 +402,56 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
394
402
|
return await response.value();
|
|
395
403
|
}
|
|
396
404
|
|
|
405
|
+
/**
|
|
406
|
+
* Get public pools
|
|
407
|
+
* publicPools
|
|
408
|
+
*/
|
|
409
|
+
async publicPoolsRaw(requestParameters: PublicPoolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublicPools>> {
|
|
410
|
+
if (requestParameters['index'] == null) {
|
|
411
|
+
throw new runtime.RequiredError(
|
|
412
|
+
'index',
|
|
413
|
+
'Required parameter "index" was null or undefined when calling publicPools().'
|
|
414
|
+
);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
if (requestParameters['limit'] == null) {
|
|
418
|
+
throw new runtime.RequiredError(
|
|
419
|
+
'limit',
|
|
420
|
+
'Required parameter "limit" was null or undefined when calling publicPools().'
|
|
421
|
+
);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
const queryParameters: any = {};
|
|
425
|
+
|
|
426
|
+
if (requestParameters['index'] != null) {
|
|
427
|
+
queryParameters['index'] = requestParameters['index'];
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
if (requestParameters['limit'] != null) {
|
|
431
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
435
|
+
|
|
436
|
+
const response = await this.request({
|
|
437
|
+
path: `/api/v1/publicPools`,
|
|
438
|
+
method: 'GET',
|
|
439
|
+
headers: headerParameters,
|
|
440
|
+
query: queryParameters,
|
|
441
|
+
}, initOverrides);
|
|
442
|
+
|
|
443
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PublicPoolsFromJSON(jsonValue));
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Get public pools
|
|
448
|
+
* publicPools
|
|
449
|
+
*/
|
|
450
|
+
async publicPools(requestParameters: PublicPoolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublicPools> {
|
|
451
|
+
const response = await this.publicPoolsRaw(requestParameters, initOverrides);
|
|
452
|
+
return await response.value();
|
|
453
|
+
}
|
|
454
|
+
|
|
397
455
|
}
|
|
398
456
|
|
|
399
457
|
/**
|
package/apis/InfoApi.ts
CHANGED
|
@@ -19,7 +19,6 @@ import type {
|
|
|
19
19
|
Layer2BasicInfo,
|
|
20
20
|
ResultCode,
|
|
21
21
|
Rollbacks,
|
|
22
|
-
Search,
|
|
23
22
|
} from '../models/index';
|
|
24
23
|
import {
|
|
25
24
|
Layer1BasicInfoFromJSON,
|
|
@@ -30,8 +29,6 @@ import {
|
|
|
30
29
|
ResultCodeToJSON,
|
|
31
30
|
RollbacksFromJSON,
|
|
32
31
|
RollbacksToJSON,
|
|
33
|
-
SearchFromJSON,
|
|
34
|
-
SearchToJSON,
|
|
35
32
|
} from '../models/index';
|
|
36
33
|
|
|
37
34
|
export interface RollbacksRequest {
|
|
@@ -40,10 +37,6 @@ export interface RollbacksRequest {
|
|
|
40
37
|
limit: number;
|
|
41
38
|
}
|
|
42
39
|
|
|
43
|
-
export interface SearchRequest {
|
|
44
|
-
keyword: string;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
40
|
/**
|
|
48
41
|
*
|
|
49
42
|
*/
|
|
@@ -166,43 +159,4 @@ export class InfoApi extends runtime.BaseAPI {
|
|
|
166
159
|
return await response.value();
|
|
167
160
|
}
|
|
168
161
|
|
|
169
|
-
/**
|
|
170
|
-
* Search with a specific keyword
|
|
171
|
-
* search
|
|
172
|
-
*/
|
|
173
|
-
async searchRaw(requestParameters: SearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Search>> {
|
|
174
|
-
if (requestParameters['keyword'] == null) {
|
|
175
|
-
throw new runtime.RequiredError(
|
|
176
|
-
'keyword',
|
|
177
|
-
'Required parameter "keyword" was null or undefined when calling search().'
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
const queryParameters: any = {};
|
|
182
|
-
|
|
183
|
-
if (requestParameters['keyword'] != null) {
|
|
184
|
-
queryParameters['keyword'] = requestParameters['keyword'];
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
188
|
-
|
|
189
|
-
const response = await this.request({
|
|
190
|
-
path: `/api/v1/search`,
|
|
191
|
-
method: 'GET',
|
|
192
|
-
headers: headerParameters,
|
|
193
|
-
query: queryParameters,
|
|
194
|
-
}, initOverrides);
|
|
195
|
-
|
|
196
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => SearchFromJSON(jsonValue));
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Search with a specific keyword
|
|
201
|
-
* search
|
|
202
|
-
*/
|
|
203
|
-
async search(requestParameters: SearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Search> {
|
|
204
|
-
const response = await this.searchRaw(requestParameters, initOverrides);
|
|
205
|
-
return await response.value();
|
|
206
|
-
}
|
|
207
|
-
|
|
208
162
|
}
|
package/apis/TransactionApi.ts
CHANGED
|
@@ -18,7 +18,6 @@ import type {
|
|
|
18
18
|
EnrichedTx,
|
|
19
19
|
NextNonce,
|
|
20
20
|
ResultCode,
|
|
21
|
-
SignBody,
|
|
22
21
|
TxHash,
|
|
23
22
|
TxHashes,
|
|
24
23
|
Txs,
|
|
@@ -30,8 +29,6 @@ import {
|
|
|
30
29
|
NextNonceToJSON,
|
|
31
30
|
ResultCodeFromJSON,
|
|
32
31
|
ResultCodeToJSON,
|
|
33
|
-
SignBodyFromJSON,
|
|
34
|
-
SignBodyToJSON,
|
|
35
32
|
TxHashFromJSON,
|
|
36
33
|
TxHashToJSON,
|
|
37
34
|
TxHashesFromJSON,
|
|
@@ -59,11 +56,6 @@ export interface BlockTxsRequest {
|
|
|
59
56
|
value: string;
|
|
60
57
|
}
|
|
61
58
|
|
|
62
|
-
export interface L2SignatureRequest {
|
|
63
|
-
tx_type: number;
|
|
64
|
-
tx_info: string;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
59
|
export interface NextNonceRequest {
|
|
68
60
|
account_index: number;
|
|
69
61
|
api_key_index: number;
|
|
@@ -84,6 +76,13 @@ export interface SendTxBatchRequest {
|
|
|
84
76
|
tx_infos: string;
|
|
85
77
|
}
|
|
86
78
|
|
|
79
|
+
export interface SetAccountMetadataRequest {
|
|
80
|
+
account_index: number;
|
|
81
|
+
api_key_index: number;
|
|
82
|
+
metadata: string;
|
|
83
|
+
signature: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
87
86
|
export interface TxRequest {
|
|
88
87
|
by: TxByEnum;
|
|
89
88
|
value: string;
|
|
@@ -276,71 +275,6 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
276
275
|
return await response.value();
|
|
277
276
|
}
|
|
278
277
|
|
|
279
|
-
/**
|
|
280
|
-
* Get transaction signature body
|
|
281
|
-
* l2Signature
|
|
282
|
-
*/
|
|
283
|
-
async l2SignatureRaw(requestParameters: L2SignatureRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SignBody>> {
|
|
284
|
-
if (requestParameters['tx_type'] == null) {
|
|
285
|
-
throw new runtime.RequiredError(
|
|
286
|
-
'tx_type',
|
|
287
|
-
'Required parameter "tx_type" was null or undefined when calling l2Signature().'
|
|
288
|
-
);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
if (requestParameters['tx_info'] == null) {
|
|
292
|
-
throw new runtime.RequiredError(
|
|
293
|
-
'tx_info',
|
|
294
|
-
'Required parameter "tx_info" was null or undefined when calling l2Signature().'
|
|
295
|
-
);
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
const queryParameters: any = {};
|
|
299
|
-
|
|
300
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
301
|
-
|
|
302
|
-
const consumes: runtime.Consume[] = [
|
|
303
|
-
{ contentType: 'multipart/form-data' },
|
|
304
|
-
];
|
|
305
|
-
// @ts-ignore: canConsumeForm may be unused
|
|
306
|
-
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
307
|
-
|
|
308
|
-
let formParams: { append(param: string, value: any): any };
|
|
309
|
-
let useForm = false;
|
|
310
|
-
if (useForm) {
|
|
311
|
-
formParams = new FormData();
|
|
312
|
-
} else {
|
|
313
|
-
formParams = new URLSearchParams();
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
if (requestParameters['tx_type'] != null) {
|
|
317
|
-
formParams.append('tx_type', requestParameters['tx_type'] as any);
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
if (requestParameters['tx_info'] != null) {
|
|
321
|
-
formParams.append('tx_info', requestParameters['tx_info'] as any);
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
const response = await this.request({
|
|
325
|
-
path: `/api/v1/l2Signature`,
|
|
326
|
-
method: 'POST',
|
|
327
|
-
headers: headerParameters,
|
|
328
|
-
query: queryParameters,
|
|
329
|
-
body: formParams,
|
|
330
|
-
}, initOverrides);
|
|
331
|
-
|
|
332
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => SignBodyFromJSON(jsonValue));
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* Get transaction signature body
|
|
337
|
-
* l2Signature
|
|
338
|
-
*/
|
|
339
|
-
async l2Signature(requestParameters: L2SignatureRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SignBody> {
|
|
340
|
-
const response = await this.l2SignatureRaw(requestParameters, initOverrides);
|
|
341
|
-
return await response.value();
|
|
342
|
-
}
|
|
343
|
-
|
|
344
278
|
/**
|
|
345
279
|
* Get next nonce for a specific account
|
|
346
280
|
* nextNonce
|
|
@@ -564,6 +498,93 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
564
498
|
return await response.value();
|
|
565
499
|
}
|
|
566
500
|
|
|
501
|
+
/**
|
|
502
|
+
* Set account metadata
|
|
503
|
+
* setAccountMetadata
|
|
504
|
+
*/
|
|
505
|
+
async setAccountMetadataRaw(requestParameters: SetAccountMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
|
|
506
|
+
if (requestParameters['account_index'] == null) {
|
|
507
|
+
throw new runtime.RequiredError(
|
|
508
|
+
'account_index',
|
|
509
|
+
'Required parameter "account_index" was null or undefined when calling setAccountMetadata().'
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
if (requestParameters['api_key_index'] == null) {
|
|
514
|
+
throw new runtime.RequiredError(
|
|
515
|
+
'api_key_index',
|
|
516
|
+
'Required parameter "api_key_index" was null or undefined when calling setAccountMetadata().'
|
|
517
|
+
);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
if (requestParameters['metadata'] == null) {
|
|
521
|
+
throw new runtime.RequiredError(
|
|
522
|
+
'metadata',
|
|
523
|
+
'Required parameter "metadata" was null or undefined when calling setAccountMetadata().'
|
|
524
|
+
);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
if (requestParameters['signature'] == null) {
|
|
528
|
+
throw new runtime.RequiredError(
|
|
529
|
+
'signature',
|
|
530
|
+
'Required parameter "signature" was null or undefined when calling setAccountMetadata().'
|
|
531
|
+
);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
const queryParameters: any = {};
|
|
535
|
+
|
|
536
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
537
|
+
|
|
538
|
+
const consumes: runtime.Consume[] = [
|
|
539
|
+
{ contentType: 'multipart/form-data' },
|
|
540
|
+
];
|
|
541
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
542
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
543
|
+
|
|
544
|
+
let formParams: { append(param: string, value: any): any };
|
|
545
|
+
let useForm = false;
|
|
546
|
+
if (useForm) {
|
|
547
|
+
formParams = new FormData();
|
|
548
|
+
} else {
|
|
549
|
+
formParams = new URLSearchParams();
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
if (requestParameters['account_index'] != null) {
|
|
553
|
+
formParams.append('account_index', requestParameters['account_index'] as any);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
if (requestParameters['api_key_index'] != null) {
|
|
557
|
+
formParams.append('api_key_index', requestParameters['api_key_index'] as any);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
if (requestParameters['metadata'] != null) {
|
|
561
|
+
formParams.append('metadata', requestParameters['metadata'] as any);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
if (requestParameters['signature'] != null) {
|
|
565
|
+
formParams.append('signature', requestParameters['signature'] as any);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
const response = await this.request({
|
|
569
|
+
path: `/api/v1/setAccountMetadata`,
|
|
570
|
+
method: 'POST',
|
|
571
|
+
headers: headerParameters,
|
|
572
|
+
query: queryParameters,
|
|
573
|
+
body: formParams,
|
|
574
|
+
}, initOverrides);
|
|
575
|
+
|
|
576
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ResultCodeFromJSON(jsonValue));
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Set account metadata
|
|
581
|
+
* setAccountMetadata
|
|
582
|
+
*/
|
|
583
|
+
async setAccountMetadata(requestParameters: SetAccountMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResultCode> {
|
|
584
|
+
const response = await this.setAccountMetadataRaw(requestParameters, initOverrides);
|
|
585
|
+
return await response.value();
|
|
586
|
+
}
|
|
587
|
+
|
|
567
588
|
/**
|
|
568
589
|
* Get transaction by hash or sequence index
|
|
569
590
|
* tx
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AccountMetadata
|
|
20
|
+
*/
|
|
21
|
+
export interface AccountMetadata {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AccountMetadata
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof AccountMetadata
|
|
32
|
+
*/
|
|
33
|
+
description: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the AccountMetadata interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfAccountMetadata(value: object): value is AccountMetadata {
|
|
40
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
41
|
+
if (!('description' in value) || value['description'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function AccountMetadataFromJSON(json: any): AccountMetadata {
|
|
46
|
+
return AccountMetadataFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function AccountMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountMetadata {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'name': json['name'],
|
|
56
|
+
'description': json['description'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function AccountMetadataToJSON(value?: AccountMetadata | null): any {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'name': value['name'],
|
|
67
|
+
'description': value['description'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
@@ -25,6 +25,12 @@ import {
|
|
|
25
25
|
AccountPositionFromJSONTyped,
|
|
26
26
|
AccountPositionToJSON,
|
|
27
27
|
} from './AccountPosition';
|
|
28
|
+
import type { PublicPoolInfo } from './PublicPoolInfo';
|
|
29
|
+
import {
|
|
30
|
+
PublicPoolInfoFromJSON,
|
|
31
|
+
PublicPoolInfoFromJSONTyped,
|
|
32
|
+
PublicPoolInfoToJSON,
|
|
33
|
+
} from './PublicPoolInfo';
|
|
28
34
|
import type { PublicPoolShare } from './PublicPoolShare';
|
|
29
35
|
import {
|
|
30
36
|
PublicPoolShareFromJSON,
|
|
@@ -92,6 +98,18 @@ export interface DetailedAccount {
|
|
|
92
98
|
* @memberof DetailedAccount
|
|
93
99
|
*/
|
|
94
100
|
collateral: string;
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @type {string}
|
|
104
|
+
* @memberof DetailedAccount
|
|
105
|
+
*/
|
|
106
|
+
name: string;
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
* @type {string}
|
|
110
|
+
* @memberof DetailedAccount
|
|
111
|
+
*/
|
|
112
|
+
description: string;
|
|
95
113
|
/**
|
|
96
114
|
*
|
|
97
115
|
* @type {Array<AccountPosition>}
|
|
@@ -110,6 +128,12 @@ export interface DetailedAccount {
|
|
|
110
128
|
* @memberof DetailedAccount
|
|
111
129
|
*/
|
|
112
130
|
market_stats: Array<AccountMarketStats>;
|
|
131
|
+
/**
|
|
132
|
+
*
|
|
133
|
+
* @type {PublicPoolInfo}
|
|
134
|
+
* @memberof DetailedAccount
|
|
135
|
+
*/
|
|
136
|
+
pool_info: PublicPoolInfo;
|
|
113
137
|
/**
|
|
114
138
|
*
|
|
115
139
|
* @type {Array<PublicPoolShare>}
|
|
@@ -130,9 +154,12 @@ export function instanceOfDetailedAccount(value: object): value is DetailedAccou
|
|
|
130
154
|
if (!('open_order_count' in value) || value['open_order_count'] === undefined) return false;
|
|
131
155
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
132
156
|
if (!('collateral' in value) || value['collateral'] === undefined) return false;
|
|
157
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
158
|
+
if (!('description' in value) || value['description'] === undefined) return false;
|
|
133
159
|
if (!('positions' in value) || value['positions'] === undefined) return false;
|
|
134
160
|
if (!('total_asset_value' in value) || value['total_asset_value'] === undefined) return false;
|
|
135
161
|
if (!('market_stats' in value) || value['market_stats'] === undefined) return false;
|
|
162
|
+
if (!('pool_info' in value) || value['pool_info'] === undefined) return false;
|
|
136
163
|
if (!('shares' in value) || value['shares'] === undefined) return false;
|
|
137
164
|
return true;
|
|
138
165
|
}
|
|
@@ -156,9 +183,12 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
156
183
|
'open_order_count': json['open_order_count'],
|
|
157
184
|
'status': json['status'],
|
|
158
185
|
'collateral': json['collateral'],
|
|
186
|
+
'name': json['name'],
|
|
187
|
+
'description': json['description'],
|
|
159
188
|
'positions': ((json['positions'] as Array<any>).map(AccountPositionFromJSON)),
|
|
160
189
|
'total_asset_value': json['total_asset_value'],
|
|
161
190
|
'market_stats': ((json['market_stats'] as Array<any>).map(AccountMarketStatsFromJSON)),
|
|
191
|
+
'pool_info': PublicPoolInfoFromJSON(json['pool_info']),
|
|
162
192
|
'shares': ((json['shares'] as Array<any>).map(PublicPoolShareFromJSON)),
|
|
163
193
|
};
|
|
164
194
|
}
|
|
@@ -178,9 +208,12 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
|
|
|
178
208
|
'open_order_count': value['open_order_count'],
|
|
179
209
|
'status': value['status'],
|
|
180
210
|
'collateral': value['collateral'],
|
|
211
|
+
'name': value['name'],
|
|
212
|
+
'description': value['description'],
|
|
181
213
|
'positions': ((value['positions'] as Array<any>).map(AccountPositionToJSON)),
|
|
182
214
|
'total_asset_value': value['total_asset_value'],
|
|
183
215
|
'market_stats': ((value['market_stats'] as Array<any>).map(AccountMarketStatsToJSON)),
|
|
216
|
+
'pool_info': PublicPoolInfoToJSON(value['pool_info']),
|
|
184
217
|
'shares': ((value['shares'] as Array<any>).map(PublicPoolShareToJSON)),
|
|
185
218
|
};
|
|
186
219
|
}
|