zklighter-perps 1.0.165 → 1.0.167
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 +4 -0
- package/apis/BridgeApi.ts +92 -0
- package/models/Bridge.ts +208 -0
- package/models/ReqGetBridgesByL1Addr.ts +61 -0
- package/models/RespGetBridgesByL1Addr.ts +85 -0
- package/models/RespGetIsNextBridgeFast.ts +78 -0
- package/models/index.ts +4 -0
- package/openapi.json +215 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -29,6 +29,7 @@ models/Announcements.ts
|
|
|
29
29
|
models/ApiKey.ts
|
|
30
30
|
models/Block.ts
|
|
31
31
|
models/Blocks.ts
|
|
32
|
+
models/Bridge.ts
|
|
32
33
|
models/BridgeSupportedNetwork.ts
|
|
33
34
|
models/BridgeSupportedNetworks.ts
|
|
34
35
|
models/Candlestick.ts
|
|
@@ -100,6 +101,7 @@ models/ReqGetAccountPnL.ts
|
|
|
100
101
|
models/ReqGetAccountTxs.ts
|
|
101
102
|
models/ReqGetBlock.ts
|
|
102
103
|
models/ReqGetBlockTxs.ts
|
|
104
|
+
models/ReqGetBridgesByL1Addr.ts
|
|
103
105
|
models/ReqGetByAccount.ts
|
|
104
106
|
models/ReqGetCandlesticks.ts
|
|
105
107
|
models/ReqGetDepositHistory.ts
|
|
@@ -130,8 +132,10 @@ models/ReqGetTx.ts
|
|
|
130
132
|
models/ReqGetWithdrawHistory.ts
|
|
131
133
|
models/ReqIsWhitelisted.ts
|
|
132
134
|
models/RespChangeAccountTier.ts
|
|
135
|
+
models/RespGetBridgesByL1Addr.ts
|
|
133
136
|
models/RespGetFastBridgeInfo.ts
|
|
134
137
|
models/RespGetFastwithdrawalInfo.ts
|
|
138
|
+
models/RespGetIsNextBridgeFast.ts
|
|
135
139
|
models/RespPublicPoolsMetadata.ts
|
|
136
140
|
models/RespSendTx.ts
|
|
137
141
|
models/RespSendTxBatch.ts
|
package/apis/BridgeApi.ts
CHANGED
|
@@ -18,8 +18,10 @@ import type {
|
|
|
18
18
|
BridgeSupportedNetworks,
|
|
19
19
|
CreateIntentAddressResp,
|
|
20
20
|
Deposit,
|
|
21
|
+
RespGetBridgesByL1Addr,
|
|
21
22
|
RespGetFastBridgeInfo,
|
|
22
23
|
RespGetFastwithdrawalInfo,
|
|
24
|
+
RespGetIsNextBridgeFast,
|
|
23
25
|
ResultCode,
|
|
24
26
|
} from '../models/index';
|
|
25
27
|
import {
|
|
@@ -29,14 +31,26 @@ import {
|
|
|
29
31
|
CreateIntentAddressRespToJSON,
|
|
30
32
|
DepositFromJSON,
|
|
31
33
|
DepositToJSON,
|
|
34
|
+
RespGetBridgesByL1AddrFromJSON,
|
|
35
|
+
RespGetBridgesByL1AddrToJSON,
|
|
32
36
|
RespGetFastBridgeInfoFromJSON,
|
|
33
37
|
RespGetFastBridgeInfoToJSON,
|
|
34
38
|
RespGetFastwithdrawalInfoFromJSON,
|
|
35
39
|
RespGetFastwithdrawalInfoToJSON,
|
|
40
|
+
RespGetIsNextBridgeFastFromJSON,
|
|
41
|
+
RespGetIsNextBridgeFastToJSON,
|
|
36
42
|
ResultCodeFromJSON,
|
|
37
43
|
ResultCodeToJSON,
|
|
38
44
|
} from '../models/index';
|
|
39
45
|
|
|
46
|
+
export interface BridgesRequest {
|
|
47
|
+
l1_address: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface BridgesIsNextBridgeFastRequest {
|
|
51
|
+
l1_address: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
40
54
|
export interface CreateIntentAddressRequest {
|
|
41
55
|
chain_id: string;
|
|
42
56
|
from_addr: string;
|
|
@@ -71,6 +85,84 @@ export interface FastwithdrawInfoRequest {
|
|
|
71
85
|
*/
|
|
72
86
|
export class BridgeApi extends runtime.BaseAPI {
|
|
73
87
|
|
|
88
|
+
/**
|
|
89
|
+
* Get bridges for given l1 address
|
|
90
|
+
* bridges
|
|
91
|
+
*/
|
|
92
|
+
async bridgesRaw(requestParameters: BridgesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespGetBridgesByL1Addr>> {
|
|
93
|
+
if (requestParameters['l1_address'] == null) {
|
|
94
|
+
throw new runtime.RequiredError(
|
|
95
|
+
'l1_address',
|
|
96
|
+
'Required parameter "l1_address" was null or undefined when calling bridges().'
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const queryParameters: any = {};
|
|
101
|
+
|
|
102
|
+
if (requestParameters['l1_address'] != null) {
|
|
103
|
+
queryParameters['l1_address'] = requestParameters['l1_address'];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
107
|
+
|
|
108
|
+
const response = await this.request({
|
|
109
|
+
path: `/api/v1/bridges`,
|
|
110
|
+
method: 'GET',
|
|
111
|
+
headers: headerParameters,
|
|
112
|
+
query: queryParameters,
|
|
113
|
+
}, initOverrides);
|
|
114
|
+
|
|
115
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespGetBridgesByL1AddrFromJSON(jsonValue));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Get bridges for given l1 address
|
|
120
|
+
* bridges
|
|
121
|
+
*/
|
|
122
|
+
async bridges(requestParameters: BridgesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespGetBridgesByL1Addr> {
|
|
123
|
+
const response = await this.bridgesRaw(requestParameters, initOverrides);
|
|
124
|
+
return await response.value();
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Get if next bridge is fast
|
|
129
|
+
* bridges_isNextBridgeFast
|
|
130
|
+
*/
|
|
131
|
+
async bridgesIsNextBridgeFastRaw(requestParameters: BridgesIsNextBridgeFastRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespGetIsNextBridgeFast>> {
|
|
132
|
+
if (requestParameters['l1_address'] == null) {
|
|
133
|
+
throw new runtime.RequiredError(
|
|
134
|
+
'l1_address',
|
|
135
|
+
'Required parameter "l1_address" was null or undefined when calling bridgesIsNextBridgeFast().'
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const queryParameters: any = {};
|
|
140
|
+
|
|
141
|
+
if (requestParameters['l1_address'] != null) {
|
|
142
|
+
queryParameters['l1_address'] = requestParameters['l1_address'];
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
146
|
+
|
|
147
|
+
const response = await this.request({
|
|
148
|
+
path: `/api/v1/bridges/isNextBridgeFast`,
|
|
149
|
+
method: 'GET',
|
|
150
|
+
headers: headerParameters,
|
|
151
|
+
query: queryParameters,
|
|
152
|
+
}, initOverrides);
|
|
153
|
+
|
|
154
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespGetIsNextBridgeFastFromJSON(jsonValue));
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Get if next bridge is fast
|
|
159
|
+
* bridges_isNextBridgeFast
|
|
160
|
+
*/
|
|
161
|
+
async bridgesIsNextBridgeFast(requestParameters: BridgesIsNextBridgeFastRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespGetIsNextBridgeFast> {
|
|
162
|
+
const response = await this.bridgesIsNextBridgeFastRaw(requestParameters, initOverrides);
|
|
163
|
+
return await response.value();
|
|
164
|
+
}
|
|
165
|
+
|
|
74
166
|
/**
|
|
75
167
|
* Create a bridge intent address for CCTP bridge
|
|
76
168
|
* createIntentAddress
|
package/models/Bridge.ts
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
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 Bridge
|
|
20
|
+
*/
|
|
21
|
+
export interface Bridge {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof Bridge
|
|
26
|
+
*/
|
|
27
|
+
id: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof Bridge
|
|
32
|
+
*/
|
|
33
|
+
version: BridgeVersionEnum;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof Bridge
|
|
38
|
+
*/
|
|
39
|
+
source: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof Bridge
|
|
44
|
+
*/
|
|
45
|
+
source_chain_id: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof Bridge
|
|
50
|
+
*/
|
|
51
|
+
fast_bridge_tx_hash: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof Bridge
|
|
56
|
+
*/
|
|
57
|
+
batch_claim_tx_hash: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof Bridge
|
|
62
|
+
*/
|
|
63
|
+
cctp_burn_tx_hash: string;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof Bridge
|
|
68
|
+
*/
|
|
69
|
+
amount: string;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof Bridge
|
|
74
|
+
*/
|
|
75
|
+
intent_address: string;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {string}
|
|
79
|
+
* @memberof Bridge
|
|
80
|
+
*/
|
|
81
|
+
status: BridgeStatusEnum;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {string}
|
|
85
|
+
* @memberof Bridge
|
|
86
|
+
*/
|
|
87
|
+
step: string;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {string}
|
|
91
|
+
* @memberof Bridge
|
|
92
|
+
*/
|
|
93
|
+
description: string;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {number}
|
|
97
|
+
* @memberof Bridge
|
|
98
|
+
*/
|
|
99
|
+
created_at: number;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {number}
|
|
103
|
+
* @memberof Bridge
|
|
104
|
+
*/
|
|
105
|
+
updated_at: number;
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @type {boolean}
|
|
109
|
+
* @memberof Bridge
|
|
110
|
+
*/
|
|
111
|
+
is_external_deposit: boolean;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @export
|
|
117
|
+
*/
|
|
118
|
+
export const BridgeVersionEnum = {
|
|
119
|
+
NUMBER_1: 1,
|
|
120
|
+
NUMBER_2: 2
|
|
121
|
+
} as const;
|
|
122
|
+
export type BridgeVersionEnum = typeof BridgeVersionEnum[keyof typeof BridgeVersionEnum];
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @export
|
|
126
|
+
*/
|
|
127
|
+
export const BridgeStatusEnum = {
|
|
128
|
+
Pending: 'pending',
|
|
129
|
+
Bridging: 'bridging',
|
|
130
|
+
Completed: 'completed'
|
|
131
|
+
} as const;
|
|
132
|
+
export type BridgeStatusEnum = typeof BridgeStatusEnum[keyof typeof BridgeStatusEnum];
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Check if a given object implements the Bridge interface.
|
|
137
|
+
*/
|
|
138
|
+
export function instanceOfBridge(value: object): value is Bridge {
|
|
139
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
140
|
+
if (!('version' in value) || value['version'] === undefined) return false;
|
|
141
|
+
if (!('source' in value) || value['source'] === undefined) return false;
|
|
142
|
+
if (!('source_chain_id' in value) || value['source_chain_id'] === undefined) return false;
|
|
143
|
+
if (!('fast_bridge_tx_hash' in value) || value['fast_bridge_tx_hash'] === undefined) return false;
|
|
144
|
+
if (!('batch_claim_tx_hash' in value) || value['batch_claim_tx_hash'] === undefined) return false;
|
|
145
|
+
if (!('cctp_burn_tx_hash' in value) || value['cctp_burn_tx_hash'] === undefined) return false;
|
|
146
|
+
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
147
|
+
if (!('intent_address' in value) || value['intent_address'] === undefined) return false;
|
|
148
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
149
|
+
if (!('step' in value) || value['step'] === undefined) return false;
|
|
150
|
+
if (!('description' in value) || value['description'] === undefined) return false;
|
|
151
|
+
if (!('created_at' in value) || value['created_at'] === undefined) return false;
|
|
152
|
+
if (!('updated_at' in value) || value['updated_at'] === undefined) return false;
|
|
153
|
+
if (!('is_external_deposit' in value) || value['is_external_deposit'] === undefined) return false;
|
|
154
|
+
return true;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function BridgeFromJSON(json: any): Bridge {
|
|
158
|
+
return BridgeFromJSONTyped(json, false);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function BridgeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Bridge {
|
|
162
|
+
if (json == null) {
|
|
163
|
+
return json;
|
|
164
|
+
}
|
|
165
|
+
return {
|
|
166
|
+
|
|
167
|
+
'id': json['id'],
|
|
168
|
+
'version': json['version'],
|
|
169
|
+
'source': json['source'],
|
|
170
|
+
'source_chain_id': json['source_chain_id'],
|
|
171
|
+
'fast_bridge_tx_hash': json['fast_bridge_tx_hash'],
|
|
172
|
+
'batch_claim_tx_hash': json['batch_claim_tx_hash'],
|
|
173
|
+
'cctp_burn_tx_hash': json['cctp_burn_tx_hash'],
|
|
174
|
+
'amount': json['amount'],
|
|
175
|
+
'intent_address': json['intent_address'],
|
|
176
|
+
'status': json['status'],
|
|
177
|
+
'step': json['step'],
|
|
178
|
+
'description': json['description'],
|
|
179
|
+
'created_at': json['created_at'],
|
|
180
|
+
'updated_at': json['updated_at'],
|
|
181
|
+
'is_external_deposit': json['is_external_deposit'],
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export function BridgeToJSON(value?: Bridge | null): any {
|
|
186
|
+
if (value == null) {
|
|
187
|
+
return value;
|
|
188
|
+
}
|
|
189
|
+
return {
|
|
190
|
+
|
|
191
|
+
'id': value['id'],
|
|
192
|
+
'version': value['version'],
|
|
193
|
+
'source': value['source'],
|
|
194
|
+
'source_chain_id': value['source_chain_id'],
|
|
195
|
+
'fast_bridge_tx_hash': value['fast_bridge_tx_hash'],
|
|
196
|
+
'batch_claim_tx_hash': value['batch_claim_tx_hash'],
|
|
197
|
+
'cctp_burn_tx_hash': value['cctp_burn_tx_hash'],
|
|
198
|
+
'amount': value['amount'],
|
|
199
|
+
'intent_address': value['intent_address'],
|
|
200
|
+
'status': value['status'],
|
|
201
|
+
'step': value['step'],
|
|
202
|
+
'description': value['description'],
|
|
203
|
+
'created_at': value['created_at'],
|
|
204
|
+
'updated_at': value['updated_at'],
|
|
205
|
+
'is_external_deposit': value['is_external_deposit'],
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
|
|
@@ -0,0 +1,61 @@
|
|
|
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 ReqGetBridgesByL1Addr
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetBridgesByL1Addr {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetBridgesByL1Addr
|
|
26
|
+
*/
|
|
27
|
+
l1_address: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the ReqGetBridgesByL1Addr interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfReqGetBridgesByL1Addr(value: object): value is ReqGetBridgesByL1Addr {
|
|
34
|
+
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function ReqGetBridgesByL1AddrFromJSON(json: any): ReqGetBridgesByL1Addr {
|
|
39
|
+
return ReqGetBridgesByL1AddrFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function ReqGetBridgesByL1AddrFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetBridgesByL1Addr {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'l1_address': json['l1_address'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function ReqGetBridgesByL1AddrToJSON(value?: ReqGetBridgesByL1Addr | null): any {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
|
|
58
|
+
'l1_address': value['l1_address'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
@@ -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 { Bridge } from './Bridge';
|
|
17
|
+
import {
|
|
18
|
+
BridgeFromJSON,
|
|
19
|
+
BridgeFromJSONTyped,
|
|
20
|
+
BridgeToJSON,
|
|
21
|
+
} from './Bridge';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface RespGetBridgesByL1Addr
|
|
27
|
+
*/
|
|
28
|
+
export interface RespGetBridgesByL1Addr {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof RespGetBridgesByL1Addr
|
|
33
|
+
*/
|
|
34
|
+
code: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof RespGetBridgesByL1Addr
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {Array<Bridge>}
|
|
44
|
+
* @memberof RespGetBridgesByL1Addr
|
|
45
|
+
*/
|
|
46
|
+
bridges: Array<Bridge>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the RespGetBridgesByL1Addr interface.
|
|
51
|
+
*/
|
|
52
|
+
export function instanceOfRespGetBridgesByL1Addr(value: object): value is RespGetBridgesByL1Addr {
|
|
53
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
54
|
+
if (!('bridges' in value) || value['bridges'] === undefined) return false;
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function RespGetBridgesByL1AddrFromJSON(json: any): RespGetBridgesByL1Addr {
|
|
59
|
+
return RespGetBridgesByL1AddrFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function RespGetBridgesByL1AddrFromJSONTyped(json: any, ignoreDiscriminator: boolean): RespGetBridgesByL1Addr {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'code': json['code'],
|
|
69
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
70
|
+
'bridges': ((json['bridges'] as Array<any>).map(BridgeFromJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function RespGetBridgesByL1AddrToJSON(value?: RespGetBridgesByL1Addr | null): any {
|
|
75
|
+
if (value == null) {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
|
|
80
|
+
'code': value['code'],
|
|
81
|
+
'message': value['message'],
|
|
82
|
+
'bridges': ((value['bridges'] as Array<any>).map(BridgeToJSON)),
|
|
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 RespGetIsNextBridgeFast
|
|
20
|
+
*/
|
|
21
|
+
export interface RespGetIsNextBridgeFast {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof RespGetIsNextBridgeFast
|
|
26
|
+
*/
|
|
27
|
+
code: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof RespGetIsNextBridgeFast
|
|
32
|
+
*/
|
|
33
|
+
message?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
* @memberof RespGetIsNextBridgeFast
|
|
38
|
+
*/
|
|
39
|
+
is_next_bridge_fast: boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the RespGetIsNextBridgeFast interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfRespGetIsNextBridgeFast(value: object): value is RespGetIsNextBridgeFast {
|
|
46
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
47
|
+
if (!('is_next_bridge_fast' in value) || value['is_next_bridge_fast'] === undefined) return false;
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function RespGetIsNextBridgeFastFromJSON(json: any): RespGetIsNextBridgeFast {
|
|
52
|
+
return RespGetIsNextBridgeFastFromJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function RespGetIsNextBridgeFastFromJSONTyped(json: any, ignoreDiscriminator: boolean): RespGetIsNextBridgeFast {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
|
|
61
|
+
'code': json['code'],
|
|
62
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
63
|
+
'is_next_bridge_fast': json['is_next_bridge_fast'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function RespGetIsNextBridgeFastToJSON(value?: RespGetIsNextBridgeFast | null): any {
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
|
|
73
|
+
'code': value['code'],
|
|
74
|
+
'message': value['message'],
|
|
75
|
+
'is_next_bridge_fast': value['is_next_bridge_fast'],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
package/models/index.ts
CHANGED
|
@@ -16,6 +16,7 @@ export * from './Announcements';
|
|
|
16
16
|
export * from './ApiKey';
|
|
17
17
|
export * from './Block';
|
|
18
18
|
export * from './Blocks';
|
|
19
|
+
export * from './Bridge';
|
|
19
20
|
export * from './BridgeSupportedNetwork';
|
|
20
21
|
export * from './BridgeSupportedNetworks';
|
|
21
22
|
export * from './Candlestick';
|
|
@@ -87,6 +88,7 @@ export * from './ReqGetAccountPnL';
|
|
|
87
88
|
export * from './ReqGetAccountTxs';
|
|
88
89
|
export * from './ReqGetBlock';
|
|
89
90
|
export * from './ReqGetBlockTxs';
|
|
91
|
+
export * from './ReqGetBridgesByL1Addr';
|
|
90
92
|
export * from './ReqGetByAccount';
|
|
91
93
|
export * from './ReqGetCandlesticks';
|
|
92
94
|
export * from './ReqGetDepositHistory';
|
|
@@ -117,8 +119,10 @@ export * from './ReqGetTx';
|
|
|
117
119
|
export * from './ReqGetWithdrawHistory';
|
|
118
120
|
export * from './ReqIsWhitelisted';
|
|
119
121
|
export * from './RespChangeAccountTier';
|
|
122
|
+
export * from './RespGetBridgesByL1Addr';
|
|
120
123
|
export * from './RespGetFastBridgeInfo';
|
|
121
124
|
export * from './RespGetFastwithdrawalInfo';
|
|
125
|
+
export * from './RespGetIsNextBridgeFast';
|
|
122
126
|
export * from './RespPublicPoolsMetadata';
|
|
123
127
|
export * from './RespSendTx';
|
|
124
128
|
export * from './RespSendTxBatch';
|
package/openapi.json
CHANGED
|
@@ -720,6 +720,76 @@
|
|
|
720
720
|
"description": "Get blocks"
|
|
721
721
|
}
|
|
722
722
|
},
|
|
723
|
+
"/api/v1/bridges": {
|
|
724
|
+
"get": {
|
|
725
|
+
"summary": "bridges",
|
|
726
|
+
"operationId": "bridges",
|
|
727
|
+
"responses": {
|
|
728
|
+
"200": {
|
|
729
|
+
"description": "A successful response.",
|
|
730
|
+
"schema": {
|
|
731
|
+
"$ref": "#/definitions/RespGetBridgesByL1Addr"
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
"400": {
|
|
735
|
+
"description": "Bad request",
|
|
736
|
+
"schema": {
|
|
737
|
+
"$ref": "#/definitions/ResultCode"
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
},
|
|
741
|
+
"parameters": [
|
|
742
|
+
{
|
|
743
|
+
"name": "l1_address",
|
|
744
|
+
"in": "query",
|
|
745
|
+
"required": true,
|
|
746
|
+
"type": "string"
|
|
747
|
+
}
|
|
748
|
+
],
|
|
749
|
+
"tags": [
|
|
750
|
+
"bridge"
|
|
751
|
+
],
|
|
752
|
+
"consumes": [
|
|
753
|
+
"multipart/form-data"
|
|
754
|
+
],
|
|
755
|
+
"description": "Get bridges for given l1 address"
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
"/api/v1/bridges/isNextBridgeFast": {
|
|
759
|
+
"get": {
|
|
760
|
+
"summary": "bridges_isNextBridgeFast",
|
|
761
|
+
"operationId": "bridges_isNextBridgeFast",
|
|
762
|
+
"responses": {
|
|
763
|
+
"200": {
|
|
764
|
+
"description": "A successful response.",
|
|
765
|
+
"schema": {
|
|
766
|
+
"$ref": "#/definitions/RespGetIsNextBridgeFast"
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
"400": {
|
|
770
|
+
"description": "Bad request",
|
|
771
|
+
"schema": {
|
|
772
|
+
"$ref": "#/definitions/ResultCode"
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
},
|
|
776
|
+
"parameters": [
|
|
777
|
+
{
|
|
778
|
+
"name": "l1_address",
|
|
779
|
+
"in": "query",
|
|
780
|
+
"required": true,
|
|
781
|
+
"type": "string"
|
|
782
|
+
}
|
|
783
|
+
],
|
|
784
|
+
"tags": [
|
|
785
|
+
"bridge"
|
|
786
|
+
],
|
|
787
|
+
"consumes": [
|
|
788
|
+
"multipart/form-data"
|
|
789
|
+
],
|
|
790
|
+
"description": "Get if next bridge is fast"
|
|
791
|
+
}
|
|
792
|
+
},
|
|
723
793
|
"/api/v1/candlesticks": {
|
|
724
794
|
"get": {
|
|
725
795
|
"summary": "candlesticks",
|
|
@@ -3774,6 +3844,93 @@
|
|
|
3774
3844
|
"blocks"
|
|
3775
3845
|
]
|
|
3776
3846
|
},
|
|
3847
|
+
"Bridge": {
|
|
3848
|
+
"type": "object",
|
|
3849
|
+
"properties": {
|
|
3850
|
+
"id": {
|
|
3851
|
+
"type": "integer",
|
|
3852
|
+
"format": "int64"
|
|
3853
|
+
},
|
|
3854
|
+
"version": {
|
|
3855
|
+
"type": "integer",
|
|
3856
|
+
"format": "int32",
|
|
3857
|
+
"enum": [
|
|
3858
|
+
"1",
|
|
3859
|
+
"2"
|
|
3860
|
+
]
|
|
3861
|
+
},
|
|
3862
|
+
"source": {
|
|
3863
|
+
"type": "string",
|
|
3864
|
+
"example": "Arbitrum"
|
|
3865
|
+
},
|
|
3866
|
+
"source_chain_id": {
|
|
3867
|
+
"type": "string",
|
|
3868
|
+
"example": "42161"
|
|
3869
|
+
},
|
|
3870
|
+
"fast_bridge_tx_hash": {
|
|
3871
|
+
"type": "string",
|
|
3872
|
+
"example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
|
3873
|
+
},
|
|
3874
|
+
"batch_claim_tx_hash": {
|
|
3875
|
+
"type": "string",
|
|
3876
|
+
"example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
|
3877
|
+
},
|
|
3878
|
+
"cctp_burn_tx_hash": {
|
|
3879
|
+
"type": "string",
|
|
3880
|
+
"example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
|
3881
|
+
},
|
|
3882
|
+
"amount": {
|
|
3883
|
+
"type": "string"
|
|
3884
|
+
},
|
|
3885
|
+
"intent_address": {
|
|
3886
|
+
"type": "string"
|
|
3887
|
+
},
|
|
3888
|
+
"status": {
|
|
3889
|
+
"type": "string",
|
|
3890
|
+
"enum": [
|
|
3891
|
+
"pending",
|
|
3892
|
+
"bridging",
|
|
3893
|
+
"completed"
|
|
3894
|
+
]
|
|
3895
|
+
},
|
|
3896
|
+
"step": {
|
|
3897
|
+
"type": "string"
|
|
3898
|
+
},
|
|
3899
|
+
"description": {
|
|
3900
|
+
"type": "string"
|
|
3901
|
+
},
|
|
3902
|
+
"created_at": {
|
|
3903
|
+
"type": "integer",
|
|
3904
|
+
"format": "int64"
|
|
3905
|
+
},
|
|
3906
|
+
"updated_at": {
|
|
3907
|
+
"type": "integer",
|
|
3908
|
+
"format": "int64"
|
|
3909
|
+
},
|
|
3910
|
+
"is_external_deposit": {
|
|
3911
|
+
"type": "boolean",
|
|
3912
|
+
"format": "boolean"
|
|
3913
|
+
}
|
|
3914
|
+
},
|
|
3915
|
+
"title": "Bridge",
|
|
3916
|
+
"required": [
|
|
3917
|
+
"id",
|
|
3918
|
+
"version",
|
|
3919
|
+
"source",
|
|
3920
|
+
"source_chain_id",
|
|
3921
|
+
"fast_bridge_tx_hash",
|
|
3922
|
+
"batch_claim_tx_hash",
|
|
3923
|
+
"cctp_burn_tx_hash",
|
|
3924
|
+
"amount",
|
|
3925
|
+
"intent_address",
|
|
3926
|
+
"status",
|
|
3927
|
+
"step",
|
|
3928
|
+
"description",
|
|
3929
|
+
"created_at",
|
|
3930
|
+
"updated_at",
|
|
3931
|
+
"is_external_deposit"
|
|
3932
|
+
]
|
|
3933
|
+
},
|
|
3777
3934
|
"BridgeSupportedNetwork": {
|
|
3778
3935
|
"type": "object",
|
|
3779
3936
|
"properties": {
|
|
@@ -6837,6 +6994,18 @@
|
|
|
6837
6994
|
"value"
|
|
6838
6995
|
]
|
|
6839
6996
|
},
|
|
6997
|
+
"ReqGetBridgesByL1Addr": {
|
|
6998
|
+
"type": "object",
|
|
6999
|
+
"properties": {
|
|
7000
|
+
"l1_address": {
|
|
7001
|
+
"type": "string"
|
|
7002
|
+
}
|
|
7003
|
+
},
|
|
7004
|
+
"title": "ReqGetBridgesByL1Addr",
|
|
7005
|
+
"required": [
|
|
7006
|
+
"l1_address"
|
|
7007
|
+
]
|
|
7008
|
+
},
|
|
6840
7009
|
"ReqGetByAccount": {
|
|
6841
7010
|
"type": "object",
|
|
6842
7011
|
"properties": {
|
|
@@ -7638,6 +7807,30 @@
|
|
|
7638
7807
|
"code"
|
|
7639
7808
|
]
|
|
7640
7809
|
},
|
|
7810
|
+
"RespGetBridgesByL1Addr": {
|
|
7811
|
+
"type": "object",
|
|
7812
|
+
"properties": {
|
|
7813
|
+
"code": {
|
|
7814
|
+
"type": "integer",
|
|
7815
|
+
"format": "int32",
|
|
7816
|
+
"example": "200"
|
|
7817
|
+
},
|
|
7818
|
+
"message": {
|
|
7819
|
+
"type": "string"
|
|
7820
|
+
},
|
|
7821
|
+
"bridges": {
|
|
7822
|
+
"type": "array",
|
|
7823
|
+
"items": {
|
|
7824
|
+
"$ref": "#/definitions/Bridge"
|
|
7825
|
+
}
|
|
7826
|
+
}
|
|
7827
|
+
},
|
|
7828
|
+
"title": "RespGetBridgesByL1Addr",
|
|
7829
|
+
"required": [
|
|
7830
|
+
"code",
|
|
7831
|
+
"bridges"
|
|
7832
|
+
]
|
|
7833
|
+
},
|
|
7641
7834
|
"RespGetFastBridgeInfo": {
|
|
7642
7835
|
"type": "object",
|
|
7643
7836
|
"properties": {
|
|
@@ -7689,6 +7882,28 @@
|
|
|
7689
7882
|
"max_withdrawal_amount"
|
|
7690
7883
|
]
|
|
7691
7884
|
},
|
|
7885
|
+
"RespGetIsNextBridgeFast": {
|
|
7886
|
+
"type": "object",
|
|
7887
|
+
"properties": {
|
|
7888
|
+
"code": {
|
|
7889
|
+
"type": "integer",
|
|
7890
|
+
"format": "int32",
|
|
7891
|
+
"example": "200"
|
|
7892
|
+
},
|
|
7893
|
+
"message": {
|
|
7894
|
+
"type": "string"
|
|
7895
|
+
},
|
|
7896
|
+
"is_next_bridge_fast": {
|
|
7897
|
+
"type": "boolean",
|
|
7898
|
+
"format": "boolean"
|
|
7899
|
+
}
|
|
7900
|
+
},
|
|
7901
|
+
"title": "RespGetIsNextBridgeFast",
|
|
7902
|
+
"required": [
|
|
7903
|
+
"code",
|
|
7904
|
+
"is_next_bridge_fast"
|
|
7905
|
+
]
|
|
7906
|
+
},
|
|
7692
7907
|
"RespPublicPoolsMetadata": {
|
|
7693
7908
|
"type": "object",
|
|
7694
7909
|
"properties": {
|