2016-06-30 01:38:05 +02:00
|
|
|
#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>
|
2016-07-01 03:49:28 +02:00
|
|
|
#include <secp256k1.h>
|
2016-06-30 01:38:05 +02:00
|
|
|
|
|
|
|
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,
|
2016-07-01 03:49:28 +02:00
|
|
|
secp256k1_context *secpctx,
|
2016-08-31 08:36:08 +02:00
|
|
|
const struct pubkey *ids,
|
|
|
|
const u64 *amounts,
|
|
|
|
size_t num_hops);
|
2016-06-30 01:38:05 +02:00
|
|
|
#endif /* LIGHTNING_DAEMON_ONION_H */
|