Start the application.
-
+
You should see a simple application:
@@ -357,17 +360,17 @@ section, you start the application and interact with it.
Understand the sign in process
-Clicking the Sign In With Blockstack button brings up a modal that prompts
-you to sign in with an existing ID or create a new ID. When Blockstack is
-provided an ID, it generates an ephemeral key 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 Sign In request.
-
-A Blockstack Core node also generates a public key token which is sent to the browser
-as an authRequest
from the browser to your core node.
-The signed authentication request is sent to Blockstack through a JSON Web
-Token (JWT). Blocktack passes the token in via a URL query string in the authRequest
+
Clicking the Sign In With Blockstack button brings up a modal that prompts you
+to sign in with an existing ID or create a new ID. When Blockstack is provided
+an ID, it generates an ephemeral key 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 Sign
+In request.
+
+A Blockstack Core node also generates a public key token which is sent to the
+browser as an authRequest
from the browser to your core node. The signed
+authentication request is sent to Blockstack through a JSON Web Token (JWT).
+Blocktack passes the token in via a URL query string in the authRequest
parameter:
https://browser.blockstack.org/auth?authRequest=j902120cn829n1jnvoa...
@@ -376,54 +379,53 @@ parameter:
Copy the authRequest
string from the URL.
- Navigate to jwt.io .
+ Navigate to jwt.io .
Paste the full token there.
The output should look similar to below:
- {
- "jti" : "3i96e3ad-0626-4e32-a316-b243154212e2" ,
- "iat" : 1533136622 ,
- "exp" : 1533140228 ,
- "iss" : "did:btc-addr:1Nh8oQTunbEQWjrL666HBx2qMc81puLmMt" ,
- "public_keys" : [
+ {
+ "jti" : "3i96e3ad-0626-4e32-a316-b243154212e2" ,
+ "iat" : 1533136622 ,
+ "exp" : 1533140228 ,
+ "iss" : "did:btc-addr:1Nh8oQTunbEQWjrL666HBx2qMc81puLmMt" ,
+ "public_keys" : [
"0362173da080c6e1dec0653fa9a3eff5f5660546e387ce6c24u04a90c2fe1fdu73"
],
- "domain_name" : "http://localhost:8080" ,
- "manifest_uri" : "http://localhost:8080/manifest.json" ,
- "redirect_uri" : "http://localhost:8080/" ,
- "version" : "1.2.0" ,
- "do_not_include_profile" : true ,
- "supports_hub_url" : true ,
- "scopes" : [
+ "domain_name" : "http://localhost:8080" ,
+ "manifest_uri" : "http://localhost:8080/manifest.json" ,
+ "redirect_uri" : "http://localhost:8080/" ,
+ "version" : "1.2.0" ,
+ "do_not_include_profile" : true ,
+ "supports_hub_url" : true ,
+ "scopes" : [
"store_write"
]
}
-
-
+
+
+
+ Note :
+
+ The iss
property is a decentralized identifier or did
. This identifies you and your name to the application. The specific did
is a btc-addr
.
+ The Blockstack JWT implementation is different from other implementations because of the underlying cryptography we employ. There are libraries in Javascript and Ruby available on the Blockstack Github to allow you to work with these tokens.
+
+
-
- Notes :
-
- The iss
property is a decentralized identifier or did
. This identifies you and your name to the application. The specific did
is a btc-addr
.
- The Blockstack JWT implementation is different from other implementations because of the underlying cryptography. There are libraries in Javascript and Ruby available on the Blockstack Github to allow you to work with these tokens.
-
-
-
-When the Blockstack node receives the authRequest
, it generates a
-session token and returns an authentication response to the application. This
-response is similar to the authRequest
above in that the authResponse
-includes a private key intended only for the application. This allows the
-application to encrypt data on your personal Blockstack storage.
+When the Blockstack node receives the authRequest
, it generates a session token
+and returns an authentication response to the application. This response is
+similar to the authRequest
above in that the authResponse
includes a private key
+intended only for the application. This allows the application to encrypt data
+on your personal Blockstack storage.
-After the completion of this process, the user is loggged in.
+After the completion of this process, the user is logged in.
-Under the covers in the sign in code
+Undder the covers in the sign in code
-Go to the underlying blockstack-todo
code you cloned or downloaded. Sign
+
Now, go to the underlying blockstack-todo
code you cloned or downloaded. Sign
in and sign out is handled in each of these files:
@@ -449,18 +451,17 @@ in and sign out is handled in each of these files:
-The src/components/Landing.vue
code calls a redirectToSignIn()
function which generates the authRequest
and redirects the user to the Blockstack browser:
+The src/components/Landing.vue
code calls a redirectToSignIn()
function which generates the authRequest
and redirects the user to the Blockstack authenticator:
-signIn () {
- const blockstack = this . blockstack
+signIn () {
+ const blockstack = this . blockstack
blockstack . redirectToSignIn ()
}
-
-
+
Once the user authenticates, the application handles the authResponse
in the src/App.vue
file. :
-if ( blockstack . isUserSignedIn ()) {
+if ( blockstack . isUserSignedIn ()) {
this . user = blockstack . loadUserData (). profile
} else if ( blockstack . isSignInPending ()) {
blockstack . handlePendingSignIn ()
@@ -468,26 +469,22 @@ in and sign out is handled in each of these files:
window . location = window . location . origin
})
}
-
-
+
-If blockstack.isUserSignedIn()
is true, the user was previously signed in so Blockstack pulls the data from the browser and uses it in the application. If the check on blockstack.isSignInPending()
is true, a previous authResponse
was sent to the application but hasn’t been processed yet. The handlePendingSignIn()
function processes any pending sign in.
+If blockstack.isUserSignedIn()
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 blockstack.isSignInPending()
is true, a previous authResponse
was sent to the application but hasn’t been processed yet. The handlePendingSignIn()
function processes any pending sign in.
-Sign out is handled in the src/components/Dashboard.vue
code.
+Signout is handled in src/components/Dashboard.vue
.
-signOut () {
+signOut () {
this . blockstack . signUserOut ( window . location . href )
}
-
-
+
-The method allows the application creator to decide where to redirect the user
-after sign out.
+The method allows the application creator to decide where to redirect the user upon Sign Out:
Working with the application
-Now, try adding a few items to the todo list. For example, try listing the
-applications you want to see built on top of Blockstack:
+Now, trying adding a few itmes to the todo list. For example, try making a list of applications you want to see built on top of Blockstack:
@@ -502,44 +499,42 @@ command:
You should see a JSON with the todos you just added:
-[
+[
{
- "id" : 2 ,
- "text" : "Software package manager secured by the blockchain" ,
- "completed" : false
+ "id" : 2 ,
+ "text" : "Software package manager secured by the blockchain" ,
+ "completed" : false
},
{
- "id" : 1 ,
- "text" : "Mutable torrents with human readable names" ,
- "completed" : false
+ "id" : 1 ,
+ "text" : "Mutable torrents with human readable names" ,
+ "completed" : false
},
{
- "id" : 0 ,
- "text" : "Decentralized twitter" ,
- "completed" : false
+ "id" : 0 ,
+ "text" : "Decentralized twitter" ,
+ "completed" : false
}
]
-
-
+
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 "completed":true
:
+using the Javascript console, the results reflect your change. Look for "completed":true
:
-[
+[
{
- "id" : 3 ,
- "text" : "Blockstack Todo" ,
- "completed" : true
+ "id" : 3 ,
+ "text" : "Blockstack Todo" ,
+ "completed" : true
},
{
- "id" : 2 ,
- "text" : "Software package manager secured by the blockchain" ,
- "completed" : false
+ "id" : 2 ,
+ "text" : "Software package manager secured by the blockchain" ,
+ "completed" : false
},
...
]
-
-
+
Now that you have seen the application in action, dig into how it works.
@@ -548,30 +543,27 @@ using the Javascript console it will reflect the change look for blockstack-todo
code you cloned or downloaded. The
application interactions with your Gaia Hub originate in the
src/components/Dashboard.vue
file. First, examine where the changes to the
-list entries are processed:
+Todos are processed:
-todos : {
+todos : {
handler : function ( todos ) {
- const blockstack = this . blockstack
+ const blockstack = this . blockstack
// encryption is now enabled by default
return blockstack . putFile ( STORAGE_FILE , JSON . stringify ( todos ))
},
- deep : true
+ deep : true
}
-
-
+
The todos
JSON object is passed in and the
blockstack.putFile()
-method to store it in our Gaia Hub.
+method to store it in a Gaia Hub.
-The code reads the items from storage with the
-blockstack.getFile()
-method which returns a promise:
+The code needs to read the Todo items from the storage with the blockstack.getFile()
method which returns a promise:
-fetchData () {
- const blockstack = this . blockstack
+fetchData () {
+ const blockstack = this . blockstack
blockstack . getFile ( STORAGE_FILE ) // decryption is enabled by default
. then (( todosText ) => {
var todos = JSON . parse ( todosText || '[]' )
@@ -582,14 +574,13 @@ method which returns a promise:
this . todos = todos
})
},
-
-
+
The todos
data is retrieved from the promise.
Summary
-You now have everything you need to construct complex applications complete with authentication and storage on the Decentralized Internet. Why not try coding a sample application that accesses multiple profiles .
+You now have everything you need to construct complex applications complete with authentication and storage on the Decentralized Internet. Why not try coding a sample application that accesses multiple profiles .
If you would like to explore the Blockstack APIs, you can visit the Blockstack Core API documentation or the Blockstack JS API .
diff --git a/_site/changelog/index.html b/_site/changelog/index.html
index 059f75e0..74fcd3f4 100644
--- a/_site/changelog/index.html
+++ b/_site/changelog/index.html
@@ -7,7 +7,7 @@
Changelog | Blockstack
-
+
@@ -17,7 +17,7 @@
+{"url":"https://docs.blockstack.org/changelog/","author":{"@type":"Person","name":"Blockstack"},"headline":"Changelog","description":"Docs","@type":"WebPage","@context":"http://schema.org"}
diff --git a/_site/common/construction.html b/_site/common/construction.html
index a11fdd86..471b4ce7 100644
--- a/_site/common/construction.html
+++ b/_site/common/construction.html
@@ -7,7 +7,7 @@
Excuse our dust! | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/common/construction.html","author":{"@type":"Person","name":"Blockstack"},"headline":"Excuse our dust!","dateModified":"2018-10-17T09:26:44-07:00","description":"Excuse our dust!","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/common/construction.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -151,13 +151,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
diff --git a/_site/contact/index.html b/_site/contact/index.html
index 25eab1a9..b6710927 100644
--- a/_site/contact/index.html
+++ b/_site/contact/index.html
@@ -7,7 +7,7 @@
Got Any Questions? | Blockstack
-
+
@@ -17,7 +17,7 @@
+{"url":"https://docs.blockstack.org/contact/","author":{"@type":"Person","name":"Blockstack"},"headline":"Got Any Questions?","description":"Docs","@type":"WebPage","@context":"http://schema.org"}
diff --git a/_site/core/atlas/howitworks.html b/_site/core/atlas/howitworks.html
index fab01ab0..44ee3c1e 100644
--- a/_site/core/atlas/howitworks.html
+++ b/_site/core/atlas/howitworks.html
@@ -7,7 +7,7 @@
How Atlas Works | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/atlas/howitworks.html","author":{"@type":"Person","name":"Blockstack"},"headline":"How Atlas Works","dateModified":"2018-10-17T09:26:44-07:00","description":"How Atlas Works","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/atlas/howitworks.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+ Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
@@ -424,7 +429,7 @@ find out which chunks they each have. Atlas nodes download chunks from
neighbors in rarest-first order in order to prioritize data replication for the
chunks that are currently most at-risk for disappearing due to node failure.
- Name operation | chunk hashes | chunk data | Inventory
+ Name operation | chunk hashes | chunk data | Inventory
history | as name state | | vector
+-------------------+
@@ -452,20 +457,18 @@ it has and which ones it does not, and announces it to other Atlas peers so
they can fetch chunks they are missing. In this example, the node's
inventory vector is [1, 0, 1], since the 0th and 2nd chunks are present
but the 1st chunk is missing.
-
-
+
Querying Chunk Inventories
Developers can query a node’s inventory vector as follows:
->>> import blockstack
+>>> import blockstack
>>> result = blockstack . lib . client . get_zonefile_inventory ( "https://node.blockstack.org:6263" , 0 , 524288 )
>>> print len ( result [ 'inv' ])
11278
>>>
-
-
+
The variable result['inv']
here is a big-endian bit vector, where the i th
bit is set to 1 if the i th chunk in the chunk sequence is present. The bit at
diff --git a/_site/core/atlas/howtouse.html b/_site/core/atlas/howtouse.html
index 4f441bec..494873b3 100644
--- a/_site/core/atlas/howtouse.html
+++ b/_site/core/atlas/howtouse.html
@@ -7,7 +7,7 @@
How to Use the Atlas Network | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/atlas/howtouse.html","author":{"@type":"Person","name":"Blockstack"},"headline":"How to Use the Atlas Network","dateModified":"2018-10-17T09:26:44-07:00","description":"How to Use the Atlas Network","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/atlas/howtouse.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+ Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
@@ -316,7 +321,7 @@ chunk data. A client can query up to 100 chunks in one RPC call.
the returned payload will be a dict
with a zonefiles
key that maps the chunk
hashes to their respective data.
->>> import blockstack
+>>> import blockstack
>>> data = blockstack . lib . client . get_zonefiles ( 'https://node.blockstack.org:6263' , [ '1b89a685f4c4ea245ce9433d0b29166c22175ab4' ])
>>> print data [ 'zonefiles' ][ '1b89a685f4c4ea245ce9433d0b29166c22175ab4' ]
$ ORIGIN duckduckgo_tor . id
@@ -324,8 +329,7 @@ hashes to their respective data.
tor TXT "3g2upl4pq6kufc4m.onion"
>>>
-
-
+
(This particular chunk happens to be associated with the BNS name
duckduckgo_tor.id
).
@@ -351,15 +355,14 @@ Browser for doing this.
Once the name operation is confirmed, you can announce the data to the
Atlas network. You can do so with the Python client as follows:
->>> import blockstack
+>>> import blockstack
>>> import base64
->>> data = "..." # this is the chunk data you will announce
->>> data_b64 = base64 . b64encode ( data )
+>>> data = "..." # this is the chunk data you will announce
+ >>> data_b64 = base64 . b64encode ( data )
>>> result = blockstack . lib . client . put_zonefiles ( 'https://node.blockstack.org:6263' , [ data_b64 ])
>>> assert result [ 'saved' ][ 0 ] == 1
>>>
-
-
+
At most five chunks can be announced in one RPC call.
Note that the data must be base64-encoded before it can be announced.
@@ -387,23 +390,22 @@ peer graph, and replicate the chunk to each of them as well.
For example, this code will replicate the chunk to not only
https://node.blockstack.org:6263
, but also to its immediate neighbors.
->>> import blockstack
+>>> import blockstack
>>> import base64
->>> data = "..." # this is the chunk you will replicate widely
->>> data_b64 = base64 . b64encode ( data )
+>>> data = "..." # this is the chunk you will replicate widely
+ >>> data_b64 = base64 . b64encode ( data )
>>>
>>> result = blockstack . lib . client . get_atlas_peers ( 'https://node.blockstack.org:6263' )
>>> neighbors = result [ 'peers' ]
>>> print ", " . join ( neighbors )
-13.65 . 207.163 : 6264 , 52.225 . 128.191 : 6264 , node . blockstack . org : 6264 , 23.102 . 162.7 : 6264 , 52.167 . 230.235 : 6264 , 23.102 . 162.124 : 6264 , 52.151 . 59.26 : 6264 , 13.92 . 134.106 : 6264
+13.65.207.163 : 6264 , 52.225.128.191 : 6264 , node . blockstack . org : 6264 , 23.102.162.7 : 6264 , 52.167.230.235 : 6264 , 23.102.162.124 : 6264 , 52.151.59.26 : 6264 , 13.92.134.106 : 6264
>>>
>>> for neighbor in neighbors :
... result = blockstack . lib . client . put_zonefiles ( neighbor , [ data_b64 ])
... assert result [ 'saved' ][ 0 ] == 1
...
>>>
-
-
+
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
diff --git a/_site/core/atlas/overview.html b/_site/core/atlas/overview.html
index c8de1db4..1b1630dd 100644
--- a/_site/core/atlas/overview.html
+++ b/_site/core/atlas/overview.html
@@ -7,7 +7,7 @@
Overview of the Atlas network | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/atlas/overview.html","author":{"@type":"Person","name":"Blockstack"},"headline":"Overview of the Atlas network","dateModified":"2018-10-17T09:26:44-07:00","description":"Overview of the Atlas network","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/atlas/overview.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+ Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
@@ -323,7 +328,7 @@ propagate them to the Atlas network. BNS API endpoints, including our
will automatically fetch zone files from Atlas when they need to look
up data in Gaia (such as profiles and app data).
- +--------------+ +---------------+ +----------------+
+ +--------------+ +---------------+ +----------------+
clients | Blockstack | | blockstack.js | | BNS API module |
| Browser | | | | |
+--------------+ +---------------+ +----------------+
@@ -358,8 +363,7 @@ up zone files for names using the name's stat value as a zone file hash. Client
can broadcast zone files to the network if they match a previously-announced
hash. In practice, zone files store URLs to a name owner's Gaia hubs, thereby
allowing Blockstack apps to read and write data in Gaia.
-
-
+
Nevertheless, Atlas is a general-purpose content-addressed storage
system that advanced developers can use to host data in an immutable
diff --git a/_site/core/faq_developer.html b/_site/core/faq_developer.html
index 6ae557ca..c6136f6f 100644
--- a/_site/core/faq_developer.html
+++ b/_site/core/faq_developer.html
@@ -7,7 +7,7 @@
Developer FAQs | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/faq_developer.html","author":{"@type":"Person","name":"Blockstack"},"headline":"Developer FAQs","dateModified":"2018-10-17T09:26:44-07:00","description":"Developer FAQs","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/faq_developer.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -195,13 +195,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
@@ -296,17 +296,15 @@ profile. For example, here’s how you would get public data from the
Get the bucket URL
- $ BUCKET_URL = " $( curl -sL https://core.blockstack.org/v1/users/ryan.id | jq -r '."ryan.id"["profile"]["apps"]["http://publik.ykliao.com"]' ) "
-$ echo " $BUCKET_URL "
+ $ BUCKET_URL = " $( curl -sL https://core.blockstack.org/v1/users/ryan.id | jq -r '."ryan.id"["profile"]["apps"]["http://publik.ykliao.com"]' ) "
+$ echo " $BUCKET_URL "
https://gaia.blockstack.org/hub/1FrZTGQ8DM9TMPfGXtXMUvt2NNebLiSzad/
-
-
+
Get the data
- $ curl -sL " ${ BUCKET_URL %%/ } /statuses.json"
+ $ curl -sL " ${ BUCKET_URL %%/ } /statuses.json"
[{ "id" :0,"text" :"Hello, Blockstack!" ,"created_at" :1515786983492}]
-
-
+
diff --git a/_site/core/faq_technical.html b/_site/core/faq_technical.html
index bcb6e98e..2b69296b 100644
--- a/_site/core/faq_technical.html
+++ b/_site/core/faq_technical.html
@@ -7,7 +7,7 @@
Blockstack Technical FAQ | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/faq_technical.html","author":{"@type":"Person","name":"Blockstack"},"headline":"Blockstack Technical FAQ","dateModified":"2018-10-17T09:26:44-07:00","description":"Blockstack Technical FAQ","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/faq_technical.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+ Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
diff --git a/_site/core/install-api.html b/_site/core/install-api.html
index 0aa60eef..cd0d0125 100644
--- a/_site/core/install-api.html
+++ b/_site/core/install-api.html
@@ -7,7 +7,7 @@
Blockstack API | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/install-api.html","author":{"@type":"Person","name":"Blockstack"},"headline":"Blockstack API","dateModified":"2018-10-17T09:26:44-07:00","description":"Blockstack API","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/install-api.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+ Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
@@ -297,7 +302,7 @@ Ubuntu are below.
Step 2: Make sure you have virtualenv installed .
Then, setup the API:
- $ sudo apt-get install -y python-pip memcached rng-tools python-dev libmemcached-dev zlib1g-dev libgmp-dev libffi-dev libssl-dev
+ $ sudo apt-get install -y python-pip memcached rng-tools python-dev libmemcached-dev zlib1g-dev libgmp-dev libffi-dev libssl-dev
$ sudo service memcached start
$ sudo pip install virtualenv
$ sudo npm -g install aglio
@@ -310,8 +315,7 @@ $ blockstack setup_wallet
$ blockstack api start
$ deactivate
$ ./build_docs.sh public_api
-
-
+
@@ -326,10 +330,9 @@ follow the instructions here .
Step 1: Install nginx and uWSGI:
- $ sudo apt-get install -y nginx
+ $ sudo apt-get install -y nginx
$ sudo pip install uwsgi
-
-
+
Step 2: Copy this sample nginx sites file to
@@ -340,9 +343,8 @@ $ sudo pip install uwsgi
and edit the paths depending on the uwsgi blockstack_api socket directory (defaults to /tmp/blockstack_api.sock)
You can test your nginx settings:
-
+
@@ -356,19 +358,17 @@ where your virtualenv is located.
Note: The following sed commands will work if the virtualenv is currently active and your shell is in the repo’s root directory.
-$ sudo sed -i "s/User\=USER/User\=$USER/" /etc/systemd/system/blockstack_api.service
+$ sudo sed -i "s/User\=USER/User\=$USER/" /etc/systemd/system/blockstack_api.service
$ sudo sed -i "s#/path/to/blockstack#$PWD#" /etc/systemd/system/blockstack_api.service
$ sudo sed -i "s#/path/to/virtualenv#$VIRTUAL_ENV#" /etc/systemd/system/blockstack_api.service
-
-
+
Step 4: Get a security certificate from Let’s Encrypt .
- $ git clone https://github.com/certbot/certbot.git
+ $ git clone https://github.com/certbot/certbot.git
$ cd certbot/
$ ./certbot-auto --nginx -d <your_domain>
-
-
+
@@ -376,10 +376,9 @@ $ ./certbot-auto --nginx -d <your_domain>
Step 5: Start nginx and the Blockstack API uwsgi server:
- sudo systemctl restart blockstack_api
+ sudo systemctl restart blockstack_api
sudo systemctl restart nginx
-
-
+
diff --git a/_site/core/memcached.html b/_site/core/memcached.html
index daa79729..193f86c3 100644
--- a/_site/core/memcached.html
+++ b/_site/core/memcached.html
@@ -7,7 +7,7 @@
Installing Memcached | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/memcached.html","author":{"@type":"Person","name":"Blockstack"},"headline":"Installing Memcached","dateModified":"2018-10-17T09:26:44-07:00","description":"Installing Memcached","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/memcached.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+ Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
@@ -288,10 +293,9 @@ running locally.
Memcached on Debian & Ubuntu:
-$ sudo apt-get install -y python-dev libmemcached-dev zlib1g-dev
+$ sudo apt-get install -y python-dev libmemcached-dev zlib1g-dev
$ pip install pylibmc
-
-
+
Memcached on macOS:
@@ -299,28 +303,25 @@ $ pip install pylibmc
After installing Homebrew:
-$ brew install memcached
+$ brew install memcached
$ brew install libmemcached
$ pip install pylibmc --install-option="--with-libmemcached=/usr/local/Cellar/libmemcached/1.0.18_1/"
-
-
+
After installing, you can start memcached and check if it’s running properly:
-$ memcached -d
+$ memcached -d
$ echo stats | nc localhost 11211
-
-
+
Memcached on Heroku
To deploy on Heroku:
-$ heroku create
-$ heroku addons:add memcachedcloud
-$ git push heroku master
-
-
+$ heroku create
+$ heroku addons:add memcachedcloud
+$ git push heroku master
+
diff --git a/_site/core/naming/architecture.html b/_site/core/naming/architecture.html
index d6b911b9..33eced19 100644
--- a/_site/core/naming/architecture.html
+++ b/_site/core/naming/architecture.html
@@ -7,7 +7,7 @@
Understand the Architecture | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/naming/architecture.html","author":{"@type":"Person","name":"Blockstack"},"headline":"Understand the Architecture","dateModified":"2018-10-17T09:26:44-07:00","description":"Understand the Architecture","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/architecture.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+
Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
@@ -308,7 +313,7 @@ and modify names.
The BNS indexer and BNS API comprise the BNS node . An architectural schematic appears below.
- +-------------------------------------------------------+
+ +-------------------------------------------------------+
RESTful | +----------------+ +--------------------+ |
+--------+ API | | | private API | | |
| client |<------------>| BNS API module |<----------->| BNS indexer module | |
@@ -334,8 +339,7 @@ the blochchain via a blockchain peer, over the blockchain's peer network.
Blockstack Core currently implements the API module and indexer module as separate
daemons (`blockstack api` and `blockstack-core`, respectively). However, this
is an implementation detail, and may change in the future.
-
-
+
The BNS indexer implements the blockchain consensus rules and network protocols.
Its main responsibility is to build up and replicate all of the name state. It does
diff --git a/_site/core/naming/comparison.html b/_site/core/naming/comparison.html
index 8574976d..122a4dfb 100644
--- a/_site/core/naming/comparison.html
+++ b/_site/core/naming/comparison.html
@@ -7,7 +7,7 @@
Naming system feature comparison | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/naming/comparison.html","author":{"@type":"Person","name":"Blockstack"},"headline":"Naming system feature comparison","dateModified":"2018-10-17T09:26:44-07:00","description":"Naming system feature comparison","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/comparison.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+ Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
diff --git a/_site/core/naming/creationhowto.html b/_site/core/naming/creationhowto.html
index 1ce8ff60..44f6bb95 100644
--- a/_site/core/naming/creationhowto.html
+++ b/_site/core/naming/creationhowto.html
@@ -7,7 +7,7 @@
Creating a Namespace | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/naming/creationhowto.html","author":{"@type":"Person","name":"Blockstack"},"headline":"Creating a Namespace","dateModified":"2018-10-17T09:26:44-07:00","description":"Creating a Namespace","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/creationhowto.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+ Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
diff --git a/_site/core/naming/did.html b/_site/core/naming/did.html
index 6d081889..b90b53be 100644
--- a/_site/core/naming/did.html
+++ b/_site/core/naming/did.html
@@ -7,7 +7,7 @@
Decentralized Identifiers (DIDs) | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/naming/did.html","author":{"@type":"Person","name":"Blockstack"},"headline":"Decentralized Identifiers (DIDs)","dateModified":"2018-10-17T09:26:44-07:00","description":"Decentralized Identifiers (DIDs)","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/did.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+ Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
@@ -288,14 +293,13 @@ specification for decentralized identifiers (DIDs).
Each name in BNS has an associated DID. The DID format for BNS is:
- did:stack:v0:{address}-{index}
-
-
+ did:stack:v0:{address}-{index}
+
Where:
- { address }
is an on-chain public key hash (e.g. a Bitcoin address).
- { index }
refers to the nth
name this address created.
+ {address}
is an on-chain public key hash (e.g. a Bitcoin address).
+ {index}
refers to the nth
name this address created.
For example, the DID for personal.id
is
@@ -345,20 +349,20 @@ for subdomains, so the software can determine which code-path to take.
- For on-chain BNS names, the { address }
is the same as the Bitcoin address
+
For on-chain BNS names, the {address}
is the same as the Bitcoin address
that owns the name. Currently, both version byte 0 and version byte 5
addresses are supported (i.e. addresses starting with 1
or 3
, meaning p2pkh
and
p2sh
addresses).
- For off-chain BNS subdomains, the { address }
has version byte 63 for
+
For off-chain BNS subdomains, the {address}
has version byte 63 for
subdomains owned by a single private key, and version byte 50 for subdomains
owned by a m-of-n set of private keys. That is, subdomain DID addresses start
with S
or M
, respectively.
-The { index }
field for a subdomain’s DID is distinct from the { index }
field
+
The {index}
field for a subdomain’s DID is distinct from the {index}
field
for a BNS name’s DID, even if the same created both names and subdomains.
For example, the name abcdefgh123456.id
has the DID did:stack:v0:16EMaNw3pkn3v6f2BgnSSs53zAKH4Q8YJg-0
,
because it was the first name created by 16EMaNw3pkn3v6f2BgnSSs53zAKH4Q8YJg
.
@@ -372,7 +376,7 @@ second is encoded with version byte 63).
You can see this play out in practice with the following code snippit:
->>> import blockstack
+>>> import blockstack
>>> blockstack . lib . client . get_name_record ( 'jude.statism.id' , hostport = 'https://node.blockstack.org:6263' )[ 'address' ]
u'16EMaNw3pkn3v6f2BgnSSs53zAKH4Q8YJg'
>>> import virtualchain
@@ -380,8 +384,7 @@ second is encoded with version byte 63).
'SSXMcDiCZ7yFSQSUj7mWzmDcdwYhq97p2i'
>>> blockstack . lib . client . resolve_DID ( 'did:stack:v0:SSXMcDiCZ7yFSQSUj7mWzmDcdwYhq97p2i-0' , hostport = 'https://node.blockstack.org:6263' )
{ 'public_key' : '020fadbbcea0ff3b05f03195b41cd991d7a0af8bd38559943aec99cbdaf0b22cc8' }
-
-
+
diff --git a/_site/core/naming/forks.html b/_site/core/naming/forks.html
index fddd479f..8a5cc2ad 100644
--- a/_site/core/naming/forks.html
+++ b/_site/core/naming/forks.html
@@ -7,7 +7,7 @@
BNS Forks | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/naming/forks.html","author":{"@type":"Person","name":"Blockstack"},"headline":"BNS Forks","dateModified":"2018-10-17T09:26:44-07:00","description":"BNS Forks","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/forks.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+
Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
diff --git a/_site/core/naming/introduction.html b/_site/core/naming/introduction.html
index 6a45a3eb..169ea4b3 100644
--- a/_site/core/naming/introduction.html
+++ b/_site/core/naming/introduction.html
@@ -7,7 +7,7 @@
Blockstack Naming Service (BNS) | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/naming/introduction.html","author":{"@type":"Person","name":"Blockstack"},"headline":"Blockstack Naming Service (BNS)","dateModified":"2018-10-17T09:26:44-07:00","description":"Blockstack Naming Service (BNS)","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/introduction.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+ Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
diff --git a/_site/core/naming/manage.html b/_site/core/naming/manage.html
index bcbe9e03..3c076d1f 100644
--- a/_site/core/naming/manage.html
+++ b/_site/core/naming/manage.html
@@ -7,7 +7,7 @@
Manage BNS Names | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/naming/manage.html","author":{"@type":"Person","name":"Blockstack"},"headline":"Manage BNS Names","dateModified":"2018-10-17T09:26:44-07:00","description":"Manage BNS Names","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/manage.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+ Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
diff --git a/_site/core/naming/namespaces.html b/_site/core/naming/namespaces.html
index 2efe0f07..85955fe4 100644
--- a/_site/core/naming/namespaces.html
+++ b/_site/core/naming/namespaces.html
@@ -7,7 +7,7 @@
Understand Namespaces | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/naming/namespaces.html","author":{"@type":"Person","name":"Blockstack"},"headline":"Understand Namespaces","dateModified":"2018-10-17T09:26:44-07:00","description":"Understand Namespaces","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/namespaces.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+ Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
diff --git a/_site/core/naming/pickname.html b/_site/core/naming/pickname.html
index eb5abb5f..edabc5ed 100644
--- a/_site/core/naming/pickname.html
+++ b/_site/core/naming/pickname.html
@@ -7,7 +7,7 @@
Choose a name | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/naming/pickname.html","author":{"@type":"Person","name":"Blockstack"},"headline":"Choose a name","dateModified":"2018-10-17T09:26:44-07:00","description":"Choose a name","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/pickname.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+ Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
@@ -324,18 +329,17 @@ the BNS API.
List all namespaces in existence (reference ).
-$ curl https://core.blockstack.org/v1/namespaces
+$ curl https://core.blockstack.org/v1/namespaces
[
"id" ,
"helloworld" ,
"podcast"
]
-
-
+
List all names within a namespace (reference )
-$ curl https://core.blockstack.org/v1/namespaces/id/names?page= 0
+$ curl https://core.blockstack.org/v1/namespaces/id/names?page= 0
[
"0.id" ,
"0000.id" ,
@@ -359,30 +363,27 @@ the BNS API.
"0nename.id"
...
]
-
-
+
Each page returns a batch of 100 names.
Get the Cost to Register a Namespace (reference )
-$ curl https://core.blockstack.org/v1/prices/namespaces/test
+$ curl https://core.blockstack.org/v1/prices/namespaces/test
{
"satoshis" : 40000000
}
-
-
+
If you want to register a namespace, please see the namespace creation section .
Getting the Current Consensus Hash (reference )
-$ curl -sL https://core.blockstack.org/v1/blockchains/bitcoin/consensus
+$ curl -sL https://core.blockstack.org/v1/blockchains/bitcoin/consensus
{
"consensus_hash" : "98adf31989bd937576aa190cc9f5fa3a"
}
-
-
+
A recent consensus hash is required to create a NAMESPACE_PREORDER
transaction. The reference
BNS clients do this automatically. See the transaction format
diff --git a/_site/core/naming/register.html b/_site/core/naming/register.html
index 12d5323c..cb475748 100644
--- a/_site/core/naming/register.html
+++ b/_site/core/naming/register.html
@@ -7,7 +7,7 @@
Register a name | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/naming/register.html","author":{"@type":"Person","name":"Blockstack"},"headline":"Register a name","dateModified":"2018-10-17T09:26:44-07:00","description":"Register a name","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/register.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+ Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
@@ -362,13 +367,12 @@ ignored.
Getting a Name’s Registration Fee (reference )
-$ curl -sL https://core.blockstack.org/v1/prices/names/helloworld.id | jq -r ".name_price"
+$ curl -sL https://core.blockstack.org/v1/prices/names/helloworld.id | jq -r ".name_price"
{
"btc" : 2.5e-05,
"satoshis" : 2500
}
-
-
+
Note the use of jq -r
to select the "name_price"
field. This API
endpoint may return other ancilliary data regarding transaction fee estimation,
@@ -376,12 +380,11 @@ but this is the only field guaranteed by this specification to be present.
Getting the Current Consensus Hash (reference )
-$ curl -sL https://core.blockstack.org/v1/blockchains/bitcoin/consensus
+$ curl -sL https://core.blockstack.org/v1/blockchains/bitcoin/consensus
{
"consensus_hash" : "98adf31989bd937576aa190cc9f5fa3a"
}
-
-
+
The consensus hash must be included in the NAME_PREORDER
transaction. The BNS
clients do this automatically. See the transaction format
diff --git a/_site/core/naming/resolving.html b/_site/core/naming/resolving.html
index 3bedd6c6..40e0286d 100644
--- a/_site/core/naming/resolving.html
+++ b/_site/core/naming/resolving.html
@@ -7,7 +7,7 @@
Resolve a name | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/naming/resolving.html","author":{"@type":"Person","name":"Blockstack"},"headline":"Resolve a name","dateModified":"2018-10-17T09:26:44-07:00","description":"Resolve a name","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/resolving.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+ Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
@@ -379,7 +384,7 @@ to do the following:
Look up a name’s public key and zone file (reference )
-$ curl https://core.blockstack.org/v1/names/muneeb.id
+$ curl https://core.blockstack.org/v1/names/muneeb.id
{
"address" : "1J3PUxY5uDShUnHRrMyU6yKtoHEUPhKULs" ,
"blockchain" : "bitcoin" ,
@@ -389,15 +394,14 @@ to do the following:
"zonefile" : " $ORIGIN muneeb.id \n $TTL 3600 \n _http._tcp URI 10 1 \" https://gaia.blockstack.org/hub/1J3PUxY5uDShUnHRrMyU6yKtoHEUPhKULs/0/profile.json \"\n " ,
"zonefile_hash" : "37aecf837c6ae9bdc9dbd98a268f263dacd00361"
}
-
-
+
Note that the zonefile
field is given with the off-chain data that hashes
to the zonefile_hash
field.
List all names the node knows about (reference )
-$ curl https://core.blockstack.org/v1/names?page= 0
+$ curl https://core.blockstack.org/v1/names?page= 0
[
"judecn.id" ,
"3.id" ,
@@ -415,8 +419,7 @@ to the zonefile_hash
field.
"df.id" ,
...
]
-
-
+
Each page returns 100 names. While no specific ordering is mandated by the
protocol, the reference implementation orders names by their order of creation
@@ -424,7 +427,7 @@ in the blockchain.
Look up the history of states a name was in (reference )
-$ curl https://core.blockstack.org/v1/names/patrickstanley.id/history
+$ curl https://core.blockstack.org/v1/names/patrickstanley.id/history
{
"445838" : [
{
@@ -527,8 +530,7 @@ in the blockchain.
}
]
}
-
-
+
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.
@@ -552,7 +554,7 @@ under its previous owner, if the name expired and was reregistered.
Look up the list of names owned by a given public key hash (reference )
-$ curl https://core.blockstack.org/v1/addresses/bitcoin/16EMaNw3pkn3v6f2BgnSSs53zAKH4Q8YJg
+$ curl https://core.blockstack.org/v1/addresses/bitcoin/16EMaNw3pkn3v6f2BgnSSs53zAKH4Q8YJg
{
"names" : [
"judecn.id" ,
@@ -564,8 +566,7 @@ under its previous owner, if the name expired and was reregistered.
"jude.statism.id"
]
}
-
-
+
Note that this API endpoint includes names and
subdomains .
diff --git a/_site/core/naming/search.html b/_site/core/naming/search.html
index 1f256e25..be66b3d2 100644
--- a/_site/core/naming/search.html
+++ b/_site/core/naming/search.html
@@ -7,7 +7,7 @@
How to build a Profile Search Index | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/core/naming/search.html","author":{"@type":"Person","name":"Blockstack"},"headline":"How to build a Profile Search Index","dateModified":"2018-10-17T09:26:44-07:00","description":"How to build a Profile Search Index","datePublished":"2018-10-17T09:26:44-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/search.html"},"@type":"BlogPosting","@context":"http://schema.org"}
@@ -239,6 +239,11 @@
Blockstack CORE API
+
+
+ Bitcoin wire format
+
+
Blockstack Technical FAQ
@@ -269,13 +274,13 @@
-
+
Edit this page on Github
- w Sep 27, 2018
+ w Oct 17, 2018
@@ -300,9 +305,8 @@ with data that follows structure of http://localhost:5000/search?query=<SEARCH_PATTERN>
-
-
+http://localhost:5000/search?query=<SEARCH_PATTERN>
+
This document describes how to setup the search subsystem to respond at that endpoint.
@@ -311,15 +315,14 @@ with data that follows structure of virtualenv installed .
Then, setup the API and search subsystem:
- $ sudo apt-get install -y mongodb memcached python-dev libmemcached-dev zlib1g-dev nginx
+ $ sudo apt-get install -y mongodb memcached python-dev libmemcached-dev zlib1g-dev nginx
$ sudo pip install uwsgi
$ git clone https://github.com/blockstack/blockstack-core.git --branch api
$ cd blockstack-core/
$ sudo pip install .
$ sudo pip install -r api/requirements.txt
$ sudo mkdir /var/blockstack-search && sudo chown $USER:$USER /var/blockstack-search
-
-
+
{
- "people" : [
- {
- "profile" : {
- "website" : [
- {
- "url" : "http://muneebali.com" ,
- "@type" : "WebSite"
- }
- ],
- "name" : "Muneeb Ali" ,
- "address" : {
- "addressLocality" : "New York, NY" ,
- "@type" : "PostalAddress"
- },
- "image" : [
- {
- "contentUrl" : "https://s3.amazonaws.com/dx3/muneeb" ,
- "@type" : "ImageObject" ,
- "name" : "cover"
- },
- {
- "contentUrl" : "https://s3.amazonaws.com/kd4/muneeb" ,
- "@type" : "ImageObject" ,
- "name" : "avatar"
- }
- ],
- "@type" : "Person" ,
- "description" : "Co-founder of Blockstack. Interested in distributed systems and blockchains. Previously, PhD at Princeton."
- },
- "username" : "muneeb"
- },
- {
- "profile" : {
- "message" : "This blockchain ID is reserved for Muneeb Ali. If this is you, please email support@onename.com to claim it for free." ,
- "status" : "reserved"
- },
- "username" : "muneebali"
- },
- {
- "profile" : {
- "cover" : {
- "url" : "https://s3.amazonaws.com/97p/HHE.jpg"
- },
- "v" : "0.2"
- },
- "username" : "muneebali1"
- }
-
- ]
- }
-
-
+