Skip to main content
Wanting to use Linkdrops in your dApp? Here you will find all the information you need to get started.
The simplest way to create a linkdrop is by interacting with our LinkDrop Generator

AccessKeys

In order to create any kind of drop, you need to first generate key pairs. You will need to create one key per drop.
  • The linkdrop contract will store the public part of the key.
  • You will give the private part of the key to the user you want to receive the drop.

$NEAR Drops

To create a $NEAR drop you will ask the contract to create a drop (create_drop), passing the public part of the keys you generated, and how much you want to drop on each key use (deposit_per_use). The contract will create a drop and return the numerical ID that identifies it.
Learn more about adding Near Connect to your application
To claim the drop, you will need to send the user a link with the private key

NFT Drops

To drop an existing NFT, you will (1) create a drop, and then (2) transfer the NFT to keypom.

1. Creating the Drop

To create an NFT drop, you will call the create_drop method, now passing a nft argument, which will tell the linkdrop contract to wait for an NFT to be transferred. The contract will then create a drop and return the numerical ID that identifies it.
Learn more about adding Near Connect to your application

2. Transferring the NFT

Having the Drop ID, you now need to transfer the NFT to the linkdrop contract, specifying to which drop you want to add it.
Learn more about adding Near Connect to your application
The linkdrop contract will validate that you are transferring the NFT to a drop that belongs to you
The simplest way to create a linkdrop is by interacting with our LinkDrop Generator

FT Drops

The process to drop a Fungible Token is very similar to that of creating an NFT drop. You will first create the drop, and then fund it with FTs.

1.Creating a drop

To create a FT drop you will call the create_drop method, now passing a ftData argument, which will tell the linkdrop contract to wait for a certain amount of FT to be transferred. The contract will then create a drop and return the numerical ID that identifies it.
Learn more about adding Near Connect to your application

2. Transferring FT

Having the Drop ID, you now need to transfer the fungible tokens to the linkdrop contract.
To transfer FTs to an account, you need to first register the receiver account (e.g. the keypom contract) on the FT contract.
Learn more about adding Near Connect to your application
The simplest way to create a linkdrop is by interacting with our LinkDrop Generator

Function Call Drop

Linkdrop contracts allow to create function call drops. These drops will execute one or more methods on a contract when the user claims the drop.
Function call drops can be thought as the abstract version of other drops: you can create a drop that will mint an NFT, register a user in a DAO, or pay for a service.
Learn more about adding Near Connect to your application

To create a linkdrop link, simply append the private key to the claim page: