Build your Hedera client
1. Configure your Hedera network
// From a pre-configured network
Client client = Client.forTestnet();
//Replace nodes
Map<AccountId, String> nodes = new HashMap<>();
nodes.put(AccountId.fromString("0.0.10"), "34.94.106.61:50211" ,);
client.replaceNodes(nodes);
//v1.3.2// From a pre-configured network
const client = Client.forTestnet();
//v1.4.42. Define the operator account ID and private key
Method
Type
From an account ID and private key
From a .env file
3. Additional client modifications
Method
Type
Description
Last updated