- Quick start
- Development
- Common Usages
- curl:
curl -OL https://github.com/DeFiCh/ain/releases/download/v4.0.0/defichain-4.0.0-x86_64-pc-linux-gnu.tar.gz
- aria:
aria2c -x16 -s16 https://github.com/DeFiCh/ain/releases/download/v4.0.0/defichain-4.0.0-x86_64-pc-linux-gnu.tar.gz
- wget:
wget https://github.com/DeFiCh/ain/releases/download/v4.0.0/defichain-4.0.0-x86_64-pc-linux-gnu.tar.gz
- docker:
docker run docker.io/defi/defichain
[Runs directly; pass args as needed at the end]
tar -xvzf defichain-4.0.0-x86_64-pc-linux-gnu.tar.gz
- mainnet:
defid
- testnet:
defid -testnet
- changi:
defid -changi
- regtest:
defid -regtest
- mainnet:
defi-cli getblockchaininfo
- testnet:
defi-cli -testnet getblockchaininfo
- changi:
defi-cli -changi getblockchaininfo
- regtest:
defi-cli -regtest getblockchaininfo
- Dockerized build:
./make.sh docker-release
[No pre-requisites needed other than docker] - Native build:
./make.sh build
- Install pre-req:
./make.sh ci-setup-deps
- User scope pre-req:
./make.sh ci-setup-user-deps
- OS pre-req:
./make.sh pkg-install-deps
- OS pre-req, target specific:
pkg-install-deps-<arch>
- User pre-req:
pkg-user-install-rust
- User pre-req setup, target specific:
pkg-user-setup-rust
./make.sh
Requirements:- Debian 12 / Debian Testing / Ubuntu 20.04, 22.04, 23.10
- Other: Refer to make.sh file, build manually.
- For others like WSL, MacOS, works partially once set-up.
- All:
./make.sh test
- C++:
./make.sh test-cpp
- Filtered:
./make.sh test-cpp --run_test=<filter>
- Eg:
./make.sh test-cpp --run_test=baes58_tests --log_level=all
- Filtered:
- Rust:
./make.sh test-rs
- Filtered:
./make.sh test-rs <TODO>
- Eg:
./make.sh test-rs <TODO>
- Filtered:
- Python:
./make.sh test-py
- Filtered:
./make.sh test-py --filter <filter>
- Eg:
./make.sh test-py --filter "feature_evm*"
- Filtered:
- All:
./make.sh fmt
- Lang:
fmt-rs
/fmt-cpp
/fmt-py
- Lang:
- All:
./make.sh check
- Lang:
check-rs
/check-cpp
/check-py
- Lang:
- UTXO:
defi-cli getbalance
- DVM:
defi-cli gettokenbalances {} true true
- UTXO - Known addr:
defi-cli listunspent 1 9999999 '[ "<addr>" ]'
- UTXO - Known addr:
defi-cli scantxoutset start '[ "addr(<addr>)" ]
- DVM (all):
defi-cli listaccounts {} false false true
- DVM (single):
defi-cli getaccount <addr>
- UTXO:
defi-cli sendtoaddress <addr> <amount>
- DVM:
defi-cli sendtokenstoaddress '{}' '{ "<dst-addr>": "<amount>@<token>" }'
- UTXO-DVM:
defi-cli utxostoaccount '{ "<addr>": "<amount>@<token>" }'