Create Drop
Using DropsClient
to setup a Drop (opens in a new tab)
is straightforward, there is no need of being authenticated with an email and
the only requirements are having the API key.
import fsPromises from 'fs/promises';
import { Drop } from '@poap-xyz/drops';
// The artwork of the Drop as loaded from the filesystem.
const buffer = await fsPromises.readFile('path/to/poap-artwork.png');
const image = new Blob([buffer], { type: 'image/png' });
const drop: Drop = await client.create({
name: 'My super event to celebrate!',
description: 'Share the moment with all my invitees to celebrate.\nWe spend great time together.',
eventUrl: 'https://poap.xyz',
// Where that it takes place.
city: 'Buenos Aires',
country: 'Argentina',
virtualEvent: false,
// Not to be shared.
privateEvent: true,
// When does it start and when does it end.
startDate: new Date(2024, 6, 24),
endDate: new Date(2024, 6, 25),
expiryDate: new Date(2024, 7, 24),
// A password to edit my Drop.
secretCode: '123456',
// The artwork.
image,
filename: 'my-super-event-artwork.png',
contentType: 'image/png',
// A valid email where I will receive the mint links.
email: 'your_email@poap.io',
// The number of invitees in my event.
requestedCodes: 10,
});