| 1806 | }; |
| 1807 | |
| 1808 | static const char *init(struct plugin *p, const char *buf UNUSED, |
| 1809 | const jsmntok_t *config UNUSED) |
| 1810 | { |
| 1811 | bool exp_offers; |
| 1812 | |
| 1813 | rpc_scan(p, "getinfo", |
| 1814 | take(json_out_obj(NULL, NULL, NULL)), |
| 1815 | "{id:%}", JSON_SCAN(json_to_pubkey, &local_id)); |
| 1816 | |
| 1817 | rpc_scan(p, "listconfigs", |
| 1818 | take(json_out_obj(NULL, "config", "experimental-offers")), |
| 1819 | "{experimental-offers:%}", |
| 1820 | JSON_SCAN(json_to_bool, &exp_offers)); |
| 1821 | |
| 1822 | if (!exp_offers) |
| 1823 | return "offers not enabled in config"; |
| 1824 | return NULL; |
| 1825 | } |
| 1826 | |
| 1827 | static const struct plugin_hook hooks[] = { |
| 1828 | { |
nothing calls this directly
no test coverage detected