10.4.1 DID
10.4.1.1 Generate Private and Public Keys by Mnemonics
The user can customize mnemonics and call this function to generate a pair of public-private keys for the k1 algorithm offline. As long as mnemonics are the same, the generated public and private keys must be the same for each call.
| Function name | createKeyPair(List<String>mnemList) | |||
| Description | The user can generate the private and public keys by mnimonics. | |||
| Request Parameters | ||||
| No. | Parameter | Type | Required | Description | 
|---|---|---|---|---|
| 1 | mnemList | List<String> | Y | Mnemonics | 
| Response Parameters | ||||
| No. | Parameter | Type | Required | Description | 
| 1 | DidDataWrapper | Y | Private key | |
| KeyPair | ||||
| No. | Parameter | Type | Required | Description | 
| 1 | privateKey | String | Y | Private key | 
| 2 | publicKey | String | Y | Public key | 
| 3 | type | String | Y | Algorithm Type |