Claim Gasless Link

Want a better experience? Let the end user claim without having to pay for gas, best way to solve the 'cold start' problem!

You can claim a Link gaslessly, with no additional trust assumptions (no one can frontrun you!) using our API. This involves creating an offchain signature using the Links private key, but it's all handled under the hood in claimLinkGasless.

import peanut, { getDefaultProvider } from '@squirrel-labs/peanut-sdk'
import { Wallet } from 'ethersv5'

const chainId = '137' // polygon
const mnemonic = 'announce room limb pattern dry unit scale effort smooth jazz weasel alcohol'

async function createLinks(): Promise<string> {
	let wallet = Wallet.fromMnemonic(mnemonic)

	const provider = await getDefaultProvider(chainId)
	wallet = wallet.connect(provider)

	const link = ''

	const claimedLinkResponse = await peanut.claimLinkGasless({
		APIKey: '',
		recipientAddress: wallet.address,


	return claimedLinkResponse.txHash

createLinks().then((hash) => console.log(hash))

Last updated