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

Function derive_funding_key

common/derive_basepoints.c:195–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193}
194
195bool derive_funding_key(const struct secret *seed,
196 struct pubkey *funding_pubkey,
197 struct privkey *funding_privkey)
198{
199 struct keys keys;
200
201 derive_keys(seed, &keys);
202
203 if (funding_pubkey) {
204 if (!pubkey_from_privkey(&keys.f, funding_pubkey))
205 return false;
206 }
207
208 if (funding_privkey)
209 *funding_privkey = keys.f;
210
211 return true;
212}
213
214bool derive_revocation_basepoint(const struct secret *seed,
215 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