babel-preset-react-native-web3

0.0.4 • Public • Published

babel-preset-react-native-web3

It is experimental but looks like it's working on web3 version 0.x

This makes crypto work on JavascriptCore using crypto-browserify and a pure javascript super basic implementation of randombytes.

Can be considered as a workaround, since I used also global.Buffer and global.process, but that worked.

Overview

Getting started

# Install dependencies 
yarn add --dev babel-preset-react-native-web3
yarn add web3@^0.20.2
  1. Add the following in your .babelrc
{
  "presets": [
    // "babel-preset-react-native" or "babel-preset-expo",
    "babel-preset-react-native-web3"
  ]
}
  1. Import globals in your App.js as described below:

App.js

import 'babel-preset-react-native-web3/globals';

See sample

License

MIT @ zetta

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.41latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.41
0.0.30
0.0.20
0.0.11

Package Sidebar

Install

npm i babel-preset-react-native-web3

Weekly Downloads

2

Version

0.0.4

License

MIT

Last publish

Collaborators

  • agrcrobles