Breaking News
Home » News & Articles » Full guide: How to access I2p sites & Use TheMarketplace.i2p

Full guide: How to access I2p sites & Use TheMarketplace.i2p

This Amazing Guide was posted on reddit by the username: moonsh00t All The Credit goes to him!
As It was listed on the Guide that the License is BSD we believe it would be a great service to give this guide more publicity outside Themarketplace.i2p subreddit and that the hard to follow formatting should be fixed, so its our pleasure to reformat it (a bit) and post it here -  The OP and updates can be found On This link

Contents

 

  1. Legal Disclaimer
  2. Versioning
  3. Terminology & Abbreviations
  4. Prerequisites
  5. Concepts
  6. Installation & Configuration
  7. Refunds
  8. Selling on The Marketplace
  9. Finalising transactions outside of The Marketplace
  10. Transaction String Formatting

Legal Disclaimer

This guide is intended to outline the functional aspects of The Marketplace site. It should only be used to assist in the acquisition or resale of goods and services which you are lawfully permitted to purchase or engage in. Basically; don’t do anything naughty and if you do and Santa finds out, it’s on you. License: BSD – do whatever you want with it.

Versioning

Version Comments
0.1 Basic guide. Needs expansion on what to do when things go wrong and finalization etc
0.2 Improved guide with end-to-end Seller tutorial. Needs expansion on what to do when things go wrong; disputes and refunds
0.3 Full tutorial on how to claim a Refund. Improved the buyers guide slightly.
0.4 End-to-end detail on how to claim a payment without TMP’s involvement. Other miscellaneous corrections.
0.5 Tutorial on installing and configuring TAILS with persistent storage, Electrum and TMP’s Electrum plugin. Other miscellaneous corrections.

Terminology & Abbreviations

Term Meaning
TMP The Marketplace
BTC Bitcoin

Prerequisites

The following guide describes how to connect to and place your first order. Note: The Marketplace is on I2P which is slow compared to TOR, if you get timeouts, just refresh until it connects. The situation should improve as usage grows. This guide assumes you are configuring from scratch for a Windows system. The following software will be installed and used. You should download these pre-requisites to a folder on your hard-disk (E.g. C:\temp\tmpsetup\) before continuing.

Concepts

The Marketplace is conceptually pretty different from the other markets out there. Other darknet markets are basically giant online wallets into which buyers transfer Bitcoins before they go shopping. Once the buyer has received their goods, they permit the darknet market to release the funds to the seller who must then withdraw them. Once of the biggest disadvantages of this approach is that both the seller and buyer need to trust the darknet market to not:

  • collapse; or
  • walk away with all the money stored on the platform

for the duration of the transaction. When either of these eventualities occur, it can be very expensive and frustrating for both buyers and sellers. TMP goes some way to addressing these concerns using what’s called multi-signature transactions. Multi-signature transactions allow all the parties involved in handling the money (so that’s the buyer who is paying, the seller who is to be paid for the goods and the darknet market that wants their fee for providing a website to do all the business on), to always retain some control over the money for the duration of the order.

An Order Overview

To accomplish this, the buyer, the seller and the darknet market agree on a single use Bitcoin Address (the Bitcoin Deposit Address) into which the buyer will deposit the Bitcoins necessary to pay for their order. This agreement is reached by the repurposing of Bitcoin Addresses (the ones you are normally familiar with using to deposit your Bitcoins too), to act as keys to the agreed Bitcoin Deposit Address. Each participant (that’s the buyer, the seller and the darknet market) generate a Bitcoin Address which they use as a key to the Bitcoin Deposit Address. For anyone to move any of the Bitcoins out of the Bitcoin Deposit Address, it requires that at least two of the key holders authorise it. Once a buyer has received their order, they will mark it as Finalized on the TMP website. TMP then effectively inserts their key (creates a transaction signed with their key) into the Bitcoin Deposit Address used for the order and asks the seller to do the same. Once the seller inserts their key (signs the transaction), the Bitcoins held in the Bitcoin Deposit Address can be moved to the sellers nominated Bitcoin Address (E.g. a blockchain.info wallet, a BTC exchange etc) by broadcasting the signed transaction to the Bitcoin network. And that’s the magic. Unlike traditional darknet markets (Pandora, BlueSky etc), if TMP staff turned bad and wanted to steal the Bitcoins in a Bitcoin Deposit Address, they would also need either the buyer or the seller for every in-progress order to also sign off. If none of the parties agree, the Bitcoins will just sit in the Bitcoin Deposit Address for eternity but it also means that a buyer and a seller can get together completely outside of TMP and release any Bitcoins stored in Bitcoin Deposit Addresses to which they both hold the keys.

TMP Service Fees

Those who have been paying attention may be wondering where TMP receives its fee in all this? Well, when TMP creates the transaction that both it and the seller will sign to release the Bitcoins held in the Bitcoin Deposit Address, the transaction contains two output Bitcoin Addresses. One is the sellers nominated Bitcoin Address and a second is a Bitcoin Address owned by TMP which is where their fee goes. The transaction that TMP creates and asks the seller to sign can be decoded and inspected to check the proportion of Bitcoins they’ve allocated to themselves from the Bitcoins held in the Bitcoin Deposit Address before sign-off. Once the seller is happy, signs off and broadcasts the transaction to the Bitcoin network, everything is final and each party gets their share of the Bitcoins stored in the Bitcoin Deposit Address.

Declined Orders & Order Cancellations

When a buyer cancels an order that’s in progress or an order is declined by a seller (E.g. no stock etc), the process is the same as that of a seller signing off except that in this instance it is the buyer who signs-off to release the Bitcoins stored in the Bitcoin Deposit Address. TMP will ask the buyer to provide a Bitcoin Address they want their refund sent too, and then automatically create and sign the transaction (insert their key). The transaction is then passed to the buyer, who then signs off (inserts their key) and broadcasts the transaction to the Bitcoin network.

Order Disputes

Finally, in the unfortunate scenario where a buyer and a seller enter into a dispute (all toys out of the pram), TMP will propose a solution (For example; 50% of the Bitcoins held in the Bitcoin Deposit Address to the buyer, and 50% to the seller). Provided at least the buyer *or* the seller agree to this, TMP will then sign the transaction and submit it to either the buyer or the seller for sign-off and broadcasting to the Bitcoin network. The Bitcoins will then be distributed as agreed.

What if The Marketplace disappears?

The beauty of TMP is that they are not required to release Bitcoins stored in Bitcoin Deposit Addresses provided the buyer and the seller can get in contact with each other and agree on a transaction. It may therefore be a good idea for buyers and sellers participating in regular or large transactions to provide alternative contact details for each other so that in the event of a service outage, any outstanding orders can be finalized and the Bitcoins released. Note: In this instance either the buyer or the seller would need to create and sign a transaction which the opposite party (buyer or seller) would also need to sign-off on. Either party could then broadcast the signed transaction to the Bitcoin network. Creating a raw transaction to finalize without TMP is covered in this section of the guide: Finalising transactions outside of The Marketplace. You may also (if you are technically minded) want to read up on raw transactions and that information can be found here: Raw Transactions.

Installation and Configuration

For Windows

 

  1. Double click the I2P software installer (i2pinstall_0.9.9_windows.exe)
  2. Press [Next] until you reach the pack installation choice window
  3. 1
  4. The default option Base will be checked, but you also have the option of installing I2P as a Windows Service. This means it will automatically run in the background whenever you start your computer and you will always be participating in the I2P network. If you intend to be a frequent user, you may wish to consider this option for two reasons:
    • A) Everyone who uses I2P provides routing services and bandwidth for everyone else – e.g. in the same was as you upload a torrent when you’re not downloading to help others, if you are always connected to I2P you help make the network faster for everyone else.
    • B) Plausible deniability. If you are always connected to I2P, regardless of whether you are using it, your traffic cannot be so easily categorised as unique by malicious entities. For example, in the recent Harvard Bombscare the perpetrator was caught because Law Enforcement worked out how many unique users were on the TOR network at the time, and paid each one of them a visit. The perpetrator had only logged on to TOR briefly during the period identified by LE, and therefore stuck a huge red flag on himself. If you are always connected to I2P, it would be significantly more difficult to accuse you of using it for less than legal purposes…assuming you did, which of course you wouldn’t.
  5. Press [Next] through all the remaining steps and [Done] once the software has installed 2
  6. If you have opted to install I2P as a Windows Service you will stop the service for the purposes of this tutorial. This ensures you can check for errors. If you have not opted to install as a Windows Service, skip to the next step.
    • A) Start->Run->type: services.msc and press [Enter]
    • B) Scroll down until you find I2P Service
    • C) Right click and select Stop
    • D) Close the Services window
  7. Click Start and navigate to I2P shortcuts menu and click Start I2P (restartable). The I2P software will now start.
  8. You will be presented with the I2P command box:

3

  1. followed shortly by your default browser opening with the I2P web interface:

4

