@ -14,13 +14,13 @@ eligible for the following month.
To apply, do the following:
To apply, do the following:
1. Integrate Blockstack Auth into your app
1. Integrate Blockstack Auth into your app.
2. Add your app to <ahref="https://app.co/submit target="\_blank">App.co</a>.
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.
Make sure you choose Blockstack from the Authentication list on the form.
3. Email Blockstack with the domain you used to register for your app.
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.
Blockstack will respond via email with a set of verification materials.
@ -28,6 +28,4 @@ To apply, do the following:
Be sure you provide us with the BTC address for receipt of mining and rewards funds.
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.
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).
For more information, see the frequetly asked questions [on the App.co site](https://app.co/mining#faq).
<h2id="example-of-code-block">Example Of Code Block</h2>
<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>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>
<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 @@
<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>
<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="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">"1 Head of Lettuce"</span><spanclass="p">,</span>
<spanclass="s2">"Haralson apples"</span>
<spanclass="s2">"Haralson apples"</span>
<spanclass="p">]</span>
<spanclass="p">]</span>
<spanclass="p">},</span>
<spanclass="p">},</span>
<spanclass="c1">// ...more lists with items</span>
<spanclass="c1">// ...more lists with items</span>
<spanclass="p">}</span>
<spanclass="p">}</span>
</code></pre>
</code></pre></div></div>
</div>
<p>This is conceptually the simplest way to manage grocery lists. When you read a
<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
<codeclass="highlighter-rouge">/grocerylists.json</code> file with <codeclass="highlighter-rouge">getFile()</code>, you get back one or more grocery
@ -548,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>,
<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>
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:
<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>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 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
<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
user’s Blockstack ID. To display this, your app must extract the ID from the
@ -664,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>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>
<p>This loads existing state. Your code needs to fetch statuses on page load.</p>
</li>
</li>
<li>
<li>
<p>Add a new method called <codeclass="highlighter-rouge">fetchData()</code> after the <codeclass="highlighter-rouge">statuses.unshift(status)</code> section.</p>
<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>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>Edit the <codeclass="highlighter-rouge">src/components/App.jsx</code> file.</li>
<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>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>
<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>
<li>
<li>
<p>Modify the <codeclass="highlighter-rouge">fetchData()</code> method like so:</p>
<p>Modify the <codeclass="highlighter-rouge">fetchData()</code> method like so:</p>
@ -1007,8 +975,7 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<spanclass="p">})</span>
<spanclass="p">})</span>
<spanclass="p">}</span>
<spanclass="p">}</span>
<spanclass="p">}</span>
<spanclass="p">}</span>
</code></pre>
</code></pre></div></div>
</div>
<p><strong>NOTE</strong>: For <codeclass="highlighter-rouge">https</code> deployments, the default Blockstack Core API endpoint for name
<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>.
lookups should be changed to point to a core API served over <codeclass="highlighter-rouge">https</code>.
@ -1020,7 +987,7 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<li>
<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>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>
</li>
</ol>
</ol>
@ -1124,9 +1089,8 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<li>
<li>
<p>Restart the application so that the disabling of the <codeclass="highlighter-rouge">.</code> (dot) rule takes effect.</p>
<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-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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>
{"url":"https://docs.blockstack.org/browser/browser-nav.html","headline":"Browser Nav","dateModified":"2018-10-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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>
<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
<divclass="language-bash highlighter-rouge"><divclass="highlight"><preclass="highlight"><code> yo blockstack
</code></pre>
</code></pre></div></div>
</div>
<p>You should see several interactive prompts.</p>
<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>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>
<p>Each <codeclass="highlighter-rouge">getElementById()</code> function refers to elemments in the <codeclass="highlighter-rouge">index.html</code> file.</p>
@ -607,7 +594,7 @@ several states the user can be in:</p>
<p>The application handles these situtations as followed:</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-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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>
<spandata-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<spanstyle="font-family:Wingdings">w</span> Oct 25, 2018
<spanstyle="font-family:Wingdings">w</span> Oct 26, 2018
</time>
</time>
</div>
</div>
@ -416,6 +416,71 @@ 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>
<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-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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">"1 Head of Lettuce"</span><spanclass="p">,</span>
<spanclass="s2">"Haralson apples"</span>
<spanclass="s2">"Haralson apples"</span>
<spanclass="p">]</span>
<spanclass="p">]</span>
<spanclass="p">},</span>
<spanclass="p">},</span>
<spanclass="c1">// ...more lists with items</span>
<spanclass="c1">// ...more lists with items</span>
<spanclass="p">}</span>
<spanclass="p">}</span>
</code></pre>
</code></pre></div></div>
</div>
<p>This is conceptually the simplest way to manage grocery lists. When you read a
<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
<codeclass="highlighter-rouge">/grocerylists.json</code> file with <codeclass="highlighter-rouge">getFile()</code>, you get back one or more grocery
@ -548,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>,
<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>
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:
<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>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 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
<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
user’s Blockstack ID. To display this, your app must extract the ID from the
@ -664,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>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>
<p>This loads existing state. Your code needs to fetch statuses on page load.</p>
</li>
</li>
<li>
<li>
<p>Add a new method called <codeclass="highlighter-rouge">fetchData()</code> after the <codeclass="highlighter-rouge">statuses.unshift(status)</code> section.</p>
<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>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>Edit the <codeclass="highlighter-rouge">src/components/App.jsx</code> file.</li>
<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>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>
<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>
<li>
<li>
<p>Modify the <codeclass="highlighter-rouge">fetchData()</code> method like so:</p>
<p>Modify the <codeclass="highlighter-rouge">fetchData()</code> method like so:</p>
@ -1007,8 +975,7 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<spanclass="p">})</span>
<spanclass="p">})</span>
<spanclass="p">}</span>
<spanclass="p">}</span>
<spanclass="p">}</span>
<spanclass="p">}</span>
</code></pre>
</code></pre></div></div>
</div>
<p><strong>NOTE</strong>: For <codeclass="highlighter-rouge">https</code> deployments, the default Blockstack Core API endpoint for name
<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>.
lookups should be changed to point to a core API served over <codeclass="highlighter-rouge">https</code>.
@ -1020,7 +987,7 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<li>
<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>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>
</li>
</ol>
</ol>
@ -1124,9 +1089,8 @@ process URL paths that contain the <code class="highlighter-rouge">.</code> (dot
<li>
<li>
<p>Restart the application so that the disabling of the <codeclass="highlighter-rouge">.</code> (dot) rule takes effect.</p>
<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>
<li>Point your browser to <codeclass="highlighter-rouge">http://localhost:8080/your_blockstack.id</code> to see the final application.</li>
</ol>
</ol>
@ -1141,6 +1105,71 @@ 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>
<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-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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>
<spandata-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<spanstyle="font-family:Wingdings">w</span> Oct 25, 2018
<spanstyle="font-family:Wingdings">w</span> Oct 26, 2018
</time>
</time>
</div>
</div>
@ -199,6 +199,71 @@ 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>
<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-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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>
<spandata-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<spandata-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<spanstyle="font-family:Wingdings">w</span> Oct 25, 2018
<spanstyle="font-family:Wingdings">w</span> Oct 26, 2018
</time>
</time>
</div>
</div>
@ -295,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>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>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>.
<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>.
@ -315,21 +314,19 @@ These instructions assume you are cloning.</p>
@ -504,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>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>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>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>
<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">
@ -619,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>
<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>
<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-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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>
<spandata-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<spanstyle="font-family:Wingdings">w</span> Oct 25, 2018
<spanstyle="font-family:Wingdings">w</span> Oct 26, 2018
</time>
</time>
</div>
</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
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 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>
<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
<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
and makes it less likely that a chunk will get lost due to individual node
@ -418,6 +415,71 @@ 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>
<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-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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
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
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.
allowing Blockstack apps to read and write data in Gaia.
</code></pre>
</code></pre></div></div>
</div>
<p>Nevertheless, Atlas is a general-purpose content-addressed storage
<p>Nevertheless, Atlas is a general-purpose content-addressed storage
system that advanced developers can use to <strong>host data in an immutable
system that advanced developers can use to <strong>host data in an immutable
@ -472,6 +471,71 @@ 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>
<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>
{"url":"https://docs.blockstack.org/core/naming/architecture.html","headline":"Understand the Architecture","dateModified":"2018-10-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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">{address}</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">{index}</code> refers to the <codeclass="highlighter-rouge">nth</code> name this address created.</li>
</ul>
</ul>
<p>For example, the DID for <codeclass="highlighter-rouge">personal.id</code> is
<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>
<ul>
<li>
<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
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
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
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
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>
with <codeclass="highlighter-rouge">S</code> or <codeclass="highlighter-rouge">M</code>, respectively.</p>
</li>
</li>
</ul>
</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 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>,
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>.
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>
<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-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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>
<spandata-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<spanstyle="font-family:Wingdings">w</span> Oct 25, 2018
<spanstyle="font-family:Wingdings">w</span> Oct 26, 2018
</time>
</time>
</div>
</div>
@ -330,18 +330,17 @@ 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"target="\_blank">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"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"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"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"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>
<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"target="\_blank">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>
{"url":"https://docs.blockstack.org/core/naming/register.html","headline":"Register a name","dateModified":"2018-10-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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
<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,
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>
<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-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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>
<spandata-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<spanstyle="font-family:Wingdings">w</span> Oct 25, 2018
<spanstyle="font-family:Wingdings">w</span> Oct 26, 2018
</time>
</time>
</div>
</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>
<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
<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>
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>
<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="s2">"df.id"</span>,
...
...
<spanclass="o">]</span>
<spanclass="o">]</span>
</code></pre>
</code></pre></div></div>
</div>
<p>Each page returns 100 names. While no specific ordering is mandated by the
<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
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>
<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
<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.
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>
<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-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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
<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>
<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>
</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_namespace
$ python -m search.fetch_data --fetch_profiles
$ python -m search.fetch_data --fetch_profiles
</code></pre>
</code></pre></div></div>
</div>
<ul>
<ul>
<li><strong>Step 4:</strong> Create the search index:</li>
<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">
"description": "Co-founder of Blockstack. Interested in distributed systems and blockchains. Previously, PhD at Princeton."
</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">
"message": "This blockchain ID is reserved for Muneeb Ali. If this is you, please email support@onename.com to claim it for free.",
@ -490,6 +480,71 @@ 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>
<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>
<spandata-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a>
<spanstyle="font-family:Wingdings">w</span> Oct 25, 2018
<spanstyle="font-family:Wingdings">w</span> Oct 26, 2018
</time>
</time>
</div>
</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>,
<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="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>
<spanclass="o">}</span>
</code></pre>
</code></pre></div></div>
</div>
<p>This information was extracted from the <codeclass="highlighter-rouge">1yeardaily</code><codeclass="highlighter-rouge">TXT</code> resource record in the zone
<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>
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>
<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".
"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
However, any on-chain name ("jude.id" in this case) can broadcast a subdomain
update for "cicero.res_publica.id".
update for "cicero.res_publica.id".
</code></pre>
</code></pre></div></div>
</div>
<p>Subdomain operations are ordered by sequence number, starting at 0. Each new
<p>Subdomain operations are ordered by sequence number, starting at 0. Each new
subdomain operation must include:</p>
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>
<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="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>
<spanclass="o">}</span>
</code></pre>
</code></pre></div></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>
<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>
<spanclass="o">]</span>
<spanclass="o">}</span>
<spanclass="o">}</span>
</code></pre>
</code></pre></div></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>
<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-25T14:46:28-07:00","datePublished":"2018-10-25T14:46:28-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>
<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">
<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."}
</span></code></pre>
</code></pre></div></div>
</div>
<p>If the subdomain still hasn’t been submitted yet:</p>
<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">
<divclass="highlighter-rouge"><divclass="highlight"><preclass="highlight"><code>{"status": "Subdomain is queued for update and should be announced within the next few blocks."}
</span></code></pre>
</code></pre></div></div>
</div>
<p>If an error occurred trying to submit the <codeclass="highlighter-rouge">UPDATE</code> transaction, this endpoint will return an error
<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>
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 lookups work just like normal – it returns the user’s
<p>The API endpoints <codeclass="highlighter-rouge">/v1/users/<foo.bar.tld></code>,
<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>
<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>
</span><spanclass="nt">"zonefile_txt"</span><spanclass="p">:</span><spanclass="w"></span><spanclass="s2">"$ORIGIN bar\n$TTL 3600\n_file URI 10 1 \"file:///tmp/baz.profile.json\"\n"</span><spanclass="w">
"zonefile_txt": "$ORIGIN bar\n$TTL 3600\n_file URI 10 1 \"file:///tmp/baz.profile.json\"\n"
</span><spanclass="p">}</span><spanclass="w">
}
</span></code></pre>
</code></pre></div></div>
</div>
<h3id="running-an-interactive-testing-environment-with-the-subdomain-registrar-service">Running an interactive testing environment with the Subdomain Registrar service</h3>
<h3id="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>
<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
magic op hash128(name.ns_id,consensus hash) zone file hash
</code></pre>
</code></pre></div></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).
<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>
See the <ahref="#method-glossary">Method Glossary</a> below.</p>
<h2 id="example-of-code-block">Example Of Code Block</h2>
<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>
<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>
<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>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>
<p>The command creates a <codeclass="highlighter-rouge">Podfile</code> in the directory.</p>
</li>
</li>
@ -639,7 +623,7 @@ lines after.</p>
<li>
<li>
<p>Add a line stating the Blockstack dependency.</p>
<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'
# platform :ios, '9.0'
target 'hello-blockstack-ios' do
target 'hello-blockstack-ios' do
@ -654,8 +638,7 @@ target 'hello-blockstack-ios' do
# Pods for testing
# Pods for testing
end
end
end
end
</code></pre>
</code></pre></div></div>
</div>
</li>
</li>
<li>Save and close the <codeclass="highlighter-rouge">Podfile</code>.</li>
<li>Save and close the <codeclass="highlighter-rouge">Podfile</code>.</li>
</ol>
</ol>
@ -668,7 +651,7 @@ end
<li>
<li>
<p>Initialize the project with Cocoapods.</p>
<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
Analyzing dependencies
Downloading dependencies
Downloading dependencies
Installing Blockstack (0.2.0)
Installing Blockstack (0.2.0)
@ -681,20 +664,18 @@ end
Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.
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`.
[!] 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>
</code></pre></div></div>
</div>
<p>This command creates a number of files</p>
<p>This command creates a number of files</p>
</li>
</li>
<li>
<li>
<p>Review the files that the <codeclass="highlighter-rouge">pod</code> installation created:</p>
<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>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>
<p>Choose <strong>Run > Run app</strong> in the emulator.</p>
@ -842,7 +821,7 @@ functionality to your code.</p>
<li>
<li>
<p>Within the <codeclass="highlighter-rouge"><viewController></code> element, replace the existing <codeclass="highlighter-rouge"><view></code> subelement with the following:</p>
<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>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>
<p>This function takes care of loading the user data from Blockstack.</p>