Skip to main content
Last updated

KADENA CLI

The Kadena CLI embodies our commitment to simplicity, power, and flexibility for developers. It's crafted to streamline your development process, offering direct and efficient access to Kadena's blockchain capabilities. This tool caters to the pragmatic needs of developers by providing a straightforward, command-line interface that integrates seamlessly into your workflow, allowing you to focus on building robust, innovative applications without the overhead of unnecessary complexity. Our philosophy centers on empowering developers with the tools they need to unlock the full potential of the kadena blockchain, in a clear and concise manner.

KADENA CLI GUIDE

Welcome to the Kadena CLI guide, your all-encompassing manual for mastering the Kadena command-line interface. This document is designed to unveil the full suite of commands available through Kadena CLI, providing you with the insights necessary to harness its potential fully.

Kadena CLI has one primary entry-point command: kadena, dedicated to application development, offering tools and commands tailored for building and managing Kadena-based applications.

Installation from npm

npm
npm install -g @kadena/kadena-cli
npm
npm install -g @kadena/kadena-cli

Installation from pnpm

pnpm
pnpm install -g @kadena/kadena-cli
pnpm
pnpm install -g @kadena/kadena-cli

List of commands

Each command can be made interactive by not filling in the flags. You can prefill a question by filling the flag

list of root commands and flags

description
--helpdisplay help information
--versiondisplay version information

list of global commands and flags

description
--quietEliminating interactive prompts and confirmations
--jsonAdds relevant result data in json format to stdout stream.

Quiet mode

The Quiet Mode feature of the Kadena CLI can be used to streamline the automation of tasks, specifically targeting environments where interactive input is impractical, such as continuous integration (CI) systems. By activating Quiet Mode, the CLI suppresses interactive prompts and skips confirmations, allowing commands to execute uninterrupted. This mode ensures that automated processes can run smoothly and efficiently, without the need for manual intervention.

kadena [command] --quiet
kadena [command] -q

JSON output

Using --json or --yaml will output relevant command result data in json or yaml format on stdout. This can be used to pipe into a file or other programs. Do be aware that this does not remove the regular logging which happens on stderr. It will not get in the way of piping since that only uses stdout by default. You can disable the other logging by using the KADENA_LOG=output environment variable. This does still print warnings or errors if they are present.

Example usage

kadena wallet list --wallet-name="all" --json

Legacy mode

Legacy Mode offers a bridge for users requiring compatibility with the previously used crypto algo, particularly for commands related to wallets, keys, and transactions. This mode ensures the output format aligns with earlier standards, facilitating seamless integration with existing workflows and tools such as Chainweaver. It's especially useful when interacting with systems that rely on the legacy format for processing or when maintaining backward compatibility is critical.

Legacy mode is available for the following commands:

bash
kadena wallet addkadena key generatekadena tx sign
bash
kadena wallet addkadena key generatekadena tx sign
kadena [command] --legacy

Interactive mode

Interactive Mode is designed to make command execution more intuitive and user-friendly. When you run a command in the Kadena CLI without specifying all required options, the CLI automatically prompts you to provide the missing inputs. This guided approach helps streamline your workflow and ensures that you provide all necessary information to successfully execute a command.

How it works

To use Interactive Mode, simply type a command without its options:

kadena [command] [argument]

If the CLI is not running in Quiet Mode (--quiet), it will detect the missing elements needed for the command to run and will prompt you interactively to input them. This means you can start a command with minimal initial input and fill in the details as prompted by the CLI.

Benefits

  • Ease of Use: Reduces the need to remember all command arguments and options upfront.
  • Guided Execution: Ensures that all required inputs are collected before executing a command.
  • Flexibility: Allows for a more conversational and less rigid interaction with the CLI.

Example

If you want to add a new wallet but aren't sure of all the required flags and arguments, simply start with:

kadena wallet add

The CLI will then guide you through the necessary steps, asking for each required piece of information to complete the wallet addition.

Interactive mode is especially useful for new users or those who prefer a more guided approach when using command-line tools. It also serves as a learning tool by demonstrating the required inputs for various commands, enhancing your familiarity with the CLI's functionalities.

Subjects

