use of com.hedera.hashgraph.sdk.AccountInfoQuery in project hedera-sdk-java by hashgraph.
the class GetAccountInfoExample method main.
public static void main(String[] args) throws PrecheckStatusException, TimeoutException {
Client client = Client.forName(HEDERA_NETWORK);
// Defaults the operator account ID and key such that all generated transactions will be paid for
// by this account and be signed by this key
client.setOperator(OPERATOR_ID, OPERATOR_KEY);
AccountInfo info = new AccountInfoQuery().setAccountId(client.getOperatorAccountId()).setQueryPayment(new Hbar(1)).execute(client);
System.out.println("info.key = " + info.key);
System.out.println("info.isReceiverSignatureRequired = " + info.isReceiverSignatureRequired);
System.out.println("info.expirationTime = " + info.expirationTime);
}
Aggregations