@stacks/blockchain-api-client 7.4.0-nakamoto.10 → 7.4.0-nakamoto.12
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/lib/generated/apis/BlocksApi.d.ts +15 -71
- package/lib/generated/apis/BlocksApi.js +10 -65
- package/lib/generated/apis/BlocksApi.js.map +1 -1
- package/lib/generated/apis/BurnBlocksApi.d.ts +82 -0
- package/lib/generated/apis/BurnBlocksApi.js +80 -0
- package/lib/generated/apis/BurnBlocksApi.js.map +1 -0
- package/lib/generated/apis/TransactionsApi.d.ts +35 -8
- package/lib/generated/apis/TransactionsApi.js +30 -4
- package/lib/generated/apis/TransactionsApi.js.map +1 -1
- package/lib/generated/apis/index.d.ts +1 -0
- package/lib/generated/apis/index.js +1 -0
- package/lib/generated/apis/index.js.map +1 -1
- package/lib/index.umd.js +123 -59
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/.openapi-generator/FILES +1 -0
- package/src/generated/apis/BlocksApi.ts +18 -137
- package/src/generated/apis/BurnBlocksApi.ts +150 -0
- package/src/generated/apis/TransactionsApi.ts +60 -8
- package/src/generated/apis/index.ts +1 -0
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { Block, BlockListResponse,
|
|
13
|
+
import { Block, BlockListResponse, NakamotoBlock, NakamotoBlockListResponse } from '../models';
|
|
14
14
|
export interface GetBlockRequest {
|
|
15
15
|
heightOrHash: number | string;
|
|
16
16
|
}
|
|
@@ -30,19 +30,12 @@ export interface GetBlockListRequest {
|
|
|
30
30
|
limit?: number;
|
|
31
31
|
offset?: number;
|
|
32
32
|
}
|
|
33
|
-
export interface GetBlockTransactionsRequest {
|
|
34
|
-
heightOrHash: number | string;
|
|
35
|
-
}
|
|
36
33
|
export interface GetBlocksRequest {
|
|
37
34
|
limit?: number;
|
|
38
35
|
offset?: number;
|
|
39
|
-
burnBlockHash?: string;
|
|
40
|
-
burnBlockHeight?: number;
|
|
41
36
|
}
|
|
42
|
-
export interface
|
|
37
|
+
export interface GetBlocksByBurnBlockRequest {
|
|
43
38
|
heightOrHash: number | string;
|
|
44
|
-
}
|
|
45
|
-
export interface GetBurnBlocksRequest {
|
|
46
39
|
limit?: number;
|
|
47
40
|
offset?: number;
|
|
48
41
|
}
|
|
@@ -138,27 +131,11 @@ export interface BlocksApiInterface {
|
|
|
138
131
|
* Get recent blocks
|
|
139
132
|
*/
|
|
140
133
|
getBlockList(requestParameters: GetBlockListRequest, initOverrides?: RequestInit): Promise<BlockListResponse>;
|
|
141
|
-
/**
|
|
142
|
-
* Retrieves transactions confirmed in a single block
|
|
143
|
-
* @summary Get block transactions
|
|
144
|
-
* @param {number | string} heightOrHash filter by block height, hash, index block hash or the constant `latest` to filter for the most recent block
|
|
145
|
-
* @param {*} [options] Override http request option.
|
|
146
|
-
* @throws {RequiredError}
|
|
147
|
-
* @memberof BlocksApiInterface
|
|
148
|
-
*/
|
|
149
|
-
getBlockTransactionsRaw(requestParameters: GetBlockTransactionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<TransactionResults>>;
|
|
150
|
-
/**
|
|
151
|
-
* Retrieves transactions confirmed in a single block
|
|
152
|
-
* Get block transactions
|
|
153
|
-
*/
|
|
154
|
-
getBlockTransactions(requestParameters: GetBlockTransactionsRequest, initOverrides?: RequestInit): Promise<TransactionResults>;
|
|
155
134
|
/**
|
|
156
135
|
* Retrieves a list of recently mined blocks
|
|
157
136
|
* @summary Get blocks
|
|
158
137
|
* @param {number} [limit] max number of blocks to fetch
|
|
159
138
|
* @param {number} [offset] index of first burn block to fetch
|
|
160
|
-
* @param {string} [burnBlockHash] filter blocks by burn block hash
|
|
161
|
-
* @param {number} [burnBlockHeight] filter blocks by burn block height
|
|
162
139
|
* @param {*} [options] Override http request option.
|
|
163
140
|
* @throws {RequiredError}
|
|
164
141
|
* @memberof BlocksApiInterface
|
|
@@ -170,34 +147,21 @@ export interface BlocksApiInterface {
|
|
|
170
147
|
*/
|
|
171
148
|
getBlocks(requestParameters: GetBlocksRequest, initOverrides?: RequestInit): Promise<NakamotoBlockListResponse>;
|
|
172
149
|
/**
|
|
173
|
-
* Retrieves a
|
|
174
|
-
* @summary Get burn block
|
|
150
|
+
* Retrieves a list of blocks confirmed by a specific burn block
|
|
151
|
+
* @summary Get blocks by burn block
|
|
175
152
|
* @param {number | string} heightOrHash filter by burn block height, hash, or the constant `latest` to filter for the most recent burn block
|
|
176
|
-
* @param {
|
|
177
|
-
* @throws {RequiredError}
|
|
178
|
-
* @memberof BlocksApiInterface
|
|
179
|
-
*/
|
|
180
|
-
getBurnBlockRaw(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BurnBlock>>;
|
|
181
|
-
/**
|
|
182
|
-
* Retrieves a single burn block
|
|
183
|
-
* Get burn block
|
|
184
|
-
*/
|
|
185
|
-
getBurnBlock(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise<BurnBlock>;
|
|
186
|
-
/**
|
|
187
|
-
* Retrieves a list of recent burn blocks
|
|
188
|
-
* @summary Get burn blocks
|
|
189
|
-
* @param {number} [limit] max number of burn blocks to fetch
|
|
153
|
+
* @param {number} [limit] max number of blocks to fetch
|
|
190
154
|
* @param {number} [offset] index of first burn block to fetch
|
|
191
155
|
* @param {*} [options] Override http request option.
|
|
192
156
|
* @throws {RequiredError}
|
|
193
157
|
* @memberof BlocksApiInterface
|
|
194
158
|
*/
|
|
195
|
-
|
|
159
|
+
getBlocksByBurnBlockRaw(requestParameters: GetBlocksByBurnBlockRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NakamotoBlockListResponse>>;
|
|
196
160
|
/**
|
|
197
|
-
* Retrieves a list of
|
|
198
|
-
* Get burn
|
|
161
|
+
* Retrieves a list of blocks confirmed by a specific burn block
|
|
162
|
+
* Get blocks by burn block
|
|
199
163
|
*/
|
|
200
|
-
|
|
164
|
+
getBlocksByBurnBlock(requestParameters: GetBlocksByBurnBlockRequest, initOverrides?: RequestInit): Promise<NakamotoBlockListResponse>;
|
|
201
165
|
}
|
|
202
166
|
/**
|
|
203
167
|
*
|
|
@@ -263,16 +227,6 @@ export declare class BlocksApi extends runtime.BaseAPI implements BlocksApiInter
|
|
|
263
227
|
* Get recent blocks
|
|
264
228
|
*/
|
|
265
229
|
getBlockList(requestParameters: GetBlockListRequest, initOverrides?: RequestInit): Promise<BlockListResponse>;
|
|
266
|
-
/**
|
|
267
|
-
* Retrieves transactions confirmed in a single block
|
|
268
|
-
* Get block transactions
|
|
269
|
-
*/
|
|
270
|
-
getBlockTransactionsRaw(requestParameters: GetBlockTransactionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<TransactionResults>>;
|
|
271
|
-
/**
|
|
272
|
-
* Retrieves transactions confirmed in a single block
|
|
273
|
-
* Get block transactions
|
|
274
|
-
*/
|
|
275
|
-
getBlockTransactions(requestParameters: GetBlockTransactionsRequest, initOverrides?: RequestInit): Promise<TransactionResults>;
|
|
276
230
|
/**
|
|
277
231
|
* Retrieves a list of recently mined blocks
|
|
278
232
|
* Get blocks
|
|
@@ -284,23 +238,13 @@ export declare class BlocksApi extends runtime.BaseAPI implements BlocksApiInter
|
|
|
284
238
|
*/
|
|
285
239
|
getBlocks(requestParameters: GetBlocksRequest, initOverrides?: RequestInit): Promise<NakamotoBlockListResponse>;
|
|
286
240
|
/**
|
|
287
|
-
* Retrieves a
|
|
288
|
-
* Get burn block
|
|
289
|
-
*/
|
|
290
|
-
getBurnBlockRaw(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BurnBlock>>;
|
|
291
|
-
/**
|
|
292
|
-
* Retrieves a single burn block
|
|
293
|
-
* Get burn block
|
|
294
|
-
*/
|
|
295
|
-
getBurnBlock(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise<BurnBlock>;
|
|
296
|
-
/**
|
|
297
|
-
* Retrieves a list of recent burn blocks
|
|
298
|
-
* Get burn blocks
|
|
241
|
+
* Retrieves a list of blocks confirmed by a specific burn block
|
|
242
|
+
* Get blocks by burn block
|
|
299
243
|
*/
|
|
300
|
-
|
|
244
|
+
getBlocksByBurnBlockRaw(requestParameters: GetBlocksByBurnBlockRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NakamotoBlockListResponse>>;
|
|
301
245
|
/**
|
|
302
|
-
* Retrieves a list of
|
|
303
|
-
* Get burn
|
|
246
|
+
* Retrieves a list of blocks confirmed by a specific burn block
|
|
247
|
+
* Get blocks by burn block
|
|
304
248
|
*/
|
|
305
|
-
|
|
249
|
+
getBlocksByBurnBlock(requestParameters: GetBlocksByBurnBlockRequest, initOverrides?: RequestInit): Promise<NakamotoBlockListResponse>;
|
|
306
250
|
}
|
|
@@ -179,32 +179,6 @@ class BlocksApi extends runtime.BaseAPI {
|
|
|
179
179
|
const response = await this.getBlockListRaw(requestParameters, initOverrides);
|
|
180
180
|
return await response.value();
|
|
181
181
|
}
|
|
182
|
-
/**
|
|
183
|
-
* Retrieves transactions confirmed in a single block
|
|
184
|
-
* Get block transactions
|
|
185
|
-
*/
|
|
186
|
-
async getBlockTransactionsRaw(requestParameters, initOverrides) {
|
|
187
|
-
if (requestParameters.heightOrHash === null || requestParameters.heightOrHash === undefined) {
|
|
188
|
-
throw new runtime.RequiredError('heightOrHash', 'Required parameter requestParameters.heightOrHash was null or undefined when calling getBlockTransactions.');
|
|
189
|
-
}
|
|
190
|
-
const queryParameters = {};
|
|
191
|
-
const headerParameters = {};
|
|
192
|
-
const response = await this.request({
|
|
193
|
-
path: `/extended/v2/blocks/{height_or_hash}/transactions`.replace(`{${"height_or_hash"}}`, encodeURIComponent(String(requestParameters.heightOrHash))),
|
|
194
|
-
method: 'GET',
|
|
195
|
-
headers: headerParameters,
|
|
196
|
-
query: queryParameters,
|
|
197
|
-
}, initOverrides);
|
|
198
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.TransactionResultsFromJSON)(jsonValue));
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Retrieves transactions confirmed in a single block
|
|
202
|
-
* Get block transactions
|
|
203
|
-
*/
|
|
204
|
-
async getBlockTransactions(requestParameters, initOverrides) {
|
|
205
|
-
const response = await this.getBlockTransactionsRaw(requestParameters, initOverrides);
|
|
206
|
-
return await response.value();
|
|
207
|
-
}
|
|
208
182
|
/**
|
|
209
183
|
* Retrieves a list of recently mined blocks
|
|
210
184
|
* Get blocks
|
|
@@ -217,12 +191,6 @@ class BlocksApi extends runtime.BaseAPI {
|
|
|
217
191
|
if (requestParameters.offset !== undefined) {
|
|
218
192
|
queryParameters['offset'] = requestParameters.offset;
|
|
219
193
|
}
|
|
220
|
-
if (requestParameters.burnBlockHash !== undefined) {
|
|
221
|
-
queryParameters['burn_block_hash'] = requestParameters.burnBlockHash;
|
|
222
|
-
}
|
|
223
|
-
if (requestParameters.burnBlockHeight !== undefined) {
|
|
224
|
-
queryParameters['burn_block_height'] = requestParameters.burnBlockHeight;
|
|
225
|
-
}
|
|
226
194
|
const headerParameters = {};
|
|
227
195
|
const response = await this.request({
|
|
228
196
|
path: `/extended/v2/blocks`,
|
|
@@ -241,36 +209,13 @@ class BlocksApi extends runtime.BaseAPI {
|
|
|
241
209
|
return await response.value();
|
|
242
210
|
}
|
|
243
211
|
/**
|
|
244
|
-
* Retrieves a
|
|
245
|
-
* Get burn block
|
|
212
|
+
* Retrieves a list of blocks confirmed by a specific burn block
|
|
213
|
+
* Get blocks by burn block
|
|
246
214
|
*/
|
|
247
|
-
async
|
|
215
|
+
async getBlocksByBurnBlockRaw(requestParameters, initOverrides) {
|
|
248
216
|
if (requestParameters.heightOrHash === null || requestParameters.heightOrHash === undefined) {
|
|
249
|
-
throw new runtime.RequiredError('heightOrHash', 'Required parameter requestParameters.heightOrHash was null or undefined when calling
|
|
217
|
+
throw new runtime.RequiredError('heightOrHash', 'Required parameter requestParameters.heightOrHash was null or undefined when calling getBlocksByBurnBlock.');
|
|
250
218
|
}
|
|
251
|
-
const queryParameters = {};
|
|
252
|
-
const headerParameters = {};
|
|
253
|
-
const response = await this.request({
|
|
254
|
-
path: `/extended/v2/burn-blocks/{height_or_hash}`.replace(`{${"height_or_hash"}}`, encodeURIComponent(String(requestParameters.heightOrHash))),
|
|
255
|
-
method: 'GET',
|
|
256
|
-
headers: headerParameters,
|
|
257
|
-
query: queryParameters,
|
|
258
|
-
}, initOverrides);
|
|
259
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.BurnBlockFromJSON)(jsonValue));
|
|
260
|
-
}
|
|
261
|
-
/**
|
|
262
|
-
* Retrieves a single burn block
|
|
263
|
-
* Get burn block
|
|
264
|
-
*/
|
|
265
|
-
async getBurnBlock(requestParameters, initOverrides) {
|
|
266
|
-
const response = await this.getBurnBlockRaw(requestParameters, initOverrides);
|
|
267
|
-
return await response.value();
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Retrieves a list of recent burn blocks
|
|
271
|
-
* Get burn blocks
|
|
272
|
-
*/
|
|
273
|
-
async getBurnBlocksRaw(requestParameters, initOverrides) {
|
|
274
219
|
const queryParameters = {};
|
|
275
220
|
if (requestParameters.limit !== undefined) {
|
|
276
221
|
queryParameters['limit'] = requestParameters.limit;
|
|
@@ -280,19 +225,19 @@ class BlocksApi extends runtime.BaseAPI {
|
|
|
280
225
|
}
|
|
281
226
|
const headerParameters = {};
|
|
282
227
|
const response = await this.request({
|
|
283
|
-
path: `/extended/v2/burn-blocks`,
|
|
228
|
+
path: `/extended/v2/burn-blocks/{height_or_hash}/blocks`.replace(`{${"height_or_hash"}}`, encodeURIComponent(String(requestParameters.heightOrHash))),
|
|
284
229
|
method: 'GET',
|
|
285
230
|
headers: headerParameters,
|
|
286
231
|
query: queryParameters,
|
|
287
232
|
}, initOverrides);
|
|
288
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.
|
|
233
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.NakamotoBlockListResponseFromJSON)(jsonValue));
|
|
289
234
|
}
|
|
290
235
|
/**
|
|
291
|
-
* Retrieves a list of
|
|
292
|
-
* Get burn
|
|
236
|
+
* Retrieves a list of blocks confirmed by a specific burn block
|
|
237
|
+
* Get blocks by burn block
|
|
293
238
|
*/
|
|
294
|
-
async
|
|
295
|
-
const response = await this.
|
|
239
|
+
async getBlocksByBurnBlock(requestParameters, initOverrides) {
|
|
240
|
+
const response = await this.getBlocksByBurnBlockRaw(requestParameters, initOverrides);
|
|
296
241
|
return await response.value();
|
|
297
242
|
}
|
|
298
243
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlocksApi.js","sourceRoot":"","sources":["../../../src/generated/apis/BlocksApi.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;AAGH,sCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"BlocksApi.js","sourceRoot":"","sources":["../../../src/generated/apis/BlocksApi.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;AAGH,sCAAsC;AACtC,sCAamB;AAmLnB;;GAEG;AACH,MAAa,SAAU,SAAQ,OAAO,CAAC,OAAO;IAE1C;;;OAGG;IACH,KAAK,CAAC,WAAW,CAAC,iBAAkC,EAAE,aAA2B;QAC7E,IAAI,iBAAiB,CAAC,YAAY,KAAK,IAAI,IAAI,iBAAiB,CAAC,YAAY,KAAK,SAAS,EAAE;YACzF,MAAM,IAAI,OAAO,CAAC,aAAa,CAAC,cAAc,EAAC,gGAAgG,CAAC,CAAC;SACpJ;QAED,MAAM,eAAe,GAAQ,EAAE,CAAC;QAEhC,MAAM,gBAAgB,GAAwB,EAAE,CAAC;QAEjD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC;YAChC,IAAI,EAAE,sCA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AAG,MAAM,IAAI,CAAC,uBAAuB,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;QACtF,OAAO,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC;IAClC,CAAC;CAEJ;AAlRD,8BAkRC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stacks Blockchain API
|
|
3
|
+
* Welcome to the API reference overview for the <a href=\"https://docs.hiro.so/get-started/stacks-blockchain-api\">Stacks Blockchain API</a>. <a href=\"https://hirosystems.github.io/stacks-blockchain-api/collection.json\" download=\"stacks-api-collection.json\">Download Postman collection</a>
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: STACKS_API_VERSION
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import { BurnBlock, BurnBlockListResponse } from '../models';
|
|
14
|
+
export interface GetBurnBlockRequest {
|
|
15
|
+
heightOrHash: number | string;
|
|
16
|
+
}
|
|
17
|
+
export interface GetBurnBlocksRequest {
|
|
18
|
+
limit?: number;
|
|
19
|
+
offset?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* BurnBlocksApi - interface
|
|
23
|
+
*
|
|
24
|
+
* @export
|
|
25
|
+
* @interface BurnBlocksApiInterface
|
|
26
|
+
*/
|
|
27
|
+
export interface BurnBlocksApiInterface {
|
|
28
|
+
/**
|
|
29
|
+
* Retrieves a single burn block
|
|
30
|
+
* @summary Get burn block
|
|
31
|
+
* @param {number | string} heightOrHash filter by burn block height, hash, or the constant `latest` to filter for the most recent burn block
|
|
32
|
+
* @param {*} [options] Override http request option.
|
|
33
|
+
* @throws {RequiredError}
|
|
34
|
+
* @memberof BurnBlocksApiInterface
|
|
35
|
+
*/
|
|
36
|
+
getBurnBlockRaw(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BurnBlock>>;
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves a single burn block
|
|
39
|
+
* Get burn block
|
|
40
|
+
*/
|
|
41
|
+
getBurnBlock(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise<BurnBlock>;
|
|
42
|
+
/**
|
|
43
|
+
* Retrieves a list of recent burn blocks
|
|
44
|
+
* @summary Get burn blocks
|
|
45
|
+
* @param {number} [limit] max number of burn blocks to fetch
|
|
46
|
+
* @param {number} [offset] index of first burn block to fetch
|
|
47
|
+
* @param {*} [options] Override http request option.
|
|
48
|
+
* @throws {RequiredError}
|
|
49
|
+
* @memberof BurnBlocksApiInterface
|
|
50
|
+
*/
|
|
51
|
+
getBurnBlocksRaw(requestParameters: GetBurnBlocksRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BurnBlockListResponse>>;
|
|
52
|
+
/**
|
|
53
|
+
* Retrieves a list of recent burn blocks
|
|
54
|
+
* Get burn blocks
|
|
55
|
+
*/
|
|
56
|
+
getBurnBlocks(requestParameters: GetBurnBlocksRequest, initOverrides?: RequestInit): Promise<BurnBlockListResponse>;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
export declare class BurnBlocksApi extends runtime.BaseAPI implements BurnBlocksApiInterface {
|
|
62
|
+
/**
|
|
63
|
+
* Retrieves a single burn block
|
|
64
|
+
* Get burn block
|
|
65
|
+
*/
|
|
66
|
+
getBurnBlockRaw(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BurnBlock>>;
|
|
67
|
+
/**
|
|
68
|
+
* Retrieves a single burn block
|
|
69
|
+
* Get burn block
|
|
70
|
+
*/
|
|
71
|
+
getBurnBlock(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise<BurnBlock>;
|
|
72
|
+
/**
|
|
73
|
+
* Retrieves a list of recent burn blocks
|
|
74
|
+
* Get burn blocks
|
|
75
|
+
*/
|
|
76
|
+
getBurnBlocksRaw(requestParameters: GetBurnBlocksRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BurnBlockListResponse>>;
|
|
77
|
+
/**
|
|
78
|
+
* Retrieves a list of recent burn blocks
|
|
79
|
+
* Get burn blocks
|
|
80
|
+
*/
|
|
81
|
+
getBurnBlocks(requestParameters: GetBurnBlocksRequest, initOverrides?: RequestInit): Promise<BurnBlockListResponse>;
|
|
82
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Stacks Blockchain API
|
|
6
|
+
* Welcome to the API reference overview for the <a href=\"https://docs.hiro.so/get-started/stacks-blockchain-api\">Stacks Blockchain API</a>. <a href=\"https://hirosystems.github.io/stacks-blockchain-api/collection.json\" download=\"stacks-api-collection.json\">Download Postman collection</a>
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: STACKS_API_VERSION
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.BurnBlocksApi = void 0;
|
|
17
|
+
const runtime = require("../runtime");
|
|
18
|
+
const models_1 = require("../models");
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
class BurnBlocksApi extends runtime.BaseAPI {
|
|
23
|
+
/**
|
|
24
|
+
* Retrieves a single burn block
|
|
25
|
+
* Get burn block
|
|
26
|
+
*/
|
|
27
|
+
async getBurnBlockRaw(requestParameters, initOverrides) {
|
|
28
|
+
if (requestParameters.heightOrHash === null || requestParameters.heightOrHash === undefined) {
|
|
29
|
+
throw new runtime.RequiredError('heightOrHash', 'Required parameter requestParameters.heightOrHash was null or undefined when calling getBurnBlock.');
|
|
30
|
+
}
|
|
31
|
+
const queryParameters = {};
|
|
32
|
+
const headerParameters = {};
|
|
33
|
+
const response = await this.request({
|
|
34
|
+
path: `/extended/v2/burn-blocks/{height_or_hash}`.replace(`{${"height_or_hash"}}`, encodeURIComponent(String(requestParameters.heightOrHash))),
|
|
35
|
+
method: 'GET',
|
|
36
|
+
headers: headerParameters,
|
|
37
|
+
query: queryParameters,
|
|
38
|
+
}, initOverrides);
|
|
39
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.BurnBlockFromJSON)(jsonValue));
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Retrieves a single burn block
|
|
43
|
+
* Get burn block
|
|
44
|
+
*/
|
|
45
|
+
async getBurnBlock(requestParameters, initOverrides) {
|
|
46
|
+
const response = await this.getBurnBlockRaw(requestParameters, initOverrides);
|
|
47
|
+
return await response.value();
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Retrieves a list of recent burn blocks
|
|
51
|
+
* Get burn blocks
|
|
52
|
+
*/
|
|
53
|
+
async getBurnBlocksRaw(requestParameters, initOverrides) {
|
|
54
|
+
const queryParameters = {};
|
|
55
|
+
if (requestParameters.limit !== undefined) {
|
|
56
|
+
queryParameters['limit'] = requestParameters.limit;
|
|
57
|
+
}
|
|
58
|
+
if (requestParameters.offset !== undefined) {
|
|
59
|
+
queryParameters['offset'] = requestParameters.offset;
|
|
60
|
+
}
|
|
61
|
+
const headerParameters = {};
|
|
62
|
+
const response = await this.request({
|
|
63
|
+
path: `/extended/v2/burn-blocks`,
|
|
64
|
+
method: 'GET',
|
|
65
|
+
headers: headerParameters,
|
|
66
|
+
query: queryParameters,
|
|
67
|
+
}, initOverrides);
|
|
68
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.BurnBlockListResponseFromJSON)(jsonValue));
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Retrieves a list of recent burn blocks
|
|
72
|
+
* Get burn blocks
|
|
73
|
+
*/
|
|
74
|
+
async getBurnBlocks(requestParameters, initOverrides) {
|
|
75
|
+
const response = await this.getBurnBlocksRaw(requestParameters, initOverrides);
|
|
76
|
+
return await response.value();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.BurnBlocksApi = BurnBlocksApi;
|
|
80
|
+
//# sourceMappingURL=BurnBlocksApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BurnBlocksApi.js","sourceRoot":"","sources":["../../../src/generated/apis/BurnBlocksApi.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;AAGH,sCAAsC;AACtC,sCAOmB;AAqDnB;;GAEG;AACH,MAAa,aAAc,SAAQ,OAAO,CAAC,OAAO;IAE9C;;;OAGG;IACH,KAAK,CAAC,eAAe,CAAC,iBAAsC,EAAE,aAA2B;QACrF,IAAI,iBAAiB,CAAC,YAAY,KAAK,IAAI,IAAI,iBAAiB,CAAC,YAAY,KAAK,SAAS,EAAE;YACzF,MAAM,IAAI,OAAO,CAAC,aAAa,CAAC,cAAc,EAAC,oGAAoG,CAAC,CAAC;SACxJ;QAED,MAAM,eAAe,GAAQ,EAAE,CAAC;QAEhC,MAAM,gBAAgB,GAAwB,EAAE,CAAC;QAEjD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC;YAChC,IAAI,EAAE,2CAA2C,CAAC,OAAO,CAAC,IAAI,gBAAgB,GAAG,EAAE,kBAAkB,CAAC,MAAM,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC;YAC9I,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,gBAAgB;YACzB,KAAK,EAAE,eAAe;SACzB,EAAE,aAAa,CAAC,CAAC;QAElB,OAAO,IAAI,OAAO,CA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K,EAAE,CAAC;IAClC,CAAC;CAEJ;AAtED,sCAsEC"}
|
|
@@ -51,6 +51,9 @@ export interface GetTransactionListRequest {
|
|
|
51
51
|
type?: Array<GetTransactionListTypeEnum>;
|
|
52
52
|
unanchored?: boolean;
|
|
53
53
|
}
|
|
54
|
+
export interface GetTransactionsByBlockRequest {
|
|
55
|
+
heightOrHash: number | string;
|
|
56
|
+
}
|
|
54
57
|
export interface GetTransactionsByBlockHashRequest {
|
|
55
58
|
blockHash: string;
|
|
56
59
|
limit?: number;
|
|
@@ -209,7 +212,21 @@ export interface TransactionsApiInterface {
|
|
|
209
212
|
*/
|
|
210
213
|
getTransactionList(requestParameters: GetTransactionListRequest, initOverrides?: RequestInit): Promise<TransactionResults>;
|
|
211
214
|
/**
|
|
212
|
-
* Retrieves
|
|
215
|
+
* Retrieves transactions confirmed in a single block
|
|
216
|
+
* @summary Get transactions by block
|
|
217
|
+
* @param {number | string} heightOrHash filter by block height, hash, index block hash or the constant `latest` to filter for the most recent block
|
|
218
|
+
* @param {*} [options] Override http request option.
|
|
219
|
+
* @throws {RequiredError}
|
|
220
|
+
* @memberof TransactionsApiInterface
|
|
221
|
+
*/
|
|
222
|
+
getTransactionsByBlockRaw(requestParameters: GetTransactionsByBlockRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<TransactionResults>>;
|
|
223
|
+
/**
|
|
224
|
+
* Retrieves transactions confirmed in a single block
|
|
225
|
+
* Get transactions by block
|
|
226
|
+
*/
|
|
227
|
+
getTransactionsByBlock(requestParameters: GetTransactionsByBlockRequest, initOverrides?: RequestInit): Promise<TransactionResults>;
|
|
228
|
+
/**
|
|
229
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves a list of all transactions within a block for a given block hash.
|
|
213
230
|
* @summary Transactions by block hash
|
|
214
231
|
* @param {string} blockHash Hash of block
|
|
215
232
|
* @param {number} [limit] max number of transactions to fetch
|
|
@@ -220,12 +237,12 @@ export interface TransactionsApiInterface {
|
|
|
220
237
|
*/
|
|
221
238
|
getTransactionsByBlockHashRaw(requestParameters: GetTransactionsByBlockHashRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<TransactionResults>>;
|
|
222
239
|
/**
|
|
223
|
-
* Retrieves a list of all transactions within a block for a given block hash.
|
|
240
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves a list of all transactions within a block for a given block hash.
|
|
224
241
|
* Transactions by block hash
|
|
225
242
|
*/
|
|
226
243
|
getTransactionsByBlockHash(requestParameters: GetTransactionsByBlockHashRequest, initOverrides?: RequestInit): Promise<TransactionResults>;
|
|
227
244
|
/**
|
|
228
|
-
* Retrieves all transactions within a block at a given height
|
|
245
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves all transactions within a block at a given height
|
|
229
246
|
* @summary Transactions by block height
|
|
230
247
|
* @param {number} height Height of block
|
|
231
248
|
* @param {number} [limit] max number of transactions to fetch
|
|
@@ -237,7 +254,7 @@ export interface TransactionsApiInterface {
|
|
|
237
254
|
*/
|
|
238
255
|
getTransactionsByBlockHeightRaw(requestParameters: GetTransactionsByBlockHeightRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<TransactionResults>>;
|
|
239
256
|
/**
|
|
240
|
-
* Retrieves all transactions within a block at a given height
|
|
257
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves all transactions within a block at a given height
|
|
241
258
|
* Transactions by block height
|
|
242
259
|
*/
|
|
243
260
|
getTransactionsByBlockHeight(requestParameters: GetTransactionsByBlockHeightRequest, initOverrides?: RequestInit): Promise<TransactionResults>;
|
|
@@ -362,22 +379,32 @@ export declare class TransactionsApi extends runtime.BaseAPI implements Transact
|
|
|
362
379
|
*/
|
|
363
380
|
getTransactionList(requestParameters: GetTransactionListRequest, initOverrides?: RequestInit): Promise<TransactionResults>;
|
|
364
381
|
/**
|
|
365
|
-
* Retrieves
|
|
382
|
+
* Retrieves transactions confirmed in a single block
|
|
383
|
+
* Get transactions by block
|
|
384
|
+
*/
|
|
385
|
+
getTransactionsByBlockRaw(requestParameters: GetTransactionsByBlockRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<TransactionResults>>;
|
|
386
|
+
/**
|
|
387
|
+
* Retrieves transactions confirmed in a single block
|
|
388
|
+
* Get transactions by block
|
|
389
|
+
*/
|
|
390
|
+
getTransactionsByBlock(requestParameters: GetTransactionsByBlockRequest, initOverrides?: RequestInit): Promise<TransactionResults>;
|
|
391
|
+
/**
|
|
392
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves a list of all transactions within a block for a given block hash.
|
|
366
393
|
* Transactions by block hash
|
|
367
394
|
*/
|
|
368
395
|
getTransactionsByBlockHashRaw(requestParameters: GetTransactionsByBlockHashRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<TransactionResults>>;
|
|
369
396
|
/**
|
|
370
|
-
* Retrieves a list of all transactions within a block for a given block hash.
|
|
397
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves a list of all transactions within a block for a given block hash.
|
|
371
398
|
* Transactions by block hash
|
|
372
399
|
*/
|
|
373
400
|
getTransactionsByBlockHash(requestParameters: GetTransactionsByBlockHashRequest, initOverrides?: RequestInit): Promise<TransactionResults>;
|
|
374
401
|
/**
|
|
375
|
-
* Retrieves all transactions within a block at a given height
|
|
402
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves all transactions within a block at a given height
|
|
376
403
|
* Transactions by block height
|
|
377
404
|
*/
|
|
378
405
|
getTransactionsByBlockHeightRaw(requestParameters: GetTransactionsByBlockHeightRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<TransactionResults>>;
|
|
379
406
|
/**
|
|
380
|
-
* Retrieves all transactions within a block at a given height
|
|
407
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves all transactions within a block at a given height
|
|
381
408
|
* Transactions by block height
|
|
382
409
|
*/
|
|
383
410
|
getTransactionsByBlockHeight(requestParameters: GetTransactionsByBlockHeightRequest, initOverrides?: RequestInit): Promise<TransactionResults>;
|
|
@@ -283,7 +283,33 @@ class TransactionsApi extends runtime.BaseAPI {
|
|
|
283
283
|
return await response.value();
|
|
284
284
|
}
|
|
285
285
|
/**
|
|
286
|
-
* Retrieves
|
|
286
|
+
* Retrieves transactions confirmed in a single block
|
|
287
|
+
* Get transactions by block
|
|
288
|
+
*/
|
|
289
|
+
async getTransactionsByBlockRaw(requestParameters, initOverrides) {
|
|
290
|
+
if (requestParameters.heightOrHash === null || requestParameters.heightOrHash === undefined) {
|
|
291
|
+
throw new runtime.RequiredError('heightOrHash', 'Required parameter requestParameters.heightOrHash was null or undefined when calling getTransactionsByBlock.');
|
|
292
|
+
}
|
|
293
|
+
const queryParameters = {};
|
|
294
|
+
const headerParameters = {};
|
|
295
|
+
const response = await this.request({
|
|
296
|
+
path: `/extended/v2/blocks/{height_or_hash}/transactions`.replace(`{${"height_or_hash"}}`, encodeURIComponent(String(requestParameters.heightOrHash))),
|
|
297
|
+
method: 'GET',
|
|
298
|
+
headers: headerParameters,
|
|
299
|
+
query: queryParameters,
|
|
300
|
+
}, initOverrides);
|
|
301
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.TransactionResultsFromJSON)(jsonValue));
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Retrieves transactions confirmed in a single block
|
|
305
|
+
* Get transactions by block
|
|
306
|
+
*/
|
|
307
|
+
async getTransactionsByBlock(requestParameters, initOverrides) {
|
|
308
|
+
const response = await this.getTransactionsByBlockRaw(requestParameters, initOverrides);
|
|
309
|
+
return await response.value();
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves a list of all transactions within a block for a given block hash.
|
|
287
313
|
* Transactions by block hash
|
|
288
314
|
*/
|
|
289
315
|
async getTransactionsByBlockHashRaw(requestParameters, initOverrides) {
|
|
@@ -307,7 +333,7 @@ class TransactionsApi extends runtime.BaseAPI {
|
|
|
307
333
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.TransactionResultsFromJSON)(jsonValue));
|
|
308
334
|
}
|
|
309
335
|
/**
|
|
310
|
-
* Retrieves a list of all transactions within a block for a given block hash.
|
|
336
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves a list of all transactions within a block for a given block hash.
|
|
311
337
|
* Transactions by block hash
|
|
312
338
|
*/
|
|
313
339
|
async getTransactionsByBlockHash(requestParameters, initOverrides) {
|
|
@@ -315,7 +341,7 @@ class TransactionsApi extends runtime.BaseAPI {
|
|
|
315
341
|
return await response.value();
|
|
316
342
|
}
|
|
317
343
|
/**
|
|
318
|
-
* Retrieves all transactions within a block at a given height
|
|
344
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves all transactions within a block at a given height
|
|
319
345
|
* Transactions by block height
|
|
320
346
|
*/
|
|
321
347
|
async getTransactionsByBlockHeightRaw(requestParameters, initOverrides) {
|
|
@@ -342,7 +368,7 @@ class TransactionsApi extends runtime.BaseAPI {
|
|
|
342
368
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.TransactionResultsFromJSON)(jsonValue));
|
|
343
369
|
}
|
|
344
370
|
/**
|
|
345
|
-
* Retrieves all transactions within a block at a given height
|
|
371
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves all transactions within a block at a given height
|
|
346
372
|
* Transactions by block height
|
|
347
373
|
*/
|
|
348
374
|
async getTransactionsByBlockHeight(requestParameters, initOverrides) {
|