@alephium/web3 1.0.1 → 1.0.2-rc.2
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/dist/alephium-web3.min.js +1 -1
- package/dist/alephium-web3.min.js.map +1 -1
- package/dist/src/api/api-explorer.d.ts +814 -641
- package/dist/src/api/api-explorer.js +337 -310
- package/dist/src/constants.d.ts +2 -0
- package/dist/src/constants.js +3 -1
- package/package.json +2 -2
- package/src/api/api-explorer.ts +1022 -846
- package/src/constants.ts +2 -0
package/src/api/api-explorer.ts
CHANGED
|
@@ -9,40 +9,57 @@
|
|
|
9
9
|
* ---------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
/** @format
|
|
18
|
-
|
|
19
|
-
inputs?: Input[]
|
|
20
|
-
outputs?: Output[]
|
|
12
|
+
/** Val */
|
|
13
|
+
export type Val = ValAddress | ValArray | ValBool | ValByteVec | ValI256 | ValU256
|
|
14
|
+
|
|
15
|
+
/** ContractOutput */
|
|
16
|
+
export interface ContractOutput {
|
|
17
|
+
/** @format address */
|
|
18
|
+
address: string
|
|
21
19
|
/** @format int32 */
|
|
22
|
-
|
|
20
|
+
hint: number
|
|
21
|
+
/** @format 32-byte-hash */
|
|
22
|
+
spent?: string
|
|
23
23
|
/** @format uint256 */
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
attoAlphAmount: string
|
|
25
|
+
tokens?: Token[]
|
|
26
|
+
fixedOutput: boolean
|
|
27
27
|
type: string
|
|
28
|
+
/** @format 32-byte-hash */
|
|
29
|
+
key: string
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
/** IntervalType */
|
|
33
|
+
export enum IntervalType {
|
|
34
|
+
Daily = 'daily',
|
|
35
|
+
Hourly = 'hourly',
|
|
36
|
+
Weekly = 'weekly'
|
|
35
37
|
}
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
balance: string
|
|
39
|
+
/** Token */
|
|
40
|
+
export interface Token {
|
|
40
41
|
/** @format uint256 */
|
|
41
|
-
|
|
42
|
-
/** @format
|
|
43
|
-
|
|
42
|
+
amount: string
|
|
43
|
+
/** @format 32-byte-hash */
|
|
44
|
+
id: string
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** ContractLivenessLocation */
|
|
48
|
+
export interface ContractLivenessLocation {
|
|
49
|
+
/** @format block-hash */
|
|
50
|
+
blockHash: string
|
|
51
|
+
/** @format 32-byte-hash */
|
|
52
|
+
txHash: string
|
|
53
|
+
/** @format int64 */
|
|
54
|
+
timestamp: number
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** NonStandard */
|
|
58
|
+
export interface NonStandard {
|
|
59
|
+
type: string
|
|
44
60
|
}
|
|
45
61
|
|
|
62
|
+
/** AddressTokenBalance */
|
|
46
63
|
export interface AddressTokenBalance {
|
|
47
64
|
/** @format 32-byte-hash */
|
|
48
65
|
tokenId: string
|
|
@@ -52,421 +69,532 @@ export interface AddressTokenBalance {
|
|
|
52
69
|
lockedBalance: string
|
|
53
70
|
}
|
|
54
71
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface AssetOutput {
|
|
72
|
+
/** OutputRef */
|
|
73
|
+
export interface OutputRef {
|
|
60
74
|
/** @format int32 */
|
|
61
75
|
hint: number
|
|
62
76
|
/** @format 32-byte-hash */
|
|
63
77
|
key: string
|
|
64
|
-
|
|
65
|
-
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Input */
|
|
81
|
+
export interface Input {
|
|
66
82
|
/** @format address */
|
|
67
|
-
address
|
|
68
|
-
|
|
69
|
-
/** @format int64 */
|
|
70
|
-
lockTime?: number
|
|
83
|
+
address?: string
|
|
84
|
+
contractInput: boolean
|
|
71
85
|
/** @format hex-string */
|
|
72
|
-
|
|
86
|
+
unlockScript?: string
|
|
87
|
+
/** @format uint256 */
|
|
88
|
+
attoAlphAmount?: string
|
|
89
|
+
tokens?: Token[]
|
|
73
90
|
/** @format 32-byte-hash */
|
|
74
|
-
|
|
75
|
-
|
|
91
|
+
txHashRef?: string
|
|
92
|
+
outputRef: OutputRef
|
|
76
93
|
}
|
|
77
94
|
|
|
78
|
-
|
|
79
|
-
|
|
95
|
+
/** PerChainCount */
|
|
96
|
+
export interface PerChainCount {
|
|
97
|
+
/** @format int32 */
|
|
98
|
+
chainFrom: number
|
|
99
|
+
/** @format int32 */
|
|
100
|
+
chainTo: number
|
|
101
|
+
/** @format int64 */
|
|
102
|
+
count: number
|
|
80
103
|
}
|
|
81
104
|
|
|
82
|
-
|
|
105
|
+
/** Unknown */
|
|
106
|
+
export interface Unknown {
|
|
107
|
+
id: string
|
|
108
|
+
type: string
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** BlockEntry */
|
|
112
|
+
export interface BlockEntry {
|
|
83
113
|
/** @format block-hash */
|
|
84
|
-
|
|
85
|
-
/** @format int64 */
|
|
86
|
-
timestamp: number
|
|
114
|
+
parent?: string
|
|
87
115
|
/** @format group-index */
|
|
88
116
|
chainFrom: number
|
|
117
|
+
/** @format 32-byte-hash */
|
|
118
|
+
depStateHash: string
|
|
119
|
+
deps?: string[]
|
|
120
|
+
/** @format hex-string */
|
|
121
|
+
nonce: string
|
|
122
|
+
version: number
|
|
123
|
+
/** @format hex-string */
|
|
124
|
+
target: string
|
|
125
|
+
mainChain: boolean
|
|
126
|
+
/** @format 32-byte-hash */
|
|
127
|
+
txsHash: string
|
|
89
128
|
/** @format group-index */
|
|
90
129
|
chainTo: number
|
|
91
|
-
|
|
92
|
-
|
|
130
|
+
ghostUncles?: GhostUncle[]
|
|
131
|
+
/** @format bigint */
|
|
132
|
+
hashRate: string
|
|
93
133
|
/** @format int32 */
|
|
94
134
|
txNumber: number
|
|
95
|
-
|
|
135
|
+
/** @format block-hash */
|
|
136
|
+
hash: string
|
|
137
|
+
/** @format int32 */
|
|
138
|
+
height: number
|
|
139
|
+
/** @format int64 */
|
|
140
|
+
timestamp: number
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** ContractParent */
|
|
144
|
+
export interface ContractParent {
|
|
145
|
+
/** @format address */
|
|
146
|
+
parent?: string
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/** ServiceUnavailable */
|
|
150
|
+
export interface ServiceUnavailable {
|
|
151
|
+
detail: string
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/** ValI256 */
|
|
155
|
+
export interface ValI256 {
|
|
156
|
+
type: string
|
|
96
157
|
/** @format bigint */
|
|
97
|
-
|
|
158
|
+
value: string
|
|
98
159
|
}
|
|
99
160
|
|
|
161
|
+
/** ContractLiveness */
|
|
100
162
|
export interface ContractLiveness {
|
|
101
163
|
/** @format address */
|
|
102
164
|
parent?: string
|
|
103
|
-
creation: ContractLivenessLocation
|
|
104
|
-
destruction?: ContractLivenessLocation
|
|
105
165
|
interfaceId?: StdInterfaceId
|
|
166
|
+
destruction?: ContractLivenessLocation
|
|
167
|
+
creation: ContractLivenessLocation
|
|
106
168
|
}
|
|
107
169
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
txHash: string
|
|
170
|
+
/** AssetOutput */
|
|
171
|
+
export interface AssetOutput {
|
|
172
|
+
/** @format address */
|
|
173
|
+
address: string
|
|
113
174
|
/** @format int64 */
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export interface ContractOutput {
|
|
175
|
+
lockTime?: number
|
|
118
176
|
/** @format int32 */
|
|
119
177
|
hint: number
|
|
120
178
|
/** @format 32-byte-hash */
|
|
121
|
-
|
|
179
|
+
spent?: string
|
|
122
180
|
/** @format uint256 */
|
|
123
181
|
attoAlphAmount: string
|
|
124
|
-
/** @format address */
|
|
125
|
-
address: string
|
|
126
182
|
tokens?: Token[]
|
|
127
|
-
|
|
128
|
-
spent?: string
|
|
183
|
+
fixedOutput: boolean
|
|
129
184
|
type: string
|
|
185
|
+
/** @format hex-string */
|
|
186
|
+
message?: string
|
|
187
|
+
/** @format 32-byte-hash */
|
|
188
|
+
key: string
|
|
130
189
|
}
|
|
131
190
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
191
|
+
/** NFT */
|
|
192
|
+
export interface NFT {
|
|
193
|
+
type: string
|
|
135
194
|
}
|
|
136
195
|
|
|
137
|
-
|
|
196
|
+
/** AcceptedTransaction */
|
|
197
|
+
export interface AcceptedTransaction {
|
|
198
|
+
outputs?: Output[]
|
|
138
199
|
/** @format block-hash */
|
|
139
200
|
blockHash: string
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
contractAddress: string
|
|
144
|
-
/** @format address */
|
|
145
|
-
inputAddress?: string
|
|
146
|
-
/** @format int32 */
|
|
147
|
-
eventIndex: number
|
|
148
|
-
fields?: Val[]
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export interface ExplorerInfo {
|
|
152
|
-
releaseVersion: string
|
|
153
|
-
commit: string
|
|
154
|
-
/** @format int32 */
|
|
155
|
-
migrationsVersion: number
|
|
156
|
-
/** @format int64 */
|
|
157
|
-
lastFinalizedInputTime: number
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export interface FungibleToken {
|
|
201
|
+
scriptSignatures?: string[]
|
|
202
|
+
inputs?: Input[]
|
|
203
|
+
scriptExecutionOk: boolean
|
|
161
204
|
type: string
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
205
|
+
scriptOpt?: string
|
|
206
|
+
version: number
|
|
207
|
+
coinbase: boolean
|
|
208
|
+
inputSignatures?: string[]
|
|
209
|
+
/** @format int32 */
|
|
210
|
+
gasAmount: number
|
|
211
|
+
networkId: number
|
|
165
212
|
/** @format 32-byte-hash */
|
|
166
|
-
|
|
167
|
-
symbol: string
|
|
168
|
-
name: string
|
|
213
|
+
hash: string
|
|
169
214
|
/** @format uint256 */
|
|
170
|
-
|
|
215
|
+
gasPrice: string
|
|
216
|
+
/** @format int64 */
|
|
217
|
+
timestamp: number
|
|
171
218
|
}
|
|
172
219
|
|
|
173
|
-
|
|
220
|
+
/** TokenSupply */
|
|
221
|
+
export interface TokenSupply {
|
|
222
|
+
/** @format uint256 */
|
|
223
|
+
circulating: string
|
|
224
|
+
/** @format uint256 */
|
|
225
|
+
total: string
|
|
226
|
+
/** @format uint256 */
|
|
227
|
+
reserved: string
|
|
228
|
+
/** @format uint256 */
|
|
229
|
+
maximum: string
|
|
230
|
+
/** @format uint256 */
|
|
231
|
+
locked: string
|
|
174
232
|
/** @format int64 */
|
|
175
233
|
timestamp: number
|
|
176
|
-
hashrate: number
|
|
177
|
-
value: number
|
|
178
234
|
}
|
|
179
235
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
236
|
+
/** PendingTransaction */
|
|
237
|
+
export interface PendingTransaction {
|
|
238
|
+
outputs?: Output[]
|
|
239
|
+
/** @format group-index */
|
|
240
|
+
chainFrom: number
|
|
241
|
+
/** @format int64 */
|
|
242
|
+
lastSeen: number
|
|
243
|
+
/** @format group-index */
|
|
244
|
+
chainTo: number
|
|
245
|
+
inputs?: Input[]
|
|
246
|
+
/** @format int32 */
|
|
247
|
+
gasAmount: number
|
|
248
|
+
type: string
|
|
184
249
|
/** @format 32-byte-hash */
|
|
185
|
-
|
|
186
|
-
/** @format address */
|
|
187
|
-
address?: string
|
|
250
|
+
hash: string
|
|
188
251
|
/** @format uint256 */
|
|
189
|
-
|
|
190
|
-
tokens?: Token[]
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export interface InternalServerError {
|
|
194
|
-
detail: string
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export enum IntervalType {
|
|
198
|
-
Daily = 'daily',
|
|
199
|
-
Hourly = 'hourly',
|
|
200
|
-
Weekly = 'weekly'
|
|
252
|
+
gasPrice: string
|
|
201
253
|
}
|
|
202
254
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
total: number
|
|
206
|
-
blocks?: BlockEntryLite[]
|
|
207
|
-
}
|
|
255
|
+
/** TransactionLike */
|
|
256
|
+
export type TransactionLike = AcceptedTransaction | PendingTransaction
|
|
208
257
|
|
|
258
|
+
/** LogbackValue */
|
|
209
259
|
export interface LogbackValue {
|
|
210
|
-
name: string
|
|
211
260
|
level: string
|
|
261
|
+
name: string
|
|
212
262
|
}
|
|
213
263
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
264
|
+
/** ValU256 */
|
|
265
|
+
export interface ValU256 {
|
|
266
|
+
type: string
|
|
267
|
+
/** @format uint256 */
|
|
268
|
+
value: string
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/** BlockEntryLite */
|
|
272
|
+
export interface BlockEntryLite {
|
|
273
|
+
mainChain: boolean
|
|
217
274
|
/** @format group-index */
|
|
218
275
|
chainFrom: number
|
|
219
276
|
/** @format group-index */
|
|
220
277
|
chainTo: number
|
|
221
|
-
|
|
222
|
-
|
|
278
|
+
/** @format bigint */
|
|
279
|
+
hashRate: string
|
|
223
280
|
/** @format int32 */
|
|
224
|
-
|
|
225
|
-
/** @format
|
|
226
|
-
|
|
281
|
+
txNumber: number
|
|
282
|
+
/** @format block-hash */
|
|
283
|
+
hash: string
|
|
284
|
+
/** @format int32 */
|
|
285
|
+
height: number
|
|
227
286
|
/** @format int64 */
|
|
228
|
-
|
|
287
|
+
timestamp: number
|
|
229
288
|
}
|
|
230
289
|
|
|
231
|
-
|
|
232
|
-
|
|
290
|
+
/** PerChainHeight */
|
|
291
|
+
export interface PerChainHeight {
|
|
292
|
+
/** @format int32 */
|
|
293
|
+
chainFrom: number
|
|
294
|
+
/** @format int32 */
|
|
295
|
+
chainTo: number
|
|
296
|
+
/** @format int64 */
|
|
297
|
+
value: number
|
|
298
|
+
/** @format int64 */
|
|
299
|
+
height: number
|
|
233
300
|
}
|
|
234
301
|
|
|
235
|
-
|
|
302
|
+
/** ValByteVec */
|
|
303
|
+
export interface ValByteVec {
|
|
236
304
|
type: string
|
|
305
|
+
/** @format hex-string */
|
|
306
|
+
value: string
|
|
237
307
|
}
|
|
238
308
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
export interface NFTCollectionWithRoyalty {
|
|
246
|
-
type: string
|
|
309
|
+
/** TokenStdInterfaceId */
|
|
310
|
+
export enum TokenStdInterfaceId {
|
|
311
|
+
Fungible = 'fungible',
|
|
312
|
+
NonFungible = 'non-fungible',
|
|
313
|
+
NonStandard = 'non-standard'
|
|
247
314
|
}
|
|
248
315
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
/** @format
|
|
254
|
-
|
|
255
|
-
/** @format
|
|
256
|
-
|
|
316
|
+
/** ExplorerInfo */
|
|
317
|
+
export interface ExplorerInfo {
|
|
318
|
+
releaseVersion: string
|
|
319
|
+
commit: string
|
|
320
|
+
/** @format int32 */
|
|
321
|
+
migrationsVersion: number
|
|
322
|
+
/** @format int64 */
|
|
323
|
+
lastFinalizedInputTime: number
|
|
257
324
|
}
|
|
258
325
|
|
|
259
|
-
|
|
326
|
+
/** ValArray */
|
|
327
|
+
export interface ValArray {
|
|
260
328
|
type: string
|
|
329
|
+
value: Val[]
|
|
261
330
|
}
|
|
262
331
|
|
|
263
|
-
|
|
332
|
+
/** BadRequest */
|
|
333
|
+
export interface BadRequest {
|
|
264
334
|
detail: string
|
|
265
|
-
resource: string
|
|
266
335
|
}
|
|
267
336
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
key: string
|
|
337
|
+
/** Hashrate */
|
|
338
|
+
export interface Hashrate {
|
|
339
|
+
hashrate: number
|
|
340
|
+
value: number
|
|
341
|
+
/** @format int64 */
|
|
342
|
+
timestamp: number
|
|
275
343
|
}
|
|
276
344
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
hash: string
|
|
280
|
-
/** @format group-index */
|
|
281
|
-
chainFrom: number
|
|
282
|
-
/** @format group-index */
|
|
283
|
-
chainTo: number
|
|
284
|
-
inputs?: Input[]
|
|
345
|
+
/** Transaction */
|
|
346
|
+
export interface Transaction {
|
|
285
347
|
outputs?: Output[]
|
|
348
|
+
/** @format block-hash */
|
|
349
|
+
blockHash: string
|
|
350
|
+
scriptSignatures?: string[]
|
|
351
|
+
inputs?: Input[]
|
|
352
|
+
scriptExecutionOk: boolean
|
|
353
|
+
scriptOpt?: string
|
|
354
|
+
version: number
|
|
355
|
+
coinbase: boolean
|
|
356
|
+
inputSignatures?: string[]
|
|
286
357
|
/** @format int32 */
|
|
287
358
|
gasAmount: number
|
|
359
|
+
networkId: number
|
|
360
|
+
/** @format 32-byte-hash */
|
|
361
|
+
hash: string
|
|
288
362
|
/** @format uint256 */
|
|
289
363
|
gasPrice: string
|
|
290
364
|
/** @format int64 */
|
|
291
|
-
|
|
292
|
-
type: string
|
|
365
|
+
timestamp: number
|
|
293
366
|
}
|
|
294
367
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
/** @format int32 */
|
|
299
|
-
chainTo: number
|
|
300
|
-
/** @format int64 */
|
|
301
|
-
count: number
|
|
368
|
+
/** FungibleToken */
|
|
369
|
+
export interface FungibleToken {
|
|
370
|
+
type: string
|
|
302
371
|
}
|
|
303
372
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
duration: number
|
|
311
|
-
/** @format int64 */
|
|
312
|
-
value: number
|
|
373
|
+
/** GhostUncle */
|
|
374
|
+
export interface GhostUncle {
|
|
375
|
+
/** @format block-hash */
|
|
376
|
+
blockHash: string
|
|
377
|
+
/** @format address */
|
|
378
|
+
miner: string
|
|
313
379
|
}
|
|
314
380
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
/** @format int32 */
|
|
319
|
-
chainTo: number
|
|
320
|
-
/** @format int64 */
|
|
321
|
-
height: number
|
|
322
|
-
/** @format int64 */
|
|
323
|
-
value: number
|
|
381
|
+
/** NFTCollectionWithRoyalty */
|
|
382
|
+
export interface NFTCollectionWithRoyalty {
|
|
383
|
+
type: string
|
|
324
384
|
}
|
|
325
385
|
|
|
386
|
+
/** PerChainTimedCount */
|
|
326
387
|
export interface PerChainTimedCount {
|
|
388
|
+
totalCountPerChain?: PerChainCount[]
|
|
327
389
|
/** @format int64 */
|
|
328
390
|
timestamp: number
|
|
329
|
-
totalCountPerChain?: PerChainCount[]
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
export interface ServiceUnavailable {
|
|
333
|
-
detail: string
|
|
334
391
|
}
|
|
335
392
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
393
|
+
/** MempoolTransaction */
|
|
394
|
+
export interface MempoolTransaction {
|
|
395
|
+
outputs?: Output[]
|
|
396
|
+
/** @format group-index */
|
|
397
|
+
chainFrom: number
|
|
398
|
+
/** @format int64 */
|
|
399
|
+
lastSeen: number
|
|
400
|
+
/** @format group-index */
|
|
401
|
+
chainTo: number
|
|
402
|
+
inputs?: Input[]
|
|
403
|
+
/** @format int32 */
|
|
404
|
+
gasAmount: number
|
|
405
|
+
/** @format 32-byte-hash */
|
|
406
|
+
hash: string
|
|
407
|
+
/** @format uint256 */
|
|
408
|
+
gasPrice: string
|
|
340
409
|
}
|
|
341
410
|
|
|
342
|
-
export
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
411
|
+
export enum TokensWithPrice {
|
|
412
|
+
WETH = 'WETH',
|
|
413
|
+
ALPH = 'ALPH',
|
|
414
|
+
USDT = 'USDT',
|
|
415
|
+
AYIN = 'AYIN',
|
|
416
|
+
DAI = 'DAI',
|
|
417
|
+
USDC = 'USDC',
|
|
418
|
+
WBTC = 'WBTC'
|
|
347
419
|
}
|
|
348
420
|
|
|
349
|
-
export
|
|
350
|
-
|
|
351
|
-
timestamp: number
|
|
352
|
-
/** @format int64 */
|
|
353
|
-
totalCountAllChains: number
|
|
421
|
+
export enum MaxSizeTokens {
|
|
422
|
+
Value80 = 80
|
|
354
423
|
}
|
|
355
424
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
425
|
+
/** NFTCollection */
|
|
426
|
+
export interface NFTCollection {
|
|
427
|
+
type: string
|
|
359
428
|
}
|
|
360
429
|
|
|
361
|
-
export
|
|
362
|
-
|
|
363
|
-
id: string
|
|
364
|
-
/** @format uint256 */
|
|
365
|
-
amount: string
|
|
430
|
+
export enum MaxSizeAddressesForTokens {
|
|
431
|
+
Value80 = 80
|
|
366
432
|
}
|
|
367
433
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
/** Raw interface id, e.g. 0001 */
|
|
372
|
-
stdInterfaceId?: TokenStdInterfaceId | string
|
|
434
|
+
/** InternalServerError */
|
|
435
|
+
export interface InternalServerError {
|
|
436
|
+
detail: string
|
|
373
437
|
}
|
|
374
438
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
439
|
+
/** TimedPrices */
|
|
440
|
+
export interface TimedPrices {
|
|
441
|
+
timestamps?: number[]
|
|
442
|
+
prices?: number[]
|
|
379
443
|
}
|
|
380
444
|
|
|
381
|
-
|
|
445
|
+
/** TimedCount */
|
|
446
|
+
export interface TimedCount {
|
|
447
|
+
/** @format int64 */
|
|
448
|
+
totalCountAllChains: number
|
|
382
449
|
/** @format int64 */
|
|
383
450
|
timestamp: number
|
|
384
|
-
/** @format uint256 */
|
|
385
|
-
total: string
|
|
386
|
-
/** @format uint256 */
|
|
387
|
-
circulating: string
|
|
388
|
-
/** @format uint256 */
|
|
389
|
-
reserved: string
|
|
390
|
-
/** @format uint256 */
|
|
391
|
-
locked: string
|
|
392
|
-
/** @format uint256 */
|
|
393
|
-
maximum: string
|
|
394
451
|
}
|
|
395
452
|
|
|
396
|
-
|
|
453
|
+
/** NFTMetadata */
|
|
454
|
+
export interface NFTMetadata {
|
|
455
|
+
/** @format uint256 */
|
|
456
|
+
nftIndex: string
|
|
457
|
+
tokenUri: string
|
|
397
458
|
/** @format 32-byte-hash */
|
|
398
|
-
|
|
399
|
-
/** @format
|
|
400
|
-
|
|
459
|
+
id: string
|
|
460
|
+
/** @format 32-byte-hash */
|
|
461
|
+
collectionId: string
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/** PerChainDuration */
|
|
465
|
+
export interface PerChainDuration {
|
|
401
466
|
/** @format int64 */
|
|
402
|
-
|
|
403
|
-
inputs?: Input[]
|
|
404
|
-
outputs?: Output[]
|
|
467
|
+
duration: number
|
|
405
468
|
/** @format int32 */
|
|
406
|
-
|
|
407
|
-
/** @format
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
469
|
+
chainFrom: number
|
|
470
|
+
/** @format int32 */
|
|
471
|
+
chainTo: number
|
|
472
|
+
/** @format int64 */
|
|
473
|
+
value: number
|
|
411
474
|
}
|
|
412
475
|
|
|
413
|
-
|
|
476
|
+
/** StdInterfaceId */
|
|
477
|
+
export type StdInterfaceId = FungibleToken | NFT | NFTCollection | NFTCollectionWithRoyalty | NonStandard | Unknown
|
|
414
478
|
|
|
479
|
+
/** Output */
|
|
480
|
+
export type Output = AssetOutput | ContractOutput
|
|
481
|
+
|
|
482
|
+
/** Unauthorized */
|
|
415
483
|
export interface Unauthorized {
|
|
416
484
|
detail: string
|
|
417
485
|
}
|
|
418
486
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
487
|
+
/** NFTCollectionMetadata */
|
|
488
|
+
export interface NFTCollectionMetadata {
|
|
489
|
+
collectionUri: string
|
|
490
|
+
/** @format address */
|
|
491
|
+
address: string
|
|
422
492
|
}
|
|
423
493
|
|
|
424
|
-
|
|
425
|
-
|
|
494
|
+
/** ValAddress */
|
|
426
495
|
export interface ValAddress {
|
|
496
|
+
type: string
|
|
427
497
|
/** @format address */
|
|
428
498
|
value: string
|
|
429
|
-
type: string
|
|
430
499
|
}
|
|
431
500
|
|
|
432
|
-
|
|
433
|
-
|
|
501
|
+
/** ValBool */
|
|
502
|
+
export interface ValBool {
|
|
434
503
|
type: string
|
|
504
|
+
value: boolean
|
|
435
505
|
}
|
|
436
506
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
507
|
+
/** FungibleTokenMetadata */
|
|
508
|
+
export interface FungibleTokenMetadata {
|
|
509
|
+
symbol: string
|
|
510
|
+
/** @format uint256 */
|
|
511
|
+
decimals: string
|
|
512
|
+
name: string
|
|
513
|
+
/** @format 32-byte-hash */
|
|
514
|
+
id: string
|
|
440
515
|
}
|
|
441
516
|
|
|
442
|
-
export
|
|
443
|
-
|
|
444
|
-
value: string
|
|
445
|
-
type: string
|
|
517
|
+
export enum MaxSizeAddresses {
|
|
518
|
+
Value80 = 80
|
|
446
519
|
}
|
|
447
520
|
|
|
448
|
-
export
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
521
|
+
export enum Currencies {
|
|
522
|
+
Btc = 'btc',
|
|
523
|
+
Eth = 'eth',
|
|
524
|
+
Usd = 'usd',
|
|
525
|
+
Eur = 'eur',
|
|
526
|
+
Chf = 'chf',
|
|
527
|
+
Gbp = 'gbp',
|
|
528
|
+
Idr = 'idr',
|
|
529
|
+
Vnd = 'vnd',
|
|
530
|
+
Rub = 'rub',
|
|
531
|
+
Try = 'try',
|
|
532
|
+
Cad = 'cad',
|
|
533
|
+
Aud = 'aud'
|
|
452
534
|
}
|
|
453
535
|
|
|
454
|
-
|
|
536
|
+
/** AddressInfo */
|
|
537
|
+
export interface AddressInfo {
|
|
455
538
|
/** @format uint256 */
|
|
456
|
-
|
|
457
|
-
|
|
539
|
+
balance: string
|
|
540
|
+
/** @format uint256 */
|
|
541
|
+
lockedBalance: string
|
|
542
|
+
/** @format int32 */
|
|
543
|
+
txNumber: number
|
|
458
544
|
}
|
|
459
545
|
|
|
460
|
-
|
|
461
|
-
|
|
546
|
+
/** AddressBalance */
|
|
547
|
+
export interface AddressBalance {
|
|
548
|
+
/** @format uint256 */
|
|
549
|
+
balance: string
|
|
550
|
+
/** @format uint256 */
|
|
551
|
+
lockedBalance: string
|
|
462
552
|
}
|
|
463
553
|
|
|
464
|
-
|
|
465
|
-
|
|
554
|
+
/** AmountHistory */
|
|
555
|
+
export interface AmountHistory {
|
|
556
|
+
amountHistory?: string[][]
|
|
466
557
|
}
|
|
467
558
|
|
|
468
|
-
|
|
469
|
-
|
|
559
|
+
/** Event */
|
|
560
|
+
export interface Event {
|
|
561
|
+
/** @format block-hash */
|
|
562
|
+
blockHash: string
|
|
563
|
+
/** @format address */
|
|
564
|
+
inputAddress?: string
|
|
565
|
+
/** @format address */
|
|
566
|
+
contractAddress: string
|
|
567
|
+
/** @format int32 */
|
|
568
|
+
eventIndex: number
|
|
569
|
+
fields?: Val[]
|
|
570
|
+
/** @format 32-byte-hash */
|
|
571
|
+
txHash: string
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/** ListBlocks */
|
|
575
|
+
export interface ListBlocks {
|
|
576
|
+
/** @format int32 */
|
|
577
|
+
total: number
|
|
578
|
+
blocks?: BlockEntryLite[]
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/** SubContracts */
|
|
582
|
+
export interface SubContracts {
|
|
583
|
+
subContracts?: string[]
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/** TokenInfo */
|
|
587
|
+
export interface TokenInfo {
|
|
588
|
+
/** Raw interface id, e.g. 0001 */
|
|
589
|
+
stdInterfaceId?: TokenStdInterfaceId | string
|
|
590
|
+
/** @format 32-byte-hash */
|
|
591
|
+
token: string
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
/** NotFound */
|
|
595
|
+
export interface NotFound {
|
|
596
|
+
resource: string
|
|
597
|
+
detail: string
|
|
470
598
|
}
|
|
471
599
|
|
|
472
600
|
import 'cross-fetch/polyfill'
|
|
@@ -684,144 +812,37 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
684
812
|
/**
|
|
685
813
|
* @title Alephium Explorer API
|
|
686
814
|
* @version 1.0
|
|
687
|
-
*/
|
|
688
|
-
export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
689
|
-
|
|
690
|
-
/**
|
|
691
|
-
* @description List latest blocks
|
|
692
|
-
*
|
|
693
|
-
* @tags Blocks
|
|
694
|
-
* @name GetBlocks
|
|
695
|
-
* @request GET:/blocks
|
|
696
|
-
*/
|
|
697
|
-
getBlocks: (
|
|
698
|
-
query?: {
|
|
699
|
-
/**
|
|
700
|
-
* Page number
|
|
701
|
-
* @format int32
|
|
702
|
-
*/
|
|
703
|
-
page?: number
|
|
704
|
-
/**
|
|
705
|
-
* Number of items per page
|
|
706
|
-
* @format int32
|
|
707
|
-
*/
|
|
708
|
-
limit?: number
|
|
709
|
-
/** Reverse pagination */
|
|
710
|
-
reverse?: boolean
|
|
711
|
-
},
|
|
712
|
-
params: RequestParams = {}
|
|
713
|
-
) =>
|
|
714
|
-
this.request<ListBlocks, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
715
|
-
path: `/blocks`,
|
|
716
|
-
method: 'GET',
|
|
717
|
-
query: query,
|
|
718
|
-
format: 'json',
|
|
719
|
-
...params
|
|
720
|
-
}).then(convertHttpResponse),
|
|
721
|
-
|
|
722
|
-
/**
|
|
723
|
-
* @description Get a block with hash
|
|
724
|
-
*
|
|
725
|
-
* @tags Blocks
|
|
726
|
-
* @name GetBlocksBlockHash
|
|
727
|
-
* @request GET:/blocks/{block_hash}
|
|
728
|
-
*/
|
|
729
|
-
getBlocksBlockHash: (blockHash: string, params: RequestParams = {}) =>
|
|
730
|
-
this.request<BlockEntryLite, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
731
|
-
path: `/blocks/${blockHash}`,
|
|
732
|
-
method: 'GET',
|
|
733
|
-
format: 'json',
|
|
734
|
-
...params
|
|
735
|
-
}).then(convertHttpResponse),
|
|
736
|
-
|
|
737
|
-
/**
|
|
738
|
-
* @description Get block's transactions
|
|
739
|
-
*
|
|
740
|
-
* @tags Blocks
|
|
741
|
-
* @name GetBlocksBlockHashTransactions
|
|
742
|
-
* @request GET:/blocks/{block_hash}/transactions
|
|
743
|
-
*/
|
|
744
|
-
getBlocksBlockHashTransactions: (
|
|
745
|
-
blockHash: string,
|
|
746
|
-
query?: {
|
|
747
|
-
/**
|
|
748
|
-
* Page number
|
|
749
|
-
* @format int32
|
|
750
|
-
*/
|
|
751
|
-
page?: number
|
|
752
|
-
/**
|
|
753
|
-
* Number of items per page
|
|
754
|
-
* @format int32
|
|
755
|
-
*/
|
|
756
|
-
limit?: number
|
|
757
|
-
},
|
|
758
|
-
params: RequestParams = {}
|
|
759
|
-
) =>
|
|
760
|
-
this.request<Transaction[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
761
|
-
path: `/blocks/${blockHash}/transactions`,
|
|
762
|
-
method: 'GET',
|
|
763
|
-
query: query,
|
|
764
|
-
format: 'json',
|
|
765
|
-
...params
|
|
766
|
-
}).then(convertHttpResponse)
|
|
767
|
-
}
|
|
768
|
-
transactions = {
|
|
769
|
-
/**
|
|
770
|
-
* @description Get a transaction with hash
|
|
771
|
-
*
|
|
772
|
-
* @tags Transactions
|
|
773
|
-
* @name GetTransactionsTransactionHash
|
|
774
|
-
* @request GET:/transactions/{transaction_hash}
|
|
775
|
-
*/
|
|
776
|
-
getTransactionsTransactionHash: (transactionHash: string, params: RequestParams = {}) =>
|
|
777
|
-
this.request<TransactionLike, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
778
|
-
path: `/transactions/${transactionHash}`,
|
|
779
|
-
method: 'GET',
|
|
780
|
-
format: 'json',
|
|
781
|
-
...params
|
|
782
|
-
}).then(convertHttpResponse)
|
|
783
|
-
}
|
|
784
|
-
addresses = {
|
|
785
|
-
/**
|
|
786
|
-
* @description Get address information
|
|
787
|
-
*
|
|
788
|
-
* @tags Addresses
|
|
789
|
-
* @name GetAddressesAddress
|
|
790
|
-
* @request GET:/addresses/{address}
|
|
791
|
-
*/
|
|
792
|
-
getAddressesAddress: (address: string, params: RequestParams = {}) =>
|
|
793
|
-
this.request<AddressInfo, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
794
|
-
path: `/addresses/${address}`,
|
|
795
|
-
method: 'GET',
|
|
796
|
-
format: 'json',
|
|
797
|
-
...params
|
|
798
|
-
}).then(convertHttpResponse),
|
|
799
|
-
|
|
815
|
+
*/
|
|
816
|
+
export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
817
|
+
contracts = {
|
|
800
818
|
/**
|
|
801
|
-
* @description
|
|
819
|
+
* @description Get sub contract addresses
|
|
802
820
|
*
|
|
803
|
-
* @tags
|
|
804
|
-
* @name
|
|
805
|
-
* @request GET:/
|
|
821
|
+
* @tags Contracts
|
|
822
|
+
* @name GetContractsContractAddressSubContracts
|
|
823
|
+
* @request GET:/contracts/{contract_address}/sub-contracts
|
|
806
824
|
*/
|
|
807
|
-
|
|
808
|
-
|
|
825
|
+
getContractsContractAddressSubContracts: (
|
|
826
|
+
contractAddress: string,
|
|
809
827
|
query?: {
|
|
810
828
|
/**
|
|
811
829
|
* Page number
|
|
812
830
|
* @format int32
|
|
831
|
+
* @min 1
|
|
813
832
|
*/
|
|
814
833
|
page?: number
|
|
815
834
|
/**
|
|
816
835
|
* Number of items per page
|
|
817
836
|
* @format int32
|
|
837
|
+
* @min 0
|
|
838
|
+
* @max 100
|
|
818
839
|
*/
|
|
819
840
|
limit?: number
|
|
820
841
|
},
|
|
821
842
|
params: RequestParams = {}
|
|
822
843
|
) =>
|
|
823
|
-
this.request<
|
|
824
|
-
path: `/
|
|
844
|
+
this.request<SubContracts, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
845
|
+
path: `/contracts/${contractAddress}/sub-contracts`,
|
|
825
846
|
method: 'GET',
|
|
826
847
|
query: query,
|
|
827
848
|
format: 'json',
|
|
@@ -829,32 +850,47 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
829
850
|
}).then(convertHttpResponse),
|
|
830
851
|
|
|
831
852
|
/**
|
|
832
|
-
* @description
|
|
853
|
+
* @description Get contract liveness
|
|
833
854
|
*
|
|
834
|
-
* @tags
|
|
835
|
-
* @name
|
|
836
|
-
* @request
|
|
855
|
+
* @tags Contracts
|
|
856
|
+
* @name GetContractsContractAddressCurrentLiveness
|
|
857
|
+
* @request GET:/contracts/{contract_address}/current-liveness
|
|
837
858
|
*/
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
) =>
|
|
854
|
-
this.request<
|
|
855
|
-
path: `/
|
|
859
|
+
getContractsContractAddressCurrentLiveness: (contractAddress: string, params: RequestParams = {}) =>
|
|
860
|
+
this.request<ContractLiveness, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
861
|
+
path: `/contracts/${contractAddress}/current-liveness`,
|
|
862
|
+
method: 'GET',
|
|
863
|
+
format: 'json',
|
|
864
|
+
...params
|
|
865
|
+
}).then(convertHttpResponse),
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* @description Get contract parent address if exist
|
|
869
|
+
*
|
|
870
|
+
* @tags Contracts
|
|
871
|
+
* @name GetContractsContractAddressParent
|
|
872
|
+
* @request GET:/contracts/{contract_address}/parent
|
|
873
|
+
*/
|
|
874
|
+
getContractsContractAddressParent: (contractAddress: string, params: RequestParams = {}) =>
|
|
875
|
+
this.request<ContractParent, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
876
|
+
path: `/contracts/${contractAddress}/parent`,
|
|
877
|
+
method: 'GET',
|
|
878
|
+
format: 'json',
|
|
879
|
+
...params
|
|
880
|
+
}).then(convertHttpResponse)
|
|
881
|
+
}
|
|
882
|
+
addresses = {
|
|
883
|
+
/**
|
|
884
|
+
* @description Are the addresses used (at least 1 transaction)
|
|
885
|
+
*
|
|
886
|
+
* @tags Addresses, Addresses
|
|
887
|
+
* @name PostAddressesUsed
|
|
888
|
+
* @request POST:/addresses/used
|
|
889
|
+
*/
|
|
890
|
+
postAddressesUsed: (data?: string[], params: RequestParams = {}) =>
|
|
891
|
+
this.request<boolean[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
892
|
+
path: `/addresses/used`,
|
|
856
893
|
method: 'POST',
|
|
857
|
-
query: query,
|
|
858
894
|
body: data,
|
|
859
895
|
type: ContentType.Json,
|
|
860
896
|
format: 'json',
|
|
@@ -862,13 +898,13 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
862
898
|
}).then(convertHttpResponse),
|
|
863
899
|
|
|
864
900
|
/**
|
|
865
|
-
*
|
|
901
|
+
* No description
|
|
866
902
|
*
|
|
867
903
|
* @tags Addresses
|
|
868
|
-
* @name
|
|
869
|
-
* @request GET:/addresses/{address}/
|
|
904
|
+
* @name GetAddressesAddressExportTransactionsCsv
|
|
905
|
+
* @request GET:/addresses/{address}/export-transactions/csv
|
|
870
906
|
*/
|
|
871
|
-
|
|
907
|
+
getAddressesAddressExportTransactionsCsv: (
|
|
872
908
|
address: string,
|
|
873
909
|
query: {
|
|
874
910
|
/**
|
|
@@ -881,37 +917,27 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
881
917
|
* @min 0
|
|
882
918
|
*/
|
|
883
919
|
toTs: number
|
|
884
|
-
/**
|
|
885
|
-
* Page number
|
|
886
|
-
* @format int32
|
|
887
|
-
*/
|
|
888
|
-
page?: number
|
|
889
|
-
/**
|
|
890
|
-
* Number of items per page
|
|
891
|
-
* @format int32
|
|
892
|
-
*/
|
|
893
|
-
limit?: number
|
|
894
920
|
},
|
|
895
921
|
params: RequestParams = {}
|
|
896
922
|
) =>
|
|
897
|
-
this.request<
|
|
898
|
-
path: `/addresses/${address}/
|
|
923
|
+
this.request<string, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
924
|
+
path: `/addresses/${address}/export-transactions/csv`,
|
|
899
925
|
method: 'GET',
|
|
900
926
|
query: query,
|
|
901
|
-
format: '
|
|
927
|
+
format: 'text',
|
|
902
928
|
...params
|
|
903
929
|
}).then(convertHttpResponse),
|
|
904
930
|
|
|
905
931
|
/**
|
|
906
|
-
* @description Get
|
|
932
|
+
* @description Get address balance
|
|
907
933
|
*
|
|
908
934
|
* @tags Addresses
|
|
909
|
-
* @name
|
|
910
|
-
* @request GET:/addresses/{address}/
|
|
935
|
+
* @name GetAddressesAddressBalance
|
|
936
|
+
* @request GET:/addresses/{address}/balance
|
|
911
937
|
*/
|
|
912
|
-
|
|
913
|
-
this.request<
|
|
914
|
-
path: `/addresses/${address}/
|
|
938
|
+
getAddressesAddressBalance: (address: string, params: RequestParams = {}) =>
|
|
939
|
+
this.request<AddressBalance, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
940
|
+
path: `/addresses/${address}/balance`,
|
|
915
941
|
method: 'GET',
|
|
916
942
|
format: 'json',
|
|
917
943
|
...params
|
|
@@ -935,47 +961,35 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
935
961
|
...params
|
|
936
962
|
}).then(convertHttpResponse),
|
|
937
963
|
|
|
938
|
-
/**
|
|
939
|
-
* @description Get address balance
|
|
940
|
-
*
|
|
941
|
-
* @tags Addresses
|
|
942
|
-
* @name GetAddressesAddressBalance
|
|
943
|
-
* @request GET:/addresses/{address}/balance
|
|
944
|
-
*/
|
|
945
|
-
getAddressesAddressBalance: (address: string, params: RequestParams = {}) =>
|
|
946
|
-
this.request<AddressBalance, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
947
|
-
path: `/addresses/${address}/balance`,
|
|
948
|
-
method: 'GET',
|
|
949
|
-
format: 'json',
|
|
950
|
-
...params
|
|
951
|
-
}).then(convertHttpResponse),
|
|
952
|
-
|
|
953
964
|
/**
|
|
954
965
|
* @description List address tokens
|
|
955
966
|
*
|
|
956
967
|
* @tags Addresses
|
|
957
|
-
* @name
|
|
958
|
-
* @request GET:/addresses/{address}/tokens
|
|
959
|
-
* @deprecated
|
|
968
|
+
* @name GetAddressesAddressTokensTokenIdTransactions
|
|
969
|
+
* @request GET:/addresses/{address}/tokens/{token_id}/transactions
|
|
960
970
|
*/
|
|
961
|
-
|
|
971
|
+
getAddressesAddressTokensTokenIdTransactions: (
|
|
962
972
|
address: string,
|
|
973
|
+
tokenId: string,
|
|
963
974
|
query?: {
|
|
964
975
|
/**
|
|
965
976
|
* Page number
|
|
966
977
|
* @format int32
|
|
978
|
+
* @min 1
|
|
967
979
|
*/
|
|
968
980
|
page?: number
|
|
969
981
|
/**
|
|
970
982
|
* Number of items per page
|
|
971
983
|
* @format int32
|
|
984
|
+
* @min 0
|
|
985
|
+
* @max 100
|
|
972
986
|
*/
|
|
973
987
|
limit?: number
|
|
974
988
|
},
|
|
975
989
|
params: RequestParams = {}
|
|
976
990
|
) =>
|
|
977
|
-
this.request<
|
|
978
|
-
path: `/addresses/${address}/tokens`,
|
|
991
|
+
this.request<Transaction[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
992
|
+
path: `/addresses/${address}/tokens/${tokenId}/transactions`,
|
|
979
993
|
method: 'GET',
|
|
980
994
|
query: query,
|
|
981
995
|
format: 'json',
|
|
@@ -983,31 +997,58 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
983
997
|
}).then(convertHttpResponse),
|
|
984
998
|
|
|
985
999
|
/**
|
|
986
|
-
* @description
|
|
1000
|
+
* @description Get total transactions of a given address
|
|
987
1001
|
*
|
|
988
1002
|
* @tags Addresses
|
|
989
|
-
* @name
|
|
990
|
-
* @request GET:/addresses/{address}/
|
|
1003
|
+
* @name GetAddressesAddressTotalTransactions
|
|
1004
|
+
* @request GET:/addresses/{address}/total-transactions
|
|
991
1005
|
*/
|
|
992
|
-
|
|
1006
|
+
getAddressesAddressTotalTransactions: (address: string, params: RequestParams = {}) =>
|
|
1007
|
+
this.request<number, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1008
|
+
path: `/addresses/${address}/total-transactions`,
|
|
1009
|
+
method: 'GET',
|
|
1010
|
+
format: 'json',
|
|
1011
|
+
...params
|
|
1012
|
+
}).then(convertHttpResponse),
|
|
1013
|
+
|
|
1014
|
+
/**
|
|
1015
|
+
* @description List transactions of a given address within a time-range
|
|
1016
|
+
*
|
|
1017
|
+
* @tags Addresses
|
|
1018
|
+
* @name GetAddressesAddressTimerangedTransactions
|
|
1019
|
+
* @request GET:/addresses/{address}/timeranged-transactions
|
|
1020
|
+
*/
|
|
1021
|
+
getAddressesAddressTimerangedTransactions: (
|
|
993
1022
|
address: string,
|
|
994
|
-
|
|
995
|
-
|
|
1023
|
+
query: {
|
|
1024
|
+
/**
|
|
1025
|
+
* @format int64
|
|
1026
|
+
* @min 0
|
|
1027
|
+
*/
|
|
1028
|
+
fromTs: number
|
|
1029
|
+
/**
|
|
1030
|
+
* @format int64
|
|
1031
|
+
* @min 0
|
|
1032
|
+
*/
|
|
1033
|
+
toTs: number
|
|
996
1034
|
/**
|
|
997
1035
|
* Page number
|
|
998
1036
|
* @format int32
|
|
1037
|
+
* @min 1
|
|
999
1038
|
*/
|
|
1000
1039
|
page?: number
|
|
1001
1040
|
/**
|
|
1002
1041
|
* Number of items per page
|
|
1003
1042
|
* @format int32
|
|
1043
|
+
* @min 0
|
|
1044
|
+
* @max 1000
|
|
1004
1045
|
*/
|
|
1005
1046
|
limit?: number
|
|
1006
1047
|
},
|
|
1007
1048
|
params: RequestParams = {}
|
|
1008
1049
|
) =>
|
|
1009
1050
|
this.request<Transaction[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1010
|
-
path: `/addresses/${address}/
|
|
1051
|
+
path: `/addresses/${address}/timeranged-transactions`,
|
|
1011
1052
|
method: 'GET',
|
|
1012
1053
|
query: query,
|
|
1013
1054
|
format: 'json',
|
|
@@ -1015,83 +1056,101 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1015
1056
|
}).then(convertHttpResponse),
|
|
1016
1057
|
|
|
1017
1058
|
/**
|
|
1018
|
-
* @description
|
|
1059
|
+
* @description List transactions of a given address
|
|
1019
1060
|
*
|
|
1020
1061
|
* @tags Addresses
|
|
1021
|
-
* @name
|
|
1022
|
-
* @request GET:/addresses/{address}/
|
|
1062
|
+
* @name GetAddressesAddressTransactions
|
|
1063
|
+
* @request GET:/addresses/{address}/transactions
|
|
1023
1064
|
*/
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1065
|
+
getAddressesAddressTransactions: (
|
|
1066
|
+
address: string,
|
|
1067
|
+
query?: {
|
|
1068
|
+
/**
|
|
1069
|
+
* Page number
|
|
1070
|
+
* @format int32
|
|
1071
|
+
* @min 1
|
|
1072
|
+
*/
|
|
1073
|
+
page?: number
|
|
1074
|
+
/**
|
|
1075
|
+
* Number of items per page
|
|
1076
|
+
* @format int32
|
|
1077
|
+
* @min 0
|
|
1078
|
+
* @max 100
|
|
1079
|
+
*/
|
|
1080
|
+
limit?: number
|
|
1081
|
+
},
|
|
1082
|
+
params: RequestParams = {}
|
|
1083
|
+
) =>
|
|
1084
|
+
this.request<Transaction[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1085
|
+
path: `/addresses/${address}/transactions`,
|
|
1030
1086
|
method: 'GET',
|
|
1087
|
+
query: query,
|
|
1031
1088
|
format: 'json',
|
|
1032
1089
|
...params
|
|
1033
1090
|
}).then(convertHttpResponse),
|
|
1034
1091
|
|
|
1035
1092
|
/**
|
|
1036
|
-
*
|
|
1093
|
+
* No description
|
|
1037
1094
|
*
|
|
1038
1095
|
* @tags Addresses
|
|
1039
|
-
* @name
|
|
1040
|
-
* @request GET:/addresses/{address}/
|
|
1096
|
+
* @name GetAddressesAddressAmountHistory
|
|
1097
|
+
* @request GET:/addresses/{address}/amount-history
|
|
1041
1098
|
*/
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1099
|
+
getAddressesAddressAmountHistory: (
|
|
1100
|
+
address: string,
|
|
1101
|
+
query: {
|
|
1102
|
+
/**
|
|
1103
|
+
* @format int64
|
|
1104
|
+
* @min 0
|
|
1105
|
+
*/
|
|
1106
|
+
fromTs: number
|
|
1107
|
+
/**
|
|
1108
|
+
* @format int64
|
|
1109
|
+
* @min 0
|
|
1110
|
+
*/
|
|
1111
|
+
toTs: number
|
|
1112
|
+
'interval-type': IntervalType
|
|
1113
|
+
},
|
|
1114
|
+
params: RequestParams = {}
|
|
1115
|
+
) =>
|
|
1116
|
+
this.request<AmountHistory, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1117
|
+
path: `/addresses/${address}/amount-history`,
|
|
1045
1118
|
method: 'GET',
|
|
1119
|
+
query: query,
|
|
1046
1120
|
format: 'json',
|
|
1047
1121
|
...params
|
|
1048
1122
|
}).then(convertHttpResponse),
|
|
1049
1123
|
|
|
1050
1124
|
/**
|
|
1051
|
-
* @description
|
|
1125
|
+
* @description List transactions for given addresses
|
|
1052
1126
|
*
|
|
1053
1127
|
* @tags Addresses
|
|
1054
|
-
* @name
|
|
1055
|
-
* @request
|
|
1128
|
+
* @name PostAddressesTransactions
|
|
1129
|
+
* @request POST:/addresses/transactions
|
|
1056
1130
|
*/
|
|
1057
|
-
|
|
1058
|
-
address: string,
|
|
1131
|
+
postAddressesTransactions: (
|
|
1059
1132
|
query?: {
|
|
1060
1133
|
/**
|
|
1061
1134
|
* Page number
|
|
1062
1135
|
* @format int32
|
|
1136
|
+
* @min 1
|
|
1063
1137
|
*/
|
|
1064
1138
|
page?: number
|
|
1065
1139
|
/**
|
|
1066
1140
|
* Number of items per page
|
|
1067
1141
|
* @format int32
|
|
1142
|
+
* @min 0
|
|
1143
|
+
* @max 100
|
|
1068
1144
|
*/
|
|
1069
1145
|
limit?: number
|
|
1070
1146
|
},
|
|
1147
|
+
data?: string[],
|
|
1071
1148
|
params: RequestParams = {}
|
|
1072
1149
|
) =>
|
|
1073
|
-
this.request<
|
|
1074
|
-
|
|
1075
|
-
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1076
|
-
>({
|
|
1077
|
-
path: `/addresses/${address}/tokens-balance`,
|
|
1078
|
-
method: 'GET',
|
|
1079
|
-
query: query,
|
|
1080
|
-
format: 'json',
|
|
1081
|
-
...params
|
|
1082
|
-
}).then(convertHttpResponse),
|
|
1083
|
-
|
|
1084
|
-
/**
|
|
1085
|
-
* @description Are the addresses used (at least 1 transaction)
|
|
1086
|
-
*
|
|
1087
|
-
* @tags Addresses, Addresses
|
|
1088
|
-
* @name PostAddressesUsed
|
|
1089
|
-
* @request POST:/addresses/used
|
|
1090
|
-
*/
|
|
1091
|
-
postAddressesUsed: (data?: string[], params: RequestParams = {}) =>
|
|
1092
|
-
this.request<boolean[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1093
|
-
path: `/addresses/used`,
|
|
1150
|
+
this.request<Transaction[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1151
|
+
path: `/addresses/transactions`,
|
|
1094
1152
|
method: 'POST',
|
|
1153
|
+
query: query,
|
|
1095
1154
|
body: data,
|
|
1096
1155
|
type: ContentType.Json,
|
|
1097
1156
|
format: 'json',
|
|
@@ -1102,10 +1161,11 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1102
1161
|
* No description
|
|
1103
1162
|
*
|
|
1104
1163
|
* @tags Addresses
|
|
1105
|
-
* @name
|
|
1106
|
-
* @request GET:/addresses/{address}/
|
|
1164
|
+
* @name GetAddressesAddressAmountHistoryDeprecated
|
|
1165
|
+
* @request GET:/addresses/{address}/amount-history-DEPRECATED
|
|
1166
|
+
* @deprecated
|
|
1107
1167
|
*/
|
|
1108
|
-
|
|
1168
|
+
getAddressesAddressAmountHistoryDeprecated: (
|
|
1109
1169
|
address: string,
|
|
1110
1170
|
query: {
|
|
1111
1171
|
/**
|
|
@@ -1118,44 +1178,47 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1118
1178
|
* @min 0
|
|
1119
1179
|
*/
|
|
1120
1180
|
toTs: number
|
|
1181
|
+
'interval-type': IntervalType
|
|
1121
1182
|
},
|
|
1122
1183
|
params: RequestParams = {}
|
|
1123
1184
|
) =>
|
|
1124
1185
|
this.request<string, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1125
|
-
path: `/addresses/${address}/
|
|
1186
|
+
path: `/addresses/${address}/amount-history-DEPRECATED`,
|
|
1126
1187
|
method: 'GET',
|
|
1127
1188
|
query: query,
|
|
1128
|
-
format: '
|
|
1189
|
+
format: 'json',
|
|
1129
1190
|
...params
|
|
1130
1191
|
}).then(convertHttpResponse),
|
|
1131
1192
|
|
|
1132
1193
|
/**
|
|
1133
|
-
*
|
|
1194
|
+
* @description List address tokens
|
|
1134
1195
|
*
|
|
1135
1196
|
* @tags Addresses
|
|
1136
|
-
* @name
|
|
1137
|
-
* @request GET:/addresses/{address}/
|
|
1197
|
+
* @name GetAddressesAddressTokens
|
|
1198
|
+
* @request GET:/addresses/{address}/tokens
|
|
1138
1199
|
* @deprecated
|
|
1139
1200
|
*/
|
|
1140
|
-
|
|
1201
|
+
getAddressesAddressTokens: (
|
|
1141
1202
|
address: string,
|
|
1142
|
-
query
|
|
1203
|
+
query?: {
|
|
1143
1204
|
/**
|
|
1144
|
-
*
|
|
1145
|
-
* @
|
|
1205
|
+
* Page number
|
|
1206
|
+
* @format int32
|
|
1207
|
+
* @min 1
|
|
1146
1208
|
*/
|
|
1147
|
-
|
|
1209
|
+
page?: number
|
|
1148
1210
|
/**
|
|
1149
|
-
*
|
|
1211
|
+
* Number of items per page
|
|
1212
|
+
* @format int32
|
|
1150
1213
|
* @min 0
|
|
1214
|
+
* @max 100
|
|
1151
1215
|
*/
|
|
1152
|
-
|
|
1153
|
-
'interval-type': IntervalType
|
|
1216
|
+
limit?: number
|
|
1154
1217
|
},
|
|
1155
1218
|
params: RequestParams = {}
|
|
1156
1219
|
) =>
|
|
1157
|
-
this.request<string, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1158
|
-
path: `/addresses/${address}/
|
|
1220
|
+
this.request<string[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1221
|
+
path: `/addresses/${address}/tokens`,
|
|
1159
1222
|
method: 'GET',
|
|
1160
1223
|
query: query,
|
|
1161
1224
|
format: 'json',
|
|
@@ -1163,68 +1226,91 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1163
1226
|
}).then(convertHttpResponse),
|
|
1164
1227
|
|
|
1165
1228
|
/**
|
|
1166
|
-
*
|
|
1229
|
+
* @description Get address tokens with balance
|
|
1167
1230
|
*
|
|
1168
1231
|
* @tags Addresses
|
|
1169
|
-
* @name
|
|
1170
|
-
* @request GET:/addresses/{address}/
|
|
1232
|
+
* @name GetAddressesAddressTokensBalance
|
|
1233
|
+
* @request GET:/addresses/{address}/tokens-balance
|
|
1171
1234
|
*/
|
|
1172
|
-
|
|
1235
|
+
getAddressesAddressTokensBalance: (
|
|
1173
1236
|
address: string,
|
|
1174
|
-
query
|
|
1237
|
+
query?: {
|
|
1175
1238
|
/**
|
|
1176
|
-
*
|
|
1177
|
-
* @
|
|
1239
|
+
* Page number
|
|
1240
|
+
* @format int32
|
|
1241
|
+
* @min 1
|
|
1178
1242
|
*/
|
|
1179
|
-
|
|
1243
|
+
page?: number
|
|
1180
1244
|
/**
|
|
1181
|
-
*
|
|
1245
|
+
* Number of items per page
|
|
1246
|
+
* @format int32
|
|
1182
1247
|
* @min 0
|
|
1248
|
+
* @max 100
|
|
1183
1249
|
*/
|
|
1184
|
-
|
|
1185
|
-
'interval-type': IntervalType
|
|
1250
|
+
limit?: number
|
|
1186
1251
|
},
|
|
1187
1252
|
params: RequestParams = {}
|
|
1188
1253
|
) =>
|
|
1189
|
-
this.request<
|
|
1190
|
-
|
|
1254
|
+
this.request<
|
|
1255
|
+
AddressTokenBalance[],
|
|
1256
|
+
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1257
|
+
>({
|
|
1258
|
+
path: `/addresses/${address}/tokens-balance`,
|
|
1191
1259
|
method: 'GET',
|
|
1192
1260
|
query: query,
|
|
1193
1261
|
format: 'json',
|
|
1194
1262
|
...params
|
|
1195
|
-
}).then(convertHttpResponse)
|
|
1196
|
-
|
|
1197
|
-
infos = {
|
|
1263
|
+
}).then(convertHttpResponse),
|
|
1264
|
+
|
|
1198
1265
|
/**
|
|
1199
|
-
* @description Get
|
|
1266
|
+
* @description Get address balance of given token
|
|
1200
1267
|
*
|
|
1201
|
-
* @tags
|
|
1202
|
-
* @name
|
|
1203
|
-
* @request GET:/
|
|
1268
|
+
* @tags Addresses
|
|
1269
|
+
* @name GetAddressesAddressTokensTokenIdBalance
|
|
1270
|
+
* @request GET:/addresses/{address}/tokens/{token_id}/balance
|
|
1204
1271
|
*/
|
|
1205
|
-
|
|
1206
|
-
this.request<
|
|
1207
|
-
|
|
1272
|
+
getAddressesAddressTokensTokenIdBalance: (address: string, tokenId: string, params: RequestParams = {}) =>
|
|
1273
|
+
this.request<
|
|
1274
|
+
AddressTokenBalance,
|
|
1275
|
+
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1276
|
+
>({
|
|
1277
|
+
path: `/addresses/${address}/tokens/${tokenId}/balance`,
|
|
1208
1278
|
method: 'GET',
|
|
1209
1279
|
format: 'json',
|
|
1210
1280
|
...params
|
|
1211
1281
|
}).then(convertHttpResponse),
|
|
1212
1282
|
|
|
1213
1283
|
/**
|
|
1214
|
-
* @description
|
|
1284
|
+
* @description Get address information
|
|
1215
1285
|
*
|
|
1216
|
-
* @tags
|
|
1217
|
-
* @name
|
|
1218
|
-
* @request GET:/
|
|
1286
|
+
* @tags Addresses
|
|
1287
|
+
* @name GetAddressesAddress
|
|
1288
|
+
* @request GET:/addresses/{address}
|
|
1219
1289
|
*/
|
|
1220
|
-
|
|
1221
|
-
this.request<
|
|
1222
|
-
path: `/
|
|
1290
|
+
getAddressesAddress: (address: string, params: RequestParams = {}) =>
|
|
1291
|
+
this.request<AddressInfo, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1292
|
+
path: `/addresses/${address}`,
|
|
1223
1293
|
method: 'GET',
|
|
1224
1294
|
format: 'json',
|
|
1225
1295
|
...params
|
|
1226
1296
|
}).then(convertHttpResponse),
|
|
1227
1297
|
|
|
1298
|
+
/**
|
|
1299
|
+
* @description Get public key of p2pkh addresses, the address needs to have at least one input.
|
|
1300
|
+
*
|
|
1301
|
+
* @tags Addresses
|
|
1302
|
+
* @name GetAddressesAddressPublicKey
|
|
1303
|
+
* @request GET:/addresses/{address}/public-key
|
|
1304
|
+
*/
|
|
1305
|
+
getAddressesAddressPublicKey: (address: string, params: RequestParams = {}) =>
|
|
1306
|
+
this.request<string, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1307
|
+
path: `/addresses/${address}/public-key`,
|
|
1308
|
+
method: 'GET',
|
|
1309
|
+
format: 'json',
|
|
1310
|
+
...params
|
|
1311
|
+
}).then(convertHttpResponse)
|
|
1312
|
+
}
|
|
1313
|
+
infos = {
|
|
1228
1314
|
/**
|
|
1229
1315
|
* @description Get token supply list
|
|
1230
1316
|
*
|
|
@@ -1237,11 +1323,14 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1237
1323
|
/**
|
|
1238
1324
|
* Page number
|
|
1239
1325
|
* @format int32
|
|
1326
|
+
* @min 1
|
|
1240
1327
|
*/
|
|
1241
1328
|
page?: number
|
|
1242
1329
|
/**
|
|
1243
1330
|
* Number of items per page
|
|
1244
1331
|
* @format int32
|
|
1332
|
+
* @min 0
|
|
1333
|
+
* @max 100
|
|
1245
1334
|
*/
|
|
1246
1335
|
limit?: number
|
|
1247
1336
|
},
|
|
@@ -1256,20 +1345,35 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1256
1345
|
}).then(convertHttpResponse),
|
|
1257
1346
|
|
|
1258
1347
|
/**
|
|
1259
|
-
* @description Get the ALPH
|
|
1348
|
+
* @description Get the ALPH locked supply
|
|
1260
1349
|
*
|
|
1261
1350
|
* @tags Infos
|
|
1262
|
-
* @name
|
|
1263
|
-
* @request GET:/infos/supply/
|
|
1351
|
+
* @name GetInfosSupplyLockedAlph
|
|
1352
|
+
* @request GET:/infos/supply/locked-alph
|
|
1264
1353
|
*/
|
|
1265
|
-
|
|
1354
|
+
getInfosSupplyLockedAlph: (params: RequestParams = {}) =>
|
|
1266
1355
|
this.request<number, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1267
|
-
path: `/infos/supply/
|
|
1356
|
+
path: `/infos/supply/locked-alph`,
|
|
1268
1357
|
method: 'GET',
|
|
1269
1358
|
format: 'text',
|
|
1270
1359
|
...params
|
|
1271
1360
|
}).then(convertHttpResponse),
|
|
1272
1361
|
|
|
1362
|
+
/**
|
|
1363
|
+
* @description Get explorer informations
|
|
1364
|
+
*
|
|
1365
|
+
* @tags Infos
|
|
1366
|
+
* @name GetInfos
|
|
1367
|
+
* @request GET:/infos
|
|
1368
|
+
*/
|
|
1369
|
+
getInfos: (params: RequestParams = {}) =>
|
|
1370
|
+
this.request<ExplorerInfo, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1371
|
+
path: `/infos`,
|
|
1372
|
+
method: 'GET',
|
|
1373
|
+
format: 'json',
|
|
1374
|
+
...params
|
|
1375
|
+
}).then(convertHttpResponse),
|
|
1376
|
+
|
|
1273
1377
|
/**
|
|
1274
1378
|
* @description Get the ALPH circulating supply
|
|
1275
1379
|
*
|
|
@@ -1286,102 +1390,166 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1286
1390
|
}).then(convertHttpResponse),
|
|
1287
1391
|
|
|
1288
1392
|
/**
|
|
1289
|
-
* @description Get the ALPH
|
|
1393
|
+
* @description Get the ALPH total supply
|
|
1290
1394
|
*
|
|
1291
1395
|
* @tags Infos
|
|
1292
|
-
* @name
|
|
1293
|
-
* @request GET:/infos/supply/
|
|
1396
|
+
* @name GetInfosSupplyTotalAlph
|
|
1397
|
+
* @request GET:/infos/supply/total-alph
|
|
1294
1398
|
*/
|
|
1295
|
-
|
|
1399
|
+
getInfosSupplyTotalAlph: (params: RequestParams = {}) =>
|
|
1296
1400
|
this.request<number, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1297
|
-
path: `/infos/supply/
|
|
1401
|
+
path: `/infos/supply/total-alph`,
|
|
1298
1402
|
method: 'GET',
|
|
1299
1403
|
format: 'text',
|
|
1300
1404
|
...params
|
|
1301
1405
|
}).then(convertHttpResponse),
|
|
1302
1406
|
|
|
1303
1407
|
/**
|
|
1304
|
-
* @description Get the
|
|
1408
|
+
* @description Get the total number of transactions
|
|
1305
1409
|
*
|
|
1306
1410
|
* @tags Infos
|
|
1307
|
-
* @name
|
|
1308
|
-
* @request GET:/infos/
|
|
1411
|
+
* @name GetInfosTotalTransactions
|
|
1412
|
+
* @request GET:/infos/total-transactions
|
|
1309
1413
|
*/
|
|
1310
|
-
|
|
1414
|
+
getInfosTotalTransactions: (params: RequestParams = {}) =>
|
|
1311
1415
|
this.request<number, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1312
|
-
path: `/infos/
|
|
1416
|
+
path: `/infos/total-transactions`,
|
|
1313
1417
|
method: 'GET',
|
|
1314
1418
|
format: 'text',
|
|
1315
1419
|
...params
|
|
1316
1420
|
}).then(convertHttpResponse),
|
|
1317
1421
|
|
|
1318
1422
|
/**
|
|
1319
|
-
* @description Get the
|
|
1423
|
+
* @description Get the ALPH reserved supply
|
|
1320
1424
|
*
|
|
1321
1425
|
* @tags Infos
|
|
1322
|
-
* @name
|
|
1323
|
-
* @request GET:/infos/
|
|
1426
|
+
* @name GetInfosSupplyReservedAlph
|
|
1427
|
+
* @request GET:/infos/supply/reserved-alph
|
|
1324
1428
|
*/
|
|
1325
|
-
|
|
1429
|
+
getInfosSupplyReservedAlph: (params: RequestParams = {}) =>
|
|
1326
1430
|
this.request<number, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1327
|
-
path: `/infos/
|
|
1431
|
+
path: `/infos/supply/reserved-alph`,
|
|
1328
1432
|
method: 'GET',
|
|
1329
1433
|
format: 'text',
|
|
1330
1434
|
...params
|
|
1331
1435
|
}).then(convertHttpResponse),
|
|
1332
1436
|
|
|
1333
1437
|
/**
|
|
1334
|
-
* @description
|
|
1438
|
+
* @description List latest height for each chain
|
|
1439
|
+
*
|
|
1440
|
+
* @tags Infos
|
|
1441
|
+
* @name GetInfosHeights
|
|
1442
|
+
* @request GET:/infos/heights
|
|
1443
|
+
*/
|
|
1444
|
+
getInfosHeights: (params: RequestParams = {}) =>
|
|
1445
|
+
this.request<PerChainHeight[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1446
|
+
path: `/infos/heights`,
|
|
1447
|
+
method: 'GET',
|
|
1448
|
+
format: 'json',
|
|
1449
|
+
...params
|
|
1450
|
+
}).then(convertHttpResponse),
|
|
1451
|
+
|
|
1452
|
+
/**
|
|
1453
|
+
* @description Get the average block time for each chain
|
|
1454
|
+
*
|
|
1455
|
+
* @tags Infos
|
|
1456
|
+
* @name GetInfosAverageBlockTimes
|
|
1457
|
+
* @request GET:/infos/average-block-times
|
|
1458
|
+
*/
|
|
1459
|
+
getInfosAverageBlockTimes: (params: RequestParams = {}) =>
|
|
1460
|
+
this.request<PerChainDuration[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>(
|
|
1461
|
+
{
|
|
1462
|
+
path: `/infos/average-block-times`,
|
|
1463
|
+
method: 'GET',
|
|
1464
|
+
format: 'json',
|
|
1465
|
+
...params
|
|
1466
|
+
}
|
|
1467
|
+
).then(convertHttpResponse)
|
|
1468
|
+
}
|
|
1469
|
+
utils = {
|
|
1470
|
+
/**
|
|
1471
|
+
* @description Perform a sanity check
|
|
1472
|
+
*
|
|
1473
|
+
* @tags Utils
|
|
1474
|
+
* @name PutUtilsSanityCheck
|
|
1475
|
+
* @request PUT:/utils/sanity-check
|
|
1476
|
+
*/
|
|
1477
|
+
putUtilsSanityCheck: (params: RequestParams = {}) =>
|
|
1478
|
+
this.request<void, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1479
|
+
path: `/utils/sanity-check`,
|
|
1480
|
+
method: 'PUT',
|
|
1481
|
+
...params
|
|
1482
|
+
}).then(convertHttpResponse),
|
|
1483
|
+
|
|
1484
|
+
/**
|
|
1485
|
+
* @description Update global log level, accepted: TRACE, DEBUG, INFO, WARN, ERROR
|
|
1486
|
+
*
|
|
1487
|
+
* @tags Utils
|
|
1488
|
+
* @name PutUtilsUpdateGlobalLoglevel
|
|
1489
|
+
* @request PUT:/utils/update-global-loglevel
|
|
1490
|
+
*/
|
|
1491
|
+
putUtilsUpdateGlobalLoglevel: (data: 'TRACE' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR', params: RequestParams = {}) =>
|
|
1492
|
+
this.request<void, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1493
|
+
path: `/utils/update-global-loglevel`,
|
|
1494
|
+
method: 'PUT',
|
|
1495
|
+
body: data,
|
|
1496
|
+
...params
|
|
1497
|
+
}).then(convertHttpResponse),
|
|
1498
|
+
|
|
1499
|
+
/**
|
|
1500
|
+
* @description Update logback values
|
|
1335
1501
|
*
|
|
1336
|
-
* @tags
|
|
1337
|
-
* @name
|
|
1338
|
-
* @request
|
|
1502
|
+
* @tags Utils
|
|
1503
|
+
* @name PutUtilsUpdateLogConfig
|
|
1504
|
+
* @request PUT:/utils/update-log-config
|
|
1339
1505
|
*/
|
|
1340
|
-
|
|
1341
|
-
this.request<
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
).then(convertHttpResponse)
|
|
1506
|
+
putUtilsUpdateLogConfig: (data?: LogbackValue[], params: RequestParams = {}) =>
|
|
1507
|
+
this.request<void, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1508
|
+
path: `/utils/update-log-config`,
|
|
1509
|
+
method: 'PUT',
|
|
1510
|
+
body: data,
|
|
1511
|
+
type: ContentType.Json,
|
|
1512
|
+
...params
|
|
1513
|
+
}).then(convertHttpResponse)
|
|
1349
1514
|
}
|
|
1350
|
-
|
|
1515
|
+
tokens = {
|
|
1351
1516
|
/**
|
|
1352
|
-
* @description
|
|
1517
|
+
* @description Return metadata for the given fungible tokens, if metadata doesn't exist or token isn't a fungible, it won't be in the output list
|
|
1353
1518
|
*
|
|
1354
|
-
* @tags
|
|
1355
|
-
* @name
|
|
1356
|
-
* @request
|
|
1519
|
+
* @tags Tokens
|
|
1520
|
+
* @name PostTokensFungibleMetadata
|
|
1521
|
+
* @request POST:/tokens/fungible-metadata
|
|
1357
1522
|
*/
|
|
1358
|
-
|
|
1359
|
-
query?: {
|
|
1360
|
-
/**
|
|
1361
|
-
* Page number
|
|
1362
|
-
* @format int32
|
|
1363
|
-
*/
|
|
1364
|
-
page?: number
|
|
1365
|
-
/**
|
|
1366
|
-
* Number of items per page
|
|
1367
|
-
* @format int32
|
|
1368
|
-
*/
|
|
1369
|
-
limit?: number
|
|
1370
|
-
},
|
|
1371
|
-
params: RequestParams = {}
|
|
1372
|
-
) =>
|
|
1523
|
+
postTokensFungibleMetadata: (data?: string[], params: RequestParams = {}) =>
|
|
1373
1524
|
this.request<
|
|
1374
|
-
|
|
1525
|
+
FungibleTokenMetadata[],
|
|
1375
1526
|
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1376
1527
|
>({
|
|
1377
|
-
path: `/
|
|
1378
|
-
method: '
|
|
1379
|
-
|
|
1528
|
+
path: `/tokens/fungible-metadata`,
|
|
1529
|
+
method: 'POST',
|
|
1530
|
+
body: data,
|
|
1531
|
+
type: ContentType.Json,
|
|
1380
1532
|
format: 'json',
|
|
1381
1533
|
...params
|
|
1382
|
-
}).then(convertHttpResponse)
|
|
1383
|
-
|
|
1384
|
-
|
|
1534
|
+
}).then(convertHttpResponse),
|
|
1535
|
+
|
|
1536
|
+
/**
|
|
1537
|
+
* @description List given tokens information
|
|
1538
|
+
*
|
|
1539
|
+
* @tags Tokens
|
|
1540
|
+
* @name PostTokens
|
|
1541
|
+
* @request POST:/tokens
|
|
1542
|
+
*/
|
|
1543
|
+
postTokens: (data?: string[], params: RequestParams = {}) =>
|
|
1544
|
+
this.request<TokenInfo[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1545
|
+
path: `/tokens`,
|
|
1546
|
+
method: 'POST',
|
|
1547
|
+
body: data,
|
|
1548
|
+
type: ContentType.Json,
|
|
1549
|
+
format: 'json',
|
|
1550
|
+
...params
|
|
1551
|
+
}).then(convertHttpResponse),
|
|
1552
|
+
|
|
1385
1553
|
/**
|
|
1386
1554
|
* @description List token information
|
|
1387
1555
|
*
|
|
@@ -1394,11 +1562,14 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1394
1562
|
/**
|
|
1395
1563
|
* Page number
|
|
1396
1564
|
* @format int32
|
|
1565
|
+
* @min 1
|
|
1397
1566
|
*/
|
|
1398
1567
|
page?: number
|
|
1399
1568
|
/**
|
|
1400
1569
|
* Number of items per page
|
|
1401
1570
|
* @format int32
|
|
1571
|
+
* @min 0
|
|
1572
|
+
* @max 100
|
|
1402
1573
|
*/
|
|
1403
1574
|
limit?: number
|
|
1404
1575
|
/**
|
|
@@ -1417,23 +1588,6 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1417
1588
|
...params
|
|
1418
1589
|
}).then(convertHttpResponse),
|
|
1419
1590
|
|
|
1420
|
-
/**
|
|
1421
|
-
* @description List given tokens information
|
|
1422
|
-
*
|
|
1423
|
-
* @tags Tokens
|
|
1424
|
-
* @name PostTokens
|
|
1425
|
-
* @request POST:/tokens
|
|
1426
|
-
*/
|
|
1427
|
-
postTokens: (data?: string[], params: RequestParams = {}) =>
|
|
1428
|
-
this.request<TokenInfo[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1429
|
-
path: `/tokens`,
|
|
1430
|
-
method: 'POST',
|
|
1431
|
-
body: data,
|
|
1432
|
-
type: ContentType.Json,
|
|
1433
|
-
format: 'json',
|
|
1434
|
-
...params
|
|
1435
|
-
}).then(convertHttpResponse),
|
|
1436
|
-
|
|
1437
1591
|
/**
|
|
1438
1592
|
* @description List token transactions
|
|
1439
1593
|
*
|
|
@@ -1447,11 +1601,14 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1447
1601
|
/**
|
|
1448
1602
|
* Page number
|
|
1449
1603
|
* @format int32
|
|
1604
|
+
* @min 1
|
|
1450
1605
|
*/
|
|
1451
1606
|
page?: number
|
|
1452
1607
|
/**
|
|
1453
1608
|
* Number of items per page
|
|
1454
1609
|
* @format int32
|
|
1610
|
+
* @min 0
|
|
1611
|
+
* @max 100
|
|
1455
1612
|
*/
|
|
1456
1613
|
limit?: number
|
|
1457
1614
|
},
|
|
@@ -1465,6 +1622,26 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1465
1622
|
...params
|
|
1466
1623
|
}).then(convertHttpResponse),
|
|
1467
1624
|
|
|
1625
|
+
/**
|
|
1626
|
+
* @description Return metadata for the given nft collection addresses, if metadata doesn't exist or address isn't a nft collection, it won't be in the output list
|
|
1627
|
+
*
|
|
1628
|
+
* @tags Tokens
|
|
1629
|
+
* @name PostTokensNftCollectionMetadata
|
|
1630
|
+
* @request POST:/tokens/nft-collection-metadata
|
|
1631
|
+
*/
|
|
1632
|
+
postTokensNftCollectionMetadata: (data?: string[], params: RequestParams = {}) =>
|
|
1633
|
+
this.request<
|
|
1634
|
+
NFTCollectionMetadata[],
|
|
1635
|
+
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1636
|
+
>({
|
|
1637
|
+
path: `/tokens/nft-collection-metadata`,
|
|
1638
|
+
method: 'POST',
|
|
1639
|
+
body: data,
|
|
1640
|
+
type: ContentType.Json,
|
|
1641
|
+
format: 'json',
|
|
1642
|
+
...params
|
|
1643
|
+
}).then(convertHttpResponse),
|
|
1644
|
+
|
|
1468
1645
|
/**
|
|
1469
1646
|
* @description List token addresses
|
|
1470
1647
|
*
|
|
@@ -1478,11 +1655,14 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1478
1655
|
/**
|
|
1479
1656
|
* Page number
|
|
1480
1657
|
* @format int32
|
|
1658
|
+
* @min 1
|
|
1481
1659
|
*/
|
|
1482
1660
|
page?: number
|
|
1483
1661
|
/**
|
|
1484
1662
|
* Number of items per page
|
|
1485
1663
|
* @format int32
|
|
1664
|
+
* @min 0
|
|
1665
|
+
* @max 100
|
|
1486
1666
|
*/
|
|
1487
1667
|
limit?: number
|
|
1488
1668
|
},
|
|
@@ -1496,26 +1676,6 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1496
1676
|
...params
|
|
1497
1677
|
}).then(convertHttpResponse),
|
|
1498
1678
|
|
|
1499
|
-
/**
|
|
1500
|
-
* @description Return metadata for the given fungible tokens, if metadata doesn't exist or token isn't a fungible, it won't be in the output list
|
|
1501
|
-
*
|
|
1502
|
-
* @tags Tokens
|
|
1503
|
-
* @name PostTokensFungibleMetadata
|
|
1504
|
-
* @request POST:/tokens/fungible-metadata
|
|
1505
|
-
*/
|
|
1506
|
-
postTokensFungibleMetadata: (data?: string[], params: RequestParams = {}) =>
|
|
1507
|
-
this.request<
|
|
1508
|
-
FungibleTokenMetadata[],
|
|
1509
|
-
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1510
|
-
>({
|
|
1511
|
-
path: `/tokens/fungible-metadata`,
|
|
1512
|
-
method: 'POST',
|
|
1513
|
-
body: data,
|
|
1514
|
-
type: ContentType.Json,
|
|
1515
|
-
format: 'json',
|
|
1516
|
-
...params
|
|
1517
|
-
}).then(convertHttpResponse),
|
|
1518
|
-
|
|
1519
1679
|
/**
|
|
1520
1680
|
* @description Return metadata for the given nft tokens, if metadata doesn't exist or token isn't a nft, it won't be in the output list
|
|
1521
1681
|
*
|
|
@@ -1531,128 +1691,156 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1531
1691
|
type: ContentType.Json,
|
|
1532
1692
|
format: 'json',
|
|
1533
1693
|
...params
|
|
1534
|
-
}).then(convertHttpResponse)
|
|
1535
|
-
|
|
1694
|
+
}).then(convertHttpResponse)
|
|
1695
|
+
}
|
|
1696
|
+
market = {
|
|
1536
1697
|
/**
|
|
1537
|
-
*
|
|
1698
|
+
* No description
|
|
1538
1699
|
*
|
|
1539
|
-
* @tags
|
|
1540
|
-
* @name
|
|
1541
|
-
* @request POST:/
|
|
1700
|
+
* @tags Market
|
|
1701
|
+
* @name PostMarketPrices
|
|
1702
|
+
* @request POST:/market/prices
|
|
1542
1703
|
*/
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1704
|
+
postMarketPrices: (
|
|
1705
|
+
query: {
|
|
1706
|
+
currency: string
|
|
1707
|
+
},
|
|
1708
|
+
data?: string[],
|
|
1709
|
+
params: RequestParams = {}
|
|
1710
|
+
) =>
|
|
1711
|
+
this.request<number[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1712
|
+
path: `/market/prices`,
|
|
1549
1713
|
method: 'POST',
|
|
1714
|
+
query: query,
|
|
1550
1715
|
body: data,
|
|
1551
1716
|
type: ContentType.Json,
|
|
1552
1717
|
format: 'json',
|
|
1553
1718
|
...params
|
|
1554
|
-
}).then(convertHttpResponse)
|
|
1555
|
-
|
|
1556
|
-
charts = {
|
|
1719
|
+
}).then(convertHttpResponse),
|
|
1720
|
+
|
|
1557
1721
|
/**
|
|
1558
|
-
*
|
|
1722
|
+
* No description
|
|
1559
1723
|
*
|
|
1560
|
-
* @tags
|
|
1561
|
-
* @name
|
|
1562
|
-
* @
|
|
1563
|
-
* @request GET:/charts/hashrates
|
|
1724
|
+
* @tags Market
|
|
1725
|
+
* @name GetMarketPricesSymbolCharts
|
|
1726
|
+
* @request GET:/market/prices/{symbol}/charts
|
|
1564
1727
|
*/
|
|
1565
|
-
|
|
1728
|
+
getMarketPricesSymbolCharts: (
|
|
1729
|
+
symbol: string,
|
|
1566
1730
|
query: {
|
|
1567
|
-
|
|
1568
|
-
* @format int64
|
|
1569
|
-
* @min 0
|
|
1570
|
-
*/
|
|
1571
|
-
fromTs: number
|
|
1572
|
-
/**
|
|
1573
|
-
* @format int64
|
|
1574
|
-
* @min 0
|
|
1575
|
-
*/
|
|
1576
|
-
toTs: number
|
|
1577
|
-
'interval-type': IntervalType
|
|
1731
|
+
currency: string
|
|
1578
1732
|
},
|
|
1579
1733
|
params: RequestParams = {}
|
|
1580
1734
|
) =>
|
|
1581
|
-
this.request<
|
|
1582
|
-
path: `/charts
|
|
1735
|
+
this.request<TimedPrices, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1736
|
+
path: `/market/prices/${symbol}/charts`,
|
|
1583
1737
|
method: 'GET',
|
|
1584
1738
|
query: query,
|
|
1585
1739
|
format: 'json',
|
|
1586
1740
|
...params
|
|
1587
|
-
}).then(convertHttpResponse)
|
|
1588
|
-
|
|
1741
|
+
}).then(convertHttpResponse)
|
|
1742
|
+
}
|
|
1743
|
+
blocks = {
|
|
1589
1744
|
/**
|
|
1590
|
-
* @description
|
|
1745
|
+
* @description Get block's transactions
|
|
1591
1746
|
*
|
|
1592
|
-
* @tags
|
|
1593
|
-
* @name
|
|
1594
|
-
* @
|
|
1595
|
-
* @request GET:/charts/transactions-count
|
|
1747
|
+
* @tags Blocks
|
|
1748
|
+
* @name GetBlocksBlockHashTransactions
|
|
1749
|
+
* @request GET:/blocks/{block_hash}/transactions
|
|
1596
1750
|
*/
|
|
1597
|
-
|
|
1598
|
-
|
|
1751
|
+
getBlocksBlockHashTransactions: (
|
|
1752
|
+
blockHash: string,
|
|
1753
|
+
query?: {
|
|
1599
1754
|
/**
|
|
1600
|
-
*
|
|
1601
|
-
* @
|
|
1755
|
+
* Page number
|
|
1756
|
+
* @format int32
|
|
1757
|
+
* @min 1
|
|
1602
1758
|
*/
|
|
1603
|
-
|
|
1759
|
+
page?: number
|
|
1604
1760
|
/**
|
|
1605
|
-
*
|
|
1761
|
+
* Number of items per page
|
|
1762
|
+
* @format int32
|
|
1606
1763
|
* @min 0
|
|
1764
|
+
* @max 100
|
|
1607
1765
|
*/
|
|
1608
|
-
|
|
1609
|
-
'interval-type': IntervalType
|
|
1766
|
+
limit?: number
|
|
1610
1767
|
},
|
|
1611
1768
|
params: RequestParams = {}
|
|
1612
1769
|
) =>
|
|
1613
|
-
this.request<
|
|
1614
|
-
path: `/
|
|
1770
|
+
this.request<Transaction[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1771
|
+
path: `/blocks/${blockHash}/transactions`,
|
|
1772
|
+
method: 'GET',
|
|
1773
|
+
query: query,
|
|
1774
|
+
format: 'json',
|
|
1775
|
+
...params
|
|
1776
|
+
}).then(convertHttpResponse),
|
|
1777
|
+
|
|
1778
|
+
/**
|
|
1779
|
+
* @description Get a block with hash
|
|
1780
|
+
*
|
|
1781
|
+
* @tags Blocks
|
|
1782
|
+
* @name GetBlocksBlockHash
|
|
1783
|
+
* @request GET:/blocks/{block_hash}
|
|
1784
|
+
*/
|
|
1785
|
+
getBlocksBlockHash: (blockHash: string, params: RequestParams = {}) =>
|
|
1786
|
+
this.request<BlockEntry, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1787
|
+
path: `/blocks/${blockHash}`,
|
|
1615
1788
|
method: 'GET',
|
|
1616
|
-
query: query,
|
|
1617
1789
|
format: 'json',
|
|
1618
1790
|
...params
|
|
1619
1791
|
}).then(convertHttpResponse),
|
|
1620
1792
|
|
|
1621
1793
|
/**
|
|
1622
|
-
* @description
|
|
1794
|
+
* @description List latest blocks
|
|
1623
1795
|
*
|
|
1624
|
-
* @tags
|
|
1625
|
-
* @name
|
|
1626
|
-
* @
|
|
1627
|
-
* @request GET:/charts/transactions-count-per-chain
|
|
1796
|
+
* @tags Blocks
|
|
1797
|
+
* @name GetBlocks
|
|
1798
|
+
* @request GET:/blocks
|
|
1628
1799
|
*/
|
|
1629
|
-
|
|
1630
|
-
query
|
|
1800
|
+
getBlocks: (
|
|
1801
|
+
query?: {
|
|
1631
1802
|
/**
|
|
1632
|
-
*
|
|
1633
|
-
* @
|
|
1803
|
+
* Page number
|
|
1804
|
+
* @format int32
|
|
1805
|
+
* @min 1
|
|
1634
1806
|
*/
|
|
1635
|
-
|
|
1807
|
+
page?: number
|
|
1636
1808
|
/**
|
|
1637
|
-
*
|
|
1809
|
+
* Number of items per page
|
|
1810
|
+
* @format int32
|
|
1638
1811
|
* @min 0
|
|
1812
|
+
* @max 100
|
|
1639
1813
|
*/
|
|
1640
|
-
|
|
1641
|
-
|
|
1814
|
+
limit?: number
|
|
1815
|
+
/** Reverse pagination */
|
|
1816
|
+
reverse?: boolean
|
|
1642
1817
|
},
|
|
1643
1818
|
params: RequestParams = {}
|
|
1644
1819
|
) =>
|
|
1645
|
-
this.request<
|
|
1646
|
-
|
|
1647
|
-
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1648
|
-
>({
|
|
1649
|
-
path: `/charts/transactions-count-per-chain`,
|
|
1820
|
+
this.request<ListBlocks, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1821
|
+
path: `/blocks`,
|
|
1650
1822
|
method: 'GET',
|
|
1651
1823
|
query: query,
|
|
1652
1824
|
format: 'json',
|
|
1653
1825
|
...params
|
|
1654
1826
|
}).then(convertHttpResponse)
|
|
1655
1827
|
}
|
|
1828
|
+
transactions = {
|
|
1829
|
+
/**
|
|
1830
|
+
* @description Get a transaction with hash
|
|
1831
|
+
*
|
|
1832
|
+
* @tags Transactions
|
|
1833
|
+
* @name GetTransactionsTransactionHash
|
|
1834
|
+
* @request GET:/transactions/{transaction_hash}
|
|
1835
|
+
*/
|
|
1836
|
+
getTransactionsTransactionHash: (transactionHash: string, params: RequestParams = {}) =>
|
|
1837
|
+
this.request<TransactionLike, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1838
|
+
path: `/transactions/${transactionHash}`,
|
|
1839
|
+
method: 'GET',
|
|
1840
|
+
format: 'json',
|
|
1841
|
+
...params
|
|
1842
|
+
}).then(convertHttpResponse)
|
|
1843
|
+
}
|
|
1656
1844
|
contractEvents = {
|
|
1657
1845
|
/**
|
|
1658
1846
|
* @description Get contract events by transaction id
|
|
@@ -1682,11 +1870,14 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1682
1870
|
/**
|
|
1683
1871
|
* Page number
|
|
1684
1872
|
* @format int32
|
|
1873
|
+
* @min 1
|
|
1685
1874
|
*/
|
|
1686
1875
|
page?: number
|
|
1687
1876
|
/**
|
|
1688
1877
|
* Number of items per page
|
|
1689
1878
|
* @format int32
|
|
1879
|
+
* @min 0
|
|
1880
|
+
* @max 100
|
|
1690
1881
|
*/
|
|
1691
1882
|
limit?: number
|
|
1692
1883
|
},
|
|
@@ -1714,11 +1905,14 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1714
1905
|
/**
|
|
1715
1906
|
* Page number
|
|
1716
1907
|
* @format int32
|
|
1908
|
+
* @min 1
|
|
1717
1909
|
*/
|
|
1718
1910
|
page?: number
|
|
1719
1911
|
/**
|
|
1720
1912
|
* Number of items per page
|
|
1721
1913
|
* @format int32
|
|
1914
|
+
* @min 0
|
|
1915
|
+
* @max 100
|
|
1722
1916
|
*/
|
|
1723
1917
|
limit?: number
|
|
1724
1918
|
},
|
|
@@ -1732,158 +1926,140 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1732
1926
|
...params
|
|
1733
1927
|
}).then(convertHttpResponse)
|
|
1734
1928
|
}
|
|
1735
|
-
|
|
1736
|
-
/**
|
|
1737
|
-
* @description Get contract liveness
|
|
1738
|
-
*
|
|
1739
|
-
* @tags Contracts
|
|
1740
|
-
* @name GetContractsContractAddressCurrentLiveness
|
|
1741
|
-
* @request GET:/contracts/{contract_address}/current-liveness
|
|
1742
|
-
*/
|
|
1743
|
-
getContractsContractAddressCurrentLiveness: (contractAddress: string, params: RequestParams = {}) =>
|
|
1744
|
-
this.request<ContractLiveness, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1745
|
-
path: `/contracts/${contractAddress}/current-liveness`,
|
|
1746
|
-
method: 'GET',
|
|
1747
|
-
format: 'json',
|
|
1748
|
-
...params
|
|
1749
|
-
}).then(convertHttpResponse),
|
|
1750
|
-
|
|
1751
|
-
/**
|
|
1752
|
-
* @description Get contract parent address if exist
|
|
1753
|
-
*
|
|
1754
|
-
* @tags Contracts
|
|
1755
|
-
* @name GetContractsContractAddressParent
|
|
1756
|
-
* @request GET:/contracts/{contract_address}/parent
|
|
1757
|
-
*/
|
|
1758
|
-
getContractsContractAddressParent: (contractAddress: string, params: RequestParams = {}) =>
|
|
1759
|
-
this.request<ContractParent, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1760
|
-
path: `/contracts/${contractAddress}/parent`,
|
|
1761
|
-
method: 'GET',
|
|
1762
|
-
format: 'json',
|
|
1763
|
-
...params
|
|
1764
|
-
}).then(convertHttpResponse),
|
|
1765
|
-
|
|
1929
|
+
charts = {
|
|
1766
1930
|
/**
|
|
1767
|
-
* @description
|
|
1931
|
+
* @description `interval-type` query param: hourly, daily
|
|
1768
1932
|
*
|
|
1769
|
-
* @tags
|
|
1770
|
-
* @name
|
|
1771
|
-
* @
|
|
1933
|
+
* @tags Charts
|
|
1934
|
+
* @name GetChartsTransactionsCountPerChain
|
|
1935
|
+
* @summary Get transaction count history per chain
|
|
1936
|
+
* @request GET:/charts/transactions-count-per-chain
|
|
1772
1937
|
*/
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
query?: {
|
|
1938
|
+
getChartsTransactionsCountPerChain: (
|
|
1939
|
+
query: {
|
|
1776
1940
|
/**
|
|
1777
|
-
*
|
|
1778
|
-
* @
|
|
1941
|
+
* @format int64
|
|
1942
|
+
* @min 0
|
|
1779
1943
|
*/
|
|
1780
|
-
|
|
1944
|
+
fromTs: number
|
|
1781
1945
|
/**
|
|
1782
|
-
*
|
|
1783
|
-
* @
|
|
1946
|
+
* @format int64
|
|
1947
|
+
* @min 0
|
|
1784
1948
|
*/
|
|
1785
|
-
|
|
1949
|
+
toTs: number
|
|
1950
|
+
'interval-type': IntervalType
|
|
1786
1951
|
},
|
|
1787
1952
|
params: RequestParams = {}
|
|
1788
1953
|
) =>
|
|
1789
|
-
this.request<
|
|
1790
|
-
|
|
1954
|
+
this.request<
|
|
1955
|
+
PerChainTimedCount[],
|
|
1956
|
+
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1957
|
+
>({
|
|
1958
|
+
path: `/charts/transactions-count-per-chain`,
|
|
1791
1959
|
method: 'GET',
|
|
1792
1960
|
query: query,
|
|
1793
1961
|
format: 'json',
|
|
1794
1962
|
...params
|
|
1795
|
-
}).then(convertHttpResponse)
|
|
1796
|
-
|
|
1797
|
-
market = {
|
|
1963
|
+
}).then(convertHttpResponse),
|
|
1964
|
+
|
|
1798
1965
|
/**
|
|
1799
|
-
*
|
|
1966
|
+
* @description `interval-type` query param: hourly, daily
|
|
1800
1967
|
*
|
|
1801
|
-
* @tags
|
|
1802
|
-
* @name
|
|
1803
|
-
* @
|
|
1968
|
+
* @tags Charts
|
|
1969
|
+
* @name GetChartsTransactionsCount
|
|
1970
|
+
* @summary Get transaction count history
|
|
1971
|
+
* @request GET:/charts/transactions-count
|
|
1804
1972
|
*/
|
|
1805
|
-
|
|
1973
|
+
getChartsTransactionsCount: (
|
|
1806
1974
|
query: {
|
|
1807
|
-
|
|
1975
|
+
/**
|
|
1976
|
+
* @format int64
|
|
1977
|
+
* @min 0
|
|
1978
|
+
*/
|
|
1979
|
+
fromTs: number
|
|
1980
|
+
/**
|
|
1981
|
+
* @format int64
|
|
1982
|
+
* @min 0
|
|
1983
|
+
*/
|
|
1984
|
+
toTs: number
|
|
1985
|
+
'interval-type': IntervalType
|
|
1808
1986
|
},
|
|
1809
|
-
data?: string[],
|
|
1810
1987
|
params: RequestParams = {}
|
|
1811
1988
|
) =>
|
|
1812
|
-
this.request<
|
|
1813
|
-
path: `/
|
|
1814
|
-
method: '
|
|
1989
|
+
this.request<TimedCount[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1990
|
+
path: `/charts/transactions-count`,
|
|
1991
|
+
method: 'GET',
|
|
1815
1992
|
query: query,
|
|
1816
|
-
body: data,
|
|
1817
|
-
type: ContentType.Json,
|
|
1818
1993
|
format: 'json',
|
|
1819
1994
|
...params
|
|
1820
1995
|
}).then(convertHttpResponse),
|
|
1821
1996
|
|
|
1822
1997
|
/**
|
|
1823
|
-
*
|
|
1998
|
+
* @description `interval-type` query param: hourly, daily
|
|
1824
1999
|
*
|
|
1825
|
-
* @tags
|
|
1826
|
-
* @name
|
|
1827
|
-
* @
|
|
2000
|
+
* @tags Charts
|
|
2001
|
+
* @name GetChartsHashrates
|
|
2002
|
+
* @summary Get hashrate chart in H/s
|
|
2003
|
+
* @request GET:/charts/hashrates
|
|
1828
2004
|
*/
|
|
1829
|
-
|
|
1830
|
-
symbol: string,
|
|
2005
|
+
getChartsHashrates: (
|
|
1831
2006
|
query: {
|
|
1832
|
-
|
|
2007
|
+
/**
|
|
2008
|
+
* @format int64
|
|
2009
|
+
* @min 0
|
|
2010
|
+
*/
|
|
2011
|
+
fromTs: number
|
|
2012
|
+
/**
|
|
2013
|
+
* @format int64
|
|
2014
|
+
* @min 0
|
|
2015
|
+
*/
|
|
2016
|
+
toTs: number
|
|
2017
|
+
'interval-type': IntervalType
|
|
1833
2018
|
},
|
|
1834
2019
|
params: RequestParams = {}
|
|
1835
2020
|
) =>
|
|
1836
|
-
this.request<
|
|
1837
|
-
path: `/
|
|
2021
|
+
this.request<Hashrate[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
2022
|
+
path: `/charts/hashrates`,
|
|
1838
2023
|
method: 'GET',
|
|
1839
2024
|
query: query,
|
|
1840
2025
|
format: 'json',
|
|
1841
2026
|
...params
|
|
1842
2027
|
}).then(convertHttpResponse)
|
|
1843
2028
|
}
|
|
1844
|
-
|
|
1845
|
-
/**
|
|
1846
|
-
* @description Perform a sanity check
|
|
1847
|
-
*
|
|
1848
|
-
* @tags Utils
|
|
1849
|
-
* @name PutUtilsSanityCheck
|
|
1850
|
-
* @request PUT:/utils/sanity-check
|
|
1851
|
-
*/
|
|
1852
|
-
putUtilsSanityCheck: (params: RequestParams = {}) =>
|
|
1853
|
-
this.request<void, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1854
|
-
path: `/utils/sanity-check`,
|
|
1855
|
-
method: 'PUT',
|
|
1856
|
-
...params
|
|
1857
|
-
}).then(convertHttpResponse),
|
|
1858
|
-
|
|
1859
|
-
/**
|
|
1860
|
-
* @description Update global log level, accepted: TRACE, DEBUG, INFO, WARN, ERROR
|
|
1861
|
-
*
|
|
1862
|
-
* @tags Utils
|
|
1863
|
-
* @name PutUtilsUpdateGlobalLoglevel
|
|
1864
|
-
* @request PUT:/utils/update-global-loglevel
|
|
1865
|
-
*/
|
|
1866
|
-
putUtilsUpdateGlobalLoglevel: (data: 'TRACE' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR', params: RequestParams = {}) =>
|
|
1867
|
-
this.request<void, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1868
|
-
path: `/utils/update-global-loglevel`,
|
|
1869
|
-
method: 'PUT',
|
|
1870
|
-
body: data,
|
|
1871
|
-
...params
|
|
1872
|
-
}).then(convertHttpResponse),
|
|
1873
|
-
|
|
2029
|
+
mempool = {
|
|
1874
2030
|
/**
|
|
1875
|
-
* @description
|
|
2031
|
+
* @description list mempool transactions
|
|
1876
2032
|
*
|
|
1877
|
-
* @tags
|
|
1878
|
-
* @name
|
|
1879
|
-
* @request
|
|
2033
|
+
* @tags Mempool
|
|
2034
|
+
* @name GetMempoolTransactions
|
|
2035
|
+
* @request GET:/mempool/transactions
|
|
1880
2036
|
*/
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
2037
|
+
getMempoolTransactions: (
|
|
2038
|
+
query?: {
|
|
2039
|
+
/**
|
|
2040
|
+
* Page number
|
|
2041
|
+
* @format int32
|
|
2042
|
+
* @min 1
|
|
2043
|
+
*/
|
|
2044
|
+
page?: number
|
|
2045
|
+
/**
|
|
2046
|
+
* Number of items per page
|
|
2047
|
+
* @format int32
|
|
2048
|
+
* @min 0
|
|
2049
|
+
* @max 100
|
|
2050
|
+
*/
|
|
2051
|
+
limit?: number
|
|
2052
|
+
},
|
|
2053
|
+
params: RequestParams = {}
|
|
2054
|
+
) =>
|
|
2055
|
+
this.request<
|
|
2056
|
+
MempoolTransaction[],
|
|
2057
|
+
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
2058
|
+
>({
|
|
2059
|
+
path: `/mempool/transactions`,
|
|
2060
|
+
method: 'GET',
|
|
2061
|
+
query: query,
|
|
2062
|
+
format: 'json',
|
|
1887
2063
|
...params
|
|
1888
2064
|
}).then(convertHttpResponse)
|
|
1889
2065
|
}
|