Class ConsensusServiceGrpc.ConsensusServiceStub

java.lang.Object
io.grpc.stub.AbstractStub<ConsensusServiceGrpc.ConsensusServiceStub>
io.grpc.stub.AbstractAsyncStub<ConsensusServiceGrpc.ConsensusServiceStub>
com.hedera.hashgraph.sdk.proto.ConsensusServiceGrpc.ConsensusServiceStub
Enclosing class:
ConsensusServiceGrpc

public static final class ConsensusServiceGrpc.ConsensusServiceStub extends io.grpc.stub.AbstractAsyncStub<ConsensusServiceGrpc.ConsensusServiceStub>
A stub to allow clients to do asynchronous rpc calls to service ConsensusService.

 The Hedera Consensus Service (HCS) provides the ability for a Hashgraph to
 provide aBFT consensus as to the order and validity of messages submitted to
 a *topic*, as well as a *consensus timestamp* for those messages.
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub

    io.grpc.stub.AbstractStub.StubFactory<T extends io.grpc.stub.AbstractStub<T>>
  • Method Summary

    Modifier and Type
    Method
    Description
    build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
     
    void
    createTopic(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
    Create an HCS topic.
    void
    deleteTopic(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
    Delete an HCS topic.
    void
    getTopicInfo(Query request, io.grpc.stub.StreamObserver<Response> responseObserver)
    Retrieve the latest state of a topic.
    void
    submitMessage(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
    Submit a message to an HCS topic.
    void
    updateTopic(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
    Update an HCS topic.

    Methods inherited from class io.grpc.stub.AbstractAsyncStub

    newStub, newStub

    Methods inherited from class io.grpc.stub.AbstractStub

    getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOnReadyThreshold, withOption, withWaitForReady

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • build

      protected ConsensusServiceGrpc.ConsensusServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      Specified by:
      build in class io.grpc.stub.AbstractStub<ConsensusServiceGrpc.ConsensusServiceStub>
    • createTopic

      public void createTopic(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
      
       Create an HCS topic.
       <p>
       On success, the resulting TransactionReceipt SHALL contain the newly
       created TopicId.<br/>
       If the `adminKey` is set on the topic, this transaction MUST be signed
       by that key.<br/>
       If the `adminKey` is _not_ set on the topic, this transaction MUST NOT
       set an `autoRenewAccount`. The new topic will be immutable and must be
       renewed manually.<br/>
       If the `autoRenewAccount` is set on the topic, this transaction MUST be
       signed by that account.<br/>
       <p>
       The request body MUST be a
       [ConsensusCreateTopicTransactionBody](#proto.ConsensusCreateTopicTransactionBody)
       
    • updateTopic

      public void updateTopic(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
      
       Update an HCS topic.
       <p>
       If the `adminKey` is not set on the topic, this transaction MUST extend
       the `expirationTime` and MUST NOT modify any other field.<br/>
       If the `adminKey` is set on the topic, this transaction MUST be signed
       by that key.<br/>
       If this transaction sets a new `adminKey`, this transaction MUST be
       signed by <strong>_both_</strong> keys, the pre-update `adminKey` and
       the post-update `adminKey`.<br/>
       If this transaction sets a new, non-null, `autoRenewAccount`, the newly
       set account MUST sign this transaction.<br/>
       <p>
       The request body MUST be a
       [ConsensusUpdateTopicTransactionBody](#proto.ConsensusUpdateTopicTransactionBody)
       
    • deleteTopic

      public void deleteTopic(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
      
       Delete an HCS topic.
       <p>
       If this transaction succeeds, all subsequent transactions referencing
       the deleted topic SHALL fail.<br/>
       The `adminKey` MUST be set on the topic and this transaction MUST be
       signed by that key.<br/>
       If the `adminKey` is not set on the topic, this transaction SHALL fail
       with a response code of `UNAUTHORIZED`. A topic without an `adminKey`
       cannot be deleted, but MAY expire.<br/>
       <p>
       The request body MUST be a
       [ConsensusDeleteTopicTransactionBody](#proto.ConsensusDeleteTopicTransactionBody)
       
    • submitMessage

      public void submitMessage(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
      
       Submit a message to an HCS topic.
       <p>
       Valid and authorized messages on valid topics will be ordered by the
       consensus service, published in the block stream, and available to all
       subscribers on this topic via the mirror nodes.<br/>
       If this transaction succeeds the resulting TransactionReceipt SHALL
       contain the latest topicSequenceNumber and topicRunningHash for the
       topic.<br/>
       If the topic has a `submitKey` then that key MUST sign this
       transaction.<br/>
       <p>
       The request body MUST be a
       [ConsensusSubmitMessageTransactionBody](#proto.ConsensusSubmitMessageTransactionBody)
       
    • getTopicInfo

      public void getTopicInfo(Query request, io.grpc.stub.StreamObserver<Response> responseObserver)
      
       Retrieve the latest state of a topic. This method is unrestricted and
       allowed on any topic by any payer account.
       <p>
       The request body MUST be a
       [ConsensusGetTopicInfoQuery](#proto.ConsensusGetTopicInfoQuery)<br/>
       The response body SHALL be a
       [ConsensusGetTopicInfoResponse](#proto.ConsensusGetTopicInfoResponse)