2022-03-07 14:21:32 +01:00
|
|
|
#ifndef _NETWORK_H_
|
|
|
|
|
#define _NETWORK_H_
|
|
|
|
|
|
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 {
|
2022-09-15 09:35:47 +02:00
|
|
|
const char *name;
|
|
|
|
|
const char *ticker;
|
2021-08-26 13:02:07 +02:00
|
|
|
uint64_t chain_id;
|
2021-07-02 18:46:23 +02:00
|
|
|
} network_info_t;
|
|
|
|
|
|
2023-05-04 11:52:16 +02:00
|
|
|
// Returns the chain ID. Defaults to 0 if txType was not found (For TX).
|
|
|
|
|
uint64_t get_tx_chain_id(void);
|
|
|
|
|
uint64_t get_app_chain_id(void);
|
2021-07-02 18:46:23 +02:00
|
|
|
// Returns a pointer to the network name, or NULL if there is none.
|
2023-05-04 11:52:16 +02:00
|
|
|
const char *get_tx_network_name(void);
|
|
|
|
|
const char *get_app_network_name(void);
|
|
|
|
|
|
2021-07-02 18:46:23 +02:00
|
|
|
// Returns a pointer to the network ticker, or chainConfig->coinName if there is none.
|
2023-05-04 11:52:16 +02:00
|
|
|
const char *get_tx_network_ticker(void);
|
|
|
|
|
const char *get_app_network_ticker(void);
|
2022-03-07 14:21:32 +01:00
|
|
|
|
|
|
|
|
#endif // _NETWORK_H_
|