Node 20+ is now required. This is the oldest currently support LTS
version of Node.js.
Docker images are moved to Node 22, which is the current LTS release.
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
The shadow plugin is now maintained by the GradleUp organization. Change
to use the current plugin ID and latest version.
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
The latest fabric-gateway client API release (v1.7.0) includes the gRPC error
details in the GatewayExcetion stack trace so it is not necessary to
programmatically access them to demonstrate that they are present.
This change updates the asset-transfer-basic/application-gateway-java
sample to simplify the updateNonExistentAsset example method. It also:
- Updates all samples to use the latest fabric-gateway release.
- Adds equivalent Maven POM files for fabric-gateway application samples.
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
The repository currently uses Go 1.22 to test samples in the automated
build. This change sets the Go version in all go.mod (and go.work) files
to Go 1.22.0, and removes any Go toolchain entries.
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
For some signing implementations, such as ed25519, a non-default hash
implementation must be specified when creating the Gateway connection in
client applications. Rather than relying on the default hash algorithm,
it is probably good practice in general to specify an algorithm that is
compatible with your signing implementation.
This change explicitly specifies the hash algorithm to raise visibility
of the option to select the hash algorithm.
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
While the TypeScript application sample is essentially identical (with
the addition of some type declarations), there seems to be sufficient
uncertainty amongst JavaScript developers not familiar with TypeScript
on how best to implement a JavaScript application that it is worthwhile
having one plain JavaScript sample using the current client API.
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
The removed samples make use of deprecated legacy client SDKs. They all
have equivalent samples implemented using the currently supported Fabric
Gateway client API, and are therefore redundant.
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
- Dependency updates
- ESLint flat configuration format, replacing deprecated configuration
- Minor fixes to compile and lint issues
- Consistent TypeScript formatting with .editorconfig
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
This demonstrates good practice in restricting the chaincode package
versions to those applicable for the specific Fabric (major/minor)
version targeted for deployment.
Also some corrections to the repository README. Particularly referring
to other branches for samples targeted at earlier Fabric versions, since
samples in the main branch may exploit features not available in older
Fabric releases, which can cause confusion for end users.
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
This resolves mocking errors using the latest Java chaincode shim and
very old versions of Mockito.
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
Allow client applications to work regardless of whether network was creating using a CA or cryptogen since they create different client certificate file names.
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
This patch moves publishing of REST sample image from AZP to GHA.
This was the last job running on AZP.
Also, this patch fixes an error encounterd during the image build.
Publishing of REST sample image is now only executed when pushing to main.
Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
Include specific gRPC TLS implementation in dependencies instead of relying on an appropriate one to be present as a transitive dependency.
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
* Fix npm problems on asset-transfer-basic/chaincode-typescript
This patch fixes npm problems on
asset-transfer-basic/chaincode-typescript.
- Sync npm-shrinkwrap.json with package.json to fix the npm ci error
- Update the version of TypeScript to avoid the type error on logform
Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
* Update npm-shrinkwrap.json
Fix dependencies
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
---------
Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
Co-authored-by: Arnaud J Le Hors <lehors@us.ibm.com>
* Update go dependencies
Update go dependencies in sample chaincodes and applications
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
* Update to Go 1.19.6
Update to Go 1.19.6
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
---------
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
* Return exit(1) if application-java fails
If application-java fails, return an exit(1) code,
so that callers such as Github Actions CI can detect the failure.
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
* asset-transfer-basic CI improvements
- Application failure should result in CI failure
- Automatically remove wallet from prior runs
- Fix chaincode name issues, allow chaincode name to be passed from CI
- Fix appUser collisions (duplicate registration failures)
- Fix key create collisions across apps (in cases where same chaincode is used for multiple apps)
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
---------
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
This patch fixes the gradle version used in asset-transfer-basic/
chaincode-java build to 7.
The reason is because the gradle version in the gradle:jdk11-alpine
image is updated from 7 to 8, which seems to cause the build to fail.
Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
Rely on the dependencies of @hyperledger/fabric-gateway making these packages transitively available. Having explicit dependency versions in the application can cause type conflicts due to private member changes in the gRPC Client class across versions.
Also fix some missing or incorrect Node types and engines version contraints.
Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
* fixed comment consistency problem with erc20 chaincode
Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>
* added more comment consistancy fix
Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>
* added more comment consistancy fix
Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>
* added more comment consistancy fix
Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>
* added more comment consistancy fix
Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>
Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>
Co-authored-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>
* REST api added for asset transfer in Golang
Signed-off-by: Basil K Y <techiebasil@gmail.com>
* add go.sum to git
Signed-off-by: Basil K Y <techiebasil@gmail.com>
* fix golint error
Signed-off-by: Basil K Y <techiebasil@gmail.com>
Signed-off-by: Basil K Y <techiebasil@gmail.com>
Error handling example used a transaction invocation with the wrong number of arguments and so did not demonstrate the same error condition as other language samples. The error handling code was also not as comprehensive as it should be.
Also changed the console output throughout to match the content and format of the Node and Java samples.
Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
* Refactor Go files
1. replace deprecated ioutil functions (ioutil is deprecated since Go 1.16)
2. fix variable names that collide with imported package name
3. fix typos
Also update Go version specified by Go modules to ensure a Go version is used in which ioutil is deprecated and replacement functions are available in os and io packages.
Signed-off-by: Tommy TIAN <xtianae@connect.ust.hk>
Co-authored-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
* Specify go 1.18 instead of go 1.19 in go.mod files
Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
Signed-off-by: Tommy TIAN <xtianae@connect.ust.hk>
Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
Co-authored-by: Tommy TIAN <xtianae@connect.ust.hk>