🔐

[Async] POST /tokens/:tokenId/communityAdminAirdropWithoutConsentSig

Asynchronously airdrop a token to a wallet as an admin without receiver signature
This endpoint allows a community admin to airdrop a token to a particular wallet. As opposed to the POST /tokens/:tokenId/communityAdminAirdrop endpoint, this one does not require a receiver signature. While we recommend the other endpoint as it obtains receiver consent, we understand that sometimes it's not possible to obtain the receiver's signature for UX reasons. In those cases, use this endpoint.
Note that you cannot airdrop tokens that are not associated with your community.

Caveat

  • This endpoint requires an API key. Refer to the Authentication doc for more info.
  • This endpoint also is an asynchronous endpoint, which means the initial call does not return the response immediately. Please refer to the Async Endpoint doc for more information about how to use these APIs.

Body

Field
Type
Description
receivingAddress
string
The ETH address that the admin will airdrop the token to.
adminAddress
string
The ETH address of the admin that is trying to airdrop a token. The signature generated should be signed by this admin address.
adminSignature
string
Signature that proves that the admin address signed the relevant information to airdrop the Kudos token. More info on how to generate the signature below.

How to generate the admin airdrop Kudos signature

What am I signing?

Using your Ethereum account’s private key, you are signing that you are trying to airdrop token of tokenId. You can only do this as an admin of the particular Kudos token’s associated community.
In addition, you must provide a signature from the receiving address for the airdrop token of tokenId . This receiving address is not required to be a member of the community, or allowlisted for the token.

Signing with Ethers.js

const adminTypes = {
CommunityAdminAirdrop: [
{ name: "tokenId", type: "uint256" },
],
};
​
// The data to sign
const value = {
tokenId: tokenId, // mandatory
};
​
// Domain info (if you're using the sandbox environment)
const domainInfo = {
name: 'Kudos',
// Mumbai
chainId: 80001,
verifyingContract: "0xB876baF8F69cD35fb96A17a599b070FBdD18A6a1"
};
​
// Domain info (if you're using the production environment)
const domainInfo = {
name: 'Kudos',
​
// Polygon - comment this out if you're on Mumbai
chainId: 137,
verifyingContract: "0x60576A64851C5B42e8c57E3E4A5cF3CF4eEb2ED6"
};
​
// Get signer
const provider = new ethers.providers.JsonRpcProvider(/* constructor params */);
const adminSigner = provider.getSigner(/* address */);
​
// Obtain signature
const adminSignature: string = await adminSigner._signTypedData(domainInfo, adminTypes, value);

Example Response

// status
202 Created
​
// header
Location: /v1/operations/dc3a7730-53e2-4af6-acc9-d13b2fcf10e2
​
// body
{}