MCPcopy Create free account
hub / github.com/ElementsProject/lightning / param_bitcoin_address

Function param_bitcoin_address

common/json_param.c:914–938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

912}
913
914struct 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
940struct command_result *param_psbt(struct command *cmd,
941 const char *name,

Callers

nothing calls this directly

Calls 3

abortFunction · 0.85
command_failFunction · 0.50

Tested by

no test coverage detected