7-At this point it takes I2P several minutes to initialise and find the necessary connections to other participants in the network. Click the I2P logo in the top left hand corner (market in red in the screenshot below) to change the management bar to reflect the details of your I2P connection. You may need to click twice before the full management view is visible.

5

Once the management bar is visible look down and once you see Network: OK (in the green box in the above screenshot), you are connected to the I2P network. The lower box that says “Rejecting tunnels: starting up” will eventually change to “Accepting tunnels”. You can optionally wait for this stage if you want to ensure you are a full participant in the I2P network. It can take about 30 minutes. 8. Now that I2P has loaded, you need to configure your browser in order to access the marketplace. As indicated in the pre-requisites, we’ll be using Mozilla Firefox. The next stage is therefore to install Mozilla Firefox and the QuickJS and FoxyProxy extensions. 9. Once you have installed Mozilla Firefox and the extensions, you should see two new icons in the browser: 6 10. Click the FoxyProxy icon to bring up the configuration window: 7

Ensure the window looks like the screenshot above and select Add New Proxy from the menu on the left side. When the Proxy Settings window is displayed, choose the Proxy Details tab and enter 127.0.0.1 in the Host or IP Address box and 4444 in the Port box: 8

Click the URL Patterns tab and click Add New Pattern. Choose a Pattern Name of I2P and in the URL pattern box enter *.i2p*. Click [OK]. 9

Click [OK] to return to the configuration window. It should now look like this: 10

Click [Close].

  1. You are now configured to connect your Mozilla Firefox browser to I2P. The penultimate stage is to check that JavaScript is disabled. The QuickJS icon should be clicked until it represents a broken wheel (hovering over will show that this is JavaScript disabled mode):
  2. In the address bar of Mozilla Firefox enter http://themarketplace.i2p – The I2P network will then wander off to try and route your connection. It is likely that you will receive a window saying Warning Eepsite Not Found in Addressbook. When this appears, click the stats.i2p jump service link.

11 When this returns, you should receive a Success window like the one below. 12 You will be automatically directed to save the address to your router configuration (see screenshot below), when this window displays choose Save themarketplace.i2p to router address book and continue to eepsite. It may take several attempts to get this process to happen. You only need to do this once though, when you navigate to http://themarketplace.i2p in future, it should route you directly. 14 Finally, you will reach your goal – The Market Place

15

  1. Select the [Register] button to begin the registration process. As part of this process you will need to supply a PGP encryption key. This ensures that all correspondence between you and any other vendors of the site is encrypted. If you have already got a PGP public key, you can paste it in here and skip past the following steps, if not – you need to install the GPG4Win 2.2.1 package listed in the prerequisites and follow the instructions below to create your key.
  2. Install the GPG4Win 2.2.1 package – as part of this process ensure you check the box to install GPA, and once installed select Start->GPA icon from the start menu. This will launch the GNU Privacy Assistant which you will use to encrypt and decrypt any communications and generate your initial PGP public key.
  3. When GPA starts for the first time it will ask you if you wish to Generate a Key or Do it Later. Choose Do it Later and navigate to Keys menu and choose New key….
  4. When the Generate key wizard displays, enter your username that you intend to use on The Marketplace:

16

  1. Click [Forward] and enter a fake email address of {THE-MARKETPLACE-USERNAME}@themarketplace.i2p, E.g. tmptestaccount@themarketplace.i2p. Click [Forward].
  2. At this stage you can optionally create a backup of your key. This is recommended and you should store the backup on a secure USB stick that only you have access to. This means if you encounter a hardware failure or other problem, you can always decrypt communications for your The Marketplace account, especially important if you’re a vendor. Click [Forward]
  3. Finally, you will be prompted for a passphrase. Ensure its a memorable, strong password – you will need to use it every-time you want to decrypt a communication.
  4. You’ve now created the keys you need for your The Marketplace registration, now to export the keys. Right click your new key and select Export Keys… from the menu

16

  1. You will be prompted to save the public portion of your key (this is the bit you can circulate to anyone so they can encrypt communications for you) to a file. Choose a location on your hard disk E.g. c:\temp\tmp\mypubkey.txt
  2. Start Notepad (or your favourite text editor) and open the newly saved public key file. Copy the text content from the file into the The Marketplace registration form and complete the registration process.
  3. You will now be logged in. Click the Products link from the menu bar and shop for some legal, medicinal remedies. Once you’ve chosen, lets cover how you actually pay for your item… Navigate to your cart and click the [Checkout] button

18

Your order will now be created and require payment. The Marketplace is unique in that it requires multi-signature transactions, which basically means that you, the vendor and TMP Staff all have keys to your transaction, but in order for any one person to claim it, two of you have to agree. This ensures that the TMP staff can’t walk away with your (or the vendors) money. It would require either collusion between the TMP staff and the vendor, or yourself – either way, the potential damage is limited. On the screen under Order requires payment choose Please click here to create the escrow address 18

You will now be requested to enter the Public Key that will be used to create the new wallet to which you will send funds. The terminology says “wallet”, but what it actually means is: “create a new Bitcoin Deposit Address that is unique to this order and to which you will pay your Bitcoins”. Each order will involve creating a different Bitcoin Address, unique to that order into which you will deposit your cash to pay for your order. 19

When you are presented with the Create escrow address window, you need to create a Public Key which is used – along with the vendor and TMP Staff’s public keys – to create a unique Bitcoin Address into which you will deposit your money to pay for your goods. This sounds confusing, but what you are basically doing is providing your part of the key in this multi-signature transaction. So, to do this you need to generate a public key. Navigate to https://www.bitaddress.org/ to generate a new Bitcoin Address (NOTE: This Bitcoin Address is nothing to do with your order, it’s just an easy way to generate a public and private key. So don’t accidentally deposit funds to it). Once you generated your Bitcoin Address, it should look something like this: 20

  1. The only bit you are interested in is the Private Key. Copy the Private key value into a text file somewhere and keep it safe DONT LOSE IT. You will need it to authorise or finalise the order or in the case of a dispute.
  2. Now you need to get the Public Key. On https://www.bitaddress.org/ copy the Private Key to your clipboard and click the Wallet Details tab. Here, enter the Private Key and click the [View Details] button.
  3. Highlight the Public Key (130 characters [0-9A-F]): value and copy it to your clipboard.

21 Return to The Marketplace and paste this into the Public key (SEC) box and click [Create escrow address] 22 Your single use Bitcoin Deposit Address will now be created: 23

Send the exact amount required to this address using the Bitcoin QT client (or Electrum if you are using it) and record the transaction ID. To do this, open Bitcoin-QT and click the [Send] button. Copy the details carefully from The Marketplace order window and send the required funds. You can use the Label: field if you are using Bicoin-QT to record the Private Key you generated in Step 24 for your order (it’s only visible to you). This makes it easier to find the key you need in the event of a refund you need to claim. The format {FRIENDLY-LABEL} – PRIV KEY: {REPURPOSED-BTC-ADDRESS-PRIVATE-KEY} ADDRESS: {REPURPOSED-BTC-ADDRESS} works well.

24

  1. Once the funds have been sent, you need to retrieve the transaction id so that The Marketplace knows that you’ve paid. In Bitcoin-QT, click the [Transactions] button, simply highlight the recent transaction you’ve just made, right click and select Copy transaction id. The transaction will be copied to your clipboard.
  2. Return to The Marketplace and paste the transaction ID into the box and click [Record transaction]. Note: Ensure you strip off the “-000″ that Bitcoin-QT appends so for example: 8512e2728ca2153be0809d1252ecd8dfc6833a53fbfe1f8ba6f64ae19eaed663-000 you remove the -000 so it’s just 8512e2728ca2153be0809d1252ecd8dfc6833a53fbfe1f8ba6f64ae19eaed663 before clicking [Record transaction].

25

The Marketplace will now take over and monitor the transaction. Once it reaches the required number of confirmations, it will be forwarded to the vendor for processing. Note: You can cancel the transaction even after it has been paid but before it has been passed to the vendor. For more information on refunds and how to claim one, see the Refunds section. But we’re not done quite yet! Finally, you need to set your address so the vendor knows when to send your order. Click the [Set Address] button.

26

You now need to encrypt your delivery address, and send it to the vendor. In the top right hand of the screen, click the [View vendors PGP Key] 27

A new window will open and inside will be the vendors PGP public key, which you use if you want to send them any correspondence. Copy the text contents of this window to your clipboard, open Notepad (or your favourite text editor), paste it in and save the file to somewhere on your hard-disk, E.g. C:\temp\tmp\myvendorpubkey.txt

28

  1. You can close the browser tab once you’ve saved the key. Just keep the tab that requires your delivery address open.
  2. Now to import the vendors key into GPA. Click Start->GPA icon from your start-menu to start GNU Privacy Assistant.
  3. Click the [Import] button on the toolbar, and navigate to where you saved the vendors public key you just copied from your browser. The key will be imported and you should see it listed:

29

