## Coin Control¶

Coin Control allows users of the Dash Core Wallet to specify which addresses and Unspent Transaction Outputs (UTXOs) should be used as inputs in transactions. This allows you to keep a specific balance on certain addresses in your wallet, while spending others freely. In Dash Core Wallet, click Settings > Options > Wallet > Enable coin control features. Now, when you go to the Send tab in your wallet, a new button labelled Inputs… will appear. Click this button to select which UTXOs can be used as input for any transactions you create. The following window appears:

Right click on the transaction(s) you do not want to spend, then select Lock unspent. A small lock will appear next to the transaction. You can click the Toggle lock state button to invert the locked/unlocked state of all UTXOs. When you are ready to continue, click OK. You can now safely create transactions with your remaining funds without affecting the locked UTXOs.

## Multisignature¶

This section presents a worked example to demonstrate multisig functionality in Dash Core. While the transactions are no longer visible on the current testnet blockchain and some address formats or RPC responses may differ slightly from the version shown here, the principle and commands are the same. The example demonstrates how to set up a 2-of-3 multisig address and create a transaction. The example parties involved are a buyer, a seller and an arbiter. This example is based on:

### Step 1: Create three addresses¶

Seller:

seller@testnet03:~$./dash-cli getnewaddress n18cPEtj4ZfToPZxRszUz2XPts4eGsxiPk seller@testnet03:~$ ./dash-cli validateaddress n18cPEtj4ZfToPZxRszUz2XPts4eGsxiPk
{
"isvalid" : true,
"ismine" : true,
"isscript" : false,
"pubkey" : "02a862b412ff9e3afd01a2873a02622897f6df92e3fc85597788b898309fec882e",
"iscompressed" : true,
"account" : ""
}
seller@testnet03:~$./dash-cli dumpprivkey n18cPEtj4ZfToPZxRszUz2XPts4eGsxiPk cVQVgBr8sW4FTPYz16BSCo1PcAfDhpJArgMPdLxKZQWcVFwMXRXx  Buyer: buyer@testnet03:~$ ./dash-cli getnewaddress
mp5orHuaFaHCXFSCeYvUPL7H16JU8fKG6u
buyer@testnet03:~$./dash-cli validateaddress mp5orHuaFaHCXFSCeYvUPL7H16JU8fKG6u { "isvalid" : true, "address" : "mp5orHuaFaHCXFSCeYvUPL7H16JU8fKG6u", "ismine" : true, "isscript" : false, "pubkey" : "0315617694c9d93f0ce92769e050a6868ffc74d229077379c0af8bfb193c3d351c", "iscompressed" : true, "account" : "" } buyer@testnet03:~$ ./dash-cli dumpprivkey mp5orHuaFaHCXFSCeYvUPL7H16JU8fKG6u
cP9DFmEDb11waWbQ8eG1YUoZCGe59BBxJF3kk95PTMXuG9HzcxnU


Arbiter:

