Merge branch 'master' into 209-quickstart
This commit is contained in:
commit
23e6142427
25 changed files with 198 additions and 57 deletions
|
@ -6,52 +6,40 @@
|
||||||
|
|
||||||
import html from "choo/html";
|
import html from "choo/html";
|
||||||
|
|
||||||
// U T I L S
|
// U T I L
|
||||||
|
|
||||||
import config from "@root/config";
|
import config from "@root/config";
|
||||||
let title = "";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// E X P O R T
|
// E X P O R T
|
||||||
|
|
||||||
export default (state, emit) => {
|
export default (state, emit) => {
|
||||||
switch(true) {
|
const newMetadata = state.lbry;
|
||||||
case (state.route !== "/" && state.params.wildcard):
|
const description = newMetadata && newMetadata.description ? newMetadata.description : config.meta.description;
|
||||||
title = `${state.params.wildcard.capitalize()} ∙ LBRY ∙ ${config.meta.tagline}`;
|
const title = newMetadata && newMetadata.title ? newMetadata.title + " - lbry.tech" : "lbry.tech - " + config.meta.tagline;
|
||||||
break;
|
|
||||||
|
|
||||||
case (state.route === "api"):
|
|
||||||
title = `API ∙ LBRY ∙ ${config.meta.tagline}`;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
title = `LBRY ∙ ${config.meta.tagline}`;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (state.title !== title) emit(state.events.DOMTITLECHANGE, title);
|
if (state.title !== title) emit(state.events.DOMTITLECHANGE, title);
|
||||||
state.page = state.page || { };
|
state.page = state.page || { };
|
||||||
|
|
||||||
const newMetadata = state.lbry;
|
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<title>${newMetadata && newMetadata.title ? newMetadata.title : title}</title>
|
<title>${title}</title>
|
||||||
|
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||||
<meta name="author" content="${config.meta.title}"/>
|
<meta name="author" content="${config.meta.title}"/>
|
||||||
<meta name="description" content="${newMetadata && newMetadata.description ? newMetadata.description : config.meta.description}"/>
|
<meta name="description" content="${description}"/>
|
||||||
<meta name="title" content="${config.meta.title}"/>
|
<meta name="title" content="${config.meta.title}"/>
|
||||||
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"/>
|
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"/>
|
||||||
|
|
||||||
<!--/ Open Graph /-->
|
<!--/ Open Graph /-->
|
||||||
|
<meta property="og:title" content="${title}"/>
|
||||||
|
<meta property="og:description" content="${description}"/>
|
||||||
<meta property="og:image" content="${newMetadata && newMetadata["og:image"] ? newMetadata["og:image"] : "/assets/media/images/og-image.png"}"/>
|
<meta property="og:image" content="${newMetadata && newMetadata["og:image"] ? newMetadata["og:image"] : "/assets/media/images/og-image.png"}"/>
|
||||||
<meta property="og:image:height" content="${newMetadata && newMetadata["og:image:height"] ? newMetadata["og:image:height"] : 720}"/>
|
<meta property="og:image:height" content="${newMetadata && newMetadata["og:image:height"] ? newMetadata["og:image:height"] : 720}"/>
|
||||||
<meta property="og:image:width" content="${newMetadata && newMetadata["og:image:width"] ? newMetadata["og:image:width"] : 1280}"/>
|
<meta property="og:image:width" content="${newMetadata && newMetadata["og:image:width"] ? newMetadata["og:image:width"] : 1280}"/>
|
||||||
<meta property="og:locale" content="en_US"/>
|
<meta property="og:locale" content="en_US"/>
|
||||||
<meta property="og:site_name" content="${config.meta.title}"/>
|
<meta property="og:site_name" content="LBRY.tech"/>
|
||||||
<meta property="og:title" content="${newMetadata && newMetadata.title ? newMetadata.title : title}"/>
|
|
||||||
<meta property="og:type" content="website"/>
|
<meta property="og:type" content="website"/>
|
||||||
<meta property="og:url" content="https://lbry.tech${state.href}"/>
|
<meta property="og:url" content="https://lbry.tech${state.href}"/>
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,10 @@
|
||||||
"/resources/schema": "/spec#metadata",
|
"/resources/schema": "/spec#metadata",
|
||||||
"/resources/signing-claim": "/resources/claim-signing",
|
"/resources/signing-claim": "/resources/claim-signing",
|
||||||
"/resources/uri": "/spec#urls",
|
"/resources/uri": "/spec#urls",
|
||||||
|
"/resources/video-lbrysdk": "https://spee.ch/967f99344308f1e90f0620d91b6c93e4dfb240e0/lbrynet-dev-setup",
|
||||||
|
"/resources/video-lbrycrd": "https://spee.ch/5803b66dca7707584b36fe6b644f278fc39d1adf/intro-to-LBRYcrd",
|
||||||
|
"/resources/video-lbrydesktop": "https://spee.ch/7da73fc508ffc4ff8b2711e3c3950110430b0c5f/LBRYAppDesign",
|
||||||
|
"/resources/video-lbryandroid": "https://spee.ch/e781060bc708247f07afebc02d5f75cfba8e2c4b/video-2018-10-15053403",
|
||||||
"/tour": "/playground",
|
"/tour": "/playground",
|
||||||
"/specification": "/spec",
|
"/specification": "/spec",
|
||||||
"/whitepaper": "/spec"
|
"/whitepaper": "/spec"
|
||||||
|
|
|
@ -276,7 +276,7 @@ function memePublishMessaging(source) {
|
||||||
|
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
To see Proof of Work (lol) that your meme is on the LBRY blockchain, <a href="https://explorer.lbry.io/address/${source.result.claim_address}" rel="noopener noreferrer" target="_blank" title="Your meme, on our blockchain explorer">check it out</a> on our blockchain explorer! Please note that it may take a couple minutes for the transaction to be confirmed.
|
To see Proof of Work (lol) that your meme is on the LBRY blockchain, <a href="https://explorer.lbry.io/tx/${source.result.output.txid}?address=${source.result.claim_address}" rel="noopener noreferrer" target="_blank" title="Your meme, on our blockchain explorer">check it out</a> on our blockchain explorer! Please note that it may take a couple minutes for the transaction to be confirmed.
|
||||||
|
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
|
|
|
@ -25,13 +25,13 @@ const sdkApi = process.env.NODE_ENV === "development" ?
|
||||||
// E X P O R T
|
// E X P O R T
|
||||||
|
|
||||||
export default async(state) => {
|
export default async(state) => {
|
||||||
// How to set custom metadata for this page
|
// below is evil, I just inherited it -- Jeremy
|
||||||
// state.lbry = {
|
const apilabel = state.params.wildcard == "sdk" ? "SDK" : state.params.wildcard.charAt(0).toLocaleUpperCase() + state.params.wildcard.substring(1);
|
||||||
// description: "This is the API page for LBRY.tech",
|
|
||||||
// "og:image": "/assets/media/images/carlsagan2.jpg",
|
state.lbry = {
|
||||||
// "og:image:height": 300,
|
title: apilabel + " API Documentation",
|
||||||
// "og:image:width": 400
|
description: "See API documentation, signatures, and sample calls for the LBRY " + apilabel + " APIs."
|
||||||
// };
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const apiResponse = await parseApiFile(state.params.wildcard);
|
const apiResponse = await parseApiFile(state.params.wildcard);
|
||||||
|
|
|
@ -81,7 +81,7 @@ export default (state, emit) => { // eslint-disable-line
|
||||||
<header class="page__header">
|
<header class="page__header">
|
||||||
<div class="page__header-wrap">
|
<div class="page__header-wrap">
|
||||||
<div class="inner-wrap">
|
<div class="inner-wrap">
|
||||||
<h1 class="page__header__title" itemprop="name headline">${markdownFileDetails.attributes.title}</h1>
|
<h1 class="page__header__title" itemprop="name headline">${title}</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
@ -13,7 +13,7 @@ module.exports = exports = {
|
||||||
},
|
},
|
||||||
meta: {
|
meta: {
|
||||||
color: "#222",
|
color: "#222",
|
||||||
description: "LBRY is a free, open, and community-run digital marketplace. Come check out our documentation and contribute!",
|
description: "LBRY is a free, open, and community-controlled digital goods marketplace. Learn about technical specifics, how to contribute, API specifications, and much more.",
|
||||||
name: "LBRY",
|
name: "LBRY",
|
||||||
tagline: "We came from the future to help you save the Internet",
|
tagline: "We came from the future to help you save the Internet",
|
||||||
title: "LBRY"
|
title: "LBRY"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
title: Build
|
title: Build
|
||||||
|
description: Learn how to build your own app via LBRY in this comprehensive guide! The future of content freedom begins with you. *patriotic music plays*
|
||||||
---
|
---
|
||||||
|
|
||||||
## THIS IS NOT DONE AT ALL AND IF YOU CONTINUE TO READ IT YOU MENTALLY ASSENT TO COMMITTING AT LEAST ONE CHANGE THAT MAKES IT BETTER
|
## THIS IS NOT DONE AT ALL AND IF YOU CONTINUE TO READ IT YOU MENTALLY ASSENT TO COMMITTING AT LEAST ONE CHANGE THAT MAKES IT BETTER
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
title: Community
|
title: Community
|
||||||
|
description: Want to talk with other LBRYians? Find out where the LBRY team hangs out. It's not _only_ shady street corners.
|
||||||
---
|
---
|
||||||
|
|
||||||
Sometimes we say that the LBRY [[blockchain]] is the foundation of the LBRY protocol, but that's not really true. The foundation of LBRY is the community of people that make it possible.
|
Sometimes we say that the LBRY [[blockchain]] is the foundation of the LBRY protocol, but that's not really true. The foundation of LBRY is the community of people that make it possible.
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
title: Contributor's Guide
|
title: Contributor's Guide
|
||||||
|
description: Learn how to be a contributor to core and auxiliary LBRY components in this guide. Everything LBRY builds is open-source, be a part of it!
|
||||||
---
|
---
|
||||||
|
|
||||||
## Welcome to LBRY!
|
## Welcome to LBRY!
|
||||||
|
@ -18,21 +19,21 @@ If you want to contribute to LBRY, there's definitely something for you! The fir
|
||||||
|
|
||||||
### Core Protocol Components
|
### Core Protocol Components
|
||||||
|
|
||||||
| Component | Language (Toolset) | What Is It
|
| Component | Language (Toolset) | What Is It | Intro Video
|
||||||
--- | --- | ---
|
--- | --- | --- | ---
|
||||||
| [lbrycrd](https://github.com/lbryio/lbrycrd) | C++ | A full node for the LBRY blockchain, including a standalone wallet. Used by miners and some applications. Most consumer applications do not bundle [[lbrycrd]] directly, and instead bundle [[lbry-sdk]].
|
| [lbrycrd](https://github.com/lbryio/lbrycrd) | C++ | A full node for the LBRY blockchain, including a standalone wallet. Used by miners and some applications. Most consumer applications do not bundle [[lbrycrd]] directly, and instead bundle [[lbry-sdk]]. | [Video](/resources/video-lbrycrd)
|
||||||
| [lbry-sdk](https://github.com/lbryio/lbry) | Python (asyncio) | A daemon that can be used directly or to develop other applications. Provides convenience [APIs](/api/sdk), bundles an SPV wallet ([[torba]]), and contains an implementation of the LBRY data network. |
|
| [lbry-sdk](https://github.com/lbryio/lbry) | Python (asyncio) | A daemon that can be used directly or to develop other applications. Provides convenience [APIs](/api/sdk), bundles an SPV wallet ([[torba]]), and contains an implementation of the LBRY data network. | [Video](/resources/video-lbrysdk)
|
||||||
| [torba](https://github.com/lbryio/torba) | Python | An [[SPV]] (Simple Payment Verification) wallet. Bundled with [[lbry-sdk]]. |
|
| [torba](https://github.com/lbryio/torba) | Python | An [[SPV]] (Simple Payment Verification) wallet. Bundled with [[lbry-sdk]].
|
||||||
| [wallet server](https://github.com/lbryio/lbry/tree/master/lbrynet/extras/wallet/server) | Protobuf, Python | The wallet server used by [[torba]].
|
| [wallet server](https://github.com/lbryio/lbry/tree/master/lbrynet/extras/wallet/server) | Protobuf, Python | The wallet server used by [[torba]]. | |
|
||||||
| [schema](https://github.com/lbryio/lbry/tree/master/lbrynet/schema) | Protobuf, Python | Defines the structure of the metadata stored in the LBRY blockchain.
|
| [schema](https://github.com/lbryio/lbry/tree/master/lbrynet/schema) | Protobuf, Python | Defines the structure of the metadata stored in the LBRY blockchain. | |
|
||||||
|
|
||||||
### Official Applications
|
### Official Applications
|
||||||
| Application | Language (Toolset) | What Is It
|
| Application | Language (Toolset) | What Is It | Intro Video
|
||||||
--- | --- | ---
|
--- | --- | --- | ---
|
||||||
| [lbry-desktop](https://github.com/lbryio/lbry-desktop) | JavaScript (ReactJS, Electron) | A graphical browser for the LBRY network for Windows, macOS, and Linux. [[lbry-desktop]] is built with [[lbry-sdk]]. |
|
| [lbry-desktop](https://github.com/lbryio/lbry-desktop) | JavaScript (ReactJS, Electron) | A graphical browser for the LBRY network for Windows, macOS, and Linux. [[lbry-desktop]] is built with [[lbry-sdk]]. | [Video](/resources/video-lbrydesktop)
|
||||||
| [lbry-android](https://github.com/lbryio/lbry-android) | JavaScript (ReactNative), Python (kivy) | A graphical browser for the LBRY network for Android. [[lbry-android]] is built with [[lbry-sdk]].
|
| [lbry-android](https://github.com/lbryio/lbry-android) | JavaScript (ReactNative), Python (kivy) | A graphical browser for the LBRY network for Android. [[lbry-android]] is built with [[lbry-sdk]]. | [Video](/resources/video-lbryandroid)
|
||||||
| [lbry-redux](https://github.com/lbryio/lbry-redux) | JavaScript (Redux) | A common codebase for shared Redux logic between [[lbry-desktop]] and [[lbry-android]].
|
| [lbry-redux](https://github.com/lbryio/lbry-redux) | JavaScript (Redux) | A common codebase for shared Redux logic between [[lbry-desktop]] and [[lbry-android]]. | |
|
||||||
| [spee.ch](https://github.com/lbryio/spee.ch) | JavaScript (Node, ReactJS, Express) | A web-based host for free LBRY content. Usable directly as a content link dump site or as a customized, standalone install.
|
| [spee.ch](https://github.com/lbryio/spee.ch) | JavaScript (Node, ReactJS, Express) | A web-based host for free LBRY content. Usable directly as a content link dump site or as a customized, standalone install. | |
|
||||||
|
|
||||||
### Websites
|
### Websites
|
||||||
| Domain | Language (Toolset) | What Is It
|
| Domain | Language (Toolset) | What Is It
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
title: LBRY Glossary
|
title: Glossary
|
||||||
|
description: lbry.tech sometimes uses acronyms and fancy words. This glossary converts our jargon into clarity.
|
||||||
---
|
---
|
||||||
|
|
||||||
This glossary will help you understand the exact meaning of LBRY and blockchain related terms.
|
This glossary will help you understand the exact meaning of LBRY and blockchain related terms.
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
title: Overview
|
title: Overview
|
||||||
|
description: What *is* LBRY? Who *is* Satoshi? In this LBRY technology overview, one of those questions is answered thoroughly.
|
||||||
---
|
---
|
||||||
|
|
||||||
## Mission
|
## Mission
|
||||||
|
|
|
@ -8,7 +8,7 @@ LBRY Inc. currently releases and maintains three applications:
|
||||||
- [LBRY Android](https://github.com/lbryio/lbry-android), an Android browser for the LBRY network in React Native and available in the playstore.
|
- [LBRY Android](https://github.com/lbryio/lbry-android), an Android browser for the LBRY network in React Native and available in the playstore.
|
||||||
- [spee.ch](https://github.com/lbryio/spee.ch), a web-based sharing and organizational app designed for self-hosting.
|
- [spee.ch](https://github.com/lbryio/spee.ch), a web-based sharing and organizational app designed for self-hosting.
|
||||||
|
|
||||||
A central idea of LBRY is that there's _not_ a singular way to interact with the network. Anyone can build on top of LBRY in a permissionless manner. LBRY Inc. maintains open-source applications to show what's possible and to give new users a user-friendly to use the network.
|
A central idea of LBRY is that there's _not_ a singular way to interact with the network. Anyone can build on top of LBRY in a permissionless manner. LBRY Inc. maintains open-source applications to show what's possible and to give new users a user-friendly experience on the network.
|
||||||
|
|
||||||
### Additional Resources
|
### Additional Resources
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
title: Playground
|
title: Playground
|
||||||
|
description: Learn by doing? In this interactive playground you can use the LBRY network and get a feeling for how it actually works!
|
||||||
---
|
---
|
||||||
|
|
||||||
Check out any of the interactive examples to get a feel for the LBRY protocol!
|
Check out any of the interactive examples to get a feel for the LBRY protocol!
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
---
|
---
|
||||||
title: Resources
|
title: Resources
|
||||||
|
description: Find the LBRY specification, API documentation, our Contributor's guide, and more in the Resources area.
|
||||||
---
|
---
|
||||||
|
|
||||||
<ResourcesLinkGrid/>
|
<ResourcesLinkGrid/>
|
||||||
|
|
||||||
## Additional Resources
|
## Additional Resources
|
||||||
|
|
||||||
|
- [Developer Setup Intro Videos](/resources/setup-videos)
|
||||||
- [LBRY Glossary](/glossary)
|
- [LBRY Glossary](/glossary)
|
||||||
- [LBRY Merkle Claim Trie](/resources/claimtrie)
|
- [LBRY Merkle Claim Trie](/resources/claimtrie)
|
||||||
- [LBRY Consensus Algorithm](/resources/consensus)
|
- [LBRY Consensus Algorithm](/resources/consensus)
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
# API wrappers for the LBRY blockchain and protocol
|
---
|
||||||
|
title: API Wrappers
|
||||||
|
description: Find LBRY API wrappers for your favorite language.
|
||||||
|
---
|
||||||
|
|
||||||
This document contains a comprehensive list of all available API wrappers for the LBRY protocol and blockchain. API wrappers allow for easier integration of the LBRY APIs into your codebase. They still require you to run either the [LBRY protocol](https://github.com/lbryio/lbry) or the [LBRY blockchain](https://github.com/lbryio/lbrycrd).
|
This document contains a comprehensive list of all available API wrappers for the LBRY protocol and blockchain. API wrappers allow for easier integration of the LBRY APIs into your codebase. They still require you to run either the [LBRY protocol](https://github.com/lbryio/lbry) or the [LBRY blockchain](https://github.com/lbryio/lbrycrd).
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
# Signing a claim
|
---
|
||||||
|
title: Claim Signing
|
||||||
|
description: How does signing a claim (a publish) work in LBRY-land? This page explains in great detail. Seriously great detail. The greatest detail anyone has ever seen!
|
||||||
|
---
|
||||||
|
|
||||||
Reilly wants to publish _Terror on the Midway_ to the channel he claimed `lbry://@FleischerSuperman`. He picks the name "terroronthemidway", and fills in the information for the claim:
|
Reilly wants to publish _Terror on the Midway_ to the channel he claimed `lbry://@FleischerSuperman`. He picks the name "terroronthemidway", and fills in the information for the claim:
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
# The Merkle Claim Trie
|
---
|
||||||
|
title: Merkle Claim Trie
|
||||||
|
description: Publishes to the LBRY network get placed into a Merkle Claim Trie. Learn what that is and why trie is not a typo in this resource article.
|
||||||
|
---
|
||||||
|
|
||||||
How the data structure that organizes claims by names works, how proofs are generated/verified and how consensus on the state of the trie is represented.
|
How the data structure that organizes claims by names works, how proofs are generated/verified and how consensus on the state of the trie is represented.
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
# LBRY Consensus Algorithm
|
---
|
||||||
|
title: Consensus Algorithm
|
||||||
|
description: How does the LBRY blockchain achieve consensus? This resource page will explain.
|
||||||
|
---
|
||||||
|
|
||||||
LBRY uses [proof of work](https://en.bitcoin.it/wiki/Proof_of_work) as a consensus mechanism, the same way that Bitcoin does.
|
LBRY uses [proof of work](https://en.bitcoin.it/wiki/Proof_of_work) as a consensus mechanism, the same way that Bitcoin does.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
# Configurable settings for the LBRY daemon
|
---
|
||||||
|
title: SDK Settings
|
||||||
|
description: The daemon provided by the LBRY SDK has many settings. This resource lists them all and what they mean. Ready, set, settings!
|
||||||
|
---
|
||||||
|
|
||||||
This document outlines how to configure daemon settings and what options are available. They can be found on the lbry GitHub repository in [conf.py](https://github.com/lbryio/lbry/blob/master/lbrynet/conf.py).
|
This document outlines how to configure SDK daemon settings and what options are available. They can be found on the lbry GitHub repository in [conf.py](https://github.com/lbryio/lbry/blob/master/lbrynet/conf.py).
|
||||||
|
|
||||||
## Daemon settings configuration
|
## Daemon settings configuration
|
||||||
|
|
||||||
|
|
93
documents/resources/download-overview-new.md
Normal file
93
documents/resources/download-overview-new.md
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
---
|
||||||
|
title: Content Downloading
|
||||||
|
description: This resource article walks through the step-by-step process of downloading a piece of content from the LBRY network.
|
||||||
|
---
|
||||||
|
|
||||||
|
This resource outlines the step-by-step process of using the LBRY protocol to download something.
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
Downloading spans the three core components of LBRY (blockchain, DHT, blob exchange) and explains the structure of the claim metadata and the blobs that make up a stream.
|
||||||
|
|
||||||
|
You will need:
|
||||||
|
|
||||||
|
- a running [lbrycrd](https://github.com/lbryio/lbrycrd) node, or another way to access blockchain data (perhaps [lbryumx](https://github.com/lbryio/lbryumx) or [chainquery](https://github.com/lbryio/chainquery))
|
||||||
|
- a running DHT node
|
||||||
|
- the claim ID of the content you wish to download
|
||||||
|
|
||||||
|
For this example, we will use claim ID `d9317ac7842f88ba442fee749c4f834353c24206`.
|
||||||
|
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
- start with **claim ID**
|
||||||
|
- blockchain gets you **metadata** for your claim ID
|
||||||
|
- parsing metadata gets you **stream hash** and fee info
|
||||||
|
- if there is a fee, pay it using the blockchain
|
||||||
|
- dht gets you **peers** for the stream hash
|
||||||
|
- blob exchange gets **manifest blob** from peers
|
||||||
|
- manifest is parsed to get **content blob hashes**
|
||||||
|
- dht and then blob exchange get you the **content blobs**
|
||||||
|
- blobs are decrypted and assembled to create the **file**
|
||||||
|
|
||||||
|
|
||||||
|
## Parse the Metadata
|
||||||
|
|
||||||
|
Perform a `getclaimbyid` call to lbrycrd using the claim ID for the claim you want to look up. You should get a response with some parameters. The `value` parameter contains the claim contents as a protobuf-encoded binary string. Decode the value using the protobuf definitions in [lbryio/types](https://github.com/lbryio/types/tree/master/proto). You will get a Claim object.
|
||||||
|
|
||||||
|
|
||||||
|
## Get the Stream Hash
|
||||||
|
|
||||||
|
Confirm that `Claim.type` is `1` (a stream claim).
|
||||||
|
|
||||||
|
Claim.Stream.hash contains the stream hash, which is the hash of the manifest blob in the stream.
|
||||||
|
|
||||||
|
|
||||||
|
## Pay the Fee
|
||||||
|
|
||||||
|
Check the `Claim.Stream.Fee` field. If it exists, then a payment is required to download this content. Get the address, amount, and currency from the Fee, convert the amount to LBC if its not already in LBC, and perform a `sendtoaddress` call to lbrycrd to send the fee amount to the fee address.
|
||||||
|
|
||||||
|
Our example claim does not have a fee. If you want to see a claim with a fee, look up claim ID `fbdcd44a97810522d23d5f1335b8ca04be9d776c`.
|
||||||
|
|
||||||
|
## Find Hosts for the Manifest Blob
|
||||||
|
|
||||||
|
Look up the stream hash in the DHT. Internally this will perform an iterativeFindValue call, starting with the nodes already in the routing table and proceeding to nodes that are closest to the stream hash. The DHT should return a list of hosts that have advertised that they have this hash.
|
||||||
|
|
||||||
|
|
||||||
|
## Download Manifest Blob
|
||||||
|
|
||||||
|
Use the blob exchange protocol to request the manifest blob from the hosts found in the previous step.
|
||||||
|
|
||||||
|
|
||||||
|
## Read Manifest Blob
|
||||||
|
|
||||||
|
The manifest is JSON-formatted text. It contains a dictionary with the following structure:
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"blobs": [
|
||||||
|
{
|
||||||
|
"blobHash": "b7e43c102781f978c24bc2bc...",
|
||||||
|
"iv": "63a6befc3c8d01f662ffad2f2381b357",
|
||||||
|
"length": 2097152,
|
||||||
|
},
|
||||||
|
...
|
||||||
|
],
|
||||||
|
"filename": "574c707655476a766d58632e6d7034",
|
||||||
|
"key": "ee768c4e642012bb5b2e20cf9b1f997b",
|
||||||
|
"version":1
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
All string fields are hex-encoded.
|
||||||
|
|
||||||
|
To download the content blobs, repeat the steps we took for the stream hash, but instead use the `blobHash` value for each blob. Look up the blob hash in the DHT to find hosts, then download the blob from those hosts.
|
||||||
|
|
||||||
|
## Decrypt and Assemble Blobs
|
||||||
|
|
||||||
|
Now that all the blobs have been downloaded, they can be decrypted and assembled into the original file. Decrypt each blob using the key and IVs in the manifest, and concatenate the decrypted bytes in order. Write the finished file to disk.
|
||||||
|
|
||||||
|
|
||||||
|
## Enjoy a Cute Puppy Video
|
||||||
|
|
||||||
|
You earned it.
|
|
@ -1,8 +1,13 @@
|
||||||
# How To Download Content Using the LBRY Protocol
|
---
|
||||||
|
title: Content Downloading
|
||||||
|
description: This resource article walks through the step-by-step process of downloading a piece of content from the LBRY network.
|
||||||
|
---
|
||||||
|
|
||||||
|
This resource outlines the step-by-step process of using the LBRY protocol to download something.
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
This is the step-by-step process of using the LBRY protocol to download something. It spans the three core components of LBRY (blockchain, DHT, blob exchange) and explains the structure of the claim metadata and the blobs that make up a LBRY stream.
|
Downloading spans the three core components of LBRY (blockchain, DHT, blob exchange) and explains the structure of the claim metadata and the blobs that make up a LBRY stream.
|
||||||
|
|
||||||
You will need:
|
You will need:
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
---
|
||||||
|
title: Full Node Encryption
|
||||||
|
description: Learn how to use encryption with lbrycrd, the full blockchain software for the LBRY network.
|
||||||
|
---
|
||||||
|
|
||||||
*Note: The below instructions are the [LBRYCrd Full Blockchain wallet](https://github.com/lbryio/lbrycrd) and not the default wallet that ships with the LBRY App. We are still working on an encryption solution for this.*
|
*Note: The below instructions are the [LBRYCrd Full Blockchain wallet](https://github.com/lbryio/lbrycrd) and not the default wallet that ships with the LBRY App. We are still working on an encryption solution for this.*
|
||||||
|
|
||||||
You can use `lbrycrd-cli encryptwallet <passphrase>` to encrypt your wallet.
|
You can use `lbrycrd-cli encryptwallet <passphrase>` to encrypt your wallet.
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
# Regtest Setup
|
---
|
||||||
|
title: Regtest Setup
|
||||||
|
description: Regtest is a parallel testing network for the LBRY blockchain. Learn how to use it in this resource article.
|
||||||
|
---
|
||||||
|
|
||||||
|
## Why Use Regtest
|
||||||
|
|
||||||
## Why use a regtest server
|
|
||||||
A regtest server provides for a way to instantly generate blocks so that transactions can be instantaneous, which ultimately means no waiting for confirmations from the blockchain. Also, it’s not a problem if you accidentally corrupt your wallet, since no real funds are lost! Delete the files and setup a new one.
|
A regtest server provides for a way to instantly generate blocks so that transactions can be instantaneous, which ultimately means no waiting for confirmations from the blockchain. Also, it’s not a problem if you accidentally corrupt your wallet, since no real funds are lost! Delete the files and setup a new one.
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
# LBRY Repository Documentation Standards
|
---
|
||||||
|
title: Repository Documentation Standards
|
||||||
|
description: All repository documentation at LBRY complies with a single standard, outlined in this resource article.
|
||||||
|
---
|
||||||
|
|
||||||
This document outlines the standards for all public, open-source repositories used by LBRY.
|
This document outlines the standards for all public, open-source repositories used by LBRY.
|
||||||
|
|
||||||
|
|
16
documents/resources/setup-videos.md
Normal file
16
documents/resources/setup-videos.md
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# Getting started with LBRY development
|
||||||
|
|
||||||
|
Having trouble with getting your LBRY development environment setup or do you prefer following along with a video? Well you're in luck...we have setup videos for many of projects!
|
||||||
|
|
||||||
|
## Desktop Application
|
||||||
|
Check out [our video tutorial](/resources/video-lbrydesktop) to setup the [Desktop app](https://github.com/lbryio/lbry-desktop) development environment.
|
||||||
|
|
||||||
|
|
||||||
|
## Android Application
|
||||||
|
Check out [our video tutorial](/resources/video-lbryandroid) to setup the [Android app](https://github.com/lbryio/lbry-android) development environment.
|
||||||
|
|
||||||
|
## LBRY SDK
|
||||||
|
Check out [our video tutorial](/resources/video-lbrysdk) to setup the [LBRY SDK](https://github.com/lbryio/lbry) development environment.
|
||||||
|
|
||||||
|
## LBRY Blockchain
|
||||||
|
Check out [our video tutorial](/resources/video-lbrycrd) to setup the [LBRY Blockchain](https://github.com/lbryio/lbrycrd) development environment.
|
Loading…
Reference in a new issue