Created
May 13, 2021 23:57
-
-
Save as/909b5e97122e4f1ecbeeb5fda4d0bc2a to your computer and use it in GitHub Desktop.
Offline HNS Airdrop Redemption for Github Users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This github gist was recently shared with me: https://gist.github.com/KoryNunn/7d94d7e630881f99e02626b527e6fe15 | |
It contains instructions for redeeming a crypto airdrop for github user who in 2019 had | |
(1) Around 15+ followers on github | |
(2) A public key added to their github | |
It is currently valued at around $2000 USD, and can be sold on a crypto exchange, converted into crypto-currency, etc. | |
The instructions and airdrop are legitimate, but I have problems trusting third-party code with my private key. | |
This workaround allows one to redeem the air-drop in somewhat of an air-gap by running the redemption transaction | |
generator in a container with no networking support. | |
The modified procedure is as follows, and should take around 10-15 interactive minutes total. | |
STEPS | |
(1) Create an account on an exchange that supports the HNS crypto-currency. Bitmex worked for me. | |
(2) Generate a deposit address on that exchange, and paste it over the "hsYOUR_ADDRESS_HERE_REPLACE_THIS_TEXT" string | |
in the Dockerfile below | |
(3) Run the COMMANDS below | |
(4) If your public key was added to the blockchain, it will print out a base64 string | |
(5) Remove the temporary copy of your private key from the directory, and copy the base64 string | |
(6) Submit that transaction to the HNS wallet software (hsd-cli rpc sendrawairdrop BASE64_STRING). | |
You can install the wallet software on another machine, or use NPM or "brew install hns" | |
COMMANDS | |
``` | |
mkdir airdrop && cd airdrop | |
# create dockerfile in that dir (see below section) | |
# copy data that the airdrop redemption software downloads so it doesn't need networking | |
git clone https://github.com/handshake-org/hs-tree-data | |
# copy your private key into the current airdrop directory (temporarily) | |
cp ~/.ssh/id_rsa id_rsa | |
# build and run the Dockerfile (after updating hsYOUR_ADDRESS_HERE_REPLACE_THIS_TEXT) | |
docker build -t x:x . | |
docker run --network none --rm -it x:x | |
``` | |
Dockerfile | |
``` | |
FROM alpine:latest AS builder | |
WORKDIR . | |
COPY . . | |
FROM alpine:latest | |
RUN apk update && apk add npm git python3 make g++ && npm install --production --silent && git clone https://github.com/handshake-org/hs-airdrop.git && git clone https://github.com/handshake-org/hs-tree-data && cd hs-airdrop && npm i | |
COPY --from=builder id_rsa /id_rsa | |
COPY --from=builder hs-tree-data /root/.hs-tree-data | |
CMD ping 1.1.1.1 || ./hs-airdrop/bin/hs-airdrop --bare /id_rsa "hsYOUR_ADDRESS_HERE_REPLACE_THIS_TEXT" | |
``` | |
The Dockerfile contains a fail-safe that wont run the airdrop code if it was run with networking support and can reach an outside IP address. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment