@stacks/blockchain-api-client 7.4.0-nakamoto.8 → 7.4.0

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.
Files changed (98) hide show
  1. package/lib/generated/apis/AccountsApi.d.ts +36 -1
  2. package/lib/generated/apis/AccountsApi.js +38 -0
  3. package/lib/generated/apis/AccountsApi.js.map +1 -1
  4. package/lib/generated/apis/BlocksApi.d.ts +21 -164
  5. package/lib/generated/apis/BlocksApi.js +10 -152
  6. package/lib/generated/apis/BlocksApi.js.map +1 -1
  7. package/lib/generated/apis/FaucetsApi.d.ts +3 -5
  8. package/lib/generated/apis/FaucetsApi.js +1 -3
  9. package/lib/generated/apis/FaucetsApi.js.map +1 -1
  10. package/lib/generated/apis/FungibleTokensApi.d.ts +82 -0
  11. package/lib/generated/apis/FungibleTokensApi.js +80 -0
  12. package/lib/generated/apis/FungibleTokensApi.js.map +1 -0
  13. package/lib/generated/apis/MempoolApi.d.ts +49 -0
  14. package/lib/generated/apis/MempoolApi.js +48 -0
  15. package/lib/generated/apis/MempoolApi.js.map +1 -0
  16. package/lib/generated/apis/NonFungibleTokensApi.d.ts +57 -1
  17. package/lib/generated/apis/NonFungibleTokensApi.js +55 -0
  18. package/lib/generated/apis/NonFungibleTokensApi.js.map +1 -1
  19. package/lib/generated/apis/TransactionsApi.d.ts +2 -3
  20. package/lib/generated/apis/TransactionsApi.js +0 -1
  21. package/lib/generated/apis/TransactionsApi.js.map +1 -1
  22. package/lib/generated/apis/index.d.ts +2 -0
  23. package/lib/generated/apis/index.js +2 -0
  24. package/lib/generated/apis/index.js.map +1 -1
  25. package/lib/generated/models/AddressNftListResponse.d.ts +46 -0
  26. package/lib/generated/models/{BurnBlockListResponse.js → AddressNftListResponse.js} +11 -11
  27. package/lib/generated/models/AddressNftListResponse.js.map +1 -0
  28. package/lib/generated/models/AddressNftListResponseValue.d.ts +33 -0
  29. package/lib/generated/models/{InlineObject1.js → AddressNftListResponseValue.js} +13 -12
  30. package/lib/generated/models/AddressNftListResponseValue.js.map +1 -0
  31. package/lib/generated/models/FungibleTokenMetadata.d.ts +75 -0
  32. package/lib/generated/models/FungibleTokenMetadata.js +58 -0
  33. package/lib/generated/models/FungibleTokenMetadata.js.map +1 -0
  34. package/lib/generated/models/FungibleTokensMetadataList.d.ts +46 -0
  35. package/lib/generated/models/{NakamotoBlockListResponse.js → FungibleTokensMetadataList.js} +11 -11
  36. package/lib/generated/models/FungibleTokensMetadataList.js.map +1 -0
  37. package/lib/generated/models/InlineObject.d.ts +1 -7
  38. package/lib/generated/models/InlineObject.js +0 -2
  39. package/lib/generated/models/InlineObject.js.map +1 -1
  40. package/lib/generated/models/MempoolFeePriorities.d.ts +46 -0
  41. package/lib/generated/models/MempoolFeePriorities.js +50 -0
  42. package/lib/generated/models/MempoolFeePriorities.js.map +1 -0
  43. package/lib/generated/models/MempoolFeePrioritiesAll.d.ts +45 -0
  44. package/lib/generated/models/MempoolFeePrioritiesAll.js +48 -0
  45. package/lib/generated/models/MempoolFeePrioritiesAll.js.map +1 -0
  46. package/lib/generated/models/NftEvent.d.ts +76 -0
  47. package/lib/generated/models/NftEvent.js +60 -0
  48. package/lib/generated/models/NftEvent.js.map +1 -0
  49. package/lib/generated/models/NonFungibleTokenMetadata.d.ts +63 -0
  50. package/lib/generated/models/NonFungibleTokenMetadata.js +54 -0
  51. package/lib/generated/models/NonFungibleTokenMetadata.js.map +1 -0
  52. package/lib/generated/models/NonFungibleTokensMetadataList.d.ts +46 -0
  53. package/lib/generated/models/NonFungibleTokensMetadataList.js +49 -0
  54. package/lib/generated/models/NonFungibleTokensMetadataList.js.map +1 -0
  55. package/lib/generated/models/ServerStatusResponse.d.ts +0 -6
  56. package/lib/generated/models/ServerStatusResponse.js +0 -2
  57. package/lib/generated/models/ServerStatusResponse.js.map +1 -1
  58. package/lib/generated/models/index.d.ts +9 -5
  59. package/lib/generated/models/index.js +9 -5
  60. package/lib/generated/models/index.js.map +1 -1
  61. package/lib/index.umd.js +835 -586
  62. package/lib/index.umd.js.map +1 -1
  63. package/package.json +1 -1
  64. package/src/generated/.openapi-generator/FILES +11 -5
  65. package/src/generated/apis/AccountsApi.ts +79 -0
  66. package/src/generated/apis/BlocksApi.ts +20 -319
  67. package/src/generated/apis/FaucetsApi.ts +3 -11
  68. package/src/generated/apis/FungibleTokensApi.ts +150 -0
  69. package/src/generated/apis/MempoolApi.ts +80 -0
  70. package/src/generated/apis/NonFungibleTokensApi.ts +116 -0
  71. package/src/generated/apis/TransactionsApi.ts +2 -3
  72. package/src/generated/apis/index.ts +2 -0
  73. package/src/generated/models/{BurnBlockListResponse.ts → AddressNftListResponse.ts} +22 -22
  74. package/src/generated/models/{InlineObject1.ts → AddressNftListResponseValue.ts} +20 -12
  75. package/src/generated/models/FungibleTokenMetadata.ts +120 -0
  76. package/src/generated/models/{NakamotoBlockListResponse.ts → FungibleTokensMetadataList.ts} +22 -22
  77. package/src/generated/models/InlineObject.ts +1 -9
  78. package/src/generated/models/MempoolFeePriorities.ts +87 -0
  79. package/src/generated/models/MempoolFeePrioritiesAll.ts +80 -0
  80. package/src/generated/models/NftEvent.ts +127 -0
  81. package/src/generated/models/NonFungibleTokenMetadata.ts +104 -0
  82. package/src/generated/models/NonFungibleTokensMetadataList.ts +87 -0
  83. package/src/generated/models/ServerStatusResponse.ts +0 -8
  84. package/src/generated/models/index.ts +9 -5
  85. package/lib/generated/models/BurnBlock.d.ts +0 -51
  86. package/lib/generated/models/BurnBlock.js +0 -50
  87. package/lib/generated/models/BurnBlock.js.map +0 -1
  88. package/lib/generated/models/BurnBlockListResponse.d.ts +0 -46
  89. package/lib/generated/models/BurnBlockListResponse.js.map +0 -1
  90. package/lib/generated/models/InlineObject1.d.ts +0 -27
  91. package/lib/generated/models/InlineObject1.js.map +0 -1
  92. package/lib/generated/models/NakamotoBlock.d.ts +0 -123
  93. package/lib/generated/models/NakamotoBlock.js +0 -74
  94. package/lib/generated/models/NakamotoBlock.js.map +0 -1
  95. package/lib/generated/models/NakamotoBlockListResponse.d.ts +0 -46
  96. package/lib/generated/models/NakamotoBlockListResponse.js.map +0 -1
  97. package/src/generated/models/BurnBlock.ts +0 -88
  98. package/src/generated/models/NakamotoBlock.ts +0 -184
