{"id":19571572,"url":"https://github.com/block-core/web5-injector","last_synced_at":"2026-02-13T08:41:42.301Z","repository":{"id":62991034,"uuid":"564064921","full_name":"block-core/web5-injector","owner":"block-core","description":"Library that can be used by any Web5 wallet to inject the global web5 object","archived":false,"fork":false,"pushed_at":"2022-11-10T01:34:01.000Z","size":17,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-10T20:40:07.501Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@blockcore/web5-injector","language":"TypeScript","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/block-core.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-11-09T23:10:24.000Z","updated_at":"2022-12-31T16:40:44.000Z","dependencies_parsed_at":"2022-11-10T13:30:59.519Z","dependency_job_id":null,"html_url":"https://github.com/block-core/web5-injector","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/block-core/web5-injector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-core%2Fweb5-injector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-core%2Fweb5-injector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-core%2Fweb5-injector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-core%2Fweb5-injector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/block-core","download_url":"https://codeload.github.com/block-core/web5-injector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-core%2Fweb5-injector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278366674,"owners_count":25975097,"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-10-04T02:00:05.491Z","response_time":63,"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":[],"created_at":"2024-11-11T06:19:22.429Z","updated_at":"2025-10-04T20:12:41.190Z","avatar_url":"https://github.com/block-core.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web5 Injector\n\nLibrary that can be used by any Web5 wallet to inject the global web5 object.\n\nThis library is built to provide an example and proof-of-concept for having a generic library that enable support for multiple web5 providers.\n\nThe library is meant to be included in extension wallets and be injected. If there are multiple wallets installed on user device, only a single instance will be created.\n\nWallets need to register themselves as available providers that user can choose from.\n\nWallets need to provide UI to perform default wallet selection.\n\nThe web5-injector can be adopted by anyone other than Blockcore and use a more generic package name on npmjs if adopted.\n\n## Setup\n\nInstall:\n\n```sh\nnpm install @blockcore/web5-injector\n```\n\n**Warning:** This package is native [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) and does not provide a CommonJS export. If your project uses CommonJS, you'll have to [convert to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) or use the [dynamic `import()`](https://v8.dev/features/dynamic-import) function.\n\n## Usage\n\n```ts\nimport { Injector } from \"@blockcore/web5-injector\";\n\n// MyWalletProvider is the wallets internal provider that implements the Web5RequestProvider interface.\nconst provider = new MyWalletProvider();\nInjector.register(provider);\n\nglobalThis.web5.currentProvider = provider;\n\nglobalThis.web5.currentProvider.request({\n\tmethod: \"signMessage\",\n\tparams: [{ message: \"Hello World!\" }],\n});\n```\n\n## Development\n\n### Build\n\nSimply run `npm run build` to build the library. Also run `npm run lint` to verify the code syntax.\n\n### Testing\n\nThe library is using `ava` for tests. Please refer to the documentation on how to write tests:\n\n[https://github.com/avajs/ava/blob/main/docs/01-writing-tests.md](https://github.com/avajs/ava/blob/main/docs/01-writing-tests.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblock-core%2Fweb5-injector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblock-core%2Fweb5-injector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblock-core%2Fweb5-injector/lists"}