diff --git a/docs/nillion.md b/docs/nillion.md index 1ba6707..2b578dc 100644 --- a/docs/nillion.md +++ b/docs/nillion.md @@ -15,49 +15,67 @@ Follow instructions to [install the Nillion SDK and Tools](/nillion-sdk-and-tool ```bash Usage: nillion [OPTIONS] -b Commands: - store-secrets Store secrets in the network - retrieve-secret Retrieve a secret from the network + store-values Store values in the network + retrieve-value Retrieve a value from the network store-program Store a program in the network compute Perform a computation in the network cluster-information Fetch the cluster's information + delete-values Delete values from the network preprocessing-pool-status Fetch the preprocessing pool status for a cluster inspect-ids Display the node/user ids derived from the provided keys shell-completions Generate shell completions node-key-gen Generate Node keys user-key-gen Generate User keys + retrieve-permissions Retrieve permissions for stored secrets + set-permissions Set permissions on a stored secrets help Print this message or the help of the given subcommand(s) Options: --user-key The user key in base58 + --user-key-seed The seed to be used to derive user key + -u, --user-key-path The path to the file that contains the user key in base58 + --node-key The node key in base58 + --node-key-seed The seed to be used to derive node key + -n, --node-key-path The path to the file that contains the node key in base58 + -b - A list of bootnodes to connect to + A list of bootnodes to connect to. + + This needs to use libp2p multiaddress format. + + -w + A list of websocket bootnode addresses to connect to. + + This needs to use libp2p multiaddress format. + -l, --listen-address - The address to listen on - --payments-rpc-endpoint - RPC endpoint URL - --payments-sc-address - Payments smart contract address - --blinding-factors-manager-sc-address - Blinding factors manager smart contract address - --payments-private-key - Wallet signer private key - --payments-chain-id - Wallet signer chain ID - --blockchain-config-path - Path to a configuration file containing the blockchain configurations + The address to listen on. + + If none is provided, the client will be expected to dial all of its peers (not receive incoming connections). + + --nilchain-rpc-endpoint + The nilchain RPC endpoint + + --nilchain-private-key + The nilchain payments private key + + --gas-price + The gas price to use, in unil units + -h, --help - Print help (see more with '--help') + Print help (see a summary with '-h') + -V, --version Print version ``` @@ -72,6 +90,15 @@ Generate a Nillion [user key](concepts.md#user-key) and store it in a file nillion user-key-gen ``` +``` +Arguments: + key filename + +Options: + -s, --seed seed to generate the key + -h, --help Print help +``` + ## Generate node key with nillion Generate a Nillion [node key](concepts.md#node-key) and store it in a file @@ -82,92 +109,142 @@ Generate a Nillion [node key](concepts.md#node-key) and store it in a file nillion node-key-gen ``` -## Store secrets with nillion +``` +Arguments: + key filename + +Options: + -s, --seed seed to generate the key + -h, --help Print help +``` + +## Store values with nillion -Store secrets from a secrets file or by passing them into the command directly. +Store values in the network -### store-secrets usage +### store-values usage ```bash -nillion --user-key \ - --node-key \ - -b \ - --payments-private-key \ - --payments-chain-id \ - --payments-rpc-endpoint \ - --payments-sc-address \ - --blinding-factors-manager-sc-address \ - store-secrets \ - [OPTIONS] \ - --cluster-id \ - --dealer-name \ - [PROGRAM_ID] +nillion \ + -b \ + --nilchain-private-key \ + --nilchain-rpc-endpoint \ + --node-key-seed \ + --user-key-seed \ + store-values \ + --secret-integer = \ + --cluster-id \ + --ttl-days ``` ```bash -# Arguments: +Arguments: [PROGRAM_ID] The program id that the store is for, if any Options: - --int-secret + -i, --public-integer + An integer public variable. + + These must follow the pattern `=`. + + --public-unsigned-integer + An unsigned integer public variable. + + These must follow the pattern `=`. + + [aliases: ui] + + --secret-integer An integer secret. These must follow the pattern `=`. - [aliases: i] + [aliases: si] - --uint-secret + --secret-unsigned-integer An unsigned integer secret. These must follow the pattern `=`. - [aliases: ui] + [aliases: sui] - --secrets-path + --array-public-integer + An array of integer public variables + + The expected pattern is `=`. + + Example: array1=1,2,3 + + [aliases: ai] + + --array-public-unsigned-integer + An array of unsigned integer public variables + + The expected pattern is `=`. + + Example: array1=1,2,3 + + [aliases: aui] + + --array-secret-integer + An array of integer secrets + + The expected pattern is `=`. + + Example: array1=1,2,3 + + [aliases: asi] + + --array-secret-unsigned-integer + An array of unsigned integer secrets + + The expected pattern is `=`. + + Example: array1=1,2,3 + + [aliases: asui] + + --secret-blob + A blob secret. + + These must follow the pattern `=` and the value must be encoded in base64. + + [aliases: sb] + + --nada-values-path A path to load secrets from + -t, --ttl-days + The time to live for the values in days + -c, --cluster-id The cluster id to perform the operation on --authorize-user-execution Give execution access to this user on the secret we're uploading - --dealer-name - Dealer name is used by the program to identify the input owners - -h, --help Print help (see a summary with '-h') ``` -### Example secrets file - -``` -# Secrets file with 2 secrets of type SecretInteger -integers: - my_secret1: 6 - my_secret2: 4 -``` - -## Retrieve a secret with nillion +## Retrieve a value with nillion -Retrieve a secret by store id and secret id +Retrieve a value from the network ### retrieve-secret usage ```bash -nillion --user-key \ - --node-key \ - -b \ - --payments-private-key \ - --payments-chain-id \ - --payments-rpc-endpoint \ - --payments-sc-address \ - --blinding-factors-manager-sc-address \ - retrieve-secret \ - --cluster-id \ - --store-id \ - --secret-id +nillion \ + -b \ + --nilchain-private-key \ + --nilchain-rpc-endpoint \ + --node-key-seed \ + --user-key-seed \ + retrieve-value \ + --cluster-id \ + --secret-id \ + --store-id ``` ```bash @@ -185,18 +262,15 @@ Name and store a compiled Nada program on the network. ### store-program usage ```bash -nillion --user-key \ - --node-key \ - -b \ - --payments-private-key \ - --payments-chain-id \ - --payments-rpc-endpoint \ - --payments-sc-address \ - --blinding-factors-manager-sc-address \ - store-program \ - --cluster-id \ - \ - +nillion \ + -b \ + --nilchain-private-key \ + --nilchain-rpc-endpoint \ + --node-key-seed \ + --user-key-seed \ + store-program \ + --cluster-id \ + ``` ```bash @@ -212,14 +286,12 @@ Compute on a stored program by program id with stored secrets, secrets and publi ### compute usage ```bash -nillion --user-key \ - --node-key \ - -b \ - --payments-private-key \ - --payments-chain-id \ - --payments-rpc-endpoint \ - --payments-sc-address \ - --blinding-factors-manager-sc-address \ +nillion \ + -b \ + --nilchain-private-key \ + --nilchain-rpc-endpoint \ + --node-key-seed \ + --user-key-seed \ compute \ [OPTIONS] \ --cluster-id \ @@ -287,15 +359,6 @@ Options: Print help (see a summary with '-h') ``` -### Example public variables file - -``` -# Public variables file with 2 public variables of type PublicVariableInteger -integers: - my_public_variable1: 20 - my_public_variable2: 12 -``` - ## Get cluster information with nillion Get info about the cluster @@ -303,16 +366,14 @@ Get info about the cluster ### cluster-information usage ```bash -nillion --user-key \ - --node-key \ - -b \ - --payments-private-key \ - --payments-chain-id \ - --payments-rpc-endpoint \ - --payments-sc-address \ - --blinding-factors-manager-sc-address \ +nillion \ + -b \ + --nilchain-private-key \ + --nilchain-rpc-endpoint \ + --node-key-seed \ + --user-key-seed \ cluster-information \ - + --cluster-id \ Arguments: The cluster id to query for @@ -328,16 +389,14 @@ Fetch the preprocessing pool status for a cluster ### preprocessing-pool-status usage ```bash -nillion --user-key \ - --node-key \ - -b \ - --payments-private-key \ - --payments-chain-id \ - --payments-rpc-endpoint \ - --payments-sc-address \ - --blinding-factors-manager-sc-address \ +nillion \ + -b \ + --nilchain-private-key \ + --nilchain-rpc-endpoint \ + --node-key-seed \ + --user-key-seed \ preprocessing-pool-status \ - + --cluster-id \ Arguments: The cluster id to query for @@ -353,15 +412,14 @@ Check the peer id of the node and the user id of the user. ### inspect-ids usage ```bash -nillion --user-key \ - --node-key \ - -b \ - --payments-private-key \ - --payments-chain-id \ - --payments-rpc-endpoint \ - --payments-sc-address \ - --blinding-factors-manager-sc-address \ +nillion \ + -b \ + --nilchain-private-key \ + --nilchain-rpc-endpoint \ + --node-key-seed \ + --user-key-seed \ inspect-ids + --cluster-id \ Options: -h, --help Print help