2015-05-29 05:29:09 +02:00
|
|
|
#ifndef LIGHTNING_PERMUTE_TX_H
|
|
|
|
#define LIGHTNING_PERMUTE_TX_H
|
2015-06-12 04:23:27 +02:00
|
|
|
#include "bitcoin/tx.h"
|
2015-05-29 05:29:09 +02:00
|
|
|
|
2015-07-20 02:26:15 +02:00
|
|
|
/* Permute the transaction into BIP69 order.
|
2015-05-29 05:29:09 +02:00
|
|
|
* map[0] is set to the new index of input 0, etc.
|
|
|
|
*/
|
2015-07-20 02:26:15 +02:00
|
|
|
void permute_inputs(struct bitcoin_tx_input *inputs,
|
2015-05-29 05:29:09 +02:00
|
|
|
size_t num_inputs,
|
|
|
|
size_t *map);
|
|
|
|
|
2015-07-20 02:26:15 +02:00
|
|
|
void permute_outputs(struct bitcoin_tx_output *outputs,
|
2015-05-29 05:29:09 +02:00
|
|
|
size_t num_outputs,
|
|
|
|
size_t *map);
|
|
|
|
#endif /* LIGHTNING_PERMUTE_TX_H */
|