{"id":31250617,"url":"https://github.com/ronickg/react-native-bls-signatures","last_synced_at":"2025-09-23T05:34:09.482Z","repository":{"id":193471444,"uuid":"688540662","full_name":"ronickg/react-native-bls-signatures","owner":"ronickg","description":"React Native wrapper for BLS Signatures","archived":false,"fork":false,"pushed_at":"2024-06-20T13:15:44.000Z","size":30120,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-16T05:36:09.390Z","etag":null,"topics":["bls12-381","chia","cpp","jini","jsi","react","react-native"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-native-bls-signatures","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/ronickg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-09-07T14:59:52.000Z","updated_at":"2025-04-09T10:26:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"278e53fb-fc01-450e-9bbb-435111eb0017","html_url":"https://github.com/ronickg/react-native-bls-signatures","commit_stats":{"total_commits":148,"total_committers":1,"mean_commits":148.0,"dds":0.0,"last_synced_commit":"10f4d53f324e8470fea98a93f81b900a6ad4af36"},"previous_names":["bubbletrouble14/react-native-bls-signatures","ronickg/react-native-bls-signatures"],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/ronickg/react-native-bls-signatures","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronickg%2Freact-native-bls-signatures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronickg%2Freact-native-bls-signatures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronickg%2Freact-native-bls-signatures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronickg%2Freact-native-bls-signatures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ronickg","download_url":"https://codeload.github.com/ronickg/react-native-bls-signatures/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronickg%2Freact-native-bls-signatures/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276519232,"owners_count":25656581,"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","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bls12-381","chia","cpp","jini","jsi","react","react-native"],"created_at":"2025-09-23T05:34:05.228Z","updated_at":"2025-09-23T05:34:09.470Z","avatar_url":"https://github.com/ronickg.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native BLS Signatures\n\nThis is a React Native wrapper for [BLS Signatures](https://github.com/Chia-Network/bls-signatures) that offers quick and direct bindings to the native C++ library, accessible through a user-friendly TypeScript API.\n\n## Installation\n\nTo use this library in your React Native project run the following command:\n\n```sh\nyarn add react-native-bls-signatures\n```\n\nor\n\n```sh\nnpm install react-native-bls-signatures\n```\n\n## Example\n\n```typescript\nconst seed = Uint8Array.from([\n  0, 50, 6, 244, 24, 199, 1, 25, 52, 88, 192, 19, 18, 12, 89, 6, 220, 18, 102,\n  58, 209, 82, 12, 62, 89, 110, 182, 9, 44, 20, 254, 22,\n]).buffer;\n\nconst sk = AugSchemeMPL.keyGen(seed);\nconst pk = sk.getG1();\n\nconst message = Uint8Array.from([1, 2, 3, 4, 5]).buffer;\nconst signature = AugSchemeMPL.sign(sk, message);\n\nconst ok = AugSchemeMPL.verify(pk, message, signature);\nconsole.log(ok); // true\n```\n\n## Documentation\n\n- [AugSchemeMPL](#augschemempl)\n- [BasicSchemeMPL](#basicschemempl)\n- [PopSchemeMPL](#popschemempl)\n- [PrivateKey](#privatekey)\n- [G1Element](#g1element)\n- [G2Element](#g2element)\n- [Utils](#utils)\n\n## AugSchemeMPL\n\n### Static Methods:\n\n- **skToG1**(_sk:_ `PrivateKey`) -\u003e `G1Element`\n- **keyGen**(_seed:_ `ArrayBuffer`) -\u003e `PrivateKey`\n- **sign**(_sk:_ `PrivateKey`, _msg:_ `ArrayBuffer`) -\u003e `G2Element`\n- **signPrepend**(_sk:_ `PrivateKey`, _msg:_ `ArrayBuffer`, _prependPk:_ `G1Element`) -\u003e `G2Element`\n- **verify**(_pk:_ `G1Element`, _msg:_ `ArrayBuffer`, _sig:_ `G2Element`) -\u003e `boolean`\n- **aggregate**(_g2Elements:_ `G2Element[]`) -\u003e `G2Element`\n- **aggregateVerify**(_pks:_ `G1Element[]`, _msgs:_ `ArrayBuffer[]`, _sig:_ `G2Element`) -\u003e `boolean`\n- **deriveChildSk**(_sk:_ `PrivateKey`, _index:_ `number`) -\u003e `PrivateKey`\n- **deriveChildSkUnhardened**(_sk:_ `PrivateKey`, _index:_ `number`) -\u003e `PrivateKey`\n- **deriveChildPkUnhardened**(_pk:_ `G1Element`, _index:_ `number`) -\u003e `G1Element`\n\n## BasicSchemeMPL\n\n### Static Methods:\n\n- **skToG1**(_sk:_ `PrivateKey`) -\u003e `G1Element`\n- **keyGen**(_seed:_ `ArrayBuffer`) -\u003e `PrivateKey`\n- **sign**(_sk:_ `PrivateKey`, _msg:_ `ArrayBuffer`) -\u003e `G2Element`\n- **verify**(_pk:_ `G1Element`, _msg:_ `ArrayBuffer`, _sig:_ `G2Element`) -\u003e `boolean`\n- **aggregate**(_g2Elements:_ `G2Element[]`) -\u003e `G2Element`\n- **aggregateVerify**(_pks:_ `G1Element[]`, _msgs:_ `ArrayBuffer[]`, _sig:_ `G2Element`) -\u003e `boolean`\n- **deriveChildSk**(_sk:_ `PrivateKey`, _index:_ `number`) -\u003e `PrivateKey`\n- **deriveChildSkUnhardened**(_sk:_ `PrivateKey`, _index:_ `number`) -\u003e `PrivateKey`\n- **deriveChildPkUnhardened**(_pk:_ `G1Element`, _index:_ `number`) -\u003e `G1Element`\n\n## PopSchemeMPL\n\n### Static Methods:\n\n- **skToG1**(_sk:_ `PrivateKey`) -\u003e `G1Element`\n- **keyGen**(_seed:_ `ArrayBuffer`) -\u003e `PrivateKey`\n- **sign**(_sk:_ `PrivateKey`, _msg:_ `ArrayBuffer`) -\u003e `G2Element`\n- **verify**(_pk:_ `G1Element`, _msg:_ `ArrayBuffer`, _sig:_ `G2Element`) -\u003e `boolean`\n- **aggregate**(_g2Elements:_ `G2Element[]`) -\u003e `G2Element`\n- **aggregateVerify**(_pks:_ `G1Element[]`, _msgs:_ `ArrayBuffer[]`, _sig:_ `G2Element`) -\u003e `boolean`\n- **deriveChildSk**(_sk:_ `PrivateKey`, _index:_ `number`) -\u003e `PrivateKey`\n- **deriveChildSkUnhardened**(_sk:_ `PrivateKey`, _index:_ `number`) -\u003e `PrivateKey`\n- **deriveChildPkUnhardened**(_pk:_ `G1Element`, _index:_ `number`) -\u003e `G1Element`\n- **popVerify**(_pk:_ `G1Element`, _sigProof:_ `G2Element`) -\u003e `boolean`\n- **popProve**(_sk:_ `PrivateKey`) -\u003e `G2Element`\n- **fastAggregateVerify**(_pks:_ `G1Element[]`, _msg:_ `ArrayBuffer`, _sig:_ `G2Element`) -\u003e `boolean`\n\n## PrivateKey\n\n### Static Methods:\n\n- **fromBytes**(_bytes:_ `ArrayBuffer`, _modOrder_?: `boolean`) -\u003e `PrivateKey`\n- **fromHex**(_hex:_ `string`) -\u003e `PrivateKey`\n- **aggregate**(_pks:_ `PrivateKey[]`) -\u003e `PrivateKey`\n\n### Methods:\n\n- **toBytes()** -\u003e `ArrayBuffer`\n- **toHex()** -\u003e `string`\n- **toString()** -\u003e `string`\n- **equals**(_sk:_ `PrivateKey`) -\u003e `boolean`\n- **getG1()** -\u003e `G1Element`\n- **getG2()** -\u003e `G2Element`\n\n## G1Element\n\n### Static Methods:\n\n- **fromBytes**(_bytes:_ `ArrayBuffer`) -\u003e `G1Element`\n- **fromHex**(_hex:_ `string`) -\u003e `G1Element`\n\n### Methods:\n\n- **toBytes()** -\u003e `ArrayBuffer`\n- **toHex()** -\u003e `string`\n- **getFingerPrint()** -\u003e `number`\n- **add**(_g1e:_ `G1Element`) -\u003e `G1Element`\n- **negate()** -\u003e `G1Element`\n- **equals**(_g1e:_ `G1Element`) -\u003e `boolean`\n\n## G2Element\n\n### Static Methods:\n\n- **fromBytes**(_bytes:_ `ArrayBuffer`) -\u003e `G2Element`\n- **fromHex**(_hex:_ `string`) -\u003e `G2Element`\n\n### Methods:\n\n- **toBytes()** -\u003e `ArrayBuffer`\n- **toHex()** -\u003e `string`\n- **add**(_g2e:_ `G2Element`) -\u003e `G2Element`\n- **negate()** -\u003e `G2Element`\n- **equals**(_g2e:_ `G2Element`) -\u003e `boolean`\n\n## Utils\n\n- **hash256**(_msg:_ `ArrayBuffer`) -\u003e `ArrayBuffer`\n- **toHex**(_bytes:_ `ArrayBuffer`) -\u003e `string`\n- **fromHex**(_hex:_ `string`) -\u003e `ArrayBuffer`\n- **getRandomSeed()** -\u003e `ArrayBuffer` Only use if sodium is enabled!\n\n## Libsodium license\n\nThe libsodium static library is licensed under the ISC license which requires\nthe following copyright notice.\n\n\u003e ISC License\n\u003e\n\u003e Copyright (c) 2013-2020\n\u003e Frank Denis \\\u003cj at pureftpd dot org\\\u003e\n\u003e\n\u003e Permission to use, copy, modify, and/or distribute this software for any\n\u003e purpose with or without fee is hereby granted, provided that the above\n\u003e copyright notice and this permission notice appear in all copies.\n\u003e\n\u003e THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n\u003e WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n\u003e MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n\u003e ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n\u003e WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n\u003e ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n\u003e OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n## BLST license\n\nBLST is used with the\n[Apache 2.0 license](https://github.com/supranational/blst/blob/master/LICENSE)\n\n## Resources\n\n- [Chia-Network/bls-signatures](https://github.com/Chia-Network/bls-signatures) code for bls\n- [Marc Rousavy](https://github.com/mrousavy) thanks for all the examples\n- [animo/react-native-bbs-signatures](https://github.com/animo/react-native-bbs-signatures) also great example\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fronickg%2Freact-native-bls-signatures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fronickg%2Freact-native-bls-signatures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fronickg%2Freact-native-bls-signatures/lists"}