{"id":18369792,"url":"https://github.com/cawfree/react-native-walletconnect","last_synced_at":"2025-04-06T18:32:31.389Z","repository":{"id":37771066,"uuid":"302161570","full_name":"cawfree/react-native-walletconnect","owner":"cawfree","description":"⚛️ 👛 WalletConnect for React Native! Zero linking, full awesome. (Android/iOS/Web/Expo)","archived":false,"fork":false,"pushed_at":"2023-01-04T02:01:54.000Z","size":432,"stargazers_count":57,"open_issues_count":0,"forks_count":16,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-18T13:17:40.243Z","etag":null,"topics":["ethereum","react-native","wallet","walletconnect","web3"],"latest_commit_sha":null,"homepage":"https://docs.walletconnect.org/client-api","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/cawfree.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":"2020-10-07T21:12:51.000Z","updated_at":"2024-12-22T17:55:08.000Z","dependencies_parsed_at":"2023-02-01T17:45:41.309Z","dependency_job_id":null,"html_url":"https://github.com/cawfree/react-native-walletconnect","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Freact-native-walletconnect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Freact-native-walletconnect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Freact-native-walletconnect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Freact-native-walletconnect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cawfree","download_url":"https://codeload.github.com/cawfree/react-native-walletconnect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247531298,"owners_count":20953932,"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":["ethereum","react-native","wallet","walletconnect","web3"],"created_at":"2024-11-05T23:31:49.729Z","updated_at":"2025-04-06T18:32:28.684Z","avatar_url":"https://github.com/cawfree.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-walletconnect\n⚛️ 👛 This is an unofficial package which supports integrating [**WalletConnect**](https://walletconnect.org/) with [**React Native**](https://reactnative.dev) without requiring linking. This is basically achieved using a [**WebView**](https://github.com/react-native-webview/react-native-webview).\n\nIf your project supports using [**Native Modules**](), I strongly recommend you use the official [**@walletconnect/react-native**](https://github.com/WalletConnect/walletconnect-monorepo/) library.\n\nCompatible with [**Android**](https://engineering.fb.com/developer-tools/react-native-for-android-how-we-built-the-first-cross-platform-react-native-app/), [**iOS**](https://reactnative.dev/), [**Web**](https://github.com/necolas/react-native-web) and [**Expo**](https://expo.io).\n\n### 🔥 Features\n  - Supports the **complete** WalletConnect [**Client Interface**](https://docs.walletconnect.org/client-api).\n  - **Persists** connected wallets between executions.\n\n## 🚀 Getting Started\n\nUsing [**Yarn**](https://yarnpkg.com):\n\n```bash\nyarn add react-native-webview react-native-walletconnect\n```\n\n## ✍️ Usage\n\nFirst you need to wrap the graphical root of your application with the [`\u003cWalletConnectProvider /\u003e`](./src/providers/WalletConnectProvider.js). Once this is done, you can make a call to the [`useWalletConnect`](./src/hooks/useWalletConnect.js) [**hook**](https://reactjs.org/docs/hooks-intro.html) to utilize the complete WalletConnect Client API within your app.\n\n```javascript\nimport React from \"react\";\nimport { SafeAreaView, Button } from \"react-native\";\n\nimport WalletConnectProvider, { useWalletConnect } from \"react-native-walletconnect\";\n\nconst WalletConnectExample = () =\u003e {\n  const {\n    createSession,\n    killSession,\n    session,\n    signTransaction,\n  } = useWalletConnect();\n  const hasWallet = !!session.length;\n  return (\n    \u003c\u003e\n      {!hasWallet \u0026\u0026 (\n        \u003cButton title=\"Connect\" onPress={createSession} /\u003e\n      )}\n      {!!hasWallet \u0026\u0026 (\n        \u003cButton\n          title=\"Sign Transaction\"\n          onPress={() =\u003e signTransaction({\n            from: \"0xbc28Ea04101F03aA7a94C1379bc3AB32E65e62d3\",\n            to: \"0x89D24A7b4cCB1b6fAA2625Fe562bDd9A23260359\",\n            data: \"0x\",\n            gasPrice: \"0x02540be400\",\n            gas: \"0x9c40\",\n            value: \"0x00\", \n            nonce: \"0x0114\",\n          })}\n        /\u003e\n      )}\n      {!!hasWallet \u0026\u0026 (\n        \u003cButton\n          title=\"Disconnect\"\n          onPress={killSession}\n        /\u003e\n      )}\n    \u003c/\u003e\n  );\n};\n\nexport default function App() {\n  return (\n    \u003cWalletConnectProvider\u003e\n      \u003cWalletConnectExample /\u003e\n    \u003c/WalletConnectProvider\u003e\n  );\n}\n```\n\n### `useWalletConnect`\n\nThe [`useWalletConnect`](./src/hooks/useWalletConnect.js) hook provides the following functionality:\n  - [`createSession`](https://docs.walletconnect.org/client-api#create-new-session-session_request)\n    - Requests the creation of a new session via the presentation of the [**QR Modal**](https://www.npmjs.com/package/@walletconnect/qrcode-modal).\n  - [`killSession`](https://docs.walletconnect.org/client-api#kill-session-disconnect)\n    - Terminates the active session, equivalent to logging out.\n  - [`sendTransaction`](https://docs.walletconnect.org/client-api#send-transaction-eth_sendtransaction)\n    - Makes an [**Ethereum**](https://ethereum.org) transaction.\n  - [`signTransaction`](https://docs.walletconnect.org/client-api#sign-transaction-eth_signtransaction)\n    - Signs an Ethereum transaction, but does not send it.\n  - [`signPersonalMessage`](https://docs.walletconnect.org/client-api#sign-personal-message-personal_sign)\n    - Signs a personal message.\n  - [`signMessage`](https://docs.walletconnect.org/client-api#sign-message-eth_sign)\n    - Signs an arbitrary message.\n  - [`signTypedData`](https://docs.walletconnect.org/client-api#sign-typed-data-eth_signtypeddata)\n    - Signs [**Typed Data**](https://github.com/uport-project/eth-typed-data).\n  - [`sendCustomRequest`](https://docs.walletconnect.org/client-api#send-custom-request)\n    - Sends a custom request, where you can specify custom configuration options such as `jrpcProvider`.\n  - `session`\n    - Returns an array of the active session. These are the connected wallets with details such as `address`es and `chain`s they are assigned to.\n\n## ✌️ License\n[**MIT**](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcawfree%2Freact-native-walletconnect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcawfree%2Freact-native-walletconnect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcawfree%2Freact-native-walletconnect/lists"}