import { Address, Cell, Contract, ContractGetMethodResult, ContractProvider, ContractState, ExtraCurrency, Message, OpenedContract, Sender, SendMode, StateInit, Transaction, TupleItem } from '@ton/core'; import { TickOrTock } from '../executor/Executor'; import { GetMethodResult, SmartContract } from './SmartContract'; import { BlockchainTransaction } from './Blockchain'; export interface SandboxContractProvider extends ContractProvider { tickTock(which: TickOrTock): Promise; } /** * Provider used in contracts to send messages or invoke getters. For additional information see {@link Blockchain.provider} */ export declare class BlockchainContractProvider implements SandboxContractProvider { private readonly blockchain; private readonly address; private readonly init?; constructor(blockchain: { getTransactions(address: Address, opts?: { limit?: number; lt?: string | bigint; hash?: string | Buffer; }): Promise; getContract(address: Address): Promise; pushMessage(message: Message): Promise; runGetMethod(address: Address, method: string, args: TupleItem[]): Promise; pushTickTock(on: Address, which: TickOrTock): Promise; openContract(contract: T): OpenedContract; }, address: Address, init?: (StateInit | null) | undefined); /** * Opens contract. For additional information see {@link Blockchain.open} */ open(contract: T): OpenedContract; getState(): Promise; /** * Invokes get method. * @param name Name of get method * @param args Args to invoke get method. */ get(name: string, args: TupleItem[]): Promise; /** * Retrieves transactions for the specified address using the provided logical time (lt), hash, and optional limit. * This implementation fetches transactions directly from the underlying blockchain instance. * * @param address - The address to retrieve transactions for. * @param lt - Logical time of transaction to start with, must be used with hash. * @param hash - Hash of transaction to start with, in buffer or hex encoding, must be sent with lt. * @param limit - Optional maximum number of transactions to fetch. * @returns An array of transactions. */ getTransactions(address: Address, lt: bigint, hash: Buffer, limit?: number | undefined): Promise; /** * Pushes external-in message to message queue. * @param message Message to push */ external(message: Cell): Promise; /** * Pushes internal message to message queue. */ internal(via: Sender, args: { value: string | bigint; extracurrency?: ExtraCurrency; bounce?: boolean | null; sendMode?: SendMode; body?: string | Cell | null; }): Promise; /** * Pushes tick-tock message to message queue. */ tickTock(which: TickOrTock): Promise; }