@@ -18,9 +18,6 @@ import {
18
18
  InlineObject,
19
19
  InlineObjectFromJSON,
20
20
  InlineObjectToJSON,
21
- InlineObject1,
22
- InlineObject1FromJSON,
23
- InlineObject1ToJSON,
24
21
  InlineResponse403,
25
22
  InlineResponse403FromJSON,
26
23
  InlineResponse403ToJSON,
@@ -31,13 +28,12 @@ import {
31
28
 
32
29
  export interface RunFaucetBtcRequest {
33
30
  address: string;
34
- inlineObject1?: InlineObject1;
31
+ inlineObject?: InlineObject;
35
32
  }
36
33
 
37
34
  export interface RunFaucetStxRequest {
38
35
  address: string;
39
36
  stacking?: boolean;
40
- inlineObject?: InlineObject;
41
37
  }
42
38
 
43
39
  /**
@@ -51,7 +47,7 @@ export interface FaucetsApiInterface {
51
47
  * Add 1 BTC token to the specified testnet BTC address. The endpoint returns the transaction ID, which you can use to view the transaction in a testnet Bitcoin block explorer. The tokens are delivered once the transaction has been included in a block. **Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.
52
48
  * @summary Add testnet BTC tokens to address
53
49
  * @param {string} address A valid testnet BTC address
54
- * @param {InlineObject1} [inlineObject1]
50
+ * @param {InlineObject} [inlineObject]
55
51
  * @param {*} [options] Override http request option.
56
52
  * @throws {RequiredError}
57
53
  * @memberof FaucetsApiInterface
@@ -69,7 +65,6 @@ export interface FaucetsApiInterface {
69
65
  * @summary Get STX testnet tokens
70
66
  * @param {string} address A valid testnet STX address
71
67
  * @param {boolean} [stacking] Request the amount of STX tokens needed for individual address stacking
72
- * @param {InlineObject} [inlineObject]
73
68
  * @param {*} [options] Override http request option.
74
69
  * @throws {RequiredError}
75
70
  * @memberof FaucetsApiInterface
@@ -113,7 +108,7 @@ export class FaucetsApi extends runtime.BaseAPI implements FaucetsApiInterface {
113
108
  method: 'POST',
114
109
  headers: headerParameters,
115
110
  query: queryParameters,
116
- body: InlineObject1ToJSON(requestParameters.inlineObject1),
111
+ body: InlineObjectToJSON(requestParameters.inlineObject),
117
112
  }, initOverrides);
118
113
 
119
114
  return new runtime.JSONApiResponse(response, (jsonValue) => RunFaucetResponseFromJSON(jsonValue));
@@ -149,14 +144,11 @@ export class FaucetsApi extends runtime.BaseAPI implements FaucetsApiInterface {
149
144
 
150
145
  const headerParameters: runtime.HTTPHeaders = {};
151
146
 
152
- headerParameters['Content-Type'] = 'application/json';
153
-
154
147
  const response = await this.request({
155
148
  path: `/extended/v1/faucets/stx`,
156
149
  method: 'POST',
157
150
  headers: headerParameters,
158
151
  query: queryParameters,
159
- body: InlineObjectToJSON(requestParameters.inlineObject),
160
152
  }, initOverrides);
161
153
 
162
154
  return new runtime.JSONApiResponse(response, (jsonValue) => RunFaucetResponseFromJSON(jsonValue));
@@ -0,0 +1,150 @@
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
+
16
+ import * as runtime from '../runtime';
17
+ import {
18
+ FungibleTokenMetadata,
19
+ FungibleTokenMetadataFromJSON,
20
+ FungibleTokenMetadataToJSON,
21
+ FungibleTokensMetadataList,
22
+ FungibleTokensMetadataListFromJSON,
23
+ FungibleTokensMetadataListToJSON,
24
+ } from '../models';
25
+
26
+ export interface GetContractFtMetadataRequest {
27
+ contractId: string;
28
+ }
29
+
30
+ export interface GetFtMetadataListRequest {
31
+ limit?: number;
32
+ offset?: number;
33
+ }
34
+
35
+ /**
36
+ * FungibleTokensApi - interface
37
+ *
38
+ * @export
39
+ * @interface FungibleTokensApiInterface
40
+ */
41
+ export interface FungibleTokensApiInterface {
42
+ /**
43
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves the metadata for fungible tokens for a given contract id
44
+ * @summary Fungible tokens metadata for contract id
45
+ * @param {string} contractId token\&#39;s contract id
46
+ * @param {*} [options] Override http request option.
47
+ * @throws {RequiredError}
48
+ * @memberof FungibleTokensApiInterface
49
+ */
50
+ getContractFtMetadataRaw(requestParameters: GetContractFtMetadataRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<FungibleTokenMetadata>>;
51
+
52
+ /**
53
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves the metadata for fungible tokens for a given contract id
54
+ * Fungible tokens metadata for contract id
55
+ */
56
+ getContractFtMetadata(requestParameters: GetContractFtMetadataRequest, initOverrides?: RequestInit): Promise<FungibleTokenMetadata>;
57
+
58
+ /**
59
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves list of fungible tokens with their metadata. More information on Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#fungible-tokens).
60
+ * @summary Fungible tokens metadata list
61
+ * @param {number} [limit] max number of tokens to fetch.
62
+ * @param {number} [offset] index of first tokens to fetch
63
+ * @param {*} [options] Override http request option.
64
+ * @throws {RequiredError}
65
+ * @memberof FungibleTokensApiInterface
66
+ */
67
+ getFtMetadataListRaw(requestParameters: GetFtMetadataListRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<FungibleTokensMetadataList>>;
68
+
69
+ /**
70
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves list of fungible tokens with their metadata. More information on Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#fungible-tokens).
71
+ * Fungible tokens metadata list
72
+ */
73
+ getFtMetadataList(requestParameters: GetFtMetadataListRequest, initOverrides?: RequestInit): Promise<FungibleTokensMetadataList>;
74
+
75
+ }
76
+
77
+ /**
78
+ *
79
+ */
80
+ export class FungibleTokensApi extends runtime.BaseAPI implements FungibleTokensApiInterface {
81
+
82
+ /**
83
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves the metadata for fungible tokens for a given contract id
84
+ * Fungible tokens metadata for contract id
85
+ */
86
+ async getContractFtMetadataRaw(requestParameters: GetContractFtMetadataRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<FungibleTokenMetadata>> {
87
+ if (requestParameters.contractId === null || requestParameters.contractId === undefined) {
88
+ throw new runtime.RequiredError('contractId','Required parameter requestParameters.contractId was null or undefined when calling getContractFtMetadata.');
89
+ }
90
+
91
+ const queryParameters: any = {};
92
+
93
+ const headerParameters: runtime.HTTPHeaders = {};
94
+
95
+ const response = await this.request({
96
+ path: `/extended/v1/tokens/{contractId}/ft/metadata`.replace(`{${"contractId"}}`, encodeURIComponent(String(requestParameters.contractId))),
97
+ method: 'GET',
98
+ headers: headerParameters,
99
+ query: queryParameters,
100
+ }, initOverrides);
101
+
102
+ return new runtime.JSONApiResponse(response, (jsonValue) => FungibleTokenMetadataFromJSON(jsonValue));
103
+ }
104
+
105
+ /**
106
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves the metadata for fungible tokens for a given contract id
107
+ * Fungible tokens metadata for contract id
108
+ */
109
+ async getContractFtMetadata(requestParameters: GetContractFtMetadataRequest, initOverrides?: RequestInit): Promise<FungibleTokenMetadata> {
110
+ const response = await this.getContractFtMetadataRaw(requestParameters, initOverrides);
111
+ return await response.value();
112
+ }
113
+
114
+ /**
115
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves list of fungible tokens with their metadata. More information on Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#fungible-tokens).
116
+ * Fungible tokens metadata list
117
+ */
118
+ async getFtMetadataListRaw(requestParameters: GetFtMetadataListRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<FungibleTokensMetadataList>> {
119
+ const queryParameters: any = {};
120
+
121
+ if (requestParameters.limit !== undefined) {
122
+ queryParameters['limit'] = requestParameters.limit;
123
+ }
124
+
125
+ if (requestParameters.offset !== undefined) {
126
+ queryParameters['offset'] = requestParameters.offset;
127
+ }
128
+
129
+ const headerParameters: runtime.HTTPHeaders = {};
130
+
131
+ const response = await this.request({
132
+ path: `/extended/v1/tokens/ft/metadata`,
133
+ method: 'GET',
134
+ headers: headerParameters,
135
+ query: queryParameters,
136
+ }, initOverrides);
137
+
138
+ return new runtime.JSONApiResponse(response, (jsonValue) => FungibleTokensMetadataListFromJSON(jsonValue));
139
+ }
140
+
141
+ /**
142
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves list of fungible tokens with their metadata. More information on Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#fungible-tokens).
143
+ * Fungible tokens metadata list
144
+ */
145
+ async getFtMetadataList(requestParameters: GetFtMetadataListRequest, initOverrides?: RequestInit): Promise<FungibleTokensMetadataList> {
146
+ const response = await this.getFtMetadataListRaw(requestParameters, initOverrides);
147
+ return await response.value();
148
+ }
149
+
150
+ }
@@ -0,0 +1,80 @@
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
+
16
+ import * as runtime from '../runtime';
17
+ import {
18
+ MempoolFeePriorities,
19
+ MempoolFeePrioritiesFromJSON,
20
+ MempoolFeePrioritiesToJSON,
21
+ } from '../models';
22
+
23
+ /**
24
+ * MempoolApi - interface
25
+ *
26
+ * @export
27
+ * @interface MempoolApiInterface
28
+ */
29
+ export interface MempoolApiInterface {
30
+ /**
31
+ * Returns estimated fee priorities (in micro-STX) for all transactions that are currently in the mempool. Also returns priorities separated by transaction type.
32
+ * @summary Get mempool transaction fee priorities
33
+ * @param {*} [options] Override http request option.
34
+ * @throws {RequiredError}
35
+ * @memberof MempoolApiInterface
36
+ */
37
+ getMempoolFeePrioritiesRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<MempoolFeePriorities>>;
38
+
39
+ /**
40
+ * Returns estimated fee priorities (in micro-STX) for all transactions that are currently in the mempool. Also returns priorities separated by transaction type.
41
+ * Get mempool transaction fee priorities
42
+ */
43
+ getMempoolFeePriorities(initOverrides?: RequestInit): Promise<MempoolFeePriorities>;
44
+
45
+ }
46
+
47
+ /**
48
+ *
49
+ */
50
+ export class MempoolApi extends runtime.BaseAPI implements MempoolApiInterface {
51
+
52
+ /**
53
+ * Returns estimated fee priorities (in micro-STX) for all transactions that are currently in the mempool. Also returns priorities separated by transaction type.
54
+ * Get mempool transaction fee priorities
55
+ */
56
+ async getMempoolFeePrioritiesRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<MempoolFeePriorities>> {
57
+ const queryParameters: any = {};
58
+
59
+ const headerParameters: runtime.HTTPHeaders = {};
60
+
61
+ const response = await this.request({
62
+ path: `/extended/v2/mempool/fees`,
63
+ method: 'GET',
64
+ headers: headerParameters,
65
+ query: queryParameters,
66
+ }, initOverrides);
67
+
68
+ return new runtime.JSONApiResponse(response, (jsonValue) => MempoolFeePrioritiesFromJSON(jsonValue));
69
+ }
70
+
71
+ /**
72
+ * Returns estimated fee priorities (in micro-STX) for all transactions that are currently in the mempool. Also returns priorities separated by transaction type.
73
+ * Get mempool transaction fee priorities
74
+ */
75
+ async getMempoolFeePriorities(initOverrides?: RequestInit): Promise<MempoolFeePriorities> {
76
+ const response = await this.getMempoolFeePrioritiesRaw(initOverrides);
77
+ return await response.value();
78
+ }
79
+
80
+ }
@@ -21,11 +21,21 @@ import {
21
21
  NonFungibleTokenHoldingsList,
22
22
  NonFungibleTokenHoldingsListFromJSON,
23
23
  NonFungibleTokenHoldingsListToJSON,
24
+ NonFungibleTokenMetadata,
25
+ NonFungibleTokenMetadataFromJSON,
26
+ NonFungibleTokenMetadataToJSON,
24
27
  NonFungibleTokenMintList,
25
28
  NonFungibleTokenMintListFromJSON,
26
29
  NonFungibleTokenMintListToJSON,
30
+ NonFungibleTokensMetadataList,
31
+ NonFungibleTokensMetadataListFromJSON,
32
+ NonFungibleTokensMetadataListToJSON,
27
33
  } from '../models';
28
34
 
35
+ export interface GetContractNftMetadataRequest {
36
+ contractId: string;
37
+ }
38
+
29
39
  export interface GetNftHistoryRequest {
30
40
  assetIdentifier: string;
31
41
  value: string;
@@ -44,6 +54,11 @@ export interface GetNftHoldingsRequest {
44
54
  txMetadata?: boolean;
45
55
  }
46
56
 
57
+ export interface GetNftMetadataListRequest {
58
+ limit?: number;
59
+ offset?: number;
60
+ }
61
+
47
62
  export interface GetNftMintsRequest {
48
63
  assetIdentifier: string;
49
64
  limit?: number;
@@ -59,6 +74,22 @@ export interface GetNftMintsRequest {
59
74
  * @interface NonFungibleTokensApiInterface
60
75
  */
61
76
  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\&#39;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
+
62
93
  /**
63
94
  * 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).
64
95
  * @summary Non-Fungible Token history
@@ -101,6 +132,23 @@ export interface NonFungibleTokensApiInterface {
101
132
  */
102
133
  getNftHoldings(requestParameters: GetNftHoldingsRequest, initOverrides?: RequestInit): Promise<NonFungibleTokenHoldingsList>;
103
134
 
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
+
104
152
  /**
105
153
  * 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).
106
154
  * @summary Non-Fungible Token mints
@@ -128,6 +176,38 @@ export interface NonFungibleTokensApiInterface {
128
176
  */
129
177
  export class NonFungibleTokensApi extends runtime.BaseAPI implements NonFungibleTokensApiInterface {
130
178
 
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
+
131
211
  /**
132
212
  * 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).
133
213
  * Non-Fungible Token history
@@ -244,6 +324,42 @@ export class NonFungibleTokensApi extends runtime.BaseAPI implements NonFungible
244
324
  return await response.value();
245
325
  }
246
326
 
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
+
247
363
  /**
248
364
  * 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).
249
365
  * 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' | 'tenure_change'>} [type] Filter by transaction type
248
+ * @param {Array<'coinbase' | 'token_transfer' | 'smart_contract' | 'contract_call' | 'poison_microblock'>} [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,6 +851,5 @@ 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',
855
- tenure_change = 'tenure_change'
854
+ poison_microblock = 'poison_microblock'
856
855
  }
@@ -4,7 +4,9 @@ export * from './AccountsApi';
4
4
  export * from './BlocksApi';
5
5
  export * from './FaucetsApi';
6
6
  export * from './FeesApi';
7
+ export * from './FungibleTokensApi';
7
8
  export * from './InfoApi';
9
+ export * from './MempoolApi';
8
10
  export * from './MicroblocksApi';
9
11
  export * from './NamesApi';
10
12
  export * from './NonFungibleTokensApi';
@@ -14,49 +14,49 @@
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
16
  import {
17
- BurnBlock,
18
- BurnBlockFromJSON,
19
- BurnBlockFromJSONTyped,
20
- BurnBlockToJSON,
17
+ NftEvent,
18
+ NftEventFromJSON,
19
+ NftEventFromJSONTyped,
20
+ NftEventToJSON,
21
21
  } from './';
22
22
 
23
23
  /**
24
- * GET request that returns burn blocks
24
+ *
25
25
  * @export
26
- * @interface BurnBlockListResponse
26
+ * @interface AddressNftListResponse
27
27
  */
28
- export interface BurnBlockListResponse {
28
+ export interface AddressNftListResponse {
29
29
  /**
30
- * The number of burn blocks to return
30
+ *
31
31
  * @type {number}
32
- * @memberof BurnBlockListResponse
32
+ * @memberof AddressNftListResponse
33
33
  */
34
34
  limit: number;
35
35
  /**
36
- * The number to burn blocks to skip (starting at `0`)
36
+ *
37
37
  * @type {number}
38
- * @memberof BurnBlockListResponse
38
+ * @memberof AddressNftListResponse
39
39
  */
40
40
  offset: number;
41
41
  /**
42
- * The number of burn blocks available (regardless of filter parameters)
42
+ *
43
43
  * @type {number}
44
- * @memberof BurnBlockListResponse
44
+ * @memberof AddressNftListResponse
45
45
  */
46
46
  total: number;
47
47
  /**
48
48
  *
49
- * @type {Array<BurnBlock>}
50
- * @memberof BurnBlockListResponse
49
+ * @type {Array<NftEvent>}
50
+ * @memberof AddressNftListResponse
51
51
  */
52
- results: Array<BurnBlock>;
52
+ nft_events: Array<NftEvent>;
53
53
  }
54
54
 
55
- export function BurnBlockListResponseFromJSON(json: any): BurnBlockListResponse {
56
- return BurnBlockListResponseFromJSONTyped(json, false);
55
+ export function AddressNftListResponseFromJSON(json: any): AddressNftListResponse {
56
+ return AddressNftListResponseFromJSONTyped(json, false);
57
57
  }
58
58
 
59
- export function BurnBlockListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BurnBlockListResponse {
59
+ export function AddressNftListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddressNftListResponse {
60
60
  if ((json === undefined) || (json === null)) {
61
61
  return json;
62
62
  }
@@ -65,11 +65,11 @@ export function BurnBlockListResponseFromJSONTyped(json: any, ignoreDiscriminato
65
65
  'limit': json['limit'],
66
66
  'offset': json['offset'],
67
67
  'total': json['total'],
68
- 'results': ((json['results'] as Array<any>).map(BurnBlockFromJSON)),
68
+ 'nft_events': ((json['nft_events'] as Array<any>).map(NftEventFromJSON)),
69
69
  };
70
70
  }
71
71
 
72
- export function BurnBlockListResponseToJSON(value?: BurnBlockListResponse | null): any {
72
+ export function AddressNftListResponseToJSON(value?: AddressNftListResponse | null): any {
73
73
  if (value === undefined) {
74
74
  return undefined;
75
75
  }
@@ -81,7 +81,7 @@ export function BurnBlockListResponseToJSON(value?: BurnBlockListResponse | null
81
81
  'limit': value.limit,
82
82
  'offset': value.offset,
83
83
  'total': value.total,
84
- 'results': ((value.results as Array<any>).map(BurnBlockToJSON)),
84
+ 'nft_events': ((value.nft_events as Array<any>).map(NftEventToJSON)),
85
85
  };
86
86
  }
87
87
 
@@ -14,34 +14,41 @@
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
16
  /**
17
- *
17
+ * Identifier of the NFT
18
18
  * @export
19
- * @interface InlineObject1
19
+ * @interface AddressNftListResponseValue
20
20
  */
21
- export interface InlineObject1 {
21
+ export interface AddressNftListResponseValue {
22
+ /**
23
+ * Hex string representing the identifier of the NFT
24
+ * @type {string}
25
+ * @memberof AddressNftListResponseValue
26
+ */
27
+ hex: string;
22
28
  /**
23
- * BTC testnet address
29
+ * Readable string of the NFT identifier
24
30
  * @type {string}
25
- * @memberof InlineObject1
31
+ * @memberof AddressNftListResponseValue
26
32
  */
27
- address?: string;
33
+ repr: string;
28
34
  }
29
35
 
30
- export function InlineObject1FromJSON(json: any): InlineObject1 {
31
- return InlineObject1FromJSONTyped(json, false);
36
+ export function AddressNftListResponseValueFromJSON(json: any): AddressNftListResponseValue {
37
+ return AddressNftListResponseValueFromJSONTyped(json, false);
32
38
  }
33
39
 
34
- export function InlineObject1FromJSONTyped(json: any, ignoreDiscriminator: boolean): InlineObject1 {
40
+ export function AddressNftListResponseValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddressNftListResponseValue {
35
41
  if ((json === undefined) || (json === null)) {
36
42
  return json;
37
43
  }
38
44
  return {
39
45
 
40
- 'address': !exists(json, 'address') ? undefined : json['address'],
46
+ 'hex': json['hex'],
47
+ 'repr': json['repr'],
41
48
  };
42
49
  }
43
50
 
44
- export function InlineObject1ToJSON(value?: InlineObject1 | null): any {
51
+ export function AddressNftListResponseValueToJSON(value?: AddressNftListResponseValue | null): any {
45
52
  if (value === undefined) {
46
53
  return undefined;
47
54
  }
@@ -50,7 +57,8 @@ export function InlineObject1ToJSON(value?: InlineObject1 | null): any {
50
57
  }
51
58
  return {
52
59
 
53
- 'address': value.address,
60
+ 'hex': value.hex,
61
+ 'repr': value.repr,
54
62
  };
55
63
  }
56
64