{"id":20295019,"url":"https://github.com/berty/weshnet-expo","last_synced_at":"2025-08-09T05:33:56.776Z","repository":{"id":180327094,"uuid":"664680644","full_name":"berty/weshnet-expo","owner":"berty","description":"🚧  [Work In Progress] 🚧  This library cannot be used yet!!","archived":false,"fork":false,"pushed_at":"2024-11-29T15:05:17.000Z","size":1297,"stargazers_count":6,"open_issues_count":4,"forks_count":7,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-25T08:20:59.152Z","etag":null,"topics":["berty","expo","react-native","weshnet"],"latest_commit_sha":null,"homepage":"https://wesh.network","language":"JavaScript","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/berty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["berty"],"open_collective":"berty","custom":["https://berty.tech/contribute"]}},"created_at":"2023-07-10T14:06:16.000Z","updated_at":"2025-02-07T13:46:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"b2ac9a90-056e-4835-98c8-c6399c458f6f","html_url":"https://github.com/berty/weshnet-expo","commit_stats":null,"previous_names":["berty/weshnet-expo"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berty%2Fweshnet-expo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berty%2Fweshnet-expo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berty%2Fweshnet-expo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berty%2Fweshnet-expo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/berty","download_url":"https://codeload.github.com/berty/weshnet-expo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248394213,"owners_count":21096561,"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":["berty","expo","react-native","weshnet"],"created_at":"2024-11-14T15:32:43.724Z","updated_at":"2025-04-11T12:02:19.821Z","avatar_url":"https://github.com/berty.png","language":"JavaScript","funding_links":["https://github.com/sponsors/berty","https://opencollective.com/berty","https://berty.tech/contribute"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"https://wesh.network/img/LogoCubes.svg\" alt=\"Berty\" title=\"Berty\" height=\"100px\" /\u003e\n\u003c/h1\u003e\n\u003ch1 align=\"center\"\u003e\nWesh Network Expo Module\n\u003c/h1\u003e\n\u003ch2\u003e\n\u003cmark\u003e🚧 This project is work In Progress. This library cannot be used yet.\u003c/mark\u003e\n\u003c/h2\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://crpt.fyi/berty-discord\"\u003e\u003cimg alt=\"discord\" src=\"https://img.shields.io/badge/discord-gray?logo=discord\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/berty\"\u003e\u003cimg alt=\"github\" src=\"https://img.shields.io/badge/@berty-471961?logo=github\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://twitter.com/weshnet\"\u003e\u003cimg alt=\"twitter\" src=\"https://img.shields.io/twitter/follow/berty?label=%40weshnet\u0026style=flat\u0026logo=twitter\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003eThe Wesh network toolkit lets your application use the Wesh protocol to support privacy-based, off-grid, peer-to-peer communication.\n\u003cbr/\u003e\u003cbr/\u003eFor details, see the Wesh website at \u003ca href=\"https://wesh.network\"\u003ehttps://wesh.network\u003c/a\u003e. The website includes blog tutorials which introduce you to Wesh and walk you through some example applications and background of the Wesh protocol.\u003c/h3\u003e\n\n---\n\n## Requirements\n\n-   [Go](https://golang.org/doc/install) = 1.22.4\n\nFollow the [React Native requirements](https://reactnative.dev/docs/set-up-your-environment) and [Expo requirements](https://docs.expo.dev/get-started/set-up-your-environment) for your platform.\n\n## Instalation\n\nInstall the package in your project:\n\n```sh\n# create new expo project\nnpx create-expo-app my-app --template expo-template-blank-typescript\ncd my-app\nnpx expo install @berty/weshnet-expo\n```\n\n## Usage\n\nOpen `App.tsx` and replace the contents with the following code:\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { StyleSheet, Text, View } from \"react-native\";\n\nimport * as WeshnetExpo from \"@berty/weshnet-expo\";\n\nexport default function App() {\n    const [peerID, setPeerID] = useState\u003cstring\u003e();\n    useEffect(() =\u003e {\n        WeshnetExpo.init().then((client) =\u003e {\n            client.serviceGetConfiguration({}).then((res) =\u003e {\n                setPeerID(res.peerId);\n                console.log(res);\n            });\n        });\n    }, []);\n\n    const loadingView = \u003cText\u003e Loading Weshnet... \u003c/Text\u003e;\n    const weshView = \u003cText\u003ehello my peerid is: {peerID}\u003c/Text\u003e;\n    return (\n        \u003cView style={styles.container}\u003e{!peerID ? loadingView : weshView}\u003c/View\u003e\n    );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n      flex: 1,\n      backgroundColor: \"#fff\",\n      alignItems: \"center\",\n      justifyContent: \"center\",\n  },\n});\n```\n\n`weshnet` needs some system permissions to get the phone's connectivity status and make `mDNS` working. Edit your `app.json` to include the following permissions:\n\n```json\n{\n    \"expo\": {\n        \"android\": {\n            \"permissions\": [\n                \"android.permission.READ_PHONE_STATE\",\n                \"android.permission.ACCESS_NETWORK_STATE\",\n                \"android.permission.CHANGE_WIFI_MULTICAST_STATE\"\n            ]\n        }\n    }\n}\n```\n\nYou need to update your native Android / iOS folders. If you have a `managed workflow` (learn more [here](https://medium.com/@mehro_z/choosing-between-managed-and-bare-workflow-in-expo-a-comprehensive-difference-7086305f1480)), do the following (this command will delete and recreate the native folders!!!)\n\n```sh\nnpx expo prebuild --clean\n```\n\n## Example App\n\n```sh\ncd example\nmake build.ios # or make build.android\n```\n\n## Contributing\n\n[![Contribute to Berty](https://assets.berty.tech/files/contribute-contribute_v2--Contribute-berty-ultra-light.gif)](https://github.com/berty/community)\n\nIf you want to help out, please see [docs/developer-guide.md](./docs/developer-guide.md) and [CONTRIBUTING.md](./CONTRIBUTING.md).\n\nThis repository falls under the Berty [Code of Conduct](https://github.com/berty/community/blob/master/CODE_OF_CONDUCT.md).\n\nYou can contact us on the [`#questions-❓`](https://crpt.fyi/berty-dev-discord) channel on [discord](https://crpt.fyi/berty-discord).\n\n## License\n\nDual-licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) and [MIT](https://opensource.org/licenses/MIT) terms.\n\n`SPDX-License-Identifier: (Apache-2.0 OR MIT)`\n\nSee the [COPYRIGHT](./COPYRIGHT) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberty%2Fweshnet-expo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberty%2Fweshnet-expo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberty%2Fweshnet-expo/lists"}