Each vendor will have their own key. This ensures that if The Marketplace is ever breached, any communications intercepted between vendors and buyers are effectively unreadable. Click the Clipboard button. The GNU Privacy Assistant – Clipboard is where you encrypt any communications to vendors and decrypt any communications in messages sent to you. Enter your delivery address in the window 30

Once you have entered it, click the [Encrypt] button and choose the vendors key. The text will be replaced by the encrypted version which can only be decrypted by the intended recipient (your vendor in this case).

31

Copy this encrypted text to your clipboard and paste it into The Marketplace Update address window and click [Submit]. 32

That’s it, your order is now with the vendor. In due course you should receive your order. When you do, you need to login to the site to finalize: 33

You will now be prompted to leave a review (which you should do for the benefit of other potential customers) and the order life-cycle is complete. If you were unfortunate enough not to receive your order, or have another issue with the buyer, you can open a Dispute. This is covered elsewhere in this guide.

Order Refunds (Order Cancelled, Order Rejected)

Refunds are the mechanism used by TMP to return Bitcoins to a buyer who has:

  • paid for an order but decided to cancel it; or
  • had a paid order cancelled by a seller

For any order that has been paid but that has not been Approved by the seller, the buyer will be able to claim a refund. Lets cover the process step-by-step from the buyers perspective. NOTE: If you are experimenting to understand the refund process, you will need to use some Bitcoins (the process isn’t risk free). If you are a seller, you can create and purchase one of your own products (See Selling for more information). If you are just an average, curious buyer – find a suitable cheap product from a listed vendor and just [Cancel] the transaction as soon as you have paid for it. Create an order on TMP by following Steps 21 to 35 inclusive of the buyers guide. Immediately after making payment and recording the transaction ID, your order screen should look something like this: You will now be prompted to leave a review (which you should do for the benefit of other potential customers) and the order life-cycle is complete. If you were unfortunate enough not to receive your order, or have another issue with the buyer, you can open a Dispute. This is covered elsewhere in this guide.

For TAILS (Linux) With Electrum

This section covers the setup of the TAILS Secure Linux distribution along with installing the Electrum Bitcoin wallet and the TMP Electrum plugin. One of the advantages of using TAILS is that it allows you to segregate your darknet activities from your main operating system (OS), however by design TAILS is forgetful. That means that every-time you reboot it, it’s as if you never used it. Any data that you created (PGP keys, wallets, installed applications etc) during your previous use of TAILS is lost. To remedy this, the TAILS OS provides the ability to configure persistent storage. Persistent storage reserves a bit of space on your USB or SD Card to allow configuration files and data to carry over between each reboot. In order to configure persistence, you need to do it from within the TAILS operating system. Before we begin, you will need a blank DVD and a USB or SD Card available. You will use the DVD to get the TAILS running and then you will use the USB or SD Card to create a new installation of TAILS that has persistent storage enabled. This is all covered in detail below. Note: If you are running virtualisation software such as VMWare Workstation (Windows), VMWare Fusion (Mac) or Virtualbox on your computer, you can use this in place of the blank DVD to get TAILS initially started. You can also opt to use a second USB stick or SD Card in place of the DVD – installation instructions are provided here: Manually installing TAILS onto a USB Stick or SD card. Let’s begin…

    1. Download the TAILS iso image from the TAILS website: https://tails.boum.org/download/#index2h1 and save it somewhere on your hard-disk (E.g. c:\temp\tails-i386-0.22.iso)
    2. Insert the blank DVD, locate the TAILS iso image (E.g. c:\temp\tails-i386-0.22.iso) and burn it to your DVD. You should use a competent burning program for this task such as ImgBurn.
  • Reboot your computer with the freshly cooked DVD in your DVD drive to start TAILS. Remember; you will need to configure your PC to boot from the DVD drive if it doesn’t automatically – you can find these options in the BIOS (usually a frantic tapping of the [F12] or [DEL] keys when you first switch on your computer).
  • TAILS should boot and you will be presented with a screen shown below:

34

  • Choose [Yes] and click [Forward]
  • Now enter a simple password – this allows you to perform ‘god’ level operations and is only persisted for the duration of your TAILS session. Don’t make it too complicated since you’ll be entering it a few times. Check the Activate Microsoft Windows XP Camouflage check box to make everything look like Windows XP to the casual observer. Click [Login]

35

TAILS will now complete loading and you should be presented with something that looks like a Windows XP desktop. 36

The next step is to create a copy of TAILS with persistent storage enabled. Remember; TAILS forgets everything between reboots, so you need the ability to persist important data so you don’t have to re-enter it every-time. Navigate to [Start]->Tails->Tails Installer and click.

37

When the Tails installer window displays, insert your USB stick or SD Card into your PC and choose [Clone] & Install 38

Your USB Drive or SD Card should be listed in the drop-down box. If you have multiple USB devices or SD Cards connected, select the correct one and click [Install Tails]. Remember; you will lose everything on the USB stick or SD Card, so if you are in any doubt which USB or SD Card is the correct one, remove all except the one you are going to use to install TAILS with persistent storage onto.

39

When the process is finished, you should receive a confirmation dialog. Your portable, persistent storage-able (but not enabled yet) TAILS installation is now ready. 40

Eject the TAILS DVD in your drive – you won’t be needing it again – and reboot your PC ([Start]->Administration->Reboot) leaving the USB stick or SD card in place. If your PC is not set to boot from an SD Card or USB stick, you will need to enter the BIOS as you did in Step 1. Refer to your motherboard manufacturers guide if you are in any doubt about how to do this.

41

Once your PC has restarted, follow Steps 4 to 6 above to get to the desktop. We now need to create the persistent storage volume. This tells TAILS what you want to allow to persist between reboots and that you want to reserve a bit of space on the USB stick or SD card to store all this information. Select [Start]->Tails->Configure persistent volume

42

The Setup Tails persistent volume screen should now display. The first stage is to choose a password to encrypt your persisted data. You will need to enter this every-time you login and it should be different from the simple password you enter in Step 5. This one should be complex, and you need to remember it. Remember; it’s protecting the evidence (not that you’ve anything to hide…) so don’t pick a password you’ve used anywhere else (Facebook, Gmail etc), make it strong and don’t forget it! (There is no recovery if you do).

43

When you’ve chosen, click the [Create] button. You will now be asked which information you want TAILS to persist. For the purposes of this tutorial, persist everything by clicking it to show the green arrow adjacent to each row. Ensure you scroll down to select everything. 44

  1. Click the [Save] button to commit your changes.
  2. Your persisted volume is now configured, but not yet enabled. You need to reboot to make the changes permanent. Select [Start]->Administration->Reboot to restart.
  3. When TAILS has restarted, you’ll be presented with a different login screen to the one you’re used to:

45

  1. Under Use persistence? choose [Yes] and in the Passphrase box, enter the password to your persist volume that you entered in Step 11. Leave the Read-Only? box unchecked. Under More options? select [Yes] and click [Forward].
  2. Repeat Step 5 and log into TAILS then return to this stage.
  3. Since TAILS only persists very specific selected information, we now need to download a few packages (including Electrum and the TMP Electrum plugin) and create a few scripts that we can run every-time we want to start our Electrum wallet and automate the re-installation and configuration of everything we want to use. The URL’s we will be downloading from are:

    Since one of these is the The Marketplace Electrum plugin (and this can only be found on the TMP i2p website), begin by starting the I2P router ([Start]->Internet->I2P)

46

The I2P router will start and a browser window will open showing the I2P console. Click the I2P button (shown in red in the screenshot below) once or twice: 47

This will expand the side-bar and provide detailed information on the I2P network connectivity:

48

  1. Notice that in the screenshot above, the I2P console will report Rejecting tunnels: Starting up until it’s fully connected. Press [F5] to refresh the console until it says just Rejecting tunnels. This should mean you’re full integrated. Note: You can start another browser tab and try connecting to I2P sites immediately, but you may encounter timeouts until fully connected.
  2. Open a second browser tab and enter the TMP plugin URL http://themarketplace.i2p/forum/index.php?topic=83.0 into the address bar and press [Enter].
  3. You will receive a Warning: Eepsite Not Found in Addressbook error. Just click the stats.i2p jump service link to retry.

49

If the page subsequently returns another Warning: Eepsite Not Found check the URL and try again. Once you are successful, you should receive confirmation from the stats.i2p jump service: 50

The page should automatically direct either straight to the TMP forum or to an intermediary page asking you to enter the TMP URL into your I2P routers address book. If this happens, click [Save themarketplace.i2p to router address book and continue to eepsite] to continue. 51

  1. You will be prompted to enter some forum details. If you already have a forum account, enter the details here otherwise click the [Register] link and create yourself one. Once registered or logged in, you should be automatically directed to the plugin page. If not, re-enter the URL from Step 17.
  2. When the Plugin topic page loads, scroll down and click on the electrum_plugin.py link to download it:

52

