Пример #1
0
 public Transaction(Output[] Outputs, string Id = null)
 {
     this.Id             = Id ?? HashUtil.Sha1(RandomUtil.Bytes());
     this.Outputs        = Outputs;
     Type                = TransactionType.REWARD;
     InputsConcatenated  = Inputs.Map(In => In.ToString()).Reduce(R.Concat, "");
     OutputsConcatenated = Outputs.Map(Out => Out.ToString()).Reduce(R.Concat, "");
 }
Пример #2
0
 public void Sign(SharpKeyPair Skp)
 {
     Signature = Skp.Sign(HashUtil.Sha1(ToString()));
 }
Пример #3
0
 public bool Verify()
 {
     return(Signature.Verify(HashUtil.Sha1(ToString())) && Inputs.All(In => In.Verify()));
 }