Tutorial · Vaults · Testnet

Fund a Vault

fundvault with IronDivi, divi-cli, the Divi Desktop debug console and BoxWallet: the plain form, manager-only form, JSON with repetitions, and what each error means.

About 15 minutes · Checked 2026-10-21

1Before you start

You need the vault encoding owner:manager from the create a vault tutorial, and enough confirmed testnet coins in the owner wallet to cover the amount plus a fee of a few thousandths of a tDIVI. The owner wallet must be unlocked if it is encrypted.

fundvault is an owner-side command: it spends coins your wallet already holds into a new vault output. The manager does not need to be online, and nothing on the manager's side changes until it runs addvault.

One rule

Whichever address you put before the colon is the one that can take the coins back. Double-check it is yours. A vault whose owner address belongs to someone else is a gift.

2IronDivi: fundvault

IronDivi takes exactly two arguments: the encoding and the amount. It prints just the transaction id.

irondivi-cli --testnet fundvault "yC9jjkQGrQnZFExYR8UYgjCpJeD7gJRVF4:y3D2yvmLTwP3Jatsbs7GnqNzEEzkUmSi2a" 200
688c9620cd9191ed571eda04668cd550fd50d8325e0c574a23ae53be9e602f23

Keep that id: the manager needs it for addvault. Things IronDivi does not accept, each with its exact error:

# manager address only (Divi Core would auto-create an owner; IronDivi refuses)
irondivi-cli --testnet fundvault y3D2yvmLTwP3Jatsbs7GnqNzEEzkUmSi2a 10
error code: -1: Owner address is required for funding vault. Use format: owner_address:manager_address

# JSON form
irondivi-cli --testnet fundvault '{"yC9j…RVF4:y3D2…Si2a":5}'
error code: -1: Missing required parameter: [owner_address:]manager_address

# no amount
error code: -1: Missing required parameter: amount

# more than you have
error code: -6: Insufficient funds. Have 0 DIVI, need 99999.00002 DIVI
IronDivi owner wallets and the vault balance

After the funding transaction confirms, an IronDivi owner wallet that does not also hold the manager key shows the vault with "balance": 0.0 in getcoinavailability, and reclaimvaultfunds says No vault funds available to reclaim. The coins are safe on the chain and a Divi Core wallet with the same owner key sees them. This is an IronDivi 0.2.6 limitation; see the reclaim tutorial for the workaround.

3divi-cli: fundvault and its three input forms

Divi Core prints the transaction hash and echoes the encoding it used.

divi-cli -testnet fundvault "y8PL1RQSCWYPnJAvhvs6ZwkxfwuB5Ut5Aj:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc" 100
{
    "txhash" : "4fdd0defe9560a7d8cb9444be9a7dd839ef962d18703a5825a2021c05d9c1645",
    "vault" : [
        {
            "encoding" : "y8PL1RQSCWYPnJAvhvs6ZwkxfwuB5Ut5Aj:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc"
        }
    ]
}

Manager only: let the wallet pick an owner address

Give only the manager address and Divi Core creates a new owner address in your wallet. The encoding it prints is the one to save; you would not otherwise know the owner half.

divi-cli -testnet fundvault yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc 50
{
    "txhash" : "3d564b50e7057ad7eb2b73aea5a276ca4d9c76899a66d99b7366e89dd297b45a",
    "vault" : [ { "encoding" : "y3kSaibA98YDgLyoxnbXca69uLzBxjAYga:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc" } ]
}

JSON: several vault outputs in one transaction

A JSON object keyed by encoding funds one or more vaults at once. The value is either a plain amount, or an object with amount and repetitions (both required in that form). Repetitions makes several equal outputs, which helps staking because each output stakes separately.

divi-cli -testnet fundvault '{"y8PL1RQSCWYPnJAvhvs6ZwkxfwuB5Ut5Aj:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc":5}'
{ "txhash" : "a7d724bf52ec79e58670eb348d127d8b62589e9b97fae982c3ea40a8d790553d", … }

divi-cli -testnet fundvault '{"y8PL1RQSCWYPnJAvhvs6ZwkxfwuB5Ut5Aj:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc":{"amount":10,"repetitions":2}}'
{ "txhash" : "6f874bed0b8f366feb88ebd172963532f5194d46366190df3de628102516dd56", … }

The 10 × 2 transaction has two 10 tDIVI vault outputs. The errors for a wrong JSON value are exact and useful:

"…":"ten"                           → error code -8: Unknown json input. Unable to parse input for y8PL…:yF5g…
"…":{"amount":"ten","repetitions":1} → error code -8: Unable to parse amount for: y8PL…:yF5g…
"…":{"amount":1}                     → error code -8: Unable to parse repetitions for: y8PL…:yF5g…

Self-managed vault

Give your own address as manager and Divi Core makes a vault you both own and stake (it picks a fresh owner address). Useful for testing the owner-side commands without a second wallet.

divi-cli -testnet fundvault y8PL1RQSCWYPnJAvhvs6ZwkxfwuB5Ut5Aj 1
{ "txhash" : "23b896649fd96a274856b16316563c020f4699e542a3afb704b11996166960cf",
  "vault" : [ { "encoding" : "y2VGToyhX5iqP3udiaAKpyPULsk9CuRX2n:y8PL1RQSCWYPnJAvhvs6ZwkxfwuB5Ut5Aj" } ] }

4Divi Desktop debug console

Divi Desktop runs a Divi Core node, so its debug console accepts the divi-cli commands above without the divi-cli -testnet prefix. First switch to testnet: Settings → Advanced mode on → Network → Testnet → Save. Then open the Debug Console from the status bar, unlock the wallet, and type:

fundvault "y8PL1RQSCWYPnJAvhvs6ZwkxfwuB5Ut5Aj:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc" 100

The console shows the same JSON reply. Copy the txhash line for the manager. Divi Desktop's Send screen will not show vault coins as spendable afterwards, which is correct: they belong to the vault now.

5BoxWallet

BoxWallet installs Divi Core into ~/.boxwallet; it has no vault menu. Use its CLI directly with the divi-cli commands from step 3:

~/.boxwallet/divi-cli -testnet fundvault "owner:manager" 100

6What your wallet shows afterwards

Run getcoinavailability on the owner wallet. Until the funding transaction confirms it may show the coins as neither spendable nor vaulted; wait one block (about a minute on testnet).

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

On Divi Core the owner wallet shows Vaulted : 0.00000000 as well: the owner wallet does not count the vault as its own balance, because staking them is the manager's job. Your spendable balance drops by the amount plus fee, and reclaimvaultfunds still works from the owner wallet on Divi Core. Add true to list each vault with its funding txids:

divi-cli -testnet getcoinavailability true

7Find it in the explorer

Open the transaction in Explorer 2.0 (testnet). One output has type vault and lists both addresses: 4fdd0def…1645 ↗. The IronDivi example is 688c9620…2f23 ↗. The other output is your change back to a plain address.

Trouble

You seeMeansDo
Invalid owner DIVI address / Invalid manager DIVI address (-5)Bad half of the encodingFix the address
Invalid amount (-3)Zero, negative, or absurdly large amountUse a positive amount you hold
Insufficient funds (-6)Not enough confirmed coinsWait for confirmations or lower the amount
The help text instead of a result (-1)Amount missingAdd the amount
Owner address is required (IronDivi)Only a manager address givenUse owner:manager

More in the vault errors tutorial. Next: add the vault to the manager's wallet. Still stuck? Ask the Divi chatbot.