mirror of https://github.com/lukechilds/docs.git
moxiegirl
6 years ago
62 changed files with 3302 additions and 7348 deletions
File diff suppressed because one or more lines are too long
@ -0,0 +1,74 @@ |
|||||
|
--- |
||||
|
layout: default |
||||
|
--- |
||||
|
|
||||
|
<div class="uk-section"> |
||||
|
<div class="uk-container"> |
||||
|
<div class="uk-grid-large" data-uk-grid> |
||||
|
|
||||
|
<div class="sidebar-fixed-width uk-visible@m"> |
||||
|
<div class="sidebar-docs uk-position-fixed"> |
||||
|
<!-- --> |
||||
|
{% for section in site.data.navigation_core %} |
||||
|
{% if section.title %} |
||||
|
<h5>{{ section.title }}</h5> |
||||
|
{% endif %} |
||||
|
<ul class="uk-nav uk-nav-default doc-nav"> |
||||
|
{% for doc in section.docs %} |
||||
|
{% assign doc_url = doc | prepend:"/" | append:".html" %} |
||||
|
<!-- {% assign p = site.docs | where:"url", doc_url | first %} --> |
||||
|
{% for col in site.collections %} |
||||
|
{% for item in col.docs %} |
||||
|
{% if item.url == doc_url %} |
||||
|
{% assign doc_title = item.title %} |
||||
|
{% else %} |
||||
|
{% comment %}Do nothing{% endcomment %} |
||||
|
{% endif %} |
||||
|
{% endfor %} |
||||
|
{% endfor %} |
||||
|
<li class="{% if doc_url == page.url %}uk-active{% endif %}"><a href="{{ doc_url }}">{{ doc_title }}</a></li> |
||||
|
{% endfor %} |
||||
|
</ul> |
||||
|
{% endfor %} |
||||
|
<!-- --> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="uk-width-1-1 uk-width-expand@m"> |
||||
|
|
||||
|
<article markdown="span" class="uk-article"> |
||||
|
|
||||
|
<h1 class="uk-article-title">{{ page.title | escape }}</h1> |
||||
|
|
||||
|
{% if page.subtitle %}<p class="subtitle uk-text-lead uk-text-muted">{{ page.subtitle }}</p>{% endif %} |
||||
|
|
||||
|
|
||||
|
<div class="uk-article-meta uk-margin-top uk-margin-medium-bottom"> |
||||
|
{% include post-meta.html %} |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
{{ content }} |
||||
|
{% include share.html %} |
||||
|
</div> |
||||
|
|
||||
|
<hr class="uk-margin-medium"> |
||||
|
|
||||
|
{% include paginate-doc.html %} |
||||
|
|
||||
|
<!-- {% include related-core.html %} --> |
||||
|
|
||||
|
</article> |
||||
|
|
||||
|
<script> |
||||
|
// Table of contents scroll to |
||||
|
UIkit.scroll('#markdown-toc a', { |
||||
|
duration: 400, |
||||
|
offset: 120 |
||||
|
}); |
||||
|
</script> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,27 +0,0 @@ |
|||||
# Tutorials |
|
||||
|
|
||||
**Note: This data is being digested by blockstack.org. Do not change the formatting of this list unless you first make an adjustment to the code on blockstack.org.** |
|
||||
|
|
||||
### Multi-player Storage |
|
||||
|
|
||||
- urlSlug: multi-player-storage |
|
||||
- image: /images/tutorials/multi-player-storage.png |
|
||||
- description: Build a decentralized micro-blogging app using multi-player Gaia storage. |
|
||||
|
|
||||
### Managing Data with Gaia |
|
||||
|
|
||||
- urlSlug: managing-data-with-gaia |
|
||||
- image: /images/tutorials/managing-data-with-gaia.png |
|
||||
- description: This series will focus on teaching you to think like a Blockstack developer working with Gaia. |
|
||||
|
|
||||
### Blockstack Todo |
|
||||
|
|
||||
- urlSlug: todo-list |
|
||||
- image: /images/tutorials/todo-list.png |
|
||||
- description: Walk through creating a basic Todo application with Blockstack. Learn about Sign In flow and Gaia storage. |
|
||||
|
|
||||
### Hello Blockstack |
|
||||
|
|
||||
- urlSlug: hello-blockstack |
|
||||
- image: /images/tutorials/hello-blockstack.jpg |
|
||||
- description: Build a simple single-page JavaScript application that runs completely client-side without any servers. |
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,379 +0,0 @@ |
|||||
<p>In this tutorial, you build the code for and run a single-page application (SPA) |
|
||||
with Blockstack and Vue.js. Once the application is running, you take a tour |
|
||||
through the applications’ Blockstack functionality. You’ll learn how it manages |
|
||||
authentiation using a Blockstack ID and how it stores information associated |
|
||||
with that ID using Blockstack Storage (Gaia).</p> |
|
||||
|
|
||||
<h2 id="prerequisites">Prerequisites</h2> |
|
||||
|
|
||||
<p>Make sure you have <a href="ids-introduction#create-an-initial-blockstack-id">created at least one Blockstack ID</a>. You’ll use this ID to Finteract with the Todo application.</p> |
|
||||
|
|
||||
<p>The applicaton code relies on both the <code class="highlighter-rouge">npm</code> and the <code class="highlighter-rouge">yarn</code> package managers. |
|
||||
Before you begin, verify you have these tools <code class="highlighter-rouge">npm</code> using the <code class="highlighter-rouge">which</code> command to |
|
||||
verify.</p> |
|
||||
|
|
||||
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>which npm |
|
||||
/usr/local/bin/npm |
|
||||
<span class="gp">$ </span>which yarn |
|
||||
/usr/local/bin/yarn |
|
||||
</code></pre> |
|
||||
</div> |
|
||||
|
|
||||
<p><a href="https://www.npmjs.com/get-npm">Install npm</a>, <a href="https://yarnpkg.com/lang/en/docs/install/#mac-stable">install |
|
||||
yarn</a>, or both as needed. You</p> |
|
||||
|
|
||||
<p>While it stands alone, this tour does on the information from the <a href="hello-blockstack">Hello |
|
||||
Blockstack tutorial</a>. If you haven’t worked through that |
|
||||
tutorial, you may want to do that before continuing.</p> |
|
||||
|
|
||||
<h2 id="install-the-applicaton-code-and-retrieve-the-dependencies">Install the applicaton code and retrieve the dependencies</h2> |
|
||||
|
|
||||
<p>You can clone the source code with <code class="highlighter-rouge">git</code> or <a href="https://github.com/blockstack/blockstack-todos/archive/master.zip">download and unzip the code from |
|
||||
the |
|
||||
repository</a>. |
|
||||
These instructions assume you are cloning.</p> |
|
||||
|
|
||||
<ol> |
|
||||
<li> |
|
||||
<p>Install the code by cloning it.</p> |
|
||||
|
|
||||
<div class="highlighter-rouge"><pre class="highlight"><code> $ git clone git@github.com:blockstack/blockstack-todos.git |
|
||||
</code></pre> |
|
||||
</div> |
|
||||
</li> |
|
||||
<li> |
|
||||
<p>Change to directory to the root of the code.</p> |
|
||||
|
|
||||
<div class="highlighter-rouge"><pre class="highlight"><code> $ cd blockstack-todos |
|
||||
</code></pre> |
|
||||
</div> |
|
||||
</li> |
|
||||
<li> |
|
||||
<p>Use yarn to install the dependencies.</p> |
|
||||
|
|
||||
<div class="highlighter-rouge"><pre class="highlight"><code> $ yarn install |
|
||||
yarn install v1.9.2 |
|
||||
info No lockfile found. |
|
||||
... |
|
||||
[4/5] 🔗 Linking dependencies... |
|
||||
[5/5] 📃 Building fresh packages... |
|
||||
success Saved lockfile. |
|
||||
✨ Done in 19.90s. |
|
||||
</code></pre> |
|
||||
</div> |
|
||||
</li> |
|
||||
</ol> |
|
||||
|
|
||||
<h2 id="understand-the-important-application-files">Understand the important application files</h2> |
|
||||
|
|
||||
<p>The Todo application has a basic Vue.js structure. There are several configuration files but the central programming files are in the <code class="highlighter-rouge">src</code> directory:</p> |
|
||||
|
|
||||
<table> |
|
||||
<thead> |
|
||||
<tr> |
|
||||
<th>File</th> |
|
||||
<th>Description</th> |
|
||||
</tr> |
|
||||
</thead> |
|
||||
<tbody> |
|
||||
<tr> |
|
||||
<td><code class="highlighter-rouge">main.js</code></td> |
|
||||
<td>Application initialization.</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td><code class="highlighter-rouge">App.vue </code></td> |
|
||||
<td>Code for handling the <code class="highlighter-rouge">authResponse</code>.</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td><code class="highlighter-rouge">Landing.vue </code></td> |
|
||||
<td>Code for the initial sign on page.</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td><code class="highlighter-rouge">Dashboard.vue</code></td> |
|
||||
<td>Application data storage and user sign out.</td> |
|
||||
</tr> |
|
||||
</tbody> |
|
||||
</table> |
|
||||
|
|
||||
<p>The example application runs in a node server on your local host. In the next section, you start the application and interact with it.</p> |
|
||||
|
|
||||
<ol> |
|
||||
<li> |
|
||||
<p>Start the application.</p> |
|
||||
|
|
||||
<div class="highlighter-rouge"><pre class="highlight"><code> $ npm run start |
|
||||
</code></pre> |
|
||||
</div> |
|
||||
|
|
||||
<p>You should see a simple application:</p> |
|
||||
|
|
||||
<p><img src="images/todo-sign-in.png" alt="" /></p> |
|
||||
</li> |
|
||||
<li> |
|
||||
<p>Choose <strong>Sign In with Blockstack</strong>.</p> |
|
||||
</li> |
|
||||
</ol> |
|
||||
|
|
||||
<h2 id="understand-the-sign-in-process">Understand the sign in process</h2> |
|
||||
|
|
||||
<p>At startup, the Todo application detects whether the user has the Blockstack client edition |
|
||||
installed or not. This is done automatically by the Blockstack API, more |
|
||||
about this later. What the authenticator displays depends on which whether the user has installed the Blockstack Authenticator client edition or not.</p> |
|
||||
|
|
||||
<table> |
|
||||
<thead> |
|
||||
<tr> |
|
||||
<th>Client edition installed</th> |
|
||||
<th>Not installed</th> |
|
||||
</tr> |
|
||||
</thead> |
|
||||
<tbody> |
|
||||
<tr> |
|
||||
<td><img src="images/login.gif" alt="" /></td> |
|
||||
<td><img src="images/login-choice.png" alt="" /></td> |
|
||||
</tr> |
|
||||
</tbody> |
|
||||
</table> |
|
||||
|
|
||||
<p>If the user was logged into the Blockstack authenticator (web or client) but |
|
||||
did not reset it, the web application to use the current identity:</p> |
|
||||
|
|
||||
<p><img src="images/login-no-auth.png" alt="" /></p> |
|
||||
|
|
||||
<p>If the user chooses <strong>Deny</strong>, the Blockstack authenticator opens but the user |
|
||||
is not logged into the sample application.</p> |
|
||||
|
|
||||
<p><img src="images/windows-browser.png" alt="" /></p> |
|
||||
|
|
||||
<p>If the login to the application is successful, the user is presented with the application:</p> |
|
||||
|
|
||||
<p><img src="images/todo-app.png" alt="" /></p> |
|
||||
|
|
||||
<p>Clicking the <strong>Sign In With Blockstack</strong> button brings up a modal that prompts |
|
||||
you to use an existing ID’s session, create a new ID, or reset the browser with |
|
||||
another ID. When Blockstack is provided an ID, it generates an <em>ephemeral key</em> |
|
||||
within the application. An ephemeral key is generated for each execution of a |
|
||||
key establishment process. This key is just used for the particular instance of |
|
||||
the application, in this case to sign a <strong>Sign In</strong> request.</p> |
|
||||
|
|
||||
<p>Blockstack also generates a public key token which is sent to the authenticator |
|
||||
as an <code class="highlighter-rouge">authRequest</code> from the authenticator to your local blockstack-core node. |
|
||||
The signed authentication request is sent to Blockstack through a JSON Web |
|
||||
Token. The JWT is passed in via a URL query string in the <code class="highlighter-rouge">authRequest</code> |
|
||||
parameter: |
|
||||
<code class="highlighter-rouge">https://browser.blockstack.org/auth?authRequest=j902120cn829n1jnvoa...</code>. To |
|
||||
decode the token and see what information it holds:</p> |
|
||||
|
|
||||
<ol> |
|
||||
<li>Copy the <code class="highlighter-rouge">authRequest</code> string from the URL.</li> |
|
||||
<li>Navigate to <a href="http://jwt.io/">jwt.io</a>.</li> |
|
||||
<li> |
|
||||
<p>Paste the full token there.</p> |
|
||||
|
|
||||
<p>The output should look similar to below:</p> |
|
||||
|
|
||||
<div class="language-json highlighter-rouge"><pre class="highlight"><code><span class="w"> </span><span class="p">{</span><span class="w"> |
|
||||
</span><span class="nt">"jti"</span><span class="p">:</span><span class="w"> </span><span class="s2">"3i96e3ad-0626-4e32-a316-b243154212e2"</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"iat"</span><span class="p">:</span><span class="w"> </span><span class="mi">1533136622</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"exp"</span><span class="p">:</span><span class="w"> </span><span class="mi">1533140228</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"iss"</span><span class="p">:</span><span class="w"> </span><span class="s2">"did:btc-addr:1Nh8oQTunbEQWjrL666HBx2qMc81puLmMt"</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"public_keys"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> |
|
||||
</span><span class="s2">"0362173da080c6e1dec0653fa9a3eff5f5660546e387ce6c24u04a90c2fe1fdu73"</span><span class="w"> |
|
||||
</span><span class="p">],</span><span class="w"> |
|
||||
</span><span class="nt">"domain_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://localhost:8080"</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"manifest_uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://localhost:8080/manifest.json"</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"redirect_uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://localhost:8080/"</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1.2.0"</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"do_not_include_profile"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"supports_hub_url"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"scopes"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> |
|
||||
</span><span class="s2">"store_write"</span><span class="w"> |
|
||||
</span><span class="p">]</span><span class="w"> |
|
||||
</span><span class="p">}</span><span class="w"> |
|
||||
</span></code></pre> |
|
||||
</div> |
|
||||
</li> |
|
||||
</ol> |
|
||||
|
|
||||
<blockquote> |
|
||||
<p><strong>Note</strong>:</p> |
|
||||
<ol> |
|
||||
<li>The <code class="highlighter-rouge">iss</code> property is a decentralized identifier or <code class="highlighter-rouge">did</code>. This identifies you and your name to the application. The specific <code class="highlighter-rouge">did</code> is a <code class="highlighter-rouge">btc-addr</code>.</li> |
|
||||
<li>The Blockstack JWT implementation is different from other implementations because of the underlying cryptography we employ. There are libraries in <a href="https://github.com/blockstack/jsontokens-js">Javascript</a> and <a href="https://github.com/blockstack/ruby-jwt-blockstack">Ruby</a> available on the Blockstack Github to allow you to work with these tokens.</li> |
|
||||
</ol> |
|
||||
</blockquote> |
|
||||
|
|
||||
<p>When the blockstack-core receives the <code class="highlighter-rouge">authRequest</code>, it generates a session token and |
|
||||
returns an authentication response to the application. This response is similar |
|
||||
to the <code class="highlighter-rouge">authRequest</code> above in that the <code class="highlighter-rouge">authResponse</code> includes a private key |
|
||||
intended only for the application. This allows the application to encrypt data |
|
||||
on your personal Blockstack storage.</p> |
|
||||
|
|
||||
<p>You are now logged into the Todo application!</p> |
|
||||
|
|
||||
<h2 id="undder-the-covers-in-the-sign-in-code">Undder the covers in the sign in code</h2> |
|
||||
|
|
||||
<p>Now, go to the underlying <code class="highlighter-rouge">blockstack-todo</code> code you cloned or downloaded. Sign |
|
||||
in and sign out is handled in each of these files:</p> |
|
||||
|
|
||||
<table> |
|
||||
<thead> |
|
||||
<tr> |
|
||||
<th>File</th> |
|
||||
<th>Description</th> |
|
||||
</tr> |
|
||||
</thead> |
|
||||
<tbody> |
|
||||
<tr> |
|
||||
<td><code class="highlighter-rouge">App.vue </code></td> |
|
||||
<td>Handles the <code class="highlighter-rouge">authResponse</code>.</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td><code class="highlighter-rouge">Landing.vue </code></td> |
|
||||
<td>Generates the <code class="highlighter-rouge">authRequest</code>.</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td><code class="highlighter-rouge">Dashboard.vue</code></td> |
|
||||
<td>Handles sign out.</td> |
|
||||
</tr> |
|
||||
</tbody> |
|
||||
</table> |
|
||||
|
|
||||
<p>The <code class="highlighter-rouge">src/components/Landing.vue</code> code calls a <a href="https://blockstack.github.io/blockstack.js#redirectToSignIn"><code class="highlighter-rouge">redirectToSignIn()</code></a> function which generates the <code class="highlighter-rouge">authRequest</code> and redirects the user to the Blockstack authenticator:</p> |
|
||||
|
|
||||
<div class="language-js highlighter-rouge"><pre class="highlight"><code><span class="nx">signIn</span> <span class="p">()</span> <span class="p">{</span> |
|
||||
<span class="kr">const</span> <span class="nx">blockstack</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">blockstack</span> |
|
||||
<span class="nx">blockstack</span><span class="p">.</span><span class="nx">redirectToSignIn</span><span class="p">()</span> |
|
||||
<span class="p">}</span> |
|
||||
</code></pre> |
|
||||
</div> |
|
||||
|
|
||||
<p>Once the user authenticates, the application handles the <code class="highlighter-rouge">authResponse</code> in the <code class="highlighter-rouge">src/App.vue</code> file. :</p> |
|
||||
|
|
||||
<div class="language-js highlighter-rouge"><pre class="highlight"><code><span class="k">if</span> <span class="p">(</span><span class="nx">blockstack</span><span class="p">.</span><span class="nx">isUserSignedIn</span><span class="p">())</span> <span class="p">{</span> |
|
||||
<span class="k">this</span><span class="p">.</span><span class="nx">user</span> <span class="o">=</span> <span class="nx">blockstack</span><span class="p">.</span><span class="nx">loadUserData</span><span class="p">().</span><span class="nx">profile</span> |
|
||||
<span class="p">}</span> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="nx">blockstack</span><span class="p">.</span><span class="nx">isSignInPending</span><span class="p">())</span> <span class="p">{</span> |
|
||||
<span class="nx">blockstack</span><span class="p">.</span><span class="nx">handlePendingSignIn</span><span class="p">()</span> |
|
||||
<span class="p">.</span><span class="nx">then</span><span class="p">((</span><span class="nx">userData</span><span class="p">)</span> <span class="o">=></span> <span class="p">{</span> |
|
||||
<span class="nb">window</span><span class="p">.</span><span class="nx">location</span> <span class="o">=</span> <span class="nb">window</span><span class="p">.</span><span class="nx">location</span><span class="p">.</span><span class="nx">origin</span> |
|
||||
<span class="p">})</span> |
|
||||
<span class="p">}</span> |
|
||||
</code></pre> |
|
||||
</div> |
|
||||
|
|
||||
<p>If <a href="https://blockstack.github.io/blockstack.js/#isusersignedin"><code class="highlighter-rouge">blockstack.isUserSignedIn()</code></a> is true, the user was previously signed in so Blockstack pulls the data from the browser and uses it in our application. If the check on <a href="https://blockstack.github.io/blockstack.js/#issigninpending"><code class="highlighter-rouge">blockstack.isSignInPending()</code></a> is true, a previous <code class="highlighter-rouge">authResponse</code> was sent to the application but hasn’t been processed yet. The <code class="highlighter-rouge">handlePendingSignIn()</code> function processes any pending sign in.</p> |
|
||||
|
|
||||
<p>Signout is handled in <code class="highlighter-rouge">src/components/Dashboard.vue</code>.</p> |
|
||||
<div class="language-js highlighter-rouge"><pre class="highlight"><code><span class="nx">signOut</span> <span class="p">()</span> <span class="p">{</span> |
|
||||
<span class="k">this</span><span class="p">.</span><span class="nx">blockstack</span><span class="p">.</span><span class="nx">signUserOut</span><span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">location</span><span class="p">.</span><span class="nx">href</span><span class="p">)</span> |
|
||||
<span class="p">}</span> |
|
||||
</code></pre> |
|
||||
</div> |
|
||||
|
|
||||
<p>The method allows the application creator to decide where to redirect the user upon Sign Out:</p> |
|
||||
|
|
||||
<h2 id="working-with-the-application">Working with the application</h2> |
|
||||
|
|
||||
<p>Now trying adding a few todos using the application. For example, try making a list of applications you want to see built on top of Blockstack:</p> |
|
||||
|
|
||||
<p><img src="images/make-a-list.png" alt="" /></p> |
|
||||
|
|
||||
<p>Each list is immediately stored in the Gaia Hub linked to your Blockstack ID. |
|
||||
For more information about the Gaia hub, see the <a href="https://github.com/blockstack/gaia">hub |
|
||||
repository</a>. You can fetch the <code class="highlighter-rouge">todos.json</code> |
|
||||
file you just added by opening the Javascript console and running the following |
|
||||
command:</p> |
|
||||
|
|
||||
<pre><code class="language-Javascript">blockstack.getFile("todos.json", { decrypt: true }).then((file) => {console.log(file)}) |
|
||||
</code></pre> |
|
||||
|
|
||||
<p>You should see a JSON with the todos you just added:</p> |
|
||||
|
|
||||
<div class="language-json highlighter-rouge"><pre class="highlight"><code><span class="p">[</span><span class="w"> |
|
||||
</span><span class="p">{</span><span class="w"> |
|
||||
</span><span class="nt">"id"</span><span class="p">:</span><span class="mi">2</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"text"</span><span class="p">:</span><span class="s2">"Software package manager secured by the blockchain"</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"completed"</span><span class="p">:</span><span class="kc">false</span><span class="w"> |
|
||||
</span><span class="p">},</span><span class="w"> |
|
||||
</span><span class="p">{</span><span class="w"> |
|
||||
</span><span class="nt">"id"</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"text"</span><span class="p">:</span><span class="s2">"Mutable torrents with human readable names"</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"completed"</span><span class="p">:</span><span class="kc">false</span><span class="w"> |
|
||||
</span><span class="p">},</span><span class="w"> |
|
||||
</span><span class="p">{</span><span class="w"> |
|
||||
</span><span class="nt">"id"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"text"</span><span class="p">:</span><span class="s2">"Decentralized twitter"</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"completed"</span><span class="p">:</span><span class="kc">false</span><span class="w"> |
|
||||
</span><span class="p">}</span><span class="w"> |
|
||||
</span><span class="p">]</span><span class="w"> |
|
||||
</span></code></pre> |
|
||||
</div> |
|
||||
|
|
||||
<p>Now, add another todo and check it off. When you fetch the newly generated file |
|
||||
using the Javascript console it will reflect the change look for <code class="highlighter-rouge">"completed":true</code>:</p> |
|
||||
|
|
||||
<div class="language-json highlighter-rouge"><pre class="highlight"><code><span class="p">[</span><span class="w"> |
|
||||
</span><span class="p">{</span><span class="w"> |
|
||||
</span><span class="nt">"id"</span><span class="p">:</span><span class="mi">3</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"text"</span><span class="p">:</span><span class="s2">"Blockstack Todo"</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"completed"</span><span class="p">:</span><span class="kc">true</span><span class="w"> |
|
||||
</span><span class="p">},</span><span class="w"> |
|
||||
</span><span class="p">{</span><span class="w"> |
|
||||
</span><span class="nt">"id"</span><span class="p">:</span><span class="mi">2</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"text"</span><span class="p">:</span><span class="s2">"Software package manager secured by the blockchain"</span><span class="p">,</span><span class="w"> |
|
||||
</span><span class="nt">"completed"</span><span class="p">:</span><span class="kc">false</span><span class="w"> |
|
||||
</span><span class="p">},</span><span class="w"> |
|
||||
</span><span class="err">...</span><span class="w"> |
|
||||
</span><span class="p">]</span><span class="w"> |
|
||||
</span></code></pre> |
|
||||
</div> |
|
||||
|
|
||||
<p>Now that you have seen the application in action, dig into how it works.</p> |
|
||||
|
|
||||
<h2 id="implementing-storage">Implementing storage</h2> |
|
||||
|
|
||||
<p>Now, go to the underlying <code class="highlighter-rouge">blockstack-todo</code> code you cloned or downloaded. The |
|
||||
application interactions with your Gaia Hub originate in the |
|
||||
<code class="highlighter-rouge">src/components/Dashboard.vue</code> file. First lets see where the changes to the |
|
||||
Todos are processed:</p> |
|
||||
|
|
||||
<div class="language-js highlighter-rouge"><pre class="highlight"><code><span class="nx">todos</span><span class="err">:</span> <span class="p">{</span> |
|
||||
<span class="nl">handler</span><span class="p">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">todos</span><span class="p">)</span> <span class="p">{</span> |
|
||||
<span class="kr">const</span> <span class="nx">blockstack</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">blockstack</span> |
|
||||
|
|
||||
<span class="c1">// encryption is now enabled by default</span> |
|
||||
<span class="k">return</span> <span class="nx">blockstack</span><span class="p">.</span><span class="nx">putFile</span><span class="p">(</span><span class="nx">STORAGE_FILE</span><span class="p">,</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">todos</span><span class="p">))</span> |
|
||||
<span class="p">},</span> |
|
||||
<span class="nx">deep</span><span class="err">:</span> <span class="kc">true</span> |
|
||||
<span class="p">}</span> |
|
||||
</code></pre> |
|
||||
</div> |
|
||||
|
|
||||
<p>Tje <code class="highlighter-rouge">todos</code> JSON object is passed in and the <a href="https://blockstack.github.io/blockstack.js/#putfile"><code class="highlighter-rouge">blockstack.putFile()</code></a> method to store it in our Gaia Hub.</p> |
|
||||
|
|
||||
<p>The code needs to read the Todo items from the storage with the <a href="https://blockstack.github.io/blockstack.js/#getfile"><code class="highlighter-rouge">blockstack.getFile()</code></a> method which returns a promise:</p> |
|
||||
|
|
||||
<div class="language-js highlighter-rouge"><pre class="highlight"><code><span class="nx">fetchData</span> <span class="p">()</span> <span class="p">{</span> |
|
||||
<span class="kr">const</span> <span class="nx">blockstack</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">blockstack</span> |
|
||||
<span class="nx">blockstack</span><span class="p">.</span><span class="nx">getFile</span><span class="p">(</span><span class="nx">STORAGE_FILE</span><span class="p">)</span> <span class="c1">// decryption is enabled by default</span> |
|
||||
<span class="p">.</span><span class="nx">then</span><span class="p">((</span><span class="nx">todosText</span><span class="p">)</span> <span class="o">=></span> <span class="p">{</span> |
|
||||
<span class="kd">var</span> <span class="nx">todos</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">todosText</span> <span class="o">||</span> <span class="s1">'[]'</span><span class="p">)</span> |
|
||||
<span class="nx">todos</span><span class="p">.</span><span class="nx">forEach</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">todo</span><span class="p">,</span> <span class="nx">index</span><span class="p">)</span> <span class="p">{</span> |
|
||||
<span class="nx">todo</span><span class="p">.</span><span class="nx">id</span> <span class="o">=</span> <span class="nx">index</span> |
|
||||
<span class="p">})</span> |
|
||||
<span class="k">this</span><span class="p">.</span><span class="nx">uidCount</span> <span class="o">=</span> <span class="nx">todos</span><span class="p">.</span><span class="nx">length</span> |
|
||||
<span class="k">this</span><span class="p">.</span><span class="nx">todos</span> <span class="o">=</span> <span class="nx">todos</span> |
|
||||
<span class="p">})</span> |
|
||||
<span class="p">},</span> |
|
||||
</code></pre> |
|
||||
</div> |
|
||||
|
|
||||
<p>The <code class="highlighter-rouge">todos</code> data is retrieved from the promise.</p> |
|
||||
|
|
||||
<h2 id="summary">Summary</h2> |
|
||||
|
|
||||
<p>You now have everything you need to construct complex applications complete with authentication and storage on the Decentralized Internet. Why not try coding <a href="multi-player-storage.md">a sample application that accesses multiple profiles</a>.</p> |
|
||||
|
|
||||
<p>If you would like to explore the Blockstack APIs, you can visit the <a href="https://core.blockstack.org/">Blockstack Core API</a> documentation or the <a href="https://blockstack.github.io/blockstack.js">Blockstack JS API</a>.</p> |
|
||||
|
|
||||
<p>Go forth and build!</p> |
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,539 +0,0 @@ |
|||||
<!DOCTYPE html> |
|
||||
<html lang="en"> |
|
||||
|
|
||||
<head> |
|
||||
<meta charset="utf-8"> |
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"> |
|
||||
<!-- Begin Jekyll SEO tag v2.5.0 --> |
|
||||
<title>How to link your OpenBazaar GUID to your Blockstack ID | Blockstack</title> |
|
||||
<meta name="generator" content="Jekyll v3.8.3" /> |
|
||||
<meta property="og:title" content="How to link your OpenBazaar GUID to your Blockstack ID" /> |
|
||||
<meta name="author" content="Blockstack" /> |
|
||||
<meta property="og:locale" content="en_US" /> |
|
||||
<meta name="description" content="How to link your OpenBazaar GUID to your Blockstack ID" /> |
|
||||
<meta property="og:description" content="How to link your OpenBazaar GUID to your Blockstack ID" /> |
|
||||
<link rel="canonical" href="https://zbabystack.netlify.com/core/naming/openbazaar.html" /> |
|
||||
<meta property="og:url" content="https://zbabystack.netlify.com/core/naming/openbazaar.html" /> |
|
||||
<meta property="og:site_name" content="Blockstack" /> |
|
||||
<meta property="og:type" content="article" /> |
|
||||
<meta property="article:published_time" content="2018-09-10T17:28:25-07:00" /> |
|
||||
<script type="application/ld+json"> |
|
||||
{"description":"How to link your OpenBazaar GUID to your Blockstack ID","author":{"@type":"Person","name":"Blockstack"},"@type":"BlogPosting","url":"https://zbabystack.netlify.com/core/naming/openbazaar.html","headline":"How to link your OpenBazaar GUID to your Blockstack ID","dateModified":"2018-09-10T17:28:25-07:00","datePublished":"2018-09-10T17:28:25-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://zbabystack.netlify.com/core/naming/openbazaar.html"},"@context":"http://schema.org"}</script> |
|
||||
<!-- End Jekyll SEO tag --> |
|
||||
|
|
||||
<!-- <meta property="og:image" content="https://zbabystack.netlify.com/assets/posts/logo.png"/> --> |
|
||||
<meta property="og:image" content="/assets/posts/logo.png"/> |
|
||||
<link rel="stylesheet" href="/assets/css/main.css"> |
|
||||
<link rel="shortcut icon" type="image/png" href="/assets/img/touch-icon.png" > |
|
||||
<link rel="alternate" type="application/rss+xml" title="Blockstack" href="/feed.xml"> |
|
||||
<script src="/assets/js/main.js"></script> |
|
||||
|
|
||||
</head> |
|
||||
|
|
||||
|
|
||||
<body> |
|
||||
|
|
||||
<header class="uk-background-secondary"> |
|
||||
<div data-uk-sticky="sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky" class="uk-sticky uk-sticky-fixed" style="position: fixed; top: 0px; width: 1904px;"> |
|
||||
<nav class="uk-navbar-container"> |
|
||||
<div class="uk-container"> |
|
||||
<div data-uk-navbar> |
|
||||
<div class="uk-navbar-left"> |
|
||||
|
|
||||
<!-- <a class="uk-navbar-item uk-logo" href="/"><img src="https://zbabystack.netlify.com/assets/posts/logo.png" alt="Docs"></a> --> |
|
||||
<a class="uk-navbar-item uk-logo" href="/"><img src="/assets/posts/logo.png" alt="Docs"></a> |
|
||||
|
|
||||
</div> |
|
||||
<div class="uk-navbar-right"> |
|
||||
<ul class="uk-navbar-nav uk-visible@m"> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li> |
|
||||
|
|
||||
|
|
||||
</ul> |
|
||||
|
|
||||
|
|
||||
<div> |
|
||||
<a class="uk-navbar-toggle" uk-search-icon href="#"></a> |
|
||||
<div class="uk-drop uk-background-default uk-border-rounded" uk-drop="mode: click; pos: left-center; offset: 0"> |
|
||||
<form class="uk-search uk-search-navbar uk-width-1-1" onsubmit="return false;"> |
|
||||
<input id="searchBox" class="uk-search-input" type="search" placeholder="Search..." autofocus> |
|
||||
</form> |
|
||||
<ul id="searchBox-results" class="uk-position-absolute uk-width-1-1 uk-list"></ul> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
<a class="uk-navbar-toggle uk-hidden@m" href="#offcanvas" data-uk-navbar-toggle-icon data-uk-toggle></a> |
|
||||
|
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
</nav> |
|
||||
</div> |
|
||||
</header> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<div class="uk-section"> |
|
||||
<div class="uk-container"> |
|
||||
<div class="uk-grid-large" data-uk-grid> |
|
||||
|
|
||||
<div class="sidebar-fixed-width uk-visible@m"> |
|
||||
<div class="sidebar-docs uk-position-fixed"> |
|
||||
|
|
||||
<h5>Overview</h5> |
|
||||
<ul class="uk-nav uk-nav-default doc-nav"> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/naming/introduction.html">Blockstack Naming Service (BNS)</a></li> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/naming/architecture.html">Understand the Architecture</a></li> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/naming/namespaces.html">Understand Namespaces</a></li> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/naming/comparison.html">Naming system feature comparison</a></li> |
|
||||
|
|
||||
</ul> |
|
||||
|
|
||||
<h5>Tutorials & Cookbooks</h5> |
|
||||
<ul class="uk-nav uk-nav-default doc-nav"> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/naming/tutorial_creation.html">Create and Launch a Namespace</a></li> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/naming/tutorial_subdomains.html">Subdomain Design and Implementation</a></li> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/naming/search.html">How to build a Profile Search Index</a></li> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class="uk-active"><a href="/core/naming/openbazaar.html">How to link your OpenBazaar GUID to your Blockstack ID</a></li> |
|
||||
|
|
||||
</ul> |
|
||||
|
|
||||
<h5>How to use BNS</h5> |
|
||||
<ul class="uk-nav uk-nav-default doc-nav"> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/naming/pickname.html">Choose a name</a></li> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/naming/creationhowto.html">Creating a Namespace</a></li> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/naming/resolving.html">Resolve a name</a></li> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/naming/register.html">Register a name</a></li> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/naming/manage.html">Manage BNS Names</a></li> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/naming/subdomains.html">BNS Subdomains</a></li> |
|
||||
|
|
||||
</ul> |
|
||||
|
|
||||
<h5>Forks and Dids</h5> |
|
||||
<ul class="uk-nav uk-nav-default doc-nav"> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/naming/forks.html">BNS Forks</a></li> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/naming/did.html">Decentralized Identifiers (DIDs)</a></li> |
|
||||
|
|
||||
</ul> |
|
||||
|
|
||||
<h5>Atlas</h5> |
|
||||
<ul class="uk-nav uk-nav-default doc-nav"> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/atlas/overview.html">Overview of the Atlas network</a></li> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/atlas/howitworks.html">How Atlas Works</a></li> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/atlas/howtouse.html">How to Use the Atlas Network</a></li> |
|
||||
|
|
||||
</ul> |
|
||||
|
|
||||
<h5>Reference</h5> |
|
||||
<ul class="uk-nav uk-nav-default doc-nav"> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/common/javascript_ref.html">Blockstack Javascript Reference</a></li> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/common/core_ref.html">Blockstack CORE API</a></li> |
|
||||
|
|
||||
|
|
||||
<!-- --> |
|
||||
|
|
||||
<li class=""><a href="/core/faq_technical.html">Blockstack Technical FAQ</a></li> |
|
||||
|
|
||||
</ul> |
|
||||
|
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<div class="uk-width-1-1 uk-width-expand@m"> |
|
||||
|
|
||||
<article class="uk-article"> |
|
||||
|
|
||||
<h1 class="uk-article-title">How to link your OpenBazaar GUID to your Blockstack ID</h1> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<div class="uk-article-meta uk-margin-top uk-margin-medium-bottom"> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<!-- <img class="avatar avatar-small" alt="Blockstack" width="32" height="32" data-proofer-ignore="true" src="https://avatars2.githubusercontent.com/Blockstack?v=3&s=32" srcset="https://avatars2.githubusercontent.com/Blockstack?v=3&s=32 1x, https://avatars2.githubusercontent.com/Blockstack?v=3&s=64 2x, https://avatars2.githubusercontent.com/Blockstack?v=3&s=96 3x, https://avatars2.githubusercontent.com/Blockstack?v=3&s=128 4x" /> --> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<!-- Written by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Blockstack</span></span><br> --> |
|
||||
|
|
||||
|
|
||||
<time datetime="2018-09-10T17:28:25-07:00" itemprop="datePublished"> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<a "target="_blank" href="https://github.com/blockstack/blockstack-core/blob/master/docs/openbazaar.md" class="btn btn-default githubEditButton" role="button"> |
|
||||
<span data-uk-icon="icon: pencil; ratio: 1.2"></span> Edit this page on Github</a> |
|
||||
<span style="font-family:Wingdings">w</span> Sep 10, 2018 |
|
||||
</time> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
<div class="article-content"> |
|
||||
|
|
||||
<ul class="no_toc" id="markdown-toc"> |
|
||||
<li><a href="#step-1--advanced-mode" id="markdown-toc-step-1--advanced-mode">Step 1: Advanced Mode</a></li> |
|
||||
<li><a href="#step-2--add-an-openbazaar-account" id="markdown-toc-step-2--add-an-openbazaar-account">Step 2: Add an OpenBazaar Account</a></li> |
|
||||
<li><a href="#troubleshooting" id="markdown-toc-troubleshooting">Troubleshooting</a> <ul> |
|
||||
<li><a href="#profile-is-in-legacy-format" id="markdown-toc-profile-is-in-legacy-format">Profile is in legacy format</a></li> |
|
||||
<li><a href="#failed-to-broadcast-update-transaction" id="markdown-toc-failed-to-broadcast-update-transaction">Failed to broadcast update transaction</a></li> |
|
||||
</ul> |
|
||||
</li> |
|
||||
</ul> |
|
||||
|
|
||||
<p>If you don’t have the Blockstack CLI. Download and install it first. Instructions are <a href="https://github.com/blockstack/blockstack-cli/blob/master/README.md">here</a>. The rest of this tutorial assumes that you’ve already registered a name using the Blockstack CLI.</p> |
|
||||
|
|
||||
<h2 id="step-1--advanced-mode">Step 1: Advanced Mode</h2> |
|
||||
|
|
||||
<p>The first step is to activate “advanced mode” in the CLI. The command to do so is:</p> |
|
||||
|
|
||||
<div class="highlighter-rouge"><pre class="highlight"><code> $ blockstack set_advanced_mode on |
|
||||
</code></pre> |
|
||||
</div> |
|
||||
|
|
||||
<h2 id="step-2--add-an-openbazaar-account">Step 2: Add an OpenBazaar Account</h2> |
|
||||
|
|
||||
<p>The second step is to create an OpenBazaar account for your profile (the <a href="https://onename.com">Onename</a> app also enabled to link your OpenBazaar GUID). The command to do so is:</p> |
|
||||
|
|
||||
<div class="highlighter-rouge"><pre class="highlight"><code> $ blockstack put_account "<BLOCKSTACK ID>" "openbazaar" "<YOUR OB GUID>" "<URL TO YOUR STORE>" |
|
||||
</code></pre> |
|
||||
</div> |
|
||||
|
|
||||
<p>The URL can be any valid URL; it won’t be used by OpenBazaar. Here’s an example, using the name <code class="highlighter-rouge">testregistration001.id</code> and the GUID <code class="highlighter-rouge">0123456789abcdef</code>:</p> |
|
||||
|
|
||||
<div class="highlighter-rouge"><pre class="highlight"><code> $ blockstack put_account "testregistration001.id" "openbazaar" "0123456789abcdef" "https://bazaarbay.org/@testregistration001" |
|
||||
</code></pre> |
|
||||
</div> |
|
||||
|
|
||||
<p>The update should be instantaneous. You can verify that your store is present with <code class="highlighter-rouge">list_accounts</code>:</p> |
|
||||
|
|
||||
<div class="highlighter-rouge"><pre class="highlight"><code> $ blockstack list_accounts "testregistration001.id" |
|
||||
{ |
|
||||
"accounts": [ |
|
||||
{ |
|
||||
"contentUrl": "https://bazaarbay.org/@testregistration001.id", |
|
||||
"identifier": "0123456789abcdef", |
|
||||
"service": "openbazaar" |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
</code></pre> |
|
||||
</div> |
|
||||
|
|
||||
<h1 id="troubleshooting">Troubleshooting</h1> |
|
||||
|
|
||||
<p>Common problems you might encounter.</p> |
|
||||
|
|
||||
<h2 id="profile-is-in-legacy-format">Profile is in legacy format</h2> |
|
||||
|
|
||||
<p>If you registered your blockstack ID before spring 2016, there’s a chance that your profile is still in a legacy format. It will get migrated to the new format automatically if you update your profile on the <a href="https://onename.com">Onename</a> app. However, you have to do this manually with the CLI.</p> |
|
||||
|
|
||||
<p>To do so, the command is:</p> |
|
||||
<div class="highlighter-rouge"><pre class="highlight"><code> $ blockstack migrate <YOUR BLOCKSTACK ID> |
|
||||
</code></pre> |
|
||||
</div> |
|
||||
|
|
||||
<p>It will take a little over an hour to complete, but once finished, you’ll be able to manage your accounts with the above commands (and do so with no delays).</p> |
|
||||
|
|
||||
<h2 id="failed-to-broadcast-update-transaction">Failed to broadcast update transaction</h2> |
|
||||
|
|
||||
<p>This can happen during a <code class="highlighter-rouge">migrate</code> for one of a few reasons:</p> |
|
||||
<ul> |
|
||||
<li>You do not have enough balance to pay the transaction fee (which is calculated dynamically).</li> |
|
||||
<li>Your payment address has unconfirmed transactions.</li> |
|
||||
<li>You can’t connect to a Bitcoin node.</li> |
|
||||
</ul> |
|
||||
|
|
||||
<p>To determine what’s going on, you should try the command again by typing <code class="highlighter-rouge">BLOCKSTACK_DEBUG=1 blockstack ...</code> instead of <code class="highlighter-rouge">blockstack...</code>.</p> |
|
||||
|
|
||||
<div class="share uk-text-center"> |
|
||||
<a href="https://twitter.com/intent/tweet?text=How to link your OpenBazaar GUID to your Blockstack ID&url=https://zbabystack.netlify.com/core/naming/openbazaar.html&via=&related=" rel="nofollow" target="_blank" title="Share on Twitter" onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><span data-uk-icon="icon: twitter; ratio: 1.2"></span></a> |
|
||||
<a class="uk-margin-small-left" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fzbabystack.netlify.com%2Fcore%2Fnaming%2Fopenbazaar.html" rel="nofollow" target="_blank" title="Share on Facebook" onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;"><span data-uk-icon="icon: facebook; ratio: 1.2"></span></a> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
<hr class="uk-margin-medium"> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<div class="uk-margin-large-top"> |
|
||||
<h3>Related Articles</h3> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<ul class="uk-list"> |
|
||||
|
|
||||
</ul> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
|
|
||||
</article> |
|
||||
|
|
||||
<script> |
|
||||
// Table of contents scroll to |
|
||||
UIkit.scroll('#markdown-toc a', { |
|
||||
duration: 400, |
|
||||
offset: 120 |
|
||||
}); |
|
||||
</script> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
<div id="offcanvas" data-uk-offcanvas="flip: true; overlay: true"> |
|
||||
<div class="uk-offcanvas-bar"> |
|
||||
|
|
||||
<button class="uk-offcanvas-close" type="button" data-uk-close></button> |
|
||||
|
|
||||
<ul class="uk-nav uk-nav-default"> |
|
||||
<!-- <li><a class="uk-logo uk-margin-small-bottom" href="/"><img src="https://zbabystack.netlify.com/assets/posts/logo.png" alt="Docs"></a></li> --> |
|
||||
<li><a class="uk-logo uk-margin-small-bottom" href="/"><img src="/assets/posts/logo.png" alt="Docs"></a></li> |
|
||||
|
|
||||
|
|
||||
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li> |
|
||||
|
|
||||
|
|
||||
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li> |
|
||||
|
|
||||
|
|
||||
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li> |
|
||||
|
|
||||
</ul> |
|
||||
|
|
||||
<div class="uk-margin-small-top uk-text-center uk-text-muted uk-link-muted"> |
|
||||
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid"> |
|
||||
|
|
||||
<div class="uk-first-column"> |
|
||||
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
<div> |
|
||||
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<div> |
|
||||
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<div> |
|
||||
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<footer class="uk-section uk-text-center uk-text-muted uk-link-muted"> |
|
||||
<div class="uk-container uk-container-small"> |
|
||||
|
|
||||
<!-- <div> |
|
||||
<ul class="uk-subnav uk-flex-center"> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<li><a href="https://blockstack.org" target="_blank" >Blockstack.org</a></li> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<li><a href="https://forum.blockstack.org/" target="_blank" >Forums</a></li> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<li><a href="https://github.com/blockstack" target="_blank" >GitHub</a></li> |
|
||||
|
|
||||
|
|
||||
</ul> |
|
||||
</div> |
|
||||
<div class="uk-margin-medium"> |
|
||||
<div data-uk-grid class="uk-child-width-auto uk-grid-small uk-flex-center uk-grid"> |
|
||||
|
|
||||
<div class="uk-first-column"> |
|
||||
<a href="https://twitter.com/" data-uk-icon="icon: twitter" class="uk-icon-link uk-icon" target="_blank"></a> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
<div> |
|
||||
<a href="https://www.facebook.com/" data-uk-icon="icon: facebook" class="uk-icon-link uk-icon" target="_blank"></a> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<div> |
|
||||
<a href="https://www.instagram.com/" data-uk-icon="icon: instagram" class="uk-icon-link uk-icon" target="_blank"></a> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<div> |
|
||||
<a href="https://vimeo.com/" data-uk-icon="icon: vimeo" class="uk-icon-link uk-icon" target="_blank"></a> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
</div> |
|
||||
</div> --> |
|
||||
<div class="uk-margin-medium uk-text-small copyright">© 2018 Blockstack</div> |
|
||||
|
|
||||
</div> |
|
||||
</footer> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<script type="text/javascript"> |
|
||||
/* Create a configuration object */ |
|
||||
var ss360Config = { |
|
||||
/* Your site id */ |
|
||||
siteId: 'blockstack', |
|
||||
/* A CSS selector that points to your search box */ |
|
||||
searchBox: {selector: '#searchBox'} |
|
||||
}; |
|
||||
</script> |
|
||||
<script src="https://cdn.sitesearch360.com/sitesearch360-v11.min.js" async></script> |
|
||||
|
|
||||
|
|
||||
|
|
||||
</body> |
|
||||
|
|
||||
</html> |
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,2 @@ |
|||||
|
User-agent: * |
||||
|
Disallow: / |
File diff suppressed because one or more lines are too long
@ -1,14 +1,10 @@ |
|||||
--- |
--- |
||||
layout: contact |
layout: contact |
||||
title: Got Any Questions |
title: Got Any Questions? |
||||
permalink: /contact/ |
permalink: /contact/ |
||||
formspree: |
|
||||
email: my_name@gmail.com |
|
||||
redirect: /thanks/ |
|
||||
--- |
--- |
||||
|
|
||||
##### Morbi varius in accumsan blandit, elit ligula velit, luctus mattis ante nulla nulla. |
##### To get in touch with us... |
||||
|
|
||||
Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. |
Please feel free to post any [questions on our public form](https://forum.blockstack.org/). |
||||
|
You can also request [access to our Slack instance](https://docs.google.com/a/blockstack.com/forms/d/e/1FAIpQLSed5Mnu0G5ZMJdWs6cTO_8sTJfUVfe1sYL6WFDcD51_XuQkZw/viewform). |
||||
{% include map.html latitude="40.6700" longitude="-73.9400" zoom="16" %} |
|
||||
|
Loading…
Reference in new issue