{"_id":"@vechain/web3-providers-connex","_rev":"35-b4c3f8d7e63214d0cbf3d4a3a2678287","name":"@vechain/web3-providers-connex","dist-tags":{"latest":"1.1.2"},"versions":{"1.0.0":{"name":"@vechain/web3-providers-connex","version":"1.0.0","author":{"name":"Peter Zhou"},"license":"LGPL-3.0","_id":"@vechain/web3-providers-connex@1.0.0","maintainers":[{"name":"pzzh","email":"ziheng.zhou@gmail.com"},{"name":"tony.li","email":"liboliqi@gmail.com"},{"name":"cola_tin","email":"cola.tin.com@gmail.com"}],"homepage":"https://github.com/vechain/web3-providers-connex#readme","bugs":{"url":"https://github.com/vechain/web3-providers-connex/issues"},"nyc":{"all":true,"exclude":["src/ethers.ts","src/compatProvider.ts"],"extends":"@istanbuljs/nyc-config-typescript","include":["src/*.ts"],"check-coverage":true},"dist":{"shasum":"60807a47c5f4b426faa78b78ec44448bd0ea2d1d","tarball":"https://registry.npmjs.org/@vechain/web3-providers-connex/-/web3-providers-connex-1.0.0.tgz","fileCount":47,"integrity":"sha512-FHtmWNU4ljUOXRZM0ZhVUXkH5GNJJGGgUTCcuyb7MVkrsfCHsJhxRLZbRIGFhA1yFKVEV6t2C1axb872iB/S1A==","signatures":[{"sig":"MEQCIERRviDuy5u0bQrFO0wxrNLSisbKLzVAlZhVALKOlcTnAiA2z4o9YdMRMtTFMs33XfJmGzktNcc3XxFLbH7t4gauTg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":188771,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2eM1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBNQ//f8LtuRBbp11f1nuZdn7fgm/Wk1JutkLLUI1u0r9Aal7/SnRZ\r\nNyevksDGxsul/Zxt6OILhRiVeGEk81s2vgLS9CMiZKuU07ywDJxLxYcD/gxp\r\nkMhdW7lZgu5cQ00MjQ4l+X7PZ2x7nhnoJtJXLBfMWVvHw1Wa9RJynZ4IFGIw\r\nGRwKHRh2AuPIwK9d07+t2S3TArqXp8Lpuq7k+31Gym/iV4v5dVdFDL5T0XaF\r\nX/5mAX+Q8+7+KEefGaDmBHA8UMCyw/KzdW5gQonZjkypBsLiC+LUY+AIjYSx\r\n+CrD9vuQpYvU0xU2FWzLZ4McjdMMUqmYs3pT/clxoLatGEcFmumAz4e0BB7X\r\nRDxwL7hlGCWFdSflugSUj6PEVAzeWRdASmEbNax64h9NAjCRdu06PAnak35D\r\n5HQI9ZDW0HTNnJA2ZsXbI9y4gP1wJ3r68BOD/Zrv92NTqohN4JdBX5dKjmEh\r\nfp/yFiCFfc1xZidnJ+z7aMj1OTTAXST/qLKKISaZqOAmxPs2JJqiRrC0CAAZ\r\nuwSUZU0aMUorTL87IC3lPpQbnOPTMWUzyMT/sH3Ufwy9qI2apJB4NCcaG/PU\r\nKOmzqE/8hzHncmsqopFEtPeaQNMoidpSzii+Y659GIqvvrzYSi92UiSmF0Pf\r\nQ+g7/0pI3dR+7sBRfktgSxK6BAOvpcpfr5M=\r\n=GlNF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"cf4c3aa3577cfdff6c73de4a510d5ba028b96e9f","scripts":{"test":"nyc --reporter=lcov mocha --no-timeouts test/**/*.test.ts","build":"rm -rf dist/ && node_modules/.bin/tsc -d -p . ","test-web3":"mocha --no-timeouts test/web3/*.test.ts","test-ethers":"mocha --no-timeouts test/ethers/*.test.ts","test-restful":"mocha --no-timeouts test/restful/*.test.ts","test-provider":"mocha --no-timeouts test/provider/*.test.ts"},"_npmUser":{"name":"pzzh","email":"ziheng.zhou@gmail.com"},"repository":{"url":"git+https://github.com/vechain/web3-providers-connex.git","type":"git"},"_npmVersion":"9.2.0","description":"Implementation of the JSON-RPC provider for the VeChain Thor protocol, compatible with web3.js and ethers.js.","directories":{},"_nodeVersion":"19.3.0","dependencies":{"web3-utils":"^1.7.3","thor-devkit":"^2.0.4","eventemitter3":"^4.0.4","@vechain/connex-types":"^2.0.2"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","chai":"^4.3.6","web3":"^1.7.3","mocha":"^9.2.0","ts-node":"^10.5.0","typescript":"^4.5.5","@types/chai":"^4.3.0","@types/node":"^10.17.60","@types/mocha":"^9.1.0","thor-builtin":"^1.0.0","testcontainers":"^9.1.1","tsconfig-paths":"^4.1.2","source-map-support":"^0.5.21","@vechain/connex-driver":"^2.0.10","@vechain/connex-framework":"^2.0.8","@istanbuljs/nyc-config-typescript":"^1.0.2"},"peerDependencies":{"ethers":"^5.7.2"},"_npmOperationalInternal":{"tmp":"tmp/web3-providers-connex_1.0.0_1675223861661_0.44904054488789935","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@vechain/web3-providers-connex","version":"1.1.0","author":{"name":"Peter Zhou"},"license":"LGPL-3.0","_id":"@vechain/web3-providers-connex@1.1.0","maintainers":[{"name":"tony.li","email":"liboliqi@gmail.com"},{"name":"cola_tin","email":"cola.tin.com@gmail.com"},{"name":"pzzh","email":"ziheng.zhou@gmail.com"}],"homepage":"https://github.com/vechain/web3-providers-connex#readme","bugs":{"url":"https://github.com/vechain/web3-providers-connex/issues"},"nyc":{"all":true,"exclude":["src/ethers.ts","src/compatProvider.ts"],"extends":"@istanbuljs/nyc-config-typescript","include":["src/*.ts"],"check-coverage":true},"dist":{"shasum":"bb5aa6c3c4986f916ea1afaee4fcd511cfd5b026","tarball":"https://registry.npmjs.org/@vechain/web3-providers-connex/-/web3-providers-connex-1.1.0.tgz","fileCount":36,"integrity":"sha512-Tx6GgoodPMICKZx+iHqMNRVUVQxOWu4nGKsEzCsbFGbCSeiviB4Ho3VG0IDZbqGsRxD8gltt5bWqC3GvUQVxzg==","signatures":[{"sig":"MEUCIQDTBWGXSo6cGQ/OnZ+132K8PjLELGE+BUrnHkvv6GgZdwIgAbi3v/sloRmqGkyOpC/um5cYk1c7UPPfC1kVVpFSCG0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":175363},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"1d38e2ed46684074d933f488db3c1ff8d6b4a674","scripts":{"test":"nyc --reporter=lcov mocha --no-timeouts test/**/*.test.ts","build":"rm -rf dist/ && node_modules/.bin/tsc -d -p . ","test-web3":"mocha --no-timeouts test/web3/*.test.ts","test-ethers":"mocha --no-timeouts test/ethers/*.test.ts","test-restful":"mocha --no-timeouts test/restful/*.test.ts","test-provider":"mocha --no-timeouts test/provider/*.test.ts"},"_npmUser":{"name":"pzzh","email":"ziheng.zhou@gmail.com"},"repository":{"url":"git+https://github.com/vechain/web3-providers-connex.git","type":"git"},"_npmVersion":"10.0.0","description":"Implementation of the JSON-RPC provider for the VeChain Thor protocol, compatible with web3.js and ethers.js.","directories":{},"_nodeVersion":"20.5.0","dependencies":{"web3-utils":"^1.7.3","thor-devkit":"^2.0.4","eventemitter3":"^4.0.4","@vechain/connex-types":"^2.0.2"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","chai":"^4.3.6","web3":"^4.1.1","mocha":"^9.2.0","ts-node":"^10.5.0","typescript":"^5.1.6","@types/chai":"^4.3.0","@types/node":"^10.17.60","@types/mocha":"^9.1.0","thor-builtin":"^1.0.0","testcontainers":"^9.1.1","tsconfig-paths":"^4.1.2","source-map-support":"^0.5.21","@vechain/connex-driver":"^2.0.10","@vechain/connex-framework":"^2.0.8","@istanbuljs/nyc-config-typescript":"^1.0.2"},"peerDependencies":{"ethers":"^6.7.1"},"_npmOperationalInternal":{"tmp":"tmp/web3-providers-connex_1.1.0_1693972601438_0.7299343127437496","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@vechain/web3-providers-connex","version":"1.0.1","author":{"name":"Peter Zhou"},"license":"LGPL-3.0","_id":"@vechain/web3-providers-connex@1.0.1","maintainers":[{"name":"tony.li","email":"liboliqi@gmail.com"},{"name":"cola_tin","email":"cola.tin.com@gmail.com"},{"name":"pzzh","email":"ziheng.zhou@gmail.com"}],"homepage":"https://github.com/vechain/web3-providers-connex#readme","bugs":{"url":"https://github.com/vechain/web3-providers-connex/issues"},"nyc":{"all":true,"exclude":["src/ethers.ts","src/compatProvider.ts"],"extends":"@istanbuljs/nyc-config-typescript","include":["src/*.ts"],"check-coverage":true},"dist":{"shasum":"687f75c9af78f733f0cfaf64049ba3cbb324bfda","tarball":"https://registry.npmjs.org/@vechain/web3-providers-connex/-/web3-providers-connex-1.0.1.tgz","fileCount":36,"integrity":"sha512-Og2ijNbR7VSIefhvKlFFOp5HK3AANVUkmoKCktWTfgVV45/TOuu+zixSEjWEHjnZlML8T7M9oCKSPup+5KbUvg==","signatures":[{"sig":"MEUCIQD6P5oLi97g31piI0AjFwyjFw0A9z/ZZnhAH39hwPjB8gIgYrRFp2m4l9IffUy8Jz+UoLCtzNGmhlozLCXApUdBA8E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":175423},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"c38ca6b6f8328a094db74110fb7755e8d5558be6","scripts":{"test":"nyc --reporter=lcov mocha --no-timeouts test/**/*.test.ts","build":"rm -rf dist/ && node_modules/.bin/tsc -d -p . ","prepack":"npm run build","test-web3":"mocha --no-timeouts test/web3/*.test.ts","test-ethers":"mocha --no-timeouts test/ethers/*.test.ts","test-restful":"mocha --no-timeouts test/restful/*.test.ts","test-provider":"mocha --no-timeouts test/provider/*.test.ts"},"_npmUser":{"name":"pzzh","email":"ziheng.zhou@gmail.com"},"deprecated":"deprecated version, try 1.0.0 or 1.1.x and higher","repository":{"url":"git+https://github.com/vechain/web3-providers-connex.git","type":"git"},"_npmVersion":"10.0.0","description":"Implementation of the JSON-RPC provider for the VeChain Thor protocol, compatible with web3.js and ethers.js.","directories":{},"_nodeVersion":"20.5.0","dependencies":{"web3-utils":"^1.7.3","thor-devkit":"^2.0.4","eventemitter3":"^4.0.4","@vechain/connex-types":"^2.0.2"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","chai":"^4.3.6","web3":"^4.1.1","mocha":"^9.2.0","ts-node":"^10.5.0","typescript":"^5.1.6","@types/chai":"^4.3.0","@types/node":"^10.17.60","@types/mocha":"^9.1.0","thor-builtin":"^1.0.0","testcontainers":"^9.1.1","tsconfig-paths":"^4.1.2","source-map-support":"^0.5.21","@vechain/connex-driver":"^2.0.10","@vechain/connex-framework":"^2.0.8","@istanbuljs/nyc-config-typescript":"^1.0.2"},"peerDependencies":{"ethers":"^6.7.1"},"_npmOperationalInternal":{"tmp":"tmp/web3-providers-connex_1.0.1_1694068329847_0.8573554775311933","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@vechain/web3-providers-connex","version":"1.1.1","author":{"name":"Peter Zhou"},"license":"LGPL-3.0","_id":"@vechain/web3-providers-connex@1.1.1","maintainers":[{"name":"tony.li","email":"liboliqi@gmail.com"},{"name":"cola_tin","email":"cola.tin.com@gmail.com"},{"name":"pzzh","email":"ziheng.zhou@gmail.com"}],"homepage":"https://github.com/vechain/web3-providers-connex#readme","bugs":{"url":"https://github.com/vechain/web3-providers-connex/issues"},"nyc":{"all":true,"exclude":["src/ethers.ts","src/compatProvider.ts"],"extends":"@istanbuljs/nyc-config-typescript","include":["src/*.ts"],"check-coverage":true},"dist":{"shasum":"3d4d11e96faf34ab47c02057f6192bb679ca81b3","tarball":"https://registry.npmjs.org/@vechain/web3-providers-connex/-/web3-providers-connex-1.1.1.tgz","fileCount":36,"integrity":"sha512-UcFhV0nz2Lo7FyMn6EslX6Wm3s7whzGK7h8yT+/BoMA3jaFT4GLi60N+nwo4CT0TsEu+Ot9m4inknCUQDeSfZA==","signatures":[{"sig":"MEYCIQDA0H7t4SW7JYUE1dd7H24erlpoOnhjN3ziBMMVU50TgAIhALvnyFnGE76PeVgD0UBjYsHXX3iYn4l/6+qOSOrMcLAH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":175423},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"14d4c6d3a16558ca465ee34cfc73fdf93f6a7b6e","scripts":{"test":"nyc --reporter=lcov mocha --no-timeouts test/**/*.test.ts","build":"rm -rf dist/ && node_modules/.bin/tsc -d -p . ","prepack":"npm run build","test-web3":"mocha --no-timeouts test/web3/*.test.ts","test-ethers":"mocha --no-timeouts test/ethers/*.test.ts","test-restful":"mocha --no-timeouts test/restful/*.test.ts","test-provider":"mocha --no-timeouts test/provider/*.test.ts"},"_npmUser":{"name":"pzzh","email":"ziheng.zhou@gmail.com"},"repository":{"url":"git+https://github.com/vechain/web3-providers-connex.git","type":"git"},"_npmVersion":"10.0.0","description":"Implementation of the JSON-RPC provider for the VeChain Thor protocol, compatible with web3.js and ethers.js.","directories":{},"_nodeVersion":"20.5.0","dependencies":{"web3-utils":"^1.7.3","thor-devkit":"^2.0.4","eventemitter3":"^4.0.4","@vechain/connex-types":"^2.0.2"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","chai":"^4.3.6","web3":"^4.1.1","mocha":"^9.2.0","ts-node":"^10.5.0","typescript":"^5.1.6","@types/chai":"^4.3.0","@types/node":"^10.17.60","@types/mocha":"^9.1.0","thor-builtin":"^1.0.0","testcontainers":"^9.1.1","tsconfig-paths":"^4.1.2","source-map-support":"^0.5.21","@vechain/connex-driver":"^2.0.10","@vechain/connex-framework":"^2.0.8","@istanbuljs/nyc-config-typescript":"^1.0.2"},"peerDependencies":{"ethers":"^6.7.1"},"_npmOperationalInternal":{"tmp":"tmp/web3-providers-connex_1.1.1_1694068836381_0.4499008590960125","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"@vechain/web3-providers-connex","version":"1.1.2","author":{"name":"Peter Zhou"},"license":"LGPL-3.0","_id":"@vechain/web3-providers-connex@1.1.2","maintainers":[{"name":"tony.li","email":"liboliqi@gmail.com"},{"name":"cola_tin","email":"cola.tin.com@gmail.com"},{"name":"pzzh","email":"ziheng.zhou@gmail.com"}],"homepage":"https://github.com/vechain/web3-providers-connex#readme","bugs":{"url":"https://github.com/vechain/web3-providers-connex/issues"},"nyc":{"all":true,"exclude":["src/ethers.ts","src/compatProvider.ts"],"extends":"@istanbuljs/nyc-config-typescript","include":["src/*.ts"],"check-coverage":true},"dist":{"shasum":"4c8541fc3b9da3ff958f9a28be2eaf7a3c0b3445","tarball":"https://registry.npmjs.org/@vechain/web3-providers-connex/-/web3-providers-connex-1.1.2.tgz","fileCount":36,"integrity":"sha512-YvteUeJaxpYDfEKswAPn9F9YeJgS+gMEBAGIiQQiEe22UayFQGqQjrr2F9huMIyWxOXr9jBzV9lYVKVzI61WSQ==","signatures":[{"sig":"MEYCIQCbieMSSEbsVeSneE2cuYNyUsHbihcvTSFVeAsHf6CigQIhANFh09ZgNv7g3yKBmCf3uNpUbzqHzj0VAopitnuFKd1Q","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":178822},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"f752db0e65844eb1b17b469aed48bb86638431cd","scripts":{"test":"nyc --reporter=lcov mocha --no-timeouts test/**/*.test.ts","build":"rm -rf dist/ && node_modules/.bin/tsc -d -p . ","prepack":"npm run build","test-web3":"mocha --no-timeouts test/web3/*.test.ts","test-ethers":"mocha --no-timeouts test/ethers/*.test.ts","test-restful":"mocha --no-timeouts test/restful/*.test.ts","test-provider":"mocha --no-timeouts test/provider/*.test.ts"},"_npmUser":{"name":"pzzh","email":"ziheng.zhou@gmail.com"},"repository":{"url":"git+https://github.com/vechain/web3-providers-connex.git","type":"git"},"_npmVersion":"10.0.0","description":"Implementation of the JSON-RPC provider for the VeChain Thor protocol, compatible with web3.js and ethers.js.","directories":{},"_nodeVersion":"20.5.0","dependencies":{"web3-utils":"^1.7.3","thor-devkit":"^2.0.4","eventemitter3":"^4.0.4","@vechain/connex-types":"^2.0.2"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","chai":"^4.3.6","web3":"^4.1.1","mocha":"^9.2.0","ts-node":"^10.5.0","typescript":"^5.1.6","@types/chai":"^4.3.0","@types/node":"^10.17.60","@types/mocha":"^9.1.0","thor-builtin":"^1.0.0","testcontainers":"^9.1.1","tsconfig-paths":"^4.1.2","source-map-support":"^0.5.21","@vechain/connex-driver":"^2.0.10","@vechain/connex-framework":"^2.0.8","@istanbuljs/nyc-config-typescript":"^1.0.2"},"peerDependencies":{"ethers":"^6.7.1"},"_npmOperationalInternal":{"tmp":"tmp/web3-providers-connex_1.1.2_1694073625871_0.7687496466648003","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-02-01T03:57:41.555Z","modified":"2026-03-23T13:41:08.182Z","1.0.0":"2023-02-01T03:57:41.801Z","1.1.0":"2023-09-06T03:56:41.734Z","1.0.1":"2023-09-07T06:32:10.076Z","1.1.1":"2023-09-07T06:40:36.649Z","1.1.2":"2023-09-07T08:00:26.135Z"},"bugs":{"url":"https://github.com/vechain/web3-providers-connex/issues"},"author":{"name":"Peter Zhou"},"license":"LGPL-3.0","homepage":"https://github.com/vechain/web3-providers-connex#readme","repository":{"url":"git+https://github.com/vechain/web3-providers-connex.git","type":"git"},"description":"Implementation of the JSON-RPC provider for the VeChain Thor protocol, compatible with web3.js and ethers.js.","maintainers":[{"email":"liboliqi@gmail.com","name":"tony.li"},{"email":"dan.rusnac@vechain.org","name":"agilulfo"},{"email":"samuele.bello@vechain.org","name":"samuelebello"},{"email":"hugh.Livingstone@vechain.org","name":"hughvechain"},{"email":"luca.bandini@vechain.org","name":"lucabandini"},{"email":"vechain.ci@vechain.org","name":"vechain-ci"},{"email":"victor.emanuel@vechain.org","name":"victor-vechain"},{"email":"michael.martin@vechain.org","name":"doublemme"}],"readme":"# web3-providers-connex\nThis project implements the JSON-RPC provider defined in [EIP-1193](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md) for the [VeChain Thor protocol](https://github.com/vechain/thor). The provider is made to be compatible with [web3.js](https://github.com/ChainSafe/web3.js) and [ethers.js](https://github.com/ethers-io/ethers.js), allowing developers to use the two libs to interact with a Thor node.\n\n![Main (GH Actions)](https://github.com/vechain/web3-providers-connex/actions/workflows/unit-test-sonar-on-push.yml/badge.svg?branch=main)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=vechain_web3-providers-connex&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=vechain_web3-providers-connex)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=vechain_web3-providers-connex&metric=coverage)](https://sonarcloud.io/summary/new_code?id=vechain_web3-providers-connex)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=vechain_web3-providers-connex&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=vechain_web3-providers-connex)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=vechain_web3-providers-connex&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=vechain_web3-providers-connex)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=vechain_web3-providers-connex&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=vechain_web3-providers-connex)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=vechain_web3-providers-connex&metric=bugs)](https://sonarcloud.io/summary/new_code?id=vechain_web3-providers-connex)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=vechain_web3-providers-connex&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=vechain_web3-providers-connex)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=vechain_web3-providers-connex&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=vechain_web3-providers-connex)\n\n\n## Installation\n```\nnpm i @vechain/web3-providers-connex\n```\n## Examples\n### Using EIP-1193 provider\nChecking account balance\n```ts\nimport { Provider } from '@vechain/web3-providers-connex'\n\n// connexObj is an instance of Connex\nconst provider = new Provider({connex: connexObj})\nconst balance = await provider.request({ \n  method: 'eth_getBalance', \n  params: ['0x...'] \n})\n```\nObtaining a connex instance in Node.js\n```ts\nimport { Framework } from '@vechain/connex-framework'\nimport { Driver, SimpleNet, SimpleWallet } from '@vechain/connex-driver'\n\nconst net = new SimpleNet(url-to-thor-node)\nconst wallet = new SimpleWallet()\n// import private key if needed\nwallet.import('0x...')\nconst driver = await Driver.connect(net, wallet)\nconst connexObj = new Framework(driver)\n```\nSending VET\n```ts\nconst txId = await provider.request({\n  method: 'eth_sendTransaction',\n  params: [{ \n    from: '0x...', \n    to: '0x...', \n    value: '0x...' \n  }]\n})\n```\n### Working with `web3.js`:\n```ts\nimport { ProviderWeb3 } from '@vechain/web3-providers-connex'\nimport { Web3 } from 'web3' \n\nconst provider = new ProviderWeb3({ connex: connexObj })\nconst web3 = new Web3(provider)\n```\n### Working with `ethers.js`\n```ts\nimport * as thor from '@vechain/web3-providers-connex'\nimport { ethers } from 'ethers'\n\nconst provider = thor.ethers.modifyProvider(\n  new ethers.BrowserProvider(\n    new thor.Provider({ \n      connex: connexObj,\n      wallet: walletObj,\t// MUST provide to call [getSigner] method \t \n    })\n  )\n)\n```\nObtaining a signer\n```ts\nconst signer = provider.getSigner(address)\n```\nDeploying a contract\n```ts\nconst factory = thor.ethers.modifyFactory(\n  new ethers.ContractFactory(abi, bin, signer)\n)\nconst base = await factory.deploy(...args)\nawait base.waitForDeployment()\n\nconst contractAddress = await base.getAddress()\nconst contract = new ethers.Contract(contractAddress, abi, signer)\n```\nMethods `modifyProvider` and `modifyFactory` are used to patch the original code of [ethers.js](https://github.com/ethers-io/ethers.js) that is incompatible with the Thor protocol.  \n\n### Request at a particular block hight\nAPIs `eth_getBalance`, `eth_getCode`, `eth_getStorageAt` and `eth_call` allow users to specify a particular block height [1]. To do that, we need to provide a `Net` object when creating a provider:\n```ts\nimport { SimpleNet } from '@vechain/connex-driver'\nimport * as thor from '@vechain/web3-providers-connex'\nimport { Web3 } from 'web3'\nimport { ethers } from 'ethers'\n\nconst provider = new thor.Provider({ \n  connex: connexObj,\n  net: netObj\n})\n\nconst web3 = new Web3(\n  new thor.ProviderWeb3({ \n    connex: connexObj,\n    net: netObj\n  })\n)\n\nconst providerEthers = thor.ethers.modifyProvider(\n  new ethers.BrowserProvider(\n    new thor.Provider({ \n      connex: connexObj,\n      net: netObj\n    })\n  )\n)\n```\n### Fee delegation\nFee delegation can be enabled by passing the delegator URL when constructing an instance of `Provider`/`ProviderWeb3`:\n```ts\nimport { Provider } from '@vechain/web3-providers-connex';\n\nconst provider = new Provider({\n  connex: Obj,\n  delegate: {\n    url: url-to-delegator\n  }\n})\n```\nor calling `enableDelegate`:\n```ts\nprovider.enableDelegate({ url: url-to-delegator });\n```\nYou can also disable fee delegation by\n```ts\nprovider.disableDelegate();\n```\nA delegator is a web service that co-signs and returns a signature for transactions it accepts. The gas fee would then be deducted from the delegator's account instead of the transaction sender's account. \n\nYou can build your own delegator by implementing [VIP201](https://github.com/vechain/VIPs/blob/master/vips/VIP-201.md). See `/test/web3/feeDelegate.test.ts` for a quick demo.\n### More Examples\nMore examples can be found in `/test/`\n\n## Supported APIs\n##### `eth_accounts`\n##### `eth_blockNumber`\n##### `eth_call`\n##### `eth_estimateGas`\n##### `eth_gasPrice`\nReturning `0x0`\n##### `eth_getBalance`\n##### `eth_getBlockByNumber`\n##### `eth_getBlockByHash`\n##### `eth_chainId`\n##### `eth_getCode`\n##### `eth_getLogs`\n##### `eth_getStorageAt`\n##### `eth_getTransactionByHash`\n##### `eth_getTransactionCount`\nReturning `0x0`\n##### `eth_getTransactionReceipt`\n##### `eth_isSyncing`\n##### `eth_requestAccounts`\n##### `eth_sendRawTransaction`\nRequiring passing a `Net` object when constructing an instance of `Provider` or `ProviderWeb3`\n##### `eth_sendTransaction`\n##### `eth_subscribe`, `eth_unsubscribe`\nSupported subscription type: `newHeads`, `logs`\n##### `evm_mine`\n##### `net_version`\nEquivalent to `eth_chainId`\n##### `web3_clientVersion`\nReturning string `thor`\n##### `debug_traceTransaction`\n##### `debug_traceCall`\n\n## Implementation Notes\n1. Fields `blockHash` and `transactionHash` return the values of [`blockId`](https://docs.vechain.org/thor/learn/block.html#block) and [`transactionId`](https://docs.vechain.org/thor/learn/transaction-model.html#transaction-id) defined in the Thor protocol, respectively\n2. APIs `eth_estimateGas`, `eth_call`, `eth_getTransactionReceipt`, `debug_traceTransaction` and `debug_traceCall` only return information associated with the first [clause](https://docs.vechain.org/thor/learn/transaction-model.html#clauses) in a transaction\n3. Unsupported returning fields (all set to zero):\n* `cumulativeGasUsed`\n* `difficulty`\n* `gasPrice`\n* `logsBloom`\n* `nonce`\n* `sha3Uncles`\n* `totalDifficulty`\n4. For the default block number options [1], only `latest` and `earliest` are supported\n## License\nThis software is licensed under the\n[GNU Lesser General Public License v3.0](https://www.gnu.org/licenses/lgpl-3.0.html), also included\nin *LICENSE* file in repository.\n## References\n[1] [https://eth.wiki/json-rpc/API](https://eth.wiki/json-rpc/API).\n","readmeFilename":"README.md"}