How to claim Haircomb using a Web Wallet

Claiming on the testnet

There is a Web Wallet located at https://core.haircomb.org that I currently use, however any other web wallet you trust will work. In case you do not trust inputting sensitive seeds into any Web Wallet, install the software locally, and load the seeds/passwords locally, and only use the remote Web Wallet backend by enabling it via "Use and Refresh" button of the main page. This allows you to use the local self-hosted wallet code (without syncing) and the sensitive data never leave your machine.

Step 1 - Generating private keys

You can skip this step if you already have a wallet. Go to the Web Wallet's main page, and click on "Wallet" at the top nav bar. Click on "Mainnet key generate." After a short delay, you should see a string of characters appear; this is your public key. In order to save your private keys, click on "Export" at the top nav bar, enter a file name in under the "Export" field entry, and click "Export." This will provide you with a ".dat" file; this file contains your private keys and transaction history, both of which are needed to access your haircomb funds; DO NOT LOSE IT! Every time you engage in a transaction on Haircomb you will need to export and save a new, updated ".dat" file*.

Step 1.5 - Loading private keys/history

If you've just generate your first wallet, you can skip this step, however you will need to reference it in the future. Open the Web Wallet and go to "Export" on the top nav bar. Tick the "Allow paste import wallet" button. Next, using a text editor like Notepad or Notepad++, open your .dat file. You can alternatively also copy the .dat file(s) in file explorer. Make sure it's the most recent .dat file for this wallet. Highlight all the contents in the file and copy them. Go back to the web wallet, click on the background to make sure you do not have any entry fields selected, and hit CTRL and V at the same time to paste your wallet contents into the browser. You can see the import progress on the progress bar. After a short time you should be able to navigate to the "Wallet" section on the top nav bar, where you will see a list of your public keys. In case your .dat file is corrupted, because it was exported on an unsupported (mobile) browser by combapp 0.0.4, use the wallet recovery feature in combapp 0.0.6+ to import your wallet.

Step 2 - Getting Claiming Address

From the "Wallet" page, click on the public key of the Haircomb account you wish to have the COMB claimed to. On the bottom left, click "Stealth Addresses". This will generate a list of character strings on the righthand side of your screen; these are all addresses you can claim COMB to.

IMPORTANT NOTE: Each address can only ATTEMPT to claim COMB a single time; if you use an address to try to claim COMB, that address will NEVER be able to claim COMB again, regardless of if the attempt was a success. Every time you claim make sure to use a NEW stealth address.

Click on the stealth address you want to receive COMB at, and scroll down. On the left bottom you should now see a field labelled with "Bitcoin Stealth Claiming burn address (pay 330 sats once to claim, any btc sent will be lost).", which will contain a BTC address. This is your BTC CLAIM ADDRESS.

Step 3 - Claiming

Claiming is performed by getting your BTC CLAIM ADDRESS to appear as the highest P2WSH address on a BTC block the first time this address is ever seen. In order to do this, we take advantage of the fact that BTC miners almost always order the transactions in BTC blocks by the fee you're paying them. Not the flat fee, but the sats/vB fee. You can just try to guess what the current highest fee is and beat it, however there is a tool (https://github.com/nixed18/scuffed-claimtool) that can tell you what the current highest fee is, and you can then use BTC's replace-by-fee functionality to keep outbidding the current highest bid. You can build the tool yourself, or download a prebuilt version in the "Releases" section on the right.

Once you have Scuffed-ClaimTool, run it. Every 10 seconds it will print out the current highest P2WSH address that will be in the next BTC block. Open up your bitcoin wallet of choice and generate a transaction that will send 330 sats to your BTC CLAIM ADDRESS. When building this transaction, set the sats/vB fee to be greater than the fee listed on Scuffed-ClaimTool. Once you broadcast this transaction and it's populated in the BTC network you should see it appear in Scuffed-ClaimTool's readout. As long as it's the transaction that's being printed, when someone mines the current block you will receive the COMB claim.

If your transaction ever stops showing up on Scuffed-ClaimTool's feed, and a new BTC block has NOT yet been mined, it means you've been outbid. You can either attempt to bid over whatever the current bid is by using BTC's replace-by-fee to up your transaction fee, or you can accept you've lost this block and take the loss of however much BTC you've already committed in fees. Make sure you aren't accidentally trying to outbid yourself though!

Step 4 - Sweeping

Haircomb will only recognize transactions once 6 BTC blocks past them of been mined, so you'll need to wait an hour or so for your Web Wallet to see your new COMB. After the sixth block has confirmed, go to the "Export" page and click on "Scan mempool." When the scanning is complete, go to the "Coins" page and click "Load Claims". You should now be able to see your claim in a balance listed on both the "Coins" page, and on the "Wallet" page under the appropriate stealth address.

Once you have a successful claim in one of your stealth addresses, you'll need to move it into your primary address. This can by done by going to the Web Wallet, clicking "Wallet" at the top, clicking on the primary address of the stealth address that you used, and clicking "Sweep Stealth Addresses." Before clicking this button you should be able to see, on the right hand side of your screen, the stealth address that you used and the balance of ~1.5 COMB. After clicking, it should add this amount to your primary balance field. Once this is done, go to the "Export" page, and export a new .dat file for this wallet. This is now your most recent .dat file for this wallet and should NOT be lost, and will be the file you load in the next time you wish to interact with Haircomb.

Info:

*The reason for this is that haircomb, unlike other cryptocurrencies, does NOT store details about the transaction signature on chain. While someone who owns BTC can always reference the public BTC blockchain to find there transaction history and know what their current balance is, someone transacting in COMB cannot reference any public source. They are required to store and input that data. Losing access to your transaction history means that you can no longer prove, to yourself or to anybody you want to trade with, that your COMB exists.

Last updated