diff options
| author | Riccardo Balbo <os@rblb.it> | 2025-09-04 17:12:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-04 11:12:45 -0400 |
| commit | 7c4a2cb82978551761dc698ccebb60f2b14ed807 (patch) | |
| tree | 326570baf498bad081ad803fb5f1610f4cd3db7d | |
| parent | 3760a6e3085b9ad7422e99c5b2045c6f3602fb2d (diff) | |
NIP-47: mark "state" field as optional in make_invoice response for backward compatibility (#2046)
| -rw-r--r-- | 47.md | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -335,7 +335,7 @@ Response: | |||
| 335 | "result_type": "make_invoice", | 335 | "result_type": "make_invoice", |
| 336 | "result": { | 336 | "result": { |
| 337 | "type": "incoming", // "incoming" for invoices, "outgoing" for payments | 337 | "type": "incoming", // "incoming" for invoices, "outgoing" for payments |
| 338 | "state": "pending", | 338 | "state": "pending", // optional |
| 339 | "invoice": "string", // encoded invoice, optional | 339 | "invoice": "string", // encoded invoice, optional |
| 340 | "description": "string", // invoice's description, optional | 340 | "description": "string", // invoice's description, optional |
| 341 | "description_hash": "string", // invoice's description hash, optional | 341 | "description_hash": "string", // invoice's description hash, optional |
| @@ -369,7 +369,7 @@ Response: | |||
| 369 | "result_type": "lookup_invoice", | 369 | "result_type": "lookup_invoice", |
| 370 | "result": { | 370 | "result": { |
| 371 | "type": "incoming", // "incoming" for invoices, "outgoing" for payments | 371 | "type": "incoming", // "incoming" for invoices, "outgoing" for payments |
| 372 | "state": "pending", // can be "pending", "settled", "expired" (for invoices) or "failed" (for payments) | 372 | "state": "pending", // can be "pending", "settled", "expired" (for invoices) or "failed" (for payments), optional |
| 373 | "invoice": "string", // encoded invoice, optional | 373 | "invoice": "string", // encoded invoice, optional |
| 374 | "description": "string", // invoice's description, optional | 374 | "description": "string", // invoice's description, optional |
| 375 | "description_hash": "string", // invoice's description hash, optional | 375 | "description_hash": "string", // invoice's description hash, optional |
| @@ -418,7 +418,7 @@ Response: | |||
| 418 | "transactions": [ | 418 | "transactions": [ |
| 419 | { | 419 | { |
| 420 | "type": "incoming", // "incoming" for invoices, "outgoing" for payments | 420 | "type": "incoming", // "incoming" for invoices, "outgoing" for payments |
| 421 | "state": "pending", // can be "pending", "settled", "expired" (for invoices) or "failed" (for payments) | 421 | "state": "pending", // can be "pending", "settled", "expired" (for invoices) or "failed" (for payments), optional |
| 422 | "invoice": "string", // encoded invoice, optional | 422 | "invoice": "string", // encoded invoice, optional |
| 423 | "description": "string", // invoice's description, optional | 423 | "description": "string", // invoice's description, optional |
| 424 | "description_hash": "string", // invoice's description hash, optional | 424 | "description_hash": "string", // invoice's description hash, optional |
| @@ -495,7 +495,7 @@ Notification: | |||
| 495 | "notification_type": "payment_received", | 495 | "notification_type": "payment_received", |
| 496 | "notification": { | 496 | "notification": { |
| 497 | "type": "incoming", | 497 | "type": "incoming", |
| 498 | "state": "settled", | 498 | "state": "settled", // optional |
| 499 | "invoice": "string", // encoded invoice | 499 | "invoice": "string", // encoded invoice |
| 500 | "description": "string", // invoice's description, optional | 500 | "description": "string", // invoice's description, optional |
| 501 | "description_hash": "string", // invoice's description hash, optional | 501 | "description_hash": "string", // invoice's description hash, optional |
| @@ -521,7 +521,7 @@ Notification: | |||
| 521 | "notification_type": "payment_sent", | 521 | "notification_type": "payment_sent", |
| 522 | "notification": { | 522 | "notification": { |
| 523 | "type": "outgoing", | 523 | "type": "outgoing", |
| 524 | "state": "settled", | 524 | "state": "settled", // optional |
| 525 | "invoice": "string", // encoded invoice | 525 | "invoice": "string", // encoded invoice |
| 526 | "description": "string", // invoice's description, optional | 526 | "description": "string", // invoice's description, optional |
| 527 | "description_hash": "string", // invoice's description hash, optional | 527 | "description_hash": "string", // invoice's description hash, optional |