When the dialog appears, choose [Save File] and the click [Browse for folders]. When the Enter name of file to save to… dialog appears, you should see a folder Persistent under the Places heading. Select this and then click [Create Folder]. Enter a folder name of startup, double click on it and save the electrum_plugin.py file in there by clicking the [Save] button. 53

Now put the https://pypi.python.org/pypi/ecdsa into the address bar and navigate to the page. Scroll down until you see the link to the file at the bottom, click the ecdsa-0.10.tar.gz link and save it to the same startup folder you just saved the plugin file in Step 20. Note: The version may differ from that specified. As long as it’s 0.10 or greater, you’re good.

54

Navigate to https://pypi.python.org/pypi/slowaes. Choose the slowaes-0.1a1.tar.gz file link and save it to the same startup folder you saved the preceding two files into. Note: The version may differ from that specified. As long as it’s 0.1a1 or greater, you’re good. 55

Finally, navigate to https://electrum.org/download.html and choose the Electrum-1.9.6.tar.gz (or later) file and save it to the same startup folder as the preceding three files.

56

All the required installation packages are now in place. The next stage is to create two scripts; setup and start that will be used to automate to installation and startup of Electrum. Remember; Even with persistence, TAILS forgets things like custom application installations (Electrum) between reboots. The next section is going to involve the TAILS terminal and a really nice text editor called vi (you will learn to hate it). To make it clear what you will be typing into the terminal, commands will be shown like this: I am one command// I am a comment and should not be typed I am another command A new line indicates you press [Enter] to execute the command. The // and any text after it indicates an informational comment and should not be typed. In the example above you would enter I am one command press [Enter] and then enter I am another command and press [Enter]. Navigate to [Start]->Accessories->Terminal 57

to bring up the terminal and get started:

58

Enter the following commands cd Persistent cd startup ls -l// Lists the directory contents. Run this at any stage to see what files and child folders exist in the current folder you are currently in The resulting view should look similar to this (your file versions may differ if they are more recent): 59

Now you are going to create two script files that will automatically install Electrum and load it when run. The file you create will look something like this (commands follow further down) in the vi text editor:

60

Note: The important thing is to make sure that if you are using ecdsa, Electrum and slowaes files with more recent versions than those in the screenshot, that you put the name of the files you have downloaded in – don’t just copy it verbatim from the screenshot. Ensure you look at what the files are called (see preceding step ls -l command). The file names are case sensitive. Now the commands to create the setup script shown in the screenshot above: vi setup// Starts the vi text editor sudo apt-get install python-qt4 python-pip// The sudo command means run everything in ‘god’ mode (same as ‘Run as Administrator’ in Windows). It prompts for a password each time it’s called. sudo pip install slowaes-0.1a1.tar.gz// Remember to change the filename to match the one in your directory if it’s different sudo pip install ecdsa-0.10.tar.gz sudo pip install Electrum-1.9.6.tar.gz sudo cp electrum_plugin.py /usr/local/lib/python2.6/dist-packages/electrum_plugins/ Control+C// This is the [Control] key and the [C] key together Control+C :exit// This will exit out of vi text editor, and write the contents of your setup file you just typed out chmod +x setup// This makes your setup file executable Note: If you are ever editing a text file in vi and you mess up, press [Control]+[C] keypair twice and type: :q! to quit without saving. Now we will create the start file. The result should look like this: 61

Enter the following commands: vi start// Starts the vi text editor sudo electrum -w ./wallet/electrum.dat// Starts Electrum and stores the wallet file in a sub-directory wallet that sits under startup Control+C// This is the [Control] key and the [C] key together Control+C :exit// This will exit out of vi text editor, and write the contents of your start file you just typed out chmod +x start// This makes your setup file executable This step is only necessary because a bug in the TMP Electrum plugin at the time of writing. It doesn’t hurt to check so there is no harm in running this step, but you only need to do it once, not every-time you login. You are going to edit the electrum_plugin.py file and change the line from gui.qt.util import * to read from electrum_gui.qt.util import *. The file – when changed – will look like this

62

  1. Enter these commands to accomplish this:vi electrum_plugin.py from electrum_gui.qt.util import *// Change the line from gui.qt.util import * to from electrum_gui.qt.util import * Control+C Control+C :exit Note: If the file already contains the correct line, you can just quit without saving by entering these commands:Control+C Control+C :q!
  2. Now make a folder to store the Electrum electrum.dat file in. Like the preceding step, you only need to do this once: mkdir wallet
  3. Now let’s test the two script files you’ve created in Steps 26 and 27.Note: You will need to run these two script files every-time you login to TAILS after rebooting, so remember Steps 24 and 25 to reach the right folder and then run the commands below in the terminal. Remember; TAILS loses it’s memory between reboots (well most of it even with persistence).Enter the following command (You will be prompted for a password – this is the simple login password you chose back in Step 5) and enter [Y] at any prompts asking for a yes or no question:./setup// You will be prompted to enter the simple login password you chose back in Step 5 when you logged in. This is not the password to your persistence data If the script has been formed correctly, you should see a result like this:

63

Now run the start script. Remember; you need to run this along with setup (which you will run first) every-time you log in. ./start// You will be prompted to enter the simple login password you chose back in Step 5 when you logged in. This is not the password to your persistence data If it’s worked, Electrum should start! (Ignore the image warnings in the terminal)

64

  1. Create a new wallet or restore an existing wallet from a seed/master public key and press [Next] through the wizard until Electrum loads. Remember; the electrum.dat file created by the TAILS Electrum installation is stored in the folder startup/wallet when you first start the terminal, if you want to back it up.
  2. Once Electrum has loaded, click the red globe in the bottom right hand corner to configure the network settings

65

When the Network dialog loads, change the Proxy drop down to SOCKS5 and in the adjacent boxes enter 127.0.0.1 and 9050. Click [OK] 66

Electrum might quit out back to the terminal. If it does, just restart it using: ./start At this point you may receive a prompt warning you a potentially unsafe connection. This is just TAILS warning you its detected Electrum trying to connect out. Just click [OK] 67

Since you are configured to connect over TOR, it can take a few minutes to find a suitable Electrum server to synchronise with. You will know it’s worked because the red globe will be replaced with a two arrows orbiting a grey globe, indicating Electrum is synchronizing and finally a green globe when fully synchronised. 68 69

If Electrum doesn’t get a connection in a few minutes, try restarting it and also try selecting an alternative server from the Network screen. To do this click the globe again, and in the Network dialog uncheck Auto-connect and choose a different server (electrum.novit.ro usually responds well), then check the Auto-connect box again, click [OK], exit Electrum and restart it from the terminal with: ./start You will now need to enable the TMP plugin you painstakingly edited earlier (unless it’s been fixed). Click on Tools->Plugins menu, and select The Marketplace and click [Close]. Exit Electrum and restart it and if it’s worked you should see a new tab; The Marketplace:

70

  1. Finally, to round of this exercise, lets shutdown and check that all the hard work has been persisted. Exit Electrum and in the terminal window type:sudo rebootAlternatively you can reboot via [Start]->Administration->Reboot.
  2. These following steps you will need to follow every-time you load TAILS. For brevity, screenshots will be omitted and existing steps referenced.When TAILS has restarted, enter the persistence volume password and a simple administration password as outlined in Step 14.
  3. Start the I2P service from [Start]->Internet->I2P and leave it to integrate as seen in Steps 16 to 19.
  4. Open a terminal as demonstrated in Step 24 and change to the Persistent folder and then the startup folder as demonstrated in Step 25.
  5. Finally, from within the terminal run the setup followed by start command as demonstrated in Step 30 (setup) and Step 31 (start), configure the proxy settings according to Step 33 and enable the necessary plugins according to Step 35. Exit Electrum and rerun start to initialize.If everything has persisted correctly, Electrum will now start synchronizing and you’ll find your Bitcoin Addresses (order keys / transactions etc) will have been preserved.

Additional information on PGP key management and detail on the TMP plugin will follow in subsequent versions of this guide (hopefully). Final note: there is probably a great deal more integration and optimization that can be done and you should not interpret this as the defacto guide to best practice – the author is not an expert. It should get you up and running with a degree of security and once you are happy, you can begin experimenting with the additional functionality afforded by TAILS.

Order Refunds (Order Cancelled, Order Rejected)

Refunds are the mechanism used by TMP to return Bitcoins to a buyer who has:

  • paid for an order but decided to cancel it; or
  • had a paid order cancelled by a seller

For any order that has been paid but that has not been Approved by the seller, the buyer will be able to claim a refund. Lets cover the process step-by-step from the buyers perspective. NOTE: If you are experimenting to understand the refund process, you will need to use some Bitcoins (the process isn’t risk free). If you are a seller, you can create and purchase one of your own products (See Selling for more information). If you are just an average, curious buyer – find a suitable cheap product from a listed vendor and just [Cancel] the transaction as soon as you have paid for it. Create an order on TMP by following Steps 21 to 35 inclusive of the buyers guide. Immediately after making payment and recording the transaction ID, your order screen should look something like this: 71

