/// /// import { ECPoint } from '@neo-one/client-common'; import { Block, Blockchain as BlockchainType, CallReceipt, ConsensusPayload, Header, Input, InvocationTransaction, Settings, Storage, Transaction, VerifyTransactionResult, VM } from '@neo-one/node-core'; import BN from 'bn.js'; import { Observable } from 'rxjs'; export interface CreateBlockchainOptions { readonly settings: Settings; readonly storage: Storage; readonly vm: VM; } export interface BlockchainOptions extends CreateBlockchainOptions { readonly currentBlock: BlockchainType['currentBlock'] | undefined; readonly previousBlock: BlockchainType['previousBlock'] | undefined; readonly currentHeader: BlockchainType['currentHeader'] | undefined; } export declare class Blockchain { static create({ settings, storage, vm }: CreateBlockchainOptions): Promise; readonly deserializeWireContext: BlockchainType['deserializeWireContext']; readonly serializeJSONContext: BlockchainType['serializeJSONContext']; readonly feeContext: BlockchainType['feeContext']; private readonly settings$; private readonly storage; private mutableCurrentBlock; private mutablePreviousBlock; private mutableCurrentHeader; private mutablePersistingBlocks; private mutableBlockQueue; private mutableInQueue; private readonly vm; private mutableRunning; private mutableDoneRunningResolve; private mutableBlock$; constructor(options: BlockchainOptions); readonly settings: Settings; readonly currentBlock: Block; readonly previousBlock: Block | undefined; readonly currentHeader: Header; readonly currentBlockIndex: number; readonly block$: Observable; readonly isPersistingBlock: boolean; readonly account: BlockchainType['account']; readonly accountUnclaimed: BlockchainType['accountUnclaimed']; readonly accountUnspent: BlockchainType['accountUnspent']; readonly action: BlockchainType['action']; readonly asset: BlockchainType['asset']; readonly block: BlockchainType['block']; readonly blockData: BlockchainType['blockData']; readonly header: BlockchainType['header']; readonly transaction: BlockchainType['transaction']; readonly transactionData: BlockchainType['transactionData']; readonly output: BlockchainType['output']; readonly contract: BlockchainType['contract']; readonly storageItem: BlockchainType['storageItem']; readonly validator: BlockchainType['validator']; readonly invocationData: BlockchainType['invocationData']; readonly validatorsCount: BlockchainType['validatorsCount']; stop(): Promise; updateSettings(settings: Settings): void; persistBlock({ block, unsafe, }: { readonly block: Block; readonly unsafe?: boolean; }): Promise; persistHeaders(_headers: readonly Header[]): Promise; verifyBlock(block: Block): Promise; verifyConsensusPayload(payload: ConsensusPayload): Promise; verifyTransaction({ transaction, memPool, }: { readonly transaction: Transaction; readonly memPool?: readonly Transaction[]; }): Promise; invokeScript(script: Buffer): Promise; invokeTransaction(transaction: InvocationTransaction): Promise; reset(): Promise; readonly getValidators: (transactions: readonly Transaction[]) => Promise; readonly calculateClaimAmount: (claims: readonly Input[]) => Promise; private persistBlocksAsync; private cleanBlockQueue; private dequeBlockQueue; private readonly verifyScript; private readonly tryGetInvocationData; private readonly tryGetTransactionData; private readonly getUnclaimed; private readonly getUnspent; private readonly getAllValidators; private readonly isSpent; private readonly tryGetSpentCoin; private start; private persistBlockInternal; private createWriteBlockchain; }