diff options
Diffstat (limited to 'main/config.h')
| -rw-r--r-- | main/config.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/main/config.h b/main/config.h index 2bcd400..8254a62 100644 --- a/main/config.h +++ b/main/config.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #define TOLLGATE_MAX_MINT_URLS 3 | 10 | #define TOLLGATE_MAX_MINT_URLS 3 |
| 11 | #define TOLLGATE_MAX_AP_SSID_LEN 32 | 11 | #define TOLLGATE_MAX_AP_SSID_LEN 32 |
| 12 | #define TOLLGATE_MAX_AP_PASS_LEN 64 | 12 | #define TOLLGATE_MAX_AP_PASS_LEN 64 |
| 13 | #define TOLLGATE_MAX_RELAYS 4 | ||
| 13 | 14 | ||
| 14 | typedef struct { | 15 | typedef struct { |
| 15 | char ssid[32]; | 16 | char ssid[32]; |
| @@ -22,11 +23,17 @@ typedef struct { | |||
| 22 | int current_network; | 23 | int current_network; |
| 23 | int max_retry; | 24 | int max_retry; |
| 24 | 25 | ||
| 26 | char nsec[65]; | ||
| 27 | char npub[65]; | ||
| 28 | |||
| 25 | char ap_ssid[TOLLGATE_MAX_AP_SSID_LEN]; | 29 | char ap_ssid[TOLLGATE_MAX_AP_SSID_LEN]; |
| 26 | char ap_password[TOLLGATE_MAX_AP_PASS_LEN]; | 30 | char ap_password[TOLLGATE_MAX_AP_PASS_LEN]; |
| 27 | uint8_t ap_channel; | 31 | uint8_t ap_channel; |
| 28 | uint8_t ap_max_conn; | 32 | uint8_t ap_max_conn; |
| 29 | 33 | ||
| 34 | uint8_t sta_mac[6]; | ||
| 35 | uint8_t ap_mac[6]; | ||
| 36 | |||
| 30 | esp_ip4_addr_t ap_ip; | 37 | esp_ip4_addr_t ap_ip; |
| 31 | char ap_ip_str[16]; | 38 | char ap_ip_str[16]; |
| 32 | 39 | ||
| @@ -36,7 +43,12 @@ typedef struct { | |||
| 36 | int step_size_ms; | 43 | int step_size_ms; |
| 37 | uint64_t persist_threshold_sats; | 44 | uint64_t persist_threshold_sats; |
| 38 | 45 | ||
| 39 | bool unique_derived; | 46 | char nostr_geohash[16]; |
| 47 | char nostr_relays[TOLLGATE_MAX_RELAYS][128]; | ||
| 48 | int nostr_relay_count; | ||
| 49 | int nostr_publish_interval_s; | ||
| 50 | |||
| 51 | bool identity_initialized; | ||
| 40 | } tollgate_config_t; | 52 | } tollgate_config_t; |
| 41 | 53 | ||
| 42 | void tollgate_config_derive_unique(tollgate_config_t *cfg); | 54 | void tollgate_config_derive_unique(tollgate_config_t *cfg); |