1What removevault does (and does not)
removevault is the manager's "forget this vault". The wallet stops tracking the vault script, stops counting its coins as stakable, and stops staking them. That is all.
- It sends no transaction and moves no coins. The owner's coins stay in the vault on the chain.
- It does not notify the owner. The owner's wallet still shows the vault; it just earns nothing until a manager adds it again.
- It cannot be used by a manager to take anything.
2When to use it
- The owner reclaimed everything and you want a clean
getcoinavailability. - You are retiring a staking machine and want it to stop trying to stake vaults it no longer should (see move a vault to a new manager).
- You added the wrong encoding and need to remove it.
3IronDivi: removevault
Like Divi Core, IronDivi 0.2.6 needs only the encoding. You may add the funding txid as a second argument; it is then echoed back as tx_hash:
irondivi-cli --testnet removevault "yHZ7CNR7ArAMpgS9TnfH3Jf32knX56gLSw:y9ftHaoaJrp23wTjV2mHqxtT7Ni6jfUzXB"
{
"message": "Vault yHZ7CNR7ArAMpgS9TnfH3Jf32knX56gLSw:y9ftHaoaJrp23wTjV2mHqxtT7Ni6jfUzXB removed successfully",
"removal_status": true,
"result": "success"
}
On the manager wallet, getcoinavailability went from Stakable 57.99994 to 47.99994 with total_vaults 0: only the manager's own coins are left, and listunspent lists only those. These outputs are from IronDivi 0.2.6 on regtest, a private test chain.
Errors you can hit:
# a vault this wallet never added
error code: -4: Vault yC9j…RVF4:yC9j…RVF4 not found in wallet
# no colon
error code: -8: Could not parse vault encoding!
4divi-cli: removevault
Divi Core takes only the encoding and removes the whole script, every funding output included:
divi-cli -testnet removevault "y3kSaibA98YDgLyoxnbXca69uLzBxjAYga:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc" { "removal_status" : true } divi-cli -testnet getcoinavailability { "Vaulted" : 0.00000000, "Stakable" : 109.99995040, ← was 159.99995040 with the 50-coin vault "Spendable" : 9.99995040 }
removal_status is false when the wallet never had that vault (per rpcwallet.cpp; we did not make it happen). An encoding without a colon gets Could not parse vault encoding! and a bad address Vault Registry Failed: Invalid manager/owner DIVI address, the same checks as addvault.
5Divi Desktop debug console
removevault "y3kSaibA98YDgLyoxnbXca69uLzBxjAYga:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc"
Same reply as divi-cli. Divi Desktop needs vault=1 in divi.conf to have added the vault in the first place.
6BoxWallet
~/.boxwallet/divi-cli -testnet removevault "owner:manager"
7Undo: add it back
Because nothing happened on the chain, undo is just addvault with the original funding txid. On Divi Core the balance returns immediately:
divi-cli -testnet addvault "y3kSaibA98YDgLyoxnbXca69uLzBxjAYga:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc" 3d564b50e7057ad7eb2b73aea5a276ca4d9c76899a66d99b7366e89dd297b45a { "succeeded" : true } divi-cli -testnet getcoinavailability { "Vaulted" : 0.00000000, "Stakable" : 159.99995040, "Spendable" : 9.99995040 }
Trouble
| You see | Means | Do |
|---|---|---|
| removal_status false (Divi Core) | Vault not registered here | Check getcoinavailability true |
| Vault … not found in wallet (IronDivi) | Encoding or txid does not match what was added | Copy both from getcoinavailability true |
Still stuck? Ask the Divi chatbot.