Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 34b997c

Browse files
authored
Lots of small fixes and formatting changes. Also events are now in the ToC. (#1074)
* Updates for work * Adding Installing Index to ToC * Removing Fabric Composer name * Removing Fabric composer name * Moving images for REST API doc * Fabric Composer Name removal * Fabric Composer name removal * Other name changes (Stack Overflow, GitHub, Rocket.Chat, JavaScript) * wording updates and bug splats * ToC Updates * HLv1 docs updates, couple more bug splats. * Last edit for HLv1 * Whoops, bug splat * Another bug splat... * Quick fixes prereqs navbar * intro diagram fix and bug fixes * Fixes and updates * Rollback optional script for v1.0 * QoL changes and rollback changes - Quickstart * Link fixes * Atom links fix, formatting fix * Odd formatting fix. * Name change and codeblock fix * More odd formatting fixes * Ubuntu root user doc fix + draft of bnd doc changes * update for CLI define + deploy BNA * last bnd update * Events and bug fixes * Last event thing * Updates for #803 and #822 * removing unnecessary stuff * Undeploy support #673 * Clarifications on undeploy * Commit? * Revert "Commit?" This reverts commit 9094568. * Quick Fixes * Quick fix for connection profile keyvalstore * Updates to show events docs in ToC * Quick fixes
1 parent 89b91d4 commit 34b997c

File tree

6 files changed

+46
-65
lines changed

6 files changed

+46
-65
lines changed

packages/composer-website/jekylldocs/_includes/sidebars/applications.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
**[Writing Applications](../applications/genapp.html)**
66
[Generating a starter application](../applications/genapp.html)
77
[Writing a node.js application](../applications/getting-started-nodejs-app.html)
8+
[Subscribing to events](../applications/subscribing-to-events.html)
89
[Generating a REST API](../applications/rest-api-server.html)
910
**[Integrating Existing Systems](../integrating/integrating-index.html)**
1011
**[Managing and Operating](../managing/managingindex.html)**

packages/composer-website/jekylldocs/_includes/sidebars/businessnetworks.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
[Defining a business network](../business-network/getting-started-coding-bnd.html)
88
[Deploying a business network](../business-network/deploybusinessnetwork.html)
99
[Create a business network definition](../business-network/bnd-define.html)
10+
[Publishing events](../business-network/publishing-events.html)
1011
[Publish a business network definition](../business-network/bnd-publish.html)
1112
[Publish a business domain model](../business-network/model-publish.html)
1213
[Update a business network definition on Composer](../business-network/runtime-update.html)

packages/composer-website/jekylldocs/installing/createconnectionprofile.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,33 @@ excerpt: How to create a new connection profile
1010

1111
---
1212

13-
A Connection Profile is used by {{site.data.conrefs.composer_full}} to connect to a running Hyperledger Fabric instance. More information about Connection Profiles can be found [here](../reference/connectionprofile.html)
13+
A Connection Profile is used by {{site.data.conrefs.composer_full}} to connect to a running {{site.data.conrefs.hyperledger_fabric_full}} instance. More information about Connection Profiles can be found [here](../reference/connectionprofile.html)
1414

1515
## Procedure
1616

1717
1. Navigate to the Connection Profile store:
1818

19-
```
2019
cd $HOME/.composer-connection-profiles
21-
```
20+
2221
2. Create a new profile folder.
2322

24-
```
2523
mkdir ./MyProfile
26-
```
24+
2725
3. Navigate into the new profile folder.
2826

29-
```
3027
cd MyProfile
31-
```
32-
4. Create a new file called `connection.json` that contains the following information for either Hyperledger Fabric v0.6 or v1.0. If you are creating a connection profile for Hyperledger Fabric v0.6, use the following format:
3328

34-
```
29+
4. Create a new file called `connection.json` that contains the following information for either {{site.data.conrefs.hyperledger_fabric_full}} v0.6 or v1.0. If you are creating a connection profile for {{site.data.conrefs.hyperledger_fabric_full}} v0.6, use the following format:
30+
3531
{
3632
"type": <hlf|web>,
3733
"keyValStore":"/home/<your-username>/.composer-credentials",
3834
"membershipServicesURL": <your-membership-services-url>,
3935
"peerURL": <your-peer-url>,
4036
"eventHubURL": <your-event-hub-url>
4137
}
42-
```
43-
If you are creating a connection profile for Hyperledger Fabric v1.0, use the following format:
38+
If you are creating a connection profile for {{site.data.conrefs.hyperledger_fabric_full}} v1.0, use the following format:
4439

45-
```
4640
{
4741
"type": "hlfv1",
4842
"orderers": [
@@ -59,14 +53,14 @@ A Connection Profile is used by {{site.data.conrefs.composer_full}} to connect t
5953
"eventURL": "grpc://localhost:7058"
6054
}
6155
],
62-
"keyValStore": "/home/matthew/.hfc-key-store",
56+
"keyValStore": "/home/.hfc-key-store",
6357
"channel": "mychannel",
6458
"mspID": "Org1MSP",
6559
"deployWaitTime": "300",
6660
"invokeWaitTime": "100"
6761
}
68-
```
69-
62+
*Please note: If you are connecting to an instance of {{site.data.conrefs.hyperledger_fabric_full}} v1.0 the `keyValStore` property must be `home/.hfc-key-store`*
63+
7064
---
7165

7266
## What next?

packages/composer-website/jekylldocs/installing/quickstart.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,29 +40,21 @@ If you need to update or install any of the prerequisites, please refer to [inst
4040
```
4141
*Please note: When using Ubuntu this command will fail when running in a root user shell.*
4242

43-
2. Clone the Composer sample applications GitHub repository. Choose from either the v0.6 sample application or the v1.0 sample application, the former will stand up a Hyperledger Fabric v0.6 environment ; the latter will stand up a newer Hyperledger Fabric v1.0 environment using a docker command sequence. For Hyperledger v0.6 use the following command:
43+
2. Clone the Composer sample applications GitHub repository. Choose from either the v0.6 sample application or the v1.0 sample application, the former will stand up a Hyperledger Fabric v0.6 environment ; the latter will stand up a newer Hyperledger Fabric v1.0 environment using a docker command sequence. For Hyperledger Fabric v0.6 use the following command:
4444

45-
```
4645
$ git clone https://github.com/hyperledger/composer-sample-applications.git
47-
```
48-
For Hyperledger v1.0 use the following command:
46+
For Hyperledger Fabric v1.0 use the following command:
4947

50-
```
5148
$ git clone https://github.com/hyperledger/composer-sample-applications-hlfv1.git
52-
```
5349

54-
3. Install the getting started application using one of the following commands. If you are using Hyperledger v0.6 use the following command:
50+
3. Install the getting started application using one of the following commands. If you are using Hyperledger Fabric v0.6 use the following command:
5551

56-
```
5752
$ cd composer-sample-applications/packages/getting-started
5853
$ npm install
59-
```
60-
If you are using Hyperledger v1.0, use the following command:
54+
If you are using Hyperledger Fabric v1.0, use the following command:
6155

62-
```
6356
$ cd composer-sample-applications-hlfv1/packages/getting-started
6457
$ npm install
65-
```
6658
Amongst the steps (described below), the command returns information about the deployed digital property network such as name, models, registries etc.<br><br>`npm install` runs several scripts that are packaged into the getting-started directory and uses the docker-compose `.yml` file mentioned below to pull/download the relevant Hyperledger Fabric docker images.<br><br>There is [reference material](https://hyperledger.github.io/composer/reference/commands.html) for Composer CLI.
6759

6860
4. Run the `npm test` command. You should see output similar to that shown below (output below is for a v0.6 sample application)

packages/composer-website/jekylldocs/managing/github-oauth.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ To enable importing of samples without receiving an error when the rate limit is
1313
1. Go to [GitHub OAuth Applications](https://github.com/settings/developers).
1414
2. Register a new application.
1515
- The `Authorization callback URL` should be set to `localhost:<port>/github`.
16-
3. On the command line navigate to the `composer-connector-server` config directory.
16+
3. On the command line navigate to the `composer-playground-ui` config directory.
1717

1818
```
19-
cd composer/packages/composer-connector-server/config
19+
cd composer/packages/composer-playground-ui/config
2020
```
2121
4. Copy the file.
2222
2323
```
2424
cp .env.sample .env
2525
```
2626
5. Open the `.env` file and set the `CLIENT_ID` and `CLIENT_SECRET` to the values that were given when you registered the application.
27-
6. (optional) The `port` which the `composer-connector-server` can also be set by setting the `PORT` value in the `.env` file.
27+
6. (optional) The `port` which the `composer-playground-ui` can also be set by setting the `PORT` value in the `.env` file.

packages/composer-website/jekylldocs/tutorials/defining-a-business-network.md

Lines changed: 28 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -38,56 +38,49 @@ which controls the transactions, in this script file, there is JavaScript logic
3838

3939
2. To start with, add a *Member* participant by clicking **Member** then clicking **Create New Participant**. Enter the balance, email, and name credentials for the new participant in the following format, then click **Create New**. The credentials which are required for each participant are defined in the `.cto` file viewable in the **Define** tab.
4040

41-
```
42-
{
43-
"$class": "org.acme.vehicle.auction.Member",
44-
"balance": "100",
45-
"email": "alice@biznet.org",
46-
"firstName": "Alice",
47-
"lastName": "Smith"
48-
}
49-
```
41+
42+
{
43+
"$class": "org.acme.vehicle.auction.Member",
44+
"balance": "100",
45+
"email": "alice@biznet.org",
46+
"firstName": "Alice",
47+
"lastName": "Smith"
48+
}
5049

5150
3. Create two more *Members* in the same way as step 5, with different balance, email, and name credentials. Then, click the **Auctioneer** participant type on the left, and then create an Auctioneer participant by click **Create New Participant**.
5251

5352
4. Now that there are three *Members*; two to bid against each other and another to be the initial owner of the *Vehicle* asset. We also have an *Auctioneer* to close the bidding. Next we need an assets, in this case a *Vehicle* asset, for them to bid over, and a *Vehicle Listing* asset to control the reserve price and record the current highest offer.
5453

5554
5. To create a *Vehicle* asset, click **Vehicle**, then **Create New Asset**. Enter the VIN (Vehicle Identification Number) and the email address of the owner. In this case, enter the email address of one of the *Members* created in step 5 or 6, then click **Create New** to finish creating the asset. Now, the asset exists and has a set owner. The *Vehicle* asset credentials must be in the following format, as defined in the `.cto` file.
5655

57-
```
58-
{
59-
"$class": "org.acme.vehicle.auction.Vehicle",
60-
"vin": "1234",
61-
"owner": "dave@biznet.org"
62-
}
63-
```
56+
{
57+
"$class": "org.acme.vehicle.auction.Vehicle",
58+
"vin": "1234",
59+
"owner": "dave@biznet.org"
60+
}
6461

6562
6. Next, to sell the car at auction, an auction listing asset must be created. Assets can be any tangible or intangible goods or services, in this case, the auction listing itself. To create the auction listing, click **VehicleListing** then click **Create New Asset**. The *VehicleListing* requires several properties, and should have the following format:
6663

67-
```
68-
{
69-
"$class": "org.acme.vehicle.auction.VehicleListing",
70-
"listingId": "listing_1",
71-
"reservePrice": 2000,
72-
"description": "dave's car",
73-
"state": "FOR_SALE",
74-
"offers": [],
75-
"vehicle": "1234"
76-
}
77-
```
64+
{
65+
"$class": "org.acme.vehicle.auction.VehicleListing",
66+
"listingId": "listing_1",
67+
"reservePrice": 2000,
68+
"description": "dave's car",
69+
"state": "FOR_SALE",
70+
"offers": [],
71+
"vehicle": "1234"
72+
}
7873

7974
### Running the auction
8075

8176
1. Now that you have *Members* to own and bid on an asset, an *Auctioneer*, a *Vehicle* asset with registered ownership, and a *VehicleListing* asset to track the bids, reserve price, and state of the auction. The next step is to begin using transactions to interact with assets. This sample includes the *Offer* and *CloseBidding* transactions. Transactions, combined with assets and participants, make up the economic model of a business network. Transactions can modify, transfer, or otherwise alter assets, as in this sample, where transactions allow participants to place bids or allow the auctioneer to close the auction. Placing a bid uses the *Offer* transaction. To submit a transaction, click the **Submit Transaction** button. In the dialog box, use the dropdown to select the *Offer* transaction type. The *Offer* transaction requires a number of properties and should have the following format:
8277

83-
```
84-
{
85-
"$class": "org.acme.vehicle.auction.Offer",
86-
"bidPrice": "1000",
87-
"listing": "listing_1",
88-
"member": "alice@biznet.org"
89-
}
90-
```
78+
{
79+
"$class": "org.acme.vehicle.auction.Offer",
80+
"bidPrice": "1000",
81+
"listing": "listing_1",
82+
"member": "alice@biznet.org"
83+
}
9184

9285
2. Now that you've submitted an *Offer* transaction, we can check that it has been successfully applied to the *VehicleListing* asset. Click **VehicleListing** and then click **Show All** in your listing entry. You should see that there is now an entry for the *Offer* transaction in the `offers` property of the listing asset. Congratulations, you've just made your first bid!
9386

0 commit comments

Comments
 (0)