Minting tokens to qualified investors
Once your investors are Qualified, you can increase the total supply of existing tokens by minting new tokens to selected investors.
Authentication
cURL request
To leverage the T-REX Servicing API, you will first need to retrieve an authentication token that will allow you to perform this operation. For this use case, please make sure to get an authentication token corresponding to an agent account. If any doubts, please refer to our guide on permissions and roles.
In the testing environment, call the following signin
endpoint:
curl --request POST \
--url https://servicing-api-testing.tokeny.com/api/auth/signin \
--header 'Content-Type: application/json' \
--data '{"email":"[email protected]","password":"MyP@$$word"}'
curl --request POST \
--url https://servicing-api-testing.tokeny.com/api/auth/signin \
--header 'Content-Type: application/json' \
--data '{"email":"[email protected]","password":"MyP@$$word"}'
Response
{
"token": "<jwt>"
}
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://servicing-api-testing.tokeny.com/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-REXjwt
: The authentication tokentransactions
: The list of transactions. One object per minting operation, composed of:address
: The wallet address of the receiveramount
: The amount of tokens to mint, with the decimals. For example, if your token has 2 decimals and you want to mint 100 tokens, input100.00
.
Response
{
"gasEstimation":":gas_estimation",
"transactionData":":data"
}
Where:
gas_estimation
is an estimation of the cost of the transactiondata
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.
Updated 2 months ago