It does not matter if your payment has received any confirmations – just click the [Cancel order] button. The order will vanish from your list (This can be slightly confusing since TMP does not at the time of writing provide any feedback to you as a buyer, but don’t worry – your refund exists). From the menu on the left-hand side under the Orders heading, click the [Refunds] link to bring up the Refunds Window: 72 When the window displays, you will see a list of all the Refunds that are available for you to claim. Remember: One paid cancelled or declined order = one refund. In the Withdraw to wallet field, enter the Bitcoin Address you want your refund sent to and click the [Sign] button. This can be any Bitcoin Address – for example an exchange deposit address, a blockchain.info wallet address, a paper wallet address etc. Wherever you like, just make sure you own it. 73 The Transaction window will now be displayed – DONT PANIC! It looks complicated, but its pretty straightforward once you get the hang of it. Remember the Concepts? TMP has taken your requested refund Bitcoin Address and created a signed transaction (inserted their key) into the Bitcoin Deposit Address that your Bitcoins are currently sitting in. So, in order for those Bitcoins to be released to you, you – as the buyer – also need to sign on the dotted line (insert your key). Once you’ve signed off, you can broadcast the transaction to the Bitcoin network and the Bitcoins will wing their way to your nominated Bitcoin Address. 74

In the subsequent steps, you’ll be running two commands:

  • signrawtransaction: Allows you to sign-off the transaction (inserts your key into the Bitcoin Deposit Address)
  • sendrawtransaction: Broadcasts the signed transaction to the Bitcoin Network. Remember: Bitcoin is a big distributed ledger, it has to know about the transaction or it didn’t happen

To run these commands you will need to have Bitcoin-QT installed and connected to the internet. You will also need the Private Key from your repurposed Bitcoin Address that you stored when you created your order (See Steps 24-to-27 in the Buyers Guide). Before we get to the Bitcoin-QT commands, we’re going to decode and check the transaction on https://blockchain.info/decode-tx. This (and the following step) are purely optional stages, but just lets you feel comfortable that your refund is going to go to the Bitcoin Address you have nominated. Highlight the text between the quotes as demonstrated in the screenshot below, and copy it to your clipboard: 75

Navigate to https://blockchain.info/decode-tx inside the TOR browser (to protect your privacy) and paste the text in and click the [Submit Transaction]. The result should be something like that shown below: 76 Now that you’re happy with the proposed refund, you want to sign it off and get back the Bitcoins. Open Bitcoin-QT, go to Menu->Debug Window and click the Console tab. The view should look like this:

77

  1. You now need to create the signrawtransaction command from the transaction text provided by TMP and the Private Key from the repurposed Bitcoin Address. Mercifully, there are some quick and dirty formatting tools to do most of the work for you at the base of this guide under the Transaction String Formatting – Refunds heading. There are two stages:

    We’re going to use these tools, click the link to Stage 1 above, and paste the requested values into the boxes (The Private Key and the TMP signed transaction text). A helpful screenshot tells you what text you need to copy from the TMP window. Once you’ve done this, click the [Format Refund Transaction] button and copy the blue result text that appears below to your clipboard.

  2. Return to the Bitcoin-QT debug window and paste all the text in and press [Enter].
  3. You should receive a result something like this in the black text:

78

  1. The most important thing to look out for complete: true – this is the gold you want to see and means the process has worked. The money is nearly yours.
  2. Finally, you need to broadcast the shiny signed transaction to the Bitcoin network. Copy all the black text (outlined in the red box in the screen shot in the previous step) to your clipboard, navigate back down to the Transaction String Formatting – REFUND Stage 2 and paste the text in and click [Generate Refund Broadcast Transaction Command].
  3. Copy the purple text to your clipboard, paste it into the Bitcoin-QT Debug window and hit [Enter] on your keyboard.
  4. You’re done. The return from the sendrawtransaction command will be a transaction ID you can use to monitor the progress of the transaction on the Bitcoin network:

79 The very last step is to return to TMP and click the [Mark as Claimed] button. This just removes the refund from your list so don’t [Mark as Claimed] until you’ve confirmed your Bitcoins have been successfully refunded. 80

Selling on The Marketplace

This section covers the setup of your shop and the creation and sale of your first product. The great thing at TMP is that you can configure your store-front and sell yourself one of your products without having to actually obtain full permission from TMP staff to offer products. No one else will be able to buy your products until you are approved, but it does provide a great way to test the process end-to-end without relying on some third party to buy something. The product that we will be creating will be a test. Note: that you will pay a service fee for every completed order to TMP, even if you’ve sold to yourself. So we’ll be using the minimum values possible to reduce your exposure but the process won’t be free. Log in to your TMP account and select the [Become a vendor] menu option on the left hand side: 81

  1. Review the Security Policy and Vendor Agreement. Once you are satisfied, select [Continue] from Vendor Agreement screen.
  2. In the Vendor Creation: Shop Settings window provide the name of your shop and an appropriate tag line. Leave the Public checkbox unchecked for now (You will need to change this when you’re account is approved and you want buyers to be able to see your shop). Once you’re happy, click [Next]

82

In the Vendor Creation: Profile window, provide some information about yourself, your terms and conditions etc and click [Next] 83

In the final agreement window, click [Finish] and your shop will be created. You will now notice that a Shop Management icon has appeared across the top of your menu. Click this to navigate to the shop interface. Note: To approve your shop so that you can receive real orders, you will need to contact the individual listed. This is not necessary for the purposes of this test shop, but remember; until approved your shop is only visible to you. 84

The Shop Management interface gives you an overview of your orders, allows you to manage products, shipping options, orders and – most important – retrieve Bitcoins stored in Bitcoin Deposit Addresses from completed orders. The screen has been annotated below: 85

  1. Lets start by dealing with the most complicated part; creating the keys (read: “wallets” in TMP terminology) you need for orders that you will receive. Click the [Wallets] link on the left hand side and the
  2. every-time a buyer wants to pay you for an order, TMP forms a Bitcoin Deposit Address from one of your keys, a key it generates internally behind the scenes, and a key provided by the buyer (See steps 23-to-27 of the installation section of this guide for a recap of this process from the buyers perspective).

86

As a seller, you therefore need a large stock of keys that can be used by TMP and your buyers to generate a unique Bitcoin Deposit Address. For every Bitcoin Deposit Address created, one of your keys is consumed. Annoyingly this can mean that buyers can enter their key, TMP generates the Bitcoin Deposit Address using one of yours, one of its own and the buyers key, but then the buyer doesn’t pay and you’re down a key. It is therefore important to remember that the signing wallet count (See Step 6 screenshot) is not reflective of the number of orders you will have. Unpaid orders will never be seen by you – they just cost you a key.

Since a key (read: “wallet”) is just a repurposed Bitcoin Address, there are a number of ways to generate them. One of the easiest way to create a bulk lot of Bitcoin Addresses is using the Bitcoind.exe that comes with Bitcoin-QT (see prerequisites for links). This is a great way to do it because bitcoind then takes care of storing your Bitcoin Addresses (your keys) securely in its own wallet.dat and you can also easily access the private part of each ‘key’ that you need when you come to claim your Bitcoins from completed orders. You’re basically using Bitcoin-QT as a vault to store all your order keys. A guide on this will be covered elsewhere.

Note: Bitcoin-QT does not need to be connected to the internet, you can create your Bitcoin Addresses you will use as keys completely offline – the magic of Bitcoin math.

