From 36d45690c31f4c4ca86253d5922b8d67e505e714 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Sat, 15 Apr 2023 09:04:02 -0700 Subject: [PATCH] update readme for swap stuff --- README.md | 198 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 197 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5f6be29..4a66996 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,202 @@ When you wish to initiate a swap (i.e. you have WOW and want XMR or vice-versa): * Wait for a participant TBD - TODO +From: https://monero.stackexchange.com/questions/5646/how-to-use-monero-multisignature-wallets-2-2-2-3 +Overview -The GUI will connect to a given IRC server and channel \ No newline at end of file +In short, the process is: +Wallet Creation + + All parties command prepare_multisig and send data to ALL other parties + All parties command make_multisig and send 2nd batch of data to ALL other parties + All parties command finalize_multisig 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 and send the file to all other parties + To complete preparation, all parties command import_multisig_info 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_monero_tx which must be sent to any 1 other signer + The other party commands sign_multisig multisig_monero_tx and the file is updated with the signature. + The completely signed file is pushed to the network with use of submit_multisig multisig_monero_tx + +Below is a step-by-step walkthrough. +Wallet Creation +Step 1 - Prepare Multisig + +Here some data will be shown to the user, which has to be exchanged with ALL other parties. + +Person 1 commands: + +[wallet 46yeyn]: prepare_multisig + +The output will be something like: + +MultisigV1cR7X7ZAfa5ncRmQv1hpt4P1DmmnhinhokhDMqsmuWXmHFrb6xUr3FtBGygCfMScxnKJvXK1vvPNahXNWfYWVquieBErr98sFtgs24c2YuYrQT78uxV8oYx1A9bKeHSUfYzCniN5kMznEfvKCw3FiomjLvw364gg98ZWp16zA7pUVozid +Send this multisig info to all other participants, then use make_multisig [...] with others' multisig info +This includes the PRIVATE view key, so needs to be disclosed only to that multisig wallet's participants + +Copy the entire line Multisig... be sure to capture the whole thing when copying. Send this line to person 2 & 3. + +Persons 2 & 3 do the same and send the line to other 2. +Step 2 - Make Multisig + +All 3 persons now have the Multisig... 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 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 wallet and want to reconstruct the multisig wallet). + +Person 1 commands: + +[wallet 46yeyn]: make_multisig 2 MultisigV12EHtuvxFyAYDNcDsbDqWHDfkRr4JZchSdf8eZQSFwiMKDk15CYEJeQyEwtSnqUZdRr2BsEaT9z2biUdDTEQM4T3N625owvKMDoyhbRj3bwkBtceLKimap8DBAiUmSABpdf62HnPYiRtLW4JdVFmfqjndhWjYBypx1duvpi3qwfSrBY9a MultisigV1TqQ8Gt5Sb3GYtVJa1fQrK7e7hPm59XbooNvLxPSBR4856bW9jtD1hEyWy4yULKrX7reZZ6vrKdBCdSdk4nfApCGYJAA2WP4pKNwHDyKTuLEeuoDhqno8keEVeEF9AZsWXvng1avUTRREmy11h8wu8pdjopC4AguQKiHCJCN7aT9W6b8C + +Notice how there are 2 strings starting with Multisig.... 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. + +and the output will be something like: + +Another step is needed +MultisigxV1PKCwmVrucV8bXi18VnHFqRXcnAq4osFL3ahzPHCiN48zhs28u6jmEhy7ktZbUEGfRtTuFjjKzJYb61fnFwnysBBnNXsUtCgFMXPa7FyNKVy2AnUg3ePEnKqWkgKVvA81axTS8r9EX1DmVPXgFKkFzw4Yj4ZtMcJVo77b5ayuMzjFtsaijko9X2bjd9AVfFVGBFMCSLa4xXhNVNz19CTUJx5gpoPG +Send this multisig info to all other participants, then use finalize_multisig [...] with others' multisig info +[wallet 41fJjQ (out of sync)]: + +With 2/3 there's an additonal step to be done here. The new "Multisig..." 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. + +Note how the first 6 chars of the address changed from 46yeyn to 41fJjQ. They will change again when the final step is done. +Step 3 - Finalize Multisig + +Here we do one last command to make the wallet ready for receiving. It requires the 2nd batch of "Multisig..." strings received from other parties. + +Person 1 commands: + +[wallet 41fJjQ]: finalize_multisig MultisigxV1Vg1tsRLurvAc5aSA9Hd9God3MQhijCFoE1rPDFzx7ufwhs28u6jmEhy7ktZbUEGfRtTuFjjKzJYb61fnFwnysBBnfYm4xJWcJ4qM4khSb2KkyAKDuT39pTvdmemhojNjeYCmgSQ1NZLyBj48R1tVpiGNxa7TDnGbSgLuKBq35AX6jfu5PECAcDDn22CFQbJZip7xnBbn89Szzh27xeozfxcLiqqm MultisigxV14xDZBGACz3iUh2aVKGE5q5VzcvJdg2qCvZECgUWCdy5QNXsUtCgFMXPa7FyNKVy2AnUg3ePEnKqWkgKVvA81axTSfYm4xJWcJ4qM4khSb2KkyAKDuT39pTvdmemhojNjeYCmCNaRSsDEcemLLL8wCvzsy5R6hhkhWLYkD9vhZwprSFFKMZ7tfRko2VfMBoKQhB7PKXbf1npk2xceVKu2y7kExywb + +and the output will be something like: + +Wallet password: +[wallet 42feih]: + +There's no indication that the process was successfully completed (for now), but you can notice the first 6 letters changed from 41fJjQ to 42feih. All 3 persons do the same, and all 3 wallets will show the same address after this step. + +Now command: + +[wallet 42feih]: address + +to see the full address of the completed multisig wallet. The output will be something like: + +0 42feihwun8KZEqPhErYCEvDqRLeqegLzEW79grAqPQmaEjytd7R1N1EZRebxJBJjCcQLEQTMqKQdD9htL9DXRY2zPTarG92 Primary address + +Receiving +Step 1 Fund The Multisig Account + +This is simple. Just send to the shared address. You can send multiple times, same like normal wallet. You can use payment ID 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 as any other. +Step 2 Check Multisig Account Balance + +Just open the wallet and command refresh. Once completed, all persons can verrify that the funds arrived. + +For example, Person 2 commands: + +[wallet 42feih]: show_transfers and can see all incoming transfers. + +pool in 08:52:33 PM 0.032797750000 e55eefb051106f6e680d5436c544621cb3b2ffc58bbbe98d7c1433c1e9894f46 0000000000000000 0 - + +Preparation for Spending +Step 1 - Export Multisig + +Without this step, it will not be possible to create a spending transaction. 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: + +[wallet 42feih]: export_multisig_info minf1 where minf1 can be any filename. The output will be: + +Multisig info exported to minf1 + +The file minf1 will be located in the shell working folder* + +Person 1 sends that file to other persons. Persons 2 & 3 do the same. +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: + +[wallet 42feih]: import_multisig_info minf1 minf3 (the wallet will look for files in the shell working folder*) and the output will look like: + +2 outputs found in testmp2 +Height 1357156, transaction <88ba687dc79a0b39e6de6d0763eda8363d33d9f58ec9a096171bd9a7f1dae873>, received 0.100000000000 +Height 1357161, transaction , received 0.100000000000 + +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: + +[wallet 42feih]: transfer 47RGRFeLPT51qvDWuw7SGf57JK7AziAVqYucct8z5yEDQ1XqU8zKEjidWjqPXk7PuHP3MJDN2AJATKy9PH7zaGV7MB8X6CH 0.01 +Wallet password: +No payment id is included with this transaction. Is this okay? (Y/Yes/N/No): Y +There is currently a 2 block backlog at that fee level. Is this okay? (Y/Yes/N/No)Y + +Transaction 1/1: +Spending from address index 0 +Sending 0.010000000000. The transaction fee is 0.003034980000 +Is this okay? (Y/Yes/N/No): Y + +The output will look like: + +Unsigned transaction(s) successfully written to file: multisig_monero_tx + +Check in the folder where you started monero-wallet-cli from*. There should be a file named multisig_monero_tx. + +Send the file multisig_monero_tx to either person 1 or 2. +Step 2 - Sign Multisig + +Let's say Person 2 was picked as partner. He must finish the signature. Person 2 copies the file to the same folder from where he started (or will start) monero-wallet-cli*. + +Then, Person 2 commands: + +[wallet 42feih]: sign_multisig multisig_monero_tx + +and he will be prompted to check it first: + +Loaded 1 transactions, for 0.032797750000, fee 0.003034980000, sending 0.010000000000 to 47RGRFeLPT51qvDWuw7SGf57JK7AziAVqYucct8z5yEDQ1XqU8zKEjidWjqPXk7PuHP3MJDN2AJATKy9PH7zaGV7MB8X6CH, 0.019762770000 change to 42feihwun8KZEqPhErYCEvDqRLeqegLzEW79grAqPQmaEjytd7R1N1EZRebxJBJjCcQLEQTMqKQdD9htL9DXRY2zPTarG92, with min ring size 5, no payment ID. Is this okay? (Y/Yes/N/No): Y + +If ok, answer Y, and the output will look like: + +Transaction successfully signed to file multisig_monero_tx, txid d2f80092cf83ce471df5e3fde0923267d086a56cf3b0e0db5dc98a529a191463 + +Step 3 - Submit Multisig + +Finally, person with the signed file submits the transaction to the network by commanding: + +[wallet 42feih]: submit_multisig multisig_monero_tx and there will be a confirmation prompt: + +Loaded 1 transactions, for 0.032797750000, fee 0.003034980000, sending 0.010000000000 to 47RGRFeLPT51qvDWuw7SGf57JK7AziAVqYucct8z5yEDQ1XqU8zKEjidWjqPXk7PuHP3MJDN2AJATKy9PH7zaGV7MB8X6CH, 0.019762770000 change to 42feihwun8KZEqPhErYCEvDqRLeqegLzEW79grAqPQmaEjytd7R1N1EZRebxJBJjCcQLEQTMqKQdD9htL9DXRY2zPTarG92, with min ring size 5, no payment ID. Is this okay? (Y/Yes/N/No): Y + +If ok, answer Y, and the transaction will be sent. The output will look like: + +Transaction successfully submitted, transaction +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). + +*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 monero-wallet-cli. It may or may not be the same folder as your actual wallet files or monero-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 on c:\monero\ and your shell working folder could be c:\. + +If you remain in c:\ with the shell, you could start the wallet by its full path and specify the wallet file location: c:\monero\monero-wallet-cli.exe --wallet-file f:\temp\mywallet. In this case, all the import/export stuff would be read/written to c:\ 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 then cd f:\temp\. Then, simply start the wallet from that location by its full path again: c:\monero\monero-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. \ No newline at end of file