{"id":15146936,"url":"https://github.com/excitableaardvark/node-cryptonight","last_synced_at":"2025-10-24T01:31:14.464Z","repository":{"id":27653112,"uuid":"114800643","full_name":"ExcitableAardvark/node-cryptonight","owner":"ExcitableAardvark","description":"node bindings for cryptonight hashing","archived":false,"fork":false,"pushed_at":"2023-01-03T15:14:51.000Z","size":1330,"stargazers_count":18,"open_issues_count":14,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-10T01:05:06.791Z","etag":null,"topics":["cryptonight","hash","monero","native"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ExcitableAardvark.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":"2017-12-19T18:56:27.000Z","updated_at":"2024-08-13T08:37:23.000Z","dependencies_parsed_at":"2023-01-14T07:12:44.926Z","dependency_job_id":null,"html_url":"https://github.com/ExcitableAardvark/node-cryptonight","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExcitableAardvark%2Fnode-cryptonight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExcitableAardvark%2Fnode-cryptonight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExcitableAardvark%2Fnode-cryptonight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExcitableAardvark%2Fnode-cryptonight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ExcitableAardvark","download_url":"https://codeload.github.com/ExcitableAardvark/node-cryptonight/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219867198,"owners_count":16555821,"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":["cryptonight","hash","monero","native"],"created_at":"2024-09-26T12:20:51.496Z","updated_at":"2025-10-24T01:31:12.871Z","avatar_url":"https://github.com/ExcitableAardvark.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-cryptonight\n\u003e node bindings for cryptonight hashing\n\n### Requirements\n\nnode-cryptonight requires [Boost](http://www.boost.org) and [Sodium](http://libsodium.org)\n\n##### Ubuntu\n\n    sudo apt-get install libboost-all-dev libsodium-dev\n\n##### Mac\n\n    brew install boost\n    brew install libsodium\n\n### Installation\n\n    npm install --save node-cryptonight\n   \n### Testing\n\nCode is linted with [standard](https://github.com/standard/standard) and tested with [Jest](https://github.com/facebook/jest). Run `npm test` to lint and run tests.\n\n### Usage Examples\n\n##### Synchronous Hashing\n\n```js\nconst cryptonight = require('node-cryptonight').hash\nconst hash = cryptonight(Buffer.from('This is a test'))\nconsole.log(hash) // \u003cBuffer a0 84 f0 1d 14 37 ..\u003e\n```\n\n##### Synchronous Hashing with variant 1\n\n```js\nconst cryptonight = require('node-cryptonight').hash\nconst hash = cryptonight(Buffer.from('This is a test'), 1)\nconsole.log(hash) // \u003cBuffer a0 84 f0 1d 14 37 ..\u003e\n```\n\n##### Synchronous Hashing with variant 4 and height 123\n\n```js\nconst cryptonight = require('node-cryptonight').hash\nconst hash = cryptonight(Buffer.from('This is a test'), 1, 123)\nconsole.log(hash) // \u003cBuffer a0 84 f0 1d 14 37 ..\u003e\n```\n\n##### Asynchronous Hashing\n\n```js\nconst cryptonight = require('node-cryptonight').asyncHash\ncryptonight(Buffer.from('This is a test'), hash =\u003e {\n  console.log(hash) // \u003cBuffer a0 84 f0 1d 14 37 ..\u003e\n})\n```\n##### Asynchronous Hashing with variant 1\n\n```js\nconst cryptonight = require('node-cryptonight').asyncHash\ncryptonight(Buffer.from('This is a test'), 1, hash =\u003e {\n  console.log(hash) // \u003cBuffer a0 84 f0 1d 14 37 ..\u003e\n})\n```\n##### Asynchronous Hashing with variant 4 and height 123\n\n```js\nconst cryptonight = require('node-cryptonight').asyncHash\ncryptonight(Buffer.from('This is a test'), 4, 123, hash =\u003e {\n  console.log(hash) // \u003cBuffer a0 84 f0 1d 14 37 ..\u003e\n})\n```\n\n##### Promise Wrapper Example\n\n```js\nfunction cryptonight(data) {\n  return new Promise((resolve, reject) =\u003e {\n    require('node-cryptonight').asyncHash(data, hash =\u003e {\n      resolve(hash)\n    })\n  })\n}\n\ncryptonight(Buffer.from('This is a test'))\n  .then(console.log) // \u003cBuffer a0 84 f0 1d 14 37 ..\u003e\n```\n\n### See Also\n\n* [node-cryptonight-lite](https://github.com/ExcitableAardvark/node-cryptonight-lite)\n\n### License\n\nReleased under the 3-Clause BSD License. Contains code from the Monero project. See `LICENSE` for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcitableaardvark%2Fnode-cryptonight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexcitableaardvark%2Fnode-cryptonight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcitableaardvark%2Fnode-cryptonight/lists"}