import { ApplyRequestsDto, BatchDto, ChainError, ContractAPI, DryRunDto, DryRunResultDto, ErrorCode, GalaChainErrorResponse, GalaChainResponse, GetObjectDto, GetObjectHistoryDto, HasPendingApplyRequestsDto, ValidationFailedError } from "@gala-chain/api"; import { Contract } from "fabric-contract-api"; import { GalaChainContext, GalaChainContextConfig } from "../types"; import type { RequestMethodHandler } from "./GalaTransactionRequest"; export declare class BatchWriteLimitExceededError extends ValidationFailedError { constructor(writesLimit: number); } export declare class BatchPartialSuccessRequiredError extends ChainError { readonly code: ErrorCode; constructor(index: number, error: GalaChainErrorResponse); } export declare abstract class GalaContract extends Contract { private readonly version; private readonly config; protected readonly requestMethodHandlers: Record; /** * @param name Contract name * @param version Contract version. The actual value should be defined in the child * * class, and should be taken from package.json. If you extend contract class * * that extends GalaContract, you should also override version. */ constructor(name: string, version: string, config?: GalaChainContextConfig); getVersion(): string; createContext(): GalaChainContext; /** * SERVER span covering the full Fabric lifecycle (before → around → after). * Safe to call multiple times; only the first call starts the span. */ private ensureOtelTransactionSpan; beforeTransaction(ctx: GalaChainContext): Promise; aroundTransaction(ctx: GalaChainContext, fn: Function, parameters: unknown): Promise; afterTransaction(ctx: GalaChainContext, result: unknown): Promise; GetContractVersion(ctx: GalaChainContext): Promise; GetChaincodeVersion(ctx: GalaChainContext): Promise; GetContractAPI(ctx: GalaChainContext): Promise; getContractAPI(): ContractAPI; GetObjectByKey(ctx: GalaChainContext, dto: GetObjectDto): Promise>; GetObjectHistory(ctx: GalaChainContext, dto: GetObjectHistoryDto): Promise>; DryRun(ctx: GalaChainContext, dto: DryRunDto): Promise; BatchSubmit(ctx: GalaChainContext, batchDto: BatchDto): Promise[]>; ApplyRequests(ctx: GalaChainContext, dto: ApplyRequestsDto): Promise[]>; HasPendingApplyRequests(ctx: GalaChainContext, dto: HasPendingApplyRequestsDto): Promise; BatchEvaluate(ctx: GalaChainContext, batchDto: BatchDto): Promise[]>; } //# sourceMappingURL=GalaContract.d.ts.map