Each command is structured as kadena <subject> [...<subject>] <verb> [--flags] [args] apart from some root level defaults.

Available subjects

subjectdescription
networkTool to add and manage networks
accountTool to manage / fund accounts of fungibles (e.g 'coin')
keyTool to generate and manage random keys
walletTool to generate / manage wallets and generate keys from wallet
txTool for creating and managing transactions
dappTool for managing dapp projects

Command specific help

To get help on a subject use kadena <subject> --help

kadena config

Tool for setting up and managing the CLI configuration

SubcommandDescription
initinitialize project configuration
pathPrint current used configuration path

Initializing the CLI configuration

The kadena config init command is your starting point. It creates a .kadena folder pre configured with default network settings (devnet, mainnet, testnet). You have the flexibility to specify the location of your .kadena folder, making it easier to organize your configurations either in the current working directory or a global directory such as your home directory.

Additionally, this command assists in the creation of your initial wallet and account, setting the stage for your transactions on the Kadena network.

kadena config init [options]

OptionsDescriptionRequired
--globalInitialize the .kadena directory in the current user's home directory. (~/.config/kadena)
--create-walletConfirm the creation of a new wallet. Set to true to enable.
--wallet-nameName for the new wallet.
--password-filePath to a file containing the wallet's password, alternatively, password can be passed via stdin.
--legacyUse ChainWeaver based key derivation when creating a wallet.
--create-accountEnable the creation of an account using the first wallet key.
--account-aliasAlias to store your account details, if creating an account.

Working directory and home directory

Local: by default the config is written to .kadena and this is accessible from anywhere in this directory. For example running kadena config init in /home/user/projects/my-kadena-project will allow you to access this configuration from anywhere inside that project directory.

Global: if passing the --global (or -g) flag the configuration is stored in your home directory in .config/kadena. This will allow you to use this configuration from anywhere on your system. Do be aware local configurations have priority. You can use kadena config path to validate which path is being used when in a certain directory.

Examples

Setup in a the current working directory with a new Wallet and Account:

kadena config init --create-wallet="true" --wallet-name="my_first_wallet" --create-account="true" --account-alias="dev_account"

Setup in the home user directory (~/.config/kadena). This will allow you to use the cli from anywhere and use this configuration.

kadena config init --global

Setup without creating a Wallet or Account:

kadena config init --create-wallet="false"

Note: All configurations will be stored within the specified .kadena/ folder, ensuring your settings are organized and easily accessible.

kadena network

Tool to add and manage networks

SubcommandDescriptionDefault value
listList all available networks
updateUpdate properties of an existing network
addAdd new network
set-defaultSet a network to be the default choice in selection prompts
deleteDelete existing network

kadena network update [options]

OptionsDescriptionRequired
--networkThe network to update
--network-nameUpdate the name of the network
--network-idUpdate the id of the network
--network-hostUpdate the host for the network
--network-explorer-urlUpdate the explorer url for the network

Examples

kadena network update --network="mainnet" --network-id="mainnet01" --network-host="https://api.chainweb.com" --network-explorer-url="https://explorer.chainweb.com/mainnet/tx/"

kadena network add [options]

OptionsDescriptionRequired
--network-nameSet the name of the network
--network-idSet the id of the network
--network-hostSet the host for the network
--network-explorer-urlSet the explorer url for the network
--network-overwriteConfirm overwrite configuration

Examples

kadena network add --network-name="mainnet" --network-id="mainnet01" --network-host="https://api.chainweb.com" --network-explorer-url="https://explorer.chainweb.com/mainnet/tx/" --network-overwrite="yes"

kadena network set-default [options]

OptionsDescriptionRequired
--networkSelect name of network to set default
--confirmConfirmation for default network to set/unset

Examples

Example for setting default network:

kadena network set-default --network="testnet" --confirm

Example for removing default network:

kadena network set-default --network="none" --confirm

Passing a network as "none" will remove the default network.

kadena network delete [options]

Passing a network as "none" will remove the default network.

OptionsDescriptionRequired
--networkSelect name of network to delete
--network-deleteConfirm deletion of network

Examples

kadena network delete --network="mainnet" --network-delete="yes"

kadena wallet

Tool to generate and manage wallets

