Set currency admin
Changes the current currency admin. Please be extra cautious with this procedure because as soon as the current admin transferred the admin rights to another wallet, he/she can no longer execute any admin-exclusive functionalities. Also take note that the new admin has to first be a currency member of that particular currency before he/she can take over the admin role.
Call URL
/currencies/(currencyAddress)/admin
Type : PUT
Field |
Type |
Required/Optional |
Description |
Accepted values |
wallet-address |
string |
Required |
The sender's wallet address. |
Any valid wallet address |
wallet-key |
string |
Required |
The key of the sender's wallet. |
Any valid wallet key that unlocks the sender's wallet |
Call request URL parameters
Field |
Type |
Required/Optional |
Description |
Accepted values |
currencyAddress |
string |
Required |
The address of the involved currency. |
Any valid currency address |
Call request body parameters
Field |
Type |
Required/Optional |
Description |
Accepted values |
newAdminWalletAddress |
string |
Required |
The new admin for the currency token. |
Any valid wallet address who is also a member of the currency |
Sample Call Request
https://api.tetrium.io/tokenize/currencies/0x29341b674091d600c227B137a457b0573515A7A8/admin
Parameters:
{
"newAdminWalletAddress":"0x34d86f8b9ece5ad06ef757d1c21c4373026d3345"
}
Call responses
Success response
Field |
Type |
Description |
Respond Values |
status |
string |
Status of the API call. |
"success" |
message |
string |
Information about the status. |
"set-currency-admin initiated" |
transactionHash |
string |
The hash of the transaction. To be used to verify the transaction's sealing status. |
Any string |
Error response
Field |
Type |
Description |
Respond Values |
status |
string |
Status of the API call. |
"fail" |
error |
string |
Information about the error. |
(See below) |
Information contained in error
:
Error Messages |
Description |
"missing newAdminWalletAddress" |
newAdminWalletAddress was not provided as a parameter in the API call body. |
"invalid newAdminWalletAddress" |
newAdminWalletAddress provided was not in the correct format. |
"newAdminWalletAddress not a currency member" |
newAdminWalletAddress to be assigned with admin rights is not a currency member. |
For any other errors, please refer to List of Common Error Messages
Sample Call Response
{
"status":"success",
"message":"set-currency-admin initiated",
"transactionHash":"0xa7c905a9b10d3ec1c009750bff3653c5c11a4fd7c4736f7d91b6edf75a5a4055"
}