public HDNode(ExtKey masterKey) { this._masterKey = masterKey; this.PrivateKey = masterKey.PrivateKey.ToBytes(); this.PublicKey = Secp256k1.DerivePublicKey(this.PrivateKey); this.ChainCode = masterKey.ChainCode; this.NodeType = HDNodeType.PrivateKey; }
private HDNode(Wallet wallet, HDNodeType type) { this._wallet = wallet; this.PrivateKey = wallet.GetPrivateKey(0); this.PublicKey = wallet.GetPublicKey(0); this.ChainCode = wallet.GetKey(0).ChainCode; this.NodeType = HDNodeType.Seed; }