2/3 Multisig
First, the wallet to be converted to multisig must be empty. It is best to use a brand-new wallet for the purpose, although not required. It is strongly advised to make a copy of the wallet files first, just in case something goes wrong.
Overview
In short, the process is:
Wallet Creation
All parties command
prepare_multisig
and send data to ALL other partiesAll parties command
make_multisig <threshold> <data1> <data2>
and send 2nd batch of data to ALL other partiesAll parties command
exchange_multisig_keys <data1> <data2>
with the data from ALL other parties.
Receiving
All parties can type address to see the created multisig wallet address. The address will, of course, be the same for all parties since they're all watching the same wallet.
Preparation for Sending
To prepare for sending all parties command
export_multisig_info <filename>
and send the file to all other partiesTo complete preparation, all parties command
import_multisig_info <filename1> <filename2>
and import files from other parties
Sending
To send, any party can use the usual transfer command, but the result will be a file named
multisig_beldex_tx
which must be sent to any 1 other signerThe other party commands
sign_multisig multisig_beldex_tx
and the file is updated with the signature.The completely signed file is pushed to the network with use of
submit_multisig multisig_beldex_tx
.
Below is a step-by-step walkthrough.
Wallet Creation
Requirements:
3 empty
beldex-wallet-cli
walletsAll parties wallets connected to a
beldexd
Confidential communication channel
Step 1 - Prepare Multisig
All 3 people should open up their beldex-wallet-cli
and generate a new wallet. Make sure you do not have any $beldex within your wallet.
Person 1, 2 and 3 runs the following command within their beldex-wallet-cli
:
The output will be something like:
Copy the entire line Multisig…...Vozid
and be sure to capture the whole thing when copying.
Person 1 to send the Multsig...arg
to Person 2 and 3, Person 2 to send their output to Person 1 and 3 and Person 3 to send their output to Person 1 and 2.
Step 2 - Make Multisig
All 3 persons now have the Multisig...arg
text from the other 2. With that, each of them can create their part of the multisig wallet. Before you proceed, note that the wallet will lose access to the underlying wallet when converted to multisig. This is not really a problem, since we started with an empty wallet, and if all goes OK with this step, you won't ever need it unless you want to go through the process again for whatever reason (like HDD died, but you have the seed mnemonic of the underlying wallet and want to reconstruct the multisig wallet).
Person 1 commands:
Where <threshold>
is the number of signers required out of the 3 people, <data person 2>
is the output provided by Person 2, and <data person 3>
is the output provided by Person 3.
This should look similar to:
Notice how there are 2 strings starting with Multisig....arg
. One is from person 2 and other from person 3. The number at the beginning is the minimum required number of signatures. Since it's a 2/3 scheme - it's 2.
The output from the make_multisig
command will be similar to:
With 2/3 there's an additional step to be done here. The new Multisig...arg
info must be passed to ALL other participants (persons 2 & 3).
Persons 2 & 3 do the same as above and send the info to other 2 parties.
Step 3 - Exchange Multisig
Here we do one last command to make the wallet ready for receiving. It requires the 2nd batch of Multisig…....arg
strings received from other parties.
Person 1 will run the command:
Unfortunately the wallet will not display an output at this point. There's no indication that the process was successfully completed (for now). All 3 persons do the same, and all 3 wallets will show the same address after this step.
Now each person run the command:
And each 3 parties of the multisig wallet should be shown the same address in their wallet.
Receiving
Step 1 Fund The Multisig Account
This is simple. Just send to the shared address. You can send multiple times, just like a normal wallet. You can use payment ID’s as well, or generate an integrated address to receive funds.
Best part, whomever is sending the funds won't be able to tell that the address belongs to a multisig wallet since it looks like any other Beldex address.
Step 2 Check Multisig Account Balance
Just open the wallet and run the refresh command . Once completed, all persons can verify that the funds arrived.
Person 1, 2 & 3 can run the command:
To see incoming transfers or the following command to see the balance of the wallet:
Preparation for Spending
Step 1 - Export Multisig
Without this step, it will not be possible to create a transaction that spends Beldex. As a minimum, the sender needs to get a partial key image from the same person who will sign the transaction with him later. He could get from both parties immediately and then later decide with whom to sign.
Person 1 commands:
Where mi1
can be any filename. The output will be:
The file mi1
will be located in the shell working folder*
Person 1 sends that file to other persons. Persons 2 & 3 do the same.
Optional: Step 1.2 Sending Multisig Info File with terminal - transfer.sh
It is optional to use the terminal to send each person the multisig info files.
UPLOADING MULTISIG INFO FILE
Person 1 will open up a new terminal and change to the directory mi1
has been saved.*
Person 1 will run the following command:
Person 1 will receive the link to the file as an output, looking similar to:
Person 1 will need to send this link to Person 2 and Person 3. Person 2 will need to do the same and send the link to Person 1 and 3. Person 3 will need to do the same and send the link to Person 1 and 2.
DOWNLOADING MULTISIG INFO FILE
Person 1 should change to the directory of their beldex-wallet-cli
and use Person 2 and 3’s download link to run the commands:
Replacing <link>
with the link Person 2 and 3 shared with Person 1 and <filename>
with the filename of the Multisig info file that Person 2 or 3 generated, for example Person 1 will run the command:
And the command:
Likewise, Person 2 and 3 should do the same, changing directories to their beldex-wallet-cli
and downloading with the alternative Persons download link, and filename.
Step 2 - Import Multisig
Now, they must all import each other's file so they can be ready to make a TX later.
For example, Person 2 commands:
The wallet will look for files in the shell working folder and if the files are found the output will look like:
Persons 1 & 3 do the same.
Spending
Step 1 - Transfer (Preparing Unsigned Transaction)
Any of the 3 persons can start a transaction, it doesn't matter. To avoid weird things from happening only do it for 1 transaction at a time. If anything weird happens, do the step 1 & 2 again to fix.
For example, let's say that Person 3 will make the TX.
Person 3 performs the usual transfer command:
The output will look like:
Check in the folder where you started beldex-wallet-cli
from. There should be a file named multisig_beldex_tx
.
Send the file multisig_beldex_tx
to either person 1 or 2.
Person 3 will send the file multisig_beldex_tx
to the Person 1 or 2. Person 3 can send this file through email or alternatively use the transfer.sh commands outside of the wallet:
If Person 3 chooses to use transfer.sh command to send the file to Person 1 or 2 they will receive a <link>
.
Person 1 or 2 must finish the signature. Person 1 or 2 copies/downloads the file to the same folder from where he started (or will start) beldex-wallet-cli
.
Person 1 or 2 can run the command to download the file to the beldex-wallet-cli
directory.
Replacing https://transfer.sh/CJqnM/multisig_beldex_tx
with the link provided by Person 3.
Step 2 - Sign Multisig
Let's say Person 2 was picked as the partner. He must finish the signature. Person 2 copies the file to the same folder from where he started (or will start) beldex-wallet-cli
.
Then, Person 2 commands:
and they will be prompted to check it first:
If ok, answer Y
, and the output will look like:
Step 3 - Submit Multisig
Finally, person with the signed file submits the transaction to the network by commanding:
There will be a confirmation prompt:
If ok, answer Y
, and the transaction will be sent. The output will look like:
You can check its status by using the show_transfers
command.
The person 2 could also send the signed TX to person 3, who could then submit it to the network himself.
If you want to make another one, you have to go back to preparation for spending step (sync the key images again).
The wallet will look for the files and export them to the folder from where it was started, ie where your command prompt / shell was when you called
beldex-wallet-cli
. It may or may not be the same folder as your actual wallet files orbeldex-wallet-cli
, depending on how you go about it.For example, your wallet could be on some USB drive like
f:\temp\
, and your wallet software onc:\beldex\
and your shell working folder could bec:\
.If you remain in
c:\
with the shell, you could start the wallet by its full path and specify the wallet file location:c:\beldex\beldex-wallet-cli.exe --wallet-file f:\temp\mywallet
. In this case, all the import/export stuff would be read/written toc:\
because that's still your shell's working folder.It would be probably feel more natural to
cd
into the wallet folder. Dof:
to change drive and thencd f:\temp\
. Then, simply start the wallet from that location by its full path again:c:\beldex\beldex-wallet-cli.exe --wallet-file mywallet
. Notice how you don't have to write the full wallet path now as you're already there with your shell. In this case, all the files mentioned above would be written or read from the same folder as the wallet files.
Source:
Monero Stack Exchange: how to use monero multisigniture wallets
Last updated