| 316 | } |
| 317 | |
| 318 | static void towire_wally_tx_input(u8 **pptr, const struct wally_tx_input *in) |
| 319 | { |
| 320 | /* Just like a bitcoin_txid */ |
| 321 | towire_u8_array(pptr, in->txhash, sizeof(in->txhash)); |
| 322 | towire_u32(pptr, in->index); |
| 323 | towire_u32(pptr, in->sequence); |
| 324 | towire_u32(pptr, in->script_len); |
| 325 | towire_u8_array(pptr, in->script, in->script_len); |
| 326 | towire_wally_tx_witness_stack(pptr, in->witness); |
| 327 | |
| 328 | if (is_elements(chainparams)) { |
| 329 | towire_u32(pptr, sizeof(in->blinding_nonce)); |
| 330 | towire_u8_array(pptr, in->blinding_nonce, |
| 331 | sizeof(in->blinding_nonce)); |
| 332 | towire_u32(pptr, sizeof(in->entropy)); |
| 333 | towire_u8_array(pptr, in->entropy, sizeof(in->entropy)); |
| 334 | towire_u32(pptr, in->issuance_amount_len); |
| 335 | towire_u8_array(pptr, in->issuance_amount, |
| 336 | in->issuance_amount_len); |
| 337 | towire_u32(pptr, in->inflation_keys_len); |
| 338 | towire_u8_array(pptr, in->inflation_keys, |
| 339 | in->inflation_keys_len); |
| 340 | towire_u32(pptr, in->issuance_amount_rangeproof_len); |
| 341 | towire_u8_array(pptr, in->issuance_amount_rangeproof, |
| 342 | in->issuance_amount_rangeproof_len); |
| 343 | towire_u32(pptr, in->inflation_keys_rangeproof_len); |
| 344 | towire_u8_array(pptr, in->inflation_keys_rangeproof, |
| 345 | in->inflation_keys_rangeproof_len); |
| 346 | towire_wally_tx_witness_stack(pptr, in->pegin_witness); |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | static void towire_wally_tx_output(u8 **pptr, const struct wally_tx_output *out) |
| 351 | { |
no test coverage detected