zklighter-perps 1.0.165 → 1.0.166
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 +169 -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 +196 -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,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
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface Bridge
|
|
20
|
+
*/
|
|
21
|
+
export interface Bridge {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof Bridge
|
|
26
|
+
*/
|
|
27
|
+
source: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof Bridge
|
|
32
|
+
*/
|
|
33
|
+
source_chain_id: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof Bridge
|
|
38
|
+
*/
|
|
39
|
+
fast_bridge_tx_hash: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof Bridge
|
|
44
|
+
*/
|
|
45
|
+
batch_claim_tx_hash: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof Bridge
|
|
50
|
+
*/
|
|
51
|
+
cctp_burn_tx_hash: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof Bridge
|
|
56
|
+
*/
|
|
57
|
+
amount: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof Bridge
|
|
62
|
+
*/
|
|
63
|
+
intent_address: string;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof Bridge
|
|
68
|
+
*/
|
|
69
|
+
status: string;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof Bridge
|
|
74
|
+
*/
|
|
75
|
+
step: string;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {string}
|
|
79
|
+
* @memberof Bridge
|
|
80
|
+
*/
|
|
81
|
+
description: string;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {number}
|
|
85
|
+
* @memberof Bridge
|
|
86
|
+
*/
|
|
87
|
+
created_at: number;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {number}
|
|
91
|
+
* @memberof Bridge
|
|
92
|
+
*/
|
|
93
|
+
updated_at: number;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {boolean}
|
|
97
|
+
* @memberof Bridge
|
|
98
|
+
*/
|
|
99
|
+
is_external_deposit: boolean;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Check if a given object implements the Bridge interface.
|
|
104
|
+
*/
|
|
105
|
+
export function instanceOfBridge(value: object): value is Bridge {
|
|
106
|
+
if (!('source' in value) || value['source'] === undefined) return false;
|
|
107
|
+
if (!('source_chain_id' in value) || value['source_chain_id'] === undefined) return false;
|
|
108
|
+
if (!('fast_bridge_tx_hash' in value) || value['fast_bridge_tx_hash'] === undefined) return false;
|
|
109
|
+
if (!('batch_claim_tx_hash' in value) || value['batch_claim_tx_hash'] === undefined) return false;
|
|
110
|
+
if (!('cctp_burn_tx_hash' in value) || value['cctp_burn_tx_hash'] === undefined) return false;
|
|
111
|
+
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
112
|
+
if (!('intent_address' in value) || value['intent_address'] === undefined) return false;
|
|
113
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
114
|
+
if (!('step' in value) || value['step'] === undefined) return false;
|
|
115
|
+
if (!('description' in value) || value['description'] === undefined) return false;
|
|
116
|
+
if (!('created_at' in value) || value['created_at'] === undefined) return false;
|
|
117
|
+
if (!('updated_at' in value) || value['updated_at'] === undefined) return false;
|
|
118
|
+
if (!('is_external_deposit' in value) || value['is_external_deposit'] === undefined) return false;
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function BridgeFromJSON(json: any): Bridge {
|
|
123
|
+
return BridgeFromJSONTyped(json, false);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function BridgeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Bridge {
|
|
127
|
+
if (json == null) {
|
|
128
|
+
return json;
|
|
129
|
+
}
|
|
130
|
+
return {
|
|
131
|
+
|
|
132
|
+
'source': json['source'],
|
|
133
|
+
'source_chain_id': json['source_chain_id'],
|
|
134
|
+
'fast_bridge_tx_hash': json['fast_bridge_tx_hash'],
|
|
135
|
+
'batch_claim_tx_hash': json['batch_claim_tx_hash'],
|
|
136
|
+
'cctp_burn_tx_hash': json['cctp_burn_tx_hash'],
|
|
137
|
+
'amount': json['amount'],
|
|
138
|
+
'intent_address': json['intent_address'],
|
|
139
|
+
'status': json['status'],
|
|
140
|
+
'step': json['step'],
|
|
141
|
+
'description': json['description'],
|
|
142
|
+
'created_at': json['created_at'],
|
|
143
|
+
'updated_at': json['updated_at'],
|
|
144
|
+
'is_external_deposit': json['is_external_deposit'],
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export function BridgeToJSON(value?: Bridge | null): any {
|
|
149
|
+
if (value == null) {
|
|
150
|
+
return value;
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
|
|
154
|
+
'source': value['source'],
|
|
155
|
+
'source_chain_id': value['source_chain_id'],
|
|
156
|
+
'fast_bridge_tx_hash': value['fast_bridge_tx_hash'],
|
|
157
|
+
'batch_claim_tx_hash': value['batch_claim_tx_hash'],
|
|
158
|
+
'cctp_burn_tx_hash': value['cctp_burn_tx_hash'],
|
|
159
|
+
'amount': value['amount'],
|
|
160
|
+
'intent_address': value['intent_address'],
|
|
161
|
+
'status': value['status'],
|
|
162
|
+
'step': value['step'],
|
|
163
|
+
'description': value['description'],
|
|
164
|
+
'created_at': value['created_at'],
|
|
165
|
+
'updated_at': value['updated_at'],
|
|
166
|
+
'is_external_deposit': value['is_external_deposit'],
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
|
|
@@ -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,74 @@
|
|
|
3774
3844
|
"blocks"
|
|
3775
3845
|
]
|
|
3776
3846
|
},
|
|
3847
|
+
"Bridge": {
|
|
3848
|
+
"type": "object",
|
|
3849
|
+
"properties": {
|
|
3850
|
+
"source": {
|
|
3851
|
+
"type": "string",
|
|
3852
|
+
"example": "Arbitrum"
|
|
3853
|
+
},
|
|
3854
|
+
"source_chain_id": {
|
|
3855
|
+
"type": "string",
|
|
3856
|
+
"example": "42161"
|
|
3857
|
+
},
|
|
3858
|
+
"fast_bridge_tx_hash": {
|
|
3859
|
+
"type": "string",
|
|
3860
|
+
"example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
|
3861
|
+
},
|
|
3862
|
+
"batch_claim_tx_hash": {
|
|
3863
|
+
"type": "string",
|
|
3864
|
+
"example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
|
3865
|
+
},
|
|
3866
|
+
"cctp_burn_tx_hash": {
|
|
3867
|
+
"type": "string",
|
|
3868
|
+
"example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
|
3869
|
+
},
|
|
3870
|
+
"amount": {
|
|
3871
|
+
"type": "string"
|
|
3872
|
+
},
|
|
3873
|
+
"intent_address": {
|
|
3874
|
+
"type": "string"
|
|
3875
|
+
},
|
|
3876
|
+
"status": {
|
|
3877
|
+
"type": "string"
|
|
3878
|
+
},
|
|
3879
|
+
"step": {
|
|
3880
|
+
"type": "string"
|
|
3881
|
+
},
|
|
3882
|
+
"description": {
|
|
3883
|
+
"type": "string"
|
|
3884
|
+
},
|
|
3885
|
+
"created_at": {
|
|
3886
|
+
"type": "integer",
|
|
3887
|
+
"format": "int64"
|
|
3888
|
+
},
|
|
3889
|
+
"updated_at": {
|
|
3890
|
+
"type": "integer",
|
|
3891
|
+
"format": "int64"
|
|
3892
|
+
},
|
|
3893
|
+
"is_external_deposit": {
|
|
3894
|
+
"type": "boolean",
|
|
3895
|
+
"format": "boolean"
|
|
3896
|
+
}
|
|
3897
|
+
},
|
|
3898
|
+
"title": "Bridge",
|
|
3899
|
+
"required": [
|
|
3900
|
+
"source",
|
|
3901
|
+
"source_chain_id",
|
|
3902
|
+
"fast_bridge_tx_hash",
|
|
3903
|
+
"batch_claim_tx_hash",
|
|
3904
|
+
"cctp_burn_tx_hash",
|
|
3905
|
+
"amount",
|
|
3906
|
+
"intent_address",
|
|
3907
|
+
"status",
|
|
3908
|
+
"step",
|
|
3909
|
+
"description",
|
|
3910
|
+
"created_at",
|
|
3911
|
+
"updated_at",
|
|
3912
|
+
"is_external_deposit"
|
|
3913
|
+
]
|
|
3914
|
+
},
|
|
3777
3915
|
"BridgeSupportedNetwork": {
|
|
3778
3916
|
"type": "object",
|
|
3779
3917
|
"properties": {
|
|
@@ -6837,6 +6975,18 @@
|
|
|
6837
6975
|
"value"
|
|
6838
6976
|
]
|
|
6839
6977
|
},
|
|
6978
|
+
"ReqGetBridgesByL1Addr": {
|
|
6979
|
+
"type": "object",
|
|
6980
|
+
"properties": {
|
|
6981
|
+
"l1_address": {
|
|
6982
|
+
"type": "string"
|
|
6983
|
+
}
|
|
6984
|
+
},
|
|
6985
|
+
"title": "ReqGetBridgesByL1Addr",
|
|
6986
|
+
"required": [
|
|
6987
|
+
"l1_address"
|
|
6988
|
+
]
|
|
6989
|
+
},
|
|
6840
6990
|
"ReqGetByAccount": {
|
|
6841
6991
|
"type": "object",
|
|
6842
6992
|
"properties": {
|
|
@@ -7638,6 +7788,30 @@
|
|
|
7638
7788
|
"code"
|
|
7639
7789
|
]
|
|
7640
7790
|
},
|
|
7791
|
+
"RespGetBridgesByL1Addr": {
|
|
7792
|
+
"type": "object",
|
|
7793
|
+
"properties": {
|
|
7794
|
+
"code": {
|
|
7795
|
+
"type": "integer",
|
|
7796
|
+
"format": "int32",
|
|
7797
|
+
"example": "200"
|
|
7798
|
+
},
|
|
7799
|
+
"message": {
|
|
7800
|
+
"type": "string"
|
|
7801
|
+
},
|
|
7802
|
+
"bridges": {
|
|
7803
|
+
"type": "array",
|
|
7804
|
+
"items": {
|
|
7805
|
+
"$ref": "#/definitions/Bridge"
|
|
7806
|
+
}
|
|
7807
|
+
}
|
|
7808
|
+
},
|
|
7809
|
+
"title": "RespGetBridgesByL1Addr",
|
|
7810
|
+
"required": [
|
|
7811
|
+
"code",
|
|
7812
|
+
"bridges"
|
|
7813
|
+
]
|
|
7814
|
+
},
|
|
7641
7815
|
"RespGetFastBridgeInfo": {
|
|
7642
7816
|
"type": "object",
|
|
7643
7817
|
"properties": {
|
|
@@ -7689,6 +7863,28 @@
|
|
|
7689
7863
|
"max_withdrawal_amount"
|
|
7690
7864
|
]
|
|
7691
7865
|
},
|
|
7866
|
+
"RespGetIsNextBridgeFast": {
|
|
7867
|
+
"type": "object",
|
|
7868
|
+
"properties": {
|
|
7869
|
+
"code": {
|
|
7870
|
+
"type": "integer",
|
|
7871
|
+
"format": "int32",
|
|
7872
|
+
"example": "200"
|
|
7873
|
+
},
|
|
7874
|
+
"message": {
|
|
7875
|
+
"type": "string"
|
|
7876
|
+
},
|
|
7877
|
+
"is_next_bridge_fast": {
|
|
7878
|
+
"type": "boolean",
|
|
7879
|
+
"format": "boolean"
|
|
7880
|
+
}
|
|
7881
|
+
},
|
|
7882
|
+
"title": "RespGetIsNextBridgeFast",
|
|
7883
|
+
"required": [
|
|
7884
|
+
"code",
|
|
7885
|
+
"is_next_bridge_fast"
|
|
7886
|
+
]
|
|
7887
|
+
},
|
|
7692
7888
|
"RespPublicPoolsMetadata": {
|
|
7693
7889
|
"type": "object",
|
|
7694
7890
|
"properties": {
|