How to use

DevKit Script

For zip based installation, you can find the devkit.sh script under the bin folder. This script is used to manage the DevKit containers and Yaci CLI.

For curl based installation, you can find the devkit.sh script in $HOME/.yaci-devkit/bin folder. If the bin folder is in your PATH, you can just use devkit command to manage the DevKit containers and Yaci CLI.

Options:
  start   Start the DevKit containers and CLI.
  stop    Stop the DevKit containers.
  cli     Query the Cardano node in the DevKit container using cardano-cli.
  ssh     Establish an SSH connection to the DevKit container.
  info    Display information about the Dev Node.
  version Display the version of the DevKit.
  help    Display this help message.
 

To start the DevKit docker compose

To start the DevKit containers and yaci-cli.

For, curl based installation, you can use the following command.

devkit start

For, zip based installation, you can use the following command.

./devkit.sh start

Note: If you have some ports already in use, please make sure the mentioned ports in config/env file are free. You can also change the ports in config/env file. Any changes to env file will be applied when you restart the docker compose.

Fund default test accounts (Optional)

Update config/env file to include your test Cardano addresses to automatically topup Ada.

topup_addresses=<address1>:<ada_value>,<address2><ada_value>

Example

topup_addresses=addr_test1qzlwg5c3mpr0cz5td0rvr5rvcgf02al05cqgd2wzv7pud6chpzk4elx4jh2f7xtftjrdxddr88wg6sfszu8r3gktpjtqrr00q9:20000,addr_test1qqwpl7h3g84mhr36wpetk904p7fchx2vst0z696lxk8ujsjyruqwmlsm344gfux3nsj6njyzj3ppvrqtt36cp9xyydzqzumz82:10000

Important: After updating env file, you need to restart the docker compose using devkit.sh stop and devkit.sh start options.

Note: You can also use the topup command in Yaci CLI to fund your test addresses later.

Enable Ogmios and Kupo Support (Optional)

Yaci DevKit bundles both Ogmios and Kupo. However, Kupo is not enabled by default. To activate both Ogmios and Kupo support, set ogmios_enabled & kupo_enabled flag in env file to true. Alternatively, you can enable both Ogmios & Kupo support using enable-kupomios command in Yaci CLI.

To stop DevKit

Use devkit.sh script to stop the DevKit containers.

For, curl based installation, you can use the following command.

devkit stop

For, zip based installation, you can use the following command.

./devkit.sh stop

Yaci CLI - Few Key Commands

This section explains a few key commands specific to Yaci CLI.

Create a default devnet

yaci-cli:>create-node

To overwrite data or reset the existing default devnet, use the "-o" flag. Use --start flag to start the devnet after creation.

yaci-cli:>create-node -o
or,
yaci-cli:>create-node -o --start

Known Issue: Yaci DevKit uses a share folder to store the data on host machine. In some setup, this causes issue due to permission. If you face similar issue and not able to start the devnet, you can remove volumes section from docker-compose.yml file and restart the docker compose. It should work fine and create the devnet data in the docker container itself. Please check this issue (opens in a new tab) for more details.

Create a default devnet node with Conway Era

By default, Yaci DevKit creates a devnet with Babbage era. If you want to create a devnet with Conway era, use the following command.

yaci-cli:>create-node -o --era conway

Create a devnet with custom slots per epoch

To create devnet with a custom slots per epoch (By default 500 slots/epoch)

For example: Create and start a devnet with 30 slots per epoch

yaci-cli> create-node -o -e 30 --start

Now, you should be in the "devnet" context. To start the devnet, use the "start" command.

devnet:default>start

Note Now, with Yaci Viewer, you can conveniently check the devnet's data right from the browser. Simply open the following URL in your browser to access the Yaci Viewer.

http://localhost:5173 (opens in a new tab)

To reset cluster's data

If your devnet gets stuck or you simply want to reset the data and restart with the same configuration, simply use the command "reset". It will restore your devnet to its initial state, allowing you to continue your development seamlessly.

devnet:default>reset

To stop

devnet:default>stop

To fund a new address

Easily fund your test account with ADA using the "topup" command.

devnet:default> topup <address> <ada value>

To check utxos at an address

devnet:default> utxos <address>

To check devnet and url info

devnet:default> info

Default Pool Id

If you are testing pool delegation and reward withdrawal transaction in your application, you can use the following pool id which is already registered in the devnet.

pool1wvqhvyrgwch4jq9aa84hc8q4kzvyq2z3xr6mpafkqmx9wce39zy

Query Devnet's Cardano Node using cardano-cli

DevKit script has a wrapper script to query the Cardano node running in the devnet. You can use this script to query the Cardano node like you usually do with cardano-cli command line tool. You don't need to install cardano-cli in your local machine or use protocol magic number in the command.

For example:

To query protocol parameters, you can use cli option with devkit script.

./devkit.sh cli query protocol-parameters