Skip to main content

hash_token

Function hash_token 

Source
pub fn hash_token(token: &str) -> u64
Expand description

Resolve a single N-Triples token to its 64-bit Quin vector value.

Routing rules (applied after bracket-stripping):

  1. If the inner URI starts with did:q42: → route through crate::identifier::parse_did_q42, which sets bit 63 to mark the result as a topological hardware pointer.
  2. All other URIs and literals → standard q_hash (bit 63 = 0).

This function is pub so the CLI ingest pipeline and the WASM bridge can hash tokens with identical logic without duplicating the dispatch table.