public List <RegistrationCapsule> GetAllAsCapsules() { List <RegistrationCapsule> capsuleList = new List <RegistrationCapsule>(); foreach (RegistrationRecord record in GetRecordsOrCreateFile()) { RegistrationCapsule tempCapsule = new RegistrationCapsule(record.RecordTxProof, Transaction.Parse(record.RecordTxHex)); capsuleList.Add(tempCapsule); } return(capsuleList); }
public void AddCapsule(RegistrationCapsule capsule, Network network) { RegistrationToken token = new RegistrationToken(); token.ParseTransaction(capsule.RegistrationTransaction, network); RegistrationRecord record = new RegistrationRecord(DateTime.Now, Guid.NewGuid(), capsule.RegistrationTransaction.GetHash().ToString(), capsule.RegistrationTransaction.ToHex(), token, capsule.RegistrationTransactionProof); Add(record); }