| 196 | } |
| 197 | |
| 198 | bool derive_revocation_basepoint(const struct secret *seed, |
| 199 | struct pubkey *revocation_basepoint, |
| 200 | struct secret *revocation_secret) |
| 201 | { |
| 202 | struct keys keys; |
| 203 | |
| 204 | derive_keys(seed, &keys); |
| 205 | |
| 206 | if (revocation_basepoint) { |
| 207 | if (!pubkey_from_privkey(&keys.r, revocation_basepoint)) |
| 208 | return false; |
| 209 | } |
| 210 | |
| 211 | if (revocation_secret) |
| 212 | *revocation_secret = keys.r.secret; |
| 213 | |
| 214 | return true; |
| 215 | } |
| 216 | |
| 217 | bool derive_htlc_basepoint(const struct secret *seed, |
| 218 | struct pubkey *htlc_basepoint, |