arbiter@testnet03:~$./dash-cli getnewaddress n1cZSyQXhach5rrj2tm5wg6JC7uZ3qPNiN arbiter@testnet03:~$ ./dash-cli validateaddress n1cZSyQXhach5rrj2tm5wg6JC7uZ3qPNiN
{
"isvalid" : true,
"ismine" : true,
"isscript" : false,
"pubkey" : "0287ce6cf69b85593ce7db801874c9a2fb1b653dbe5dd9ebfa73e98b710af9e9ce",
"iscompressed" : true,
"account" : ""
}
arbiter@testnet03:~$./dash-cli dumpprivkey n1cZSyQXhach5rrj2tm5wg6JC7uZ3qPNiN cUbDFL81a2w6urAGZf7ecGbdzM82pdHLeCaPXdDp71s96SzDV49M  This results in three keypairs (public/private): seller: 02a862b412ff9e3afd01a2873a02622897f6df92e3fc85597788b898309fec882e / cVQVgBr8sW4FTPYz16BSCo1PcAfDhpJArgMPdLxKZQWcVFwMXRXx buyer: 0315617694c9d93f0ce92769e050a6868ffc74d229077379c0af8bfb193c3d351c / cP9DFmEDb11waWbQ8eG1YUoZCGe59BBxJF3kk95PTMXuG9HzcxnU arbiter: 0287ce6cf69b85593ce7db801874c9a2fb1b653dbe5dd9ebfa73e98b710af9e9ce / cUbDFL81a2w6urAGZf7ecGbdzM82pdHLeCaPXdDp71s96SzDV49M  ### Step 2: Create multisig address¶ The createmultisig command takes as variables the number n signatures of m keys (supplied as json array) required. In this example, 2 of 3 keys are required to sign the transaction. Note: The address can be created by anyone, as long as the public keys and their sequence are known (resulting address and redeemScript are identical, see below). Seller: seller@testnet03:~$ ./dash-cli createmultisig 2 '["02a862b412ff9e3afd01a2873a02622897f6df92e3fc85597788b898309fec882e","0315617694c9d93f0ce92769e050a6868ffc74d229077379c0af8bfb193c3d351c","0287ce6cf69b85593ce7db801874c9a2fb1b653dbe5dd9ebfa73e98b710af9e9ce"]'
{
"redeemScript" : "522102a862b412ff9e3afd01a2873a02622897f6df92e3fc85597788b898309fec882e210315617694c9d93f0ce92769e050a6868ffc74d229077379c0af8bfb193c3d351c210287ce6cf69b85593ce7db801874c9a2fb1b653dbe5dd9ebfa73e98b710af9e9ce53ae"
}


buyer@testnet03:~$./dash-cli createmultisig 2 '["02a862b412ff9e3afd01a2873a02622897f6df92e3fc85597788b898309fec882e","0315617694c9d93f0ce92769e050a6868ffc74d229077379c0af8bfb193c3d351c","0287ce6cf69b85593ce7db801874c9a2fb1b653dbe5dd9ebfa73e98b710af9e9ce"]' { "address" : "2MuEQCZh7VB8pNrT4bj1CFZQh2oK7XZYLQf", "redeemScript" : "522102a862b412ff9e3afd01a2873a02622897f6df92e3fc85597788b898309fec882e210315617694c9d93f0ce92769e050a6868ffc74d229077379c0af8bfb193c3d351c210287ce6cf69b85593ce7db801874c9a2fb1b653dbe5dd9ebfa73e98b710af9e9ce53ae" }  Arbiter: arbiter@testnet03:~$ ./dash-cli createmultisig 2 '["02a862b412ff9e3afd01a2873a02622897f6df92e3fc85597788b898309fec882e","0315617694c9d93f0ce92769e050a6868ffc74d229077379c0af8bfb193c3d351c","0287ce6cf69b85593ce7db801874c9a2fb1b653dbe5dd9ebfa73e98b710af9e9ce"]'
{
"redeemScript" : "522102a862b412ff9e3afd01a2873a02622897f6df92e3fc85597788b898309fec882e210315617694c9d93f0ce92769e050a6868ffc74d229077379c0af8bfb193c3d351c210287ce6cf69b85593ce7db801874c9a2fb1b653dbe5dd9ebfa73e98b710af9e9ce53ae"
}


This works the same as a usual transaction.

buyer@testnet03:~$./dash-cli sendtoaddress 2MuEQCZh7VB8pNrT4bj1CFZQh2oK7XZYLQf 777.77 a8b3bf5bcace91a8dbbddbf9b7eb027efb9bd001792f043ecf7b558aaa3cb951  The seller/arbiter can trace the transaction by its txid in the block explorer. Or from the console as follows. Buyer: seller@testnet03:~$ ./dash-cli getrawtransaction a8b3bf5bcace91a8dbbddbf9b7eb027efb9bd001792f043ecf7b558aaa3cb951 1
{
"txid" : "a8b3bf5bcace91a8dbbddbf9b7eb027efb9bd001792f043ecf7b558aaa3cb951",
"version" : 1,
"locktime" : 0,
[...]
"vout" : [
{
"value" : 777.77000000,
"n" : 0,
"scriptPubKey" : {
"asm" : "OP_HASH160 15c85c2472f5941b60a49462a2cfd0d17ab49d1c OP_EQUAL",
"hex" : "a91415c85c2472f5941b60a49462a2cfd0d17ab49d1c87",
"reqSigs" : 1,
"type" : "scripthash",
"2MuEQCZh7VB8pNrT4bj1CFZQh2oK7XZYLQf"
]
}
},
[...]
],
"confirmations" : 3,
"time" : 1409224896,
"blocktime" : 1409224896
}


