We’ve been getting good questions about how to proceed with implementations of a mobile wallet.
At the moment, let’s focus on the Android and iOS development which will be Java/Kotlin and Swift, what are the needs here.
On the Swift side, there has been some work done in this repository, which is no longer actively maintained:
The above repo seems to have implemented the ed25519 curve but not secp256k1. Perhaps these are useful libraries to peruse:
- GitHub - Boilertalk/secp256k1.swift: secp256k1 bindings for swift. Cocoapods, Carthage and SPM support. Linux support.
- GitHub - bitwiseio/sawtooth-sdk-swift
For Java/Kotlin, I have another list here. Some, like one of the Swift links above, use C bindings, so the implementor must be familiar with that process.
- GitHub - carterharrison/ecdsa-kotlin: A simple, lightweight, fast elliptical curve cryptography library in kotlin.
- GitHub - joshjdevl/libsodium-jni: (Android) Networking and Cryptography Library (NaCL) JNI binding. JNI is utilized for fastest access to native code. Accessible either in Android or Java application. Uses SWIG to generate Java JNI bindings. SWIG definitions are extensible to other languages.
- GitHub - str4d/ed25519-java: Pure Java implementation of EdDSA
- GitHub - InstantWebP2P/tweetnacl-java: TweetNaCl in Java - a port of TweetNaCl-js
- Bindings for other languages | Libsodium documentation
For the links from GitHub it’s useful to search for ed25519
and secp256k1
to see if they’re mentioned and if you might need to use two libraries to get both.
There’s an article written in the NEAR docs about creating a transaction “from scratch” that is meant for exchanges and similar folks who need to construct transactions. This is one of those useful cases, and this link will be helpful:
Note that in the above page in documentation, we use near-api-js
but tried to avoid using the magic of the functions in order to have the user walk through the process without the helpers.
After a transaction has been successfully signed, we’ll use the RPC API to send them to the blockchain, as covered here:
I’d like to open this thread for other folks to chime in on mobile development and how we might leverage libraries or SDKs.