> For the complete documentation index, see [llms.txt](https://blocknote-js.gitbook.io/doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blocknote-js.gitbook.io/doc/blocknote/static-content/read-static-content-from-chain.md).

# Read static content from chain

To access content stored on-chain, use the `payload_transaction_id` returned when the content was uploaded. If the content is encrypted, provide the password or AES key in the options.

<pre class="language-javascript"><code class="lang-javascript">import {BlocknoteReader} from "blocknote" 

const options = {};
const reader  = new BlocknoteReader(
<strong>    "7VR62WIMCSA5POMS2QAY64SMKW5GBTN2WCBTNA5H4W3WFMYLFHWQ",
</strong><strong>    options   
</strong>);

reader.read().then((response) => {    
    console.log(response);
});
</code></pre>

<details>

<summary>View a response example</summary>

```json5
{
  payload: {
    version: 0.1,
    title: 'Sales report 2025',
    mime: 'application/pdf',
    size: 19851,
    addid: 260321436,
    accid: 1583377570,
    compression: 'brotli',
    txns: 16
  },
  content: <Buffer 25 50 44 46 2d 31 2e 34 0a 31 20 30 20 6f 62 6a 0a 3c 3c 0a 2f 54 69 74 6c 65 20 28 fe ff 00 4d 00 61 00 72 00 6b 00 64 00 6f 00 77 00 6e 00 20 00 54 ... 19801 more bytes>
}

```

</details>

## Constructor&#x20;

<table><thead><tr><th width="242">Name</th><th width="430">Description</th><th>Type</th></tr></thead><tbody><tr><td>payload_transaction_id</td><td>The <code>payload_transaction_id</code> of the upload to read</td><td>string</td></tr><tr><td>options</td><td>See the options table below</td><td>object</td></tr></tbody></table>

#### Options

<table><thead><tr><th width="116">Name</th><th width="381">Description</th><th width="118">Type</th><th>Default</th></tr></thead><tbody><tr><td>password</td><td>The password to decrypt the content if required.</td><td>string</td><td></td></tr><tr><td>aes_key</td><td>The AES key to decrypt the content if required.</td><td>string</td><td></td></tr><tr><td>revision</td><td>Read a previous revision.<br>The last revision is read by default.</td><td>number</td><td></td></tr><tr><td>return_raw</td><td>Returns the raw on-chain content, preserving any applied compression or encryption.<br><code>aes_key</code> and <code>password</code> are ignored.</td><td>boolean</td><td>false</td></tr></tbody></table>

***

## Methods

### <mark style="color:$primary;">read</mark>&#x20;

#### Return

A promise that contains the payload and the content as a buffer.

***

### <mark style="color:$primary;">getRevisions</mark>

#### Return

The number of available revisions.
