Summary
The Go KeyPair interface exposes PrivateKey() ([]byte, error) to retrieve the encoded private key. The .NET KeyPair class does not have an equivalent method.
Approach
Add a GetPrivateKey() method to KeyPair, following the naming convention of the existing GetSeed() and GetPublicKey() methods. Should throw NKeysException when no private key is available (e.g., public-key-only instances).
Purely additive — no existing API changes needed.
Summary
The Go
KeyPairinterface exposesPrivateKey() ([]byte, error)to retrieve the encoded private key. The .NETKeyPairclass does not have an equivalent method.Approach
Add a
GetPrivateKey()method toKeyPair, following the naming convention of the existingGetSeed()andGetPublicKey()methods. Should throwNKeysExceptionwhen no private key is available (e.g., public-key-only instances).Purely additive — no existing API changes needed.