cryptnox-sdk-arduino 1.0.0
Arduino library for Cryptnox Hardware Wallet
Loading...
Searching...
No Matches
config.template.h File Reference
#include <stdint.h>
Include dependency graph for config.template.h:

Go to the source code of this file.

Macros

#define WIFI_SSID   "<YOUR_SSID>"
#define WIFI_PASSWORD   "<YOUR_PASSWORD>"
#define RPC_HOST   "ethereum-sepolia-rpc.publicnode.com"
#define RPC_PORT   443
#define RPC_PATH   "/"
#define WIFI_CA_CERT
#define CARD_PIN   "<CARD_PIN>" /* 4-9 digit PIN, e.g. "000000000" */
#define CARD_PIN_LEN   (9U) /* number of digits in CARD_PIN */
#define ADDR_FROM   "<SENDER_ADDRESS>"
#define ADDR_TO   "<RECIPIENT_ADDRESS>"
#define ADDR_USDC   "<USDC_CONTRACT_ADDRESS>"
#define CHAIN_ID_SEPOLIA   11155111
#define AMOUNT_USDC   1000000UL /* 1.0 USDC */
#define MAX_PRIORITY_FEE   2000000000ULL /* 2 Gwei */
#define MAX_FEE   4000000000ULL /* 4 Gwei */
#define GAS_LIMIT_ERC20   60000ULL

Macro Definition Documentation

◆ ADDR_FROM

#define ADDR_FROM   "<SENDER_ADDRESS>"
Examples
UsdcSigning.ino.

Definition at line 101 of file config.template.h.

Referenced by determineYParity(), and fetchNonce().

◆ ADDR_TO

#define ADDR_TO   "<RECIPIENT_ADDRESS>"
Examples
UsdcSigning.ino.

Definition at line 104 of file config.template.h.

Referenced by encodeERC20Transfer().

◆ ADDR_USDC

#define ADDR_USDC   "<USDC_CONTRACT_ADDRESS>"
Examples
UsdcSigning.ino.

Definition at line 107 of file config.template.h.

Referenced by setup().

◆ AMOUNT_USDC

#define AMOUNT_USDC   1000000UL /* 1.0 USDC */
Examples
UsdcSigning.ino.

Definition at line 115 of file config.template.h.

Referenced by encodeERC20Transfer().

◆ CARD_PIN

#define CARD_PIN   "<CARD_PIN>" /* 4-9 digit PIN, e.g. "000000000" */
Examples
UsdcSigning.ino.

Definition at line 94 of file config.template.h.

Referenced by setup().

◆ CARD_PIN_LEN

#define CARD_PIN_LEN   (9U) /* number of digits in CARD_PIN */
Examples
UsdcSigning.ino.

Definition at line 95 of file config.template.h.

Referenced by setup().

◆ CHAIN_ID_SEPOLIA

#define CHAIN_ID_SEPOLIA   11155111
Examples
UsdcSigning.ino.

Definition at line 112 of file config.template.h.

Referenced by setup().

◆ GAS_LIMIT_ERC20

#define GAS_LIMIT_ERC20   60000ULL
Examples
UsdcSigning.ino.

Definition at line 120 of file config.template.h.

Referenced by setup().

◆ MAX_FEE

#define MAX_FEE   4000000000ULL /* 4 Gwei */
Examples
UsdcSigning.ino.

Definition at line 119 of file config.template.h.

Referenced by setup().

◆ MAX_PRIORITY_FEE

#define MAX_PRIORITY_FEE   2000000000ULL /* 2 Gwei */
Examples
UsdcSigning.ino.

Definition at line 118 of file config.template.h.

Referenced by setup().

◆ RPC_HOST

#define RPC_HOST   "ethereum-sepolia-rpc.publicnode.com"

Choose ONE provider below and comment out the other.

Option A — PublicNode (free, no account required) Uncomment the three lines under "Option A".

Option B — Infura (requires a free account at app.infura.io)

  1. Create an API key in the Infura dashboard.
  2. In the key's Settings tab, reveal (or generate) the API Secret.
  3. Uncomment the five lines under "Option B" and fill in the values. Note: the API Secret must have NO leading or trailing spaces.
Examples
UsdcSigning.ino.

Definition at line 34 of file config.template.h.

Referenced by determineYParity(), fetchNonce(), and sendRawTx().

◆ RPC_PATH

#define RPC_PATH   "/"
Examples
UsdcSigning.ino.

Definition at line 36 of file config.template.h.

Referenced by determineYParity(), fetchNonce(), and sendRawTx().

◆ RPC_PORT

#define RPC_PORT   443
Examples
UsdcSigning.ino.

Definition at line 35 of file config.template.h.

Referenced by determineYParity(), fetchNonce(), and sendRawTx().

◆ WIFI_CA_CERT

#define WIFI_CA_CERT
Value:
"-----BEGIN CERTIFICATE-----\n" \
"MIIDejCCAmKgAwIBAgIQf+UwvzMTQ77dghYQST2KGzANBgkqhkiG9w0BAQsFADBX\n" \
"MQswCQYDVQQGEwJCRTEZMBcGA1UEChMQR2xv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lXjTaCzv8mEbep\n" \
"8RqZ7a2CPsgRbuvTPBwcOMBBmuFeU88+FSBX6+7iP0il8b4Z0QFqIwwMHfs/L6K1\n" \
"vepuoxtGzi4CZ68zJpiq1UvSqTbFJjtbD4seiMHl\n" \
"-----END CERTIFICATE-----\n"
Examples
UsdcSigning.ino.

Definition at line 60 of file config.template.h.

Referenced by determineYParity(), fetchNonce(), and sendRawTx().

◆ WIFI_PASSWORD

#define WIFI_PASSWORD   "<YOUR_PASSWORD>"
Examples
UsdcSigning.ino.

Definition at line 15 of file config.template.h.

Referenced by ensureWiFi(), and setup().

◆ WIFI_SSID

#define WIFI_SSID   "<YOUR_SSID>"
Examples
UsdcSigning.ino.

Definition at line 14 of file config.template.h.

Referenced by ensureWiFi(), and setup().