{"id":18349819,"url":"https://github.com/owl1n/nestjs-web3","last_synced_at":"2025-04-06T09:32:17.097Z","repository":{"id":41516133,"uuid":"491261873","full_name":"owl1n/nestjs-web3","owner":"owl1n","description":"Module that makes it possible to work with Ethereum JavaScript API with NestJS","archived":false,"fork":false,"pushed_at":"2022-08-08T07:32:00.000Z","size":73,"stargazers_count":25,"open_issues_count":4,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-21T21:51:10.309Z","etag":null,"topics":["blockchain","ethereum","nest-web3","nestjs","web3js"],"latest_commit_sha":null,"homepage":"","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/owl1n.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":"2022-05-11T20:24:58.000Z","updated_at":"2024-08-01T10:03:23.000Z","dependencies_parsed_at":"2022-08-10T02:35:25.344Z","dependency_job_id":null,"html_url":"https://github.com/owl1n/nestjs-web3","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owl1n%2Fnestjs-web3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owl1n%2Fnestjs-web3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owl1n%2Fnestjs-web3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owl1n%2Fnestjs-web3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/owl1n","download_url":"https://codeload.github.com/owl1n/nestjs-web3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247463745,"owners_count":20942935,"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":["blockchain","ethereum","nest-web3","nestjs","web3js"],"created_at":"2024-11-05T21:23:45.730Z","updated_at":"2025-04-06T09:32:16.841Z","avatar_url":"https://github.com/owl1n.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web3 module for NestJS that allow to work with blockhains\n\nThis is first release of this module. Readme under construction but here are a couple of tips\n\n## Installation\n\n#### Yarn\n`yarn add nest-web3`\n\n#### NPM\n`yarn add nest-web3`\n\n## Getting started with module\n\nRegister Web3Module module in yours `app.module.ts` (or other main module of yours project)\n\n```typescript\nimport { Module } from '@nestjs/common';\nimport { Web3Module } from 'nest-web3';\n\n@Module({\n    imports: [\n        Web3Module.forRoot({\n            name: 'eth',\n            url: 'http://localhost:3450',\n        }),\n    ]\n})\nexport class AppModule {}\n\n```\n\nOr with Async\n\n```typescript\nimport { Module } from '@nestjs/common';\nimport { Web3Module } from 'nest-web3';\n\n@Module({\n    imports: [\n        Web3Module.forRootAsync({\n            useFactory: (configService: ConfigService) =\u003e configService.get('web3'),\n            inject:[ConfigService]\n        }),\n    ]\n})\nexport class AppModule {}\n```\n\n### Configuration\n\nFor now module accept two parameters:\n\n```typescript\nexport interface Web3ModuleOptions {\n  name?: string;\n  url: string;\n}\n```\n\n### Using in project\n\n```typescript\nimport { Injectable } from '@nestjs/common';\nimport { Web3Service } from \"nest-web3\";\n\n@Injectable()\nexport class SomeClass {\n    constructor(\n        private readonly web3Service: Web3Service\n    ) {}\n    \n    async method(): Promise\u003cnumber\u003e {\n        const client = this.web3Service.getClient('eth'); // we are give name of client in config file\n        return await client.eth.getChainId();\n    }\n}\n```\n\nAvailable methods and API of Web3 available here https://web3js.readthedocs.io/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowl1n%2Fnestjs-web3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fowl1n%2Fnestjs-web3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowl1n%2Fnestjs-web3/lists"}