<html><head><title>Flatworm Docs</title><linkrel="stylesheet"type="text/css"href="/static/style.css"></head><body><divclass="sidebar"><divclass="header"><divclass="logo"><ahref="/"><divclass="image"></div><divclass="name">ethers</div><divclass="version">v5.0-beta</div></a></div></div><divclass="toc"><div><divclass="link title"><ahref="/">Documentation</a></div><divclass="base show link depth-1"><ahref="/getting-started/">Getting Started</a></div><divclass="hide link depth-2"><ahref="/getting-started/#installing">Installing</a></div><divclass="hide link depth-2"><ahref="/getting-started/#importing">Importing</a></div><divclass="base show link depth-1"><ahref="/concepts/">Concepts</a></div><divclass="hide link depth-2"><ahref="/concepts/events/">Events</a></div><divclass="hide link depth-3"><ahref="/concepts/events/#solidity-topics">Solidity Topics</a></div><divclass="hide link depth-2"><ahref="/concepts/gas/">Gas</a></div><divclass="hide link depth-3"><ahref="/concepts/gas/#gas-price">Gas Price</a></div><divclass="hide link depth-3"><ahref="/concepts/gas/#gas-limit">Gas Limit</a></div><divclass="base show link depth-1"><ahref="/api/">Application Programming Interface</a></div><divclass="hide link depth-2"><ahref="/api/contract/">Contracts</a></div><divclass="hide link depth-3"><ahref="/api/contract/#buckets">Buckets</a></div><divclass="hide link depth-2"><ahref="/api/signer/">Signers</a></div><divclass="hide link depth-3"><ahref="/api/signer/#signer">Signer</a></div><divclass="hide link depth-3"><ahref="/api/signer/#wallet">Wallet</a></div><divclass="hide link depth-3"><ahref="/api/signer/#voidsigner">VoidSigner</a></div><divclass="hide link depth-3"><ahref="/api/signer/#externallyownedaccount">ExternallyOwnedAccount</a></div><divclass="hide link depth-2"><ahref="/api/providers/">Providers</a></div><divclass="hide link depth-3"><ahref="/api/providers/provider/">Provider</a></div><divclass="hide link depth-4"><ahref="/api/providers/provider/#accounts-methods">Accounts Methods</a></div><divclass="hide link depth-4"><ahref="/api/providers/provider/#blocks-methods">Blocks Methods</a></div><divclass="hide link depth-4"><ahref="/api/providers/provider/#ethereum-naming-service-(ens)-methods">Ethereum Naming Service (ENS) Methods</a></div><divclass="hide link depth-4"><ahref="/api/providers/provider/#logs-methods">Logs Methods</a></div><divclass="hide link depth-4"><ahref="/api/providers/provider/#network-status-methods">Network Status Methods</a></div><divclass="hide link depth-4"><ahref="/api/providers/provider/#transactions-methods">Transactions Methods</a></div><divclass="hide link depth-4"><ahref="/api/providers/provider/#event-emitter-methods">Event Emitter Methods</a></div><divclass="hide link depth-4"><ahref="/api/providers/provider/#inspection-methods">Inspection Methods</a></div><divclass="hide link depth-3"><ahref="/api/providers/jsonrpc-provider/">JsonRpcProvider</a></div><divclass="hide link depth-4"><ahref="/api/providers/jsonrpc-provider/#jsonrpcsigner">JsonRpcSigner</a></div><divclass="hide link depth-4"><ahref="/api/providers/jsonrpc-provider/#jsonrpcuncheckedsigner">JsonRpcUncheckedSigner</a></div><divclass="hide link depth-3"><ahref="/api/providers/api-providers/">API Providers</a></div><divclass="hide link depth-4"><ahref="/api/providers/api-providers/#etherscanprovider">EtherscanProvider</a></div><divclass="hide link depth-4"><ahref="/api/providers/api-providers/#infuraprovider">InfuraProvider</a></div><divclass="hide link depth-4"><ahref="/api/providers/api-providers/#alchemyprovider">AlchemyProvider</a></div><divclass="hide link depth-4"><ahref="/api/providers/api-providers/#cloudfrontprovider">CloudfrontProvider</a></div><divclass="hide link depth-3"><ahref="/api/providers/other/">Other Providers</a></div><divclass="hide link depth-4"><ahref="/api/providers/other/#fallbackprovider">FallbackProvider</a></div><divclass="hide link depth-4"><ahref="/api/providers/other/#ipcprovider">IpcProvider</a></div><divclass="hidel
<p>The <i>Flatworm Docs</i> rendering script is designed to be <b>very</b> simple, but provide enough formatting necessary for documenting JavaScript libraries.</p><p>A lot of its inspiration came from <ahref="https:<i>github.com/readthedocs/sphinx_rtd_theme">Read the Docs</a> and the <ahref="https:</i>www.sphinx-doc.org/">Sphinx</a> project.</p>
<p>Flatworm Docs are made up of fragments. A fragment is either a lone body of <ahref="/documentation/#flatworm-markdown">markdown</a> text, or a <ahref="/documentation/#flatworm-directive">directive</a> for specialized formatting, which may itself have body.</p>
<divclass="definition show-anchors"><divclass="term"><b>_section:</b><i>TITLE</i></div><divclass="body"><p>A <i>section</i> has its <b>TITLE</b> in an H1 font. Sections are linked to in <i>Table of Contents</i> and have a dividing line drawn above them. If an option is specified, it is avaialble as a name for intern linking. There should only be one <codeclass="inline">_section:</code> per page.</p></div></div>
<divclass="definition show-anchors"><divclass="term"><b>_subsection:</b><i>TITLE</i></div><divclass="body"><p>A <i>subsection</i> has its <b>TITLE</b> in an H2 font. Subsections are linked to in <i>Table of Contents</i> and have a dividing line drawn above them. If an option is specified, it is avaialble as a name for internal linking.</p></div></div>
<divclass="definition show-anchors"><divclass="term"><b>_heading:</b><i>TITLE</i></div><divclass="body"><p>A <i>heading</i> has its <b>TITLE</b> in an H3 font. If an option is specified, it is available as a name for internal linking.</p></div></div>
<divclass="definition show-anchors"><divclass="term"><b>_definition:</b><i>TERM</i></div><divclass="body"><p>A <i>definition</i> has its <b>TERM</b> bolded and the markdown body is indented.</p></div></div>
<divclass="definition show-anchors"><divclass="term"><b>_property:</b><i>SIGNATURE</i></div><divclass="body"><p>A <i>property</i> has its JavaScript <b>SIGNATURE</b> formatted and the markdown body is indented.</p></div></div>
<divclass="definition show-anchors"><divclass="term"><b>_note:</b><i>TITLE</i></div><divclass="body"><p>A <i>note</i> is placed in a blue bordered-box to draw attention to it.</p></div></div>
<divclass="definition show-anchors"><divclass="term"><b>_warning:</b><i>TITLE</i></div><divclass="body"><p>A <i>warning</i> is placed in an orange bordered-box to draw attention to it.</p></div></div>
<divclass="definition show-anchors"><divclass="term"><b>_code:</b><i>FILENAME</i></div><divclass="body"><p>A <i>code</i> reads the <b>FILENAME</b> and depending on the extension adjusts it.</p><p>For JavaScript files, the file is executed, with <codeclass="inline">//!</code> replaced with the result of the last statement and <codeclass="inline">//!error</code> is replaced with the throw error. If the error state does not agree, rendering fails.</p></div></div>
<divclass="definition show-anchors"><divclass="term"><b>_toc:</b></div><divclass="body"><p>A <i>toc</i> injects a Table of Contents, loading each line of the body as a filename and recursively loads the <i>toc</i> if present, otherwise all the <i>sections</i> and <i>subsections</i>.</p></div></div>
<divclass="definition show-anchors"><divclass="term"><b>_null:</b></div><divclass="body"><p>A <i>null</i> is used to terminated a directive. For example, after a <i>definition</i>, the bodies are indented, so a <i>null</i> can be used to reset the indentation.</p></div></div>
<p>The markdown is simple and does not have the flexibility of other dialects, but allows for <b>bold</b>, <i>italic</i>, <u>underlined</u>, <codeclass="inline">monospaced</code>, <sup>super-scripted</sup> text, supporting <ahref="/documentation/#flatworm-markdown">links</a> and lists.</p>
<p>Configuration is optional (but highly recommended) and may be either a simple JSON file (config.json) or a JS file (config.js) placed in the top of the source folder.</p><p>TODO: example JSON and example JS</p>
<p>Adds an inherits description to a directive. The <i>markdown</i> may contain links.</p><p>This extended directive function is available for:</p><ul><li>_section</li><li>_subsetion</li><li>_heading</li></ul>
<p>Calls the configuration <codeclass="inline">getSourceUrl(text, VALUE)</code> to get a URL which will be linked to by a link next to the <i>directive</i>.</p><p>This extended directive function requires an advanced <codeclass="inline">config.js</code><ahref="/documentation/#flatworm-config">Configuration</a> file since it requires a JavaScript function.</p><p>This extended directive function is available for:</p><ul><li>_section</li><li>_subsetion</li><li>_heading</li><li>_property</li></ul><divclass="footer"><divclass="nav previous"><ahref="/contributing/"><spanclass="arrow">←</span>Contributing and Hacking</a></div><divclass="nav next"><ahref="/license/">License and Copyright<spanclass="arrow">→</span></a></div></div><divclass="copyright">The content of this site is licensed under the <ahref="https://choosealicense.com/licenses/cc-by-4.0/">Creative Commons Attribution 4.0 International License</a>.</div></div><scriptsrc="/script.js"type="text/javascript"></script></body></html><!-- ContentHash:c6caac3bd3d87b9a5b92fa42ce06235474c93daebdd1835257aaf53f7a9c0a71 -->