SubcommandDescriptionDefault value
addAdd a new local wallet
importImport ( restore ) wallet from mnemonic phrase
generate-keyGenerate public/secret key pair(s) from your wallet
change-passwordUpdate the password for your wallet
exportExport unencrypted keypair(s) from a wallet
deleteDelete existing wallet from local filesystem
listList wallet(s)

kadena wallet add [options]

OptionsDescriptionRequired
--wallet-nameSet the name of the wallet
--password-fileFile path to the password file
--legacyGenerate legacy wallet
--create-accountCreate an account using the first wallet key
--account-aliasAlias to store your account details

Examples

kadena wallet add --wallet-name="kadena_wallet" --password-file="./kadenawallet-pw.txt"

example using wallet with account creation:

kadena wallet add --wallet-name="kadena_wallet" --password-file="./kadenawallet-pw.txt" --create-account=true --account-alias="dev_account"

kadena wallet import [options]

OptionsDescriptionRequired
--mnemonic-fileFilepath to your 12-word mnemonic phrase file to generate keys from (can be passed via stdin)Yes
--password-fileFilepath to the password fileYes
--wallet-nameEnter your wallet nameYes
--legacyUse Chainweaver's key derivation

Examples

kadena wallet import --wallet-name="myWallet"

kadena wallet generate-key [options]

Generate a key pair from a wallet mnemonic.

OptionsDescriptionRequired
--wallet-nameProvide the name of the walletYes
--amountAmount of keys to generate (default: 1)
--start-indexIndex to start generating keys atYes
--password-fileFilepath to the password fileinYes
--key-aliasOptional alias for generated key(s)Yes

Examples

Example generating public keys using a range (you will be prompted for password):

kadena wallet generate-key --wallet-name="" --amount="1" --key-alias=""

Example passing password from a file:

kadena wallet generate-key --wallet-name="kadenawallet" --amount="1" --key-alias="" --password-file=./kadenawallet-pw.txt

Example passing password from a standard input (stdin):

echo "supersecret" | kadena wallet generate-key --wallet-name="kadenawallet" --amount="1" --key-alias=""

Example generating a key at a specific starting index index:

kadena wallet generate-key --wallet-name="kadenawallet" --amount="1" --start-index="100" --key-alias=""

kadena wallet change-password [options]

OptionsDescriptionRequired
--wallet-nameWallet nameYes
--password-fileFilepath to the password fileYes
--new-password-fileFilepath to the new password fileYes
--confirmConfirm changing wallet passwordYes

Examples

kadena wallet change-password --wallet-name="mywalletname" --confirm

kadena wallet delete [options]

OptionsDescription
--wallet-nameSelect the name of the wallet
--confirmConfirm deletion of wallet

Examples:

Example single wallet deletion:

kadena wallet delete --wallet-name="mywalletname" --confirm

Example deletion of all wallets:

kadena wallet delete --wallet-name="all" --confirm

kadena wallet list [options]

OptionsDescription
--wallet-nameSet the name of the wallet

Examples

Example for listing specific wallet:

kadena wallet list --wallet-name="walletname"

Example for listing all wallets:

kadena wallet list --wallet-name="all"

kadena wallet export [options]

Export a KeyPair from a wallet unencrypted. Prints to stdout as yaml by default

OptionsDescription
--wallet-nameName of the wallet you want to export a key from
--key-indexThe index of the key to export
--password-fileFilepath to the wallet password, can be passed via stdin

Examples

Example (password will be prompted):

kadena wallet export --wallet-name="kadenawallet" --key-index="0" > mykey.yaml

Print as json (password will be prompted):

kadena wallet export --wallet-name="kadenawallet" --key-index="0" --json > mykey.json

kadena key

Tool to generate and manage keys

SubcommandDescription
generateGenerate random public/secret key pair(s)
listList available key(s)

kadena key generate [options]

Generate a plain keypair using a random mnemonic.

OptionsDescription
--key-aliasSet alias of the key to store on filesystem
--key-amountSet the amount of keys to generate
--legacyGenerate legacy keys

Examples

kadena key generate --key-alias="myalias" --key-amount="5"
kadena key generate --key-alias="myalias" --key-amount="5" --legacy

