-
Notifications
You must be signed in to change notification settings - Fork 913
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: document wait for new subsystems, add request & response schemas.
Signed-off-by: Rusty Russell <[email protected]>
- Loading branch information
1 parent
af971fd
commit 62ddf84
Showing
3 changed files
with
261 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"added": "v23.08", | ||
"additionalProperties": false, | ||
"required": [ | ||
"subsystem", | ||
"indexname", | ||
"nextvalue" | ||
], | ||
"properties": { | ||
"subsystem": { | ||
"type": "string", | ||
"enum": [ | ||
"invoices", | ||
"forwards", | ||
"sendpays" | ||
] | ||
}, | ||
"indexname": { | ||
"type": "string", | ||
"enum": [ | ||
"created", | ||
"updated", | ||
"deleted" | ||
] | ||
}, | ||
"nextvalue": { | ||
"type": "u64" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [ | ||
"subsystem" | ||
], | ||
"properties": { | ||
"subsystem": { | ||
"type": "string", | ||
"enum": [ | ||
"invoices", | ||
"forwards", | ||
"sendpays" | ||
] | ||
}, | ||
"created": { | ||
"type": "u64", | ||
"description": "1-based index indicating order entry was created" | ||
}, | ||
"updated": { | ||
"type": "u64", | ||
"description": "1-based index indicating order entry was updated" | ||
}, | ||
"deleted": { | ||
"type": "u64", | ||
"description": "1-based index indicating order entry was deleted" | ||
}, | ||
"details": {} | ||
}, | ||
"allOf": [ | ||
{ | ||
"if": { | ||
"additionalProperties": true, | ||
"properties": { | ||
"subsystem": { | ||
"type": "string", | ||
"enum": [ | ||
"invoices" | ||
] | ||
} | ||
} | ||
}, | ||
"then": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"subsystem": {}, | ||
"created": {}, | ||
"updated": {}, | ||
"deleted": {}, | ||
"details": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"status": { | ||
"type": "string", | ||
"enum": [ | ||
"unpaid", | ||
"paid", | ||
"expired" | ||
], | ||
"description": "Whether it's paid, unpaid or unpayable" | ||
}, | ||
"label": { | ||
"type": "string", | ||
"description": "unique label supplied at invoice creation" | ||
}, | ||
"description": { | ||
"type": "string", | ||
"description": "description used in the invoice" | ||
}, | ||
"bolt11": { | ||
"type": "string", | ||
"description": "the BOLT11 string" | ||
}, | ||
"bolt12": { | ||
"type": "string", | ||
"description": "the BOLT12 string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"if": { | ||
"additionalProperties": true, | ||
"properties": { | ||
"subsystem": { | ||
"type": "string", | ||
"enum": [ | ||
"forwards" | ||
] | ||
} | ||
} | ||
}, | ||
"then": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"subsystem": {}, | ||
"created": {}, | ||
"updated": {}, | ||
"deleted": {}, | ||
"details": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"status": { | ||
"type": "string", | ||
"enum": [ | ||
"offered", | ||
"settled", | ||
"failed", | ||
"local_failed" | ||
], | ||
"description": "still ongoing, completed, failed locally, or failed after forwarding" | ||
}, | ||
"in_channel": { | ||
"type": "short_channel_id", | ||
"description": "unique label supplied at invoice creation" | ||
}, | ||
"in_htlc_id": { | ||
"type": "u64", | ||
"description": "the unique HTLC id the sender gave this (not present if incoming channel was closed before ugprade to v22.11)" | ||
}, | ||
"in_msat": { | ||
"type": "msat", | ||
"description": "the value of the incoming HTLC" | ||
}, | ||
"out_channel": { | ||
"type": "short_channel_id", | ||
"description": "the channel that the HTLC (trying to) forward to" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"if": { | ||
"additionalProperties": true, | ||
"properties": { | ||
"subsystem": { | ||
"type": "string", | ||
"enum": [ | ||
"sendpays" | ||
] | ||
} | ||
} | ||
}, | ||
"then": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"subsystem": {}, | ||
"created": {}, | ||
"updated": {}, | ||
"deleted": {}, | ||
"details": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"status": { | ||
"type": "string", | ||
"enum": [ | ||
"pending", | ||
"failed", | ||
"complete" | ||
], | ||
"description": "status of the payment" | ||
}, | ||
"partid": { | ||
"type": "u64", | ||
"description": "Part number (for multiple parts to a single payment)" | ||
}, | ||
"groupid": { | ||
"type": "u64", | ||
"description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash" | ||
}, | ||
"payment_hash": { | ||
"type": "hash", | ||
"description": "the hash of the *payment_preimage* which will prove payment" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |