GithubHelp home page GithubHelp logo

game-x-coin / eosjs-rn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eosio/eosjs

18.0 18.0 5.0 3.27 MB

General purpose library for the EOS blockchain.

Home Page: http://eosio.github.io/eosjs

License: MIT License

JavaScript 21.77% TypeScript 68.33% Shell 1.66% HTML 7.16% CSS 1.08%

eosjs-rn's People

Contributors

altingfest avatar bhazzard avatar blockone-devops avatar boid-com avatar brandonfancher avatar c0d3ster avatar channprj avatar chris-allnutt avatar christiandunst avatar dskvr avatar esheffield avatar flux627 avatar ihorperesunko avatar indiev avatar jadertao avatar jeffreyssmith2nd avatar josephjguerra avatar masaka3620 avatar mc01 avatar nsjames avatar pacoccino avatar pluswave avatar randytorres avatar rickykung avatar sergmetelin avatar tbfleming avatar terrylks avatar velua avatar wuyahuang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

eosjs-rn's Issues

How to use eosjs-rn in react-native project?

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

Screenshots
2018-12-25 20-50-17

TX Response

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?

fork from v16.0.9?

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.

How can I use user-defined abi?

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

why can eosjs run in node and browser, yet cannot run in react native?

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

  1. what happened during eosjs node version's changing to browser version?
  2. why browser version is not runnable in react native?
    many thanks if you can tell me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.