{"id":13453428,"url":"https://github.com/GoEvaCom/react-native-eos","last_synced_at":"2025-03-24T01:31:28.766Z","repository":{"id":45854624,"uuid":"167024755","full_name":"GoEvaCom/react-native-eos","owner":"GoEvaCom","description":"Native implementation of client to eos blockchain communication.","archived":false,"fork":false,"pushed_at":"2021-12-01T19:01:59.000Z","size":711,"stargazers_count":42,"open_issues_count":4,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-08-21T02:03:00.229Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoEvaCom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-22T16:12:04.000Z","updated_at":"2024-08-21T02:03:00.234Z","dependencies_parsed_at":"2022-09-14T12:11:30.488Z","dependency_job_id":null,"html_url":"https://github.com/GoEvaCom/react-native-eos","commit_stats":null,"previous_names":["evacoop/react-native-eos"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoEvaCom%2Freact-native-eos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoEvaCom%2Freact-native-eos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoEvaCom%2Freact-native-eos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoEvaCom%2Freact-native-eos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoEvaCom","download_url":"https://codeload.github.com/GoEvaCom/react-native-eos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245194231,"owners_count":20575725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T08:00:39.888Z","updated_at":"2025-03-24T01:31:27.506Z","avatar_url":"https://github.com/GoEvaCom.png","language":"C","funding_links":[],"categories":["Language Support"],"sub_categories":["JavaScript"],"readme":"# react-native-eos\n\nAt eva coop, we used to browserify and polyfill eosjs in order to sign transactions. Block.one also recently made their eosjs compatible with React-Native using the same method.\n\nHowever, in production mode on a cellphone, the ecc signing  is way too slow because of the javascript browserfying and polyfills. In order to diminish the signing time on our app and improve UX, we had to implement an android and iOS native implementations with an API for react-native.\n\n# Contributors\n- [Raphael Gaudreault](https://github.com/raphaelgodro)\n\n\n# Performance\nAccording to our tests, the signature goes much faster on both Android and iOS. Tests are ran in production without the js debugger open (it uses the core-js from the computer instead of the device).\n\n\n| Platform      | eosjs browserify | react-native-eos  |\n| ------------- |:----------------:| -----------------:|\n| iPhone 7    | 13.719 s   | 0.621s             |\n| Android 25 LG G3    | 15.110s        |   1.233s     \t   |\n\n# Installation notes\n\nThis library was not tested with Expo. It needs XCode and Android Studio manual builds\n\n```\nnpm install react-native-eos\nreact-native link\n```\n\n## Android\n\nIn your `android/app/build.gradle` file. Under the android{} add:\n\n```\ncompileOptions{\n        sourceCompatibility JavaVersion.VERSION_1_8\n        targetCompatibility JavaVersion.VERSION_1_8\n    }\n```\nThe project needs Java8.\n\n## iOS\n\nYour build needs to work with Swift.\nIn order to do that Right click on your project and choose `Add new file` in the same directory as your `AppDelegate.m` entrypoint file. Name it whatever you want since it won't be used, we just need your xcode build config to handle Swift. \n\nSelect yes when prompted to create a Swift bridge header file.\n\nLeave this file empty.\n\n# Usage\n### Import the lib\n```\nimport ReactNativeEos from 'react-native-eos'\n```\n### Set the RPC API URL\n```\nReactNativeEos.setUrl('http', 'localhost', 8888);\n```\n### Get chain info\n```\n ReactNativeEos.getInfo().then(response =\u003e {\n          console.log(response);\n        });\n```\n### Send action\n```\nactionData = {\n  \"from\": \"eva\",\n  \"to\": \"m1evfycor1b1\",\n  \"quantity\": \"10.0000 EVA\",\n  \"memo\": \"fast?\"\n}\nReactNativeEos.pushAction('eosio.token','transfer', JSON.stringify(actionData),'eva','active','5KC4AhWMFzRa3xnKDPZTYnmyANG7JDuzrruxAzvxozkTnj9QUjT').then(trxResponse =\u003e {\n    console.log('trxResponse', trxResponse.message);\n});\n```\n\n# Dependencies\nThis API with react-native would not have been possible without the work of the following libraries:\n\n - [EosCommander](https://github.com/playerone-id/EosCommander)\n - [SwiftyEOS](https://github.com/ProChain/SwiftyEOS)\n\n# Roadmap\n\n- Add get table \n- Integrate native wallet API\n- JSON response on iOS\n- Support multiple actions in transactions\n- Support multisigs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGoEvaCom%2Freact-native-eos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGoEvaCom%2Freact-native-eos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGoEvaCom%2Freact-native-eos/lists"}