Embed<IOTA> update III

The full article was originally published by Tim Rappe on Medium. Read the full article here.

This is the 3rd update about running and maintaining a IOTA Wallet on micro controller boards. The general scope of the project you can here: Embed<IOTA>. All other parts of the update blog are linked here: Embed<IOTA> update I, Embed<IOTA> update II.

During last weeks we were playing around with entangled project to see if it could be the base for developing MCU driven IoT wallets. Based on Sam’s example we playing around with API commands to reproduce the results we got by using the C-Library.

Our simple iota wallet for ESP32 is based on this example https://github.com/oopsmonk/iota_cclient_esp32. To run everything correct we need to install ESP32 toolchain and ESP-IDF(you can find instructions how to do this in the repo).

First lets compare IOTA C-Library and Entangled-Library in terms of memory consumption and calculation time on ESP32 board. The calculation time was measured after some functions from Entangled Library were simplified. Here is what we got for address generation + transaction bundle creation:

Figure 1: comparison of C-Library and Entangled Library resource consumption during tx-bundle creation on ESP32 board.

Obviously Entangled consumes significantly more memory compared to C-Library which is not a surprise due to the fact C-Lib has its root in Ledger Nano project which deals with minimal hardware. So memory wise its clear that Entangled has some potential for optimization. It uses much more memory as it contains a lot of different functions to work with Tangle, and that is why object model of it use more memory in runtime. It compile’s a lot of different objects more compared to C-Library which can be used in runtime.

With this in mind we started to create an simplistic show case application where an Entangled-Project Wallet is maintained on an ESP32 board. For getting information about a wallet we’re using the following functions from entangled library(https://github.com/iotaledger/entangled):

iota_cclient_get_acount_data() — is used to receive information about addresses that attached to tangle, list of all transactions related to current addresses and total balance.

iota_cclient_get_balances() — receives information about balance of each separate address related to current wallet.

To execute transaction (zero or non-zero value) we’re using the following functions from entangled:

  • iota_cclient_send_transfer() — constructs the list of formed transactions into single bundle, and also executing attach to tangle and store broadcast.

To make if more flexible, to input any data the interactive console from espressif library is used: https://github.com/espressif/esp-idf/tree/master/examples/system/console

How it works:

Read the full Article

The full article was originally published by Tim Rappe on Medium, where people are continuing the conversation by highlighting and responding to this story.

You might also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. AcceptRead More

Did you know?

Buy in without the stress of trying to time the market

when you setup a savings plan. If you haven’t started a plan yet, head to your Bitpanda account to get started!

Purchasing cryptocurrencies comes with a number of risks.
Never invest money that you can't afford to lose.

You can automatically invest

in IOTA with Bitpanda Savings!