joltwallet / nano_lib

[ESP32] Any function related to seeds/private keys for Nano

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nano Lib

Low level Nano Currency functions for embedded targets. This library was constructed with the ESP32 in mind, but can be ported over to other platforms without too much headache. All hashing and signing heavily relies on libsodium. This currently works with the commit (@70170c2) bundled with ESP-IDF.

Design

Nano heavily relies on uint256 numbers; in this library these are represented as a 32-long unsigned char array. To reduce confusion; information is always kept in their uint256 state as much as possible, i.e. storing public keys instead of nano addresses.

When applicable, all transactions are stored in struct nl_block_t. This structure supports all legacy and state blocks. While this library supports legacy blocks, it was really designed with State Blocks in mind.

Unit Tests

Unit tests can be used by selecting this library with a target using the ESP32 Unit Tester.

make flash TEST_COMPONENTS='nano_lib' monitor

The unit tests (in the test folder) is a good source of examples on how to use this library.

Related Projects

nano_parse - Library for crafting rai_node rpc calls and parsing their responses to be compatible with this library. nano_parse optionally builds with nano_lws which handles websockets for communicating with a rai_node over wifi.

About

[ESP32] Any function related to seeds/private keys for Nano

License:MIT License


Languages

Language:C 99.1%Language:Makefile 0.9%