tari publish
Builds and publishes a Tari template to a network.
tari publish [PATH] [OPTIONS]Alias: tari deploy
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
[PATH] | Path to the template crate directory (default: current directory) |
Options
Section titled “Options”| Option | Description |
|---|---|
-a, --account <ADDRESS|NAME> | Account for publishing fees |
-c, --custom-network <NAME> | Custom network name |
-y, --yes | Auto-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 |
Authentication
Section titled “Authentication”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.
Examples
Section titled “Examples”# Publish template in current directorytari publish
# Publish template at a specific pathtari publish ./templates/my-token
# Publish a pre-compiled binarytari publish --binary target/wasm32-unknown-unknown/release/my_token.wasm
# Auto-confirm with custom accounttari publish -y -a my-account
# Provide the wallet daemon API key via environment variableexport TARI_WALLET_DAEMON_API_KEY="<your-api-key>"tari publish -a my-account