File tree 10 files changed +122
-4
lines changed
10 files changed +122
-4
lines changed Original file line number Diff line number Diff line change
1
+ using System . Text . Json . Serialization ;
2
+
3
+ namespace DotNut . ApiModels ;
4
+
5
+ public class PostMeltBolt11Request
6
+ {
7
+
8
+ [ JsonPropertyName ( "quote" ) ]
9
+ public string Quote { get ; set ; }
10
+
11
+ [ JsonPropertyName ( "inputs" ) ]
12
+ public Proof [ ] Inputs { get ; set ; }
13
+
14
+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
15
+ [ JsonPropertyName ( "outputs" ) ]
16
+ public BlindedMessage [ ] ? Outputs { get ; set ; }
17
+ }
Original file line number Diff line number Diff line change
1
+ using System . Text . Json . Serialization ;
2
+
3
+ namespace DotNut . ApiModels ;
4
+
5
+ public class PostMeltQuoteBolt11Request
6
+ {
7
+
8
+ [ JsonPropertyName ( "request" ) ]
9
+ public string Request { get ; set ; }
10
+
11
+ [ JsonPropertyName ( "unit" ) ]
12
+ public string Unit { get ; set ; }
13
+ }
Original file line number Diff line number Diff line change
1
+ using System . Text . Json . Serialization ;
2
+
3
+ namespace DotNut . ApiModels ;
4
+
5
+ public class PostMeltQuoteBolt11Response
6
+ {
7
+ [ JsonPropertyName ( "quote" ) ]
8
+ public string Quote { get ; set ; }
9
+
10
+ [ JsonPropertyName ( "amount" ) ]
11
+ public int Amount { get ; set ; }
12
+
13
+ [ JsonPropertyName ( "fee_reserve" ) ]
14
+ public int FeeReserve { get ; set ; }
15
+
16
+ [ JsonPropertyName ( "state" ) ]
17
+ public string State { get ; set ; }
18
+
19
+ [ JsonPropertyName ( "expiry" ) ]
20
+ public int Expiry { get ; set ; }
21
+
22
+ [ JsonPropertyName ( "payment_preimage" ) ]
23
+ public string ? PaymentPreimage { get ; set ; }
24
+
25
+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
26
+ [ JsonPropertyName ( "change" ) ]
27
+ public BlindSignature [ ] ? Change { get ; set ; }
28
+ }
Original file line number Diff line number Diff line change
1
+ using System . Text . Json . Serialization ;
2
+
3
+ namespace DotNut . ApiModels ;
4
+
5
+ public class PostMintBolt11Request
6
+ {
7
+ [ JsonPropertyName ( "quote" ) ]
8
+ public string Quote { get ; set ; }
9
+
10
+ [ JsonPropertyName ( "outputs" ) ]
11
+ public BlindedMessage [ ] Outputs { get ; set ; }
12
+ }
Original file line number Diff line number Diff line change
1
+ using System . Text . Json . Serialization ;
2
+
3
+ namespace DotNut . ApiModels ;
4
+
5
+ public class PostMintBolt11Response
6
+ {
7
+ [ JsonPropertyName ( "signatures" ) ]
8
+ public BlindSignature [ ] Signatures { get ; set ; }
9
+ }
Original file line number Diff line number Diff line change
1
+ using System . Diagnostics ;
2
+ using System . Text . Json . Serialization ;
3
+
4
+ namespace DotNut . ApiModels ;
5
+
6
+ public class PostMintQuoteBolt11Request
7
+ {
8
+
9
+ [ JsonPropertyName ( "amount" ) ]
10
+ public int Amount { get ; set ; }
11
+
12
+ [ JsonPropertyName ( "unit" ) ]
13
+ public string Unit { get ; set ; }
14
+
15
+ [ JsonPropertyName ( "description" ) ]
16
+ public string ? Description { get ; set ; }
17
+ }
Original file line number Diff line number Diff line change
1
+ using System . Text . Json . Serialization ;
2
+
3
+ namespace DotNut . ApiModels ;
4
+
5
+ public class PostMintQuoteBolt11Response
6
+ {
7
+ [ JsonPropertyName ( "quote" ) ]
8
+ public string Quote { get ; set ; }
9
+
10
+ [ JsonPropertyName ( "request" ) ]
11
+ public string Request { get ; set ; }
12
+
13
+ [ JsonPropertyName ( "state" ) ]
14
+ public string State { get ; set ; }
15
+
16
+ [ JsonPropertyName ( "expiry" ) ]
17
+ public int Expiry { get ; set ; }
18
+ }
Original file line number Diff line number Diff line change @@ -51,8 +51,11 @@ public override int GetHashCode()
51
51
52
52
public KeysetId ( string Id )
53
53
{
54
- if ( Id . Length != 16 )
55
- throw new ArgumentException ( "KeysetId must be 16 characters long" ) ;
54
+ // Legacy support for old keyset format
55
+ if ( Id . Length != 16 && Id . Length != 12 )
56
+ {
57
+ throw new ArgumentException ( "KeysetId must be 16 or 12 characters long" ) ;
58
+ }
56
59
_id = Id ;
57
60
}
58
61
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ namespace DotNut;
5
5
public class MeltMethodSetting
6
6
{
7
7
[ JsonPropertyName ( "method" ) ] public string Method { get ; set ; }
8
- [ JsonPropertyName ( "unit" ) ] public List < Proof > Unit { get ; set ; }
8
+ [ JsonPropertyName ( "unit" ) ] public string Unit { get ; set ; }
9
9
[ JsonPropertyName ( "min_amount" ) ] public int ? Min { get ; set ; }
10
10
[ JsonPropertyName ( "max_amount" ) ] public int ? Max { get ; set ; }
11
11
}
Original file line number Diff line number Diff line change @@ -5,8 +5,9 @@ namespace DotNut;
5
5
public class MintMethodSetting
6
6
{
7
7
[ JsonPropertyName ( "method" ) ] public string Method { get ; set ; }
8
- [ JsonPropertyName ( "unit" ) ] public List < Proof > Unit { get ; set ; }
8
+ [ JsonPropertyName ( "unit" ) ] public string Unit { get ; set ; }
9
9
[ JsonPropertyName ( "min_amount" ) ] public int ? Min { get ; set ; }
10
10
[ JsonPropertyName ( "max_amount" ) ] public int ? Max { get ; set ; }
11
+ [ JsonPropertyName ( "description" ) ] public bool ? Description { get ; set ; }
11
12
}
12
13
You can’t perform that action at this time.
0 commit comments