@alephium/web3 1.8.5 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alephium-web3.min.js +1 -1
- package/dist/alephium-web3.min.js.map +1 -1
- package/dist/src/api/api-alephium.d.ts +25 -6
- package/dist/src/api/api-alephium.js +33 -4
- package/dist/src/api/api-explorer.d.ts +810 -819
- package/dist/src/api/api-explorer.js +350 -360
- package/dist/src/codec/instr-codec.d.ts +2 -0
- package/dist/src/codec/instr-codec.js +54 -1
- package/dist/src/codec/unlock-script-codec.d.ts +1 -0
- package/dist/src/codec/unlock-script-codec.js +2 -1
- package/dist/src/constants.d.ts +4 -0
- package/dist/src/constants.js +5 -1
- package/dist/src/contract/contract.d.ts +5 -1
- package/dist/src/contract/contract.js +44 -8
- package/dist/src/contract/dapp-tx-builder.d.ts +26 -0
- package/dist/src/contract/dapp-tx-builder.js +187 -0
- package/dist/src/contract/events.d.ts +1 -0
- package/dist/src/contract/events.js +14 -3
- package/dist/src/contract/index.d.ts +1 -0
- package/dist/src/contract/index.js +3 -0
- package/dist/src/contract/ralph.js +2 -34
- package/dist/src/exchange/exchange.d.ts +13 -2
- package/dist/src/exchange/exchange.js +52 -14
- package/dist/src/exchange/index.d.ts +1 -1
- package/dist/src/exchange/index.js +3 -2
- package/dist/src/signer/types.d.ts +1 -0
- package/package.json +5 -5
- package/src/api/api-alephium.ts +49 -9
- package/src/api/api-explorer.ts +990 -1000
- package/src/codec/instr-codec.ts +56 -1
- package/src/codec/unlock-script-codec.ts +2 -0
- package/src/constants.ts +4 -0
- package/src/contract/contract.ts +46 -7
- package/src/contract/dapp-tx-builder.ts +209 -0
- package/src/contract/events.ts +15 -3
- package/src/contract/index.ts +1 -0
- package/src/contract/ralph.ts +4 -49
- package/src/exchange/exchange.ts +69 -17
- package/src/exchange/index.ts +10 -1
- package/src/signer/tx-builder.ts +2 -2
- package/src/signer/types.ts +1 -0
package/src/api/api-explorer.ts
CHANGED
|
@@ -9,54 +9,46 @@
|
|
|
9
9
|
* ---------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
/** ContractOutput */
|
|
16
|
-
export interface ContractOutput {
|
|
17
|
-
/** @format address */
|
|
18
|
-
address: string
|
|
19
|
-
/** @format int32 */
|
|
20
|
-
hint: number
|
|
12
|
+
/** AcceptedTransaction */
|
|
13
|
+
export interface AcceptedTransaction {
|
|
21
14
|
/** @format 32-byte-hash */
|
|
22
|
-
|
|
15
|
+
hash: string
|
|
16
|
+
/** @format block-hash */
|
|
17
|
+
blockHash: string
|
|
18
|
+
/** @format int64 */
|
|
19
|
+
timestamp: number
|
|
20
|
+
inputs?: Input[]
|
|
21
|
+
outputs?: Output[]
|
|
22
|
+
version: number
|
|
23
|
+
networkId: number
|
|
24
|
+
scriptOpt?: string
|
|
25
|
+
/** @format int32 */
|
|
26
|
+
gasAmount: number
|
|
23
27
|
/** @format uint256 */
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
gasPrice: string
|
|
29
|
+
scriptExecutionOk: boolean
|
|
30
|
+
inputSignatures?: string[]
|
|
31
|
+
scriptSignatures?: string[]
|
|
32
|
+
coinbase: boolean
|
|
27
33
|
type: string
|
|
28
|
-
/** @format 32-byte-hash */
|
|
29
|
-
key: string
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** IntervalType */
|
|
33
|
-
export enum IntervalType {
|
|
34
|
-
Daily = 'daily',
|
|
35
|
-
Hourly = 'hourly',
|
|
36
|
-
Weekly = 'weekly'
|
|
37
34
|
}
|
|
38
35
|
|
|
39
|
-
/**
|
|
40
|
-
export interface
|
|
36
|
+
/** AddressBalance */
|
|
37
|
+
export interface AddressBalance {
|
|
41
38
|
/** @format uint256 */
|
|
42
|
-
|
|
43
|
-
/** @format
|
|
44
|
-
|
|
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
|
|
39
|
+
balance: string
|
|
40
|
+
/** @format uint256 */
|
|
41
|
+
lockedBalance: string
|
|
55
42
|
}
|
|
56
43
|
|
|
57
|
-
/**
|
|
58
|
-
export interface
|
|
59
|
-
|
|
44
|
+
/** AddressInfo */
|
|
45
|
+
export interface AddressInfo {
|
|
46
|
+
/** @format uint256 */
|
|
47
|
+
balance: string
|
|
48
|
+
/** @format uint256 */
|
|
49
|
+
lockedBalance: string
|
|
50
|
+
/** @format int32 */
|
|
51
|
+
txNumber: number
|
|
60
52
|
}
|
|
61
53
|
|
|
62
54
|
/** AddressTokenBalance */
|
|
@@ -69,325 +61,271 @@ export interface AddressTokenBalance {
|
|
|
69
61
|
lockedBalance: string
|
|
70
62
|
}
|
|
71
63
|
|
|
72
|
-
/**
|
|
73
|
-
export interface
|
|
64
|
+
/** AmountHistory */
|
|
65
|
+
export interface AmountHistory {
|
|
66
|
+
amountHistory?: string[][]
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** AssetOutput */
|
|
70
|
+
export interface AssetOutput {
|
|
74
71
|
/** @format int32 */
|
|
75
72
|
hint: number
|
|
76
73
|
/** @format 32-byte-hash */
|
|
77
74
|
key: string
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/** Input */
|
|
81
|
-
export interface Input {
|
|
82
|
-
/** @format address */
|
|
83
|
-
address?: string
|
|
84
|
-
contractInput: boolean
|
|
85
|
-
/** @format hex-string */
|
|
86
|
-
unlockScript?: string
|
|
87
75
|
/** @format uint256 */
|
|
88
|
-
attoAlphAmount
|
|
76
|
+
attoAlphAmount: string
|
|
77
|
+
/** @format address */
|
|
78
|
+
address: string
|
|
89
79
|
tokens?: Token[]
|
|
90
|
-
/** @format 32-byte-hash */
|
|
91
|
-
txHashRef?: string
|
|
92
|
-
outputRef: OutputRef
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/** PerChainCount */
|
|
96
|
-
export interface PerChainCount {
|
|
97
|
-
/** @format int32 */
|
|
98
|
-
chainFrom: number
|
|
99
|
-
/** @format int32 */
|
|
100
|
-
chainTo: number
|
|
101
80
|
/** @format int64 */
|
|
102
|
-
|
|
81
|
+
lockTime?: number
|
|
82
|
+
/** @format hex-string */
|
|
83
|
+
message?: string
|
|
84
|
+
/** @format 32-byte-hash */
|
|
85
|
+
spent?: string
|
|
86
|
+
fixedOutput: boolean
|
|
87
|
+
type: string
|
|
103
88
|
}
|
|
104
89
|
|
|
105
|
-
/**
|
|
106
|
-
export interface
|
|
107
|
-
|
|
108
|
-
type: string
|
|
90
|
+
/** BadRequest */
|
|
91
|
+
export interface BadRequest {
|
|
92
|
+
detail: string
|
|
109
93
|
}
|
|
110
94
|
|
|
111
95
|
/** BlockEntry */
|
|
112
96
|
export interface BlockEntry {
|
|
113
97
|
/** @format block-hash */
|
|
114
|
-
|
|
98
|
+
hash: string
|
|
99
|
+
/** @format int64 */
|
|
100
|
+
timestamp: number
|
|
115
101
|
/** @format group-index */
|
|
116
102
|
chainFrom: number
|
|
117
|
-
/** @format
|
|
118
|
-
|
|
103
|
+
/** @format group-index */
|
|
104
|
+
chainTo: number
|
|
105
|
+
/** @format int32 */
|
|
106
|
+
height: number
|
|
119
107
|
deps?: string[]
|
|
120
108
|
/** @format hex-string */
|
|
121
109
|
nonce: string
|
|
122
110
|
version: number
|
|
123
|
-
/** @format
|
|
124
|
-
|
|
125
|
-
mainChain: boolean
|
|
111
|
+
/** @format 32-byte-hash */
|
|
112
|
+
depStateHash: string
|
|
126
113
|
/** @format 32-byte-hash */
|
|
127
114
|
txsHash: string
|
|
128
|
-
/** @format group-index */
|
|
129
|
-
chainTo: number
|
|
130
|
-
ghostUncles?: GhostUncle[]
|
|
131
|
-
/** @format bigint */
|
|
132
|
-
hashRate: string
|
|
133
115
|
/** @format int32 */
|
|
134
116
|
txNumber: number
|
|
117
|
+
/** @format hex-string */
|
|
118
|
+
target: string
|
|
119
|
+
/** @format bigint */
|
|
120
|
+
hashRate: string
|
|
135
121
|
/** @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
122
|
parent?: string
|
|
123
|
+
mainChain: boolean
|
|
124
|
+
ghostUncles?: GhostUncle[]
|
|
147
125
|
}
|
|
148
126
|
|
|
149
|
-
/**
|
|
150
|
-
export interface
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
127
|
+
/** BlockEntryLite */
|
|
128
|
+
export interface BlockEntryLite {
|
|
129
|
+
/** @format block-hash */
|
|
130
|
+
hash: string
|
|
131
|
+
/** @format int64 */
|
|
132
|
+
timestamp: number
|
|
133
|
+
/** @format group-index */
|
|
134
|
+
chainFrom: number
|
|
135
|
+
/** @format group-index */
|
|
136
|
+
chainTo: number
|
|
137
|
+
/** @format int32 */
|
|
138
|
+
height: number
|
|
139
|
+
/** @format int32 */
|
|
140
|
+
txNumber: number
|
|
141
|
+
mainChain: boolean
|
|
157
142
|
/** @format bigint */
|
|
158
|
-
|
|
143
|
+
hashRate: string
|
|
159
144
|
}
|
|
160
145
|
|
|
161
146
|
/** ContractLiveness */
|
|
162
147
|
export interface ContractLiveness {
|
|
163
148
|
/** @format address */
|
|
164
149
|
parent?: string
|
|
165
|
-
interfaceId?: StdInterfaceId
|
|
166
|
-
destruction?: ContractLivenessLocation
|
|
167
150
|
creation: ContractLivenessLocation
|
|
151
|
+
destruction?: ContractLivenessLocation
|
|
152
|
+
interfaceId?: StdInterfaceId
|
|
168
153
|
}
|
|
169
154
|
|
|
170
|
-
/**
|
|
171
|
-
export interface
|
|
172
|
-
/** @format
|
|
173
|
-
|
|
155
|
+
/** ContractLivenessLocation */
|
|
156
|
+
export interface ContractLivenessLocation {
|
|
157
|
+
/** @format block-hash */
|
|
158
|
+
blockHash: string
|
|
159
|
+
/** @format 32-byte-hash */
|
|
160
|
+
txHash: string
|
|
174
161
|
/** @format int64 */
|
|
175
|
-
|
|
162
|
+
timestamp: number
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** ContractOutput */
|
|
166
|
+
export interface ContractOutput {
|
|
176
167
|
/** @format int32 */
|
|
177
168
|
hint: number
|
|
178
169
|
/** @format 32-byte-hash */
|
|
179
|
-
|
|
170
|
+
key: string
|
|
180
171
|
/** @format uint256 */
|
|
181
172
|
attoAlphAmount: string
|
|
173
|
+
/** @format address */
|
|
174
|
+
address: string
|
|
182
175
|
tokens?: Token[]
|
|
176
|
+
/** @format 32-byte-hash */
|
|
177
|
+
spent?: string
|
|
183
178
|
fixedOutput: boolean
|
|
184
179
|
type: string
|
|
185
|
-
/** @format hex-string */
|
|
186
|
-
message?: string
|
|
187
|
-
/** @format 32-byte-hash */
|
|
188
|
-
key: string
|
|
189
180
|
}
|
|
190
181
|
|
|
191
|
-
/**
|
|
192
|
-
export interface
|
|
193
|
-
|
|
194
|
-
|
|
182
|
+
/** ContractParent */
|
|
183
|
+
export interface ContractParent {
|
|
184
|
+
/** @format address */
|
|
185
|
+
parent?: string
|
|
195
186
|
}
|
|
196
187
|
|
|
197
|
-
/**
|
|
198
|
-
export interface
|
|
199
|
-
outputs?: Output[]
|
|
188
|
+
/** Event */
|
|
189
|
+
export interface Event {
|
|
200
190
|
/** @format block-hash */
|
|
201
191
|
blockHash: string
|
|
202
|
-
scriptSignatures?: string[]
|
|
203
|
-
inputs?: Input[]
|
|
204
|
-
scriptExecutionOk: boolean
|
|
205
|
-
type: string
|
|
206
|
-
scriptOpt?: string
|
|
207
|
-
version: number
|
|
208
|
-
coinbase: boolean
|
|
209
|
-
inputSignatures?: string[]
|
|
210
|
-
/** @format int32 */
|
|
211
|
-
gasAmount: number
|
|
212
|
-
networkId: number
|
|
213
192
|
/** @format 32-byte-hash */
|
|
214
|
-
|
|
215
|
-
/** @format uint256 */
|
|
216
|
-
gasPrice: string
|
|
217
|
-
/** @format int64 */
|
|
218
|
-
timestamp: number
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/** HolderInfo */
|
|
222
|
-
export interface HolderInfo {
|
|
193
|
+
txHash: string
|
|
223
194
|
/** @format address */
|
|
224
|
-
|
|
225
|
-
/** @format
|
|
226
|
-
|
|
195
|
+
contractAddress: string
|
|
196
|
+
/** @format address */
|
|
197
|
+
inputAddress?: string
|
|
198
|
+
/** @format int32 */
|
|
199
|
+
eventIndex: number
|
|
200
|
+
fields?: Val[]
|
|
227
201
|
}
|
|
228
202
|
|
|
229
|
-
/**
|
|
230
|
-
export interface
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
/** @format
|
|
234
|
-
|
|
235
|
-
/** @format uint256 */
|
|
236
|
-
reserved: string
|
|
237
|
-
/** @format uint256 */
|
|
238
|
-
maximum: string
|
|
239
|
-
/** @format uint256 */
|
|
240
|
-
locked: string
|
|
203
|
+
/** ExplorerInfo */
|
|
204
|
+
export interface ExplorerInfo {
|
|
205
|
+
releaseVersion: string
|
|
206
|
+
commit: string
|
|
207
|
+
/** @format int32 */
|
|
208
|
+
migrationsVersion: number
|
|
241
209
|
/** @format int64 */
|
|
242
|
-
|
|
210
|
+
lastFinalizedInputTime: number
|
|
211
|
+
/** @format int64 */
|
|
212
|
+
lastHoldersUpdate: number
|
|
243
213
|
}
|
|
244
214
|
|
|
245
|
-
/**
|
|
246
|
-
export interface
|
|
247
|
-
|
|
248
|
-
/** @format group-index */
|
|
249
|
-
chainFrom: number
|
|
250
|
-
/** @format int64 */
|
|
251
|
-
lastSeen: number
|
|
252
|
-
/** @format group-index */
|
|
253
|
-
chainTo: number
|
|
254
|
-
inputs?: Input[]
|
|
255
|
-
/** @format int32 */
|
|
256
|
-
gasAmount: number
|
|
215
|
+
/** FungibleToken */
|
|
216
|
+
export interface FungibleToken {
|
|
217
|
+
id: string
|
|
257
218
|
type: string
|
|
258
|
-
/** @format 32-byte-hash */
|
|
259
|
-
hash: string
|
|
260
|
-
/** @format uint256 */
|
|
261
|
-
gasPrice: string
|
|
262
219
|
}
|
|
263
220
|
|
|
264
|
-
/**
|
|
265
|
-
export
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
level: string
|
|
221
|
+
/** FungibleTokenMetadata */
|
|
222
|
+
export interface FungibleTokenMetadata {
|
|
223
|
+
/** @format 32-byte-hash */
|
|
224
|
+
id: string
|
|
225
|
+
symbol: string
|
|
270
226
|
name: string
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
/** ValU256 */
|
|
274
|
-
export interface ValU256 {
|
|
275
|
-
type: string
|
|
276
227
|
/** @format uint256 */
|
|
277
|
-
|
|
228
|
+
decimals: string
|
|
278
229
|
}
|
|
279
230
|
|
|
280
|
-
/**
|
|
281
|
-
export interface
|
|
282
|
-
mainChain: boolean
|
|
283
|
-
/** @format group-index */
|
|
284
|
-
chainFrom: number
|
|
285
|
-
/** @format group-index */
|
|
286
|
-
chainTo: number
|
|
287
|
-
/** @format bigint */
|
|
288
|
-
hashRate: string
|
|
289
|
-
/** @format int32 */
|
|
290
|
-
txNumber: number
|
|
231
|
+
/** GhostUncle */
|
|
232
|
+
export interface GhostUncle {
|
|
291
233
|
/** @format block-hash */
|
|
292
|
-
|
|
293
|
-
/** @format
|
|
294
|
-
|
|
295
|
-
/** @format int64 */
|
|
296
|
-
timestamp: number
|
|
234
|
+
blockHash: string
|
|
235
|
+
/** @format address */
|
|
236
|
+
miner: string
|
|
297
237
|
}
|
|
298
238
|
|
|
299
|
-
/**
|
|
300
|
-
export interface
|
|
301
|
-
/** @format int32 */
|
|
302
|
-
chainFrom: number
|
|
303
|
-
/** @format int32 */
|
|
304
|
-
chainTo: number
|
|
239
|
+
/** Hashrate */
|
|
240
|
+
export interface Hashrate {
|
|
305
241
|
/** @format int64 */
|
|
242
|
+
timestamp: number
|
|
243
|
+
hashrate: number
|
|
306
244
|
value: number
|
|
307
|
-
/** @format int64 */
|
|
308
|
-
height: number
|
|
309
245
|
}
|
|
310
246
|
|
|
311
|
-
/**
|
|
312
|
-
export interface
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
247
|
+
/** HolderInfo */
|
|
248
|
+
export interface HolderInfo {
|
|
249
|
+
/** @format address */
|
|
250
|
+
address: string
|
|
251
|
+
/** @format uint256 */
|
|
252
|
+
balance: string
|
|
316
253
|
}
|
|
317
254
|
|
|
318
|
-
/**
|
|
319
|
-
export
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
255
|
+
/** Input */
|
|
256
|
+
export interface Input {
|
|
257
|
+
outputRef: OutputRef
|
|
258
|
+
/** @format hex-string */
|
|
259
|
+
unlockScript?: string
|
|
260
|
+
/** @format 32-byte-hash */
|
|
261
|
+
txHashRef?: string
|
|
262
|
+
/** @format address */
|
|
263
|
+
address?: string
|
|
264
|
+
/** @format uint256 */
|
|
265
|
+
attoAlphAmount?: string
|
|
266
|
+
tokens?: Token[]
|
|
267
|
+
contractInput: boolean
|
|
323
268
|
}
|
|
324
269
|
|
|
325
|
-
/**
|
|
326
|
-
export interface
|
|
327
|
-
|
|
328
|
-
commit: string
|
|
329
|
-
/** @format int64 */
|
|
330
|
-
lastHoldersUpdate: number
|
|
331
|
-
/** @format int32 */
|
|
332
|
-
migrationsVersion: number
|
|
333
|
-
/** @format int64 */
|
|
334
|
-
lastFinalizedInputTime: number
|
|
270
|
+
/** InternalServerError */
|
|
271
|
+
export interface InternalServerError {
|
|
272
|
+
detail: string
|
|
335
273
|
}
|
|
336
274
|
|
|
337
|
-
/**
|
|
338
|
-
export
|
|
339
|
-
|
|
340
|
-
|
|
275
|
+
/** IntervalType */
|
|
276
|
+
export enum IntervalType {
|
|
277
|
+
Daily = 'daily',
|
|
278
|
+
Hourly = 'hourly',
|
|
279
|
+
Weekly = 'weekly'
|
|
341
280
|
}
|
|
342
281
|
|
|
343
|
-
/**
|
|
344
|
-
export interface
|
|
345
|
-
|
|
282
|
+
/** ListBlocks */
|
|
283
|
+
export interface ListBlocks {
|
|
284
|
+
/** @format int32 */
|
|
285
|
+
total: number
|
|
286
|
+
blocks?: BlockEntryLite[]
|
|
346
287
|
}
|
|
347
288
|
|
|
348
|
-
/**
|
|
349
|
-
export interface
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
/** @format int64 */
|
|
353
|
-
timestamp: number
|
|
289
|
+
/** LogbackValue */
|
|
290
|
+
export interface LogbackValue {
|
|
291
|
+
name: string
|
|
292
|
+
level: string
|
|
354
293
|
}
|
|
355
294
|
|
|
356
|
-
/**
|
|
357
|
-
export interface
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
295
|
+
/** MempoolTransaction */
|
|
296
|
+
export interface MempoolTransaction {
|
|
297
|
+
/** @format 32-byte-hash */
|
|
298
|
+
hash: string
|
|
299
|
+
/** @format group-index */
|
|
300
|
+
chainFrom: number
|
|
301
|
+
/** @format group-index */
|
|
302
|
+
chainTo: number
|
|
362
303
|
inputs?: Input[]
|
|
363
|
-
|
|
364
|
-
scriptOpt?: string
|
|
365
|
-
version: number
|
|
366
|
-
coinbase: boolean
|
|
367
|
-
inputSignatures?: string[]
|
|
304
|
+
outputs?: Output[]
|
|
368
305
|
/** @format int32 */
|
|
369
306
|
gasAmount: number
|
|
370
|
-
networkId: number
|
|
371
|
-
/** @format 32-byte-hash */
|
|
372
|
-
hash: string
|
|
373
307
|
/** @format uint256 */
|
|
374
308
|
gasPrice: string
|
|
375
309
|
/** @format int64 */
|
|
376
|
-
|
|
310
|
+
lastSeen: number
|
|
377
311
|
}
|
|
378
312
|
|
|
379
|
-
/**
|
|
380
|
-
export interface
|
|
313
|
+
/** NFT */
|
|
314
|
+
export interface NFT {
|
|
381
315
|
id: string
|
|
382
316
|
type: string
|
|
383
317
|
}
|
|
384
318
|
|
|
385
|
-
/**
|
|
386
|
-
export interface
|
|
387
|
-
|
|
388
|
-
|
|
319
|
+
/** NFTCollection */
|
|
320
|
+
export interface NFTCollection {
|
|
321
|
+
type: string
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/** NFTCollectionMetadata */
|
|
325
|
+
export interface NFTCollectionMetadata {
|
|
389
326
|
/** @format address */
|
|
390
|
-
|
|
327
|
+
address: string
|
|
328
|
+
collectionUri: string
|
|
391
329
|
}
|
|
392
330
|
|
|
393
331
|
/** NFTCollectionWithRoyalty */
|
|
@@ -395,140 +333,259 @@ export interface NFTCollectionWithRoyalty {
|
|
|
395
333
|
type: string
|
|
396
334
|
}
|
|
397
335
|
|
|
398
|
-
/**
|
|
399
|
-
export interface
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
336
|
+
/** NFTMetadata */
|
|
337
|
+
export interface NFTMetadata {
|
|
338
|
+
/** @format 32-byte-hash */
|
|
339
|
+
id: string
|
|
340
|
+
tokenUri: string
|
|
341
|
+
/** @format 32-byte-hash */
|
|
342
|
+
collectionId: string
|
|
343
|
+
/** @format uint256 */
|
|
344
|
+
nftIndex: string
|
|
403
345
|
}
|
|
404
346
|
|
|
405
|
-
/**
|
|
406
|
-
export interface
|
|
407
|
-
|
|
347
|
+
/** NonStandard */
|
|
348
|
+
export interface NonStandard {
|
|
349
|
+
type: string
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/** NotFound */
|
|
353
|
+
export interface NotFound {
|
|
354
|
+
detail: string
|
|
355
|
+
resource: string
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/** Output */
|
|
359
|
+
export type Output = AssetOutput | ContractOutput
|
|
360
|
+
|
|
361
|
+
/** OutputRef */
|
|
362
|
+
export interface OutputRef {
|
|
363
|
+
/** @format int32 */
|
|
364
|
+
hint: number
|
|
365
|
+
/** @format 32-byte-hash */
|
|
366
|
+
key: string
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/** PendingTransaction */
|
|
370
|
+
export interface PendingTransaction {
|
|
371
|
+
/** @format 32-byte-hash */
|
|
372
|
+
hash: string
|
|
408
373
|
/** @format group-index */
|
|
409
374
|
chainFrom: number
|
|
410
|
-
/** @format int64 */
|
|
411
|
-
lastSeen: number
|
|
412
375
|
/** @format group-index */
|
|
413
376
|
chainTo: number
|
|
414
377
|
inputs?: Input[]
|
|
378
|
+
outputs?: Output[]
|
|
415
379
|
/** @format int32 */
|
|
416
380
|
gasAmount: number
|
|
417
|
-
/** @format 32-byte-hash */
|
|
418
|
-
hash: string
|
|
419
381
|
/** @format uint256 */
|
|
420
382
|
gasPrice: string
|
|
383
|
+
/** @format int64 */
|
|
384
|
+
lastSeen: number
|
|
385
|
+
type: string
|
|
421
386
|
}
|
|
422
387
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
388
|
+
/** PerChainCount */
|
|
389
|
+
export interface PerChainCount {
|
|
390
|
+
/** @format int32 */
|
|
391
|
+
chainFrom: number
|
|
392
|
+
/** @format int32 */
|
|
393
|
+
chainTo: number
|
|
394
|
+
/** @format int64 */
|
|
395
|
+
count: number
|
|
431
396
|
}
|
|
432
397
|
|
|
433
|
-
|
|
434
|
-
|
|
398
|
+
/** PerChainDuration */
|
|
399
|
+
export interface PerChainDuration {
|
|
400
|
+
/** @format int32 */
|
|
401
|
+
chainFrom: number
|
|
402
|
+
/** @format int32 */
|
|
403
|
+
chainTo: number
|
|
404
|
+
/** @format int64 */
|
|
405
|
+
duration: number
|
|
406
|
+
/** @format int64 */
|
|
407
|
+
value: number
|
|
435
408
|
}
|
|
436
409
|
|
|
437
|
-
/**
|
|
438
|
-
export interface
|
|
439
|
-
|
|
410
|
+
/** PerChainHeight */
|
|
411
|
+
export interface PerChainHeight {
|
|
412
|
+
/** @format int32 */
|
|
413
|
+
chainFrom: number
|
|
414
|
+
/** @format int32 */
|
|
415
|
+
chainTo: number
|
|
416
|
+
/** @format int64 */
|
|
417
|
+
height: number
|
|
418
|
+
/** @format int64 */
|
|
419
|
+
value: number
|
|
440
420
|
}
|
|
441
421
|
|
|
442
|
-
|
|
443
|
-
|
|
422
|
+
/** PerChainTimedCount */
|
|
423
|
+
export interface PerChainTimedCount {
|
|
424
|
+
/** @format int64 */
|
|
425
|
+
timestamp: number
|
|
426
|
+
totalCountPerChain?: PerChainCount[]
|
|
444
427
|
}
|
|
445
428
|
|
|
446
|
-
/**
|
|
447
|
-
export interface
|
|
429
|
+
/** ServiceUnavailable */
|
|
430
|
+
export interface ServiceUnavailable {
|
|
448
431
|
detail: string
|
|
449
432
|
}
|
|
450
433
|
|
|
451
|
-
/**
|
|
452
|
-
export
|
|
453
|
-
|
|
454
|
-
|
|
434
|
+
/** StdInterfaceId */
|
|
435
|
+
export type StdInterfaceId = FungibleToken | NFT | NFTCollection | NFTCollectionWithRoyalty | NonStandard | Unknown
|
|
436
|
+
|
|
437
|
+
/** SubContracts */
|
|
438
|
+
export interface SubContracts {
|
|
439
|
+
subContracts?: string[]
|
|
455
440
|
}
|
|
456
441
|
|
|
457
442
|
/** TimedCount */
|
|
458
443
|
export interface TimedCount {
|
|
459
|
-
/** @format int64 */
|
|
460
|
-
totalCountAllChains: number
|
|
461
444
|
/** @format int64 */
|
|
462
445
|
timestamp: number
|
|
446
|
+
/** @format int64 */
|
|
447
|
+
totalCountAllChains: number
|
|
463
448
|
}
|
|
464
449
|
|
|
465
|
-
/**
|
|
466
|
-
export interface
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
450
|
+
/** TimedPrices */
|
|
451
|
+
export interface TimedPrices {
|
|
452
|
+
timestamps?: number[]
|
|
453
|
+
prices?: number[]
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/** Token */
|
|
457
|
+
export interface Token {
|
|
470
458
|
/** @format 32-byte-hash */
|
|
471
459
|
id: string
|
|
472
|
-
/** @format
|
|
473
|
-
|
|
460
|
+
/** @format uint256 */
|
|
461
|
+
amount: string
|
|
474
462
|
}
|
|
475
463
|
|
|
476
|
-
/**
|
|
477
|
-
export interface
|
|
478
|
-
/** @format
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
|
|
482
|
-
/** @format int32 */
|
|
483
|
-
chainTo: number
|
|
484
|
-
/** @format int64 */
|
|
485
|
-
value: number
|
|
464
|
+
/** TokenInfo */
|
|
465
|
+
export interface TokenInfo {
|
|
466
|
+
/** @format 32-byte-hash */
|
|
467
|
+
token: string
|
|
468
|
+
/** Raw interface id, e.g. 0001 */
|
|
469
|
+
stdInterfaceId?: TokenStdInterfaceId | string
|
|
486
470
|
}
|
|
487
471
|
|
|
488
|
-
/**
|
|
489
|
-
export
|
|
472
|
+
/** TokenStdInterfaceId */
|
|
473
|
+
export enum TokenStdInterfaceId {
|
|
474
|
+
Fungible = 'fungible',
|
|
475
|
+
NonFungible = 'non-fungible',
|
|
476
|
+
NonStandard = 'non-standard'
|
|
477
|
+
}
|
|
490
478
|
|
|
491
|
-
/**
|
|
492
|
-
export
|
|
479
|
+
/** TokenSupply */
|
|
480
|
+
export interface TokenSupply {
|
|
481
|
+
/** @format int64 */
|
|
482
|
+
timestamp: number
|
|
483
|
+
/** @format uint256 */
|
|
484
|
+
total: string
|
|
485
|
+
/** @format uint256 */
|
|
486
|
+
circulating: string
|
|
487
|
+
/** @format uint256 */
|
|
488
|
+
reserved: string
|
|
489
|
+
/** @format uint256 */
|
|
490
|
+
locked: string
|
|
491
|
+
/** @format uint256 */
|
|
492
|
+
maximum: string
|
|
493
|
+
}
|
|
493
494
|
|
|
494
|
-
/**
|
|
495
|
-
export interface
|
|
495
|
+
/** Transaction */
|
|
496
|
+
export interface Transaction {
|
|
497
|
+
/** @format 32-byte-hash */
|
|
498
|
+
hash: string
|
|
496
499
|
/** @format block-hash */
|
|
497
500
|
blockHash: string
|
|
501
|
+
/** @format int64 */
|
|
502
|
+
timestamp: number
|
|
503
|
+
inputs?: Input[]
|
|
504
|
+
outputs?: Output[]
|
|
505
|
+
version: number
|
|
506
|
+
networkId: number
|
|
507
|
+
scriptOpt?: string
|
|
508
|
+
/** @format int32 */
|
|
509
|
+
gasAmount: number
|
|
510
|
+
/** @format uint256 */
|
|
511
|
+
gasPrice: string
|
|
512
|
+
scriptExecutionOk: boolean
|
|
513
|
+
inputSignatures?: string[]
|
|
514
|
+
scriptSignatures?: string[]
|
|
498
515
|
coinbase: boolean
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/** TransactionInfo */
|
|
519
|
+
export interface TransactionInfo {
|
|
499
520
|
/** @format 32-byte-hash */
|
|
500
521
|
hash: string
|
|
522
|
+
/** @format block-hash */
|
|
523
|
+
blockHash: string
|
|
501
524
|
/** @format int64 */
|
|
502
525
|
timestamp: number
|
|
526
|
+
coinbase: boolean
|
|
503
527
|
}
|
|
504
528
|
|
|
529
|
+
/** TransactionLike */
|
|
530
|
+
export type TransactionLike = AcceptedTransaction | PendingTransaction
|
|
531
|
+
|
|
505
532
|
/** Unauthorized */
|
|
506
533
|
export interface Unauthorized {
|
|
507
534
|
detail: string
|
|
508
535
|
}
|
|
509
536
|
|
|
510
|
-
/**
|
|
511
|
-
export interface
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
address: string
|
|
537
|
+
/** Unknown */
|
|
538
|
+
export interface Unknown {
|
|
539
|
+
id: string
|
|
540
|
+
type: string
|
|
515
541
|
}
|
|
516
542
|
|
|
543
|
+
/** Val */
|
|
544
|
+
export type Val = ValAddress | ValArray | ValBool | ValByteVec | ValI256 | ValU256
|
|
545
|
+
|
|
517
546
|
/** ValAddress */
|
|
518
547
|
export interface ValAddress {
|
|
519
|
-
type: string
|
|
520
548
|
/** @format address */
|
|
521
549
|
value: string
|
|
550
|
+
type: string
|
|
522
551
|
}
|
|
523
552
|
|
|
524
|
-
|
|
525
|
-
|
|
553
|
+
/** ValArray */
|
|
554
|
+
export interface ValArray {
|
|
555
|
+
value: Val[]
|
|
556
|
+
type: string
|
|
526
557
|
}
|
|
527
558
|
|
|
528
559
|
/** ValBool */
|
|
529
560
|
export interface ValBool {
|
|
530
|
-
type: string
|
|
531
561
|
value: boolean
|
|
562
|
+
type: string
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
/** ValByteVec */
|
|
566
|
+
export interface ValByteVec {
|
|
567
|
+
/** @format hex-string */
|
|
568
|
+
value: string
|
|
569
|
+
type: string
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/** ValI256 */
|
|
573
|
+
export interface ValI256 {
|
|
574
|
+
/** @format bigint */
|
|
575
|
+
value: string
|
|
576
|
+
type: string
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
/** ValU256 */
|
|
580
|
+
export interface ValU256 {
|
|
581
|
+
/** @format uint256 */
|
|
582
|
+
value: string
|
|
583
|
+
type: string
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
export enum PaginationLimitDefault {
|
|
587
|
+
Value20 = 20,
|
|
588
|
+
Value10 = 10
|
|
532
589
|
}
|
|
533
590
|
|
|
534
591
|
export enum PaginationLimitMax {
|
|
@@ -536,14 +593,16 @@ export enum PaginationLimitMax {
|
|
|
536
593
|
Value20 = 20
|
|
537
594
|
}
|
|
538
595
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
596
|
+
export enum PaginationPageDefault {
|
|
597
|
+
Value1 = 1
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export enum MaxSizeTokens {
|
|
601
|
+
Value80 = 80
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
export enum MaxSizeAddressesForTokens {
|
|
605
|
+
Value80 = 80
|
|
547
606
|
}
|
|
548
607
|
|
|
549
608
|
export enum MaxSizeAddresses {
|
|
@@ -565,75 +624,6 @@ export enum Currencies {
|
|
|
565
624
|
Aud = 'aud'
|
|
566
625
|
}
|
|
567
626
|
|
|
568
|
-
export enum PaginationLimitDefault {
|
|
569
|
-
Value20 = 20,
|
|
570
|
-
Value10 = 10
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
/** AddressInfo */
|
|
574
|
-
export interface AddressInfo {
|
|
575
|
-
/** @format uint256 */
|
|
576
|
-
balance: string
|
|
577
|
-
/** @format uint256 */
|
|
578
|
-
lockedBalance: string
|
|
579
|
-
/** @format int32 */
|
|
580
|
-
txNumber: number
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
/** AddressBalance */
|
|
584
|
-
export interface AddressBalance {
|
|
585
|
-
/** @format uint256 */
|
|
586
|
-
balance: string
|
|
587
|
-
/** @format uint256 */
|
|
588
|
-
lockedBalance: string
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
/** AmountHistory */
|
|
592
|
-
export interface AmountHistory {
|
|
593
|
-
amountHistory?: string[][]
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
/** Event */
|
|
597
|
-
export interface Event {
|
|
598
|
-
/** @format block-hash */
|
|
599
|
-
blockHash: string
|
|
600
|
-
/** @format address */
|
|
601
|
-
inputAddress?: string
|
|
602
|
-
/** @format address */
|
|
603
|
-
contractAddress: string
|
|
604
|
-
/** @format int32 */
|
|
605
|
-
eventIndex: number
|
|
606
|
-
fields?: Val[]
|
|
607
|
-
/** @format 32-byte-hash */
|
|
608
|
-
txHash: string
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
/** ListBlocks */
|
|
612
|
-
export interface ListBlocks {
|
|
613
|
-
/** @format int32 */
|
|
614
|
-
total: number
|
|
615
|
-
blocks?: BlockEntryLite[]
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
/** SubContracts */
|
|
619
|
-
export interface SubContracts {
|
|
620
|
-
subContracts?: string[]
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
/** TokenInfo */
|
|
624
|
-
export interface TokenInfo {
|
|
625
|
-
/** Raw interface id, e.g. 0001 */
|
|
626
|
-
stdInterfaceId?: TokenStdInterfaceId | string
|
|
627
|
-
/** @format 32-byte-hash */
|
|
628
|
-
token: string
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
/** NotFound */
|
|
632
|
-
export interface NotFound {
|
|
633
|
-
resource: string
|
|
634
|
-
detail: string
|
|
635
|
-
}
|
|
636
|
-
|
|
637
627
|
import 'cross-fetch/polyfill'
|
|
638
628
|
import { convertHttpResponse } from './utils'
|
|
639
629
|
|
|
@@ -851,16 +841,15 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
851
841
|
* @version 1.0
|
|
852
842
|
*/
|
|
853
843
|
export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
854
|
-
|
|
844
|
+
blocks = {
|
|
855
845
|
/**
|
|
856
|
-
* @description
|
|
846
|
+
* @description List latest blocks
|
|
857
847
|
*
|
|
858
|
-
* @tags
|
|
859
|
-
* @name
|
|
860
|
-
* @request GET:/
|
|
848
|
+
* @tags Blocks
|
|
849
|
+
* @name GetBlocks
|
|
850
|
+
* @request GET:/blocks
|
|
861
851
|
*/
|
|
862
|
-
|
|
863
|
-
contractAddress: string,
|
|
852
|
+
getBlocks: (
|
|
864
853
|
query?: {
|
|
865
854
|
/**
|
|
866
855
|
* Page number
|
|
@@ -875,11 +864,13 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
875
864
|
* @max 100
|
|
876
865
|
*/
|
|
877
866
|
limit?: number
|
|
867
|
+
/** Reverse pagination */
|
|
868
|
+
reverse?: boolean
|
|
878
869
|
},
|
|
879
870
|
params: RequestParams = {}
|
|
880
871
|
) =>
|
|
881
|
-
this.request<
|
|
882
|
-
path: `/
|
|
872
|
+
this.request<ListBlocks, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
873
|
+
path: `/blocks`,
|
|
883
874
|
method: 'GET',
|
|
884
875
|
query: query,
|
|
885
876
|
format: 'json',
|
|
@@ -887,30 +878,65 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
887
878
|
}).then(convertHttpResponse),
|
|
888
879
|
|
|
889
880
|
/**
|
|
890
|
-
* @description Get
|
|
881
|
+
* @description Get a block with hash
|
|
891
882
|
*
|
|
892
|
-
* @tags
|
|
893
|
-
* @name
|
|
894
|
-
* @request GET:/
|
|
883
|
+
* @tags Blocks
|
|
884
|
+
* @name GetBlocksBlockHash
|
|
885
|
+
* @request GET:/blocks/{block_hash}
|
|
895
886
|
*/
|
|
896
|
-
|
|
897
|
-
this.request<
|
|
898
|
-
path: `/
|
|
887
|
+
getBlocksBlockHash: (blockHash: string, params: RequestParams = {}) =>
|
|
888
|
+
this.request<BlockEntry, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
889
|
+
path: `/blocks/${blockHash}`,
|
|
899
890
|
method: 'GET',
|
|
900
891
|
format: 'json',
|
|
901
892
|
...params
|
|
902
893
|
}).then(convertHttpResponse),
|
|
903
894
|
|
|
904
895
|
/**
|
|
905
|
-
* @description Get
|
|
896
|
+
* @description Get block's transactions
|
|
906
897
|
*
|
|
907
|
-
* @tags
|
|
908
|
-
* @name
|
|
909
|
-
* @request GET:/
|
|
898
|
+
* @tags Blocks
|
|
899
|
+
* @name GetBlocksBlockHashTransactions
|
|
900
|
+
* @request GET:/blocks/{block_hash}/transactions
|
|
910
901
|
*/
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
902
|
+
getBlocksBlockHashTransactions: (
|
|
903
|
+
blockHash: string,
|
|
904
|
+
query?: {
|
|
905
|
+
/**
|
|
906
|
+
* Page number
|
|
907
|
+
* @format int32
|
|
908
|
+
* @min 1
|
|
909
|
+
*/
|
|
910
|
+
page?: number
|
|
911
|
+
/**
|
|
912
|
+
* Number of items per page
|
|
913
|
+
* @format int32
|
|
914
|
+
* @min 0
|
|
915
|
+
* @max 100
|
|
916
|
+
*/
|
|
917
|
+
limit?: number
|
|
918
|
+
},
|
|
919
|
+
params: RequestParams = {}
|
|
920
|
+
) =>
|
|
921
|
+
this.request<Transaction[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
922
|
+
path: `/blocks/${blockHash}/transactions`,
|
|
923
|
+
method: 'GET',
|
|
924
|
+
query: query,
|
|
925
|
+
format: 'json',
|
|
926
|
+
...params
|
|
927
|
+
}).then(convertHttpResponse)
|
|
928
|
+
}
|
|
929
|
+
transactions = {
|
|
930
|
+
/**
|
|
931
|
+
* @description Get a transaction with hash
|
|
932
|
+
*
|
|
933
|
+
* @tags Transactions
|
|
934
|
+
* @name GetTransactionsTransactionHash
|
|
935
|
+
* @request GET:/transactions/{transaction_hash}
|
|
936
|
+
*/
|
|
937
|
+
getTransactionsTransactionHash: (transactionHash: string, params: RequestParams = {}) =>
|
|
938
|
+
this.request<TransactionLike, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
939
|
+
path: `/transactions/${transactionHash}`,
|
|
914
940
|
method: 'GET',
|
|
915
941
|
format: 'json',
|
|
916
942
|
...params
|
|
@@ -918,16 +944,96 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
918
944
|
}
|
|
919
945
|
addresses = {
|
|
920
946
|
/**
|
|
921
|
-
* @description
|
|
947
|
+
* @description Get address information
|
|
922
948
|
*
|
|
923
|
-
* @tags Addresses
|
|
924
|
-
* @name
|
|
925
|
-
* @request
|
|
949
|
+
* @tags Addresses
|
|
950
|
+
* @name GetAddressesAddress
|
|
951
|
+
* @request GET:/addresses/{address}
|
|
926
952
|
*/
|
|
927
|
-
|
|
928
|
-
this.request<
|
|
929
|
-
path: `/addresses
|
|
953
|
+
getAddressesAddress: (address: string, params: RequestParams = {}) =>
|
|
954
|
+
this.request<AddressInfo, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
955
|
+
path: `/addresses/${address}`,
|
|
956
|
+
method: 'GET',
|
|
957
|
+
format: 'json',
|
|
958
|
+
...params
|
|
959
|
+
}).then(convertHttpResponse),
|
|
960
|
+
|
|
961
|
+
/**
|
|
962
|
+
* @description List transactions of a given address
|
|
963
|
+
*
|
|
964
|
+
* @tags Addresses
|
|
965
|
+
* @name GetAddressesAddressTransactions
|
|
966
|
+
* @request GET:/addresses/{address}/transactions
|
|
967
|
+
*/
|
|
968
|
+
getAddressesAddressTransactions: (
|
|
969
|
+
address: string,
|
|
970
|
+
query?: {
|
|
971
|
+
/**
|
|
972
|
+
* Page number
|
|
973
|
+
* @format int32
|
|
974
|
+
* @min 1
|
|
975
|
+
*/
|
|
976
|
+
page?: number
|
|
977
|
+
/**
|
|
978
|
+
* Number of items per page
|
|
979
|
+
* @format int32
|
|
980
|
+
* @min 0
|
|
981
|
+
* @max 100
|
|
982
|
+
*/
|
|
983
|
+
limit?: number
|
|
984
|
+
},
|
|
985
|
+
params: RequestParams = {}
|
|
986
|
+
) =>
|
|
987
|
+
this.request<Transaction[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
988
|
+
path: `/addresses/${address}/transactions`,
|
|
989
|
+
method: 'GET',
|
|
990
|
+
query: query,
|
|
991
|
+
format: 'json',
|
|
992
|
+
...params
|
|
993
|
+
}).then(convertHttpResponse),
|
|
994
|
+
|
|
995
|
+
/**
|
|
996
|
+
* @description List transactions for given addresses
|
|
997
|
+
*
|
|
998
|
+
* @tags Addresses
|
|
999
|
+
* @name PostAddressesTransactions
|
|
1000
|
+
* @request POST:/addresses/transactions
|
|
1001
|
+
*/
|
|
1002
|
+
postAddressesTransactions: (
|
|
1003
|
+
query?: {
|
|
1004
|
+
/**
|
|
1005
|
+
* inclusive
|
|
1006
|
+
* @format int64
|
|
1007
|
+
* @min 0
|
|
1008
|
+
*/
|
|
1009
|
+
fromTs?: number
|
|
1010
|
+
/**
|
|
1011
|
+
* exclusive
|
|
1012
|
+
* @format int64
|
|
1013
|
+
* @min 0
|
|
1014
|
+
*/
|
|
1015
|
+
toTs?: number
|
|
1016
|
+
/**
|
|
1017
|
+
* Page number
|
|
1018
|
+
* @format int32
|
|
1019
|
+
* @min 1
|
|
1020
|
+
*/
|
|
1021
|
+
page?: number
|
|
1022
|
+
/**
|
|
1023
|
+
* Number of items per page
|
|
1024
|
+
* @format int32
|
|
1025
|
+
* @min 0
|
|
1026
|
+
* @max 100
|
|
1027
|
+
*/
|
|
1028
|
+
limit?: number
|
|
1029
|
+
},
|
|
1030
|
+
data?: string[],
|
|
1031
|
+
params: RequestParams = {}
|
|
1032
|
+
) =>
|
|
1033
|
+
this.request<Transaction[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1034
|
+
path: `/addresses/transactions`,
|
|
930
1035
|
method: 'POST',
|
|
1036
|
+
query: query,
|
|
931
1037
|
body: data,
|
|
932
1038
|
type: ContentType.Json,
|
|
933
1039
|
format: 'json',
|
|
@@ -935,13 +1041,13 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
935
1041
|
}).then(convertHttpResponse),
|
|
936
1042
|
|
|
937
1043
|
/**
|
|
938
|
-
*
|
|
1044
|
+
* @description List transactions of a given address within a time-range
|
|
939
1045
|
*
|
|
940
1046
|
* @tags Addresses
|
|
941
|
-
* @name
|
|
942
|
-
* @request GET:/addresses/{address}/
|
|
1047
|
+
* @name GetAddressesAddressTimerangedTransactions
|
|
1048
|
+
* @request GET:/addresses/{address}/timeranged-transactions
|
|
943
1049
|
*/
|
|
944
|
-
|
|
1050
|
+
getAddressesAddressTimerangedTransactions: (
|
|
945
1051
|
address: string,
|
|
946
1052
|
query: {
|
|
947
1053
|
/**
|
|
@@ -954,61 +1060,6 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
954
1060
|
* @min 0
|
|
955
1061
|
*/
|
|
956
1062
|
toTs: number
|
|
957
|
-
},
|
|
958
|
-
params: RequestParams = {}
|
|
959
|
-
) =>
|
|
960
|
-
this.request<string, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
961
|
-
path: `/addresses/${address}/export-transactions/csv`,
|
|
962
|
-
method: 'GET',
|
|
963
|
-
query: query,
|
|
964
|
-
format: 'text',
|
|
965
|
-
...params
|
|
966
|
-
}).then(convertHttpResponse),
|
|
967
|
-
|
|
968
|
-
/**
|
|
969
|
-
* @description Get address balance
|
|
970
|
-
*
|
|
971
|
-
* @tags Addresses
|
|
972
|
-
* @name GetAddressesAddressBalance
|
|
973
|
-
* @request GET:/addresses/{address}/balance
|
|
974
|
-
*/
|
|
975
|
-
getAddressesAddressBalance: (address: string, params: RequestParams = {}) =>
|
|
976
|
-
this.request<AddressBalance, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
977
|
-
path: `/addresses/${address}/balance`,
|
|
978
|
-
method: 'GET',
|
|
979
|
-
format: 'json',
|
|
980
|
-
...params
|
|
981
|
-
}).then(convertHttpResponse),
|
|
982
|
-
|
|
983
|
-
/**
|
|
984
|
-
* @description List mempool transactions of a given address
|
|
985
|
-
*
|
|
986
|
-
* @tags Addresses
|
|
987
|
-
* @name GetAddressesAddressMempoolTransactions
|
|
988
|
-
* @request GET:/addresses/{address}/mempool/transactions
|
|
989
|
-
*/
|
|
990
|
-
getAddressesAddressMempoolTransactions: (address: string, params: RequestParams = {}) =>
|
|
991
|
-
this.request<
|
|
992
|
-
MempoolTransaction[],
|
|
993
|
-
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
994
|
-
>({
|
|
995
|
-
path: `/addresses/${address}/mempool/transactions`,
|
|
996
|
-
method: 'GET',
|
|
997
|
-
format: 'json',
|
|
998
|
-
...params
|
|
999
|
-
}).then(convertHttpResponse),
|
|
1000
|
-
|
|
1001
|
-
/**
|
|
1002
|
-
* @description List address tokens
|
|
1003
|
-
*
|
|
1004
|
-
* @tags Addresses
|
|
1005
|
-
* @name GetAddressesAddressTokensTokenIdTransactions
|
|
1006
|
-
* @request GET:/addresses/{address}/tokens/{token_id}/transactions
|
|
1007
|
-
*/
|
|
1008
|
-
getAddressesAddressTokensTokenIdTransactions: (
|
|
1009
|
-
address: string,
|
|
1010
|
-
tokenId: string,
|
|
1011
|
-
query?: {
|
|
1012
1063
|
/**
|
|
1013
1064
|
* Page number
|
|
1014
1065
|
* @format int32
|
|
@@ -1026,13 +1077,28 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1026
1077
|
params: RequestParams = {}
|
|
1027
1078
|
) =>
|
|
1028
1079
|
this.request<Transaction[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1029
|
-
path: `/addresses/${address}/
|
|
1080
|
+
path: `/addresses/${address}/timeranged-transactions`,
|
|
1030
1081
|
method: 'GET',
|
|
1031
1082
|
query: query,
|
|
1032
1083
|
format: 'json',
|
|
1033
1084
|
...params
|
|
1034
1085
|
}).then(convertHttpResponse),
|
|
1035
1086
|
|
|
1087
|
+
/**
|
|
1088
|
+
* @description Get total transactions of a given address
|
|
1089
|
+
*
|
|
1090
|
+
* @tags Addresses
|
|
1091
|
+
* @name GetAddressesAddressTotalTransactions
|
|
1092
|
+
* @request GET:/addresses/{address}/total-transactions
|
|
1093
|
+
*/
|
|
1094
|
+
getAddressesAddressTotalTransactions: (address: string, params: RequestParams = {}) =>
|
|
1095
|
+
this.request<number, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1096
|
+
path: `/addresses/${address}/total-transactions`,
|
|
1097
|
+
method: 'GET',
|
|
1098
|
+
format: 'json',
|
|
1099
|
+
...params
|
|
1100
|
+
}).then(convertHttpResponse),
|
|
1101
|
+
|
|
1036
1102
|
/**
|
|
1037
1103
|
* @description Get latest transaction information of a given address
|
|
1038
1104
|
*
|
|
@@ -1049,40 +1115,49 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1049
1115
|
}).then(convertHttpResponse),
|
|
1050
1116
|
|
|
1051
1117
|
/**
|
|
1052
|
-
* @description
|
|
1118
|
+
* @description List mempool transactions of a given address
|
|
1053
1119
|
*
|
|
1054
1120
|
* @tags Addresses
|
|
1055
|
-
* @name
|
|
1056
|
-
* @request GET:/addresses/{address}/
|
|
1121
|
+
* @name GetAddressesAddressMempoolTransactions
|
|
1122
|
+
* @request GET:/addresses/{address}/mempool/transactions
|
|
1057
1123
|
*/
|
|
1058
|
-
|
|
1059
|
-
this.request<
|
|
1060
|
-
|
|
1124
|
+
getAddressesAddressMempoolTransactions: (address: string, params: RequestParams = {}) =>
|
|
1125
|
+
this.request<
|
|
1126
|
+
MempoolTransaction[],
|
|
1127
|
+
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1128
|
+
>({
|
|
1129
|
+
path: `/addresses/${address}/mempool/transactions`,
|
|
1061
1130
|
method: 'GET',
|
|
1062
1131
|
format: 'json',
|
|
1063
1132
|
...params
|
|
1064
1133
|
}).then(convertHttpResponse),
|
|
1065
1134
|
|
|
1066
1135
|
/**
|
|
1067
|
-
* @description
|
|
1136
|
+
* @description Get address balance
|
|
1068
1137
|
*
|
|
1069
1138
|
* @tags Addresses
|
|
1070
|
-
* @name
|
|
1071
|
-
* @request GET:/addresses/{address}/
|
|
1139
|
+
* @name GetAddressesAddressBalance
|
|
1140
|
+
* @request GET:/addresses/{address}/balance
|
|
1072
1141
|
*/
|
|
1073
|
-
|
|
1142
|
+
getAddressesAddressBalance: (address: string, params: RequestParams = {}) =>
|
|
1143
|
+
this.request<AddressBalance, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1144
|
+
path: `/addresses/${address}/balance`,
|
|
1145
|
+
method: 'GET',
|
|
1146
|
+
format: 'json',
|
|
1147
|
+
...params
|
|
1148
|
+
}).then(convertHttpResponse),
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* @description List address tokens
|
|
1152
|
+
*
|
|
1153
|
+
* @tags Addresses
|
|
1154
|
+
* @name GetAddressesAddressTokens
|
|
1155
|
+
* @request GET:/addresses/{address}/tokens
|
|
1156
|
+
* @deprecated
|
|
1157
|
+
*/
|
|
1158
|
+
getAddressesAddressTokens: (
|
|
1074
1159
|
address: string,
|
|
1075
|
-
query
|
|
1076
|
-
/**
|
|
1077
|
-
* @format int64
|
|
1078
|
-
* @min 0
|
|
1079
|
-
*/
|
|
1080
|
-
fromTs: number
|
|
1081
|
-
/**
|
|
1082
|
-
* @format int64
|
|
1083
|
-
* @min 0
|
|
1084
|
-
*/
|
|
1085
|
-
toTs: number
|
|
1160
|
+
query?: {
|
|
1086
1161
|
/**
|
|
1087
1162
|
* Page number
|
|
1088
1163
|
* @format int32
|
|
@@ -1099,8 +1174,8 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1099
1174
|
},
|
|
1100
1175
|
params: RequestParams = {}
|
|
1101
1176
|
) =>
|
|
1102
|
-
this.request<
|
|
1103
|
-
path: `/addresses/${address}/
|
|
1177
|
+
this.request<string[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1178
|
+
path: `/addresses/${address}/tokens`,
|
|
1104
1179
|
method: 'GET',
|
|
1105
1180
|
query: query,
|
|
1106
1181
|
format: 'json',
|
|
@@ -1108,14 +1183,15 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1108
1183
|
}).then(convertHttpResponse),
|
|
1109
1184
|
|
|
1110
1185
|
/**
|
|
1111
|
-
* @description List
|
|
1186
|
+
* @description List address tokens
|
|
1112
1187
|
*
|
|
1113
1188
|
* @tags Addresses
|
|
1114
|
-
* @name
|
|
1115
|
-
* @request GET:/addresses/{address}/transactions
|
|
1189
|
+
* @name GetAddressesAddressTokensTokenIdTransactions
|
|
1190
|
+
* @request GET:/addresses/{address}/tokens/{token_id}/transactions
|
|
1116
1191
|
*/
|
|
1117
|
-
|
|
1192
|
+
getAddressesAddressTokensTokenIdTransactions: (
|
|
1118
1193
|
address: string,
|
|
1194
|
+
tokenId: string,
|
|
1119
1195
|
query?: {
|
|
1120
1196
|
/**
|
|
1121
1197
|
* Page number
|
|
@@ -1134,7 +1210,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1134
1210
|
params: RequestParams = {}
|
|
1135
1211
|
) =>
|
|
1136
1212
|
this.request<Transaction[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1137
|
-
path: `/addresses/${address}/transactions`,
|
|
1213
|
+
path: `/addresses/${address}/tokens/${tokenId}/transactions`,
|
|
1138
1214
|
method: 'GET',
|
|
1139
1215
|
query: query,
|
|
1140
1216
|
format: 'json',
|
|
@@ -1142,58 +1218,48 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1142
1218
|
}).then(convertHttpResponse),
|
|
1143
1219
|
|
|
1144
1220
|
/**
|
|
1145
|
-
*
|
|
1221
|
+
* @description Get address balance of given token
|
|
1146
1222
|
*
|
|
1147
1223
|
* @tags Addresses
|
|
1148
|
-
* @name
|
|
1149
|
-
* @request GET:/addresses/{address}/
|
|
1224
|
+
* @name GetAddressesAddressTokensTokenIdBalance
|
|
1225
|
+
* @request GET:/addresses/{address}/tokens/{token_id}/balance
|
|
1150
1226
|
*/
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
*/
|
|
1158
|
-
fromTs: number
|
|
1159
|
-
/**
|
|
1160
|
-
* @format int64
|
|
1161
|
-
* @min 0
|
|
1162
|
-
*/
|
|
1163
|
-
toTs: number
|
|
1164
|
-
'interval-type': IntervalType
|
|
1165
|
-
},
|
|
1166
|
-
params: RequestParams = {}
|
|
1167
|
-
) =>
|
|
1168
|
-
this.request<AmountHistory, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1169
|
-
path: `/addresses/${address}/amount-history`,
|
|
1227
|
+
getAddressesAddressTokensTokenIdBalance: (address: string, tokenId: string, params: RequestParams = {}) =>
|
|
1228
|
+
this.request<
|
|
1229
|
+
AddressTokenBalance,
|
|
1230
|
+
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1231
|
+
>({
|
|
1232
|
+
path: `/addresses/${address}/tokens/${tokenId}/balance`,
|
|
1170
1233
|
method: 'GET',
|
|
1171
|
-
query: query,
|
|
1172
1234
|
format: 'json',
|
|
1173
1235
|
...params
|
|
1174
1236
|
}).then(convertHttpResponse),
|
|
1175
1237
|
|
|
1176
1238
|
/**
|
|
1177
|
-
* @description
|
|
1239
|
+
* @description Get public key of p2pkh addresses, the address needs to have at least one input.
|
|
1178
1240
|
*
|
|
1179
1241
|
* @tags Addresses
|
|
1180
|
-
* @name
|
|
1181
|
-
* @request
|
|
1242
|
+
* @name GetAddressesAddressPublicKey
|
|
1243
|
+
* @request GET:/addresses/{address}/public-key
|
|
1182
1244
|
*/
|
|
1183
|
-
|
|
1245
|
+
getAddressesAddressPublicKey: (address: string, params: RequestParams = {}) =>
|
|
1246
|
+
this.request<string, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1247
|
+
path: `/addresses/${address}/public-key`,
|
|
1248
|
+
method: 'GET',
|
|
1249
|
+
format: 'json',
|
|
1250
|
+
...params
|
|
1251
|
+
}).then(convertHttpResponse),
|
|
1252
|
+
|
|
1253
|
+
/**
|
|
1254
|
+
* @description Get address tokens with balance
|
|
1255
|
+
*
|
|
1256
|
+
* @tags Addresses
|
|
1257
|
+
* @name GetAddressesAddressTokensBalance
|
|
1258
|
+
* @request GET:/addresses/{address}/tokens-balance
|
|
1259
|
+
*/
|
|
1260
|
+
getAddressesAddressTokensBalance: (
|
|
1261
|
+
address: string,
|
|
1184
1262
|
query?: {
|
|
1185
|
-
/**
|
|
1186
|
-
* inclusive
|
|
1187
|
-
* @format int64
|
|
1188
|
-
* @min 0
|
|
1189
|
-
*/
|
|
1190
|
-
fromTs?: number
|
|
1191
|
-
/**
|
|
1192
|
-
* exclusive
|
|
1193
|
-
* @format int64
|
|
1194
|
-
* @min 0
|
|
1195
|
-
*/
|
|
1196
|
-
toTs?: number
|
|
1197
1263
|
/**
|
|
1198
1264
|
* Page number
|
|
1199
1265
|
* @format int32
|
|
@@ -1208,13 +1274,30 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1208
1274
|
*/
|
|
1209
1275
|
limit?: number
|
|
1210
1276
|
},
|
|
1211
|
-
data?: string[],
|
|
1212
1277
|
params: RequestParams = {}
|
|
1213
1278
|
) =>
|
|
1214
|
-
this.request<
|
|
1215
|
-
|
|
1216
|
-
|
|
1279
|
+
this.request<
|
|
1280
|
+
AddressTokenBalance[],
|
|
1281
|
+
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1282
|
+
>({
|
|
1283
|
+
path: `/addresses/${address}/tokens-balance`,
|
|
1284
|
+
method: 'GET',
|
|
1217
1285
|
query: query,
|
|
1286
|
+
format: 'json',
|
|
1287
|
+
...params
|
|
1288
|
+
}).then(convertHttpResponse),
|
|
1289
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* @description Are the addresses used (at least 1 transaction)
|
|
1292
|
+
*
|
|
1293
|
+
* @tags Addresses, Addresses
|
|
1294
|
+
* @name PostAddressesUsed
|
|
1295
|
+
* @request POST:/addresses/used
|
|
1296
|
+
*/
|
|
1297
|
+
postAddressesUsed: (data?: string[], params: RequestParams = {}) =>
|
|
1298
|
+
this.request<boolean[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1299
|
+
path: `/addresses/used`,
|
|
1300
|
+
method: 'POST',
|
|
1218
1301
|
body: data,
|
|
1219
1302
|
type: ContentType.Json,
|
|
1220
1303
|
format: 'json',
|
|
@@ -1225,11 +1308,10 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1225
1308
|
* No description
|
|
1226
1309
|
*
|
|
1227
1310
|
* @tags Addresses
|
|
1228
|
-
* @name
|
|
1229
|
-
* @request GET:/addresses/{address}/
|
|
1230
|
-
* @deprecated
|
|
1311
|
+
* @name GetAddressesAddressExportTransactionsCsv
|
|
1312
|
+
* @request GET:/addresses/{address}/export-transactions/csv
|
|
1231
1313
|
*/
|
|
1232
|
-
|
|
1314
|
+
getAddressesAddressExportTransactionsCsv: (
|
|
1233
1315
|
address: string,
|
|
1234
1316
|
query: {
|
|
1235
1317
|
/**
|
|
@@ -1242,47 +1324,44 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1242
1324
|
* @min 0
|
|
1243
1325
|
*/
|
|
1244
1326
|
toTs: number
|
|
1245
|
-
'interval-type': IntervalType
|
|
1246
1327
|
},
|
|
1247
1328
|
params: RequestParams = {}
|
|
1248
1329
|
) =>
|
|
1249
1330
|
this.request<string, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1250
|
-
path: `/addresses/${address}/
|
|
1331
|
+
path: `/addresses/${address}/export-transactions/csv`,
|
|
1251
1332
|
method: 'GET',
|
|
1252
1333
|
query: query,
|
|
1253
|
-
format: '
|
|
1334
|
+
format: 'text',
|
|
1254
1335
|
...params
|
|
1255
1336
|
}).then(convertHttpResponse),
|
|
1256
1337
|
|
|
1257
1338
|
/**
|
|
1258
|
-
*
|
|
1339
|
+
* No description
|
|
1259
1340
|
*
|
|
1260
1341
|
* @tags Addresses
|
|
1261
|
-
* @name
|
|
1262
|
-
* @request GET:/addresses/{address}/
|
|
1342
|
+
* @name GetAddressesAddressAmountHistoryDeprecated
|
|
1343
|
+
* @request GET:/addresses/{address}/amount-history-DEPRECATED
|
|
1263
1344
|
* @deprecated
|
|
1264
1345
|
*/
|
|
1265
|
-
|
|
1346
|
+
getAddressesAddressAmountHistoryDeprecated: (
|
|
1266
1347
|
address: string,
|
|
1267
|
-
query
|
|
1348
|
+
query: {
|
|
1268
1349
|
/**
|
|
1269
|
-
*
|
|
1270
|
-
* @
|
|
1271
|
-
* @min 1
|
|
1350
|
+
* @format int64
|
|
1351
|
+
* @min 0
|
|
1272
1352
|
*/
|
|
1273
|
-
|
|
1353
|
+
fromTs: number
|
|
1274
1354
|
/**
|
|
1275
|
-
*
|
|
1276
|
-
* @format int32
|
|
1355
|
+
* @format int64
|
|
1277
1356
|
* @min 0
|
|
1278
|
-
* @max 100
|
|
1279
1357
|
*/
|
|
1280
|
-
|
|
1358
|
+
toTs: number
|
|
1359
|
+
'interval-type': IntervalType
|
|
1281
1360
|
},
|
|
1282
1361
|
params: RequestParams = {}
|
|
1283
1362
|
) =>
|
|
1284
|
-
this.request<string
|
|
1285
|
-
path: `/addresses/${address}/
|
|
1363
|
+
this.request<string, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1364
|
+
path: `/addresses/${address}/amount-history-DEPRECATED`,
|
|
1286
1365
|
method: 'GET',
|
|
1287
1366
|
query: query,
|
|
1288
1367
|
format: 'json',
|
|
@@ -1290,91 +1369,68 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1290
1369
|
}).then(convertHttpResponse),
|
|
1291
1370
|
|
|
1292
1371
|
/**
|
|
1293
|
-
*
|
|
1372
|
+
* No description
|
|
1294
1373
|
*
|
|
1295
1374
|
* @tags Addresses
|
|
1296
|
-
* @name
|
|
1297
|
-
* @request GET:/addresses/{address}/
|
|
1375
|
+
* @name GetAddressesAddressAmountHistory
|
|
1376
|
+
* @request GET:/addresses/{address}/amount-history
|
|
1298
1377
|
*/
|
|
1299
|
-
|
|
1378
|
+
getAddressesAddressAmountHistory: (
|
|
1300
1379
|
address: string,
|
|
1301
|
-
query
|
|
1380
|
+
query: {
|
|
1302
1381
|
/**
|
|
1303
|
-
*
|
|
1304
|
-
* @
|
|
1305
|
-
* @min 1
|
|
1382
|
+
* @format int64
|
|
1383
|
+
* @min 0
|
|
1306
1384
|
*/
|
|
1307
|
-
|
|
1385
|
+
fromTs: number
|
|
1308
1386
|
/**
|
|
1309
|
-
*
|
|
1310
|
-
* @format int32
|
|
1387
|
+
* @format int64
|
|
1311
1388
|
* @min 0
|
|
1312
|
-
* @max 100
|
|
1313
1389
|
*/
|
|
1314
|
-
|
|
1390
|
+
toTs: number
|
|
1391
|
+
'interval-type': IntervalType
|
|
1315
1392
|
},
|
|
1316
1393
|
params: RequestParams = {}
|
|
1317
1394
|
) =>
|
|
1318
|
-
this.request<
|
|
1319
|
-
|
|
1320
|
-
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1321
|
-
>({
|
|
1322
|
-
path: `/addresses/${address}/tokens-balance`,
|
|
1395
|
+
this.request<AmountHistory, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1396
|
+
path: `/addresses/${address}/amount-history`,
|
|
1323
1397
|
method: 'GET',
|
|
1324
1398
|
query: query,
|
|
1325
1399
|
format: 'json',
|
|
1326
1400
|
...params
|
|
1327
|
-
}).then(convertHttpResponse)
|
|
1328
|
-
|
|
1401
|
+
}).then(convertHttpResponse)
|
|
1402
|
+
}
|
|
1403
|
+
infos = {
|
|
1329
1404
|
/**
|
|
1330
|
-
* @description Get
|
|
1405
|
+
* @description Get explorer informations
|
|
1331
1406
|
*
|
|
1332
|
-
* @tags
|
|
1333
|
-
* @name
|
|
1334
|
-
* @request GET:/
|
|
1407
|
+
* @tags Infos
|
|
1408
|
+
* @name GetInfos
|
|
1409
|
+
* @request GET:/infos
|
|
1335
1410
|
*/
|
|
1336
|
-
|
|
1337
|
-
this.request<
|
|
1338
|
-
|
|
1339
|
-
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1340
|
-
>({
|
|
1341
|
-
path: `/addresses/${address}/tokens/${tokenId}/balance`,
|
|
1411
|
+
getInfos: (params: RequestParams = {}) =>
|
|
1412
|
+
this.request<ExplorerInfo, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1413
|
+
path: `/infos`,
|
|
1342
1414
|
method: 'GET',
|
|
1343
1415
|
format: 'json',
|
|
1344
1416
|
...params
|
|
1345
1417
|
}).then(convertHttpResponse),
|
|
1346
1418
|
|
|
1347
1419
|
/**
|
|
1348
|
-
* @description
|
|
1420
|
+
* @description List latest height for each chain
|
|
1349
1421
|
*
|
|
1350
|
-
* @tags
|
|
1351
|
-
* @name
|
|
1352
|
-
* @request GET:/
|
|
1422
|
+
* @tags Infos
|
|
1423
|
+
* @name GetInfosHeights
|
|
1424
|
+
* @request GET:/infos/heights
|
|
1353
1425
|
*/
|
|
1354
|
-
|
|
1355
|
-
this.request<
|
|
1356
|
-
path: `/
|
|
1426
|
+
getInfosHeights: (params: RequestParams = {}) =>
|
|
1427
|
+
this.request<PerChainHeight[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1428
|
+
path: `/infos/heights`,
|
|
1357
1429
|
method: 'GET',
|
|
1358
1430
|
format: 'json',
|
|
1359
1431
|
...params
|
|
1360
1432
|
}).then(convertHttpResponse),
|
|
1361
1433
|
|
|
1362
|
-
/**
|
|
1363
|
-
* @description Get public key of p2pkh addresses, the address needs to have at least one input.
|
|
1364
|
-
*
|
|
1365
|
-
* @tags Addresses
|
|
1366
|
-
* @name GetAddressesAddressPublicKey
|
|
1367
|
-
* @request GET:/addresses/{address}/public-key
|
|
1368
|
-
*/
|
|
1369
|
-
getAddressesAddressPublicKey: (address: string, params: RequestParams = {}) =>
|
|
1370
|
-
this.request<string, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1371
|
-
path: `/addresses/${address}/public-key`,
|
|
1372
|
-
method: 'GET',
|
|
1373
|
-
format: 'json',
|
|
1374
|
-
...params
|
|
1375
|
-
}).then(convertHttpResponse)
|
|
1376
|
-
}
|
|
1377
|
-
infos = {
|
|
1378
1434
|
/**
|
|
1379
1435
|
* @description Get token supply list
|
|
1380
1436
|
*
|
|
@@ -1409,35 +1465,20 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1409
1465
|
}).then(convertHttpResponse),
|
|
1410
1466
|
|
|
1411
1467
|
/**
|
|
1412
|
-
* @description Get the ALPH
|
|
1468
|
+
* @description Get the ALPH total supply
|
|
1413
1469
|
*
|
|
1414
1470
|
* @tags Infos
|
|
1415
|
-
* @name
|
|
1416
|
-
* @request GET:/infos/supply/
|
|
1471
|
+
* @name GetInfosSupplyTotalAlph
|
|
1472
|
+
* @request GET:/infos/supply/total-alph
|
|
1417
1473
|
*/
|
|
1418
|
-
|
|
1474
|
+
getInfosSupplyTotalAlph: (params: RequestParams = {}) =>
|
|
1419
1475
|
this.request<number, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1420
|
-
path: `/infos/supply/
|
|
1476
|
+
path: `/infos/supply/total-alph`,
|
|
1421
1477
|
method: 'GET',
|
|
1422
1478
|
format: 'text',
|
|
1423
1479
|
...params
|
|
1424
1480
|
}).then(convertHttpResponse),
|
|
1425
1481
|
|
|
1426
|
-
/**
|
|
1427
|
-
* @description Get explorer informations
|
|
1428
|
-
*
|
|
1429
|
-
* @tags Infos
|
|
1430
|
-
* @name GetInfos
|
|
1431
|
-
* @request GET:/infos
|
|
1432
|
-
*/
|
|
1433
|
-
getInfos: (params: RequestParams = {}) =>
|
|
1434
|
-
this.request<ExplorerInfo, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1435
|
-
path: `/infos`,
|
|
1436
|
-
method: 'GET',
|
|
1437
|
-
format: 'json',
|
|
1438
|
-
...params
|
|
1439
|
-
}).then(convertHttpResponse),
|
|
1440
|
-
|
|
1441
1482
|
/**
|
|
1442
1483
|
* @description Get the ALPH circulating supply
|
|
1443
1484
|
*
|
|
@@ -1454,65 +1495,50 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1454
1495
|
}).then(convertHttpResponse),
|
|
1455
1496
|
|
|
1456
1497
|
/**
|
|
1457
|
-
* @description Get the ALPH
|
|
1498
|
+
* @description Get the ALPH reserved supply
|
|
1458
1499
|
*
|
|
1459
1500
|
* @tags Infos
|
|
1460
|
-
* @name
|
|
1461
|
-
* @request GET:/infos/supply/
|
|
1501
|
+
* @name GetInfosSupplyReservedAlph
|
|
1502
|
+
* @request GET:/infos/supply/reserved-alph
|
|
1462
1503
|
*/
|
|
1463
|
-
|
|
1504
|
+
getInfosSupplyReservedAlph: (params: RequestParams = {}) =>
|
|
1464
1505
|
this.request<number, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1465
|
-
path: `/infos/supply/
|
|
1506
|
+
path: `/infos/supply/reserved-alph`,
|
|
1466
1507
|
method: 'GET',
|
|
1467
1508
|
format: 'text',
|
|
1468
1509
|
...params
|
|
1469
1510
|
}).then(convertHttpResponse),
|
|
1470
1511
|
|
|
1471
1512
|
/**
|
|
1472
|
-
* @description Get the
|
|
1513
|
+
* @description Get the ALPH locked supply
|
|
1473
1514
|
*
|
|
1474
1515
|
* @tags Infos
|
|
1475
|
-
* @name
|
|
1476
|
-
* @request GET:/infos/
|
|
1516
|
+
* @name GetInfosSupplyLockedAlph
|
|
1517
|
+
* @request GET:/infos/supply/locked-alph
|
|
1477
1518
|
*/
|
|
1478
|
-
|
|
1519
|
+
getInfosSupplyLockedAlph: (params: RequestParams = {}) =>
|
|
1479
1520
|
this.request<number, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1480
|
-
path: `/infos/
|
|
1521
|
+
path: `/infos/supply/locked-alph`,
|
|
1481
1522
|
method: 'GET',
|
|
1482
1523
|
format: 'text',
|
|
1483
1524
|
...params
|
|
1484
1525
|
}).then(convertHttpResponse),
|
|
1485
1526
|
|
|
1486
1527
|
/**
|
|
1487
|
-
* @description Get the
|
|
1528
|
+
* @description Get the total number of transactions
|
|
1488
1529
|
*
|
|
1489
1530
|
* @tags Infos
|
|
1490
|
-
* @name
|
|
1491
|
-
* @request GET:/infos/
|
|
1531
|
+
* @name GetInfosTotalTransactions
|
|
1532
|
+
* @request GET:/infos/total-transactions
|
|
1492
1533
|
*/
|
|
1493
|
-
|
|
1534
|
+
getInfosTotalTransactions: (params: RequestParams = {}) =>
|
|
1494
1535
|
this.request<number, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1495
|
-
path: `/infos/
|
|
1536
|
+
path: `/infos/total-transactions`,
|
|
1496
1537
|
method: 'GET',
|
|
1497
1538
|
format: 'text',
|
|
1498
1539
|
...params
|
|
1499
1540
|
}).then(convertHttpResponse),
|
|
1500
1541
|
|
|
1501
|
-
/**
|
|
1502
|
-
* @description List latest height for each chain
|
|
1503
|
-
*
|
|
1504
|
-
* @tags Infos
|
|
1505
|
-
* @name GetInfosHeights
|
|
1506
|
-
* @request GET:/infos/heights
|
|
1507
|
-
*/
|
|
1508
|
-
getInfosHeights: (params: RequestParams = {}) =>
|
|
1509
|
-
this.request<PerChainHeight[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1510
|
-
path: `/infos/heights`,
|
|
1511
|
-
method: 'GET',
|
|
1512
|
-
format: 'json',
|
|
1513
|
-
...params
|
|
1514
|
-
}).then(convertHttpResponse),
|
|
1515
|
-
|
|
1516
1542
|
/**
|
|
1517
1543
|
* @description Get the average block time for each chain
|
|
1518
1544
|
*
|
|
@@ -1530,90 +1556,44 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1530
1556
|
}
|
|
1531
1557
|
).then(convertHttpResponse)
|
|
1532
1558
|
}
|
|
1533
|
-
|
|
1534
|
-
/**
|
|
1535
|
-
* @description Perform a sanity check
|
|
1536
|
-
*
|
|
1537
|
-
* @tags Utils
|
|
1538
|
-
* @name PutUtilsSanityCheck
|
|
1539
|
-
* @request PUT:/utils/sanity-check
|
|
1540
|
-
*/
|
|
1541
|
-
putUtilsSanityCheck: (params: RequestParams = {}) =>
|
|
1542
|
-
this.request<void, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1543
|
-
path: `/utils/sanity-check`,
|
|
1544
|
-
method: 'PUT',
|
|
1545
|
-
...params
|
|
1546
|
-
}).then(convertHttpResponse),
|
|
1547
|
-
|
|
1548
|
-
/**
|
|
1549
|
-
* @description Update global log level, accepted: TRACE, DEBUG, INFO, WARN, ERROR
|
|
1550
|
-
*
|
|
1551
|
-
* @tags Utils
|
|
1552
|
-
* @name PutUtilsUpdateGlobalLoglevel
|
|
1553
|
-
* @request PUT:/utils/update-global-loglevel
|
|
1554
|
-
*/
|
|
1555
|
-
putUtilsUpdateGlobalLoglevel: (data: 'TRACE' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR', params: RequestParams = {}) =>
|
|
1556
|
-
this.request<void, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1557
|
-
path: `/utils/update-global-loglevel`,
|
|
1558
|
-
method: 'PUT',
|
|
1559
|
-
body: data,
|
|
1560
|
-
...params
|
|
1561
|
-
}).then(convertHttpResponse),
|
|
1562
|
-
|
|
1563
|
-
/**
|
|
1564
|
-
* @description Update logback values
|
|
1565
|
-
*
|
|
1566
|
-
* @tags Utils
|
|
1567
|
-
* @name PutUtilsUpdateLogConfig
|
|
1568
|
-
* @request PUT:/utils/update-log-config
|
|
1569
|
-
*/
|
|
1570
|
-
putUtilsUpdateLogConfig: (data?: LogbackValue[], params: RequestParams = {}) =>
|
|
1571
|
-
this.request<void, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1572
|
-
path: `/utils/update-log-config`,
|
|
1573
|
-
method: 'PUT',
|
|
1574
|
-
body: data,
|
|
1575
|
-
type: ContentType.Json,
|
|
1576
|
-
...params
|
|
1577
|
-
}).then(convertHttpResponse)
|
|
1578
|
-
}
|
|
1579
|
-
tokens = {
|
|
1559
|
+
mempool = {
|
|
1580
1560
|
/**
|
|
1581
|
-
* @description
|
|
1561
|
+
* @description list mempool transactions
|
|
1582
1562
|
*
|
|
1583
|
-
* @tags
|
|
1584
|
-
* @name
|
|
1585
|
-
* @request
|
|
1563
|
+
* @tags Mempool
|
|
1564
|
+
* @name GetMempoolTransactions
|
|
1565
|
+
* @request GET:/mempool/transactions
|
|
1586
1566
|
*/
|
|
1587
|
-
|
|
1567
|
+
getMempoolTransactions: (
|
|
1568
|
+
query?: {
|
|
1569
|
+
/**
|
|
1570
|
+
* Page number
|
|
1571
|
+
* @format int32
|
|
1572
|
+
* @min 1
|
|
1573
|
+
*/
|
|
1574
|
+
page?: number
|
|
1575
|
+
/**
|
|
1576
|
+
* Number of items per page
|
|
1577
|
+
* @format int32
|
|
1578
|
+
* @min 0
|
|
1579
|
+
* @max 100
|
|
1580
|
+
*/
|
|
1581
|
+
limit?: number
|
|
1582
|
+
},
|
|
1583
|
+
params: RequestParams = {}
|
|
1584
|
+
) =>
|
|
1588
1585
|
this.request<
|
|
1589
|
-
|
|
1586
|
+
MempoolTransaction[],
|
|
1590
1587
|
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1591
1588
|
>({
|
|
1592
|
-
path: `/
|
|
1593
|
-
method: '
|
|
1594
|
-
|
|
1595
|
-
type: ContentType.Json,
|
|
1596
|
-
format: 'json',
|
|
1597
|
-
...params
|
|
1598
|
-
}).then(convertHttpResponse),
|
|
1599
|
-
|
|
1600
|
-
/**
|
|
1601
|
-
* @description List given tokens information
|
|
1602
|
-
*
|
|
1603
|
-
* @tags Tokens
|
|
1604
|
-
* @name PostTokens
|
|
1605
|
-
* @request POST:/tokens
|
|
1606
|
-
*/
|
|
1607
|
-
postTokens: (data?: string[], params: RequestParams = {}) =>
|
|
1608
|
-
this.request<TokenInfo[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1609
|
-
path: `/tokens`,
|
|
1610
|
-
method: 'POST',
|
|
1611
|
-
body: data,
|
|
1612
|
-
type: ContentType.Json,
|
|
1589
|
+
path: `/mempool/transactions`,
|
|
1590
|
+
method: 'GET',
|
|
1591
|
+
query: query,
|
|
1613
1592
|
format: 'json',
|
|
1614
1593
|
...params
|
|
1615
|
-
}).then(convertHttpResponse)
|
|
1616
|
-
|
|
1594
|
+
}).then(convertHttpResponse)
|
|
1595
|
+
}
|
|
1596
|
+
tokens = {
|
|
1617
1597
|
/**
|
|
1618
1598
|
* @description List token information
|
|
1619
1599
|
*
|
|
@@ -1653,13 +1633,30 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1653
1633
|
}).then(convertHttpResponse),
|
|
1654
1634
|
|
|
1655
1635
|
/**
|
|
1656
|
-
* @description
|
|
1636
|
+
* @description List given tokens information
|
|
1657
1637
|
*
|
|
1658
1638
|
* @tags Tokens
|
|
1659
|
-
* @name
|
|
1660
|
-
* @request
|
|
1639
|
+
* @name PostTokens
|
|
1640
|
+
* @request POST:/tokens
|
|
1661
1641
|
*/
|
|
1662
|
-
|
|
1642
|
+
postTokens: (data?: string[], params: RequestParams = {}) =>
|
|
1643
|
+
this.request<TokenInfo[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1644
|
+
path: `/tokens`,
|
|
1645
|
+
method: 'POST',
|
|
1646
|
+
body: data,
|
|
1647
|
+
type: ContentType.Json,
|
|
1648
|
+
format: 'json',
|
|
1649
|
+
...params
|
|
1650
|
+
}).then(convertHttpResponse),
|
|
1651
|
+
|
|
1652
|
+
/**
|
|
1653
|
+
* @description List token transactions
|
|
1654
|
+
*
|
|
1655
|
+
* @tags Tokens
|
|
1656
|
+
* @name GetTokensTokenIdTransactions
|
|
1657
|
+
* @request GET:/tokens/{token_id}/transactions
|
|
1658
|
+
*/
|
|
1659
|
+
getTokensTokenIdTransactions: (
|
|
1663
1660
|
tokenId: string,
|
|
1664
1661
|
query?: {
|
|
1665
1662
|
/**
|
|
@@ -1678,8 +1675,8 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1678
1675
|
},
|
|
1679
1676
|
params: RequestParams = {}
|
|
1680
1677
|
) =>
|
|
1681
|
-
this.request<
|
|
1682
|
-
path: `/tokens
|
|
1678
|
+
this.request<Transaction[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1679
|
+
path: `/tokens/${tokenId}/transactions`,
|
|
1683
1680
|
method: 'GET',
|
|
1684
1681
|
query: query,
|
|
1685
1682
|
format: 'json',
|
|
@@ -1687,13 +1684,13 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1687
1684
|
}).then(convertHttpResponse),
|
|
1688
1685
|
|
|
1689
1686
|
/**
|
|
1690
|
-
* @description List token
|
|
1687
|
+
* @description List token addresses
|
|
1691
1688
|
*
|
|
1692
1689
|
* @tags Tokens
|
|
1693
|
-
* @name
|
|
1694
|
-
* @request GET:/tokens/{token_id}/
|
|
1690
|
+
* @name GetTokensTokenIdAddresses
|
|
1691
|
+
* @request GET:/tokens/{token_id}/addresses
|
|
1695
1692
|
*/
|
|
1696
|
-
|
|
1693
|
+
getTokensTokenIdAddresses: (
|
|
1697
1694
|
tokenId: string,
|
|
1698
1695
|
query?: {
|
|
1699
1696
|
/**
|
|
@@ -1712,14 +1709,51 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1712
1709
|
},
|
|
1713
1710
|
params: RequestParams = {}
|
|
1714
1711
|
) =>
|
|
1715
|
-
this.request<
|
|
1716
|
-
path: `/tokens/${tokenId}/
|
|
1712
|
+
this.request<string[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1713
|
+
path: `/tokens/${tokenId}/addresses`,
|
|
1717
1714
|
method: 'GET',
|
|
1718
1715
|
query: query,
|
|
1719
1716
|
format: 'json',
|
|
1720
1717
|
...params
|
|
1721
1718
|
}).then(convertHttpResponse),
|
|
1722
1719
|
|
|
1720
|
+
/**
|
|
1721
|
+
* @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
|
|
1722
|
+
*
|
|
1723
|
+
* @tags Tokens
|
|
1724
|
+
* @name PostTokensFungibleMetadata
|
|
1725
|
+
* @request POST:/tokens/fungible-metadata
|
|
1726
|
+
*/
|
|
1727
|
+
postTokensFungibleMetadata: (data?: string[], params: RequestParams = {}) =>
|
|
1728
|
+
this.request<
|
|
1729
|
+
FungibleTokenMetadata[],
|
|
1730
|
+
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1731
|
+
>({
|
|
1732
|
+
path: `/tokens/fungible-metadata`,
|
|
1733
|
+
method: 'POST',
|
|
1734
|
+
body: data,
|
|
1735
|
+
type: ContentType.Json,
|
|
1736
|
+
format: 'json',
|
|
1737
|
+
...params
|
|
1738
|
+
}).then(convertHttpResponse),
|
|
1739
|
+
|
|
1740
|
+
/**
|
|
1741
|
+
* @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
|
|
1742
|
+
*
|
|
1743
|
+
* @tags Tokens
|
|
1744
|
+
* @name PostTokensNftMetadata
|
|
1745
|
+
* @request POST:/tokens/nft-metadata
|
|
1746
|
+
*/
|
|
1747
|
+
postTokensNftMetadata: (data?: string[], params: RequestParams = {}) =>
|
|
1748
|
+
this.request<NFTMetadata[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1749
|
+
path: `/tokens/nft-metadata`,
|
|
1750
|
+
method: 'POST',
|
|
1751
|
+
body: data,
|
|
1752
|
+
type: ContentType.Json,
|
|
1753
|
+
format: 'json',
|
|
1754
|
+
...params
|
|
1755
|
+
}).then(convertHttpResponse),
|
|
1756
|
+
|
|
1723
1757
|
/**
|
|
1724
1758
|
* @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
|
|
1725
1759
|
*
|
|
@@ -1741,14 +1775,13 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1741
1775
|
}).then(convertHttpResponse),
|
|
1742
1776
|
|
|
1743
1777
|
/**
|
|
1744
|
-
* @description
|
|
1778
|
+
* @description Get a sorted list of top addresses by ALPH balance. Updates once per day.
|
|
1745
1779
|
*
|
|
1746
1780
|
* @tags Tokens
|
|
1747
|
-
* @name
|
|
1748
|
-
* @request GET:/tokens/
|
|
1781
|
+
* @name GetTokensHoldersAlph
|
|
1782
|
+
* @request GET:/tokens/holders/alph
|
|
1749
1783
|
*/
|
|
1750
|
-
|
|
1751
|
-
tokenId: string,
|
|
1784
|
+
getTokensHoldersAlph: (
|
|
1752
1785
|
query?: {
|
|
1753
1786
|
/**
|
|
1754
1787
|
* Page number
|
|
@@ -1766,8 +1799,8 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1766
1799
|
},
|
|
1767
1800
|
params: RequestParams = {}
|
|
1768
1801
|
) =>
|
|
1769
|
-
this.request<
|
|
1770
|
-
path: `/tokens
|
|
1802
|
+
this.request<HolderInfo[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1803
|
+
path: `/tokens/holders/alph`,
|
|
1771
1804
|
method: 'GET',
|
|
1772
1805
|
query: query,
|
|
1773
1806
|
format: 'json',
|
|
@@ -1775,13 +1808,14 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1775
1808
|
}).then(convertHttpResponse),
|
|
1776
1809
|
|
|
1777
1810
|
/**
|
|
1778
|
-
* @description Get a sorted list of top addresses by
|
|
1811
|
+
* @description Get a sorted list of top addresses by {token_id} balance. Updates once per day.
|
|
1779
1812
|
*
|
|
1780
1813
|
* @tags Tokens
|
|
1781
|
-
* @name
|
|
1782
|
-
* @request GET:/tokens/holders/
|
|
1814
|
+
* @name GetTokensHoldersTokenTokenId
|
|
1815
|
+
* @request GET:/tokens/holders/token/{token_id}
|
|
1783
1816
|
*/
|
|
1784
|
-
|
|
1817
|
+
getTokensHoldersTokenTokenId: (
|
|
1818
|
+
tokenId: string,
|
|
1785
1819
|
query?: {
|
|
1786
1820
|
/**
|
|
1787
1821
|
* Page number
|
|
@@ -1800,178 +1834,113 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1800
1834
|
params: RequestParams = {}
|
|
1801
1835
|
) =>
|
|
1802
1836
|
this.request<HolderInfo[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1803
|
-
path: `/tokens/holders/
|
|
1837
|
+
path: `/tokens/holders/token/${tokenId}`,
|
|
1804
1838
|
method: 'GET',
|
|
1805
1839
|
query: query,
|
|
1806
1840
|
format: 'json',
|
|
1807
1841
|
...params
|
|
1808
|
-
}).then(convertHttpResponse),
|
|
1809
|
-
|
|
1810
|
-
/**
|
|
1811
|
-
* @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
|
|
1812
|
-
*
|
|
1813
|
-
* @tags Tokens
|
|
1814
|
-
* @name PostTokensNftMetadata
|
|
1815
|
-
* @request POST:/tokens/nft-metadata
|
|
1816
|
-
*/
|
|
1817
|
-
postTokensNftMetadata: (data?: string[], params: RequestParams = {}) =>
|
|
1818
|
-
this.request<NFTMetadata[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1819
|
-
path: `/tokens/nft-metadata`,
|
|
1820
|
-
method: 'POST',
|
|
1821
|
-
body: data,
|
|
1822
|
-
type: ContentType.Json,
|
|
1823
|
-
format: 'json',
|
|
1824
|
-
...params
|
|
1825
1842
|
}).then(convertHttpResponse)
|
|
1826
1843
|
}
|
|
1827
|
-
|
|
1844
|
+
charts = {
|
|
1828
1845
|
/**
|
|
1829
|
-
*
|
|
1846
|
+
* @description `interval-type` query param: hourly, daily
|
|
1830
1847
|
*
|
|
1831
|
-
* @tags
|
|
1832
|
-
* @name
|
|
1833
|
-
* @
|
|
1848
|
+
* @tags Charts
|
|
1849
|
+
* @name GetChartsHashrates
|
|
1850
|
+
* @summary Get hashrate chart in H/s
|
|
1851
|
+
* @request GET:/charts/hashrates
|
|
1834
1852
|
*/
|
|
1835
|
-
|
|
1853
|
+
getChartsHashrates: (
|
|
1836
1854
|
query: {
|
|
1837
|
-
|
|
1855
|
+
/**
|
|
1856
|
+
* @format int64
|
|
1857
|
+
* @min 0
|
|
1858
|
+
*/
|
|
1859
|
+
fromTs: number
|
|
1860
|
+
/**
|
|
1861
|
+
* @format int64
|
|
1862
|
+
* @min 0
|
|
1863
|
+
*/
|
|
1864
|
+
toTs: number
|
|
1865
|
+
'interval-type': IntervalType
|
|
1838
1866
|
},
|
|
1839
|
-
data?: string[],
|
|
1840
1867
|
params: RequestParams = {}
|
|
1841
1868
|
) =>
|
|
1842
|
-
this.request<
|
|
1843
|
-
path: `/
|
|
1844
|
-
method: '
|
|
1869
|
+
this.request<Hashrate[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1870
|
+
path: `/charts/hashrates`,
|
|
1871
|
+
method: 'GET',
|
|
1845
1872
|
query: query,
|
|
1846
|
-
body: data,
|
|
1847
|
-
type: ContentType.Json,
|
|
1848
1873
|
format: 'json',
|
|
1849
1874
|
...params
|
|
1850
1875
|
}).then(convertHttpResponse),
|
|
1851
1876
|
|
|
1852
1877
|
/**
|
|
1853
|
-
*
|
|
1878
|
+
* @description `interval-type` query param: hourly, daily
|
|
1854
1879
|
*
|
|
1855
|
-
* @tags
|
|
1856
|
-
* @name
|
|
1857
|
-
* @
|
|
1880
|
+
* @tags Charts
|
|
1881
|
+
* @name GetChartsTransactionsCount
|
|
1882
|
+
* @summary Get transaction count history
|
|
1883
|
+
* @request GET:/charts/transactions-count
|
|
1858
1884
|
*/
|
|
1859
|
-
|
|
1860
|
-
symbol: string,
|
|
1885
|
+
getChartsTransactionsCount: (
|
|
1861
1886
|
query: {
|
|
1862
|
-
currency: string
|
|
1863
|
-
},
|
|
1864
|
-
params: RequestParams = {}
|
|
1865
|
-
) =>
|
|
1866
|
-
this.request<TimedPrices, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1867
|
-
path: `/market/prices/${symbol}/charts`,
|
|
1868
|
-
method: 'GET',
|
|
1869
|
-
query: query,
|
|
1870
|
-
format: 'json',
|
|
1871
|
-
...params
|
|
1872
|
-
}).then(convertHttpResponse)
|
|
1873
|
-
}
|
|
1874
|
-
blocks = {
|
|
1875
|
-
/**
|
|
1876
|
-
* @description Get block's transactions
|
|
1877
|
-
*
|
|
1878
|
-
* @tags Blocks
|
|
1879
|
-
* @name GetBlocksBlockHashTransactions
|
|
1880
|
-
* @request GET:/blocks/{block_hash}/transactions
|
|
1881
|
-
*/
|
|
1882
|
-
getBlocksBlockHashTransactions: (
|
|
1883
|
-
blockHash: string,
|
|
1884
|
-
query?: {
|
|
1885
1887
|
/**
|
|
1886
|
-
*
|
|
1887
|
-
* @
|
|
1888
|
-
* @min 1
|
|
1888
|
+
* @format int64
|
|
1889
|
+
* @min 0
|
|
1889
1890
|
*/
|
|
1890
|
-
|
|
1891
|
+
fromTs: number
|
|
1891
1892
|
/**
|
|
1892
|
-
*
|
|
1893
|
-
* @format int32
|
|
1893
|
+
* @format int64
|
|
1894
1894
|
* @min 0
|
|
1895
|
-
* @max 100
|
|
1896
1895
|
*/
|
|
1897
|
-
|
|
1896
|
+
toTs: number
|
|
1897
|
+
'interval-type': IntervalType
|
|
1898
1898
|
},
|
|
1899
1899
|
params: RequestParams = {}
|
|
1900
1900
|
) =>
|
|
1901
|
-
this.request<
|
|
1902
|
-
path: `/
|
|
1903
|
-
method: 'GET',
|
|
1904
|
-
query: query,
|
|
1905
|
-
format: 'json',
|
|
1906
|
-
...params
|
|
1907
|
-
}).then(convertHttpResponse),
|
|
1908
|
-
|
|
1909
|
-
/**
|
|
1910
|
-
* @description Get a block with hash
|
|
1911
|
-
*
|
|
1912
|
-
* @tags Blocks
|
|
1913
|
-
* @name GetBlocksBlockHash
|
|
1914
|
-
* @request GET:/blocks/{block_hash}
|
|
1915
|
-
*/
|
|
1916
|
-
getBlocksBlockHash: (blockHash: string, params: RequestParams = {}) =>
|
|
1917
|
-
this.request<BlockEntry, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1918
|
-
path: `/blocks/${blockHash}`,
|
|
1901
|
+
this.request<TimedCount[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1902
|
+
path: `/charts/transactions-count`,
|
|
1919
1903
|
method: 'GET',
|
|
1904
|
+
query: query,
|
|
1920
1905
|
format: 'json',
|
|
1921
1906
|
...params
|
|
1922
1907
|
}).then(convertHttpResponse),
|
|
1923
1908
|
|
|
1924
1909
|
/**
|
|
1925
|
-
* @description
|
|
1910
|
+
* @description `interval-type` query param: hourly, daily
|
|
1926
1911
|
*
|
|
1927
|
-
* @tags
|
|
1928
|
-
* @name
|
|
1929
|
-
* @
|
|
1912
|
+
* @tags Charts
|
|
1913
|
+
* @name GetChartsTransactionsCountPerChain
|
|
1914
|
+
* @summary Get transaction count history per chain
|
|
1915
|
+
* @request GET:/charts/transactions-count-per-chain
|
|
1930
1916
|
*/
|
|
1931
|
-
|
|
1932
|
-
query
|
|
1917
|
+
getChartsTransactionsCountPerChain: (
|
|
1918
|
+
query: {
|
|
1933
1919
|
/**
|
|
1934
|
-
*
|
|
1935
|
-
* @
|
|
1936
|
-
* @min 1
|
|
1920
|
+
* @format int64
|
|
1921
|
+
* @min 0
|
|
1937
1922
|
*/
|
|
1938
|
-
|
|
1923
|
+
fromTs: number
|
|
1939
1924
|
/**
|
|
1940
|
-
*
|
|
1941
|
-
* @format int32
|
|
1925
|
+
* @format int64
|
|
1942
1926
|
* @min 0
|
|
1943
|
-
* @max 100
|
|
1944
1927
|
*/
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
reverse?: boolean
|
|
1928
|
+
toTs: number
|
|
1929
|
+
'interval-type': IntervalType
|
|
1948
1930
|
},
|
|
1949
1931
|
params: RequestParams = {}
|
|
1950
1932
|
) =>
|
|
1951
|
-
this.request<
|
|
1952
|
-
|
|
1933
|
+
this.request<
|
|
1934
|
+
PerChainTimedCount[],
|
|
1935
|
+
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
1936
|
+
>({
|
|
1937
|
+
path: `/charts/transactions-count-per-chain`,
|
|
1953
1938
|
method: 'GET',
|
|
1954
1939
|
query: query,
|
|
1955
1940
|
format: 'json',
|
|
1956
1941
|
...params
|
|
1957
1942
|
}).then(convertHttpResponse)
|
|
1958
1943
|
}
|
|
1959
|
-
transactions = {
|
|
1960
|
-
/**
|
|
1961
|
-
* @description Get a transaction with hash
|
|
1962
|
-
*
|
|
1963
|
-
* @tags Transactions
|
|
1964
|
-
* @name GetTransactionsTransactionHash
|
|
1965
|
-
* @request GET:/transactions/{transaction_hash}
|
|
1966
|
-
*/
|
|
1967
|
-
getTransactionsTransactionHash: (transactionHash: string, params: RequestParams = {}) =>
|
|
1968
|
-
this.request<TransactionLike, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1969
|
-
path: `/transactions/${transactionHash}`,
|
|
1970
|
-
method: 'GET',
|
|
1971
|
-
format: 'json',
|
|
1972
|
-
...params
|
|
1973
|
-
}).then(convertHttpResponse)
|
|
1974
|
-
}
|
|
1975
1944
|
contractEvents = {
|
|
1976
1945
|
/**
|
|
1977
1946
|
* @description Get contract events by transaction id
|
|
@@ -2057,140 +2026,161 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
2057
2026
|
...params
|
|
2058
2027
|
}).then(convertHttpResponse)
|
|
2059
2028
|
}
|
|
2060
|
-
|
|
2029
|
+
contracts = {
|
|
2061
2030
|
/**
|
|
2062
|
-
* @description
|
|
2031
|
+
* @description Get contract liveness
|
|
2063
2032
|
*
|
|
2064
|
-
* @tags
|
|
2065
|
-
* @name
|
|
2066
|
-
* @
|
|
2067
|
-
* @request GET:/charts/transactions-count-per-chain
|
|
2033
|
+
* @tags Contracts
|
|
2034
|
+
* @name GetContractsContractAddressCurrentLiveness
|
|
2035
|
+
* @request GET:/contracts/{contract_address}/current-liveness
|
|
2068
2036
|
*/
|
|
2069
|
-
|
|
2070
|
-
|
|
2037
|
+
getContractsContractAddressCurrentLiveness: (contractAddress: string, params: RequestParams = {}) =>
|
|
2038
|
+
this.request<ContractLiveness, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
2039
|
+
path: `/contracts/${contractAddress}/current-liveness`,
|
|
2040
|
+
method: 'GET',
|
|
2041
|
+
format: 'json',
|
|
2042
|
+
...params
|
|
2043
|
+
}).then(convertHttpResponse),
|
|
2044
|
+
|
|
2045
|
+
/**
|
|
2046
|
+
* @description Get contract parent address if exist
|
|
2047
|
+
*
|
|
2048
|
+
* @tags Contracts
|
|
2049
|
+
* @name GetContractsContractAddressParent
|
|
2050
|
+
* @request GET:/contracts/{contract_address}/parent
|
|
2051
|
+
*/
|
|
2052
|
+
getContractsContractAddressParent: (contractAddress: string, params: RequestParams = {}) =>
|
|
2053
|
+
this.request<ContractParent, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
2054
|
+
path: `/contracts/${contractAddress}/parent`,
|
|
2055
|
+
method: 'GET',
|
|
2056
|
+
format: 'json',
|
|
2057
|
+
...params
|
|
2058
|
+
}).then(convertHttpResponse),
|
|
2059
|
+
|
|
2060
|
+
/**
|
|
2061
|
+
* @description Get sub contract addresses
|
|
2062
|
+
*
|
|
2063
|
+
* @tags Contracts
|
|
2064
|
+
* @name GetContractsContractAddressSubContracts
|
|
2065
|
+
* @request GET:/contracts/{contract_address}/sub-contracts
|
|
2066
|
+
*/
|
|
2067
|
+
getContractsContractAddressSubContracts: (
|
|
2068
|
+
contractAddress: string,
|
|
2069
|
+
query?: {
|
|
2071
2070
|
/**
|
|
2072
|
-
*
|
|
2073
|
-
* @
|
|
2071
|
+
* Page number
|
|
2072
|
+
* @format int32
|
|
2073
|
+
* @min 1
|
|
2074
2074
|
*/
|
|
2075
|
-
|
|
2075
|
+
page?: number
|
|
2076
2076
|
/**
|
|
2077
|
-
*
|
|
2077
|
+
* Number of items per page
|
|
2078
|
+
* @format int32
|
|
2078
2079
|
* @min 0
|
|
2080
|
+
* @max 100
|
|
2079
2081
|
*/
|
|
2080
|
-
|
|
2081
|
-
'interval-type': IntervalType
|
|
2082
|
+
limit?: number
|
|
2082
2083
|
},
|
|
2083
2084
|
params: RequestParams = {}
|
|
2084
2085
|
) =>
|
|
2085
|
-
this.request<
|
|
2086
|
-
|
|
2087
|
-
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
2088
|
-
>({
|
|
2089
|
-
path: `/charts/transactions-count-per-chain`,
|
|
2086
|
+
this.request<SubContracts, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
2087
|
+
path: `/contracts/${contractAddress}/sub-contracts`,
|
|
2090
2088
|
method: 'GET',
|
|
2091
2089
|
query: query,
|
|
2092
2090
|
format: 'json',
|
|
2093
2091
|
...params
|
|
2094
|
-
}).then(convertHttpResponse)
|
|
2095
|
-
|
|
2092
|
+
}).then(convertHttpResponse)
|
|
2093
|
+
}
|
|
2094
|
+
market = {
|
|
2096
2095
|
/**
|
|
2097
|
-
*
|
|
2096
|
+
* No description
|
|
2098
2097
|
*
|
|
2099
|
-
* @tags
|
|
2100
|
-
* @name
|
|
2101
|
-
* @
|
|
2102
|
-
* @request GET:/charts/transactions-count
|
|
2098
|
+
* @tags Market
|
|
2099
|
+
* @name PostMarketPrices
|
|
2100
|
+
* @request POST:/market/prices
|
|
2103
2101
|
*/
|
|
2104
|
-
|
|
2102
|
+
postMarketPrices: (
|
|
2105
2103
|
query: {
|
|
2106
|
-
|
|
2107
|
-
* @format int64
|
|
2108
|
-
* @min 0
|
|
2109
|
-
*/
|
|
2110
|
-
fromTs: number
|
|
2111
|
-
/**
|
|
2112
|
-
* @format int64
|
|
2113
|
-
* @min 0
|
|
2114
|
-
*/
|
|
2115
|
-
toTs: number
|
|
2116
|
-
'interval-type': IntervalType
|
|
2104
|
+
currency: string
|
|
2117
2105
|
},
|
|
2106
|
+
data?: string[],
|
|
2118
2107
|
params: RequestParams = {}
|
|
2119
2108
|
) =>
|
|
2120
|
-
this.request<
|
|
2121
|
-
path: `/
|
|
2122
|
-
method: '
|
|
2109
|
+
this.request<number[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
2110
|
+
path: `/market/prices`,
|
|
2111
|
+
method: 'POST',
|
|
2123
2112
|
query: query,
|
|
2113
|
+
body: data,
|
|
2114
|
+
type: ContentType.Json,
|
|
2124
2115
|
format: 'json',
|
|
2125
2116
|
...params
|
|
2126
2117
|
}).then(convertHttpResponse),
|
|
2127
2118
|
|
|
2128
2119
|
/**
|
|
2129
|
-
*
|
|
2120
|
+
* No description
|
|
2130
2121
|
*
|
|
2131
|
-
* @tags
|
|
2132
|
-
* @name
|
|
2133
|
-
* @
|
|
2134
|
-
* @request GET:/charts/hashrates
|
|
2122
|
+
* @tags Market
|
|
2123
|
+
* @name GetMarketPricesSymbolCharts
|
|
2124
|
+
* @request GET:/market/prices/{symbol}/charts
|
|
2135
2125
|
*/
|
|
2136
|
-
|
|
2126
|
+
getMarketPricesSymbolCharts: (
|
|
2127
|
+
symbol: string,
|
|
2137
2128
|
query: {
|
|
2138
|
-
|
|
2139
|
-
* @format int64
|
|
2140
|
-
* @min 0
|
|
2141
|
-
*/
|
|
2142
|
-
fromTs: number
|
|
2143
|
-
/**
|
|
2144
|
-
* @format int64
|
|
2145
|
-
* @min 0
|
|
2146
|
-
*/
|
|
2147
|
-
toTs: number
|
|
2148
|
-
'interval-type': IntervalType
|
|
2129
|
+
currency: string
|
|
2149
2130
|
},
|
|
2150
2131
|
params: RequestParams = {}
|
|
2151
2132
|
) =>
|
|
2152
|
-
this.request<
|
|
2153
|
-
path: `/charts
|
|
2133
|
+
this.request<TimedPrices, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
2134
|
+
path: `/market/prices/${symbol}/charts`,
|
|
2154
2135
|
method: 'GET',
|
|
2155
2136
|
query: query,
|
|
2156
2137
|
format: 'json',
|
|
2157
2138
|
...params
|
|
2158
2139
|
}).then(convertHttpResponse)
|
|
2159
2140
|
}
|
|
2160
|
-
|
|
2141
|
+
utils = {
|
|
2161
2142
|
/**
|
|
2162
|
-
* @description
|
|
2143
|
+
* @description Perform a sanity check
|
|
2163
2144
|
*
|
|
2164
|
-
* @tags
|
|
2165
|
-
* @name
|
|
2166
|
-
* @request
|
|
2145
|
+
* @tags Utils
|
|
2146
|
+
* @name PutUtilsSanityCheck
|
|
2147
|
+
* @request PUT:/utils/sanity-check
|
|
2167
2148
|
*/
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2149
|
+
putUtilsSanityCheck: (params: RequestParams = {}) =>
|
|
2150
|
+
this.request<void, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
2151
|
+
path: `/utils/sanity-check`,
|
|
2152
|
+
method: 'PUT',
|
|
2153
|
+
...params
|
|
2154
|
+
}).then(convertHttpResponse),
|
|
2155
|
+
|
|
2156
|
+
/**
|
|
2157
|
+
* @description Update global log level, accepted: TRACE, DEBUG, INFO, WARN, ERROR
|
|
2158
|
+
*
|
|
2159
|
+
* @tags Utils
|
|
2160
|
+
* @name PutUtilsUpdateGlobalLoglevel
|
|
2161
|
+
* @request PUT:/utils/update-global-loglevel
|
|
2162
|
+
*/
|
|
2163
|
+
putUtilsUpdateGlobalLoglevel: (data: 'TRACE' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR', params: RequestParams = {}) =>
|
|
2164
|
+
this.request<void, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
2165
|
+
path: `/utils/update-global-loglevel`,
|
|
2166
|
+
method: 'PUT',
|
|
2167
|
+
body: data,
|
|
2168
|
+
...params
|
|
2169
|
+
}).then(convertHttpResponse),
|
|
2170
|
+
|
|
2171
|
+
/**
|
|
2172
|
+
* @description Update logback values
|
|
2173
|
+
*
|
|
2174
|
+
* @tags Utils
|
|
2175
|
+
* @name PutUtilsUpdateLogConfig
|
|
2176
|
+
* @request PUT:/utils/update-log-config
|
|
2177
|
+
*/
|
|
2178
|
+
putUtilsUpdateLogConfig: (data?: LogbackValue[], params: RequestParams = {}) =>
|
|
2179
|
+
this.request<void, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
2180
|
+
path: `/utils/update-log-config`,
|
|
2181
|
+
method: 'PUT',
|
|
2182
|
+
body: data,
|
|
2183
|
+
type: ContentType.Json,
|
|
2194
2184
|
...params
|
|
2195
2185
|
}).then(convertHttpResponse)
|
|
2196
2186
|
}
|