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: Add plugin for Nillion's nilDB #2079

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

Conversation

jimouris
Copy link

@jimouris jimouris commented Jan 9, 2025

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 (nilDB) Node IDs
    NILLION_NILDB_NODE_JWTS=eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.e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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

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jimouris! Welcome to the ai16z community. Thanks for submitting your first pull request; your efforts are helping us accelerate towards AGI. We'll review it shortly. You are now a ai16z contributor!

@jimouris jimouris force-pushed the 2077--add-nillion-plugin branch from 2174900 to 8c1fd44 Compare January 9, 2025 21:10
@tim-hm tim-hm force-pushed the 2077--add-nillion-plugin branch from 8c1fd44 to 523c508 Compare January 10, 2025 16:30
@jimouris jimouris changed the base branch from main to develop January 10, 2025 16:32
@tim-hm tim-hm force-pushed the 2077--add-nillion-plugin branch from 523c508 to 228efd0 Compare January 10, 2025 16:46
@jimouris jimouris marked this pull request as ready for review January 10, 2025 16:46
@jimouris jimouris force-pushed the 2077--add-nillion-plugin branch from 228efd0 to c84ea52 Compare January 10, 2025 17:12
@odilitime odilitime added the Plugin_new Mark PRs that are a new plugin label Jan 10, 2025
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
3 participants