@@ -5,10 +5,10 @@ What is Chaincode?
5
5
------------------
6
6
7
7
Chaincode is a program, written in `Go <https://golang.org >`_, `node.js <https://nodejs.org >`_,
8
- that implements a prescribed interface. Eventually, other programming languages such as Java,
9
- will be supported. Chaincode runs in a secured Docker container isolated from
10
- the endorsing peer process. Chaincode initializes and manages the ledger state
11
- through transactions submitted by applications.
8
+ or ` Java < https://java.com/en/ >`_ that implements a prescribed interface.
9
+ Chaincode runs in a secured Docker container isolated from the endorsing peer
10
+ process. Chaincode initializes and manages the ledger state through transactions
11
+ submitted by applications.
12
12
13
13
A chaincode typically handles business logic agreed to by members of the
14
14
network, so it similar to a "smart contract". A chaincode can be invoked to update or query
@@ -40,7 +40,8 @@ Chaincode API
40
40
Every chaincode program must implement the ``Chaincode `` interface:
41
41
42
42
- `Go <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#Chaincode >`__
43
- - `node.js <https://fabric-shim.github.io/ChaincodeInterface.html >`__
43
+ - `node.js <https://fabric-shim.github.io/fabric-shim.ChaincodeInterface.html >`__
44
+ - `Java <https://fabric-chaincode-java.github.io/org/hyperledger/fabric/shim/Chaincode.html >`_
44
45
45
46
whose methods are called in response to received transactions.
46
47
In particular the ``Init `` method is called when a
@@ -52,13 +53,14 @@ application state. The ``Invoke`` method is called in response to receiving an
52
53
The other interface in the chaincode "shim" APIs is the ``ChaincodeStubInterface ``:
53
54
54
55
- `Go <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStubInterface >`__
55
- - `node.js <https://fabric-shim.github.io/ChaincodeStub.html >`__
56
+ - `node.js <https://fabric-shim.github.io/fabric-shim.ChaincodeStub.html >`__
57
+ - `Java <https://fabric-chaincode-java.github.io/org/hyperledger/fabric/shim/ChaincodeStub.html >`_
56
58
57
59
which is used to access and modify the ledger, and to make invocations between
58
60
chaincodes.
59
61
60
- In this tutorial, we will demonstrate the use of these APIs by implementing a
61
- simple chaincode application that manages simple "assets".
62
+ In this tutorial using Go chaincode , we will demonstrate the use of these APIs
63
+ by implementing a simple chaincode application that manages simple "assets".
62
64
63
65
.. _Simple Asset Chaincode :
64
66
@@ -93,7 +95,7 @@ Housekeeping
93
95
94
96
First, let's start with some housekeeping. As with every chaincode, it implements the
95
97
`Chaincode interface <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#Chaincode >`_
96
- in particular, ``Init `` and ``Invoke `` functions. So, let's add the go import
98
+ in particular, ``Init `` and ``Invoke `` functions. So, let's add the Go import
97
99
statements for the necessary dependencies for our chaincode. We'll import the
98
100
chaincode shim package and the
99
101
`peer protobuf package <https://godoc.org/github.com/hyperledger/fabric/protos/peer >`_.
0 commit comments