Tutorial · Vaults · Testnet

Create a Vault

Pick an owner address, get a manager address, build the owner:manager encoding, and fund it. Why addvault is the manager's step, not yours.

About 15 minutes · Checked 2026-10-21

1The order of events

Creating a vault is three steps across two wallets. The confusingly named RPC command addvault is the last step, run by the manager, not the first.

  1. Owner picks an owner address (any address in the owner wallet) and asks the staking node for its manager address.
  2. Owner runs fundvault "owner:manager" amount. That transaction creates the vault on the chain.
  3. Manager runs addvault "owner:manager" txid so its wallet starts staking the coins.

This page covers step 1 and the encoding, and shows the commands for steps 2 and 3 briefly. The full versions are the fund a vault and add a vault to the manager's wallet tutorials.

What you need

Two wallets on testnet: one you will call owner with some tDIVI (the faucet gives 1,000), and one you will call manager, which can be empty. They can be on the same machine for practice. For a real vault they should be on different machines so that the owner key is never on the staking box.

2Pick the owner address

Any address whose private key is in the owner wallet works. Make a fresh one so you can recognise it later.

IronDivi

irondivi-cli --testnet getnewaddress
yC9jjkQGrQnZFExYR8UYgjCpJeD7gJRVF4

divi-cli

divi-cli -testnet getnewaddress
y8PL1RQSCWYPnJAvhvs6ZwkxfwuB5Ut5Aj

Divi Desktop debug console

getnewaddress

Testnet addresses start with x or y; mainnet ones start with D. If you see a D address you are on mainnet, so stop and switch to testnet first.

3Get the manager address from the staking node

Run the same command on the manager wallet. If a staking service is managing for you, they send you this address; you never need their key.

IronDivi

irondivi-cli --testnet getnewaddress
y3D2yvmLTwP3Jatsbs7GnqNzEEzkUmSi2a

divi-cli

A Divi Core manager also needs vault=1 in its divi.conf before it can accept vaults. Add that line and restart the node now, so step 6 does not fail.

divi-cli -testnet getnewaddress
yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc

Divi Desktop debug console

getnewaddress
Validate what you were sent

Before using an address someone gave you, check it parses: validateaddress <address> prints "isvalid": true on both IronDivi and Divi Core. A typo here means your coins fund a vault nobody can stake, although you can still reclaim them because you hold the owner key.

4Build the vault encoding

Join the two addresses with a colon, owner first, no spaces:

y8PL1RQSCWYPnJAvhvs6ZwkxfwuB5Ut5Aj:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc

That string is the vault's name everywhere: in fundvault, addvault, debitvaultbyname and removevault. Write it down. Order matters: manager:owner would make the staking node the owner of your coins.

Divi Core also accepts a JSON form, {"owner":"…","manager":"…"}, and a shortcut with only the manager address, which makes a brand-new owner address inside your wallet. IronDivi accepts only the colon form. The colon form works everywhere, so use it.

5Check the encoding before sending money

Neither node has a dry-run for fundvault, but both reject a bad encoding before building a transaction, and the error names the half that is wrong. Running fundvault with an amount of 0 is a safe probe on Divi Core:

divi-cli -testnet fundvault "y8PL1RQSCWYPnJAvhvs6ZwkxfwuB5Ut5Aj:notanaddress" 0
error code: -5
error message:
Invalid manager DIVI address

IronDivi probes the same way and reports:

irondivi-cli --testnet fundvault "yC9jjkQGrQnZFExYR8UYgjCpJeD7gJRVF4:abc" 1
error code: -1: Invalid Divi address: address not found: Invalid address length: 3

With a correct encoding Divi Core answers Invalid amount to the 0, which tells you both addresses passed. IronDivi does not have the zero-amount trick, so check both halves with validateaddress instead.

6Fund it, then let the manager add it

On the owner wallet, with the encoding and an amount in tDIVI (full detail in the funding tutorial):

# IronDivi (prints the txid)
irondivi-cli --testnet fundvault "yC9jjkQGrQnZFExYR8UYgjCpJeD7gJRVF4:y3D2yvmLTwP3Jatsbs7GnqNzEEzkUmSi2a" 200
688c9620cd9191ed571eda04668cd550fd50d8325e0c574a23ae53be9e602f23

# divi-cli or the Divi Desktop debug console (prints txhash and the encoding)
divi-cli -testnet fundvault "y8PL1RQSCWYPnJAvhvs6ZwkxfwuB5Ut5Aj:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc" 100
{
  "txhash": "4fdd0defe9560a7d8cb9444be9a7dd839ef962d18703a5825a2021c05d9c1645",
  "vault": [ { "encoding": "y8PL1RQSCWYPnJAvhvs6ZwkxfwuB5Ut5Aj:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc" } ]
}

Send the txid to the manager. On the manager wallet (full detail in the manager tutorial):

# IronDivi
irondivi-cli --testnet addvault "yC9jjkQGrQnZFExYR8UYgjCpJeD7gJRVF4:y3D2yvmLTwP3Jatsbs7GnqNzEEzkUmSi2a" 688c9620…f23
{ "message": "Vault yC9j…:y3D2… added successfully", "result": "success" }

# divi-cli / Divi Desktop debug console
divi-cli -testnet addvault "y8PL1RQSCWYPnJAvhvs6ZwkxfwuB5Ut5Aj:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc" 4fdd0def…1645
{ "succeeded": true }

The vault now exists on the chain and the manager is staking it. Check with getcoinavailability on the manager: the amount appears under Vaulted.

BoxWallet

BoxWallet has no vault menu. Use the divi-cli it installed under ~/.boxwallet with the divi-cli commands on this page.

Trouble

You seeMeansDo
Invalid owner DIVI address / Invalid manager DIVI addressThat half of the encoding is not a valid address on this networkRe-copy the address; check testnet vs mainnet
Owner address is required. Use format: owner_address:manager_address (IronDivi)Only one address was givenIronDivi needs the full owner:manager form
AddingVaultScript: Unable to sync TX! (Divi Core manager)vault=1 is missing from divi.confAdd it, restart, run addvault again
Manager address shows a DManager node is on mainnetBoth wallets must be on the same network

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