kadena key list

Example for listing all keys:

kadena key list

kadena account

Tool to manage / fund accounts of fungibles (e.g. coin')

SubcommandDescription
addAdd an existing account locally to the CLI
deleteDelete existing account(s)
detailsGet details of an account
fundFund an existing/new account
listList available account(s)
name-to-addressResolve a .kda name to a k:address (kadena names)
address-to-nameResolve a k:address to a .kda name (kadena names)

Account add command

Adds a new account with customizable parameters based on the specified type(wallet or manual).

kadena account add [options]

Common Options

OptionsDescriptionRequired
--typeMethod to add account details (manual or wallet)
--account-aliasAlias for the account
--account-nameProvide account name
--fungibleFungible module name (default: coin)
--public-keysComma separated list of public keys
--predicatekeys-all, keys-any, keys-2, Custom predicate

Options for Type "wallet"

These options are required when the account type is set to wallet:

OptionsDescriptionRequired
--wallet-nameProvide the name of the wallet
--password-filePath to a file containing the wallet's password, alternatively, passwords can be passed via stdin.

--password-file option is required only when you choose auto generate keys from wallet.

Example for adding an account with wallet type:

kadena account add --type="wallet" --wallet-name="wallet_name" --account-alias="account_alias" --fungible="coin" --public-keys="7c8939951b61614c30f837d7b02fe4982565962b5665d0e0f836b79720747cb2" --predicate="keys-all"

Example for adding an account with wallet type and auto generate keys:

kadena account add --type="wallet" --wallet-name="wallet-name" --account-alias="account_alias_testing" --fungible="coin" --public-keys="your_public_key,_generate_" --predicate="keys-all" --password-file="./kadenawallet-pw.txt"

Options for Type "manual"

OptionsDescriptionRequired
--verifyVerify account details on the blockchain.
--networkName of the network to be used
--chain-idChain to be used

As part of manual option only if you want to verify the account details on the blockchain, you need to provide the network and chain-id.

Example for adding an account with manual type and verifying on chain(assume if account already exists on chain):

kadena account add --type=manual --account-alias=account-add-test-manual --account-name=k:account-name --fungible=coin --verify --network=testnet --chain-id=1

Example for adding an account with manual type and not verifying on chain:

kadena account add --type="manual" --account-alias="account-add-test-manual-no-verify" --account-name="k:account-name" --fungible="coin" --public-keys="your_key_1, your_key_2" --predicate="keys-all"

Getting an account details / balance

The kadena account details command retrieves vital information about a specified account on the Kadena blockchain, such as its balance, guard conditions (public keys, predicate), and the account's name.

kadena account details [options]
OptionsDescriptionRequired
--accountProvide account alias/name to retrieve its detailsYes
--networkName of the network to be usedYes
--fungibleType of fungible asset (e.g., "coin").Yes
--chain-idsKadena chain id range (e.g: 1 / 0-3 / 0,1,5 / all)Yes

Examples

Single chain ID using an account alias:

kadena account details --account="k:PUBLIC_KEY" --network="testnet" --chain-ids="0"

Note: Fungible type is retrieved from the account alias file.

Single chain ID using account name:

kadena account details --account="k:PUBLIC_KEY" --network="mainnet" --chain-ids="1"

Note: Specify --fungible if using an account name. Defaults to "coin" if not provided.

You can specify a range of chain IDs to query multiple chains at once. Use a comma for discrete values or a hyphen for a continuous range.

Discrete Chain IDs:

kadena account details --account="myalias" --network="mainnet" --chain-ids="1,5"

Continuous Range of Chain IDs:

kadena account details --account="myalias" --network="mainnet" --chain-ids="1-5"

All Chains: Use "all" to query details across all chains.

kadena account details --account="k:PUBLIC_KEY" --network="mainnet" --chain-ids="all"

Funding an account on testnet/devnet

The kadena account fund command is used to add funds to an account on the testnet or development networks. This command also creates the account if it does not exist. Remember, this operation is not allowed on the mainnet.

If a faucet contract isn't available on the development network for the specified chain ID, you can use the --deploy-faucet option. This will deploy the faucet, allowing you to fund accounts on the development network.

kadena account fund [options]
OptionsDescriptionRequired
--accountProvide alias for an accountYes
--amountAmount to fundYes
--networkName of the network to be usedYes
--chain-idsProvide the chain ID associated with the accountSupports individual IDs, ranges (e.g., "1-5" or 2,5), or "all" for all chains.Yes
--fungibleType of fungible asset (e.g., "coin") Defaults to "coin" if not providedYes
--deploy-faucetDeploy a coin faucet contract to fund the account on devnet (development)

Examples

Fund an account on a specific chain:

kadena account fund --account="myalias" --amount="10" --network="testnet" --chain-ids="1"

Fund an account on a devnet with deploying faucet:

kadena account fund --account="myalias" --amount="20" --network="devnet" --chain-ids="17" --deploy-faucet

Note: To deploy a faucet on the development network, please make sure devnet is running and accessible. To setup devnet, please refer here

You can specify a range of chain IDs to fund an account across multiple chains. Use a comma for discrete values or a hyphen for a continuous range.

Discrete Chain IDs:

kadena account fund --account="myalias" --amount="10" --network="testnet" --chain-ids="1,3"

Continuous Range of Chain IDs:

kadena account fund --account="myalias" --amount="10" --network="testnet" --chain-ids="1-3"

All Chains: Use "all" to fund an account across all chains on the testnet.

kadena account fund --account="myalias" --amount="10" --network="testnet" --chain-ids="all"

kadena account account name-to-address [options]

OptionsDescriptionRequired
--networkName of the network to be usedYes
--account-kdn-nameProvide .kda name to resolve to k:accountYes

Examples

kadena account name-to-address --network="mainnet" --account-kdn-name="kadena.kda"

kadena account address-to-name [options]

OptionsDescriptionRequired
--networkName of the network to be usedYes
--account-kdn-addressProvide k:account to resolve to .kda nameYes

Examples

kadena account address-to-name --network="mainnet" --account-kdn-address="k:account"

kadena account list [options]

OptionsDescription
--account-aliasProvide the alias of the account

Example for listing specific account:

kadena account list --account-alias="accountAlias"

Example for listing all accounts:

kadena account list --account-alias="all"

kadena account delete [options]

OptionsDescription
--account-aliasProvide the alias of the account
--confirmConfirm deletion of account

Example for delete a specific account:

kadena account delete --account-alias="accountAlias" --confirm

Example for delete all accounts:

kadena account delete --account-alias="all" --confirm

kadena tx

Tool for creating and managing transactions

SubcommandDescription
addSelect a template and add a transaction
signSign a transaction using your wallet,
Sign a transaction using a key pair
testTest a signed transaction
sendSend a transaction to the network
statusGet the status of a transaction
listList transaction(s)

kadena tx add [options]

kadena tx add is a powerful command that leverages transaction templates to facilitate the quick and efficient creation of transactions across multiple chains and access patterns. This feature is designed to work with user-supplied values, filling out predefined templates to generate transactions ready for signing and submission.

Command Usage

plaintext
kadena tx add [options] [options]
plaintext
kadena tx add [options] [options]

This command accepts various arguments and options, allowing for detailed customization of the transaction being created. Below is a breakdown of the options available:

OptionsDescriptionRequired
--templatePath to the transaction template file.Yes
--template-dataFile path for the data used to fill the template.No
--network-idSpecifies the network ID (e.g., testnet04).Yes
--out-filePath for saving the generated transaction file.No
--holesDisplays a list of required template variables.No
Custom optionsGenerated based on the chosen template's required fields.Varies

Example Command

kadena tx add --template="transfer.yaml" --template-data="data.yaml" --network-id="testnet04" --out-file="transaction.json"

In this example, transfer.yaml is the template used to construct the transaction. data.yaml contains the user-supplied values for the template variables. The --network-id specifies which network the transaction is intended for, and --out-file determines where the generated transaction file will be saved.

Default Templates in kadena tx add

The kadena tx add command in the Kadena CLI includes a set of default templates that are designed to facilitate the quick and efficient creation of transactions. These templates are integral to the command's functionality and enhance user experience by providing predefined frameworks for common transaction types.

Location of Default Templates

When you use the kadena tx add command for the first time, the CLI automatically creates and stores default templates in the .kadena/transaction-templates directory on your local machine. This directory serves as the central repository for these templates, allowing easy access and customization.

Available Default Templates

Currently, the CLI comes with two primary default templates:

  • transfer: Simplifies the process of transferring tokens between accounts.
  • safe-transfer: Ensures a safer transfer with checks and validations to prevent common mistakes like sending to incorrect addresses.

These templates are designed to cover the most common types of transactions, making it easier for users to execute these operations without the need to write or customize code.

Benefits of Using Default Templates

  1. Ease of Use: The templates make it straightforward to create transactions without needing detailed blockchain scripting knowledge.
  2. Efficiency: Speeds up the transaction creation process by providing ready-to-use frameworks that only require filling in specific details.
  3. Error Reduction: The structured format of the templates, combined with interactive prompts, significantly reduces the potential for mistakes.

Customizing and Extending Templates

While default templates offer convenience and speed, you might sometimes need to customize or extend these templates to fit specific needs or to handle unique transaction types. The CLI allows you to either modify existing templates or create new ones from scratch and save them in the .kadena/transaction-templates directory.

By understanding and utilizing these default templates, you can significantly streamline your transaction creation processes with the Kadena CLI, making it a powerful tool for managing blockchain transactions efficiently.

Below is a YAML template transfer.yaml that outlines the structure for a coin transfer operation on Kadena. Notice the use of placeholders with prefixes to define expected data types for each field:

yaml
code: |-  (coin.transfer "{{{account:from}}}" "{{{account:to}}}" {{decimal:amount}})data:meta:  chainId: '{{chain-id}}'  sender: '{{{account:from}}}'  gasLimit: 2300  gasPrice: 0.000001  ttl: 600signers:  - public: '{{key:from}}'    caps:      - name: 'coin.TRANSFER'        args: ['{{{account:from}}}', '{{{account:to}}}', {{decimal:amount}}]      - name: 'coin.GAS'        args: []networkId: '{{network:networkId}}'type: exec
yaml
code: |-  (coin.transfer "{{{account:from}}}" "{{{account:to}}}" {{decimal:amount}})data:meta:  chainId: '{{chain-id}}'  sender: '{{{account:from}}}'  gasLimit: 2300  gasPrice: 0.000001  ttl: 600signers:  - public: '{{key:from}}'    caps:      - name: 'coin.TRANSFER'        args: ['{{{account:from}}}', '{{{account:to}}}', {{decimal:amount}}]      - name: 'coin.GAS'        args: []networkId: '{{network:networkId}}'type: exec

This template exemplifies how variables and prefixes guide users in providing the correct types of input values, significantly reducing the potential for errors when the CLI is operated in its interactive mode. In this mode, the prefixes play a crucial role in prompting users for the specific type of information required, ensuring the accuracy and validity of the transaction data. This interactive guidance simplifies the transaction creation process, enhancing the security and reliability of the transactions constructed.

Using template variables and prefixes

Variables are a critical part of transaction templates, defining the data required to construct a transaction. Users can be prompted for variables missing from the --template-data file or not provided as command-line options. The --holes option is particularly useful for identifying all the variables a template requires.

Variables support specific prefixes (account:, key:, network:, decimal:) to facilitate the correct selection or validation of input values in interactive mode.

account: This prefix is used for variables that should be filled with an account name, guiding users to input valid Kadena account identifiers.

key: Variables with this prefix expect a public key, ensuring that users provide cryptographic keys in the correct format.

network: This prefix is used for specifying the network ID, helping users to select the appropriate network for their transaction.

decimal: For variables that involve numerical values with decimal points, this prefix ensures the format and precision of the input.

In contrast, when operating in non-interactive mode, the system relies on options passed directly via the command line. In this scenario, the values for the transaction are provided as options, and the prefixes are ignored. This means that the responsibility for ensuring the correctness and appropriateness of the input values shifts entirely to the user. It's crucial for users to be mindful of the data types and formats expected by the template to avoid errors. This method allows for a more streamlined and automated approach to transaction creation, suitable for users who prefer script-based automation or who are running the CLI in environments where interactive prompts are not feasible.

Using data files as template data sources.

Below is a YAML example data.yaml for transfer.yaml that outlines the structure for a template data file.

yaml
account-from: ''account-to: ''decimal-amount: ''chain-id: ''pk-from: ''network-id: ''
yaml
account-from: ''account-to: ''decimal-amount: ''chain-id: ''pk-from: ''network-id: ''

Example Command

kadena tx add  --template-data="data.yaml"

kadena tx sign [options]

OptionsDescriptionRequired
--tx-sign-withProvide signing method "wallet" or "keyPairYes
--wallet-nameProvide the name of the wallet
--password-fileFilepath to the password fileYes
--key-pairs Key pairs as string publicKey=xxx,secretKey=xxx(;publicKey=xxx,secretKey=xxx)
--tx-unsigned-transaction-filesProvided unsigned transaction file(s) to sign (or comma separated list)Yes
--legacyOutput legacy format

Examples

kadena tx sign --tx-sign-with="wallett" --wallet-name="testwallet" --tx-unsigned-transaction-files="transaction-(request-key)-signed.json"

password will be hidden after entry: --security-password=*

kadena tx test-signed-transaction [options]

Testing a signed transaction for its viability against a specified network by making a Local call. Using the local API endpoints, you can dry-run Pact smart contracts using actual data in the coin contract tables. This is perfect for checking the viability of your transactions / smart contracts, as well as to check account data without necessarily having to spend tokens.

OptionsDescriptionRequired
--tx-transaction-networkName of the network to be used (overwrites network choice in transactions)
--directoryProvide the directory for the signed transaction (defaults to working directory)
--tx-signed-transaction-filesProvided signed transaction file(s) to sign (or comma separated list)Yes

Examples

kadena tx test-signed-transaction --tx-signed-transaction-files="transaction-(request-key)-signed.json"

kadena tx send [options]

OptionsDescriptionRequired
--directory Config file directory path (default: working directory)
--tx-signed-transaction-filesProvided signed transaction file(s) to sign (or comma separated list)Yes
--tx-transaction-networkKadena network (overwrites network choice in transactions)
--pollPoll status of sent transactions

Examples

kadena tx send --tx-signed-transaction-files="transaction-I4WaMUwQZDxhaf2r2FZj0TQf7Zv1J5v45Yc2MYxPURU-signed.json"  --poll

kadena tx status [options]

The kadena tx status command is used to retrieve the status of a transaction on the Kadena blockchain. By providing a transaction request key and specifying the network and chain id, users can query the current state of their transactions. This command supports additional options for polling, allowing for real-time status updates until the transaction is finalized.

OptionsDescriptionRequired
--request-keyProvide a transaction request keyYes
--networkSelect name of the network where transaction happenedYes
(e.g. "mainnet, testnet, devnet, ...")
--chain-idChain to be used in the transactionYes
--pollPoll status to get transaction detailsYes

To check the status of a transaction, use the following command:

kadena tx status --request-key="118mEpX1-6NpJT1kArsWIHHVtJaOERQOeEwNoouOSGU" --network="testnet" --chain-id="0"

This will return the current status of the transaction identified by the provided request key.

With Polling: To continuously monitor the status of a transaction until it is finalized, add the --poll option:

kadena tx status --request-key="118mEpX1-6NpJT1kArsWIHHVtJaOERQOeEwNoouOSGU" --network="testnet" --chain-id="0" --poll

Polling checks the transaction status in real-time and will keep running until the transaction is confirmed.

The default timeout for polling is 60 seconds, but it will attempt to keep polling until confirmation is achieved.

kadena tx list

Example:

kadena tx list

kadena dapp

Tool for creating dapp projects

SubcommandDescription
addadd a new Dapp project

kadena dapp add <arguments> [options]

ArgumentsDescriptionRequired
project-directorySpecify the project directory [Required]yes
OptionsDescriptionRequired
--dapp-templateSelect template: vuejs, nextjs, angularYes

Examples

kadena dapp add --dapp-template="vuejs" kadena-dapp

Supported templates

It supports a number of well known and widely used frameworks to choose from when starting a new project. The following project templates are currently available: