Summary
`GenerateKeyExample.java` currently generates an ED25519 key pair using `PrivateKey.generateED25519()`. This is misleading because ECDSA (secp256k1) with an EVM address derived from the public key is now the recommended key type for new Hedera accounts.
File: `examples/src/main/java/com/hedera/hashgraph/sdk/examples/GenerateKeyExample.java`
https://github.com/hiero-ledger/hiero-sdk-java/blob/main/examples/src/main/java/com/hedera/hashgraph/sdk/examples/GenerateKeyExample.java
Current behavior
```java
PrivateKey privateKey = PrivateKey.generateED25519();
```
The example only shows ED25519 key generation and does not demonstrate ECDSA key creation or EVM address derivation.
Desired behavior
Update the example to:
- Use `PrivateKey.generateECDSA()` as the primary (recommended) path.
- Show how to derive the EVM address from the ECDSA public key.
- See this example: https://portal.hedera.com/playground/session/0.0.7785355/9
Why
Hedera is actively migrating the ecosystem toward ECDSA (secp256k1) keys with EVM addresses derived from the public key. This aligns Hedera accounts with Ethereum tooling (MetaMask, Hardhat, ethers.js, wagmi) and enables full EVM compatibility.
Leaving this example as ED25519-only reinforces the wrong default for developers learning the SDK.
Summary
`GenerateKeyExample.java` currently generates an ED25519 key pair using `PrivateKey.generateED25519()`. This is misleading because ECDSA (secp256k1) with an EVM address derived from the public key is now the recommended key type for new Hedera accounts.
File: `examples/src/main/java/com/hedera/hashgraph/sdk/examples/GenerateKeyExample.java`
https://github.com/hiero-ledger/hiero-sdk-java/blob/main/examples/src/main/java/com/hedera/hashgraph/sdk/examples/GenerateKeyExample.java
Current behavior
```java
PrivateKey privateKey = PrivateKey.generateED25519();
```
The example only shows ED25519 key generation and does not demonstrate ECDSA key creation or EVM address derivation.
Desired behavior
Update the example to:
Why
Hedera is actively migrating the ecosystem toward ECDSA (secp256k1) keys with EVM addresses derived from the public key. This aligns Hedera accounts with Ethereum tooling (MetaMask, Hardhat, ethers.js, wagmi) and enables full EVM compatibility.
Leaving this example as ED25519-only reinforces the wrong default for developers learning the SDK.