@droplinks/sdk
TypeScript icon, indicating that this package has built-in type declarations

0.0.23 • Public • Published

Droplinks.io SDK

Droplinks.io is the easiest way to distribute your NFTs and tokens with claim links & QR codes.

Each link(droplink) is a wallet that you have access to it's private key. With the droplinks.io SDK you can

  • Create new droplinks and get their public address
  • Get all the droplinks that you created
  • Get all the claims of your droplinks along with info like the public address of the claimer and their email

Install the droplinks.io sdk

npm install @droplinks/sdk

Import it

import { DropLinks, DropLinksSearchOptions, DropLinkClaim } from "@droplinks/sdk"

Initialize it with your droplinks.io API key(get it from here)

DropLinks.init(YOUR_API_KEY)

Create a new droplink

DropLinks.create().then((dropLink: DropLink) => {
  const {id, claimCode, publicAddress, locked, claimLink, campaignId, claimed} = dropLink
});

Get all your droplinks

DropLinks.getDropLinks({claimed: true} as DropLinksSearchOptions).then((dropLinks: DropLink[]) => {
  dropLinks.forEach((dropLinks: DropLink) => {
    const {id, claimCode, publicAddress, locked, claimLink, campaignId, claimed} = dropLink
  })
});

Get all the claims of your droplinks

DropLinks.getClaims().then((claims: DropLinkClaim[]) => {
  claims.forEach((claim: DropLinkClaim) => {
    const {id, claimedAt, claimedByAccount, dropLinkId, claimLink, extraClaimerInfo} = claim
  })
});

Readme

Keywords

none

Package Sidebar

Install

npm i @droplinks/sdk

Weekly Downloads

0

Version

0.0.23

License

ISC

Unpacked Size

7.98 kB

Total Files

6

Last publish

Collaborators

  • sliakis