{"id":18709688,"url":"https://github.com/decentraland/eth-connect","last_synced_at":"2025-07-31T04:09:31.213Z","repository":{"id":33093955,"uuid":"133677159","full_name":"decentraland/eth-connect","owner":"decentraland","description":" 🔌 Ethereum connector for Decentraland scenes and applications","archived":false,"fork":false,"pushed_at":"2024-02-27T18:00:32.000Z","size":1986,"stargazers_count":50,"open_issues_count":14,"forks_count":14,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-04-19T23:33:28.259Z","etag":null,"topics":["eth","ethereum","json-rpc","typescript","web3"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/decentraland.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-16T14:22:02.000Z","updated_at":"2025-02-13T05:06:46.000Z","dependencies_parsed_at":"2023-11-13T21:27:29.249Z","dependency_job_id":"2286e197-1b53-4439-955f-03bdd6f13c61","html_url":"https://github.com/decentraland/eth-connect","commit_stats":{"total_commits":106,"total_committers":16,"mean_commits":6.625,"dds":0.6037735849056604,"last_synced_commit":"a23c35606227ab1a3330d63712363cd3f7ced3a1"},"previous_names":["decentraland/web3-ts"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decentraland%2Feth-connect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decentraland%2Feth-connect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decentraland%2Feth-connect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decentraland%2Feth-connect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/decentraland","download_url":"https://codeload.github.com/decentraland/eth-connect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253754959,"owners_count":21958933,"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":["eth","ethereum","json-rpc","typescript","web3"],"created_at":"2024-11-07T12:28:42.382Z","updated_at":"2025-05-12T14:32:28.064Z","avatar_url":"https://github.com/decentraland.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eth-connect\n\n[![NPM version](https://badge.fury.io/js/eth-connect.svg)](https://npmjs.org/package/eth-connect)\n[![codecov](https://codecov.io/gh/decentraland/eth-connect/branch/master/graph/badge.svg)](https://codecov.io/gh/decentraland/eth-connect)\n[![Install Size](https://packagephobia.now.sh/badge?p=eth-connect)](https://packagephobia.now.sh/result?p=eth-connect)\n\n_eth-connect_ is a TypeScript-based [web3](https://github.com/ethereum/web3.js) library alternative which implements the [Generic JSON RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC) spec as well.\n\nYou can follow the [JavaScript API documentation](https://github.com/ethereum/wiki/wiki/JavaScript-API) until TypeScript docs are released.\n\n\n## Design goals\n\n- A Typed web3.js alternative\n- Have as few convention-invented functions as possible (by following the RPC specs as much as possible)\n- Leverage WS and HTTP providers\n- Portable (support and work equally in both browser and node)\n- Painless `eth` usage: Using contract factories, well-split event types (block, transaction and contracts plus topics)\n- `async/await` out of the box\n\n## Installation\n\nUsing NPM:\n\n```bash\nnpm i eth-connect\n```\n\nImporting as a browser module:\n\n```html\n\u003cscript src=\"https://unpkg.com/eth-connect@latest/eth-connect.js\"\u003e\u003c/script\u003e\n```\n\n## Examples\n\nBelow are some simple illustrative examples.\nYou can also find more complete examples are in the integration `/tests` folder.\n\n### Initialize with a provider\n\n```ts\nimport { RequestManager } from 'eth-connect'\n\n// using the injected MetaMask provider\nconst requestManager = new RequestManager(web3.currentProvider)\n\nconst myBalance = await requestManager.eth_getBalance(myAddress)\n```\n\nor\n\n```ts\nimport { RequestManager, HTTPProvider } from 'eth-connect'\n\nconst provider = 'my-own-RPC-url'\nconst providerInstance = new HTTPProvider(provider)\nconst requestManager = new RequestManager(providerInstance)\n\nconst someBalance = await requestManager.eth_getBalance(someAddress)\n```\n\n### Initialize a contract\n\n```ts\nimport { RequestManager, ContractFactory } from 'eth-connect'\n\nconst abi = require('./some-contract-abi.json')\n// using the injected MetaMask provider\nconst requestManager = new RequestManager(web3.currentProvider)\n\nconst factory = new ContractFactory(requestManager, abi)\nconst instance = await factory.at(address)\n\nconsole.log('Calling a method', await instance.mint(myAddress))\n```\n\n### Get the accounts\n\n```ts\nimport { RequestManager } from 'eth-connect'\n\nconst requestManager = new RequestManager(web3.currentProvider)\n\nconst accounts = await requestManager.eth_accounts()\n```\n\n## Build the project\n\nClone this project and run the following in the terminal:\n\n```bash\nmake build\n```\n\n## Run tests\n\n```bash\nmake test-local\n```\n\n## Comparison\n\n|                    |  `web3`  | `eth-connect` |\n| ------------------ | :------: | :-----------: |\n| Browser support    |    ✔     |       ✔       |\n| Promise API        |    ✖     |       ✔       |\n| Strict type checks |    ✖     |       ✔       |\n| TS/JS Docs         |    ✖     |       ✔       |\n| Wiki Docs          |    ✔     |       ?       |\n| Coverage           | ![][wc]  |    ![][ec]    |\n| Dependents         | ![][wdp] |   ![][edp]    |\n| Install size       | ![][wis] |   ![][eis]    |\n\n\u003c!-- DOWNLOADS --\u003e\n\n[wd]: https://img.shields.io/npm/dm/web3.svg\n[ed]: https://img.shields.io/npm/dm/eth-connect.svg\n\n\u003c!-- COVERAGE --\u003e\n\n[wc]: https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master\n[ec]: https://codecov.io/gh/decentraland/eth-connect/branch/master/graph/badge.svg\n\n\u003c!-- BUILD --\u003e\n\n[wb]: https://travis-ci.org/ethereum/web3.js.svg\n[eb]: https://travis-ci.org/decentraland/eth-connect.svg?branch=master\n\n\u003c!-- DEPENDENTS --\u003e\n\n[wdp]: https://badgen.net/npm/dependents/web3\n[edp]: https://badgen.net/npm/dependents/eth-connect\n\n\u003c!-- INSTALL SIZE --\u003e\n\n[wis]: https://packagephobia.now.sh/badge?p=web3\n[eis]: https://packagephobia.now.sh/badge?p=eth-connect\n\n## Full documentation\n\nFollow this link to read the full documentation for eth-connect [here](docs/index.md).\n\n## Project Status\n\nYou may find issues while using this library, as it's still under development. Please report any issues you come accross.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecentraland%2Feth-connect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecentraland%2Feth-connect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecentraland%2Feth-connect/lists"}