mirror of
https://github.com/status-im/pluto.git
synced 2026-09-01 04:51:13 +00:00
45 lines
8.4 KiB
HTML
45 lines
8.4 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Anatomy · Pluto</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="A `host` is a computer program that serves as container of extensions. It has the hability to interpret extensions, accessible as remote data. How/if an extension will be interpreted depends on a set of `capacities` it advertises."/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Anatomy · Pluto"/><meta property="og:type" content="website"/><meta property="og:url" content="https://status-im.github.io/pluto/index.html"/><meta property="og:description" content="A `host` is a computer program that serves as container of extensions. It has the hability to interpret extensions, accessible as remote data. How/if an extension will be interpreted depends on a set of `capacities` it advertises."/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/pluto/img/favicon.png"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="/pluto/js/pluto.js"></script><link rel="stylesheet" href="/pluto/css/prism.css"/><link rel="stylesheet" href="/pluto/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/pluto/"><img class="logo" src="/pluto/img/logo_white.png" alt="Pluto"/><h2 class="headerTitleWithLogo">Pluto</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/pluto/docs/Manifesto.html" target="_self">Docs</a></li><li class=""><a href="/pluto/examples.html" target="_self">Examples</a></li><li class=""><a href="/pluto/try.html" target="_self">Try</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i>›</i><span>Concepts</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Getting Started</h3><ul><li class="navListItem"><a class="navItem" href="/pluto/docs/Manifesto.html">Manifesto</a></li><li class="navListItem"><a class="navItem" href="/pluto/docs/Principles.html">Principles</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Concepts</h3><ul><li class="navListItem navListItemActive"><a class="navItem" href="/pluto/docs/concepts/Anatomy.html">Anatomy of an extension</a></li><li class="navListItem"><a class="navItem" href="/pluto/docs/concepts/Hook.html">Hook</a></li><li class="navListItem"><a class="navItem" href="/pluto/docs/concepts/View.html">View</a></li><li class="navListItem"><a class="navItem" href="/pluto/docs/concepts/Query.html">Query</a></li><li class="navListItem"><a class="navItem" href="/pluto/docs/concepts/Event.html">Event</a></li><li class="navListItem"><a class="navItem" href="/pluto/docs/concepts/Registry.html">Registry</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Build</h3><ul><li class="navListItem"><a class="navItem" href="/pluto/docs/build/Packaging.html">Packaging</a></li><li class="navListItem"><a class="navItem" href="/pluto/docs/build/Deployment.html">Deployment</a></li><li class="navListItem"><a class="navItem" href="/pluto/docs/build/FirstExtension.html">My first extension</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Contributing</h3><ul><li class="navListItem"><a class="navItem" href="/pluto/docs/Development.html">Development</a></li><li class="navListItem"><a class="navItem" href="/pluto/docs/Roadmap.html">Roadmap</a></li></ul></div></div></section></div><script>
|
||
document.addEventListener('DOMContentLoaded', function() {
|
||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||
createToggler('#tocToggler', 'body', 'tocActive');
|
||
|
||
const headings = document.querySelector('.toc-headings');
|
||
headings && headings.addEventListener('click', function(event) {
|
||
if (event.target.tagName === 'A') {
|
||
document.body.classList.remove('tocActive');
|
||
}
|
||
}, false);
|
||
|
||
function createToggler(togglerSelector, targetSelector, className) {
|
||
var toggler = document.querySelector(togglerSelector);
|
||
var target = document.querySelector(targetSelector);
|
||
|
||
if (!toggler) {
|
||
return;
|
||
}
|
||
|
||
toggler.onclick = function(event) {
|
||
event.preventDefault();
|
||
|
||
target.classList.toggle(className);
|
||
};
|
||
}
|
||
});
|
||
</script></nav></div><div class="container mainContainer docMainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle">Anatomy</h1></header><article><div><span><p>A <code>host</code> is a computer program that serves as container of extensions. It has the hability to interpret extensions, accessible as remote data. How/if an extension will be interpreted depends on a set of <code>capacities</code> it advertises.</p>
|
||
<p>A host defines a number of <a href="Hook">hooks</a> in various parts of the app. Those hooks are contracts that 3rd party devs can use to extend a host with their own logic / UI.
|
||
e.g. custom chat commands, custom chat actions, custom collectible displays. Hooks can use only a subset of extensions concepts (e.g. no visual part).</p>
|
||
<p>An <code>extension</code> is implemented by 3rd party developers and provides one or more hooks implementations.</p>
|
||
<p>To implement a hook, a 3rd party developper has access to some APIs:</p>
|
||
<ul>
|
||
<li><a href="View">view</a> to create native UI. Views are composed of trees of components (e.g. text, list).</li>
|
||
<li><a href="Query">query</a> to access local host data (e.g contacts, whisper key)</li>
|
||
<li><a href="Event">event</a> to interact with host environment (e.g. create a contact, scan a QR code, send a chat message).</li>
|
||
</ul>
|
||
<p>Components surface data to the user. The data shape they expect is defined part of the components specifications. Components get their data from <code>queries</code>.
|
||
Some components can trigger <code>events</code> based on user interaction (e.g. clicking on a button).
|
||
Triggering an event is the only way to modify the host state, thus the data surfaced by views.</p>
|
||
<p><code>views</code>, <code>queries</code> and <code>events</code> are part of a host <code>capacities</code>. They are associated to permissions depending on privacy and security concerns.
|
||
When installing an extension, a user will has access to all required permissions.</p>
|
||
<p>Extensions are stored in decentralized storages like IPFS or SWARM. They can be identified using ENS names.</p>
|
||
<p>A user can discover extensions and decide to install them. Once installed associated hooks can be activated. This process is abstracted by the <a href="Registry">Registry</a>.</p>
|
||
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/pluto/docs/Principles.html"><span class="arrow-prev">← </span><span>Previous</span></a><a class="docs-next button" href="/pluto/docs/concepts/Hook.html"><span>Next</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav docOnPageNav"></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/pluto/" class="nav-home"><img src="/pluto/img/logo_white.png" alt="Pluto" width="66" height="58"/></a><div><h5>Docs</h5><a href="docs/Tutorial">Getting Started</a><a href="docs/API">API Reference</a></div><div><h5>Community</h5><a href="https://chat.status.im">Project Chat</a><a href="https://twitter.com/ethstatus" target="_blank" rel="noreferrer noopener">Twitter</a></div><div><h5>More</h5><a href="https://blog.status.im/">Blog</a><a href="https://github.com/status-im/pluto/">GitHub</a></div></section><section class="copyright">Copyright © 2018 Status.im</section></footer></div></body></html> |