GitHub
Transverse

SDK reference

Discovery

discovery, discoveryAt and keys — what an operator publishes about itself, and how a wallet reads a host it has never seen.

The document itself is Discovery. None of these calls takes a credential.

discovery()

The operator this client was built for.

const doc = await path.discovery();

doc.protocol_version;
doc.api_versions;
doc.networks;

keys()

The same operator's public keys, as published at /.well-known/path-keys.

const { keys } = await path.keys();

discoveryAt(origin)

A host this client was not built for. A scanned link names an origin; this is how a wallet reads which network that host claims.

const theirs = await path.discoveryAt('https://api.member-b.com');

The n= hint on a link is not that answer. Checking that the declared network's register lists this operator, on this domain, is the caller's next step.

On this page