Improve on the initial PR to expand on the README with detailed
information on how to run the external chaincode in a container
on the test network and use the node application against it.
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
Add the asset-transfer-ledger-queries javascript application.
Update the CI script to run it against go and javascript chaincode.
Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
The InitLedger was not writing the composite key for the color index.
Therefore TransferAssetByColor was not working.
Now InitLedger will call CreateAsset which creates both the asset
and the color index entry.
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>