{"_id":"@accesschains/fetch-node-details","name":"@accesschains/fetch-node-details","dist-tags":{"latest":"4.0.2"},"versions":{"4.0.2":{"name":"@accesschains/fetch-node-details","version":"4.0.2","description":"Fetches the node details from Access-chains nodelist smart contract","main":"dist/fetchNodeDetails.cjs.js","module":"dist/fetchNodeDetails.esm.js","unpkg":"dist/fetchNodeDetails.umd.min.js","jsdelivr":"dist/fetchNodeDetails.umd.min.js","types":"dist/types/index.d.ts","scripts":{"dev":"rimraf dist/ && cross-env NODE_ENV=development torus-scripts build","build":"rimraf dist/ && cross-env NODE_ENV=production torus-scripts build","prepack":"npm run build","test":"mocha","lint:ts":"eslint --fix 'src/**/*.ts'","prepare":"husky install"},"peerDependencies":{"@babel/runtime":"7.x"},"dependencies":{"web3-eth-contract":"^1.6.1","web3-utils":"^1.6.1"},"devDependencies":{"@babel/register":"^7.16.0","@rollup/plugin-replace":"^3.0.0","@toruslabs/eslint-config-typescript":"^0.1.0","@toruslabs/torus-scripts":"^0.1.1","@types/mocha":"^9.0.0","@typescript-eslint/eslint-plugin":"^5.5.0","@typescript-eslint/parser":"^5.5.0","cross-env":"^7.0.3","dotenv":"^10.0.0","eslint":"^8.3.0","eslint-plugin-import":"^2.25.3","eslint-plugin-mocha":"^9.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-promise":"^5.2.0","eslint-plugin-simple-import-sort":"^7.0.0","eslint-plugin-tsdoc":"^0.2.14","husky":"^7.0.4","lint-staged":"^12.1.2","mocha":"^9.1.3","prettier":"^2.5.0","rimraf":"^3.0.2","ts-node":"^10.4.0","typescript":"^4.5.2"},"lint-staged":{"!(*d).{js,ts}":["eslint --cache --fix","prettier --write"],"*.{json, md}":["prettier --write"]},"repository":{"type":"git","url":"git+https://github.com/AccessChains/fetch-node-details.git"},"keywords":["torus","nodes","torus-embed","torus-website","fetch-node-details","toruslabs"],"author":{"name":"Chaitanya Potti"},"license":"MIT","bugs":{"url":"https://github.com/AccessChains/fetch-node-details.git/issues"},"homepage":"https://github.com/AccessChains/fetch-node-details.git#readme","engines":{"node":">=14.17.0","npm":">=6.x"},"gitHead":"4235d9140916d901c4ae72981010365330a75fc3","_id":"@accesschains/fetch-node-details@4.0.2","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-JLIUbXxACDzCCfTEYI/F6vOa+6BHpghgED3VEWOgmi7hoKWD/vwMAmdcdJPgYFZoz4GS8qFStZM9pq6dJyu0wQ==","shasum":"bae179d7c0b59fc16dc610438c0aff6980fc2560","tarball":"https://registry.npmjs.org/@accesschains/fetch-node-details/-/fetch-node-details-4.0.2.tgz","fileCount":17,"unpackedSize":6508091,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8Bdpd5Xjoi3PPgphgsv/YqoKW5CFBLExzjnTLAJEVugIhANIvrSSSp0NfhT5cdAVxyphp2jpFIPKmxEImAkP+1C6O"}]},"_npmUser":{"name":"nvkhiem2016","email":"nvkhiem2016@gmail.com"},"directories":{},"maintainers":[{"name":"nvkhiem2016","email":"nvkhiem2016@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fetch-node-details_4.0.2_1690790744003_0.09405921331500178"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-31T08:05:43.897Z","4.0.2":"2023-07-31T08:05:44.239Z","modified":"2023-07-31T08:05:44.419Z"},"maintainers":[{"name":"nvkhiem2016","email":"nvkhiem2016@gmail.com"}],"description":"Fetches the node details from Access-chains nodelist smart contract","homepage":"https://github.com/AccessChains/fetch-node-details.git#readme","keywords":["torus","nodes","torus-embed","torus-website","fetch-node-details","toruslabs"],"repository":{"type":"git","url":"git+https://github.com/AccessChains/fetch-node-details.git"},"author":{"name":"Chaitanya Potti"},"bugs":{"url":"https://github.com/AccessChains/fetch-node-details.git/issues"},"license":"MIT","readme":"# Fetch-Node-Details\n\n[![npm version](https://badge.fury.io/js/%40toruslabs%2Ffetch-node-details.svg)](https://badge.fury.io/js/%40toruslabs%2Ffetch-node-details)\n![npm](https://img.shields.io/npm/dw/@toruslabs/fetch-node-details)\n\n## Introduction\n\nUse this package to fetches details about Torus nodes, from a specified Smart Contract that holds details about the list of nodes & network.\nThis will dynamically get updates about the node list, allowing the front end to continue querying the different set of nodes after migrations.\n\nThis utility library serves to find the endpoints and public keys associated\nwith the current set of qualified nodes, which are used for key lookups, key\nassignments, and key retrievals by other dependent libraries.\n\n## Features\n\n- Multi network support\n- Allows passing in custom provider + contract address for querying node info\n- Caching\n- Typescript compatible. Includes Type definitions\n- All API's return `Promises`\n\n## Installation\n\n### Bundling\n\nThis module is distributed in 5 formats\n\n- `esm` build `dist/fetchNodeDetails.esm.js` in es6 format\n- `commonjs` build `dist/fetchNodeDetails.cjs.js` in es5 format\n- `commonjs` build `dist/fetchNodeDetails-bundled.cjs.js` in es5 format with problematic packages bundled (benefits non-webpack users)\n- `umd` build `dist/fetchNodeDetails.umd.min.js` in es5 format without polyfilling corejs minified\n- `node` build `dist/fetchNodeDetails-node.js` in es5 format\n\nBy default, the appropriate format is used for your specified usecase\nYou can use a different format (if you know what you're doing eg. node) by referencing the correct file\n\nThe cjs build is not polyfilled with core-js.\nIt is upto the user to polyfill based on the browserlist they target\n\n### Directly in Browser\n\nCDN's serve the non-core-js polyfilled version by default. You can use a different\n\njsdeliver\n\n```js\n<script src=\"https://cdn.jsdelivr.net/npm/@toruslabs/fetch-node-details\"></script>\n```\n\nunpkg\n\n```js\n<script src=\"https://unpkg.com/@toruslabs/fetch-node-details\"></script>\n```\n\n## Usage\n\nAdd [`@toruslabs/fetch-node-details`](https://www.npmjs.com/package/@toruslabs/fetch-node-details) to your project:\n\n```ts\nimport FetchNodeDetails from \"@toruslabs/fetch-node-details\";\n\nconst fetchNodeDetails = new FetchNodeDetails();\nconst nodeInfo = await fetchNodeDetails.getNodeDetails();\n```\n\n```js\nconst FetchNodeDetails = require(\"@toruslabs/fetch-node-details\").default;\n\nconst fetchNodeDetails = new FetchNodeDetails();\nfetchNodeDetails.getNodeDetails().then((nodeInfo) => console.log(nodeInfo));\n```\n\n```js\n// For Node.js\nconst FetchNodeDetails = require(\"@toruslabs/fetch-node-details/dist/fetchNodeDetails-node.js\").default;\n\nconst fetchNodeDetails = new FetchNodeDetails();\nfetchNodeDetails.getNodeDetails().then((nodeInfo) => console.log(nodeInfo));\n```\n\n## Requirements\n\n- This package requires a peer dependency of `@babel/runtime`\n- Node 12+\n\n## Local Development\n\nRequires a .env file with the parameters in .env.development\n","readmeFilename":"README.md"}