Commit graph

21 commits

Author SHA1 Message Date
David Enyeart
33f064f2fb [FAB-13170] Add memberOnlyRead to marbles sample
memberOnlyRead is a new private data collection config
property in v1.4. This CR adds it to the marbles02_private
sample chaincode.

Change-Id: I9aeedd43cf835533c7bb2f0f0b6343f819b53e9c
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2018-12-04 22:24:50 -05:00
Simon Stone
5c087f1443 [FAB-13046] Update TypeScript contract dependencies
The type definitions for the sinon module have been updated so that
they require TypeScript 3; TypeScript 3 has been out for a while, so
we should pick that up as well as updating all of the other dependencies.

Change-Id: Ia58e36158d83ed3cc5cad6353e164bfc2453a00a
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
2018-11-29 11:51:28 +00:00
Simon Stone
4fb3b57e6b [FAB-12852] Add fabcar contract w/ new prog model (TS)
Add new FabCar contract sample using the new programming model, written
in TypeScript. Add the new contract sample alongside the existing one
written in the old programming model, which will be removed in a subsequent
change request.

Change-Id: I47e5f16b475c68f9a1c4752af2623f090fbf12c9
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
2018-11-16 21:12:31 +00:00
Gari Singh
fad8ee1e50 Merge "[FAB-12851] Add fabcar contract w/ new prog model (JS)" 2018-11-16 21:12:14 +00:00
Simon Stone
9facb4256b [FAB-12851] Add fabcar contract w/ new prog model (JS)
Add new FabCar contract sample using the new programming model, written
in JavaScript. Add the new contract sample alongside the existing one
written in the old programming model, which will be removed in a subsequent
change request.

Change-Id: Iea46b0a616dbd072b5bd7227ada827a26560f153
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
2018-11-15 10:48:28 +00:00
Yuki Kondo
286861e0e3 [FAB-12371]Fix the abac sample to use new cid package
The latest cid package is fabric/core/chaincode/shim/ext/cid.
This CR fixes the abac sample to use the new cid package instead
of the old one at fabric/core/chaincode/lib/cid.
The vendor folder is also updated with the new cid package.

Change-Id: Ifc431ee4504cd009f84f9d5de271721597bba6e7
Signed-off-by: Yuki Kondo <yuki.kondo@hal.hitachi.com>
2018-10-30 20:05:57 +00:00
zhaochy
24c5e47539 [FAB-12026] pagination samples for node marbles02
This change synchronizes the node marbles02 sample chaincode with
fabric/examples/marbles02

Change-Id: I6c11fee15ae39950fca7344fbf230c42f876274a
Signed-off-by: zhaochy <zhaochy_2015@hotmail.com>
2018-10-27 10:43:07 +00:00
David Enyeart
514d4560d9 [FAB-12170] Fix dependency check in java chaincode
Currently sample java chaincode can only work with version
1.3.0-SNAPSHOT of the shim.

Allow sample java chaincode to work with any v1.x java shim.

Change-Id: Iee69289392b4fa5fdb5cb14c41672f96120f711f
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2018-09-26 00:39:26 -04:00
gennady
9f80e47d2d [FAB-12119] Fix groupId in java chaincodes
According to sonatype.org naming requirements, java shim jars
groupId should be org.hyperledger.fabric-chaincode-java

Change-Id: Ia30cb77b1081b3fb4f7573568f2e2abfe89315d4
Signed-off-by: gennady <gennady@il.ibm.com>
2018-09-24 11:50:58 +03:00
Chris Elder
e7a1b76edb [FAB-9386] Remove Marbles sample reference to Fauxton
Remove marbles sample chaincode references to Fauxton
and outdated "data" wrapper.

This change also synchronizes the marbles sample chaincode with
fabric/examples/marbles02, for example it adds pagination
support that is in fabric/examples/marbles02.

Change-Id: Ie80c66d7b2f97081d21c5ea889b159e398b64777
Signed-off-by: Chris Elder <chris.elder@us.ibm.com>
2018-09-17 12:15:24 +00:00
gennady
4030ebdb3d [FAB-11397] Adding java cc
Added java project sources under chaincode
Added support for "-l java" to byfn.sh

Change-Id: I7038aed9b21ad9bf51bcb58c6b71ceb1f161813f
Signed-off-by: gennady <gennady@il.ibm.com>
2018-09-08 17:35:27 +03:00
David Enyeart
5956178406 [FAB-6600] Sample chaincode for private data
Marbles02 chaincode updated to utilize private
data collections on all ledger APIs.

To run the sample, follow the instructions
in FAB-10231. An official tutorial will follow.