### Step 4: Spending the multisig¶

Now we assume the deal is complete, the buyer got the goods and everyone is happy. Now the seller wants to get his Dash. As a 2-of-3 multisig was used, the transaction must be signed by 2 parties (seller + buyer or arbiter). The seller creates a transaction (we will reuse his public address from above).

Seller:

seller@testnet03:~$./dash-cli createrawtransaction '[{"txid":"a8b3bf5bcace91a8dbbddbf9b7eb027efb9bd001792f043ecf7b558aaa3cb951","vout":0}]' '{"n18cPEtj4ZfToPZxRszUz2XPts4eGsxiPk":777.77}' 010000000151b93caa8a557bcf3e042f7901d09bfb7e02ebb7f9dbbddba891ceca5bbfb3a80000000000ffffffff0140d6de1b120000001976a914d728be76cd74b5d148eba2a49246b80dac12f73e88ac00000000  And partially signs it, using the redeemScript, scriptPubKey and his private key Seller: seller@testnet03:~$ ./dash-cli signrawtransaction '010000000151b93caa8a557bcf3e042f7901d09bfb7e02ebb7f9dbbddba891ceca5bbfb3a80000000000ffffffff0140d6de1b120000001976a914d728be76cd74b5d148eba2a49246b80dac12f73e88ac00000000' '[{"txid":"a8b3bf5bcace91a8dbbddbf9b7eb027efb9bd001792f043ecf7b558aaa3cb951","vout":0,"scriptPubKey":"a91415c85c2472f5941b60a49462a2cfd0d17ab49d1c87","redeemScript":"522102a862b412ff9e3afd01a2873a02622897f6df92e3fc85597788b898309fec882e210315617694c9d93f0ce92769e050a6868ffc74d229077379c0af8bfb193c3d351c210287ce6cf69b85593ce7db801874c9a2fb1b653dbe5dd9ebfa73e98b710af9e9ce53ae"}]' '["cVQVgBr8sW4FTPYz16BSCo1PcAfDhpJArgMPdLxKZQWcVFwMXRXx"]'
{
"hex" : "010000000151b93caa8a557bcf3e042f7901d09bfb7e02ebb7f9dbbddba891ceca5bbfb3a800000000b500483045022051a7f0e95a5066859ce37fe64a6e7ab6e30bfe9a68d9d3f1453064052eab5625022100c0067a33d2ee02478d89fc1a71f3a93c883db022e970886181c50ca9afc3dfa4014c69522102a862b412ff9e3afd01a2873a02622897f6df92e3fc85597788b898309fec882e210315617694c9d93f0ce92769e050a6868ffc74d229077379c0af8bfb193c3d351c210287ce6cf69b85593ce7db801874c9a2fb1b653dbe5dd9ebfa73e98b710af9e9ce53aeffffffff0140d6de1b120000001976a914d728be76cd74b5d148eba2a49246b80dac12f73e88ac00000000",
"complete" : false
}


Note that the output hex is getting longer, but complete flag is “false” as the transaction needs another signature. So now either the buyer or the arbiter can complete the signature of the transaction, using the output from above and their private key. Let’s assume the buyer is completing the signature.

