game-x-coin / eosjs-rn Goto Github PK
View Code? Open in Web Editor NEWThis project forked from eosio/eosjs
General purpose library for the EOS blockchain.
Home Page: http://eosio.github.io/eosjs
License: MIT License
This project forked from eosio/eosjs
General purpose library for the EOS blockchain.
Home Page: http://eosio.github.io/eosjs
License: MIT License
react-native version
0.57.8
package.json content
{
"name": "eosjsTest",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.3",
"react-native": "0.57.8",
"eosjs-rn": "^20.0.0-beta3"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.51.1",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
}
}
Version of EOSJS
20.0.0-beta3
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
1.
import { Api, JsonRpc, RpcError } from 'eosjs-rn';
import JsSignatureProvider from 'eosjs-rn/dist/eosjs-jssig';
import { TextEncoder, TextDecoder } from 'text-encoding';
2.
const defaultPrivateKey = "5JtUScZK2XEp3g9gh7F8bwtPTRAkASmNrrftmx4AxDKD5K4zDnr";
const signatureProvider = new JsSignatureProvider([defaultPrivateKey]);
const rpc = new JsonRpc('http://127.0.0.1:8888', { fetch });
const api = new Api({ rpc, signatureProvider, textDecoder: new TextDecoder(), textEncoder: new TextEncoder() });
(async () => {
const result = await api.transact({
actions: [{
account: 'eosio.token',
name: 'transfer',
authorization: [{
actor: 'useraaaaaaaa',
permission: 'active',
}],
data: {
from: 'useraaaaaaaa',
to: 'useraaaaaaab',
quantity: '0.0001 SYS',
memo: '',
},
}]
}, {
blocksBehind: 3,
expireSeconds: 30,
});
console.dir(result);
})();
Expected behavior
can not run correctly
How long do you wait before you get a TX ID back from using this package? Just installed it and it appears to be 10 seconds before I get the TX ID back, does anyone else face a similar experience?
Version of EOSJS
beta3
Describe the bug
src/eosjs-numeric.ts
Uint8Array is not supported in React Native
To Reproduce
just use.
Uint8Array
should be polyfilled.
this repo is forked from beta v20.0.1, which is still in develop and lacks some important api, so how about fork from v.16.0.9.
as follows:
{
"actions": [{
"account": "prochaintech",
"name": "click",
"authorization": [{
"actor": "lyxlyxlyxlyx",
"permission": "active"
}],
"data": {
"clickRequest": {
"account": "lyxlyxlyxlyx",
"candyId": 16,
"ref": ""
}
}
}]
}
the struct ‘clickRequest’ is user-defined, i sent the action but failed
I know eosjs(especially ecc module) need some node built-in modules.
but now that in some easy way it can run in web browser.
why can't we use its browser version in react native?
so my question is
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.