@@ -182,24 +182,6 @@ public sealed class TransactionResponse
182182 public DateTimeOffset ? CreatedAt { get ; init ; }
183183}
184184
185- public sealed class ApiKeyResponse
186- {
187- [ JsonPropertyName ( "id" ) ]
188- public required string Id { get ; init ; }
189-
190- [ JsonPropertyName ( "name" ) ]
191- public required string Name { get ; init ; }
192-
193- [ JsonPropertyName ( "hint" ) ]
194- public required string Hint { get ; init ; }
195-
196- [ JsonPropertyName ( "createdAt" ) ]
197- public DateTimeOffset ? CreatedAt { get ; init ; }
198-
199- [ JsonPropertyName ( "lastUsedAt" ) ]
200- public DateTimeOffset ? LastUsedAt { get ; init ; }
201- }
202-
203185public sealed class RotateApiKeyResponse
204186{
205187 [ JsonPropertyName ( "key" ) ]
@@ -301,3 +283,64 @@ public sealed class RestorePasskeyCompleteResponse
301283 [ JsonPropertyName ( "secondaryKey" ) ]
302284 public required string SecondaryKey { get ; init ; }
303285}
286+
287+ // ---------------------------------------------------------------------------
288+ // L402
289+ // ---------------------------------------------------------------------------
290+
291+ public sealed class L402ChallengeResponse
292+ {
293+ [ JsonPropertyName ( "macaroon" ) ]
294+ public required string Macaroon { get ; init ; }
295+
296+ [ JsonPropertyName ( "invoice" ) ]
297+ public required string Invoice { get ; init ; }
298+
299+ [ JsonPropertyName ( "paymentHash" ) ]
300+ public required string PaymentHash { get ; init ; }
301+
302+ [ JsonPropertyName ( "expiresAt" ) ]
303+ public required DateTimeOffset ExpiresAt { get ; init ; }
304+
305+ [ JsonPropertyName ( "wwwAuthenticate" ) ]
306+ public required string WwwAuthenticate { get ; init ; }
307+ }
308+
309+ public sealed class VerifyL402Response
310+ {
311+ [ JsonPropertyName ( "valid" ) ]
312+ public required bool Valid { get ; init ; }
313+
314+ [ JsonPropertyName ( "paymentHash" ) ]
315+ public string ? PaymentHash { get ; init ; }
316+
317+ [ JsonPropertyName ( "caveats" ) ]
318+ public List < string > ? Caveats { get ; init ; }
319+
320+ [ JsonPropertyName ( "error" ) ]
321+ public string ? Error { get ; init ; }
322+ }
323+
324+ public sealed class L402PayResponse
325+ {
326+ [ JsonPropertyName ( "authorization" ) ]
327+ public string ? Authorization { get ; init ; }
328+
329+ [ JsonPropertyName ( "paymentHash" ) ]
330+ public required string PaymentHash { get ; init ; }
331+
332+ [ JsonPropertyName ( "preimage" ) ]
333+ public string ? Preimage { get ; init ; }
334+
335+ [ JsonPropertyName ( "amount" ) ]
336+ public required long Amount { get ; init ; }
337+
338+ [ JsonPropertyName ( "fee" ) ]
339+ public long ? Fee { get ; init ; }
340+
341+ [ JsonPropertyName ( "paymentNumber" ) ]
342+ public required int PaymentNumber { get ; init ; }
343+
344+ [ JsonPropertyName ( "status" ) ]
345+ public required string Status { get ; init ; }
346+ }
0 commit comments