Overview
Preparations
Run the Node
Get the Main Account Address
Configure claim.sh & Run
Vouchers are Quilibrium private keys that can you place in config.yaml peerPrivKey. 50 Quil is credited to each voucher and ready to use.
NOTE: this tutorial will transfer all the Quils from each voucher to one account for easier managing; bridging/transfer, etc.
Preparations
Create 2 folders - client and node. Inside the client folder, create the vouchers directory.
In the client folder place client-download.sh:
fetch() {
files=$(curl https://releases.quilibrium.com/release | grep $release_os-$release_arch)
new_release=false
for file in $files; do
version=$(echo "$file" | cut -d '-' -f 2)
if ! test -f "./$file"; then
curl "https://releases.quilibrium.com/$file" > "$file"
new_release=true
fi
done
}
fetch
chmod +x node*
In the node folder place the node-download.sh:
fetch() {
files=$(curl https://releases.quilibrium.com/qclient-release | grep $release_os-$release_arch)
new_release=false
for file in $files; do
version=$(echo "$file" | cut -d '-' -f 2)
if ! test -f "./$file"; then
curl "https://releases.quilibrium.com/$file" > "$file"
new_release=true
fi
done
}
fetch
chmod +x qclient*
Execute both scripts to download the Node & QClient binaries.
Rename your voucher files with .hex extension and place it inside the vouchers directory.
NOTE: for testing, place 1-2 vouchers first. Recommended: perform the claims in 20 voucher batches.
Run the Node
Get your Quilibrium Peer ID by running the node inside the node folder at least once. Wait for 10 minutes until the node produces a .config folder.
On the node logs, note down the Peer ID i.e. QmDCuBx1oPLrGeBoo18vbK5GubVREEwQxfAyLz3PhS42k
./node-2.0.2.4-darwin-arm64
NOTE: check the keys.yml and make sure the content is not null.
Copy the .config folder to the client folder. Keep a backup of the .config folder: this is your wallet.
Get the Main Address
The main account address is the address where all the voucher QUIL will be sent to.
Inside the .config in the client folder, modify the config.yml. Find the listenGrpcMultiaddr key and edit the value to "" (remove the IP if set, if empty - leave it as is).
In the client folder, run the qclient token balance command and note down the first account address.
./qclient-2.0.2.4-darwin-arm64 token balance
The client output sample:
Signature check passed
gRPC not enabled, using light node
Total balance: 0.000000000000 QUIL (Account 0x032113ad9c757fa3faf6d6a91b3e5ff4e625b2cd4a825d63742df6f55a060522)
Copy the hash and place it in the claim.sh master_account value.
Configure claim.sh & Run
Place the claim.sh script inside the client folder, and configure the variables:
#!/bin/bash
DIR_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
############################################################
# Path to your directory containing .hex files
hex_dir="$DIR_PATH/vouchers"
# Path to config file
config_file="$DIR_PATH/.config/config.yml"
# Path to the qclient binary
qclient_path="./qclient-2.0.2.4-darwin-arm64"
# Your master account address (call ./qclient token balance to get the account address where you want to transfer the QUILs to)
master_account="0xACCOUNT_HERE"
############################################################
echo "Starting voucher claims.";
for hex_file in "$hex_dir"/*.hex; do
if [[ ! -e $hex_file ]]; then
echo "No .hex files found in directory: $hex_dir"
exit 1
fi
echo "Processing file: $hex_file"
hex_content=$(cat "$hex_file")
if grep -q "peerPrivKey" "$config_file"; then
sed -i '' "s|peerPrivKey:.*|peerPrivKey: \"$hex_content\"|" "$config_file"
else
echo "peerPrivKey: \"$hex_content\"" >> "$config_file"
fi
balance_output=$($qclient_path token balance)
addresses=($(echo "$balance_output" | awk '/Account 0x[0-9a-fA-F]{40}/ {print $NF}' | tr -d ')'))
for address in "${addresses[@]}"; do
echo "Processing address: $address"
coin_data=$(curl -s --header "Content-Type: application/json" \
--request POST \
--data "{\"address\":\"$address\"}" \
https://bridge-layer.quilibrium.com/coins)
echo "Raw JSON response: $coin_data"
coins_address=$(echo "$coin_data" | jq -r '.coins[0].address // empty')
if [[ -n $coins_address ]]; then
echo "Transferring to coins address: $coins_address"
$qclient_path token transfer "$master_account" "$coins_address"
else
echo "No valid coins address found for $address."
fi
done
done
Run claim.sh and check the logs. To confirm that the QUIL has been transferred to the main account, go to the Quilibrium Bridge page and enter your Peer ID noted down earlier.
You will find in the bridge page multiple account addresses belonging to your Peer ID - these are the transferred QUIL from the vouchers. To bridge these at once, you need to merge the addresses using qclient token merge all - this is not a required immediate step. What's important is all the QUIL are now in 1 account.
NOTE: the step below is not required in this tutorial.
To merge the addresses, copy your backed up .config folder to the client folder again and run qclient token merge all:
./qclient-2.0.2.4-darwin-arm64 token merge all
You've completed transferring all vouchers to your main account. You can bridge the QUIL to Ethereum by selecting the account address in the bridge page and following the bridging instructions.