hollowdb
v1.4.3
Published
A decentralized privacy-preserving key-value database
Downloads
31
Maintainers
Readme
Installation
To install HollowDB:
yarn add hollowdb # yarn
npm install hollowdb # npm
pnpm add hollowdb # pnpm
Depending on your use-cases, we have several optional dependencies:
- You can use hollowdb-prover as a simple utility that generates zero-knowledge proofs that are verifiable by HollowDB.
- You can use LMDB cache within your Warp instance via warp-contracts-lmdb.
- You can use Redis cache within your warp instance via warp-contracts-redis together with ioredis.
- When you are evaluating a contract that uses ZK proofs, you should also use warp-contracts-plugin-snarkjs and warp-contracts-plugin-ethers.
Usage
You can read the full documentation of HollowDB at https://docs.hollowdb.xyz.
[!NOTE]
If you are interested in customizing the smart contract of HollowDB and extending its SDKs, refer to this README.
Examples
Check out the examples folder for a few examples of HollowDB usage:
- Simple: a single JS file that demonstrates getting & setting a key.
- Micro: a Vercel Micro backend that can serves HollowDB as API endpoints, useful when you want to use HollowDB from another language.
Testing
You can run all tests via:
pnpm test
Tests operate on a local Arweave instance using arlocal. They will run for all cache types (LMDB, Redis, LevelDB). You will need to have a Redis server running for some of the tests to pass, the URL shall be specified here.
Styling
You can check the formatting of the code or lint everything with the following commands:
pnpm format # prettier
pnpm lint # eslint