Skip to content

Instantly share code, notes, and snippets.

@jameswhite
Last active May 19, 2021 20:43
Show Gist options
  • Save jameswhite/b33ecb66f35b8edfe05a175098284495 to your computer and use it in GitHub Desktop.
Save jameswhite/b33ecb66f35b8edfe05a175098284495 to your computer and use it in GitHub Desktop.

claim-handshake

  • get a new-vm running debian buster, prep it with:
apt-get update
apt-get -y install nodejs npm build-essential jq screen
npm install node-gyp

( cd /tmp
  wget https://handshake.org/files/hsd-2.4.0.tar.gz         && tar xvzf hsd-2.4.0.tar.gz         && ( cd hsd-2.4.0/hsd ; npm install --production )
  wget https://handshake.org/files/hs-client-0.0.9.tar.gz   && tar xvzf hs-client-0.0.9.tar.gz   && ( cd hs-client-0.0.8/hs-client ; npm install --production )
)

Open 2 windows

first window run hsd

  (cd /tmp/hsd-2.4.0/hsd; ./bin/hsd --log-level info)

second window:

  (cd /tmp/hs-client-0.0.9/hs-client; ./bin/hsw-cli account get default | grep receiveAddress)
  • Copy the hs1* address between the quotes and save it (e.g. hs1qk695gdwl82u4uc2nssglxhg7ywh294gsyakhjm)
  • To save a copy of your private key, write down the output of the 12 word phrase on a piece of paper (do not save it in the cloud anywhere)
  (cd /tmp/hs-client-0.0.9/hs-client; ./bin/hsw-cli master) | grep phrase
  • claim your hns replace the hs1 address here
  ( cd /tmp;  wget https://handshake.org/files/hs-airdrop-0.10.0.tar.gz && tar xvzf hs-airdrop-0.10.0.tar.gz && ( cd hs-airdrop-0.10.0/hs-airdrop ; npm install --production ) )

  (cd /tmp/hs-airdrop-0.10.0/hs-airdrop; ./bin/hs-airdrop --bare ~/.ssh/id_rsa hs1qk695gdwl82u4uc2nssglxhg7ywh294gsyakhjm) 
  
  • Get the base64, and submit it with hsd-cli
  (cd /tmp/hs-airdrop-0.10.0/hs-airdrop; ./bin/hs-airdrop --bare ~/.ssh/id_rsa hs1qk695gdwl82u4uc2nssglxhg7ywh294gsyakhjm)
  (cd /tmp/hsd-2.4.0/hsd; ./bin/hsd-cli rpc sendrawairdrop __OUTPUT_BASE64_FROM_AIRDROP__
  • You should get a hash: e.g. b86ede04661695f78dd6f107b0b0adda104bd52f5806310a3b0ec310b8728995

  • monitor the transaction

clear; while [ 1 ]; do ( cd /tmp/hs-client-0.0.9/hs-client; ./bin/hsw-cli balance ) | jq -rc '.'; sleep 900; done | tee -a out
{"account":-1,"tx":0,"coin":0,"unconfirmed":0,"confirmed":0,"lockedUnconfirmed":0,"lockedConfirmed":0}
{"account":-1,"tx":0,"coin":0,"unconfirmed":0,"confirmed":0,"lockedUnconfirmed":0,"lockedConfirmed":0}
{"account":-1,"tx":1,"coin":1,"unconfirmed":4246894314,"confirmed":4246894314,"lockedUnconfirmed":0,"lockedConfirmed":0}
{"account":-1,"tx":1,"coin":1,"unconfirmed":4246894314,"confirmed":4246894314,"lockedUnconfirmed":0,"lockedConfirmed":0}
{"account":-1,"tx":1,"coin":1,"unconfirmed":4246894314,"confirmed":4246894314,"lockedUnconfirmed":0,"lockedConfirmed":0}
{"account":-1,"tx":1,"coin":1,"unconfirmed":4246894314,"confirmed":4246894314,"lockedUnconfirmed":0,"lockedConfirmed":0}
{"account":-1,"tx":1,"coin":1,"unconfirmed":4246894314,"confirmed":4246894314,"lockedUnconfirmed":0,"lockedConfirmed":0}
@ccollins
Copy link

also ✨ 💖 ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment