cryptnox-sdk-esp32 1.0.0
ESP32 SDK for Cryptnox Hardware Wallet
Loading...
Searching...
No Matches
eth_rpc.h File Reference
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
Include dependency graph for eth_rpc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void eth_rpc_init (const char *rpc_url, const char *from_addr)
void eth_rpc_set_auth (const char *project_id, const char *api_secret)
bool eth_rpc_wifi_connect (const char *ssid, const char *password)
bool eth_rpc_get_nonce (uint64_t *nonce_out)
uint8_t eth_rpc_ecrecover_parity (const uint8_t hash[32], const uint8_t r[32], const uint8_t s[32])
bool eth_rpc_send_raw_tx (const uint8_t *tx, size_t tx_len, char *tx_hash_out, size_t tx_hash_max)

Function Documentation

◆ eth_rpc_ecrecover_parity()

uint8_t eth_rpc_ecrecover_parity ( const uint8_t hash[32],
const uint8_t r[32],
const uint8_t s[32] )

Definition at line 257 of file eth_rpc.cpp.

References bytes_to_hex(), do_post(), hex_nibble(), HEX_PER_BYTE, RESP_BUF_SIZE, s_from_addr, and TAG.

Referenced by signing_loop().

◆ eth_rpc_get_nonce()

bool eth_rpc_get_nonce ( uint64_t * nonce_out)

Definition at line 231 of file eth_rpc.cpp.

References do_post(), RESP_BUF_SIZE, s_from_addr, and TAG.

Referenced by signing_loop().

◆ eth_rpc_init()

void eth_rpc_init ( const char * rpc_url,
const char * from_addr )

Definition at line 169 of file eth_rpc.cpp.

References s_from_addr, and s_rpc_url.

Referenced by app_main().

◆ eth_rpc_send_raw_tx()

bool eth_rpc_send_raw_tx ( const uint8_t * tx,
size_t tx_len,
char * tx_hash_out,
size_t tx_hash_max )

Definition at line 332 of file eth_rpc.cpp.

References bytes_to_hex(), do_post(), HEX_PER_BYTE, RESP_BUF_SIZE, and TAG.

Referenced by signing_loop().

◆ eth_rpc_set_auth()

void eth_rpc_set_auth ( const char * project_id,
const char * api_secret )

Definition at line 175 of file eth_rpc.cpp.

References s_api_secret, and s_project_id.

Referenced by app_main().

◆ eth_rpc_wifi_connect()

bool eth_rpc_wifi_connect ( const char * ssid,
const char * password )