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

Function derive_htlc_basepoint

common/derive_basepoints.c:233–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233bool derive_htlc_basepoint(const struct secret *seed,
234 struct pubkey *htlc_basepoint,
235 struct secret *htlc_secret)
236{
237 struct keys keys;
238
239 derive_keys(seed, &keys);
240
241 if (htlc_basepoint) {
242 if (!pubkey_from_privkey(&keys.h, htlc_basepoint))
243 return false;
244 }
245
246 if (htlc_secret)
247 *htlc_secret = keys.h.secret;
248
249 return true;
250}
251
252void towire_basepoints(u8 **pptr, const struct basepoints *b)
253{

Callers 3

mainFunction · 0.85

Calls 2

pubkey_from_privkeyFunction · 0.85
derive_keysFunction · 0.70

Tested by 1

mainFunction · 0.68