Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | 50ba311259 | |
Derrick Hammer | d7cdaaf316 |
|
@ -1,3 +1,10 @@
|
|||
# [0.2.0](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.1.3...v0.2.0) (2023-06-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add deriveChildKey function ([d7cdaaf](https://git.lumeweb.com/LumeWeb/libweb/commit/d7cdaaf316d4d26ed44860701376d18030030708))
|
||||
|
||||
## [0.1.3](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.1.2...v0.1.3) (2023-06-21)
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@lumeweb/libweb",
|
||||
"version": "0.1.3",
|
||||
"version": "0.2.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/libweb",
|
||||
"version": "0.1.3",
|
||||
"version": "0.2.0",
|
||||
"dependencies": {
|
||||
"@lumeweb/libportal": "^0.1.0",
|
||||
"@noble/curves": "^1.1.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/libweb",
|
||||
"version": "0.1.3",
|
||||
"version": "0.2.0",
|
||||
"main": "lib/index.js",
|
||||
"type": "module",
|
||||
"repository": {
|
||||
|
|
|
@ -9,4 +9,5 @@ export * from "./stringifyJSON.js";
|
|||
export * from "./types.js";
|
||||
export * from "./cid.js";
|
||||
export * from "./encoding.js";
|
||||
export * from "./keys.js";
|
||||
export { ed25519, sha512 };
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
import { blake3 } from "@noble/hashes/blake3";
|
||||
import { concatBytes } from "@noble/hashes/utils";
|
||||
|
||||
export function deriveChildKey(
|
||||
parentKey: Uint8Array,
|
||||
tweak: string,
|
||||
): Uint8Array {
|
||||
const tweakHash = blake3(tweak);
|
||||
|
||||
return blake3(concatBytes(parentKey, tweakHash));
|
||||
}
|
Loading…
Reference in New Issue