Skip to content

Commit b7534c1

Browse files
committed
Remove some unused files
1 parent 48cdabd commit b7534c1

4 files changed

Lines changed: 175 additions & 13 deletions

File tree

NBitcoin/Scripting/Miniscript/DSLTreeParser.cs

Lines changed: 0 additions & 7 deletions
This file was deleted.

NBitcoin/Scripting/Miniscript/Property.cs

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
using System;
2+
using System.Collections;
3+
using System.Collections.Generic;
4+
5+
namespace NBitcoin.Scripting.Miniscript
6+
{
7+
/// <summary>
8+
/// Trait describing a lookup table for signatures, hash preimages, etc.
9+
/// Every method has a default implementation that simply returns `false`
10+
/// on every query. Users are expected to override the methods that they
11+
/// have data for.
12+
/// </summary>
13+
/// <typeparam name="TPk"></typeparam>
14+
/// <typeparam name="TPKh"></typeparam>
15+
public abstract class ISatisfier<TPk, TPKh>
16+
where TPk : IMiniscriptKey<TPKh>
17+
where TPKh : IMiniscriptKeyHash
18+
{
19+
public virtual bool TryGetSignature(TPk pubkey, out TransactionSignature txSig)
20+
{
21+
txSig = default;
22+
return false;
23+
}
24+
public virtual bool TryGetPubKey(TPKh pubkeyHash, out TPk pubkey)
25+
{
26+
pubkey = default;
27+
return false;
28+
}
29+
public virtual bool TryGetPubkeyAndSig(TPKh pubkeyHash, out TPk pubkey, out TransactionSignature txSig)
30+
{
31+
txSig = default;
32+
pubkey = default;
33+
return false;
34+
}
35+
public virtual bool TryGetSha256Preimage(uint256 hash, out uint256 preimage)
36+
{
37+
preimage = default;
38+
return false;
39+
}
40+
public virtual bool TryGetHash256Preimage(uint256 hash, out uint256 preimage)
41+
{
42+
preimage = default;
43+
return false;
44+
}
45+
public virtual bool TryGetRipemd160Preimage(uint160 hash, out uint256 preimage)
46+
{
47+
preimage = default;
48+
return false;
49+
}
50+
public virtual bool TryGetHash160Preimage(uint160 hash, out uint256 preimage)
51+
{
52+
preimage = default;
53+
return false;
54+
}
55+
56+
public virtual bool IsOlderThan(uint currentTime) => false;
57+
public virtual bool IsAfterThan(uint currentTime) => false;
58+
}
59+
60+
public class InMemorySatisfier<TPk, TPKh> : ISatisfier<TPk, TPKh>, IDictionary<TPk, Tuple<TPk, TransactionSignature>>
61+
where TPk : IMiniscriptKey<TPKh>
62+
where TPKh : IMiniscriptKeyHash
63+
{
64+
public override bool TryGetSignature(TPk pubkey, out TransactionSignature txSig)
65+
{
66+
throw new NotImplementedException();
67+
}
68+
69+
public override bool TryGetPubKey(TPKh pubkeyHash, out TPk pubkey)
70+
{
71+
throw new NotImplementedException();
72+
}
73+
74+
public override bool TryGetPubkeyAndSig(TPKh pubkeyHash, out TPk pubkey, out TransactionSignature txSig)
75+
{
76+
throw new NotImplementedException();
77+
}
78+
79+
public override bool TryGetSha256Preimage(uint256 hash, out uint256 preimage)
80+
{
81+
throw new NotImplementedException();
82+
}
83+
84+
public override bool TryGetHash256Preimage(uint256 hash, out uint256 preimage)
85+
{
86+
throw new NotImplementedException();
87+
}
88+
89+
public override bool TryGetRipemd160Preimage(uint160 hash, out uint256 preimage)
90+
{
91+
throw new NotImplementedException();
92+
}
93+
94+
public override bool TryGetHash160Preimage(uint160 hash, out uint256 preimage)
95+
{
96+
throw new NotImplementedException();
97+
}
98+
99+
public override bool IsOlderThan(uint currentTime)
100+
{
101+
throw new NotImplementedException();
102+
}
103+
104+
public override bool IsAfterThan(uint currentTime)
105+
{
106+
throw new NotImplementedException();
107+
}
108+
109+
public IEnumerator<KeyValuePair<TPk, Tuple<TPk, TransactionSignature>>> GetEnumerator()
110+
{
111+
throw new NotImplementedException();
112+
}
113+
114+
IEnumerator IEnumerable.GetEnumerator()
115+
{
116+
return GetEnumerator();
117+
}
118+
119+
public void Add(KeyValuePair<TPk, Tuple<TPk, TransactionSignature>> item)
120+
{
121+
throw new NotImplementedException();
122+
}
123+
124+
public void Clear()
125+
{
126+
throw new NotImplementedException();
127+
}
128+
129+
public bool Contains(KeyValuePair<TPk, Tuple<TPk, TransactionSignature>> item)
130+
{
131+
throw new NotImplementedException();
132+
}
133+
134+
public void CopyTo(KeyValuePair<TPk, Tuple<TPk, TransactionSignature>>[] array, int arrayIndex)
135+
{
136+
throw new NotImplementedException();
137+
}
138+
139+
public bool Remove(KeyValuePair<TPk, Tuple<TPk, TransactionSignature>> item)
140+
{
141+
throw new NotImplementedException();
142+
}
143+
144+
public int Count { get; }
145+
public bool IsReadOnly { get; }
146+
public void Add(TPk key, Tuple<TPk, TransactionSignature> value)
147+
{
148+
throw new NotImplementedException();
149+
}
150+
151+
public bool ContainsKey(TPk key)
152+
{
153+
throw new NotImplementedException();
154+
}
155+
156+
public bool Remove(TPk key)
157+
{
158+
throw new NotImplementedException();
159+
}
160+
161+
public bool TryGetValue(TPk key, out Tuple<TPk, TransactionSignature> value)
162+
{
163+
throw new NotImplementedException();
164+
}
165+
166+
public Tuple<TPk, TransactionSignature> this[TPk key]
167+
{
168+
get => throw new NotImplementedException();
169+
set => throw new NotImplementedException();
170+
}
171+
172+
public ICollection<TPk> Keys { get; }
173+
public ICollection<Tuple<TPk, TransactionSignature>> Values { get; }
174+
}
175+
}

NBitcoin/Scripting/Miniscript/Types/Types.cs

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)