@stacks/blockchain-api-client 7.4.0-nakamoto.5 → 7.4.0-nakamoto.7
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 +63 -9
- package/lib/generated/apis/BlocksApi.js +56 -4
- package/lib/generated/apis/BlocksApi.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/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/NakamotoBlock.d.ts +3 -3
- package/lib/generated/models/NakamotoBlock.js +2 -2
- package/lib/generated/models/NakamotoBlock.js.map +1 -1
- package/lib/generated/models/index.d.ts +0 -7
- package/lib/generated/models/index.js +0 -7
- package/lib/generated/models/index.js.map +1 -1
- package/lib/index.umd.js +174 -674
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/.openapi-generator/FILES +0 -8
- package/src/generated/apis/AccountsApi.ts +0 -79
- package/src/generated/apis/BlocksApi.ts +118 -8
- package/src/generated/apis/NonFungibleTokensApi.ts +0 -116
- package/src/generated/apis/index.ts +0 -1
- package/src/generated/models/NakamotoBlock.ts +5 -5
- package/src/generated/models/index.ts +0 -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 +0 -49
- package/lib/generated/models/AddressNftListResponse.js.map +0 -1
- package/lib/generated/models/AddressNftListResponseValue.d.ts +0 -33
- package/lib/generated/models/AddressNftListResponseValue.js +0 -44
- 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 +0 -49
- 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/AddressNftListResponse.ts +0 -87
- package/src/generated/models/AddressNftListResponseValue.ts +0 -64
- package/src/generated/models/FungibleTokenMetadata.ts +0 -120
- package/src/generated/models/FungibleTokensMetadataList.ts +0 -87
- 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.4.0-nakamoto.
|
|
3
|
+
"version": "7.4.0-nakamoto.7",
|
|
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
|
|
@@ -55,8 +52,6 @@ models/CoreNodeInfoResponse.ts
|
|
|
55
52
|
models/CoreNodePoxResponse.ts
|
|
56
53
|
models/FeeRate.ts
|
|
57
54
|
models/FeeRateRequest.ts
|
|
58
|
-
models/FungibleTokenMetadata.ts
|
|
59
|
-
models/FungibleTokensMetadataList.ts
|
|
60
55
|
models/GetRawTransactionResult.ts
|
|
61
56
|
models/GetStxSupplyLegacyFormatResponse.ts
|
|
62
57
|
models/GetStxSupplyResponse.ts
|
|
@@ -79,12 +74,9 @@ models/NakamotoBlockListResponse.ts
|
|
|
79
74
|
models/NetworkBlockTimeResponse.ts
|
|
80
75
|
models/NetworkBlockTimesResponse.ts
|
|
81
76
|
models/NetworkIdentifier.ts
|
|
82
|
-
models/NftEvent.ts
|
|
83
77
|
models/NonFungibleTokenHistoryEventList.ts
|
|
84
78
|
models/NonFungibleTokenHoldingsList.ts
|
|
85
|
-
models/NonFungibleTokenMetadata.ts
|
|
86
79
|
models/NonFungibleTokenMintList.ts
|
|
87
|
-
models/NonFungibleTokensMetadataList.ts
|
|
88
80
|
models/OtherTransactionIdentifier.ts
|
|
89
81
|
models/PoolDelegation.ts
|
|
90
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
|
|
@@ -27,11 +27,21 @@ import {
|
|
|
27
27
|
BurnBlockListResponse,
|
|
28
28
|
BurnBlockListResponseFromJSON,
|
|
29
29
|
BurnBlockListResponseToJSON,
|
|
30
|
+
NakamotoBlock,
|
|
31
|
+
NakamotoBlockFromJSON,
|
|
32
|
+
NakamotoBlockToJSON,
|
|
30
33
|
NakamotoBlockListResponse,
|
|
31
34
|
NakamotoBlockListResponseFromJSON,
|
|
32
35
|
NakamotoBlockListResponseToJSON,
|
|
36
|
+
TransactionResults,
|
|
37
|
+
TransactionResultsFromJSON,
|
|
38
|
+
TransactionResultsToJSON,
|
|
33
39
|
} from '../models';
|
|
34
40
|
|
|
41
|
+
export interface GetBlockRequest {
|
|
42
|
+
heightOrHash: number | string;
|
|
43
|
+
}
|
|
44
|
+
|
|
35
45
|
export interface GetBlockByBurnBlockHashRequest {
|
|
36
46
|
burnBlockHash: string;
|
|
37
47
|
}
|
|
@@ -53,6 +63,10 @@ export interface GetBlockListRequest {
|
|
|
53
63
|
offset?: number;
|
|
54
64
|
}
|
|
55
65
|
|
|
66
|
+
export interface GetBlockTransactionsRequest {
|
|
67
|
+
heightOrHash: number | string;
|
|
68
|
+
}
|
|
69
|
+
|
|
56
70
|
export interface GetBlocksRequest {
|
|
57
71
|
limit?: number;
|
|
58
72
|
offset?: number;
|
|
@@ -76,6 +90,22 @@ export interface GetBurnBlocksRequest {
|
|
|
76
90
|
* @interface BlocksApiInterface
|
|
77
91
|
*/
|
|
78
92
|
export interface BlocksApiInterface {
|
|
93
|
+
/**
|
|
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
|
+
|
|
79
109
|
/**
|
|
80
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
|
|
81
111
|
* @summary Get block by burnchain block hash
|
|
@@ -109,7 +139,7 @@ export interface BlocksApiInterface {
|
|
|
109
139
|
getBlockByBurnBlockHeight(requestParameters: GetBlockByBurnBlockHeightRequest, initOverrides?: RequestInit): Promise<Block>;
|
|
110
140
|
|
|
111
141
|
/**
|
|
112
|
-
* 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.
|
|
113
143
|
* @summary Get block by hash
|
|
114
144
|
* @param {string} hash Hash of the block
|
|
115
145
|
* @param {*} [options] Override http request option.
|
|
@@ -119,13 +149,13 @@ export interface BlocksApiInterface {
|
|
|
119
149
|
getBlockByHashRaw(requestParameters: GetBlockByHashRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Block>>;
|
|
120
150
|
|
|
121
151
|
/**
|
|
122
|
-
* 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.
|
|
123
153
|
* Get block by hash
|
|
124
154
|
*/
|
|
125
155
|
getBlockByHash(requestParameters: GetBlockByHashRequest, initOverrides?: RequestInit): Promise<Block>;
|
|
126
156
|
|
|
127
157
|
/**
|
|
128
|
-
* 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
|
|
129
159
|
* @summary Get block by height
|
|
130
160
|
* @param {number} height Height of the block
|
|
131
161
|
* @param {*} [options] Override http request option.
|
|
@@ -135,7 +165,7 @@ export interface BlocksApiInterface {
|
|
|
135
165
|
getBlockByHeightRaw(requestParameters: GetBlockByHeightRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Block>>;
|
|
136
166
|
|
|
137
167
|
/**
|
|
138
|
-
* 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
|
|
139
169
|
* Get block by height
|
|
140
170
|
*/
|
|
141
171
|
getBlockByHeight(requestParameters: GetBlockByHeightRequest, initOverrides?: RequestInit): Promise<Block>;
|
|
@@ -157,6 +187,22 @@ export interface BlocksApiInterface {
|
|
|
157
187
|
*/
|
|
158
188
|
getBlockList(requestParameters: GetBlockListRequest, initOverrides?: RequestInit): Promise<BlockListResponse>;
|
|
159
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
|
+
|
|
160
206
|
/**
|
|
161
207
|
* Retrieves a list of recently mined blocks
|
|
162
208
|
* @summary Get blocks
|
|
@@ -216,6 +262,38 @@ export interface BlocksApiInterface {
|
|
|
216
262
|
*/
|
|
217
263
|
export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
218
264
|
|
|
265
|
+
/**
|
|
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
|
+
|
|
219
297
|
/**
|
|
220
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
|
|
221
299
|
* Get block by burnchain block hash
|
|
@@ -281,7 +359,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
|
281
359
|
}
|
|
282
360
|
|
|
283
361
|
/**
|
|
284
|
-
* 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.
|
|
285
363
|
* Get block by hash
|
|
286
364
|
*/
|
|
287
365
|
async getBlockByHashRaw(requestParameters: GetBlockByHashRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Block>> {
|
|
@@ -304,7 +382,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
|
304
382
|
}
|
|
305
383
|
|
|
306
384
|
/**
|
|
307
|
-
* 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.
|
|
308
386
|
* Get block by hash
|
|
309
387
|
*/
|
|
310
388
|
async getBlockByHash(requestParameters: GetBlockByHashRequest, initOverrides?: RequestInit): Promise<Block> {
|
|
@@ -313,7 +391,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
|
313
391
|
}
|
|
314
392
|
|
|
315
393
|
/**
|
|
316
|
-
* 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
|
|
317
395
|
* Get block by height
|
|
318
396
|
*/
|
|
319
397
|
async getBlockByHeightRaw(requestParameters: GetBlockByHeightRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Block>> {
|
|
@@ -336,7 +414,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
|
336
414
|
}
|
|
337
415
|
|
|
338
416
|
/**
|
|
339
|
-
* 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
|
|
340
418
|
* Get block by height
|
|
341
419
|
*/
|
|
342
420
|
async getBlockByHeight(requestParameters: GetBlockByHeightRequest, initOverrides?: RequestInit): Promise<Block> {
|
|
@@ -380,6 +458,38 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface {
|
|
|
380
458
|
return await response.value();
|
|
381
459
|
}
|
|
382
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
|
+
|
|
383
493
|
/**
|
|
384
494
|
* Retrieves a list of recently mined blocks
|
|
385
495
|
* Get blocks
|
|
@@ -21,21 +21,11 @@ import {
|
|
|
21
21
|
NonFungibleTokenHoldingsList,
|
|
22
22
|
NonFungibleTokenHoldingsListFromJSON,
|
|
23
23
|
NonFungibleTokenHoldingsListToJSON,
|
|
24
|
-
NonFungibleTokenMetadata,
|
|
25
|
-
NonFungibleTokenMetadataFromJSON,
|
|
26
|
-
NonFungibleTokenMetadataToJSON,
|
|
27
24
|
NonFungibleTokenMintList,
|
|
28
25
|
NonFungibleTokenMintListFromJSON,
|
|
29
26
|
NonFungibleTokenMintListToJSON,
|
|
30
|
-
NonFungibleTokensMetadataList,
|
|
31
|
-
NonFungibleTokensMetadataListFromJSON,
|
|
32
|
-
NonFungibleTokensMetadataListToJSON,
|
|
33
27
|
} from '../models';
|
|
34
28
|
|
|
35
|
-
export interface GetContractNftMetadataRequest {
|
|
36
|
-
contractId: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
29
|
export interface GetNftHistoryRequest {
|
|
40
30
|
assetIdentifier: string;
|
|
41
31
|
value: string;
|
|
@@ -54,11 +44,6 @@ export interface GetNftHoldingsRequest {
|
|
|
54
44
|
txMetadata?: boolean;
|
|
55
45
|
}
|
|
56
46
|
|
|
57
|
-
export interface GetNftMetadataListRequest {
|
|
58
|
-
limit?: number;
|
|
59
|
-
offset?: number;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
47
|
export interface GetNftMintsRequest {
|
|
63
48
|
assetIdentifier: string;
|
|
64
49
|
limit?: number;
|
|
@@ -74,22 +59,6 @@ export interface GetNftMintsRequest {
|
|
|
74
59
|
* @interface NonFungibleTokensApiInterface
|
|
75
60
|
*/
|
|
76
61
|
export interface NonFungibleTokensApiInterface {
|
|
77
|
-
/**
|
|
78
|
-
* **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves metadata for non fungible tokens for a given contract id. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
|
|
79
|
-
* @summary Non fungible tokens metadata for contract ID
|
|
80
|
-
* @param {string} contractId token\'s contract id
|
|
81
|
-
* @param {*} [options] Override http request option.
|
|
82
|
-
* @throws {RequiredError}
|
|
83
|
-
* @memberof NonFungibleTokensApiInterface
|
|
84
|
-
*/
|
|
85
|
-
getContractNftMetadataRaw(requestParameters: GetContractNftMetadataRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NonFungibleTokenMetadata>>;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves metadata for non fungible tokens for a given contract id. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
|
|
89
|
-
* Non fungible tokens metadata for contract ID
|
|
90
|
-
*/
|
|
91
|
-
getContractNftMetadata(requestParameters: GetContractNftMetadataRequest, initOverrides?: RequestInit): Promise<NonFungibleTokenMetadata>;
|
|
92
|
-
|
|
93
62
|
/**
|
|
94
63
|
* Retrieves all events relevant to a Non-Fungible Token. Useful to determine the ownership history of a particular asset. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
|
|
95
64
|
* @summary Non-Fungible Token history
|
|
@@ -132,23 +101,6 @@ export interface NonFungibleTokensApiInterface {
|
|
|
132
101
|
*/
|
|
133
102
|
getNftHoldings(requestParameters: GetNftHoldingsRequest, initOverrides?: RequestInit): Promise<NonFungibleTokenHoldingsList>;
|
|
134
103
|
|
|
135
|
-
/**
|
|
136
|
-
* **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves a list of non fungible tokens with their metadata. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
|
|
137
|
-
* @summary Non fungible tokens metadata list
|
|
138
|
-
* @param {number} [limit] max number of tokens to fetch
|
|
139
|
-
* @param {number} [offset] index of first tokens to fetch
|
|
140
|
-
* @param {*} [options] Override http request option.
|
|
141
|
-
* @throws {RequiredError}
|
|
142
|
-
* @memberof NonFungibleTokensApiInterface
|
|
143
|
-
*/
|
|
144
|
-
getNftMetadataListRaw(requestParameters: GetNftMetadataListRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NonFungibleTokensMetadataList>>;
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves a list of non fungible tokens with their metadata. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
|
|
148
|
-
* Non fungible tokens metadata list
|
|
149
|
-
*/
|
|
150
|
-
getNftMetadataList(requestParameters: GetNftMetadataListRequest, initOverrides?: RequestInit): Promise<NonFungibleTokensMetadataList>;
|
|
151
|
-
|
|
152
104
|
/**
|
|
153
105
|
* Retrieves all mint events for a Non-Fungible Token asset class. Useful to determine which NFTs of a particular collection have been claimed. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
|
|
154
106
|
* @summary Non-Fungible Token mints
|
|
@@ -176,38 +128,6 @@ export interface NonFungibleTokensApiInterface {
|
|
|
176
128
|
*/
|
|
177
129
|
export class NonFungibleTokensApi extends runtime.BaseAPI implements NonFungibleTokensApiInterface {
|
|
178
130
|
|
|
179
|
-
/**
|
|
180
|
-
* **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves metadata for non fungible tokens for a given contract id. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
|
|
181
|
-
* Non fungible tokens metadata for contract ID
|
|
182
|
-
*/
|
|
183
|
-
async getContractNftMetadataRaw(requestParameters: GetContractNftMetadataRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NonFungibleTokenMetadata>> {
|
|
184
|
-
if (requestParameters.contractId === null || requestParameters.contractId === undefined) {
|
|
185
|
-
throw new runtime.RequiredError('contractId','Required parameter requestParameters.contractId was null or undefined when calling getContractNftMetadata.');
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
const queryParameters: any = {};
|
|
189
|
-
|
|
190
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
191
|
-
|
|
192
|
-
const response = await this.request({
|
|
193
|
-
path: `/extended/v1/tokens/{contractId}/nft/metadata`.replace(`{${"contractId"}}`, encodeURIComponent(String(requestParameters.contractId))),
|
|
194
|
-
method: 'GET',
|
|
195
|
-
headers: headerParameters,
|
|
196
|
-
query: queryParameters,
|
|
197
|
-
}, initOverrides);
|
|
198
|
-
|
|
199
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => NonFungibleTokenMetadataFromJSON(jsonValue));
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves metadata for non fungible tokens for a given contract id. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
|
|
204
|
-
* Non fungible tokens metadata for contract ID
|
|
205
|
-
*/
|
|
206
|
-
async getContractNftMetadata(requestParameters: GetContractNftMetadataRequest, initOverrides?: RequestInit): Promise<NonFungibleTokenMetadata> {
|
|
207
|
-
const response = await this.getContractNftMetadataRaw(requestParameters, initOverrides);
|
|
208
|
-
return await response.value();
|
|
209
|
-
}
|
|
210
|
-
|
|
211
131
|
/**
|
|
212
132
|
* Retrieves all events relevant to a Non-Fungible Token. Useful to determine the ownership history of a particular asset. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
|
|
213
133
|
* Non-Fungible Token history
|
|
@@ -324,42 +244,6 @@ export class NonFungibleTokensApi extends runtime.BaseAPI implements NonFungible
|
|
|
324
244
|
return await response.value();
|
|
325
245
|
}
|
|
326
246
|
|
|
327
|
-
/**
|
|
328
|
-
* **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves a list of non fungible tokens with their metadata. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
|
|
329
|
-
* Non fungible tokens metadata list
|
|
330
|
-
*/
|
|
331
|
-
async getNftMetadataListRaw(requestParameters: GetNftMetadataListRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NonFungibleTokensMetadataList>> {
|
|
332
|
-
const queryParameters: any = {};
|
|
333
|
-
|
|
334
|
-
if (requestParameters.limit !== undefined) {
|
|
335
|
-
queryParameters['limit'] = requestParameters.limit;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
if (requestParameters.offset !== undefined) {
|
|
339
|
-
queryParameters['offset'] = requestParameters.offset;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
343
|
-
|
|
344
|
-
const response = await this.request({
|
|
345
|
-
path: `/extended/v1/tokens/nft/metadata`,
|
|
346
|
-
method: 'GET',
|
|
347
|
-
headers: headerParameters,
|
|
348
|
-
query: queryParameters,
|
|
349
|
-
}, initOverrides);
|
|
350
|
-
|
|
351
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => NonFungibleTokensMetadataListFromJSON(jsonValue));
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves a list of non fungible tokens with their metadata. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
|
|
356
|
-
* Non fungible tokens metadata list
|
|
357
|
-
*/
|
|
358
|
-
async getNftMetadataList(requestParameters: GetNftMetadataListRequest, initOverrides?: RequestInit): Promise<NonFungibleTokensMetadataList> {
|
|
359
|
-
const response = await this.getNftMetadataListRaw(requestParameters, initOverrides);
|
|
360
|
-
return await response.value();
|
|
361
|
-
}
|
|
362
|
-
|
|
363
247
|
/**
|
|
364
248
|
* Retrieves all mint events for a Non-Fungible Token asset class. Useful to determine which NFTs of a particular collection have been claimed. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
|
|
365
249
|
* Non-Fungible Token mints
|
|
@@ -86,11 +86,11 @@ export interface NakamotoBlock {
|
|
|
86
86
|
*/
|
|
87
87
|
miner_txid: string;
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
90
|
-
* @type {
|
|
89
|
+
* Number of transactions included in the block
|
|
90
|
+
* @type {number}
|
|
91
91
|
* @memberof NakamotoBlock
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
tx_count: number;
|
|
94
94
|
/**
|
|
95
95
|
* Execution cost read count.
|
|
96
96
|
* @type {number}
|
|
@@ -144,7 +144,7 @@ export function NakamotoBlockFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
144
144
|
'burn_block_hash': json['burn_block_hash'],
|
|
145
145
|
'burn_block_height': json['burn_block_height'],
|
|
146
146
|
'miner_txid': json['miner_txid'],
|
|
147
|
-
'
|
|
147
|
+
'tx_count': json['tx_count'],
|
|
148
148
|
'execution_cost_read_count': json['execution_cost_read_count'],
|
|
149
149
|
'execution_cost_read_length': json['execution_cost_read_length'],
|
|
150
150
|
'execution_cost_runtime': json['execution_cost_runtime'],
|
|
@@ -173,7 +173,7 @@ export function NakamotoBlockToJSON(value?: NakamotoBlock | null): any {
|
|
|
173
173
|
'burn_block_hash': value.burn_block_hash,
|
|
174
174
|
'burn_block_height': value.burn_block_height,
|
|
175
175
|
'miner_txid': value.miner_txid,
|
|
176
|
-
'
|
|
176
|
+
'tx_count': value.tx_count,
|
|
177
177
|
'execution_cost_read_count': value.execution_cost_read_count,
|
|
178
178
|
'execution_cost_read_length': value.execution_cost_read_length,
|
|
179
179
|
'execution_cost_runtime': value.execution_cost_runtime,
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
export * from './AccountDataResponse';
|
|
4
4
|
export * from './AddressAssetsListResponse';
|
|
5
5
|
export * from './AddressBalanceResponse';
|
|
6
|
-
export * from './AddressNftListResponse';
|
|
7
|
-
export * from './AddressNftListResponseValue';
|
|
8
6
|
export * from './AddressNonces';
|
|
9
7
|
export * from './AddressStxInboundListResponse';
|
|
10
8
|
export * from './AddressTokenOfferingLocked';
|
|
@@ -39,8 +37,6 @@ export * from './CoreNodeInfoResponse';
|
|
|
39
37
|
export * from './CoreNodePoxResponse';
|
|
40
38
|
export * from './FeeRate';
|
|
41
39
|
export * from './FeeRateRequest';
|
|
42
|
-
export * from './FungibleTokenMetadata';
|
|
43
|
-
export * from './FungibleTokensMetadataList';
|
|
44
40
|
export * from './GetRawTransactionResult';
|
|
45
41
|
export * from './GetStxSupplyLegacyFormatResponse';
|
|
46
42
|
export * from './GetStxSupplyResponse';
|
|
@@ -63,12 +59,9 @@ export * from './NakamotoBlockListResponse';
|
|
|
63
59
|
export * from './NetworkBlockTimeResponse';
|
|
64
60
|
export * from './NetworkBlockTimesResponse';
|
|
65
61
|
export * from './NetworkIdentifier';
|
|
66
|
-
export * from './NftEvent';
|
|
67
62
|
export * from './NonFungibleTokenHistoryEventList';
|
|
68
63
|
export * from './NonFungibleTokenHoldingsList';
|
|
69
|
-
export * from './NonFungibleTokenMetadata';
|
|
70
64
|
export * from './NonFungibleTokenMintList';
|
|
71
|
-
export * from './NonFungibleTokensMetadataList';
|
|
72
65
|
export * from './OtherTransactionIdentifier';
|
|
73
66
|
export * from './PoolDelegation';
|
|
74
67
|
export * from './PoolDelegationsResponse';
|