espritblock / react-native-eos Goto Github PK
View Code? Open in Web Editor NEWreact-native-eos create by espritblock
Home Page: http://eblock.io
License: GNU General Public License v3.0
react-native-eos create by espritblock
Home Page: http://eblock.io
License: GNU General Public License v3.0
I'll add the following code to App.js
import {EosProvider} from "react-native-eosjs";
Add following code to another place
import {Eos} from "react-native-eosjs";
Eos.balance("eosio","helldworlder",(r)=>{
console.log(r);
});
then:
react-native run-android
The followling error occurs:
TypeError: Cannot read property 'balance' of undefined
at Function.balance (blob:http://localhost:8081/82400c4d-c6de-4fee-ace4-a6f7d272bf8d:112522:25)
at _callee$ (blob:http://localhost:8081/82400c4d-c6de-4fee-ace4-a6f7d272bf8d:112344:41)
at tryCatch (blob:http://localhost:8081/82400c4d-c6de-4fee-ace4-a6f7d272bf8d:21901:19)
at Generator.invoke [as _invoke] (blob:http://localhost:8081/82400c4d-c6de-4fee-ace4-a6f7d272bf8d:22076:24)
at Generator.prototype.(anonymous function) [as next] (blob:http://localhost:8081/82400c4d-c6de-4fee-ace4-a6f7d272bf8d:21944:23)
at tryCatch (blob:http://localhost:8081/82400c4d-c6de-4fee-ace4-a6f7d272bf8d:21901:19)
at invoke (blob:http://localhost:8081/82400c4d-c6de-4fee-ace4-a6f7d272bf8d:21977:22)
at blob:http://localhost:8081/82400c4d-c6de-4fee-ace4-a6f7d272bf8d:22007:13
at tryCallTwo (blob:http://localhost:8081/82400c4d-c6de-4fee-ace4-a6f7d272bf8d:23200:7)
at doResolve (blob:http://localhost:8081/82400c4d-c6de-4fee-ace4-a6f7d272bf8d:23364:15)
Can you help me with this problem?
Hi there, I am trying to test the randomPrivateKey
function in {Eos} component from 'react-native-eosjs', but it doesn't work. The console in EOSApp component below never got logged. Am I doing something wrong?
// App.js
import React from 'react'
import { StyleSheet, Text, View } from 'react-native'
import {EosProvider} from 'react-native-eosjs'
class App extends React.Component {
render () {
return (
<View style={styles.container}>
<EosProvider server='http://jungle.cryptolions.io:18888' chainId='038f4b0fc8ff18a4f0842a8f0564611f6e96e8535901dd45e43ac8691a1c4dca' />
<Text>
Open up App.js to start working on your app!
<EOSApp />
</Text>
</View>
)
}
}
// EOSApp.js
import React from 'react'
import { StyleSheet, Text, View } from 'react-native'
import { Eos } from 'react-native-eosjs'
class EOSApp extends React.Component {
componentDidMount () {
// 生成私钥
Eos.randomPrivateKey(result => {
console.log('result', result)
})
}
render() {...}
}
The EOS module works perfectly when testing on simulators using Expo. When I build the application, ios or android, it doesn't work in the standalone applications.
ios 真机上助记词生成私钥不返回,模拟器上都没问题 是什么情况?
Eos.seedPrivateKey(mnemonic,mnemonic,(result)=>{
resolve(result)
});
Can you please include directions for building:
https://github.com/espritblock/react-native-eos/blob/master/src/eosjs.html
So users can build this file from its original source and track any changes.
In the README it offers
<EosProvider server="http://mainnet.genereos.io" chainId="aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906" />
As a provider, however with the />
where should the child be exactly? I simply get a white screen whether I render the component with and without any children container or component.
Hey,
I want to generate new key-pairs of Eos Keys, using 'react-native-eos', but whenever I import package and call any function of it, it causes error. Now I am using 'randomPrivateKey, so I am facing
TypeError: Cannot read property 'randomPrivateKey' of undefined
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.