2021-07-02 18:46:23 +02:00
|
|
|
#include <stdint.h>
|
|
|
|
|
#include "tokens.h"
|
2021-08-26 13:21:10 +02:00
|
|
|
#include "shared_context.h"
|
2021-07-02 18:46:23 +02:00
|
|
|
|
|
|
|
|
typedef struct network_info_s {
|
|
|
|
|
const char name[NETWORK_STRING_MAX_SIZE];
|
|
|
|
|
const char ticker[MAX_TICKER_LEN];
|
2021-08-26 13:02:07 +02:00
|
|
|
uint64_t chain_id;
|
2021-07-02 18:46:23 +02:00
|
|
|
} network_info_t;
|
|
|
|
|
|
|
|
|
|
// Returns the current chain id. Defaults to 0 if txType was not found.
|
2021-08-26 13:02:07 +02:00
|
|
|
uint64_t get_chain_id(void);
|
2021-07-02 18:46:23 +02:00
|
|
|
// Returns a pointer to the network struct, or NULL if there is none.
|
|
|
|
|
network_info_t *get_network(void);
|
|
|
|
|
// Returns a pointer to the network name, or NULL if there is none.
|
|
|
|
|
char *get_network_name(void);
|
|
|
|
|
// Returns a pointer to the network ticker, or chainConfig->coinName if there is none.
|
|
|
|
|
char *get_network_ticker(void);
|