2
2
using System . Net . Http . Json ;
3
3
using System . Text ;
4
4
using System . Text . Json ;
5
- using System . Text . Json . Serialization ;
5
+ using DotNut . ApiModels ;
6
6
7
- namespace DotNuts ;
7
+ namespace DotNut . Api ;
8
8
9
9
public class CashuHttpClient
10
10
{
@@ -107,62 +107,4 @@ protected async Task<T> HandleResponse<T>(HttpResponseMessage response, Cancella
107
107
108
108
return result ! ;
109
109
}
110
- }
111
-
112
- public class ProofSecretSet : Dictionary < string , ProofSecret >
113
- {
114
-
115
- }
116
-
117
- public class ProofSecret
118
- {
119
-
120
- [ JsonPropertyName ( "nonce" ) ]
121
- public string Nonce { get ; set ; }
122
- [ JsonPropertyName ( "data" ) ]
123
- public string Data { get ; set ; }
124
- [ JsonPropertyName ( "tags" ) ]
125
- [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
126
- public string [ ] [ ] ? Tags { get ; set ; }
127
- }
128
-
129
- public class PostRestoreRequest
130
- {
131
- [ JsonPropertyName ( "outputs" ) ]
132
- public BlindedMessage [ ] Outputs { get ; set ; }
133
- } public class PostRestoreResponse
134
- {
135
- [ JsonPropertyName ( "outputs" ) ]
136
- public BlindedMessage [ ] Outputs { get ; set ; }
137
- [ JsonPropertyName ( "signatures" ) ]
138
- public BlindSignature [ ] Signatures { get ; set ; }
139
- }
140
-
141
- public class PostCheckStateRequest
142
- {
143
- [ JsonPropertyName ( "Ys" ) ]
144
- public string [ ] Ys { get ; set ; }
145
- }
146
-
147
- public class PostCheckStateResponse
148
- {
149
-
150
- [ JsonPropertyName ( "states" ) ]
151
- public StateResponseItem [ ] States { get ; set ; }
152
- }
153
-
154
- public class StateResponseItem
155
- {
156
-
157
- public string Y { get ; set ; }
158
- [ JsonConverter ( typeof ( JsonStringEnumConverter ) ) ]
159
- public TokenState State { get ; set ; }
160
- public string ? Witness { get ; set ; }
161
-
162
- public enum TokenState
163
- {
164
- UNSPENT ,
165
- PENDING ,
166
- SPENT
167
- }
168
110
}
0 commit comments