Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: new plugin nillionDB #2133

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open

feat: new plugin nillionDB #2133

wants to merge 10 commits into from

Conversation

wtfsayo
Copy link
Member

@wtfsayo wtfsayo commented Jan 10, 2025

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 #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

  1. 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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_3Ek5d1ocgtjFRBc4VN6DWjmYiXxmzdg # Nillion (nilDB) Node JWTs (Bearer tokens)
    NILLION_NILDB_ORG=did:nil:testnet:nillion19e5mr74hce5tu9f0s6q4sj0k0vd84h92fz2qa0
    NILLION_NILDB_SCHEMA_ID=06b82464-6f1b-4e47-921f-425c547fbdcd
  2. Add the Nillion plugin into a character file.
  3. Play with it: "Can you upload my secret 'foobar' to Nillion?", "Can you retrieve the secret with id '12334' from Nillion?"

image
image (1)
image (2)
image (3)

cc: @tim-hm

@wtfsayo wtfsayo requested a review from odilitime January 10, 2025 21:50
@wtfsayo wtfsayo changed the title Feat/nillion db feat: new plugin nillionDB + fix: lensPlugin export Jan 10, 2025
@wtfsayo wtfsayo enabled auto-merge January 10, 2025 22:14
@odilitime odilitime added the Plugin_new Mark PRs that are a new plugin label Jan 10, 2025
@wtfsayo wtfsayo requested a review from odilitime January 11, 2025 06:35
@wtfsayo wtfsayo changed the title feat: new plugin nillionDB + fix: lensPlugin export feat: new plugin nillionDB Jan 11, 2025
@wtfsayo wtfsayo requested a review from tcm390 January 11, 2025 08:44
odilitime
odilitime previously approved these changes Jan 11, 2025
@wtfsayo wtfsayo requested a review from odilitime January 13, 2025 17:33
@jimouris
Copy link

Here's another demo: https://x.com/nillionnetwork/status/1882866783658639790

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Plugin_new Mark PRs that are a new plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nillion nilDB Plugin
4 participants