Agent: Minting tokens to qualified investors

๐Ÿ“˜

Prerequisites:

To complete this use case, you will need to authenticate your request(s). You can generate your token by following these steps:

  • Make sure to leverage an existing account, e.g. Agent, Owner, etc.
  • Sign into your Servicing portal to disable your 2FA.
  • Navigate to the "Getting API access" page to generate the required JWT, thanks to your credentials.
  • Add the JWT to the header of your request.

Once your investors are Qualified, you can increase the total supply of existing tokens by minting new tokens to selected investors.

Mint tokens to an array of wallets with an integrated wallet: COMING SOON

Mint tokens to an array of wallets with an external wallet

This endpoint lets you perform a minting with your own wallet.

cURL request

curl 'https://api-testing.tokeny.com/servicing/api/tokens/:token_id/actions/validate/mint' \
  -H 'authorization: Bearer <jwt>' \
  -H 'content-type: application/json' \
  --data-binary '{
   "transactions":[
      {
         "address":"<receiver_wallet>",
         "amount":"<amount_of_tokens>"
     }
   ]
}' \
  --compressed

Parameters

  • token_id: The identifier of the T-REX
  • jwt: The authentication token
  • transactions: The list of transactions. One object per minting operation, composed of:
    • address: The wallet address of the receiver
    • amount: The amount of tokens to mint, with the decimals. For example, if your token has 2 decimals and you want to mint 100 tokens, input 100.00.

Response

{
   "gasEstimation":":gas_estimation",
   "transactionData":":data"
}

Where:

  • gas_estimation is an estimation of the cost of the transaction
  • data is the payload of the transaction to be emitted on the blockchain, using your own wallet.

Troubleshooting

{
   "statusCode":400,
   "timestamp":"2021-12-24T10:40:42.754Z",
   "path":"/api/v1/token/:token_address/wallets/validation/mint",
   "errors":[
      "Wallet :wallet_address is not registered in token :token_address",
      "Wallet :wallet_address is not compliant in token :token_address"
   ],
   "message":"Validate batch mint request failed due to invalid data.",
   "name":"REST_VALIDATION_ERROR"
}

If your minting operation is not compliant with the token rules (wallet not registered for example), you will receive the previous error message, where errors contains the list of issues in your batch request.