tela_get_doc_content
Extract the actual file content (HTML, CSS, JS) stored in a TELA-DOC-1 smart contract on the DERO blockchain. Decompresses gzip files and paginates large outputs.
Instructions
Composite: fetch the actual file content stored in a TELA-DOC-1 contract. A DOC's file (HTML/CSS/JS/...) lives inside a DVM-BASIC comment block in the contract code — NOT in a stored variable — so this tool fetches DERO.GetSC, confirms the SCID is a DOC, and extracts the file bytes. Gzip-compressed files (a .gz filename, the TELA-CLI default) are transparently base64-decoded + decompressed to plaintext. Large files paginate via offset.
When to call: when a user wants to READ or inspect the actual code/markup a TELA app file holds (e.g. "show me the HTML of this TELA DOC", "what does this app's app.js contain"). Get DOC SCIDs from tela_inspect on an INDEX first. PREFER this over dero_get_sc: that returns the raw DVM contract wrapper; this extracts just the embedded file content and reports docType, size, and signature presence.
Input Requirements:
scidis REQUIRED. Must be 64 hex chars and reference a TELA-DOC-1 contract (an INDEX or non-TELA SCID returns INVALID_INPUT with guidance).offsetis OPTIONAL. Byte offset into the extracted content; passnext_offsetto read the next chunk of a large file.topoheightis OPTIONAL. Omit for the latest committed state.
Output: { scid, topoheight, filename, doc_type, sub_dir, content_embedded, content, content_offset, content_length, content_truncated, next_offset, compressed, decompressed, stored_filename, signature, signature_note, note, narrative, related_docs }. content is the plaintext file (a 60000-char chunk; paginate via next_offset), or null when content is not embedded (DocShard/STATIC/external). compressed is true for .gz files; decompressed is true when this tool gunzipped them (filename then strips .gz; stored_filename keeps the on-chain name). The contract's author signature presence is reported but NOT cryptographically verified.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scid | Yes | 64-char hex Smart Contract ID of a TELA-DOC-1 file contract | |
| offset | No | Byte offset into the extracted file content; use next_offset to paginate large files | |
| topoheight | No | Optional topo height; omit for latest committed state |