UNPKG
traceprompt-node
Version:
latest (2.0.1)
2.0.1
2.0.0
1.2.8
1.2.7
1.2.6
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
Client-side encrypted, audit-ready logging for LLM applications
traceprompt-node
/
src
/
crypto
/
hasher.ts
9 lines
(7 loc)
•
212 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
import
{ blake3 }
from
"@napi-rs/blake-hash"
;
export
function
computeLeaf
(
data
:
string
|
Buffer
|
undefined
):
string
{
if
(data ===
undefined
) { data =
"null"
; }
return
blake3
(data).
toString
(
"hex"
); }