Esempio n. 1
0
        public ExtKey Derive(uint nChild)
        {
            var result = new ExtKey();

            result.nDepth         = (byte)(nDepth + 1);
            result.vchFingerprint = CalculateChildFingerprint();
            result.nChild         = nChild;
            result.key            = key.Derivate(this.vchChainCode, nChild, out result.vchChainCode);
            return(result);
        }
Esempio n. 2
0
        public ExtKey Derive(uint nChild)
        {
            var result = new ExtKey();

            result.nDepth         = (byte)(nDepth + 1);
            result.vchFingerprint = key.PubKey.ID.ToBytes().Take(result.vchFingerprint.Length).ToArray();
            result.nChild         = nChild;
            result.key            = key.Derivate(this.vchChainCode, nChild, out result.vchChainCode);
            return(result);
        }
Esempio n. 3
0
        /// <summary>
        /// Derives a new extended key in the hierarchy as the given child number.
        /// </summary>
        public ExtKey Derive(uint index)
        {
            var result = new ExtKey
            {
                nDepth            = (byte)(nDepth + 1),
                parentFingerprint = this.key.PubKey.GetHDFingerPrint(),
                nChild            = index
            };

            result.key = key.Derivate(this.vchChainCode, index, out result.vchChainCode);
            return(result);
        }
Esempio n. 4
0
        public ExtKey Derive(uint index)
        {
            var result = new ExtKey
            {
                nDepth         = (byte)(nDepth + 1),
                vchFingerprint = CalculateChildFingerprint(),
                nChild         = index
            };

            result.key = key.Derivate(this.vchChainCode, index, out result.vchChainCode);
            return(result);
        }
Esempio n. 5
0
        public ExtKey Derive(uint index)
        {
            var childkey = key.Derivate(this.vchChainCode, index, out var childcc);

            return(new ExtKey(childkey, childcc, (byte)(nDepth + 1), this.key.PubKey.GetHDFingerPrint(), index));
        }