2024-01-15 13:35:14 -08:00
{
"$schema" : "../rpc-schema-draft.json" ,
"type" : "object" ,
"added" : "v22.11" ,
"rpc" : "listinvoicerequests" ,
"title" : "Command for querying invoice_request status" ,
"description" : [
"The **listinvoicerequests** RPC command gets the status of a specific `invoice_request`, if it exists, or the status of all `invoice_requests` if given no argument."
] ,
2024-07-22 19:21:49 -07:00
"categories" : [
"readonly"
] ,
2024-01-15 13:35:14 -08:00
"request" : {
"required" : [ ] ,
2024-10-30 09:38:42 +10:30
"additionalProperties" : false ,
2024-01-15 13:35:14 -08:00
"properties" : {
"invreq_id" : {
"type" : "string" ,
"description" : [
"A specific invoice can be queried by providing the `invreq_id`, which is presented by lightning-invoicerequest(7), or can be calculated from a bolt12 invoice."
]
} ,
"active_only" : {
"type" : "boolean" ,
"description" : [
"If it is *True* then only active invoice requests are returned."
] ,
"default" : "*False*"
}
}
} ,
"response" : {
"required" : [
"invoicerequests"
] ,
2024-10-30 09:38:42 +10:30
"additionalProperties" : false ,
2024-01-15 13:35:14 -08:00
"properties" : {
"invoicerequests" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"additionalProperties" : true ,
"required" : [
"invreq_id" ,
"single_use" ,
"active" ,
"bolt12" ,
"used"
] ,
"properties" : {
"invreq_id" : {
"type" : "hash" ,
"description" : [
"The SHA256 hash of all invoice_request fields less than 160."
]
} ,
"active" : {
"type" : "boolean" ,
"description" : [
"Whether the invoice_request is currently active."
]
} ,
"single_use" : {
"type" : "boolean" ,
"description" : [
"Whether the invoice_request will become inactive after we pay an invoice for it."
]
} ,
"bolt12" : {
"type" : "string" ,
"description" : [
"The bolt12 string starting with lnr."
]
} ,
"used" : {
"type" : "boolean" ,
"description" : [
"Whether the invoice_request has already been used."
]
} ,
"label" : {
"type" : "string" ,
"description" : [
"The label provided when creating the invoice_request."
]
}
}
}
}
}
} ,
2024-06-20 14:57:02 -07:00
"author" : [
"Rusty Russell <<rusty@rustcorp.com.au>> is mainly responsible."
] ,
"see_also" : [
"lightning-invoicerequests(7)" ,
"lightning-disableinvoicerequest(7)"
] ,
"resources" : [
"Main web site: <https://github.com/ElementsProject/lightning>"
] ,
"examples" : [
2024-01-15 13:35:14 -08:00
{
2024-03-27 18:45:18 -07:00
"request" : {
"id" : "example:listinvoicerequests#1" ,
"method" : "listinvoicerequests" ,
"params" : [
2024-07-18 00:28:22 -07:00
"a621a0e8e8ea9aa97fd47ab9b140e413be7f4ea45377617e693eb7afe5a3dbf9"
2024-03-27 18:45:18 -07:00
]
} ,
"response" : {
"invoicerequests" : [
{
2024-07-18 00:28:22 -07:00
"invreq_id" : "a621a0e8e8ea9aa97fd47ab9b140e413be7f4ea45377617e693eb7afe5a3dbf9" ,
"active" : false ,
2024-03-27 18:45:18 -07:00
"single_use" : true ,
2024-07-18 00:28:22 -07:00
"bolt12" : "lnr1qqgx5t5hcw5ru9fgkhgxj4thjq4ugzsk2fjhzat9wd6xjmn8ypnx7u3qd9h8vmmfvdj3yyrrd35kw6r5de5kueeqwd6x7un92qsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzr6jqwvfdqzcyypz6g3kyz34nfrl7lm6c3rushzxey3a55ecjgs6qp2vz8q78j336k0sgpvamrunx5t6vdaeu7nmmlh5u6f0dnscasy2alyxq79f5wnc043gxrzyqt640dmuj7c94644j5ae6wfse7tsejwqnmc575ly9t38h4hf" ,
"used" : false
}
]
}
} ,
{
"request" : {
"id" : "example:listinvoicerequests#2" ,
"method" : "listinvoicerequests" ,
"params" : { }
} ,
"response" : {
"invoicerequests" : [
{
"invreq_id" : "93f193cd2432d292f8b64af08942989d71c0a0366fb52d57ddb688c8fb066399" ,
"active" : false ,
"single_use" : true ,
"bolt12" : "lnr1qqgypua5g7rp293k00s66ayvnv26czst2d5k6urvv5s8getnw3gzqp3zderpzxstt8927ynqg044h0egcd8n5h3n9g0u0v4h8ncc3yg02gps7sjqtqssytfzxcs2xkdy0lml0tzy0jzugmyj8kjn8zfzrgq9fsgurc72x82e7pq947t0ks7a4yejz8w79x4zj25s3pu6zrnw2e0v2ugdescpcqsq307z4p2dlxe92fv7xd43qut0pjkg4y094hupqyhsj8dlhvmmfng6sv" ,
"used" : true
} ,
{
"invreq_id" : "a621a0e8e8ea9aa97fd47ab9b140e413be7f4ea45377617e693eb7afe5a3dbf9" ,
"active" : false ,
"single_use" : true ,
"bolt12" : "lnr1qqgx5t5hcw5ru9fgkhgxj4thjq4ugzsk2fjhzat9wd6xjmn8ypnx7u3qd9h8vmmfvdj3yyrrd35kw6r5de5kueeqwd6x7un92qsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzr6jqwvfdqzcyypz6g3kyz34nfrl7lm6c3rushzxey3a55ecjgs6qp2vz8q78j336k0sgpvamrunx5t6vdaeu7nmmlh5u6f0dnscasy2alyxq79f5wnc043gxrzyqt640dmuj7c94644j5ae6wfse7tsejwqnmc575ly9t38h4hf" ,
2024-03-27 18:45:18 -07:00
"used" : false
}
]
}
2024-01-15 13:35:14 -08:00
}
]
}