mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 17:14:22 +01:00
runes: Renamed listrunes to showrunes
This commit is contained in:
committed by
Rusty Russell
parent
a649e8b517
commit
49fdc0df99
@@ -68,7 +68,7 @@ MANPAGES := doc/lightning-cli.1 \
|
|||||||
doc/lightning-listpays.7 \
|
doc/lightning-listpays.7 \
|
||||||
doc/lightning-listpeers.7 \
|
doc/lightning-listpeers.7 \
|
||||||
doc/lightning-listpeerchannels.7 \
|
doc/lightning-listpeerchannels.7 \
|
||||||
doc/lightning-listrunes.7 \
|
doc/lightning-showrunes.7 \
|
||||||
doc/lightning-listsendpays.7 \
|
doc/lightning-listsendpays.7 \
|
||||||
doc/lightning-makesecret.7 \
|
doc/lightning-makesecret.7 \
|
||||||
doc/lightning-multifundchannel.7 \
|
doc/lightning-multifundchannel.7 \
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ Core Lightning Documentation
|
|||||||
lightning-listpays <lightning-listpays.7.md>
|
lightning-listpays <lightning-listpays.7.md>
|
||||||
lightning-listpeerchannels <lightning-listpeerchannels.7.md>
|
lightning-listpeerchannels <lightning-listpeerchannels.7.md>
|
||||||
lightning-listpeers <lightning-listpeers.7.md>
|
lightning-listpeers <lightning-listpeers.7.md>
|
||||||
lightning-listrunes <lightning-listrunes.7.md>
|
|
||||||
lightning-listsendpays <lightning-listsendpays.7.md>
|
lightning-listsendpays <lightning-listsendpays.7.md>
|
||||||
lightning-listsqlschemas <lightning-listsqlschemas.7.md>
|
lightning-listsqlschemas <lightning-listsqlschemas.7.md>
|
||||||
lightning-listtransactions <lightning-listtransactions.7.md>
|
lightning-listtransactions <lightning-listtransactions.7.md>
|
||||||
@@ -128,6 +127,7 @@ Core Lightning Documentation
|
|||||||
lightning-setchannel <lightning-setchannel.7.md>
|
lightning-setchannel <lightning-setchannel.7.md>
|
||||||
lightning-setconfig <lightning-setconfig.7.md>
|
lightning-setconfig <lightning-setconfig.7.md>
|
||||||
lightning-setpsbtversion <lightning-setpsbtversion.7.md>
|
lightning-setpsbtversion <lightning-setpsbtversion.7.md>
|
||||||
|
lightning-showrunes <lightning-showrunes.7.md>
|
||||||
lightning-signinvoice <lightning-signinvoice.7.md>
|
lightning-signinvoice <lightning-signinvoice.7.md>
|
||||||
lightning-signmessage <lightning-signmessage.7.md>
|
lightning-signmessage <lightning-signmessage.7.md>
|
||||||
lightning-signpsbt <lightning-signpsbt.7.md>
|
lightning-signpsbt <lightning-signpsbt.7.md>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Shahana Farooqui <<sfarooqui@blockstream.com>> is mainly responsible.
|
|||||||
SEE ALSO
|
SEE ALSO
|
||||||
--------
|
--------
|
||||||
|
|
||||||
lightning-commando-blacklist(7), lightning-listrunes(7)
|
lightning-commando-blacklist(7), lightning-showrunes(7)
|
||||||
|
|
||||||
RESOURCES
|
RESOURCES
|
||||||
---------
|
---------
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
lightning-listrunes -- Command to list previously generated runes
|
lightning-showrunes -- Command to list previously generated runes
|
||||||
==================================================================
|
==================================================================
|
||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
--------
|
--------
|
||||||
|
|
||||||
**listrunes** [*rune*]
|
**showrunes** [*rune*]
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
The **listrunes** RPC command either lists runes that we stored as we generate them (see lightning-createrune(7)) or decodes the rune given on the command line.
|
The **showrunes** RPC command either lists runes that we stored as we generate them (see lightning-createrune(7)) or decodes the rune given on the command line.
|
||||||
|
|
||||||
RETURN VALUE
|
RETURN VALUE
|
||||||
------------
|
------------
|
||||||
@@ -41,7 +41,7 @@ Shahana Farooqui <<sfarooqui@blockstream.com>> is mainly responsible.
|
|||||||
SEE ALSO
|
SEE ALSO
|
||||||
--------
|
--------
|
||||||
|
|
||||||
lightning-commando-listrunes(7), lightning-blacklistrune(7)
|
lightning-commando-showrunes(7), lightning-blacklistrune(7)
|
||||||
|
|
||||||
RESOURCES
|
RESOURCES
|
||||||
---------
|
---------
|
||||||
@@ -310,7 +310,7 @@ static struct command_result *json_add_rune(struct lightningd *ld,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct command_result *json_listrunes(struct command *cmd,
|
static struct command_result *json_showrunes(struct command *cmd,
|
||||||
const char *buffer,
|
const char *buffer,
|
||||||
const jsmntok_t *obj UNNEEDED,
|
const jsmntok_t *obj UNNEEDED,
|
||||||
const jsmntok_t *params)
|
const jsmntok_t *params)
|
||||||
@@ -339,13 +339,13 @@ static struct command_result *json_listrunes(struct command *cmd,
|
|||||||
return command_success(cmd, response);
|
return command_success(cmd, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct json_command listrunes_command = {
|
static const struct json_command showrunes_command = {
|
||||||
"listrunes",
|
"showrunes",
|
||||||
"utility",
|
"utility",
|
||||||
json_listrunes,
|
json_showrunes,
|
||||||
"List a rune or list/decode an optional {rune}."
|
"Show the list of runes or decode an optional {rune}."
|
||||||
};
|
};
|
||||||
AUTODATA(json_command, &listrunes_command);
|
AUTODATA(json_command, &showrunes_command);
|
||||||
|
|
||||||
static struct rune_restr **readonly_restrictions(const tal_t *ctx)
|
static struct rune_restr **readonly_restrictions(const tal_t *ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ def test_createrune(node_factory):
|
|||||||
params=params)['valid'] is True
|
params=params)['valid'] is True
|
||||||
|
|
||||||
|
|
||||||
def test_listrunes(node_factory):
|
def test_showrunes(node_factory):
|
||||||
l1 = node_factory.get_node()
|
l1 = node_factory.get_node()
|
||||||
rune1 = l1.rpc.createrune()
|
rune1 = l1.rpc.createrune()
|
||||||
assert rune1 == {
|
assert rune1 == {
|
||||||
@@ -216,12 +216,12 @@ def test_listrunes(node_factory):
|
|||||||
'unique_id': '0',
|
'unique_id': '0',
|
||||||
'warning_unrestricted_rune': 'WARNING: This rune has no restrictions! Anyone who has access to this rune could drain funds from your node. Be careful when giving this to apps that you don\'t trust. Consider using the restrictions parameter to only allow access to specific rpc methods.'
|
'warning_unrestricted_rune': 'WARNING: This rune has no restrictions! Anyone who has access to this rune could drain funds from your node. Be careful when giving this to apps that you don\'t trust. Consider using the restrictions parameter to only allow access to specific rpc methods.'
|
||||||
}
|
}
|
||||||
listrunes = l1.rpc.listrunes()
|
showrunes = l1.rpc.showrunes()
|
||||||
assert len(l1.rpc.listrunes()) == 1
|
assert len(l1.rpc.showrunes()) == 1
|
||||||
l1.rpc.createrune()
|
l1.rpc.createrune()
|
||||||
listrunes = l1.rpc.listrunes()
|
showrunes = l1.rpc.showrunes()
|
||||||
assert len(listrunes['runes']) == 2
|
assert len(showrunes['runes']) == 2
|
||||||
assert listrunes == {
|
assert showrunes == {
|
||||||
'runes': [
|
'runes': [
|
||||||
{
|
{
|
||||||
'rune': 'OSqc7ixY6F-gjcigBfxtzKUI54uzgFSA6YfBQoWGDV89MA==',
|
'rune': 'OSqc7ixY6F-gjcigBfxtzKUI54uzgFSA6YfBQoWGDV89MA==',
|
||||||
@@ -238,11 +238,11 @@ def test_listrunes(node_factory):
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
our_unstored_rune = l1.rpc.listrunes(rune='lI6iPwM1R9OkcRW25SH0a06PscPDinTfLFAjzSGFGE09OQ==')['runes'][0]
|
our_unstored_rune = l1.rpc.showrunes(rune='lI6iPwM1R9OkcRW25SH0a06PscPDinTfLFAjzSGFGE09OQ==')['runes'][0]
|
||||||
assert our_unstored_rune['unique_id'] == '9'
|
assert our_unstored_rune['unique_id'] == '9'
|
||||||
assert our_unstored_rune['stored'] is False
|
assert our_unstored_rune['stored'] is False
|
||||||
|
|
||||||
not_our_rune = l1.rpc.listrunes(rune='oNJAqigqDrHBGzsm7gV3z87oGpzq-KqFlOxx2O9iEQk9MA==')['runes'][0]
|
not_our_rune = l1.rpc.showrunes(rune='oNJAqigqDrHBGzsm7gV3z87oGpzq-KqFlOxx2O9iEQk9MA==')['runes'][0]
|
||||||
assert not_our_rune['stored'] is False
|
assert not_our_rune['stored'] is False
|
||||||
assert not_our_rune['our_rune'] is False
|
assert not_our_rune['our_rune'] is False
|
||||||
|
|
||||||
@@ -320,7 +320,7 @@ def test_blacklistrune(node_factory):
|
|||||||
assert blacklist == {'blacklist': [{'start': 0, 'end': 6},
|
assert blacklist == {'blacklist': [{'start': 0, 'end': 6},
|
||||||
{'start': 9, 'end': 9}]}
|
{'start': 9, 'end': 9}]}
|
||||||
|
|
||||||
blacklisted_rune = l1.rpc.listrunes(rune='geZmO6U7yqpHn-moaX93FVMVWrDRfSNY4AXx9ypLcqg9MQ==')['runes'][0]['blacklisted']
|
blacklisted_rune = l1.rpc.showrunes(rune='geZmO6U7yqpHn-moaX93FVMVWrDRfSNY4AXx9ypLcqg9MQ==')['runes'][0]['blacklisted']
|
||||||
assert blacklisted_rune is True
|
assert blacklisted_rune is True
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user