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

Function json_to_pubkeys

plugins/offers.c:1873–1890  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1871}
1872
1873static struct pubkey *json_to_pubkeys(const tal_t *ctx,
1874 const char *buffer,
1875 const jsmntok_t *tok)
1876{
1877 size_t i;
1878 const jsmntok_t *t;
1879 struct pubkey *arr;
1880
1881 if (tok->type != JSMN_ARRAY)
1882 return NULL;
1883
1884 arr = tal_arr(ctx, struct pubkey, tok->size);
1885 json_for_each_arr(i, t, tok) {
1886 if (!json_to_pubkey(buffer, t, &arr[i]))
1887 return tal_free(arr);
1888 }
1889 return arr;
1890}
1891
1892static const char *init(struct command *init_cmd,
1893 const char *buf UNUSED,

Callers

nothing calls this directly

Calls 2

tal_freeFunction · 0.85
json_to_pubkeyFunction · 0.50

Tested by

no test coverage detected