npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-eos

v1.0.5

Published

At eva coop, we used to browserify and polyfill eosjs in order to sign transactions. Block.one also recently made their eosjs compatible with React-Native using the same method.

Downloads

3

Readme

react-native-eos

At eva coop, we used to browserify and polyfill eosjs in order to sign transactions. Block.one also recently made their eosjs compatible with React-Native using the same method.

However, in production mode on a cellphone, the ecc signing is way too slow because of the javascript browserfying and polyfills. In order to diminish the signing time on our app and improve UX, we had to implement an android and iOS native implementations with an API for react-native.

Contributors

Performance

According to our tests, the signature goes much faster on both Android and iOS. Tests are ran in production without the js debugger open (it uses the core-js from the computer instead of the device).

| Platform | eosjs browserify | react-native-eos | | ------------- |:----------------:| -----------------:| | iPhone 7 | 13.719 s | 0.621s | | Android 25 LG G3 | 15.110s | 1.233s |

Installation notes

This library was not tested with Expo. It needs XCode and Android Studio manual builds

npm install react-native-eos
react-native link

Android

In your android/app/build.gradle file. Under the android{} add:

compileOptions{
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

The project needs Java8.

iOS

Your build needs to work with Swift. In order to do that Right click on your project and choose Add new file in the same directory as your AppDelegate.m entrypoint file. Name it whatever you want since it won't be used, we just need your xcode build config to handle Swift.

Select yes when prompted to create a Swift bridge header file.

Leave this file empty.

Usage

Import the lib

import ReactNativeEos from 'react-native-eos'

Set the RPC API URL

ReactNativeEos.setUrl('http', 'localhost', 8888);

Get chain info

 ReactNativeEos.getInfo().then(response => {
          console.log(response);
        });

Send action

actionData = {
  "from": "eva",
  "to": "m1evfycor1b1",
  "quantity": "10.0000 EVA",
  "memo": "fast?"
}
ReactNativeEos.pushAction('eosio.token','transfer', JSON.stringify(actionData),'eva','active','5KC4AhWMFzRa3xnKDPZTYnmyANG7JDuzrruxAzvxozkTnj9QUjT').then(trxResponse => {
    console.log('trxResponse', trxResponse.message);
});

Dependencies

This API with react-native would not have been possible without the work of the following libraries:

Roadmap

  • Add get table
  • Integrate native wallet API
  • JSON response on iOS
  • Support multiple actions in transactions
  • Support multisigs