buyer@testnet03:~$./dash-cli signrawtransaction '010000000151b93caa8a557bcf3e042f7901d09bfb7e02ebb7f9dbbddba891ceca5bbfb3a800000000b500483045022051a7f0e95a5066859ce37fe64a6e7ab6e30bfe9a68d9d3f1453064052eab5625022100c0067a33d2ee02478d89fc1a71f3a93c883db022e970886181c50ca9afc3dfa4014c69522102a862b412ff9e3afd01a2873a02622897f6df92e3fc85597788b898309fec882e210315617694c9d93f0ce92769e050a6868ffc74d229077379c0af8bfb193c3d351c210287ce6cf69b85593ce7db801874c9a2fb1b653dbe5dd9ebfa73e98b710af9e9ce53aeffffffff0140d6de1b120000001976a914d728be76cd74b5d148eba2a49246b80dac12f73e88ac00000000' '[{"txid":"a8b3bf5bcace91a8dbbddbf9b7eb027efb9bd001792f043ecf7b558aaa3cb951","vout":0,"scriptPubKey":"a91415c85c2472f5941b60a49462a2cfd0d17ab49d1c87","redeemScript":"522102a862b412ff9e3afd01a2873a02622897f6df92e3fc85597788b898309fec882e210315617694c9d93f0ce92769e050a6868ffc74d229077379c0af8bfb193c3d351c210287ce6cf69b85593ce7db801874c9a2fb1b653dbe5dd9ebfa73e98b710af9e9ce53ae"}]' '["cP9DFmEDb11waWbQ8eG1YUoZCGe59BBxJF3kk95PTMXuG9HzcxnU"]' { "hex" : "010000000151b93caa8a557bcf3e042f7901d09bfb7e02ebb7f9dbbddba891ceca5bbfb3a800000000fdff0000483045022051a7f0e95a5066859ce37fe64a6e7ab6e30bfe9a68d9d3f1453064052eab5625022100c0067a33d2ee02478d89fc1a71f3a93c883db022e970886181c50ca9afc3dfa401493046022100dc3f61fdb7b8ea7ec729682d355646c922f5512054c4985534e6b91040c5bd660221008b48c117ec95814f573d33bca981cb703fdd9fa6e52aa8fe67423e06cad87215014c69522102a862b412ff9e3afd01a2873a02622897f6df92e3fc85597788b898309fec882e210315617694c9d93f0ce92769e050a6868ffc74d229077379c0af8bfb193c3d351c210287ce6cf69b85593ce7db801874c9a2fb1b653dbe5dd9ebfa73e98b710af9e9ce53aeffffffff0140d6de1b120000001976a914d728be76cd74b5d148eba2a49246b80dac12f73e88ac00000000", "complete" : true }  The signature is complete now, and either of the parties can transmit the transaction to the network. Buyer: buyer@testnet03:~$ ./dash-cli sendrawtransaction 010000000151b93caa8a557bcf3e042f7901d09bfb7e02ebb7f9dbbddba891ceca5bbfb3a800000000fdff0000483045022051a7f0e95a5066859ce37fe64a6e7ab6e30bfe9a68d9d3f1453064052eab5625022100c0067a33d2ee02478d89fc1a71f3a93c883db022e970886181c50ca9afc3dfa401493046022100dc3f61fdb7b8ea7ec729682d355646c922f5512054c4985534e6b91040c5bd660221008b48c117ec95814f573d33bca981cb703fdd9fa6e52aa8fe67423e06cad87215014c69522102a862b412ff9e3afd01a2873a02622897f6df92e3fc85597788b898309fec882e210315617694c9d93f0ce92769e050a6868ffc74d229077379c0af8bfb193c3d351c210287ce6cf69b85593ce7db801874c9a2fb1b653dbe5dd9ebfa73e98b710af9e9ce53aeffffffff0140d6de1b120000001976a914d728be76cd74b5d148eba2a49246b80dac12f73e88ac00000000
cf1a75672006a05b38d94acabb783f81976c9e83a8de4da9cbec0de711cf2d71


Again, this transaction can be traced in a block explorer. And the seller is happy to receive his coins at his public address as follows.

Seller:

seller@testnet03:~\$ dash-cli listtransactions "" 1
[
{
"account" : "",
"amount" : 777.77000000,
"confirmations" : 17,
"blockindex" : 9,
"blocktime" : 1409228449,
"txid" : "cf1a75672006a05b38d94acabb783f81976c9e83a8de4da9cbec0de711cf2d71",
"time" : 1409227887,
}
]


## Multiple wallets¶

