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

Function derive_htlc_basepoint

common/derive_basepoints.c:217–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217bool derive_htlc_basepoint(const struct secret *seed,
218 struct pubkey *htlc_basepoint,
219 struct secret *htlc_secret)
220{
221 struct keys keys;
222
223 derive_keys(seed, &keys);
224
225 if (htlc_basepoint) {
226 if (!pubkey_from_privkey(&keys.h, htlc_basepoint))
227 return false;
228 }
229
230 if (htlc_secret)
231 *htlc_secret = keys.h.secret;
232
233 return true;
234}
235
236void towire_basepoints(u8 **pptr, const struct basepoints *b)
237{

Callers 3

do_sign_local_htlc_txFunction · 0.85
mainFunction · 0.85

Calls 2

pubkey_from_privkeyFunction · 0.85
derive_keysFunction · 0.70

Tested by 1

mainFunction · 0.68