UNPKG

@broxus/locklift-network

Version:

In-memory TVM-blockchain emulator for locklift

44 lines (43 loc) 1.83 kB
import * as nt from "nekoton-wasm"; import { BlockchainConfig } from "nekoton-wasm"; import { Address } from "everscale-inpage-provider"; import { AccountFetcherCallback } from "../types"; import { Cell } from "@ton/core"; interface LockliftTransport { getBlockchainConfig(): Promise<BlockchainConfig>; setExecutor(executor: LockliftExecutor): void; } export declare class LockliftExecutor { private readonly transport; private readonly accountFetcherCallback?; private state; private snapshots; private nonce; private blockchainConfig; private globalId; private clock; private tychoExecutor; blockchainLt: bigint; constructor(transport: LockliftTransport, accountFetcherCallback?: AccountFetcherCallback | undefined); private createInitialBlockchainState; initialize(): Promise<void>; setClock(clock: nt.ClockWithOffset): void; _setAccount1(address: Address | string, boc: string): void; _setLibrary(key: bigint, cell: Cell): void; setAccount(address: Address | string, boc: string, type: "accountStuffBoc" | "fullAccountBoc"): void; _getAccount(address: Address | string): Promise<string | undefined>; getAccounts(): Record<string, nt.FullContractState>; getTxTrace(txId: string): nt.EngineTraceInfo[] | undefined; private saveTransaction; getDstTransaction(msgHash: string): nt.JsRawTransaction | undefined; getTransaction(id: string): nt.JsRawTransaction | undefined; getTransactions(address: Address | string, fromLt: string, count: number): nt.JsRawTransaction[]; saveSnapshot(): number; loadSnapshot(id: number): void; clearSnapshots(): void; resetBlockchainState(): void; processQueue(): Promise<void>; processNextMsg(): Promise<void>; enqueueMsg(message: nt.JsRawMessage): void; } export {};