@stacks/blockchain-api-client 7.4.0-nakamoto.3 → 7.4.0-nakamoto.5
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 +82 -26
- package/lib/generated/apis/BlocksApi.js +72 -17
- package/lib/generated/apis/BlocksApi.js.map +1 -1
- package/lib/generated/models/NakamotoBlock.d.ts +123 -0
- package/lib/generated/models/NakamotoBlock.js +74 -0
- package/lib/generated/models/NakamotoBlock.js.map +1 -0
- package/lib/generated/models/NakamotoBlockListResponse.d.ts +46 -0
- package/lib/generated/models/NakamotoBlockListResponse.js +49 -0
- package/lib/generated/models/NakamotoBlockListResponse.js.map +1 -0
- package/lib/generated/models/index.d.ts +2 -0
- package/lib/generated/models/index.js +2 -0
- package/lib/generated/models/index.js.map +1 -1
- package/lib/index.umd.js +229 -18
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/.openapi-generator/FILES +2 -0
- package/src/generated/apis/BlocksApi.ts +148 -32
- package/src/generated/models/NakamotoBlock.ts +184 -0
- package/src/generated/models/NakamotoBlockListResponse.ts +87 -0
- package/src/generated/models/index.ts +2 -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, BurnBlockListResponse } from '../models';
|
|
13
|
+
import { Block, BlockListResponse, BurnBlock, BurnBlockListResponse, NakamotoBlockListResponse } from '../models';
|
|
14
14
|
export interface GetBlockByBurnBlockHashRequest {
|
|
15
15
|
burnBlockHash: string;
|
|
16
16
|
}
|
|
@@ -27,11 +27,18 @@ export interface GetBlockListRequest {
|
|
|
27
27
|
limit?: number;
|
|
28
28
|
offset?: number;
|
|
29
29
|
}
|
|
30
|
-
export interface
|
|
30
|
+
export interface GetBlocksRequest {
|
|
31
|
+
limit?: number;
|
|
32
|
+
offset?: number;
|
|
33
|
+
burnBlockHash?: string;
|
|
34
|
+
burnBlockHeight?: number;
|
|
35
|
+
}
|
|
36
|
+
export interface GetBurnBlockRequest {
|
|
37
|
+
heightOrHash: number | string;
|
|
38
|
+
}
|
|
39
|
+
export interface GetBurnBlocksRequest {
|
|
31
40
|
limit?: number;
|
|
32
41
|
offset?: number;
|
|
33
|
-
height?: number;
|
|
34
|
-
hash?: string;
|
|
35
42
|
}
|
|
36
43
|
/**
|
|
37
44
|
* BlocksApi - interface
|
|
@@ -41,7 +48,7 @@ export interface GetBurnBlockListRequest {
|
|
|
41
48
|
*/
|
|
42
49
|
export interface BlocksApiInterface {
|
|
43
50
|
/**
|
|
44
|
-
* Retrieves block details of a specific block for a given burnchain block hash
|
|
51
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves block details of a specific block for a given burnchain block hash
|
|
45
52
|
* @summary Get block by burnchain block hash
|
|
46
53
|
* @param {string} burnBlockHash Hash of the burnchain block
|
|
47
54
|
* @param {*} [options] Override http request option.
|
|
@@ -50,12 +57,12 @@ export interface BlocksApiInterface {
|
|
|
50
57
|
*/
|
|
51
58
|
getBlockByBurnBlockHashRaw(requestParameters: GetBlockByBurnBlockHashRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Block>>;
|
|
52
59
|
/**
|
|
53
|
-
* Retrieves block details of a specific block for a given burnchain block hash
|
|
60
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves block details of a specific block for a given burnchain block hash
|
|
54
61
|
* Get block by burnchain block hash
|
|
55
62
|
*/
|
|
56
63
|
getBlockByBurnBlockHash(requestParameters: GetBlockByBurnBlockHashRequest, initOverrides?: RequestInit): Promise<Block>;
|
|
57
64
|
/**
|
|
58
|
-
* Retrieves block details of a specific block for a given burn chain height
|
|
65
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves block details of a specific block for a given burn chain height
|
|
59
66
|
* @summary Get block by burnchain height
|
|
60
67
|
* @param {number} burnBlockHeight Height of the burn chain block
|
|
61
68
|
* @param {*} [options] Override http request option.
|
|
@@ -64,7 +71,7 @@ export interface BlocksApiInterface {
|
|
|
64
71
|
*/
|
|
65
72
|
getBlockByBurnBlockHeightRaw(requestParameters: GetBlockByBurnBlockHeightRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Block>>;
|
|
66
73
|
/**
|
|
67
|
-
* Retrieves block details of a specific block for a given burn chain height
|
|
74
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves block details of a specific block for a given burn chain height
|
|
68
75
|
* Get block by burnchain height
|
|
69
76
|
*/
|
|
70
77
|
getBlockByBurnBlockHeight(requestParameters: GetBlockByBurnBlockHeightRequest, initOverrides?: RequestInit): Promise<Block>;
|
|
@@ -97,7 +104,7 @@ export interface BlocksApiInterface {
|
|
|
97
104
|
*/
|
|
98
105
|
getBlockByHeight(requestParameters: GetBlockByHeightRequest, initOverrides?: RequestInit): Promise<Block>;
|
|
99
106
|
/**
|
|
100
|
-
* Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
|
|
107
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
|
|
101
108
|
* @summary Get recent blocks
|
|
102
109
|
* @param {number} [limit] max number of blocks to fetch
|
|
103
110
|
* @param {number} [offset] index of first block to fetch
|
|
@@ -107,49 +114,78 @@ export interface BlocksApiInterface {
|
|
|
107
114
|
*/
|
|
108
115
|
getBlockListRaw(requestParameters: GetBlockListRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BlockListResponse>>;
|
|
109
116
|
/**
|
|
110
|
-
* Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
|
|
117
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
|
|
111
118
|
* Get recent blocks
|
|
112
119
|
*/
|
|
113
120
|
getBlockList(requestParameters: GetBlockListRequest, initOverrides?: RequestInit): Promise<BlockListResponse>;
|
|
121
|
+
/**
|
|
122
|
+
* Retrieves a list of recently mined blocks
|
|
123
|
+
* @summary Get blocks
|
|
124
|
+
* @param {number} [limit] max number of blocks to fetch
|
|
125
|
+
* @param {number} [offset] index of first burn block to fetch
|
|
126
|
+
* @param {string} [burnBlockHash] filter blocks by burn block hash
|
|
127
|
+
* @param {number} [burnBlockHeight] filter blocks by burn block height
|
|
128
|
+
* @param {*} [options] Override http request option.
|
|
129
|
+
* @throws {RequiredError}
|
|
130
|
+
* @memberof BlocksApiInterface
|
|
131
|
+
*/
|
|
132
|
+
getBlocksRaw(requestParameters: GetBlocksRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NakamotoBlockListResponse>>;
|
|
133
|
+
/**
|
|
134
|
+
* Retrieves a list of recently mined blocks
|
|
135
|
+
* Get blocks
|
|
136
|
+
*/
|
|
137
|
+
getBlocks(requestParameters: GetBlocksRequest, initOverrides?: RequestInit): Promise<NakamotoBlockListResponse>;
|
|
138
|
+
/**
|
|
139
|
+
* Retrieves a single burn block
|
|
140
|
+
* @summary Get burn block
|
|
141
|
+
* @param {number | string} heightOrHash filter by burn block height, hash, or the constant `latest` to filter for the most recent burn block
|
|
142
|
+
* @param {*} [options] Override http request option.
|
|
143
|
+
* @throws {RequiredError}
|
|
144
|
+
* @memberof BlocksApiInterface
|
|
145
|
+
*/
|
|
146
|
+
getBurnBlockRaw(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BurnBlock>>;
|
|
147
|
+
/**
|
|
148
|
+
* Retrieves a single burn block
|
|
149
|
+
* Get burn block
|
|
150
|
+
*/
|
|
151
|
+
getBurnBlock(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise<BurnBlock>;
|
|
114
152
|
/**
|
|
115
153
|
* Retrieves a list of recent burn blocks
|
|
116
|
-
* @summary Get
|
|
154
|
+
* @summary Get burn blocks
|
|
117
155
|
* @param {number} [limit] max number of burn blocks to fetch
|
|
118
156
|
* @param {number} [offset] index of first burn block to fetch
|
|
119
|
-
* @param {number} [height] filter by burn block height
|
|
120
|
-
* @param {string} [hash] filter by burn block hash or the constant \'latest\' to filter for the most recent burn block
|
|
121
157
|
* @param {*} [options] Override http request option.
|
|
122
158
|
* @throws {RequiredError}
|
|
123
159
|
* @memberof BlocksApiInterface
|
|
124
160
|
*/
|
|
125
|
-
|
|
161
|
+
getBurnBlocksRaw(requestParameters: GetBurnBlocksRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BurnBlockListResponse>>;
|
|
126
162
|
/**
|
|
127
163
|
* Retrieves a list of recent burn blocks
|
|
128
|
-
* Get
|
|
164
|
+
* Get burn blocks
|
|
129
165
|
*/
|
|
130
|
-
|
|
166
|
+
getBurnBlocks(requestParameters: GetBurnBlocksRequest, initOverrides?: RequestInit): Promise<BurnBlockListResponse>;
|
|
131
167
|
}
|
|
132
168
|
/**
|
|
133
169
|
*
|
|
134
170
|
*/
|
|
135
171
|
export declare class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
136
172
|
/**
|
|
137
|
-
* Retrieves block details of a specific block for a given burnchain block hash
|
|
173
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves block details of a specific block for a given burnchain block hash
|
|
138
174
|
* Get block by burnchain block hash
|
|
139
175
|
*/
|
|
140
176
|
getBlockByBurnBlockHashRaw(requestParameters: GetBlockByBurnBlockHashRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Block>>;
|
|
141
177
|
/**
|
|
142
|
-
* Retrieves block details of a specific block for a given burnchain block hash
|
|
178
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves block details of a specific block for a given burnchain block hash
|
|
143
179
|
* Get block by burnchain block hash
|
|
144
180
|
*/
|
|
145
181
|
getBlockByBurnBlockHash(requestParameters: GetBlockByBurnBlockHashRequest, initOverrides?: RequestInit): Promise<Block>;
|
|
146
182
|
/**
|
|
147
|
-
* Retrieves block details of a specific block for a given burn chain height
|
|
183
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves block details of a specific block for a given burn chain height
|
|
148
184
|
* Get block by burnchain height
|
|
149
185
|
*/
|
|
150
186
|
getBlockByBurnBlockHeightRaw(requestParameters: GetBlockByBurnBlockHeightRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Block>>;
|
|
151
187
|
/**
|
|
152
|
-
* Retrieves block details of a specific block for a given burn chain height
|
|
188
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves block details of a specific block for a given burn chain height
|
|
153
189
|
* Get block by burnchain height
|
|
154
190
|
*/
|
|
155
191
|
getBlockByBurnBlockHeight(requestParameters: GetBlockByBurnBlockHeightRequest, initOverrides?: RequestInit): Promise<Block>;
|
|
@@ -174,23 +210,43 @@ export declare class BlocksApi extends runtime.BaseAPI implements BlocksApiInter
|
|
|
174
210
|
*/
|
|
175
211
|
getBlockByHeight(requestParameters: GetBlockByHeightRequest, initOverrides?: RequestInit): Promise<Block>;
|
|
176
212
|
/**
|
|
177
|
-
* Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
|
|
213
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
|
|
178
214
|
* Get recent blocks
|
|
179
215
|
*/
|
|
180
216
|
getBlockListRaw(requestParameters: GetBlockListRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BlockListResponse>>;
|
|
181
217
|
/**
|
|
182
|
-
* Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
|
|
218
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
|
|
183
219
|
* Get recent blocks
|
|
184
220
|
*/
|
|
185
221
|
getBlockList(requestParameters: GetBlockListRequest, initOverrides?: RequestInit): Promise<BlockListResponse>;
|
|
222
|
+
/**
|
|
223
|
+
* Retrieves a list of recently mined blocks
|
|
224
|
+
* Get blocks
|
|
225
|
+
*/
|
|
226
|
+
getBlocksRaw(requestParameters: GetBlocksRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NakamotoBlockListResponse>>;
|
|
227
|
+
/**
|
|
228
|
+
* Retrieves a list of recently mined blocks
|
|
229
|
+
* Get blocks
|
|
230
|
+
*/
|
|
231
|
+
getBlocks(requestParameters: GetBlocksRequest, initOverrides?: RequestInit): Promise<NakamotoBlockListResponse>;
|
|
232
|
+
/**
|
|
233
|
+
* Retrieves a single burn block
|
|
234
|
+
* Get burn block
|
|
235
|
+
*/
|
|
236
|
+
getBurnBlockRaw(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BurnBlock>>;
|
|
237
|
+
/**
|
|
238
|
+
* Retrieves a single burn block
|
|
239
|
+
* Get burn block
|
|
240
|
+
*/
|
|
241
|
+
getBurnBlock(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise<BurnBlock>;
|
|
186
242
|
/**
|
|
187
243
|
* Retrieves a list of recent burn blocks
|
|
188
|
-
* Get
|
|
244
|
+
* Get burn blocks
|
|
189
245
|
*/
|
|
190
|
-
|
|
246
|
+
getBurnBlocksRaw(requestParameters: GetBurnBlocksRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BurnBlockListResponse>>;
|
|
191
247
|
/**
|
|
192
248
|
* Retrieves a list of recent burn blocks
|
|
193
|
-
* Get
|
|
249
|
+
* Get burn blocks
|
|
194
250
|
*/
|
|
195
|
-
|
|
251
|
+
getBurnBlocks(requestParameters: GetBurnBlocksRequest, initOverrides?: RequestInit): Promise<BurnBlockListResponse>;
|
|
196
252
|
}
|
|
@@ -21,7 +21,7 @@ const models_1 = require("../models");
|
|
|
21
21
|
*/
|
|
22
22
|
class BlocksApi extends runtime.BaseAPI {
|
|
23
23
|
/**
|
|
24
|
-
* Retrieves block details of a specific block for a given burnchain block hash
|
|
24
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves block details of a specific block for a given burnchain block hash
|
|
25
25
|
* Get block by burnchain block hash
|
|
26
26
|
*/
|
|
27
27
|
async getBlockByBurnBlockHashRaw(requestParameters, initOverrides) {
|
|
@@ -39,7 +39,7 @@ class BlocksApi extends runtime.BaseAPI {
|
|
|
39
39
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.BlockFromJSON)(jsonValue));
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
* Retrieves block details of a specific block for a given burnchain block hash
|
|
42
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves block details of a specific block for a given burnchain block hash
|
|
43
43
|
* Get block by burnchain block hash
|
|
44
44
|
*/
|
|
45
45
|
async getBlockByBurnBlockHash(requestParameters, initOverrides) {
|
|
@@ -47,7 +47,7 @@ class BlocksApi extends runtime.BaseAPI {
|
|
|
47
47
|
return await response.value();
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
|
-
* Retrieves block details of a specific block for a given burn chain height
|
|
50
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves block details of a specific block for a given burn chain height
|
|
51
51
|
* Get block by burnchain height
|
|
52
52
|
*/
|
|
53
53
|
async getBlockByBurnBlockHeightRaw(requestParameters, initOverrides) {
|
|
@@ -65,7 +65,7 @@ class BlocksApi extends runtime.BaseAPI {
|
|
|
65
65
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.BlockFromJSON)(jsonValue));
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
|
-
* Retrieves block details of a specific block for a given burn chain height
|
|
68
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves block details of a specific block for a given burn chain height
|
|
69
69
|
* Get block by burnchain height
|
|
70
70
|
*/
|
|
71
71
|
async getBlockByBurnBlockHeight(requestParameters, initOverrides) {
|
|
@@ -125,7 +125,7 @@ class BlocksApi extends runtime.BaseAPI {
|
|
|
125
125
|
return await response.value();
|
|
126
126
|
}
|
|
127
127
|
/**
|
|
128
|
-
* Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
|
|
128
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
|
|
129
129
|
* Get recent blocks
|
|
130
130
|
*/
|
|
131
131
|
async getBlockListRaw(requestParameters, initOverrides) {
|
|
@@ -146,7 +146,7 @@ class BlocksApi extends runtime.BaseAPI {
|
|
|
146
146
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.BlockListResponseFromJSON)(jsonValue));
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
|
-
* Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
|
|
149
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
|
|
150
150
|
* Get recent blocks
|
|
151
151
|
*/
|
|
152
152
|
async getBlockList(requestParameters, initOverrides) {
|
|
@@ -154,10 +154,10 @@ class BlocksApi extends runtime.BaseAPI {
|
|
|
154
154
|
return await response.value();
|
|
155
155
|
}
|
|
156
156
|
/**
|
|
157
|
-
* Retrieves a list of
|
|
158
|
-
* Get
|
|
157
|
+
* Retrieves a list of recently mined blocks
|
|
158
|
+
* Get blocks
|
|
159
159
|
*/
|
|
160
|
-
async
|
|
160
|
+
async getBlocksRaw(requestParameters, initOverrides) {
|
|
161
161
|
const queryParameters = {};
|
|
162
162
|
if (requestParameters.limit !== undefined) {
|
|
163
163
|
queryParameters['limit'] = requestParameters.limit;
|
|
@@ -165,15 +165,70 @@ class BlocksApi extends runtime.BaseAPI {
|
|
|
165
165
|
if (requestParameters.offset !== undefined) {
|
|
166
166
|
queryParameters['offset'] = requestParameters.offset;
|
|
167
167
|
}
|
|
168
|
-
if (requestParameters.
|
|
169
|
-
queryParameters['
|
|
168
|
+
if (requestParameters.burnBlockHash !== undefined) {
|
|
169
|
+
queryParameters['burn_block_hash'] = requestParameters.burnBlockHash;
|
|
170
|
+
}
|
|
171
|
+
if (requestParameters.burnBlockHeight !== undefined) {
|
|
172
|
+
queryParameters['burn_block_height'] = requestParameters.burnBlockHeight;
|
|
170
173
|
}
|
|
171
|
-
|
|
172
|
-
|
|
174
|
+
const headerParameters = {};
|
|
175
|
+
const response = await this.request({
|
|
176
|
+
path: `/extended/v2/blocks`,
|
|
177
|
+
method: 'GET',
|
|
178
|
+
headers: headerParameters,
|
|
179
|
+
query: queryParameters,
|
|
180
|
+
}, initOverrides);
|
|
181
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.NakamotoBlockListResponseFromJSON)(jsonValue));
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Retrieves a list of recently mined blocks
|
|
185
|
+
* Get blocks
|
|
186
|
+
*/
|
|
187
|
+
async getBlocks(requestParameters, initOverrides) {
|
|
188
|
+
const response = await this.getBlocksRaw(requestParameters, initOverrides);
|
|
189
|
+
return await response.value();
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Retrieves a single burn block
|
|
193
|
+
* Get burn block
|
|
194
|
+
*/
|
|
195
|
+
async getBurnBlockRaw(requestParameters, initOverrides) {
|
|
196
|
+
if (requestParameters.heightOrHash === null || requestParameters.heightOrHash === undefined) {
|
|
197
|
+
throw new runtime.RequiredError('heightOrHash', 'Required parameter requestParameters.heightOrHash was null or undefined when calling getBurnBlock.');
|
|
198
|
+
}
|
|
199
|
+
const queryParameters = {};
|
|
200
|
+
const headerParameters = {};
|
|
201
|
+
const response = await this.request({
|
|
202
|
+
path: `/extended/v2/burn-blocks/{height_or_hash}`.replace(`{${"height_or_hash"}}`, encodeURIComponent(String(requestParameters.heightOrHash))),
|
|
203
|
+
method: 'GET',
|
|
204
|
+
headers: headerParameters,
|
|
205
|
+
query: queryParameters,
|
|
206
|
+
}, initOverrides);
|
|
207
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.BurnBlockFromJSON)(jsonValue));
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Retrieves a single burn block
|
|
211
|
+
* Get burn block
|
|
212
|
+
*/
|
|
213
|
+
async getBurnBlock(requestParameters, initOverrides) {
|
|
214
|
+
const response = await this.getBurnBlockRaw(requestParameters, initOverrides);
|
|
215
|
+
return await response.value();
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Retrieves a list of recent burn blocks
|
|
219
|
+
* Get burn blocks
|
|
220
|
+
*/
|
|
221
|
+
async getBurnBlocksRaw(requestParameters, initOverrides) {
|
|
222
|
+
const queryParameters = {};
|
|
223
|
+
if (requestParameters.limit !== undefined) {
|
|
224
|
+
queryParameters['limit'] = requestParameters.limit;
|
|
225
|
+
}
|
|
226
|
+
if (requestParameters.offset !== undefined) {
|
|
227
|
+
queryParameters['offset'] = requestParameters.offset;
|
|
173
228
|
}
|
|
174
229
|
const headerParameters = {};
|
|
175
230
|
const response = await this.request({
|
|
176
|
-
path: `/extended/
|
|
231
|
+
path: `/extended/v2/burn-blocks`,
|
|
177
232
|
method: 'GET',
|
|
178
233
|
headers: headerParameters,
|
|
179
234
|
query: queryParameters,
|
|
@@ -182,10 +237,10 @@ class BlocksApi extends runtime.BaseAPI {
|
|
|
182
237
|
}
|
|
183
238
|
/**
|
|
184
239
|
* Retrieves a list of recent burn blocks
|
|
185
|
-
* Get
|
|
240
|
+
* Get burn blocks
|
|
186
241
|
*/
|
|
187
|
-
async
|
|
188
|
-
const response = await this.
|
|
242
|
+
async getBurnBlocks(requestParameters, initOverrides) {
|
|
243
|
+
const response = await this.getBurnBlocksRaw(requestParameters, initOverrides);
|
|
189
244
|
return await response.value();
|
|
190
245
|
}
|
|
191
246
|
}
|
|
@@ -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,sCAA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AwB,EAAE,CAAC;QAEjD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC;YAChC,IAAI,EAAE,0BAA0B;YAChC,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,gBAAgB;YACzB,KAAK,EAAE,eAAe;SACzB,EAAE,aAAa,CAAC,CAAC;QAElB,OAAO,IAAI,OAAO,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,IAAA,sCAA6B,EAAC,SAAS,CAAC,CAAC,CAAC;IAC1G,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,aAAa,CAAC,iBAAuC,EAAE,aAA2B;QACpF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;QAC/E,OAAO,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC;IAClC,CAAC;CAEJ;AAtRD,8BAsRC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
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
|
+
/**
|
|
13
|
+
* A block
|
|
14
|
+
* @export
|
|
15
|
+
* @interface NakamotoBlock
|
|
16
|
+
*/
|
|
17
|
+
export interface NakamotoBlock {
|
|
18
|
+
/**
|
|
19
|
+
* Set to `true` if block corresponds to the canonical chain tip
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof NakamotoBlock
|
|
22
|
+
*/
|
|
23
|
+
canonical: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Height of the block
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof NakamotoBlock
|
|
28
|
+
*/
|
|
29
|
+
height: number;
|
|
30
|
+
/**
|
|
31
|
+
* Hash representing the block
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof NakamotoBlock
|
|
34
|
+
*/
|
|
35
|
+
hash: string;
|
|
36
|
+
/**
|
|
37
|
+
* The only hash that can uniquely identify an anchored block or an unconfirmed state trie
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof NakamotoBlock
|
|
40
|
+
*/
|
|
41
|
+
index_block_hash: string;
|
|
42
|
+
/**
|
|
43
|
+
* Hash of the parent block
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof NakamotoBlock
|
|
46
|
+
*/
|
|
47
|
+
parent_block_hash: string;
|
|
48
|
+
/**
|
|
49
|
+
* Index block hash of the parent block
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof NakamotoBlock
|
|
52
|
+
*/
|
|
53
|
+
parent_index_block_hash: string;
|
|
54
|
+
/**
|
|
55
|
+
* Unix timestamp (in seconds) indicating when this block was mined.
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof NakamotoBlock
|
|
58
|
+
*/
|
|
59
|
+
burn_block_time: number;
|
|
60
|
+
/**
|
|
61
|
+
* An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined.
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof NakamotoBlock
|
|
64
|
+
*/
|
|
65
|
+
burn_block_time_iso: string;
|
|
66
|
+
/**
|
|
67
|
+
* Hash of the anchor chain block
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof NakamotoBlock
|
|
70
|
+
*/
|
|
71
|
+
burn_block_hash: string;
|
|
72
|
+
/**
|
|
73
|
+
* Height of the anchor chain block
|
|
74
|
+
* @type {number}
|
|
75
|
+
* @memberof NakamotoBlock
|
|
76
|
+
*/
|
|
77
|
+
burn_block_height: number;
|
|
78
|
+
/**
|
|
79
|
+
* Anchor chain transaction ID
|
|
80
|
+
* @type {string}
|
|
81
|
+
* @memberof NakamotoBlock
|
|
82
|
+
*/
|
|
83
|
+
miner_txid: string;
|
|
84
|
+
/**
|
|
85
|
+
* List of transactions included in the block
|
|
86
|
+
* @type {Array<string>}
|
|
87
|
+
* @memberof NakamotoBlock
|
|
88
|
+
*/
|
|
89
|
+
txs: Array<string>;
|
|
90
|
+
/**
|
|
91
|
+
* Execution cost read count.
|
|
92
|
+
* @type {number}
|
|
93
|
+
* @memberof NakamotoBlock
|
|
94
|
+
*/
|
|
95
|
+
execution_cost_read_count: number;
|
|
96
|
+
/**
|
|
97
|
+
* Execution cost read length.
|
|
98
|
+
* @type {number}
|
|
99
|
+
* @memberof NakamotoBlock
|
|
100
|
+
*/
|
|
101
|
+
execution_cost_read_length: number;
|
|
102
|
+
/**
|
|
103
|
+
* Execution cost runtime.
|
|
104
|
+
* @type {number}
|
|
105
|
+
* @memberof NakamotoBlock
|
|
106
|
+
*/
|
|
107
|
+
execution_cost_runtime: number;
|
|
108
|
+
/**
|
|
109
|
+
* Execution cost write count.
|
|
110
|
+
* @type {number}
|
|
111
|
+
* @memberof NakamotoBlock
|
|
112
|
+
*/
|
|
113
|
+
execution_cost_write_count: number;
|
|
114
|
+
/**
|
|
115
|
+
* Execution cost write length.
|
|
116
|
+
* @type {number}
|
|
117
|
+
* @memberof NakamotoBlock
|
|
118
|
+
*/
|
|
119
|
+
execution_cost_write_length: number;
|
|
120
|
+
}
|
|
121
|
+
export declare function NakamotoBlockFromJSON(json: any): NakamotoBlock;
|
|
122
|
+
export declare function NakamotoBlockFromJSONTyped(json: any, ignoreDiscriminator: boolean): NakamotoBlock;
|
|
123
|
+
export declare function NakamotoBlockToJSON(value?: NakamotoBlock | null): any;
|
|
@@ -0,0 +1,74 @@
|
|
|
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.NakamotoBlockToJSON = exports.NakamotoBlockFromJSONTyped = exports.NakamotoBlockFromJSON = void 0;
|
|
17
|
+
function NakamotoBlockFromJSON(json) {
|
|
18
|
+
return NakamotoBlockFromJSONTyped(json, false);
|
|
19
|
+
}
|
|
20
|
+
exports.NakamotoBlockFromJSON = NakamotoBlockFromJSON;
|
|
21
|
+
function NakamotoBlockFromJSONTyped(json, ignoreDiscriminator) {
|
|
22
|
+
if ((json === undefined) || (json === null)) {
|
|
23
|
+
return json;
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
'canonical': json['canonical'],
|
|
27
|
+
'height': json['height'],
|
|
28
|
+
'hash': json['hash'],
|
|
29
|
+
'index_block_hash': json['index_block_hash'],
|
|
30
|
+
'parent_block_hash': json['parent_block_hash'],
|
|
31
|
+
'parent_index_block_hash': json['parent_index_block_hash'],
|
|
32
|
+
'burn_block_time': json['burn_block_time'],
|
|
33
|
+
'burn_block_time_iso': json['burn_block_time_iso'],
|
|
34
|
+
'burn_block_hash': json['burn_block_hash'],
|
|
35
|
+
'burn_block_height': json['burn_block_height'],
|
|
36
|
+
'miner_txid': json['miner_txid'],
|
|
37
|
+
'txs': json['txs'],
|
|
38
|
+
'execution_cost_read_count': json['execution_cost_read_count'],
|
|
39
|
+
'execution_cost_read_length': json['execution_cost_read_length'],
|
|
40
|
+
'execution_cost_runtime': json['execution_cost_runtime'],
|
|
41
|
+
'execution_cost_write_count': json['execution_cost_write_count'],
|
|
42
|
+
'execution_cost_write_length': json['execution_cost_write_length'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
exports.NakamotoBlockFromJSONTyped = NakamotoBlockFromJSONTyped;
|
|
46
|
+
function NakamotoBlockToJSON(value) {
|
|
47
|
+
if (value === undefined) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
if (value === null) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'canonical': value.canonical,
|
|
55
|
+
'height': value.height,
|
|
56
|
+
'hash': value.hash,
|
|
57
|
+
'index_block_hash': value.index_block_hash,
|
|
58
|
+
'parent_block_hash': value.parent_block_hash,
|
|
59
|
+
'parent_index_block_hash': value.parent_index_block_hash,
|
|
60
|
+
'burn_block_time': value.burn_block_time,
|
|
61
|
+
'burn_block_time_iso': value.burn_block_time_iso,
|
|
62
|
+
'burn_block_hash': value.burn_block_hash,
|
|
63
|
+
'burn_block_height': value.burn_block_height,
|
|
64
|
+
'miner_txid': value.miner_txid,
|
|
65
|
+
'txs': value.txs,
|
|
66
|
+
'execution_cost_read_count': value.execution_cost_read_count,
|
|
67
|
+
'execution_cost_read_length': value.execution_cost_read_length,
|
|
68
|
+
'execution_cost_runtime': value.execution_cost_runtime,
|
|
69
|
+
'execution_cost_write_count': value.execution_cost_write_count,
|
|
70
|
+
'execution_cost_write_length': value.execution_cost_write_length,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
exports.NakamotoBlockToJSON = NakamotoBlockToJSON;
|
|
74
|
+
//# sourceMappingURL=NakamotoBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"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AAxBD,gEAwBC;AAED,SAAgB,mBAAmB,CAAC,KAA4B;IAC5D,IAAI,KAAK,KAAK,SAAS,EAAE;QACrB,OAAO,SAAS,CAAC;KACpB;IACD,IAAI,KAAK,KAAK,IAAI,EAAE;QAChB,OAAO,IAAI,CAAC;KACf;IACD,OAAO;QAEH,WAAW,EAAE,KAAK,CAAC,SAAS;QAC5B,QAAQ,EAAE,KAAK,CAAC,MAAM;QACtB,MAAM,EAAE,KAAK,CAAC,IAAI;QAClB,kBAAkB,EAAE,KAAK,CAAC,gBAAgB;QAC1C,mBAAmB,EAAE,KAAK,CAAC,iBAAiB;QAC5C,yBAAyB,EAAE,KAAK,CAAC,uBAAuB;QACxD,iBAAiB,EAAE,KAAK,CAAC,eAAe;QACxC,qBAAqB,EAAE,KAAK,CAAC,mBAAmB;QAChD,iBAAiB,EAAE,KAAK,CAAC,eAAe;QACxC,mBAAmB,EAAE,KAAK,CAAC,iBAAiB;QAC5C,YAAY,EAAE,KAAK,CAAC,UAAU;QAC9B,KAAK,EAAE,KAAK,CAAC,GAAG;QAChB,2BAA2B,EAAE,KAAK,CAAC,yBAAyB;QAC5D,4BAA4B,EAAE,KAAK,CAAC,0BAA0B;QAC9D,wBAAwB,EAAE,KAAK,CAAC,sBAAsB;QACtD,4BAA4B,EAAE,KAAK,CAAC,0BAA0B;QAC9D,6BAA6B,EAAE,KAAK,CAAC,2BAA2B;KACnE,CAAC;AACN,CAAC;AA3BD,kDA2BC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { NakamotoBlock } from './';
|
|
13
|
+
/**
|
|
14
|
+
* GET request that returns blocks
|
|
15
|
+
* @export
|
|
16
|
+
* @interface NakamotoBlockListResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface NakamotoBlockListResponse {
|
|
19
|
+
/**
|
|
20
|
+
* The number of blocks to return
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof NakamotoBlockListResponse
|
|
23
|
+
*/
|
|
24
|
+
limit: number;
|
|
25
|
+
/**
|
|
26
|
+
* The number to blocks to skip (starting at `0`)
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof NakamotoBlockListResponse
|
|
29
|
+
*/
|
|
30
|
+
offset: number;
|
|
31
|
+
/**
|
|
32
|
+
* The number of blocks available
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof NakamotoBlockListResponse
|
|
35
|
+
*/
|
|
36
|
+
total: number;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Array<NakamotoBlock>}
|
|
40
|
+
* @memberof NakamotoBlockListResponse
|
|
41
|
+
*/
|
|
42
|
+
results: Array<NakamotoBlock>;
|
|
43
|
+
}
|
|
44
|
+
export declare function NakamotoBlockListResponseFromJSON(json: any): NakamotoBlockListResponse;
|
|
45
|
+
export declare function NakamotoBlockListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): NakamotoBlockListResponse;
|
|
46
|
+
export declare function NakamotoBlockListResponseToJSON(value?: NakamotoBlockListResponse | null): any;
|