neuter method

HDNode neuter()

Return a new instance of hdNode with its private key removed but all other properties preserved. This ensures that the key can not leak the private key of itself or any derived children, but may still be used to compute the addresses of itself and any non-hardened children.

Implementation

HDNode neuter() {
  var newHDNode = this;
  newHDNode.privateKey = null;
  return newHDNode;
}