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 <ahref="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).
<h2id="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>
<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,58 +186,33 @@
<ahref="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;"><spandata-uk-icon="icon: twitter; ratio: 1.2"></span></a>
<spanclass="n">userDataTextView</span><spanclass="p">.</span><spanclass="n">text</span><spanclass="p">=</span><spanclass="s">"Signed in as ${userData.decentralizedID}"</span>
<spanclass="s2">"1 Head of Lettuce"</span><spanclass="p">,</span>
<spanclass="s2">"Haralson apples"</span>
<spanclass="p">]</span>
<spanclass="p">},</span>
<spanclass="c1">// ...more lists with items</span>
<spanclass="p">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>This is conceptually the simplest way to manage grocery lists. When you read a
<codeclass="highlighter-rouge">/grocerylists.json</code> file with <codeclass="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 <codeclass="highlighter-rouge">Person</code> object holds a Blockstack profile. Add <codeclass="highlighter-rouge">putFile</code>, <codeclass="highlighter-rouge">getFile</code>,
and <codeclass="highlighter-rouge">lookupProfile</code> after <codeclass="highlighter-rouge">Person</code>.</p>
<divclass="highlighter-rouge"><preclass="highlight"><code> When you are done, the import statement should look like the following:
</code></pre>
</div>
<divclass="highlighter-rouge"><divclass="highlight"><preclass="highlight"><code> When you are done, the import statement should look like the following:
<p>Replace the <codeclass="highlighter-rouge">constructor()</code> initial state so that it holds the key properties required by the app.</p>
<p>This code constructs a Blockstack <codeclass="highlighter-rouge">Person</code> object to hold the profile. Your constructor should look like this:</p>
<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 <codeclass="highlighter-rouge">loadUserData()</code> method to access the <codeclass="highlighter-rouge">username</code>.</p>
<p>This loads existing state. Your code needs to fetch statuses on page load.</p>
</li>
<li>
<p>Add a new method called <codeclass="highlighter-rouge">fetchData()</code> after the <codeclass="highlighter-rouge">statuses.unshift(status)</code> section.</p>
<li>Save and close the <codeclass="highlighter-rouge">src/index.js</code> file.</li>
<li>Edit the <codeclass="highlighter-rouge">src/components/App.jsx</code> file.</li>
<li>
<p>Add the new route by importing the <codeclass="highlighter-rouge">Switch</code> and <codeclass="highlighter-rouge">Route</code> components from <codeclass="highlighter-rouge">react-router-dom</code>:</p>
<p>You use <codeclass="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 <codeclass="highlighter-rouge">getFile()</code> function you added in an earlier step. Otherwise, the app looks up the profile belonging to the <codeclass="highlighter-rouge">username</code> using the <codeclass="highlighter-rouge">lookupProfile()</code> method.</p>
</li>
<li>
<p>Modify the <codeclass="highlighter-rouge">fetchData()</code> method like so:</p>
@ -963,8 +975,7 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<spanclass="p">})</span>
<spanclass="p">}</span>
<spanclass="p">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p><strong>NOTE</strong>: For <codeclass="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 <codeclass="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 <codeclass="highlighter-rouge">fetchData()</code> right after the call to <codeclass="highlighter-rouge">lookupProfile(username)... catch((error)=>{..}</code> block:</p>
<p>### This checks to ensure that users are viewing their own profile, by wrapping the <strong>Logout</strong> button and inputs with the <codeclass="highlighter-rouge"><spanclass="p">{</span><spanclass="err">isLocal()</span><spanclass="w"></span><spanclass="err">&&</span><spanclass="w"></span><spanclass="err">...</span><spanclass="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 <codeclass="highlighter-rouge">{isLocal()&&...}</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 <codeclass="highlighter-rouge">.</code> (dot) rule takes effect.</p>
{"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>
<spandata-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<spanstyle="font-family:Wingdings">w</span> Oct 22, 2018
<spanstyle="font-family:Wingdings">w</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 <ahref="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 <ahref="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 <ahref="https://blockstack.org/install">the Blockstack install
page</a>.</p>
installer for your operating system, visit <ahref="https://blockstack.org/install"target="\_blank">the browser installation page</a>.</p>
<h3id="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 <ahref="https://blockstack.org/install">the browser installation page</a>.</li>
<li>Download the OSX installer from <ahref="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 <ahref="https://blockstack.org/install">the browser installation page</a>.</li>
<li>Download the Windows installer from from <ahref="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>
<h3id="on-linux">On Linux</h3>
<p>The Blockstack installation on Linux requires Docker. Before installing
Blockstack, <ahref="https://docs.docker.com/install/">install the version of Docker appropriate for your operating system</a>.</p>
Blockstack, <ahref="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 <codeclass="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 <codeclass="highlighter-rouge">root</code> or <codeclass="highlighter-rouge">sudo</code> privileges. For this reason, the commands below show the use of <codeclass="highlighter-rouge">sudo</code> when interacting with the script or the <codeclass="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 <ahref="https://blockstack.org/install">the browser installation page</a>.</p>
<p>Download the Linux installer from from <ahref="https://blockstack.org/install"target="\_blank">the browser installation page</a>.</p>
<p>This downloads a <codeclass="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
{"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>
<p>Use Yeoman and the Blockstack application generator to create your initial <codeclass="highlighter-rouge">hello-world-tutorial</code> application.</p>
<divclass="language-bash highlighter-rouge"><preclass="highlight"><code> yo blockstack
</code></pre>
</div>
<divclass="language-bash highlighter-rouge"><divclass="highlight"><preclass="highlight"><code> yo blockstack
</code></pre></div></div>
<p>You should see several interactive prompts.</p>
<p>You can find the <codeclass="highlighter-rouge">redirectUserToSignIn()</code> function is part of the <ahref="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>
<p>Each <codeclass="highlighter-rouge">getElementById()</code> function refers to elemments in the <codeclass="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>
{"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>
{"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>
<spandata-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<spanstyle="font-family:Wingdings">w</span> Oct 22, 2018
<spanstyle="font-family:Wingdings">w</span> Oct 26, 2018
</time>
</div>
@ -416,65 +416,33 @@ recovery key rather than your code to restore your identity.</p>
<ahref="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;"><spandata-uk-icon="icon: twitter; ratio: 1.2"></span></a>
{"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>
<spanclass="s2">"1 Head of Lettuce"</span><spanclass="p">,</span>
<spanclass="s2">"Haralson apples"</span>
<spanclass="p">]</span>
<spanclass="p">},</span>
<spanclass="c1">// ...more lists with items</span>
<spanclass="p">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>This is conceptually the simplest way to manage grocery lists. When you read a
<codeclass="highlighter-rouge">/grocerylists.json</code> file with <codeclass="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 <codeclass="highlighter-rouge">Person</code> object holds a Blockstack profile. Add <codeclass="highlighter-rouge">putFile</code>, <codeclass="highlighter-rouge">getFile</code>,
and <codeclass="highlighter-rouge">lookupProfile</code> after <codeclass="highlighter-rouge">Person</code>.</p>
<divclass="highlighter-rouge"><preclass="highlight"><code> When you are done, the import statement should look like the following:
</code></pre>
</div>
<divclass="highlighter-rouge"><divclass="highlight"><preclass="highlight"><code> When you are done, the import statement should look like the following:
<p>Replace the <codeclass="highlighter-rouge">constructor()</code> initial state so that it holds the key properties required by the app.</p>
<p>This code constructs a Blockstack <codeclass="highlighter-rouge">Person</code> object to hold the profile. Your constructor should look like this:</p>
<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 <codeclass="highlighter-rouge">loadUserData()</code> method to access the <codeclass="highlighter-rouge">username</code>.</p>
<p>This loads existing state. Your code needs to fetch statuses on page load.</p>
</li>
<li>
<p>Add a new method called <codeclass="highlighter-rouge">fetchData()</code> after the <codeclass="highlighter-rouge">statuses.unshift(status)</code> section.</p>
<li>Save and close the <codeclass="highlighter-rouge">src/index.js</code> file.</li>
<li>Edit the <codeclass="highlighter-rouge">src/components/App.jsx</code> file.</li>
<li>
<p>Add the new route by importing the <codeclass="highlighter-rouge">Switch</code> and <codeclass="highlighter-rouge">Route</code> components from <codeclass="highlighter-rouge">react-router-dom</code>:</p>
<p>You use <codeclass="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 <codeclass="highlighter-rouge">getFile()</code> function you added in an earlier step. Otherwise, the app looks up the profile belonging to the <codeclass="highlighter-rouge">username</code> using the <codeclass="highlighter-rouge">lookupProfile()</code> method.</p>
</li>
<li>
<p>Modify the <codeclass="highlighter-rouge">fetchData()</code> method like so:</p>
@ -963,8 +975,7 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<spanclass="p">})</span>
<spanclass="p">}</span>
<spanclass="p">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p><strong>NOTE</strong>: For <codeclass="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 <codeclass="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 <codeclass="highlighter-rouge">fetchData()</code> right after the call to <codeclass="highlighter-rouge">lookupProfile(username)... catch((error)=>{..}</code> block:</p>
<p>### This checks to ensure that users are viewing their own profile, by wrapping the <strong>Logout</strong> button and inputs with the <codeclass="highlighter-rouge"><spanclass="p">{</span><spanclass="err">isLocal()</span><spanclass="w"></span><spanclass="err">&&</span><spanclass="w"></span><spanclass="err">...</span><spanclass="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 <codeclass="highlighter-rouge">{isLocal()&&...}</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 <codeclass="highlighter-rouge">.</code> (dot) rule takes effect.</p>
<li>Point your browser to <codeclass="highlighter-rouge">http://localhost:8080/your_blockstack.id</code> to see the final application.</li>
</ol>
@ -1097,65 +1105,33 @@ about Blockstack. To use a working version of the app go
<ahref="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;"><spandata-uk-icon="icon: twitter; ratio: 1.2"></span></a>
{"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>
<spandata-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<spanstyle="font-family:Wingdings">w</span> Oct 22, 2018
<spanstyle="font-family:Wingdings">w</span> Oct 26, 2018
</time>
</div>
@ -199,65 +199,33 @@ consequat. Aliquam hendrerit a neque id tempor. Sed porta id ligula in iaculis.<
<ahref="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;"><spandata-uk-icon="icon: twitter; ratio: 1.2"></span></a>
{"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>
<p>If you prefer a video, you can view <ahref="https://www.youtube.com/embed/oyvg-h0obFw">a video of the tutorial</a>.</p>
<p>If you prefer a video, you can view <ahref="https://www.youtube.com/embed/oyvg-h0obFw"target="\_blank">a video of the tutorial</a>.</p>
<h2id="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 <codeclass="highlighter-rouge">npm</code> dependency manager. Before you begin, verify you have installed <codeclass="highlighter-rouge">npm</code> using the <codeclass="highlighter-rouge">which</code> command to verify.</p>
<p>If you don’t find <codeclass="highlighter-rouge">npm</code> in your system, <ahref="https://www.npmjs.com/get-npm">install it</a>.</p>
<p>Finally, make sure you have <ahref="{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>
@ -460,16 +497,15 @@ in and sign out is handled in each of these files:</p>
<p>The <codeclass="highlighter-rouge">src/components/Landing.vue</code> code calls a <ahref="https://blockstack.github.io/blockstack.js#redirectToSignIn"><codeclass="highlighter-rouge">redirectToSignIn()</code></a> function which generates the <codeclass="highlighter-rouge">authRequest</code> and redirects the user to the Blockstack authenticator:</p>
<p>Once the user authenticates, the application handles the <codeclass="highlighter-rouge">authResponse</code> in the <codeclass="highlighter-rouge">src/App.vue</code> file. :</p>
<p>If <ahref="https://blockstack.github.io/blockstack.js/#isusersignedin"><codeclass="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 <ahref="https://blockstack.github.io/blockstack.js/#issigninpending"><codeclass="highlighter-rouge">blockstack.isSignInPending()</code></a> is true, a previous <codeclass="highlighter-rouge">authResponse</code> was sent to the application but hasn’t been processed yet. The <codeclass="highlighter-rouge">handlePendingSignIn()</code> function processes any pending sign in.</p>
<p>Signout is handled in <codeclass="highlighter-rouge">src/components/Dashboard.vue</code>.</p>
</span><spanclass="nt">"text"</span><spanclass="p">:</span><spanclass="s2">"Software package manager secured by the blockchain"</span><spanclass="p">,</span><spanclass="w">
</span><spanclass="s2">"text"</span><spanclass="p">:</span><spanclass="s2">"Software package manager secured by the blockchain"</span><spanclass="p">,</span><spanclass="w">
</span><spanclass="nt">"text"</span><spanclass="p">:</span><spanclass="s2">"Mutable torrents with human readable names"</span><spanclass="p">,</span><spanclass="w">
</span><spanclass="s2">"text"</span><spanclass="p">:</span><spanclass="s2">"Mutable torrents with human readable names"</span><spanclass="p">,</span><spanclass="w">
</span><spanclass="nt">"text"</span><spanclass="p">:</span><spanclass="s2">"Software package manager secured by the blockchain"</span><spanclass="p">,</span><spanclass="w">
</span><spanclass="s2">"text"</span><spanclass="p">:</span><spanclass="s2">"Software package manager secured by the blockchain"</span><spanclass="p">,</span><spanclass="w">
@ -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 <ahref="https://blockstack.github.io/blockstack.js/#getfile"><codeclass="highlighter-rouge">blockstack.getFile()</code></a> method which returns a promise:</p>
<spanclass="nx">blockstack</span><spanclass="p">.</span><spanclass="nx">getFile</span><spanclass="p">(</span><spanclass="nx">STORAGE_FILE</span><spanclass="p">)</span><spanclass="c1">// decryption is enabled by default</span>
{"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>
<spandata-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<spanstyle="font-family:Wingdings">w</span> Oct 22, 2018
<spanstyle="font-family:Wingdings">w</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 <codeclass="highlighter-rouge">dict</code> with a <codeclass="highlighter-rouge">zonefiles</code> key that maps the chunk
<spanclass="o">>>></span><spanclass="n">data</span><spanclass="o">=</span><spanclass="s">"..."</span><spanclass="c"># this is the chunk data you will announce</span>
<spanclass="o">>>></span><spanclass="n">data</span><spanclass="o">=</span><spanclass="s">"..."</span><spanclass="c"># this is the chunk you will replicate widely</span>
<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,65 +415,33 @@ failures.</p>
<ahref="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;"><spandata-uk-icon="icon: twitter; ratio: 1.2"></span></a>
{"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>
@ -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,65 +471,33 @@ as part of the protocol.</p>
<ahref="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;"><spandata-uk-icon="icon: twitter; ratio: 1.2"></span></a>
<spandata-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<spanstyle="font-family:Wingdings">w</span> Oct 22, 2018
<spanstyle="font-family:Wingdings">w</span> Oct 26, 2018
</time>
</div>
@ -211,11 +255,11 @@
<pclass="no_toc">These FAQs are intended for developers of Blockstack.</p>
<ulid="markdown-toc">
<li><ahref="#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><ahref="#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><ahref="#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><ahref="#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><ahref="#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><ahref="#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><ahref="#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><ahref="#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><ahref="#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><ahref="#what-does-blockstackjs-do"id="markdown-toc-what-does-blockstackjs-do">What does <codeclass="highlighter-rouge">blockstack.js</code> do?</a></li>
<li><ahref="#how-do-i-use-blockstackjs"id="markdown-toc-how-do-i-use-blockstackjs">How do I use <codeclass="highlighter-rouge">blockstack.js</code>?</a></li>
<li><ahref="#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><ahref="#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>
<h2id="im-a-web-developer--can-i-build-on-blockstack">I’m a Web developer. Can I build on Blockstack?</h2>
<h2id="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>
<h2id="im-a-non-web-developer--can-i-build-on-blockstack">I’m a non-Web developer. Can I build on Blockstack?</h2>
<h2id="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 <ahref="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>
<h2id="whats-the-difference-between-a-web-app-and-a-blockstack-app">What’s the difference between a Web app and a Blockstack app?</h2>
<h2id="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 <ahref="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 <ahref="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>
<h2id="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 <ahref="https://github.com/blockstack/blockstack.js">blockstack.js</a> or
the <ahref="https://core.blockstack.org">Blockstack RESTful API</a>.</p>
<h2id="how-does-my-web-app-interact-with-blockstack">How does my Web app interact with Blockstack?</h2>
<h2id="how-does-my-web-app-interact-with-blockstack">How does my web app interact with Blockstack?</h2>
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 <ahref="https://core.blockstack.org">public RESTful API</a>.</p>
<h2id="what-does-blockstackjs-do">What does <codeclass="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>
<h2id="how-do-i-use-blockstackjs">How do I use <codeclass="highlighter-rouge">blockstack.js</code>?</h2>
<p>Please see the API documentation <ahref="https://github.com/blockstack/blockstack.js">here</a>.</p>
<p>We have <ahref="/browser/hello-blockstack.html">several examples</a> you can use to get started. Please see the API documentation <ahref="https://github.com/blockstack/blockstack.js">here</a>.</p>
<h2id="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
<p>Set up a <codeclass="highlighter-rouge">blockstack api</code> endpoint (see the project <ahref="https://github.com/blockstack/blockstack-core/blob/master/README.md">README</a>) and write a
program to automatically register names. Also, see the <ahref="https://blockstack.github.io/blockstack-core/#managing-names-register-a-name">API
program to automatically register names. Also, see the <ahref="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>
<h2id="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,72 +408,40 @@ principle applies to a lot of useful decentralized applications.</p>
<h2id="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>
<divclass="share uk-text-center">
<ahref="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;"><spandata-uk-icon="icon: twitter; ratio: 1.2"></span></a>
{"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>
{"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>
{"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>
<li><codeclass="highlighter-rouge"><spanclass="p">{</span><spanclass="err">address</span><spanclass="p">}</span></code> is an on-chain public key hash (e.g. a Bitcoin address).</li>
<li><codeclass="highlighter-rouge"><spanclass="p">{</span><spanclass="err">index</span><spanclass="p">}</span></code> refers to the <codeclass="highlighter-rouge">nth</code> name this address created.</li>
<li><codeclass="highlighter-rouge">{address}</code> is an on-chain public key hash (e.g. a Bitcoin address).</li>
<li><codeclass="highlighter-rouge">{index}</code> refers to the <codeclass="highlighter-rouge">nth</code> name this address created.</li>
</ul>
<p>For example, the DID for <codeclass="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 <codeclass="highlighter-rouge"><spanclass="p">{</span><spanclass="err">address</span><spanclass="p">}</span></code> is the same as the Bitcoin address
<p>For on-chain BNS names, the <codeclass="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 <codeclass="highlighter-rouge">1</code> or <codeclass="highlighter-rouge">3</code>, meaning <codeclass="highlighter-rouge">p2pkh</code> and
<p>For off-chain BNS subdomains, the <codeclass="highlighter-rouge"><spanclass="p">{</span><spanclass="err">address</span><spanclass="p">}</span></code> has version byte 63 for
<p>For off-chain BNS subdomains, the <codeclass="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 <codeclass="highlighter-rouge">S</code> or <codeclass="highlighter-rouge">M</code>, respectively.</p>
</li>
</ul>
<p>The <codeclass="highlighter-rouge"><spanclass="p">{</span><spanclass="err">index</span><spanclass="p">}</span></code> field for a subdomain’s DID is distinct from the <codeclass="highlighter-rouge"><spanclass="p">{</span><spanclass="err">index</span><spanclass="p">}</span></code> field
<p>The <codeclass="highlighter-rouge">{index}</code> field for a subdomain’s DID is distinct from the <codeclass="highlighter-rouge">{index}</code> field
for a BNS name’s DID, even if the same created both names and subdomains.
For example, the name <codeclass="highlighter-rouge">abcdefgh123456.id</code> has the DID <codeclass="highlighter-rouge">did:stack:v0:16EMaNw3pkn3v6f2BgnSSs53zAKH4Q8YJg-0</code>,
because it was the first name created by <codeclass="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>
{"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>
{"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>
<spandata-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<spanstyle="font-family:Wingdings">w</span> Oct 22, 2018
<spanstyle="font-family:Wingdings">w</span> Oct 26, 2018
</time>
</div>
@ -292,10 +292,10 @@ following sections:</p>
<ulid="markdown-toc">
<li><ahref="#intended-uses-for-a-namespace"id="markdown-toc-intended-uses-for-a-namespace">Intended uses for a namespace</a></li>
<li><ahref="#list-all-namespaces-in-existence-reference"id="markdown-toc-list-all-namespaces-in-existence-reference">List all namespaces in existence (reference).</a></li>
<li><ahref="#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><ahref="#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><ahref="#getting-the-current-consensus-hash-reference"id="markdown-toc-getting-the-current-consensus-hash-reference">Getting the Current Consensus Hash (reference)</a></li>
<li><ahref="#list-all-namespaces-in-existence-reference"id="markdown-toc-list-all-namespaces-in-existence-reference">List all namespaces in existence (<ahref="https://core.blockstack.org/#namespace-operations-get-all-namespaces"target="\_blank">reference</a>).</a></li>
<li><ahref="#list-all-names-within-a-namespace-reference"id="markdown-toc-list-all-names-within-a-namespace-reference">List all names within a namespace (<ahref="https://core.blockstack.org/#namespace-operations-get-all-namespaces"target="\_blank">reference</a>).</a></li>
<li><ahref="#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 (<ahref="https://core.blockstack.org/#price-checks-get-namespace-price"target="\_blank">reference</a>).</a></li>
<li><ahref="#getting-the-current-consensus-hash-reference"id="markdown-toc-getting-the-current-consensus-hash-reference">Getting the Current Consensus Hash (<ahref="https://core.blockstack.org/#blockchain-operations-get-consensus-hash"target="\_blank">reference</a>).</a></li>
<li><ahref="#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 <codeclass="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
<codeclass="highlighter-rouge">.podcast</code> point to podcasts that users of the
<ahref="https://dotpodcast.co">DotPodcast</a> app can subscribe to.</li>
<codeclass="highlighter-rouge">.podcast</code> point to podcasts that users of the <ahref="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>
<h2id="list-all-namespaces-in-existence-reference">List all namespaces in existence (<ahref="https://core.blockstack.org/#namespace-operations-get-all-namespaces">reference</a>).</h2>
<h2id="list-all-namespaces-in-existence-reference">List all namespaces in existence (<ahref="https://core.blockstack.org/#namespace-operations-get-all-namespaces"target="\_blank">reference</a>).</h2>
<h2id="list-all-names-within-a-namespace-reference">List all names within a namespace (<ahref="https://core.blockstack.org/#namespace-operations-get-all-namespaces">reference</a>)</h2>
<h2id="list-all-names-within-a-namespace-reference">List all names within a namespace (<ahref="https://core.blockstack.org/#namespace-operations-get-all-namespaces"target="\_blank">reference</a>).</h2>
<h2id="get-the-cost-to-register-a-namespace-reference">Get the Cost to Register a Namespace (<ahref="https://core.blockstack.org/#price-checks-get-namespace-price">reference</a>)</h2>
<h2id="get-the-cost-to-register-a-namespace-reference">Get the Cost to Register a Namespace (<ahref="https://core.blockstack.org/#price-checks-get-namespace-price"target="\_blank">reference</a>).</h2>
<p>If you want to register a namespace, please see the <ahref="/core/naming/namespace.html">namespace creation section</a>.</p>
<h2id="getting-the-current-consensus-hash-reference">Getting the Current Consensus Hash (<ahref="https://core.blockstack.org/#blockchain-operations-get-consensus-hash">reference</a>)</h2>
<h2id="getting-the-current-consensus-hash-reference">Getting the Current Consensus Hash (<ahref="https://core.blockstack.org/#blockchain-operations-get-consensus-hash"target="\_blank">reference</a>).</h2>
<p>A recent consensus hash is required to create a <codeclass="highlighter-rouge">NAMESPACE_PREORDER</code> transaction. The reference
BNS clients do this automatically. See the <ahref="/core/wire-format.html">transaction format</a>
@ -400,7 +397,7 @@ transaction.</p>
<ol>
<li>
<p><strong>Send a <codeclass="highlighter-rouge">NAMESPACE_PREORDER</code> transaction</strong> (<ahref="https://www.blocktrail.com/BTC/tx/5f00b8e609821edd6f3369ee4ee86e03ea34b890e242236cdb66ef6c9c6a1b28">live example</a>).
<p><strong>Send a <codeclass="highlighter-rouge">NAMESPACE_PREORDER</code> transaction</strong> (<ahref="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 <ahref="#bns-forks">BNS forks</a> for details).</p>
</li>
<li>
<p><strong>Send a <codeclass="highlighter-rouge">NAMESPACE_REVEAL</code> transaction</strong> (<ahref="https://www.blocktrail.com/BTC/tx/ab54b1c1dd5332dc86b24ca2f88b8ca0068485edf0c322416d104c5b84133a32">live example</a>).
<p><strong>Send a <codeclass="highlighter-rouge">NAMESPACE_REVEAL</code> transaction</strong> (<ahref="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
<codeclass="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 <codeclass="highlighter-rouge">NAME_IMPORT</code> transactions</strong> (<ahref="https://www.blocktrail.com/BTC/tx/c698ac4b4a61c90b2c93dababde867dea359f971e2efcf415c37c9a4d9c4f312">live example</a>).
<p><strong>Seed the namespace with <codeclass="highlighter-rouge">NAME_IMPORT</code> transactions</strong> (<ahref="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 <codeclass="highlighter-rouge">NAMESPACE_READY</code> transaction</strong> (<ahref="https://www.blocktrail.com/BTC/tx/2bf9a97e3081886f96c4def36d99a677059fafdbd6bdb6d626c0608a1e286032">live example</a>).
<p><strong>Send a <codeclass="highlighter-rouge">NAMESPACE_READY</code> transaction</strong> (<ahref="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 <ahref="/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 <ahref="/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,65 +455,33 @@ cryptocurrency at stake.</p>
<ahref="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;"><spandata-uk-icon="icon: twitter; ratio: 1.2"></span></a>
{"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>
<p>Note the use of <codeclass="highlighter-rouge">jq -r</code> to select the <codeclass="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>
<h2id="getting-the-current-consensus-hash-reference">Getting the Current Consensus Hash (<ahref="https://core.blockstack.org/#blockchain-operations-get-consensus-hash">reference</a>)</h2>
{"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>
<spandata-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<spanstyle="font-family:Wingdings">w</span> Oct 22, 2018
<spanstyle="font-family:Wingdings">w</span> Oct 26, 2018
</time>
</div>
@ -384,7 +384,7 @@ to do the following:</p>
<h2id="look-up-a-names-public-key-and-zone-file-reference">Look up a name’s public key and zone file (<ahref="https://core.blockstack.org/#name-querying-get-name-info">reference</a>)</h2>
<p>Note that the <codeclass="highlighter-rouge">zonefile</code> field is given with the off-chain data that hashes
to the <codeclass="highlighter-rouge">zonefile_hash</code> field.</p>
<h2id="list-all-names-the-node-knows-about-reference">List all names the node knows about (<ahref="https://core.blockstack.org/#name-querying-get-all-names">reference</a>)</h2>
@ -420,8 +419,7 @@ to the <code class="highlighter-rouge">zonefile_hash</code> field.</p>
<spanclass="s2">"df.id"</span>,
...
<spanclass="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>
<h2id="look-up-the-history-of-states-a-name-was-in-reference">Look up the history of states a name was in (<ahref="https://core.blockstack.org/#name-querying-name-history">reference</a>)</h2>
<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>
<h2id="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 (<ahref="https://core.blockstack.org/#name-querying-get-names-owned-by-address">reference</a>)</h2>
{"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>
<p><strong>Step 2:</strong> Make sure you have Blockstack Core running locally (see <ahref="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>
<divclass="highlighter-rouge"><preclass="highlight"><code>$ cd api/
<divclass="highlighter-rouge"><divclass="highlight"><preclass="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>
</span><spanclass="nt">"addressLocality"</span><spanclass="p">:</span><spanclass="w"></span><spanclass="s2">"New York, NY"</span><spanclass="p">,</span><spanclass="w">
</span><spanclass="nt">"description"</span><spanclass="p">:</span><spanclass="w"></span><spanclass="s2">"Co-founder of Blockstack. Interested in distributed systems and blockchains. Previously, PhD at Princeton."</span><spanclass="w">
</span><spanclass="nt">"message"</span><spanclass="p">:</span><spanclass="w"></span><spanclass="s2">"This blockchain ID is reserved for Muneeb Ali. If this is you, please email support@onename.com to claim it for free."</span><spanclass="p">,</span><spanclass="w">
@ -490,65 +480,33 @@ bin/elasticsearch -d (on linux)
<ahref="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;"><spandata-uk-icon="icon: twitter; ratio: 1.2"></span></a>
<spandata-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<spanstyle="font-family:Wingdings">w</span> Oct 22, 2018
<spanstyle="font-family:Wingdings">w</span> Oct 26, 2018
</time>
</div>
@ -342,7 +342,7 @@ stored.</p>
<p>For example, the name <codeclass="highlighter-rouge">verified.podcast</code> once wrote the zone file hash <codeclass="highlighter-rouge">247121450ca0e9af45e85a82e61cd525cd7ba023</code>,
<spanclass="s2">"zonefile_txt"</span>: <spanclass="s2">"</span><spanclass="nv">$ORIGIN</span><spanclass="s2"> 1yeardaily</span><spanclass="se">\n</span><spanclass="nv">$TTL</span><spanclass="s2"> 3600</span><spanclass="se">\n</span><spanclass="s2">_http._tcp URI 10 1 </span><spanclass="se">\"</span><spanclass="s2">https://ph.dotpodcast.co/1yeardaily/head.json</span><spanclass="se">\"\n</span><spanclass="s2">"</span>
<spanclass="o">}</span>
</code></pre>
</div>
</code></pre></div></div>
<p>This information was extracted from the <codeclass="highlighter-rouge">1yeardaily</code><codeclass="highlighter-rouge">TXT</code> resource record in the zone
file for <codeclass="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>
@ -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>
<h3id="look-up-a-subdomains-public-key-and-zone-file-reference">Look up a subdomain’s public key and zone file (<ahref="https://core.blockstack.org/#name-querying-get-name-info">reference</a>)</h3>
<spanclass="s2">"zonefile_txt"</span>: <spanclass="s2">"</span><spanclass="nv">$ORIGIN</span><spanclass="s2"> aaron.personal.id</span><spanclass="se">\n</span><spanclass="nv">$TTL</span><spanclass="s2"> 3600</span><spanclass="se">\n</span><spanclass="s2">_https._tcp URI 10 1 </span><spanclass="se">\"</span><spanclass="s2">https://gaia.blockstack.org/hub/1PwztPFd1s2STMv4Ntq6UPBdYgHSBr5pdF/profile.json</span><spanclass="se">\"\n</span><spanclass="s2">"</span>
<spanclass="o">}</span>
</code></pre>
</div>
</code></pre></div></div>
<h3id="look-up-a-subdomains-transaction-history-reference">Look up a subdomain’s transaction history (<ahref="https://core.blockstack.org/#name-querying-name-history">reference</a>)</h3>
@ -476,19 +472,17 @@ Using the BNS API, a developer can:</p>
<spanclass="o">}</span>
<spanclass="o">]</span>
<spanclass="o">}</span>
</code></pre>
</div>
</code></pre></div></div>
<h3id="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 (<ahref="https://core.blockstack.org/#name-querying-get-names-owned-by-address">reference</a>)</h3>
{"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>
<p>Or, if the subdomain has already been submitted in a transaction:</p>
<divclass="highlighter-rouge"><preclass="highlight"><code><spanclass="p">{</span><spanclass="nt">"status"</span><spanclass="p">:</span><spanclass="w"></span><spanclass="s2">"Your subdomain was registered in transaction 09a40d6ea362608c68da6e1ebeb3210367abf7aa39ece5fd57fd63d269336399 -- it should propagate on the network once it has 6 confirmations."</span><spanclass="p">}</span><spanclass="w">
</span></code></pre>
</div>
<divclass="highlighter-rouge"><divclass="highlight"><preclass="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>
<divclass="highlighter-rouge"><preclass="highlight"><code><spanclass="p">{</span><spanclass="nt">"status"</span><spanclass="p">:</span><spanclass="w"></span><spanclass="s2">"Subdomain is queued for update and should be announced within the next few blocks."</span><spanclass="p">}</span><spanclass="w">
</span></code></pre>
</div>
<divclass="highlighter-rouge"><divclass="highlight"><preclass="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 <codeclass="highlighter-rouge">UPDATE</code> transaction, this endpoint will return an error
message in the <codeclass="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
<p>The API endpoints <codeclass="highlighter-rouge">/v1/users/<foo.bar.tld></code>,
<codeclass="highlighter-rouge">/v1/names/<foo.bar.tld></code>, and <codeclass="highlighter-rouge">/v1/addresses/bitcoin/<foo.bar.tld></code> all work, so if you query the core API, you’ll get a response.</p>
"zonefile_txt": "$ORIGIN bar\n$TTL 3600\n_file URI 10 1 \"file:///tmp/baz.profile.json\"\n"
}
</code></pre></div></div>
<h3id="running-an-interactive-testing-environment-with-the-subdomain-registrar-service">Running an interactive testing environment with the Subdomain Registrar service</h3>
@ -617,73 +601,40 @@ correct environment variables for it to run).</p>
<p>Here’s the full command you’d run to start the interactive testing scenario:</p>
magic op hash128(name.ns_id,consensus hash) zone file hash
</code></pre>
</div>
</code></pre></div></div>
<p>Note that <codeclass="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 <ahref="#method-glossary">Method Glossary</a> below.</p>
<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>
<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>
<p>The command creates a <codeclass="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>
<divclass="highlighter-rouge"><preclass="highlight"><code># Uncomment the next line to define a global platform for your project
<divclass="highlighter-rouge"><divclass="highlight"><preclass="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 <codeclass="highlighter-rouge">Podfile</code>.</li>
</ol>
@ -624,7 +651,7 @@ end
<li>
<p>Initialize the project with Cocoapods.</p>
<divclass="highlighter-rouge"><preclass="highlight"><code> $ pod install
<divclass="highlighter-rouge"><divclass="highlight"><preclass="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 <codeclass="highlighter-rouge">pod</code> installation created:</p>
<p>Immediately after scenes but before the close of the <codeclass="highlighter-rouge"></document></code> tag add the following <codeclass="highlighter-rouge"><resources></code>.</p>
<p>Choose <strong>Run > Run app</strong> in the emulator.</p>
@ -798,7 +821,7 @@ functionality to your code.</p>
<li>
<p>Within the <codeclass="highlighter-rouge"><viewController></code> element, replace the existing <codeclass="highlighter-rouge"><view></code> subelement with the following:</p>
<p>Just before the <codeclass="highlighter-rouge">didReceiveMemoryWarning</code> function a private <codeclass="highlighter-rouge">updateUI()</code> function.</p>
<p>This function takes care of loading the user data from Blockstack.</p>