Hedera Consensus Service gRPC API
The Hedera Consensus Service (HCS) gRPC API is a public mirror node managed by Hedera for the testnet. It offers the ability to subscribe to HCS topics and receive messages for the topic subscribed.
Community-supported mirror node information can be found here:
If you building your client with a predefined Hedera network (previewnet, testnet, mainnet), you do not need to define the mirror client as it is built in. If you would like to modify the mirror client, you can use
Client.<network>.setMirrorNetwork(<network>). Public Mainnet Mirror Node The default mainnet mirror node points to the whitelisted node when using
Client.forMainnet(). To establish a connection to the public mainnet mirror node you will need to upgrade to one of the following versions of the SDK that now supports TLS connections.
- Java: v2.0.6+
- Go: v2.1.9+
//You will need to upgrade to v2.0.6 or higher
Client client = Client.forMainnet();
//You will need to upgrade to v2.0.23 or higher
const client = Client.forMainnet()
final MirrorClient mirrorClient = new MirrorClient(MIRROR_NODE_ADDRESS);
const mirrorClient = new MirrorClient(mirrorNodeAddress);
Please click the link below to see how you can subscribe to a topic.