Browse Source

Merge pull request #10 from moxiegirl/appco-site

Appco site
feat/clarity-updates
Moxiegirl 6 years ago
committed by GitHub
parent
commit
b8cb5a7b83
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Gemfile
  2. 14
      Gemfile.lock
  3. 11
      README.md
  4. 5
      _common/mining_faq.md
  5. 3
      _config.yml
  6. 11
      _data/navigation_learn.yml
  7. 127
      _develop/dapp_principles.md
  8. BIN
      _develop/images/decaying.png
  9. BIN
      _develop/images/mining-image.png
  10. BIN
      _develop/images/model.png
  11. 31
      _develop/mining_enroll.md
  12. 115
      _develop/mining_intro.md
  13. 38
      _develop/mining_review.md
  14. 2
      _includes/footer.html
  15. 1
      _includes/important.html
  16. 1
      _includes/note.html
  17. 1
      _includes/warning.html
  18. 1
      _layouts/auth.html
  19. 1
      _layouts/core.html
  20. 4
      _layouts/default.html
  21. 1
      _layouts/evaluate.html
  22. 1
      _layouts/gaia.html
  23. 2
      _layouts/home.html
  24. 1
      _layouts/learn.html
  25. 1
      _layouts/post.html
  26. 1
      _layouts/usenew.html
  27. 142
      _site/2017/05/25/post63.html
  28. 70
      _site/404.html
  29. 290
      _site/android/tutorial.html
  30. 415
      _site/browser/blockstack_storage.html
  31. 227
      _site/browser/browser-introduction.html
  32. 143
      _site/browser/browser-nav.html
  33. 143
      _site/browser/faq_general.html
  34. 300
      _site/browser/hello-blockstack.html
  35. 143
      _site/browser/ids-creating.html
  36. 143
      _site/browser/ids-introduction.html
  37. 415
      _site/browser/multi-player-storage.html
  38. 143
      _site/browser/purchase-id.html
  39. 321
      _site/browser/todo-list.html
  40. 70
      _site/changelog/index.html
  41. 143
      _site/common/construction.html
  42. 70
      _site/contact/index.html
  43. 153
      _site/core/atlas/howitworks.html
  44. 158
      _site/core/atlas/howtouse.html
  45. 148
      _site/core/atlas/overview.html
  46. 248
      _site/core/faq_developer.html
  47. 143
      _site/core/faq_technical.html
  48. 173
      _site/core/install-api.html
  49. 167
      _site/core/memcached.html
  50. 148
      _site/core/naming/architecture.html
  51. 143
      _site/core/naming/comparison.html
  52. 143
      _site/core/naming/creationhowto.html
  53. 163
      _site/core/naming/did.html
  54. 143
      _site/core/naming/forks.html
  55. 143
      _site/core/naming/introduction.html
  56. 143
      _site/core/naming/manage.html
  57. 143
      _site/core/naming/namespaces.html
  58. 198
      _site/core/naming/pickname.html
  59. 153
      _site/core/naming/register.html
  60. 163
      _site/core/naming/resolving.html
  61. 309
      _site/core/naming/search.html
  62. 173
      _site/core/naming/subdomains.html
  63. 284
      _site/core/naming/tutorial_subdomains.html
  64. 213
      _site/core/wire-format.html
  65. 7
      _site/feed.xml
  66. 96
      _site/index.html
  67. 337
      _site/ios/tutorial.html
  68. 70
      _site/news/index.html
  69. 70
      _site/thanks/index.html

2
Gemfile

@ -9,7 +9,7 @@ ruby RUBY_VERSION
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "3.5"
gem "jekyll", "3.6.3"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
# gem "minima", "~> 2.0"

14
Gemfile.lock

@ -13,16 +13,16 @@ GEM
ffi (1.9.25)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
jekyll (3.5.0)
jekyll (3.6.3)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
kramdown (~> 1.14)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (~> 1.7)
rouge (>= 1.7, < 3)
safe_yaml (~> 1.0)
jekyll-avatar (0.6.0)
jekyll (~> 3.0)
@ -43,7 +43,7 @@ GEM
jekyll-watch (1.5.1)
listen (~> 3.0)
kramdown (1.17.0)
liquid (4.0.0)
liquid (4.0.1)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
@ -58,10 +58,10 @@ GEM
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rouge (1.11.1)
rouge (2.2.1)
ruby_dep (1.5.0)
safe_yaml (1.0.4)
sass (3.5.7)
sass (3.6.0)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
@ -74,7 +74,7 @@ PLATFORMS
ruby
DEPENDENCIES
jekyll (= 3.5)
jekyll (= 3.6.3)
jekyll-avatar
jekyll-feed (~> 0.6)
jekyll-gist

11
README.md

@ -1,4 +1,9 @@
## Docs site
# README for the documentation site
## Building after a fork
## Run locally
To run locally:
@ -34,3 +39,7 @@ To deploy to Netlify:
```
git push -f origin
```
# Writing content
## Constructing links

5
_common/mining_faq.md

@ -0,0 +1,5 @@
---
layout: externalurl
redirect_url: https://app.co/mining#faq
title: "Mining FAQ"
---

3
_config.yml

@ -151,6 +151,9 @@ collections:
core:
output: true
basepath: "blockstack/blockstack-core/blob/master/docs"
develop:
output: true
basepath: "moxiegirl/docs.blockstack"
storage:
output: true
basepath: "blockstack/gaia/blob/master/docs"

11
_data/navigation_learn.yml

@ -1,3 +1,7 @@
- title: Introduction
- docs:
- develop/dapp_principles
- title: Try a tutorial
docs:
- browser/hello-blockstack
@ -9,7 +13,14 @@
- android/tutorial
- ios/tutorial
- title: Application mining
docs:
- develop/mining_intro
- develop/mining_enroll
- title: Reference
docs:
- core/faq_developer
- common/mining_faq
- common/javascript_ref
- common/core_ref

127
_develop/dapp_principles.md

@ -0,0 +1,127 @@
---
layout: learn
permalink: /:collection/:path.html
---
# Principles of Blockstack applications
{:.no_toc}
There are as many perspectives on what makes a decentralized app (DApp) as there
are DApp developers. This section defines the principles that Blockstack
advocates for DApps operating within its platform.
* TOC
{:toc}
## Blockstack DApp principles
An application is considered a Blockstack DApp if it adheres to three
principles.
### I. Users own their data
DApps do not store or replicate user data. Users own their application
data independent of and *outside of* the application. A Blockstack application
is only considered decentralized if its users control where their data is
hosted and can prove that they created the data.
Blockstack applications meet this principle if they use the Gaia storage system.
Users may sign and/or encrypt their data in Gaia end-to-end. All files in Gaia
are addressed by a user identifier, an application's hostname, and a filename.
Through Gaia, users can prove data ownership and restrict access.
In the future, users will be able to choose on an app-by-app basis which Gaia
hub serves their application data.
### II. Users own their identities
Users are the sole administer of their own independent and unique
identifiers. Within an applications, users must be distinguishable by unique
identifiers. The DApp cannot mask or take away a user's identifier, and a user
must be able to bind their identifier to the data they create.
Blockstack DApps anticipate that each user can own one or more IDs. In turn,
these IDs are owned by a private key under the user's control. The IDs are
acquired through the Blockstack naming system. First time users that log into
the Blockstack application get a free `blockstack.id` in the Blockstack namespace.
Blockstack IDs are replicated to all peers via a blockchain, this means
Blockstack cannot hide IDs. Blockstack IDs each have a public key assigned to
them via the blockchain records that encode their operational history. This
public key allows users to bind data to their Blockstack IDs through
cryptographic signatures.
### III. Users have free choice of clients
Identities and _data_ are application independent. An application cannot be
considered a DApp unless it allows users to interact with their identities and
data such that the user can later do so via a different DApp.
For example, a user that creates data in client 'X' must be able access that
data from a different client, 'Y', provided the client allows compatible
mechanisms. Ultimately, the user has the freedom to write their own client that
interacts with their own data.
Blockstack's APIs and SDKs make it easy to build applications that adhere to
this principle. Existing Blockstack applications have this property today simply
because they don't have any irreplaceable server-side logic.
In the future, Blockstack applications must continue to meet the first two
principles but need not meet this one. For example, an application could
encrypt data in-transit between the application's client and the user's chosen
storage provider. Unless the app divulges the encryption key to the user, then
the user does not have free choice of clients; they can only use clients that
the app's servers choose to interact with.
## Non-Principles
You'll notice the Blockstack principles avoid adherence to a particular network
topology or architecture. Many DApps have defining characteristics that are
implementation-specific rather than expressions of overall DApp design goals.
These aspects are mentioned here as specific non-goals of Blockstack
applications.
### DApps have smart contracts
Decentralized apps pre-date blockchains and smart contracts, and even today
there are popular DApps that do not need them. Examples include pre-Microsoft
Skype (which was peer-topeer), Mastadon, IRC, and email.
Another word for "smart contract" is "replicated state machine." Some DApps
need each peer to execute the same sequence of operations in order to fulfill
their business needs (in which case a smart contract would be appropriate),
but many do not.
Blockstack DApps do not use smart contracts at all.
### DApps have tokens and/or non-fungible assets
Similar to smart contracts, DApps pre-date tokens and non-fungible assets.
While having a crypto token or asset can help incentivize DApp deployment and
usage, they are not strictly necessary for their operation.
### DApps use a blockchain
Blockchains are a new tool for DApp developers to help coordinate peers, but
they are just that -- a tool. Sometimes blockchains are the right tool for the
job, and sometimes they are not.
## Dapps serve users
Fundamentally, DApps should serve users by preserving user autonomy. Developers
should not profit from abusive features or neglectful designs.
Blockstack principles seek to prevent developers from profiting by either (a) building
abusive features into DApps like ad networks, or (b) neglecting users by failing
to build vital safety features like <a
href="https://en.wikipedia.org/wiki/Shadow_banning"
target="\_blank">shadowbans</a>.
Because Blockstack applications allow users to own their identity and data and
gives them free choice of clients, any user can simply stop or avoid using bad DApps
with near-zero switching cost.
This isn't to say that DApps can't be profitable. DApps can still make money for
their developers, such as by offering content subscriptions or paid-for add-ons.
They can broker with third parties on behalf of their users to watch ads or
share data in exchange for tokens.

BIN
_develop/images/decaying.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
_develop/images/mining-image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
_develop/images/model.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

31
_develop/mining_enroll.md

@ -0,0 +1,31 @@
---
layout: learn
permalink: /:collection/:path.html
---
# How to enroll
Application mining pays developers for building decentralized applications
(Dapps). Enrolling in app mining also makes your application eligible for
rewards.
After you enroll, Blockstack verifies your information and your Dapp appears in
the list of registered apps. You must enroll by the end of each month to be
eligible for the following month.
To apply, do the following:
1. Integrate Blockstack Auth into your app.
2. Add your app to <a href="https://app.co/submit" target="\_blank">App.co</a>.
Make sure you choose Blockstack from the Authentication list on the form.
3. Email <app.mining@blockstack.com> with the domain you used to register for your app.
Blockstack will respond via email with a set of verification materials.
4. Fill out and return the completed verification materials.
Be sure you provide us with the BTC address for receipt of mining and rewards funds.
Once your enrollment is received, you appear in the enrollment list. For more information, see the frequently asked questions [on the App.co site](https://app.co/mining#faq).

115
_develop/mining_intro.md

@ -0,0 +1,115 @@
---
layout: learn
permalink: /:collection/:path.html
---
# Understand app mining
Traditionally the term _mining_ in cryptocurrency refers to the process of
contributing compute resources to the network and earning a reward. On the
Blockstack network, however, instead of just mining through computation,
developers can mine by contributing apps to the ecosystem and making
applications the community wants.
![](images/mining-image.png)
Founders that build apps using Blockstack developer tools like Blockstack Auth
get paid each month, in amounts proportional to that month’s app quality
ranking. Blockstack PBC, in cooperation with App.co, currently administers the
payouts. A set of independent _App reviewers_ determines the monthly ranking
during the pilot phase.
## How apps are reviewed
Blockstack worked with a team of Ph.D. game theorist and economists from
Princeton and NYU to put together a ranking algorithm which is fair and
resistant to abuse. Blockstack partnered with two different third-party
reviewers, Product Hunt and Democracy.earth. These reviewers are independent,
and generally rely on their own proprietary data and insights to generate
rankings.
### Product Hunt
Product Hunt is the place to find the best new products in tech. They have a
massive trove of user data (upvotes, comments, etc), that they use for ranking.
Product Hunt comes up with two different scores for each app — a “community”
score and a “team” score.
Their community score is determined only by the number of upvotes an app
received on Product Hunt, relative to other apps that are registered. For
example, if an app got more upvotes than any other app in a cohort, their
community score would be 100. If a different app got 60% as many upvotes, they’d
get a score of 60.
Their team score is determined by internal team members conducting reviews on
different aspects of an app. They judge based on a few criteria, like execution,
uniqueness, and desirability. Each app gets ranked 1-10 on each criterion, and
their final score is the average of each criterion. Finally, this average is
multiplied by 10, so the highest score you can get is 100.
Once each app has a community and team score, Blockstack converts these scores into
_z-scores_, more about z-scores below.
### Democracy Earth
Democracy Earth is a platform for borderless peer-to-peer democracy. They’ve
built a platform that anyone can use to gather votes in a trust-less,
decentralized way.
Democracy Earth has built a platform for Stacks token holders to vote on how
apps should be ranked. Each token holder gets a certain number of votes, and
they can distribute those votes however they want. It’s possible to give all of
your votes to a single app, and you can also “downvote” an app with one of your
votes.
After a voting period, each app has a certain amount of upvotes and downvotes.
First, Blockstack calculates the percentage of total votes that are upvotes. If
you got 90 upvotes and 10 downvotes, you’d get a “likability score” of 90.
Secondly, Blockstack calculates a “traction score”, which ranks how many total
votes (including downvotes) an app received, relative to other apps.
## Reaching the final scores
Once the reviewer-partners generate reviews, each app has 4 raw scores between 0
and 100 for the following:
* Product Hunt community score
* Product Hunt team score
* Democracy Earth likability score
* Democracy Earth traction score
First Blockstack's determine a ‘z-score’ for each ranking category community,
team, likability, and traction. This is a statistical technique to account for
different distributions of scores within categories. Second, Blockstack computes
the average and standard deviation of each category. Finally, for each app’s
score in that category, Blockstack determines how many standard deviations it is
away from the average score in that category.
For example, let’s say a category has an average score of 60, with a standard
deviation of 15. A score of 90 would get a z-score of 2, because it’s 2 standard
deviations higher than the average.
Once each app has a calculated a z-score in every category, the average of those
4 z-scores results in a final number. A higher number is better than a lower
one, and so apps are ranked from highest to lowest.
## Determining how much an app is paid
For each app mining cohort, there is determined a “pot” of total earnings that will
get paid to apps. For the Alpha run, Blockstack paid a total of $25,000 USD. Starting in
December 2018, Blockstack will pay $100,000 USD and the awards will be paid out in Bitcoin.
The top app gets paid 20% of the total pot. So, for a pot of $100k, the top app
receives $20,000 USD. The next app gets paid 20% of the remaining pot. The
remaining pot is $80k, and 20% of that is $16,000. This process continues until
every app has been paid.
Here is a chart that visualizes the decay in rewards, depending on rank:
![](images/decaying.png)
This first release of App Mining uses the initial version of our ranking and
payout mechanism. Blockstack has taken care to be thoughtful and fair, but
things may change as we learn more and get feedback from the community. Please
let us know what you think by commenting <a href="https://forum.blockstack.org"
target="\_blank">in our forum</a> or by emailing us at <hello@app.co>!

38
_develop/mining_review.md

@ -0,0 +1,38 @@
---
layout: learn
permalink: /:collection/:path.html
---
# App reviewer instructions
Reviewers submit their app rankings to Blockstack every month. The first day of
the month Blockstack will email reviewers a spreadsheet on which to record rankings.
To submit app rankings, please complete the following steps:
1. Download the spreadsheet for that month.
The spreadsheet is sent to the email address Blocksack has on file for you. The sheet lists all apps eligible for ranking.
2. Record your rankings on the spreadsheet.
Place a the rank value in the **Ranking** column next to each app you would
like to rank. You can rank only those apps you want and omit ranking others.
Rank each application numerically where 1 (one) is the highest. For reviewer
partners, rank apps for the month using the methodology of your
organization.
Please avoid modifying the spreadsheet in apart from adding your rankings.
The `App ID` column, in particular, must be preserved to process your rankings
accurately.
3. Return your rankings by the 15th of each month to <app.mining@blockstack.com>.
{% include important.html content="Blockstack must receive your rankings by the 15th of the month or they won't be considered!" %}
4. Attach your completed spreadsheet to your return email.
Include in the email a brief explanation summarizing your methodology or
thoughts when ranking. Please mention any app you want to highlight for the
month.
After receiving the rankings from the reviews, Blockstack will calculated each applications final z-scores.

2
_includes/footer.html

@ -25,7 +25,7 @@
{% include social-networks.html %}
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; {{ page.date | date: "%Y" }} {{ site.footer.copyright }}</div>
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; {{ page.date | date: "%Y" }} {{ site.footer.copyright }}</div>
</div>
</footer>

1
_includes/important.html

@ -0,0 +1 @@
<div class="uk-alert-warning" uk-alert><b>Important:</b> {{include.content}}</div>

1
_includes/note.html

@ -0,0 +1 @@
<div class="uk-alert-primary" uk-alert><b>Note:</b> {{include.content}}</div>

1
_includes/warning.html

@ -0,0 +1 @@
<div class="uk-alert-danger" uk-alert><b>Warning:</b> {{include.content}}</div>

1
_layouts/auth.html

@ -50,6 +50,7 @@ layout: default
<div markdown="span" class="article-content">
{{ content }}
{% include share.html %}
{% include footer.html %}
</div>
<hr class="uk-margin-medium">

1
_layouts/core.html

@ -50,6 +50,7 @@ layout: default
<div markdown="span" class="article-content">
{{ content }}
{% include share.html %}
{% include footer.html %}
</div>
<hr class="uk-margin-medium">

4
_layouts/default.html

@ -15,10 +15,6 @@
{% include offcanvas.html %}
{% if page.layout != 'doc' %}
{% include footer.html %}
{% endif %}
{% if page.hero %}
{% include search-hero.html %}
{% else %}

1
_layouts/evaluate.html

@ -50,6 +50,7 @@ layout: default
<div markdown="span" class="article-content">
{{ content }}
{% include share.html %}
{% include footer.html %}
</div>
<hr class="uk-margin-medium">

1
_layouts/gaia.html

@ -45,6 +45,7 @@ layout: default
<div markdown="span" class="article-content">
{{ content }}
{% include share.html %}
{% include footer.html %}
</div>
<hr class="uk-margin-medium">

2
_layouts/home.html

@ -100,3 +100,5 @@ layout: default
</div>
</div>
{% endif %}
{% include footer.html %}

1
_layouts/learn.html

@ -50,6 +50,7 @@ layout: default
<div markdown="span" class="article-content">
{{ content }}
{% include share.html %}
{% include footer.html %}
</div>
<hr class="uk-margin-medium">

1
_layouts/post.html

@ -15,6 +15,7 @@ layout: default
<div class="uk-article-content">
{{ content }}
{% include share.html %}
{% include footer.html %}
</div>
<hr class="uk-margin-medium">

1
_layouts/usenew.html

@ -50,6 +50,7 @@ layout: default
<div markdown="span" class="article-content">
{{ content }}
{% include share.html %}
{% include footer.html %}
</div>
<hr class="uk-margin-medium">

142
_site/2017/05/25/post63.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Site tags | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Site tags" />
<meta name="author" content="John Black" />
<meta property="og:locale" content="en_US" />
@ -19,7 +19,7 @@
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2017-05-25T00:00:00-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/2017/05/25/post63.html","headline":"Site tags","dateModified":"2017-05-25T00:00:00-07:00","datePublished":"2017-05-25T00:00:00-07:00","author":{"@type":"Person","name":"John Black"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/2017/05/25/post63.html"},"description":"Site tags","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/2017/05/25/post63.html","headline":"Site tags","dateModified":"2017-05-25T00:00:00-07:00","datePublished":"2017-05-25T00:00:00-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/2017/05/25/post63.html"},"author":{"@type":"Person","name":"John Black"},"description":"Site tags","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -161,7 +161,7 @@
<h2 id="example-of-code-block">Example Of Code Block</h2>
<p>In accumsan lacus ac neque maximus dictum. Phasellus eleifend leo id mattis bibendum. Curabitur et purus turpis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;</p>
<div class="language-html highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;head&gt;</span>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;head&gt;</span>
<span class="nt">&lt;meta</span> <span class="na">charset=</span><span class="s">"utf-8"</span><span class="nt">&gt;</span>
<span class="nt">&lt;meta</span> <span class="na">http-equiv=</span><span class="s">"X-UA-Compatible"</span> <span class="na">content=</span><span class="s">"IE=edge"</span><span class="nt">&gt;</span>
<span class="nt">&lt;meta</span> <span class="na">name=</span><span class="s">"viewport"</span> <span class="na">content=</span><span class="s">"width=device-width, initial-scale=1"</span><span class="nt">&gt;</span>
@ -169,8 +169,7 @@
<span class="nt">&lt;link</span> <span class="na">rel=</span><span class="s">"shortcut icon"</span> <span class="na">type=</span><span class="s">"image/png"</span> <span class="na">href=</span><span class="s">"/assets/img/favicon.png"</span> <span class="nt">&gt;</span>
<span class="nt">&lt;script </span><span class="na">src=</span><span class="s">"/assets/js/main.js"</span><span class="nt">&gt;&lt;/script&gt;</span>
<span class="nt">&lt;/head&gt;</span>
</code></pre>
</div>
</code></pre></div></div>
<h2 id="text-and-quote">Text and Quote</h2>
<p>Cras at dolor eget urna varius faucibus tempus in elit. Cras a dui imperdiet, tempus metus quis, pharetra turpis. Phasellus at massa sit amet ante semper fermentum sed eget lectus. Quisque id dictum magna turpis.</p>
@ -187,6 +186,71 @@
<a href="https://twitter.com/intent/tweet?text=Site tags&url=https://docs.blockstack.org/2017/05/25/post63.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2017 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -278,74 +342,6 @@
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2017 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

70
_site/404.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Feeling Lost | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Feeling Lost" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -183,74 +183,6 @@
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

