Esempio n. 1
0
 public Address(byte[] data, AddressType type, Network network = null)
 {
     if (data.Length != ADDRESS_SIZE)
     {
         throw new ArgumentException("Invalid Address");
     }
     Data = data;
     Type = type;
     Network = (network ?? Network.Default);
 }
Esempio n. 2
0
 internal PublicKey(byte[] data, Network network, bool @unsafe)
 {
     if (data == null)
     {
         throw new ArgumentNullException("bytes");
     }
     if (data.Length == 65 || data.Length == 33)
     {
         IsCompressed = (data.Length == 33);
     }
     else
     {
         throw new ArgumentException("Invalid public key size");
     }
     if (!Check(data, !@unsafe))
     {
         throw new FormatException("Invalid public key");
     }
     Data = data;
     Network = (network ?? Network.Default);
 }
Esempio n. 3
0
 public PublicKey(byte[] data, Network network = null)
     : this(data, network, false)
 {
 }
Esempio n. 4
0
 public PublicKey(string hex, Network network = null)
     : this(HexEncoding.Instance.GetBytes(hex), network)
 {
 }
Esempio n. 5
0
 internal AddressBase58DataInformation(Network network, Type type, byte[] data, AddressType addressType)
     : base(network, type, data)
 {
     AddressType = addressType;
 }
Esempio n. 6
0
 public Address(string hex, AddressType type, Network network = null)
     : this(HexEncoding.Instance.GetBytes(hex), type, network)
 {
 }
Esempio n. 7
0
 internal AddressPresentabilityTransformer(Network network, AddressType addressType)
 {
     _network = network;
     _addressType = addressType;
 }