Skip to content
by Unity Nodes
Product & Design

Mobile app development

1 posts394 views6 likesLast activity Nov 2021

  1. mikedotexeOP 6

    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:

    github.com

    GitHub - near/near-api-swift: Interact with NEAR blockchain from iOS and OS X...

    Interact with NEAR blockchain from iOS and OS X apps using Swift

    The above repo seems to have implemented the ed25519 curve but not secp256k1. Perhaps these are useful libraries to peruse:

    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.

    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:

    docs.near.org

    Create Transactions | NEAR Documentation

    To construct & process transactions you will need our API JavaScript library: near-api-js. There are many ways to create transactions but for this example we'll show you two ways to create a simple token transfer transaction.

    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:

    docs.near.org

    RPC Endpoints | NEAR Documentation

    The RPC API enables you to send transactions and query their status.

    I’d like to open this thread for other folks to chime in on mobile development and how we might leverage libraries or SDKs.