๐ต Generate a private key from a mnemonic
Code samples
POST /api/v1/trx/account/privatekey
Returns TRX address and keys derived from the provided mnemonic phrase.
Body parameter
{
"mnemonic": "string",
"index": 0
}
๐ ๏ธ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | none |
| ยป mnemonic | body | string | true | none |
| ยป index | body | integer | false | Optional derivation index for BIP44 (defaults to legacy derivation if not provided). |
Example responses
200 Response
{
"address": "string",
"private_key": "string",
"public_key": "string"
}
๐ Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Generated keys and address | Inline |
| 400 | Bad Request | Mnemonic is required | 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 |