Skip to content

tari publish

Builds and publishes a Tari template to a network.

Terminal window
tari publish [PATH] [OPTIONS]

Alias: tari deploy

ArgumentDescription
[PATH]Path to the template crate directory (default: current directory)
OptionDescription
-a, --account <ADDRESS|NAME>Account for publishing fees
-c, --custom-network <NAME>Custom network name
-y, --yesAuto-confirm publishing
-f, --max-fee <AMOUNT>Maximum fee in microtari
--binary <PATH>Path to pre-compiled WASM binary
--api-key <API_KEY>Wallet daemon API key (bearer token). Also read from TARI_WALLET_DAEMON_API_KEY

Publishing authenticates with the wallet daemon using an API key sent as a bearer token. Provide it with --api-key or the TARI_WALLET_DAEMON_API_KEY environment variable. The key must be minted with at least the templates:read, templates:create, accounts:read and transactions:read permissions. The key is never read from or written to a config file.

Terminal window
# Publish template in current directory
tari publish
# Publish template at a specific path
tari publish ./templates/my-token
# Publish a pre-compiled binary
tari publish --binary target/wasm32-unknown-unknown/release/my_token.wasm
# Auto-confirm with custom account
tari publish -y -a my-account
# Provide the wallet daemon API key via environment variable
export TARI_WALLET_DAEMON_API_KEY="<your-api-key>"
tari publish -a my-account