Claim Raffle Link

Here is how you can claim a Raffle Link.

The following code example shows how to use the claimRaffleLink function.

Please note that there are many customizable options to a Raffle Link (MFA, captcha, sibil resistance...). If you have any questions regarding any customizable options, please don't hesitate to reach out to us via Telegram or our Discord!

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 claimInfo = await peanut.claimRaffleLink({
		APIKey: '',
		recipientAddress: wallet.address,
		recipientName: 'bob',

	return claimInfo.txHash ?? ''

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


Last updated