zklighter-perps 1.0.0
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/.circleci/config.yml +86 -0
- package/.openapi-generator/FILES +95 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/apis/AccountApi.ts +454 -0
- package/apis/BlockApi.ts +178 -0
- package/apis/CandlestickApi.ts +231 -0
- package/apis/InfoApi.ts +197 -0
- package/apis/OrderApi.ts +607 -0
- package/apis/RelayerApi.ts +95 -0
- package/apis/RootApi.ts +56 -0
- package/apis/TransactionApi.ts +608 -0
- package/apis/WsApi.ts +82 -0
- package/apis/index.ts +11 -0
- package/config.yaml +5 -0
- package/index.ts +5 -0
- package/models/AccountMarketStats.ts +100 -0
- package/models/AccountPnL.ts +91 -0
- package/models/AccountPosition.ts +140 -0
- package/models/AccountStats.ts +92 -0
- package/models/Block.ts +163 -0
- package/models/Blocks.ts +91 -0
- package/models/Candlestick.ts +108 -0
- package/models/Candlesticks.ts +91 -0
- package/models/ContractAddress.ts +68 -0
- package/models/CurrentHeight.ts +76 -0
- package/models/Cursor.ts +60 -0
- package/models/DetailedAccount.ts +169 -0
- package/models/DetailedAccounts.ts +91 -0
- package/models/EnrichedTx.ts +204 -0
- package/models/ExchangeStats.ts +107 -0
- package/models/Funding.ts +84 -0
- package/models/Fundings.ts +91 -0
- package/models/L1ProviderInfo.ts +84 -0
- package/models/Layer1BasicInfo.ts +143 -0
- package/models/Layer2BasicInfo.ts +92 -0
- package/models/MainAccount.ts +92 -0
- package/models/MainAccounts.ts +91 -0
- package/models/MarketInfo.ts +140 -0
- package/models/MarketSig.ts +100 -0
- package/models/NextNonce.ts +76 -0
- package/models/Order.ts +209 -0
- package/models/OrderBook.ts +143 -0
- package/models/OrderBookDepth.ts +99 -0
- package/models/OrderBookDetail.ts +287 -0
- package/models/OrderBookDetails.ts +83 -0
- package/models/OrderBookOrders.ts +107 -0
- package/models/OrderBookStats.ts +100 -0
- package/models/OrderBooks.ts +83 -0
- package/models/Orders.ts +91 -0
- package/models/Permission.ts +76 -0
- package/models/PnLEntry.ts +68 -0
- package/models/PriceLevel.ts +68 -0
- package/models/ReqDoFaucet.ts +60 -0
- package/models/ReqGetAccount.ts +79 -0
- package/models/ReqGetAccountActiveOrders.ts +76 -0
- package/models/ReqGetAccountByL1Address.ts +60 -0
- package/models/ReqGetAccountInactiveOrders.ts +111 -0
- package/models/ReqGetAccountOrders.ts +84 -0
- package/models/ReqGetAccountPendingTxs.ts +87 -0
- package/models/ReqGetAccountPnL.ts +124 -0
- package/models/ReqGetAccountTxs.ts +103 -0
- package/models/ReqGetBlock.ts +79 -0
- package/models/ReqGetBlockTxs.ts +79 -0
- package/models/ReqGetByAccount.ts +79 -0
- package/models/ReqGetCandlesticks.ts +107 -0
- package/models/ReqGetFundings.ts +102 -0
- package/models/ReqGetL1Tx.ts +60 -0
- package/models/ReqGetMarketSig.ts +76 -0
- package/models/ReqGetNextNonce.ts +68 -0
- package/models/ReqGetOrderBookDetails.ts +79 -0
- package/models/ReqGetOrderBookOrders.ts +68 -0
- package/models/ReqGetOrderBooks.ts +79 -0
- package/models/ReqGetPermission.ts +87 -0
- package/models/ReqGetRangeWithCursor.ts +68 -0
- package/models/ReqGetRangeWithIndex.ts +68 -0
- package/models/ReqGetRangeWithIndexSortable.ts +87 -0
- package/models/ReqGetRecentTrades.ts +68 -0
- package/models/ReqGetRollbacks.ts +76 -0
- package/models/ReqGetSubAccount.ts +87 -0
- package/models/ReqGetTrades.ts +104 -0
- package/models/ReqGetTx.ts +79 -0
- package/models/ReqSearch.ts +60 -0
- package/models/ResultCode.ts +68 -0
- package/models/Rollback.ts +84 -0
- package/models/Rollbacks.ts +91 -0
- package/models/Search.ts +76 -0
- package/models/SignBody.ts +76 -0
- package/models/SimpleOrder.ts +100 -0
- package/models/Status.ts +68 -0
- package/models/SubAccount.ts +116 -0
- package/models/SubAccounts.ts +107 -0
- package/models/Trade.ts +148 -0
- package/models/Trades.ts +83 -0
- package/models/Tx.ts +164 -0
- package/models/TxHash.ts +76 -0
- package/models/Txs.ts +83 -0
- package/models/ValidatorInfo.ts +68 -0
- package/models/index.ts +84 -0
- package/openapi-generator-cli.jar +0 -0
- package/openapi.json +3934 -0
- package/package.json +23 -0
- package/runtime.ts +426 -0
package/models/Blocks.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
import type { Block } from './Block';
|
|
17
|
+
import {
|
|
18
|
+
BlockFromJSON,
|
|
19
|
+
BlockFromJSONTyped,
|
|
20
|
+
BlockToJSON,
|
|
21
|
+
} from './Block';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface Blocks
|
|
27
|
+
*/
|
|
28
|
+
export interface Blocks {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof Blocks
|
|
33
|
+
*/
|
|
34
|
+
code?: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof Blocks
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof Blocks
|
|
45
|
+
*/
|
|
46
|
+
total?: number;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {Array<Block>}
|
|
50
|
+
* @memberof Blocks
|
|
51
|
+
*/
|
|
52
|
+
blocks?: Array<Block>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the Blocks interface.
|
|
57
|
+
*/
|
|
58
|
+
export function instanceOfBlocks(value: object): value is Blocks {
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function BlocksFromJSON(json: any): Blocks {
|
|
63
|
+
return BlocksFromJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function BlocksFromJSONTyped(json: any, ignoreDiscriminator: boolean): Blocks {
|
|
67
|
+
if (json == null) {
|
|
68
|
+
return json;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
|
|
72
|
+
'code': json['code'] == null ? undefined : json['code'],
|
|
73
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
74
|
+
'total': json['total'] == null ? undefined : json['total'],
|
|
75
|
+
'blocks': json['blocks'] == null ? undefined : ((json['blocks'] as Array<any>).map(BlockFromJSON)),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function BlocksToJSON(value?: Blocks | null): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
|
|
85
|
+
'code': value['code'],
|
|
86
|
+
'message': value['message'],
|
|
87
|
+
'total': value['total'],
|
|
88
|
+
'blocks': value['blocks'] == null ? undefined : ((value['blocks'] as Array<any>).map(BlockToJSON)),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
@@ -0,0 +1,108 @@
|
|
|
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 Candlestick
|
|
20
|
+
*/
|
|
21
|
+
export interface Candlestick {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof Candlestick
|
|
26
|
+
*/
|
|
27
|
+
timestamp?: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof Candlestick
|
|
32
|
+
*/
|
|
33
|
+
open?: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof Candlestick
|
|
38
|
+
*/
|
|
39
|
+
high?: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof Candlestick
|
|
44
|
+
*/
|
|
45
|
+
low?: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof Candlestick
|
|
50
|
+
*/
|
|
51
|
+
close?: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof Candlestick
|
|
56
|
+
*/
|
|
57
|
+
volume0?: number;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof Candlestick
|
|
62
|
+
*/
|
|
63
|
+
volume1?: number;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the Candlestick interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfCandlestick(value: object): value is Candlestick {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function CandlestickFromJSON(json: any): Candlestick {
|
|
74
|
+
return CandlestickFromJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function CandlestickFromJSONTyped(json: any, ignoreDiscriminator: boolean): Candlestick {
|
|
78
|
+
if (json == null) {
|
|
79
|
+
return json;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'timestamp': json['timestamp'] == null ? undefined : json['timestamp'],
|
|
84
|
+
'open': json['open'] == null ? undefined : json['open'],
|
|
85
|
+
'high': json['high'] == null ? undefined : json['high'],
|
|
86
|
+
'low': json['low'] == null ? undefined : json['low'],
|
|
87
|
+
'close': json['close'] == null ? undefined : json['close'],
|
|
88
|
+
'volume0': json['volume0'] == null ? undefined : json['volume0'],
|
|
89
|
+
'volume1': json['volume1'] == null ? undefined : json['volume1'],
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function CandlestickToJSON(value?: Candlestick | null): any {
|
|
94
|
+
if (value == null) {
|
|
95
|
+
return value;
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
|
|
99
|
+
'timestamp': value['timestamp'],
|
|
100
|
+
'open': value['open'],
|
|
101
|
+
'high': value['high'],
|
|
102
|
+
'low': value['low'],
|
|
103
|
+
'close': value['close'],
|
|
104
|
+
'volume0': value['volume0'],
|
|
105
|
+
'volume1': value['volume1'],
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
import type { Candlestick } from './Candlestick';
|
|
17
|
+
import {
|
|
18
|
+
CandlestickFromJSON,
|
|
19
|
+
CandlestickFromJSONTyped,
|
|
20
|
+
CandlestickToJSON,
|
|
21
|
+
} from './Candlestick';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface Candlesticks
|
|
27
|
+
*/
|
|
28
|
+
export interface Candlesticks {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof Candlesticks
|
|
33
|
+
*/
|
|
34
|
+
code?: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof Candlesticks
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof Candlesticks
|
|
45
|
+
*/
|
|
46
|
+
resolution?: string;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {Array<Candlestick>}
|
|
50
|
+
* @memberof Candlesticks
|
|
51
|
+
*/
|
|
52
|
+
candlesticks?: Array<Candlestick>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the Candlesticks interface.
|
|
57
|
+
*/
|
|
58
|
+
export function instanceOfCandlesticks(value: object): value is Candlesticks {
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function CandlesticksFromJSON(json: any): Candlesticks {
|
|
63
|
+
return CandlesticksFromJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function CandlesticksFromJSONTyped(json: any, ignoreDiscriminator: boolean): Candlesticks {
|
|
67
|
+
if (json == null) {
|
|
68
|
+
return json;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
|
|
72
|
+
'code': json['code'] == null ? undefined : json['code'],
|
|
73
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
74
|
+
'resolution': json['resolution'] == null ? undefined : json['resolution'],
|
|
75
|
+
'candlesticks': json['candlesticks'] == null ? undefined : ((json['candlesticks'] as Array<any>).map(CandlestickFromJSON)),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function CandlesticksToJSON(value?: Candlesticks | null): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
|
|
85
|
+
'code': value['code'],
|
|
86
|
+
'message': value['message'],
|
|
87
|
+
'resolution': value['resolution'],
|
|
88
|
+
'candlesticks': value['candlesticks'] == null ? undefined : ((value['candlesticks'] as Array<any>).map(CandlestickToJSON)),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
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 ContractAddress
|
|
20
|
+
*/
|
|
21
|
+
export interface ContractAddress {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ContractAddress
|
|
26
|
+
*/
|
|
27
|
+
name?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ContractAddress
|
|
32
|
+
*/
|
|
33
|
+
address?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the ContractAddress interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfContractAddress(value: object): value is ContractAddress {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function ContractAddressFromJSON(json: any): ContractAddress {
|
|
44
|
+
return ContractAddressFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function ContractAddressFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContractAddress {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
|
|
53
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
54
|
+
'address': json['address'] == null ? undefined : json['address'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function ContractAddressToJSON(value?: ContractAddress | null): any {
|
|
59
|
+
if (value == null) {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
|
|
64
|
+
'name': value['name'],
|
|
65
|
+
'address': value['address'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
@@ -0,0 +1,76 @@
|
|
|
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 CurrentHeight
|
|
20
|
+
*/
|
|
21
|
+
export interface CurrentHeight {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof CurrentHeight
|
|
26
|
+
*/
|
|
27
|
+
code?: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CurrentHeight
|
|
32
|
+
*/
|
|
33
|
+
message?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof CurrentHeight
|
|
38
|
+
*/
|
|
39
|
+
height?: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the CurrentHeight interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfCurrentHeight(value: object): value is CurrentHeight {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function CurrentHeightFromJSON(json: any): CurrentHeight {
|
|
50
|
+
return CurrentHeightFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function CurrentHeightFromJSONTyped(json: any, ignoreDiscriminator: boolean): CurrentHeight {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'code': json['code'] == null ? undefined : json['code'],
|
|
60
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
61
|
+
'height': json['height'] == null ? undefined : json['height'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function CurrentHeightToJSON(value?: CurrentHeight | null): any {
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'code': value['code'],
|
|
72
|
+
'message': value['message'],
|
|
73
|
+
'height': value['height'],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
package/models/Cursor.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
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 Cursor
|
|
20
|
+
*/
|
|
21
|
+
export interface Cursor {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof Cursor
|
|
26
|
+
*/
|
|
27
|
+
next?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the Cursor interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfCursor(value: object): value is Cursor {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function CursorFromJSON(json: any): Cursor {
|
|
38
|
+
return CursorFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function CursorFromJSONTyped(json: any, ignoreDiscriminator: boolean): Cursor {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
|
|
47
|
+
'next': json['next'] == null ? undefined : json['next'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function CursorToJSON(value?: Cursor | null): any {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
|
|
57
|
+
'next': value['next'],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
@@ -0,0 +1,169 @@
|
|
|
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
|
+
import type { AccountMarketStats } from './AccountMarketStats';
|
|
17
|
+
import {
|
|
18
|
+
AccountMarketStatsFromJSON,
|
|
19
|
+
AccountMarketStatsFromJSONTyped,
|
|
20
|
+
AccountMarketStatsToJSON,
|
|
21
|
+
} from './AccountMarketStats';
|
|
22
|
+
import type { AccountPosition } from './AccountPosition';
|
|
23
|
+
import {
|
|
24
|
+
AccountPositionFromJSON,
|
|
25
|
+
AccountPositionFromJSONTyped,
|
|
26
|
+
AccountPositionToJSON,
|
|
27
|
+
} from './AccountPosition';
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @export
|
|
32
|
+
* @interface DetailedAccount
|
|
33
|
+
*/
|
|
34
|
+
export interface DetailedAccount {
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {number}
|
|
38
|
+
* @memberof DetailedAccount
|
|
39
|
+
*/
|
|
40
|
+
code?: number;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof DetailedAccount
|
|
45
|
+
*/
|
|
46
|
+
message?: string;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof DetailedAccount
|
|
51
|
+
*/
|
|
52
|
+
index?: number;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {number}
|
|
56
|
+
* @memberof DetailedAccount
|
|
57
|
+
*/
|
|
58
|
+
subAccountIndex?: number;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @memberof DetailedAccount
|
|
63
|
+
*/
|
|
64
|
+
l1Address?: string;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {string}
|
|
68
|
+
* @memberof DetailedAccount
|
|
69
|
+
*/
|
|
70
|
+
pk?: string;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {number}
|
|
74
|
+
* @memberof DetailedAccount
|
|
75
|
+
*/
|
|
76
|
+
nonce?: number;
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @type {number}
|
|
80
|
+
* @memberof DetailedAccount
|
|
81
|
+
*/
|
|
82
|
+
status?: number;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {string}
|
|
86
|
+
* @memberof DetailedAccount
|
|
87
|
+
*/
|
|
88
|
+
collateral?: string;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @type {number}
|
|
92
|
+
* @memberof DetailedAccount
|
|
93
|
+
*/
|
|
94
|
+
collateralType?: number;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @type {Array<AccountPosition>}
|
|
98
|
+
* @memberof DetailedAccount
|
|
99
|
+
*/
|
|
100
|
+
positions?: Array<AccountPosition>;
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @type {string}
|
|
104
|
+
* @memberof DetailedAccount
|
|
105
|
+
*/
|
|
106
|
+
totalAssetValue?: string;
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
* @type {Array<AccountMarketStats>}
|
|
110
|
+
* @memberof DetailedAccount
|
|
111
|
+
*/
|
|
112
|
+
marketStats?: Array<AccountMarketStats>;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Check if a given object implements the DetailedAccount interface.
|
|
117
|
+
*/
|
|
118
|
+
export function instanceOfDetailedAccount(value: object): value is DetailedAccount {
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function DetailedAccountFromJSON(json: any): DetailedAccount {
|
|
123
|
+
return DetailedAccountFromJSONTyped(json, false);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): DetailedAccount {
|
|
127
|
+
if (json == null) {
|
|
128
|
+
return json;
|
|
129
|
+
}
|
|
130
|
+
return {
|
|
131
|
+
|
|
132
|
+
'code': json['code'] == null ? undefined : json['code'],
|
|
133
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
134
|
+
'index': json['index'] == null ? undefined : json['index'],
|
|
135
|
+
'subAccountIndex': json['sub_account_index'] == null ? undefined : json['sub_account_index'],
|
|
136
|
+
'l1Address': json['l1_address'] == null ? undefined : json['l1_address'],
|
|
137
|
+
'pk': json['pk'] == null ? undefined : json['pk'],
|
|
138
|
+
'nonce': json['nonce'] == null ? undefined : json['nonce'],
|
|
139
|
+
'status': json['status'] == null ? undefined : json['status'],
|
|
140
|
+
'collateral': json['collateral'] == null ? undefined : json['collateral'],
|
|
141
|
+
'collateralType': json['collateral_type'] == null ? undefined : json['collateral_type'],
|
|
142
|
+
'positions': json['positions'] == null ? undefined : ((json['positions'] as Array<any>).map(AccountPositionFromJSON)),
|
|
143
|
+
'totalAssetValue': json['total_asset_value'] == null ? undefined : json['total_asset_value'],
|
|
144
|
+
'marketStats': json['market_stats'] == null ? undefined : ((json['market_stats'] as Array<any>).map(AccountMarketStatsFromJSON)),
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
|
|
149
|
+
if (value == null) {
|
|
150
|
+
return value;
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
|
|
154
|
+
'code': value['code'],
|
|
155
|
+
'message': value['message'],
|
|
156
|
+
'index': value['index'],
|
|
157
|
+
'sub_account_index': value['subAccountIndex'],
|
|
158
|
+
'l1_address': value['l1Address'],
|
|
159
|
+
'pk': value['pk'],
|
|
160
|
+
'nonce': value['nonce'],
|
|
161
|
+
'status': value['status'],
|
|
162
|
+
'collateral': value['collateral'],
|
|
163
|
+
'collateral_type': value['collateralType'],
|
|
164
|
+
'positions': value['positions'] == null ? undefined : ((value['positions'] as Array<any>).map(AccountPositionToJSON)),
|
|
165
|
+
'total_asset_value': value['totalAssetValue'],
|
|
166
|
+
'market_stats': value['marketStats'] == null ? undefined : ((value['marketStats'] as Array<any>).map(AccountMarketStatsToJSON)),
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
|