diff options
| author | Adithya Vardhan <imadithyavardhan@gmail.com> | 2025-07-31 18:56:27 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-31 09:26:27 -0400 |
| commit | 0595d438aaa163dd33ed00748026698a411a0861 (patch) | |
| tree | 4ab1ed58bde6b28e1d7b81241cafb9635816b1ae | |
| parent | f30a43bd37e08516923b96dd0d860122c9ffe04e (diff) | |
NIP-47: add state to transactions (#1933)
| -rw-r--r-- | 47.md | 5 |
1 files changed, 5 insertions, 0 deletions
| @@ -335,6 +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 | "invoice": "string", // encoded invoice, optional | 339 | "invoice": "string", // encoded invoice, optional |
| 339 | "description": "string", // invoice's description, optional | 340 | "description": "string", // invoice's description, optional |
| 340 | "description_hash": "string", // invoice's description hash, optional | 341 | "description_hash": "string", // invoice's description hash, optional |
| @@ -368,6 +369,7 @@ Response: | |||
| 368 | "result_type": "lookup_invoice", | 369 | "result_type": "lookup_invoice", |
| 369 | "result": { | 370 | "result": { |
| 370 | "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) | ||
| 371 | "invoice": "string", // encoded invoice, optional | 373 | "invoice": "string", // encoded invoice, optional |
| 372 | "description": "string", // invoice's description, optional | 374 | "description": "string", // invoice's description, optional |
| 373 | "description_hash": "string", // invoice's description hash, optional | 375 | "description_hash": "string", // invoice's description hash, optional |
| @@ -416,6 +418,7 @@ Response: | |||
| 416 | "transactions": [ | 418 | "transactions": [ |
| 417 | { | 419 | { |
| 418 | "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) | ||
| 419 | "invoice": "string", // encoded invoice, optional | 422 | "invoice": "string", // encoded invoice, optional |
| 420 | "description": "string", // invoice's description, optional | 423 | "description": "string", // invoice's description, optional |
| 421 | "description_hash": "string", // invoice's description hash, optional | 424 | "description_hash": "string", // invoice's description hash, optional |
| @@ -492,6 +495,7 @@ Notification: | |||
| 492 | "notification_type": "payment_received", | 495 | "notification_type": "payment_received", |
| 493 | "notification": { | 496 | "notification": { |
| 494 | "type": "incoming", | 497 | "type": "incoming", |
| 498 | "state": "settled", | ||
| 495 | "invoice": "string", // encoded invoice | 499 | "invoice": "string", // encoded invoice |
| 496 | "description": "string", // invoice's description, optional | 500 | "description": "string", // invoice's description, optional |
| 497 | "description_hash": "string", // invoice's description hash, optional | 501 | "description_hash": "string", // invoice's description hash, optional |
| @@ -517,6 +521,7 @@ Notification: | |||
| 517 | "notification_type": "payment_sent", | 521 | "notification_type": "payment_sent", |
| 518 | "notification": { | 522 | "notification": { |
| 519 | "type": "outgoing", | 523 | "type": "outgoing", |
| 524 | "state": "settled", | ||
| 520 | "invoice": "string", // encoded invoice | 525 | "invoice": "string", // encoded invoice |
| 521 | "description": "string", // invoice's description, optional | 526 | "description": "string", // invoice's description, optional |
| 522 | "description_hash": "string", // invoice's description hash, optional | 527 | "description_hash": "string", // invoice's description hash, optional |