+
+ ` : ""}
`);
- }
+ });
return exampleContent;
}
@@ -303,3 +306,12 @@ function renderReturns(args) {
returnContent = dedent(JSON.parse(JSON.stringify(args)));
return returnContent;
}
+
+function renderToggles(onSdkPage) {
+ return [
+ !onSdkPage ? "" : "",
+ "",
+ onSdkPage ? "" : "",
+ onSdkPage ? "" : ""
+ ];
+}
diff --git a/documents/build.md b/documents/build.md
index 59f259d..5efb82e 100644
--- a/documents/build.md
+++ b/documents/build.md
@@ -27,53 +27,54 @@ If you want to read a more general overview on application building (or you don'
## Hello Satoshi
-This section will guide you through creating a basic [Electron](https://electronjs.org/) application that calls to the LBRY network and renders an image returned by the network.
+This section will guide you through creating a basic [Electron](https://electronjs.org) application that calls to the LBRY network and renders an image returned by the network.
Electron is nice because it allows you to easily create web apps that don't rely on any centralized web servers, but you can absolutely use any tooling or language you would like.
### The Steps
-_These steps require [npm](https://www.npmjs.com/). Learn how to install it [here](https://www.npmjs.com/get-npm)._
+_These steps require [npm](https://www.npmjs.com). Learn how to install it [here](https://www.npmjs.com/get-npm)._
#### 1. Download and build the starter app
[electron-starter](https://github.com/lbryio/electron-starter) is the `create-react-app` of LBRY application building.
-
- ```
- git clone https://github.com/lbryio/electron-starter
- cd electron-starter
- npm install
- npm run dev
- ```
+
+```
+git clone https://github.com/lbryio/electron-starter
+cd electron-starter
+npm install
+npm run dev
+```
#### 2. Verify the app works
Type a word into the text input and click the button to [resolve](https://lbry.tech/api/sdk#resolve) it. This performs a [[claim]] lookup, which retrieves metadata the title, thumbnail, and file type from the LBRY blockchain.
- Try resolving `lbry://doitlive`.
+Try resolving `lbry://doitlive`.
#### 3. Modify the code
- Now that we have the metadata, let's [get](https://lbry.tech/api/sdk#get) the actual file! The code to do this is already there, just un-comment these lines in the app's [renderer/index.js](https://github.com/lbryio/electron-starter/blob/master/src/renderer/index.js) file.
+Now that we have the metadata, let's [get](https://lbry.tech/api/sdk#get) the actual file! The code to do this is already there, just un-comment these lines in the app's [renderer/index.js](https://github.com/lbryio/electron-starter/blob/master/src/renderer/index.js) file.
- ```
- claimData.innerText = "Loading...";
- Lbry.get({ uri: `lbry://${value}` })
- .then(result => {
- const filePath = result.download_path;
- const image = document.createElement("img");
+```js
+claimData.innerText = "Loading...";
- image.src = filePath;
- imageWrapper.appendChild(image);
+Lbry.get({ uri: `lbry://${value}` })
+ .then(result => {
+ const filePath = result.download_path;
+ const image = document.createElement("img");
- claimData.innerText = JSON.stringify(result, null, 2);
- })
- .catch(error => {
- claimData.innerText = JSON.stringify(error, null, 2);
- });
- ```
+ image.src = filePath;
+ imageWrapper.appendChild(image);
- This is the code that actually downloads a file. There are more robust ways to handle the download progress, but this will work fine for images. After you added that code back, try `get`ing `lbry://doitlive`.
+ claimData.innerText = JSON.stringify(result, null, 2);
+ })
+ .catch(error => {
+ claimData.innerText = JSON.stringify(error, null, 2);
+ });
+```
+
+This is the code that actually downloads a file. There are more robust ways to handle the download progress, but this will work fine for images. After you added that code back, try `get`ing `lbry://doitlive`.
### You Did It!
@@ -127,9 +128,9 @@ It is also possible to create a browser extension similar to Joule and Metamask.
1. Have the user run a local copy of the [SDK](#sdk) on their computer and send commands from the browser that interact with the user's personal wallet.
-2. Run the [SDK](#sdk) on a centrally hosted server and manage keys or funds for each user. If you're doing this, you'll want to read [Full Web Applications](#full-web-applications).
+1. Run the [SDK](#sdk) on a centrally hosted server and manage keys or funds for each user. If you're doing this, you'll want to read [Full Web Applications](#full-web-applications).
-Going through a centralized server makes it easier on users, but comes with more responsibility to keep your user's funds secure. It also requires creating business logic on your server to associate user accounts with common types like claims and files.
+Going through a centralized server makes it easier on users, but comes with more responsibility to keep your user's funds secure. It also requires creating business logic on your server to associate user accounts with common types like claims and files.
#### Desktop Applications
@@ -178,7 +179,7 @@ We do not currently have tooling available to build LBRY apps on iOS.
### SDK
-The [LBRY SDK](https://github.com/lbryio/lbry) provides an API that enables easy access to all functionality of the LBRY network. Most applications will choose to use the SDK.
+The [LBRY SDK](https://github.com/lbryio/lbry) provides an API that enables easy access to all functionality of the LBRY network. Most applications will choose to use the SDK.
You can download the latest version from the [releases page](https://github.com/lbryio/lbry/releases) or via the following URLs, which will always download the latest SDK for each operating system:
@@ -195,10 +196,10 @@ Once that is downloaded, there are two steps to get it integrated into your app.
First, run `lbrynet start` in the directory you downloaded the SDK. This starts the API server and connects to the LBRY network.
Then, use an API wrapper to talk to the SDK or write your own. There are a number of simple [api wrappers](https://lbry.tech/resources/api-wrappers) available in several different languages, created by LBRY community members! These allow you to easily send commands to the SDK in the language of your choice.
-
+
If a wrapper for the language you would like to use doesn't exist, it is still fairly easy to interact with. The SDK provides a JSON-RPC server at `localhost:5279` for interaction. You can call it via `cURL` or the HTTP functionality provided by the language you are using. You can look at an existing wrapper in another language for more detail.
-The API provided by the SDK is documented [here](https://lbry.tech/api/sdk).
+The API provided by the SDK is documented [here](https://lbry.tech/api/sdk).
### Chainquery
@@ -245,10 +246,7 @@ A full list of methods is available [here](https://lbry.tech/api/blockchain).
## Community and Support
Trouble? Questions? Want to share your progress? Interact with other devs!
-
+
- Join the #dev channel [in our chat](https://chat.lbry.com)
-- Introduce yourself or ask a question in [the forum](https://forum.lbry.tech/).
+- Introduce yourself or ask a question in [the forum](https://forum.lbry.tech).
- Every LBRY repository on our [GitHub](https://github.com/lbryio) contains contact information for the maintainer.
-
-
-
diff --git a/package.json b/package.json
index 427eb30..1731b8e 100755
--- a/package.json
+++ b/package.json
@@ -10,10 +10,10 @@
},
"author": "LBRY Team",
"dependencies": {
- "@babel/polyfill": "^7.4.3",
+ "@babel/polyfill": "^7.4.4",
"@inc/fastify-ws": "^1.1.0",
- "@octokit/rest": "^16.23.4",
- "@slack/client": "^5.0.0",
+ "@octokit/rest": "^16.25.3",
+ "@slack/client": "^5.0.1",
"async": "^2.6.2",
"async-es": "^2.6.2",
"choo": "^6.13.3",
@@ -23,16 +23,16 @@
"choo-websocket": "^2.0.0",
"colorette": "^1.0.7",
"cors": "^2.8.5",
- "cron": "^1.7.0",
+ "cron": "^1.7.1",
"date-format-lite": "^17.7.0",
"decamelize": "^3.2.0",
"dedent": "^0.7.0",
- "dotenv": "^7.0.0",
- "fastify": "~2.2.0",
- "fastify-compress": "^0.8.1",
+ "dotenv": "^8.0.0",
+ "fastify": "~2.3.0",
+ "fastify-compress": "^0.9.0",
"fastify-helmet": "^3.0.0",
"fastify-static": "^2.4.0",
- "front-matter": "^3.0.1",
+ "front-matter": "^3.0.2",
"fs-exists-sync": "^0.1.0",
"got": "^9.6.0",
"graceful-fs": "^4.1.15",
@@ -48,11 +48,11 @@
},
"description": "Documentation for the LBRY protocol and associated projects",
"devDependencies": {
- "@babel/cli": "^7.4.3",
- "@babel/core": "^7.4.3",
+ "@babel/cli": "^7.4.4",
+ "@babel/core": "^7.4.4",
"@babel/plugin-external-helpers": "7.2.0",
- "@babel/plugin-proposal-class-properties": "7.4.0",
- "@babel/plugin-proposal-decorators": "7.4.0",
+ "@babel/plugin-proposal-class-properties": "7.4.4",
+ "@babel/plugin-proposal-decorators": "7.4.4",
"@babel/plugin-proposal-export-namespace-from": "7.2.0",
"@babel/plugin-proposal-function-sent": "7.2.0",
"@babel/plugin-proposal-json-strings": "7.2.0",
@@ -60,22 +60,22 @@
"@babel/plugin-proposal-throw-expressions": "7.2.0",
"@babel/plugin-syntax-dynamic-import": "7.2.0",
"@babel/plugin-syntax-import-meta": "7.2.0",
- "@babel/preset-env": "^7.4.3",
- "@babel/register": "^7.4.0",
+ "@babel/preset-env": "^7.4.4",
+ "@babel/register": "^7.4.4",
"@inc/eslint-config": "^1.1.3",
- "@inc/sasslint-config": "^1.2.0",
+ "@inc/sasslint-config": "^2019.5.7",
"@lbry/color": "^1.1.1",
- "@lbry/components": "^2.4.0",
+ "@lbry/components": "^2.7.1",
"eslint": "^5.16.0",
- "husky": "^1.3.1",
- "nodemon": "^1.18.11",
+ "husky": "^2.2.0",
+ "nodemon": "^1.19.0",
"npm-run-all": "^4.1.5",
- "pino-pretty": "^2.6.0",
- "sass": "^1.18.0",
- "sass-lint": "^1.12.1",
+ "pino-pretty": "^3.0.0",
+ "sass": "^1.20.1",
+ "sass-lint": "^1.13.1",
"snazzy": "^8.0.0",
"standardx": "^3.0.1",
- "updates": "^8.0.1"
+ "updates": "^8.0.3"
},
"engines": {
"node": "10.2.x"