SEA!

Another big update to Holster, I've just added the SEA implementation from GunDB with relatively few modifications. A lot of the environment checks were no longer necessary as Node now supports the Web Crypto API.

Also thanks to Joey, Holster now runs natively in the browser and SEA works exactly the same. There's still a fair way to go to introduce a Holster.user API, but the SEA primitives all work and have lots of tests to show it.

The tests pretty much copy and paste into the browser console to show that they're working there too, all it requires is a JavaScript file with:
import SEA from "../src/sea.js"
globalThis.SEA = SEA

And then you should be able to check the basic functionality. Not quite sure yet how this will integrate with user data in Holster, but very happy with it as a first step.

Next

Lexi in the GunDB chat suggested renaming then() to next() to avoid confusion with the async API's. That makes sense to me so I've pushed the change and updated the API docs.

To update examples from previous posts, that means Holster queries now look like:
holster.get("hello").next("world!").on(console.log)

// Which will get called by this update.
holster.get("hello").next("world!").put("update", console.log)
Now all I need to use Holster in a real application is to add SEA from GunDB. No idea how that's going to happen... wish me luck!