Interface Proposal

All Superinterfaces:
Signable

public interface Proposal extends Signable
A Fabric Gateway transaction proposal, which can be used to evaluate a transaction to query ledger state, or obtain endorsements so that the transaction can be submitted to update ledger state. Supports off-line signing flow using Gateway.newSignedChaincodeEventsRequest(byte[], byte[]).
  • Method Details

    • getTransactionId

      String getTransactionId()
      Get the transaction ID.
      Returns:
      A transaction ID.
    • evaluate

      default byte[] evaluate() throws GatewayException
      Evaluate the proposal and return the transaction result. The transaction is not submitted to the orderer and is not committed to the ledger.
      Returns:
      Transaction result.
      Throws:
      GatewayException - if the gRPC service invocation fails.
    • evaluate

      byte[] evaluate(UnaryOperator<CallOptions> options) throws GatewayException
      Evaluate the proposal and return the transaction result. The transaction is not submitted to the orderer and is not committed to the ledger.
      Parameters:
      options - Function that transforms call options.
      Returns:
      Transaction result.
      Throws:
      GatewayException - if the gRPC service invocation fails.
    • evaluate

      @Deprecated default byte[] evaluate(CallOption... options) throws GatewayException
      Deprecated.
      Evaluate the proposal and return the transaction result. The transaction is not submitted to the orderer and is not committed to the ledger.
      Parameters:
      options - Call options.
      Returns:
      Transaction result.
      Throws:
      GatewayException - if the gRPC service invocation fails.
    • endorse

      default Transaction endorse() throws EndorseException
      Send the proposal to peers to obtain endorsements. Successful endorsement results in a transaction that can be submitted to the orderer to be committer to the ledger.
      Returns:
      An endorsed transaction.
      Throws:
      EndorseException - if the gRPC service invocation fails.
    • endorse

      Send the proposal to peers to obtain endorsements. Successful endorsement results in a transaction that can be submitted to the orderer to be committer to the ledger.
      Parameters:
      options - Function that transforms call options.
      Returns:
      An endorsed transaction.
      Throws:
      EndorseException - if the gRPC service invocation fails.
    • endorse

      @Deprecated default Transaction endorse(CallOption... options) throws EndorseException
      Deprecated.
      Send the proposal to peers to obtain endorsements. Successful endorsement results in a transaction that can be submitted to the orderer to be committer to the ledger.
      Parameters:
      options - Call options.
      Returns:
      An endorsed transaction.
      Throws:
      EndorseException - if the gRPC service invocation fails.