@stacks/blockchain-api-client 7.3.7-beta.1 → 7.4.0-nakamoto.10
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/AccountsApi.d.ts +1 -36
- package/lib/generated/apis/AccountsApi.js +0 -38
- package/lib/generated/apis/AccountsApi.js.map +1 -1
- package/lib/generated/apis/BlocksApi.d.ts +164 -21
- package/lib/generated/apis/BlocksApi.js +152 -10
- package/lib/generated/apis/BlocksApi.js.map +1 -1
- package/lib/generated/apis/FaucetsApi.d.ts +5 -3
- package/lib/generated/apis/FaucetsApi.js +3 -1
- package/lib/generated/apis/FaucetsApi.js.map +1 -1
- package/lib/generated/apis/NonFungibleTokensApi.d.ts +1 -57
- package/lib/generated/apis/NonFungibleTokensApi.js +0 -55
- package/lib/generated/apis/NonFungibleTokensApi.js.map +1 -1
- package/lib/generated/apis/TransactionsApi.d.ts +3 -2
- package/lib/generated/apis/TransactionsApi.js +1 -0
- package/lib/generated/apis/TransactionsApi.js.map +1 -1
- package/lib/generated/apis/index.d.ts +0 -1
- package/lib/generated/apis/index.js +0 -1
- package/lib/generated/apis/index.js.map +1 -1
- package/lib/generated/models/BurnBlock.d.ts +51 -0
- package/lib/generated/models/BurnBlock.js +50 -0
- package/lib/generated/models/BurnBlock.js.map +1 -0
- package/lib/generated/models/BurnBlockListResponse.d.ts +46 -0
- package/lib/generated/models/{AddressNftListResponse.js → BurnBlockListResponse.js} +11 -11
- package/lib/generated/models/BurnBlockListResponse.js.map +1 -0
- package/lib/generated/models/InlineObject.d.ts +7 -1
- package/lib/generated/models/InlineObject.js +2 -0
- package/lib/generated/models/InlineObject.js.map +1 -1
- package/lib/generated/models/InlineObject1.d.ts +27 -0
- package/lib/generated/models/{AddressNftListResponseValue.js → InlineObject1.js} +12 -13
- package/lib/generated/models/InlineObject1.js.map +1 -0
- 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/{FungibleTokensMetadataList.js → NakamotoBlockListResponse.js} +11 -11
- package/lib/generated/models/NakamotoBlockListResponse.js.map +1 -0
- package/lib/generated/models/ServerStatusResponse.d.ts +6 -0
- package/lib/generated/models/ServerStatusResponse.js +2 -0
- package/lib/generated/models/ServerStatusResponse.js.map +1 -1
- package/lib/generated/models/index.d.ts +5 -7
- package/lib/generated/models/index.js +5 -7
- package/lib/generated/models/index.js.map +1 -1
- package/lib/index.umd.js +564 -668
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/.openapi-generator/FILES +5 -8
- package/src/generated/apis/AccountsApi.ts +0 -79
- package/src/generated/apis/BlocksApi.ts +319 -20
- package/src/generated/apis/FaucetsApi.ts +11 -3
- package/src/generated/apis/NonFungibleTokensApi.ts +0 -116
- package/src/generated/apis/TransactionsApi.ts +3 -2
- package/src/generated/apis/index.ts +0 -1
- package/src/generated/models/BurnBlock.ts +88 -0
- package/src/generated/models/{AddressNftListResponse.ts → BurnBlockListResponse.ts} +22 -22
- package/src/generated/models/InlineObject.ts +9 -1
- package/src/generated/models/{AddressNftListResponseValue.ts → InlineObject1.ts} +12 -20
- package/src/generated/models/NakamotoBlock.ts +184 -0
- package/src/generated/models/{FungibleTokensMetadataList.ts → NakamotoBlockListResponse.ts} +22 -22
- package/src/generated/models/ServerStatusResponse.ts +8 -0
- package/src/generated/models/index.ts +5 -7
- package/lib/generated/apis/FungibleTokensApi.d.ts +0 -82
- package/lib/generated/apis/FungibleTokensApi.js +0 -80
- package/lib/generated/apis/FungibleTokensApi.js.map +0 -1
- package/lib/generated/models/AddressNftListResponse.d.ts +0 -46
- package/lib/generated/models/AddressNftListResponse.js.map +0 -1
- package/lib/generated/models/AddressNftListResponseValue.d.ts +0 -33
- package/lib/generated/models/AddressNftListResponseValue.js.map +0 -1
- package/lib/generated/models/FungibleTokenMetadata.d.ts +0 -75
- package/lib/generated/models/FungibleTokenMetadata.js +0 -58
- package/lib/generated/models/FungibleTokenMetadata.js.map +0 -1
- package/lib/generated/models/FungibleTokensMetadataList.d.ts +0 -46
- package/lib/generated/models/FungibleTokensMetadataList.js.map +0 -1
- package/lib/generated/models/NftEvent.d.ts +0 -76
- package/lib/generated/models/NftEvent.js +0 -60
- package/lib/generated/models/NftEvent.js.map +0 -1
- package/lib/generated/models/NonFungibleTokenMetadata.d.ts +0 -63
- package/lib/generated/models/NonFungibleTokenMetadata.js +0 -54
- package/lib/generated/models/NonFungibleTokenMetadata.js.map +0 -1
- package/lib/generated/models/NonFungibleTokensMetadataList.d.ts +0 -46
- package/lib/generated/models/NonFungibleTokensMetadataList.js +0 -49
- package/lib/generated/models/NonFungibleTokensMetadataList.js.map +0 -1
- package/src/generated/apis/FungibleTokensApi.ts +0 -150
- package/src/generated/models/FungibleTokenMetadata.ts +0 -120
- package/src/generated/models/NftEvent.ts +0 -127
- package/src/generated/models/NonFungibleTokenMetadata.ts +0 -104
- package/src/generated/models/NonFungibleTokensMetadataList.ts +0 -87
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacks/blockchain-api-client",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0-nakamoto.10",
|
|
4
4
|
"access": "public",
|
|
5
5
|
"description": "Client for the Stacks Blockchain API",
|
|
6
6
|
"homepage": "https://github.com/hirosystems/stacks-blockchain-api/tree/master/client#readme",
|
|
@@ -3,7 +3,6 @@ apis/AccountsApi.ts
|
|
|
3
3
|
apis/BlocksApi.ts
|
|
4
4
|
apis/FaucetsApi.ts
|
|
5
5
|
apis/FeesApi.ts
|
|
6
|
-
apis/FungibleTokensApi.ts
|
|
7
6
|
apis/InfoApi.ts
|
|
8
7
|
apis/MicroblocksApi.ts
|
|
9
8
|
apis/NamesApi.ts
|
|
@@ -19,8 +18,6 @@ index.ts
|
|
|
19
18
|
models/AccountDataResponse.ts
|
|
20
19
|
models/AddressAssetsListResponse.ts
|
|
21
20
|
models/AddressBalanceResponse.ts
|
|
22
|
-
models/AddressNftListResponse.ts
|
|
23
|
-
models/AddressNftListResponseValue.ts
|
|
24
21
|
models/AddressNonces.ts
|
|
25
22
|
models/AddressStxInboundListResponse.ts
|
|
26
23
|
models/AddressTokenOfferingLocked.ts
|
|
@@ -40,6 +37,8 @@ models/BnsGetNameInfoResponse.ts
|
|
|
40
37
|
models/BnsGetNamePriceResponse.ts
|
|
41
38
|
models/BnsGetNamespacePriceResponse.ts
|
|
42
39
|
models/BnsNamesOwnByAddressResponse.ts
|
|
40
|
+
models/BurnBlock.ts
|
|
41
|
+
models/BurnBlockListResponse.ts
|
|
43
42
|
models/BurnchainReward.ts
|
|
44
43
|
models/BurnchainRewardListResponse.ts
|
|
45
44
|
models/BurnchainRewardSlotHolder.ts
|
|
@@ -53,13 +52,12 @@ models/CoreNodeInfoResponse.ts
|
|
|
53
52
|
models/CoreNodePoxResponse.ts
|
|
54
53
|
models/FeeRate.ts
|
|
55
54
|
models/FeeRateRequest.ts
|
|
56
|
-
models/FungibleTokenMetadata.ts
|
|
57
|
-
models/FungibleTokensMetadataList.ts
|
|
58
55
|
models/GetRawTransactionResult.ts
|
|
59
56
|
models/GetStxSupplyLegacyFormatResponse.ts
|
|
60
57
|
models/GetStxSupplyResponse.ts
|
|
61
58
|
models/InboundStxTransfer.ts
|
|
62
59
|
models/InlineObject.ts
|
|
60
|
+
models/InlineObject1.ts
|
|
63
61
|
models/InlineResponse403.ts
|
|
64
62
|
models/MapEntryResponse.ts
|
|
65
63
|
models/MempoolTransactionListResponse.ts
|
|
@@ -71,15 +69,14 @@ models/MempoolTransactionStatsResponseTxSimpleFeeAveragesTokenTransfer.ts
|
|
|
71
69
|
models/MempoolTransactionStatsResponseTxTypeCounts.ts
|
|
72
70
|
models/Microblock.ts
|
|
73
71
|
models/MicroblockListResponse.ts
|
|
72
|
+
models/NakamotoBlock.ts
|
|
73
|
+
models/NakamotoBlockListResponse.ts
|
|
74
74
|
models/NetworkBlockTimeResponse.ts
|
|
75
75
|
models/NetworkBlockTimesResponse.ts
|
|
76
76
|
models/NetworkIdentifier.ts
|
|
77
|
-
models/NftEvent.ts
|
|
78
77
|
models/NonFungibleTokenHistoryEventList.ts
|
|
79
78
|
models/NonFungibleTokenHoldingsList.ts
|
|
80
|
-
models/NonFungibleTokenMetadata.ts
|
|
81
79
|
models/NonFungibleTokenMintList.ts
|
|
82
|
-
models/NonFungibleTokensMetadataList.ts
|
|
83
80
|
models/OtherTransactionIdentifier.ts
|
|
84
81
|
models/PoolDelegation.ts
|
|
85
82
|
models/PoolDelegationsResponse.ts
|
|
@@ -24,9 +24,6 @@ import {
|
|
|
24
24
|
AddressBalanceResponse,
|
|
25
25
|
AddressBalanceResponseFromJSON,
|
|
26
26
|
AddressBalanceResponseToJSON,
|
|
27
|
-
AddressNftListResponse,
|
|
28
|
-
AddressNftListResponseFromJSON,
|
|
29
|
-
AddressNftListResponseToJSON,
|
|
30
27
|
AddressNonces,
|
|
31
28
|
AddressNoncesFromJSON,
|
|
32
29
|
AddressNoncesToJSON,
|
|
@@ -73,14 +70,6 @@ export interface GetAccountInfoRequest {
|
|
|
73
70
|
tip?: string;
|
|
74
71
|
}
|
|
75
72
|
|
|
76
|
-
export interface GetAccountNftRequest {
|
|
77
|
-
principal: string;
|
|
78
|
-
limit?: number;
|
|
79
|
-
offset?: number;
|
|
80
|
-
unanchored?: boolean;
|
|
81
|
-
untilBlock?: string;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
73
|
export interface GetAccountNoncesRequest {
|
|
85
74
|
principal: string;
|
|
86
75
|
blockHeight?: number;
|
|
@@ -200,26 +189,6 @@ export interface AccountsApiInterface {
|
|
|
200
189
|
*/
|
|
201
190
|
getAccountInfo(requestParameters: GetAccountInfoRequest, initOverrides?: RequestInit): Promise<AccountDataResponse>;
|
|
202
191
|
|
|
203
|
-
/**
|
|
204
|
-
* **NOTE:** This endpoint is deprecated in favor of [Non-Fungible Token holdings](#operation/get_nft_holdings). Retrieves a list of all nfts owned by an address, contains the clarity value of the identifier of the nft.
|
|
205
|
-
* @summary Get nft events
|
|
206
|
-
* @param {string} principal Stacks address or a Contract identifier
|
|
207
|
-
* @param {number} [limit] number of items to return
|
|
208
|
-
* @param {number} [offset] number of items to skip
|
|
209
|
-
* @param {boolean} [unanchored] Include transaction data from unanchored (i.e. unconfirmed) microblocks
|
|
210
|
-
* @param {string} [untilBlock] returned data representing the state up until that point in time, rather than the current block. Note - Use either of the query parameters but not both at a time.
|
|
211
|
-
* @param {*} [options] Override http request option.
|
|
212
|
-
* @throws {RequiredError}
|
|
213
|
-
* @memberof AccountsApiInterface
|
|
214
|
-
*/
|
|
215
|
-
getAccountNftRaw(requestParameters: GetAccountNftRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<AddressNftListResponse>>;
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* **NOTE:** This endpoint is deprecated in favor of [Non-Fungible Token holdings](#operation/get_nft_holdings). Retrieves a list of all nfts owned by an address, contains the clarity value of the identifier of the nft.
|
|
219
|
-
* Get nft events
|
|
220
|
-
*/
|
|
221
|
-
getAccountNft(requestParameters: GetAccountNftRequest, initOverrides?: RequestInit): Promise<AddressNftListResponse>;
|
|
222
|
-
|
|
223
192
|
/**
|
|
224
193
|
* Retrieves the latest nonce values used by an account by inspecting the mempool, microblock transactions, and anchored transactions.
|
|
225
194
|
* @summary Get the latest nonce used by an account
|
|
@@ -502,54 +471,6 @@ export class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface
|
|
|
502
471
|
return await response.value();
|
|
503
472
|
}
|
|
504
473
|
|
|
505
|
-
/**
|
|
506
|
-
* **NOTE:** This endpoint is deprecated in favor of [Non-Fungible Token holdings](#operation/get_nft_holdings). Retrieves a list of all nfts owned by an address, contains the clarity value of the identifier of the nft.
|
|
507
|
-
* Get nft events
|
|
508
|
-
*/
|
|
509
|
-
async getAccountNftRaw(requestParameters: GetAccountNftRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<AddressNftListResponse>> {
|
|
510
|
-
if (requestParameters.principal === null || requestParameters.principal === undefined) {
|
|
511
|
-
throw new runtime.RequiredError('principal','Required parameter requestParameters.principal was null or undefined when calling getAccountNft.');
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
const queryParameters: any = {};
|
|
515
|
-
|
|
516
|
-
if (requestParameters.limit !== undefined) {
|
|
517
|
-
queryParameters['limit'] = requestParameters.limit;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
if (requestParameters.offset !== undefined) {
|
|
521
|
-
queryParameters['offset'] = requestParameters.offset;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
if (requestParameters.unanchored !== undefined) {
|
|
525
|
-
queryParameters['unanchored'] = requestParameters.unanchored;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
if (requestParameters.untilBlock !== undefined) {
|
|
529
|
-
queryParameters['until_block'] = requestParameters.untilBlock;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
533
|
-
|
|
534
|
-
const response = await this.request({
|
|
535
|
-
path: `/extended/v1/address/{principal}/nft_events`.replace(`{${"principal"}}`, encodeURIComponent(String(requestParameters.principal))),
|
|
536
|
-
method: 'GET',
|
|
537
|
-
headers: headerParameters,
|
|
538
|
-
query: queryParameters,
|
|
539
|
-
}, initOverrides);
|
|
540
|
-
|
|
541
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => AddressNftListResponseFromJSON(jsonValue));
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
/**
|
|
545
|
-
* **NOTE:** This endpoint is deprecated in favor of [Non-Fungible Token holdings](#operation/get_nft_holdings). Retrieves a list of all nfts owned by an address, contains the clarity value of the identifier of the nft.
|
|
546
|
-
* Get nft events
|
|
547
|
-
*/
|
|
548
|
-
async getAccountNft(requestParameters: GetAccountNftRequest, initOverrides?: RequestInit): Promise<AddressNftListResponse> {
|
|
549
|
-
const response = await this.getAccountNftRaw(requestParameters, initOverrides);
|
|
550
|
-
return await response.value();
|
|
551
|
-
}
|
|
552
|
-
|
|
553
474
|
/**
|
|
554
475
|
* Retrieves the latest nonce values used by an account by inspecting the mempool, microblock transactions, and anchored transactions.
|
|
555
476
|
* Get the latest nonce used by an account
|
|
@@ -21,8 +21,27 @@ import {
|
|
|
21
21
|
BlockListResponse,
|
|
22
22
|
BlockListResponseFromJSON,
|
|
23
23
|
BlockListResponseToJSON,
|
|
24
|
+
BurnBlock,
|
|
25
|
+
BurnBlockFromJSON,
|
|
26
|
+
BurnBlockToJSON,
|
|
27
|
+
BurnBlockListResponse,
|
|
28
|
+
BurnBlockListResponseFromJSON,
|
|
29
|
+
BurnBlockListResponseToJSON,
|
|
30
|
+
NakamotoBlock,
|
|
31
|
+
NakamotoBlockFromJSON,
|
|
32
|
+
NakamotoBlockToJSON,
|
|
33
|
+
NakamotoBlockListResponse,
|
|
34
|
+
NakamotoBlockListResponseFromJSON,
|
|
35
|
+
NakamotoBlockListResponseToJSON,
|
|
36
|
+
TransactionResults,
|
|
37
|
+
TransactionResultsFromJSON,
|
|
38
|
+
TransactionResultsToJSON,
|
|
24
39
|
} from '../models';
|
|
25
40
|
|
|
41
|
+
export interface GetBlockRequest {
|
|
42
|
+
heightOrHash: number | string;
|
|
43
|
+
}
|
|
44
|
+
|
|
26
45
|
export interface GetBlockByBurnBlockHashRequest {
|
|
27
46
|
burnBlockHash: string;
|
|
28
47
|
}
|
|
@@ -44,6 +63,26 @@ export interface GetBlockListRequest {
|
|
|
44
63
|
offset?: number;
|
|
45
64
|
}
|
|
46
65
|
|
|
66
|
+
export interface GetBlockTransactionsRequest {
|
|
67
|
+
heightOrHash: number | string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface GetBlocksRequest {
|
|
71
|
+
limit?: number;
|
|
72
|
+
offset?: number;
|
|
73
|
+
burnBlockHash?: string;
|
|
74
|
+
burnBlockHeight?: number;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface GetBurnBlockRequest {
|
|
78
|
+
heightOrHash: number | string;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface GetBurnBlocksRequest {
|
|
82
|
+
limit?: number;
|
|
83
|
+
offset?: number;
|
|
84
|
+
}
|
|
85
|
+
|
|
47
86
|
/**
|
|
48
87
|
* BlocksApi - interface
|
|
49
88
|
*
|
|
@@ -52,7 +91,23 @@ export interface GetBlockListRequest {
|
|
|
52
91
|
*/
|
|
53
92
|
export interface BlocksApiInterface {
|
|
54
93
|
/**
|
|
55
|
-
* Retrieves
|
|
94
|
+
* Retrieves a single block
|
|
95
|
+
* @summary Get block
|
|
96
|
+
* @param {number | string} heightOrHash filter by block height, hash, index block hash or the constant `latest` to filter for the most recent block
|
|
97
|
+
* @param {*} [options] Override http request option.
|
|
98
|
+
* @throws {RequiredError}
|
|
99
|
+
* @memberof BlocksApiInterface
|
|
100
|
+
*/
|
|
101
|
+
getBlockRaw(requestParameters: GetBlockRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NakamotoBlock>>;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Retrieves a single block
|
|
105
|
+
* Get block
|
|
106
|
+
*/
|
|
107
|
+
getBlock(requestParameters: GetBlockRequest, initOverrides?: RequestInit): Promise<NakamotoBlock>;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* **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
|
|
56
111
|
* @summary Get block by burnchain block hash
|
|
57
112
|
* @param {string} burnBlockHash Hash of the burnchain block
|
|
58
113
|
* @param {*} [options] Override http request option.
|
|
@@ -62,13 +117,13 @@ export interface BlocksApiInterface {
|
|
|
62
117
|
getBlockByBurnBlockHashRaw(requestParameters: GetBlockByBurnBlockHashRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Block>>;
|
|
63
118
|
|
|
64
119
|
/**
|
|
65
|
-
* Retrieves block details of a specific block for a given burnchain block hash
|
|
120
|
+
* **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
|
|
66
121
|
* Get block by burnchain block hash
|
|
67
122
|
*/
|
|
68
123
|
getBlockByBurnBlockHash(requestParameters: GetBlockByBurnBlockHashRequest, initOverrides?: RequestInit): Promise<Block>;
|
|
69
124
|
|
|
70
125
|
/**
|
|
71
|
-
* Retrieves block details of a specific block for a given burn chain height
|
|
126
|
+
* **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
|
|
72
127
|
* @summary Get block by burnchain height
|
|
73
128
|
* @param {number} burnBlockHeight Height of the burn chain block
|
|
74
129
|
* @param {*} [options] Override http request option.
|
|
@@ -78,13 +133,13 @@ export interface BlocksApiInterface {
|
|
|
78
133
|
getBlockByBurnBlockHeightRaw(requestParameters: GetBlockByBurnBlockHeightRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Block>>;
|
|
79
134
|
|
|
80
135
|
/**
|
|
81
|
-
* Retrieves block details of a specific block for a given burn chain height
|
|
136
|
+
* **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
|
|
82
137
|
* Get block by burnchain height
|
|
83
138
|
*/
|
|
84
139
|
getBlockByBurnBlockHeight(requestParameters: GetBlockByBurnBlockHeightRequest, initOverrides?: RequestInit): Promise<Block>;
|
|
85
140
|
|
|
86
141
|
/**
|
|
87
|
-
* Retrieves block details of a specific block for a given chain height. You can use the hash from your latest block (\'get_block_list\' API) to get your block details.
|
|
142
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get block](#operation/get_block). Retrieves block details of a specific block for a given chain height. You can use the hash from your latest block (\'get_block_list\' API) to get your block details.
|
|
88
143
|
* @summary Get block by hash
|
|
89
144
|
* @param {string} hash Hash of the block
|
|
90
145
|
* @param {*} [options] Override http request option.
|
|
@@ -94,13 +149,13 @@ export interface BlocksApiInterface {
|
|
|
94
149
|
getBlockByHashRaw(requestParameters: GetBlockByHashRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Block>>;
|
|
95
150
|
|
|
96
151
|
/**
|
|
97
|
-
* Retrieves block details of a specific block for a given chain height. You can use the hash from your latest block (\'get_block_list\' API) to get your block details.
|
|
152
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get block](#operation/get_block). Retrieves block details of a specific block for a given chain height. You can use the hash from your latest block (\'get_block_list\' API) to get your block details.
|
|
98
153
|
* Get block by hash
|
|
99
154
|
*/
|
|
100
155
|
getBlockByHash(requestParameters: GetBlockByHashRequest, initOverrides?: RequestInit): Promise<Block>;
|
|
101
156
|
|
|
102
157
|
/**
|
|
103
|
-
* Retrieves block details of a specific block at a given block height
|
|
158
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get block](#operation/get_block). Retrieves block details of a specific block at a given block height
|
|
104
159
|
* @summary Get block by height
|
|
105
160
|
* @param {number} height Height of the block
|
|
106
161
|
* @param {*} [options] Override http request option.
|
|
@@ -110,13 +165,13 @@ export interface BlocksApiInterface {
|
|
|
110
165
|
getBlockByHeightRaw(requestParameters: GetBlockByHeightRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Block>>;
|
|
111
166
|
|
|
112
167
|
/**
|
|
113
|
-
* Retrieves block details of a specific block at a given block height
|
|
168
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get block](#operation/get_block). Retrieves block details of a specific block at a given block height
|
|
114
169
|
* Get block by height
|
|
115
170
|
*/
|
|
116
171
|
getBlockByHeight(requestParameters: GetBlockByHeightRequest, initOverrides?: RequestInit): Promise<Block>;
|
|
117
172
|
|
|
118
173
|
/**
|
|
119
|
-
* 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.
|
|
174
|
+
* **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.
|
|
120
175
|
* @summary Get recent blocks
|
|
121
176
|
* @param {number} [limit] max number of blocks to fetch
|
|
122
177
|
* @param {number} [offset] index of first block to fetch
|
|
@@ -127,11 +182,79 @@ export interface BlocksApiInterface {
|
|
|
127
182
|
getBlockListRaw(requestParameters: GetBlockListRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BlockListResponse>>;
|
|
128
183
|
|
|
129
184
|
/**
|
|
130
|
-
* 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.
|
|
185
|
+
* **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.
|
|
131
186
|
* Get recent blocks
|
|
132
187
|
*/
|
|
133
188
|
getBlockList(requestParameters: GetBlockListRequest, initOverrides?: RequestInit): Promise<BlockListResponse>;
|
|
134
189
|
|
|
190
|
+
/**
|
|
191
|
+
* Retrieves transactions confirmed in a single block
|
|
192
|
+
* @summary Get block transactions
|
|
193
|
+
* @param {number | string} heightOrHash filter by block height, hash, index block hash or the constant `latest` to filter for the most recent block
|
|
194
|
+
* @param {*} [options] Override http request option.
|
|
195
|
+
* @throws {RequiredError}
|
|
196
|
+
* @memberof BlocksApiInterface
|
|
197
|
+
*/
|
|
198
|
+
getBlockTransactionsRaw(requestParameters: GetBlockTransactionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<TransactionResults>>;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Retrieves transactions confirmed in a single block
|
|
202
|
+
* Get block transactions
|
|
203
|
+
*/
|
|
204
|
+
getBlockTransactions(requestParameters: GetBlockTransactionsRequest, initOverrides?: RequestInit): Promise<TransactionResults>;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Retrieves a list of recently mined blocks
|
|
208
|
+
* @summary Get blocks
|
|
209
|
+
* @param {number} [limit] max number of blocks to fetch
|
|
210
|
+
* @param {number} [offset] index of first burn block to fetch
|
|
211
|
+
* @param {string} [burnBlockHash] filter blocks by burn block hash
|
|
212
|
+
* @param {number} [burnBlockHeight] filter blocks by burn block height
|
|
213
|
+
* @param {*} [options] Override http request option.
|
|
214
|
+
* @throws {RequiredError}
|
|
215
|
+
* @memberof BlocksApiInterface
|
|
216
|
+
*/
|
|
217
|
+
getBlocksRaw(requestParameters: GetBlocksRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NakamotoBlockListResponse>>;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Retrieves a list of recently mined blocks
|
|
221
|
+
* Get blocks
|
|
222
|
+
*/
|
|
223
|
+
getBlocks(requestParameters: GetBlocksRequest, initOverrides?: RequestInit): Promise<NakamotoBlockListResponse>;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Retrieves a single burn block
|
|
227
|
+
* @summary Get burn block
|
|
228
|
+
* @param {number | string} heightOrHash filter by burn block height, hash, or the constant `latest` to filter for the most recent burn block
|
|
229
|
+
* @param {*} [options] Override http request option.
|
|
230
|
+
* @throws {RequiredError}
|
|
231
|
+
* @memberof BlocksApiInterface
|
|
232
|
+
*/
|
|
233
|
+
getBurnBlockRaw(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BurnBlock>>;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Retrieves a single burn block
|
|
237
|
+
* Get burn block
|
|
238
|
+
*/
|
|
239
|
+
getBurnBlock(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise<BurnBlock>;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Retrieves a list of recent burn blocks
|
|
243
|
+
* @summary Get burn blocks
|
|
244
|
+
* @param {number} [limit] max number of burn blocks to fetch
|
|
245
|
+
* @param {number} [offset] index of first burn block to fetch
|
|
246
|
+
* @param {*} [options] Override http request option.
|
|
247
|
+
* @throws {RequiredError}
|
|
248
|
+
* @memberof BlocksApiInterface
|
|
249
|
+
*/
|
|
250
|
+
getBurnBlocksRaw(requestParameters: GetBurnBlocksRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BurnBlockListResponse>>;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Retrieves a list of recent burn blocks
|
|
254
|
+
* Get burn blocks
|
|
255
|
+
*/
|
|
256
|
+
getBurnBlocks(requestParameters: GetBurnBlocksRequest, initOverrides?: RequestInit): Promise<BurnBlockListResponse>;
|
|
257
|
+
|
|
135
258
|
}
|
|
136
259
|
|
|
137
260
|
/**
|
|
@@ -140,7 +263,39 @@ export interface BlocksApiInterface {
|
|
|
140
263
|
export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
141
264
|
|
|
142
265
|
/**
|
|
143
|
-
* Retrieves
|
|
266
|
+
* Retrieves a single block
|
|
267
|
+
* Get block
|
|
268
|
+
*/
|
|
269
|
+
async getBlockRaw(requestParameters: GetBlockRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NakamotoBlock>> {
|
|
270
|
+
if (requestParameters.heightOrHash === null || requestParameters.heightOrHash === undefined) {
|
|
271
|
+
throw new runtime.RequiredError('heightOrHash','Required parameter requestParameters.heightOrHash was null or undefined when calling getBlock.');
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
const queryParameters: any = {};
|
|
275
|
+
|
|
276
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
277
|
+
|
|
278
|
+
const response = await this.request({
|
|
279
|
+
path: `/extended/v2/blocks/{height_or_hash}`.replace(`{${"height_or_hash"}}`, encodeURIComponent(String(requestParameters.heightOrHash))),
|
|
280
|
+
method: 'GET',
|
|
281
|
+
headers: headerParameters,
|
|
282
|
+
query: queryParameters,
|
|
283
|
+
}, initOverrides);
|
|
284
|
+
|
|
285
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => NakamotoBlockFromJSON(jsonValue));
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Retrieves a single block
|
|
290
|
+
* Get block
|
|
291
|
+
*/
|
|
292
|
+
async getBlock(requestParameters: GetBlockRequest, initOverrides?: RequestInit): Promise<NakamotoBlock> {
|
|
293
|
+
const response = await this.getBlockRaw(requestParameters, initOverrides);
|
|
294
|
+
return await response.value();
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* **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
|
|
144
299
|
* Get block by burnchain block hash
|
|
145
300
|
*/
|
|
146
301
|
async getBlockByBurnBlockHashRaw(requestParameters: GetBlockByBurnBlockHashRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Block>> {
|
|
@@ -163,7 +318,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
|
163
318
|
}
|
|
164
319
|
|
|
165
320
|
/**
|
|
166
|
-
* Retrieves block details of a specific block for a given burnchain block hash
|
|
321
|
+
* **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
|
|
167
322
|
* Get block by burnchain block hash
|
|
168
323
|
*/
|
|
169
324
|
async getBlockByBurnBlockHash(requestParameters: GetBlockByBurnBlockHashRequest, initOverrides?: RequestInit): Promise<Block> {
|
|
@@ -172,7 +327,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
|
172
327
|
}
|
|
173
328
|
|
|
174
329
|
/**
|
|
175
|
-
* Retrieves block details of a specific block for a given burn chain height
|
|
330
|
+
* **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
|
|
176
331
|
* Get block by burnchain height
|
|
177
332
|
*/
|
|
178
333
|
async getBlockByBurnBlockHeightRaw(requestParameters: GetBlockByBurnBlockHeightRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Block>> {
|
|
@@ -195,7 +350,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
|
195
350
|
}
|
|
196
351
|
|
|
197
352
|
/**
|
|
198
|
-
* Retrieves block details of a specific block for a given burn chain height
|
|
353
|
+
* **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
|
|
199
354
|
* Get block by burnchain height
|
|
200
355
|
*/
|
|
201
356
|
async getBlockByBurnBlockHeight(requestParameters: GetBlockByBurnBlockHeightRequest, initOverrides?: RequestInit): Promise<Block> {
|
|
@@ -204,7 +359,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
|
204
359
|
}
|
|
205
360
|
|
|
206
361
|
/**
|
|
207
|
-
* Retrieves block details of a specific block for a given chain height. You can use the hash from your latest block (\'get_block_list\' API) to get your block details.
|
|
362
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get block](#operation/get_block). Retrieves block details of a specific block for a given chain height. You can use the hash from your latest block (\'get_block_list\' API) to get your block details.
|
|
208
363
|
* Get block by hash
|
|
209
364
|
*/
|
|
210
365
|
async getBlockByHashRaw(requestParameters: GetBlockByHashRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Block>> {
|
|
@@ -227,7 +382,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
|
227
382
|
}
|
|
228
383
|
|
|
229
384
|
/**
|
|
230
|
-
* Retrieves block details of a specific block for a given chain height. You can use the hash from your latest block (\'get_block_list\' API) to get your block details.
|
|
385
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get block](#operation/get_block). Retrieves block details of a specific block for a given chain height. You can use the hash from your latest block (\'get_block_list\' API) to get your block details.
|
|
231
386
|
* Get block by hash
|
|
232
387
|
*/
|
|
233
388
|
async getBlockByHash(requestParameters: GetBlockByHashRequest, initOverrides?: RequestInit): Promise<Block> {
|
|
@@ -236,7 +391,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
|
236
391
|
}
|
|
237
392
|
|
|
238
393
|
/**
|
|
239
|
-
* Retrieves block details of a specific block at a given block height
|
|
394
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get block](#operation/get_block). Retrieves block details of a specific block at a given block height
|
|
240
395
|
* Get block by height
|
|
241
396
|
*/
|
|
242
397
|
async getBlockByHeightRaw(requestParameters: GetBlockByHeightRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Block>> {
|
|
@@ -259,7 +414,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
|
259
414
|
}
|
|
260
415
|
|
|
261
416
|
/**
|
|
262
|
-
* Retrieves block details of a specific block at a given block height
|
|
417
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get block](#operation/get_block). Retrieves block details of a specific block at a given block height
|
|
263
418
|
* Get block by height
|
|
264
419
|
*/
|
|
265
420
|
async getBlockByHeight(requestParameters: GetBlockByHeightRequest, initOverrides?: RequestInit): Promise<Block> {
|
|
@@ -268,7 +423,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
|
268
423
|
}
|
|
269
424
|
|
|
270
425
|
/**
|
|
271
|
-
* 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.
|
|
426
|
+
* **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.
|
|
272
427
|
* Get recent blocks
|
|
273
428
|
*/
|
|
274
429
|
async getBlockListRaw(requestParameters: GetBlockListRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BlockListResponse>> {
|
|
@@ -295,7 +450,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
|
295
450
|
}
|
|
296
451
|
|
|
297
452
|
/**
|
|
298
|
-
* 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.
|
|
453
|
+
* **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.
|
|
299
454
|
* Get recent blocks
|
|
300
455
|
*/
|
|
301
456
|
async getBlockList(requestParameters: GetBlockListRequest, initOverrides?: RequestInit): Promise<BlockListResponse> {
|
|
@@ -303,4 +458,148 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
|
303
458
|
return await response.value();
|
|
304
459
|
}
|
|
305
460
|
|
|
461
|
+
/**
|
|
462
|
+
* Retrieves transactions confirmed in a single block
|
|
463
|
+
* Get block transactions
|
|
464
|
+
*/
|
|
465
|
+
async getBlockTransactionsRaw(requestParameters: GetBlockTransactionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<TransactionResults>> {
|
|
466
|
+
if (requestParameters.heightOrHash === null || requestParameters.heightOrHash === undefined) {
|
|
467
|
+
throw new runtime.RequiredError('heightOrHash','Required parameter requestParameters.heightOrHash was null or undefined when calling getBlockTransactions.');
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
const queryParameters: any = {};
|
|
471
|
+
|
|
472
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
473
|
+
|
|
474
|
+
const response = await this.request({
|
|
475
|
+
path: `/extended/v2/blocks/{height_or_hash}/transactions`.replace(`{${"height_or_hash"}}`, encodeURIComponent(String(requestParameters.heightOrHash))),
|
|
476
|
+
method: 'GET',
|
|
477
|
+
headers: headerParameters,
|
|
478
|
+
query: queryParameters,
|
|
479
|
+
}, initOverrides);
|
|
480
|
+
|
|
481
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TransactionResultsFromJSON(jsonValue));
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Retrieves transactions confirmed in a single block
|
|
486
|
+
* Get block transactions
|
|
487
|
+
*/
|
|
488
|
+
async getBlockTransactions(requestParameters: GetBlockTransactionsRequest, initOverrides?: RequestInit): Promise<TransactionResults> {
|
|
489
|
+
const response = await this.getBlockTransactionsRaw(requestParameters, initOverrides);
|
|
490
|
+
return await response.value();
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Retrieves a list of recently mined blocks
|
|
495
|
+
* Get blocks
|
|
496
|
+
*/
|
|
497
|
+
async getBlocksRaw(requestParameters: GetBlocksRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NakamotoBlockListResponse>> {
|
|
498
|
+
const queryParameters: any = {};
|
|
499
|
+
|
|
500
|
+
if (requestParameters.limit !== undefined) {
|
|
501
|
+
queryParameters['limit'] = requestParameters.limit;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
if (requestParameters.offset !== undefined) {
|
|
505
|
+
queryParameters['offset'] = requestParameters.offset;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
if (requestParameters.burnBlockHash !== undefined) {
|
|
509
|
+
queryParameters['burn_block_hash'] = requestParameters.burnBlockHash;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
if (requestParameters.burnBlockHeight !== undefined) {
|
|
513
|
+
queryParameters['burn_block_height'] = requestParameters.burnBlockHeight;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
517
|
+
|
|
518
|
+
const response = await this.request({
|
|
519
|
+
path: `/extended/v2/blocks`,
|
|
520
|
+
method: 'GET',
|
|
521
|
+
headers: headerParameters,
|
|
522
|
+
query: queryParameters,
|
|
523
|
+
}, initOverrides);
|
|
524
|
+
|
|
525
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => NakamotoBlockListResponseFromJSON(jsonValue));
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Retrieves a list of recently mined blocks
|
|
530
|
+
* Get blocks
|
|
531
|
+
*/
|
|
532
|
+
async getBlocks(requestParameters: GetBlocksRequest, initOverrides?: RequestInit): Promise<NakamotoBlockListResponse> {
|
|
533
|
+
const response = await this.getBlocksRaw(requestParameters, initOverrides);
|
|
534
|
+
return await response.value();
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Retrieves a single burn block
|
|
539
|
+
* Get burn block
|
|
540
|
+
*/
|
|
541
|
+
async getBurnBlockRaw(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BurnBlock>> {
|
|
542
|
+
if (requestParameters.heightOrHash === null || requestParameters.heightOrHash === undefined) {
|
|
543
|
+
throw new runtime.RequiredError('heightOrHash','Required parameter requestParameters.heightOrHash was null or undefined when calling getBurnBlock.');
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
const queryParameters: any = {};
|
|
547
|
+
|
|
548
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
549
|
+
|
|
550
|
+
const response = await this.request({
|
|
551
|
+
path: `/extended/v2/burn-blocks/{height_or_hash}`.replace(`{${"height_or_hash"}}`, encodeURIComponent(String(requestParameters.heightOrHash))),
|
|
552
|
+
method: 'GET',
|
|
553
|
+
headers: headerParameters,
|
|
554
|
+
query: queryParameters,
|
|
555
|
+
}, initOverrides);
|
|
556
|
+
|
|
557
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BurnBlockFromJSON(jsonValue));
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* Retrieves a single burn block
|
|
562
|
+
* Get burn block
|
|
563
|
+
*/
|
|
564
|
+
async getBurnBlock(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise<BurnBlock> {
|
|
565
|
+
const response = await this.getBurnBlockRaw(requestParameters, initOverrides);
|
|
566
|
+
return await response.value();
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Retrieves a list of recent burn blocks
|
|
571
|
+
* Get burn blocks
|
|
572
|
+
*/
|
|
573
|
+
async getBurnBlocksRaw(requestParameters: GetBurnBlocksRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BurnBlockListResponse>> {
|
|
574
|
+
const queryParameters: any = {};
|
|
575
|
+
|
|
576
|
+
if (requestParameters.limit !== undefined) {
|
|
577
|
+
queryParameters['limit'] = requestParameters.limit;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
if (requestParameters.offset !== undefined) {
|
|
581
|
+
queryParameters['offset'] = requestParameters.offset;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
585
|
+
|
|
586
|
+
const response = await this.request({
|
|
587
|
+
path: `/extended/v2/burn-blocks`,
|
|
588
|
+
method: 'GET',
|
|
589
|
+
headers: headerParameters,
|
|
590
|
+
query: queryParameters,
|
|
591
|
+
}, initOverrides);
|
|
592
|
+
|
|
593
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BurnBlockListResponseFromJSON(jsonValue));
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Retrieves a list of recent burn blocks
|
|
598
|
+
* Get burn blocks
|
|
599
|
+
*/
|
|
600
|
+
async getBurnBlocks(requestParameters: GetBurnBlocksRequest, initOverrides?: RequestInit): Promise<BurnBlockListResponse> {
|
|
601
|
+
const response = await this.getBurnBlocksRaw(requestParameters, initOverrides);
|
|
602
|
+
return await response.value();
|
|
603
|
+
}
|
|
604
|
+
|
|
306
605
|
}
|