@stacks/blockchain-api-client 7.4.0-nakamoto.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/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/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 +4 -7
- package/lib/generated/models/index.js +4 -7
- package/lib/generated/models/index.js.map +1 -1
- package/lib/index.umd.js +533 -671
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/.openapi-generator/FILES +4 -8
- package/src/generated/apis/AccountsApi.ts +0 -79
- package/src/generated/apis/BlocksApi.ts +319 -20
- 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/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 +4 -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 +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.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/AddressNftListResponseValue.ts +0 -64
- 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
|
@@ -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
|
|
@@ -245,7 +245,7 @@ export interface TransactionsApiInterface {
|
|
|
245
245
|
* @summary Get recent transactions
|
|
246
246
|
* @param {number} [limit] max number of transactions to fetch
|
|
247
247
|
* @param {number} [offset] index of first transaction to fetch
|
|
248
|
-
* @param {Array<'coinbase' | 'token_transfer' | 'smart_contract' | 'contract_call' | 'poison_microblock'>} [type] Filter by transaction type
|
|
248
|
+
* @param {Array<'coinbase' | 'token_transfer' | 'smart_contract' | 'contract_call' | 'poison_microblock' | 'tenure_change'>} [type] Filter by transaction type
|
|
249
249
|
* @param {boolean} [unanchored] Include transaction data from unanchored (i.e. unconfirmed) microblocks
|
|
250
250
|
* @param {*} [options] Override http request option.
|
|
251
251
|
* @throws {RequiredError}
|
|
@@ -851,5 +851,6 @@ export enum GetTransactionListTypeEnum {
|
|
|
851
851
|
token_transfer = 'token_transfer',
|
|
852
852
|
smart_contract = 'smart_contract',
|
|
853
853
|
contract_call = 'contract_call',
|
|
854
|
-
poison_microblock = 'poison_microblock'
|
|
854
|
+
poison_microblock = 'poison_microblock',
|
|
855
|
+
tenure_change = 'tenure_change'
|
|
855
856
|
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Stacks Blockchain API
|
|
5
|
+
* 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>
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: STACKS_API_VERSION
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* A burn block
|
|
18
|
+
* @export
|
|
19
|
+
* @interface BurnBlock
|
|
20
|
+
*/
|
|
21
|
+
export interface BurnBlock {
|
|
22
|
+
/**
|
|
23
|
+
* Unix timestamp (in seconds) indicating when this block was mined.
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof BurnBlock
|
|
26
|
+
*/
|
|
27
|
+
burn_block_time: number;
|
|
28
|
+
/**
|
|
29
|
+
* An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof BurnBlock
|
|
32
|
+
*/
|
|
33
|
+
burn_block_time_iso: string;
|
|
34
|
+
/**
|
|
35
|
+
* Hash of the anchor chain block
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof BurnBlock
|
|
38
|
+
*/
|
|
39
|
+
burn_block_hash: string;
|
|
40
|
+
/**
|
|
41
|
+
* Height of the anchor chain block
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof BurnBlock
|
|
44
|
+
*/
|
|
45
|
+
burn_block_height: number;
|
|
46
|
+
/**
|
|
47
|
+
* Hashes of the Stacks blocks included in the burn block
|
|
48
|
+
* @type {Array<string>}
|
|
49
|
+
* @memberof BurnBlock
|
|
50
|
+
*/
|
|
51
|
+
stacks_blocks: Array<string>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function BurnBlockFromJSON(json: any): BurnBlock {
|
|
55
|
+
return BurnBlockFromJSONTyped(json, false);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function BurnBlockFromJSONTyped(json: any, ignoreDiscriminator: boolean): BurnBlock {
|
|
59
|
+
if ((json === undefined) || (json === null)) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
|
|
64
|
+
'burn_block_time': json['burn_block_time'],
|
|
65
|
+
'burn_block_time_iso': json['burn_block_time_iso'],
|
|
66
|
+
'burn_block_hash': json['burn_block_hash'],
|
|
67
|
+
'burn_block_height': json['burn_block_height'],
|
|
68
|
+
'stacks_blocks': json['stacks_blocks'],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function BurnBlockToJSON(value?: BurnBlock | null): any {
|
|
73
|
+
if (value === undefined) {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
if (value === null) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'burn_block_time': value.burn_block_time,
|
|
82
|
+
'burn_block_time_iso': value.burn_block_time_iso,
|
|
83
|
+
'burn_block_hash': value.burn_block_hash,
|
|
84
|
+
'burn_block_height': value.burn_block_height,
|
|
85
|
+
'stacks_blocks': value.stacks_blocks,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -14,49 +14,49 @@
|
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
16
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
BurnBlock,
|
|
18
|
+
BurnBlockFromJSON,
|
|
19
|
+
BurnBlockFromJSONTyped,
|
|
20
|
+
BurnBlockToJSON,
|
|
21
21
|
} from './';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* GET request that returns burn blocks
|
|
25
25
|
* @export
|
|
26
|
-
* @interface
|
|
26
|
+
* @interface BurnBlockListResponse
|
|
27
27
|
*/
|
|
28
|
-
export interface
|
|
28
|
+
export interface BurnBlockListResponse {
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* The number of burn blocks to return
|
|
31
31
|
* @type {number}
|
|
32
|
-
* @memberof
|
|
32
|
+
* @memberof BurnBlockListResponse
|
|
33
33
|
*/
|
|
34
34
|
limit: number;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* The number to burn blocks to skip (starting at `0`)
|
|
37
37
|
* @type {number}
|
|
38
|
-
* @memberof
|
|
38
|
+
* @memberof BurnBlockListResponse
|
|
39
39
|
*/
|
|
40
40
|
offset: number;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* The number of burn blocks available (regardless of filter parameters)
|
|
43
43
|
* @type {number}
|
|
44
|
-
* @memberof
|
|
44
|
+
* @memberof BurnBlockListResponse
|
|
45
45
|
*/
|
|
46
46
|
total: number;
|
|
47
47
|
/**
|
|
48
48
|
*
|
|
49
|
-
* @type {Array<
|
|
50
|
-
* @memberof
|
|
49
|
+
* @type {Array<BurnBlock>}
|
|
50
|
+
* @memberof BurnBlockListResponse
|
|
51
51
|
*/
|
|
52
|
-
|
|
52
|
+
results: Array<BurnBlock>;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
export function
|
|
56
|
-
return
|
|
55
|
+
export function BurnBlockListResponseFromJSON(json: any): BurnBlockListResponse {
|
|
56
|
+
return BurnBlockListResponseFromJSONTyped(json, false);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
export function
|
|
59
|
+
export function BurnBlockListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BurnBlockListResponse {
|
|
60
60
|
if ((json === undefined) || (json === null)) {
|
|
61
61
|
return json;
|
|
62
62
|
}
|
|
@@ -65,11 +65,11 @@ export function AddressNftListResponseFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
65
65
|
'limit': json['limit'],
|
|
66
66
|
'offset': json['offset'],
|
|
67
67
|
'total': json['total'],
|
|
68
|
-
'
|
|
68
|
+
'results': ((json['results'] as Array<any>).map(BurnBlockFromJSON)),
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
export function
|
|
72
|
+
export function BurnBlockListResponseToJSON(value?: BurnBlockListResponse | null): any {
|
|
73
73
|
if (value === undefined) {
|
|
74
74
|
return undefined;
|
|
75
75
|
}
|
|
@@ -81,7 +81,7 @@ export function AddressNftListResponseToJSON(value?: AddressNftListResponse | nu
|
|
|
81
81
|
'limit': value.limit,
|
|
82
82
|
'offset': value.offset,
|
|
83
83
|
'total': value.total,
|
|
84
|
-
'
|
|
84
|
+
'results': ((value.results as Array<any>).map(BurnBlockToJSON)),
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Stacks Blockchain API
|
|
5
|
+
* 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>
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: STACKS_API_VERSION
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* A block
|
|
18
|
+
* @export
|
|
19
|
+
* @interface NakamotoBlock
|
|
20
|
+
*/
|
|
21
|
+
export interface NakamotoBlock {
|
|
22
|
+
/**
|
|
23
|
+
* Set to `true` if block corresponds to the canonical chain tip
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @memberof NakamotoBlock
|
|
26
|
+
*/
|
|
27
|
+
canonical: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Height of the block
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof NakamotoBlock
|
|
32
|
+
*/
|
|
33
|
+
height: number;
|
|
34
|
+
/**
|
|
35
|
+
* Hash representing the block
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof NakamotoBlock
|
|
38
|
+
*/
|
|
39
|
+
hash: string;
|
|
40
|
+
/**
|
|
41
|
+
* The only hash that can uniquely identify an anchored block or an unconfirmed state trie
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof NakamotoBlock
|
|
44
|
+
*/
|
|
45
|
+
index_block_hash: string;
|
|
46
|
+
/**
|
|
47
|
+
* Hash of the parent block
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof NakamotoBlock
|
|
50
|
+
*/
|
|
51
|
+
parent_block_hash: string;
|
|
52
|
+
/**
|
|
53
|
+
* Index block hash of the parent block
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof NakamotoBlock
|
|
56
|
+
*/
|
|
57
|
+
parent_index_block_hash: string;
|
|
58
|
+
/**
|
|
59
|
+
* Unix timestamp (in seconds) indicating when this block was mined.
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof NakamotoBlock
|
|
62
|
+
*/
|
|
63
|
+
burn_block_time: number;
|
|
64
|
+
/**
|
|
65
|
+
* An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined.
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof NakamotoBlock
|
|
68
|
+
*/
|
|
69
|
+
burn_block_time_iso: string;
|
|
70
|
+
/**
|
|
71
|
+
* Hash of the anchor chain block
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof NakamotoBlock
|
|
74
|
+
*/
|
|
75
|
+
burn_block_hash: string;
|
|
76
|
+
/**
|
|
77
|
+
* Height of the anchor chain block
|
|
78
|
+
* @type {number}
|
|
79
|
+
* @memberof NakamotoBlock
|
|
80
|
+
*/
|
|
81
|
+
burn_block_height: number;
|
|
82
|
+
/**
|
|
83
|
+
* Anchor chain transaction ID
|
|
84
|
+
* @type {string}
|
|
85
|
+
* @memberof NakamotoBlock
|
|
86
|
+
*/
|
|
87
|
+
miner_txid: string;
|
|
88
|
+
/**
|
|
89
|
+
* Number of transactions included in the block
|
|
90
|
+
* @type {number}
|
|
91
|
+
* @memberof NakamotoBlock
|
|
92
|
+
*/
|
|
93
|
+
tx_count: number;
|
|
94
|
+
/**
|
|
95
|
+
* Execution cost read count.
|
|
96
|
+
* @type {number}
|
|
97
|
+
* @memberof NakamotoBlock
|
|
98
|
+
*/
|
|
99
|
+
execution_cost_read_count: number;
|
|
100
|
+
/**
|
|
101
|
+
* Execution cost read length.
|
|
102
|
+
* @type {number}
|
|
103
|
+
* @memberof NakamotoBlock
|
|
104
|
+
*/
|
|
105
|
+
execution_cost_read_length: number;
|
|
106
|
+
/**
|
|
107
|
+
* Execution cost runtime.
|
|
108
|
+
* @type {number}
|
|
109
|
+
* @memberof NakamotoBlock
|
|
110
|
+
*/
|
|
111
|
+
execution_cost_runtime: number;
|
|
112
|
+
/**
|
|
113
|
+
* Execution cost write count.
|
|
114
|
+
* @type {number}
|
|
115
|
+
* @memberof NakamotoBlock
|
|
116
|
+
*/
|
|
117
|
+
execution_cost_write_count: number;
|
|
118
|
+
/**
|
|
119
|
+
* Execution cost write length.
|
|
120
|
+
* @type {number}
|
|
121
|
+
* @memberof NakamotoBlock
|
|
122
|
+
*/
|
|
123
|
+
execution_cost_write_length: number;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function NakamotoBlockFromJSON(json: any): NakamotoBlock {
|
|
127
|
+
return NakamotoBlockFromJSONTyped(json, false);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function NakamotoBlockFromJSONTyped(json: any, ignoreDiscriminator: boolean): NakamotoBlock {
|
|
131
|
+
if ((json === undefined) || (json === null)) {
|
|
132
|
+
return json;
|
|
133
|
+
}
|
|
134
|
+
return {
|
|
135
|
+
|
|
136
|
+
'canonical': json['canonical'],
|
|
137
|
+
'height': json['height'],
|
|
138
|
+
'hash': json['hash'],
|
|
139
|
+
'index_block_hash': json['index_block_hash'],
|
|
140
|
+
'parent_block_hash': json['parent_block_hash'],
|
|
141
|
+
'parent_index_block_hash': json['parent_index_block_hash'],
|
|
142
|
+
'burn_block_time': json['burn_block_time'],
|
|
143
|
+
'burn_block_time_iso': json['burn_block_time_iso'],
|
|
144
|
+
'burn_block_hash': json['burn_block_hash'],
|
|
145
|
+
'burn_block_height': json['burn_block_height'],
|
|
146
|
+
'miner_txid': json['miner_txid'],
|
|
147
|
+
'tx_count': json['tx_count'],
|
|
148
|
+
'execution_cost_read_count': json['execution_cost_read_count'],
|
|
149
|
+
'execution_cost_read_length': json['execution_cost_read_length'],
|
|
150
|
+
'execution_cost_runtime': json['execution_cost_runtime'],
|
|
151
|
+
'execution_cost_write_count': json['execution_cost_write_count'],
|
|
152
|
+
'execution_cost_write_length': json['execution_cost_write_length'],
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function NakamotoBlockToJSON(value?: NakamotoBlock | null): any {
|
|
157
|
+
if (value === undefined) {
|
|
158
|
+
return undefined;
|
|
159
|
+
}
|
|
160
|
+
if (value === null) {
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
return {
|
|
164
|
+
|
|
165
|
+
'canonical': value.canonical,
|
|
166
|
+
'height': value.height,
|
|
167
|
+
'hash': value.hash,
|
|
168
|
+
'index_block_hash': value.index_block_hash,
|
|
169
|
+
'parent_block_hash': value.parent_block_hash,
|
|
170
|
+
'parent_index_block_hash': value.parent_index_block_hash,
|
|
171
|
+
'burn_block_time': value.burn_block_time,
|
|
172
|
+
'burn_block_time_iso': value.burn_block_time_iso,
|
|
173
|
+
'burn_block_hash': value.burn_block_hash,
|
|
174
|
+
'burn_block_height': value.burn_block_height,
|
|
175
|
+
'miner_txid': value.miner_txid,
|
|
176
|
+
'tx_count': value.tx_count,
|
|
177
|
+
'execution_cost_read_count': value.execution_cost_read_count,
|
|
178
|
+
'execution_cost_read_length': value.execution_cost_read_length,
|
|
179
|
+
'execution_cost_runtime': value.execution_cost_runtime,
|
|
180
|
+
'execution_cost_write_count': value.execution_cost_write_count,
|
|
181
|
+
'execution_cost_write_length': value.execution_cost_write_length,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
@@ -14,49 +14,49 @@
|
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
16
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
NakamotoBlock,
|
|
18
|
+
NakamotoBlockFromJSON,
|
|
19
|
+
NakamotoBlockFromJSONTyped,
|
|
20
|
+
NakamotoBlockToJSON,
|
|
21
21
|
} from './';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* GET request that returns blocks
|
|
25
25
|
* @export
|
|
26
|
-
* @interface
|
|
26
|
+
* @interface NakamotoBlockListResponse
|
|
27
27
|
*/
|
|
28
|
-
export interface
|
|
28
|
+
export interface NakamotoBlockListResponse {
|
|
29
29
|
/**
|
|
30
|
-
* The number of
|
|
30
|
+
* The number of blocks to return
|
|
31
31
|
* @type {number}
|
|
32
|
-
* @memberof
|
|
32
|
+
* @memberof NakamotoBlockListResponse
|
|
33
33
|
*/
|
|
34
34
|
limit: number;
|
|
35
35
|
/**
|
|
36
|
-
* The number to
|
|
36
|
+
* The number to blocks to skip (starting at `0`)
|
|
37
37
|
* @type {number}
|
|
38
|
-
* @memberof
|
|
38
|
+
* @memberof NakamotoBlockListResponse
|
|
39
39
|
*/
|
|
40
40
|
offset: number;
|
|
41
41
|
/**
|
|
42
|
-
* The number of
|
|
42
|
+
* The number of blocks available
|
|
43
43
|
* @type {number}
|
|
44
|
-
* @memberof
|
|
44
|
+
* @memberof NakamotoBlockListResponse
|
|
45
45
|
*/
|
|
46
46
|
total: number;
|
|
47
47
|
/**
|
|
48
48
|
*
|
|
49
|
-
* @type {Array<
|
|
50
|
-
* @memberof
|
|
49
|
+
* @type {Array<NakamotoBlock>}
|
|
50
|
+
* @memberof NakamotoBlockListResponse
|
|
51
51
|
*/
|
|
52
|
-
results: Array<
|
|
52
|
+
results: Array<NakamotoBlock>;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
export function
|
|
56
|
-
return
|
|
55
|
+
export function NakamotoBlockListResponseFromJSON(json: any): NakamotoBlockListResponse {
|
|
56
|
+
return NakamotoBlockListResponseFromJSONTyped(json, false);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
export function
|
|
59
|
+
export function NakamotoBlockListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): NakamotoBlockListResponse {
|
|
60
60
|
if ((json === undefined) || (json === null)) {
|
|
61
61
|
return json;
|
|
62
62
|
}
|
|
@@ -65,11 +65,11 @@ export function FungibleTokensMetadataListFromJSONTyped(json: any, ignoreDiscrim
|
|
|
65
65
|
'limit': json['limit'],
|
|
66
66
|
'offset': json['offset'],
|
|
67
67
|
'total': json['total'],
|
|
68
|
-
'results': ((json['results'] as Array<any>).map(
|
|
68
|
+
'results': ((json['results'] as Array<any>).map(NakamotoBlockFromJSON)),
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
export function
|
|
72
|
+
export function NakamotoBlockListResponseToJSON(value?: NakamotoBlockListResponse | null): any {
|
|
73
73
|
if (value === undefined) {
|
|
74
74
|
return undefined;
|
|
75
75
|
}
|
|
@@ -81,7 +81,7 @@ export function FungibleTokensMetadataListToJSON(value?: FungibleTokensMetadataL
|
|
|
81
81
|
'limit': value.limit,
|
|
82
82
|
'offset': value.offset,
|
|
83
83
|
'total': value.total,
|
|
84
|
-
'results': ((value.results as Array<any>).map(
|
|
84
|
+
'results': ((value.results as Array<any>).map(NakamotoBlockToJSON)),
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -50,6 +50,12 @@ export interface ServerStatusResponse {
|
|
|
50
50
|
* @memberof ServerStatusResponse
|
|
51
51
|
*/
|
|
52
52
|
pox_v2_unlock_height?: number | null;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {number}
|
|
56
|
+
* @memberof ServerStatusResponse
|
|
57
|
+
*/
|
|
58
|
+
pox_v3_unlock_height?: number | null;
|
|
53
59
|
/**
|
|
54
60
|
*
|
|
55
61
|
* @type {ChainTip}
|
|
@@ -72,6 +78,7 @@ export function ServerStatusResponseFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
72
78
|
'status': json['status'],
|
|
73
79
|
'pox_v1_unlock_height': !exists(json, 'pox_v1_unlock_height') ? undefined : json['pox_v1_unlock_height'],
|
|
74
80
|
'pox_v2_unlock_height': !exists(json, 'pox_v2_unlock_height') ? undefined : json['pox_v2_unlock_height'],
|
|
81
|
+
'pox_v3_unlock_height': !exists(json, 'pox_v3_unlock_height') ? undefined : json['pox_v3_unlock_height'],
|
|
75
82
|
'chain_tip': !exists(json, 'chain_tip') ? undefined : ChainTipFromJSON(json['chain_tip']),
|
|
76
83
|
};
|
|
77
84
|
}
|
|
@@ -89,6 +96,7 @@ export function ServerStatusResponseToJSON(value?: ServerStatusResponse | null):
|
|
|
89
96
|
'status': value.status,
|
|
90
97
|
'pox_v1_unlock_height': value.pox_v1_unlock_height,
|
|
91
98
|
'pox_v2_unlock_height': value.pox_v2_unlock_height,
|
|
99
|
+
'pox_v3_unlock_height': value.pox_v3_unlock_height,
|
|
92
100
|
'chain_tip': ChainTipToJSON(value.chain_tip),
|
|
93
101
|
};
|
|
94
102
|
}
|