{"_id":"web3-fake-provider","_rev":"3-0d2d0001f34cb4c41851e8b3deb02ba1","name":"web3-fake-provider","description":"A mock provider class that can be used with Ethereum web3.js","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"web3-fake-provider","description":"A mock provider class that can be used with Ethereum web3.js","version":"0.1.0","license":"LGPL-3.0","repository":{"type":"git","url":"git+https://github.com/raineorshine/web3-fake-provider.git"},"scripts":{"test":"mocha"},"keywords":["web3","ethereum","mock","fake","provider"],"devDependencies":{"chai":"^3.5.0","mocha":"^3.1.2","web3":"^0.16.0"},"gitHead":"ad00b68343c8751e99599b12bf8b03f25b447495","bugs":{"url":"https://github.com/raineorshine/web3-fake-provider/issues"},"homepage":"https://github.com/raineorshine/web3-fake-provider#readme","_id":"web3-fake-provider@0.1.0","_shasum":"25aaee7524864c54b26929b5db725d29257af832","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"raine","email":"raineorshine@gmail.com"},"dist":{"shasum":"25aaee7524864c54b26929b5db725d29257af832","tarball":"https://registry.npmjs.org/web3-fake-provider/-/web3-fake-provider-0.1.0.tgz","integrity":"sha512-3zvTBIx5pqVxgRfNymIvvbkcXTP/Zvuf3tkAG+k9JlinlxzxzarjUwlVyqSNs9S087yZsuWyaj5wkeYXZdDO4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF5uK8xo+vBT2nHu+oXuYVoKBK0ivJB3oQIrnzQaE8WMAiBtDI9ESOEF8szg4nATWxXxjUgFaQgOKAJOR8g9iZsGDg=="}]},"maintainers":[{"name":"raine","email":"raineorshine@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/web3-fake-provider-0.1.0.tgz_1476576763401_0.5823495406657457"}}},"readme":"web3-fake-provider is a mock provider class that can be used with Ethereum `web3.js`. It mocks the behavior of `Web3.providers.HttpProvider`.\n\nMight be useful for testing or having a working web3 instance when your Ethereum node is down.\n\nOriginally [part of web3.js](https://github.com/ethereum/web3.js/blob/1.0/test/helpers/FakeHttpProvider.js).\n\n# Install\n\n```sh\nnpm install web3-fake-provider\n```\n\n# Usage\n\n```js\nvar FakeProvider = require('web3-fake-provider')\n\nvar result = '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855';\nvar provider = new FakeProvider();\nweb3.setProvider(provider);\nprovider.injectResult(result);\nprovider.injectValidation(function (payload) {\n    assert.equal(payload.jsonrpc, '2.0');\n    assert.equal(payload.method, 'eth_accounts');\n    assert.deepEqual(payload.params, []);\n});\n\nassert.deepEqual(result, web3.eth.accounts);\n```\n\n# LICENSE\n\nGPL-3.0","maintainers":[{"name":"raine","email":"raineorshine@gmail.com"}],"time":{"modified":"2022-06-28T23:03:23.457Z","created":"2016-10-16T00:12:45.192Z","0.1.0":"2016-10-16T00:12:45.192Z"},"homepage":"https://github.com/raineorshine/web3-fake-provider#readme","keywords":["web3","ethereum","mock","fake","provider"],"repository":{"type":"git","url":"git+https://github.com/raineorshine/web3-fake-provider.git"},"bugs":{"url":"https://github.com/raineorshine/web3-fake-provider/issues"},"license":"LGPL-3.0","readmeFilename":"README.md"}