Tutorial · Vaults · Testnet

Add a Vault to the Manager's Wallet

The manager side: addvault with IronDivi, divi-cli (vault=1 first), the Divi Desktop debug console and BoxWallet, and how to confirm the coins are staking.

About 10 minutes · Checked 2026-10-21

1What addvault does and does not do

addvault is the manager's command. The owner has already put coins into a vault script on the chain with fundvault. The manager's wallet has the manager key but knows nothing about that transaction. addvault hands it the vault encoding and the funding txid; the wallet rebuilds the vault script, finds the funding output in that transaction, and from then on counts it as stakable.

2What the manager needs from the owner

ItemExample
The vault encoding (owner:manager)yC9jjkQGrQnZFExYR8UYgjCpJeD7gJRVF4:y3D2yvmLTwP3Jatsbs7GnqNzEEzkUmSi2a
The funding transaction id688c9620cd9191ed571eda04668cd550fd50d8325e0c574a23ae53be9e602f23

Both are public. The funding transaction must be confirmed (one block on testnet). The manager wallet must be unlocked for staking.

3IronDivi: addvault

irondivi-cli --testnet addvault "yC9jjkQGrQnZFExYR8UYgjCpJeD7gJRVF4:y3D2yvmLTwP3Jatsbs7GnqNzEEzkUmSi2a" 688c9620cd9191ed571eda04668cd550fd50d8325e0c574a23ae53be9e602f23
{
  "message": "Vault yC9jjkQGrQnZFExYR8UYgjCpJeD7gJRVF4:y3D2yvmLTwP3Jatsbs7GnqNzEEzkUmSi2a added successfully",
  "result": "success"
}

irondivi-cli --testnet getcoinavailability
{
  "Spendable": 50.0,
  "Stakable": 50.0,
  "Vaulted": 200.0,
  "total_vaults": 1,
  "vaults": [ { "balance": 200.0, "balance_sat": 20000000000, "manager": "y3D2…Si2a", "owner": "yC9j…RVF4" } ]
}

The 50 is the manager's own coins; the 200 is the owner's vault. IronDivi lists vault coins under Vaulted, not Stakable, but getstakingstatus shows "staking_balance": 250.0, so both are being staked.

IronDivi's errors when something is off:

# only the manager address
error code: -1: Owner address is required. Use format: owner_address:manager_address

# txid missing
error code: -1: Missing required parameter: funding_txhash

# txid is not a hash
error code: -1: Invalid transaction ID: notahash

# txid is real but has no output paying this vault script
error code: -4: Transaction <txid> does not pay to the specified vault script
Do not add a vault output that has already been spent

IronDivi 0.2.6 does not check whether the funding output is still unspent. If the owner has already reclaimed it, addvault still says success, the wallet shows a balance that does not exist, and any stake it tries with that output will be rejected by the network. Check the funding transaction in the explorer first: the vault output must have no "spent" marker.

4divi-cli: vault=1, then addvault

A Divi Core manager must start with vault=1 in divi.conf. Without it, addvault fails with AddingVaultScript: Unable to sync TX! even though everything else is right. Add the line, restart the node, then:

divi-cli -testnet addvault "y8PL1RQSCWYPnJAvhvs6ZwkxfwuB5Ut5Aj:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc" 4fdd0defe9560a7d8cb9444be9a7dd839ef962d18703a5825a2021c05d9c1645
{
    "succeeded" : true
}

divi-cli -testnet getcoinavailability
{
    "Vaulted" : 0.00000000,
    "Stakable" : 109.99995040,
    "Spendable" : 9.99995040
}

Divi Core counts the vault under Stakable (100 from the vault plus the manager's own 9.99) and keeps Vaulted at zero on the manager side. getcoinavailability true lists the vault under Stakable.AllVaults with its txids.

Divi Core checks, in this order: the encoding has a colon (Could not parse vault encoding!), both addresses parse (Vault Registry Failed: Invalid manager/owner DIVI address), the manager key is in this wallet (AddingVaultScript: Does not have matching manager key!), and the transaction exists (otherwise "succeeded": false with no message).

5Divi Desktop debug console

Divi Desktop can act as a manager, but it needs the same vault=1 line in its divi.conf (in the Divi data folder, next to the wallet). Add it, restart Divi Desktop on testnet (Settings → Advanced mode → Network → Testnet), open the Debug Console, unlock, and type:

addvault "y8PL1RQSCWYPnJAvhvs6ZwkxfwuB5Ut5Aj:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc" 4fdd0defe9560a7d8cb9444be9a7dd839ef962d18703a5825a2021c05d9c1645

Staking must be on in Divi Desktop for the vault to earn anything. The vault coins will not show in the Desktop balance; use getcoinavailability in the console.

6BoxWallet

BoxWallet runs Divi Core, so add vault=1 to the divi.conf it created, restart the daemon from BoxWallet, and run the divi-cli command from step 4 with ~/.boxwallet/divi-cli -testnet.

7Verify it is staking

irondivi-cli --testnet getstakingstatus
{
  "enoughcoins": true,
  "haveconnections": true,
  "mintablecoins": true,
  "staking status": true,
  "staking status text": "Staking Active",
  "staking_balance": 250.0,
  "walletunlocked": true
}

The same command on Divi Core shows "staking_balance" : 159.99995040 after two vaults were added. If walletunlocked is false, unlock for staking only: walletpassphrase "<passphrase>" 0 true on Divi Core. The staking service tutorial covers running this for other people.

Trouble

You seeMeansDo
AddingVaultScript: Unable to sync TX! (Divi Core)No vault=1 in divi.confAdd it, restart, repeat
AddingVaultScript: Does not have matching manager key!This wallet does not hold the manager address. Often the owner ran the command by mistakeRun it on the manager wallet
"succeeded": false (Divi Core)Transaction not found, or not confirmed yetCheck the txid; wait a block
Transaction … does not pay to the specified vault script (IronDivi)Encoding and txid do not matchCompare with the explorer's vault output addresses
Vaulted stays 0 on IronDivi after successFunding not confirmedWait a block, check again

More in the vault errors tutorial. Still stuck? Ask the Divi chatbot.