Peercoin Wallet: MultiSig Tutorial

This tutorial will teach you how to use the Cointoolkit to create a multisig wallet for Peercoin. All sources can be found on the Peercoin… This tutorial will teach you how to use the Cointoolkit to create a multisig wallet for Peercoin.

Peercoin Wallet: MultiSig Tutorial

This tutorial will teach you how to use the Cointoolkit to create a multisig wallet for Peercoin. All sources can be found on the Peercoin Github: https://github.com/peercoin/cointoolkit. An online hosted version can be found here: https://peercoin.github.io/cointoolkit/. You can download the repository for offline creation of wallet addresses.

If you want to do this on the testnet, you can get test Peercoin from this faucet: https://peercoinexplorer.net/faucet/.

Creating a MultiSig Wallet

For this tutorial, we will be using the live hosted version found here: https://peercoin.github.io/cointoolkit/#home.

Cointoolkit Home Page

To start, two addresses were generated to serve as our multisig addresses. You are able to enter as many as are needed for your verification purposes. To create a MultiSig address, click “New” > “MultiSig Address”. We will be doing this on the test net, so make sure you are on the right chain under settings before proceeding. You will be presented with a screen that looks like the following:

Multisig page

Since we only will be creating a two-of-two multisig address, we can go ahead and remove the extra fields by clicking the minus sign to the right of the each field. In preparation, two new Peercoin testnet addresses were generated. Since new addresses were generated using Cointoolkit, the publickeys were on hand as “031632cde259ecf842b75a734e4eeb79f9c68c2109e10dd50415fdd3c484a3cfcc” and “0248050fb755ccf6ee48822fe0c2ee3bd57dfbc4c44f529a8cab2de9e8f9734da7”. If you didn’t have access to your publickey, it is easy to check by using the debug window in your Peercoin wallet. Using “validateaddress” will return something similar to the following screenshot. Make sure to copy the “pubkey” for each key.

We can go ahead and enter this in the “Public key” fields. Make sure to set the required signature amounts to match what you require for a transaction confirmation.

Enter the two public keys we generated and make sure to set the correct number of required signatures

Once all the information is in place, we can click submit. Make sure to note that the order of the entered public keys determines the newly generated address and script. You can click “Sort by Pubkey” to make sure they are ordered in a consistent manner.

Our newly generated multisig and script

This will return the new generated multisig address of “2N6e7ExCPXX3XmnS2Qcmt89fSkC8JpxdxRR”, and a script of “5221031632cde259ecf842b75a734e4eeb79f9c68c2109e10dd50415fdd3c484a3cfcc210248050fb755ccf6ee48822fe0c2ee3bd57dfbc4c44f529a8cab2de9e8f9734da752ae”. This script will be used for the verification of transactions later when its time to spend it. Now we have a working multisig wallet. Funds sent to the multisig address can only be moved if signed by the two keys and script that we generated.

Spending from a Multisig Address

Once we have the our script and new multisig address, we need to a way to spend it. Using this testnet faucet ( https://peercoinexplorer.net/faucet/), we secured some funding to our multisig address. After the coins arive, we can generate a new transaction with one of the addresses. Clicking “New” > “Transaction” will bring you to the following page.

If we paste the script key we got from the last page, we can insert that into the “Multisig Redeem Script” field and click load.

We can see the 100 test net Peercoin we sent to the address previously. Since we don’t need these coins, we are just going to be sending them back to the faucet account, so we input the address and the amount we want to send back, including fees. Hit generate to create the transaction and we can proceed to signing it. We can go to the “Verify” tab.

You can see under “Signed” that there are no signatures at this time. To make the first signature, we need to click “Continue to Sign”.

Signing with the first private key of the first wallet address

We enter the first private key and click “Sign”. Now, when we go back to the verify page, we can see that “Signed” has changed to one, indicating one signature. Now it is extremely important to note that the raw transaction is longer because it now contains information about the signature we just did.

The first wallet signature is in place, now time for the second one.

Now we just need to add a second signature and we will be good to go.

The second signature’s private key on the last transaction.

We sign with our second private key, and get another transaction signature (this one is even longer). Here, you could send the new transaction to another party for them to verify and allow for funds to be spent.

All signatures complete and we are ready to broadcast to the rest of the world

Now, we can see two signatures have been applied and the transaction is ready to be broadcasted. You can click the “Broadcast” button to get to the following screen. We verify that everything is correct and click “Broadcast” to sends the transaction off to the Peercoin chain.

Verifying that everything is correct and accurate before we send the transaction off.

It will return a transaction id which you can check on the testnet explorer. You can see mine here: https://testnet-explorer.peercoin.net/tx/34e3f78aa8de0da000c94f2e8af400df25ea7e72f8f4e5146e8258aa4d1d0feb. I sent the Peercoins back to the faucet, but this would be the standard process for doing it live on the mainnet.


Conclusion

Hopefully this guide was able to walk you though the basics of a setting up and using a multisignature wallet on the Peercoin network. If you have further questions, we are happy to help on our Discord/Telegram. Come say hello!

Wanting to know whats new with Peercoin? You can stay up-to-date with all the related news and discussions over here: https://talk.peercoin.net/