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-valuesyarn
$ yarn add @ramper/react-native-evm react-native-get-random-valuesStep 1
$ cd ios && pod installStep 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