Ejemplo n.º 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();
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 4
0
        public override bool Equals(object obj)
        {
            TrackedTransactionKey item = obj as TrackedTransactionKey;

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