4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

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);
	}
};

100 upvotes $0.00

Replies (4)

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: