Commit graph

748 commits

Author SHA1 Message Date
NIKHIL E GUPTA
026217db9a Add sbe to help text
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-08-10 09:20:35 -04:00
denyeart
1d6d557570
Fix ledger queries sample - history and pagination (#288)
Fix history query results.
Fix paginated query results.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2020-08-10 08:15:34 -04:00
denyeart
17dbe839f1
Updates to samples README (#287)
Promote asset transfer as the primary set of samples.
Misc other updates to the README.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2020-08-10 08:12:59 -04:00
Gaurav Giri
02368e99b0 SBE Improvements and Referencing SBE in fabric-samples readme and test-network
Signed-off-by: Gaurav Giri <girigaurav@gmail.com>
2020-08-09 14:58:18 -04:00
Gaurav Giri
6e965ec55f fabric samples for state-based endorsement for chaincode typescript
Signed-off-by: Gaurav Giri <girigaurav@gmail.com>
2020-08-07 18:20:57 -04:00
tyanj
55c0b47952
[BUG] res=$? missing (#260)
Signed-off-by: tyanj <653291675@qq.com>
Signed-off-by: Ry Jones <ry@linux.com>

Co-authored-by: Ry Jones <ry@linux.com>
2020-08-07 20:22:24 +02:00
nikhil550
b9661a7ecc
Update samples readme for fabcar deprecation, new langagues (#284)
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>

Co-authored-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-08-07 19:25:32 +02:00
Titas
0031db5de2
Fix deployment of chaincode with higher version than 9 issue (#243)
This script fails if chaincode version is higher than 9 as 'grep' does not match ex. version equal to '10'

Signed-off-by: Titas <titas.petravicius@gmail.com>
Signed-off-by: lehors <lehors@us.ibm.com>

Co-authored-by: Arnaud J Le Hors <lehors@us.ibm.com>
2020-08-06 22:59:25 +02:00
harrisob
c0ffb1cffb
Restructure the basic javascript application to use common code. (#281)
Use common code for reading a connection profile, enrolling the admin,
registering and enrolling a user, building a wallet, and
building a certificate authority client.

Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
2020-08-06 22:07:54 +02:00
Sijo Cherian
e90554f4f8
JS App workflow for private-data asset transfer, Chaincode fixes (#252)
* Adding JS App workflow, Bugfixes in Go Chaincode

Initial impl JS App workflow, Added 2 asset sample, with transfer & delete
Bugfixes: Bug fix in ReadTransferAgreement
Improved logging in Go Chaincode, Improved Chaincode error handling, checks for execution on orgs peer, bug fix, lint issues
use addDiscoveryInterest to scope policy, instead of setEndorsingOrganizations

Signed-off-by: Sijo Cherian <sijo@ibm.com>

* added js app to CI pipeline , and linting matrix

Signed-off-by: Sijo Cherian <sijo@ibm.com>

Co-authored-by: Sijo Cherian <sijo@ibm.com>
2020-08-06 14:23:11 -04:00
r2roC
cb8e03b726
asset-transfer-ledger-queries java application. (#280)
Running TestApp: gradle runApp

Signed-off-by: r2roC <arturo@IBM.com>
2020-08-06 12:00:26 -04:00
Arnaud J Le Hors
42026e2fd4 Improve unmarshalling in asset-transfer-basic Go cc
Although the current code works thanks to Go being quite
forgiving when it comes to pointers, it doesn't exhibit
the best coding style. This patch addresses this.

Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2020-08-06 11:12:56 -04:00
Dereck
e2817762f1
Add chaincode-external for asset-transfer-basic sample. (#234)
Signed-off-by: Chongxin Luo <Chongxin.Luo@ibm.com>
2020-08-06 02:12:12 +02:00
dependabot[bot]
21572f833f
Bump elliptic from 6.5.2 to 6.5.3 in /fabcar/javascript (#273)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-05 13:25:32 -04:00
aldredb
d2fb039ba5
Correct swap JSON payload in interest_rate_swaps example (#279)
Corrected swap JSON payload so that the JSON object can be unmarshalled properly

Signed-off-by: Aldred Benedict <aldred@sg.ibm.com>
2020-08-05 13:22:21 -04:00
r2roC
6e49a18d90
I removed some unnecessary comments that I left there by accident. (#278)
I also capitalized 'Tom' as that is what the asset is initialized to.

Signed-off-by: r2roC <arturo@IBM.com>
2020-08-04 19:45:47 -04:00
r2roC
86d5a50a7c
asset-transfer-basic java application. (#276)
Matches format of js app.
Running TestApp: gradle runApp

Signed-off-by: r2roC <arturo@IBM.com>
2020-08-04 17:05:45 -04:00
Chris Gabriel
1270c8418b
Fix typo in code comment (#275)
Signed-off-by: Chris Gabriel <chris_gabriel_98@yahoo.com>
2020-08-03 22:27:16 +02:00
r2roC
e51dfb9bce asset-transfer-basic Java CC. Adapted from fabcar. Unit tests are attached. Integration testing conducted using test network and asset-transfer-basic application-js.
Signed-off-by: r2roC <arturo@IBM.com>
2020-07-31 09:00:12 -04:00
Raghu Saxena
6de6c77f8d
Update addOrg3.sh (#271)
Fixed a comment which said `Create Org1 Identities` to `Create Org3 Identities`
2020-07-29 12:05:42 -04:00
Brett Logan
1c500ba30e Use Busybox to Remove Files and Folders
We delete folders and files locally on the host system
today. If the user is not a super user the files can't
be deleted as they are created by a root user in the
containers. This change uses busybox to perform the
deletions instead so a root user can remove them.

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-27 23:55:20 -04:00
Brett Logan
59613c7e91 Add Linters
Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-27 23:51:51 -04:00
Brett Logan
e6184563ad Update CI For Asset Transfer
Pushes the scripting logic into a standalone script
and adds tests for the applications which by side-effect
also test the invoke and query functions on the chaincode.

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-27 23:51:51 -04:00
Brett Logan
4c3fe17310 Refactor GetAllAssets
GetAllAssets uses getStateByRange which returns an iterator.
Refactored code to make use of the iterator as this code did
not function in its previous state

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-27 23:51:51 -04:00
Brett Logan
bd38f9220b Capitalize Function Names
Short of creating a second application that calls
the lowerCase version of functions, since Go requires
the functions be exported, capitalizing them in the
Node and Typescript chaincode seems the simplest solution

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-27 23:51:51 -04:00
Brett Logan
06c42bf68b Clean up Node Application and Address Linting Issues
Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-27 23:51:51 -04:00
Brett Logan
73a62a6780 Clean up Node Chaincode and Address Linting Issues
Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-27 23:51:51 -04:00
Brett Logan
e31ecf3165 Decorate Typescript Chaincode
Add the contract-api specific annotations and
enable the experimental features.

Also properly format code according to the linter

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-27 23:51:51 -04:00
Brett Logan
66b4b2b86a Remove Typescript Application
As the typescript application shows no Fabric
specific features we have elected to remove it

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-27 23:51:51 -04:00
NIKHIL E GUPTA
d72be92feb private data readme edits
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-07-27 23:37:41 -04:00
r2roC
64f280a1f3 Update asset_transfer_ledger_chaincode.js
Standardized function names

Signed-off-by: r2roC <arturo@IBM.com>
2020-07-27 09:32:36 -04:00
r2roC
c2b6fcfd3f Standardized createAsset parameters, removed getAllAssets function, and changed transferAssetsBasedOnColor to match go-chaincode
Signed-off-by: r2roC <arturo@IBM.com>
2020-07-27 09:32:36 -04:00
r2roC
9a9a3d2683 Modfied .gitignore so that node_modules is the only addition to the root .gitignore
Signed-off-by: r2roC <arturo@IBM.com>
2020-07-27 09:32:36 -04:00
r2roC
1c5cf4383c Added new lines at the bottom of index.js and asset_transfer_ledger_chaincode.js. Modified node version in package.json. Modified error messages in the chaincode to all begin uppercase.
Signed-off-by: r2roC <arturo@IBM.com>
2020-07-27 09:32:36 -04:00
r2roC
666e61ec6e fixed a couple unused variable issues
Signed-off-by: r2roC <arturo@IBM.com>
2020-07-27 09:32:36 -04:00
r2roC
af81e1287f Javascript version of asset-transfer-ledger-chaincode.go
Tested using the test network
Adapted from marbles02

Signed-off-by: r2roC <arturo@IBM.com>
2020-07-27 09:32:36 -04:00
Chris Gabriel
fef45be995
Remove images folder from fabric-samples. (#266)
Signed-off-by: Chris Gabriel <chris_gabriel_98@yahoo.com>

Remove images from fabric-samples and move to docs.

Signed-off-by: Chris Gabriel <chris_gabriel_98@yahoo.com>
2020-07-25 19:43:22 +02:00
nikhil550
971af50cdf
Fix bugs in deployCC script (#265)
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>

Co-authored-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-07-23 23:36:33 -04:00
nikhil550
8c32a85f66
Update private data chaincode to use test network script (#249)
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>

Co-authored-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-07-23 14:17:50 -04:00
Arnaud J Le Hors
7771b4f216
Revert "Remove Typescript References (#258)" (#261)
This reverts commit 7a23d7872a.
2020-07-23 17:06:57 +02:00
Brett Logan
7a23d7872a
Remove Typescript References (#258)
As the Typescript examples are essentially just reiterations
of the same Javascript code, there is no benefit to having
providing examples in both languages. The functional code
was exactly the same in both languages. On the contrary it
meant we widened the surface of maitainence and thus we are
removing due to the limited benefit provided by the example
chaincode and applications.

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-22 21:57:54 +02:00
stephyee
31cce9e330
Update secured asset sample tutorial link and remove README (#257)
Signed-off-by: Tiffany Harris <tiffany.harris@ibm.com>
2020-07-22 14:45:57 -04:00
nikhil550
6acc140671
Add asset transfer series documentation to Fabric samples README (#251)
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>

Co-authored-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-07-21 00:33:21 +02:00
Brett Logan
daa732d3d8 Revert "WIP (#253)"
This reverts commit d5ce443bee.

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-20 13:18:45 -04:00
Brett Logan
d5ce443bee
WIP (#253)
* WIP

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>

* WIP 2

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-20 12:49:16 -04:00
Tiffany Harris
cad6b90383 Fix unmarshaling asset in ReadAsset()
Signed-off-by: Tiffany Harris <tiffany.harris@ibm.com>
2020-07-20 11:51:32 -04:00
Naser Mirzaei
12b07b40a9
use mkdir -p for create directories (#248)
Signed-off-by: Naser Mirzaei <nasermirzaei89@gmail.com>
2020-07-20 11:37:16 -04:00
nikhil550
f4c439ce8a
Add endorsement policy to chaincode deployment script (#247)
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>

Co-authored-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-07-17 08:58:19 -04:00
Sijo Cherian
b4ed9e5afd
Simplify asset-transfer-basic javascript application (#241)
* Improve asset-transfer-basic javascript app code by combining invoke & query.js

Adding a sample application workflow to demonstrate the chaincodes, similar to the WIP PR for basic go-application (https://github.com/hyperledger/fabric-samples/pull/211).
Simplify and document-in-code the app workflow of this sample, in a single app , instead of invoke & query setting up Gateway

Signed-off-by: Sijo Cherian <sijo@ibm.com>

improve javascript app code by combining invoke & query.js

Signed-off-by: Sijo Cherian <sijo@ibm.com>

reverted chaincode func signature

Signed-off-by: Sijo Cherian <sijo@ibm.com>

* create/updateAsset signature in sync with chaincode func change as in #227

Signed-off-by: Sijo Cherian <sijo@ibm.com>

* Tested with latest chaincode, Improved comments

Signed-off-by: Sijo Cherian <sijo@ibm.com>

Co-authored-by: Sijo Cherian <sijo@ibm.com>
2020-07-15 15:21:38 -04:00
Brett Logan
14e9ccf85b Remove QueryResult Type
There was no need for GetAllAssets to return a custom type,
it can simple return an array of all assets.

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-15 13:22:56 -04:00