mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-09-03 12:30:09 +00:00
quickstart/bash style fixes and cleanup
This commit is contained in:
parent
1dac26fcf3
commit
ed3e6848e5
3 changed files with 44 additions and 53 deletions
|
@ -44,9 +44,7 @@
|
|||
Launch the deamon to run as a background process:
|
||||
</p>
|
||||
<p>
|
||||
<code>
|
||||
lbrynet-daemon --no-launch
|
||||
</code>
|
||||
<code class="code-bash"><span class="code-bash__prompt">$</span>lbrynet-daemon</code>
|
||||
</p>
|
||||
<p>The first time you run the daemon, it must catch-up with most recent blockheaders. This can take several minutes.</p>
|
||||
<div class="meta">macOS and Windows do not currently bundle the daemon separately. Just launch the full app and the API will still be available. This will be resolved in v0.9.</div>
|
||||
|
@ -62,7 +60,7 @@
|
|||
<p>
|
||||
To verify the LBRY daemon is running correctly and responding to requests, run:
|
||||
</p>
|
||||
<pre><code>curl 'http://localhost:5279/lbryapi' --data '{"method":"status","params":[]}'
|
||||
<code class="code-bash"><span class="code-bash__prompt">$</span>curl 'http://localhost:5279/lbryapi' --data '{"method":"status","params":[]}'
|
||||
[
|
||||
{
|
||||
"connection_status": {
|
||||
|
@ -75,12 +73,11 @@
|
|||
"startup_status": {
|
||||
"message": "Started lbrynet",
|
||||
"code": "started"
|
||||
},
|
||||
"lbry_id": "7J75jSuxU9eizREuxk1r"
|
||||
}
|
||||
}
|
||||
]</code></pre>
|
||||
]</code>
|
||||
<p>This makes it easy to interact with the LBRY API in the programming language of your choice. Here's another example:</p>
|
||||
<pre><code>curl 'http://localhost:5279/lbryapi' --data '{"method":"resolve_name","params":[{"name":"what"}]}'
|
||||
<code class="code-bash"><span class="code-bash__prompt">$</span>curl 'http://localhost:5279/lbryapi' --data '{"method":"resolve_name","params":[{"name":"what"}]}'
|
||||
[
|
||||
{
|
||||
"ver": "0.0.3",
|
||||
|
@ -96,7 +93,7 @@
|
|||
"nsfw": false,
|
||||
"thumbnail": "https:\/\/s3.amazonaws.com\/files.lbry.io\/logo.png"
|
||||
}
|
||||
]</code></pre>
|
||||
]</code>
|
||||
<p>LBRY can be used to build everything from a censorship-proof image host, to a store for 3D printing files, to distribute large files or datasets, or use cases even we can't imagine!</p>
|
||||
<p><a class="btn-alt" href="http://lbryio.github.io/lbry/api/">View Full API Documentation</a></p>
|
||||
</section>
|
||||
|
@ -104,8 +101,8 @@
|
|||
<h3 id="credits">4. Getting Credits</h3>
|
||||
<p>Many actions, such as reserving a name or purchasing paid content, require credits.</p>
|
||||
<p>To receive credits, first generate a wallet address:</p>
|
||||
<pre><code>curl 'http://localhost:5279/lbryapi' --data '{"method":"wallet_new_address","params":[]}'
|
||||
["bbFxRyWCFRkA9YcuuZD8nE7XTLUxYnddTs"]</code></pre>
|
||||
<code class="code-bash"><span class="code-bash__prompt">$</span>curl 'http://localhost:5279/lbryapi' --data '{"method":"wallet_new_address","params":[]}'
|
||||
["bbFxRyWCFRkA9YcuuZD8nE7XTLUxYnddTs"]</code>
|
||||
<p>Use this address to get credits in one of two ways:</p>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
|
|
|
@ -95,21 +95,19 @@
|
|||
<p>If you’re a programmer, you might recognize the LBRY blockchain as a <em>key-value store</em>. Each key, or name, corresponds to a value, or a metadata entry. Whichever party or parties bid the most LBC gets to control the metadata returned by a key lookup.</p>
|
||||
|
||||
<p>Here is a sample key-value entry in the LBRY blockchain. Here, wonderfullife is the key, and the rest of the description is the value.</p>
|
||||
<div class="code-bash">
|
||||
<code><pre style="white-space: pre-wrap;">
|
||||
<span class="code-bash-kw1">wonderfullife</span> : {
|
||||
<span class="code-bash-kw2">title</span>: "It’s a Wonderful Life",
|
||||
<span class="code-bash-kw2">description</span>: "An angel helps a compassionate but despairingly frustrated businessman by showing what life would have been like if he never existed.",
|
||||
<span class="code-bash-kw2">thumbnail</span>: "http://i.imgur.com/MW45x88.jpg",
|
||||
<span class="code-bash-kw2">license</span>: "public domain",
|
||||
<span class="code-bash-kw2">price</span>: 0, <span class="code-bash-comment">//free!</span>
|
||||
<span class="code-bash-kw2">publisher</span>: "A Fan Of George Bailey", <span class="code-bash-comment">//simplification</span>
|
||||
<span class="code-bash-kw2">sources</span>: { <span class="code-bash-comment">//extensible, variable list</span>
|
||||
<span class="code-bash-kw2">lbry_hash</span> : <unique id>,
|
||||
<span class="code-bash-kw2">url</span> : <url>
|
||||
}
|
||||
}</pre></code>
|
||||
</div>
|
||||
<code class="code-bash"><span class="code-bash__prompt">$</span>lbrynet-cli resolve_name name=wonderfullife
|
||||
<span class="code-bash__kw1">wonderfullife</span> : {
|
||||
<span class="code-bash__kw2">title</span>: "It’s a Wonderful Life",
|
||||
<span class="code-bash__kw2">description</span>: "An angel helps a compassionate but despairingly frustrated businessman by showing what life would have been like if he never existed.",
|
||||
<span class="code-bash__kw2">thumbnail</span>: "http://i.imgur.com/MW45x88.jpg",
|
||||
<span class="code-bash__kw2">license</span>: "public domain",
|
||||
<span class="code-bash__kw2">price</span>: 0, <span class="code-bash__comment">//free!</span>
|
||||
<span class="code-bash__kw2">publisher</span>: "A Fan Of George Bailey", <span class="code-bash__comment">//simplification</span>
|
||||
<span class="code-bash__kw2">sources</span>: { <span class="code-bash__comment">//extensible, variable list</span>
|
||||
<span class="code-bash__kw2">lbry_hash</span> : <unique id>,
|
||||
<span class="code-bash__kw2">url</span> : <url>
|
||||
}
|
||||
}</code>
|
||||
<div class="meta text-center content-inset"><p>A slightly simplified sample entry of metadata in the LBRY blockchain. Whichever party or parties bid the most in an ongoing auction control what a name returns.</p></div>
|
||||
|
||||
<p>Other than the usage of the LBRY blockchain to store names and metadata, there are only minor differences between the blockchains of LBRY and Bitcoin, and the changes are generally consensus improvements. We’ve buffed the hashing algorithm, smoothed the block reward function, increased the block size, increased the total number of credits, and prepared for offchain settlement.</p>
|
||||
|
@ -182,7 +180,7 @@
|
|||
<li>60% earned by LBRY users, via mining the LBRY cryptocurrency.</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
||||
<section>
|
||||
<h2 id="combatting-the-ugly">Combatting The Ugly</h2>
|
||||
<p>As neither naïfs nor knaves, we acknowledge that LBRY can be used for bad ends. Technology is frequently this way. Encryption protects our privacy -- as well as that of terrorists. Cars allow us to travel marvelous distances -- and kill millions per year.</p>
|
||||
|
@ -246,16 +244,16 @@
|
|||
<p>Here is a sample key-value entry in the LBRY blockchain. Here, wonderfullife is the key, and the rest of the description is the value.</p>
|
||||
<div class="code-bash">
|
||||
<code><pre style="white-space: pre-wrap;">
|
||||
<span class="code-bash-kw1">wonderfullife</span> : {
|
||||
<span class="code-bash-kw2">title</span>: "It’s a Wonderful Life",
|
||||
<span class="code-bash-kw2">description</span>: "An angel helps a compassionate but despairingly frustrated businessman by showing what life would have been like if he never existed.",
|
||||
<span class="code-bash-kw2">thumbnail</span>: "http://i.imgur.com/MW45x88.jpg",
|
||||
<span class="code-bash-kw2">license</span>: "public domain",
|
||||
<span class="code-bash-kw2">price</span>: 0, <span class="code-bash-comment">//free!</span>
|
||||
<span class="code-bash-kw2">publisher</span>: "A Fan Of George Bailey", <span class="code-bash-comment">//simplification</span>
|
||||
<span class="code-bash-kw2">sources</span>: { <span class="code-bash-comment">//extensible, variable list</span>
|
||||
<span class="code-bash-kw2">lbry_hash</span> : <unique id>,
|
||||
<span class="code-bash-kw2">url</span> : <url>
|
||||
<span class="code-bash__kw1">wonderfullife</span> : {
|
||||
<span class="code-bash__kw2">title</span>: "It’s a Wonderful Life",
|
||||
<span class="code-bash__kw2">description</span>: "An angel helps a compassionate but despairingly frustrated businessman by showing what life would have been like if he never existed.",
|
||||
<span class="code-bash__kw2">thumbnail</span>: "http://i.imgur.com/MW45x88.jpg",
|
||||
<span class="code-bash__kw2">license</span>: "public domain",
|
||||
<span class="code-bash__kw2">price</span>: 0, <span class="code-bash__comment">//free!</span>
|
||||
<span class="code-bash__kw2">publisher</span>: "A Fan Of George Bailey", <span class="code-bash__comment">//simplification</span>
|
||||
<span class="code-bash__kw2">sources</span>: { <span class="code-bash__comment">//extensible, variable list</span>
|
||||
<span class="code-bash__kw2">lbry_hash</span> : <unique id>,
|
||||
<span class="code-bash__kw2">url</span> : <url>
|
||||
}
|
||||
}</pre></code>
|
||||
</div>
|
||||
|
|
|
@ -8,7 +8,6 @@ code
|
|||
{
|
||||
padding: 3px 5px;
|
||||
font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, monospace, serif;
|
||||
font-size: 90%;
|
||||
color: darken($color-primary, 10%);
|
||||
}
|
||||
pre
|
||||
|
@ -23,7 +22,6 @@ pre
|
|||
overflow-x: auto;
|
||||
}
|
||||
|
||||
|
||||
.code-bash
|
||||
{
|
||||
-webkit-user-select: text;
|
||||
|
@ -31,21 +29,19 @@ pre
|
|||
-ms-user-select: text;
|
||||
user-select: text;
|
||||
|
||||
margin-bottom: $spacing-vertical;
|
||||
border-left: .3rem solid $color-primary;
|
||||
padding: $spacing-vertical / 2 $spacing-vertical;
|
||||
unicode-bidi: embed;
|
||||
overflow-x: auto;
|
||||
white-space: pre;
|
||||
display: block;
|
||||
word-wrap: break-word;
|
||||
.sy0 { display: inline-block; } //will allow wrapping here
|
||||
|
||||
font-size: 0.75em;
|
||||
background-color: #F8F8F8;
|
||||
border: 1px solid #ddd;
|
||||
padding: $spacing-vertical / 2;
|
||||
}
|
||||
|
||||
.code-bash-kw1 {color: #c20cb9; font-weight: bold;}
|
||||
.code-bash-kw2 {color: #7a0874; font-weight: bold; }
|
||||
.code-bash-comment { color: #888; }
|
||||
.sy0 {color: #000000; font-weight: bold; }
|
||||
|
||||
> code
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.code-bash__kw1 {color: #c20cb9; font-weight: bold;}
|
||||
.code-bash__kw2 {color: #7a0874; font-weight: bold; }
|
||||
.code-bash__comment { color: #888; }
|
||||
.code-bash__prompt { font-weight: bold; margin-right: 5px; }
|
Loading…
Add table
Reference in a new issue