@stacks/stacks-blockchain-api-types
Advanced tools
Comparing version 7.5.0-beta.1 to 7.5.0-beta.2
{ | ||
"name": "@stacks/stacks-blockchain-api-types", | ||
"version": "7.5.0-beta.1", | ||
"version": "7.5.0-beta.2", | ||
"access": "public", | ||
@@ -5,0 +5,0 @@ "description": "TypeScript descriptions of Stacks 2.0 blockchain API entities", |
@@ -27,6 +27,2 @@ import type { | ||
// Allows timeout callbacks for messages. See | ||
// https://socket.io/docs/v4/typescript/#emitting-with-a-timeout | ||
type WithTimeoutAck<isSender extends boolean, args extends any[]> = isSender extends true ? [Error, ...args] : args; | ||
export interface ClientToServerMessages { | ||
@@ -37,12 +33,12 @@ subscribe: (topic: Topic | Topic[], callback: (error: string | null) => void) => void; | ||
export interface ServerToClientMessages<isSender extends boolean = false> { | ||
block: (block: Block, callback: (...args: WithTimeoutAck<isSender, [string]>) => void) => void; | ||
microblock: (microblock: Microblock, callback: (...args: WithTimeoutAck<isSender, [string]>) => void) => void; | ||
mempool: (transaction: MempoolTransaction, callback: (...args: WithTimeoutAck<isSender, [string]>) => void) => void; | ||
'nft-event': (event: NftEvent, callback: (...args: WithTimeoutAck<isSender, [string]>) => void) => void; | ||
[key: TransactionTopic]: (transaction: Transaction | MempoolTransaction, callback: (...args: WithTimeoutAck<isSender, [string]>) => void) => void; | ||
[key: NftAssetEventTopic]: (assetIdentifier: string, value: string, event: NftEvent, callback: (...args: WithTimeoutAck<isSender, [string]>) => void) => void; | ||
[key: NftCollectionEventTopic]: (assetIdentifier: string, event: NftEvent, callback: (...args: WithTimeoutAck<isSender, [string]>) => void) => void; | ||
[key: AddressTransactionTopic]: (address: string, stxBalance: AddressTransactionWithTransfers, callback: (...args: WithTimeoutAck<isSender, [string]>) => void) => void; | ||
[key: AddressStxBalanceTopic]: (address: string, stxBalance: AddressStxBalanceResponse, callback: (...args: WithTimeoutAck<isSender, [string]>) => void) => void; | ||
export interface ServerToClientMessages { | ||
block: (block: Block) => void; | ||
microblock: (microblock: Microblock) => void; | ||
mempool: (transaction: MempoolTransaction) => void; | ||
'nft-event': (event: NftEvent) => void; | ||
[key: TransactionTopic]: (transaction: Transaction | MempoolTransaction) => void; | ||
[key: NftAssetEventTopic]: (assetIdentifier: string, value: string, event: NftEvent) => void; | ||
[key: NftCollectionEventTopic]: (assetIdentifier: string, event: NftEvent) => void; | ||
[key: AddressTransactionTopic]: (address: string, stxBalance: AddressTransactionWithTransfers) => void; | ||
[key: AddressStxBalanceTopic]: (address: string, stxBalance: AddressStxBalanceResponse) => void; | ||
} |
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
550025
13372