Skip to content

Commit 153e83b

Browse files
author
Bobbie Cochrane
committed
Resolved conflicts
1 parent 6827af1 commit 153e83b

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -247,20 +247,19 @@ func main() {
247247
```
248248
249249
### Need Help?
250-
If you're stuck or confused at any point, just go check out the `chaincode_finished.go` file. Use this file to validate that the code snippets you're building into chaincode_start.go are correct.
251250
252-
#Interacting with Your First Chaincode
253-
The fastest way to test your chaincode is to use the REST interface on your peers.
254-
If you're using the blockchain service on Bluemix, you should follow the steps described [here](https://new-console.ng.bluemix.net/docs/services/blockchain/ibmblockchain_tutorials.html). Otherwise, we recommend using a tool like Postman, as described in the [environment setup documentation](docs/setup.md).
255-
There are two REST endpoints we will be interacting with: `/chaincode` and `/registrar`.
256-
- `/chaincode` is the endpoint used for deploying, invoking, and querying chaincode. Which operation you perform is controlled by the body of the request that you send.
257-
- `/registrar` allows you to enroll users. Why does this matter? Read on!
251+
If you're stuck or confused at any point, just go check out the `chaincode_finished.go` file. Use this file to validate that the code snippets you're building into chaincode_start.go are correct.
252+
253+
# Interacting with Your First Chaincode
254+
The fastest way to test your chaincode is to use the REST interface on your peers. If you're using the blockchain service on Bluemix, you should follow the steps described [here](https://new-console.ng.bluemix.net/docs/services/blockchain/ibmblockchain_tutorials.html). Otherwise, we recommend using a tool like Postman, as described in the [environment setup documentation](docs/setup.md). There are two REST endpoints we will be interacting with: `/chaincode` and `/registrar`.
255+
- `/chaincode` is the endpoint used for deploying, invoking, and querying chaincode. Which operation you perform is controlled by the body of the request that you send.
256+
- `/registrar` allows you to enroll users. Why does this matter? Read on!
258257
259258
### Secure Enrollment
260-
Calls to the `/chaincode` endpoint of the REST interface require a secure context ID to be included in the body of the request.
261-
This means that you must first enroll a user from the user list in the membership service for your network.
262-
- Find an available user to enroll on one of your peers. This will most likely require you to grab a user from the [membersrvc.yaml](fabric/membersrvc/membersrvc.yaml) file for your network. Look for the section that has a list of users like this:
263-
259+
Calls to the `/chaincode` endpoint of the REST interface require a secure context ID to be included in the body of the request. This means that you must first enroll a user from the user list in the membership service for your network.
260+
261+
- Find an available user to enroll on one of your peers. This will most likely require you to grab a user from the [membersrvc.yaml](fabric/membersrvc/membersrvc.yaml) file for your network. Look for the section that has a list of users like this:
262+
264263
```
265264
...
266265
test_user0: 1 MS9qrN8hFjlE bank_a 00001
@@ -295,9 +294,11 @@ This means that you must first enroll a user from the user list in the membershi
295294
296295
If you didn't receive a "Login successful" response, go back and make sure you properly copied your enrollment ID and secret. Now, you have an ID that you can use when deploying, invoking, and querying chaincode in the subsequent steps.
297296
297+
If you didn't receive a "Login successful" response, go back and make sure you properly copied your enrollment ID and secret. Now, you have an ID that you can use when deploying, invoking, and querying chaincode in the subsequent steps.
298+
298299
### Deploying the chaincode
299-
In order to deploy chaincode through the REST interface, you will need to have the chaincode stored in a public git repository.
300-
When you send a deploy request to a peer, you send it the url to your chaincode repository, as well as the parameters necessary to initialize the chaincode.
300+
301+
In order to deploy chaincode through the REST interface, you will need to have the chaincode stored in a public git repository. When you send a deploy request to a peer, you send it the url to your chaincode repository, as well as the parameters necessary to initialize the chaincode.
301302
302303
**Before you deploy** the code, make sure it builds locally!
303304
- Open a terminal
@@ -344,8 +345,7 @@ When you send a deploy request to a peer, you send it the url to your chaincode
344345
345346
![/chaincode deploy response](imgs/deploy_response.PNG)
346347
347-
The long string response for the deployment will contain an ID that is associated with this chaincode. The ID is a 128 character alphanumeric hash. Copy this ID on your notepad as well. You should now have a set of enrollID credentials and the cryptographic hash representing your chaincode.
348-
This is how you will reference the chaincode in any future Invoke or Query transactions.
348+
The long string response for the deployment will contain an ID that is associated with this chaincode. The ID is a 128 character alphanumeric hash. Copy this ID on your notepad as well. You should now have a set of enrollID credentials and the cryptographic hash representing your chaincode. This is how you will reference the chaincode in any future Invoke or Query transactions.
349349
350350
### Query
351351

0 commit comments

Comments
 (0)