import { CallOptions } from '@grpc/grpc-js'; import { gateway } from '@hyperledger/fabric-protos'; import { GatewayClient } from './client'; import { Signable } from './signable'; import { SigningIdentity } from './signingidentity'; import { Transaction } from './transaction'; /** * Proposal represents a transaction proposal that can be sent to peers for endorsement or evaluated as a query. */ export interface Proposal extends Signable { /** * Get the transaction ID for this proposal. */ getTransactionId(): string; /** * Evaluate the transaction proposal and obtain its result, without updating the ledger. This runs the transaction * on a peer to obtain a transaction result, but does not submit the endorsed transaction to the orderer to be * committed to the ledger. * @param options - gRPC [CallOptions](https://grpc.github.io/grpc/node/grpc.Client.html#~CallOptions). * @returns The result returned by the transaction function. * @throws {@link GatewayError} * Thrown if the gRPC service invocation fails. */ evaluate(options?: CallOptions): Promise; /** * Obtain endorsement for the transaction proposal from sufficient peers to allow it to be committed to the ledger. * @param options - gRPC [CallOptions](https://grpc.github.io/grpc/node/grpc.Client.html#~CallOptions). * @returns An endorsed transaction that can be submitted to the ledger. * @throws {@link EndorseError} * Thrown if the gRPC service invocation fails. */ endorse(options?: CallOptions): Promise; } export interface ProposalImplOptions { client: GatewayClient; signingIdentity: SigningIdentity; channelName: string; proposedTransaction: gateway.ProposedTransaction; } export declare class ProposalImpl implements Proposal { #private; constructor(options: Readonly); getBytes(): Uint8Array; getDigest(): Uint8Array; getTransactionId(): string; evaluate(options?: Readonly): Promise; endorse(options?: Readonly): Promise; setSignature(signature: Uint8Array): void; } //# sourceMappingURL=proposal.d.ts.map