๐ต Generate a private key from a mnemonic
Code samples
POST /api/v1/trx/account/privatekey
Generates a private key and corresponding Tron address from a mnemonic phrase
Body parameter
{
"mnemonic": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"
}
๐ ๏ธ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | Mnemonic phrase to derive the private key from |
| ยป mnemonic | body | string | true | BIP39 mnemonic phrase |
Example responses
200 Response
{
"address": "TLWKepDBC8RZjAhtWyNqASyzgyVyHUuS7o",
"private_key": "4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d",
"public_key": "04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235"
}
๐ Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful response | Inline |
| 400 | Bad Request | Bad request (missing or invalid mnemonic) | None |
| 405 | Method Not Allowed | Method not allowed (only POST is supported) | None |
| 500 | Internal Server Error | Internal server error | None |
๐ Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป address | string | false | none | none |
| ยป private_key | string | false | none | none |
| ยป public_key | string | false | none | none |