Using Provenanced
Using the `provenanced` binary as a blockchain client.
To get started with Provenance Blockchain you first need to install Provenance Blockchain and have access to a Provenance Blockchain node.
See Installing Provenance Blockchain if you have not installedprovenanced.
See Running a Node if you do not have access to a node or do not want to connect to a publicly available node.


~$ provenanced --help
Provenance Blockchain App
provenanced [command]
Available Commands:
add-genesis-account Add a genesis account to genesis.json
add-genesis-marker Adds a marker to genesis.json
add-genesis-root-name Add a name binding to genesis.json
collect-gentxs Collect genesis txs and output a genesis.json file
debug Tool for helping with debugging your application
export Export state to JSON
gentx Generate a genesis tx carrying a self delegation
help Help about any command
init Initialize files for a Provenance Blockchain daemon node
keys Manage your application's keys
migrate Migrate genesis to a specified target version
query Querying subcommands
start Run the full node
status Query remote node for status
tendermint Tendermint subcommands
testnet Initialize files for a simapp testnet
tx Transactions subcommands
unsafe-reset-all Resets the blockchain database, removes address book files, and resets data/priv_validator_state.json to the genesis state
validate-genesis validates the genesis file at the default location or at the location passed as an arg
version Print the application binary version information
-h, --help help for provenanced
--home string directory for config and data (default "/Users/mconroy/Library/Application Support/Provenance")
--log_format string The logging format (json|plain) (default "plain")
--log_level string The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
-t, --testnet Indicates this command should use the testnet configuration (default: false [mainnet])
--trace print out full stack trace on errors
Use "provenanced [command] --help" for more information about a command.
Commands used throughout these examples will use some consistent flags that are worth noting.
--testnet to use testnet rather than mainnet
--chain-id pio-testnet-1 assumes that we are connected to the Provenance Blockchain testnet
--node tcp://localhost:26657 this is the default node location and port. In the examples below, we'll connect to a remote node without starting a local node. The remote node is a public testnet node hosted at
The provenanced binary provides a command-line interface to create and query transactions. To create a transaction requires just a few items:
  • a key pair capable of signing the transaction
  • a key pair capable of paying the gas fee
  • a blockchain node to submit the transaction to.

Creating a Key(s)

All interactions with Provenance Blockchain are secured with a public/private key pair that will act as your account(s) on the blockchain. We use the 44'/1'/0'/0/0 BIP32 path as an example where the coin-type "1" is a reference to Provenance Blockchain testnet. We use the 44'/505'/0'/0/0 BIP32 path as an example where coin-type "505" is a reference to the HASH token on Provenance Blockchain mainnet.
Refer to the Accounts section for more information HD Wallet paths.
Create a key pair and store it in a local Keyring (change <name-of-key> to a string value of your choosing):
# TESTNET (note: --hd-path "44'/1'/0'/0/0" can be used instead of coin type)
provenanced keys add <name_of_key> --coin-type=1 --testnet -i
# MAINNET (note: the default coin type is 505 for mainnet so no extra parameters are required)
provenanced keys add <name_of_key> -i
**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.
fancy solar describe long tag soul gold boost vacuum baby famous narrow drink final smoke region pulse wrap expire fabric pause giant merit bird
When generating a new key it is important to store the generated mnemonic in a safe location to be used in the event that the key needs to be restored.

Restoring a Key

This command will prompt you for a mnemonic to restore the key at a specific path.
provenanced keys add <name_of_key> -i --testnet
provenanced keys add <name_of_key> -i
> Enter your bip39 mnemonic, or hit enter to generate one.
fancy solar describe long tag soul gold boost vacuum baby famous narrow drink final smoke region pulse wrap expire fabric pause giant merit bird
> Enter your bip39 passphrase. This is combined with the mnemonic to derive the seed. Most users should just hit enter to use the default, ""
- name: <name_of_key>
type: local
address: tp1gn8jlv9krqe23ql3ltq0ajcwwf7dyaq6uuludl
pubkey: tppub1addwnpepqd4tpv506lhl3j8hux0ss8km84gwmgapjtuea9wzt8z8n9eqjrjxg897tw0
mnemonic: ""
threshold: 0
pubkeys: []
> Enter your bip39 passphrase. This is combined with the mnemonic to derive the seed. Most users should just hit enter to use the default, ""
- name: <name_of_key>
type: local
address: pb1jd9yey59p6e70wp68ufltx8eh2xvxphqwhzcm9
pubkey: pbpub1addwnpepqfftn6g0p5hs94tp7f4h4d8tkpkjmx87nzxwmmclz89gfdtqfhstv9qd5s8
mnemonic: ""
threshold: 0
pubkeys: []

Getting Hash

Hash is the digital currency used to transact on the Provenance Blockchain. In order to execute any commands beyond basic queries against a node, you'll need Hash. On testnet receiving Hash is as easy as accessing the Provenance Blockchain Faucet and supplying your address. This small distribution of Hash on testnet allows you to develop against the public testnet as well as quickly get a feel for how the Provenance Blockchain ecosystem operates.
The address associated to your key pair is a Bech32 address which is an encoded value of the public key portion of our key pair. Provenance Blockchain testnet Bech32 addresses begin with tp whereas mainnet addresses begin with pb.
Once we transferred Hash to our Bech32 address, it became a Provenance Blockchain account.
First, find the Bech32 address of the key created in the previous section:
provenanced --testnet keys show <name-of-key>
The output will show the address of your key:
- name: <name-of-key>
type: local
address: tp1cuknswnphchtkwe68t4nshcaj4l4azv9ml2qhs
pubkey: tppub1addwnpepqgxlsrgv9znqeass2al9u9h37khapuecpp0al82wqyhzvn9hwtnzwak5uf3
mnemonic: ""
threshold: 0
pubkeys: []
Copy the key address and open the Provenance Blockchain testnet Hash faucet, paste the value, and press Get Tokens:
Use the testnet Faucet to get Hash
Your address will now have enough Hash to pay gas fees. Confirm your key address has Hash:
provenanced --testnet q bank balances tp1cuknswnphchtkwe68t4nshcaj4l4azv9ml2qhs \
- amount: "1000000000"
denom: nhash
next_key: null
total: "0"
The --node flag allows us to connect our provenanced client to a node running remotely. Thus, we're connecting to a public testnet node hosted at

Using `jq` to Parse JSON Output

Using a json parsing tool is often useful for formatting data returned from provenanced commands. One way to accomplish this is to use the jq command to parse and query json data. For more info on jq see
Example provenanced command that uses jq to parse the output.


provenanced --testnet q block


provenanced --testnet q block | jq ".block.last_commit.height"
Copy link
On this page
Creating a Key(s)
Restoring a Key
Getting Hash
Using `jq` to Parse JSON Output