The second, simplest but more manually intensive way is to use a Bitcoin Address generator website. Because this is a simple guide to get you into the swing of things, that’s what we’re going to use.

  1. In a separate browser window, navigate to https://www.bitaddress.org/. Move your mouse around (if prompted) to begin the initial Bitcoin Address generation process. Once it has returned a Bitcoin Address, open Notepad or your favourite text editor (or you can use Excel). Add three columns; “Bitcoin Address”, “Private Key” and “Public Key (130 Chars)” and copy the Bitcoin Address and Private Key into the Notepad file. Leave the Public Key column blank, we’ll populate that presently. Repeat this process to generate two addresses, the resultant Notepad file should look like:
    87
  2. Click the Wallet Details tab and enter the Private Key from one of the addresses in your Notepad file. Click [View Details] to display all the information about the Bitcoin Address. Highlight the Public Key (130 characters [0-9A-F]): value and paste it alongside the appropriate Bitcoin Address in your Notepad file. Repeat for the second address. The result should look like this:
    88
  3. You’ve now generated two order keys! This means that TMP can create two Bitcoin Deposit Addresses and – if your customer pays – you would have two orders. Return to TMP Wallets screen and click the Add Wallets button to add your newly generated keys.
    Note: Ensure you save the Notepad file somewhere safe. You will need the Private Key against each Bitcoin Address (key) to retrieve the Bitcoins associated with that order.
  4. In this window, you can bulk add a massive amount of keys. For the purposes of this demonstration, we’re just going to add the two we created. The window helpfully tells you how you should format your keys: Bitcoin-Address Bitcoin-Address-Public-Key. Paste the appropriate strings from your Notepad file in to this window, pressing [Enter] to place each key on a new line. The result should look like this:
    88
    Once you’re done, click the [Add Wallets] button to store your keys in your account.
  5. The screen will now return you to the “Wallets” overview. You will see your shiny new keys have been added, and the adjacent (X) allows you to see if it’s been used to generate a Bitcoin Deposit Address yet. Since you have no orders, this will just show an X against both keys. Remember: Your “wallets” (read: keys) can only be used once; Basically One key to one order (even if unpaid).
    89
  6. Once you’re done, click the [Add Wallets] button to store your keys in your account.
  7. The screen will now return you to the “Wallets” overview. You will see your shiny new keys have been added, and the adjacent (X) allows you to see if it’s been used to generate a Bitcoin Deposit Address yet. Since you have no orders, this will just show an X against both keys. Remember: Your “wallets” (read: keys) can only be used once; Basically One key to one order (even if unpaid).
    90
  8. You’re now good to create a product and sell it to yourself (excited?). First up, you need to define a Shipping Option. Click the Shipping Options link from the menu on the left hand side. Once the dialog appears, click the [Add] button in the top right to define a new option. Fill in some details and click [Create].
    91 You’ll be returned to the Shipping Options screen where your available options will be summarised.
    92
  9. The next stage is to create a product to sell to yourself. Click the Products link from the menu on the left-hand side. The Products summary screen will be displayed.
    93
  10. Click the [Add] button to begin the Product creation process.Create your product along the lines demonstrated in the screenshot below. Ensure the Visible box is not checked (You don’t want to show the test product if you’ve asked for your account to be approved) and also ensure you minimize the cost of your product to the lowest amount possible (Just incase things go wrong).
    94
  11. When you’re happy, click [Create] to add the product to your inventory.Once the product has been added, you’ll receive notification across the top bar and the page will redisplay your product in ‘update’ mode. Also a new button will appear; [View on site]. The [view on site] button allows you to preview your product as your buyers would. It also allows you to purchase the product yourself, allowing you to test the order process.
    95 Click the View on site. This will open a new tab showing your product. Select a Shipping Option and choose [Add to Cart]
    96 The product will now be added to your cart and you’ll be able to preview the process as any buyer would. In order to save space, navigate back up this guide and follow Steps 21 to 35 inclusive of the buyers guide. Once you’ve done that, return here and click the Shop Management link to return to the shop management overview screen.
  12. As soon as the payment for the recently created order has cleared (reached 6 confirmations), your management view will show the order in the New Orders sub-window. Go ahead and click [View] next to the order:
  13. 97
  14. You now be presented with the order summary screen. Shipping information, payment and product information is summarised here. You also now have the option of either accepting or rejecting the order. Click [Approve]
    98
  15. Now you have accepted the order, your view will change to allow you to migrate the order to the final state of fulfilment: Shipped. At this point, you can either click Mark As Shipped or leap back to the Orders overview so you can see how the various sub-windows have updated. Once you are happy, return to the order and click [Mark As Shipped]:
    99
  16. Finally, once you have shipped the order, it will migrate to Shipped Orders sub-window. Shipped orders are ones which require no further interaction from you. At this point, the buyer needs to Finalize the transaction to indicate the goods have been received and you can move on to the final stage and claim your Bitcoins.
    100
  17. As you are the buyer in this transaction, you need to return to the buyers view so you can Finalize the order. To do this, click on your account name and select Account from the menu. From the left hand-menu, under the Orders heading, click [List].
  18. When the order details screen comes up, click the Finalize order button. Leave yourself a nice review, you deserve it. Once you are done, return to the Shop Management interface.
  19. Before you can collect payment, you need to make sure you have nominated a Bitcoin Address that TMP will use to generate the transaction that releases the Bitcoins from the Bitcoin Deposit Address to you. To do this click the Settings link from the menu and the Vendor Settings window will be displayed:
  20. 101
  21. Enter the Bitcoin Address that you want to use to receive the Bitcoins retrieved from the Bitcoin Deposit Address. This could be an exchange deposit address, a blockchain.info wallet address a paper wallet – anywhere you like. Just make sure it’s one you own. When you are done click [Save].Finally, lets retrieve payment. From the menu on the left-hand side, select [Payments] to bring up the payments window. This shows all the payments (remember it’s one payment per order) that are waiting for you. Click the [Sign] button against the payment.
    102
  22. You are now presented with the signing window – DONT PANIC! It looks complicated, but its pretty straightforward once you get the hang of it.As indicated in the Concepts part of this guide, this is basically the transaction that has been created and signed by TMP and now just needs your signature to release the funds to you. There are two commands shown in this window, the first is signrawtransaction which when run, is basically you signing on the dotted line and giving authorisation to move the Bitcoins from the Bitcoin Deposit Address used for the order to your nominated Bitcoin Address. The transaction also includes TMP’s service fee which is sent to a Bitcoin Address they choose. You can actually decode the transaction to see what’s going to go where by pasting the highlighted text into https://blockchain.info/decode-tx:
    103
  23. and this is what you should see on blockchain.info (Remember to only visit in TOR Browser – just to ensure your privacy)
    104
    1. The second command is sendrawtransaction and all this does is broadcast the transaction you signed to the Bitcoin network (need a Bitcoin-QT client with an internet connection for this). Only then can the actual Bitcoin transfer take place (remember; Bitcoin is a big distributed ledger, it has to know about it, or it didn’t happen).Now that you (hopefully) understand the commands you are going to run – you need to run them. To be able to that we are now going to switch back to Bitcoin-QT which you’ve hopefully got running.
    2. To run the commands open Bitcoin-QT, go to Menu->Debug Window and click the Console tab. The view should look like this:
  24. 105
  25. Open the Notepad file you created back in stage 10, and copy the Private Key associated with the Bitcoin Address indicated in the TMP Transaction window to your clipboard (highlighted in blue below):

106

  1. You now need to insert the private key in place of the text marked PRIVATEKEYHERE in the string and then copy everything from the word signrawtransaction to your clipboard and paste the result into the Bitcoin-QT debug window. Mercifully, there are some quick and dirty string formatting tools to do most of the work for you at the base of this guide under the Transaction String Formatting – Payment Retrieval heading.
  2. Paste your private key that’s (hopefully) still on your clipboard in the Private Key box and all the text from the signrawtransaction box into the Transaction text box and press [Format Transaction].
  3. Now copy all the blue text onto your clipboard and return to the Bitcoin-QT debug window and paste it in and press [Enter].
  4. You should receive a result something like this in black text:

107

  1. The most important thing to look out for complete: true – this is the gold you want to see and means the process has worked. The money is nearly yours.
  2. Finally, you need to broadcast the shiny signed transaction to the Bitcoin network. Copy all the black text (outlined in the red box in the screen shot in the previous step) to your clipboard, navigate back down to the Transaction String Formatting area Stage 2 and paste the text in and click [Generate Broadcast Transaction Command].
  3. Copy the purple text to your clipboard, paste it into the Bitcoin-QT Debug window and hit [Enter] on your keyboard.
  4. You’re done. The return from the sendrawtransaction command will be a transaction ID you can use to monitor the progress of the transaction on the Bitcoin network:

108

The very last step is to return to TMP and click the [Mark as Claimed] button. This just removes the transaction from your list so don’t [Mark as Claimed] until you’ve confirmed your Bitcoins have been successfully redeemed.

109

A few final words. Don’t worry about re-running the claim commands a few times, when you broadcast the transaction (sendrawtransaction) the Bitcoin network will only recognise the first successful attempt, so any further tries won’t yield more Bitcoins, they’ll just be ignored.

Finalising transactions outside of The Marketplace

 

In this section we cover how to go about recovering Bitcoins from a Bitcoin Deposit Address without using TMP. The purpose is to illustrate that, in the event of TMP collapsing, sellers and buyers can still complete outstanding paid orders lessening the financial impact on both the parties involved (buyer and seller). If you have not covered the Concepts section of this guide, take a moment to recap before continuing. Since this tutorial is primarily aimed at sellers, we’re going to be selling ourselves a product (See Selling on The Marketplace section). This makes it easy to ensure we’ve got access to the necessary keys required to unlock the Bitcoins in the Bitcoin Deposit Address for the order we’re going to create.

Before beginning, there are a few things that – sellers especially – should be aware of. In order to recover any of the Bitcoins that reside in an order Bitcoin Deposit Address, both the seller and the buyer have to be able to contact each other. This is necessary because either the buyer or the seller is going to need to fill the shoes of TMP and create and sign a transaction (insert their key) that will then be provided to the counter-party to also sign-off on (insert their key) and broadcast the result to the Bitcoin network so the Bitcoins can be released from the Bitcoin Deposit Address. Since a buyer and a seller do not ever come into direct contact with each-other through TMP except when using TMP’s messaging system (remember; orders a seller receives are never explicitly tied to a TMP buyer’s account), establishing communication channels can be the trickiest part.

