Example #1
0
        public TrackedTransaction(TrackedTransactionKey key, TrackedSource trackedSource, Transaction transaction, Dictionary <Script, KeyPath> knownScriptMapping)
        {
            if (key == null)
            {
                throw new ArgumentNullException(nameof(key));
            }
            if (transaction == null)
            {
                throw new ArgumentNullException(nameof(transaction));
            }
            if (knownScriptMapping == null)
            {
                throw new ArgumentNullException(nameof(knownScriptMapping));
            }
            if (trackedSource == null)
            {
                throw new ArgumentNullException(nameof(trackedSource));
            }
            if (key.IsPruned)
            {
                throw new ArgumentException("The key should not be pruned", nameof(key));
            }
            Key           = key;
            TrackedSource = trackedSource;
            Transaction   = transaction;
            transaction.PrecomputeHash(false, true);
            KnownKeyPathMapping = knownScriptMapping;

            KnownKeyPathMappingUpdated();
        }
Example #2
0
 public TrackedTransaction(TrackedTransactionKey key, TrackedSource trackedSource, IEnumerable <Coin> receivedCoins, Dictionary <Script, KeyPath> knownScriptMapping)
 {
     if (key == null)
     {
         throw new ArgumentNullException(nameof(key));
     }
     if (!key.IsPruned)
     {
         throw new ArgumentException("The key should be pruned", nameof(key));
     }
     if (trackedSource == null)
     {
         throw new ArgumentNullException(nameof(trackedSource));
     }
     TrackedSource = trackedSource;
     Key           = key;
     if (knownScriptMapping != null)
     {
         KnownKeyPathMapping = knownScriptMapping;
     }
     if (receivedCoins != null)
     {
         ReceivedCoins.AddRange(receivedCoins);
     }
 }
 public TransactionMatchData(TrackedTransactionKey key)
 {
     if (key == null)
     {
         throw new ArgumentNullException(nameof(key));
     }
     Key = key;
 }
Example #4
0
        public override bool Equals(object obj)
        {
            TrackedTransactionKey item = obj as TrackedTransactionKey;

            if (item == null)
            {
                return(false);
            }
            return(ToString().Equals(item.ToString()));
        }
Example #5
0
 public TrackedTransaction(TrackedTransactionKey key, TrackedSource trackedSource, IEnumerable <Coin> receivedCoins, IEnumerable <KeyPathInformation> knownScriptMapping)
     : this(key, trackedSource, receivedCoins, ToDictionary(knownScriptMapping))
 {
 }
Example #6
0
 public TrackedTransaction(TrackedTransactionKey key, TrackedSource trackedSource) : this(key, trackedSource, null as Coin[], null as Dictionary <Script, KeyPath>)
 {
 }
Example #7
0
 public ElementsTrackedTransaction(TrackedTransactionKey key, TrackedSource trackedSource, Transaction transaction, Dictionary <Script, KeyPath> knownScriptMapping) :
     base(key, trackedSource, transaction, knownScriptMapping)
 {
     ClearCoinValues();
     Unblind(transaction.Outputs.AsCoins(), false);
 }
Example #8
0
 public ElementsTrackedTransaction(TrackedTransactionKey key, TrackedSource trackedSource, IEnumerable <Coin> receivedCoins, Dictionary <Script, KeyPath> knownScriptMapping) :
     base(key, trackedSource, receivedCoins, knownScriptMapping)
 {
     ClearCoinValues();
     Unblind(receivedCoins, false);
 }
Example #9
0
 protected override ITrackedTransactionSerializable CreateBitcoinSerializableTrackedTransaction(TrackedTransactionKey trackedTransactionKey)
 {
     return(new ElementsTransactionMatchData(trackedTransactionKey));
 }
Example #10
0
 public override TrackedTransaction CreateTrackedTransaction(TrackedSource trackedSource, TrackedTransactionKey transactionKey, IEnumerable <Coin> coins, Dictionary <Script, KeyPath> knownScriptMapping)
 {
     return(new ElementsTrackedTransaction(transactionKey, trackedSource, coins, knownScriptMapping));
 }
Example #11
0
 public override TrackedTransaction CreateTrackedTransaction(TrackedSource trackedSource, TrackedTransactionKey transactionKey, Transaction tx, Dictionary <Script, KeyPath> knownScriptMapping)
 {
     return(new ElementsTrackedTransaction(transactionKey, trackedSource, tx, knownScriptMapping));
 }
Example #12
0
 public ElementsTransactionMatchData(TrackedTransactionKey key) : base(key)
 {
 }