Network Setup
Here's how to set up your developer environment when building apps or agents with SecretSigner:
Development Flow
Start by developing against a local development network, then move to Nillion Testnet:
-
Develop locally using nillion-devnet
- Run a local nilChain and a local nilVM cluster of nodes
- Use local test accounts that are pre-funded with test NIL
- Iterate quickly without worrying about network issues
-
Move to testnet when your code works
- Point your app to nilChain testnet and nilVM testnet endpoints
- Get some NIL from the faucet
- Test in a production-like environment
Local Nillion Development Setup
1. Install the Nillion SDK
- Mac and Linux
- Windows
Install nilup, the Nillion SDK tool installer and version manager.
curl https://nilup.nilogy.xyz/install.sh | bash
The install script installs nilup
and the latest version of the SDK. Close your terminal. Open a
new terminal and confirm both nilup
and nillion
are installed:
nilup -V; nillion -V
You should see an output with the versions of nilup
and nillion
installed.
Install the latest Nillion SDK version
nillion install latest
nillion use latest
Today Nillion SDK binaries are available for Mac and Linux. In order to install Nillion on a Windows machine, you'll need to first complete a 5 minute WSL developer environment setup. Follow the steps below to install WSL, set up your WSL developer environment, and install and use Nillion Linux binaries from a Windows machine.
WSL developer environment setup
The Windows Subsystem for Linux (WSL) lets developers install a Linux distribution and use Linux applications, utilities, and Bash command-line tools including the Nillion SDK and tools on a Windows machine.
1. Run the install command
From your terminal, install WSL
wsl --install
This downloads and installs the Ubuntu Linux distribution.
2. Restart your computer
A reboot is required after installing Ubuntu.
3. After restarting, open Ubuntu and create an account
To open an Ubuntu terminal, search for the app from Start. Open Ubuntu and follow the prompts to set up your Linux username and password.
4. Update and upgrade packages
sudo apt update && sudo apt upgrade
5. Install the Visual Studio Code Remote Development Extension
Visual Studio Code Remote Development allows you to use a container, remote machine, or the Windows Subsystem for Linux (WSL) as a full-featured development environment. Install the Visual Studio Code Remote Development Extension Pack.
6. Open a new Ubuntu terminal and Install Nillion
Now that your WSL development environment is set up, you can install the Nillion SDK and Tools.
Make sure to install Nillion within a new Ubuntu terminal. Either open an Ubuntu terminal, or from your Windows PowerShell terminal, first run Ubuntu:
ubuntu
Installation
Install nilup, the Nillion SDK tool installer and version manager.
curl https://nilup.nilogy.xyz/install.sh | bash
The install script installs nilup
and the latest version of the SDK. Close your terminal. Open a
new terminal and confirm both nilup
and nillion
are installed:
nilup -V; nillion -V
You should see an output with the versions of nilup
and nillion
installed.
Install the latest Nillion SDK version
nillion install latest
nillion use latest
🎉 Great work! You've set up a WSL environment and installed Nillion within that environment. Before running a nillion command like nillion-devnet
, nada
, or pynadac
make sure you are in a WSL environment by first running ubuntu:
ubuntu
2. Run the Nillion local devnet
Open a new cli and run the nillion-devnet tool to start a local Nillion Network with nilChain and nilVM
nillion-devnet
3. Configure to point to your local Nillion devnet
Once the local devnet is running, you'll see the local devnet configuration details and a set of locally funded private keys below written to an environment file. Use any of these private keys to pay for local nillion-devnet operations.
- nilChain Local Devnet
- nilVM Local Devnet
- Local Devnet private keys
nilChain Chain ID: nillion-chain-devnet
nilChain JSON RPC URL: http://127.0.0.1:48102
nilChain REST API: http://localhost:26650
nilChain GRPC URL: http://localhost:26649
# Bootnode Multi Address (NILLION_GRPC_ENDPOINT)
nilVM GRPC Endpoint: http://127.0.0.1:37939
NILLION_NILCHAIN_PRIVATE_KEY_0=9a975f567428d054f2bf3092812e6c42f901ce07d9711bc77ee2cd81101f42c5
NILLION_NILCHAIN_PRIVATE_KEY_1=1e491133b9408b39572a29f91644873decea554224b20e2b0b923aeb860a1c18
NILLION_NILCHAIN_PRIVATE_KEY_2=980488572f235316cdb330191f8bafe4e635efbe88b3a40f5bee9bd21047c059
NILLION_NILCHAIN_PRIVATE_KEY_3=612bb5173dc60d9e91404fcc0d1f1847fb4459a7d5160d63d84e91aacbf2ab2f
NILLION_NILCHAIN_PRIVATE_KEY_4=04f5a984eeea9dce4e5e907da69c01a61568e3071b1a91cbed89225f9fd913b5
NILLION_NILCHAIN_PRIVATE_KEY_5=5f992c58921f4af83b4c6b650c4914626664cd02020577b0ada49cfa00d2c8a4
NILLION_NILCHAIN_PRIVATE_KEY_6=8f0297d3bb647eb59b95b29550b2aebbedd9be2c954b000e772efe8c9318a42d
NILLION_NILCHAIN_PRIVATE_KEY_7=c395243df9bb68dc809668efe4125f0eb017771ed8e3747b8d6860551913fecb
NILLION_NILCHAIN_PRIVATE_KEY_8=4bb5eaa799e24ae2b48545c41331921afe7e6a8dd7a850f5fbeb20a8226664ec
NILLION_NILCHAIN_PRIVATE_KEY_9=ef4b944d4fdb0077057925fe2dde365dfa2c83cf320463b14589feccd1b2b938
These devnet private keys are for local nillion-devnet use only.
The funded private keys and nilChain accounts generated by the local nillion-devnet tool are public and known by everyone. They should NEVER be used on mainnet or any public network. These keys are strictly for local development and testing purposes only. Using these keys on any non-local network would result in immediate loss of funds since anyone can access these private keys.
Moving to Nillion Testnet
When your implementation works locally, switch to testnet by:
1. Update config to point to Nillion Testnet networks
- nilChain Testnet
- nilVM Testnet
nilChain Chain ID: nillion-chain-testnet-1
nilChain JSON RPC URL: http://rpc.testnet.nilchain-rpc-proxy.nilogy.xyz
nilChain REST API: https://api.testnet.nilchain-rpc-proxy.nilogy.xyz
nilChain GRPC URL: https://testnet-nillion-grpc.lavenderfive.com
# Bootnode Multi Address
nilVM GRPC Endpoint: https://node-1.nilvm-testnet-1.nillion-network.testnet.nillion.network:14311
2. Fund a nilChain Wallet with Testnet NIL
- Create a Nillion Wallet - make sure to "Sign up with Google" rather than "Use Recovery Phrase" so that you have the option to "View Private Key" for the new Nillion account in Keplr.
- Fund the Nillion account with Testnet NIL from the nilChain Testnet Faucet
- Set the funded private key as your nilChain payer to pay for Nillion Testnet operations.