///
/**
* The interface required by the Chainfilter to perform on-chain validation checks
* of messages. A simplified interface is required by the Chainfilter. The actual
* chain client implementation may offer a broader set of feautures. Additionally,
* an adapter could be constructred to make an chain client conform to that required
* by the Chainfilter.
*/
export interface IChainFilterChainClient {
getBlockchainInfo(): Promise;
getBlockHash(height: number): Promise;
getBlock(hash: string): Promise;
getRawBlock(hash: string): Promise;
getTransaction(txId: string): Promise;
getUtxo(txId: string, voutIdx: number): Promise;
waitForSync(): Promise;
}
export type HasBlocks = {
blocks: number;
};
export type HasBestBlockHash = {
bestblockhash: string;
};
export type HasTxStrings = {
tx: string[];
};
export type HasHeight = {
height: number;
};
export type HasHash = {
hash: string;
};
export type HasTransaction = {
txid: string;
blockhash: string;
};
export type HasScriptPubKey = {
scriptPubKey: HasHex;
};
export type HasValue = {
value: number;
};
export type HasConfirmations = {
confirmations: string;
};
export type HasHex = {
hex: string;
};