A plugin for storing and retrieving data from Nillion's nilDB within the ElizaOS ecosystem.
The Nillion plugin enables seamless integration with the decentralized nilDB database backed by secure multi-party computation (MPC). The plugin provides functionality to store and retrieve secrets to/from nilDB. When you store your data in nilDB nodes, your data are secret shared in a way that none of the nodes can learn anything about your secrets. Then, when all the secret shares are combined, you can retrieve your original data.
To get started with nilDB read our docs.
To get credentials contact Georgios Pentafragkas.
The plugin requires the following environment variables to be set:
NILLION_NILDB_ORG_DID=<Org_ID>
NILLION_NILDB_SCHEMA_ID=<Schema_ID>
NILLION_NILDB_NODE_URLS=<URL_1>,<URL_2>,<URL_3>
NILLION_NILDB_NODE_IDS=<Node_ID_1>,<Node_ID_2>,<Node_ID_3>
NILLION_NILDB_NODE_JWTS=<Node_JWT_1>,<Node_JWT_2>,<Node_JWT_3>
pnpm install @elizaos/plugin-nillion
import { nillionPlugin } from "@elizaos/plugin-nillion";
// The plugin automatically handles secret uploads when triggered
// through natural language commands like:
"Upload the following secret to Nillion: MyPassword123"
"Upload my secret 'foo' to nilDB"
"Store this the word PRIVACY on nillion's database"
// The plugin automatically handles secret retrieval when triggered
// through natural language commands like:
"Retrieve the secret from Nillion with id 59591970-f6d1-490f-839a-02a1e8ba2a3e"
"Download my secret with id 59591970-f6d1-490f-839a-02a1e8ba2a3e from nilDB"
"Load the secret corresponding to id 59591970-f6d1-490f-839a-02a1e8ba2a3e from nillion's database"
Uploads secrets to Nillion's nilDB.
Aliases:
- UPLOAD_SECRET_TO_NILLION
- UPLOAD_SECRET_TO_NILDB
- STORE_SECRET_ON_NILLION
- STORE_SECRET_ON_NILDB
- SAVE_SECRET_TO_NILLION
- SAVE_SECRET_TO_NILDB
- UPLOAD_TO_NILLION
- UPLOAD_TO_NILDB
- STORE_ON_NILLION
- STORE_ON_NILDB
- SHARE_SECRET_ON_NILLION
- SHARE_SECRET_ON_NILDB
- PUBLISH_SECRET_TO_NILLION
- PUBLISH_SECRET_TO_NILDB
Input Content:
interface UploadContent {
secret: string;
}
Retrieve secrets from Nillion's nilDB.
Aliases:
- RETRIEVE_SECRET_FROM_NILLION
- RETRIEVE_SECRET_FROM_NILDB
- GET_SECRET_FROM_NILLION
- GET_SECRET_FROM_NILDB
- LOAD_SECRET_FROM_NILLION
- LOAD_SECRET_FROM_NILDB
- RETRIEVE_FROM_NILLION
- RETRIEVE_FROM_NILDB
- LOAD_FROM_NILLION
- LOAD_FROM_NILDB
Input Content:
interface RetrieveContent {
id: string;
}
Configuration Issues
- Verify all required environment variables are set properly
(
NILLION_NILDB_URLS
,NILLION_NILDB_NODE_IDS
,NILLION_NILDB_NODE_JWTS
should all have three comma separated values.) - Ensure RPC endpoints are accessible
- Confirm NILLION_NILDB_ORG and NILLION_NILDB_SCHEMA_ID are set correctly (one value each.)
Environment Variables
- Never commit private keys to version control
- Use secure environment variable management
- Rotate private keys periodically
-
Clone the repository
-
Install dependencies:
pnpm install
-
Build the plugin:
pnpm run build
-
Run the plugin:
pnpm run dev
- Currently, we only upload a string. This can be extended to allow any custom schema.
We welcome community feedback and contributions to help prioritize these enhancements.
Contributions are welcome! Please see the CONTRIBUTING.md file for more information.
This plugin integrates with and builds upon several key technologies:
- Nillion's nilDB: Decentralized database
Special thanks to:
- The Eliza community for their contributions and feedback.
This plugin is part of the Eliza project. See the main project repository for license information.