You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 8, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: packages/composer-website/jekylldocs/installing/createconnectionprofile.md
+9-15Lines changed: 9 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,39 +10,33 @@ excerpt: How to create a new connection profile
10
10
11
11
---
12
12
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)
14
14
15
15
## Procedure
16
16
17
17
1. Navigate to the Connection Profile store:
18
18
19
-
```
20
19
cd $HOME/.composer-connection-profiles
21
-
```
20
+
22
21
2. Create a new profile folder.
23
22
24
-
```
25
23
mkdir ./MyProfile
26
-
```
24
+
27
25
3. Navigate into the new profile folder.
28
26
29
-
```
30
27
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:
33
28
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:
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:
44
39
45
-
```
46
40
{
47
41
"type": "hlfv1",
48
42
"orderers": [
@@ -59,14 +53,14 @@ A Connection Profile is used by {{site.data.conrefs.composer_full}} to connect t
59
53
"eventURL": "grpc://localhost:7058"
60
54
}
61
55
],
62
-
"keyValStore": "/home/matthew/.hfc-key-store",
56
+
"keyValStore": "/home/.hfc-key-store",
63
57
"channel": "mychannel",
64
58
"mspID": "Org1MSP",
65
59
"deployWaitTime": "300",
66
60
"invokeWaitTime": "100"
67
61
}
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`*
Copy file name to clipboardExpand all lines: packages/composer-website/jekylldocs/installing/quickstart.md
+4-12Lines changed: 4 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,29 +40,21 @@ If you need to update or install any of the prerequisites, please refer to [inst
40
40
```
41
41
*Please note: When using Ubuntu this command will fail when running in a root user shell.*
42
42
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:
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:
55
51
56
-
```
57
52
$ cd composer-sample-applications/packages/getting-started
58
53
$ 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:
61
55
62
-
```
63
56
$ cd composer-sample-applications-hlfv1/packages/getting-started
64
57
$ npm install
65
-
```
66
58
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.
67
59
68
60
4. Run the `npm test` command. You should see output similar to that shown below (output below is for a v0.6 sample application)
Copy file name to clipboardExpand all lines: packages/composer-website/jekylldocs/tutorials/defining-a-business-network.md
+28-35Lines changed: 28 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,56 +38,49 @@ which controls the transactions, in this script file, there is JavaScript logic
38
38
39
39
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.
40
40
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
+
}
50
49
51
50
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**.
52
51
53
52
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.
54
53
55
54
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.
56
55
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
+
}
64
61
65
62
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:
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:
82
77
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
+
}
91
84
92
85
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!
0 commit comments