Open Sourcing our Substrate Client for Android (Kotlin)

Lucien Loiseau
Nodle
Published in
2 min readNov 9, 2020

In May of this year, my team at Nodle launched our own Blockchain based on Parity Substrate to support our Nodle Cash micro-transactions. As known, Nodle CashApp is our cryptocurrency wallet that generates Nodle Cash (NODL). The app thus requires the ability to interact with our blockchain to query the balance of an account or send transactions.

Each blockchain built with Substrate exposes an RPC API that can be used to perform the various calls. The RPC is exposed over an HTTP or WebSocket connection. The main client implementation is polkadot-js but other clients implementations exist for different languages such as Go, C++, Rust or Python. In our case, we wanted a native client implementation for our mobile apps but were unable to find any suitable. Substrate is also fast-moving and we did not want to depend on a client that wouldn’t be up to date with the latest version since some updates do in fact break API compatibility.
Thus, we developed an Android client library to interact with a substrate-based chain:

https://github.com/NodleCode/substrate-client-kotlin

This implementation has been made in pure Kotlin so it can even be used for any Java project, not just Android. Unlike polkadot-js, the client is simple and mostly optimized for a wallet use case. As of today, it offers the following functionalities:

  • compatible with substrate 2.0
  • Ed25519 wallet
  • get account info (balance)
  • sign and send extrinsic
  • estimate fee

We are planning to bring support to Schnorrkel/Ristretto signatures (SR25519) soon and try to keep it current with the latest Substrate upgrade.

Our team is truly excited to be an active part of this community and hope that by open-sourcing and sharing this project we will be able to help other teams contribute and grow this ecosystem.

Be sure to follow us on Twitter @nodlenetwork and @nodlecash for more news and updates. To start earning NODL, download our Nodle Cash App: https://nodle.io/cash.

--

--