| 918 | } |
| 919 | |
| 920 | static const char *init(struct plugin *p, |
| 921 | const char *buf UNUSED, |
| 922 | const jsmntok_t *config UNUSED) |
| 923 | { |
| 924 | struct pubkey k; |
| 925 | |
| 926 | rpc_scan(p, "getinfo", |
| 927 | take(json_out_obj(NULL, NULL, NULL)), |
| 928 | "{id:%}", JSON_SCAN(json_to_pubkey, &k)); |
| 929 | if (secp256k1_xonly_pubkey_from_pubkey(secp256k1_ctx, &id.pubkey, |
| 930 | NULL, &k.pubkey) != 1) |
| 931 | abort(); |
| 932 | |
| 933 | rpc_scan(p, "listconfigs", |
| 934 | take(json_out_obj(NULL, NULL, NULL)), |
| 935 | "{cltv-final:%,experimental-offers:%}", |
| 936 | JSON_SCAN(json_to_u16, &cltv_final), |
| 937 | JSON_SCAN(json_to_bool, &offers_enabled)); |
| 938 | |
| 939 | return NULL; |
| 940 | } |
| 941 | |
| 942 | static const struct plugin_command commands[] = { |
| 943 | { |
nothing calls this directly
no test coverage detected