upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/main/identity.h
diff options
context:
space:
mode:
Diffstat (limited to 'main/identity.h')
-rw-r--r--main/identity.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/main/identity.h b/main/identity.h
new file mode 100644
index 0000000..2990455
--- /dev/null
+++ b/main/identity.h
@@ -0,0 +1,29 @@
1#ifndef IDENTITY_H
2#define IDENTITY_H
3
4#include "esp_err.h"
5#include "esp_wifi.h"
6#include "esp_netif.h"
7#include <stdint.h>
8#include <stdbool.h>
9
10typedef struct {
11 uint8_t nsec[32];
12 char nsec_hex[65];
13 char npub_hex[65];
14
15 uint8_t sta_mac[6];
16 uint8_t ap_mac[6];
17
18 char ap_ssid[32];
19 esp_ip4_addr_t ap_ip;
20 char ap_ip_str[16];
21
22 bool initialized;
23} tollgate_identity_t;
24
25esp_err_t identity_init(const char *nsec_hex);
26
27const tollgate_identity_t *identity_get(void);
28
29#endif