Skymavis avatar

Code to claim SPS airdrop without login to Splinterlands

skymavis

Published: 08 Mar 2022 › Updated: 08 Mar 2022Code to claim SPS airdrop without login to Splinterlands

Code to claim SPS airdrop without login to Splinterlands

I will guide you how to claim sps airdrop by running this code:

exports.claim_sps = async (account) => {
    try {
        let ts = Date.now();
        const tx = 'hive' + account.username + ts;
        const sig = ecc.sign(tx, account.posting_key);

        let url = `https://ec-api.splinterlands.com/players/claim_sps_airdrop?platform=hive&address=${account.username}&sig=${sig}&ts=${ts}&username=${account.username}`;
        const {
            data
        } = await axios(url);

        if (data.success) {
            console.log(`${account.username.replace(' ', '').toLowerCase()} claimed ${data.data.qty} SPS`);
        } else {
            console.log(`${account.username.replace(' ', '').toLowerCase()}: No sps airdrop`);
        }

        return;
    } catch (error) {
        console.log(error.message);
        await new Promise((resolve) => setTimeout(resolve, 3000));
        return await this.claim_sps(account);
    }
};

Leave Code to claim SPS airdrop without login to Splinterlands to:

Written by

Splinter

Read more #splinterlands posts


Best Posts From Skymavis

We have not curated any of skymavis's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Skymavis