🔐
[Async] POST /tokens/:tokenId/addContributors
Asynchronously add more recipients to an existing token's allowlist
This endpoint exists to add more recipients to the allowlist of an allowlisted Kudos. Note that this endpoint is irrelevant for non-allowlisted Kudos.
- 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.
Field | Type | Description |
---|---|---|
contributors | string[] | List of ETH addresses that should be added to the allowlist of people who can claim the token. |
signature | string | Signature that proves that the creator address signed the relevant information to create the Kudos token.
More info on how to generate the signature below. |
Using your Ethereum account’s private key, you are signing the
tokenId
of an existing Kudos token that you are the creator of. This helps us make sure that the creator
of the Kudos token is who they really say they are, and that the creator
is definitely asking to add new contributors to an existing Kudos token.const types = {
AllowlistedAddress: [{ 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 signer = provider.getSigner(/* address */);
// Obtain signature
const signature: string = await signer._signTypedData(domainInfo, types, value);
// status
202 Created
// header
Location: /v1/operations/dc3a7730-53e2-4af6-acc9-d13b2fcf10e2
// body
{}