Install dWallet
Prerequisites
Your system needs the following prerequisites to successfully install dWallet.
Rust and Cargo
dWallet requires Rust
and Cargo
(Rust's package manager) on all supported operating systems.
The recommended method to install Rust is with rustup
using cURL
.
Some commands in the installation instructions also require cURL
.
If you can't run the cURL
command to install Rust,
see the instructions to install cURL
for your operating system in the following section before proceeding.
Use the following command to install Rust
and Cargo
on macOS or Linux:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
If you use Windows 11, refer to the Rust installer on the Rust website. The installer checks for C++ build tools and prompts you to install them if needed. Select the appropriate option for your environment and follow the installation wizard instructions.
For additional installation options, see Install Rust.
dWallet uses the latest version of Cargo
to manage dependencies and build the project.
For more details,
see the Cargo installation page.
Use the following command to update Rust
with rustup
:
rustup update stable
Additional prerequisites by operating system
Select the appropriate tab to view the requirements for your system.
- Linux
- macOS
- Windows
The prerequisites needed for the Linux operating system include:
The Linux instructions assume a distribution that uses the APT package manager. You might need to adjust the instructions to use other package managers.
All Linux prerequisites
Reference the relevant sections that follow to install each prerequisite individually, or run the following to install them all at once:
sudo apt-get update
sudo apt-get install curl git-all cmake gcc libssl-dev libclang-dev libpq-dev build-essential
cURL
Install cURL with the following command:
sudo apt-get install curl
Verify that cURL installed correctly with the following command:
curl --version
Git CLI
Run the following command to install Git:
sudo apt-get install git-all
For more information, see Install Git on Linux on the GitHub website.
CMake
Use the following command to install CMake.
sudo apt-get install cmake
To customize the installation, see Installing CMake on the CMake website.
GCC
Use the following command to install the GNU Compiler Collection, gcc
:
sudo apt-get install gcc
libssl-dev
Use the following command to install libssl-dev
:
sudo apt-get install libssl-dev
If the version of Linux you use doesn't support libssl-dev
, find an equivalent package for it on the ROS
Index.
(Optional) If you have OpenSSL you might also need to also install pkg-config
:
sudo apt-get install pkg-config
libclang-dev
Use the following command to install libclang-dev
:
sudo apt-get install libclang-dev
If the version of Linux you use doesn't support libclang-dev
, find an equivalent package for it on the ROS
Index.
libpq-dev
Use the following command to install libpq-dev
:
sudo apt-get install libpq-dev
If the version of Linux you use doesn't support libpq-dev
, find an equivalent package for it on the ROS
Index.
build-essential
Use the following command to install build-essential
:
sudo apt-get install build-essential
The prerequisites needed for the macOS operating system include:
macOS includes a version of cURL you can use to install Homebrew. Use Homebrew to install other tools, including a newer version of cURL.
Homebrew
Use the following command to install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
All macOS prerequisites
With Homebrew installed, you can install individual prerequisites from the following sections or install them all at once with this command:
cURL
Use the following command to update the default cURL on macOS:
brew install curl
CMake
Use the following command to install CMake:
brew install cmake
To customize the installation, see Installing CMake on the CMake website.
libpq
Use the following command to install libpq:
brew install libpq
Git CLI
Use the following command to install Git:
brew install git
The prerequisites needed for the Windows 11 operating system include:
cURL
Windows 11 comes with a Microsoft version of cURL If you prefer the cURL project version, download it from https://curl.se/windows/.
Git CLI
Download and install the Git command line interface.
CMake
Download and install CMake from the CMake website.
Protocol Buffers
Download Protocol Buffers (protoc-xx.x-win32.zip or protoc-xx.x-win64.zip) and add the \bin directory to your Windows PATH environment variable.
Additional tools for Windows
dWallet requires the following additional tools on computers running Windows:
- For Windows on ARM64 only — Visual Studio 2022 Preview.
- C++ build tools is required to install Rust.
- The LLVM Compiler Infrastructure. Look for a file with a name similar to LLVM-15.0.7-win64.exe for 64-bit Windows, or LLVM-15.0.7-win32.exe for 32-bit Windows.
Known issue — The dwallet console
command does not work in PowerShell.
To update to the latest stable version of Rust:
rustup update stable
Install dWallet binaries from source
To install dWallet binaries, run the following command:
git clone --branch sign-ia-wasm https://github.com/dwallet-labs/dwallet-network.git
cd dwallet-network
cargo install --locked --path crates/sui
The installation process may take some time. You can monitor the progress in your terminal. If you encounter an error, ensure all prerequisites are up to date and try the command again.
The command installs dWallet components in the ~/.cargo/bin
folder.
Make sure you have this directory in your system's PATH
environment variable:
echo $PATH | grep ".cargo/bin"
To add this directory into $PATH:
# For ZSH:
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# For Bash:
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
To check if the installation was successful, run the following command:
which dwallet
# Expected output: `~/.cargo/bin/dwallet`
dwallet --version
# Expected output: `dwallet x.y.z-{hash}`
Upgrade dWallet binaries
If you previously installed the dWallet binaries, you can update them to the most recent by repeating the installation process above.