You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above works and is not an issue. It is provided to show that the next example is nearly identical, except instead of creating a restriction on amount_msat, it will try to put a restriction on the description field.
Rune restriction that does not work as expected
Intention: to require the user to enter "Paid to teststore" as the beginning of the description.
This will make it possible to have 2 users with different runes: one that must label all transactions as "Paid to teststore" and the other that must label all transactions as "Paid to otherstore". This way it will be clear which user issued which invoice.
lightning-cli decode string=$(lightning-cli createrune restrictions='[["method=invoice"], ["pnamedescription^Paid to teststore"]]' | jq .rune)
{
"type": "rune",
"unique_id": "338",
"string": "XXX:=338&method=invoice&pnamedescription^Paid to teststore",
"restrictions": [
{
"alternatives": [
"method=invoice"
],
"summary": "method (of command) equal to 'invoice'"
},
{
"alternatives": [
"pnamedescription^Paid to teststore"
],
"summary": "pnamedescription (object parameter 'description') starts with 'Paid to teststore'"
}
],
"valid": true
}
Unfortunately, this rune restriction did not work, and bkpr-listincome shows that it was possible to use this rune to create an invoice with the description "Paid to otherstore":
Rune restriction that works as expected
Intention: to be able to invoice up to 1 satoshi
The above works and is not an issue. It is provided to show that the next example is nearly identical, except instead of creating a restriction on amount_msat, it will try to put a restriction on the description field.
Rune restriction that does not work as expected
Intention: to require the user to enter "Paid to teststore" as the beginning of the description.
This will make it possible to have 2 users with different runes: one that must label all transactions as "Paid to teststore" and the other that must label all transactions as "Paid to otherstore". This way it will be clear which user issued which invoice.
Unfortunately, this rune restriction did not work, and bkpr-listincome shows that it was possible to use this rune to create an invoice with the description "Paid to otherstore":
getinfo
outputv23.05-1649-g54c5135
The text was updated successfully, but these errors were encountered: