docs/index.html

328 lines
17 KiB
HTML

<!DOCTYPE HTML>
<html lang="en" class="sidebar-visible no-js light">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Introduction - DECA Documentation</title>
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="favicon.svg">
<link rel="shortcut icon" href="favicon.png">
<link rel="stylesheet" href="css/variables.css">
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/chrome.css">
<link rel="stylesheet" href="css/print.css" media="print">
<!-- Fonts -->
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
<link rel="stylesheet" href="fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="highlight.css">
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script>
var path_to_root = "";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
}
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
}
} catch (e) { }
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
var html = document.querySelector('html');
html.classList.remove('no-js')
html.classList.remove('light')
html.classList.add(theme);
html.classList.add('js');
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script>
var html = document.querySelector('html');
var sidebar = null;
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
} else {
sidebar = 'hidden';
}
html.classList.remove('sidebar-visible');
html.classList.add("sidebar-" + sidebar);
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded affix "><a href="../index.html" class="active">Introduction</a></li><li class="chapter-item expanded "><a href="chapter_1.html"><strong aria-hidden="true">1.</strong> Chapter 1</a></li><li class="chapter-item expanded "><a href="IPFSNodes.html"><strong aria-hidden="true">2.</strong> IPFSNodes</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
<!-- Track and set sidebar scroll position -->
<script>
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
sidebarScrollbox.addEventListener('click', function(e) {
if (e.target.tagName === 'A') {
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
}
}, { passive: true });
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
sessionStorage.removeItem('sidebar-scroll');
if (sidebarScrollTop) {
// preserve sidebar scroll position when navigating via links within sidebar
sidebarScrollbox.scrollTop = sidebarScrollTop;
} else {
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
var activeSection = document.querySelector('#sidebar .active');
if (activeSection) {
activeSection.scrollIntoView({ block: 'center' });
}
}
</script>
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">DECA Documentation</h1>
<div class="right-buttons">
<a href="print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
<ul id="searchresults">
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
});
</script>
<div id="content" class="content">
<main>
<h1 id="deca-docs"><a class="header" href="#deca-docs">DECA Docs</a></h1>
<p>The DECA Project Documentation</p>
<h2 id="introduction"><a class="header" href="#introduction">Introduction</a></h2>
<p>A general DECA protocol specification and some example use cases.</p>
<h2 id="requirements"><a class="header" href="#requirements">Requirements</a></h2>
<p>There are some requirements you need to fulfill to be able to work with DECA docs.</p>
<ul>
<li><code>Rust</code> &gt;= 1.66</li>
<li><code>curl</code> &gt;= 7.88.1</li>
<li><code>cargo</code> &gt;= 1.72.0</li>
<li><code>mdBook</code> &gt;= v0.4.34</li>
<li><code>git</code> &gt;= 2.39.2</li>
</ul>
<blockquote>
<p>NOTE: These are the recommended versions since they were tested in the development environment.</p>
</blockquote>
<h2 id="installation"><a class="header" href="#installation">Installation.</a></h2>
<p>The easiest way to get both Rust and Cargo's latest versions is by using the <code>rustup</code> script, which also means that you have to use the <code>curl</code> command.</p>
<h3 id="1-git-installation"><a class="header" href="#1-git-installation">1. Git Installation.</a></h3>
<p>The first step is to install git on you Unix system. To do that, you only need to run the following command:</p>
<pre><code class="language-shell">$ sudo apt install git
</code></pre>
<h3 id="2-curl-installation"><a class="header" href="#2-curl-installation">2. Curl Installation.</a></h3>
<p>You have to repeat the same proccess to install <code>curl</code>, use the apt command:</p>
<pre><code class="language-sh"> $ sudo apt install curl
</code></pre>
<p>Once you have <code>curl</code> installed you can go ahead and continue with the Rust and Cargo installations.</p>
<h3 id="3-rust-and-cargo-installation"><a class="header" href="#3-rust-and-cargo-installation">3. Rust and Cargo Installation.</a></h3>
<p>To install Rust and Cargo on your Unix System you have to download the <code>rustup installer script</code> using the following command on the terminal:</p>
<pre><code class="language-shell">$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
</code></pre>
<p>By using the previous command you will get the latest Rust and Cargo's versions. </p>
<blockquote>
<p>Suggestion: You can make sure the installation was succesfull by using the following command:</p>
<pre><code class="language-sh">$ rustc --version
</code></pre>
<p>It tells you the version of Rust that was installed.</p>
</blockquote>
<blockquote>
<p>NOTE: Some important considerations when installing Rust:</p>
<ul>
<li>
<p>When you install Rust, it will be installed only for the current user, in other words, the installation is not system-wide.</p>
</li>
<li>
<p>It is not required to be root or sudo to be able to install Rust.</p>
</li>
</ul>
</blockquote>
<p>Once you have completed your Rust and Cargo installations, you can now continue with the <code>mdBook</code> installation.</p>
<h3 id="4-mdbook-installation"><a class="header" href="#4-mdbook-installation">4. MdBook Installation.</a></h3>
<p>DECA Docs uses <code>mdBook</code> as a way to create books with Markdown. Since <code>mdBook</code> is a command line tool, it is ideal for creating tutorials, API documentations, course materials, amongst other useful things.</p>
<p>You can follow the instructions bellow to download <code>mdBook</code>. </p>
<p>First, you have to use the following command to build and install <code>mdBook</code>:</p>
<pre><code class="language-shell">$ cargo install mdbook
</code></pre>
<p>The command will automatically download <code>mdBook</code>, build it and install it in Cargo's global binary directory.</p>
<p>Once installed, the next step is to get the DECA Docs repository. Follow the instructions below to get it.</p>
<h3 id="clone-the-deca-documentation-repository"><a class="header" href="#clone-the-deca-documentation-repository">Clone the DECA Documentation repository.</a></h3>
<p>After you have succesfully compleated all installations, you can now access the docummentation repository and contribute to the resources.
Run the next command on the terminal:</p>
<pre><code class="language-shell">$ git clone https://git.decentralizedscience.org/DECA/docs.git
</code></pre>
<blockquote>
<ul>
<li>This command lets you copy the DECA Docs repository to your local machine.</li>
<li>It also means that you can pull down a full copy of all the repository data that it has at that point in time, including all versions of every file and folder for the project.</li>
</ul>
</blockquote>
<p>Once the repository has been cloned, you can have access to it by entering the following command on your terminal:</p>
<pre><code class="language-shell">$ cd docs/
</code></pre>
<p>This command will lead you to the directory where you can find the DECA Docs README.md.</p>
<p>The last step is to run the server using the following command:</p>
<pre><code class="language-shell">$ mdbook serve
</code></pre>
<p>You can view the page on any browser using the following link <a href="http://127.0.0.1:3000">http://127.0.0.1:3000</a></p>
<blockquote>
<p>NOTE: If you want to access remotely use the <code>mdbook serve -n 0.0.0.0</code> which means any IP address can access the DECA Docs project.</p>
</blockquote>
<h2 id="contribute-usage"><a class="header" href="#contribute-usage">Contribute (Usage)</a></h2>
<h2 id="contract"><a class="header" href="#contract">Contract</a></h2>
<ul>
<li><a href="https://t.me/deca_currency/1">Telegram</a></li>
<li><a href="https://matrix.to/#/#DECA:matrix.org">Matrix</a></li>
</ul>
<h2 id="license"><a class="header" href="#license">License</a></h2>
<pre><code>Copyright (C) DECENTRALIZED CLIMATE FOUNDATION A.C.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled &quot;GNU
Free Documentation License&quot;.
</code></pre>
<h2 id="references"><a class="header" href="#references">References</a></h2>
<ol>
<li>
<p>Rust, &quot;Learn Rust&quot;, <a href="https://www.rust-lang.org/tools/install">https://www.rust-lang.org/tools/install</a>, 2023-08-31.</p>
</li>
<li>
<p>A.Prakash, &quot;How to install Rust and Cargo&quot;, <a href="https://itsfoss.com/install-rust-cargo-ubuntu-linux/">https://itsfoss.com/install-rust-cargo-ubuntu-linux/</a>, 2023-03-26.</p>
</li>
<li>
<p>The Cargo Book, &quot;Installation&quot;, <a href="https://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu1404/share/doc/rust/html/cargo/getting-started/installation.html#build-and-install-cargo-from-source">https://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu1404/share/doc/rust/html/cargo/getting-started/installation.html#build-and-install-cargo-from-source</a>, 2023-08-31.</p>
</li>
<li>
<p>Docs GitHub, &quot;Cloning a repository&quot;, <a href="https://docs.github.com/es/repositories/creating-and-managing-repositories/cloning-a-repository">https://docs.github.com/es/repositories/creating-and-managing-repositories/cloning-a-repository</a>, 2023-08-31.</p>
</li>
<li>
<p>mdBook Docummentation, &quot;Introduction&quot;, <a href="https://rust-lang.github.io/mdBook/#:~:text=mdBook%20is%20a%20command%20line,easily%20navigable%20and%20customizable%20presentation.&amp;text=This%20guide%20is%20an%20example%20of%20what%20mdBook%20produces.">https://rust-lang.github.io/mdBook/#:~:text=mdBook%20is%20a%20command%20line,easily%20navigable%20and%20customizable%20presentation.&amp;text=This%20guide%20is%20an%20example%20of%20what%20mdBook%20produces.</a>, 2023-08-31.</p>
</li>
</ol>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="next" href="chapter_1.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
</div>
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a rel="next" href="chapter_1.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script>
window.playground_copyable = true;
</script>
<script src="elasticlunr.min.js"></script>
<script src="mark.min.js"></script>
<script src="searcher.js"></script>
<script src="clipboard.min.js"></script>
<script src="highlight.js"></script>
<script src="book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>