Change-Id: Id9b3dbae8ab62afe81ee8d116b7bd4efc0213933
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2018-06-02 07:42:09 -04:00
Chris Elder
f3b55c9c0d [FAB-8621] Remove Marbles index json data wrapper
Fabric 1.1 removes the need for a "data" wrapper for CouchDB data.

The marbles02 sample index json files in fabric-samples still contains
the data wrapper.

Change-Id: Ic984b1408da4959000ae99962bf9a48d66334860
Signed-off-by: Chris Elder <chris.elder@us.ibm.com>
2018-03-01 14:02:56 -05:00
Saad Karim
77e74b7cd7 [FAB-8497] Download images required for fabric-ca
Added a script for fabric-ca sample that downloads
all the required docker images.

Vendored dependencies for the fabric-ca sample chaincode.
It can now be run without having a local fabric repository.

Change-Id: I7e0f3d7950201e42fdf82bbef2fc855d33c78676
Signed-off-by: Saad Karim <skarim@us.ibm.com>
2018-02-27 20:35:34 +00:00
David Enyeart
dd12f88dc0 [FAB-7834] Add couchdb index to marbles02 sample
Add sample couchdb index to marbles02 chaincode
to support the chaincode queries.

Also update the go chaincode instructions with
index instructions, and fix the examples to
indicate that chaincodeid should not be included
in queries or indexes as of 1.1.

Change-Id: I4a3b0dbeb83c6a2cf40c73fcee5aed20427acfca
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2018-01-24 23:02:22 -05:00
nikklein
a0c1687ad8 [FAB-7487] Fix typo in node/fabcar.js
According to this tutorial http://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html
the function name is spelled changeCarOwner.

Renamed changeCarowner to changeCarOwner.

Change-Id: Ic32c76137e3686cbf951f846da0ef8c4c5d8986d
Signed-off-by: Nikita Klein <objcoding@gmail.com>
2017-12-29 11:57:22 +01:00
ratnakar
1961835674 [FAB-6870] Update node modules versions
fabcar uses 1.0.2 node modules changing it to unstable so that
latest node modules can be used on master branch

Change-Id: Ia9dc866931763760dd3cd7dbc5c7fd9a5de099be
Signed-off-by: ratnakar <asara.ratnakar@gmail.com>
2017-11-02 11:19:57 -04:00
Jim Zhang
cd1b691385 Merge "[FAB-5898] porting samples to node.js chaincode" 2017-10-18 23:13:20 +00:00
Keith Smith
caf5c33db2 [FAB-6050] Adding fabric-ca sample
This sample uses fabric-ca to run an end-to-end test similar
to the BYFN sample. However, instead of using cryptogen, it
uses fabric-ca. All private keys are generated dynamically in
the container in which they are used.

This sample also demonstrates how to use abac
(Attribute-Based Access Control) to make access decisions.
See chaincode/abac/abac.go.

Change-Id: I5eddc9e35908e409ac07266c3183ce89a5a6cd82
Signed-off-by: Keith Smith <bksmith@us.ibm.com>
2017-10-17 16:38:33 -04:00
ratnakar
44c204d8b6 [FAB-5898] porting samples to node.js chaincode
Fabric 1.1 supports javascript chaincode. This changeset
addresses porting of the golang chaincode to node.js
chiancode and the corresponding README files

Change-Id: Iae24e713f16ab3508fe0cc18ee062ffa412b8ba6
Signed-off-by: ratnakar <asara.ratnakar@gmail.com>
2017-10-15 21:12:11 -04:00
Jim Zhang
ca8fad3151 [FAB-5260] Update samples to v1.0.0
basic-network:
 - moved "crypto-config" to top-level and removed
   "network" folder
 - added generate.sh to re-gen crypto materials
 - docker-compose.yaml to ref v1.0.0 images
 - add CLI to docker-compose
 - start.sh to only start CA, orderer, peer and couch
 - startFabric.sh to run start.sh, then launch CLI
   for create channel, install, instantiate, invoke
fabcar:
 - moved chaincode to central chaincode folder
 - moved "creds" to top-level and removed "network"
   folder
 - changed to use the basic-network as the target
   and removed docker-compose.yaml and crypto-config
 - updated package.json to require v1.0.0 modules

- added missing license headers
- restructured to use a central chaincode subdirectory

Change-Id: Ic784d1cf55ea51da5155624f3c38275883de1dca
Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
Signed-off-by: Nick Gaski <ngaski@us.ibm.com>
Signed-off-by: Jim Zhang <jzhang@us.ibm.com>
2017-07-12 09:07:39 -04:00