| 848 | } |
| 849 | |
| 850 | static struct command_result *reply_with_rune(struct command *cmd, |
| 851 | const char *buf UNUSED, |
| 852 | const jsmntok_t *result UNUSED, |
| 853 | struct rune *rune) |
| 854 | { |
| 855 | struct json_stream *js = jsonrpc_stream_success(cmd); |
| 856 | |
| 857 | json_add_string(js, "rune", rune_to_base64(tmpctx, rune)); |
| 858 | json_add_string(js, "unique_id", rune->unique_id); |
| 859 | |
| 860 | if (tal_count(rune->restrs) <= 1) { |
| 861 | json_add_string(js, "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."); |
| 862 | } |
| 863 | return command_finished(cmd, js); |
| 864 | } |
| 865 | |
| 866 | static struct command_result *json_commando_rune(struct command *cmd, |
| 867 | const char *buffer, |
no test coverage detected