@botpoison/node

Installation

npm install @botpoison/node

Creating an instance

javascript
import Botpoison from "@botpoison/node";
const botpoison = new Botpoison({
secretKey: "sk_xxxxxxxx"
});

Verifying a solution

javascript
import Botpoison from "@botpoison/node";
const botpoison = new Botpoison({
secretKey: "sk_xxxxxxxx"
});
const solution = "solution"
const { ok } = await botpoison.verify(solution);
if(!ok) {
throw new Error('Invalid Botpoison solution')
}