@stacks/blockchain-api-client
Advanced tools
Comparing version 8.0.0-beta.1 to 8.0.0-beta.2
@@ -8,1 +8,2 @@ import { ClientOptions } from "openapi-fetch"; | ||
export type * from './types'; | ||
export * from 'openapi-fetch'; |
@@ -26,2 +26,3 @@ "use strict"; | ||
__exportStar(require("./ws"), exports); | ||
__exportStar(require("openapi-fetch"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@stacks/blockchain-api-client", | ||
"version": "8.0.0-beta.1", | ||
"version": "8.0.0-beta.2", | ||
"access": "public", | ||
@@ -5,0 +5,0 @@ "description": "Client for the Stacks Blockchain API", |
@@ -6,2 +6,6 @@ # @stacks/blockchain-api-client | ||
## Breaking changes from (<=7.x.x) → (8.x.x) | ||
See [MIGRATION.md](./MIGRATION.md) for details. | ||
## Features | ||
@@ -8,0 +12,0 @@ |
@@ -13,1 +13,2 @@ import { default as createOpenApiClient, ClientOptions } from "openapi-fetch"; | ||
export type * from './types'; | ||
export * from 'openapi-fetch'; |
@@ -1,12 +0,23 @@ | ||
import type { operations } from "./generated/schema"; | ||
import type { operations, paths } from './generated/schema'; | ||
export type Transaction = operations['get_transaction_list']['responses']['200']['content']['application/json']['results'][number]; | ||
export type MempoolTransaction = operations['get_mempool_transaction_list']['responses']['200']['content']['application/json']['results'][number]; | ||
export type Block = operations['get_block_by_height']['responses']['200']['content']['application/json']; | ||
export type Microblock = operations['get_microblock_by_hash']['responses']['200']['content']['application/json']; | ||
export type NakamotoBlock = operations['get_block']['responses']['200']['content']['application/json']; | ||
export type BurnBlock = operations['get_burn_blocks']['responses']['200']['content']['application/json']['results'][number]; | ||
export type SmartContract = operations['get_contract_by_id']['responses']['200']['content']['application/json']; | ||
export type AddressTransactionWithTransfers = operations['get_account_transactions_with_transfers']['responses']['200']['content']['application/json']['results'][number]; | ||
export type AddressStxBalanceResponse = operations['get_account_stx_balance']['responses']['200']['content']['application/json']; | ||
type Extract200Response<T> = T extends { 200: infer R } ? R : never; | ||
type ExtractOperationResponse<T extends keyof operations> = Extract200Response<operations[T]['responses']> extends { content: { 'application/json': infer U } } ? U : never; | ||
type PathResponse<T extends keyof paths> = paths[T]['get'] extends { responses: infer R } ? Extract200Response<R> extends { content: { 'application/json': infer U } } ? U : never : never; | ||
export type OperationResponse = { | ||
[K in keyof operations]: ExtractOperationResponse<K>; | ||
} & { | ||
[P in keyof paths]: PathResponse<P>; | ||
}; | ||
export type Transaction = OperationResponse['get_transaction_list']['results'][number]; | ||
export type MempoolTransaction = OperationResponse['get_mempool_transaction_list']['results'][number]; | ||
export type Block = OperationResponse['get_block_by_height']; | ||
export type Microblock = OperationResponse['get_microblock_by_hash']; | ||
export type NakamotoBlock = OperationResponse['get_block']; | ||
export type BurnBlock = OperationResponse['get_burn_blocks']['results'][number]; | ||
export type SmartContract = OperationResponse['get_contract_by_id']; | ||
export type AddressTransactionWithTransfers = OperationResponse['get_account_transactions_with_transfers']['results'][number]; | ||
export type AddressStxBalanceResponse = OperationResponse['get_account_stx_balance']; | ||
export type RpcAddressTxNotificationParams = AddressTransactionWithTransfers & { | ||
@@ -13,0 +24,0 @@ address: string; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
2527846
37820
472
3