getPrivateKey method

IPrivateKey getPrivateKey(
  1. int changeIndex,
  2. int addrIndex
)

Get a private key for a specific change and address index, throwing an exception if it's a public-only key.

Implementation

IPrivateKey getPrivateKey(int changeIndex, int addrIndex) {
  if (isPublicOnly) {
    throw const MessageException(
        'Public-only deterministic keys have no private half');
  }
  return _derivePrivateKey(changeIndex, addrIndex);
}