import { SortKeyCacheResult } from '../cache/SortKeyCache'; import { ContractCallRecord } from '../core/ContractCallRecord'; import { InteractionResult } from '../core/modules/impl/HandlerExecutorFactory'; import { EvalStateResult, EvaluationOptions } from '../core/modules/StateEvaluator'; import { Warp } from '../core/Warp'; import { GQLNodeInterface } from '../legacy/gqlResult'; import { BenchmarkStats, Contract, DREContractStatusResponse, InnerCallData, WriteInteractionOptions, WriteInteractionResponse } from './Contract'; import { ArTransfer, ArWallet, Tags } from './deploy/CreateContract'; import { CustomSignature } from './Signature'; import { EvaluationOptionsEvaluator } from './EvaluationOptionsEvaluator'; import { Transaction } from '../utils/types/arweave-types'; import { InteractionState } from './states/InteractionState'; import { Signer } from 'warp-arbundles'; /** * 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 warp: Warp; private readonly _parentContract; private readonly _innerCallData; private readonly logger; private readonly ecLogger; private readonly _innerWritesEvaluator; private readonly _callDepth; private readonly _arweaveWrapper; private readonly _mutex; private _callStack; private _evaluationOptions; private _eoEvaluator; private _benchmarkStats; private _sorter; private _rootSortKey; private _signature; private _warpFetchWrapper; private _children; private _interactionState; private _dreStates; private maxInteractionDataItemSizeBytes; constructor(_contractTxId: string, warp: Warp, _parentContract?: Contract, _innerCallData?: InnerCallData); readState(sortKeyOrBlockHeight?: string | number, interactions?: GQLNodeInterface[], signal?: AbortSignal, state?: SortKeyCacheResult>): Promise>>; readStateFor(sortKey: string, interactions: GQLNodeInterface[], signal?: AbortSignal, state?: SortKeyCacheResult>): Promise>>; readStateBatch(pagesPerBatch?: number, sortKey?: string, signal?: AbortSignal): Promise>>; viewState(input: Input, tags?: Tags, transfer?: ArTransfer, caller?: string, signal?: AbortSignal, sortKey?: string): Promise>; viewStateForTx(input: Input, interactionTx: GQLNodeInterface, signal?: AbortSignal): Promise>; dryWrite(input: Input, caller?: string, tags?: Tags, transfer?: ArTransfer, vrf?: boolean, sortKey?: string): Promise>; applyInput(input: Input, transaction: GQLNodeInterface, signal?: AbortSignal): Promise>; writeInteraction(input: Input, options?: WriteInteractionOptions): Promise; private bundleInteraction; private createInteractionDataItem; createInteraction(input: Input, tags: Tags, transfer: ArTransfer, strict: boolean, bundle?: boolean, vrf?: boolean, reward?: string): Promise; private checkInteractionInStrictMode; txId(): string; getCallStack(): ContractCallRecord; connect(signature: ArWallet | CustomSignature | Signer): Contract; setEvaluationOptions(options: Partial): Contract; private waitForConfirmation; private createExecutionContext; private getSortedInteractions; private resolveEvaluationOptions; private getRemoteContractState; private fetchRemoteContractState; private getToSortKey; private createExecutionContextFromTx; private maybeResetRootContract; private callContract; private doApplyInputOnTx; private evalInteraction; parent(): Contract | null; callDepth(): number; evaluationOptions(): EvaluationOptions; lastReadStateStats(): BenchmarkStats; stateHash(state: State): Promise; syncState(externalUrl: string, params?: any): Promise; evolve(newSrcTxId: string, options?: WriteInteractionOptions): Promise; get rootSortKey(): string; getRootEoEvaluator(): EvaluationOptionsEvaluator; isRoot(): boolean; getStorageValues(keys: string[]): Promise>>; interactionState(): InteractionState; getRoot(): HandlerBasedContract; private maybeSyncStateWithRemoteSource; private isStateHigherThanAndUpTo; setDREState(contractTxId: string, result: DREContractStatusResponse): SortKeyCacheResult>; getDreState(contractTxId: string): SortKeyCacheResult>; hasDreState(contractTxId: string): boolean; private discoverInternalWrites; clearChildren(): void; private createManifest; } //# sourceMappingURL=HandlerBasedContract.d.ts.map