import { AxiosInstance } from "axios"; import { BlockBase, BlockHeaderBase, BlockTipBase, UtxoTransaction } from "../base-objects"; import { UtxoBlockTip } from "../base-objects/blockTips/UtxoBlockTip"; import { FullBlockBase } from "../base-objects/FullBlockBase"; import { UtxoNodeStatus } from "../base-objects/status/UtxoStatus"; import { UtxoMccCreate } from "../types"; import { ChainType, getTransactionOptions, ReadRpcInterface } from "../types/genericMccTypes"; import { IUtxoChainTip, IUtxoGetAlternativeBlocksOptions, IUtxoGetAlternativeBlocksRes, IUtxoGetBlockHeaderRes, IUtxoGetBlockRes, IUtxoGetTransactionRes, IUtxoTransactionAdditionalData } from "../types/utxoTypes"; export interface objectConstructors, TranCon extends UtxoTransaction> { transactionConstructor: new (d: IUtxoGetTransactionRes, a?: IUtxoTransactionAdditionalData) => TranCon; fullBlockConstructor: new (d: IUtxoGetBlockRes) => FBlockCon; blockConstructor: new (d: IUtxoGetBlockRes) => BlockCon; blockHeaderConstructor: new (d: IUtxoGetBlockHeaderRes) => BHeadCon; blockTipConstructor: new (d: IUtxoChainTip) => BTipCon; } export declare abstract class UtxoCore, TranCon extends UtxoTransaction> implements ReadRpcInterface { client: AxiosInstance; inRegTest: boolean; constructors: objectConstructors; chainType: ChainType; constructor(createConfig: UtxoMccCreate, constructors: objectConstructors); /** * Return node status object for Utxo nodes */ getNodeStatus(): Promise; /** * On Utxo chains nodes always need full history * @returns 0 */ getBottomBlockHeight(): Promise; private blockRequestBase; getFullBlock(blockNumberOrHash: string | number): Promise; /** * Returns the block information * @param blockHashOrHeight Provide either block hash or height of the block * @returns All available block information */ getBlock(blockNumberOrHash: string | number): Promise; getBlockHeader(blockNumberOrHash: number | string | any): Promise; /** * Get Block height (number of blocks) from connected chain * @returns block height (block count) */ getBlockHeight(): Promise; /** * Get transaction details * @param txId Transaction id * @param options provide verbose:boolean, set true if you want more info such as block hash... * @returns transaction details */ getTransaction(txId: string, options?: getTransactionOptions): Promise; /** * Get header information about the block * @param blockHash * @returns */ getBlockHeaderBase(blockHashOrHeight: string | number): Promise; /** * Get only tips of all the branches * @param height_gte * @returns */ getBlockTips(height_gte: number): Promise; /** * Get block tips and full block chain for all tips (all of heir branches) for the last x blocks (defined bt branch_len parameter) * @param branch_len the branch length indicating how long can branches be * @returns Array of LiteBlocks */ getTopLiteBlocks(branch_len: number, read_main?: boolean): Promise; /** * Get an array of all alternative chain tips * @returns */ getTopBlocks(option?: IUtxoGetAlternativeBlocksOptions): Promise; /** * Get network info * @returns network info details */ private getNetworkInfo; /** * Gets the block from main mining tip with provided height * @param blockNumber Block height * @returns Block hash */ private getBlockHashFromHeight; /** * * @param height_gte * @param mainBranchProcess * @returns */ private getBlockTipsHelper; recursive_block_hash(hash: string, processHeight: number): Promise; recursive_block_tip(tip: BTipCon, processHeight: number): Promise; /** * * @dev Note that miner has to be registered in miner wallet * @dev only in regtest mode * @param address * @param amount * @returns */ fundAddress(address: string, amount: number): Promise; } //# sourceMappingURL=UtxoCore.d.ts.map