As a general rule of thumb, buyers who have paid for an order but who have not had their order accepted by a seller at the time of TMP’s closure or have not yet received a shipped order, are going to be more inclined to make the effort to get in contact with the seller. Buyers who have received their order but had not Finalized it at the time of TMP’s closure are significantly less likely to make the effort to help the seller recover any Bitcoins trapped in the Bitcoin Deposit Address for the particular order. The buyer won’t be able to recover the Bitcoins either, so there is no financial gain – it just means that the Bitcoins will remain trapped in eternity until either TMP recovers, or the two parties (buyer and seller) can get in contact and come to an agreement.

To summarise; as a seller do not assume you will be able to recover all outstanding funds owed to you for shipped orders. You should be able to recover something though, and something is better than nothing. It’s also 100% more than traditional trust based darknet markets (E.g. Pandora, SilkRoad2, BlueSky etc).

Note: If TMP subsequently returns after an outage, a seller can set about reclaiming any Bitcoins in outstanding orders where the buyer was uncontactable, using the platforms built in mechanisms (See Steps 23-to-34 in the Sellers section) and a buyer can set about recovering Bitcoins from any Unapproved order through the refund mechanism (See All steps in the Order Refunds section). It may be a bit of an auditing headache to reconcile everything; remove orders that have been claimed outside TMP and claim orders that haven’t, but that’s it. Because the Bitcoins for each paid order are sitting in their Bitcoin Deposit Address it’s just a matter of claiming them. A seller doesn’t have to trust TMP to have a wallet filled with Bitcoins to back an ephemeral website balance (Think: Sheep Market and the Bitcoin withdrawal issues suffered near its end when someone had run away with all the money).

How a seller and their buyers get in contact with each-other is a matter of personal choice. It could be as simple as including a contact email address on the vendor profile, posting a PGP encrypted message (encrypted with the public PGP key of the recipient) on a high-traffic social platform such as Reddit, or through a more secure durable communication platform such Bitmessage combined with TOR (recommended approach).

Note: The use of Bitmessage is not covered in this tutorial. Links to a simple tutorial are provided in the Prerequisites section of this guide.

Let’s begin…

Place an order with yourself by following Steps 8 to 18 inclusive of the Sellers section. Click the [Shop Management] link on the top menu-bar to view your shops overview. You should see your recently paid order sitting in the New Orders sub-window:

109 110

Click the [View] button adjacent to order to bring up the order detail screen. When this displays, click the [Show Payment Information] button along the top:

111

to display the payment information associated with this order:

112

Now that you hopefully have a better understanding of the information shown on the Payment Information screen, you will want to know which bits are actually relevant to make you able to retrieve the Bitcoins outside of TMP. The only pieces of information you need from this screen are:

  • The Redeem Script; and
  • The Escrow Wallet (This is the Bitcoin Deposit Address); and
  • The Transaction ID; and
  • The Sellers Public Key

You might be wondering why you don’t need the other ‘Public’ keys? You don’t need them because – as the seller – you already have the ‘Private’ part of your key to the Bitcoin Deposit Address, which you recorded in your Notepad file in Steps 8, 9 and 10 of the Sellers section. The ‘Private’ part of your Bitcoin Deposit Address key is effectively the real key, while the ‘Public’ part is the equivalent of being able to tell the world that you have ownership of the ‘Private’ part but doesn’t allow anyone who has it to use it to move Bitcoins out of the Bitcoin Deposit Address. ‘Private’ trumps ‘Public’.

You are recording the sellers public key because it will make it easier for you to track down the correct Private Key to use to sign-off the transaction. If you’ve got 1000′s of keys – all for different orders – it would be a management nightmare trying to work out which Private Key you needed to use to unlock the Bitcoin Deposit Address. Recording it here means you can just search the Notepad file you created Step 10 of the Sellers section (or whatever storage method you’ve chosen to use).

Note: Because you are also acting as the buyer in this tutorial, you will also have access to the buyers Private key which you recorded in Steps 24 and 25 of the Buyers section when you placed your order. In normal circumstances you would not have access to this and so once you created and signed the transaction (inserted your key), you would pass the signed transaction to the buyer for them to also sign-off (insert their key) and broadcast the result to Bitcoin Network to release the Bitcoins from the Bitcoin Deposit Address. Don’t worry, this will all be covered in detail in the following steps.

Open Notepad or your favourite text editor, and create four columns: Bitcoin Deposit Address, Transaction ID, Redeem Script and Sellers Public Key. Copy the values from the Payment Information screen. The result should look something like this:

113

You now have the information you – as the seller – need to create and sign (insert your key) the transaction. For the next part we’re going to be using a combination of https://blockchain.info/rawtx (Visit in TOR) and the Bitcoin-QT Debug window. You can do everything in the Bitcoin-QT Debug window but by using blockchain.info, we minimize the chances of mistakes.

The Bitcoin commands we will be running are:

  • createrawtransaction: (Run by: Seller) – Creates the transaction that releases the Bitcoins from the Bitcoin Deposit Address to the sellers chosen Bitcoin Address (a paper wallet, blockchain.info wallet or Bitcoin exchange – any Bitcoin Address the seller owns)
  • signrawtransaction: (Run by: Seller and Buyer) – Two keys must be inserted to release the Bitcoins, so the first signatory (key insertion) will be from the seller. The seller will run this command (signrawtransaction) on the result from createrawtransaction in the step above. The output will then be passed to the buyer who will also run signrawtransaction to sign off (insert their key) and the final result can then be broadcast to the Bitcoin Network.
  • sendrawtransaction: (Run by: Seller or Buyer) – Broadcasts the transaction that has been signed by both the seller and buyer to the Bitcoin Network so the Bitcoins are actually moved (Remember; the Bitcoin Network needs to know about it or it didn’t happen). The transaction that is broadcast must be the one that both the buyer and seller have signed off on. In this tutorial this will be when the buyer runs signrawtransaction (final key in the lock). If the seller wants to broadcast the transaction, they can ask the buyer to just send them the result of signrawtransaction and then they (the seller) can run sendrawtransaction themselves. The result of running this command successfully is the transaction ID, which can be plugged in to blockchain.info to check its progress on the Bitcoin Network (number of confirmations etc).

To run the commands open Bitcoin-QT, go to Menu->Debug Window and click the Console tab. The view should look like this:

114

  1. To create the raw transaction, we need to know some information about the transaction that was used to deposit the Bitcoins into the Bitcoin Deposit Address. Fortunately, blockchain.info stores this information in an easily accessible manner, but you need to go to a special URL to get it. You can reach it by manually putting https://blockchain.info/rawtx/{REPLACE-ME-WITH-THE-TRANSACTION-ID-YOU-RECORDED-IN-THE-TEXT-FILE-IN-STEP-3}?scripts=true into your address bar, but mercifully, tools exist under the Transaction String Formatting – Create My Own Raw Transaction to guide you through the process (which is what we’ll use). The five stages are:

    Click the link to Stage 1 above, and paste the requested value into the boxes (The Transaction ID) to generate the blockchain.info link. Copy the link into your browser address bar (or click it) and copy all the text in the box highlighted onto your clipboard. Helpful screenshots by the stages tell you what text you need to copy where.

  2. Progress to Stage 2 and enter the information requested. You will source the Transaction text from Stage 1 which you have just run, while the Bitcoin Deposit Address and Redeem Script will come from the details you noted down in Step 3 from the TMP Payment Information screen. Once you have generated and run the createrawtransaction command, running it in Bitcoin-QT debug window should yield a long string in black text:
  3. 115
  4. Ensuring you leave all the boxes in Stage 2 populated, move on to Stage 3. For this you will need the Private key that is associated with the repurposed Bitcoin Address that you have – as the seller – used as your key to the Bitcoin Deposit Address. You should have this in a Notepad file which you made in Step 10 of the Sellers section. Search this file for the sellers public key you recorded back in Step 3. and enter the Private Key that is on the same row:

116

Once you’ve got the signrawtransaction command text back from half-way through Stage 3, run it in Bitcoin-QT Debug window. Notice that the result says complete: false (highlighted in green in the screenshot below). This means that only one signatory (you; the seller) has signed off (inserted their key). One more signatory is required (the buyer) before the Bitcoins in the Bitcoin Deposit Address can be released.

116 117

Copy the resulting black text (everything inside the red box in the screenshot above) into the Seller Signed Transaction Text box midway through Stage 3 and click the [Generate Transaction Signing Text For Buyer]. At this stage, you would normally send the resulting text to the buyer who would then continue the process from Stage 4, but since you are also the buyer just paste the resulting output into the Transaction Text provided to you by the Seller box along with the buyers Private Key (You should have hopefully stored this when you paid for your order – see Steps 24-to-27 in the Buyers Section to recap).

Press the [Generate Buyers Transaction Signing Command] and run the resulting output in Bitcoin-QT Debug Window. If the process has worked, you will see complete: true (highlighted in green in the screenshot below) . This is the gold you are looking for. This means the transaction is ready to be broadcast to the Bitcoin Network. The money is nearly yours!

