zklighter-perps 1.0.72 → 1.0.73
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 +13 -0
- package/apis/BridgeApi.ts +294 -0
- package/apis/RootApi.ts +31 -0
- package/apis/index.ts +1 -0
- package/models/BridgeSupportedNetwork.ts +88 -0
- package/models/BridgeSupportedNetworks.ts +85 -0
- package/models/CreateIntentAddressResp.ts +78 -0
- package/models/Deposit.ts +141 -0
- package/models/DepositHistory.ts +94 -0
- package/models/DepositHistoryItem.ts +79 -0
- package/models/ReqGetDepositHistory.ts +69 -0
- package/models/ReqGetLatestDeposit.ts +61 -0
- package/models/ReqGetWithdrawHistory.ts +69 -0
- package/models/WithdrawHistory.ts +94 -0
- package/models/WithdrawHistoryItem.ts +79 -0
- package/models/ZkLighterInfo.ts +61 -0
- package/models/index.ts +12 -0
- package/openapi.json +502 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
apis/AccountApi.ts
|
|
2
2
|
apis/BlockApi.ts
|
|
3
|
+
apis/BridgeApi.ts
|
|
3
4
|
apis/CandlestickApi.ts
|
|
4
5
|
apis/InfoApi.ts
|
|
5
6
|
apis/LiquidationApi.ts
|
|
@@ -19,11 +20,17 @@ models/Accounts.ts
|
|
|
19
20
|
models/ApiKey.ts
|
|
20
21
|
models/Block.ts
|
|
21
22
|
models/Blocks.ts
|
|
23
|
+
models/BridgeSupportedNetwork.ts
|
|
24
|
+
models/BridgeSupportedNetworks.ts
|
|
22
25
|
models/Candlestick.ts
|
|
23
26
|
models/Candlesticks.ts
|
|
24
27
|
models/ContractAddress.ts
|
|
28
|
+
models/CreateIntentAddressResp.ts
|
|
25
29
|
models/CurrentHeight.ts
|
|
26
30
|
models/Cursor.ts
|
|
31
|
+
models/Deposit.ts
|
|
32
|
+
models/DepositHistory.ts
|
|
33
|
+
models/DepositHistoryItem.ts
|
|
27
34
|
models/DetailedAccount.ts
|
|
28
35
|
models/DetailedAccounts.ts
|
|
29
36
|
models/DetailedCandlestick.ts
|
|
@@ -71,9 +78,11 @@ models/ReqGetBlock.ts
|
|
|
71
78
|
models/ReqGetBlockTxs.ts
|
|
72
79
|
models/ReqGetByAccount.ts
|
|
73
80
|
models/ReqGetCandlesticks.ts
|
|
81
|
+
models/ReqGetDepositHistory.ts
|
|
74
82
|
models/ReqGetFeeBucket.ts
|
|
75
83
|
models/ReqGetFundings.ts
|
|
76
84
|
models/ReqGetL1Tx.ts
|
|
85
|
+
models/ReqGetLatestDeposit.ts
|
|
77
86
|
models/ReqGetLeaderboard.ts
|
|
78
87
|
models/ReqGetNextNonce.ts
|
|
79
88
|
models/ReqGetOrderBookDetails.ts
|
|
@@ -86,6 +95,7 @@ models/ReqGetRangeWithIndexSortable.ts
|
|
|
86
95
|
models/ReqGetRecentTrades.ts
|
|
87
96
|
models/ReqGetTrades.ts
|
|
88
97
|
models/ReqGetTx.ts
|
|
98
|
+
models/ReqGetWithdrawHistory.ts
|
|
89
99
|
models/ReqIsWhitelisted.ts
|
|
90
100
|
models/ResultCode.ts
|
|
91
101
|
models/SimpleOrder.ts
|
|
@@ -99,5 +109,8 @@ models/TxHash.ts
|
|
|
99
109
|
models/TxHashes.ts
|
|
100
110
|
models/Txs.ts
|
|
101
111
|
models/ValidatorInfo.ts
|
|
112
|
+
models/WithdrawHistory.ts
|
|
113
|
+
models/WithdrawHistoryItem.ts
|
|
114
|
+
models/ZkLighterInfo.ts
|
|
102
115
|
models/index.ts
|
|
103
116
|
runtime.ts
|
|
@@ -0,0 +1,294 @@
|
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
BridgeSupportedNetworks,
|
|
19
|
+
CreateIntentAddressResp,
|
|
20
|
+
Deposit,
|
|
21
|
+
DepositHistory,
|
|
22
|
+
ResultCode,
|
|
23
|
+
WithdrawHistory,
|
|
24
|
+
} from '../models/index';
|
|
25
|
+
import {
|
|
26
|
+
BridgeSupportedNetworksFromJSON,
|
|
27
|
+
BridgeSupportedNetworksToJSON,
|
|
28
|
+
CreateIntentAddressRespFromJSON,
|
|
29
|
+
CreateIntentAddressRespToJSON,
|
|
30
|
+
DepositFromJSON,
|
|
31
|
+
DepositToJSON,
|
|
32
|
+
DepositHistoryFromJSON,
|
|
33
|
+
DepositHistoryToJSON,
|
|
34
|
+
ResultCodeFromJSON,
|
|
35
|
+
ResultCodeToJSON,
|
|
36
|
+
WithdrawHistoryFromJSON,
|
|
37
|
+
WithdrawHistoryToJSON,
|
|
38
|
+
} from '../models/index';
|
|
39
|
+
|
|
40
|
+
export interface CreateIntentAddressRequest {
|
|
41
|
+
chain_id: number;
|
|
42
|
+
from_addr: string;
|
|
43
|
+
amount: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface DepositHistoryRequest {
|
|
47
|
+
l1_address: string;
|
|
48
|
+
cursor?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface DepositLatestRequest {
|
|
52
|
+
l1_address: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface WithdrawHistoryRequest {
|
|
56
|
+
l1_address: string;
|
|
57
|
+
cursor?: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
export class BridgeApi extends runtime.BaseAPI {
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Create a bridge intent address for CCTP bridge
|
|
67
|
+
* createIntentAddress
|
|
68
|
+
*/
|
|
69
|
+
async createIntentAddressRaw(requestParameters: CreateIntentAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateIntentAddressResp>> {
|
|
70
|
+
if (requestParameters['chain_id'] == null) {
|
|
71
|
+
throw new runtime.RequiredError(
|
|
72
|
+
'chain_id',
|
|
73
|
+
'Required parameter "chain_id" was null or undefined when calling createIntentAddress().'
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (requestParameters['from_addr'] == null) {
|
|
78
|
+
throw new runtime.RequiredError(
|
|
79
|
+
'from_addr',
|
|
80
|
+
'Required parameter "from_addr" was null or undefined when calling createIntentAddress().'
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (requestParameters['amount'] == null) {
|
|
85
|
+
throw new runtime.RequiredError(
|
|
86
|
+
'amount',
|
|
87
|
+
'Required parameter "amount" was null or undefined when calling createIntentAddress().'
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const queryParameters: any = {};
|
|
92
|
+
|
|
93
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
94
|
+
|
|
95
|
+
const consumes: runtime.Consume[] = [
|
|
96
|
+
{ contentType: 'multipart/form-data' },
|
|
97
|
+
];
|
|
98
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
99
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
100
|
+
|
|
101
|
+
let formParams: { append(param: string, value: any): any };
|
|
102
|
+
let useForm = false;
|
|
103
|
+
if (useForm) {
|
|
104
|
+
formParams = new FormData();
|
|
105
|
+
} else {
|
|
106
|
+
formParams = new URLSearchParams();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (requestParameters['chain_id'] != null) {
|
|
110
|
+
formParams.append('chain_id', requestParameters['chain_id'] as any);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (requestParameters['from_addr'] != null) {
|
|
114
|
+
formParams.append('from_addr', requestParameters['from_addr'] as any);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (requestParameters['amount'] != null) {
|
|
118
|
+
formParams.append('amount', requestParameters['amount'] as any);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const response = await this.request({
|
|
122
|
+
path: `/api/v1/createIntentAddress`,
|
|
123
|
+
method: 'POST',
|
|
124
|
+
headers: headerParameters,
|
|
125
|
+
query: queryParameters,
|
|
126
|
+
body: formParams,
|
|
127
|
+
}, initOverrides);
|
|
128
|
+
|
|
129
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CreateIntentAddressRespFromJSON(jsonValue));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Create a bridge intent address for CCTP bridge
|
|
134
|
+
* createIntentAddress
|
|
135
|
+
*/
|
|
136
|
+
async createIntentAddress(requestParameters: CreateIntentAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateIntentAddressResp> {
|
|
137
|
+
const response = await this.createIntentAddressRaw(requestParameters, initOverrides);
|
|
138
|
+
return await response.value();
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Get deposit history
|
|
143
|
+
* deposit_history
|
|
144
|
+
*/
|
|
145
|
+
async depositHistoryRaw(requestParameters: DepositHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DepositHistory>> {
|
|
146
|
+
if (requestParameters['l1_address'] == null) {
|
|
147
|
+
throw new runtime.RequiredError(
|
|
148
|
+
'l1_address',
|
|
149
|
+
'Required parameter "l1_address" was null or undefined when calling depositHistory().'
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const queryParameters: any = {};
|
|
154
|
+
|
|
155
|
+
if (requestParameters['l1_address'] != null) {
|
|
156
|
+
queryParameters['l1_address'] = requestParameters['l1_address'];
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (requestParameters['cursor'] != null) {
|
|
160
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
164
|
+
|
|
165
|
+
const response = await this.request({
|
|
166
|
+
path: `/api/v1/deposit/history`,
|
|
167
|
+
method: 'GET',
|
|
168
|
+
headers: headerParameters,
|
|
169
|
+
query: queryParameters,
|
|
170
|
+
}, initOverrides);
|
|
171
|
+
|
|
172
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DepositHistoryFromJSON(jsonValue));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Get deposit history
|
|
177
|
+
* deposit_history
|
|
178
|
+
*/
|
|
179
|
+
async depositHistory(requestParameters: DepositHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DepositHistory> {
|
|
180
|
+
const response = await this.depositHistoryRaw(requestParameters, initOverrides);
|
|
181
|
+
return await response.value();
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Get most recent deposit for given l1 address
|
|
186
|
+
* deposit_latest
|
|
187
|
+
*/
|
|
188
|
+
async depositLatestRaw(requestParameters: DepositLatestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Deposit>> {
|
|
189
|
+
if (requestParameters['l1_address'] == null) {
|
|
190
|
+
throw new runtime.RequiredError(
|
|
191
|
+
'l1_address',
|
|
192
|
+
'Required parameter "l1_address" was null or undefined when calling depositLatest().'
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const queryParameters: any = {};
|
|
197
|
+
|
|
198
|
+
if (requestParameters['l1_address'] != null) {
|
|
199
|
+
queryParameters['l1_address'] = requestParameters['l1_address'];
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
203
|
+
|
|
204
|
+
const response = await this.request({
|
|
205
|
+
path: `/api/v1/deposit/latest`,
|
|
206
|
+
method: 'GET',
|
|
207
|
+
headers: headerParameters,
|
|
208
|
+
query: queryParameters,
|
|
209
|
+
}, initOverrides);
|
|
210
|
+
|
|
211
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DepositFromJSON(jsonValue));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Get most recent deposit for given l1 address
|
|
216
|
+
* deposit_latest
|
|
217
|
+
*/
|
|
218
|
+
async depositLatest(requestParameters: DepositLatestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Deposit> {
|
|
219
|
+
const response = await this.depositLatestRaw(requestParameters, initOverrides);
|
|
220
|
+
return await response.value();
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Get deposit supporting networks
|
|
225
|
+
* deposit_networks
|
|
226
|
+
*/
|
|
227
|
+
async depositNetworksRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BridgeSupportedNetworks>> {
|
|
228
|
+
const queryParameters: any = {};
|
|
229
|
+
|
|
230
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
231
|
+
|
|
232
|
+
const response = await this.request({
|
|
233
|
+
path: `/api/v1/deposit/networks`,
|
|
234
|
+
method: 'GET',
|
|
235
|
+
headers: headerParameters,
|
|
236
|
+
query: queryParameters,
|
|
237
|
+
}, initOverrides);
|
|
238
|
+
|
|
239
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BridgeSupportedNetworksFromJSON(jsonValue));
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Get deposit supporting networks
|
|
244
|
+
* deposit_networks
|
|
245
|
+
*/
|
|
246
|
+
async depositNetworks(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BridgeSupportedNetworks> {
|
|
247
|
+
const response = await this.depositNetworksRaw(initOverrides);
|
|
248
|
+
return await response.value();
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Get withdraw history
|
|
253
|
+
* withdraw_history
|
|
254
|
+
*/
|
|
255
|
+
async withdrawHistoryRaw(requestParameters: WithdrawHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WithdrawHistory>> {
|
|
256
|
+
if (requestParameters['l1_address'] == null) {
|
|
257
|
+
throw new runtime.RequiredError(
|
|
258
|
+
'l1_address',
|
|
259
|
+
'Required parameter "l1_address" was null or undefined when calling withdrawHistory().'
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
const queryParameters: any = {};
|
|
264
|
+
|
|
265
|
+
if (requestParameters['l1_address'] != null) {
|
|
266
|
+
queryParameters['l1_address'] = requestParameters['l1_address'];
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
if (requestParameters['cursor'] != null) {
|
|
270
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
274
|
+
|
|
275
|
+
const response = await this.request({
|
|
276
|
+
path: `/api/v1/withdraw/history`,
|
|
277
|
+
method: 'GET',
|
|
278
|
+
headers: headerParameters,
|
|
279
|
+
query: queryParameters,
|
|
280
|
+
}, initOverrides);
|
|
281
|
+
|
|
282
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WithdrawHistoryFromJSON(jsonValue));
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Get withdraw history
|
|
287
|
+
* withdraw_history
|
|
288
|
+
*/
|
|
289
|
+
async withdrawHistory(requestParameters: WithdrawHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WithdrawHistory> {
|
|
290
|
+
const response = await this.withdrawHistoryRaw(requestParameters, initOverrides);
|
|
291
|
+
return await response.value();
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
}
|
package/apis/RootApi.ts
CHANGED
|
@@ -17,12 +17,15 @@ import * as runtime from '../runtime';
|
|
|
17
17
|
import type {
|
|
18
18
|
ResultCode,
|
|
19
19
|
Status,
|
|
20
|
+
ZkLighterInfo,
|
|
20
21
|
} from '../models/index';
|
|
21
22
|
import {
|
|
22
23
|
ResultCodeFromJSON,
|
|
23
24
|
ResultCodeToJSON,
|
|
24
25
|
StatusFromJSON,
|
|
25
26
|
StatusToJSON,
|
|
27
|
+
ZkLighterInfoFromJSON,
|
|
28
|
+
ZkLighterInfoToJSON,
|
|
26
29
|
} from '../models/index';
|
|
27
30
|
|
|
28
31
|
/**
|
|
@@ -30,6 +33,34 @@ import {
|
|
|
30
33
|
*/
|
|
31
34
|
export class RootApi extends runtime.BaseAPI {
|
|
32
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Get info of zklighter
|
|
38
|
+
* info
|
|
39
|
+
*/
|
|
40
|
+
async infoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ZkLighterInfo>> {
|
|
41
|
+
const queryParameters: any = {};
|
|
42
|
+
|
|
43
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
44
|
+
|
|
45
|
+
const response = await this.request({
|
|
46
|
+
path: `/info`,
|
|
47
|
+
method: 'GET',
|
|
48
|
+
headers: headerParameters,
|
|
49
|
+
query: queryParameters,
|
|
50
|
+
}, initOverrides);
|
|
51
|
+
|
|
52
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ZkLighterInfoFromJSON(jsonValue));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Get info of zklighter
|
|
57
|
+
* info
|
|
58
|
+
*/
|
|
59
|
+
async info(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ZkLighterInfo> {
|
|
60
|
+
const response = await this.infoRaw(initOverrides);
|
|
61
|
+
return await response.value();
|
|
62
|
+
}
|
|
63
|
+
|
|
33
64
|
/**
|
|
34
65
|
* Get status of zklighter
|
|
35
66
|
* status
|
package/apis/index.ts
CHANGED
|
@@ -0,0 +1,88 @@
|
|
|
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 BridgeSupportedNetwork
|
|
20
|
+
*/
|
|
21
|
+
export interface BridgeSupportedNetwork {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof BridgeSupportedNetwork
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof BridgeSupportedNetwork
|
|
32
|
+
*/
|
|
33
|
+
chain_id: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof BridgeSupportedNetwork
|
|
38
|
+
*/
|
|
39
|
+
explorer: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof BridgeSupportedNetwork
|
|
44
|
+
*/
|
|
45
|
+
is_cex: boolean;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the BridgeSupportedNetwork interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfBridgeSupportedNetwork(value: object): value is BridgeSupportedNetwork {
|
|
52
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
53
|
+
if (!('chain_id' in value) || value['chain_id'] === undefined) return false;
|
|
54
|
+
if (!('explorer' in value) || value['explorer'] === undefined) return false;
|
|
55
|
+
if (!('is_cex' in value) || value['is_cex'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function BridgeSupportedNetworkFromJSON(json: any): BridgeSupportedNetwork {
|
|
60
|
+
return BridgeSupportedNetworkFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function BridgeSupportedNetworkFromJSONTyped(json: any, ignoreDiscriminator: boolean): BridgeSupportedNetwork {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'name': json['name'],
|
|
70
|
+
'chain_id': json['chain_id'],
|
|
71
|
+
'explorer': json['explorer'],
|
|
72
|
+
'is_cex': json['is_cex'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function BridgeSupportedNetworkToJSON(value?: BridgeSupportedNetwork | null): any {
|
|
77
|
+
if (value == null) {
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
|
|
82
|
+
'name': value['name'],
|
|
83
|
+
'chain_id': value['chain_id'],
|
|
84
|
+
'explorer': value['explorer'],
|
|
85
|
+
'is_cex': value['is_cex'],
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -0,0 +1,85 @@
|
|
|
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 { BridgeSupportedNetwork } from './BridgeSupportedNetwork';
|
|
17
|
+
import {
|
|
18
|
+
BridgeSupportedNetworkFromJSON,
|
|
19
|
+
BridgeSupportedNetworkFromJSONTyped,
|
|
20
|
+
BridgeSupportedNetworkToJSON,
|
|
21
|
+
} from './BridgeSupportedNetwork';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface BridgeSupportedNetworks
|
|
27
|
+
*/
|
|
28
|
+
export interface BridgeSupportedNetworks {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof BridgeSupportedNetworks
|
|
33
|
+
*/
|
|
34
|
+
code: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof BridgeSupportedNetworks
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {Array<BridgeSupportedNetwork>}
|
|
44
|
+
* @memberof BridgeSupportedNetworks
|
|
45
|
+
*/
|
|
46
|
+
networks: Array<BridgeSupportedNetwork>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the BridgeSupportedNetworks interface.
|
|
51
|
+
*/
|
|
52
|
+
export function instanceOfBridgeSupportedNetworks(value: object): value is BridgeSupportedNetworks {
|
|
53
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
54
|
+
if (!('networks' in value) || value['networks'] === undefined) return false;
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function BridgeSupportedNetworksFromJSON(json: any): BridgeSupportedNetworks {
|
|
59
|
+
return BridgeSupportedNetworksFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function BridgeSupportedNetworksFromJSONTyped(json: any, ignoreDiscriminator: boolean): BridgeSupportedNetworks {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'code': json['code'],
|
|
69
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
70
|
+
'networks': ((json['networks'] as Array<any>).map(BridgeSupportedNetworkFromJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function BridgeSupportedNetworksToJSON(value?: BridgeSupportedNetworks | null): any {
|
|
75
|
+
if (value == null) {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
|
|
80
|
+
'code': value['code'],
|
|
81
|
+
'message': value['message'],
|
|
82
|
+
'networks': ((value['networks'] as Array<any>).map(BridgeSupportedNetworkToJSON)),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
@@ -0,0 +1,78 @@
|
|
|
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 CreateIntentAddressResp
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateIntentAddressResp {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof CreateIntentAddressResp
|
|
26
|
+
*/
|
|
27
|
+
code: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CreateIntentAddressResp
|
|
32
|
+
*/
|
|
33
|
+
message?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof CreateIntentAddressResp
|
|
38
|
+
*/
|
|
39
|
+
intent_address: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the CreateIntentAddressResp interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfCreateIntentAddressResp(value: object): value is CreateIntentAddressResp {
|
|
46
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
47
|
+
if (!('intent_address' in value) || value['intent_address'] === undefined) return false;
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function CreateIntentAddressRespFromJSON(json: any): CreateIntentAddressResp {
|
|
52
|
+
return CreateIntentAddressRespFromJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function CreateIntentAddressRespFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateIntentAddressResp {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
|
|
61
|
+
'code': json['code'],
|
|
62
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
63
|
+
'intent_address': json['intent_address'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function CreateIntentAddressRespToJSON(value?: CreateIntentAddressResp | null): any {
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
|
|
73
|
+
'code': value['code'],
|
|
74
|
+
'message': value['message'],
|
|
75
|
+
'intent_address': value['intent_address'],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|