react native eosjs 1.0.0
compatible es5
support android & ios
example https://github.com/espritblock/eos-mars/blob/master/app/Main.js
npm install react-native-eosjs --save
android
copy node_modules/react-native-eosjs/src/eos folder to android/app/src/main/assets/
import {EosProvider} from "react-native-eosjs";
<EosProvider
server="http://mainnet.genereos.io"
chainId="aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906" />
import {Eos} from "react-native-eosjs";
Eos.delegate(pk,pay,recive,cpu,net,perm,(r)=>{
})
import {Eos} from "react-native-eosjs";
Eos.undelegate(pk,from,recive,cpu,net,perm,(r)=>{
})
import {Eos} from "react-native-eosjs";
Eos.buyram(pk,pay,recive,count,perm,(r)=>{
})
import {Eos} from "react-native-eosjs";
Eos.sellram(pk,recive,bytes,perm,(r)=>{
})
import {Eos} from "react-native-eosjs";
Eos.randomPrivateKey((r)=>{
})
import {Eos} from "react-native-eosjs";
Eos.randomPrivateKey((r)=>{
})
Eos.privateToPublic(pk,(r)=>{
})
Eos.checkPrivateKey(pk,(r)=>{
})
Eos.checkPublicKey(puk,(r)=>{
})
Eos.balance("eosio","aaa",(r)=>{
});
Eos.transfer(contract,from,to,quantity,memo,pk,perm,broadcast,(r)=>{
});
Eos.createAccount(creator,createPrivateKey,newAccount,onwerPublicKey,activePublicKey,net,cpu,bytes,transfer,perm,(r)=>{
});
Eos.transaction(pk,actions,(r)=>{
});
react-native add api you can modify src/api.js
eosjs lib upgrade you can modify src/eos.js
eos.js build
git clone https://github.com/EOSIO/eosjs/tree/v15.0.1
cd eosjs
npm install
npm run build_browser
copy eos.js to here
wechat hl_294944589
react-native-eos is released under GNU/GPL Version 3