Skip to content

Commit

Permalink
Merge pull request #180 from tnguyen42/patch-4
Browse files Browse the repository at this point in the history
Minor corrections and details
  • Loading branch information
kremalicious authored Jul 5, 2018
2 parents 64b3272 + 80811b8 commit 6376e53
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ To do so, you need to pass the **app_id and app_key**.

.. code-block:: js
let bdb = new driver.Connection('https://test.bigchaindb.com/api/v1/', {
let conn = new driver.Connection('https://test.bigchaindb.com/api/v1/', {
app_id: 'Get one from testnet.bigchaindb.com',
app_key: 'Get one from testnet.bigchaindb.com'
})
Expand Down Expand Up @@ -365,11 +365,8 @@ Recap: Asset Creation & Transfer
// Post with commit so transaction is validated and included in a block
return conn.postTransactionCommit(txTransferBobSigned)
})
.then(res => {
console.log('Response from BDB server:', res)
return res.id
})
.then(tx => {
console.log('Response from BDB server:', tx)
console.log('Is Bob the owner?', tx['outputs'][0]['public_keys'][0] == bob.publicKey)
console.log('Was Alice the previous owner?', tx['inputs'][0]['owners_before'][0] == alice.publicKey )
})
Expand Down Expand Up @@ -408,7 +405,7 @@ Websocket Event Stream API Usage
--------------------------------

The Event Stream API enables new ways to interact with BigchainDB, making it possible for your application to subscribe to all newly–confirmed transactions that are happening in the system.
Below piece of code can be opened in your web browser. It will connect to your websocket (change it at ``var wsUri``). This web page will display all validated transactions.
Below piece of code can be opened in your web browser. It will connect to your websocket (if you are using the testnet, redefine ``var wsUri ='wss://test.bigchaindb.com:443/api/v1/streams/valid_transactions'``). This web page will display all validated transactions.

.. code-block:: html

Expand Down

0 comments on commit 6376e53

Please sign in to comment.