lnsocket

A minimal C library for connecting to the lightning network
git clone git://jb55.com/lnsocket
Log | Files | Refs | Submodules | README | LICENSE

lnsocket_internal.h (621B)


      1 #ifndef LNSOCKET_INTERNAL_H
      2 #define LNSOCKET_INTERNAL_H
      3 
      4 #include "crypto.h"
      5 #include "error.h"
      6 #include "handshake.h"
      7 
      8 struct lnsocket {
      9 	const char *errors[8];
     10 	struct cursor mem;
     11 	struct cursor msgbuf;
     12 	struct errors errs;
     13 	int num_errors;
     14 	int socket;
     15 	struct keypair key;
     16 	struct pubkey responder_id;
     17 	struct handshake handshake;
     18 	struct crypto_state crypto_state;
     19 	secp256k1_context *secp;
     20 };
     21 
     22 int parse_node_id(const char *str, struct node_id *dest);
     23 int pubkey_from_node_id(secp256k1_context *secp, struct pubkey *key, const struct node_id *id);
     24 int is_zero(void *vp, int size);
     25 
     26 #endif /* LNSOCKET_INTERNAL_H */