import { TableStore } from "./table"; import { Name, Transaction, TimePoint, TimePointSec, NameType } from "@greymass/eosio"; import { Account, AccountArgs } from "./account"; import { VM } from "./vm"; export declare class Blockchain { accounts: { [key: string]: Account; }; timestamp: TimePoint; store: TableStore; console: string; actionsQueue: VM.Context[]; constructor({ accounts, timestamp, store }?: { accounts?: { [key: string]: Account; }; timestamp?: TimePoint; store?: TableStore; }); applyTransaction(transaction: Transaction, decodedData?: any): Promise; getAccount(name: Name): Account | undefined; createAccount(args: string | Omit): Account; /** * Create a list of accounts * @param {Blockchain} bc - Blockchain - The blockchain that the accounts will be created on. * @param {string[]} accounts - An array of account names. * @returns An array of accounts. */ createAccounts(...accounts: string[]): any[]; /** * It reads a file from the file system or from the network and returns it as a Uint8Array * @param {string} fileName - The name of the file to read. * @returns A promise of a Uint8Array. */ readWasm(fileName: string): Promise; /** * It reads the contents of a file and returns it as a string. * @param {string} fileName - The path to the ABI file. * @returns The ABI of the contract. */ readAbi(fileName: string): Promise; /** * Create a new account with the given name, wasm, and abi * @param {Blockchain} bc - Blockchain - the blockchain to create the contract on * @param {NameType} name - Name of the contract. * @param {string} folder - The folder name of the contract. * @param [sendsInline=false] - If true, the contract will send inline. If false, it will send to a new * account. * @returns The contract account. */ createContract(name: NameType, folder: string, sendsInline?: boolean): Account; /** * Time */ setTime(time: TimePoint | TimePointSec): void; addTime(time: TimePoint | TimePointSec): void; subtractTime(time: TimePoint | TimePointSec): void; /** * Reset */ resetTransaction(): Promise; resetVm(): Promise; clearConsole(): void; resetTables(store?: TableStore): void; }