118

  1. Copy all the black text highlighted in the red box in the screenshot above to your clipboard and paste it in to the Signed Transaction Text provided by the Buyer box in Stage 5. Click the [Generate Buyer-Seller Signed Broadcast Transaction Command] to generate the final command.
  2. Paste the result of Stage 5 into your Bitcoin-QT Debug window and run it. If the process has worked, you’ll be returned a transaction ID and your Bitcoins should be winging their way to you.
  3. 119
    1. That’s it. You’re done. Really. You may wish to house-clean so you don’t have a now unusable order clogging up your list. You can do that by declining it in the Shop Management view, and then – as the buyer – navigating to your refunds screen and just putting a random Bitcoin address into the claim screen and hitting the [Mark As Claimed] button. For detailed overview of the Refund process, see the Refunds section.

    A final cautionary note. Although (if you’re suitably masochistic) you might be thinking that you can circumvent TMP’s fees this way, you can – but they’ll find out. Remember, TMP is a key holder in every order, so it is trivial for them check paid Bitcoin Deposit Addresses and see which ones have had their funds spent without giving TMP their fee… repeat offenders (without mitigating circumstances) are likely to risk having their accounts closed. It’s in everyone’s interest to ensure everyone else gets their slice of the cake, so that buyers and sellers have somewhere safe, secure and reliable to conduct business on.

    Transaction String Formatting

    The default string that is provided when you want to claim a transaction does not work with the Windows Bitcoin Daemon. The reason is the escapement of quotes. This JavaScript will format the transaction into a block you can paste into a DOS box and get your signed transaction from.

    Payment Retrieval

    Stage 1. Generate DOS bitcoind.exe or Bitcoin-QT GUI Debug compatible signrawtransaction command

    Private Key:
    Transaction text:

  4. 120
  5. Result (Paste this into your DOS command box):

    or
    Result (Paste this into your Bitcoin-QT GUI Debug box):

    Stage 2. Generate DOS bitcoind.exe compatible or Bitcoin-QT GUI Debug compatible sendrawtransaction command

    Paste the result of the transaction text below to generate the final command you need to run to claim your funds

    Result (Paste this into your DOS command box):

    or
    Result (Paste this into your Bitcoin-QT GUI Debug box):

    Refunds

    Stage 1. Generate *REFUND* DOS bitcoind.exe or Bitcoin-QT GUI Debug compatible signrawtransaction command

    Private Key:
    Transaction text:

  6. 121
  7. Result (Paste this into your DOS command box):

    or
    Result (Paste this into your Bitcoin-QT GUI Debug box):

    Stage 2. Generate *REFUND* DOS bitcoind.exe compatible or Bitcoin-QT GUI Debug compatible sendrawtransaction command

    Paste the result of the transaction text below to generate the final command you need to run to claim your refund

    Result (Paste this into your DOS command box):

    or
    Result (Paste this into your Bitcoin-QT GUI Debug box):

    Create My Own Raw Transaction

    These tools are used to create raw transactions for you. They are used in conjunction with the Finalising transactions outside of The Marketplace section of this guide.

    Stage 1. Generate *RAWTX* URL on blockchain.info

    Transaction ID:

  8. 122
  9. Result (Paste this into your Brower address bar or just click it):

    Stage 2. Generate *RAWTX* DOS bitcoind.exe compatible or Bitcoin-QT GUI Debug compatible createrawtransaction command

    Copy everything from blockchain.info in the browser window (Stage 1 above) into the Transaction text: box below. Note: Stage 2 and Stage 3 need to be done one after the other.

  10. 123
  11. Transaction Text: (From the blockchain.info website)
    Bitcoin Deposit Address: (Sourced from the TMP Payment Information screen – under the Escrow Wallet heading)
    Redeem Script: (Sourced from the TMP Payment Information screen)
    Destination Bitcoin Address: (Where the Bitcoins in the Bitcoin Deposit Address will be sent)
    Miners Fee (Minimum of 0.0001 BTC): BTCSummmary
    Amount of BTC that you will receive:
    Amount of BTC the Miners will get as a fee:
    The total value of the transaction (Miners fee + What you receive):
    Result (Paste this into your DOS command box):

    or
    Result (Paste this into your Bitcoin-QT GUI Debug box):

    Stage 3. Generate *SELLERS RAWTX* DOS bitcoind.exe compatible or Bitcoin-QT GUI Debug compatible signrawtransaction command

    This stage depends on the values (Bitcoin Deposit Address, Redeem Script etc) that you have hopefully just entered in Stage 2. If not, complete Stage 2 before moving on to this stage and don’t clear the boxes.

    Paste the result of the createrawtransaction command from Step 2 into the Unsigned Transaction Text: box below to sign the transaction as the Seller

    Sellers Private Key: (Your key – as the seller – to the Bitcoin Deposit Address)
    Unsigned Transaction Text:
    124

    Result (Paste this into your DOS command box):

    or
    Result (Paste this into your Bitcoin-QT GUI Debug box):

  12. Now paste the result of the signrawtransaction command you’ve just run into the Seller Signed Transaction Text box below to generate the command you can send to the buyer to run (Isn’t this fun?)


    Seller Signed Transaction Text:

    or
    Result (Send this to the Buyer and ask them to enter it into Stage 4 below to complete the signing process):

    Stage 4. Generate *BUYERS RAWTX* DOS bitcoind.exe compatible or Bitcoin-QT GUI Debug compatible signrawtransaction command

    As the Buyer, you will need the Private Key from your repurposed Bitcoin Address that you stored when you created your order (See Steps 24-to-27 in the Buyers Section) to sign the transaction the seller has sent you. This will enable you (or the seller) to release the Bitcoins stored in the Bitcoin Deposit Address (See Stage 5).

    The text you are pasting in should look something like this:

    signrawtransaction 01000000014a4ba53608f7d2fb6f478d9e1f71c6f2f67de765
    958430fcfa969bdad3d1af14730440220692fdee8d5dd7c2aa9109731f4eeeb
    6ba751d7863b26a201000000f400539985aeb5a438a06bef976c5b6858b7a7
    f44965dd9f7dde80e47911902202833ab1c66fe878b1b0
    ca9474920c21ad49c6449e10d6e54fbf1471ce4d794c1658462a22d112eeaedef
    7a7aad8be912fb33737aa1017327af13a5d8bb721c65c5
    861ba52368119941045d2e9b84c928de41495356d692ca91daa41f49d7464b5
    7cdec1b9b63be3b36deb969bd4fbf1471ce4d794c165be
    bf4aed59cce2a2ca2b223aed122102b63b8203f05249767712175200901db1c70
    d836171df2fd05afeb016e42f3a2953aeffffffff01
    f7bf1400000000001976a914c3e998b45efd5ccd99a560019103fc6bf83f5a50
    88ac00000000 [{\"txid\":\"de7c252a46a8cf
    0f43585d751a76bf11a3d976da2263b86adc1ef70836a54b4a\",\"vout\":1,
    \"scriptPubKey\":\"a3d1014815899171c46a9ba3f
    7445ce6b1bd4b05485187\",\"redeemScript\":\"7ec170d2963831ec34d95
    b29158a06b2d112eeaedef7a7aad8be9134d95b22
    41045a9b63be3b36deb85aeb5a432fb33737aa
    1017327af13a5d8bb721c65c5861ba52368119941045d2e9b84c928de4
    1495356d692ca91daa41f49d7464bef976c5b6858b7a
    7f44965dd9f7dde80bebf4aed59cce2a2ca2b223aed122102b63b8203f0
    5249767712175200901db1c70d836171df2fd05afeb
    016e42f3a2953ae\"}] [\"BUYERS_PRIVATE_KEY_GOES_HERE\"]

    Buyers Private Key: (Your key – as the buyer – to the Bitcoin Deposit Address)
    Transaction Text provided to you by the Seller:

    Result (Paste this into your DOS command box or send it to the Seller):

    or
    Result (Paste this into your Bitcoin-QT GUI Debug box or send it to the Seller):

    Stage 5. Generate *BUYER OR SELLER RAWTX* DOS bitcoind.exe compatible or Bitcoin-QT GUI Debug compatible sendrawtransaction command

    Paste the result of running the signrawtransaction text from Step 4 above in Bitcoin-QT, into the box below to generate the command to tell the Bitcoin Network to move the Bitcoins from the Bitcoin Deposit Address. You should see the words complete: true in the text you paste in.

    125
    Signed Transaction Text provided by the Buyer:

    Result (Paste this into your DOS command box):

    or
    Result (Paste this into your Bitcoin-QT GUI Debug box):

    Enjoy and improve.

    - MoonSh00t

You might also like:

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

2 comments

  1. TMP has good ideas, but flaw is using I2P instead of Tor IMO. As the guide shows I2P is more complicated than Tor to use and I suspect TMP will not succeed because average user who will use Tor will not use I2P.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Pinterest