bitcoind: routine to send to a specific address.

We use this to create our anchor payment.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-01-22 06:41:49 +10:30
parent c0766061fa
commit c51a8d804f
3 changed files with 45 additions and 1 deletions

View File

@@ -1,12 +1,14 @@
#ifndef LIGHTNING_DAEMON_BITCOIND_H
#define LIGHTNING_DAEMON_BITCOIND_H
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <ccan/typesafe_cb/typesafe_cb.h>
struct sha256_double;
struct lightningd_state;
struct ripemd160;
struct bitcoin_tx;
struct peer;
void bitcoind_watch_addr(struct lightningd_state *dstate,
const struct ripemd160 *redeemhash);
@@ -33,4 +35,12 @@ void bitcoind_txid_lookup_(struct lightningd_state *dstate,
void bitcoind_send_tx(struct lightningd_state *dstate,
const struct bitcoin_tx *tx);
void bitcoind_create_payment(struct lightningd_state *dstate,
const char *addr,
u64 satoshis,
void (*cb)(struct lightningd_state *dstate,
const struct bitcoin_tx *tx,
struct peer *peer),
struct peer *peer);
#endif /* LIGHTNING_DAEMON_BITCOIND_H */