| 912 | } |
| 913 | |
| 914 | struct command_result *param_bitcoin_address(struct command *cmd, |
| 915 | const char *name, |
| 916 | const char *buffer, |
| 917 | const jsmntok_t *tok, |
| 918 | const u8 **scriptpubkey) |
| 919 | { |
| 920 | /* Parse address. */ |
| 921 | switch (json_to_address_scriptpubkey(cmd, |
| 922 | chainparams, |
| 923 | buffer, tok, |
| 924 | scriptpubkey)) { |
| 925 | case ADDRESS_PARSE_UNRECOGNIZED: |
| 926 | return command_fail(cmd, LIGHTNINGD, |
| 927 | "Could not parse destination address, " |
| 928 | "%s should be a valid address", |
| 929 | name ? name : "address field"); |
| 930 | case ADDRESS_PARSE_WRONG_NETWORK: |
| 931 | return command_fail(cmd, LIGHTNINGD, |
| 932 | "Destination address is not on network %s", |
| 933 | chainparams->network_name); |
| 934 | case ADDRESS_PARSE_SUCCESS: |
| 935 | return NULL; |
| 936 | } |
| 937 | abort(); |
| 938 | } |
| 939 | |
| 940 | struct command_result *param_psbt(struct command *cmd, |
| 941 | const char *name, |
nothing calls this directly
no test coverage detected