React Native EVM

The @ramper/react-native-evm package works in conjunction with the @ramper/react-native-core package. This package works with ethers.js and is responsible for handling all EVM-related peculiarities in order to interact with an Ethereum-based wallet.

npm

$ npm install @ramper/react-native-evm react-native-get-random-values

yarn

$ yarn add @ramper/react-native-evm react-native-get-random-values

Step 1

$ cd ios && pod install

Step 2

You will need to register react-native-get-random-values and @ethersproject/shims in the entry file of your application, such as index.js:

// Import the crypto getRandomValues shim (**BEFORE** the shims)
import 'react-native-get-random-values';

// Import the ethers shims (**BEFORE** ethers)
import '@ethersproject/shims';

Usage

import { ethers } from 'ethers';
import { EtherTx } from '@ramper/react-native-evm';

Transactions

Before you can do transactions you need to create an ethers provider

Sign Transaction

Sign Typed Data

Sign Message

Personal Sign

Deserialize Transaction

Method Signature:

Last updated