{"_id":"@awaludinar/nestweb3","_rev":"3-2dbc875c99955df0465d1bfe4403ae23","name":"@awaludinar/nestweb3","dist-tags":{"beta":"1.1.0-beta.1","latest":"1.1.1"},"versions":{"1.0.1-beta.1":{"name":"@awaludinar/nestweb3","version":"1.0.1-beta.1","keywords":["web3js","nestjs","nestweb3","nestjs-eth"],"author":{"name":"Awaludin AR","email":"me@awaludin.dev"},"license":"MIT","_id":"@awaludinar/nestweb3@1.0.1-beta.1","maintainers":[{"name":"awaludinar","email":"me@awaludin.dev"}],"homepage":"https://github.com/AwaludinAR/nestweb3#readme","bugs":{"url":"https://github.com/AwaludinAR/nestweb3/issues"},"dist":{"shasum":"a8ff93bd15f2e43da6e23968e17a1d5f897fdd57","tarball":"https://registry.npmjs.org/@awaludinar/nestweb3/-/nestweb3-1.0.1-beta.1.tgz","fileCount":23,"integrity":"sha512-r6a0lTNJUC0LhCAW/9oAzTG2ATfCQCvjoAId4xxibteUYqsdHbY8hLA5T0jv4zlxRqU6c1Z3H8ky4COf3+cuLw==","signatures":[{"sig":"MEUCIQDEHDR1c4GArmszXZR5XHLtfbvMq4uNf1kv9kIk12evcwIgSNCTR/I2MY3eiuPnqAPFrY5O81+HoRniGucq8BOjeh4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12598},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"e104909c74e96752510ea8371dc1cc0e0d0ce483","scripts":{"build":"rm -rf dist && tsc -p tsconfig.build.json","release":"release-it","test:server":"nodemon"},"_npmUser":{"name":"awaludinar","email":"me@awaludin.dev"},"repository":{"url":"git+https://github.com/AwaludinAR/nestweb3.git"},"_npmVersion":"10.5.0","description":"Web3.js module for NestJS","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.1.0","ts-node":"^10.9.2","typescript":"^5.4.3","web3-types":"^1.5.0","web3-utils":"^4.2.1","@nestjs/core":"^10.3.5","isomorphic-ws":"^5.0.0","@nestjs/common":"^10.3.5","semantic-release":"^23.0.6","@semantic-release/git":"^10.0.1","@nestjs/platform-express":"^10.3.5","@semantic-release/changelog":"^6.0.3"},"peerDependencies":{"rxjs":"^7.8.1","web3":"^4.6.0","@nestjs/core":"^8.0.0 || ^9.0.0 || ^10.0.0","@nestjs/common":"^8.0.0 || ^9.0.0 || ^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nestweb3_1.0.1-beta.1_1711567194493_0.6077865924548387","host":"s3://npm-registry-packages"}},"1.1.0-beta.1":{"name":"@awaludinar/nestweb3","version":"1.1.0-beta.1","keywords":["web3js","nestjs","nestweb3","nestjs-eth"],"author":{"name":"Awaludin AR","email":"me@awaludin.dev"},"license":"MIT","_id":"@awaludinar/nestweb3@1.1.0-beta.1","maintainers":[{"name":"awaludinar","email":"me@awaludin.dev"}],"homepage":"https://github.com/AwaludinAR/nestweb3#readme","bugs":{"url":"https://github.com/AwaludinAR/nestweb3/issues"},"dist":{"shasum":"5b8497faad9ffd94cc905c504073cbedc82c9f7b","tarball":"https://registry.npmjs.org/@awaludinar/nestweb3/-/nestweb3-1.1.0-beta.1.tgz","fileCount":21,"integrity":"sha512-qRNNJXS9vFETPAGuQwvlTm5MR4UGsyzu+z7Il/S5f0beXMXOyrL8q+VTjAFIs37k9pHK6asvyAR55zONBR3zww==","signatures":[{"sig":"MEYCIQCSel8Za4gBy6hGjIhYxOOJN6gE8MWfV4jMStjfqkhRYgIhANM2A8Uv+FF8OIc4lAj6NNV6xKHjc1nhqOiNK6bXvm87","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15357},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"7dfb5a4a6155549a379c6c1fbb0c10a8f3b89bba","scripts":{"build":"rm -rf dist && tsc -p tsconfig.build.json","release":"release-it","test:server":"nodemon"},"_npmUser":{"name":"awaludinar","email":"me@awaludin.dev"},"repository":{"url":"git+https://github.com/AwaludinAR/nestweb3.git"},"_npmVersion":"10.5.0","description":"Web3.js module for NestJS","directories":{},"_nodeVersion":"20.12.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nodemon":"^3.1.0","ts-node":"^10.9.2","typescript":"^5.4.3","web3-types":"^1.5.0","web3-utils":"^4.2.1","@nestjs/core":"^10.3.5","isomorphic-ws":"^5.0.0","@nestjs/common":"^10.3.5","@nestjs/config":"^3.2.2","semantic-release":"^23.0.6","@semantic-release/git":"^10.0.1","@nestjs/platform-express":"^10.3.5","@semantic-release/changelog":"^6.0.3"},"peerDependencies":{"rxjs":"^7.8.1","web3":"^4.6.0","@nestjs/core":"^8.0.0 || ^9.0.0 || ^10.0.0","@nestjs/common":"^8.0.0 || ^9.0.0 || ^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nestweb3_1.1.0-beta.1_1712596384237_0.5321271349087864","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@awaludinar/nestweb3","version":"1.1.0","keywords":["web3js","nestjs","nestweb3","nestjs-eth"],"author":{"name":"Awaludin AR","email":"me@awaludin.dev"},"license":"MIT","_id":"@awaludinar/nestweb3@1.1.0","maintainers":[{"name":"awaludinar","email":"me@awaludin.dev"}],"homepage":"https://github.com/AwaludinAR/nestweb3#readme","bugs":{"url":"https://github.com/AwaludinAR/nestweb3/issues"},"dist":{"shasum":"92ce19b72fd5441c87bd221341f75bb31611aefe","tarball":"https://registry.npmjs.org/@awaludinar/nestweb3/-/nestweb3-1.1.0.tgz","fileCount":21,"integrity":"sha512-E3c15lCfrVgVuJAD7FYoZxPhlx7kO842U53xdLg621fd8oxq0vX/UmN9JEV3HD/cpWTy8fRJfp6wYXuxDdpMSw==","signatures":[{"sig":"MEQCIE0PUH2a7Zw56UaOVLeZ5ENpYLgcFriZHFikd/okY6Z+AiAYUCn/UCN3Z8yejZqOiXAYdOqPNCrL5QLJ3agDUN25kA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17357},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"6b55f52c3fc8560087abaa1ac7e73d37686d9d71","scripts":{"build":"rm -rf dist && tsc -p tsconfig.build.json","release":"release-it","test:server":"nodemon"},"_npmUser":{"name":"awaludinar","email":"me@awaludin.dev"},"repository":{"url":"git+https://github.com/AwaludinAR/nestweb3.git"},"_npmVersion":"10.5.0","description":"Web3.js module for NestJS","directories":{},"_nodeVersion":"20.12.0","_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.1.0","ts-node":"^10.9.2","typescript":"^5.4.3","web3-types":"^1.5.0","web3-utils":"^4.2.1","@nestjs/core":"^10.3.5","isomorphic-ws":"^5.0.0","@nestjs/common":"^10.3.5","@nestjs/config":"^3.2.2","semantic-release":"^23.0.6","@semantic-release/git":"^10.0.1","@nestjs/platform-express":"^10.3.5","@semantic-release/changelog":"^6.0.3"},"peerDependencies":{"rxjs":"^7.8.1","web3":"^4.6.0","@nestjs/core":"^8.0.0 || ^9.0.0 || ^10.0.0","@nestjs/common":"^8.0.0 || ^9.0.0 || ^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nestweb3_1.1.0_1712597668355_0.39920525693086883","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@awaludinar/nestweb3","description":"Web3.js module for NestJS","main":"dist/index.js","scripts":{"build":"rm -rf dist && tsc -p tsconfig.build.json","test:server":"nodemon"},"author":{"name":"Awaludin AR","email":"me@awaludin.dev"},"keywords":["web3js","nestjs","nestweb3","nestjs-eth"],"license":"MIT","repository":{"url":"git+https://github.com/AwaludinAR/nestweb3.git"},"peerDependencies":{"@nestjs/common":"^8.0.0 || ^9.0.0 || ^10.0.0","@nestjs/core":"^8.0.0 || ^9.0.0 || ^10.0.0","rxjs":"^7.8.1","web3":"^4.16.0"},"devDependencies":{"@nestjs/common":"^10.4.15","@nestjs/config":"^3.3.0","@nestjs/core":"^10.4.15","@nestjs/platform-express":"^10.4.15","@semantic-release/changelog":"^6.0.3","@semantic-release/git":"^10.0.1","isomorphic-ws":"^5.0.0","nodemon":"^3.1.9","semantic-release":"^23.1.1","ts-node":"^10.9.2","typescript":"^5.7.2","web3-types":"^1.10.0","web3-utils":"^4.3.3"},"version":"1.1.1","_id":"@awaludinar/nestweb3@1.1.1","gitHead":"4d0baf50bb30bbc19c64d15373d7103ad928bec8","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/AwaludinAR/nestweb3/issues"},"homepage":"https://github.com/AwaludinAR/nestweb3#readme","_nodeVersion":"20.18.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-kwmpAtRlw40Wi4f7yceHAEs268ACTxxxgkvW1s7xaQzM2Bp4J/xhD4ywfBKPHtr7Va2QZvMFWnBGNftQE6dWcw==","shasum":"70bd62d4ed64a971e1ef9cb5a2e231fc0d908e01","tarball":"https://registry.npmjs.org/@awaludinar/nestweb3/-/nestweb3-1.1.1.tgz","fileCount":21,"unpackedSize":17084,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEsZUcPIUBnZ2ZvFI8kF44P+QFXI4TI2TrxSL5iSZPa6AiBsUyhbfcm4E6jHgwlRJmGAD36uzgjMABwcd7NNTdC1qg=="}]},"_npmUser":{"name":"awaludinar","email":"me@awaludin.dev"},"directories":{},"maintainers":[{"name":"awaludinar","email":"me@awaludin.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nestweb3_1.1.1_1734263834717_0.3539518492744136"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-27T19:19:54.387Z","modified":"2024-12-15T11:57:15.074Z","1.0.1-beta.1":"2024-03-27T19:19:54.626Z","1.1.0-beta.1":"2024-04-08T17:13:04.388Z","1.1.0":"2024-04-08T17:34:28.585Z","1.1.1":"2024-12-15T11:57:14.884Z"},"bugs":{"url":"https://github.com/AwaludinAR/nestweb3/issues"},"author":{"name":"Awaludin AR","email":"me@awaludin.dev"},"license":"MIT","homepage":"https://github.com/AwaludinAR/nestweb3#readme","keywords":["web3js","nestjs","nestweb3","nestjs-eth"],"repository":{"url":"git+https://github.com/AwaludinAR/nestweb3.git"},"description":"Web3.js module for NestJS","maintainers":[{"name":"awaludinar","email":"me@awaludin.dev"}],"readme":"# @awaludinar/nestweb3\n\n## Description\n\n[Web3.js](https://web3js.org) module for [Nest](https://github.com/nestjs/nest).\n\n## Installation\n\nInstall module\n\n```bash\nnpm i --save @awaludinar/nestweb3 web3\n```\n\n## Usage/Examples\n\n### Simple usage\n\nImport module in any module\n\n```typescript\nimport { Module } from '@nestjs/common';\nimport { Web3Module } from '@awaludinar/nestweb3';\n\n@Module({\n  import: [Web3Module.forRoot('http://client-rpc-url.tld')],\n})\nexport class AppModule {}\n```\n\nUse in service\n\n```typescript\nimport { Injectable } from '@nestjs/common';\nimport { InjectWeb3 } from '@awaludinar/nestweb3';\nimport Web3 from 'web3';\n\n@Injectable()\nexport class WsService {\n  constructor(@InjectWeb3() private web3: Web3) {}\n\n  getBlockNumber() {\n    return this.web3.eth.getBlockNumber();\n  }\n}\n```\n\n### Multiple RPC\n\nImport module in any module\n\n```typescript\nimport { Module } from '@nestjs/common';\nimport { Web3Module } from '@awaludinar/nestweb3';\n\n@Module({\n  import: [\n    Web3Module.forRoot('http://client-rpc-url.tld', {\n      connectionName: 'RPC1',\n      provider: { name: 'HTTP' /* or WS */ },\n    }),\n    Web3Module.forRoot('wss://client-rpc-url.tld', {\n      connectionName: 'RPC2',\n      provider: { name: 'WS' /* or HTTP */ },\n    }),\n  ],\n})\nexport class AppModule {}\n```\n\nUse in service\n\n```typescript\nimport { Injectable } from '@nestjs/common';\nimport { InjectWeb3 } from '@awaludinar/nestweb3';\nimport Web3 from 'web3';\n\n@Injectable()\nexport class WsService {\n  constructor(@InjectWeb3('RPC1') private web3: Web3) {}\n\n  getBlockNumber() {\n    return this.web3.eth.getBlockNumber();\n  }\n}\n```\n\n### Async Configuration\n\n```typescript\nimport { Module } from '@nestjs/common';\nimport { ConfigModule } from '@nestjs/config';\nimport { Web3Module } from '@awaludinar/nestweb3';\n\n@Module({\n  import: [\n    Web3Module.forRootAsync({\n      imports: [ConfigModule],\n      connectionName: 'RPC_ASYNC',\n      useFactory: async (config: ConfigService) => ({\n        clientUrl: config.get('CLIENT_WS_URL'),\n        provider: { name: 'HTTP' /* or WS */ },\n      }),\n      inject: [ConfigService],\n    }),\n  ],\n})\nexport class AnyModule {}\n```\n","readmeFilename":"README.md"}