Exemple #1
0
        public static byte[] FromString(string wif, out Network network, out DataTypePrefix type)
        {
            var bytes = Encoders.Base58Check.GetBytes(wif);

            network = Network.GetFromPrefix(bytes, out type);
            var prefix = network.GetPrefixBytes(type);

            return(bytes.Slice(prefix.Length));
        }
Exemple #2
0
        public static string ToString(byte[] wif, DataTypePrefix type, Network network)
        {
            var prefix = network.GetPrefixBytes(type);

            return(Encoders.Base58Check.GetString(prefix.Concat(wif)));
        }
Exemple #3
0
 public byte[] ToByteArray()
 {
     return(Network.GetPrefixBytes(Type).Concat(Bytes));
 }