Skip to content

Commit

Permalink
update nilql docs to reference cluster key
Browse files Browse the repository at this point in the history
  • Loading branch information
oceans404 committed Jan 31, 2025
1 parent 903a66d commit aad1f18
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions docs/build/secretVault-secretDataAnalytics/encryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,34 @@ https://github.com/NillionNetwork/nil-examples/blob/main/nildb/secretvault_nextj

## Usage with SecretVault and SecretDataAnalytics

To encrypt data for use within SecretVault and SecretDataAnalytics, you'll need to generate a special nilQL secret key by passing in each of your organization's node urls from your [cluster config](/build/secretVault-secretDataAnalytics/access#store-your-organizations-credentials) and [JWT API Tokens](/build/secretVault-secretDataAnalytics/generate-tokens) you've generated per node DID.
To encrypt data for use within SecretVault and SecretDataAnalytics, you can create a cluster key by passing in

- your [cluster config](/build/secretVault-secretDataAnalytics/access#store-your-organizations-credentials) of node urls and node DIDs
- your selected operation (store, match, sum)

```
const cluster = {
nodes: [
{
'url': 'https://nildb-zy8u.nillion.network',
'jwt': 'YOUR_API_TOKEN_FOR_nildb-zy8u'
url: 'https://nildb-zy8u.nillion.network',
did: 'did:nil:testnet:nillion1fnhettvcrsfu8zkd5zms4d820l0ct226c3zy8u',
},
{
'url': 'https://nildb-rl5g.nillion.network',
'jwt': 'YOUR_API_TOKEN_FOR_nildb-rl5g'
url: 'https://nildb-rl5g.nillion.network',
did: 'did:nil:testnet:nillion14x47xx85de0rg9dqunsdxg8jh82nvkax3jrl5g',
},
{
'url': 'https://nildb-lpjp.nillion.network',
'jwt': 'YOUR_API_TOKEN_FOR_nildb-lpjp'
url: 'https://nildb-lpjp.nillion.network',
did: 'did:nil:testnet:nillion167pglv9k7m4gj05rwj520a46tulkff332vlpjp',
}
]
}
const operation = {
store: true
}
```

```javascript reference showGithubLink
https://github.com/NillionNetwork/nillion-sv-wrappers/blob/main/nilQl/wrapper.js#L25-L27
https://github.com/NillionNetwork/nillion-sv-wrappers/blob/main/nilQl/wrapper.js#L47-L50
```

0 comments on commit aad1f18

Please sign in to comment.