@pigzbe/react-native-stellar-sdk

1.2.0 • Public • Published

react-native-stellar-sdk

npm version

This package polyfills the stellar-sdk for React Native.

It includes native randomBytes for iOS and Android via react-native-randombytes.

Due to the asynchronous nature of React Native's native bridge, this package adds a new asynchronous method to the Stellar Keypair utility randomAsync which returns a promise that resolves to the new randomly generated Keypair.

Installation

yarn add @pigzbe/react-native-stellar-sdk

Link native randomBytes module:

react-native link react-native-randombytes

Usage

import { Keypair } from '@pigzbe/react-native-stellar-sdk'

const keypair = await Keypair.randomAsync()
const publicKey = keypair.publicKey()
const secretKey = keypair.secret()

/@pigzbe/react-native-stellar-sdk/

    Package Sidebar

    Install

    npm i @pigzbe/react-native-stellar-sdk

    Weekly Downloads

    11

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    537 kB

    Total Files

    12

    Last publish

    Collaborators

    • ianmcgregor
    • silviopaganini