(seed: Uint8Array, usage: string)
| 6 | }; |
| 7 | |
| 8 | export async function deriveSecretKeyTreeRoot(seed: Uint8Array, usage: string): Promise<KeyTreeState> { |
| 9 | const I = await hmac_sha512(new TextEncoder().encode(usage + ' Master Seed'), seed); |
| 10 | return { |
| 11 | key: I.slice(0, 32), |
| 12 | chainCode: I.slice(32) |
| 13 | }; |
| 14 | } |
| 15 | |
| 16 | export async function deriveSecretKeyTreeChild(chainCode: Uint8Array, index: string): Promise<KeyTreeState> { |
| 17 |
no test coverage detected