Commit 7185343
committed
gl-plugin: Use call_typed for regular invoice creation
Replace call_raw with call_typed when creating a regular invoice in the
LSP invoice handler. This provides better type safety by using the
generated cln_rpc::model::requests::InvoiceRequest and
cln_rpc::model::responses::InvoiceResponse types.
Benefits:
- Compile-time type checking for request/response fields
- No manual hex decoding needed for payment_hash/payment_secret
- Access to created_index field from the response
- Cleaner code without custom request/response structs1 parent 2fafe20 commit 7185343
1 file changed
Lines changed: 8 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
218 | 219 | | |
219 | 220 | | |
220 | 221 | | |
221 | | - | |
| 222 | + | |
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
| |||
230 | 231 | | |
231 | 232 | | |
232 | 233 | | |
233 | | - | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
237 | | - | |
| 236 | + | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
251 | 247 | | |
252 | 248 | | |
253 | 249 | | |
| |||
0 commit comments