Skip to content

LevanIlashvili/react-native-eosjs-ecc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

react-native-eosjs-ecc

Use eosjs-ecc on react native

install


npm install https://github.com/bulangnisi/react-native-eosjs-ecc.git --save

use

App.js

import React, { Component } from 'react';
import { Platform, StyleSheet, View, Button } from 'react-native';
import Ecc from 'react-native-eosjs-ecc';

export default class App extends Component{

    handleEcc(){
        Ecc.randomKey().then(key => {
            console.log('randomKey ', key);
		});
		
		let privKey = '5K9gVJNGqzMnKajtJaK3kcxWZ9xXj5SVJY47SD2B5uD4WMNtr9w';
		Ecc.privateToPublic(privKey).then(pubKey => {
            console.log('pubKey ', pubKey);
        });
    }

    render(){
        <View style={styles.container}>
            <Button title="中文" onPress={this.handleEcc.bind(this)}></Button>
            <Ecc />
        </View>
    }
}

const styles = StyleSheet.create({
	container: {
		flex: 1,
		justifyContent: 'center',
		alignItems: 'center',
		backgroundColor: '#F5FCFF',
	},
	welcome: {
		fontSize: 20,
		textAlign: 'center',
		margin: 10,
	},
	instructions: {
		textAlign: 'center',
		color: '#333333',
		marginBottom: 5,
	},
});

About

Use eosjs-ecc on react native

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 92.5%
  • HTML 7.5%