mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
22 lines
523 B
Plaintext
22 lines
523 B
Plaintext
## deriveKeypair
|
|
|
|
`deriveKeypair(seed: string): {privateKey: string, publicKey: string}`
|
|
|
|
Derive a public and private key from a seed.
|
|
|
|
### Parameters
|
|
|
|
This method takes one parameter, the seed from which to derive the public and private key.
|
|
|
|
### Return Value
|
|
|
|
This method returns an object containing the public and private components of the keypair corresponding to the seed.
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
var keypair = api.deriveKeypair(seed)
|
|
var public_key = keypair.publicKey;
|
|
var private_key = keypair.privateKey;
|
|
```
|