A TypeScript client library for building with Nillion Private Storage, a decentralized storage system that keeps sensitive data secret by storing encrypted shares across a cluster of nilDB nodes. Each nilDB node stores a separate share of the encrypted data, ensuring no single node can reveal the original value.
Install the package via npm:
npm install @nillion/secretvaults
Or using yarn:
yarn add @nillion/secretvaults
Or using pnpm:
pnpm add @nillion/secretvaults
For a complete quickstart guide with examples, visit the Nillion Docs Private Storage Quickstart.
For comprehensive usage examples and integration patterns, see the NilDB Examples repository.
For detailed information about Private Storage concepts, see the Nillion Key Concepts documentation.
Service URLs for different environments can be found in the Nillion Network Configuration docs.
const urls = {
chain: 'http://rpc.testnet.nilchain-rpc-proxy.nilogy.xyz',
auth: 'https://nilauth.sandbox.app-cluster.sandbox.nilogy.xyz',
dbs: [
'https://nildb-stg-n1.nillion.network',
'https://nildb-stg-n2.nillion.network',
'https://nildb-stg-n3.nillion.network',
],
};
The library uses typed errors and provides detailed error information:
try {
await builderClient.createCollection(collection);
} catch (error) {
console.error('Failed to create collection:', error.message);
// Handle specific error types
}
We welcome contributions! Please see the main repository for contribution guidelines.
This project is licensed under the MIT License.