예제 #1
0
        public static string ToZpub(this ExtPubKey extPubKey, Network network)
        {
            var data    = extPubKey.ToBytes();
            var version = (network == Network.Main)
                                ? new byte[] { (0x04), (0xB2), (0x47), (0x46) }
                                : new byte[] { (0x04), (0x5F), (0x1C), (0xF6) };

            return(Encoders.Base58Check.EncodeData(version.Concat(data).ToArray()));
        }
 /// <summary>
 /// Constructor. Creates a representation of an extended public key, within the specified network.
 /// </summary>
 public BitcoinExtPubKey(ExtPubKey key, Network network)
     : base(key.ToBytes(), network)
 {
 }