290
_site/android/tutorial.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Android SDK Tutorial (Pre-release) | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Android SDK Tutorial (Pre-release)" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/android/tutorial.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/android/tutorial.html","headline":"Android SDK Tutorial (Pre-release)","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/android/tutorial.html"},"description":"Android SDK Tutorial (Pre-release)","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/android/tutorial.html","headline":"Android SDK Tutorial (Pre-release)","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/android/tutorial.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Android SDK Tutorial (Pre-release)","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -116,6 +116,23 @@
<!-- -->
<h5>Introduction</h5>
<ul class="uk-nav uk-nav-default doc-nav">
</ul>
<ul class="uk-nav uk-nav-default doc-nav">
<!-- -->
<li class=""><a href="/develop/dapp_principles.html">Principles of Blockstack applications</a></li>
</ul>
<h5>Try a tutorial</h5>
<ul class="uk-nav uk-nav-default doc-nav">
@ -155,6 +172,23 @@
</ul>
<h5>Application mining</h5>
<ul class="uk-nav uk-nav-default doc-nav">
<!-- -->
<li class=""><a href="/develop/mining_intro.html">Understand app mining</a></li>
<!-- -->
<li class=""><a href="/develop/mining_enroll.html">How to enroll</a></li>
</ul>
<h5>Reference</h5>
<ul class="uk-nav uk-nav-default doc-nav">
@ -165,10 +199,20 @@
<li class=""><a href="/core/faq_developer.html">Developer FAQs</a></li>
<!-- -->
<li class=""><a href="/common/mining_faq.html">Mining FAQ</a></li>
<!-- -->
<li class=""><a href="/common/javascript_ref.html">Blockstack Javascript Reference</a></li>
<!-- -->
<li class=""><a href="/common/core_ref.html">Blockstack CORE API</a></li>
</ul>
<!-- -->
@ -195,13 +239,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-android/blob/master/docs/tutorial.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -292,10 +336,9 @@ Depending on your network connection, this can take between 15-30 minutes.</p>
Before you begin, verify you have installed <code class="highlighter-rouge">npm</code> using the <code class="highlighter-rouge">which</code> command to
verify.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>which npm
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>which npm
/usr/local/bin/npm
</code></pre>
</div>
</code></pre></div></div>
<p>If you don’t find <code class="highlighter-rouge">npm</code> in your system, <a href="https://www.npmjs.com/get-npm">install
it</a>.</p>
@ -332,16 +375,14 @@ existing projects.</p>
<li>
<p>Install Yeoman.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm install -g yo
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm install <span class="nt">-g</span> yo
</code></pre></div> </div>
</li>
<li>
<p>Install the Blockstack application generator.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm install -g generator-blockstack
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm install <span class="nt">-g</span> generator-blockstack
</code></pre></div> </div>
</li>
</ol>
@ -359,27 +400,24 @@ modify the <code class="highlighter-rouge">hello-world</code> to interact with t
<li>
<p>Create a <code class="highlighter-rouge">hello-blockstack</code> directory.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> mkdir hello-blockstack
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> mkdir hello-blockstack
</code></pre></div> </div>
</li>
<li>
<p>Change into your new directory.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nb">cd </span>hello-blockstack
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nb">cd </span>hello-blockstack
</code></pre></div> </div>
</li>
<li>
<p>Use Yeoman and the Blockstack application generator to create your initial <code class="highlighter-rouge">hello-blockstack</code> application.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> yo blockstack:react
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> yo blockstack:react
</code></pre></div> </div>
<p>You should see several interactive prompts.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>yo blockstack:react
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span>yo blockstack:react
<span class="o">==========================================================================</span>
We are constantly looking <span class="k">for </span>ways to make yo better!
May we anonymously report usage statistics to improve the tool over <span class="nb">time</span>?
@ -388,8 +426,8 @@ modify the <code class="highlighter-rouge">hello-world</code> to interact with t
_-----_ ╭──────────────────────────╮
| | │ Welcome to the │
|--<span class="o">(</span>o<span class="o">)</span>--| │ Blockstack app │
--------- │ generator! │
|--<span class="o">(</span>o<span class="o">)</span><span class="nt">--</span>| │ Blockstack app │
<span class="nt">---------</span> │ generator! │
<span class="o">(</span> _U_ <span class="o">)</span> ╰──────────────────────────╯
/___A___<span class="se">\ </span> /
| ~ |
@ -397,28 +435,26 @@ modify the <code class="highlighter-rouge">hello-world</code> to interact with t
|° Y
? Are you ready to build a Blockstack app <span class="k">in </span>React? <span class="o">(</span>Y/n<span class="o">)</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Respond to the prompts to populate the initial app.</p>
<p>After the process completes successfully, you see a prompt similar to the following:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="o">[</span>fsevents] Success:
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="o">[</span>fsevents] Success:
<span class="s2">"/Users/theuser/repos/hello-blockstack/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node"</span>
is installed via remote npm notice created a lockfile as package-lock.json.
You should commit this file. added 1060 packages <span class="k">in </span>26.901s
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Run the initial application.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>npm start
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span>npm start
&gt; hello-blockstack@0.0.0 start /Users/moxiegirl/repos/hello-blockstack
&gt; webpack-dev-server
<span class="o">&gt;</span> hello-blockstack@0.0.0 start /Users/moxiegirl/repos/hello-blockstack
<span class="o">&gt;</span> webpack-dev-server
Project is running at http://localhost:8080/
webpack output is served from /
@ -435,8 +471,7 @@ modify the <code class="highlighter-rouge">hello-world</code> to interact with t
<span class="o">[</span>2] <span class="o">(</span>webpack<span class="o">)</span>/buildin/global.js 509 bytes <span class="o">{</span>0<span class="o">}</span> <span class="o">[</span>built]
<span class="o">[</span>3] <span class="o">(</span>webpack<span class="o">)</span>/buildin/module.js 517 bytes <span class="o">{</span>0<span class="o">}</span> <span class="o">[</span>built]
webpack: Compiled successfully.
</code></pre>
</div>
</code></pre></div> </div>
<p>The system opens a browser displaying your running application.</p>
@ -481,14 +516,13 @@ application directory.</p>
<p>This endpoint on the web version of your app will redirect Android users back
to your mobile app.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>touch public/redirect.html
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span>touch public/redirect.html
</code></pre></div> </div>
</li>
<li>
<p>Open <code class="highlighter-rouge">redirect.html</code> and add code to the endpoint.</p>
<div class="language-html highlighter-rouge"><pre class="highlight"><code> <span class="cp">&lt;!DOCTYPE html&gt;</span>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="cp">&lt;!DOCTYPE html&gt;</span>
<span class="nt">&lt;html&gt;</span>
<span class="nt">&lt;head&gt;</span>
<span class="nt">&lt;title&gt;</span>Hello, Blockstack!<span class="nt">&lt;/title&gt;</span>
@ -504,8 +538,7 @@ application directory.</p>
<span class="nt">&lt;body&gt;</span>
<span class="nt">&lt;/body&gt;</span>
<span class="nt">&lt;/html&gt;</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>Blockstack apps are identified by their domain names. The endpoint will
receive a get request with the query parameter <code class="highlighter-rouge">authResponse=XXXX</code> and
@ -784,7 +817,7 @@ the SDK. This SDK includes a themed “Sign in with Blockstack” button
<p>When you are done, your imports should appear as follows:</p>
<div class="language-kotlin highlighter-rouge"><pre class="highlight"><code>
<div class="language-kotlin highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
<span class="k">import</span> <span class="nn">android.support.v7.app.AppCompatActivity</span>
<span class="k">import</span> <span class="nn">android.os.Bundle</span>
@ -795,13 +828,12 @@ the SDK. This SDK includes a themed “Sign in with Blockstack” button
<span class="k">import</span> <span class="nn">org.blockstack.android.sdk.Scope</span>
<span class="k">import</span> <span class="nn">org.blockstack.android.sdk.UserData</span>
<span class="k">import</span> <span class="nn">java.net.URI</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Add a variable for the Blockstack session before <code class="highlighter-rouge">onCreate</code>.</p>
<div class="language-kotlin highlighter-rouge"><pre class="highlight"><code><span class="kd">class</span> <span class="nc">MainActivity</span> <span class="p">:</span> <span class="n">AppCompatActivity</span><span class="p">()</span> <span class="p">{</span>
<div class="language-kotlin highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">class</span> <span class="nc">MainActivity</span> <span class="p">:</span> <span class="n">AppCompatActivity</span><span class="p">()</span> <span class="p">{</span>
<span class="k">private</span> <span class="kd">var</span> <span class="py">_blockstackSession</span><span class="p">:</span> <span class="n">BlockstackSession</span><span class="p">?</span> <span class="p">=</span> <span class="k">null</span>
@ -811,13 +843,12 @@ the SDK. This SDK includes a themed “Sign in with Blockstack” button
<span class="n">setContentView</span><span class="p">(</span><span class="n">R</span><span class="p">.</span><span class="n">layout</span><span class="p">.</span><span class="n">activity_main</span><span class="p">)</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Replace the existing the <code class="highlighter-rouge">onCreate</code> function with the following:</p>
<div class="language-kotlin highlighter-rouge"><pre class="highlight"><code> <span class="k">override</span> <span class="k">fun</span> <span class="nf">onCreate</span><span class="p">(</span><span class="n">savedInstanceState</span><span class="p">:</span> <span class="n">Bundle</span><span class="p">?)</span> <span class="p">{</span>
<div class="language-kotlin highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="k">override</span> <span class="k">fun</span> <span class="nf">onCreate</span><span class="p">(</span><span class="n">savedInstanceState</span><span class="p">:</span> <span class="n">Bundle</span><span class="p">?)</span> <span class="p">{</span>
<span class="k">super</span><span class="p">.</span><span class="n">onCreate</span><span class="p">(</span><span class="n">savedInstanceState</span><span class="p">)</span>
<span class="n">setContentView</span><span class="p">(</span><span class="n">R</span><span class="p">.</span><span class="n">layout</span><span class="p">.</span><span class="n">activity_main</span><span class="p">)</span>
@ -856,8 +887,7 @@ the SDK. This SDK includes a themed “Sign in with Blockstack” button
</span> <span class="n">handleAuthResponse</span><span class="p">(</span><span class="n">intent</span><span class="p">)</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>This new <code class="highlighter-rouge">onCreate</code> does several things:</p>
@ -877,14 +907,13 @@ the SDK. This SDK includes a themed “Sign in with Blockstack” button
<li>
<p>Add a private function to reflect when a user successfully signs in.</p>
<div class="language-kotlin highlighter-rouge"><pre class="highlight"><code> <span class="k">private</span> <span class="k">fun</span> <span class="nf">onSignIn</span><span class="p">(</span><span class="n">userData</span><span class="p">:</span> <span class="n">UserData</span><span class="p">)</span> <span class="p">{</span>
<div class="language-kotlin highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="k">private</span> <span class="k">fun</span> <span class="nf">onSignIn</span><span class="p">(</span><span class="n">userData</span><span class="p">:</span> <span class="n">UserData</span><span class="p">)</span> <span class="p">{</span>
<span class="n">userDataTextView</span><span class="p">.</span><span class="n">text</span> <span class="p">=</span> <span class="s">"Signed in as ${userData.decentralizedID}"</span>
<span class="n">signInButton</span><span class="p">.</span><span class="n">isEnabled</span> <span class="p">=</span> <span class="k">false</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Handle sign in requests with an <code class="highlighter-rouge">onNewIntent</code> function if the activity was already opened when signing in</p>
@ -892,20 +921,19 @@ the SDK. This SDK includes a themed “Sign in with Blockstack” button
<p>Retrieve the authentication token from the custom protocol handler call and
send it to the Blockstack session.</p>
<div class="language-kotlin highlighter-rouge"><pre class="highlight"><code> <span class="k">override</span> <span class="k">fun</span> <span class="nf">onNewIntent</span><span class="p">(</span><span class="n">intent</span><span class="p">:</span> <span class="n">Intent</span><span class="p">?)</span> <span class="p">{</span>
<div class="language-kotlin highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="k">override</span> <span class="k">fun</span> <span class="nf">onNewIntent</span><span class="p">(</span><span class="n">intent</span><span class="p">:</span> <span class="n">Intent</span><span class="p">?)</span> <span class="p">{</span>
<span class="k">super</span><span class="p">.</span><span class="n">onNewIntent</span><span class="p">(</span><span class="n">intent</span><span class="p">)</span>
<span class="k">if</span> <span class="p">(</span><span class="n">intent</span><span class="o">?.</span><span class="n">action</span> <span class="p">==</span> <span class="n">Intent</span><span class="p">.</span><span class="n">ACTION_VIEW</span><span class="p">)</span> <span class="p">{</span>
<span class="n">handleAuthResponse</span><span class="p">(</span><span class="n">intent</span><span class="p">)</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Create a handler for the authentication response.</p>
<div class="language-kotlin highlighter-rouge"><pre class="highlight"><code> <span class="k">private</span> <span class="k">fun</span> <span class="nf">handleAuthResponse</span><span class="p">(</span><span class="n">intent</span><span class="p">:</span> <span class="n">Intent</span><span class="p">)</span> <span class="p">{</span>
<div class="language-kotlin highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="k">private</span> <span class="k">fun</span> <span class="nf">handleAuthResponse</span><span class="p">(</span><span class="n">intent</span><span class="p">:</span> <span class="n">Intent</span><span class="p">)</span> <span class="p">{</span>
<span class="kd">val</span> <span class="py">response</span> <span class="p">=</span> <span class="n">intent</span><span class="p">.</span><span class="n">dataString</span>
<span class="k">if</span> <span class="p">(</span><span class="n">response</span> <span class="p">!=</span> <span class="k">null</span><span class="p">)</span> <span class="p">{</span>
<span class="kd">val</span> <span class="py">authResponseTokens</span> <span class="p">=</span> <span class="n">response</span><span class="p">.</span><span class="n">split</span><span class="p">(</span><span class="sc">':'</span><span class="p">)</span>
@ -924,13 +952,12 @@ the SDK. This SDK includes a themed “Sign in with Blockstack” button
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Add the convenience method to access the blockstack session.</p>
<div class="language-kotlin highlighter-rouge"><pre class="highlight"><code> <span class="k">fun</span> <span class="nf">blockstackSession</span><span class="p">()</span> <span class="p">:</span> <span class="n">BlockstackSession</span> <span class="p">{</span>
<div class="language-kotlin highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="k">fun</span> <span class="nf">blockstackSession</span><span class="p">()</span> <span class="p">:</span> <span class="n">BlockstackSession</span> <span class="p">{</span>
<span class="kd">val</span> <span class="py">session</span> <span class="p">=</span> <span class="n">_blockstackSession</span>
<span class="k">if</span><span class="p">(</span><span class="n">session</span> <span class="p">!=</span> <span class="k">null</span><span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="n">session</span>
@ -938,13 +965,12 @@ the SDK. This SDK includes a themed “Sign in with Blockstack” button
<span class="k">throw</span> <span class="n">IllegalStateException</span><span class="p">(</span><span class="s">"No session."</span><span class="p">)</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Verify your final <code class="highlighter-rouge">MainActivity.kt</code> code looks like this:</p>
<div class="language-kotlin highlighter-rouge"><pre class="highlight"><code> <span class="kd">class</span> <span class="nc">MainActivity</span> <span class="p">:</span> <span class="n">AppCompatActivity</span><span class="p">()</span> <span class="p">{</span>
<div class="language-kotlin highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="kd">class</span> <span class="nc">MainActivity</span> <span class="p">:</span> <span class="n">AppCompatActivity</span><span class="p">()</span> <span class="p">{</span>
<span class="k">private</span> <span class="kd">var</span> <span class="py">_blockstackSession</span><span class="p">:</span> <span class="n">BlockstackSession</span><span class="p">?</span> <span class="p">=</span> <span class="k">null</span>
@ -1025,8 +1051,7 @@ the SDK. This SDK includes a themed “Sign in with Blockstack” button
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
</ol>
@ -1066,6 +1091,71 @@ know about your experience by tweeting to
<a href="https://twitter.com/intent/tweet?text=Android SDK Tutorial (Pre-release)&url=https://docs.blockstack.org/android/tutorial.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -1164,74 +1254,6 @@ know about your experience by tweeting to
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

415
_site/browser/blockstack_storage.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Blockstack Storage Tutorial | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Blockstack Storage Tutorial" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/browser/blockstack_storage.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/browser/blockstack_storage.html","headline":"Blockstack Storage Tutorial","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/blockstack_storage.html"},"description":"Blockstack Storage Tutorial","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/browser/blockstack_storage.html","headline":"Blockstack Storage Tutorial","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/blockstack_storage.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Blockstack Storage Tutorial","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -116,6 +116,23 @@
<!-- -->
<h5>Introduction</h5>
<ul class="uk-nav uk-nav-default doc-nav">
</ul>
<ul class="uk-nav uk-nav-default doc-nav">
<!-- -->
<li class=""><a href="/develop/dapp_principles.html">Principles of Blockstack applications</a></li>
</ul>
<h5>Try a tutorial</h5>
<ul class="uk-nav uk-nav-default doc-nav">
@ -155,6 +172,23 @@
</ul>
<h5>Application mining</h5>
<ul class="uk-nav uk-nav-default doc-nav">
<!-- -->
<li class=""><a href="/develop/mining_intro.html">Understand app mining</a></li>
<!-- -->
<li class=""><a href="/develop/mining_enroll.html">How to enroll</a></li>
</ul>
<h5>Reference</h5>
<ul class="uk-nav uk-nav-default doc-nav">
@ -165,10 +199,20 @@
<li class=""><a href="/core/faq_developer.html">Developer FAQs</a></li>
<!-- -->
<li class=""><a href="/common/mining_faq.html">Mining FAQ</a></li>
<!-- -->
<li class=""><a href="/common/javascript_ref.html">Blockstack Javascript Reference</a></li>
<!-- -->
<li class=""><a href="/common/core_ref.html">Blockstack CORE API</a></li>
</ul>
<!-- -->
@ -195,13 +239,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-browser/blob/master/docs/blockstack_storage.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -259,10 +303,9 @@ the application, you need to have already <a href="ids-introduction">registered
<p>The tutorial relies on the <code class="highlighter-rouge">npm</code> dependency manager. Before you begin, verify
you have installed <code class="highlighter-rouge">npm</code> using the <code class="highlighter-rouge">which</code> command.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>which npm
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>which npm
/usr/local/bin/npm
</code></pre>
</div>
</code></pre></div></div>
<p>If you don’t find <code class="highlighter-rouge">npm</code> in your system, <a href="https://www.npmjs.com/get-npm">install
it</a>. Finally, if you get stuck at any point
@ -279,16 +322,14 @@ existing projects.</p>
<li>
<p>Install Yeoman.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm install -g yo
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm install <span class="nt">-g</span> yo
</code></pre></div> </div>
</li>
<li>
<p>Install the Blockstack application generator.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm install -g generator-blockstack
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm install <span class="nt">-g</span> generator-blockstack
</code></pre></div> </div>
</li>
</ol>
@ -302,27 +343,24 @@ existing projects.</p>
<li>
<p>Create a the <code class="highlighter-rouge">publik</code> directory.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> mkdir publik
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> mkdir publik
</code></pre></div> </div>
</li>
<li>
<p>Change into your new directory.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nb">cd </span>publik
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nb">cd </span>publik
</code></pre></div> </div>
</li>
<li>
<p>Use Yeoman and the Blockstack application generator to create your initial <code class="highlighter-rouge">publik</code> application.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> yo blockstack:react
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> yo blockstack:react
</code></pre></div> </div>
<p>You should see several interactive prompts.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>yo blockstack:react
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span>yo blockstack:react
? <span class="o">==========================================================================</span>
We<span class="s1">'re constantly looking for ways to make yo better!
May we anonymously report usage statistics to improve the tool over time?
@ -340,27 +378,24 @@ existing projects.</p>
´ ` |° ´ Y `
? Are you ready to build a Blockstack app in React? (Y/n)
</span></code></pre>
</div>
</span></code></pre></div> </div>
</li>
<li>
<p>Respond to the prompts to populate the initial app.</p>
<p>After the process completes successfully, you see a prompt similar to the following:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="o">[</span>fsevents] Success:
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="o">[</span>fsevents] Success:
<span class="s2">"/Users/theuser/repos/publik/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node"</span>
is installed via remote npm notice created a lockfile as package-lock.json.
You should commit this file. added 1060 packages <span class="k">in </span>26.901s
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Run the initial application.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm start
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm start
</code></pre></div> </div>
<p>The system prompts you to accept incoming connections.</p>
@ -404,23 +439,21 @@ stored on Gaia are made visible to others via the <code class="highlighter-rouge
<li>
<p>Locate the <code class="highlighter-rouge">handleSignIn</code> handler method.</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">handleSignIn</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">handleSignIn</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">e</span><span class="p">.</span><span class="nx">preventDefault</span><span class="p">();</span>
<span class="nx">redirectToSignIn</span><span class="p">();</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Modify the method to this:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">handleSignIn</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">handleSignIn</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">e</span><span class="p">.</span><span class="nx">preventDefault</span><span class="p">();</span>
<span class="kr">const</span> <span class="nx">origin</span> <span class="o">=</span> <span class="nb">window</span><span class="p">.</span><span class="nx">location</span><span class="p">.</span><span class="nx">origin</span>
<span class="kd">const</span> <span class="nx">origin</span> <span class="o">=</span> <span class="nb">window</span><span class="p">.</span><span class="nx">location</span><span class="p">.</span><span class="nx">origin</span>
<span class="nx">redirectToSignIn</span><span class="p">(</span><span class="nx">origin</span><span class="p">,</span> <span class="nx">origin</span> <span class="o">+</span> <span class="s1">'/manifest.json'</span><span class="p">,</span> <span class="p">[</span><span class="s1">'store_write'</span><span class="p">,</span> <span class="s1">'publish_data'</span><span class="p">])</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>By default, authentication requests include the <code class="highlighter-rouge">store_write</code> scope which
enables storage. This is what allows you to store information to Gaia.</p>
@ -454,18 +487,17 @@ delete grocery lists.</p>
<p>A single file collection stores items as an array nested inside each grocery
list:</p>
<div class="language-js highlighter-rouge"><pre class="highlight"><code><span class="c1">// grocerylists.json</span>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// grocerylists.json</span>
<span class="p">{</span>
<span class="s2">"3255"</span><span class="err">:</span> <span class="p">{</span>
<span class="s2">"items"</span><span class="err">:</span> <span class="p">[</span>
<span class="s2">"3255"</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">"items"</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">"1 Head of Lettuce"</span><span class="p">,</span>
<span class="s2">"Haralson apples"</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="c1">// ...more lists with items</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>This is conceptually the simplest way to manage grocery lists. When you read a
<code class="highlighter-rouge">/grocerylists.json</code> file with <code class="highlighter-rouge">getFile()</code>, you get back one or more grocery
@ -504,28 +536,26 @@ or remove a grocery list; updating a list has no impact.</p>
<p>The <code class="highlighter-rouge">Person</code> object holds a Blockstack profile. Add <code class="highlighter-rouge">putFile</code>, <code class="highlighter-rouge">getFile</code>,
and <code class="highlighter-rouge">lookupProfile</code> after <code class="highlighter-rouge">Person</code>.</p>
<div class="highlighter-rouge"><pre class="highlight"><code> When you are done, the import statement should look like the following:
</code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> When you are done, the import statement should look like the following:
</code></pre></div> </div>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="kr">import</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="k">import</span> <span class="p">{</span>
<span class="nx">isSignInPending</span><span class="p">,</span>
<span class="nx">loadUserData</span><span class="p">,</span>
<span class="nx">Person</span><span class="p">,</span>
<span class="nx">getFile</span><span class="p">,</span>
<span class="nx">putFile</span><span class="p">,</span>
<span class="nx">lookupProfile</span>
<span class="p">}</span> <span class="nx">from</span> <span class="s1">'blockstack'</span><span class="p">;</span>
</code></pre>
</div>
<span class="p">}</span> <span class="k">from</span> <span class="s1">'blockstack'</span><span class="p">;</span>
</code></pre></div> </div>
</li>
<li>
<p>Replace the <code class="highlighter-rouge">constructor()</code> initial state so that it holds the key properties required by the app.</p>
<p>This code constructs a Blockstack <code class="highlighter-rouge">Person</code> object to hold the profile. Your constructor should look like this:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">constructor</span><span class="p">(</span><span class="nx">props</span><span class="p">)</span> <span class="p">{</span>
<span class="kr">super</span><span class="p">(</span><span class="nx">props</span><span class="p">);</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="kd">constructor</span><span class="p">(</span><span class="nx">props</span><span class="p">)</span> <span class="p">{</span>
<span class="k">super</span><span class="p">(</span><span class="nx">props</span><span class="p">);</span>
<span class="k">this</span><span class="p">.</span><span class="nx">state</span> <span class="o">=</span> <span class="p">{</span>
<span class="na">person</span><span class="p">:</span> <span class="p">{</span>
@ -543,8 +573,7 @@ or remove a grocery list; updating a list has no impact.</p>
<span class="na">isLoading</span><span class="p">:</span> <span class="kc">false</span>
<span class="p">};</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>Locate the <code class="highlighter-rouge">render()</code> method.</li>
<li>
@ -553,10 +582,10 @@ or remove a grocery list; updating a list has no impact.</p>
<p>The following code echos the <code class="highlighter-rouge">person.name</code> and <code class="highlighter-rouge">person.avatarURL</code>
properties from the profile on the display:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="kr">const</span> <span class="p">{</span> <span class="nx">handleSignOut</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">;</span>
<span class="kr">const</span> <span class="p">{</span> <span class="nx">person</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">;</span>
<span class="kr">const</span> <span class="p">{</span> <span class="nx">username</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">;</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="kd">const</span> <span class="p">{</span> <span class="nx">handleSignOut</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">;</span>
<span class="kd">const</span> <span class="p">{</span> <span class="nx">person</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">;</span>
<span class="kd">const</span> <span class="p">{</span> <span class="nx">username</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">;</span>
<span class="k">return</span> <span class="p">(</span>
<span class="o">!</span><span class="nx">isSignInPending</span><span class="p">()</span> <span class="o">&amp;&amp;</span> <span class="nx">person</span> <span class="p">?</span>
@ -569,8 +598,8 @@ or remove a grocery list; updating a list has no impact.</p>
<span class="nx">src</span><span class="o">=</span><span class="p">{</span> <span class="nx">person</span><span class="p">.</span><span class="nx">avatarUrl</span><span class="p">()</span> <span class="p">?</span> <span class="nx">person</span><span class="p">.</span><span class="nx">avatarUrl</span><span class="p">()</span> <span class="p">:</span> <span class="nx">avatarFallbackImage</span> <span class="p">}</span>
<span class="nx">className</span><span class="o">=</span><span class="s2">"img-rounded avatar"</span>
<span class="nx">id</span><span class="o">=</span><span class="s2">"avatar-image"</span>
<span class="sr">/</span><span class="err">&gt;
</span> <span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"username"</span><span class="o">&gt;</span>
<span class="o">/&gt;</span>
<span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"username"</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="nx">h1</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="nx">span</span> <span class="nx">id</span><span class="o">=</span><span class="s2">"heading-name"</span><span class="o">&gt;</span><span class="p">{</span> <span class="nx">person</span><span class="p">.</span><span class="nx">name</span><span class="p">()</span> <span class="p">?</span> <span class="nx">person</span><span class="p">.</span><span class="nx">name</span><span class="p">()</span>
<span class="p">:</span> <span class="s1">'Nameless Person'</span> <span class="p">}</span><span class="o">&lt;</span><span class="sr">/span</span><span class="err">&gt;
@ -590,8 +619,8 @@ or remove a grocery list; updating a list has no impact.</p>
<span class="nx">value</span><span class="o">=</span><span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">.</span><span class="nx">newStatus</span><span class="p">}</span>
<span class="nx">onChange</span><span class="o">=</span><span class="p">{</span><span class="nx">e</span> <span class="o">=&gt;</span> <span class="k">this</span><span class="p">.</span><span class="nx">handleNewStatusChange</span><span class="p">(</span><span class="nx">e</span><span class="p">)}</span>
<span class="nx">placeholder</span><span class="o">=</span><span class="s2">"Enter a status"</span>
<span class="sr">/</span><span class="err">&gt;
</span> <span class="o">&lt;</span><span class="sr">/div</span><span class="err">&gt;
<span class="o">/&gt;</span>
<span class="o">&lt;</span><span class="sr">/div</span><span class="err">&gt;
</span> <span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"col-md-12"</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="nx">button</span>
<span class="nx">className</span><span class="o">=</span><span class="s2">"btn btn-primary btn-lg"</span>
@ -607,8 +636,7 @@ or remove a grocery list; updating a list has no impact.</p>
</span> <span class="o">&lt;</span><span class="sr">/div&gt; : nul</span><span class="err">l
</span> <span class="p">);</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>This code allows the application to post statuses. It also displays the
user’s Blockstack ID. To display this, your app must extract the ID from the
@ -620,19 +648,18 @@ user profile data.</p>
<p>You’ll use the Blockstack <code class="highlighter-rouge">loadUserData()</code> method to access the <code class="highlighter-rouge">username</code>.</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">componentWillMount</span><span class="p">()</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">componentWillMount</span><span class="p">()</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span>
<span class="na">person</span><span class="p">:</span> <span class="k">new</span> <span class="nx">Person</span><span class="p">(</span><span class="nx">loadUserData</span><span class="p">().</span><span class="nx">profile</span><span class="p">),</span>
<span class="na">username</span><span class="p">:</span> <span class="nx">loadUserData</span><span class="p">().</span><span class="nx">username</span>
<span class="p">});</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Add two methods to handle the status input events:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">handleNewStatusChange</span><span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">handleNewStatusChange</span><span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span><span class="na">newStatus</span><span class="p">:</span> <span class="nx">event</span><span class="p">.</span><span class="nx">target</span><span class="p">.</span><span class="nx">value</span><span class="p">})</span>
<span class="p">}</span>
@ -642,13 +669,12 @@ user profile data.</p>
<span class="na">newStatus</span><span class="p">:</span> <span class="s2">""</span>
<span class="p">})</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Add a <code class="highlighter-rouge">saveNewStatus()</code> method to save the new statuses.</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">saveNewStatus</span><span class="p">(</span><span class="nx">statusText</span><span class="p">)</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">saveNewStatus</span><span class="p">(</span><span class="nx">statusText</span><span class="p">)</span> <span class="p">{</span>
<span class="kd">let</span> <span class="nx">statuses</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">.</span><span class="nx">statuses</span>
<span class="kd">let</span> <span class="nx">status</span> <span class="o">=</span> <span class="p">{</span>
@ -658,7 +684,7 @@ user profile data.</p>
<span class="p">}</span>
<span class="nx">statuses</span><span class="p">.</span><span class="nx">unshift</span><span class="p">(</span><span class="nx">status</span><span class="p">)</span>
<span class="kr">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="na">encrypt</span><span class="p">:</span> <span class="kc">false</span> <span class="p">}</span>
<span class="kd">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="na">encrypt</span><span class="p">:</span> <span class="kc">false</span> <span class="p">}</span>
<span class="nx">putFile</span><span class="p">(</span><span class="s1">'statuses.json'</span><span class="p">,</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">statuses</span><span class="p">),</span> <span class="nx">options</span><span class="p">)</span>
<span class="p">.</span><span class="nx">then</span><span class="p">(()</span> <span class="o">=&gt;</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span>
@ -666,8 +692,7 @@ user profile data.</p>
<span class="p">})</span>
<span class="p">})</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Save the <code class="highlighter-rouge">Profile.jsk</code> file.</p>
@ -694,7 +719,7 @@ the statuses back to the user as a blog entry.</p>
<li>
<p>Right after this opening <code class="highlighter-rouge">div</code> element, add this block.</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"col-md-12 statuses"</span><span class="o">&gt;</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"col-md-12 statuses"</span><span class="o">&gt;</span>
<span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">.</span><span class="nx">isLoading</span> <span class="o">&amp;&amp;</span> <span class="o">&lt;</span><span class="nx">span</span><span class="o">&gt;</span><span class="nx">Loading</span><span class="p">...</span><span class="o">&lt;</span><span class="sr">/span&gt;</span><span class="err">}
</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">.</span><span class="nx">statuses</span><span class="p">.</span><span class="nx">map</span><span class="p">((</span><span class="nx">status</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="p">(</span>
<span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"status"</span> <span class="nx">key</span><span class="o">=</span><span class="p">{</span><span class="nx">status</span><span class="p">.</span><span class="nx">id</span><span class="p">}</span><span class="o">&gt;</span>
@ -703,17 +728,16 @@ the statuses back to the user as a blog entry.</p>
</span> <span class="p">)</span>
<span class="p">)}</span>
<span class="o">&lt;</span><span class="sr">/div</span><span class="err">&gt;
</span></code></pre>
</div>
</span></code></pre></div> </div>
<p>This loads existing state. Your code needs to fetch statuses on page load.</p>
</li>
<li>
<p>Add a new method called <code class="highlighter-rouge">fetchData()</code> after the <code class="highlighter-rouge">statuses.unshift(status)</code> section.</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
<span class="nx">fetchData</span><span class="p">()</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span> <span class="na">isLoading</span><span class="p">:</span> <span class="kc">true</span> <span class="p">})</span>
<span class="kr">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="na">decrypt</span><span class="p">:</span> <span class="kc">false</span> <span class="p">}</span>
<span class="kd">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="na">decrypt</span><span class="p">:</span> <span class="kc">false</span> <span class="p">}</span>
<span class="nx">getFile</span><span class="p">(</span><span class="s1">'statuses.json'</span><span class="p">,</span> <span class="nx">options</span><span class="p">)</span>
<span class="p">.</span><span class="nx">then</span><span class="p">((</span><span class="nx">file</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">statuses</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">file</span> <span class="o">||</span> <span class="s1">'[]'</span><span class="p">)</span>
@ -728,18 +752,16 @@ the statuses back to the user as a blog entry.</p>
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span> <span class="na">isLoading</span><span class="p">:</span> <span class="kc">false</span> <span class="p">})</span>
<span class="p">})</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Call <code class="highlighter-rouge">fetchData()</code> from the <code class="highlighter-rouge">componentDidMount()</code> method</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
<span class="nx">componentDidMount</span><span class="p">()</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">fetchData</span><span class="p">()</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Save the file.</p>
@ -758,7 +780,7 @@ the statuses back to the user as a blog entry.</p>
<li>
<p>Replace the content with the following:</p>
<div class="language-css highlighter-rouge"><pre class="highlight"><code> <span class="c">/* Globals */</span>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="c">/* Globals */</span>
<span class="nt">a</span><span class="o">,</span><span class="nt">a</span><span class="nd">:focus</span><span class="o">,</span><span class="nt">a</span><span class="nd">:hover</span><span class="p">{</span><span class="nl">color</span><span class="p">:</span><span class="m">#fff</span><span class="p">;}</span>
<span class="nt">html</span><span class="o">,</span><span class="nt">body</span><span class="p">{</span><span class="nl">height</span><span class="p">:</span><span class="m">100%</span><span class="p">;</span><span class="nl">text-align</span><span class="p">:</span><span class="nb">center</span><span class="p">;</span><span class="nl">background-color</span><span class="p">:</span><span class="m">#191b22</span><span class="p">;}</span>
<span class="nt">body</span><span class="p">{</span><span class="nl">color</span><span class="p">:</span><span class="m">#fff</span><span class="p">}</span>
@ -793,8 +815,7 @@ the statuses back to the user as a blog entry.</p>
<span class="c">/* Statuses */</span>
<span class="nc">.statuses</span><span class="p">{</span><span class="nl">padding-top</span><span class="p">:</span><span class="m">30px</span><span class="p">;}</span>
<span class="nc">.status</span><span class="p">{</span><span class="nl">margin</span><span class="p">:</span><span class="m">15px</span> <span class="m">0px</span><span class="p">;</span><span class="nl">padding</span><span class="p">:</span><span class="m">20px</span><span class="p">;</span><span class="nl">background-color</span><span class="p">:</span><span class="m">#2e2e2e</span><span class="p">;</span><span class="nl">border-radius</span><span class="p">:</span><span class="m">6px</span><span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Save and close the <code class="highlighter-rouge">src/styles/style.css</code> file.</p>
@ -826,49 +847,44 @@ other users’ profiles by visiting <code class="highlighter-rouge">http://local
<li>
<p>Install <code class="highlighter-rouge">react-router</code>:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm install --save react-router-dom
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm install <span class="nt">--save</span> react-router-dom
</code></pre></div> </div>
</li>
<li>Edit <code class="highlighter-rouge">src/index.js</code> file.</li>
<li>
<p>Add an <code class="highlighter-rouge">import</code> to the file at the top:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="kr">import</span> <span class="p">{</span> <span class="nx">BrowserRouter</span> <span class="p">}</span> <span class="nx">from</span> <span class="s1">'react-router-dom'</span>
</code></pre>
</div>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="k">import</span> <span class="p">{</span> <span class="nx">BrowserRouter</span> <span class="p">}</span> <span class="k">from</span> <span class="s1">'react-router-dom'</span>
</code></pre></div> </div>
</li>
<li>
<p>Change the <code class="highlighter-rouge">ReactDOM.render()</code> method in <code class="highlighter-rouge">src/index.js</code> to:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">render</span><span class="p">((</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">render</span><span class="p">((</span>
<span class="o">&lt;</span><span class="nx">BrowserRouter</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="nx">App</span> <span class="o">/&gt;</span>
<span class="o">&lt;</span><span class="sr">/BrowserRouter</span><span class="err">&gt;
</span> <span class="p">),</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="s1">'root'</span><span class="p">));</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>Save and close the <code class="highlighter-rouge">src/index.js</code> file.</li>
<li>Edit the <code class="highlighter-rouge">src/components/App.jsx</code> file.</li>
<li>
<p>Add the new route by importing the <code class="highlighter-rouge">Switch</code> and <code class="highlighter-rouge">Route</code> components from <code class="highlighter-rouge">react-router-dom</code>:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="kr">import</span> <span class="p">{</span> <span class="nx">Switch</span><span class="p">,</span> <span class="nx">Route</span> <span class="p">}</span> <span class="nx">from</span> <span class="s1">'react-router-dom'</span>
</code></pre>
</div>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="k">import</span> <span class="p">{</span> <span class="nx">Switch</span><span class="p">,</span> <span class="nx">Route</span> <span class="p">}</span> <span class="k">from</span> <span class="s1">'react-router-dom'</span>
</code></pre></div> </div>
</li>
<li>
<p>Locate this line below in the <code class="highlighter-rouge">render()</code> method:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="err">:</span> <span class="o">&lt;</span><span class="nx">Profile</span> <span class="nx">handleSignOut</span><span class="o">=</span><span class="p">{</span> <span class="k">this</span><span class="p">.</span><span class="nx">handleSignOut</span> <span class="p">}</span> <span class="sr">/</span><span class="err">&gt;
</span></code></pre>
</div>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="p">:</span> <span class="o">&lt;</span><span class="nx">Profile</span> <span class="nx">handleSignOut</span><span class="o">=</span><span class="p">{</span> <span class="k">this</span><span class="p">.</span><span class="nx">handleSignOut</span> <span class="p">}</span> <span class="sr">/</span><span class="err">&gt;
</span></code></pre></div> </div>
</li>
<li>
<p>Replace it with the following:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="err">:</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="p">:</span>
<span class="o">&lt;</span><span class="nx">Switch</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="nx">Route</span>
<span class="nx">path</span><span class="o">=</span><span class="s1">'/:username?'</span>
@ -877,8 +893,7 @@ other users’ profiles by visiting <code class="highlighter-rouge">http://local
</span> <span class="p">}</span>
<span class="sr">/</span><span class="err">&gt;
</span> <span class="o">&lt;</span><span class="sr">/Switch</span><span class="err">&gt;
</span></code></pre>
</div>
</span></code></pre></div> </div>
<p>This sets up a route and captures the route parameter the app will use as the profile lookup username.</p>
</li>
@ -897,18 +912,16 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<li>
<p>Open <code class="highlighter-rouge">webpack.config.js</code> in the root project directory and locate the following line:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">historyApiFallback</span><span class="err">:</span> <span class="kc">true</span><span class="p">,</span>
</code></pre>
</div>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">historyApiFallback</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
</code></pre></div> </div>
</li>
<li>
<p>Replace it with this:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">historyApiFallback</span><span class="err">:</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">historyApiFallback</span><span class="p">:</span> <span class="p">{</span>
<span class="nl">disableDotRule</span><span class="p">:</span> <span class="kc">true</span>
<span class="p">},</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>You will need to run <code class="highlighter-rouge">npm start</code> again for this change to take effect. Don’t
worry, there is a later step for that to remind you.</p>
@ -920,21 +933,20 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<li>
<p>Add a single method that determines if the app is viewing the local user’s profile or another user’s profile.</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">isLocal</span><span class="p">()</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">isLocal</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">.</span><span class="nx">match</span><span class="p">.</span><span class="nx">params</span><span class="p">.</span><span class="nx">username</span> <span class="p">?</span> <span class="kc">false</span> <span class="p">:</span> <span class="kc">true</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>You use <code class="highlighter-rouge">isLocal()</code> to check if the user is viewing the local user profile or another user’s profile. If it’s the local user profile, the app runs the <code class="highlighter-rouge">getFile()</code> function you added in an earlier step. Otherwise, the app looks up the profile belonging to the <code class="highlighter-rouge">username</code> using the <code class="highlighter-rouge">lookupProfile()</code> method.</p>
</li>
<li>
<p>Modify the <code class="highlighter-rouge">fetchData()</code> method like so:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">fetchData</span><span class="p">()</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">fetchData</span><span class="p">()</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span> <span class="na">isLoading</span><span class="p">:</span> <span class="kc">true</span> <span class="p">})</span>
<span class="k">if</span> <span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">isLocal</span><span class="p">())</span> <span class="p">{</span>
<span class="kr">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="na">decrypt</span><span class="p">:</span> <span class="kc">false</span> <span class="p">}</span>
<span class="kd">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="na">decrypt</span><span class="p">:</span> <span class="kc">false</span> <span class="p">}</span>
<span class="nx">getFile</span><span class="p">(</span><span class="s1">'statuses.json'</span><span class="p">,</span> <span class="nx">options</span><span class="p">)</span>
<span class="p">.</span><span class="nx">then</span><span class="p">((</span><span class="nx">file</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">statuses</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">file</span> <span class="o">||</span> <span class="s1">'[]'</span><span class="p">)</span>
@ -949,7 +961,7 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span> <span class="na">isLoading</span><span class="p">:</span> <span class="kc">false</span> <span class="p">})</span>
<span class="p">})</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="kr">const</span> <span class="nx">username</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">.</span><span class="nx">match</span><span class="p">.</span><span class="nx">params</span><span class="p">.</span><span class="nx">username</span>
<span class="kd">const</span> <span class="nx">username</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">.</span><span class="nx">match</span><span class="p">.</span><span class="nx">params</span><span class="p">.</span><span class="nx">username</span>
<span class="nx">lookupProfile</span><span class="p">(</span><span class="nx">username</span><span class="p">)</span>
<span class="p">.</span><span class="nx">then</span><span class="p">((</span><span class="nx">profile</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="p">{</span>
@ -963,8 +975,7 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<span class="p">})</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
<p><strong>NOTE</strong>: For <code class="highlighter-rouge">https</code> deployments, the default Blockstack Core API endpoint for name
lookups should be changed to point to a core API served over <code class="highlighter-rouge">https</code>.
@ -976,7 +987,7 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<li>
<p>Add the following block to <code class="highlighter-rouge">fetchData()</code> right after the call to <code class="highlighter-rouge">lookupProfile(username)... catch((error)=&gt;{..}</code> block:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="kr">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="na">username</span><span class="p">:</span> <span class="nx">username</span><span class="p">,</span> <span class="na">decrypt</span><span class="p">:</span> <span class="kc">false</span> <span class="p">}</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="kd">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="na">username</span><span class="p">:</span> <span class="nx">username</span><span class="p">,</span> <span class="na">decrypt</span><span class="p">:</span> <span class="kc">false</span> <span class="p">}</span>
<span class="nx">getFile</span><span class="p">(</span><span class="s1">'statuses.json'</span><span class="p">,</span> <span class="nx">options</span><span class="p">)</span>
<span class="p">.</span><span class="nx">then</span><span class="p">((</span><span class="nx">file</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">statuses</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">file</span> <span class="o">||</span> <span class="s1">'[]'</span><span class="p">)</span>
@ -991,8 +1002,7 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<span class="p">.</span><span class="k">finally</span><span class="p">(()</span> <span class="o">=&gt;</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span> <span class="na">isLoading</span><span class="p">:</span> <span class="kc">false</span> <span class="p">})</span>
<span class="p">})</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>This fetches the user statuses.</p>
@ -1001,10 +1011,10 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<li>
<p>Replace the <code class="highlighter-rouge">render()</code> method with the following:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="kr">const</span> <span class="p">{</span> <span class="nx">handleSignOut</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">;</span>
<span class="kr">const</span> <span class="p">{</span> <span class="nx">person</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">;</span>
<span class="kr">const</span> <span class="p">{</span> <span class="nx">username</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">;</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="kd">const</span> <span class="p">{</span> <span class="nx">handleSignOut</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">;</span>
<span class="kd">const</span> <span class="p">{</span> <span class="nx">person</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">;</span>
<span class="kd">const</span> <span class="p">{</span> <span class="nx">username</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">;</span>
<span class="k">return</span> <span class="p">(</span>
<span class="o">!</span><span class="nx">isSignInPending</span><span class="p">()</span> <span class="o">&amp;&amp;</span> <span class="nx">person</span> <span class="p">?</span>
@ -1017,8 +1027,8 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<span class="nx">src</span><span class="o">=</span><span class="p">{</span> <span class="nx">person</span><span class="p">.</span><span class="nx">avatarUrl</span><span class="p">()</span> <span class="p">?</span> <span class="nx">person</span><span class="p">.</span><span class="nx">avatarUrl</span><span class="p">()</span> <span class="p">:</span> <span class="nx">avatarFallbackImage</span> <span class="p">}</span>
<span class="nx">className</span><span class="o">=</span><span class="s2">"img-rounded avatar"</span>
<span class="nx">id</span><span class="o">=</span><span class="s2">"avatar-image"</span>
<span class="sr">/</span><span class="err">&gt;
</span> <span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"username"</span><span class="o">&gt;</span>
<span class="o">/&gt;</span>
<span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"username"</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="nx">h1</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="nx">span</span> <span class="nx">id</span><span class="o">=</span><span class="s2">"heading-name"</span><span class="o">&gt;</span><span class="p">{</span> <span class="nx">person</span><span class="p">.</span><span class="nx">name</span><span class="p">()</span> <span class="p">?</span> <span class="nx">person</span><span class="p">.</span><span class="nx">name</span><span class="p">()</span>
<span class="p">:</span> <span class="s1">'Nameless Person'</span> <span class="p">}</span><span class="o">&lt;</span><span class="sr">/span</span><span class="err">&gt;
@ -1040,8 +1050,8 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<span class="nx">value</span><span class="o">=</span><span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">.</span><span class="nx">newStatus</span><span class="p">}</span>
<span class="nx">onChange</span><span class="o">=</span><span class="p">{</span><span class="nx">e</span> <span class="o">=&gt;</span> <span class="k">this</span><span class="p">.</span><span class="nx">handleNewStatusChange</span><span class="p">(</span><span class="nx">e</span><span class="p">)}</span>
<span class="nx">placeholder</span><span class="o">=</span><span class="s2">"What's on your mind?"</span>
<span class="sr">/</span><span class="err">&gt;
</span> <span class="o">&lt;</span><span class="sr">/div</span><span class="err">&gt;
<span class="o">/&gt;</span>
<span class="o">&lt;</span><span class="sr">/div</span><span class="err">&gt;
</span> <span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"col-md-12 text-right"</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="nx">button</span>
<span class="nx">className</span><span class="o">=</span><span class="s2">"btn btn-primary btn-lg"</span>
@ -1066,10 +1076,9 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
</span> <span class="o">&lt;</span><span class="sr">/div&gt; : nul</span><span class="err">l
</span> <span class="p">);</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>### This checks to ensure that users are viewing their own profile, by wrapping the <strong>Logout</strong> button and inputs with the <code class="highlighter-rouge"><span class="p">{</span><span class="err">isLocal()</span><span class="w"> </span><span class="err">&amp;&amp;</span><span class="w"> </span><span class="err">...</span><span class="p">}</span></code> condition.</p>
<p>### This checks to ensure that users are viewing their own profile, by wrapping the <strong>Logout</strong> button and inputs with the <code class="highlighter-rouge">{isLocal() &amp;&amp; ...}</code> condition.</p>
</li>
</ol>
@ -1080,9 +1089,8 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<li>
<p>Restart the application so that the disabling of the <code class="highlighter-rouge">.</code> (dot) rule takes effect.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm start
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm start
</code></pre></div> </div>
</li>
<li>Point your browser to <code class="highlighter-rouge">http://localhost:8080/your_blockstack.id</code> to see the final application.</li>
</ol>
@ -1097,6 +1105,71 @@ about Blockstack. To use a working version of the app go
<a href="https://twitter.com/intent/tweet?text=Blockstack Storage Tutorial&url=https://docs.blockstack.org/browser/blockstack_storage.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -1195,74 +1268,6 @@ about Blockstack. To use a working version of the app go
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

227
_site/browser/browser-introduction.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Get the Blockstack Browser | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Get the Blockstack Browser" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/browser/browser-introduction.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/browser/browser-introduction.html","headline":"Get the Blockstack Browser","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/browser-introduction.html"},"description":"Get the Blockstack Browser","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/browser/browser-introduction.html","headline":"Get the Blockstack Browser","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/browser-introduction.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Get the Blockstack Browser","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -159,13 +159,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-browser/blob/master/docs/browser-introduction.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -209,11 +209,10 @@ Browser is itself, a simple Dapp. It allows you to:</p>
<li>find and launch Dapps</li>
</ul>
<p>There are editorions of the Blockstack Browser, the web edition is an
application you access through your web browser by simply <a href="https://browser.blockstack.org/">visit the
applications’ address</a> in your computer’s
browser. You can also install the browser as a client application on your
computer.</p>
<p>There are two editions of the Blockstack Browser, the web edition is an
application you access through your web browser by simply <a href="https://browser.blockstack.org/" target="\_blank">visiting the application’s
address</a> in your computer’s browser. You can also install the browser as a
client application on your computer.</p>
<p>If all you want to do is create, manage, and fund an identity and then interact
with Dapps, you can simply use the web edition. If you have concerns about net
@ -244,15 +243,14 @@ may find it useful to install the client edition.</p>
<p>The Blockstack Browser installer is a <em>multiple-context</em> installer. If you
run it as a user, the installation is avalable only for that user. If you
install as administrator, the installation installs for all users. To find an
installer for your operating system, visit <a href="https://blockstack.org/install">the Blockstack install
page</a>.</p>
installer for your operating system, visit <a href="https://blockstack.org/install" target="\_blank">the browser installation page</a>.</p>
<h3 id="on-mac">On Mac</h3>
<p>Installation requires that you have macOS High Sierra 10.12 or higher. Do the following to install:</p>
<ol>
<li>Download the OSX installer from <a href="https://blockstack.org/install">the browser installation page</a>.</li>
<li>Download the OSX installer from <a href="https://blockstack.org/install" target="\_blank">the browser installation page</a>.</li>
<li>
<p>Double-click the downloaded DMG file to launch the installer.</p>
@ -288,7 +286,7 @@ you are already logged into the local application:</p>
install:</p>
<ol>
<li>Download the Windows installer from from <a href="https://blockstack.org/install">the browser installation page</a>.</li>
<li>Download the Windows installer from from <a href="https://blockstack.org/install" target="\_blank">the browser installation page</a>.</li>
<li>
<p>Double-click the installer package to launch it.</p>
@ -315,7 +313,7 @@ install:</p>
<h3 id="on-linux">On Linux</h3>
<p>The Blockstack installation on Linux requires Docker. Before installing
Blockstack, <a href="https://docs.docker.com/install/">install the version of Docker appropriate for your operating system</a>.</p>
Blockstack, <a href="https://docs.docker.com/install/" target="\_blank">install the version of Docker appropriate for your operating system</a>.</p>
<blockquote>
<p><strong>Note</strong>: The Blockstack script used in this procedure runs <code class="highlighter-rouge">docker</code> commands. Depending on how you installed and configure Dockered on your system, it may or may not be necessary to have <code class="highlighter-rouge">root</code> or <code class="highlighter-rouge">sudo</code> privileges. For this reason, the commands below show the use of <code class="highlighter-rouge">sudo</code> when interacting with the script or the <code class="highlighter-rouge">docker</code> executable. If your installation allows running Docker with lower privileges, you can omit it.</p>
@ -323,7 +321,7 @@ Blockstack, <a href="https://docs.docker.com/install/">install the version of Do
<ol>
<li>
<p>Download the Linux installer from from <a href="https://blockstack.org/install">the browser installation page</a>.</p>
<p>Download the Linux installer from from <a href="https://blockstack.org/install" target="\_blank">the browser installation page</a>.</p>
<p>This downloads a <code class="highlighter-rouge">Blockstack-for-Linux-v0.30.0.sh</code> script to your local drive.</p>
</li>
@ -335,55 +333,49 @@ Blockstack, <a href="https://docs.docker.com/install/">install the version of Do
<li>
<p>Set the executable bit on the file.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>chmod u+x Blockstack-for-Linux-v0.309.0.0.sh
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span>chmod u+x Blockstack-for-Linux-v0.309.0.0.sh
</code></pre></div> </div>
</li>
<li>
<p>Enter the command without any arguments to see the available subcommands.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>sudo ./Blockstack-for-Linux-v0.309.0.0.sh
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span><span class="nb">sudo</span> ./Blockstack-for-Linux-v0.309.0.0.sh
blockstack docker launcher commands:
Install-protocol-handler -&gt; install a protocol handler <span class="k">for </span>blockstack:// links
...
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Use the script to <code class="highlighter-rouge">pull</code> the Blockstack Docker images you need.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>sudo ./Blockstack-for-Linux-v0.309.0.0.sh pull
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span><span class="nb">sudo</span> ./Blockstack-for-Linux-v0.309.0.0.sh pull
</code></pre></div> </div>
<p>Depending on your network speed, this can take some time.</p>
</li>
<li>
<p>Use the <code class="highlighter-rouge">docker image ls</code> command to confirm you have the image.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>sudo docker image Is
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span><span class="nb">sudo </span>docker image Is
REPOSITORY TAG IMAGE ID CREATED
quay.io/blockstack/blockstack-browser v0.30.0 ad05fd844f59 2 days ago
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Install the protocol handler</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span> sudo ./Blockstack-for-Linux-vO.30.0.sh install-protocol-handler

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span> <span class="nb">sudo</span> ./Blockstack-for-Linux-vO.30.0.sh install-protocol-handler

Registering protocol handler
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Start the Blockstack containers.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>sudo ./Blockstack-for-Linux-vO.30.0.sh start
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span><span class="nb">sudo</span> ./Blockstack-for-Linux-vO.30.0.sh start
c3092592e59abe3559fdb49d070a7aa5e99165c7d9f2flla20ecaf4e0dfc2f46

cd92f61ae473d54398da987f5023f5462b29c03f08584ebb3c9fIbb4cd790c69

Registering protocol handler
</code></pre>
</div>
</code></pre></div> </div>
<p>The system launches the Blockstack Browser application for you.</p>
@ -395,9 +387,8 @@ Blockstack, <a href="https://docs.docker.com/install/">install the version of Do
on your system. To display the status of the Blockstack containers, you can use
the <code class="highlighter-rouge">docker container ls</code> command.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo docker container ls --format <span class="s1">'{{.ID}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}\t{{.Names}}'</span>
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">sudo </span>docker container <span class="nb">ls</span> <span class="nt">--format</span> <span class="s1">'{{.ID}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}\t{{.Names}}'</span>
</code></pre></div></div>
<p>Use <code class="highlighter-rouge">./Blockstack-for-Linux-vO.30.0.sh stop</code> to stop the Blockstack Browser and its containers.</p>
@ -459,9 +450,8 @@ your operating system.</p>
<p>From the command line:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>rm -r /Users/moxiegirl/Library/Application<span class="se">\ </span>Support/Blockstack
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>rm <span class="nt">-r</span> /Users/moxiegirl/Library/Application<span class="se">\ </span>Support/Blockstack
</code></pre></div> </div>
</li>
</ol>
@ -495,22 +485,21 @@ but that is not explained here.</p>
<li>
<p>Stop and remove the Docker containers if they are running.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>sudo ./Blockstack-for-Linux-vO.30.0.sh stop
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span><span class="nb">sudo</span> ./Blockstack-for-Linux-vO.30.0.sh stop
stopping the running blockstack-browser containers
69a686799d4f
56fc6189ff97
69a686799d4f
56fc6189ff97
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Remove the associated Blockstack images.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>sudo docker image ls
REPOSITORY TAG IMAGE ID CREATED
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span><span class="nb">sudo </span>docker image <span class="nb">ls
</span>REPOSITORY TAG IMAGE ID CREATED
quay.io/blockstack/blockstack-browser v0.30.0 ad05fd844f59 3 days ago
<span class="nv">$ </span>sudo docker image rm ad05fd844f59

<span class="nv">$ </span><span class="nb">sudo </span>docker image rm ad05fd844f59

Untagged : quay.io/blockstack/blockstack- browser :vO.30.0
Untagged: quay.io/blockstack/blockstack-browser@sha256:b20c9514c56b99398fd4946af39e7537b807e85694943ac3b8807dlb3625833b
Deleted: Sha256:ad05fd844f5948blee06a0a09228df946478393c0a7588cbc65dlb8817f5b34e
@ -518,22 +507,19 @@ but that is not explained here.</p>
Deleted: sha256:54ea2aa7d7d000e7483f299eeca9e5466fa86231f4cd4cld3c3096d97e61c5df
Deleted: sha256:38e61054355adefc3c2de031462114a9946cfc0e44444a38a27d0f115aba0da2
....
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Use the script to remove the protocol handler</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>sudo ./Blockstack-for-Linux-vO.30.0.sh remove-protocol-handler
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span><span class="nb">sudo</span> ./Blockstack-for-Linux-vO.30.0.sh remove-protocol-handler
</code></pre></div> </div>
</li>
<li>
<p>Delete the script.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>rm Blockstack-for-Linux-vO.30.0.sh
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span>rm Blockstack-for-Linux-vO.30.0.sh
</code></pre></div> </div>
</li>
</ol>
@ -541,6 +527,71 @@ but that is not explained here.</p>
<a href="https://twitter.com/intent/tweet?text=Get the Blockstack Browser&url=https://docs.blockstack.org/browser/browser-introduction.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -639,74 +690,6 @@ but that is not explained here.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

143
_site/browser/browser-nav.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Browser Nav | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Browser Nav" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/browser/browser-nav.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/browser/browser-nav.html","headline":"Browser Nav","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/browser-nav.html"},"description":"On this page, you learn more about working with IDs, the Wallet, and Settings.","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/browser/browser-nav.html","headline":"Browser Nav","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/browser-nav.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"On this page, you learn more about working with IDs, the Wallet, and Settings.","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -159,13 +159,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-browser/blob/master/docs/browser-nav.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -187,6 +187,71 @@ the <code class="highlighter-rouge">.blockstack</code> namespace has the <em><co
<a href="https://twitter.com/intent/tweet?text=Browser Nav&url=https://docs.blockstack.org/browser/browser-nav.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -285,74 +350,6 @@ the <code class="highlighter-rouge">.blockstack</code> namespace has the <em><co
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

143
_site/browser/faq_general.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Users Frequently Asked Questions (FAQ) | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Users Frequently Asked Questions (FAQ)" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/browser/faq_general.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/browser/faq_general.html","headline":"Users Frequently Asked Questions (FAQ)","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/faq_general.html"},"description":"Users Frequently Asked Questions (FAQ)","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/browser/faq_general.html","headline":"Users Frequently Asked Questions (FAQ)","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/faq_general.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Users Frequently Asked Questions (FAQ)","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -159,13 +159,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-browser/blob/master/docs/faq_general.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -259,6 +259,71 @@ started with them right away.</p>
<a href="https://twitter.com/intent/tweet?text=Users Frequently Asked Questions (FAQ)&url=https://docs.blockstack.org/browser/faq_general.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -357,74 +422,6 @@ started with them right away.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

300
_site/browser/hello-blockstack.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Hello, Blockstack Tutorial | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Hello, Blockstack Tutorial" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/browser/hello-blockstack.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/browser/hello-blockstack.html","headline":"Hello, Blockstack Tutorial","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/hello-blockstack.html"},"description":"Hello, Blockstack Tutorial","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/browser/hello-blockstack.html","headline":"Hello, Blockstack Tutorial","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/hello-blockstack.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Hello, Blockstack Tutorial","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -116,6 +116,23 @@
<!-- -->
<h5>Introduction</h5>
<ul class="uk-nav uk-nav-default doc-nav">
</ul>
<ul class="uk-nav uk-nav-default doc-nav">
<!-- -->
<li class=""><a href="/develop/dapp_principles.html">Principles of Blockstack applications</a></li>
</ul>
<h5>Try a tutorial</h5>
<ul class="uk-nav uk-nav-default doc-nav">
@ -155,6 +172,23 @@
</ul>
<h5>Application mining</h5>
<ul class="uk-nav uk-nav-default doc-nav">
<!-- -->
<li class=""><a href="/develop/mining_intro.html">Understand app mining</a></li>
<!-- -->
<li class=""><a href="/develop/mining_enroll.html">How to enroll</a></li>
</ul>
<h5>Reference</h5>
<ul class="uk-nav uk-nav-default doc-nav">
@ -165,10 +199,20 @@
<li class=""><a href="/core/faq_developer.html">Developer FAQs</a></li>
<!-- -->
<li class=""><a href="/common/mining_faq.html">Mining FAQ</a></li>
<!-- -->
<li class=""><a href="/common/javascript_ref.html">Blockstack Javascript Reference</a></li>
<!-- -->
<li class=""><a href="/common/core_ref.html">Blockstack CORE API</a></li>
</ul>
<!-- -->
@ -195,13 +239,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-browser/blob/master/docs/hello-blockstack.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -258,10 +302,9 @@ the application, you need to have already registered a Blockstack ID.</p>
<p>The tutorial relies on the <code class="highlighter-rouge">npm</code> dependency manager. Before you begin, verify
you have installed <code class="highlighter-rouge">npm</code> using the <code class="highlighter-rouge">which</code> command to verify.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>which npm
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>which npm
/usr/local/bin/npm
</code></pre>
</div>
</code></pre></div></div>
<p>If you don’t find <code class="highlighter-rouge">npm</code> in your system, <a href="https://www.npmjs.com/get-npm">install
it</a>.</p>
@ -278,16 +321,14 @@ existing projects.</p>
<li>
<p>Install Yeoman.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm install -g yo
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm install <span class="nt">-g</span> yo
</code></pre></div> </div>
</li>
<li>
<p>Install the Blockstack application generator.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm install -g generator-blockstack
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm install <span class="nt">-g</span> generator-blockstack
</code></pre></div> </div>
</li>
</ol>
@ -299,32 +340,29 @@ existing projects.</p>
<li>
<p>Create the <code class="highlighter-rouge">hello-world-tutorial</code> directory.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> mkdir hello-world-tutorial
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> mkdir hello-world-tutorial
</code></pre></div> </div>
</li>
<li>
<p>Change into your new directory.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nb">cd </span>hello-world-tutorial
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nb">cd </span>hello-world-tutorial
</code></pre></div> </div>
</li>
<li>
<p>Use Yeoman and the Blockstack application generator to create your initial <code class="highlighter-rouge">hello-world-tutorial</code> application.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> yo blockstack
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> yo blockstack
</code></pre></div> </div>
<p>You should see several interactive prompts.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>yo blockstack
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span>yo blockstack
_-----_ ╭──────────────────────────╮
| | │ Welcome to the │
|--<span class="o">(</span>o<span class="o">)</span>--| │ Blockstack app │
<span class="sb">`</span>---------´ │ generator! │
|--<span class="o">(</span>o<span class="o">)</span><span class="nt">--</span>| │ Blockstack app │
<span class="sb">`</span><span class="nt">---------</span>´ │ generator! │
<span class="o">(</span> _´U<span class="sb">`</span>_ <span class="o">)</span> ╰──────────────────────────╯
/___A___<span class="se">\ </span> /
| ~ |
@ -332,15 +370,14 @@ existing projects.</p>
´ <span class="sb">`</span> |° ´ Y <span class="sb">`</span>
? Are you ready to build a Blockstack app <span class="k">in </span>React? <span class="o">(</span>Y/n<span class="o">)</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Respond to the prompts to populate the initial app.</p>
<p>After the process completes successfully, you see a prompt similar to the following:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> ...
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> ...
create public/icon-192x192.png
create public/index.html
create public/robots.txt
@ -348,8 +385,7 @@ create public/manifest.json
I<span class="s1">'m all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.
</span></code></pre>
</div>
</span></code></pre></div> </div>
</li>
</ol>
@ -451,9 +487,8 @@ and open your browser ‘http://localhost:5000’. From the root of your new ap
<li>
<p>Start the application server.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm start
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm start
</code></pre></div> </div>
<p>The first time you run it, your system prompts you to accept incoming connections.</p>
@ -514,30 +549,27 @@ in the <code class="highlighter-rouge">public/app.css</code> file. Open this fil
<p>All of the code in the file is wrapped in an event
listener.</p>
<div class="language-js highlighter-rouge"><pre class="highlight"><code><span class="nb">document</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s2">"DOMContentLoaded"</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">document</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s2">"DOMContentLoaded"</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>
<span class="p">})</span>
</code></pre>
</div>
</code></pre></div></div>
<p>This listener that waits until the DOM content is loaded. Then, it creates an auth request and redirects the user to sign in:</p>
<div class="language-js highlighter-rouge"><pre class="highlight"><code><span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="s1">'signin-button'</span><span class="p">).</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s1">'click'</span><span class="p">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="s1">'signin-button'</span><span class="p">).</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s1">'click'</span><span class="p">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="nx">blockstack</span><span class="p">.</span><span class="nx">redirectUserToSignIn</span><span class="p">()</span>
<span class="p">})</span>
</code></pre>
</div>
</code></pre></div></div>
<p>You can find the <code class="highlighter-rouge">redirectUserToSignIn()</code> function is part of the <a href="https://blockstack.github.io/blockstack.js/">Blockstack Javascript documentation</a>. There is also a sign out button handler. This handler deletes the local user data and signs the user out:</p>
<div class="language-js highlighter-rouge"><pre class="highlight"><code><span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="s1">'signout-button'</span><span class="p">).</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s1">'click'</span><span class="p">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="s1">'signout-button'</span><span class="p">).</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s1">'click'</span><span class="p">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="nx">blockstack</span><span class="p">.</span><span class="nx">signUserOut</span><span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">location</span><span class="p">.</span><span class="nx">origin</span><span class="p">)</span>
<span class="p">})</span>
</code></pre>
</div>
</code></pre></div></div>
<p>The handlers are followed by a <code class="highlighter-rouge">showProfile()</code> function for showing the user’s profile:</p>
<div class="language-js highlighter-rouge"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">showProfile</span><span class="p">(</span><span class="nx">profile</span><span class="p">)</span> <span class="p">{</span>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">showProfile</span><span class="p">(</span><span class="nx">profile</span><span class="p">)</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">person</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">blockstack</span><span class="p">.</span><span class="nx">Person</span><span class="p">(</span><span class="nx">profile</span><span class="p">)</span>
<span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="s1">'heading-name'</span><span class="p">).</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="nx">person</span><span class="p">.</span><span class="nx">name</span><span class="p">()</span> <span class="p">?</span> <span class="nx">person</span><span class="p">.</span><span class="nx">name</span><span class="p">()</span> <span class="p">:</span> <span class="s2">"Nameless Person"</span>
<span class="k">if</span><span class="p">(</span><span class="nx">person</span><span class="p">.</span><span class="nx">avatarUrl</span><span class="p">())</span> <span class="p">{</span>
@ -546,8 +578,7 @@ listener.</p>
<span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="s1">'section-1'</span><span class="p">).</span><span class="nx">style</span><span class="p">.</span><span class="nx">display</span> <span class="o">=</span> <span class="s1">'none'</span>
<span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="s1">'section-2'</span><span class="p">).</span><span class="nx">style</span><span class="p">.</span><span class="nx">display</span> <span class="o">=</span> <span class="s1">'block'</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>Each <code class="highlighter-rouge">getElementById()</code> function refers to elemments in the <code class="highlighter-rouge">index.html</code> file.</p>
@ -563,7 +594,7 @@ several states the user can be in:</p>
<p>The application handles these situtations as followed:</p>
<div class="language-js highlighter-rouge"><pre class="highlight"><code><span class="k">if</span> <span class="p">(</span><span class="nx">blockstack</span><span class="p">.</span><span class="nx">isUserSignedIn</span><span class="p">())</span> <span class="p">{</span>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">if</span> <span class="p">(</span><span class="nx">blockstack</span><span class="p">.</span><span class="nx">isUserSignedIn</span><span class="p">())</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">profile</span> <span class="o">=</span> <span class="nx">blockstack</span><span class="p">.</span><span class="nx">loadUserData</span><span class="p">().</span><span class="nx">profile</span>
<span class="nx">showProfile</span><span class="p">(</span><span class="nx">profile</span><span class="p">)</span>
<span class="p">}</span> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="nx">blockstack</span><span class="p">.</span><span class="nx">isSignInPending</span><span class="p">())</span> <span class="p">{</span>
@ -571,8 +602,7 @@ several states the user can be in:</p>
<span class="nb">window</span><span class="p">.</span><span class="nx">location</span> <span class="o">=</span> <span class="nb">window</span><span class="p">.</span><span class="nx">location</span><span class="p">.</span><span class="nx">origin</span>
<span class="p">})</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>When the user is signed in, Blockstack loads the user data from local storage
and displays the profile with the <code class="highlighter-rouge">showProfile()</code> function. When the user has a
@ -585,18 +615,17 @@ user back to the home page.</p>
configurations dictate how the application is displayed in auth views and on
user home screens. The contents are very simple:</p>
<div class="language-json highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Hello, Blockstack"</span><span class="p">,</span><span class="w">
</span><span class="nt">"start_url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"localhost:5000"</span><span class="p">,</span><span class="w">
</span><span class="nt">"description"</span><span class="p">:</span><span class="w"> </span><span class="s2">"A simple demo of Blockstack Auth"</span><span class="p">,</span><span class="w">
</span><span class="nt">"icons"</span><span class="p">:</span><span class="w"> </span><span class="p">[{</span><span class="w">
</span><span class="nt">"src"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://helloblockstack.com/icon-192x192.png"</span><span class="p">,</span><span class="w">
</span><span class="nt">"sizes"</span><span class="p">:</span><span class="w"> </span><span class="s2">"192x192"</span><span class="p">,</span><span class="w">
</span><span class="nt">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"image/png"</span><span class="w">
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="s2">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Hello, Blockstack"</span><span class="p">,</span><span class="w">
</span><span class="s2">"start_url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"localhost:5000"</span><span class="p">,</span><span class="w">
</span><span class="s2">"description"</span><span class="p">:</span><span class="w"> </span><span class="s2">"A simple demo of Blockstack Auth"</span><span class="p">,</span><span class="w">
</span><span class="s2">"icons"</span><span class="p">:</span><span class="w"> </span><span class="p">[{</span><span class="w">
</span><span class="s2">"src"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://helloblockstack.com/icon-192x192.png"</span><span class="p">,</span><span class="w">
</span><span class="s2">"sizes"</span><span class="p">:</span><span class="w"> </span><span class="s2">"192x192"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"image/png"</span><span class="w">
</span><span class="p">}]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</span></code></pre></div></div>
<p>Keep it as is or fill it in with new information that describes your app.</p>
@ -608,16 +637,14 @@ user home screens. The contents are very simple:</p>
<li>
<p>Initialize the application code as a Git repo.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> git init
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> git init
</code></pre></div> </div>
</li>
<li>
<p>Add and commit all of the files:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> git add . <span class="o">&amp;&amp;</span> git commit -m <span class="s2">"first commit"</span>
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> git add <span class="nb">.</span> <span class="o">&amp;&amp;</span> git commit <span class="nt">-m</span> <span class="s2">"first commit"</span>
</code></pre></div> </div>
</li>
<li>
<p>In GitHub, create a <code class="highlighter-rouge">hello-blockstack</code> repository.</p>
@ -627,16 +654,14 @@ user home screens. The contents are very simple:</p>
<p>Make sure to fill in your username:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> git remote add origin git@github.com:YOUR_USERNAME_HERE/hello-blockstack.git
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> git remote add origin git@github.com:YOUR_USERNAME_HERE/hello-blockstack.git
</code></pre></div> </div>
</li>
<li>
<p>Push your new code to the master branch of the remote repo:</p>
<div class="highlighter-rouge"><pre class="highlight"><code> git push origin master
</code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> git push origin master
</code></pre></div> </div>
</li>
</ol>
@ -647,6 +672,71 @@ You’re well on your way to becoming a Blockstack app legend.</p>
<a href="https://twitter.com/intent/tweet?text=Hello, Blockstack Tutorial&url=https://docs.blockstack.org/browser/hello-blockstack.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -745,74 +835,6 @@ You’re well on your way to becoming a Blockstack app legend.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

143
_site/browser/ids-creating.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Working with IDS | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Working with IDS" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/browser/ids-creating.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/browser/ids-creating.html","headline":"Working with IDS","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/ids-creating.html"},"description":"Working with IDS","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/browser/ids-creating.html","headline":"Working with IDS","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/ids-creating.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Working with IDS","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -159,13 +159,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-browser/blob/master/docs/ids-creating.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -212,6 +212,71 @@ unusual.</p>
<a href="https://twitter.com/intent/tweet?text=Working with IDS&url=https://docs.blockstack.org/browser/ids-creating.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -310,74 +375,6 @@ unusual.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

143
_site/browser/ids-introduction.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Get and use a Blockstack ID | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Get and use a Blockstack ID" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/browser/ids-introduction.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/browser/ids-introduction.html","headline":"Get and use a Blockstack ID","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/ids-introduction.html"},"description":"Get and use a Blockstack ID","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/browser/ids-introduction.html","headline":"Get and use a Blockstack ID","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/ids-introduction.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Get and use a Blockstack ID","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -159,13 +159,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-browser/blob/master/docs/ids-introduction.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -416,6 +416,71 @@ recovery key rather than your code to restore your identity.</p>
<a href="https://twitter.com/intent/tweet?text=Get and use a Blockstack ID&url=https://docs.blockstack.org/browser/ids-introduction.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -514,74 +579,6 @@ recovery key rather than your code to restore your identity.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

415
_site/browser/multi-player-storage.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Manage Data with Gaia | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Manage Data with Gaia" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/browser/multi-player-storage.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/browser/multi-player-storage.html","headline":"Manage Data with Gaia","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/multi-player-storage.html"},"description":"Manage Data with Gaia","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/browser/multi-player-storage.html","headline":"Manage Data with Gaia","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/multi-player-storage.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Manage Data with Gaia","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -116,6 +116,23 @@
<!-- -->
<h5>Introduction</h5>
<ul class="uk-nav uk-nav-default doc-nav">
</ul>
<ul class="uk-nav uk-nav-default doc-nav">
<!-- -->
<li class=""><a href="/develop/dapp_principles.html">Principles of Blockstack applications</a></li>
</ul>
<h5>Try a tutorial</h5>
<ul class="uk-nav uk-nav-default doc-nav">
@ -155,6 +172,23 @@
</ul>
<h5>Application mining</h5>
<ul class="uk-nav uk-nav-default doc-nav">
<!-- -->
<li class=""><a href="/develop/mining_intro.html">Understand app mining</a></li>
<!-- -->
<li class=""><a href="/develop/mining_enroll.html">How to enroll</a></li>
</ul>
<h5>Reference</h5>
<ul class="uk-nav uk-nav-default doc-nav">
@ -165,10 +199,20 @@
<li class=""><a href="/core/faq_developer.html">Developer FAQs</a></li>
<!-- -->
<li class=""><a href="/common/mining_faq.html">Mining FAQ</a></li>
<!-- -->
<li class=""><a href="/common/javascript_ref.html">Blockstack Javascript Reference</a></li>
<!-- -->
<li class=""><a href="/common/core_ref.html">Blockstack CORE API</a></li>
</ul>
<!-- -->
@ -195,13 +239,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-browser/blob/master/docs/multi-player-storage.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -259,10 +303,9 @@ the application, you need to have already <a href="ids-introduction.md">register
<p>The tutorial relies on the <code class="highlighter-rouge">npm</code> dependency manager. Before you begin, verify
you have installed <code class="highlighter-rouge">npm</code> using the <code class="highlighter-rouge">which</code> command.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>which npm
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>which npm
/usr/local/bin/npm
</code></pre>
</div>
</code></pre></div></div>
<p>If you don’t find <code class="highlighter-rouge">npm</code> in your system, <a href="https://www.npmjs.com/get-npm">install
it</a>. Finally, if you get stuck at any point
@ -279,16 +322,14 @@ existing projects.</p>
<li>
<p>Install Yeoman.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm install -g yo
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm install <span class="nt">-g</span> yo
</code></pre></div> </div>
</li>
<li>
<p>Install the Blockstack application generator.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm install -g generator-blockstack
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm install <span class="nt">-g</span> generator-blockstack
</code></pre></div> </div>
</li>
</ol>
@ -302,27 +343,24 @@ existing projects.</p>
<li>
<p>Create a the <code class="highlighter-rouge">publik</code> directory.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> mkdir publik
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> mkdir publik
</code></pre></div> </div>
</li>
<li>
<p>Change into your new directory.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nb">cd </span>publik
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nb">cd </span>publik
</code></pre></div> </div>
</li>
<li>
<p>Use Yeoman and the Blockstack application generator to create your initial <code class="highlighter-rouge">publik</code> application.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> yo blockstack:react
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> yo blockstack:react
</code></pre></div> </div>
<p>You should see several interactive prompts.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>yo blockstack:react
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span>yo blockstack:react
? <span class="o">==========================================================================</span>
We<span class="s1">'re constantly looking for ways to make yo better!
May we anonymously report usage statistics to improve the tool over time?
@ -340,27 +378,24 @@ existing projects.</p>
´ ` |° ´ Y `
? Are you ready to build a Blockstack app in React? (Y/n)
</span></code></pre>
</div>
</span></code></pre></div> </div>
</li>
<li>
<p>Respond to the prompts to populate the initial app.</p>
<p>After the process completes successfully, you see a prompt similar to the following:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="o">[</span>fsevents] Success:
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="o">[</span>fsevents] Success:
<span class="s2">"/Users/theuser/repos/publik/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node"</span>
is installed via remote npm notice created a lockfile as package-lock.json.
You should commit this file. added 1060 packages <span class="k">in </span>26.901s
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Run the initial application.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm start
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm start
</code></pre></div> </div>
<p>The system prompts you to accept incoming connections.</p>
@ -404,23 +439,21 @@ stored on Gaia are made visible to others via the <code class="highlighter-rouge
<li>
<p>Locate the <code class="highlighter-rouge">handleSignIn</code> handler method.</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">handleSignIn</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">handleSignIn</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">e</span><span class="p">.</span><span class="nx">preventDefault</span><span class="p">();</span>
<span class="nx">redirectToSignIn</span><span class="p">();</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Modify the method to this:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">handleSignIn</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">handleSignIn</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">e</span><span class="p">.</span><span class="nx">preventDefault</span><span class="p">();</span>
<span class="kr">const</span> <span class="nx">origin</span> <span class="o">=</span> <span class="nb">window</span><span class="p">.</span><span class="nx">location</span><span class="p">.</span><span class="nx">origin</span>
<span class="kd">const</span> <span class="nx">origin</span> <span class="o">=</span> <span class="nb">window</span><span class="p">.</span><span class="nx">location</span><span class="p">.</span><span class="nx">origin</span>
<span class="nx">redirectToSignIn</span><span class="p">(</span><span class="nx">origin</span><span class="p">,</span> <span class="nx">origin</span> <span class="o">+</span> <span class="s1">'/manifest.json'</span><span class="p">,</span> <span class="p">[</span><span class="s1">'store_write'</span><span class="p">,</span> <span class="s1">'publish_data'</span><span class="p">])</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>By default, authentication requests include the <code class="highlighter-rouge">store_write</code> scope which
enables storage. This is what allows you to store information to Gaia.</p>
@ -454,18 +487,17 @@ delete grocery lists.</p>
<p>A single file collection stores items as an array nested inside each grocery
list:</p>
<div class="language-js highlighter-rouge"><pre class="highlight"><code><span class="c1">// grocerylists.json</span>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// grocerylists.json</span>
<span class="p">{</span>
<span class="s2">"3255"</span><span class="err">:</span> <span class="p">{</span>
<span class="s2">"items"</span><span class="err">:</span> <span class="p">[</span>
<span class="s2">"3255"</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">"items"</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">"1 Head of Lettuce"</span><span class="p">,</span>
<span class="s2">"Haralson apples"</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="c1">// ...more lists with items</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>This is conceptually the simplest way to manage grocery lists. When you read a
<code class="highlighter-rouge">/grocerylists.json</code> file with <code class="highlighter-rouge">getFile()</code>, you get back one or more grocery
@ -504,28 +536,26 @@ or remove a grocery list; updating a list has no impact.</p>
<p>The <code class="highlighter-rouge">Person</code> object holds a Blockstack profile. Add <code class="highlighter-rouge">putFile</code>, <code class="highlighter-rouge">getFile</code>,
and <code class="highlighter-rouge">lookupProfile</code> after <code class="highlighter-rouge">Person</code>.</p>
<div class="highlighter-rouge"><pre class="highlight"><code> When you are done, the import statement should look like the following:
</code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> When you are done, the import statement should look like the following:
</code></pre></div> </div>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="kr">import</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="k">import</span> <span class="p">{</span>
<span class="nx">isSignInPending</span><span class="p">,</span>
<span class="nx">loadUserData</span><span class="p">,</span>
<span class="nx">Person</span><span class="p">,</span>
<span class="nx">getFile</span><span class="p">,</span>
<span class="nx">putFile</span><span class="p">,</span>
<span class="nx">lookupProfile</span>
<span class="p">}</span> <span class="nx">from</span> <span class="s1">'blockstack'</span><span class="p">;</span>
</code></pre>
</div>
<span class="p">}</span> <span class="k">from</span> <span class="s1">'blockstack'</span><span class="p">;</span>
</code></pre></div> </div>
</li>
<li>
<p>Replace the <code class="highlighter-rouge">constructor()</code> initial state so that it holds the key properties required by the app.</p>
<p>This code constructs a Blockstack <code class="highlighter-rouge">Person</code> object to hold the profile. Your constructor should look like this:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">constructor</span><span class="p">(</span><span class="nx">props</span><span class="p">)</span> <span class="p">{</span>
<span class="kr">super</span><span class="p">(</span><span class="nx">props</span><span class="p">);</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="kd">constructor</span><span class="p">(</span><span class="nx">props</span><span class="p">)</span> <span class="p">{</span>
<span class="k">super</span><span class="p">(</span><span class="nx">props</span><span class="p">);</span>
<span class="k">this</span><span class="p">.</span><span class="nx">state</span> <span class="o">=</span> <span class="p">{</span>
<span class="na">person</span><span class="p">:</span> <span class="p">{</span>
@ -543,8 +573,7 @@ or remove a grocery list; updating a list has no impact.</p>
<span class="na">isLoading</span><span class="p">:</span> <span class="kc">false</span>
<span class="p">};</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>Locate the <code class="highlighter-rouge">render()</code> method.</li>
<li>
@ -553,10 +582,10 @@ or remove a grocery list; updating a list has no impact.</p>
<p>The following code echos the <code class="highlighter-rouge">person.name</code> and <code class="highlighter-rouge">person.avatarURL</code>
properties from the profile on the display:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="kr">const</span> <span class="p">{</span> <span class="nx">handleSignOut</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">;</span>
<span class="kr">const</span> <span class="p">{</span> <span class="nx">person</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">;</span>
<span class="kr">const</span> <span class="p">{</span> <span class="nx">username</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">;</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="kd">const</span> <span class="p">{</span> <span class="nx">handleSignOut</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">;</span>
<span class="kd">const</span> <span class="p">{</span> <span class="nx">person</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">;</span>
<span class="kd">const</span> <span class="p">{</span> <span class="nx">username</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">;</span>
<span class="k">return</span> <span class="p">(</span>
<span class="o">!</span><span class="nx">isSignInPending</span><span class="p">()</span> <span class="o">&amp;&amp;</span> <span class="nx">person</span> <span class="p">?</span>
@ -569,8 +598,8 @@ or remove a grocery list; updating a list has no impact.</p>
<span class="nx">src</span><span class="o">=</span><span class="p">{</span> <span class="nx">person</span><span class="p">.</span><span class="nx">avatarUrl</span><span class="p">()</span> <span class="p">?</span> <span class="nx">person</span><span class="p">.</span><span class="nx">avatarUrl</span><span class="p">()</span> <span class="p">:</span> <span class="nx">avatarFallbackImage</span> <span class="p">}</span>
<span class="nx">className</span><span class="o">=</span><span class="s2">"img-rounded avatar"</span>
<span class="nx">id</span><span class="o">=</span><span class="s2">"avatar-image"</span>
<span class="sr">/</span><span class="err">&gt;
</span> <span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"username"</span><span class="o">&gt;</span>
<span class="o">/&gt;</span>
<span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"username"</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="nx">h1</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="nx">span</span> <span class="nx">id</span><span class="o">=</span><span class="s2">"heading-name"</span><span class="o">&gt;</span><span class="p">{</span> <span class="nx">person</span><span class="p">.</span><span class="nx">name</span><span class="p">()</span> <span class="p">?</span> <span class="nx">person</span><span class="p">.</span><span class="nx">name</span><span class="p">()</span>
<span class="p">:</span> <span class="s1">'Nameless Person'</span> <span class="p">}</span><span class="o">&lt;</span><span class="sr">/span</span><span class="err">&gt;
@ -590,8 +619,8 @@ or remove a grocery list; updating a list has no impact.</p>
<span class="nx">value</span><span class="o">=</span><span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">.</span><span class="nx">newStatus</span><span class="p">}</span>
<span class="nx">onChange</span><span class="o">=</span><span class="p">{</span><span class="nx">e</span> <span class="o">=&gt;</span> <span class="k">this</span><span class="p">.</span><span class="nx">handleNewStatusChange</span><span class="p">(</span><span class="nx">e</span><span class="p">)}</span>
<span class="nx">placeholder</span><span class="o">=</span><span class="s2">"Enter a status"</span>
<span class="sr">/</span><span class="err">&gt;
</span> <span class="o">&lt;</span><span class="sr">/div</span><span class="err">&gt;
<span class="o">/&gt;</span>
<span class="o">&lt;</span><span class="sr">/div</span><span class="err">&gt;
</span> <span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"col-md-12"</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="nx">button</span>
<span class="nx">className</span><span class="o">=</span><span class="s2">"btn btn-primary btn-lg"</span>
@ -607,8 +636,7 @@ or remove a grocery list; updating a list has no impact.</p>
</span> <span class="o">&lt;</span><span class="sr">/div&gt; : nul</span><span class="err">l
</span> <span class="p">);</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>This code allows the application to post statuses. It also displays the
user’s Blockstack ID. To display this, your app must extract the ID from the
@ -620,19 +648,18 @@ user profile data.</p>
<p>You’ll use the Blockstack <code class="highlighter-rouge">loadUserData()</code> method to access the <code class="highlighter-rouge">username</code>.</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">componentWillMount</span><span class="p">()</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">componentWillMount</span><span class="p">()</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span>
<span class="na">person</span><span class="p">:</span> <span class="k">new</span> <span class="nx">Person</span><span class="p">(</span><span class="nx">loadUserData</span><span class="p">().</span><span class="nx">profile</span><span class="p">),</span>
<span class="na">username</span><span class="p">:</span> <span class="nx">loadUserData</span><span class="p">().</span><span class="nx">username</span>
<span class="p">});</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Add two methods to handle the status input events:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">handleNewStatusChange</span><span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">handleNewStatusChange</span><span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span><span class="na">newStatus</span><span class="p">:</span> <span class="nx">event</span><span class="p">.</span><span class="nx">target</span><span class="p">.</span><span class="nx">value</span><span class="p">})</span>
<span class="p">}</span>
@ -642,13 +669,12 @@ user profile data.</p>
<span class="na">newStatus</span><span class="p">:</span> <span class="s2">""</span>
<span class="p">})</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Add a <code class="highlighter-rouge">saveNewStatus()</code> method to save the new statuses.</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">saveNewStatus</span><span class="p">(</span><span class="nx">statusText</span><span class="p">)</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">saveNewStatus</span><span class="p">(</span><span class="nx">statusText</span><span class="p">)</span> <span class="p">{</span>
<span class="kd">let</span> <span class="nx">statuses</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">.</span><span class="nx">statuses</span>
<span class="kd">let</span> <span class="nx">status</span> <span class="o">=</span> <span class="p">{</span>
@ -658,7 +684,7 @@ user profile data.</p>
<span class="p">}</span>
<span class="nx">statuses</span><span class="p">.</span><span class="nx">unshift</span><span class="p">(</span><span class="nx">status</span><span class="p">)</span>
<span class="kr">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="na">encrypt</span><span class="p">:</span> <span class="kc">false</span> <span class="p">}</span>
<span class="kd">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="na">encrypt</span><span class="p">:</span> <span class="kc">false</span> <span class="p">}</span>
<span class="nx">putFile</span><span class="p">(</span><span class="s1">'statuses.json'</span><span class="p">,</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">statuses</span><span class="p">),</span> <span class="nx">options</span><span class="p">)</span>
<span class="p">.</span><span class="nx">then</span><span class="p">(()</span> <span class="o">=&gt;</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span>
@ -666,8 +692,7 @@ user profile data.</p>
<span class="p">})</span>
<span class="p">})</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Save the <code class="highlighter-rouge">Profile.jsk</code> file.</p>
@ -694,7 +719,7 @@ the statuses back to the user as a blog entry.</p>
<li>
<p>Right after this opening <code class="highlighter-rouge">div</code> element, add this block.</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"col-md-12 statuses"</span><span class="o">&gt;</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"col-md-12 statuses"</span><span class="o">&gt;</span>
<span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">.</span><span class="nx">isLoading</span> <span class="o">&amp;&amp;</span> <span class="o">&lt;</span><span class="nx">span</span><span class="o">&gt;</span><span class="nx">Loading</span><span class="p">...</span><span class="o">&lt;</span><span class="sr">/span&gt;</span><span class="err">}
</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">.</span><span class="nx">statuses</span><span class="p">.</span><span class="nx">map</span><span class="p">((</span><span class="nx">status</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="p">(</span>
<span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"status"</span> <span class="nx">key</span><span class="o">=</span><span class="p">{</span><span class="nx">status</span><span class="p">.</span><span class="nx">id</span><span class="p">}</span><span class="o">&gt;</span>
@ -703,17 +728,16 @@ the statuses back to the user as a blog entry.</p>
</span> <span class="p">)</span>
<span class="p">)}</span>
<span class="o">&lt;</span><span class="sr">/div</span><span class="err">&gt;
</span></code></pre>
</div>
</span></code></pre></div> </div>
<p>This loads existing state. Your code needs to fetch statuses on page load.</p>
</li>
<li>
<p>Add a new method called <code class="highlighter-rouge">fetchData()</code> after the <code class="highlighter-rouge">statuses.unshift(status)</code> section.</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
<span class="nx">fetchData</span><span class="p">()</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span> <span class="na">isLoading</span><span class="p">:</span> <span class="kc">true</span> <span class="p">})</span>
<span class="kr">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="na">decrypt</span><span class="p">:</span> <span class="kc">false</span> <span class="p">}</span>
<span class="kd">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="na">decrypt</span><span class="p">:</span> <span class="kc">false</span> <span class="p">}</span>
<span class="nx">getFile</span><span class="p">(</span><span class="s1">'statuses.json'</span><span class="p">,</span> <span class="nx">options</span><span class="p">)</span>
<span class="p">.</span><span class="nx">then</span><span class="p">((</span><span class="nx">file</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">statuses</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">file</span> <span class="o">||</span> <span class="s1">'[]'</span><span class="p">)</span>
@ -728,18 +752,16 @@ the statuses back to the user as a blog entry.</p>
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span> <span class="na">isLoading</span><span class="p">:</span> <span class="kc">false</span> <span class="p">})</span>
<span class="p">})</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Call <code class="highlighter-rouge">fetchData()</code> from the <code class="highlighter-rouge">componentDidMount()</code> method</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
<span class="nx">componentDidMount</span><span class="p">()</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">fetchData</span><span class="p">()</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Save the file.</p>
@ -758,7 +780,7 @@ the statuses back to the user as a blog entry.</p>
<li>
<p>Replace the content with the following:</p>
<div class="language-css highlighter-rouge"><pre class="highlight"><code> <span class="c">/* Globals */</span>
<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="c">/* Globals */</span>
<span class="nt">a</span><span class="o">,</span><span class="nt">a</span><span class="nd">:focus</span><span class="o">,</span><span class="nt">a</span><span class="nd">:hover</span><span class="p">{</span><span class="nl">color</span><span class="p">:</span><span class="m">#fff</span><span class="p">;}</span>
<span class="nt">html</span><span class="o">,</span><span class="nt">body</span><span class="p">{</span><span class="nl">height</span><span class="p">:</span><span class="m">100%</span><span class="p">;</span><span class="nl">text-align</span><span class="p">:</span><span class="nb">center</span><span class="p">;</span><span class="nl">background-color</span><span class="p">:</span><span class="m">#191b22</span><span class="p">;}</span>
<span class="nt">body</span><span class="p">{</span><span class="nl">color</span><span class="p">:</span><span class="m">#fff</span><span class="p">}</span>
@ -793,8 +815,7 @@ the statuses back to the user as a blog entry.</p>
<span class="c">/* Statuses */</span>
<span class="nc">.statuses</span><span class="p">{</span><span class="nl">padding-top</span><span class="p">:</span><span class="m">30px</span><span class="p">;}</span>
<span class="nc">.status</span><span class="p">{</span><span class="nl">margin</span><span class="p">:</span><span class="m">15px</span> <span class="m">0px</span><span class="p">;</span><span class="nl">padding</span><span class="p">:</span><span class="m">20px</span><span class="p">;</span><span class="nl">background-color</span><span class="p">:</span><span class="m">#2e2e2e</span><span class="p">;</span><span class="nl">border-radius</span><span class="p">:</span><span class="m">6px</span><span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Save and close the <code class="highlighter-rouge">src/styles/style.css</code> file.</p>
@ -826,49 +847,44 @@ other users’ profiles by visiting <code class="highlighter-rouge">http://local
<li>
<p>Install <code class="highlighter-rouge">react-router</code>:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm install --save react-router-dom
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm install <span class="nt">--save</span> react-router-dom
</code></pre></div> </div>
</li>
<li>Edit <code class="highlighter-rouge">src/index.js</code> file.</li>
<li>
<p>Add an <code class="highlighter-rouge">import</code> to the file at the top:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="kr">import</span> <span class="p">{</span> <span class="nx">BrowserRouter</span> <span class="p">}</span> <span class="nx">from</span> <span class="s1">'react-router-dom'</span>
</code></pre>
</div>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="k">import</span> <span class="p">{</span> <span class="nx">BrowserRouter</span> <span class="p">}</span> <span class="k">from</span> <span class="s1">'react-router-dom'</span>
</code></pre></div> </div>
</li>
<li>
<p>Change the <code class="highlighter-rouge">ReactDOM.render()</code> method in <code class="highlighter-rouge">src/index.js</code> to:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">render</span><span class="p">((</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">render</span><span class="p">((</span>
<span class="o">&lt;</span><span class="nx">BrowserRouter</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="nx">App</span> <span class="o">/&gt;</span>
<span class="o">&lt;</span><span class="sr">/BrowserRouter</span><span class="err">&gt;
</span> <span class="p">),</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="s1">'root'</span><span class="p">));</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>Save and close the <code class="highlighter-rouge">src/index.js</code> file.</li>
<li>Edit the <code class="highlighter-rouge">src/components/App.jsx</code> file.</li>
<li>
<p>Add the new route by importing the <code class="highlighter-rouge">Switch</code> and <code class="highlighter-rouge">Route</code> components from <code class="highlighter-rouge">react-router-dom</code>:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="kr">import</span> <span class="p">{</span> <span class="nx">Switch</span><span class="p">,</span> <span class="nx">Route</span> <span class="p">}</span> <span class="nx">from</span> <span class="s1">'react-router-dom'</span>
</code></pre>
</div>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="k">import</span> <span class="p">{</span> <span class="nx">Switch</span><span class="p">,</span> <span class="nx">Route</span> <span class="p">}</span> <span class="k">from</span> <span class="s1">'react-router-dom'</span>
</code></pre></div> </div>
</li>
<li>
<p>Locate this line below in the <code class="highlighter-rouge">render()</code> method:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="err">:</span> <span class="o">&lt;</span><span class="nx">Profile</span> <span class="nx">handleSignOut</span><span class="o">=</span><span class="p">{</span> <span class="k">this</span><span class="p">.</span><span class="nx">handleSignOut</span> <span class="p">}</span> <span class="sr">/</span><span class="err">&gt;
</span></code></pre>
</div>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="p">:</span> <span class="o">&lt;</span><span class="nx">Profile</span> <span class="nx">handleSignOut</span><span class="o">=</span><span class="p">{</span> <span class="k">this</span><span class="p">.</span><span class="nx">handleSignOut</span> <span class="p">}</span> <span class="sr">/</span><span class="err">&gt;
</span></code></pre></div> </div>
</li>
<li>
<p>Replace it with the following:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="err">:</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="p">:</span>
<span class="o">&lt;</span><span class="nx">Switch</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="nx">Route</span>
<span class="nx">path</span><span class="o">=</span><span class="s1">'/:username?'</span>
@ -877,8 +893,7 @@ other users’ profiles by visiting <code class="highlighter-rouge">http://local
</span> <span class="p">}</span>
<span class="sr">/</span><span class="err">&gt;
</span> <span class="o">&lt;</span><span class="sr">/Switch</span><span class="err">&gt;
</span></code></pre>
</div>
</span></code></pre></div> </div>
<p>This sets up a route and captures the route parameter the app will use as the profile lookup username.</p>
</li>
@ -897,18 +912,16 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<li>
<p>Open <code class="highlighter-rouge">webpack.config.js</code> in the root project directory and locate the following line:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">historyApiFallback</span><span class="err">:</span> <span class="kc">true</span><span class="p">,</span>
</code></pre>
</div>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">historyApiFallback</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
</code></pre></div> </div>
</li>
<li>
<p>Replace it with this:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">historyApiFallback</span><span class="err">:</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">historyApiFallback</span><span class="p">:</span> <span class="p">{</span>
<span class="nl">disableDotRule</span><span class="p">:</span> <span class="kc">true</span>
<span class="p">},</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>You will need to run <code class="highlighter-rouge">npm start</code> again for this change to take effect. Don’t
worry, there is a later step for that to remind you.</p>
@ -920,21 +933,20 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<li>
<p>Add a single method that determines if the app is viewing the local user’s profile or another user’s profile.</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">isLocal</span><span class="p">()</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">isLocal</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">.</span><span class="nx">match</span><span class="p">.</span><span class="nx">params</span><span class="p">.</span><span class="nx">username</span> <span class="p">?</span> <span class="kc">false</span> <span class="p">:</span> <span class="kc">true</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>You use <code class="highlighter-rouge">isLocal()</code> to check if the user is viewing the local user profile or another user’s profile. If it’s the local user profile, the app runs the <code class="highlighter-rouge">getFile()</code> function you added in an earlier step. Otherwise, the app looks up the profile belonging to the <code class="highlighter-rouge">username</code> using the <code class="highlighter-rouge">lookupProfile()</code> method.</p>
</li>
<li>
<p>Modify the <code class="highlighter-rouge">fetchData()</code> method like so:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">fetchData</span><span class="p">()</span> <span class="p">{</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">fetchData</span><span class="p">()</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span> <span class="na">isLoading</span><span class="p">:</span> <span class="kc">true</span> <span class="p">})</span>
<span class="k">if</span> <span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">isLocal</span><span class="p">())</span> <span class="p">{</span>
<span class="kr">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="na">decrypt</span><span class="p">:</span> <span class="kc">false</span> <span class="p">}</span>
<span class="kd">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="na">decrypt</span><span class="p">:</span> <span class="kc">false</span> <span class="p">}</span>
<span class="nx">getFile</span><span class="p">(</span><span class="s1">'statuses.json'</span><span class="p">,</span> <span class="nx">options</span><span class="p">)</span>
<span class="p">.</span><span class="nx">then</span><span class="p">((</span><span class="nx">file</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">statuses</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">file</span> <span class="o">||</span> <span class="s1">'[]'</span><span class="p">)</span>
@ -949,7 +961,7 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span> <span class="na">isLoading</span><span class="p">:</span> <span class="kc">false</span> <span class="p">})</span>
<span class="p">})</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="kr">const</span> <span class="nx">username</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">.</span><span class="nx">match</span><span class="p">.</span><span class="nx">params</span><span class="p">.</span><span class="nx">username</span>
<span class="kd">const</span> <span class="nx">username</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">.</span><span class="nx">match</span><span class="p">.</span><span class="nx">params</span><span class="p">.</span><span class="nx">username</span>
<span class="nx">lookupProfile</span><span class="p">(</span><span class="nx">username</span><span class="p">)</span>
<span class="p">.</span><span class="nx">then</span><span class="p">((</span><span class="nx">profile</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="p">{</span>
@ -963,8 +975,7 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<span class="p">})</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
<p><strong>NOTE</strong>: For <code class="highlighter-rouge">https</code> deployments, the default Blockstack Core API endpoint for name
lookups should be changed to point to a core API served over <code class="highlighter-rouge">https</code>.
@ -976,7 +987,7 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<li>
<p>Add the following block to <code class="highlighter-rouge">fetchData()</code> right after the call to <code class="highlighter-rouge">lookupProfile(username)... catch((error)=&gt;{..}</code> block:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="kr">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="na">username</span><span class="p">:</span> <span class="nx">username</span><span class="p">,</span> <span class="na">decrypt</span><span class="p">:</span> <span class="kc">false</span> <span class="p">}</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="kd">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span> <span class="na">username</span><span class="p">:</span> <span class="nx">username</span><span class="p">,</span> <span class="na">decrypt</span><span class="p">:</span> <span class="kc">false</span> <span class="p">}</span>
<span class="nx">getFile</span><span class="p">(</span><span class="s1">'statuses.json'</span><span class="p">,</span> <span class="nx">options</span><span class="p">)</span>
<span class="p">.</span><span class="nx">then</span><span class="p">((</span><span class="nx">file</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">statuses</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">file</span> <span class="o">||</span> <span class="s1">'[]'</span><span class="p">)</span>
@ -991,8 +1002,7 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<span class="p">.</span><span class="k">finally</span><span class="p">(()</span> <span class="o">=&gt;</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">setState</span><span class="p">({</span> <span class="na">isLoading</span><span class="p">:</span> <span class="kc">false</span> <span class="p">})</span>
<span class="p">})</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>This fetches the user statuses.</p>
@ -1001,10 +1011,10 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<li>
<p>Replace the <code class="highlighter-rouge">render()</code> method with the following:</p>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code> <span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="kr">const</span> <span class="p">{</span> <span class="nx">handleSignOut</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">;</span>
<span class="kr">const</span> <span class="p">{</span> <span class="nx">person</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">;</span>
<span class="kr">const</span> <span class="p">{</span> <span class="nx">username</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">;</span>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">render</span><span class="p">()</span> <span class="p">{</span>
<span class="kd">const</span> <span class="p">{</span> <span class="nx">handleSignOut</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">;</span>
<span class="kd">const</span> <span class="p">{</span> <span class="nx">person</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">;</span>
<span class="kd">const</span> <span class="p">{</span> <span class="nx">username</span> <span class="p">}</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">;</span>
<span class="k">return</span> <span class="p">(</span>
<span class="o">!</span><span class="nx">isSignInPending</span><span class="p">()</span> <span class="o">&amp;&amp;</span> <span class="nx">person</span> <span class="p">?</span>
@ -1017,8 +1027,8 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<span class="nx">src</span><span class="o">=</span><span class="p">{</span> <span class="nx">person</span><span class="p">.</span><span class="nx">avatarUrl</span><span class="p">()</span> <span class="p">?</span> <span class="nx">person</span><span class="p">.</span><span class="nx">avatarUrl</span><span class="p">()</span> <span class="p">:</span> <span class="nx">avatarFallbackImage</span> <span class="p">}</span>
<span class="nx">className</span><span class="o">=</span><span class="s2">"img-rounded avatar"</span>
<span class="nx">id</span><span class="o">=</span><span class="s2">"avatar-image"</span>
<span class="sr">/</span><span class="err">&gt;
</span> <span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"username"</span><span class="o">&gt;</span>
<span class="o">/&gt;</span>
<span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"username"</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="nx">h1</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="nx">span</span> <span class="nx">id</span><span class="o">=</span><span class="s2">"heading-name"</span><span class="o">&gt;</span><span class="p">{</span> <span class="nx">person</span><span class="p">.</span><span class="nx">name</span><span class="p">()</span> <span class="p">?</span> <span class="nx">person</span><span class="p">.</span><span class="nx">name</span><span class="p">()</span>
<span class="p">:</span> <span class="s1">'Nameless Person'</span> <span class="p">}</span><span class="o">&lt;</span><span class="sr">/span</span><span class="err">&gt;
@ -1040,8 +1050,8 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<span class="nx">value</span><span class="o">=</span><span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">state</span><span class="p">.</span><span class="nx">newStatus</span><span class="p">}</span>
<span class="nx">onChange</span><span class="o">=</span><span class="p">{</span><span class="nx">e</span> <span class="o">=&gt;</span> <span class="k">this</span><span class="p">.</span><span class="nx">handleNewStatusChange</span><span class="p">(</span><span class="nx">e</span><span class="p">)}</span>
<span class="nx">placeholder</span><span class="o">=</span><span class="s2">"What's on your mind?"</span>
<span class="sr">/</span><span class="err">&gt;
</span> <span class="o">&lt;</span><span class="sr">/div</span><span class="err">&gt;
<span class="o">/&gt;</span>
<span class="o">&lt;</span><span class="sr">/div</span><span class="err">&gt;
</span> <span class="o">&lt;</span><span class="nx">div</span> <span class="nx">className</span><span class="o">=</span><span class="s2">"col-md-12 text-right"</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="nx">button</span>
<span class="nx">className</span><span class="o">=</span><span class="s2">"btn btn-primary btn-lg"</span>
@ -1066,10 +1076,9 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
</span> <span class="o">&lt;</span><span class="sr">/div&gt; : nul</span><span class="err">l
</span> <span class="p">);</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>### This checks to ensure that users are viewing their own profile, by wrapping the <strong>Logout</strong> button and inputs with the <code class="highlighter-rouge"><span class="p">{</span><span class="err">isLocal()</span><span class="w"> </span><span class="err">&amp;&amp;</span><span class="w"> </span><span class="err">...</span><span class="p">}</span></code> condition.</p>
<p>### This checks to ensure that users are viewing their own profile, by wrapping the <strong>Logout</strong> button and inputs with the <code class="highlighter-rouge">{isLocal() &amp;&amp; ...}</code> condition.</p>
</li>
</ol>
@ -1080,9 +1089,8 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<li>
<p>Restart the application so that the disabling of the <code class="highlighter-rouge">.</code> (dot) rule takes effect.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm start
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm start
</code></pre></div> </div>
</li>
<li>Point your browser to <code class="highlighter-rouge">http://localhost:8080/your_blockstack.id</code> to see the final application.</li>
</ol>
@ -1097,6 +1105,71 @@ about Blockstack. To use a working version of the app go
<a href="https://twitter.com/intent/tweet?text=Manage Data with Gaia&url=https://docs.blockstack.org/browser/multi-player-storage.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -1195,74 +1268,6 @@ about Blockstack. To use a working version of the app go
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

143
_site/browser/purchase-id.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Purchase your own domain ID | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Purchase your own domain ID" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/browser/purchase-id.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/browser/purchase-id.html","headline":"Purchase your own domain ID","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/purchase-id.html"},"description":"Purchase your own domain ID","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/browser/purchase-id.html","headline":"Purchase your own domain ID","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/purchase-id.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Purchase your own domain ID","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -159,13 +159,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-browser/blob/master/docs/purchase-id.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -199,6 +199,71 @@ consequat. Aliquam hendrerit a neque id tempor. Sed porta id ligula in iaculis.<
<a href="https://twitter.com/intent/tweet?text=Purchase your own domain ID&url=https://docs.blockstack.org/browser/purchase-id.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -297,74 +362,6 @@ consequat. Aliquam hendrerit a neque id tempor. Sed porta id ligula in iaculis.<
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

321
_site/browser/todo-list.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Todo List Application Tutorial | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Todo List Application Tutorial" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/browser/todo-list.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/browser/todo-list.html","headline":"Todo List Application Tutorial","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/todo-list.html"},"description":"Todo List Application Tutorial","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/browser/todo-list.html","headline":"Todo List Application Tutorial","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/browser/todo-list.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Todo List Application Tutorial","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -116,6 +116,23 @@
<!-- -->
<h5>Introduction</h5>
<ul class="uk-nav uk-nav-default doc-nav">
</ul>
<ul class="uk-nav uk-nav-default doc-nav">
<!-- -->
<li class=""><a href="/develop/dapp_principles.html">Principles of Blockstack applications</a></li>
</ul>
<h5>Try a tutorial</h5>
<ul class="uk-nav uk-nav-default doc-nav">
@ -155,6 +172,23 @@
</ul>
<h5>Application mining</h5>
<ul class="uk-nav uk-nav-default doc-nav">
<!-- -->
<li class=""><a href="/develop/mining_intro.html">Understand app mining</a></li>
<!-- -->
<li class=""><a href="/develop/mining_enroll.html">How to enroll</a></li>
</ul>
<h5>Reference</h5>
<ul class="uk-nav uk-nav-default doc-nav">
@ -165,10 +199,20 @@
<li class=""><a href="/core/faq_developer.html">Developer FAQs</a></li>
<!-- -->
<li class=""><a href="/common/mining_faq.html">Mining FAQ</a></li>
<!-- -->
<li class=""><a href="/common/javascript_ref.html">Blockstack Javascript Reference</a></li>
<!-- -->
<li class=""><a href="/common/core_ref.html">Blockstack CORE API</a></li>
</ul>
<!-- -->
@ -195,13 +239,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-browser/blob/master/docs/todo-list.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -225,7 +269,7 @@ with that ID using Blockstack Storage (Gaia).</p>
<li><a href="#summary" id="markdown-toc-summary">Summary</a></li>
</ul>
<p>If you prefer a video, you can view <a href="https://www.youtube.com/embed/oyvg-h0obFw">a video of the tutorial</a>.</p>
<p>If you prefer a video, you can view <a href="https://www.youtube.com/embed/oyvg-h0obFw" target="\_blank">a video of the tutorial</a>.</p>
<h2 id="about-this-tutorial-and-the-prerequisites-you-need">About this tutorial and the prerequisites you need</h2>
<p>For this tutorial, we will use the following tools:</p>
@ -251,10 +295,9 @@ with that ID using Blockstack Storage (Gaia).</p>
<p>The tutorial relies on the <code class="highlighter-rouge">npm</code> dependency manager. Before you begin, verify you have installed <code class="highlighter-rouge">npm</code> using the <code class="highlighter-rouge">which</code> command to verify.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>which npm
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>which npm
/usr/local/bin/npm
</code></pre>
</div>
</code></pre></div></div>
<p>If you don’t find <code class="highlighter-rouge">npm</code> in your system, <a href="https://www.npmjs.com/get-npm">install it</a>.</p>
<p>Finally, make sure you have <a href="{site.baseurl}}/browser/ids-introduction.html#create-an-initial-blockstack-id">created at least one Blockstack ID</a>.
@ -271,21 +314,19 @@ These instructions assume you are cloning.</p>
<li>
<p>Install the code by cloning it.</p>
<div class="highlighter-rouge"><pre class="highlight"><code> $ git clone git@github.com:blockstack/blockstack-todos.git
</code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> $ git clone git@github.com:blockstack/blockstack-todos.git
</code></pre></div> </div>
</li>
<li>
<p>Change to directory to the root of the code.</p>
<div class="highlighter-rouge"><pre class="highlight"><code> $ cd blockstack-todos
</code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> $ cd blockstack-todos
</code></pre></div> </div>
</li>
<li>
<p>Use <code class="highlighter-rouge">yarn</code> to install the dependencies.</p>
<div class="highlighter-rouge"><pre class="highlight"><code> $ yarn install
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> $ yarn install
yarn install v1.9.2
info No lockfile found.
...
@ -293,8 +334,7 @@ These instructions assume you are cloning.</p>
[5/5] 📃 Building fresh packages...
success Saved lockfile.
✨ Done in 19.90s.
</code></pre>
</div>
</code></pre></div> </div>
</li>
</ol>
@ -335,17 +375,15 @@ These instructions assume you are cloning.</p>
<li>
<p>Make sure you are in the root of the code base.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span><span class="nb">pwd</span> /Users/moxiegirl/repos/blockstack-todos
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span><span class="nb">pwd</span> /Users/moxiegirl/repos/blockstack-todos
Start the application.
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Start the application.</p>
<div class="highlighter-rouge"><pre class="highlight"><code> $ npm run start
</code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> $ npm run start
</code></pre></div> </div>
<p>You should see a simple application:</p>
@ -391,26 +429,25 @@ parameter:</p>
<p>The output should look similar to below:</p>
<div class="language-json highlighter-rouge"><pre class="highlight"><code><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nt">"jti"</span><span class="p">:</span><span class="w"> </span><span class="s2">"3i96e3ad-0626-4e32-a316-b243154212e2"</span><span class="p">,</span><span class="w">
</span><span class="nt">"iat"</span><span class="p">:</span><span class="w"> </span><span class="mi">1533136622</span><span class="p">,</span><span class="w">
</span><span class="nt">"exp"</span><span class="p">:</span><span class="w"> </span><span class="mi">1533140228</span><span class="p">,</span><span class="w">
</span><span class="nt">"iss"</span><span class="p">:</span><span class="w"> </span><span class="s2">"did:btc-addr:1Nh8oQTunbEQWjrL666HBx2qMc81puLmMt"</span><span class="p">,</span><span class="w">
</span><span class="nt">"public_keys"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"jti"</span><span class="p">:</span><span class="w"> </span><span class="s2">"3i96e3ad-0626-4e32-a316-b243154212e2"</span><span class="p">,</span><span class="w">
</span><span class="s2">"iat"</span><span class="p">:</span><span class="w"> </span><span class="mi">1533136622</span><span class="p">,</span><span class="w">
</span><span class="s2">"exp"</span><span class="p">:</span><span class="w"> </span><span class="mi">1533140228</span><span class="p">,</span><span class="w">
</span><span class="s2">"iss"</span><span class="p">:</span><span class="w"> </span><span class="s2">"did:btc-addr:1Nh8oQTunbEQWjrL666HBx2qMc81puLmMt"</span><span class="p">,</span><span class="w">
</span><span class="s2">"public_keys"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
</span><span class="s2">"0362173da080c6e1dec0653fa9a3eff5f5660546e387ce6c24u04a90c2fe1fdu73"</span><span class="w">
</span><span class="p">],</span><span class="w">
</span><span class="nt">"domain_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://localhost:8080"</span><span class="p">,</span><span class="w">
</span><span class="nt">"manifest_uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://localhost:8080/manifest.json"</span><span class="p">,</span><span class="w">
</span><span class="nt">"redirect_uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://localhost:8080/"</span><span class="p">,</span><span class="w">
</span><span class="nt">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1.2.0"</span><span class="p">,</span><span class="w">
</span><span class="nt">"do_not_include_profile"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
</span><span class="nt">"supports_hub_url"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
</span><span class="nt">"scopes"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
</span><span class="s2">"domain_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://localhost:8080"</span><span class="p">,</span><span class="w">
</span><span class="s2">"manifest_uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://localhost:8080/manifest.json"</span><span class="p">,</span><span class="w">
</span><span class="s2">"redirect_uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://localhost:8080/"</span><span class="p">,</span><span class="w">
</span><span class="s2">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1.2.0"</span><span class="p">,</span><span class="w">
</span><span class="s2">"do_not_include_profile"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
</span><span class="s2">"supports_hub_url"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
</span><span class="s2">"scopes"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
</span><span class="s2">"store_write"</span><span class="w">
</span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</span></code></pre></div> </div>
<blockquote>
<p><strong>Note</strong>:</p>
@ -460,16 +497,15 @@ in and sign out is handled in each of these files:</p>
<p>The <code class="highlighter-rouge">src/components/Landing.vue</code> code calls a <a href="https://blockstack.github.io/blockstack.js#redirectToSignIn"><code class="highlighter-rouge">redirectToSignIn()</code></a> function which generates the <code class="highlighter-rouge">authRequest</code> and redirects the user to the Blockstack authenticator:</p>
<div class="language-js highlighter-rouge"><pre class="highlight"><code><span class="nx">signIn</span> <span class="p">()</span> <span class="p">{</span>
<span class="kr">const</span> <span class="nx">blockstack</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">blockstack</span>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">signIn</span> <span class="p">()</span> <span class="p">{</span>
<span class="kd">const</span> <span class="nx">blockstack</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">blockstack</span>
<span class="nx">blockstack</span><span class="p">.</span><span class="nx">redirectToSignIn</span><span class="p">()</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>Once the user authenticates, the application handles the <code class="highlighter-rouge">authResponse</code> in the <code class="highlighter-rouge">src/App.vue</code> file. :</p>
<div class="language-js highlighter-rouge"><pre class="highlight"><code><span class="k">if</span> <span class="p">(</span><span class="nx">blockstack</span><span class="p">.</span><span class="nx">isUserSignedIn</span><span class="p">())</span> <span class="p">{</span>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">if</span> <span class="p">(</span><span class="nx">blockstack</span><span class="p">.</span><span class="nx">isUserSignedIn</span><span class="p">())</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">user</span> <span class="o">=</span> <span class="nx">blockstack</span><span class="p">.</span><span class="nx">loadUserData</span><span class="p">().</span><span class="nx">profile</span>
<span class="p">}</span> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="nx">blockstack</span><span class="p">.</span><span class="nx">isSignInPending</span><span class="p">())</span> <span class="p">{</span>
<span class="nx">blockstack</span><span class="p">.</span><span class="nx">handlePendingSignIn</span><span class="p">()</span>
@ -477,18 +513,16 @@ in and sign out is handled in each of these files:</p>
<span class="nb">window</span><span class="p">.</span><span class="nx">location</span> <span class="o">=</span> <span class="nb">window</span><span class="p">.</span><span class="nx">location</span><span class="p">.</span><span class="nx">origin</span>
<span class="p">})</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>If <a href="https://blockstack.github.io/blockstack.js/#isusersignedin"><code class="highlighter-rouge">blockstack.isUserSignedIn()</code></a> is true, the user was previously signed in so Blockstack pulls the data from the browser and uses it in our application. If the check on <a href="https://blockstack.github.io/blockstack.js/#issigninpending"><code class="highlighter-rouge">blockstack.isSignInPending()</code></a> is true, a previous <code class="highlighter-rouge">authResponse</code> was sent to the application but hasn’t been processed yet. The <code class="highlighter-rouge">handlePendingSignIn()</code> function processes any pending sign in.</p>
<p>Signout is handled in <code class="highlighter-rouge">src/components/Dashboard.vue</code>.</p>
<div class="language-js highlighter-rouge"><pre class="highlight"><code><span class="nx">signOut</span> <span class="p">()</span> <span class="p">{</span>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">signOut</span> <span class="p">()</span> <span class="p">{</span>
<span class="k">this</span><span class="p">.</span><span class="nx">blockstack</span><span class="p">.</span><span class="nx">signUserOut</span><span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">location</span><span class="p">.</span><span class="nx">href</span><span class="p">)</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>The method allows the application creator to decide where to redirect the user upon Sign Out:</p>
@ -509,44 +543,42 @@ command:</p>
<p>You should see a JSON with the todos you just added:</p>
<div class="language-json highlighter-rouge"><pre class="highlight"><code><span class="p">[</span><span class="w">
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nt">"id"</span><span class="p">:</span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="nt">"text"</span><span class="p">:</span><span class="s2">"Software package manager secured by the blockchain"</span><span class="p">,</span><span class="w">
</span><span class="nt">"completed"</span><span class="p">:</span><span class="kc">false</span><span class="w">
</span><span class="s2">"id"</span><span class="p">:</span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="s2">"text"</span><span class="p">:</span><span class="s2">"Software package manager secured by the blockchain"</span><span class="p">,</span><span class="w">
</span><span class="s2">"completed"</span><span class="p">:</span><span class="kc">false</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nt">"id"</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w">
</span><span class="nt">"text"</span><span class="p">:</span><span class="s2">"Mutable torrents with human readable names"</span><span class="p">,</span><span class="w">
</span><span class="nt">"completed"</span><span class="p">:</span><span class="kc">false</span><span class="w">
</span><span class="s2">"id"</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w">
</span><span class="s2">"text"</span><span class="p">:</span><span class="s2">"Mutable torrents with human readable names"</span><span class="p">,</span><span class="w">
</span><span class="s2">"completed"</span><span class="p">:</span><span class="kc">false</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nt">"id"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="nt">"text"</span><span class="p">:</span><span class="s2">"Decentralized twitter"</span><span class="p">,</span><span class="w">
</span><span class="nt">"completed"</span><span class="p">:</span><span class="kc">false</span><span class="w">
</span><span class="s2">"id"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="s2">"text"</span><span class="p">:</span><span class="s2">"Decentralized twitter"</span><span class="p">,</span><span class="w">
</span><span class="s2">"completed"</span><span class="p">:</span><span class="kc">false</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span></code></pre>
</div>
</span></code></pre></div></div>
<p>Add another todo and check it off. When you fetch the newly generated file
using the Javascript console, the results reflect your change. Look for <code class="highlighter-rouge">"completed":true</code>:</p>
<div class="language-json highlighter-rouge"><pre class="highlight"><code><span class="p">[</span><span class="w">
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nt">"id"</span><span class="p">:</span><span class="mi">3</span><span class="p">,</span><span class="w">
</span><span class="nt">"text"</span><span class="p">:</span><span class="s2">"Blockstack Todo"</span><span class="p">,</span><span class="w">
</span><span class="nt">"completed"</span><span class="p">:</span><span class="kc">true</span><span class="w">
</span><span class="s2">"id"</span><span class="p">:</span><span class="mi">3</span><span class="p">,</span><span class="w">
</span><span class="s2">"text"</span><span class="p">:</span><span class="s2">"Blockstack Todo"</span><span class="p">,</span><span class="w">
</span><span class="s2">"completed"</span><span class="p">:</span><span class="kc">true</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nt">"id"</span><span class="p">:</span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="nt">"text"</span><span class="p">:</span><span class="s2">"Software package manager secured by the blockchain"</span><span class="p">,</span><span class="w">
</span><span class="nt">"completed"</span><span class="p">:</span><span class="kc">false</span><span class="w">
</span><span class="s2">"id"</span><span class="p">:</span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="s2">"text"</span><span class="p">:</span><span class="s2">"Software package manager secured by the blockchain"</span><span class="p">,</span><span class="w">
</span><span class="s2">"completed"</span><span class="p">:</span><span class="kc">false</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="err">...</span><span class="w">
</span><span class="p">]</span><span class="w">
</span></code></pre>
</div>
</span></code></pre></div></div>
<p>Now that you have seen the application in action, dig into how it works.</p>
@ -557,17 +589,16 @@ application interactions with your Gaia Hub originate in the
<code class="highlighter-rouge">src/components/Dashboard.vue</code> file. First, examine where the changes to the
Todos are processed:</p>
<div class="language-js highlighter-rouge"><pre class="highlight"><code><span class="nx">todos</span><span class="err">:</span> <span class="p">{</span>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">todos</span><span class="p">:</span> <span class="p">{</span>
<span class="nl">handler</span><span class="p">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">todos</span><span class="p">)</span> <span class="p">{</span>
<span class="kr">const</span> <span class="nx">blockstack</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">blockstack</span>
<span class="kd">const</span> <span class="nx">blockstack</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">blockstack</span>
<span class="c1">// encryption is now enabled by default</span>
<span class="k">return</span> <span class="nx">blockstack</span><span class="p">.</span><span class="nx">putFile</span><span class="p">(</span><span class="nx">STORAGE_FILE</span><span class="p">,</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">todos</span><span class="p">))</span>
<span class="p">},</span>
<span class="nx">deep</span><span class="err">:</span> <span class="kc">true</span>
<span class="nx">deep</span><span class="p">:</span> <span class="kc">true</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>The <code class="highlighter-rouge">todos</code> JSON object is passed in and the
<a href="https://blockstack.github.io/blockstack.js/#putfile"><code class="highlighter-rouge">blockstack.putFile()</code></a>
@ -575,8 +606,8 @@ method to store it in a Gaia Hub.</p>
<p>The code needs to read the Todo items from the storage with the <a href="https://blockstack.github.io/blockstack.js/#getfile"><code class="highlighter-rouge">blockstack.getFile()</code></a> method which returns a promise:</p>
<div class="language-js highlighter-rouge"><pre class="highlight"><code><span class="nx">fetchData</span> <span class="p">()</span> <span class="p">{</span>
<span class="kr">const</span> <span class="nx">blockstack</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">blockstack</span>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">fetchData</span> <span class="p">()</span> <span class="p">{</span>
<span class="kd">const</span> <span class="nx">blockstack</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">blockstack</span>
<span class="nx">blockstack</span><span class="p">.</span><span class="nx">getFile</span><span class="p">(</span><span class="nx">STORAGE_FILE</span><span class="p">)</span> <span class="c1">// decryption is enabled by default</span>
<span class="p">.</span><span class="nx">then</span><span class="p">((</span><span class="nx">todosText</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">todos</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">todosText</span> <span class="o">||</span> <span class="s1">'[]'</span><span class="p">)</span>
@ -587,8 +618,7 @@ method to store it in a Gaia Hub.</p>
<span class="k">this</span><span class="p">.</span><span class="nx">todos</span> <span class="o">=</span> <span class="nx">todos</span>
<span class="p">})</span>
<span class="p">},</span>
</code></pre>
</div>
</code></pre></div></div>
<p>The <code class="highlighter-rouge">todos</code> data is retrieved from the promise.</p>
@ -604,6 +634,71 @@ method to store it in a Gaia Hub.</p>
<a href="https://twitter.com/intent/tweet?text=Todo List Application Tutorial&url=https://docs.blockstack.org/browser/todo-list.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -702,74 +797,6 @@ method to store it in a Gaia Hub.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

70
_site/changelog/index.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Changelog | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Changelog" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -269,74 +269,6 @@
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

143
_site/common/construction.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Excuse our dust! | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Excuse our dust!" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/common/construction.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/common/construction.html","headline":"Excuse our dust!","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/common/construction.html"},"description":"Excuse our dust!","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/common/construction.html","headline":"Excuse our dust!","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/common/construction.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Excuse our dust!","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -151,13 +151,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/moxiegirl/docs.blockstack/construction.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -170,6 +170,71 @@
<a href="https://twitter.com/intent/tweet?text=Excuse our dust!&url=https://docs.blockstack.org/common/construction.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -255,74 +320,6 @@
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

70
_site/contact/index.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Got Any Questions? | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Got Any Questions?" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -188,74 +188,6 @@ You can also request <a href="https://docs.google.com/a/blockstack.com/forms/d/e
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

153
_site/core/atlas/howitworks.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>How Atlas Works | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="How Atlas Works" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/atlas/howitworks.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/atlas/howitworks.html","headline":"How Atlas Works","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/atlas/howitworks.html"},"description":"How Atlas Works","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/atlas/howitworks.html","headline":"How Atlas Works","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/atlas/howitworks.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"How Atlas Works","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/howitworks.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -429,7 +429,7 @@ find out which chunks they each have. Atlas nodes download chunks from
neighbors in rarest-first order in order to prioritize data replication for the
chunks that are currently most at-risk for disappearing due to node failure.</p>
<div class="highlighter-rouge"><pre class="highlight"><code> Name operation | chunk hashes | chunk data | Inventory
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> Name operation | chunk hashes | chunk data | Inventory
history | as name state | | vector
+-------------------+
@ -457,20 +457,18 @@ it has and which ones it does not, and announces it to other Atlas peers so
they can fetch chunks they are missing. In this example, the node's
inventory vector is [1, 0, 1], since the 0th and 2nd chunks are present
but the 1st chunk is missing.
</code></pre>
</div>
</code></pre></div></div>
<h2 id="querying-chunk-inventories">Querying Chunk Inventories</h2>
<p>Developers can query a node’s inventory vector as follows:</p>
<div class="language-python highlighter-rouge"><pre class="highlight"><code><span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">blockstack</span>
<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">blockstack</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">result</span> <span class="o">=</span> <span class="n">blockstack</span><span class="o">.</span><span class="n">lib</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">get_zonefile_inventory</span><span class="p">(</span><span class="s">"https://node.blockstack.org:6263"</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">524288</span><span class="p">)</span>
<span class="o">&gt;&gt;&gt;</span> <span class="k">print</span> <span class="nb">len</span><span class="p">(</span><span class="n">result</span><span class="p">[</span><span class="s">'inv'</span><span class="p">])</span>
<span class="mi">11278</span>
<span class="o">&gt;&gt;&gt;</span>
</code></pre>
</div>
</code></pre></div></div>
<p>The variable <code class="highlighter-rouge">result['inv']</code> here is a big-endian bit vector, where the <em>i</em>th
bit is set to 1 if the <em>i</em>th chunk in the chunk sequence is present. The bit at
@ -484,6 +482,71 @@ which ones are missing which chunks can be found
<a href="https://twitter.com/intent/tweet?text=How Atlas Works&url=https://docs.blockstack.org/core/atlas/howitworks.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -582,74 +645,6 @@ which ones are missing which chunks can be found
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

158
_site/core/atlas/howtouse.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>How to Use the Atlas Network | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="How to Use the Atlas Network" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/atlas/howtouse.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/atlas/howtouse.html","headline":"How to Use the Atlas Network","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/atlas/howtouse.html"},"description":"How to Use the Atlas Network","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/atlas/howtouse.html","headline":"How to Use the Atlas Network","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/atlas/howtouse.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"How to Use the Atlas Network","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/howtouse.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -321,7 +321,7 @@ chunk data. A client can query up to 100 chunks in one RPC call.</p>
the returned payload will be a <code class="highlighter-rouge">dict</code> with a <code class="highlighter-rouge">zonefiles</code> key that maps the chunk
hashes to their respective data.</p>
<div class="language-python highlighter-rouge"><pre class="highlight"><code><span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">blockstack</span>
<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">blockstack</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">data</span> <span class="o">=</span> <span class="n">blockstack</span><span class="o">.</span><span class="n">lib</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">get_zonefiles</span><span class="p">(</span><span class="s">'https://node.blockstack.org:6263'</span><span class="p">,</span> <span class="p">[</span><span class="s">'1b89a685f4c4ea245ce9433d0b29166c22175ab4'</span><span class="p">])</span>
<span class="o">&gt;&gt;&gt;</span> <span class="k">print</span> <span class="n">data</span><span class="p">[</span><span class="s">'zonefiles'</span><span class="p">][</span><span class="s">'1b89a685f4c4ea245ce9433d0b29166c22175ab4'</span><span class="p">]</span>
<span class="err">$</span><span class="n">ORIGIN</span> <span class="n">duckduckgo_tor</span><span class="o">.</span><span class="nb">id</span>
@ -329,8 +329,7 @@ hashes to their respective data.</p>
<span class="n">tor</span> <span class="n">TXT</span> <span class="s">"3g2upl4pq6kufc4m.onion"</span>
<span class="o">&gt;&gt;&gt;</span>
</code></pre>
</div>
</code></pre></div></div>
<p>(This particular chunk happens to be associated with the BNS name
<code class="highlighter-rouge">duckduckgo_tor.id</code>).</p>
@ -356,15 +355,14 @@ Browser</a> for doing this.</p>
<p>Once the name operation is confirmed, you can announce the data to the
Atlas network. You can do so with the Python client as follows:</p>
<div class="language-python highlighter-rouge"><pre class="highlight"><code><span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">blockstack</span>
<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">blockstack</span>
<span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">base64</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">data</span> <span class="o">=</span> <span class="s">"..."</span> <span class="c"># this is the chunk data you will announce</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">data_b64</span> <span class="o">=</span> <span class="n">base64</span><span class="o">.</span><span class="n">b64encode</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">result</span> <span class="o">=</span> <span class="n">blockstack</span><span class="o">.</span><span class="n">lib</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">put_zonefiles</span><span class="p">(</span><span class="s">'https://node.blockstack.org:6263'</span><span class="p">,</span> <span class="p">[</span><span class="n">data_b64</span><span class="p">])</span>
<span class="o">&gt;&gt;&gt;</span> <span class="k">assert</span> <span class="n">result</span><span class="p">[</span><span class="s">'saved'</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="mi">1</span>
<span class="o">&gt;&gt;&gt;</span>
</code></pre>
</div>
</code></pre></div></div>
<p>At most five chunks can be announced in one RPC call.
Note that the data must be base64-encoded before it can be announced.</p>
@ -392,7 +390,7 @@ peer graph, and replicate the chunk to each of them as well.</p>
<p>For example, this code will replicate the chunk to not only
<code class="highlighter-rouge">https://node.blockstack.org:6263</code>, but also to its immediate neighbors.</p>
<div class="language-python highlighter-rouge"><pre class="highlight"><code><span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">blockstack</span>
<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">blockstack</span>
<span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">base64</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">data</span> <span class="o">=</span> <span class="s">"..."</span> <span class="c"># this is the chunk you will replicate widely</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">data_b64</span> <span class="o">=</span> <span class="n">base64</span><span class="o">.</span><span class="n">b64encode</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
@ -407,8 +405,7 @@ peer graph, and replicate the chunk to each of them as well.</p>
<span class="o">...</span> <span class="k">assert</span> <span class="n">result</span><span class="p">[</span><span class="s">'saved'</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="mi">1</span>
<span class="o">...</span>
<span class="o">&gt;&gt;&gt;</span>
</code></pre>
</div>
</code></pre></div></div>
<p>This is not strictly necessary, but it does help accelerate chunk replication
and makes it less likely that a chunk will get lost due to individual node
@ -418,6 +415,71 @@ failures.</p>
<a href="https://twitter.com/intent/tweet?text=How to Use the Atlas Network&url=https://docs.blockstack.org/core/atlas/howtouse.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -516,74 +578,6 @@ failures.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

148
_site/core/atlas/overview.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Overview of the Atlas network | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Overview of the Atlas network" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/atlas/overview.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/atlas/overview.html","headline":"Overview of the Atlas network","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/atlas/overview.html"},"description":"Overview of the Atlas network","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/atlas/overview.html","headline":"Overview of the Atlas network","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/atlas/overview.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Overview of the Atlas network","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/overview.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -328,7 +328,7 @@ propagate them to the Atlas network. BNS API endpoints, including our
will automatically fetch zone files from Atlas when they need to look
up data in Gaia (such as profiles and app data).</p>
<div class="highlighter-rouge"><pre class="highlight"><code> +--------------+ +---------------+ +----------------+
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> +--------------+ +---------------+ +----------------+
clients | Blockstack | | blockstack.js | | BNS API module |
| Browser | | | | |
+--------------+ +---------------+ +----------------+
@ -363,8 +363,7 @@ up zone files for names using the name's stat value as a zone file hash. Client
can broadcast zone files to the network if they match a previously-announced
hash. In practice, zone files store URLs to a name owner's Gaia hubs, thereby
allowing Blockstack apps to read and write data in Gaia.
</code></pre>
</div>
</code></pre></div></div>
<p>Nevertheless, Atlas is a general-purpose content-addressed storage
system that advanced developers can use to <strong>host data in an immutable
@ -472,6 +471,71 @@ as part of the protocol.</p>
<a href="https://twitter.com/intent/tweet?text=Overview of the Atlas network&url=https://docs.blockstack.org/core/atlas/overview.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -570,74 +634,6 @@ as part of the protocol.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

248
_site/core/faq_developer.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Developer FAQs | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Developer FAQs" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/faq_developer.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/faq_developer.html","headline":"Developer FAQs","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/faq_developer.html"},"description":"Developer FAQs","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/faq_developer.html","headline":"Developer FAQs","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/faq_developer.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Developer FAQs","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -116,6 +116,23 @@
<!-- -->
<h5>Introduction</h5>
<ul class="uk-nav uk-nav-default doc-nav">
</ul>
<ul class="uk-nav uk-nav-default doc-nav">
<!-- -->
<li class=""><a href="/develop/dapp_principles.html">Principles of Blockstack applications</a></li>
</ul>
<h5>Try a tutorial</h5>
<ul class="uk-nav uk-nav-default doc-nav">
@ -155,6 +172,23 @@
</ul>
<h5>Application mining</h5>
<ul class="uk-nav uk-nav-default doc-nav">
<!-- -->
<li class=""><a href="/develop/mining_intro.html">Understand app mining</a></li>
<!-- -->
<li class=""><a href="/develop/mining_enroll.html">How to enroll</a></li>
</ul>
<h5>Reference</h5>
<ul class="uk-nav uk-nav-default doc-nav">
@ -165,10 +199,20 @@
<li class="uk-active"><a href="/core/faq_developer.html">Developer FAQs</a></li>
<!-- -->
<li class=""><a href="/common/mining_faq.html">Mining FAQ</a></li>
<!-- -->
<li class=""><a href="/common/javascript_ref.html">Blockstack Javascript Reference</a></li>
<!-- -->
<li class=""><a href="/common/core_ref.html">Blockstack CORE API</a></li>
</ul>
<!-- -->
@ -195,13 +239,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/faq_developer.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -211,11 +255,11 @@
<p class="no_toc">These FAQs are intended for developers of Blockstack.</p>
<ul id="markdown-toc">
<li><a href="#im-a-web-developer--can-i-build-on-blockstack" id="markdown-toc-im-a-web-developer--can-i-build-on-blockstack">I’m a Web developer. Can I build on Blockstack?</a></li>
<li><a href="#im-a-non-web-developer--can-i-build-on-blockstack" id="markdown-toc-im-a-non-web-developer--can-i-build-on-blockstack">I’m a non-Web developer. Can I build on Blockstack?</a></li>
<li><a href="#whats-the-difference-between-a-web-app-and-a-blockstack-app" id="markdown-toc-whats-the-difference-between-a-web-app-and-a-blockstack-app">What’s the difference between a Web app and a Blockstack app?</a></li>
<li><a href="#im-a-web-developer--can-i-build-on-blockstack" id="markdown-toc-im-a-web-developer--can-i-build-on-blockstack">I’m a web developer. Can I build on Blockstack?</a></li>
<li><a href="#im-a-non-web-developer--can-i-build-on-blockstack" id="markdown-toc-im-a-non-web-developer--can-i-build-on-blockstack">I’m a non-web developer. Can I build on Blockstack?</a></li>
<li><a href="#whats-the-difference-between-a-web-app-and-a-blockstack-app" id="markdown-toc-whats-the-difference-between-a-web-app-and-a-blockstack-app">What’s the difference between a web app and a Blockstack app?</a></li>
<li><a href="#do-i-need-to-learn-any-new-languages-or-frameworks" id="markdown-toc-do-i-need-to-learn-any-new-languages-or-frameworks">Do I need to learn any new languages or frameworks?</a></li>
<li><a href="#how-does-my-web-app-interact-with-blockstack" id="markdown-toc-how-does-my-web-app-interact-with-blockstack">How does my Web app interact with Blockstack?</a></li>
<li><a href="#how-does-my-web-app-interact-with-blockstack" id="markdown-toc-how-does-my-web-app-interact-with-blockstack">How does my web app interact with Blockstack?</a></li>
<li><a href="#what-does-blockstackjs-do" id="markdown-toc-what-does-blockstackjs-do">What does <code class="highlighter-rouge">blockstack.js</code> do?</a></li>
<li><a href="#how-do-i-use-blockstackjs" id="markdown-toc-how-do-i-use-blockstackjs">How do I use <code class="highlighter-rouge">blockstack.js</code>?</a></li>
<li><a href="#how-can-i-look-up-names-and-profiles" id="markdown-toc-how-can-i-look-up-names-and-profiles">How can I look up names and profiles?</a></li>
@ -229,13 +273,13 @@
<li><a href="#can-blockstack-applications-interact-with-bitcoin-ethereum-smart-contracts-other-blockchains" id="markdown-toc-can-blockstack-applications-interact-with-bitcoin-ethereum-smart-contracts-other-blockchains">Can Blockstack applications interact with Bitcoin? Ethereum? Smart contracts? Other blockchains?</a></li>
</ul>
<h2 id="im-a-web-developer--can-i-build-on-blockstack">I’m a Web developer. Can I build on Blockstack?</h2>
<h2 id="im-a-web-developer--can-i-build-on-blockstack">I’m a web developer. Can I build on Blockstack?</h2>
<p>Yes! Blockstack is geared primarily towards Web developers. All of your
<p>Yes! Blockstack is geared primarily towards web developers. All of your
existing knowledge is immediately applicable to Blockstack. Anything you can do
in a Web browser, you can do in a Blockstack app.</p>
in a web browser, you can do in a Blockstack app.</p>
<h2 id="im-a-non-web-developer--can-i-build-on-blockstack">I’m a non-Web developer. Can I build on Blockstack?</h2>
<h2 id="im-a-non-web-developer--can-i-build-on-blockstack">I’m a non-web developer. Can I build on Blockstack?</h2>
<p>Yes! Blockstack implements a <a href="https://core.blockstack.org">RESTful API</a> which
lets you interact with Blockstack from any language and any runtime. In fact,
@ -244,34 +288,33 @@ the reference client
wrapper around these RESTful API calls, so you won’t be missing much by using a
language other than Javascript.</p>
<h2 id="whats-the-difference-between-a-web-app-and-a-blockstack-app">What’s the difference between a Web app and a Blockstack app?</h2>
<h2 id="whats-the-difference-between-a-web-app-and-a-blockstack-app">What’s the difference between a web app and a Blockstack app?</h2>
<p>Blockstack apps are built like <a href="https://en.wikipedia.org/wiki/Single-page_application">single-page Web
apps</a>—they are, in
fact, a type of Web application.</p>
<p>Blockstack apps are built like <a href="https://en.wikipedia.org/wiki/Single-page_application">single-page web
apps</a> they are, in
fact, a type of web application.</p>
<p>Blockstack apps are a subset of Web applications that use Blockstack’s
technology to preserve the user’s control over their identities and data.
As such, they tend to be simpler
in design and operation, since in many cases they don’t have to host anything
besides the application’s assets.</p>
<p>Blockstack apps are a subset of web applications that use Blockstack’s
technology to preserve the user’s control over their identities and data. As
such, they tend to be simple in design and operation, since in many cases they
don’t have to host anything besides the application’s assets.</p>
<h2 id="do-i-need-to-learn-any-new-languages-or-frameworks">Do I need to learn any new languages or frameworks?</h2>
<p>No. Blockstack applications are built using existing Web frameworks and programming
<p>No. Blockstack applications are built using existing web frameworks and programming
The only new thing you need to learn is either <a href="https://github.com/blockstack/blockstack.js">blockstack.js</a> or
the <a href="https://core.blockstack.org">Blockstack RESTful API</a>.</p>
<h2 id="how-does-my-web-app-interact-with-blockstack">How does my Web app interact with Blockstack?</h2>
<h2 id="how-does-my-web-app-interact-with-blockstack">How does my web app interact with Blockstack?</h2>
<p>The <a href="https://github.com/blockstack/blockstack.js">blockstack.js</a> library gives
any Web application the ability to interact with Blockstack’s authentication and
any web application the ability to interact with Blockstack’s authentication and
storage services. In addition, we supply a <a href="https://core.blockstack.org">public RESTful API</a>.</p>
<h2 id="what-does-blockstackjs-do">What does <code class="highlighter-rouge">blockstack.js</code> do?</h2>
<p>This is the reference client implementation for Blockstack. You use it in your
Web app to do the following:</p>
web app to do the following:</p>
<ul>
<li>Authenticate users</li>
@ -281,7 +324,7 @@ Web app to do the following:</p>
<h2 id="how-do-i-use-blockstackjs">How do I use <code class="highlighter-rouge">blockstack.js</code>?</h2>
<p>Please see the API documentation <a href="https://github.com/blockstack/blockstack.js">here</a>.</p>
<p>We have <a href="/browser/hello-blockstack.html">several examples</a> you can use to get started. Please see the API documentation <a href="https://github.com/blockstack/blockstack.js">here</a>.</p>
<h2 id="how-can-i-look-up-names-and-profiles">How can I look up names and profiles?</h2>
@ -296,17 +339,15 @@ profile. For example, here’s how you would get public data from the
<ol>
<li>Get the bucket URL
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span><span class="nv">BUCKET_URL</span><span class="o">=</span><span class="s2">"</span><span class="k">$(</span>curl -sL https://core.blockstack.org/v1/users/ryan.id | jq -r <span class="s1">'."ryan.id"["profile"]["apps"]["http://publik.ykliao.com"]'</span><span class="k">)</span><span class="s2">"</span>
<span class="gp">$ </span><span class="nb">echo</span> <span class="s2">"</span><span class="nv">$BUCKET_URL</span><span class="s2">"</span>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ BUCKET_URL</span><span class="o">=</span><span class="s2">"</span><span class="k">$(</span>curl <span class="nt">-sL</span> https://core.blockstack.org/v1/users/ryan.id | jq <span class="nt">-r</span> <span class="s1">'."ryan.id"["profile"]["apps"]["http://publik.ykliao.com"]'</span><span class="k">)</span><span class="s2">"</span>
<span class="nv">$ </span><span class="nb">echo</span> <span class="s2">"</span><span class="nv">$BUCKET_URL</span><span class="s2">"</span>
https://gaia.blockstack.org/hub/1FrZTGQ8DM9TMPfGXtXMUvt2NNebLiSzad/
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>Get the data
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl -sL <span class="s2">"</span><span class="k">${</span><span class="nv">BUCKET_URL</span><span class="p">%%/</span><span class="k">}</span><span class="s2">/statuses.json"</span>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>curl <span class="nt">-sL</span> <span class="s2">"</span><span class="k">${</span><span class="nv">BUCKET_URL</span><span class="p">%%/</span><span class="k">}</span><span class="s2">/statuses.json"</span>
<span class="o">[{</span><span class="s2">"id"</span>:0,<span class="s2">"text"</span>:<span class="s2">"Hello, Blockstack!"</span>,<span class="s2">"created_at"</span>:1515786983492<span class="o">}]</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
</ol>
@ -330,7 +371,7 @@ register Blockstack IDs themselves.</p>
<ul>
<li>
<p>Set up a <code class="highlighter-rouge">blockstack api</code> endpoint (see the project <a href="https://github.com/blockstack/blockstack-core/blob/master/README.md">README</a>) and write a
program to automatically register names. Also, see the <a href="https://blockstack.github.io/blockstack-core/#managing-names-register-a-name">API
program to automatically register names. Also, see the <a href="https://core.blockstack.org//#managing-names-register-a-name">API
documentation</a>
for registering names on this endpoint.</p>
</li>
@ -342,7 +383,7 @@ names. This is currently in development.</p>
<h2 id="can-i-programmatically-register-blockstack-subdomains">Can I programmatically register Blockstack Subdomains?</h2>
<p>Yes! Once you deploy your own subdomain registrar, you can have your Web app
<p>Yes! Once you deploy your own subdomain registrar, you can have your web app
send it requests to register subdomains on your Blockstack ID. You can also
create a program that drives subdomain registration on your Blockstack ID.</p>
@ -367,13 +408,78 @@ principle applies to a lot of useful decentralized applications.</p>
<h2 id="can-blockstack-applications-interact-with-bitcoin-ethereum-smart-contracts-other-blockchains">Can Blockstack applications interact with Bitcoin? Ethereum? Smart contracts? Other blockchains?</h2>
<p>Yes! Since Blockstack applications are built like Web applications, all you need to do is include the
<p>Yes! Since Blockstack applications are built like web applications, all you need to do is include the
relevant Javascript library into your application.</p>
<div class="share uk-text-center">
<a href="https://twitter.com/intent/tweet?text=Developer FAQs&url=https://docs.blockstack.org/core/faq_developer.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -472,74 +578,6 @@ relevant Javascript library into your application.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

143
_site/core/faq_technical.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Blockstack Technical FAQ | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Blockstack Technical FAQ" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/faq_technical.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/faq_technical.html","headline":"Blockstack Technical FAQ","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/faq_technical.html"},"description":"Blockstack Technical FAQ","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/faq_technical.html","headline":"Blockstack Technical FAQ","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/faq_technical.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Blockstack Technical FAQ","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/faq_technical.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -492,6 +492,71 @@ by asking a subdomain registrar to create one for you.</p>
<a href="https://twitter.com/intent/tweet?text=Blockstack Technical FAQ&url=https://docs.blockstack.org/core/faq_technical.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -590,74 +655,6 @@ by asking a subdomain registrar to create one for you.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

173
_site/core/install-api.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Blockstack API | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Blockstack API" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/install-api.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/install-api.html","headline":"Blockstack API","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/install-api.html"},"description":"Blockstack API","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/install-api.html","headline":"Blockstack API","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/install-api.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Blockstack API","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/install-api.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -302,7 +302,7 @@ Ubuntu are below.</p>
<li>
<p><strong>Step 2:</strong> Make sure you have <a href="http://docs.python-guide.org/en/latest/dev/virtualenvs/">virtualenv installed</a>.
Then, setup the API:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>$ sudo apt-get install -y python-pip memcached rng-tools python-dev libmemcached-dev zlib1g-dev libgmp-dev libffi-dev libssl-dev
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt-get install -y python-pip memcached rng-tools python-dev libmemcached-dev zlib1g-dev libgmp-dev libffi-dev libssl-dev
$ sudo service memcached start
$ sudo pip install virtualenv
$ sudo npm -g install aglio
@ -315,8 +315,7 @@ $ blockstack setup_wallet
$ blockstack api start
$ deactivate
$ ./build_docs.sh public_api
</code></pre>
</div>
</code></pre></div> </div>
</li>
</ul>
@ -331,10 +330,9 @@ follow the instructions <a href="search.md">here</a>.</p>
<ul>
<li><strong>Step 1:</strong> Install nginx and uWSGI:
<div class="highlighter-rouge"><pre class="highlight"><code>$ sudo apt-get install -y nginx
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt-get install -y nginx
$ sudo pip install uwsgi
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li><strong>Step 2:</strong> Copy <a href="../api/nginx/config/nginx_sites-available/blockstack_api">this sample nginx sites file</a> to</li>
</ul>
@ -345,9 +343,8 @@ $ sudo pip install uwsgi
<p>and edit the paths depending on the uwsgi blockstack_api socket directory (defaults to /tmp/blockstack_api.sock)
You can test your nginx settings:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>$ sudo nginx -t
</code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo nginx -t
</code></pre></div></div>
<ul>
<li><strong>Step 3:</strong> Copy <a href="../api/nginx/config/systemd_system/blockstack_api.service">this sample systemd service file</a> to</li>
</ul>
@ -361,19 +358,17 @@ where your virtualenv is located.</p>
<p>Note: The following sed commands will work if the virtualenv is currently active and your shell is in the repo’s root directory.</p>
<div class="highlighter-rouge"><pre class="highlight"><code>$ sudo sed -i "s/User\=USER/User\=$USER/" /etc/systemd/system/blockstack_api.service
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo sed -i "s/User\=USER/User\=$USER/" /etc/systemd/system/blockstack_api.service
$ sudo sed -i "s#/path/to/blockstack#$PWD#" /etc/systemd/system/blockstack_api.service
$ sudo sed -i "s#/path/to/virtualenv#$VIRTUAL_ENV#" /etc/systemd/system/blockstack_api.service
</code></pre>
</div>
</code></pre></div></div>
<ul>
<li><strong>Step 4:</strong> Get a security certificate from <a href="https://letsencrypt.org/">Let’s Encrypt</a>.
<div class="highlighter-rouge"><pre class="highlight"><code>$ git clone https://github.com/certbot/certbot.git
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ git clone https://github.com/certbot/certbot.git
$ cd certbot/
$ ./certbot-auto --nginx -d &lt;your_domain&gt;
</code></pre>
</div>
</code></pre></div> </div>
</li>
</ul>
@ -381,10 +376,9 @@ $ ./certbot-auto --nginx -d &lt;your_domain&gt;
<ul>
<li><strong>Step 5:</strong> Start nginx and the Blockstack API uwsgi server:
<div class="highlighter-rouge"><pre class="highlight"><code>sudo systemctl restart blockstack_api
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo systemctl restart blockstack_api
sudo systemctl restart nginx
</code></pre>
</div>
</code></pre></div> </div>
</li>
</ul>
@ -395,6 +389,71 @@ instructions.</p>
<a href="https://twitter.com/intent/tweet?text=Blockstack API&url=https://docs.blockstack.org/core/install-api.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -493,74 +552,6 @@ instructions.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

167
_site/core/memcached.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Installing Memcached | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Installing Memcached" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/memcached.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/memcached.html","headline":"Installing Memcached","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/memcached.html"},"description":"Installing Memcached","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/memcached.html","headline":"Installing Memcached","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/memcached.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Installing Memcached","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/memcached.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -293,10 +293,9 @@ running locally.</p>
<h3 id="memcached-on-debian--ubuntu">Memcached on Debian &amp; Ubuntu:</h3>
<div class="highlighter-rouge"><pre class="highlight"><code>$ sudo apt-get install -y python-dev libmemcached-dev zlib1g-dev
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt-get install -y python-dev libmemcached-dev zlib1g-dev
$ pip install pylibmc
</code></pre>
</div>
</code></pre></div></div>
<h3 id="memcached-on-macos">Memcached on macOS:</h3>
@ -304,33 +303,95 @@ $ pip install pylibmc
<p>After installing Homebrew:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>$ brew install memcached
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ brew install memcached
$ brew install libmemcached
$ pip install pylibmc --install-option="--with-libmemcached=/usr/local/Cellar/libmemcached/1.0.18_1/"
</code></pre>
</div>
</code></pre></div></div>
<p>After installing, you can start memcached and check if it’s running properly:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>$ memcached -d
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ memcached -d
$ echo stats | nc localhost 11211
</code></pre>
</div>
</code></pre></div></div>
<h3 id="memcached-on-heroku">Memcached on Heroku</h3>
<p>To deploy on Heroku:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>heroku create
<span class="gp">$ </span>heroku addons:add memcachedcloud
<span class="gp">$ </span>git push heroku master
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>heroku create
<span class="nv">$ </span>heroku addons:add memcachedcloud
<span class="nv">$ </span>git push heroku master
</code></pre></div></div>
<div class="share uk-text-center">
<a href="https://twitter.com/intent/tweet?text=Installing Memcached&url=https://docs.blockstack.org/core/memcached.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -429,74 +490,6 @@ $ echo stats | nc localhost 11211
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

148
_site/core/naming/architecture.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Understand the Architecture | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Understand the Architecture" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/naming/architecture.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/naming/architecture.html","headline":"Understand the Architecture","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/architecture.html"},"description":"Understand the Architecture","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/architecture.html","headline":"Understand the Architecture","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/architecture.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Understand the Architecture","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/architecture.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -313,7 +313,7 @@ and modify names.</p>
<p>The BNS indexer and BNS API comprise the <strong>BNS node</strong>. An architectural schematic appears below.</p>
<div class="highlighter-rouge"><pre class="highlight"><code> +-------------------------------------------------------+
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> +-------------------------------------------------------+
RESTful | +----------------+ +--------------------+ |
+--------+ API | | | private API | | |
| client |&lt;------------&gt;| BNS API module |&lt;-----------&gt;| BNS indexer module | |
@ -339,8 +339,7 @@ the blochchain via a blockchain peer, over the blockchain's peer network.
Blockstack Core currently implements the API module and indexer module as separate
daemons (`blockstack api` and `blockstack-core`, respectively). However, this
is an implementation detail, and may change in the future.
</code></pre>
</div>
</code></pre></div></div>
<p>The BNS indexer implements the blockchain consensus rules and network protocols.
Its main responsibility is to build up and replicate all of the name state. It does
@ -381,6 +380,71 @@ the reader to client-specific documentation for registering and managing names.<
<a href="https://twitter.com/intent/tweet?text=Understand the Architecture&url=https://docs.blockstack.org/core/naming/architecture.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -479,74 +543,6 @@ the reader to client-specific documentation for registering and managing names.<
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

143
_site/core/naming/comparison.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Naming system feature comparison | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Naming system feature comparison" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/naming/comparison.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/naming/comparison.html","headline":"Naming system feature comparison","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/comparison.html"},"description":"Naming system feature comparison","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/comparison.html","headline":"Naming system feature comparison","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/comparison.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Naming system feature comparison","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/comparison.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -518,6 +518,71 @@ slightly more valuable.</p>
<a href="https://twitter.com/intent/tweet?text=Naming system feature comparison&url=https://docs.blockstack.org/core/naming/comparison.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -616,74 +681,6 @@ slightly more valuable.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

143
_site/core/naming/creationhowto.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Creating a Namespace | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Creating a Namespace" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/naming/creationhowto.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/naming/creationhowto.html","headline":"Creating a Namespace","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/creationhowto.html"},"description":"Creating a Namespace","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/creationhowto.html","headline":"Creating a Namespace","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/creationhowto.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Creating a Namespace","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/creationhowto.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -350,6 +350,71 @@ cryptocurrency at stake.</p>
<a href="https://twitter.com/intent/tweet?text=Creating a Namespace&url=https://docs.blockstack.org/core/naming/creationhowto.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -448,74 +513,6 @@ cryptocurrency at stake.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

163
_site/core/naming/did.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Decentralized Identifiers (DIDs) | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Decentralized Identifiers (DIDs)" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/naming/did.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/naming/did.html","headline":"Decentralized Identifiers (DIDs)","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/did.html"},"description":"Decentralized Identifiers (DIDs)","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/did.html","headline":"Decentralized Identifiers (DIDs)","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/did.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Decentralized Identifiers (DIDs)","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/did.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -293,14 +293,13 @@ specification for decentralized identifiers (DIDs).</p>
<p>Each name in BNS has an associated DID. The DID format for BNS is:</p>
<div class="highlighter-rouge"><pre class="highlight"><code> did:stack:v0:{address}-{index}
</code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> did:stack:v0:{address}-{index}
</code></pre></div></div>
<p>Where:</p>
<ul>
<li><code class="highlighter-rouge"><span class="p">{</span><span class="err">address</span><span class="p">}</span></code> is an on-chain public key hash (e.g. a Bitcoin address).</li>
<li><code class="highlighter-rouge"><span class="p">{</span><span class="err">index</span><span class="p">}</span></code> refers to the <code class="highlighter-rouge">nth</code> name this address created.</li>
<li><code class="highlighter-rouge">{address}</code> is an on-chain public key hash (e.g. a Bitcoin address).</li>
<li><code class="highlighter-rouge">{index}</code> refers to the <code class="highlighter-rouge">nth</code> name this address created.</li>
</ul>
<p>For example, the DID for <code class="highlighter-rouge">personal.id</code> is
@ -350,20 +349,20 @@ for subdomains, so the software can determine which code-path to take.</p>
<ul>
<li>
<p>For on-chain BNS names, the <code class="highlighter-rouge"><span class="p">{</span><span class="err">address</span><span class="p">}</span></code> is the same as the Bitcoin address
<p>For on-chain BNS names, the <code class="highlighter-rouge">{address}</code> is the same as the Bitcoin address
that owns the name. Currently, both version byte 0 and version byte 5
addresses are supported (i.e. addresses starting with <code class="highlighter-rouge">1</code> or <code class="highlighter-rouge">3</code>, meaning <code class="highlighter-rouge">p2pkh</code> and
<code class="highlighter-rouge">p2sh</code> addresses).</p>
</li>
<li>
<p>For off-chain BNS subdomains, the <code class="highlighter-rouge"><span class="p">{</span><span class="err">address</span><span class="p">}</span></code> has version byte 63 for
<p>For off-chain BNS subdomains, the <code class="highlighter-rouge">{address}</code> has version byte 63 for
subdomains owned by a single private key, and version byte 50 for subdomains
owned by a m-of-n set of private keys. That is, subdomain DID addresses start
with <code class="highlighter-rouge">S</code> or <code class="highlighter-rouge">M</code>, respectively.</p>
</li>
</ul>
<p>The <code class="highlighter-rouge"><span class="p">{</span><span class="err">index</span><span class="p">}</span></code> field for a subdomain’s DID is distinct from the <code class="highlighter-rouge"><span class="p">{</span><span class="err">index</span><span class="p">}</span></code> field
<p>The <code class="highlighter-rouge">{index}</code> field for a subdomain’s DID is distinct from the <code class="highlighter-rouge">{index}</code> field
for a BNS name’s DID, even if the same created both names and subdomains.
For example, the name <code class="highlighter-rouge">abcdefgh123456.id</code> has the DID <code class="highlighter-rouge">did:stack:v0:16EMaNw3pkn3v6f2BgnSSs53zAKH4Q8YJg-0</code>,
because it was the first name created by <code class="highlighter-rouge">16EMaNw3pkn3v6f2BgnSSs53zAKH4Q8YJg</code>.
@ -377,7 +376,7 @@ second is encoded with version byte 63).</p>
<p>You can see this play out in practice with the following code snippit:</p>
<div class="language-python highlighter-rouge"><pre class="highlight"><code><span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">blockstack</span>
<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">blockstack</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">blockstack</span><span class="o">.</span><span class="n">lib</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">get_name_record</span><span class="p">(</span><span class="s">'jude.statism.id'</span><span class="p">,</span> <span class="n">hostport</span><span class="o">=</span><span class="s">'https://node.blockstack.org:6263'</span><span class="p">)[</span><span class="s">'address'</span><span class="p">]</span>
<span class="s">u'16EMaNw3pkn3v6f2BgnSSs53zAKH4Q8YJg'</span>
<span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">virtualchain</span>
@ -385,13 +384,77 @@ second is encoded with version byte 63).</p>
<span class="s">'SSXMcDiCZ7yFSQSUj7mWzmDcdwYhq97p2i'</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">blockstack</span><span class="o">.</span><span class="n">lib</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">resolve_DID</span><span class="p">(</span><span class="s">'did:stack:v0:SSXMcDiCZ7yFSQSUj7mWzmDcdwYhq97p2i-0'</span><span class="p">,</span> <span class="n">hostport</span><span class="o">=</span><span class="s">'https://node.blockstack.org:6263'</span><span class="p">)</span>
<span class="p">{</span><span class="s">'public_key'</span><span class="p">:</span> <span class="s">'020fadbbcea0ff3b05f03195b41cd991d7a0af8bd38559943aec99cbdaf0b22cc8'</span><span class="p">}</span>
</code></pre>
</div>
</code></pre></div></div>
<div class="share uk-text-center">
<a href="https://twitter.com/intent/tweet?text=Decentralized Identifiers (DIDs)&url=https://docs.blockstack.org/core/naming/did.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -490,74 +553,6 @@ second is encoded with version byte 63).</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

143
_site/core/naming/forks.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>BNS Forks | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="BNS Forks" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/naming/forks.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/naming/forks.html","headline":"BNS Forks","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/forks.html"},"description":"BNS Forks","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/forks.html","headline":"BNS Forks","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/forks.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"BNS Forks","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/forks.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -423,6 +423,71 @@ to the fork-set with the highest cumulative burn.</p>
<a href="https://twitter.com/intent/tweet?text=BNS Forks&url=https://docs.blockstack.org/core/naming/forks.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -521,74 +586,6 @@ to the fork-set with the highest cumulative burn.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

143
_site/core/naming/introduction.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Blockstack Naming Service (BNS) | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Blockstack Naming Service (BNS)" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/naming/introduction.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/naming/introduction.html","headline":"Blockstack Naming Service (BNS)","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/introduction.html"},"description":"Blockstack Naming Service (BNS)","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/introduction.html","headline":"Blockstack Naming Service (BNS)","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/introduction.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Blockstack Naming Service (BNS)","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/introduction.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -505,6 +505,71 @@ between these name objects is presented below:</p>
<a href="https://twitter.com/intent/tweet?text=Blockstack Naming Service (BNS)&url=https://docs.blockstack.org/core/naming/introduction.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -603,74 +668,6 @@ between these name objects is presented below:</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

143
_site/core/naming/manage.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Manage BNS Names | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Manage BNS Names" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/naming/manage.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/naming/manage.html","headline":"Manage BNS Names","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/manage.html"},"description":"Manage BNS Names","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/manage.html","headline":"Manage BNS Names","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/manage.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Manage BNS Names","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/manage.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -413,6 +413,71 @@ document for details on how to construct this transaction.</p>
<a href="https://twitter.com/intent/tweet?text=Manage BNS Names&url=https://docs.blockstack.org/core/naming/manage.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -511,74 +576,6 @@ document for details on how to construct this transaction.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

143
_site/core/naming/namespaces.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Understand Namespaces | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Understand Namespaces" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/naming/namespaces.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/naming/namespaces.html","headline":"Understand Namespaces","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/namespaces.html"},"description":"Understand Namespaces","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/namespaces.html","headline":"Understand Namespaces","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/namespaces.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Understand Namespaces","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/namespaces.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -427,6 +427,71 @@ between these name objects is presented below:</p>
<a href="https://twitter.com/intent/tweet?text=Understand Namespaces&url=https://docs.blockstack.org/core/naming/namespaces.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -525,74 +590,6 @@ between these name objects is presented below:</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

198
_site/core/naming/pickname.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Choose a name | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Choose a name" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/naming/pickname.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/naming/pickname.html","headline":"Choose a name","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/pickname.html"},"description":"Choose a name","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/pickname.html","headline":"Choose a name","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/pickname.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Choose a name","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/pickname.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -292,10 +292,10 @@ following sections:</p>
<ul id="markdown-toc">
<li><a href="#intended-uses-for-a-namespace" id="markdown-toc-intended-uses-for-a-namespace">Intended uses for a namespace</a></li>
<li><a href="#list-all-namespaces-in-existence-reference" id="markdown-toc-list-all-namespaces-in-existence-reference">List all namespaces in existence (reference).</a></li>
<li><a href="#list-all-names-within-a-namespace-reference" id="markdown-toc-list-all-names-within-a-namespace-reference">List all names within a namespace (reference)</a></li>
<li><a href="#get-the-cost-to-register-a-namespace-reference" id="markdown-toc-get-the-cost-to-register-a-namespace-reference">Get the Cost to Register a Namespace (reference)</a></li>
<li><a href="#getting-the-current-consensus-hash-reference" id="markdown-toc-getting-the-current-consensus-hash-reference">Getting the Current Consensus Hash (reference)</a></li>
<li><a href="#list-all-namespaces-in-existence-reference" id="markdown-toc-list-all-namespaces-in-existence-reference">List all namespaces in existence (<a href="https://core.blockstack.org/#namespace-operations-get-all-namespaces" target="\_blank">reference</a>).</a></li>
<li><a href="#list-all-names-within-a-namespace-reference" id="markdown-toc-list-all-names-within-a-namespace-reference">List all names within a namespace (<a href="https://core.blockstack.org/#namespace-operations-get-all-namespaces" target="\_blank">reference</a>).</a></li>
<li><a href="#get-the-cost-to-register-a-namespace-reference" id="markdown-toc-get-the-cost-to-register-a-namespace-reference">Get the Cost to Register a Namespace (<a href="https://core.blockstack.org/#price-checks-get-namespace-price" target="\_blank">reference</a>).</a></li>
<li><a href="#getting-the-current-consensus-hash-reference" id="markdown-toc-getting-the-current-consensus-hash-reference">Getting the Current Consensus Hash (<a href="https://core.blockstack.org/#blockchain-operations-get-consensus-hash" target="\_blank">reference</a>).</a></li>
<li><a href="#create-a-namespace" id="markdown-toc-create-a-namespace">Create a namespace</a></li>
</ul>
@ -305,13 +305,14 @@ following sections:</p>
namespace for its own purposes. Applications can use namespaces for things like:</p>
<ul>
<li>Giving users a SSO system, where each user registers their public key under a
<li>
<p>Giving users a SSO system, where each user registers their public key under a
username. Blockstack applications do this with names in the <code class="highlighter-rouge">.id</code> namespace,
for example.</li>
for example.</p>
</li>
<li>Providing a subscription service, where each name is a 3rd party that provides
a service for users to subscribe to. For example, names in
<code class="highlighter-rouge">.podcast</code> point to podcasts that users of the
<a href="https://dotpodcast.co">DotPodcast</a> app can subscribe to.</li>
<code class="highlighter-rouge">.podcast</code> point to podcasts that users of the <a href="https://dotpodcast.co" target="\_blank">DotPodcast</a> app can subscribe to.</li>
<li>Implementing software licenses, where each name corresponds to an access key.
Unlike conventional access keys, access keys implemented as names
can be sold and traded independently. The licensing fee (paid as a name
@ -327,20 +328,19 @@ gives them a way to measure economic activity.</p>
<p>Developers can query individual namespaces and look up names within them using
the BNS API.</p>
<h2 id="list-all-namespaces-in-existence-reference">List all namespaces in existence (<a href="https://core.blockstack.org/#namespace-operations-get-all-namespaces">reference</a>).</h2>
<h2 id="list-all-namespaces-in-existence-reference">List all namespaces in existence (<a href="https://core.blockstack.org/#namespace-operations-get-all-namespaces" target="\_blank">reference</a>).</h2>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl https://core.blockstack.org/v1/namespaces
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>curl https://core.blockstack.org/v1/namespaces
<span class="o">[</span>
<span class="s2">"id"</span>,
<span class="s2">"helloworld"</span>,
<span class="s2">"podcast"</span>
<span class="o">]</span>
</code></pre>
</div>
</code></pre></div></div>
<h2 id="list-all-names-within-a-namespace-reference">List all names within a namespace (<a href="https://core.blockstack.org/#namespace-operations-get-all-namespaces">reference</a>)</h2>
<h2 id="list-all-names-within-a-namespace-reference">List all names within a namespace (<a href="https://core.blockstack.org/#namespace-operations-get-all-namespaces" target="\_blank">reference</a>).</h2>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl https://core.blockstack.org/v1/namespaces/id/names?page<span class="o">=</span>0
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>curl https://core.blockstack.org/v1/namespaces/id/names?page<span class="o">=</span>0
<span class="o">[</span>
<span class="s2">"0.id"</span>,
<span class="s2">"0000.id"</span>,
@ -364,30 +364,27 @@ the BNS API.</p>
<span class="s2">"0nename.id"</span>
...
<span class="o">]</span>
</code></pre>
</div>
</code></pre></div></div>
<p>Each page returns a batch of 100 names.</p>
<h2 id="get-the-cost-to-register-a-namespace-reference">Get the Cost to Register a Namespace (<a href="https://core.blockstack.org/#price-checks-get-namespace-price">reference</a>)</h2>
<h2 id="get-the-cost-to-register-a-namespace-reference">Get the Cost to Register a Namespace (<a href="https://core.blockstack.org/#price-checks-get-namespace-price" target="\_blank">reference</a>).</h2>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl https://core.blockstack.org/v1/prices/namespaces/test
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>curl https://core.blockstack.org/v1/prices/namespaces/test
<span class="o">{</span>
<span class="s2">"satoshis"</span>: 40000000
<span class="o">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>If you want to register a namespace, please see the <a href="/core/naming/namespace.html">namespace creation section</a>.</p>
<h2 id="getting-the-current-consensus-hash-reference">Getting the Current Consensus Hash (<a href="https://core.blockstack.org/#blockchain-operations-get-consensus-hash">reference</a>)</h2>
<h2 id="getting-the-current-consensus-hash-reference">Getting the Current Consensus Hash (<a href="https://core.blockstack.org/#blockchain-operations-get-consensus-hash" target="\_blank">reference</a>).</h2>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl -sL https://core.blockstack.org/v1/blockchains/bitcoin/consensus
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>curl <span class="nt">-sL</span> https://core.blockstack.org/v1/blockchains/bitcoin/consensus
<span class="o">{</span>
<span class="s2">"consensus_hash"</span>: <span class="s2">"98adf31989bd937576aa190cc9f5fa3a"</span>
<span class="o">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>A recent consensus hash is required to create a <code class="highlighter-rouge">NAMESPACE_PREORDER</code> transaction. The reference
BNS clients do this automatically. See the <a href="/core/wire-format.html">transaction format</a>
@ -400,7 +397,7 @@ transaction.</p>
<ol>
<li>
<p><strong>Send a <code class="highlighter-rouge">NAMESPACE_PREORDER</code> transaction</strong> (<a href="https://www.blocktrail.com/BTC/tx/5f00b8e609821edd6f3369ee4ee86e03ea34b890e242236cdb66ef6c9c6a1b28">live example</a>).
<p><strong>Send a <code class="highlighter-rouge">NAMESPACE_PREORDER</code> transaction</strong> (<a href="https://www.blocktrail.com/BTC/tx/5f00b8e609821edd6f3369ee4ee86e03ea34b890e242236cdb66ef6c9c6a1b28" target="\_blank">live example</a>).
This is the first step. This registers the <em>salted hash</em> of the namespace with BNS nodes, and burns the
requisite amount of cryptocurrency. In addition, it proves to the
BNS nodes that user has honored the BNS consensus rules by including
@ -408,7 +405,7 @@ a recent <em>consensus hash</em> in the transaction
(see the section on <a href="#bns-forks">BNS forks</a> for details).</p>
</li>
<li>
<p><strong>Send a <code class="highlighter-rouge">NAMESPACE_REVEAL</code> transaction</strong> (<a href="https://www.blocktrail.com/BTC/tx/ab54b1c1dd5332dc86b24ca2f88b8ca0068485edf0c322416d104c5b84133a32">live example</a>).
<p><strong>Send a <code class="highlighter-rouge">NAMESPACE_REVEAL</code> transaction</strong> (<a href="https://www.blocktrail.com/BTC/tx/ab54b1c1dd5332dc86b24ca2f88b8ca0068485edf0c322416d104c5b84133a32" target="\_blank">live example</a>).
This is the second step. This reveals the salt and the namespace ID (pairing it with its
<code class="highlighter-rouge">NAMESPACE_PREORDER</code>), it reveals how long names last in this namespace before
they expire or must be renewed, and it sets a <em>price function</em> for the namespace
@ -420,13 +417,13 @@ has the option to collect name registration fees for the first year of the
namespace’s existence by setting a <em>namespace creator address</em>.</p>
</li>
<li>
<p><strong>Seed the namespace with <code class="highlighter-rouge">NAME_IMPORT</code> transactions</strong> (<a href="https://www.blocktrail.com/BTC/tx/c698ac4b4a61c90b2c93dababde867dea359f971e2efcf415c37c9a4d9c4f312">live example</a>).
<p><strong>Seed the namespace with <code class="highlighter-rouge">NAME_IMPORT</code> transactions</strong> (<a href="https://www.blocktrail.com/BTC/tx/c698ac4b4a61c90b2c93dababde867dea359f971e2efcf415c37c9a4d9c4f312" target="\_blank">live example</a>).
Once the namespace has been revealed, the user has the option to populate it with a set of
names. Each imported name is given both an owner and some off-chain state.
This step is optional—namespace creators are not required to import names.</p>
</li>
<li>
<p><strong>Send a <code class="highlighter-rouge">NAMESPACE_READY</code> transaction</strong> (<a href="https://www.blocktrail.com/BTC/tx/2bf9a97e3081886f96c4def36d99a677059fafdbd6bdb6d626c0608a1e286032">live example</a>).
<p><strong>Send a <code class="highlighter-rouge">NAMESPACE_READY</code> transaction</strong> (<a href="https://www.blocktrail.com/BTC/tx/2bf9a97e3081886f96c4def36d99a677059fafdbd6bdb6d626c0608a1e286032" target="\_blank">live example</a>).
This is the final step of the process. It <em>launches</em> the namespace, which makes it available to the
public. Once a namespace is ready, anyone can register a name in it if they
pay the appropriate amount of cryptocurrency (according to the price funtion
@ -450,7 +447,7 @@ create the same namespace, the one that successfully confirms both the
do this, then the namespace they created disappears (along with all the names
they imported).</p>
<p>Developers wanting to create their own namespaces should read the <a href="/core/naming/namespace.html">namespace creation section</a> document. It is highly recommended that
<p>Developers wanting to create their own namespaces should read the <a href="/core/naming/namespaces.html">namespace creation section</a> document. It is highly recommended that
developers request individual support before creating their own space, given the large amount of
cryptocurrency at stake.</p>
@ -458,6 +455,71 @@ cryptocurrency at stake.</p>
<a href="https://twitter.com/intent/tweet?text=Choose a name&url=https://docs.blockstack.org/core/naming/pickname.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -556,74 +618,6 @@ cryptocurrency at stake.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

153
_site/core/naming/register.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Register a name | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Register a name" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/naming/register.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/naming/register.html","headline":"Register a name","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/register.html"},"description":"Register a name","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/register.html","headline":"Register a name","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/register.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Register a name","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/register.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -367,13 +367,12 @@ ignored.</p>
<h2 id="getting-a-names-registration-fee-reference">Getting a Name’s Registration Fee (<a href="https://core.blockstack.org/#price-checks-get-name-price">reference</a>)</h2>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl -sL https://core.blockstack.org/v1/prices/names/helloworld.id | jq -r <span class="s2">".name_price"</span>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>curl <span class="nt">-sL</span> https://core.blockstack.org/v1/prices/names/helloworld.id | jq <span class="nt">-r</span> <span class="s2">".name_price"</span>
<span class="o">{</span>
<span class="s2">"btc"</span>: 2.5e-05,
<span class="s2">"satoshis"</span>: 2500
<span class="o">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>Note the use of <code class="highlighter-rouge">jq -r</code> to select the <code class="highlighter-rouge">"name_price"</code> field. This API
endpoint may return other ancilliary data regarding transaction fee estimation,
@ -381,12 +380,11 @@ but this is the only field guaranteed by this specification to be present.</p>
<h2 id="getting-the-current-consensus-hash-reference">Getting the Current Consensus Hash (<a href="https://core.blockstack.org/#blockchain-operations-get-consensus-hash">reference</a>)</h2>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl -sL https://core.blockstack.org/v1/blockchains/bitcoin/consensus
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>curl <span class="nt">-sL</span> https://core.blockstack.org/v1/blockchains/bitcoin/consensus
<span class="o">{</span>
<span class="s2">"consensus_hash"</span>: <span class="s2">"98adf31989bd937576aa190cc9f5fa3a"</span>
<span class="o">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>The consensus hash must be included in the <code class="highlighter-rouge">NAME_PREORDER</code> transaction. The BNS
clients do this automatically. See the <a href="/core/wire-format.html">transaction format
@ -409,6 +407,71 @@ dynamically and automatically, and broadcast both the <code class="highlighter-r
<a href="https://twitter.com/intent/tweet?text=Register a name&url=https://docs.blockstack.org/core/naming/register.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -507,74 +570,6 @@ dynamically and automatically, and broadcast both the <code class="highlighter-r
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

163
_site/core/naming/resolving.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Resolve a name | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Resolve a name" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/naming/resolving.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/naming/resolving.html","headline":"Resolve a name","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/resolving.html"},"description":"Resolve a name","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/resolving.html","headline":"Resolve a name","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/resolving.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Resolve a name","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/resolving.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -384,7 +384,7 @@ to do the following:</p>
<h2 id="look-up-a-names-public-key-and-zone-file-reference">Look up a name’s public key and zone file (<a href="https://core.blockstack.org/#name-querying-get-name-info">reference</a>)</h2>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl https://core.blockstack.org/v1/names/muneeb.id
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>curl https://core.blockstack.org/v1/names/muneeb.id
<span class="o">{</span>
<span class="s2">"address"</span>: <span class="s2">"1J3PUxY5uDShUnHRrMyU6yKtoHEUPhKULs"</span>,
<span class="s2">"blockchain"</span>: <span class="s2">"bitcoin"</span>,
@ -394,15 +394,14 @@ to do the following:</p>
<span class="s2">"zonefile"</span>: <span class="s2">"</span><span class="nv">$ORIGIN</span><span class="s2"> muneeb.id</span><span class="se">\n</span><span class="nv">$TTL</span><span class="s2"> 3600</span><span class="se">\n</span><span class="s2">_http._tcp URI 10 1 </span><span class="se">\"</span><span class="s2">https://gaia.blockstack.org/hub/1J3PUxY5uDShUnHRrMyU6yKtoHEUPhKULs/0/profile.json</span><span class="se">\"\n</span><span class="s2">"</span>,
<span class="s2">"zonefile_hash"</span>: <span class="s2">"37aecf837c6ae9bdc9dbd98a268f263dacd00361"</span>
<span class="o">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>Note that the <code class="highlighter-rouge">zonefile</code> field is given with the off-chain data that hashes
to the <code class="highlighter-rouge">zonefile_hash</code> field.</p>
<h2 id="list-all-names-the-node-knows-about-reference">List all names the node knows about (<a href="https://core.blockstack.org/#name-querying-get-all-names">reference</a>)</h2>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl https://core.blockstack.org/v1/names?page<span class="o">=</span>0
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>curl https://core.blockstack.org/v1/names?page<span class="o">=</span>0
<span class="o">[</span>
<span class="s2">"judecn.id"</span>,
<span class="s2">"3.id"</span>,
@ -420,8 +419,7 @@ to the <code class="highlighter-rouge">zonefile_hash</code> field.</p>
<span class="s2">"df.id"</span>,
...
<span class="o">]</span>
</code></pre>
</div>
</code></pre></div></div>
<p>Each page returns 100 names. While no specific ordering is mandated by the
protocol, the reference implementation orders names by their order of creation
@ -429,7 +427,7 @@ in the blockchain.</p>
<h2 id="look-up-the-history-of-states-a-name-was-in-reference">Look up the history of states a name was in (<a href="https://core.blockstack.org/#name-querying-name-history">reference</a>)</h2>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl https://core.blockstack.org/v1/names/patrickstanley.id/history
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>curl https://core.blockstack.org/v1/names/patrickstanley.id/history
<span class="o">{</span>
<span class="s2">"445838"</span>: <span class="o">[</span>
<span class="o">{</span>
@ -532,8 +530,7 @@ in the blockchain.</p>
<span class="o">}</span>
<span class="o">]</span>
<span class="o">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>All of the above information is extracted from the blockchain. Each top-level
field encodes the states the name transitioned to at the given block height (e.g.
@ -557,7 +554,7 @@ under its previous owner, if the name expired and was reregistered.</p>
<h2 id="look-up-the-list-of-names-owned-by-a-given-public-key-hash-reference">Look up the list of names owned by a given public key hash (<a href="https://core.blockstack.org/#name-querying-get-names-owned-by-address">reference</a>)</h2>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl https://core.blockstack.org/v1/addresses/bitcoin/16EMaNw3pkn3v6f2BgnSSs53zAKH4Q8YJg
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>curl https://core.blockstack.org/v1/addresses/bitcoin/16EMaNw3pkn3v6f2BgnSSs53zAKH4Q8YJg
<span class="o">{</span>
<span class="s2">"names"</span>: <span class="o">[</span>
<span class="s2">"judecn.id"</span>,
@ -569,8 +566,7 @@ under its previous owner, if the name expired and was reregistered.</p>
<span class="s2">"jude.statism.id"</span>
<span class="o">]</span>
<span class="o">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>Note that this API endpoint includes names and
<a href="#bns-subdomains">subdomains</a>.</p>
@ -579,6 +575,71 @@ under its previous owner, if the name expired and was reregistered.</p>
<a href="https://twitter.com/intent/tweet?text=Resolve a name&url=https://docs.blockstack.org/core/naming/resolving.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -677,74 +738,6 @@ under its previous owner, if the name expired and was reregistered.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

309
_site/core/naming/search.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>How to build a Profile Search Index | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="How to build a Profile Search Index" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/naming/search.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/naming/search.html","headline":"How to build a Profile Search Index","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/search.html"},"description":"How to build a Profile Search Index","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/search.html","headline":"How to build a Profile Search Index","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/search.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"How to build a Profile Search Index","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/search.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -305,9 +305,8 @@ with data that follows structure of <a href="https://github.com/blockstack/block
<p>In early 2017, the search subsystem was ported over to the new API system, where support for search is provided by the endpoint:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>http://localhost:5000/search?query=&lt;SEARCH_PATTERN&gt;
</code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>http://localhost:5000/search?query=&lt;SEARCH_PATTERN&gt;
</code></pre></div></div>
<p>This document describes how to setup the search subsystem to respond at that endpoint.</p>
@ -316,15 +315,14 @@ with data that follows structure of <a href="https://github.com/blockstack/block
<ul>
<li><strong>Step 1:</strong> First, make sure you have <a href="http://docs.python-guide.org/en/latest/dev/virtualenvs/">virtualenv installed</a>.
Then, setup the API and search subsystem:
<div class="highlighter-rouge"><pre class="highlight"><code>$ sudo apt-get install -y mongodb memcached python-dev libmemcached-dev zlib1g-dev nginx
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt-get install -y mongodb memcached python-dev libmemcached-dev zlib1g-dev nginx
$ sudo pip install uwsgi
$ git clone https://github.com/blockstack/blockstack-core.git --branch api
$ cd blockstack-core/
$ sudo pip install .
$ sudo pip install -r api/requirements.txt
$ sudo mkdir /var/blockstack-search &amp;&amp; sudo chown $USER:$USER /var/blockstack-search
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p><strong>Step 2:</strong> Make sure you have Blockstack Core running locally (see <a href="https://github.com/blockstack/blockstack-core/blob/master/README.md#quick-start">instructions</a>). We highly
@ -334,38 +332,34 @@ Blockstack Core for re-indexing and remote nodes can slow down performance.</p>
<li><strong>Step 3:</strong> Fetch the data for the .id namespace and respective profiles. Note, you may want to redirect stderr to a file, as there is a lot of debug output.</li>
</ul>
<div class="highlighter-rouge"><pre class="highlight"><code>$ cd api/
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ cd api/
$ python -m search.fetch_data --fetch_namespace
$ python -m search.fetch_data --fetch_profiles
</code></pre>
</div>
</code></pre></div></div>
<ul>
<li><strong>Step 4:</strong> Create the search index:</li>
</ul>
<div class="highlighter-rouge"><pre class="highlight"><code>python -m search.basic_index --refresh
</code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>python -m search.basic_index --refresh
</code></pre></div></div>
<ul>
<li><strong>Step 5:</strong> Enable search API endpoint:</li>
</ul>
<div class="highlighter-rouge"><pre class="highlight"><code>$ sed -i 's/SEARCH_API_ENDPOINT_ENABLED \= False/SEARCH_API_ENDPOINT_ENABLED \= True/' config.py
</code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sed -i 's/SEARCH_API_ENDPOINT_ENABLED \= False/SEARCH_API_ENDPOINT_ENABLED \= True/' config.py
</code></pre></div></div>
<h1 id="usage">Usage</h1>
<p>You can quickly test the search index from the command line:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>python -m search.substring_search --search_name "Fred Wil"
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>python -m search.substring_search --search_name "Fred Wil"
python -m search.substring_search --search_twitter fredwil
</code></pre>
</div>
</code></pre></div></div>
<p>You can also use the search API end-point:</p>
@ -375,70 +369,68 @@ python -m search.substring_search --search_twitter fredwil
<p>Sample Response:</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nt">"people"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nt">"profile"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nt">"website"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nt">"url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://muneebali.com"</span><span class="p">,</span><span class="w">
</span><span class="nt">"@type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"WebSite"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">],</span><span class="w">
</span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Muneeb Ali"</span><span class="p">,</span><span class="w">
</span><span class="nt">"address"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nt">"addressLocality"</span><span class="p">:</span><span class="w"> </span><span class="s2">"New York, NY"</span><span class="p">,</span><span class="w">
</span><span class="nt">"@type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"PostalAddress"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nt">"image"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nt">"contentUrl"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://s3.amazonaws.com/dx3/muneeb"</span><span class="p">,</span><span class="w">
</span><span class="nt">"@type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ImageObject"</span><span class="p">,</span><span class="w">
</span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"cover"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nt">"contentUrl"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://s3.amazonaws.com/kd4/muneeb"</span><span class="p">,</span><span class="w">
</span><span class="nt">"@type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ImageObject"</span><span class="p">,</span><span class="w">
</span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"avatar"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">],</span><span class="w">
</span><span class="nt">"@type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Person"</span><span class="p">,</span><span class="w">
</span><span class="nt">"description"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Co-founder of Blockstack. Interested in distributed systems and blockchains. Previously, PhD at Princeton."</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nt">"username"</span><span class="p">:</span><span class="w"> </span><span class="s2">"muneeb"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nt">"profile"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nt">"message"</span><span class="p">:</span><span class="w"> </span><span class="s2">"This blockchain ID is reserved for Muneeb Ali. If this is you, please email support@onename.com to claim it for free."</span><span class="p">,</span><span class="w">
</span><span class="nt">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"reserved"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nt">"username"</span><span class="p">:</span><span class="w"> </span><span class="s2">"muneebali"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nt">"profile"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nt">"cover"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nt">"url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://s3.amazonaws.com/97p/HHE.jpg"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nt">"v"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0.2"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nt">"username"</span><span class="p">:</span><span class="w"> </span><span class="s2">"muneebali1"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{
"people": [
{
"profile": {
"website": [
{
"url": "http://muneebali.com",
"@type": "WebSite"
}
],
"name": "Muneeb Ali",
"address": {
"addressLocality": "New York, NY",
"@type": "PostalAddress"
},
"image": [
{
"contentUrl": "https://s3.amazonaws.com/dx3/muneeb",
"@type": "ImageObject",
"name": "cover"
},
{
"contentUrl": "https://s3.amazonaws.com/kd4/muneeb",
"@type": "ImageObject",
"name": "avatar"
}
],
"@type": "Person",
"description": "Co-founder of Blockstack. Interested in distributed systems and blockchains. Previously, PhD at Princeton."
},
"username": "muneeb"
},
{
"profile": {
"message": "This blockchain ID is reserved for Muneeb Ali. If this is you, please email support@onename.com to claim it for free.",
"status": "reserved"
},
"username": "muneebali"
},
{
"profile": {
"cover": {
"url": "https://s3.amazonaws.com/97p/HHE.jpg"
},
"v": "0.2"
},
"username": "muneebali1"
}
]
}
</code></pre></div></div>
<h2 id="enabling-elastic-search">Enabling Elastic Search</h2>
<h3 id="requirements">Requirements:</h3>
<div class="highlighter-rouge"><pre class="highlight"><code>sudo apt-get install mongodb
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get install mongodb
sudo apt-get install memcached libmemcached-dev
sudo apt-get install python2.7-dev
pip install -r requirements.txt
</code></pre>
</div>
</code></pre></div></div>
<h3 id="elastic-search">Elastic Search</h3>
@ -455,10 +447,9 @@ pip install -r requirements.txt
<p>Ensure that mongodb and elastic search are running
starting elastic search:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>$elasticsearch (on mac)
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$elasticsearch (on mac)
bin/elasticsearch -d (on linux)
</code></pre>
</div>
</code></pre></div></div>
<p>To test if elastic search is running:</p>
@ -468,17 +459,16 @@ bin/elasticsearch -d (on linux)
<p>returns:</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nt">"ok"</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
</span><span class="nt">"status"</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="mi">200</span><span class="p">,</span><span class="w">
</span><span class="nt">"name"</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="s2">"Angler"</span><span class="p">,</span><span class="w">
</span><span class="nt">"version"</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nt">"number"</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="s2">"0.90.2"</span><span class="p">,</span><span class="w">
</span><span class="nt">"snapshot_build"</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
</span><span class="nt">"lucene_version"</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="s2">"4.3.1"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span></code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{
"ok" : true,
"status" : 200,
"name" : "Angler",
"version" : {
"number" : "0.90.2",
"snapshot_build" : false,
"lucene_version" : "4.3.1"
},
</code></pre></div></div>
<p>Create Index:</p>
@ -490,6 +480,71 @@ bin/elasticsearch -d (on linux)
<a href="https://twitter.com/intent/tweet?text=How to build a Profile Search Index&url=https://docs.blockstack.org/core/naming/search.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -588,74 +643,6 @@ bin/elasticsearch -d (on linux)
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

173
_site/core/naming/subdomains.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>BNS Subdomains | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="BNS Subdomains" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/naming/subdomains.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/naming/subdomains.html","headline":"BNS Subdomains","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/subdomains.html"},"description":"BNS Subdomains","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/subdomains.html","headline":"BNS Subdomains","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/subdomains.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"BNS Subdomains","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/subdomains.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -342,7 +342,7 @@ stored.</p>
<p>For example, the name <code class="highlighter-rouge">verified.podcast</code> once wrote the zone file hash <code class="highlighter-rouge">247121450ca0e9af45e85a82e61cd525cd7ba023</code>,
which is the hash of the following zone file:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl -sL https://core.blockstack.org/v1/names/verified.podcast/zonefile/247121450ca0e9af45e85a82e61cd525cd7ba023 | jq -r <span class="s1">'.zonefile'</span>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>curl <span class="nt">-sL</span> https://core.blockstack.org/v1/names/verified.podcast/zonefile/247121450ca0e9af45e85a82e61cd525cd7ba023 | jq <span class="nt">-r</span> <span class="s1">'.zonefile'</span>
<span class="nv">$ORIGIN</span> verified.podcast
<span class="nv">$TTL</span> 3600
1yeardaily TXT <span class="s2">"owner=1MwPD6dH4fE3gQ9mCov81L1DEQWT7E85qH"</span> <span class="s2">"seqn=0"</span> <span class="s2">"parts=1"</span> <span class="s2">"zf0=JE9SSUdJTiAxeWVhcmRhaWx5CiRUVEwgMzYwMApfaHR0cC5fdGNwIFVSSSAxMCAxICJodHRwczovL3BoLmRvdHBvZGNhc3QuY28vMXllYXJkYWlseS9oZWFkLmpzb24iCg=="</span>
@ -355,13 +355,12 @@ onea TXT <span class="s2">"owner=1MwPD6dH4fE3gQ9mCov81L1DEQWT7E85qH"</span> <spa
10minuteteacher TXT <span class="s2">"owner=1MwPD6dH4fE3gQ9mCov81L1DEQWT7E85qH"</span> <span class="s2">"seqn=0"</span> <span class="s2">"parts=1"</span> <span class="s2">"zf0=JE9SSUdJTiAxMG1pbnV0ZXRlYWNoZXIKJFRUTCAzNjAwCl9odHRwLl90Y3AgVVJJIDEwIDEgImh0dHBzOi8vcGguZG90cG9kY2FzdC5jby8xMG1pbnV0ZXRlYWNoZXIvaGVhZC5qc29uIgo="</span>
36questionsthepodcastmusical TXT <span class="s2">"owner=1MwPD6dH4fE3gQ9mCov81L1DEQWT7E85qH"</span> <span class="s2">"seqn=0"</span> <span class="s2">"parts=1"</span> <span class="s2">"zf0=JE9SSUdJTiAzNnF1ZXN0aW9uc3RoZXBvZGNhc3RtdXNpY2FsCiRUVEwgMzYwMApfaHR0cC5fdGNwIFVSSSAxMCAxICJodHRwczovL3BoLmRvdHBvZGNhc3QuY28vMzZxdWVzdGlvbnN0aGVwb2RjYXN0bXVzaWNhbC9oZWFkLmpzb24iCg=="</span>
_http._tcp URI 10 1 <span class="s2">"https://dotpodcast.co/"</span>
</code></pre>
</div>
</code></pre></div></div>
<p>Each <code class="highlighter-rouge">TXT</code> record in this zone file encodes a subdomain-creation.
For example, <code class="highlighter-rouge">1yeardaily.verified.podcast</code> resolves to:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl https://core.blockstack.org/v1/names/1yeardaily.verified.podcast
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>curl https://core.blockstack.org/v1/names/1yeardaily.verified.podcast
<span class="o">{</span>
<span class="s2">"address"</span>: <span class="s2">"1MwPD6dH4fE3gQ9mCov81L1DEQWT7E85qH"</span>,
<span class="s2">"blockchain"</span>: <span class="s2">"bitcoin"</span>,
@ -370,8 +369,7 @@ For example, <code class="highlighter-rouge">1yeardaily.verified.podcast</code>
<span class="s2">"zonefile_hash"</span>: <span class="s2">"e7acc97fd42c48ed94fd4d41f674eddbee5557e3"</span>,
<span class="s2">"zonefile_txt"</span>: <span class="s2">"</span><span class="nv">$ORIGIN</span><span class="s2"> 1yeardaily</span><span class="se">\n</span><span class="nv">$TTL</span><span class="s2"> 3600</span><span class="se">\n</span><span class="s2">_http._tcp URI 10 1 </span><span class="se">\"</span><span class="s2">https://ph.dotpodcast.co/1yeardaily/head.json</span><span class="se">\"\n</span><span class="s2">"</span>
<span class="o">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>This information was extracted from the <code class="highlighter-rouge">1yeardaily</code> <code class="highlighter-rouge">TXT</code> resource record in the zone
file for <code class="highlighter-rouge">verified.podcast</code>.</p>
@ -386,7 +384,7 @@ updates; only the owner of <code class="highlighter-rouge">1yeardaily.verified.p
<p>The lifecycle of a subdomain and its operations is shown in Figure 2.</p>
<div class="highlighter-rouge"><pre class="highlight"><code> subdomain subdomain subdomain
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> subdomain subdomain subdomain
creation update transfer
+----------------+ +----------------+ +----------------+
| cicero | | cicero | | cicero |
@ -418,8 +416,7 @@ Thesubdomain-creation and subdomain-transfer transactions for
"cicero.res_publica.id" are broadcast by the owner of "res_publica.id".
However, any on-chain name ("jude.id" in this case) can broadcast a subdomain
update for "cicero.res_publica.id".
</code></pre>
</div>
</code></pre></div></div>
<p>Subdomain operations are ordered by sequence number, starting at 0. Each new
subdomain operation must include:</p>
@ -447,7 +444,7 @@ Using the BNS API, a developer can:</p>
<h3 id="look-up-a-subdomains-public-key-and-zone-file-reference">Look up a subdomain’s public key and zone file (<a href="https://core.blockstack.org/#name-querying-get-name-info">reference</a>)</h3>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl https://core.blockstack.org/v1/names/aaron.personal.id
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>curl https://core.blockstack.org/v1/names/aaron.personal.id
<span class="o">{</span>
<span class="s2">"address"</span>: <span class="s2">"1PwztPFd1s2STMv4Ntq6UPBdYgHSBr5pdF"</span>,
<span class="s2">"blockchain"</span>: <span class="s2">"bitcoin"</span>,
@ -456,12 +453,11 @@ Using the BNS API, a developer can:</p>
<span class="s2">"zonefile_hash"</span>: <span class="s2">"a6dda6b74ffecf85f4a162627d8df59577243813"</span>,
<span class="s2">"zonefile_txt"</span>: <span class="s2">"</span><span class="nv">$ORIGIN</span><span class="s2"> aaron.personal.id</span><span class="se">\n</span><span class="nv">$TTL</span><span class="s2"> 3600</span><span class="se">\n</span><span class="s2">_https._tcp URI 10 1 </span><span class="se">\"</span><span class="s2">https://gaia.blockstack.org/hub/1PwztPFd1s2STMv4Ntq6UPBdYgHSBr5pdF/profile.json</span><span class="se">\"\n</span><span class="s2">"</span>
<span class="o">}</span>
</code></pre>
</div>
</code></pre></div></div>
<h3 id="look-up-a-subdomains-transaction-history-reference">Look up a subdomain’s transaction history (<a href="https://core.blockstack.org/#name-querying-name-history">reference</a>)</h3>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl https://core.blockstack.org/v1/names/aaron.personal.id/history
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>curl https://core.blockstack.org/v1/names/aaron.personal.id/history
<span class="o">{</span>
<span class="s2">"509981"</span>: <span class="o">[</span>
<span class="o">{</span>
@ -476,19 +472,17 @@ Using the BNS API, a developer can:</p>
<span class="o">}</span>
<span class="o">]</span>
<span class="o">}</span>
</code></pre>
</div>
</code></pre></div></div>
<h3 id="look-up-the-list-of-names-and-subdomains-owned-by-a-given-public-key-hash-reference">Look up the list of names and subdomains owned by a given public key hash (<a href="https://core.blockstack.org/#name-querying-get-names-owned-by-address">reference</a>)</h3>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl https://core.blockstack.org/v1/addresses/bitcoin/1PwztPFd1s2STMv4Ntq6UPBdYgHSBr5pdF
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>curl https://core.blockstack.org/v1/addresses/bitcoin/1PwztPFd1s2STMv4Ntq6UPBdYgHSBr5pdF
<span class="o">{</span>
<span class="s2">"names"</span>: <span class="o">[</span>
<span class="s2">"aaron.personal.id"</span>
<span class="o">]</span>
<span class="o">}</span>
</code></pre>
</div>
</code></pre></div></div>
<h2 id="subdomain-creation-and-management">Subdomain Creation and Management</h2>
@ -549,6 +543,71 @@ details on how to use it.</p>
<a href="https://twitter.com/intent/tweet?text=BNS Subdomains&url=https://docs.blockstack.org/core/naming/subdomains.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -647,74 +706,6 @@ details on how to use it.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

284
_site/core/naming/tutorial_subdomains.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Subdomain Design and Implementation | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Subdomain Design and Implementation" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/naming/tutorial_subdomains.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/naming/tutorial_subdomains.html","headline":"Subdomain Design and Implementation","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/tutorial_subdomains.html"},"description":"Subdomain Design and Implementation","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/tutorial_subdomains.html","headline":"Subdomain Design and Implementation","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/tutorial_subdomains.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Subdomain Design and Implementation","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/tutorial_subdomains.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -359,13 +359,12 @@ so we chop up the zonefile.</li>
<li><strong>sig</strong>: signature of the above data.</li>
</ol>
<div class="highlighter-rouge"><pre class="highlight"><code>$ORIGIN bar.id
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ORIGIN bar.id
$TTL 3600
pubkey TXT "pubkey:data:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
registrar URI 10 1 "bsreg://foo.com:8234"
aaron TXT "owner=33VvhhSQsYQyCVE2VzG3EHa9gfRCpboqHy" "seqn=0" "parts=1" "zf0=JE9SSUdJTiBhYXJvbgokVFRMIDM2MDAKbWFpbiBVUkkgMSAxICJwdWJrZXk6ZGF0YTowMzAyYWRlNTdlNjNiMzc1NDRmOGQ5Nzk4NjJhNDlkMDBkYmNlMDdmMjkzYmJlYjJhZWNmZTI5OTkxYTg3Mzk4YjgiCg=="
</code></pre>
</div>
</code></pre></div></div>
<p>The <code class="highlighter-rouge">registrar</code> entry indicates how to contact the registrar service
for clients of the domain wishing to register or modify their entry.</p>
@ -379,9 +378,8 @@ for clients of the domain wishing to register or modify their entry.</p>
<p>The directory <code class="highlighter-rouge">subdomain_registrar/</code> contains our code for running a
subdomain registrar. It can be executed by running:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>$ blockstack-subdomain-registrar start foo.id
</code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ blockstack-subdomain-registrar start foo.id
</code></pre></div></div>
<p>Here, <code class="highlighter-rouge">foo.id</code> is the domain for which subdomains will be associated.</p>
@ -398,35 +396,33 @@ subdomain registrar. It can be executed by running:</p>
<p>Subdomain registrations can be submitted to this endpoint using a REST
API.</p>
<div class="highlighter-rouge"><pre class="highlight"><code>POST /register
</code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>POST /register
</code></pre></div></div>
<p>The schema for registration is:</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="err">'type'</span><span class="w"> </span><span class="err">:</span><span class="w"> </span><span class="err">'object',</span><span class="w">
</span><span class="err">'properties'</span><span class="w"> </span><span class="err">:</span><span class="w"> </span><span class="err">{</span><span class="w">
</span><span class="err">'name'</span><span class="w"> </span><span class="err">:</span><span class="w"> </span><span class="err">{</span><span class="w">
</span><span class="err">'type':</span><span class="w"> </span><span class="err">'string',</span><span class="w">
</span><span class="err">'pattern':</span><span class="w"> </span><span class="err">'([a-z0-9\-_+]{3,36</span><span class="p">}</span><span class="err">)$'</span><span class="w">
</span><span class="err">},</span><span class="w">
</span><span class="err">'owner_address'</span><span class="w"> </span><span class="err">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="err">'type':</span><span class="w"> </span><span class="err">'string',</span><span class="w">
</span><span class="err">'pattern':</span><span class="w"> </span><span class="err">schemas.OP_ADDRESS_PATTERN</span><span class="w">
</span><span class="p">}</span><span class="err">,</span><span class="w">
</span><span class="err">'zonefile'</span><span class="w"> </span><span class="err">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="err">'type'</span><span class="w"> </span><span class="err">:</span><span class="w"> </span><span class="err">'string',</span><span class="w">
</span><span class="err">'maxLength'</span><span class="w"> </span><span class="err">:</span><span class="w"> </span><span class="err">blockstack_constants.RPC_MAX_ZONEFILE_LEN</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="err">},</span><span class="w">
</span><span class="err">'required':</span><span class="p">[</span><span class="w">
</span><span class="err">'name'</span><span class="p">,</span><span class="w"> </span><span class="err">'owner_address'</span><span class="p">,</span><span class="w"> </span><span class="err">'zonefile'</span><span class="w">
</span><span class="p">]</span><span class="err">,</span><span class="w">
</span><span class="err">'additionalProperties'</span><span class="w"> </span><span class="err">:</span><span class="w"> </span><span class="err">True</span><span class="w">
</span><span class="err">}</span><span class="w">
</span></code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{
'type' : 'object',
'properties' : {
'name' : {
'type': 'string',
'pattern': '([a-z0-9\-_+]{3,36})$'
},
'owner_address' : {
'type': 'string',
'pattern': schemas.OP_ADDRESS_PATTERN
},
'zonefile' : {
'type' : 'string',
'maxLength' : blockstack_constants.RPC_MAX_ZONEFILE_LEN
}
},
'required':[
'name', 'owner_address', 'zonefile'
],
'additionalProperties' : True
}
</code></pre></div></div>
<p>The registrar will:</p>
@ -437,9 +433,8 @@ API.</p>
<p>On success, this returns <code class="highlighter-rouge">202</code> and the message</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="nt">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"true"</span><span class="p">,</span><span class="w"> </span><span class="nt">"message"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Subdomain registration queued."</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{"status": "true", "message": "Subdomain registration queued."}
</code></pre></div></div>
<p>When the registrar wakes up to prepare a transaction, it packs the queued
registrations together and issues an <code class="highlighter-rouge">UPDATE</code>.</p>
@ -450,28 +445,24 @@ registrations together and issues an <code class="highlighter-rouge">UPDATE</cod
registrar.</p>
<p>This is an API call:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>GET /status/{subdomain}
</code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>GET /status/{subdomain}
</code></pre></div></div>
<p>The registrar checks if the subdomain has propagated (i.e., the
registration is completed), in which case the following is returned:</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="nt">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Subdomain already propagated"</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{"status": "Subdomain already propagated"}
</code></pre></div></div>
<p>Or, if the subdomain has already been submitted in a transaction:</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="nt">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Your subdomain was registered in transaction 09a40d6ea362608c68da6e1ebeb3210367abf7aa39ece5fd57fd63d269336399 -- it should propagate on the network once it has 6 confirmations."</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{"status": "Your subdomain was registered in transaction 09a40d6ea362608c68da6e1ebeb3210367abf7aa39ece5fd57fd63d269336399 -- it should propagate on the network once it has 6 confirmations."}
</code></pre></div></div>
<p>If the subdomain still hasn’t been submitted yet:</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="nt">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Subdomain is queued for update and should be announced within the next few blocks."</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{"status": "Subdomain is queued for update and should be announced within the next few blocks."}
</code></pre></div></div>
<p>If an error occurred trying to submit the <code class="highlighter-rouge">UPDATE</code> transaction, this endpoint will return an error
message in the <code class="highlighter-rouge">"error"</code> key of a JSON object.</p>
@ -506,7 +497,7 @@ The endpoints which <em>are</em> subdomain aware are marked as such in
<p>The lookups work just like normal – it returns the user’s
profile object:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>$ curl -H "Authorization: bearer blockstack_integration_test_api_password" -H "Origin: http://localhost:3000" http://localhost:16268/v1/users/bar.foo.id -v -s | python -m json.tool
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ curl -H "Authorization: bearer blockstack_integration_test_api_password" -H "Origin: http://localhost:3000" http://localhost:16268/v1/users/bar.foo.id -v -s | python -m json.tool
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 16268 (#0)
&gt; GET /v1/users/bar.foo.id HTTP/1.1
@ -531,13 +522,12 @@ profile object:</p>
"description": "Lorem Ipsum Bazorem"
}
}
</code></pre>
</div>
</code></pre></div></div>
<p>Name info lookups are also supported (this should enable authenticating logins
with <code class="highlighter-rouge">blockstack.js</code>, but I will need to double check).</p>
<div class="highlighter-rouge"><pre class="highlight"><code>$ curl -H "Authorization: bearer XXXX" -H "Origin: http://localhost:3000" http://localhost:6270/v1/names/created_equal.self_evident_truth.id -s | python -m json.tool
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ curl -H "Authorization: bearer XXXX" -H "Origin: http://localhost:3000" http://localhost:6270/v1/names/created_equal.self_evident_truth.id -s | python -m json.tool
{
"address": "1AYddAnfHbw6bPNvnsQFFrEuUdhMhf2XG9",
"blockchain": "bitcoin",
@ -547,8 +537,7 @@ with <code class="highlighter-rouge">blockstack.js</code>, but I will need to do
"zonefile_hash": "48fc1b351ce81cf0a9fd9b4eae7a3f80e93c0451",
"zonefile_txt": "$ORIGIN created_equal\n$TTL 3600\n_https._tcp URI 10 1 \"https://www.cs.princeton.edu/~ablankst/created_equal.json\"\n_file URI 10 1 \"file:///tmp/created_equal.json\"\n"
}
</code></pre>
</div>
</code></pre></div></div>
<h3 id="subdomain-caching">Subdomain Caching</h3>
@ -562,9 +551,8 @@ when a new zonefile for a particularly domain is seen by the resolver
<p>You can run a subdomain registrar and resolver with blockstack-core in
regtest mode as follows:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="nv">IMAGE</span><span class="o">=</span><span class="k">$(</span>docker run -dt -p 3000:3000 -p 6270:6270 -p 16269:16269 -p 18332:18332 -e <span class="nv">BLOCKSTACK_TEST_CLIENT_RPC_PORT</span><span class="o">=</span>6270 -e <span class="nv">BLOCKSTACK_TEST_CLIENT_BIND</span><span class="o">=</span>0.0.0.0 -e <span class="nv">BLOCKSTACK_TEST_BITCOIND_ALLOWIP</span><span class="o">=</span>172.17.0.0/16 quay.io/blockstack/integrationtests:master blockstack-test-scenario --interactive 2 blockstack_integration_tests.scenarios.browser_env<span class="k">)</span>
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">IMAGE</span><span class="o">=</span><span class="k">$(</span>docker run <span class="nt">-dt</span> <span class="nt">-p</span> 3000:3000 <span class="nt">-p</span> 6270:6270 <span class="nt">-p</span> 16269:16269 <span class="nt">-p</span> 18332:18332 <span class="nt">-e</span> <span class="nv">BLOCKSTACK_TEST_CLIENT_RPC_PORT</span><span class="o">=</span>6270 <span class="nt">-e</span> <span class="nv">BLOCKSTACK_TEST_CLIENT_BIND</span><span class="o">=</span>0.0.0.0 <span class="nt">-e</span> <span class="nv">BLOCKSTACK_TEST_BITCOIND_ALLOWIP</span><span class="o">=</span>172.17.0.0/16 quay.io/blockstack/integrationtests:master blockstack-test-scenario <span class="nt">--interactive</span> 2 blockstack_integration_tests.scenarios.browser_env<span class="k">)</span>
</code></pre></div></div>
<p>Once you see <code class="highlighter-rouge">Test finished; doing checks</code> in that container’s logs, the
registrar has started and is ready to accept requests. (We recommend
@ -574,37 +562,33 @@ correct environment variables for it to run).</p>
<p>Once this environment has started, you can issue a registration request from curl:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>curl -X POST -H 'Content-Type: application/json' --data '{"zonefile": "$ORIGIN baz\n$TTL 3600\n_file URI 10 1 \"file:///tmp/baz.profile.json\"\n", "name": "baz", "owner_address": "14x2EMRz1gf16UzGbxZh2c6sJg4A8wcHLD"}' http://localhost:3000/register/
</code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>curl -X POST -H 'Content-Type: application/json' --data '{"zonefile": "$ORIGIN baz\n$TTL 3600\n_file URI 10 1 \"file:///tmp/baz.profile.json\"\n", "name": "baz", "owner_address": "14x2EMRz1gf16UzGbxZh2c6sJg4A8wcHLD"}' http://localhost:3000/register/
</code></pre></div></div>
<p>This registers <code class="highlighter-rouge">baz.foo.id</code> – you can check the registrar’s status with</p>
<div class="highlighter-rouge"><pre class="highlight"><code>curl http://localhost:3000/status/baz
</code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>curl http://localhost:3000/status/baz
</code></pre></div></div>
<p>The API endpoints <code class="highlighter-rouge">/v1/users/&lt;foo.bar.tld&gt;</code>,
<code class="highlighter-rouge">/v1/names/&lt;foo.bar.tld&gt;</code>, and <code class="highlighter-rouge">/v1/addresses/bitcoin/&lt;foo.bar.tld&gt;</code> all work, so if you query the core API, you’ll get a response.</p>
<p>For example:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>curl http://localhost:6270/v1/names/baz.foo.id | python -m json.tool
</code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>curl http://localhost:6270/v1/names/baz.foo.id | python -m json.tool
</code></pre></div></div>
<p>Will return:</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nt">"address"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1Nup2UcbVuVoDZeZCtR4vjSkrvTi8toTqc"</span><span class="p">,</span><span class="w">
</span><span class="nt">"blockchain"</span><span class="p">:</span><span class="w"> </span><span class="s2">"bitcoin"</span><span class="p">,</span><span class="w">
</span><span class="nt">"expire_block"</span><span class="p">:</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w">
</span><span class="nt">"last_txid"</span><span class="p">:</span><span class="w"> </span><span class="s2">"43bbcbd8793cdc52f1b0bd2713ed136f4f104a683a9fd5c89911a57a8c4b28b6"</span><span class="p">,</span><span class="w">
</span><span class="nt">"satus"</span><span class="p">:</span><span class="w"> </span><span class="s2">"registered_subdomain"</span><span class="p">,</span><span class="w">
</span><span class="nt">"zonefile_hash"</span><span class="p">:</span><span class="w"> </span><span class="s2">"e7e3aada18c9ac5189f1c54089e987f58c0fa51e"</span><span class="p">,</span><span class="w">
</span><span class="nt">"zonefile_txt"</span><span class="p">:</span><span class="w"> </span><span class="s2">"$ORIGIN bar\n$TTL 3600\n_file URI 10 1 \"file:///tmp/baz.profile.json\"\n"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{
"address": "1Nup2UcbVuVoDZeZCtR4vjSkrvTi8toTqc",
"blockchain": "bitcoin",
"expire_block": -1,
"last_txid": "43bbcbd8793cdc52f1b0bd2713ed136f4f104a683a9fd5c89911a57a8c4b28b6",
"satus": "registered_subdomain",
"zonefile_hash": "e7e3aada18c9ac5189f1c54089e987f58c0fa51e",
"zonefile_txt": "$ORIGIN bar\n$TTL 3600\n_file URI 10 1 \"file:///tmp/baz.profile.json\"\n"
}
</code></pre></div></div>
<h3 id="running-an-interactive-testing-environment-with-the-subdomain-registrar-service">Running an interactive testing environment with the Subdomain Registrar service</h3>
@ -617,14 +601,78 @@ correct environment variables for it to run).</p>
<p>Here’s the full command you’d run to start the interactive testing scenario:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="nv">IMAGE</span><span class="o">=</span><span class="k">$(</span>docker run -dt -p 3000:3000 -p 6270:6270 -p 16269:16269 -p 18332:18332 -e <span class="nv">BLOCKSTACK_TEST_CLIENT_RPC_PORT</span><span class="o">=</span>6270 -e <span class="nv">BLOCKSTACK_TEST_CLIENT_BIND</span><span class="o">=</span>0.0.0.0 -e <span class="nv">BLOCKSTACK_TEST_BITCOIND_ALLOWIP</span><span class="o">=</span>172.17.0.0/16 quay.io/blockstack/integrationtests:master blockstack-test-scenario --interactive 2 blockstack_integration_tests.scenarios.browser_env<span class="k">)</span>
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">IMAGE</span><span class="o">=</span><span class="k">$(</span>docker run <span class="nt">-dt</span> <span class="nt">-p</span> 3000:3000 <span class="nt">-p</span> 6270:6270 <span class="nt">-p</span> 16269:16269 <span class="nt">-p</span> 18332:18332 <span class="nt">-e</span> <span class="nv">BLOCKSTACK_TEST_CLIENT_RPC_PORT</span><span class="o">=</span>6270 <span class="nt">-e</span> <span class="nv">BLOCKSTACK_TEST_CLIENT_BIND</span><span class="o">=</span>0.0.0.0 <span class="nt">-e</span> <span class="nv">BLOCKSTACK_TEST_BITCOIND_ALLOWIP</span><span class="o">=</span>172.17.0.0/16 quay.io/blockstack/integrationtests:master blockstack-test-scenario <span class="nt">--interactive</span> 2 blockstack_integration_tests.scenarios.browser_env<span class="k">)</span>
</code></pre></div></div>
<div class="share uk-text-center">
<a href="https://twitter.com/intent/tweet?text=Subdomain Design and Implementation&url=https://docs.blockstack.org/core/naming/tutorial_subdomains.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -723,74 +771,6 @@ correct environment variables for it to run).</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

213
_site/core/wire-format.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Bitcoin wire format | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Bitcoin wire format" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/core/wire-format.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/core/wire-format.html","headline":"Bitcoin wire format","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/wire-format.html"},"description":"Bitcoin wire format","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/wire-format.html","headline":"Bitcoin wire format","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/wire-format.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"Bitcoin wire format","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -274,13 +274,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/wire-format.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -367,11 +367,10 @@ transaction of two transactions that must be sent to register a name in BNS.</p>
<p>Example: <a href="https://www.blocktrail.com/BTC/tx/6730ae09574d5935ffabe3dd63a9341ea54fafae62fde36c27738e9ee9c4e889">6730ae09574d5935ffabe3dd63a9341ea54fafae62fde36c27738e9ee9c4e889</a></p>
<p><code class="highlighter-rouge">OP_RETURN</code> wire format:</p>
<div class="highlighter-rouge"><pre class="highlight"><code> 0 2 3 23 39
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> 0 2 3 23 39
|-----|--|--------------------------------------------------|--------------|
magic op hash_name(name.ns_id,script_pubkey,register_addr) consensus hash
</code></pre>
</div>
</code></pre></div></div>
<p>Inputs:</p>
<ul>
@ -404,18 +403,16 @@ sent to register a name in BNS.</p>
<p><code class="highlighter-rouge">OP_RETURN</code> wire format (2 variations allowed):</p>
<p>Variation 1:</p>
<div class="highlighter-rouge"><pre class="highlight"><code> 0 2 3 39
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> 0 2 3 39
|----|--|-----------------------------|
magic op name.ns_id (37 bytes)
</code></pre>
</div>
</code></pre></div></div>
<p>Variation 2:</p>
<div class="highlighter-rouge"><pre class="highlight"><code> 0 2 3 39 59
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> 0 2 3 39 59
|----|--|----------------------------------|-------------------|
magic op name.ns_id (37 bytes, 0-padded) value
</code></pre>
</div>
</code></pre></div></div>
<p>Inputs:</p>
<ul>
@ -451,18 +448,16 @@ registered and not expired, and owned by the transaction sender.</p>
<p><code class="highlighter-rouge">OP_RETURN</code> wire format (2 variations allowed):</p>
<p>Variation 1:</p>
<div class="highlighter-rouge"><pre class="highlight"><code> 0 2 3 39
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> 0 2 3 39
|----|--|-----------------------------|
magic op name.ns_id (37 bytes)
</code></pre>
</div>
</code></pre></div></div>
<p>Variation 2:</p>
<div class="highlighter-rouge"><pre class="highlight"><code> 0 2 3 39 59
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> 0 2 3 39 59
|----|--|----------------------------------|-------------------|
magic op name.ns_id (37 bytes, 0-padded) value
</code></pre>
</div>
</code></pre></div></div>
<p>Inputs:</p>
@ -504,11 +499,10 @@ network</a>.</p>
<p>Example: <a href="https://www.blocktrail.com/BTC/tx/e2029990fa75e9fc642f149dad196ac6b64b9c4a6db254f23a580b7508fc34d7">e2029990fa75e9fc642f149dad196ac6b64b9c4a6db254f23a580b7508fc34d7</a></p>
<p><code class="highlighter-rouge">OP_RETURN</code> wire format:</p>
<div class="highlighter-rouge"><pre class="highlight"><code> 0 2 3 19 39
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> 0 2 3 19 39
|-----|--|-----------------------------------|-----------------------|
magic op hash128(name.ns_id,consensus hash) zone file hash
</code></pre>
</div>
</code></pre></div></div>
<p>Note that <code class="highlighter-rouge">hash128(name.ns_id, consensus hash)</code> is the first 16 bytes of a SHA256 hash over the name concatenated to the hexadecimal string of the consensus hash (not the bytes corresponding to that hex string).
See the <a href="#method-glossary">Method Glossary</a> below.</p>
@ -540,12 +534,11 @@ BNS.</p>
<p>Example: <a href="https://www.blocktrail.com/BTC/tx/7a0a3bb7d39b89c3638abc369c85b5c028d0a55d7804ba1953ff19b0125f3c24">7a0a3bb7d39b89c3638abc369c85b5c028d0a55d7804ba1953ff19b0125f3c24</a></p>
<p><code class="highlighter-rouge">OP_RETURN</code> wire format:</p>
<div class="highlighter-rouge"><pre class="highlight"><code> 0 2 3 4 20 36
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> 0 2 3 4 20 36
|-----|--|----|-------------------|---------------|
magic op keep hash128(name.ns_id) consensus hash
data?
</code></pre>
</div>
</code></pre></div></div>
<p>Inputs:</p>
@ -580,11 +573,10 @@ name until it expires (if its namespace allows it to expire at all).</p>
<p>Example: <a href="https://www.blocktrail.com/BTC/tx/eb2e84a45cf411e528185a98cd5fb45ed349843a83d39fd4dff2de47adad8c8f">eb2e84a45cf411e528185a98cd5fb45ed349843a83d39fd4dff2de47adad8c8f</a></p>
<p><code class="highlighter-rouge">OP_RETURN</code> wire format:</p>
<div class="highlighter-rouge"><pre class="highlight"><code> 0 2 3 39
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> 0 2 3 39
|----|--|-----------------------------|
magic op name.ns_id (37 bytes)
</code></pre>
</div>
</code></pre></div></div>
<p>Inputs:</p>
@ -619,11 +611,10 @@ network</a>. This transaction references it by content hash.</li>
<p><code class="highlighter-rouge">OP_RETURN</code> wire format:</p>
<div class="highlighter-rouge"><pre class="highlight"><code> 0 2 3 23
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> 0 2 3 23
|----|--|-----------------------------|
magic op ripemd160(sha256(message))
</code></pre>
</div>
</code></pre></div></div>
<p>Inputs:</p>
@ -654,11 +645,10 @@ first of three transactions that must be sent to create a namespace.</p>
<p>Example: <a href="https://www.blocktrail.com/BTC/tx/5f00b8e609821edd6f3369ee4ee86e03ea34b890e242236cdb66ef6c9c6a1b28">5f00b8e609821edd6f3369ee4ee86e03ea34b890e242236cdb66ef6c9c6a1b28</a></p>
<p><code class="highlighter-rouge">OP_RETURN</code> wire format:</p>
<div class="highlighter-rouge"><pre class="highlight"><code> 0 2 3 23 39
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> 0 2 3 23 39
|-----|---|-----------------------------------------|----------------|
magic op hash_name(ns_id,script_pubkey,reveal_addr) consensus hash
</code></pre>
</div>
</code></pre></div></div>
<p>Inputs:</p>
@ -690,13 +680,12 @@ for a previously-anounced namespace hash (sent by a previous <code class="highli
<p>Example: <a href="https://www.blocktrail.com/BTC/tx/ab54b1c1dd5332dc86b24ca2f88b8ca0068485edf0c322416d104c5b84133a32">ab54b1c1dd5332dc86b24ca2f88b8ca0068485edf0c322416d104c5b84133a32</a></p>
<p><code class="highlighter-rouge">OP_RETURN</code> wire format:</p>
<div class="highlighter-rouge"><pre class="highlight"><code> 0 2 3 7 8 9 10 11 12 13 14 15 16 17 18 20 39
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> 0 2 3 7 8 9 10 11 12 13 14 15 16 17 18 20 39
|-----|---|--------|-----|-----|----|----|----|----|----|-----|-----|-----|--------|----------|-------------------------|
magic op life coeff. base 1-2 3-4 5-6 7-8 9-10 11-12 13-14 15-16 nonalpha version namespace ID
bucket exponents no-vowel
discounts
</code></pre>
</div>
</code></pre></div></div>
<p>Inputs:</p>
@ -762,11 +751,10 @@ creator can import names. See the <a href="/core/naming/namespace.html">namespa
<p>Example: <a href="https://www.blocktrail.com/BTC/tx/c698ac4b4a61c90b2c93dababde867dea359f971e2efcf415c37c9a4d9c4f312">c698ac4b4a61c90b2c93dababde867dea359f971e2efcf415c37c9a4d9c4f312</a></p>
<p><code class="highlighter-rouge">OP_RETURN</code> wire format:</p>
<div class="highlighter-rouge"><pre class="highlight"><code> 0 2 3 39
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> 0 2 3 39
|----|--|-----------------------------|
magic op name.ns_id (37 bytes)
</code></pre>
</div>
</code></pre></div></div>
<p>Inputs:</p>
@ -803,12 +791,11 @@ namespace.</p>
<p>Example: <a href="https://www.blocktrail.com/BTC/tx/2bf9a97e3081886f96c4def36d99a677059fafdbd6bdb6d626c0608a1e286032">2bf9a97e3081886f96c4def36d99a677059fafdbd6bdb6d626c0608a1e286032</a></p>
<p><code class="highlighter-rouge">OP_RETURN</code> wire format:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
0 2 3 4 23
|-----|--|--|------------|
magic op . ns_id
</code></pre>
</div>
</code></pre></div></div>
<p>Inputs:</p>
<ul>
@ -830,7 +817,7 @@ namespace.</p>
<p>Some hashing primitives are used to construct the wire-format representation of each name operation. They are enumerated here:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>B40_REGEX = '^[a-z0-9\-_.+]*$'
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>B40_REGEX = '^[a-z0-9\-_.+]*$'
def is_b40(s):
return isinstance(s, str) and re.match(B40_REGEX, s) is not None
@ -882,13 +869,77 @@ def hash128(data):
first 16 bytes
"""
return hexlify(bin_sha256(data)[0:16])
</code></pre>
</div>
</code></pre></div></div>
<div class="share uk-text-center">
<a href="https://twitter.com/intent/tweet?text=Bitcoin wire format&url=https://docs.blockstack.org/core/wire-format.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -987,74 +1038,6 @@ def hash128(data):
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

7
_site/feed.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.5.0">Jekyll</generator><link href="https://docs.blockstack.org/feed.xml" rel="self" type="application/atom+xml" /><link href="https://docs.blockstack.org/" rel="alternate" type="text/html" /><updated>2018-10-22T12:11:33-07:00</updated><id>https://docs.blockstack.org/</id><title type="html">Blockstack</title><subtitle>Docs</subtitle><author><name>Blockstack</name></author><entry><title type="html">Site tags</title><link href="https://docs.blockstack.org/2017/05/25/post63.html" rel="alternate" type="text/html" title="Site tags" /><published>2017-05-25T00:00:00-07:00</published><updated>2017-05-25T00:00:00-07:00</updated><id>https://docs.blockstack.org/2017/05/25/post63</id><content type="html" xml:base="https://docs.blockstack.org/2017/05/25/post63.html">&lt;p&gt;https://docs.blockstack.org/assets/posts/&lt;/p&gt;
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.6.3">Jekyll</generator><link href="https://docs.blockstack.org/feed.xml" rel="self" type="application/atom+xml" /><link href="https://docs.blockstack.org/" rel="alternate" type="text/html" /><updated>2018-10-26T14:02:20-07:00</updated><id>https://docs.blockstack.org/</id><title type="html">Blockstack</title><subtitle>Docs</subtitle><author><name>Blockstack</name></author><entry><title type="html">Site tags</title><link href="https://docs.blockstack.org/2017/05/25/post63.html" rel="alternate" type="text/html" title="Site tags" /><published>2017-05-25T00:00:00-07:00</published><updated>2017-05-25T00:00:00-07:00</updated><id>https://docs.blockstack.org/2017/05/25/post63</id><content type="html" xml:base="https://docs.blockstack.org/2017/05/25/post63.html">&lt;p&gt;https://docs.blockstack.org/assets/posts/&lt;/p&gt;
&lt;p&gt;/2017/05/25/post63.html&lt;/p&gt;
@ -26,7 +26,7 @@
&lt;h2 id=&quot;example-of-code-block&quot;&gt;Example Of Code Block&lt;/h2&gt;
&lt;p&gt;In accumsan lacus ac neque maximus dictum. Phasellus eleifend leo id mattis bibendum. Curabitur et purus turpis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;meta&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;charset=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;meta&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;http-equiv=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;X-UA-Compatible&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;content=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;IE=edge&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;meta&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;viewport&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;content=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;width=device-width, initial-scale=1&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
@ -34,8 +34,7 @@
&lt;span class=&quot;nt&quot;&gt;&amp;lt;link&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;rel=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;shortcut icon&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;image/png&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/assets/img/favicon.png&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;script &lt;/span&gt;&lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/assets/js/main.js&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h2 id=&quot;text-and-quote&quot;&gt;Text and Quote&lt;/h2&gt;
&lt;p&gt;Cras at dolor eget urna varius faucibus tempus in elit. Cras a dui imperdiet, tempus metus quis, pharetra turpis. Phasellus at massa sit amet ante semper fermentum sed eget lectus. Quisque id dictum magna turpis.&lt;/p&gt;

96
_site/index.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Blockstack | Docs</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Blockstack" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -279,28 +279,33 @@
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<div id="offcanvas" data-uk-offcanvas="flip: true; overlay: true">
<div class="uk-offcanvas-bar">
<button class="uk-offcanvas-close" type="button" data-uk-close></button>
<ul class="uk-nav uk-nav-default">
<!-- <li><a class="uk-logo uk-margin-small-bottom" href="/"><img src="https://docs.blockstack.org/assets/posts/logo.png" alt="Docs"></a></li> -->
<li><a class="uk-logo uk-margin-small-bottom" href="/"><img src="/assets/posts/logo.png" alt="Docs"></a></li>
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
<div class="uk-margin-small-top uk-text-center uk-text-muted uk-link-muted">
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
@ -333,40 +338,35 @@
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; Blockstack Public Benefits Corp.</div>
</div>
</div>
</footer>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<div id="offcanvas" data-uk-offcanvas="flip: true; overlay: true">
<div class="uk-offcanvas-bar">
<button class="uk-offcanvas-close" type="button" data-uk-close></button>
<ul class="uk-nav uk-nav-default">
<!-- <li><a class="uk-logo uk-margin-small-bottom" href="/"><img src="https://docs.blockstack.org/assets/posts/logo.png" alt="Docs"></a></li> -->
<li><a class="uk-logo uk-margin-small-bottom" href="/"><img src="/assets/posts/logo.png" alt="Docs"></a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
<div class="uk-margin-small-top uk-text-center uk-text-muted uk-link-muted">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
@ -399,13 +399,11 @@
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; Blockstack Public Benefits Corp.</div>
</div>
</div>
</footer>
</div>
<script type="text/javascript">

337
_site/ios/tutorial.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>iOS SDK Tutorial (Pre-release) | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="iOS SDK Tutorial (Pre-release)" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -17,9 +17,9 @@
<meta property="og:url" content="https://docs.blockstack.org/ios/tutorial.html" />
<meta property="og:site_name" content="Blockstack" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2018-10-22T12:11:33-07:00" />
<meta property="article:published_time" content="2018-10-26T14:02:20-07:00" />
<script type="application/ld+json">
{"url":"https://docs.blockstack.org/ios/tutorial.html","headline":"iOS SDK Tutorial (Pre-release)","dateModified":"2018-10-22T12:11:33-07:00","datePublished":"2018-10-22T12:11:33-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/ios/tutorial.html"},"description":"iOS SDK Tutorial (Pre-release)","@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/ios/tutorial.html","headline":"iOS SDK Tutorial (Pre-release)","dateModified":"2018-10-26T14:02:20-07:00","datePublished":"2018-10-26T14:02:20-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/ios/tutorial.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"iOS SDK Tutorial (Pre-release)","@type":"BlogPosting","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<!-- <meta property="og:image" content="https://docs.blockstack.org/assets/posts/logo.png"/> -->
@ -116,6 +116,23 @@
<!-- -->
<h5>Introduction</h5>
<ul class="uk-nav uk-nav-default doc-nav">
</ul>
<ul class="uk-nav uk-nav-default doc-nav">
<!-- -->
<li class=""><a href="/develop/dapp_principles.html">Principles of Blockstack applications</a></li>
</ul>
<h5>Try a tutorial</h5>
<ul class="uk-nav uk-nav-default doc-nav">
@ -155,6 +172,23 @@
</ul>
<h5>Application mining</h5>
<ul class="uk-nav uk-nav-default doc-nav">
<!-- -->
<li class=""><a href="/develop/mining_intro.html">Understand app mining</a></li>
<!-- -->
<li class=""><a href="/develop/mining_enroll.html">How to enroll</a></li>
</ul>
<h5>Reference</h5>
<ul class="uk-nav uk-nav-default doc-nav">
@ -165,10 +199,20 @@
<li class=""><a href="/core/faq_developer.html">Developer FAQs</a></li>
<!-- -->
<li class=""><a href="/common/mining_faq.html">Mining FAQ</a></li>
<!-- -->
<li class=""><a href="/common/javascript_ref.html">Blockstack Javascript Reference</a></li>
<!-- -->
<li class=""><a href="/common/core_ref.html">Blockstack CORE API</a></li>
</ul>
<!-- -->
@ -195,13 +239,13 @@
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> -->
<time datetime="2018-10-22T12:11:33-07:00" itemprop="datePublished">
<time datetime="2018-10-26T14:02:20-07:00" itemprop="datePublished">
<a "target="_blank" href="https://github.com/blockstack/blockstack-ios/blob/master/docs/tutorial.md" class="btn btn-default githubEditButton" role="button">
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<span style="font-family:Wingdings">&#119;</span> Oct 22, 2018
<span style="font-family:Wingdings">&#119;</span> Oct 26, 2018
</time>
</div>
@ -292,10 +336,9 @@ Depending on your network connection, this can take between 15-30 minutes.</p>
Before you begin, verify you have installed <code class="highlighter-rouge">npm</code> using the <code class="highlighter-rouge">which</code> command to
verify.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>which npm
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>which npm
/usr/local/bin/npm
</code></pre>
</div>
</code></pre></div></div>
<p>If you don’t find <code class="highlighter-rouge">npm</code> in your system, <a href="https://www.npmjs.com/get-npm">install
it</a>.</p>
@ -311,16 +354,14 @@ use libraries from the community in your project.</p>
incapability between Cocoapods and XCode. Before starting the tutorial, confirm
you have installed CocoaPods.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>pod --version
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>pod <span class="nt">--version</span>
1.6.0.beta.1
</code></pre>
</div>
</code></pre></div></div>
<p>If you don’t have the CocoaPods beta version, install it:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code>sudo gem install cocoapods -v 1.6.0.beta.1
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>gem install cocoapods <span class="nt">-v</span> 1.6.0.beta.1
</code></pre></div></div>
<h3 id="use-npm-to-install-yeoman-and-the-blockstack-app-generator">Use npm to install Yeoman and the Blockstack App Generator</h3>
@ -332,16 +373,14 @@ existing projects.</p>
<li>
<p>Install Yeoman.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm install -g yo
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm install <span class="nt">-g</span> yo
</code></pre></div> </div>
</li>
<li>
<p>Install the Blockstack application generator.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm install -g generator-blockstack
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm install <span class="nt">-g</span> generator-blockstack
</code></pre></div> </div>
<h2 id="build-the-blockstack-hello-world">Build the Blockstack hello-world</h2>
</li>
</ol>
@ -358,27 +397,24 @@ modify the <code class="highlighter-rouge">hello-world</code> to interact with t
<li>
<p>Create a <code class="highlighter-rouge">hello-blockstack</code> directory.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> mkdir hello-blockstack
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> mkdir hello-blockstack
</code></pre></div> </div>
</li>
<li>
<p>Change into your new directory.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nb">cd </span>hello-blockstack
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nb">cd </span>hello-blockstack
</code></pre></div> </div>
</li>
<li>
<p>Use Yeoman and the Blockstack application generator to create your initial <code class="highlighter-rouge">hello-blockstack</code> application.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> yo blockstack:react
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> yo blockstack:react
</code></pre></div> </div>
<p>You should see several interactive prompts.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>yo blockstack:react
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span>yo blockstack:react
<span class="o">==========================================================================</span>
We are constantly looking <span class="k">for </span>ways to make yo better!
May we anonymously report usage statistics to improve the tool over <span class="nb">time</span>?
@ -387,8 +423,8 @@ modify the <code class="highlighter-rouge">hello-world</code> to interact with t
_-----_ ╭──────────────────────────╮
| | │ Welcome to the │
|--<span class="o">(</span>o<span class="o">)</span>--| │ Blockstack app │
<span class="sb">`</span>---------´ │ generator! │
|--<span class="o">(</span>o<span class="o">)</span><span class="nt">--</span>| │ Blockstack app │
<span class="sb">`</span><span class="nt">---------</span>´ │ generator! │
<span class="o">(</span> _´U<span class="sb">`</span>_ <span class="o">)</span> ╰──────────────────────────╯
/___A___<span class="se">\ </span> /
| ~ |
@ -396,28 +432,26 @@ modify the <code class="highlighter-rouge">hello-world</code> to interact with t
´ <span class="sb">`</span> |° ´ Y <span class="sb">`</span>
? Are you ready to build a Blockstack app <span class="k">in </span>React? <span class="o">(</span>Y/n<span class="o">)</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Respond to the prompts to populate the initial app.</p>
<p>After the process completes successfully, you see a prompt similar to the following:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="o">[</span>fsevents] Success:
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="o">[</span>fsevents] Success:
<span class="s2">"/Users/theuser/repos/hello-blockstack/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node"</span>
is installed via remote npm notice created a lockfile as package-lock.json.
You should commit this file. added 1060 packages <span class="k">in </span>26.901s
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Run the initial application.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> npm start
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> npm start
&gt; hello-blockstack@0.0.0 start /Users/moxiegirl/repos/hello-blockstack
&gt; webpack-dev-server
<span class="o">&gt;</span> hello-blockstack@0.0.0 start /Users/moxiegirl/repos/hello-blockstack
<span class="o">&gt;</span> webpack-dev-server
Project is running at http://localhost:8080/
webpack output is served from /
@ -434,8 +468,7 @@ modify the <code class="highlighter-rouge">hello-world</code> to interact with t
<span class="o">[</span>2] <span class="o">(</span>webpack<span class="o">)</span>/buildin/global.js 509 bytes <span class="o">{</span>0<span class="o">}</span> <span class="o">[</span>built]
<span class="o">[</span>3] <span class="o">(</span>webpack<span class="o">)</span>/buildin/module.js 517 bytes <span class="o">{</span>0<span class="o">}</span> <span class="o">[</span>built]
webpack: Compiled successfully.
</code></pre>
</div>
</code></pre></div> </div>
<p>At this point, the browser is running a Blockstack server on your local host.</p>
</li>
@ -480,9 +513,8 @@ application directory.</p>
<li>
<p>Create a <code class="highlighter-rouge">public</code> directory.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>mkdir public
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span>mkdir public
</code></pre></div> </div>
</li>
<li>
<p>Use the <code class="highlighter-rouge">touch</code> command to add a redirect endpoint to your application.</p>
@ -490,14 +522,13 @@ application directory.</p>
<p>This endpoint on the web version of your app will redirect iOS users back
to your mobile app.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>touch public/redirect.html
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span>touch public/redirect.html
</code></pre></div> </div>
</li>
<li>
<p>Open <code class="highlighter-rouge">redirect.html</code> and add code to the endpoint.</p>
<div class="highlighter-rouge"><pre class="highlight"><code> <span class="cp">&lt;!DOCTYPE html&gt;</span>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="cp">&lt;!DOCTYPE html&gt;</span>
<span class="nt">&lt;html&gt;</span>
<span class="nt">&lt;head&gt;</span>
<span class="nt">&lt;title&gt;</span>Hello, Blockstack!<span class="nt">&lt;/title&gt;</span>
@ -513,8 +544,7 @@ to your mobile app.</p>
<span class="nt">&lt;body&gt;</span>
<span class="nt">&lt;/body&gt;</span>
<span class="nt">&lt;/html&gt;</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>Blockstack apps are identified by their domain names. The endpoint will
receive a get request with the query parameter <code class="highlighter-rouge">authResponse=XXXX</code> and
@ -578,16 +608,14 @@ lines after.</p>
<li>
<p>Navigate to and change directory into the root of your project directory.</p>
<div class="language-swift highlighter-rouge"><pre class="highlight"><code> <span class="err">$</span> <span class="n">cd</span> <span class="n">hello</span><span class="o">-</span><span class="n">blockstack</span><span class="o">-</span><span class="n">ios</span>
</code></pre>
</div>
<div class="language-swift highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="err">$</span> <span class="n">cd</span> <span class="n">hello</span><span class="o">-</span><span class="n">blockstack</span><span class="o">-</span><span class="n">ios</span>
</code></pre></div> </div>
</li>
<li>
<p>Create a Podfile.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code> <span class="nv">$ </span>pod init
</code></pre>
</div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nv">$ </span>pod init
</code></pre></div> </div>
<p>The command creates a <code class="highlighter-rouge">Podfile</code> in the directory.</p>
</li>
@ -595,7 +623,7 @@ lines after.</p>
<li>
<p>Add a line stating the Blockstack dependency.</p>
<div class="highlighter-rouge"><pre class="highlight"><code># Uncomment the next line to define a global platform for your project
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code># Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'hello-blockstack-ios' do
@ -610,8 +638,7 @@ target 'hello-blockstack-ios' do
# Pods for testing
end
end
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>Save and close the <code class="highlighter-rouge">Podfile</code>.</li>
</ol>
@ -624,7 +651,7 @@ end
<li>
<p>Initialize the project with Cocoapods.</p>
<div class="highlighter-rouge"><pre class="highlight"><code> $ pod install
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> $ pod install
Analyzing dependencies
Downloading dependencies
Installing Blockstack (0.2.0)
@ -637,20 +664,18 @@ end
Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.
[!] Automatically assigning platform `ios` with version `11.4` on target `hello-blockstack-ios` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
</code></pre>
</div>
</code></pre></div> </div>
<p>This command creates a number of files</p>
</li>
<li>
<p>Review the files that the <code class="highlighter-rouge">pod</code> installation created:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>ls
Podfile hello-blockstack-ios hello-blockstack-iosTests
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">ls
</span>Podfile hello-blockstack-ios hello-blockstack-iosTests
Podfile.lock hello-blockstack-ios.xcodeproj
Pods hello-blockstack-ios.xcworkspace
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>Start XCode and choose <strong>Open another project</strong>.</li>
<li>
@ -726,7 +751,7 @@ the user back to your iOS app. In this example, you use <code class="highlighter
<li>
<p>Replace the content of the <code class="highlighter-rouge">&lt;scenes&gt;</code> element with the following:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>&lt;scenes&gt;
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&lt;scenes&gt;
&lt;!--View Controller--&gt;
&lt;scene sceneID="EHf-IW-A2E"&gt;
&lt;objects&gt;
@ -760,18 +785,16 @@ the user back to your iOS app. In this example, you use <code class="highlighter
&lt;point key="canvasLocation" x="52" y="374.66266866566718"/&gt;
&lt;/scene&gt;
&lt;/scenes&gt;
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Immediately after scenes but before the close of the <code class="highlighter-rouge">&lt;/document&gt;</code> tag add the following <code class="highlighter-rouge">&lt;resources&gt;</code>.</p>
<div class="language-xml highlighter-rouge"><pre class="highlight"><code> <span class="nt">&lt;resources&gt;</span>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nt">&lt;resources&gt;</span>
<span class="nt">&lt;image</span> <span class="na">name=</span><span class="s">"Image"</span> <span class="na">width=</span><span class="s">"64"</span> <span class="na">height=</span><span class="s">"64"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;/resources&gt;</span>
<span class="nt">&lt;/document&gt;</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Choose <strong>Run &gt; Run app</strong> in the emulator.</p>
@ -798,7 +821,7 @@ functionality to your code.</p>
<li>
<p>Within the <code class="highlighter-rouge">&lt;viewController&gt;</code> element, replace the existing <code class="highlighter-rouge">&lt;view&gt;</code> subelement with the following:</p>
<div class="language-xml highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;view</span> <span class="na">key=</span><span class="s">"view"</span> <span class="na">contentMode=</span><span class="s">"scaleToFill"</span> <span class="na">id=</span><span class="s">"8bC-Xf-vdC"</span><span class="nt">&gt;</span>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;view</span> <span class="na">key=</span><span class="s">"view"</span> <span class="na">contentMode=</span><span class="s">"scaleToFill"</span> <span class="na">id=</span><span class="s">"8bC-Xf-vdC"</span><span class="nt">&gt;</span>
<span class="nt">&lt;rect</span> <span class="na">key=</span><span class="s">"frame"</span> <span class="na">x=</span><span class="s">"0.0"</span> <span class="na">y=</span><span class="s">"0.0"</span> <span class="na">width=</span><span class="s">"375"</span> <span class="na">height=</span><span class="s">"667"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;autoresizingMask</span> <span class="na">key=</span><span class="s">"autoresizingMask"</span> <span class="na">widthSizable=</span><span class="s">"YES"</span> <span class="na">heightSizable=</span><span class="s">"YES"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;subviews&gt;</span>
@ -838,8 +861,7 @@ functionality to your code.</p>
<span class="nt">&lt;/constraints&gt;</span>
<span class="nt">&lt;viewLayoutGuide</span> <span class="na">key=</span><span class="s">"safeArea"</span> <span class="na">id=</span><span class="s">"6Tk-OE-BBY"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;/view&gt;</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
</ol>
@ -871,21 +893,19 @@ functionality to your code.</p>
<p>When you are done, your ‘ViewController’ file contains the following variables:</p>
<div class="language-swift highlighter-rouge"><pre class="highlight"><code> <span class="kd">class</span> <span class="kt">ViewController</span><span class="p">:</span> <span class="kt">UIViewController</span> <span class="p">{</span>
<div class="language-swift highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="kd">class</span> <span class="kt">ViewController</span><span class="p">:</span> <span class="kt">UIViewController</span> <span class="p">{</span>
<span class="kd">@IBOutlet</span> <span class="k">var</span> <span class="nv">nameLabel</span><span class="p">:</span> <span class="kt">UILabel</span><span class="o">!</span>
<span class="kd">@IBOutlet</span> <span class="k">var</span> <span class="nv">signInButton</span><span class="p">:</span> <span class="kt">UIButton</span><span class="o">!</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>And XCode has added two outlines to the <code class="highlighter-rouge">Main.storyboard</code> source.</p>
<div class="language-xml highlighter-rouge"><pre class="highlight"><code> <span class="nt">&lt;connections&gt;</span>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nt">&lt;connections&gt;</span>
<span class="nt">&lt;outlet</span> <span class="na">property=</span><span class="s">"nameLabel"</span> <span class="na">destination=</span><span class="s">"9eE-ZS-LU9"</span> <span class="na">id=</span><span class="s">"Ahv-Te-ZZo"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;outlet</span> <span class="na">property=</span><span class="s">"signInButton"</span> <span class="na">destination=</span><span class="s">"Lfp-KX-BDb"</span> <span class="na">id=</span><span class="s">"yef-Jj-uPt"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;/connections&gt;</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>Your connectors will have their own <code class="highlighter-rouge">destination</code> and <code class="highlighter-rouge">id</code> values.</p>
</li>
@ -909,18 +929,17 @@ this application in your mobile add for now. In XCode, do the following;</p>
<li>
<p>Add an import both for <code class="highlighter-rouge">Blockstack</code> and for <code class="highlighter-rouge">SafariServices</code>.</p>
<div class="highlighter-rouge"><pre class="highlight"><code> import UIKit
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> import UIKit
import Blockstack
import SafariServices
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Just before the <code class="highlighter-rouge">didReceiveMemoryWarning</code> function a private <code class="highlighter-rouge">updateUI()</code> function.</p>
<p>This function takes care of loading the user data from Blockstack.</p>
<div class="language-swift highlighter-rouge"><pre class="highlight"><code><span class="kd">private</span> <span class="kd">func</span> <span class="nf">updateUI</span><span class="p">()</span> <span class="p">{</span>
<div class="language-swift highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">private</span> <span class="kd">func</span> <span class="nf">updateUI</span><span class="p">()</span> <span class="p">{</span>
<span class="kt">DispatchQueue</span><span class="o">.</span><span class="n">main</span><span class="o">.</span><span class="n">async</span> <span class="p">{</span>
<span class="k">if</span> <span class="kt">Blockstack</span><span class="o">.</span><span class="n">shared</span><span class="o">.</span><span class="nf">isSignedIn</span><span class="p">()</span> <span class="p">{</span>
<span class="c1">// Read user profile data</span>
@ -938,8 +957,7 @@ this application in your mobile add for now. In XCode, do the following;</p>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
<p>The function uses the <code class="highlighter-rouge">Blockstack.shared.isSignedIn()</code> method to determine if
the user is already logged into Blockstack or not. It then uses the
@ -949,13 +967,12 @@ the application display with the username.</p>
<li>
<p>Replace the content of the <code class="highlighter-rouge">viewDidLoad()</code> function so that it calls this private function.</p>
<div class="language-swift highlighter-rouge"><pre class="highlight"><code><span class="k">override</span> <span class="kd">func</span> <span class="nf">viewDidLoad</span><span class="p">()</span> <span class="p">{</span>
<div class="language-swift highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">override</span> <span class="kd">func</span> <span class="nf">viewDidLoad</span><span class="p">()</span> <span class="p">{</span>
<span class="k">super</span><span class="o">.</span><span class="nf">viewDidLoad</span><span class="p">()</span>
<span class="c1">// Do any additional setup after loading the view, typically from a nib.</span>
<span class="k">self</span><span class="o">.</span><span class="nf">updateUI</span><span class="p">()</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
<li>
<p>Create a ‘signIn()’ function that handles both sign in and out.</p>
@ -963,7 +980,7 @@ the application display with the username.</p>
<p>The function uses the <code class="highlighter-rouge">Blockstack.shared.signIn()</code> and
<code class="highlighter-rouge">Blockstack.shared.signOut()</code> methods to sign the user into the application.</p>
<div class="language-swift highlighter-rouge"><pre class="highlight"><code> <span class="kd">@IBAction</span> <span class="kd">func</span> <span class="nf">signIn</span><span class="p">(</span><span class="n">_</span> <span class="nv">sender</span><span class="p">:</span> <span class="kt">UIButton</span><span class="p">)</span> <span class="p">{</span>
<div class="language-swift highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="kd">@IBAction</span> <span class="kd">func</span> <span class="nf">signIn</span><span class="p">(</span><span class="n">_</span> <span class="nv">sender</span><span class="p">:</span> <span class="kt">UIButton</span><span class="p">)</span> <span class="p">{</span>
<span class="k">if</span> <span class="kt">Blockstack</span><span class="o">.</span><span class="n">shared</span><span class="o">.</span><span class="nf">isSignedIn</span><span class="p">()</span> <span class="p">{</span>
<span class="nf">print</span><span class="p">(</span><span class="s">"Currently signed in so signing out."</span><span class="p">)</span>
<span class="kt">Blockstack</span><span class="o">.</span><span class="n">shared</span><span class="o">.</span><span class="nf">signOut</span><span class="p">()</span>
@ -986,8 +1003,7 @@ the application display with the username.</p>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>
</code></pre></div> </div>
</li>
</ol>
@ -1006,6 +1022,71 @@ the application display with the username.</p>
<a href="https://twitter.com/intent/tweet?text=iOS SDK Tutorial (Pre-release)&url=https://docs.blockstack.org/ios/tutorial.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a>
</div>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. <br> &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
</div>
<hr class="uk-margin-medium">
@ -1104,74 +1185,6 @@ the application display with the username.</p>
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; 2018 Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

70
_site/news/index.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>News | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="News" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -213,74 +213,6 @@
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

70
_site/thanks/index.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Thanks | Blockstack</title>
<meta name="generator" content="Jekyll v3.5.0" />
<meta name="generator" content="Jekyll v3.6.3" />
<meta property="og:title" content="Thanks" />
<meta name="author" content="Blockstack" />
<meta property="og:locale" content="en_US" />
@ -189,74 +189,6 @@
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted">
<div class="uk-container uk-container-small">
<!-- <div>
<ul class="uk-subnav uk-flex-center">
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li>
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li>
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li>
</ul>
</div>
<div class="uk-margin-medium">
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid">
<div class="uk-first-column">
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
<div>
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a>
</div>
</div>
</div> -->
<div class="uk-margin-medium uk-text-small copyright"> Blockstack&reg; and Stacks&trade; are trademarks of Blockstack Public Benefit Corp. &copy; Blockstack Public Benefits Corp.</div>
</div>
</footer>
<script type="text/javascript">
/* Create a configuration object */
var ss360Config = {

Loading…
Cancel
Save