core-lightning/daemon/onion.h
Rusty Russell 2610799bda pay: split into getroute and sendpay
This is less convenient to use, but makes far more sense for a real
user (like a wallet).  It can ask about the route, then decide whether
to use it or not.

This will make even more sense once we add a parameter to control how
long we let the HTLC be delayed for, so a client can query for high,
medium and low tolerances and compare results.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-08-31 16:06:08 +09:30

22 lines
664 B
C

#ifndef LIGHTNING_DAEMON_ONION_H
#define LIGHTNING_DAEMON_ONION_H
#include "config.h"
#include "lightning.pb-c.h"
#include <ccan/short_types/short_types.h>
#include <secp256k1.h>
struct peer;
struct node_connection;
/* Decode next step in the route, and fill out the onion to send onwards. */
RouteStep *onion_unwrap(struct peer *peer,
const void *data, size_t len, const u8 **next);
/* Create an onion for sending msatoshi down path, paying fees. */
const u8 *onion_create(const tal_t *ctx,
secp256k1_context *secpctx,
const struct pubkey *ids,
const u64 *amounts,
size_t num_hops);
#endif /* LIGHTNING_DAEMON_ONION_H */