import { ArTransfer, ArWallet, BenchmarkStats, Contract, ContractCallStack, CurrentTx, EvalStateResult, EvaluationOptions, GQLNodeInterface, InteractionResult, SigningFunction, SmartWeave, Tags } from '..'; import { NetworkInfoInterface } from 'arweave/node/network'; /** * An implementation of {@link Contract} that is backwards compatible with current style * of writing SW contracts (ie. using the "handle" function). * * It requires {@link ExecutorFactory} that is using {@link HandlerApi} generic type. */ export declare class HandlerBasedContract implements Contract { private readonly _contractTxId; protected readonly smartweave: SmartWeave; private readonly _parentContract; private readonly _callingInteraction; private readonly logger; private _callStack; private _evaluationOptions; /** * current Arweave networkInfo that will be used for all operations of the SmartWeave protocol. * Only the 'root' contract call should read this data from Arweave - all the inner calls ("child" contracts) * should reuse this data from the parent ("calling") contract. */ private _networkInfo?; private _rootBlockHeight; private readonly _innerWritesEvaluator; private readonly _callDepth; private _benchmarkStats; private readonly _arweaveWrapper; /** * wallet connected to this contract */ protected signer?: SigningFunction; constructor(_contractTxId: string, smartweave: SmartWeave, _parentContract?: Contract, _callingInteraction?: GQLNodeInterface); readState(blockHeight?: number, currentTx?: CurrentTx[]): Promise>; readStateSequencer(blockHeight: number, upToTransactionId: string, currentTx?: CurrentTx[]): Promise>; viewState(input: Input, blockHeight?: number, tags?: Tags, transfer?: ArTransfer): Promise>; viewStateForTx(input: Input, interactionTx: GQLNodeInterface): Promise>; dryWrite(input: Input, caller?: string, tags?: Tags, transfer?: ArTransfer): Promise>; dryWriteFromTx(input: Input, transaction: GQLNodeInterface, currentTx?: CurrentTx[]): Promise>; writeInteraction(input: Input, tags?: Tags, transfer?: ArTransfer, strict?: boolean): Promise; bundleInteraction(input: Input, options?: { tags: Tags; strict: boolean; vrf: boolean; }): Promise; private createInteraction; txId(): string; getCallStack(): ContractCallStack; getNetworkInfo(): Partial; connect(signer: ArWallet | SigningFunction): Contract; setEvaluationOptions(options: Partial): Contract; getRootBlockHeight(): number; private waitForConfirmation; private createExecutionContext; private createExecutionContextFromTx; private maybeResetRootContract; private callContract; private callContractForTx; private evalInteraction; parent(): Contract | null; callDepth(): number; evaluationOptions(): EvaluationOptions; lastReadStateStats(): BenchmarkStats; stateHash(state: State): string; syncState(nodeAddress: string): Promise; } //# sourceMappingURL=HandlerBasedContract.d.ts.map