NEAR Mobile Flutter [Update]

Hey Community,

A few months ago, I began looking into how mobile developers could build mobile apps that interacts with NEAR. I have wonderful news to share on this today.

In this report, I share the updates, the path taken to get to the current state, and next steps.

Phase 1 (API)

I started by creating an API based on near-api-js so that any mobile developer can use. The big concern on this was that it requires you to send the private keys to the API which was a major security concern.

Phase 2 (API + Local)

To fix the previous problem, we started to go local. We chose Flutter to be our dev platform for its popularity and because you can build cross-platform apps for almost every platform.

Flutter Side

  • We developed the code to generate keys and sign transactions locally

Remote Side

  • We use custom-built near-api-js-based API for transaction serialization.
  • We directly call near-rpc to submit the transactions

We tested the following functionality and IT WORKS! :

  • Call Smart Contract Methods
  • Transfer NEAR Tokens

Phase 3 (100% Local) - In Progress

We are currently working on the transaction serialization part to be done in dart. This work includes either using the borsh dart library or we wrap the borshj package in a Flutter method channel.

This is the in-progress written code if you’d like to take a look. It’s still in-progress and we did not release it yet. Currently refactoring the code and working on Phase 3.

Your feedback and comments are highly appreciated.

Thanks!

5 Likes

Looks interesting. Maybe I could add few suggestions to it. Let’s connect.

I have worked on similar product, could be of help.

1 Like

Tried to message you with no luck!

Hi mate, does the API work in the iOS environment?

Can you publish the documentation? my team I develop only in iOS.

Xcode, SwiftUI, and the associated frameworks.

regards.

Hello,
Unfortunately we are not currently working with NEAR so we can’t provide further support.

The project is a flutter SDK. There is no support for native iOS SDK or native Android.