{"id":21561739,"url":"https://github.com/synonymdev/react-native-address-generator","last_synced_at":"2025-04-10T12:06:16.887Z","repository":{"id":235768830,"uuid":"790691829","full_name":"synonymdev/react-native-address-generator","owner":"synonymdev","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-09T18:18:04.000Z","size":70783,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T04:41:22.749Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","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/synonymdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-23T10:56:52.000Z","updated_at":"2024-05-16T23:22:03.000Z","dependencies_parsed_at":"2024-04-24T15:05:56.449Z","dependency_job_id":"b764938c-fe75-47c6-8463-1a1f005c7dbc","html_url":"https://github.com/synonymdev/react-native-address-generator","commit_stats":{"total_commits":20,"total_committers":2,"mean_commits":10.0,"dds":"0.050000000000000044","last_synced_commit":"930df9b5b5008c0f68c5e32ebcd5963f69c027a0"},"previous_names":["synonymdev/react-native-address-generator"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Freact-native-address-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Freact-native-address-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Freact-native-address-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Freact-native-address-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synonymdev","download_url":"https://codeload.github.com/synonymdev/react-native-address-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248216889,"owners_count":21066632,"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-11-24T09:27:49.602Z","updated_at":"2025-04-10T12:06:16.866Z","avatar_url":"https://github.com/synonymdev.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-address-generator\n\nA Bitcoin Address Generator for React Native Projects.\n\n## Installation\n\n```sh\nnpm install react-native-address-generator\n```\n\n## Usage\n\n```js\nimport { getAddress, getScriptHash, getPrivateKey } from 'react-native-address-generator';\n\nconst mnemonic =\n  'lazy rally chat way pet outside flame cup oval absurd innocent balcony';\nconst passphrase = 'passphrase';\nconst path = \"m/84'/1'/0'/0/0\";\nconst network = 'testnet';\n\nconst getAddressRes = await getAddress({\n  mnemonic,\n  path,\n  network,\n  passphrase,\n});\nif (getAddressRes.isErr()) {\n  console.log(getAddressRes.error.message);\n  return;\n}\nconsole.log(getAddressRes.value);\n\nconst address = getAddressRes.value.address;\n\nconst getScriptHashRes = await getScriptHash({\n  address,\n  network,\n});\nif (getScriptHashRes.isErr()) {\n  console.log(getScriptHashRes.error.message);\n  return;\n}\nconsole.log(getScriptHashRes.value);\n\nconst getPrivateKeyRes = await getPrivateKey({\n  mnemonic,\n  path,\n  network,\n  passphrase,\n});\nif (getPrivateKeyRes.isErr()) {\n  console.log(getPrivateKeyRes.error.message);\n  return;\n}\nconsole.log(getPrivateKeyRes.value);\n```\n\n## Update Bindings\n\nAfter making changes to any of the Rust files, the bindings will need to be updated. To do this, run the following command:\n\n```sh\nnpm run update-bindings\n```\n\nFinally, ensure that `AddressGeneratorModule.kt`, `AddressGenerator.swift`, `AddressGenerator.mm` \u0026 `src/index.tsx` are updated accordingly based on the changes made to the Rust files.\n\n## License\n\nMIT\n\n---\n\n## Resources\n\n - Project created with: [create-react-native-library](https://github.com/callstack/react-native-builder-bob)\n - [Building an Android App with Rust Using UniFFI](https://forgen.tech/en/blog/post/building-an-android-app-with-rust-using-uniffi)\n - [Building an iOS App with Rust Using UniFFI](https://forgen.tech/en/blog/post/building-an-ios-app-with-rust-using-uniffi)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynonymdev%2Freact-native-address-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynonymdev%2Freact-native-address-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynonymdev%2Freact-native-address-generator/lists"}