It is possible to select between different Dash wallets when starting Dash Core by specifying the wallet argument, or even run multiple instances of Dash Core simultaneously by specifying separate data directories using the datadir argument.

To begin, install the Dash Core wallet for your system according to the installation instructions. When you get to the step Running Dash Core for the first time, you can decide whether you want to maintain separate wallet.dat files in the default location (simpler if you do not need to run the wallets simultaneously), or specify entirely separate data directories such as e.g. C:\Dash1 (simpler if you do want to run the wallets simultaneously).

### Separate wallet.dat files¶

For this scenario, we will create two shortcuts on the desktop, each using a different wallet file. Navigate to the binary file used to start Dash Core (typically locatd at C:\Program Files\DashCore\dash-qt.exe or similar) and create two shortcuts on the desktop. Then open the Properties window for each of these shortcuts.

Modify the Target property of each shortcut to point to a different wallet file by specifying the wallet argument when starting the wallet. If you do not specify a wallet argument, wallet.dat will be used by default. The specified wallet file will be created if it does not exist. The following example demonstrates two wallets named workwallet.dat and homewallet.dat:

• Wallet Target 1: "C:\Program Files\DashCore\dash-qt.exe" -wallet=workwallet.dat
• Wallet Target 2: "C:\Program Files\DashCore\dash-qt.exe" -wallet=homewallet.dat

You can now use the two icons to quickly and easily open different wallets from your desktop. Note that you cannot open both wallets simultaneously. To do this, you will need two separate data directories, as described below.

### Separate data directories¶

Start Dash Core and allow it to synchronize with the network, then close Dash Core again. You can now create two directories at e.g. C:\Dash1 and C:\Dash2 and copy the blocks and chainstate directories from the synchronized data directory into the new directories. Each of these will serve as a separate data directory, allowing you to run two instances of Dash Core simultaneously. Create two (or more) shortcuts on your desktop as described above, then specify arguments for datadir as shown below:

• Datadir Target 1: "C:\Program Files\DashCore\dash-qt.exe" -datadir=C:\Dash1 -listen=0
• Datadir Target 2: "C:\Program Files\DashCore\dash-qt.exe" -datadir=C:\Dash2 -listen=0

You can now use the two icons to quickly and easily open different wallets simultaneously from your desktop. Both wallets maintain separate and full copies of the blockchain, which may use a lot of drive space. For more efficient use of drive space, consider using an SPV or “light” wallet such as Dash Electrum to maintain multiple separate wallets without keeping a full copy of the blockchain.

## KeePass¶

Since version 0.11.0, Dash Core has supported integration with KeePass, the popular open source password manager. This guide describes how to configure the association between Dash Core and KeePass, and how to save a Dash Core wallet passphrase in KeePass using the integration. When this is done, KeePass can be used to unlock the wallet.

### Installation¶

You will need the following:

If not already installed, install these packages according to the instructions linked below:

### Commands¶

The following KeePass RPC commands are available in the Dash Core client console or server:

keepass genkey
Generates a base64 encoded 256 bit AES key that can be used for communication with KeePassHttp. This is only necessary for manual configuration. Use init for automatic configuration.
keepass init
Sets up the association between Dash and KeePass by generating an AES key and sending an association message to KeePassHttp. This will trigger KeePass to ask for an ID for the association. Returns the association and the base64 encoded string for the AES key.
keepass setpassphrase
Updates the passphrase in KeePassHttp to a new value. This should match the passphrase you intend to use for the wallet. Please note that the standard RPC commands walletpassphrasechange and the wallet encryption from the QT GUI already send the updates to KeePassHttp, so this is only necessary for manual manipulation of the password.

The following new arguments are available for dashd and dash-qt:

keepass
Use KeePass 2 integration using KeePassHttp plugin (default: 0)
keepassport=<port>
Connect to KeePassHttp on port <port> (default: 19455)
keepasskey=<key>
KeePassHttp key for AES encrypted communication with KeePass
keepassid=<name>
KeePassHttp id for the established association
keepassname=<name>
Name to construct url for KeePass entry that stores the wallet passphrase