2017-01-10 06:08:33 +01:00
|
|
|
/* API to ask the HSM for things. */
|
2018-03-22 11:36:25 +01:00
|
|
|
#ifndef LIGHTNING_HSMD_CLIENT_H
|
|
|
|
#define LIGHTNING_HSMD_CLIENT_H
|
2017-01-10 06:08:33 +01:00
|
|
|
#include "config.h"
|
|
|
|
#include <ccan/endian/endian.h>
|
|
|
|
#include <ccan/short_types/short_types.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
struct pubkey;
|
2017-05-06 04:19:44 +02:00
|
|
|
struct secret;
|
2017-01-10 06:08:33 +01:00
|
|
|
|
|
|
|
/* Setup communication to the HSM */
|
|
|
|
void hsm_setup(int fd);
|
|
|
|
|
|
|
|
/* Do ECDH using this node id secret. */
|
2017-05-06 04:19:44 +02:00
|
|
|
bool hsm_do_ecdh(struct secret *ss, const struct pubkey *point);
|
2018-03-22 11:36:25 +01:00
|
|
|
#endif /* LIGHTNING_HSMD_CLIENT_H */
|