diff --git a/client/src/generated/.openapi-generator/FILES b/client/src/generated/.openapi-generator/FILES index 698b84bca8..4c97c34907 100644 --- a/client/src/generated/.openapi-generator/FILES +++ b/client/src/generated/.openapi-generator/FILES @@ -1,9 +1,9 @@ .openapi-generator-ignore apis/AccountsApi.ts apis/BlocksApi.ts +apis/BurnBlocksApi.ts apis/FaucetsApi.ts apis/FeesApi.ts -apis/FungibleTokensApi.ts apis/InfoApi.ts apis/MempoolApi.ts apis/MicroblocksApi.ts @@ -20,8 +20,6 @@ index.ts models/AccountDataResponse.ts models/AddressAssetsListResponse.ts models/AddressBalanceResponse.ts -models/AddressNftListResponse.ts -models/AddressNftListResponseValue.ts models/AddressNonces.ts models/AddressStxInboundListResponse.ts models/AddressTokenOfferingLocked.ts @@ -41,6 +39,8 @@ models/BnsGetNameInfoResponse.ts models/BnsGetNamePriceResponse.ts models/BnsGetNamespacePriceResponse.ts models/BnsNamesOwnByAddressResponse.ts +models/BurnBlock.ts +models/BurnBlockListResponse.ts models/BurnchainReward.ts models/BurnchainRewardListResponse.ts models/BurnchainRewardSlotHolder.ts @@ -54,8 +54,6 @@ models/CoreNodeInfoResponse.ts models/CoreNodePoxResponse.ts models/FeeRate.ts models/FeeRateRequest.ts -models/FungibleTokenMetadata.ts -models/FungibleTokensMetadataList.ts models/GetRawTransactionResult.ts models/GetStxSupplyLegacyFormatResponse.ts models/GetStxSupplyResponse.ts @@ -74,15 +72,14 @@ models/MempoolTransactionStatsResponseTxSimpleFeeAveragesTokenTransfer.ts models/MempoolTransactionStatsResponseTxTypeCounts.ts models/Microblock.ts models/MicroblockListResponse.ts +models/NakamotoBlock.ts +models/NakamotoBlockListResponse.ts models/NetworkBlockTimeResponse.ts models/NetworkBlockTimesResponse.ts models/NetworkIdentifier.ts -models/NftEvent.ts models/NonFungibleTokenHistoryEventList.ts models/NonFungibleTokenHoldingsList.ts -models/NonFungibleTokenMetadata.ts models/NonFungibleTokenMintList.ts -models/NonFungibleTokensMetadataList.ts models/OtherTransactionIdentifier.ts models/PoolDelegation.ts models/PoolDelegationsResponse.ts diff --git a/client/src/generated/apis/AccountsApi.ts b/client/src/generated/apis/AccountsApi.ts index e1120dc74a..417ba14387 100644 --- a/client/src/generated/apis/AccountsApi.ts +++ b/client/src/generated/apis/AccountsApi.ts @@ -24,9 +24,6 @@ import { AddressBalanceResponse, AddressBalanceResponseFromJSON, AddressBalanceResponseToJSON, - AddressNftListResponse, - AddressNftListResponseFromJSON, - AddressNftListResponseToJSON, AddressNonces, AddressNoncesFromJSON, AddressNoncesToJSON, @@ -73,14 +70,6 @@ export interface GetAccountInfoRequest { tip?: string; } -export interface GetAccountNftRequest { - principal: string; - limit?: number; - offset?: number; - unanchored?: boolean; - untilBlock?: string; -} - export interface GetAccountNoncesRequest { principal: string; blockHeight?: number; @@ -200,26 +189,6 @@ export interface AccountsApiInterface { */ getAccountInfo(requestParameters: GetAccountInfoRequest, initOverrides?: RequestInit): Promise; - /** - * **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. - * @summary Get nft events - * @param {string} principal Stacks address or a Contract identifier - * @param {number} [limit] number of items to return - * @param {number} [offset] number of items to skip - * @param {boolean} [unanchored] Include transaction data from unanchored (i.e. unconfirmed) microblocks - * @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. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AccountsApiInterface - */ - getAccountNftRaw(requestParameters: GetAccountNftRequest, initOverrides?: RequestInit): Promise>; - - /** - * **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. - * Get nft events - */ - getAccountNft(requestParameters: GetAccountNftRequest, initOverrides?: RequestInit): Promise; - /** * Retrieves the latest nonce values used by an account by inspecting the mempool, microblock transactions, and anchored transactions. * @summary Get the latest nonce used by an account @@ -502,54 +471,6 @@ export class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface return await response.value(); } - /** - * **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. - * Get nft events - */ - async getAccountNftRaw(requestParameters: GetAccountNftRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.principal === null || requestParameters.principal === undefined) { - throw new runtime.RequiredError('principal','Required parameter requestParameters.principal was null or undefined when calling getAccountNft.'); - } - - const queryParameters: any = {}; - - if (requestParameters.limit !== undefined) { - queryParameters['limit'] = requestParameters.limit; - } - - if (requestParameters.offset !== undefined) { - queryParameters['offset'] = requestParameters.offset; - } - - if (requestParameters.unanchored !== undefined) { - queryParameters['unanchored'] = requestParameters.unanchored; - } - - if (requestParameters.untilBlock !== undefined) { - queryParameters['until_block'] = requestParameters.untilBlock; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/extended/v1/address/{principal}/nft_events`.replace(`{${"principal"}}`, encodeURIComponent(String(requestParameters.principal))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => AddressNftListResponseFromJSON(jsonValue)); - } - - /** - * **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. - * Get nft events - */ - async getAccountNft(requestParameters: GetAccountNftRequest, initOverrides?: RequestInit): Promise { - const response = await this.getAccountNftRaw(requestParameters, initOverrides); - return await response.value(); - } - /** * Retrieves the latest nonce values used by an account by inspecting the mempool, microblock transactions, and anchored transactions. * Get the latest nonce used by an account diff --git a/client/src/generated/apis/BlocksApi.ts b/client/src/generated/apis/BlocksApi.ts index d51aa87cc3..758ea8477b 100644 --- a/client/src/generated/apis/BlocksApi.ts +++ b/client/src/generated/apis/BlocksApi.ts @@ -21,8 +21,18 @@ import { BlockListResponse, BlockListResponseFromJSON, BlockListResponseToJSON, + NakamotoBlock, + NakamotoBlockFromJSON, + NakamotoBlockToJSON, + NakamotoBlockListResponse, + NakamotoBlockListResponseFromJSON, + NakamotoBlockListResponseToJSON, } from '../models'; +export interface GetBlockRequest { + heightOrHash: number | string; +} + export interface GetBlockByBurnBlockHashRequest { burnBlockHash: string; } @@ -44,6 +54,17 @@ export interface GetBlockListRequest { offset?: number; } +export interface GetBlocksRequest { + limit?: number; + offset?: number; +} + +export interface GetBlocksByBurnBlockRequest { + heightOrHash: number | string; + limit?: number; + offset?: number; +} + /** * BlocksApi - interface * @@ -52,7 +73,23 @@ export interface GetBlockListRequest { */ export interface BlocksApiInterface { /** - * Retrieves block details of a specific block for a given burnchain block hash + * Retrieves a single block + * @summary Get block + * @param {number | string} heightOrHash filter by block height, hash, index block hash or the constant `latest` to filter for the most recent block + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BlocksApiInterface + */ + getBlockRaw(requestParameters: GetBlockRequest, initOverrides?: RequestInit): Promise>; + + /** + * Retrieves a single block + * Get block + */ + getBlock(requestParameters: GetBlockRequest, initOverrides?: RequestInit): Promise; + + /** + * **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 * @summary Get block by burnchain block hash * @param {string} burnBlockHash Hash of the burnchain block * @param {*} [options] Override http request option. @@ -62,13 +99,13 @@ export interface BlocksApiInterface { getBlockByBurnBlockHashRaw(requestParameters: GetBlockByBurnBlockHashRequest, initOverrides?: RequestInit): Promise>; /** - * Retrieves block details of a specific block for a given burnchain block hash + * **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 * Get block by burnchain block hash */ getBlockByBurnBlockHash(requestParameters: GetBlockByBurnBlockHashRequest, initOverrides?: RequestInit): Promise; /** - * Retrieves block details of a specific block for a given burn chain height + * **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves block details of a specific block for a given burn chain height * @summary Get block by burnchain height * @param {number} burnBlockHeight Height of the burn chain block * @param {*} [options] Override http request option. @@ -78,13 +115,13 @@ export interface BlocksApiInterface { getBlockByBurnBlockHeightRaw(requestParameters: GetBlockByBurnBlockHeightRequest, initOverrides?: RequestInit): Promise>; /** - * Retrieves block details of a specific block for a given burn chain height + * **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves block details of a specific block for a given burn chain height * Get block by burnchain height */ getBlockByBurnBlockHeight(requestParameters: GetBlockByBurnBlockHeightRequest, initOverrides?: RequestInit): Promise; /** - * 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. + * **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. * @summary Get block by hash * @param {string} hash Hash of the block * @param {*} [options] Override http request option. @@ -94,13 +131,13 @@ export interface BlocksApiInterface { getBlockByHashRaw(requestParameters: GetBlockByHashRequest, initOverrides?: RequestInit): Promise>; /** - * 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. + * **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. * Get block by hash */ getBlockByHash(requestParameters: GetBlockByHashRequest, initOverrides?: RequestInit): Promise; /** - * Retrieves block details of a specific block at a given block height + * **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 * @summary Get block by height * @param {number} height Height of the block * @param {*} [options] Override http request option. @@ -110,13 +147,13 @@ export interface BlocksApiInterface { getBlockByHeightRaw(requestParameters: GetBlockByHeightRequest, initOverrides?: RequestInit): Promise>; /** - * Retrieves block details of a specific block at a given block height + * **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 * Get block by height */ getBlockByHeight(requestParameters: GetBlockByHeightRequest, initOverrides?: RequestInit): Promise; /** - * Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates. + * **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates. * @summary Get recent blocks * @param {number} [limit] max number of blocks to fetch * @param {number} [offset] index of first block to fetch @@ -127,11 +164,46 @@ export interface BlocksApiInterface { getBlockListRaw(requestParameters: GetBlockListRequest, initOverrides?: RequestInit): Promise>; /** - * Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates. + * **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates. * Get recent blocks */ getBlockList(requestParameters: GetBlockListRequest, initOverrides?: RequestInit): Promise; + /** + * Retrieves a list of recently mined blocks + * @summary Get blocks + * @param {number} [limit] max number of blocks to fetch + * @param {number} [offset] index of first burn block to fetch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BlocksApiInterface + */ + getBlocksRaw(requestParameters: GetBlocksRequest, initOverrides?: RequestInit): Promise>; + + /** + * Retrieves a list of recently mined blocks + * Get blocks + */ + getBlocks(requestParameters: GetBlocksRequest, initOverrides?: RequestInit): Promise; + + /** + * Retrieves a list of blocks confirmed by a specific burn block + * @summary Get blocks by burn block + * @param {number | string} heightOrHash filter by burn block height, hash, or the constant `latest` to filter for the most recent burn block + * @param {number} [limit] max number of blocks to fetch + * @param {number} [offset] index of first burn block to fetch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BlocksApiInterface + */ + getBlocksByBurnBlockRaw(requestParameters: GetBlocksByBurnBlockRequest, initOverrides?: RequestInit): Promise>; + + /** + * Retrieves a list of blocks confirmed by a specific burn block + * Get blocks by burn block + */ + getBlocksByBurnBlock(requestParameters: GetBlocksByBurnBlockRequest, initOverrides?: RequestInit): Promise; + } /** @@ -140,7 +212,39 @@ export interface BlocksApiInterface { export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface { /** - * Retrieves block details of a specific block for a given burnchain block hash + * Retrieves a single block + * Get block + */ + async getBlockRaw(requestParameters: GetBlockRequest, initOverrides?: RequestInit): Promise> { + if (requestParameters.heightOrHash === null || requestParameters.heightOrHash === undefined) { + throw new runtime.RequiredError('heightOrHash','Required parameter requestParameters.heightOrHash was null or undefined when calling getBlock.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/extended/v2/blocks/{height_or_hash}`.replace(`{${"height_or_hash"}}`, encodeURIComponent(String(requestParameters.heightOrHash))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NakamotoBlockFromJSON(jsonValue)); + } + + /** + * Retrieves a single block + * Get block + */ + async getBlock(requestParameters: GetBlockRequest, initOverrides?: RequestInit): Promise { + const response = await this.getBlockRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * **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 * Get block by burnchain block hash */ async getBlockByBurnBlockHashRaw(requestParameters: GetBlockByBurnBlockHashRequest, initOverrides?: RequestInit): Promise> { @@ -163,7 +267,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface { } /** - * Retrieves block details of a specific block for a given burnchain block hash + * **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 * Get block by burnchain block hash */ async getBlockByBurnBlockHash(requestParameters: GetBlockByBurnBlockHashRequest, initOverrides?: RequestInit): Promise { @@ -172,7 +276,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface { } /** - * Retrieves block details of a specific block for a given burn chain height + * **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves block details of a specific block for a given burn chain height * Get block by burnchain height */ async getBlockByBurnBlockHeightRaw(requestParameters: GetBlockByBurnBlockHeightRequest, initOverrides?: RequestInit): Promise> { @@ -195,7 +299,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface { } /** - * Retrieves block details of a specific block for a given burn chain height + * **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves block details of a specific block for a given burn chain height * Get block by burnchain height */ async getBlockByBurnBlockHeight(requestParameters: GetBlockByBurnBlockHeightRequest, initOverrides?: RequestInit): Promise { @@ -204,7 +308,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface { } /** - * 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. + * **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. * Get block by hash */ async getBlockByHashRaw(requestParameters: GetBlockByHashRequest, initOverrides?: RequestInit): Promise> { @@ -227,7 +331,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface { } /** - * 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. + * **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. * Get block by hash */ async getBlockByHash(requestParameters: GetBlockByHashRequest, initOverrides?: RequestInit): Promise { @@ -236,7 +340,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface { } /** - * Retrieves block details of a specific block at a given block height + * **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 * Get block by height */ async getBlockByHeightRaw(requestParameters: GetBlockByHeightRequest, initOverrides?: RequestInit): Promise> { @@ -259,7 +363,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface { } /** - * Retrieves block details of a specific block at a given block height + * **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 * Get block by height */ async getBlockByHeight(requestParameters: GetBlockByHeightRequest, initOverrides?: RequestInit): Promise { @@ -268,7 +372,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface { } /** - * Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates. + * **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates. * Get recent blocks */ async getBlockListRaw(requestParameters: GetBlockListRequest, initOverrides?: RequestInit): Promise> { @@ -295,7 +399,7 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface { } /** - * Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates. + * **NOTE:** This endpoint is deprecated in favor of [Get blocks](#operation/get_blocks). Retrieves a list of recently mined blocks If you need to actively monitor new blocks, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates. * Get recent blocks */ async getBlockList(requestParameters: GetBlockListRequest, initOverrides?: RequestInit): Promise { @@ -303,4 +407,80 @@ export class BlocksApi extends runtime.BaseAPI implements BlocksApiInterface { return await response.value(); } + /** + * Retrieves a list of recently mined blocks + * Get blocks + */ + async getBlocksRaw(requestParameters: GetBlocksRequest, initOverrides?: RequestInit): Promise> { + const queryParameters: any = {}; + + if (requestParameters.limit !== undefined) { + queryParameters['limit'] = requestParameters.limit; + } + + if (requestParameters.offset !== undefined) { + queryParameters['offset'] = requestParameters.offset; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/extended/v2/blocks`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NakamotoBlockListResponseFromJSON(jsonValue)); + } + + /** + * Retrieves a list of recently mined blocks + * Get blocks + */ + async getBlocks(requestParameters: GetBlocksRequest, initOverrides?: RequestInit): Promise { + const response = await this.getBlocksRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves a list of blocks confirmed by a specific burn block + * Get blocks by burn block + */ + async getBlocksByBurnBlockRaw(requestParameters: GetBlocksByBurnBlockRequest, initOverrides?: RequestInit): Promise> { + if (requestParameters.heightOrHash === null || requestParameters.heightOrHash === undefined) { + throw new runtime.RequiredError('heightOrHash','Required parameter requestParameters.heightOrHash was null or undefined when calling getBlocksByBurnBlock.'); + } + + const queryParameters: any = {}; + + if (requestParameters.limit !== undefined) { + queryParameters['limit'] = requestParameters.limit; + } + + if (requestParameters.offset !== undefined) { + queryParameters['offset'] = requestParameters.offset; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/extended/v2/burn-blocks/{height_or_hash}/blocks`.replace(`{${"height_or_hash"}}`, encodeURIComponent(String(requestParameters.heightOrHash))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NakamotoBlockListResponseFromJSON(jsonValue)); + } + + /** + * Retrieves a list of blocks confirmed by a specific burn block + * Get blocks by burn block + */ + async getBlocksByBurnBlock(requestParameters: GetBlocksByBurnBlockRequest, initOverrides?: RequestInit): Promise { + const response = await this.getBlocksByBurnBlockRaw(requestParameters, initOverrides); + return await response.value(); + } + } diff --git a/client/src/generated/apis/BurnBlocksApi.ts b/client/src/generated/apis/BurnBlocksApi.ts new file mode 100644 index 0000000000..084f0238a0 --- /dev/null +++ b/client/src/generated/apis/BurnBlocksApi.ts @@ -0,0 +1,150 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Stacks Blockchain API + * Welcome to the API reference overview for the Stacks Blockchain API. Download Postman collection + * + * The version of the OpenAPI document: STACKS_API_VERSION + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import { + BurnBlock, + BurnBlockFromJSON, + BurnBlockToJSON, + BurnBlockListResponse, + BurnBlockListResponseFromJSON, + BurnBlockListResponseToJSON, +} from '../models'; + +export interface GetBurnBlockRequest { + heightOrHash: number | string; +} + +export interface GetBurnBlocksRequest { + limit?: number; + offset?: number; +} + +/** + * BurnBlocksApi - interface + * + * @export + * @interface BurnBlocksApiInterface + */ +export interface BurnBlocksApiInterface { + /** + * Retrieves a single burn block + * @summary Get burn block + * @param {number | string} heightOrHash filter by burn block height, hash, or the constant `latest` to filter for the most recent burn block + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BurnBlocksApiInterface + */ + getBurnBlockRaw(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise>; + + /** + * Retrieves a single burn block + * Get burn block + */ + getBurnBlock(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise; + + /** + * Retrieves a list of recent burn blocks + * @summary Get burn blocks + * @param {number} [limit] max number of burn blocks to fetch + * @param {number} [offset] index of first burn block to fetch + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BurnBlocksApiInterface + */ + getBurnBlocksRaw(requestParameters: GetBurnBlocksRequest, initOverrides?: RequestInit): Promise>; + + /** + * Retrieves a list of recent burn blocks + * Get burn blocks + */ + getBurnBlocks(requestParameters: GetBurnBlocksRequest, initOverrides?: RequestInit): Promise; + +} + +/** + * + */ +export class BurnBlocksApi extends runtime.BaseAPI implements BurnBlocksApiInterface { + + /** + * Retrieves a single burn block + * Get burn block + */ + async getBurnBlockRaw(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise> { + if (requestParameters.heightOrHash === null || requestParameters.heightOrHash === undefined) { + throw new runtime.RequiredError('heightOrHash','Required parameter requestParameters.heightOrHash was null or undefined when calling getBurnBlock.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/extended/v2/burn-blocks/{height_or_hash}`.replace(`{${"height_or_hash"}}`, encodeURIComponent(String(requestParameters.heightOrHash))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BurnBlockFromJSON(jsonValue)); + } + + /** + * Retrieves a single burn block + * Get burn block + */ + async getBurnBlock(requestParameters: GetBurnBlockRequest, initOverrides?: RequestInit): Promise { + const response = await this.getBurnBlockRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves a list of recent burn blocks + * Get burn blocks + */ + async getBurnBlocksRaw(requestParameters: GetBurnBlocksRequest, initOverrides?: RequestInit): Promise> { + const queryParameters: any = {}; + + if (requestParameters.limit !== undefined) { + queryParameters['limit'] = requestParameters.limit; + } + + if (requestParameters.offset !== undefined) { + queryParameters['offset'] = requestParameters.offset; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/extended/v2/burn-blocks`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BurnBlockListResponseFromJSON(jsonValue)); + } + + /** + * Retrieves a list of recent burn blocks + * Get burn blocks + */ + async getBurnBlocks(requestParameters: GetBurnBlocksRequest, initOverrides?: RequestInit): Promise { + const response = await this.getBurnBlocksRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/client/src/generated/apis/FungibleTokensApi.ts b/client/src/generated/apis/FungibleTokensApi.ts deleted file mode 100644 index b55945fee0..0000000000 --- a/client/src/generated/apis/FungibleTokensApi.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Stacks Blockchain API - * Welcome to the API reference overview for the Stacks Blockchain API. Download Postman collection - * - * The version of the OpenAPI document: STACKS_API_VERSION - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import { - FungibleTokenMetadata, - FungibleTokenMetadataFromJSON, - FungibleTokenMetadataToJSON, - FungibleTokensMetadataList, - FungibleTokensMetadataListFromJSON, - FungibleTokensMetadataListToJSON, -} from '../models'; - -export interface GetContractFtMetadataRequest { - contractId: string; -} - -export interface GetFtMetadataListRequest { - limit?: number; - offset?: number; -} - -/** - * FungibleTokensApi - interface - * - * @export - * @interface FungibleTokensApiInterface - */ -export interface FungibleTokensApiInterface { - /** - * **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 - * @summary Fungible tokens metadata for contract id - * @param {string} contractId token\'s contract id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FungibleTokensApiInterface - */ - getContractFtMetadataRaw(requestParameters: GetContractFtMetadataRequest, initOverrides?: RequestInit): Promise>; - - /** - * **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 - * Fungible tokens metadata for contract id - */ - getContractFtMetadata(requestParameters: GetContractFtMetadataRequest, initOverrides?: RequestInit): Promise; - - /** - * **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). - * @summary Fungible tokens metadata list - * @param {number} [limit] max number of tokens to fetch. - * @param {number} [offset] index of first tokens to fetch - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FungibleTokensApiInterface - */ - getFtMetadataListRaw(requestParameters: GetFtMetadataListRequest, initOverrides?: RequestInit): Promise>; - - /** - * **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). - * Fungible tokens metadata list - */ - getFtMetadataList(requestParameters: GetFtMetadataListRequest, initOverrides?: RequestInit): Promise; - -} - -/** - * - */ -export class FungibleTokensApi extends runtime.BaseAPI implements FungibleTokensApiInterface { - - /** - * **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 - * Fungible tokens metadata for contract id - */ - async getContractFtMetadataRaw(requestParameters: GetContractFtMetadataRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.contractId === null || requestParameters.contractId === undefined) { - throw new runtime.RequiredError('contractId','Required parameter requestParameters.contractId was null or undefined when calling getContractFtMetadata.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/extended/v1/tokens/{contractId}/ft/metadata`.replace(`{${"contractId"}}`, encodeURIComponent(String(requestParameters.contractId))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FungibleTokenMetadataFromJSON(jsonValue)); - } - - /** - * **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 - * Fungible tokens metadata for contract id - */ - async getContractFtMetadata(requestParameters: GetContractFtMetadataRequest, initOverrides?: RequestInit): Promise { - const response = await this.getContractFtMetadataRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * **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). - * Fungible tokens metadata list - */ - async getFtMetadataListRaw(requestParameters: GetFtMetadataListRequest, initOverrides?: RequestInit): Promise> { - const queryParameters: any = {}; - - if (requestParameters.limit !== undefined) { - queryParameters['limit'] = requestParameters.limit; - } - - if (requestParameters.offset !== undefined) { - queryParameters['offset'] = requestParameters.offset; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/extended/v1/tokens/ft/metadata`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FungibleTokensMetadataListFromJSON(jsonValue)); - } - - /** - * **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). - * Fungible tokens metadata list - */ - async getFtMetadataList(requestParameters: GetFtMetadataListRequest, initOverrides?: RequestInit): Promise { - const response = await this.getFtMetadataListRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/client/src/generated/apis/NonFungibleTokensApi.ts b/client/src/generated/apis/NonFungibleTokensApi.ts index 5313556c29..30f7994faf 100644 --- a/client/src/generated/apis/NonFungibleTokensApi.ts +++ b/client/src/generated/apis/NonFungibleTokensApi.ts @@ -21,21 +21,11 @@ import { NonFungibleTokenHoldingsList, NonFungibleTokenHoldingsListFromJSON, NonFungibleTokenHoldingsListToJSON, - NonFungibleTokenMetadata, - NonFungibleTokenMetadataFromJSON, - NonFungibleTokenMetadataToJSON, NonFungibleTokenMintList, NonFungibleTokenMintListFromJSON, NonFungibleTokenMintListToJSON, - NonFungibleTokensMetadataList, - NonFungibleTokensMetadataListFromJSON, - NonFungibleTokensMetadataListToJSON, } from '../models'; -export interface GetContractNftMetadataRequest { - contractId: string; -} - export interface GetNftHistoryRequest { assetIdentifier: string; value: string; @@ -54,11 +44,6 @@ export interface GetNftHoldingsRequest { txMetadata?: boolean; } -export interface GetNftMetadataListRequest { - limit?: number; - offset?: number; -} - export interface GetNftMintsRequest { assetIdentifier: string; limit?: number; @@ -74,22 +59,6 @@ export interface GetNftMintsRequest { * @interface NonFungibleTokensApiInterface */ export interface NonFungibleTokensApiInterface { - /** - * **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). - * @summary Non fungible tokens metadata for contract ID - * @param {string} contractId token\'s contract id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof NonFungibleTokensApiInterface - */ - getContractNftMetadataRaw(requestParameters: GetContractNftMetadataRequest, initOverrides?: RequestInit): Promise>; - - /** - * **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). - * Non fungible tokens metadata for contract ID - */ - getContractNftMetadata(requestParameters: GetContractNftMetadataRequest, initOverrides?: RequestInit): Promise; - /** * 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). * @summary Non-Fungible Token history @@ -132,23 +101,6 @@ export interface NonFungibleTokensApiInterface { */ getNftHoldings(requestParameters: GetNftHoldingsRequest, initOverrides?: RequestInit): Promise; - /** - * **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). - * @summary Non fungible tokens metadata list - * @param {number} [limit] max number of tokens to fetch - * @param {number} [offset] index of first tokens to fetch - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof NonFungibleTokensApiInterface - */ - getNftMetadataListRaw(requestParameters: GetNftMetadataListRequest, initOverrides?: RequestInit): Promise>; - - /** - * **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). - * Non fungible tokens metadata list - */ - getNftMetadataList(requestParameters: GetNftMetadataListRequest, initOverrides?: RequestInit): Promise; - /** * 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). * @summary Non-Fungible Token mints @@ -176,38 +128,6 @@ export interface NonFungibleTokensApiInterface { */ export class NonFungibleTokensApi extends runtime.BaseAPI implements NonFungibleTokensApiInterface { - /** - * **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). - * Non fungible tokens metadata for contract ID - */ - async getContractNftMetadataRaw(requestParameters: GetContractNftMetadataRequest, initOverrides?: RequestInit): Promise> { - if (requestParameters.contractId === null || requestParameters.contractId === undefined) { - throw new runtime.RequiredError('contractId','Required parameter requestParameters.contractId was null or undefined when calling getContractNftMetadata.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/extended/v1/tokens/{contractId}/nft/metadata`.replace(`{${"contractId"}}`, encodeURIComponent(String(requestParameters.contractId))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => NonFungibleTokenMetadataFromJSON(jsonValue)); - } - - /** - * **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). - * Non fungible tokens metadata for contract ID - */ - async getContractNftMetadata(requestParameters: GetContractNftMetadataRequest, initOverrides?: RequestInit): Promise { - const response = await this.getContractNftMetadataRaw(requestParameters, initOverrides); - return await response.value(); - } - /** * 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). * Non-Fungible Token history @@ -324,42 +244,6 @@ export class NonFungibleTokensApi extends runtime.BaseAPI implements NonFungible return await response.value(); } - /** - * **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). - * Non fungible tokens metadata list - */ - async getNftMetadataListRaw(requestParameters: GetNftMetadataListRequest, initOverrides?: RequestInit): Promise> { - const queryParameters: any = {}; - - if (requestParameters.limit !== undefined) { - queryParameters['limit'] = requestParameters.limit; - } - - if (requestParameters.offset !== undefined) { - queryParameters['offset'] = requestParameters.offset; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/extended/v1/tokens/nft/metadata`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => NonFungibleTokensMetadataListFromJSON(jsonValue)); - } - - /** - * **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). - * Non fungible tokens metadata list - */ - async getNftMetadataList(requestParameters: GetNftMetadataListRequest, initOverrides?: RequestInit): Promise { - const response = await this.getNftMetadataListRaw(requestParameters, initOverrides); - return await response.value(); - } - /** * 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). * Non-Fungible Token mints diff --git a/client/src/generated/apis/TransactionsApi.ts b/client/src/generated/apis/TransactionsApi.ts index 63b6fe9899..d20066ef66 100644 --- a/client/src/generated/apis/TransactionsApi.ts +++ b/client/src/generated/apis/TransactionsApi.ts @@ -59,6 +59,8 @@ export interface GetMempoolTransactionListRequest { senderAddress?: string; recipientAddress?: string; address?: string; + orderBy?: GetMempoolTransactionListOrderByEnum; + order?: GetMempoolTransactionListOrderEnum; limit?: number; offset?: number; unanchored?: boolean; @@ -82,6 +84,10 @@ export interface GetTransactionListRequest { unanchored?: boolean; } +export interface GetTransactionsByBlockRequest { + heightOrHash: number | string; +} + export interface GetTransactionsByBlockHashRequest { blockHash: string; limit?: number; @@ -175,6 +181,8 @@ export interface TransactionsApiInterface { * @param {string} [senderAddress] Filter to only return transactions with this sender address. * @param {string} [recipientAddress] Filter to only return transactions with this recipient address (only applicable for STX transfer tx types). * @param {string} [address] Filter to only return transactions with this address as the sender or recipient (recipient only applicable for STX transfer tx types). + * @param {'age' | 'size' | 'fee'} [orderBy] Option to sort results by transaction age, size, or fee rate. + * @param {'asc' | 'desc'} [order] Option to sort results in ascending or descending order. * @param {number} [limit] max number of mempool transactions to fetch * @param {number} [offset] index of first mempool transaction to fetch * @param {boolean} [unanchored] Include transaction data from unanchored (i.e. unconfirmed) microblocks @@ -245,7 +253,7 @@ export interface TransactionsApiInterface { * @summary Get recent transactions * @param {number} [limit] max number of transactions to fetch * @param {number} [offset] index of first transaction to fetch - * @param {Array<'coinbase' | 'token_transfer' | 'smart_contract' | 'contract_call' | 'poison_microblock'>} [type] Filter by transaction type + * @param {Array<'coinbase' | 'token_transfer' | 'smart_contract' | 'contract_call' | 'poison_microblock' | 'tenure_change'>} [type] Filter by transaction type * @param {boolean} [unanchored] Include transaction data from unanchored (i.e. unconfirmed) microblocks * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -260,7 +268,23 @@ export interface TransactionsApiInterface { getTransactionList(requestParameters: GetTransactionListRequest, initOverrides?: RequestInit): Promise; /** - * Retrieves a list of all transactions within a block for a given block hash. + * Retrieves transactions confirmed in a single block + * @summary Get transactions by block + * @param {number | string} heightOrHash filter by block height, hash, index block hash or the constant `latest` to filter for the most recent block + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionsApiInterface + */ + getTransactionsByBlockRaw(requestParameters: GetTransactionsByBlockRequest, initOverrides?: RequestInit): Promise>; + + /** + * Retrieves transactions confirmed in a single block + * Get transactions by block + */ + getTransactionsByBlock(requestParameters: GetTransactionsByBlockRequest, initOverrides?: RequestInit): Promise; + + /** + * **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves a list of all transactions within a block for a given block hash. * @summary Transactions by block hash * @param {string} blockHash Hash of block * @param {number} [limit] max number of transactions to fetch @@ -272,13 +296,13 @@ export interface TransactionsApiInterface { getTransactionsByBlockHashRaw(requestParameters: GetTransactionsByBlockHashRequest, initOverrides?: RequestInit): Promise>; /** - * Retrieves a list of all transactions within a block for a given block hash. + * **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves a list of all transactions within a block for a given block hash. * Transactions by block hash */ getTransactionsByBlockHash(requestParameters: GetTransactionsByBlockHashRequest, initOverrides?: RequestInit): Promise; /** - * Retrieves all transactions within a block at a given height + * **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves all transactions within a block at a given height * @summary Transactions by block height * @param {number} height Height of block * @param {number} [limit] max number of transactions to fetch @@ -291,7 +315,7 @@ export interface TransactionsApiInterface { getTransactionsByBlockHeightRaw(requestParameters: GetTransactionsByBlockHeightRequest, initOverrides?: RequestInit): Promise>; /** - * Retrieves all transactions within a block at a given height + * **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves all transactions within a block at a given height * Transactions by block height */ getTransactionsByBlockHeight(requestParameters: GetTransactionsByBlockHeightRequest, initOverrides?: RequestInit): Promise; @@ -485,6 +509,14 @@ export class TransactionsApi extends runtime.BaseAPI implements TransactionsApiI queryParameters['address'] = requestParameters.address; } + if (requestParameters.orderBy !== undefined) { + queryParameters['order_by'] = requestParameters.orderBy; + } + + if (requestParameters.order !== undefined) { + queryParameters['order'] = requestParameters.order; + } + if (requestParameters.limit !== undefined) { queryParameters['limit'] = requestParameters.limit; } @@ -667,7 +699,39 @@ export class TransactionsApi extends runtime.BaseAPI implements TransactionsApiI } /** - * Retrieves a list of all transactions within a block for a given block hash. + * Retrieves transactions confirmed in a single block + * Get transactions by block + */ + async getTransactionsByBlockRaw(requestParameters: GetTransactionsByBlockRequest, initOverrides?: RequestInit): Promise> { + if (requestParameters.heightOrHash === null || requestParameters.heightOrHash === undefined) { + throw new runtime.RequiredError('heightOrHash','Required parameter requestParameters.heightOrHash was null or undefined when calling getTransactionsByBlock.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/extended/v2/blocks/{height_or_hash}/transactions`.replace(`{${"height_or_hash"}}`, encodeURIComponent(String(requestParameters.heightOrHash))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TransactionResultsFromJSON(jsonValue)); + } + + /** + * Retrieves transactions confirmed in a single block + * Get transactions by block + */ + async getTransactionsByBlock(requestParameters: GetTransactionsByBlockRequest, initOverrides?: RequestInit): Promise { + const response = await this.getTransactionsByBlockRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves a list of all transactions within a block for a given block hash. * Transactions by block hash */ async getTransactionsByBlockHashRaw(requestParameters: GetTransactionsByBlockHashRequest, initOverrides?: RequestInit): Promise> { @@ -698,7 +762,7 @@ export class TransactionsApi extends runtime.BaseAPI implements TransactionsApiI } /** - * Retrieves a list of all transactions within a block for a given block hash. + * **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves a list of all transactions within a block for a given block hash. * Transactions by block hash */ async getTransactionsByBlockHash(requestParameters: GetTransactionsByBlockHashRequest, initOverrides?: RequestInit): Promise { @@ -707,7 +771,7 @@ export class TransactionsApi extends runtime.BaseAPI implements TransactionsApiI } /** - * Retrieves all transactions within a block at a given height + * **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves all transactions within a block at a given height * Transactions by block height */ async getTransactionsByBlockHeightRaw(requestParameters: GetTransactionsByBlockHeightRequest, initOverrides?: RequestInit): Promise> { @@ -742,7 +806,7 @@ export class TransactionsApi extends runtime.BaseAPI implements TransactionsApiI } /** - * Retrieves all transactions within a block at a given height + * **NOTE:** This endpoint is deprecated in favor of [Get transactions by block](#operation/get_transactions_by_block). Retrieves all transactions within a block at a given height * Transactions by block height */ async getTransactionsByBlockHeight(requestParameters: GetTransactionsByBlockHeightRequest, initOverrides?: RequestInit): Promise { @@ -842,6 +906,23 @@ export enum GetFilteredEventsTypeEnum { fungible_token_asset = 'fungible_token_asset', non_fungible_token_asset = 'non_fungible_token_asset' } +/** + * @export + * @enum {string} + */ +export enum GetMempoolTransactionListOrderByEnum { + age = 'age', + size = 'size', + fee = 'fee' +} +/** + * @export + * @enum {string} + */ +export enum GetMempoolTransactionListOrderEnum { + asc = 'asc', + desc = 'desc' +} /** * @export * @enum {string} @@ -851,5 +932,6 @@ export enum GetTransactionListTypeEnum { token_transfer = 'token_transfer', smart_contract = 'smart_contract', contract_call = 'contract_call', - poison_microblock = 'poison_microblock' + poison_microblock = 'poison_microblock', + tenure_change = 'tenure_change' } diff --git a/client/src/generated/apis/index.ts b/client/src/generated/apis/index.ts index 11ee668eae..9519bc40c9 100644 --- a/client/src/generated/apis/index.ts +++ b/client/src/generated/apis/index.ts @@ -2,9 +2,9 @@ /* eslint-disable */ export * from './AccountsApi'; export * from './BlocksApi'; +export * from './BurnBlocksApi'; export * from './FaucetsApi'; export * from './FeesApi'; -export * from './FungibleTokensApi'; export * from './InfoApi'; export * from './MempoolApi'; export * from './MicroblocksApi'; diff --git a/client/src/generated/models/AddressNftListResponseValue.ts b/client/src/generated/models/AddressNftListResponseValue.ts deleted file mode 100644 index a326400dd7..0000000000 --- a/client/src/generated/models/AddressNftListResponseValue.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Stacks Blockchain API - * Welcome to the API reference overview for the Stacks Blockchain API. Download Postman collection - * - * The version of the OpenAPI document: STACKS_API_VERSION - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * Identifier of the NFT - * @export - * @interface AddressNftListResponseValue - */ -export interface AddressNftListResponseValue { - /** - * Hex string representing the identifier of the NFT - * @type {string} - * @memberof AddressNftListResponseValue - */ - hex: string; - /** - * Readable string of the NFT identifier - * @type {string} - * @memberof AddressNftListResponseValue - */ - repr: string; -} - -export function AddressNftListResponseValueFromJSON(json: any): AddressNftListResponseValue { - return AddressNftListResponseValueFromJSONTyped(json, false); -} - -export function AddressNftListResponseValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddressNftListResponseValue { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'hex': json['hex'], - 'repr': json['repr'], - }; -} - -export function AddressNftListResponseValueToJSON(value?: AddressNftListResponseValue | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'hex': value.hex, - 'repr': value.repr, - }; -} - diff --git a/client/src/generated/models/BurnBlock.ts b/client/src/generated/models/BurnBlock.ts new file mode 100644 index 0000000000..339712dc06 --- /dev/null +++ b/client/src/generated/models/BurnBlock.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Stacks Blockchain API + * Welcome to the API reference overview for the Stacks Blockchain API. Download Postman collection + * + * The version of the OpenAPI document: STACKS_API_VERSION + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * A burn block + * @export + * @interface BurnBlock + */ +export interface BurnBlock { + /** + * Unix timestamp (in seconds) indicating when this block was mined. + * @type {number} + * @memberof BurnBlock + */ + burn_block_time: number; + /** + * An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined. + * @type {string} + * @memberof BurnBlock + */ + burn_block_time_iso: string; + /** + * Hash of the anchor chain block + * @type {string} + * @memberof BurnBlock + */ + burn_block_hash: string; + /** + * Height of the anchor chain block + * @type {number} + * @memberof BurnBlock + */ + burn_block_height: number; + /** + * Hashes of the Stacks blocks included in the burn block + * @type {Array} + * @memberof BurnBlock + */ + stacks_blocks: Array; +} + +export function BurnBlockFromJSON(json: any): BurnBlock { + return BurnBlockFromJSONTyped(json, false); +} + +export function BurnBlockFromJSONTyped(json: any, ignoreDiscriminator: boolean): BurnBlock { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'burn_block_time': json['burn_block_time'], + 'burn_block_time_iso': json['burn_block_time_iso'], + 'burn_block_hash': json['burn_block_hash'], + 'burn_block_height': json['burn_block_height'], + 'stacks_blocks': json['stacks_blocks'], + }; +} + +export function BurnBlockToJSON(value?: BurnBlock | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'burn_block_time': value.burn_block_time, + 'burn_block_time_iso': value.burn_block_time_iso, + 'burn_block_hash': value.burn_block_hash, + 'burn_block_height': value.burn_block_height, + 'stacks_blocks': value.stacks_blocks, + }; +} + diff --git a/client/src/generated/models/AddressNftListResponse.ts b/client/src/generated/models/BurnBlockListResponse.ts similarity index 54% rename from client/src/generated/models/AddressNftListResponse.ts rename to client/src/generated/models/BurnBlockListResponse.ts index 3bfb1833a0..7ccb9b8803 100644 --- a/client/src/generated/models/AddressNftListResponse.ts +++ b/client/src/generated/models/BurnBlockListResponse.ts @@ -14,49 +14,49 @@ import { exists, mapValues } from '../runtime'; import { - NftEvent, - NftEventFromJSON, - NftEventFromJSONTyped, - NftEventToJSON, + BurnBlock, + BurnBlockFromJSON, + BurnBlockFromJSONTyped, + BurnBlockToJSON, } from './'; /** - * + * GET request that returns burn blocks * @export - * @interface AddressNftListResponse + * @interface BurnBlockListResponse */ -export interface AddressNftListResponse { +export interface BurnBlockListResponse { /** - * + * The number of burn blocks to return * @type {number} - * @memberof AddressNftListResponse + * @memberof BurnBlockListResponse */ limit: number; /** - * + * The number to burn blocks to skip (starting at `0`) * @type {number} - * @memberof AddressNftListResponse + * @memberof BurnBlockListResponse */ offset: number; /** - * + * The number of burn blocks available (regardless of filter parameters) * @type {number} - * @memberof AddressNftListResponse + * @memberof BurnBlockListResponse */ total: number; /** * - * @type {Array} - * @memberof AddressNftListResponse + * @type {Array} + * @memberof BurnBlockListResponse */ - nft_events: Array; + results: Array; } -export function AddressNftListResponseFromJSON(json: any): AddressNftListResponse { - return AddressNftListResponseFromJSONTyped(json, false); +export function BurnBlockListResponseFromJSON(json: any): BurnBlockListResponse { + return BurnBlockListResponseFromJSONTyped(json, false); } -export function AddressNftListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddressNftListResponse { +export function BurnBlockListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BurnBlockListResponse { if ((json === undefined) || (json === null)) { return json; } @@ -65,11 +65,11 @@ export function AddressNftListResponseFromJSONTyped(json: any, ignoreDiscriminat 'limit': json['limit'], 'offset': json['offset'], 'total': json['total'], - 'nft_events': ((json['nft_events'] as Array).map(NftEventFromJSON)), + 'results': ((json['results'] as Array).map(BurnBlockFromJSON)), }; } -export function AddressNftListResponseToJSON(value?: AddressNftListResponse | null): any { +export function BurnBlockListResponseToJSON(value?: BurnBlockListResponse | null): any { if (value === undefined) { return undefined; } @@ -81,7 +81,7 @@ export function AddressNftListResponseToJSON(value?: AddressNftListResponse | nu 'limit': value.limit, 'offset': value.offset, 'total': value.total, - 'nft_events': ((value.nft_events as Array).map(NftEventToJSON)), + 'results': ((value.results as Array).map(BurnBlockToJSON)), }; } diff --git a/client/src/generated/models/FungibleTokenMetadata.ts b/client/src/generated/models/FungibleTokenMetadata.ts deleted file mode 100644 index e83645ec49..0000000000 --- a/client/src/generated/models/FungibleTokenMetadata.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Stacks Blockchain API - * Welcome to the API reference overview for the Stacks Blockchain API. Download Postman collection - * - * The version of the OpenAPI document: STACKS_API_VERSION - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface FungibleTokenMetadata - */ -export interface FungibleTokenMetadata { - /** - * An optional string that is a valid URI which resolves to this token's metadata. Can be empty. - * @type {string} - * @memberof FungibleTokenMetadata - */ - token_uri: string; - /** - * Identifies the asset to which this token represents - * @type {string} - * @memberof FungibleTokenMetadata - */ - name: string; - /** - * Describes the asset to which this token represents - * @type {string} - * @memberof FungibleTokenMetadata - */ - description: string; - /** - * A URI pointing to a resource with mime type image/* representing the asset to which this token represents. The API may provide a URI to a cached resource, dependending on configuration. Otherwise, this can be the same value as the canonical image URI. - * @type {string} - * @memberof FungibleTokenMetadata - */ - image_uri: string; - /** - * The original image URI specified by the contract. A URI pointing to a resource with mime type image/* representing the asset to which this token represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive. - * @type {string} - * @memberof FungibleTokenMetadata - */ - image_canonical_uri: string; - /** - * A shorter representation of a token. This is sometimes referred to as a "ticker". Examples: "STX", "COOL", etc. Typically, a token could be referred to as $SYMBOL when referencing it in writing. - * @type {string} - * @memberof FungibleTokenMetadata - */ - symbol: string; - /** - * The number of decimal places in a token. - * @type {number} - * @memberof FungibleTokenMetadata - */ - decimals: number; - /** - * Tx id that deployed the contract - * @type {string} - * @memberof FungibleTokenMetadata - */ - tx_id: string; - /** - * principle that deployed the contract - * @type {string} - * @memberof FungibleTokenMetadata - */ - sender_address: string; -} - -export function FungibleTokenMetadataFromJSON(json: any): FungibleTokenMetadata { - return FungibleTokenMetadataFromJSONTyped(json, false); -} - -export function FungibleTokenMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FungibleTokenMetadata { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'token_uri': json['token_uri'], - 'name': json['name'], - 'description': json['description'], - 'image_uri': json['image_uri'], - 'image_canonical_uri': json['image_canonical_uri'], - 'symbol': json['symbol'], - 'decimals': json['decimals'], - 'tx_id': json['tx_id'], - 'sender_address': json['sender_address'], - }; -} - -export function FungibleTokenMetadataToJSON(value?: FungibleTokenMetadata | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'token_uri': value.token_uri, - 'name': value.name, - 'description': value.description, - 'image_uri': value.image_uri, - 'image_canonical_uri': value.image_canonical_uri, - 'symbol': value.symbol, - 'decimals': value.decimals, - 'tx_id': value.tx_id, - 'sender_address': value.sender_address, - }; -} - diff --git a/client/src/generated/models/NakamotoBlock.ts b/client/src/generated/models/NakamotoBlock.ts new file mode 100644 index 0000000000..8f545d6a6b --- /dev/null +++ b/client/src/generated/models/NakamotoBlock.ts @@ -0,0 +1,184 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Stacks Blockchain API + * Welcome to the API reference overview for the Stacks Blockchain API. Download Postman collection + * + * The version of the OpenAPI document: STACKS_API_VERSION + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * A block + * @export + * @interface NakamotoBlock + */ +export interface NakamotoBlock { + /** + * Set to `true` if block corresponds to the canonical chain tip + * @type {boolean} + * @memberof NakamotoBlock + */ + canonical: boolean; + /** + * Height of the block + * @type {number} + * @memberof NakamotoBlock + */ + height: number; + /** + * Hash representing the block + * @type {string} + * @memberof NakamotoBlock + */ + hash: string; + /** + * The only hash that can uniquely identify an anchored block or an unconfirmed state trie + * @type {string} + * @memberof NakamotoBlock + */ + index_block_hash: string; + /** + * Hash of the parent block + * @type {string} + * @memberof NakamotoBlock + */ + parent_block_hash: string; + /** + * Index block hash of the parent block + * @type {string} + * @memberof NakamotoBlock + */ + parent_index_block_hash: string; + /** + * Unix timestamp (in seconds) indicating when this block was mined. + * @type {number} + * @memberof NakamotoBlock + */ + burn_block_time: number; + /** + * An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined. + * @type {string} + * @memberof NakamotoBlock + */ + burn_block_time_iso: string; + /** + * Hash of the anchor chain block + * @type {string} + * @memberof NakamotoBlock + */ + burn_block_hash: string; + /** + * Height of the anchor chain block + * @type {number} + * @memberof NakamotoBlock + */ + burn_block_height: number; + /** + * Anchor chain transaction ID + * @type {string} + * @memberof NakamotoBlock + */ + miner_txid: string; + /** + * Number of transactions included in the block + * @type {number} + * @memberof NakamotoBlock + */ + tx_count: number; + /** + * Execution cost read count. + * @type {number} + * @memberof NakamotoBlock + */ + execution_cost_read_count: number; + /** + * Execution cost read length. + * @type {number} + * @memberof NakamotoBlock + */ + execution_cost_read_length: number; + /** + * Execution cost runtime. + * @type {number} + * @memberof NakamotoBlock + */ + execution_cost_runtime: number; + /** + * Execution cost write count. + * @type {number} + * @memberof NakamotoBlock + */ + execution_cost_write_count: number; + /** + * Execution cost write length. + * @type {number} + * @memberof NakamotoBlock + */ + execution_cost_write_length: number; +} + +export function NakamotoBlockFromJSON(json: any): NakamotoBlock { + return NakamotoBlockFromJSONTyped(json, false); +} + +export function NakamotoBlockFromJSONTyped(json: any, ignoreDiscriminator: boolean): NakamotoBlock { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'canonical': json['canonical'], + 'height': json['height'], + 'hash': json['hash'], + 'index_block_hash': json['index_block_hash'], + 'parent_block_hash': json['parent_block_hash'], + 'parent_index_block_hash': json['parent_index_block_hash'], + 'burn_block_time': json['burn_block_time'], + 'burn_block_time_iso': json['burn_block_time_iso'], + 'burn_block_hash': json['burn_block_hash'], + 'burn_block_height': json['burn_block_height'], + 'miner_txid': json['miner_txid'], + 'tx_count': json['tx_count'], + 'execution_cost_read_count': json['execution_cost_read_count'], + 'execution_cost_read_length': json['execution_cost_read_length'], + 'execution_cost_runtime': json['execution_cost_runtime'], + 'execution_cost_write_count': json['execution_cost_write_count'], + 'execution_cost_write_length': json['execution_cost_write_length'], + }; +} + +export function NakamotoBlockToJSON(value?: NakamotoBlock | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'canonical': value.canonical, + 'height': value.height, + 'hash': value.hash, + 'index_block_hash': value.index_block_hash, + 'parent_block_hash': value.parent_block_hash, + 'parent_index_block_hash': value.parent_index_block_hash, + 'burn_block_time': value.burn_block_time, + 'burn_block_time_iso': value.burn_block_time_iso, + 'burn_block_hash': value.burn_block_hash, + 'burn_block_height': value.burn_block_height, + 'miner_txid': value.miner_txid, + 'tx_count': value.tx_count, + 'execution_cost_read_count': value.execution_cost_read_count, + 'execution_cost_read_length': value.execution_cost_read_length, + 'execution_cost_runtime': value.execution_cost_runtime, + 'execution_cost_write_count': value.execution_cost_write_count, + 'execution_cost_write_length': value.execution_cost_write_length, + }; +} + diff --git a/client/src/generated/models/FungibleTokensMetadataList.ts b/client/src/generated/models/NakamotoBlockListResponse.ts similarity index 52% rename from client/src/generated/models/FungibleTokensMetadataList.ts rename to client/src/generated/models/NakamotoBlockListResponse.ts index e9a059f26c..4ff3b8f916 100644 --- a/client/src/generated/models/FungibleTokensMetadataList.ts +++ b/client/src/generated/models/NakamotoBlockListResponse.ts @@ -14,49 +14,49 @@ import { exists, mapValues } from '../runtime'; import { - FungibleTokenMetadata, - FungibleTokenMetadataFromJSON, - FungibleTokenMetadataFromJSONTyped, - FungibleTokenMetadataToJSON, + NakamotoBlock, + NakamotoBlockFromJSON, + NakamotoBlockFromJSONTyped, + NakamotoBlockToJSON, } from './'; /** - * List of fungible tokens metadata + * GET request that returns blocks * @export - * @interface FungibleTokensMetadataList + * @interface NakamotoBlockListResponse */ -export interface FungibleTokensMetadataList { +export interface NakamotoBlockListResponse { /** - * The number of tokens metadata to return + * The number of blocks to return * @type {number} - * @memberof FungibleTokensMetadataList + * @memberof NakamotoBlockListResponse */ limit: number; /** - * The number to tokens metadata to skip (starting at `0`) + * The number to blocks to skip (starting at `0`) * @type {number} - * @memberof FungibleTokensMetadataList + * @memberof NakamotoBlockListResponse */ offset: number; /** - * The number of tokens metadata available + * The number of blocks available * @type {number} - * @memberof FungibleTokensMetadataList + * @memberof NakamotoBlockListResponse */ total: number; /** * - * @type {Array} - * @memberof FungibleTokensMetadataList + * @type {Array} + * @memberof NakamotoBlockListResponse */ - results: Array; + results: Array; } -export function FungibleTokensMetadataListFromJSON(json: any): FungibleTokensMetadataList { - return FungibleTokensMetadataListFromJSONTyped(json, false); +export function NakamotoBlockListResponseFromJSON(json: any): NakamotoBlockListResponse { + return NakamotoBlockListResponseFromJSONTyped(json, false); } -export function FungibleTokensMetadataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): FungibleTokensMetadataList { +export function NakamotoBlockListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): NakamotoBlockListResponse { if ((json === undefined) || (json === null)) { return json; } @@ -65,11 +65,11 @@ export function FungibleTokensMetadataListFromJSONTyped(json: any, ignoreDiscrim 'limit': json['limit'], 'offset': json['offset'], 'total': json['total'], - 'results': ((json['results'] as Array).map(FungibleTokenMetadataFromJSON)), + 'results': ((json['results'] as Array).map(NakamotoBlockFromJSON)), }; } -export function FungibleTokensMetadataListToJSON(value?: FungibleTokensMetadataList | null): any { +export function NakamotoBlockListResponseToJSON(value?: NakamotoBlockListResponse | null): any { if (value === undefined) { return undefined; } @@ -81,7 +81,7 @@ export function FungibleTokensMetadataListToJSON(value?: FungibleTokensMetadataL 'limit': value.limit, 'offset': value.offset, 'total': value.total, - 'results': ((value.results as Array).map(FungibleTokenMetadataToJSON)), + 'results': ((value.results as Array).map(NakamotoBlockToJSON)), }; } diff --git a/client/src/generated/models/NftEvent.ts b/client/src/generated/models/NftEvent.ts deleted file mode 100644 index d6b73f8ba1..0000000000 --- a/client/src/generated/models/NftEvent.ts +++ /dev/null @@ -1,127 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Stacks Blockchain API - * Welcome to the API reference overview for the Stacks Blockchain API. Download Postman collection - * - * The version of the OpenAPI document: STACKS_API_VERSION - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import { - AddressNftListResponseValue, - AddressNftListResponseValueFromJSON, - AddressNftListResponseValueFromJSONTyped, - AddressNftListResponseValueToJSON, -} from './'; - -/** - * - * @export - * @interface NftEvent - */ -export interface NftEvent { - /** - * - * @type {string} - * @memberof NftEvent - */ - sender?: string; - /** - * - * @type {string} - * @memberof NftEvent - */ - recipient?: string; - /** - * - * @type {string} - * @memberof NftEvent - */ - asset_identifier: string; - /** - * - * @type {string} - * @memberof NftEvent - */ - asset_event_type: string; - /** - * - * @type {AddressNftListResponseValue} - * @memberof NftEvent - */ - value: AddressNftListResponseValue; - /** - * - * @type {string} - * @memberof NftEvent - */ - tx_id: string; - /** - * - * @type {number} - * @memberof NftEvent - */ - tx_index: number; - /** - * - * @type {number} - * @memberof NftEvent - */ - block_height: number; - /** - * - * @type {number} - * @memberof NftEvent - */ - event_index: number; -} - -export function NftEventFromJSON(json: any): NftEvent { - return NftEventFromJSONTyped(json, false); -} - -export function NftEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): NftEvent { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'sender': !exists(json, 'sender') ? undefined : json['sender'], - 'recipient': !exists(json, 'recipient') ? undefined : json['recipient'], - 'asset_identifier': json['asset_identifier'], - 'asset_event_type': json['asset_event_type'], - 'value': AddressNftListResponseValueFromJSON(json['value']), - 'tx_id': json['tx_id'], - 'tx_index': json['tx_index'], - 'block_height': json['block_height'], - 'event_index': json['event_index'], - }; -} - -export function NftEventToJSON(value?: NftEvent | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'sender': value.sender, - 'recipient': value.recipient, - 'asset_identifier': value.asset_identifier, - 'asset_event_type': value.asset_event_type, - 'value': AddressNftListResponseValueToJSON(value.value), - 'tx_id': value.tx_id, - 'tx_index': value.tx_index, - 'block_height': value.block_height, - 'event_index': value.event_index, - }; -} - diff --git a/client/src/generated/models/NonFungibleTokenMetadata.ts b/client/src/generated/models/NonFungibleTokenMetadata.ts deleted file mode 100644 index e64fbb2c67..0000000000 --- a/client/src/generated/models/NonFungibleTokenMetadata.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Stacks Blockchain API - * Welcome to the API reference overview for the Stacks Blockchain API. Download Postman collection - * - * The version of the OpenAPI document: STACKS_API_VERSION - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface NonFungibleTokenMetadata - */ -export interface NonFungibleTokenMetadata { - /** - * An optional string that is a valid URI which resolves to this token's metadata. Can be empty. - * @type {string} - * @memberof NonFungibleTokenMetadata - */ - token_uri: string; - /** - * Identifies the asset to which this token represents - * @type {string} - * @memberof NonFungibleTokenMetadata - */ - name: string; - /** - * Describes the asset to which this token represents - * @type {string} - * @memberof NonFungibleTokenMetadata - */ - description: string; - /** - * A URI pointing to a resource with mime type image/* representing the asset to which this token represents. The API may provide a URI to a cached resource, dependending on configuration. Otherwise, this can be the same value as the canonical image URI. - * @type {string} - * @memberof NonFungibleTokenMetadata - */ - image_uri: string; - /** - * The original image URI specified by the contract. A URI pointing to a resource with mime type image/* representing the asset to which this token represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive. - * @type {string} - * @memberof NonFungibleTokenMetadata - */ - image_canonical_uri: string; - /** - * Tx id that deployed the contract - * @type {string} - * @memberof NonFungibleTokenMetadata - */ - tx_id: string; - /** - * principle that deployed the contract - * @type {string} - * @memberof NonFungibleTokenMetadata - */ - sender_address: string; -} - -export function NonFungibleTokenMetadataFromJSON(json: any): NonFungibleTokenMetadata { - return NonFungibleTokenMetadataFromJSONTyped(json, false); -} - -export function NonFungibleTokenMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): NonFungibleTokenMetadata { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'token_uri': json['token_uri'], - 'name': json['name'], - 'description': json['description'], - 'image_uri': json['image_uri'], - 'image_canonical_uri': json['image_canonical_uri'], - 'tx_id': json['tx_id'], - 'sender_address': json['sender_address'], - }; -} - -export function NonFungibleTokenMetadataToJSON(value?: NonFungibleTokenMetadata | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'token_uri': value.token_uri, - 'name': value.name, - 'description': value.description, - 'image_uri': value.image_uri, - 'image_canonical_uri': value.image_canonical_uri, - 'tx_id': value.tx_id, - 'sender_address': value.sender_address, - }; -} - diff --git a/client/src/generated/models/NonFungibleTokensMetadataList.ts b/client/src/generated/models/NonFungibleTokensMetadataList.ts deleted file mode 100644 index b9f20627c2..0000000000 --- a/client/src/generated/models/NonFungibleTokensMetadataList.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Stacks Blockchain API - * Welcome to the API reference overview for the Stacks Blockchain API. Download Postman collection - * - * The version of the OpenAPI document: STACKS_API_VERSION - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import { - NonFungibleTokenMetadata, - NonFungibleTokenMetadataFromJSON, - NonFungibleTokenMetadataFromJSONTyped, - NonFungibleTokenMetadataToJSON, -} from './'; - -/** - * List of non fungible tokens metadata - * @export - * @interface NonFungibleTokensMetadataList - */ -export interface NonFungibleTokensMetadataList { - /** - * The number of tokens metadata to return - * @type {number} - * @memberof NonFungibleTokensMetadataList - */ - limit: number; - /** - * The number to tokens metadata to skip (starting at `0`) - * @type {number} - * @memberof NonFungibleTokensMetadataList - */ - offset: number; - /** - * The number of tokens metadata available - * @type {number} - * @memberof NonFungibleTokensMetadataList - */ - total: number; - /** - * - * @type {Array} - * @memberof NonFungibleTokensMetadataList - */ - results: Array; -} - -export function NonFungibleTokensMetadataListFromJSON(json: any): NonFungibleTokensMetadataList { - return NonFungibleTokensMetadataListFromJSONTyped(json, false); -} - -export function NonFungibleTokensMetadataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): NonFungibleTokensMetadataList { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'limit': json['limit'], - 'offset': json['offset'], - 'total': json['total'], - 'results': ((json['results'] as Array).map(NonFungibleTokenMetadataFromJSON)), - }; -} - -export function NonFungibleTokensMetadataListToJSON(value?: NonFungibleTokensMetadataList | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'limit': value.limit, - 'offset': value.offset, - 'total': value.total, - 'results': ((value.results as Array).map(NonFungibleTokenMetadataToJSON)), - }; -} - diff --git a/client/src/generated/models/RosettaOptions.ts b/client/src/generated/models/RosettaOptions.ts index 00c1f0e698..86a57c2361 100644 --- a/client/src/generated/models/RosettaOptions.ts +++ b/client/src/generated/models/RosettaOptions.ts @@ -139,6 +139,12 @@ export interface RosettaOptions { * @memberof RosettaOptions */ pox_addr?: string; + /** + * The hex-encoded signer key (buff 33) for PoX. + * @type {string} + * @memberof RosettaOptions + */ + signer_key?: string; } export function RosettaOptionsFromJSON(json: any): RosettaOptions { @@ -171,6 +177,7 @@ export function RosettaOptionsFromJSONTyped(json: any, ignoreDiscriminator: bool 'burn_block_height': !exists(json, 'burn_block_height') ? undefined : json['burn_block_height'], 'delegate_to': !exists(json, 'delegate_to') ? undefined : json['delegate_to'], 'pox_addr': !exists(json, 'pox_addr') ? undefined : json['pox_addr'], + 'signer_key': !exists(json, 'signer_key') ? undefined : json['signer_key'], }; } @@ -203,6 +210,7 @@ export function RosettaOptionsToJSON(value?: RosettaOptions | null): any { 'burn_block_height': value.burn_block_height, 'delegate_to': value.delegate_to, 'pox_addr': value.pox_addr, + 'signer_key': value.signer_key, }; } diff --git a/client/src/generated/models/ServerStatusResponse.ts b/client/src/generated/models/ServerStatusResponse.ts index 23fd807407..e4890eb3f5 100644 --- a/client/src/generated/models/ServerStatusResponse.ts +++ b/client/src/generated/models/ServerStatusResponse.ts @@ -50,6 +50,12 @@ export interface ServerStatusResponse { * @memberof ServerStatusResponse */ pox_v2_unlock_height?: number | null; + /** + * + * @type {number} + * @memberof ServerStatusResponse + */ + pox_v3_unlock_height?: number | null; /** * * @type {ChainTip} @@ -72,6 +78,7 @@ export function ServerStatusResponseFromJSONTyped(json: any, ignoreDiscriminator 'status': json['status'], 'pox_v1_unlock_height': !exists(json, 'pox_v1_unlock_height') ? undefined : json['pox_v1_unlock_height'], 'pox_v2_unlock_height': !exists(json, 'pox_v2_unlock_height') ? undefined : json['pox_v2_unlock_height'], + 'pox_v3_unlock_height': !exists(json, 'pox_v3_unlock_height') ? undefined : json['pox_v3_unlock_height'], 'chain_tip': !exists(json, 'chain_tip') ? undefined : ChainTipFromJSON(json['chain_tip']), }; } @@ -89,6 +96,7 @@ export function ServerStatusResponseToJSON(value?: ServerStatusResponse | null): 'status': value.status, 'pox_v1_unlock_height': value.pox_v1_unlock_height, 'pox_v2_unlock_height': value.pox_v2_unlock_height, + 'pox_v3_unlock_height': value.pox_v3_unlock_height, 'chain_tip': ChainTipToJSON(value.chain_tip), }; } diff --git a/client/src/generated/models/index.ts b/client/src/generated/models/index.ts index 8523717aef..4a94946b96 100644 --- a/client/src/generated/models/index.ts +++ b/client/src/generated/models/index.ts @@ -3,8 +3,6 @@ export * from './AccountDataResponse'; export * from './AddressAssetsListResponse'; export * from './AddressBalanceResponse'; -export * from './AddressNftListResponse'; -export * from './AddressNftListResponseValue'; export * from './AddressNonces'; export * from './AddressStxInboundListResponse'; export * from './AddressTokenOfferingLocked'; @@ -24,6 +22,8 @@ export * from './BnsGetNameInfoResponse'; export * from './BnsGetNamePriceResponse'; export * from './BnsGetNamespacePriceResponse'; export * from './BnsNamesOwnByAddressResponse'; +export * from './BurnBlock'; +export * from './BurnBlockListResponse'; export * from './BurnchainReward'; export * from './BurnchainRewardListResponse'; export * from './BurnchainRewardSlotHolder'; @@ -37,8 +37,6 @@ export * from './CoreNodeInfoResponse'; export * from './CoreNodePoxResponse'; export * from './FeeRate'; export * from './FeeRateRequest'; -export * from './FungibleTokenMetadata'; -export * from './FungibleTokensMetadataList'; export * from './GetRawTransactionResult'; export * from './GetStxSupplyLegacyFormatResponse'; export * from './GetStxSupplyResponse'; @@ -57,15 +55,14 @@ export * from './MempoolTransactionStatsResponseTxSimpleFeeAveragesTokenTransfer export * from './MempoolTransactionStatsResponseTxTypeCounts'; export * from './Microblock'; export * from './MicroblockListResponse'; +export * from './NakamotoBlock'; +export * from './NakamotoBlockListResponse'; export * from './NetworkBlockTimeResponse'; export * from './NetworkBlockTimesResponse'; export * from './NetworkIdentifier'; -export * from './NftEvent'; export * from './NonFungibleTokenHistoryEventList'; export * from './NonFungibleTokenHoldingsList'; -export * from './NonFungibleTokenMetadata'; export * from './NonFungibleTokenMintList'; -export * from './NonFungibleTokensMetadataList'; export * from './OtherTransactionIdentifier'; export * from './PoolDelegation'; export * from './PoolDelegationsResponse'; diff --git a/docs/generated.d.ts b/docs/generated.d.ts index f9952d5cfa..7f0d6ab069 100644 --- a/docs/generated.d.ts +++ b/docs/generated.d.ts @@ -2534,6 +2534,10 @@ export interface RosettaOptions { * The reward address for stacking transaction. It should be a valid Bitcoin address */ pox_addr?: string; + /** + * The hex-encoded signer key (buff 33) for PoX. + */ + signer_key?: string; } /** * The ConstructionMetadataResponse returns network-specific metadata used for transaction construction. Optionally, the implementer can return the suggested fee associated with the transaction being constructed. The caller may use this info to adjust the intent of the transaction or to create a transaction with a different account that can pay the suggested fee. Suggested fee is an array in case fee payment must occur in multiple currencies.