| 212 | } |
| 213 | |
| 214 | bool derive_revocation_basepoint(const struct secret *seed, |
| 215 | struct pubkey *revocation_basepoint, |
| 216 | struct secret *revocation_secret) |
| 217 | { |
| 218 | struct keys keys; |
| 219 | |
| 220 | derive_keys(seed, &keys); |
| 221 | |
| 222 | if (revocation_basepoint) { |
| 223 | if (!pubkey_from_privkey(&keys.r, revocation_basepoint)) |
| 224 | return false; |
| 225 | } |
| 226 | |
| 227 | if (revocation_secret) |
| 228 | *revocation_secret = keys.r.secret; |
| 229 | |
| 230 | return true; |
| 231 | } |
| 232 | |
| 233 | bool derive_htlc_basepoint(const struct secret *seed, |
| 234 | struct pubkey *htlc_basepoint, |