API Reference
defaultNodeVersionHash()
Default synchronous D112 V1 node-version hash over strict canonical JSON UTF-8 bytes.
When hashing a host value directly, encode first: defaultNodeVersionHash(strictCanonicalJsonBytes(value)).
Import
import { defaultNodeVersionHash } from "@graphrefly/ts/core";
Signature
function defaultNodeVersionHash(bytes: Uint8Array): string
Parameters
| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | Canonical bytes to decode. |
Returns
A string value.
Example
import { defaultNodeVersionHash } from "@graphrefly/ts/core";
Source
packages/ts/src/node/versioning.ts