getPrivateKey

suspend fun getPrivateKey(index: Int = 0): ByteArray

Gets the raw 32-byte Ed25519 private key at the specified index.

Security Warning: This method returns sensitive key material. Handle with care:

  • Never log the returned bytes

  • Zero the array when no longer needed

  • Never expose to untrusted code

Return

32-byte Ed25519 private key (seed)

Parameters

index

Account index (default: 0)

Throws

if index is negative