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

Function derive_funding_key

common/derive_basepoints.c:179–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179bool derive_funding_key(const struct secret *seed,
180 struct pubkey *funding_pubkey,
181 struct privkey *funding_privkey)
182{
183 struct keys keys;
184
185 derive_keys(seed, &keys);
186
187 if (funding_pubkey) {
188 if (!pubkey_from_privkey(&keys.f, funding_pubkey))
189 return false;
190 }
191
192 if (funding_privkey)
193 *funding_privkey = keys.f;
194
195 return true;
196}
197
198bool derive_revocation_basepoint(const struct secret *seed,
199 struct pubkey *revocation_basepoint,

Callers 1

mainFunction · 0.50

Calls 2

pubkey_from_privkeyFunction · 0.85
derive_keysFunction · 0.70

Tested by 1

mainFunction · 0.40