2/2 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:
Set-up
Both parties prepare
beldex-wallet-cli
filesBoth parties command
prepare_multisig
and send data to each otherBoth parties command
make_multisig
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 both parties command
export_multisig_info <filename>
and send the file to the other partyTo 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.
Set-up
Step 1 Initiate Creation of Multisig Wallet and Exchange Data
Requirements:
2 empty
beldex-wallet-cli
walletsBoth wallets connected to
beldexd
Confidential communication channel
Person A must run the command in their beldex-wallet-cli
:
Person A will receive the output:
Copy the entire line Multisig...5ozpN
and be sure to capture the whole thing when copying.
Send this line to person B through a confidential communication channel.
Person B does the same and sends his output to person A.
Person B must run the command in their beldex-wallet-cli
:
Person B will receive the output:
Person B will copy the Multisig…...eJi4FS
and send it to person A through a confidential communication channel.
Step 2 Create Multisig Wallets
Both person A and person B now have the Multisig...arg
text from the other one. 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 account when converted to multisig. This is not really a problem, since we started with an empty one, 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 account and want to reconstruct the multisig wallet).
Person A will use the output Person B sent and will run the command:
The wallet will output something similar to:
Person B will use the output Person A sent and run the command:
The wallet will output something similar to:
Now each person involved should exchange addresses and compare, they must be the same.
Receiving
Step 1 Fund The Multisig Account
This is simple. Just send to the shared address. You can send multiple times, this is the same as 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.
Step 2 Check Multisig Account Balance
Just open the wallet and command refresh. Once completed, both persons can verify that the funds arrived.
Person A commands:
Person A outputs:
Person B can do the same:
Person B has the same outputs:
Spending
Step 1 Synchronizing Key Images
1.1 Exporting Multisig Info
Without this step, it will not be possible to create a spending transaction.
Both persons need to run the following command to sync their key images:
Where <filename>
can be any filename.
Person A will run the command:
Person A will receive the output:
The file mi1
will be located in the shell working folder*
Person A sends that file to Person B. They can send the file in many ways, preferably through by handing a usb drive with the file on it, however If you would like to send the file through terminal use https://transfer.sh/, an optional step has been added if you choose to use this method.
Person B does the same, but changing the filename and runs the command:
Person B will receive the output:
The file mi2
will be located in the shell working folder*
Person B sends that file to person A.
Now, they must both import each other's file.
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 A will open up a new terminal and change to the directory “mi1” has been saved.*
Person A will run the following command:
Person A will receive the link to the file as an output, looking similar to:
Person A will need to send this link to Person B.
Person B will run a similar command:
Person B will receive the link to the file as an output, looking similar to:
Person B will need to send this link to Person A.
Downloading Multisig Info file
Person A should change to the directory of their beldex-wallet-cli
and use Person B’s download link to run the command:
Replacing <Person B link>
with the link Person B shared with Person A and <filename>
with the filename of the Multisig info file that Person A generated, for example Person A will run the command:
Likewise, Person B should do the same, changing directories to their beldex-wallet-cli
and downloading with Person A’s download link, and filename.
Step 1.3 Importing Multisig Info
Person A will run the command:
Depending on the transactions made in to the multsig wallet the output will look similar to:
Person B will run a similar command:
and the output will look like:
Step 2 Preparing Spending Transaction
Either person A or person B can do this, it doesn't matter. To avoid weird things from happening only do it for 1 transaction at a time.
Person A 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
.
Person A will send the file multisig_beldex_tx
to the Person B. Person A can send this file through email or alternatively use the transfer.sh commands outside of the wallet:
If Person A chooses to use transfer.sh command to send the file to Person B they will receive a <link>
to pass to Person B.
Person B must finish the signature. Person B copies/downloads the file to the same folder from where he started (or will start) beldex-wallet-cli
.
Person B 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 A.
Then, Person B runs the command:
A prompt will be displayed to allow person B to check the transaction before signing:
If ok, answer Y
, and the output will look like:
Finally, person B 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:
The person B could also send the signed TX to person A, who could then submit it to the network himself.
If you want to make another one, you have to go back to step 1 of spending (sync the key images again).
Note on folders and file locations, as it could create some confusions. 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-windows-x64\
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-windows-x64\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. Do
f:
to change drive and thencd f:\temp\
. Then, simply start the wallet from that location by its full path again:c:\beldex-windows-x64\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 Stackexchange: How to use Monero Multisigniture Wallets
Last updated