@qorechain/handles
v0.1.0
Published
Resolve a QoreX @handle to an address — signature-verified against a pinned registry key, with trust-on-first-use pinning left to the caller.
Readme
@qorechain/handles
Resolve a QoreX @handle to an address.
This is not a lookup client. Every resolution is verified against a pinned ed25519 registry public key — an answer the registry could forge is never returned — and then checked against a trust-on-first-use pin.
The pin store is injected rather than built in, and that is the point: a pin exists to detect that the registry started saying something different, so it must be held by someone other than the party being checked. Store it on the user's device, not on the same infrastructure that serves the answer.
import { HandleClient } from "@qorechain/handles";
const client = new HandleClient({ baseUrl, registryPubkeyHex });
const { record, pin } = await client.resolve("@alice", pins);
if (pin.status === "CHANGED") {
// Stop. Show both addresses in full and require explicit confirmation.
// Never silently update the pin.
}resolve does not auto-pin. Pin after the user has seen the address and
proceeded — pinning earlier records an address nobody looked at.
reverse(address) returns a handle for display only. A reverse result must
never become the destination of a send.
