diff --git a/packages/composer-website/jekylldocs/_includes/sidebars/businessnetworks.md b/packages/composer-website/jekylldocs/_includes/sidebars/businessnetworks.md index 09b69f0849..95b9f7b072 100644 --- a/packages/composer-website/jekylldocs/_includes/sidebars/businessnetworks.md +++ b/packages/composer-website/jekylldocs/_includes/sidebars/businessnetworks.md @@ -8,6 +8,7 @@ [Emitting events](../business-network/publishing-events.html) [Testing](../business-network/testing.html) [Publishing to npm](../business-network/bnd-publish.html) +[Querying Assets](../business-network/query.html) **[Developing Applications](../applications/applications-index.html)** **[Integrating Existing Systems](../integrating/integrating-index.html)** **[Managing and Operating](../managing/managingindex.html)** diff --git a/packages/composer-website/jekylldocs/_includes/sidebars/integrating.md b/packages/composer-website/jekylldocs/_includes/sidebars/integrating.md index e870015d44..62543d8b51 100644 --- a/packages/composer-website/jekylldocs/_includes/sidebars/integrating.md +++ b/packages/composer-website/jekylldocs/_includes/sidebars/integrating.md @@ -8,6 +8,7 @@ [Enabling REST API authentication for a business network](../integrating/enabling-rest-authentication.html) [Deploying the REST server for a business network](../integrating/deploying-the-rest-server.html) [Calling external REST services](../integrating/call-out.html) +[Integrating using Node-RED](../integrating/node-red.html) **[Managing and Operating](../managing/managingindex.html)** **[Diagnosing Problems](../problems/diagnostics.html)** **[Reference](../reference/MeetTheModules.html)** diff --git a/packages/composer-website/jekylldocs/assets/img/ComposerArchitecture.svg b/packages/composer-website/jekylldocs/assets/img/ComposerArchitecture.svg index 3558140025..3aa03ee1da 100644 --- a/packages/composer-website/jekylldocs/assets/img/ComposerArchitecture.svg +++ b/packages/composer-website/jekylldocs/assets/img/ComposerArchitecture.svg @@ -1 +1 @@ -ComposerArchitecture \ No newline at end of file +ComposerArchitecture \ No newline at end of file diff --git a/packages/composer-website/jekylldocs/business-network/query.md b/packages/composer-website/jekylldocs/business-network/query.md index 811d9a0a69..cd2352191e 100644 --- a/packages/composer-website/jekylldocs/business-network/query.md +++ b/packages/composer-website/jekylldocs/business-network/query.md @@ -34,6 +34,7 @@ The JS Object returned is composed of an array of objects, each with a `Key` and ### Example The example below runs a content-based query to select all `SMALL` marbles, verifies the number of marbles returned, and that they are indeed all `SMALL`. + ``` /** * Executes a CouchDB query and checks the results. diff --git a/packages/composer-website/jekylldocs/integrating/node-red.md b/packages/composer-website/jekylldocs/integrating/node-red.md new file mode 100644 index 0000000000..e60199d697 --- /dev/null +++ b/packages/composer-website/jekylldocs/integrating/node-red.md @@ -0,0 +1,23 @@ +--- +layout: default +title: Integrating with Node-RED +category: integrating +section: integrating +sidebar: sidebars/integrating.md +excerpt: Deploying the REST server for a business network +--- + +# Integrating with Node-RED + +[Node-RED](http://nodered.org) is a lightweight Open Source integration technology, written in JavaScript. It uses a graphical flow to integrate different _nodes_, where nodes can receive data, transform data and output data. + +Node-RED is commonly used to rapidly prototype Internet of Things style applications, or to wire existing Internet services together. +You can use the {{site.data.conrefs.composer_full}} Node-RED contribution to: +- Submit transactions +- Read and update assets and participants +- Subscribe to events + +_Note: delete operations on assets and participants are not yet supported._ + +The {{site.data.conrefs.composer_full}} Node-RED nodes are distributed as a standalone npm package, published here: +- https://www.npmjs.com/package/node-red-contrib-hyperledger-composer diff --git a/packages/composer-website/jekylldocs/introduction/solution-architecture.md b/packages/composer-website/jekylldocs/introduction/solution-architecture.md index d5f6b88dea..cc52c10063 100644 --- a/packages/composer-website/jekylldocs/introduction/solution-architecture.md +++ b/packages/composer-website/jekylldocs/introduction/solution-architecture.md @@ -31,7 +31,7 @@ excerpt: {{site.data.conrefs.composer_full}} has been designed to support different pluggable runtimes, and currently has four runtime implementations: * {{site.data.conrefs.hlf_full}} version 0.6. State is stored on the distributed ledger. -* {{site.data.conrefs.hlf_full}} version 1.0 alpha1. State is stored on the distributed ledger. +* {{site.data.conrefs.hlf_full}} version 1.0 beta. State is stored on the distributed ledger. * Web, which executes within a web page, and is used by Playground. State is stored in browser local storage. * Embedded, which executes within a Node.js process, and is used primarily for unit testing business logic. State is stored in an in-memory key-value store. diff --git a/packages/composer-website/jekylldocs/reference/composer.identity.import.md b/packages/composer-website/jekylldocs/reference/composer.identity.import.md index 4da030bcf0..9046e73d63 100644 --- a/packages/composer-website/jekylldocs/reference/composer.identity.import.md +++ b/packages/composer-website/jekylldocs/reference/composer.identity.import.md @@ -19,7 +19,7 @@ All the options are required. The `userId` doesn't have to match any information ## Syntax example ``` -node cli.js identity import -p hlfv1 -u PeerAdmin -c ./peerOrganizations/org1.example.com/users/Admin@org1.example.com/signcerts/Admin@org1.example.com-cert.pem -k ./peerOrganizations/org1.example.com/users/Admin@org1.example.com/keystore/9022d671ceedbb24af3ea69b5a8136cc64203df6b9920e26f48123fcfcb1d2e9_sk +composer identity import -p hlfv1 -u PeerAdmin -c ./peerOrganizations/org1.example.com/users/Admin@org1.example.com/signcerts/Admin@org1.example.com-cert.pem -k ./peerOrganizations/org1.example.com/users/Admin@org1.example.com/keystore/9022d671ceedbb24af3ea69b5a8136cc64203df6b9920e26f48123fcfcb1d2e9_sk ``` ## Options diff --git a/packages/composer-website/jekylldocs/tutorials/developer-guide.md b/packages/composer-website/jekylldocs/tutorials/developer-guide.md index 67db9de6d4..d20e22d670 100644 --- a/packages/composer-website/jekylldocs/tutorials/developer-guide.md +++ b/packages/composer-website/jekylldocs/tutorials/developer-guide.md @@ -101,7 +101,7 @@ As an example, we're going to replace the entire contents of the file 'sample.ct /** * My commodity trading network */ -namespace org.example.mynetwork +namespace org.acme.mynetwork asset Commodity identified by tradingSymbol { o String tradingSymbol o String description @@ -151,12 +151,12 @@ Now replace the entire contents of `sample.js` with the function below (includin /** * Track the trade of a commodity from one trader to another - * @param {org.example.mynetwork.Trade} trade - the trade to be processed + * @param {org.acme.mynetwork.Trade} trade - the trade to be processed * @transaction */ function tradeCommodity(trade) { trade.commodity.owner = trade.newOwner; - return getAssetRegistry('org.example.mynetwork.Commodity') + return getAssetRegistry('org.acme.mynetwork.Commodity') .then(function (assetRegistry) { return assetRegistry.update(trade.commodity); }); @@ -179,7 +179,7 @@ rule Default { description: "Allow all participants access to all resources" participant: "ANY" operation: ALL - resource: "org.example.mynetwork" + resource: "org.acme.mynetwork" action: ALLOW } ``` @@ -257,7 +257,7 @@ const path = require('path'); require('chai').should(); const bfs_fs = BrowserFS.BFSRequire('fs'); -const NS = 'org.example.mynetwork'; +const NS = 'org.acme.mynetwork'; describe('Commodity Trading', () => { @@ -418,7 +418,7 @@ Next, navigate to the "Test" tab at the top and create two 'Trader' participants ``` { - "$class": "org.example.mynetwork.Trader", + "$class": "org.acme.mynetwork.Trader", "tradeId": "TRADER1", "firstName": "Jenny", "lastName": "Jones" @@ -427,7 +427,7 @@ Next, navigate to the "Test" tab at the top and create two 'Trader' participants ``` { - "$class": "org.example.mynetwork.Trader", + "$class": "org.acme.mynetwork.Trader", "tradeId": "TRADER2", "firstName": "Amy", "lastName": "Williams" @@ -442,12 +442,12 @@ Create a new instance of a Commodity (asset) by navigating to the Commodity regi ``` { - "$class": "org.example.mynetwork.Commodity", + "$class": "org.acme.mynetwork.Commodity", "tradingSymbol": "ABC", "description": "Test commodity", "mainExchange": "Euronext", "quantity": 72.297, - "owner": "resource:org.example.mynetwork.Trader#TRADER1" + "owner": "resource:org.acme.mynetwork.Trader#TRADER1" } ``` @@ -459,9 +459,9 @@ Next, submit a `Trade` transaction by clicking the "Submit Transaction" button, ``` { - "$class": "org.example.mynetwork.Trade", - "commodity": "resource:org.example.mynetwork.Commodity#ABC", - "newOwner": "resource:org.example.mynetwork.Trader#TRADER2" + "$class": "org.acme.mynetwork.Trade", + "commodity": "resource:org.acme.mynetwork.Commodity#ABC", + "newOwner": "resource:org.acme.mynetwork.Trader#TRADER2" } ``` @@ -483,7 +483,7 @@ Switch to the terminal, change directory to the `dist` folder containing the `my ``` cd dist -composer network deploy -a my-network.bna -p hlfv1 -i admin -s adminpw +composer network deploy -a my-network.bna -p hlfv1 -i PeerAdmin -s randomString ``` @@ -565,7 +565,7 @@ First, use the `POST` method on Trader to create a new instance of a Trader - fi ``` { - "$class": "org.example.mynetwork.Trader", + "$class": "org.acme.mynetwork.Trader", "tradeId": "TRADER1", "firstName": "Jenny", "lastName": "Jones"