From d2116d8f5dec59371594a07348e3370f5ffffa91 Mon Sep 17 00:00:00 2001 From: Thomas Osmonson Date: Fri, 17 Jul 2020 11:26:08 -0500 Subject: [PATCH] refactor: change alert/notices syntax --- .github/workflows/deploy.yml | 1 - src/pages/develop/collection-type.md | 18 ++++---- src/pages/develop/overview_auth.md | 2 +- src/pages/develop/radiks-setup.md | 2 +- src/pages/org/overview.md | 2 +- src/pages/org/tokenholders.md | 2 +- src/pages/org/wallet-install.md | 23 +++++----- src/pages/org/wallet-intro.md | 51 ++++++++++++++--------- src/pages/org/wallet-use.md | 13 +++--- src/pages/storage/digital-ocean-deploy.md | 9 ++-- src/pages/storage/hello-hub-choice.md | 41 ++++++++---------- src/pages/storage/overview.md | 3 +- 12 files changed, 83 insertions(+), 84 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index db39bc2f..2c8cd56e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,7 +21,6 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const firstLine = `The Blockstack docs have been deployed with Vercel using the code from this PR!`; - console.log(context); const { data } = await github.issues.listComments({ ...context.repo, issue_number: context.issue.number, diff --git a/src/pages/develop/collection-type.md b/src/pages/develop/collection-type.md index edb87fdc..4ace1045 100644 --- a/src/pages/develop/collection-type.md +++ b/src/pages/develop/collection-type.md @@ -15,9 +15,9 @@ New collections rely on the `blockstack-collections` package. Before you code, m npm install -g blockstack-collections ``` -You should also familiarize yourself with the Collection class and review the existing Collection types. Keep in mind, someone else may have already added a custom type similar to what you want to add. +You should also familiarize yourself with the [Collection](https://github.com/blockstack/blockstack-collections/blob/master/src/types/collection.ts) class and review [the existing Collection types](https://github.com/blockstack/blockstack-collections/tree/master/src/types). Keep in mind, someone else may have already added a custom type similar to what you want to add. -Collection types can be written in `.js` Javascript or `.ts` (Typescript) files. Typescript is a typed superset of Javascript, you can read the language documentation to learn more. +Collection types can be written in `.js` Javascript or `.ts` (Typescript) files. Typescript is a typed superset of Javascript, you can [read the language documentation](https://www.typescriptlang.org/) to learn more. ## Essential steps for creating a Collection type @@ -48,13 +48,13 @@ This section demonstrates how to create a new collection type using Typescript. } ``` - {% include warning.html content="While you must specify a unique identifier, the Blockstack platform does not currently enforce uniqueness. If your Collection type shares the same identifier as another type, it will lead to data corruption for the user. In the future, the Blockstack platform will enforce unique collection names. " %} + !> While you must specify a unique identifier, the Blockstack platform does not currently enforce uniqueness. If your `Collection` type shares the same identifier as another type, it will lead to data corruption for the user. In the future, the Blockstack platform will enforce unique collection names. 5. Define a static `schema` constant. This is your type's schema. - ```js + ```jsx static schema = { identifier: String, firstName: String, @@ -72,7 +72,7 @@ This section demonstrates how to create a new collection type using Typescript. By default, the `singleFile` flag is false. This setting causes every record in a collection to store in Gaia as a separate file. The default works well for larger types that describe data such as documents or photos. If your `Collection` type only has a few fields and is not expected to have a large number of records, set the `singleFile` data format flag to `true`. - ```js + ```jsx static singleFile = true ``` @@ -82,7 +82,7 @@ This section demonstrates how to create a new collection type using Typescript. In the following example code, data is converted to JSON string for storage. - ```js + ```jsx static fromObject(object: object) { // Create from plain Javascript object return new Contact(object) @@ -105,7 +105,7 @@ This section demonstrates how to create a new collection type using Typescript. If you need to listen for changes to any of the object’s attributes, you can implement the `onValueChange` method. For example, in the `Contacts` Collection type, when the contact is renamed, the unique identifier for the object needs to be updated. -```js +```jsx onValueChange(key: string, value: any) { if (key === 'firstName') { this.previousIdentifier = this.attrs.identifier @@ -124,7 +124,7 @@ If you need to listen for changes to any of the object’s attributes, you can i To perform additional processing of a collection, you can override the `get`, `save`, `list` and `delete` methods. For example, in the `Contact` type, the `save` method is overridden to also perform a `delete` if a contact is renamed. Deletion is necessary because identifiers for a `Contact` are generated from the contact name. And data stored under the previous identifier must be deleted after writing to a new identifier. -```js +```jsx async save(userSession?: UserSession) { // Delete old file on save if object identifier changes return super.save(userSession) @@ -148,6 +148,6 @@ While you _can_ use your collection exclusively in your application, the Collect To publish your Collection type, do the following: -1. Clone or fork the blockstack-collections repo. +1. Clone or fork the [blockstack-collections](https://github.com/blockstack/blockstack-collections) repo. 2. Add your new type file to the `src/types` subdirectory. 3. Create a pull request back to the `blockstack-collection` repository. diff --git a/src/pages/develop/overview_auth.md b/src/pages/develop/overview_auth.md index ff17577c..3a20c16a 100644 --- a/src/pages/develop/overview_auth.md +++ b/src/pages/develop/overview_auth.md @@ -110,7 +110,7 @@ and [Ruby](https://github.com/blockstack/ruby-jwt-blockstack/tree/ruby-jwt-blockstack) JWT libraries with support for this signing algorithm. -{% include note.html content="The Blockstack JWT implementation is different from other implementations because of the underlying cryptography we employ. There are libraries in Javascript and Ruby available on the Blockstack Github to allow you to work with these tokens." %} +-> The Blockstack JWT implementation is different from other implementations because of the underlying cryptography we employ. There are libraries in [Javascript](https://github.com/blockstack/jsontokens-js) and [Ruby](https://github.com/blockstack/ruby-jwt-blockstack) available on the Blockstack Github to allow you to work with these tokens. ### Example: authRequest payload schema diff --git a/src/pages/develop/radiks-setup.md b/src/pages/develop/radiks-setup.md index 0444abfb..f43ecb76 100644 --- a/src/pages/develop/radiks-setup.md +++ b/src/pages/develop/radiks-setup.md @@ -13,7 +13,7 @@ Radiks-server is a `node.js` application that uses [MongoDB](https://www.mongodb In the future, Radiks-server will support various different databases, but right now, only MongoDB 3.6 or higher is supported. MongoDB 3.6 and higher contains fixes required for naming patterns in keys. -{% include note.html content="The steps assume you want to install and run the MongoDB software locally on your workstation for testing and development. If you are deploying for a production application, you will install MongoDB on your application server or on a server connected to it. " %} +-> The steps assume you want to install and run the MongoDB software locally on your workstation for testing and development. If you are deploying for a production application, you will install MongoDB on your application server or on a server connected to it. 1. Download and install MongoDB 3.6 or higher on your workstation. diff --git a/src/pages/org/overview.md b/src/pages/org/overview.md index 70b4d66a..0ca33ffd 100644 --- a/src/pages/org/overview.md +++ b/src/pages/org/overview.md @@ -64,4 +64,4 @@ are used to register digital assets on the network. The Stacks blockchain v2 will support general-purpose smart contracts written in a non-Turing-complete language currently under development. -{% include important.html content="

This communication contains forward-looking statements that are based on our beliefs and assumptions and on information currently available to us. In some cases, you can identify forward-looking statements by the following words: “will,” “expect,” “would,” “intend,” “believe,” or other comparable terminology. Forward-looking statements in this document include, but are not limited to, statements about our plans for developing the platform and future utility for the Stacks Token, our Clarity smart contracting language, and potential mining operations. These statements involve risks, uncertainties, assumptions and other factors that may cause actual results or performance to be materially different. More information on the factors, risks and uncertainties that could cause or contribute to such differences is included in our filings with the SEC, including in the “Risk Factors” and “Management’s Discussion & Analysis” sections of our offering statement on Form 1-A. We cannot assure you that the forward-looking statements will prove to be accurate. These forward-looking statements speak only as of the date hereof. We disclaim any obligation to update these forward-looking statements.

" %} +~> This communication contains forward-looking statements that are based on our beliefs and assumptions and on information currently available to us. In some cases, you can identify forward-looking statements by the following words: “will,” “expect,” “would,” “intend,” “believe,” or other comparable terminology. Forward-looking statements in this document include, but are not limited to, statements about our plans for developing the platform and future utility for the Stacks Token, our Clarity smart contracting language, and potential mining operations. These statements involve risks, uncertainties, assumptions and other factors that may cause actual results or performance to be materially different. More information on the factors, risks and uncertainties that could cause or contribute to such differences is included in our filings with the SEC, including in the “Risk Factors” and “Management’s Discussion & Analysis” sections of our offering statement on Form 1-A. We cannot assure you that the forward-looking statements will prove to be accurate. These forward-looking statements speak only as of the date hereof. We disclaim any obligation to update these forward-looking statements. diff --git a/src/pages/org/tokenholders.md b/src/pages/org/tokenholders.md index 49f147bf..d00b55c7 100644 --- a/src/pages/org/tokenholders.md +++ b/src/pages/org/tokenholders.md @@ -8,7 +8,7 @@ The information on this page is intended for **current Stacks (STX) token holder ## Find your token balance and unlock date -{% include important.html content=" If you purchased Stacks tokens during Summer 2019, the form below will not work for your allocation. Please check your allocation using this tool instead. "%} +~> If you **purchased Stacks tokens during Summer 2019**, the form below will **not** work for your allocation. Please [check your allocation using this tool instead](https://explorer.blockstack.org/verifier). During your the initial grant process, you should have submitted a public _Stacks (STX) address_ (also known as a _wallet address_) to Blockstack. A STX address is a string of letters and numbers starting with an `SP` or `SM`, for example: `SM3KJBA4RZ7Z20KD2HBXNSXVPCR1D3CRAV6Q05MKT` diff --git a/src/pages/org/wallet-install.md b/src/pages/org/wallet-install.md index 0fa680c1..92601bc5 100644 --- a/src/pages/org/wallet-install.md +++ b/src/pages/org/wallet-install.md @@ -4,18 +4,19 @@ description: 'How to use the Blockstack Software' # Install the Stacks Wallet software -You use the Stacks Wallet software client alone or with a hardware wallet to send and receive Stacks (STX) tokens. On this page, you learn how to install the Stacks Wallet software. This page contains the following: +You use the Stacks Wallet software client alone or with a hardware wallet to send and receive +Stacks (STX) tokens. On this page, you learn how to install the Stacks Wallet software. -{% include warning.html content="When you download the wallet software you are at risk of +!> When you download the wallet software you are at risk of a man-in-the-middle attack (as an example) from hackers interested in stealing -your tokens or your other information. To protect yourself from this type of +your tokens or your other information. To protect yourself from this type of attack, verify your downloaded wallet software as detailed in the installation instructions below. Verification confirms that you received the software signed -by Blockstack PBC." %} +by Blockstack PBC. ## Mac Installation -1. Go to the wallet download page in your browser. +1. [Go to the wallet download page](https://wallet.blockstack.org) in your browser. 2. Select the **macOS Download** button. This button downloads the software to your computer. @@ -42,11 +43,11 @@ by Blockstack PBC." %} ![](images/mac-shasum.png) -6. Verify that the resulting hash (a string of letters and numbers) is the same as the latest hash published on this page. +6. Verify that the resulting hash (a string of letters and numbers) is the same as the latest hash published [on this page](https://github.com/blockstack/stacks-wallet/releases). ## Windows Installation -1. Select the **Windows Download** button on this page. +1. Select the **Windows Download** button [on this page](https://wallet.blockstack.org/). This button downloads the software to your computer. @@ -72,7 +73,7 @@ by Blockstack PBC." %} ![](images/windows-certutil.png) -5. Verify that the resulting hash (a string of letters and numbers) is the same as the latest hash published on this page. +5. Verify that the resulting hash (a string of letters and numbers) is the same as the latest hash published [on this page](https://github.com/blockstack/stacks-wallet/releases). ## Additional requirement and option @@ -86,11 +87,11 @@ You need very small fractions of Bitcoin to fuel your Stacks Wallet transactions If you have a paper wallet or a custodial wallet, you should set up a secondary hardware. You can then transfer small amounts to this hardware wallet for use with your Stacks Wallet. You can use any of these hardware wallets with the Stacks Wallet: -- Trezor One -- Ledger Nano S +- [Trezor One](https://trezor.io/) +- [Ledger Nano S](https://www.ledger.com/) - Ledger Blue -{% include note.html content="Blockstack only supports the hardware wallets listed above. Other wallets, for example, the Trezor Model T, are not supported. If you have questions about wallet support, please contact Blockstack support." %} +-> Blockstack only supports the hardware wallets listed above. Other wallets, for example, the Trezor Model T, **are not supported**. If you have questions about wallet support, please [contact Blockstack support](mailto:support@blockstack.org). For information on setting up a hardware wallet, refer to the vendor's documentation. We cannot help you set up your hardware wallet. diff --git a/src/pages/org/wallet-intro.md b/src/pages/org/wallet-intro.md index 1716c63d..570b4df6 100644 --- a/src/pages/org/wallet-intro.md +++ b/src/pages/org/wallet-intro.md @@ -6,26 +6,38 @@ description: 'How to use the Blockstack Software' If you are, or plan to be a Stacks token holder, you need to think about how you can manage your Stacks (STX) tokens. How can you review your token balance? How can send or -receive your tokens? STX tokens are a cryptocurrency and you manage your tokens through a **cryptocurrency wallet**. This overview introduces basic wallet terminology and concepts. +receive your tokens? STX tokens are a cryptocurrency and you manage your tokens through a **cryptocurrency wallet**. +This overview introduces basic wallet terminology and concepts. ## Wallets, addresses, and tokens -Cryptocurrency wallets are software that make sending and receiving cryptocurrency easier. Unlike the wallets you carry physical money in, a cryptocurrency wallet doesn’t -contain your tokens. A wallet has one or more cryptocurrency addresses, in the case of Stacks these are _Stacks token address_. +Cryptocurrency wallets are software that make sending and receiving cryptocurrency easier. Unlike the wallets you +carry physical money in, a cryptocurrency wallet doesn't contain your tokens. A wallet has one or more cryptocurrency +addresses, in the case of Stacks these are _Stacks token address_. -An address is public and can be viewed by other people much like your house is visible to any passerby. To open a particular address, you must know the address value and you must have the private key for that address. Wallets can read existing addresses to send from or create new addresses to send to. A wallet can show you the history of transactions for an address on the blockchain. +An address is public and can be viewed by other people much like your house is visible to any passerby. To open a +particular address, you must know the address value and you must have the private key for that address. Wallets can +read existing addresses to send from or create new addresses to send to. A wallet can show you the history of +transactions for an address on the blockchain. -Exchanging cryptocurrency requires moving currency from one address to another. Say a company, Bitbook, is selling books and receive crypto currency in payment. Lena sees a book she wants to buy on Bitbook, she selects a **Buy** button and Bitbook gives her an address to send currency to. Lena uses her private key to open one of her cryptocurrency addresses. She then sends from this address to BitBook's address. +Exchanging cryptocurrency requires moving currency from one address to another. Say a company, Bitbook, is selling +books and receive crypto currency in payment. Lena sees a book she wants to buy on Bitbook, she selects a **Buy** +button and Bitbook gives her an address to send currency to. Lena uses her private key to open one of her cryptocurrency +addresses. She then sends from this address to BitBook's address. ![](images/key.png) -Token exchanges are recorded by _transactions_ on a blockchain. In the case of STX, these exchanges appear on the Stacks blockchain. The movement of tokens from Lena to Bitbook is recorded on the blockchain. The private key Lena uses is not recorded. +Token exchanges are recorded by _transactions_ on a blockchain. In the case of STX, these exchanges appear on the +Stacks blockchain. The movement of tokens from Lena to Bitbook is recorded on the blockchain. The private key Lena +uses is not recorded. -
-
Security tip: What to share and what not to
-

A Stacks address is a string of letters and numbers starting with an SP or SM, like SM3KJBA4RZ7Z20KD2HBXNSXVPCR1D3CRAV6Q05MKT. You can and should share the address when you want someone to send STX tokens to you.

-

Your seed phrase, 24 words in an ordered sequence, is the private key for your addresses and wallet. never share your seed phrase with anyone.

-
+> ##### Security tip: What to share and what not to +> +> A Stacks address is a string of letters and numbers starting with an `SP` or `SM`, like +`SM3KJBA4RZ7Z20KD2HBXNSXVPCR1D3CRAV6Q05MKT`. You can and should share the address when you want +someone to send STX tokens to you. +> +> Your seed phrase, 24 words in an ordered sequence, is the private key for your addresses and wallet. **never** share your seed phrase with anyone. ## Large-scale or institutional token holders @@ -42,15 +54,13 @@ assets as an investment, you should choose a custodial service as if you were selecting any investment service. Consider your needs, the firm’s reputation, fees, and so forth. -{% include warning.html content="None of our ecosystem entities, Blockstack PBC, Blockstack Signature Fund, and Blockstack Token LLC, are custodial services. Or the Stacks Wallet is not recommended for institutional holdings." %} +!> None of our ecosystem entities, Blockstack PBC, Blockstack Signature Fund, and Blockstack Token LLC, are custodial services. Or the Stacks Wallet is not recommended for institutional holdings. -Blockstack suggests a firm such as [Coinbase -Custody](https://custody.coinbase.com/) for institutional holders. Coinbase -Custody charges its clients a management fee based on assets. Of course, like +Blockstack suggests a firm such as [Coinbase Custody](https://custody.coinbase.com/) for institutional holders. +Coinbase Custody charges its clients a management fee based on assets. Of course, like any responsible asset holder, you should do your own research and select a -service that meets your needs. The Investopedia's article [What Are Cryptocurrency -Custody -Solutions?](https://www.investopedia.com/news/what-are-cryptocurrency-custody-solutions/) +service that meets your needs. The Investopedia's article +[What Are Cryptocurrency Custody Solutions?](https://www.investopedia.com/news/what-are-cryptocurrency-custody-solutions/) is one place to start. ## Choosing a cryptocurrency wallet @@ -64,7 +74,10 @@ they are on one system, they are vulnerable to theft either of the computer itself or through computer hacking. Computer viruses can also impact desktop wallets. -Similarly, mobile, online wallets do not require a desktop, but they also tend to be smaller and simpler. Online wallets run over the web and are accessible from any networked device, computer or phone. However, online wallets are vulnerable to hacking as well and also rely on third-party service providers who themselves may also be vulnerable. +Similarly, mobile, online wallets do not require a desktop, but they also tend to be smaller and simpler. +Online wallets run over the web and are accessible from any networked device, computer or phone. +However, online wallets are vulnerable to hacking as well and also rely on third-party service +providers who themselves may also be vulnerable. Hardware wallets store your seed and addresses on a device like a USB. To use these wallets, you connect them to a networked computer, enter a pin, and diff --git a/src/pages/org/wallet-use.md b/src/pages/org/wallet-use.md index dde052b3..f4eafe32 100644 --- a/src/pages/org/wallet-use.md +++ b/src/pages/org/wallet-use.md @@ -21,10 +21,9 @@ To send STX, you need Bitcoin in your wallet. Bitcoin is the "gas" for transacti You can use the Stacks Wallet software by itself or together with a hardware wallet. Using with a hardware wallet is recommended but not required. -
-
Investers and large token holdings: Hardware devices
-

If you are an investor or current Stacks token holder, you should have your relevant STX addresses on a configured hardware device before using the Stacks Wallet software. If you have very large holdings, we recommend and anticipate these are held with a custodial service. In the case of a custodial service, you would work with your service to transfer a portion of your holdings to an appropriate hardware device before using the Stacks Wallet software.

-
+> ##### Investors and large token holdings: Hardware devices +> +> If you are an investor or current Stacks token holder, you should have your relevant STX addresses on a configured hardware device before using the Stacks Wallet software. If you have very large holdings, we recommend and anticipate these are held with a custodial service. In the case of a custodial service, you would work with your service to transfer a portion of your holdings to an appropriate hardware device before using the Stacks Wallet software. ### A hardware device with the wallet @@ -44,7 +43,7 @@ You can use the Stacks Wallet software without a hardware device to create one o Write down your seed phrase and store it in a secure location such as a safe deposit box. When you write the seed phrase down, include its position, for example,`1-frog, 2-horse, 3-building` and so on until you reach a final position `24-ocean`. -{% include warning.html content="Do not lose your seed phrase. If you lose your seed phrase, you lose any STX tokens in that associated wallet. No person or organization, including Blockstack, can recover a lost seed phrase." %} +!> Do not lose your seed phrase. If you lose your seed phrase, you lose any STX tokens in that associated wallet. **No person or organization, including Blockstack, can recover a lost seed phrase**. ### About the reset function @@ -191,9 +190,7 @@ example. The Stacks Wallet uses very small amounts of Bitcoin to pay fees for sending transactions. You need very small fractions of Bitcoin (BTC) for gas. The cost of gas you need fluctuates with the market price of Bitcoin. -{% include warning.html content="Very small amounts of Bitcoin are all you need -to fuel transactions. Never send an entire coin to your Stacks Wallet. Amounts -such as .0002 BTC are plenty." %} +!> Very small amounts of Bitcoin are all you need to fuel transactions. **Never send an entire coin to your Stacks Wallet. Amounts such as .0002 BTC are plenty**. You can only receive Bitcoin with Stacks Wallet; you cannot send Bitcoin. You need an account with Coinbase or similar exchange to buy Bitcoin and send it to the Stacks Wallet. diff --git a/src/pages/storage/digital-ocean-deploy.md b/src/pages/storage/digital-ocean-deploy.md index 9c947678..b0dc96ca 100644 --- a/src/pages/storage/digital-ocean-deploy.md +++ b/src/pages/storage/digital-ocean-deploy.md @@ -43,10 +43,7 @@ In this task you create a **Space** which is where Gaia stores your files. 2. **Choose a datacenter region** section. - {% include important.html content="Choose a region that is both - geographically close to you and that supports spaces. Currently, San - Francisco, New York, Amsterdam, - and Singapore support spaces." %} + ~> Choose a region that is both geographically close to you and that supports spaces. Currently, San Francisco, New York, Amsterdam, and Singapore support spaces. The geographical location of your server impacts latency for storing data. You select a region close to you so that when you use Blockstack apps, @@ -171,7 +168,7 @@ In this task, you add a droplet to your account. The droplet is a droplet is a c 7. Scroll down to the **Choose a datacenter region** section. - {% include important.html content="Choose a region that is both geographically close to you and that supports spaces. Currently, San Francisco, New York, Amsterdam, and Singapore support spaces." %} + ~> Choose a region that is both geographically close to you and that supports spaces. Currently, San Francisco, New York, Amsterdam, and Singapore support spaces. The geographical location of your server impacts latency for storing data. You select a region close to you so that when you use Blockstack apps, storing data is quicker. @@ -189,7 +186,7 @@ At this point, your new droplet should appear in the list of resources on your D A droplet console emulates the access you would have if you were sitting down with a keyboard and monitor attached to the actual server. In this section, you open a console on your droplet. -{% include note.html content="If you are an SSH user and have completed the prerequisites, skip this section. Instead, use the DigitalOcean instructions for connecting with doctl." %} +-> If you are an SSH user and have completed the prerequisites, skip this section. Instead, use [the DigitalOcean instructions for connecting with doctl](https://do.co/2S4HMk1). 1. From the DigitalOcean dashboard, select Droplets. diff --git a/src/pages/storage/hello-hub-choice.md b/src/pages/storage/hello-hub-choice.md index 304f59ff..71991525 100644 --- a/src/pages/storage/hello-hub-choice.md +++ b/src/pages/storage/hello-hub-choice.md @@ -4,11 +4,11 @@ description: 'Storing user data with Blockstack' # Hello hub choice tutorial -{% include note.html content="The functionality described in this tutorial has been deprecated with the Blockstack Browser. It will continue working only for apps that have not yet upgraded to Blockstack Connect." %} +-> The functionality described in this tutorial has been deprecated with the Blockstack Browser. It will continue working only for apps that have not yet upgraded to Blockstack Connect. In this tutorial, you build on the Hello, Blockstack Tutorial. You'll modify the authentication code so that it prompts users who have not yet created a Blockstack identity, to choose a hub URL. -{% include note.html content="This tutorial was written on macOS High Sierra 10.13.4. If you use a Windows or Linux system, you can still follow along. However, you will need to \"translate\" appropriately for your operating system. Additionally, this tutorial assumes you are accessing the Blockstack Browser web application via Chrome. The application you build will also work with a local installation and/or with browsers other than Chrome. " %} +-> This tutorial was written on macOS High Sierra 10.13.4. If you use a Windows or Linux system, you can still follow along. However, you will need to "translate" appropriately for your operating system. Additionally, this tutorial assumes you are accessing the Blockstack Browser web application via Chrome. The application you build will also work with a local installation and/or with browsers other than Chrome. ## About this tutorial and the prerequisites you need @@ -38,39 +38,31 @@ In this section, you build an initial React.js application called `hello-hub-cho You should see several interactive prompts. + ```bash + $ yo blockstack - {% raw %} - ```bash - $ yo blockstack - - ... + ... - ? Are you ready to build a Blockstack app in React? (Y/n) - ``` - {% endraw %} + ? Are you ready to build a Blockstack app in React? (Y/n) + ``` -4. Respond to the prompts to populate the initial app. +4) Respond to the prompts to populate the initial app. After the process completes successfully, you see a prompt similar to the following: - {% raw %} - ```bash ... create public/icon-192x192.png create public/index.html create public/robots.txt create public/manifest.json - ``` - - Im all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself. - ``` - {% endraw %} + Im all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself. + ``` 5. Verify that you have version `18.3.0` of blockstack.js or higher. - ``` + ```bash $ npm ls blockstack hello-blockstack@0.0.0 /Users/manthony/sampleapps/hello-blockstack └── blockstack@18.3.0 @@ -78,7 +70,7 @@ In this section, you build an initial React.js application called `hello-hub-cho If you don't have the correct version, install it. - ``` + ```bash npm install blockstack@18.3.0 ``` @@ -157,20 +149,21 @@ To replace the default login, do the following: 4. Immediately above the method you just added and below the `event.preventDefault()` method, construct a String `const` for the `authRequest`: - ``` + ```jsx const authRequest = userSession.makeAuthRequest( userSession.generateAndStoreTransitKey(), 'http://localhost:5000/', 'http://localhost:5000/manifest.json', ['store_write', 'publish_data'], 'http://localhost:5000/', - blockstack.nextHour().getTime(), { - solicitGaiaHubUrl: true + blockstack.nextHour().getTime(), + { + solicitGaiaHubUrl: true, } // new options param ); ``` - {% include note.html content="If your app is running a different port than 500, enter that port instead. " %} + -> If your app is running a different port than `500`, enter that port instead. The extra `solicitGaiaHubUrl` parameter of `true` will cause the Blockstack Browser to prompt new identity creators for a storage hub URL. diff --git a/src/pages/storage/overview.md b/src/pages/storage/overview.md index dde30db5..4be4775a 100644 --- a/src/pages/storage/overview.md +++ b/src/pages/storage/overview.md @@ -39,8 +39,7 @@ The control of user data lies in the way that user data is accessed. When an app Because `alice.id` has access to her zonefile, she can change where her profile is stored. For example, she may do this if the current profile's service provider or storage is compromised. To change where her profile is stored, she changes her Gaia hub URL to another Gaia hub URL. If a user has sufficient compute and storage resources, a user may run their own Gaia Storage System and bypass a commercial Gaia hub provider all together. -{% include note.html content="Users with existing identities cannot yet migrate -their data from one hub to another." %} +~> Users with existing identities cannot yet migrate their data from one hub to another. Applications writing directly on behalf of `alice.id` do not need to perform a lookup. Instead, the [Blockstack authentication flow](http://blockstack.github.io/blockstack.js/index.html) provides Alice's chosen application root URL to the application. This authentication flow _is also_ within Alice's control because Alice's browser _must_ generate the authentication response.