Example #1
0
        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);
        }
Example #2
0
        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);
        }