feat: new plugin nillionDB
resolves conflicts for #2079
couldn't push to PR branch #2079
Original submission by jimouris
Add Nillion action to upload a secret (string) to nilDB (secret shares). Add Nillion action to retrieve a secret (string) from nilDB.
Relates to
Closes https://github.com/elizaOS/eliza/issues/2077
Risks
Low. A new plugin, which is isolated and should not affect existing functionality.
Background
What does this PR do?
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.
What kind of change is this?
Features (non-breaking change which adds functionality)
Why are we doing this? Any context or related work?
To extend the functionality of Eliza.
Documentation changes needed?
Require a change to the project documentation.
Testing
Where should a reviewer start?
Start by reviewing the upload and retrieve .ts files.
Detailed testing steps
- Set environment variables as:
# Nillion (nilDB) Configuration NILLION_NILDB_URLS=https://nildb-node-a50d.sandbox.app-cluster.sandbox.nilogy.xyz/api/v1,https://nildb-node-dvml.sandbox.app-cluster.sandbox.nilogy.xyz/api/v1,https://nildb-node-guue.sandbox.app-cluster.sandbox.nilogy.xyz/api/v1 # Nillion (nilDB) Node URL NILLION_NILDB_NODE_IDS=did:nil:testnet:nillion15lcjxgafgvs40rypvqu73gfvx6pkx7ugdja50d,did:nil:testnet:nillion1dfh44cs4h2zek5vhzxkfvd9w28s5q5cdepdvml,did:nil:testnet:nillion19t0gefm7pr6xjkq2sj40f0rs7wznldgfg4guue # Nillion (nilDB) Node IDs NILLION_NILDB_NODE_JWTS=eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJpc3MiOiJkaWQ6bmlsOnRlc3RuZXQ6bmlsbGlvbjE5ZTVtcjc0aGNlNXR1OWYwczZxNHNqMGswdmQ4NGg5MmZ6MnFhMCIsImF1ZCI6ImRpZDpuaWw6dGVzdG5ldDpuaWxsaW9uMTVsY2p4Z2FmZ3ZzNDByeXB2cXU3M2dmdng2cGt4N3VnZGphNTBkIiwiZXhwIjoxNzM4Nzc3MzQ3fQ.ZCGCkCshh7SFfAtqMaMHW5GiB4tt2G2UAYaOq1b5Yhgw7n40bTJKKqa33-6Rd6Zxb-FhXI026vGVeGbd-ltt5A,eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJpc3MiOiJkaWQ6bmlsOnRlc3RuZXQ6bmlsbGlvbjE5ZTVtcjc0aGNlNXR1OWYwczZxNHNqMGswdmQ4NGg5MmZ6MnFhMCIsImF1ZCI6ImRpZDpuaWw6dGVzdG5ldDpuaWxsaW9uMWRmaDQ0Y3M0aDJ6ZWs1dmh6eGtmdmQ5dzI4czVxNWNkZXBkdm1sIiwiZXhwIjoxNzM4Nzc3MzQ3fQ._9bOFl7XgPYqqkmrY6F3E-Q5_e55754aNpPSPh0oXm8Me9Hdl9fyB4uRe3xWSCD7sEC3ZL8-laxXx9MlD9SHEg,eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJpc3MiOiJkaWQ6bmlsOnRlc3RuZXQ6bmlsbGlvbjE5ZTVtcjc0aGNlNXR1OWYwczZxNHNqMGswdmQ4NGg5MmZ6MnFhMCIsImF1ZCI6ImRpZDpuaWw6dGVzdG5ldDpuaWxsaW9uMTl0MGdlZm03cHI2eGprcTJzajQwZjByczd3em5sZGdmZzRndXVlIiwiZXhwIjoxNzM4Nzc3MzQ3fQ.dmJtRiRQ5hKYo3ITKqavcv-NJKton951vONIMeJD630wNGh_XhgjKy_3Ek5d1ocgtjFRBc4VN6DWjmYiXxmzdg # Nillion (nilDB) Node JWTs (Bearer tokens) NILLION_NILDB_ORG=did:nil:testnet:nillion19e5mr74hce5tu9f0s6q4sj0k0vd84h92fz2qa0 NILLION_NILDB_SCHEMA_ID=06b82464-6f1b-4e47-921f-425c547fbdcd - Add the Nillion plugin into a character file.
- Play with it: "Can you upload my secret 'foobar' to Nillion?", "Can you retrieve the secret with id '12334' from Nillion?"
cc: @tim-hm