Creating A Whitelisting Request For A Smart Contract Of Nft Type

Basic Description

This endpoint is used to create a Whitelisting Request for a Smart Contract of NFT Type in Taurus-PROTECT.
To understand more about Whitelisting, please refer to the following page in the Taurus User Guides.

This endpoint would accept a POST Request with a JSON payload containing the Contract Whitelisting Request details. The blockchain,symbol, name , kind, and contractAddress are the only five required parameters that must be included within the JSON payload. Please note that in some cases for XTZ and ALGO, tokenId might also be required.

Prerequisites

Required Roles

Certain API endpoints require that the user has a specific role in order to access them. Roles are used to restrict access to certain functionality within the system and ensure that only authorized users are able to perform specific actions.

Here is the list of required Roles for this particular endpoint:

  • WhitelistedAddressCreator
  • TPUser

To find out more about roles, please refer to the following page in the Taurus User Guides.

Required Input Parameters

Certain API endpoints require specific input parameters. Here is the list of Required Input Parameters for this particular endpoint:

  • blockchain: the blockchain used for the selected Smart Contract
  • symbol: for ETH and XTZ, this is the symbol of the token whereas for ALGO standard assets this is the unit name of the asset
  • name: the name of the Smart Contract as it will appear internally in Taurus-PROTECT
  • contractAddress: For ETH and XTZ, this is the address of the smart contract whereas for ALGO standard assets, this is the address of the creator of the asset
  • tokenId: for ETH this field is not expected whereas For XTZ this is used to create a FA2 token and for ALGO standard assets, this is the globally unique asset id
  • kind: for ETH this field can be set to NFT_ETH_AUTO, NFT_ETH_ERC1155, or NFT_ETH_ERC721

📘

Preconditions

It is important to note that the selected blockchain needs to be active in the system.
For example, If you haven't enabled ETH in your HSM, you will not be able to whitelist an address for a Smart Contract.
In addition, the requested Smart Contract Address needs to follow the requirements and characteristics on the relevant blockchain for the Whitelisting Request to go through.

Call Example

You can find a basic example in cURL below.
Please note that you will need to update the BASEURL and the APITOKEN for the command to function.

export BASEURL=https://taurus-protect-instance.com
export APIToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiZXh0ZXJuYWxVc2VySUQiOiJ0ZWFtMUV4dGVybmFsVXNlcklEIiwidGVuYW50SUQiOjEsImNhcGl0YWxUZW5hbnRJRCI6MSwiZmlyc3RuYW1lIjoiSm9obiIsImxhc3RuYW1lIjoiRG9lIiwicm9sZXMiOlsidHB1c2VyIl0sImVtYWlsIjoidGVhbTFAYmFuay5jb20iLCJ1c2VybmFtZSI6InRlYW0xIiwiand0X3JlbmV3YWJsZV9hbW91bnQiOjAsImlzX3RvdHBfZW5hYmxlZCI6ZmFsc2UsImF1dGhfc3RhdHVzIjoiU1VDQ0VTUyIsImxhc3RfbG9naW4iOiIyMDIzLTAxLTAxVDAwOjAwOjAwLjE0OTc0NDIzMloiLCJsb2dnZWRfaW5fd2l0aF9zc28iOmZhbHNlLCJrZXkiOiIiLCJleHAiOjE2ODEyMTkyNzYsImlhdCI6MTY4MTIxNzQ3Nn0.K_85arIrigpkN1yHttCydpeT6oVg2c6PyQnuji907Og
curl --location "$BASEURL/api/rest/v1/whitelists/contracts" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header "Authorization: Bearer $APIToken" \
--data '{
    "blockchain": "ETH",
    "contractAddress": "0xE528944Ee479fA75E53E200d352862c0c6d1191a",
    "decimals": "18",
    "kind": "NFT_ETH_ERC721",
    "name": "Crazy Bears",
    "network": "mainnet",
    "symbol": "CRBR"
}'

This piece of code sends a POST request to https://your-protect-instance.example.com/api/rest/v1/whitelists/contracts with the JSON object in the request body.

👍

Call Result

A successful response for the POST call to create a simple whitelisting request for a Smart Contract of NFT Type might look like this:

{
    "result": {
        "id": "531"
    }
}

In this example, Taurus-PROTECT has created a new Whitelisting Request for a Smart Contract with a unique ID of 531. Taurus-PROTECT responds with a JSON object containing the newly assigned Requestid.

Please note that this Request will then need to be signed for the whitelisting process to be successful.

Requirements for Future Use

For this particular endpoint, we need to store the Requestid as it will be required in the next steps where we will sign the Transaction Request.

You can find the Swagger-generated page for this endpoint in the following link.




  © 2025 Taurus SA. All rights reserved.