Exemple #1
0
 public Address(string encoded)
     : base(encoded)
 {
     if (this.RawKeyLength != 20)
     {
         throw new ArgumentException(LengthError);
     }
     if (this.Version != Nets.Get <N>().AddressPrefix)
     {
         throw new ArgumentException(NetworkMismatch.With(typeof(N).Name));
     }
 }
Exemple #2
0
 public WifKey(string encoded)
     : base(encoded)
 {
     if (this.RawKeyLength != 32)
     {
         throw new ArgumentException(LengthError);
     }
     if (this.Version != Nets.Get <N>().PrivateKeyPrefix)
     {
         throw new ArgumentException(NetworkMismatch.With(typeof(N).Name));
     }
 }
Exemple #3
0
 public Address(IEnumerable <byte> publicKey)
     : base(Nets.Get <N>().AddressPrefix, publicKey.Sha256().RipeMD160())
 {
 }
Exemple #4
0
 public WifKey(IEnumerable <byte> privateKey)
     : base(Nets.Get <N>().PrivateKeyPrefix, privateKey)
 {
 }