UNPKG

@factorial-finance/blueprint-node

Version:

blueprint-node-plugin

31 lines (30 loc) 1.44 kB
import { Blockchain, BlockchainTransaction, GetMethodResult, SmartContract } from '@ton/sandbox'; import { Address, Cell, Dictionary, TupleItem } from '@ton/core'; export declare class BlockchainService { blockchain: Blockchain | null; private readonly txs; private readonly fork?; private readonly endpoint?; constructor(fork?: 'mainnet' | 'testnet'); initialize(): Promise<void>; private createBlockchain; private initializeTestWallets; private setupLibraries; private ensureBlockchainInitialized; setBalance(address: Address, balance: bigint): Promise<void>; increaseBalance(address: Address, amount: bigint): Promise<void>; setAccountCode(address: Address, code: Cell): Promise<void>; setAccountData(address: Address, data: Cell): Promise<void>; addLibrary(library: Cell): Promise<void>; private getCurrentLibraries; setLibraries(libraries: Cell): Promise<void>; getLibraries(): Promise<Dictionary<bigint, Cell>>; sendBoc(boc: string): Promise<BlockchainTransaction[]>; getContract(address: Address): Promise<SmartContract>; runGetMethod(address: Address, method: string, stack: TupleItem[]): Promise<GetMethodResult>; getBlockchain(): Blockchain; private addTransactions; getTransactions(address: bigint | string | Address): BlockchainTransaction[]; getCurrentTime(): number; getCodeHash(address: Address): Promise<string | null>; }