Casual refactor of entire eventBuilder

This commit is contained in:
2023-04-14 16:02:15 +01:00
parent 914fa759a9
commit 36926d4346
33 changed files with 648 additions and 580 deletions

View File

@ -23,11 +23,9 @@ export function hexToMnemonic(hex: string): string {
}
/**
* Convert mnemonic phrase into hex-encoded private key
* using the derivation path specified in NIP06
* @param mnemonic the mnemonic-encoded entropy
* Derrive NIP-06 private key from master key
*/
export function entropyToDerivedKey(entropy: Uint8Array): string {
export function entropyToPrivateKey(entropy: Uint8Array): string {
const masterKey = HDKey.fromMasterSeed(entropy);
const newKey = masterKey.derive(DerivationPath);