Airdrop Terms & Privacy Policy Acceptance

To be eligible to receive the airdrop, it is required to submit a cryptographic signature certifying the BABY address owner’s acceptance of the Airdrop Terms and the Cuneiform Privacy Policy via the airdrop API.

1. Prerequisites

This guide assumes that you have created a Babylon address to receive the airdrop using the Babylon Address CLI Creation guide. Please ensure that you have access to your keyring before proceeding.

2. API Data Format

The Airdrop API requires the following JSON message format for designating your acceptance of the Airdrop Terms and the Privacy Policy:

{
    "babyAddress": "bbn1uxx48k7lzrjsy8t6l34m76jzzgjee2m35ppfhh",
    "babySignature": "zuuNchJnEz31HZyBX+kftsBSuQJJnrjA2vBQTmOctVZAjaNNvVpTrItRBSxmUJKHN+E+4POyjnxTrfBXhgV9MA==",
    "babyPublicKey": "AtU4i0OjGcvtdeiJjygOaHmxk9JvNKZVipu46I6zLi/z"
}

Detailed specification of each field:

  • babyAddress: The BABY address derived from the Babylon key as a Bech-32 encoded string.
  • babySignature: The Base64 encoded ADR36 signature made using the private key of the BABY address. The signing doc specification can be found here.
  • babyPublicKey: The Base64 encoded BABY public key, corresponding to the babyAddress.

3. Acceptance Data Creation

To generate the required acceptance data, we are going to use the Staker CLI program.

3.1. Setup the Staker CLI Program

First, clone the btc-staker repository:

git clone https://github.com/babylonlabs-io/btc-staker.git
Cloning into 'btc-staker'...

Next, checkout to the v0.15.2 release tag:

cd btc-staker
git checkout v0.15.2

In the root directory of btc-staker, install the stakercli binary using make install:

make install
CGO_CFLAGS="-O -D__BLST_PORTABLE__" go install -mod=readonly --tags "" --ldflags ''  ./...

You can verify the installation by running stakercli --help.

stakercli  --help
NAME:
   stakercli - Bitcoin staking controller
USAGE:
   stakercli [global options] command [command options] [arguments...]
COMMANDS:
   help, h  Shows a list of commands or help for one command
   Admin:
     admin, ad  Different utility and admin commands
   Daemon commands:
     daemon, dn  More advanced commands which require staker daemon to be running.
   PoP commands:
     pop  Commands realted to generation and verification of the Proof of Possession
   transaction commands:
     transaction, tr  Commands related to Babylon BTC transactions Staking/Unbonding/Slashing
GLOBAL OPTIONS:
   --btc-network value            Bitcoin network on which staking should take place (default: "testnet3")
   --btc-wallet-host value        Bitcoin wallet rpc host (default: "127.0.0.1:18554")
   --btc-wallet-rpc-user value    Bitcoin wallet rpc user (default: "user")
   --btc-wallet-rpc-pass value    Bitcoin wallet rpc password (default: "pass")
   --btc-wallet-passphrase value  Bitcoin wallet passphrase
   --help, -h                     show help

3.2. Sign the Acceptance Message

The Acceptance message to sign is the following:

By signing this message, you hereby acknowledge that you have read, understood, and agree to the Airdrop Terms (available at https://airdrop.babylon.foundation/airdrop-terms) and the Privacy Policy (available at https://airdrop.babylon.foundation/cuneiform-privacy-policy).

Please read the above message carefully and if you want to continue, sign the entire message string by running the stakercli pop sc command as follows:

stakercli pop sc --baby-address <your-baby-address> \
  --keyring-dir /path/to/keyring --keyring-backend file \
  --msg 'By signing this message, you hereby acknowledge that you have read, understood, and agree to the Airdrop Terms (available at https://airdrop.babylon.foundation/airdrop-terms) and the Privacy Policy (available at https://airdrop.babylon.foundation/cuneiform-privacy-policy).'
Enter keyring passphrase (attempt 1/3):
{
    "babyAddress": "bbn1uxx48k7lzrjsy8t6l34m76jzzgjee2m35ppfhh",
    "babySignature": "zuuNchJnEz31HZyBX+kftsBSuQJJnrjA2vBQTmOctVZAjaNNvVpTrItRBSxmUJKHN+E+4POyjnxTrfBXhgV9MA==",
    "babyPublicKey": "AtU4i0OjGcvtdeiJjygOaHmxk9JvNKZVipu46I6zLi/z"
}

where:

  • --baby-address is the Bech-32 BABY address.
  • --keyring-dir is the directory on which the BABY key that will receive the airdrop is stored. Note that this should not contain the direct parent directory of the key files (e.g., keyring-xxx). For example, if the keyring file is stored under ~/.babylond/keyring-file/, then ~/.babylond/ should be specified in the flag.
  • --keyring-backend is the backend of the BABY key. It should be the same as the one when the key was created.
  • --msg is the message to sign. It should be the exact message above included in the single quotation.

4. Submit Signed Data to the API

To submit the signed acceptance data, you need to construct the payload with the previously generated data send it to the Airdrop API collection endpoint using a POST request as follows:

curl -X POST 'https://airdrop-api.babylon.foundation/pop/baby-tos' \
-H 'Content-Type: application/json' \
-d '{
    "babyAddress": "bbn1uxx48k7lzrjsy8t6l34m76jzzgjee2m35ppfhh",
    "babySignature": "zuuNchJnEz31HZyBX+kftsBSuQJJnrjA2vBQTmOctVZAjaNNvVpTrItRBSxmUJKHN+E+4POyjnxTrfBXhgV9MA==",
    "babyPublicKey": "AtU4i0OjGcvtdeiJjygOaHmxk9JvNKZVipu46I6zLi/z"
}'

In case of success, the API will return the data you submitted:

{"babyAddress":"bbn1uxx48k7lzrjsy8t6l34m76jzzgjee2m35ppfhh","babySignature":"zuuNchJnEz31HZyBX+kftsBSuQJJnrjA2vBQTmOctVZAjaNNvVpTrItRBSxmUJKHN+E+4POyjnxTrfBXhgV9MA==","babyPublicKey":"AtU4i0OjGcvtdeiJjygOaHmxk9JvNKZVipu46I6zLi/z"}

If the signature verification fails, the API will return a 400 status code and the following response:

{"message":"Authentication failed, signature invalid: zuuNchJn...","code":400}