Content gateway
Lattice content remains a CID-addressed complete Volume. An HTTP gateway is a bridge to Ivy/VolumeBroker for web and TypeScript clients; it is not a second canonical-content API.
Request
Section titled “Request”GET /volumes/<root-CID>Accept: application/vnd.lattice.volumeThe gateway returns 404 when it cannot supply the complete Volume. It must
not return a partial Volume with 200. Deployments may require an
Authorization header. SDK requests never follow redirects, so credentials
cannot be redirected to another host.
Successful response
Section titled “Successful response”200 OKContent-Type: application/vnd.lattice.volumeContent-Length: <bounded archive length>The body is Ivy’s canonical VolumeArchive:
UInt16BE entryCountrepeat entryCount times, strictly ascending by CID string: UInt16BE cidUTF8Length cidUTF8 UInt32BE contentLength contentThe archive is at most 64 MiB, contains at most 65,535 entries, contains no duplicate CID, and includes the requested root. The SDK defaults to a tighter 4,096-entry application limit. It hashes every member against its CID before returning the Volume.
HTTPVolumeTransport accepts HTTPS endpoints and loopback HTTP only. A native
application that speaks Ivy directly can implement VolumeTransport without
HTTP and receives the same post-retrieval verification.
A lattice-node gateway has one local Volume store per hosted chain. Pass the
same path used by NodeClient as chainPath; the transport sends it as the
node’s ?chainPath=Nexus/Alpha selector:
const path = ["Nexus", "Alpha"];const node = new NodeClient("https://reads.example.org", path);const content = new HTTPVolumeTransport("https://reads.example.org/volumes", { chainPath: path,});Source: lattice-sdk/docs/content-gateway.md at a68b564b1904