diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..016af09
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+build
+node_modules
+proof.log
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..effc95d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,48 @@
+# equihash *modernized node.js native addon*
+
+This package is a modern refactor of khovratovich/equihash, which has not seen updates since 2016. It borrows from digitalbazaar/equihash's native node.js addon, which has not been updated since 2017. This package reworks them to compile with the latest versions of node-gyp and g++.
+
+## usage
+
+```sh
+npm install @tacticalchihuahua/equihash
+```
+
+```js
+import { solve, verify } from '@tacticalchihuahua/equihash';
+import { randomBytes } from 'crypto';
+
+const N = 90;
+const K = 5;
+
+// example
+async function demo() {
+ const seed = randomBytes(32);
+ const solution = await solve(seed, N, K);
+ const valid = await verify(solution.proof, solution.nonce, N, K);
+
+ console.log(solution); // {proof,nonce,n,k}
+ console.log(valid); // true/false
+}
+```
+
+## recommended parameters ( N, K )
+
+### For cryptocurrencies
+
+* (100/110/120, 4)
+* (108/114/120/126, 5)
+
+### For client puzzles
+
+* (60/70/80/90,4)
+* (90/96/102,5)
+
+## links
+
+* [Original C++ implementation of equihash proof-of-work by khovratovich](https://github.com/khovratovich/equihash)
+* [Original Native Node.js module by digitalbazaar](https://github.com/digitalbazaar/equihash)
+
+## license
+
+
@tacticalchihuahua/equihash by Lily Anne Hall is marked with CC0 1.0
diff --git a/addon.cc b/addon.cc
new file mode 100644
index 0000000..ae07a8f
--- /dev/null
+++ b/addon.cc
@@ -0,0 +1,158 @@
+#include
+
+#include "pow.h" // NOLINT(build/include)
+
+using Nan::AsyncQueueWorker;
+using Nan::AsyncWorker;
+using Nan::Callback;
+using Nan::GetFunction;
+using Nan::HandleScope;
+using Nan::New;
+using Nan::Null;
+using Nan::Set;
+using Nan::To;
+using v8::Context;
+using v8::Function;
+using v8::FunctionTemplate;
+using v8::Handle;
+using v8::Isolate;
+using v8::Local;
+using v8::Number;
+using v8::Object;
+using v8::String;
+using v8::Value;
+
+Nan::TryCatch try_catch;
+
+class EquihashSolutionWorker : public AsyncWorker {
+ public:
+ EquihashSolutionWorker(const unsigned n, const unsigned k, _POW::Seed seed,
+ Callback* callback)
+ : AsyncWorker(callback), n(n), k(k), seed(seed) {}
+ ~EquihashSolutionWorker() {}
+
+ // Executed inside the worker-thread.
+ // It is not safe to access V8, or V8 data structures
+ // here, so everything we need for input and output
+ // should go on `this`.
+ void Execute() {
+ _POW::Equihash equihash(n, k, seed);
+ _POW::Proof p = equihash.FindProof();
+ solution = p.inputs;
+ nonce = p.nonce;
+ // printhex("solution", &solution[0], solution.size());
+ }
+
+ // Executed when the async work is complete
+ // this function will be run inside the main event loop
+ // so it is safe to use V8 again
+ void HandleOKCallback() {
+ HandleScope scope;
+ Local