-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JavaScript asset-transfer-basic application
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>
- Loading branch information
1 parent
76088d0
commit 94d3b46
Showing
8 changed files
with
422 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
asset-transfer-basic/application-gateway-javascript/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
engine-strict=true |
15 changes: 15 additions & 0 deletions
15
asset-transfer-basic/application-gateway-javascript/eslint.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import js from '@eslint/js'; | ||
import globals from 'globals'; | ||
|
||
export default [ | ||
js.configs.recommended, | ||
{ | ||
languageOptions: { | ||
ecmaVersion: 2023, | ||
sourceType: 'commonjs', | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
}, | ||
]; |
25 changes: 25 additions & 0 deletions
25
asset-transfer-basic/application-gateway-javascript/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "asset-transfer-basic", | ||
"version": "1.0.0", | ||
"description": "Asset Transfer Basic Application implemented in JavaScript using fabric-gateway", | ||
"engines": { | ||
"node": ">=18" | ||
}, | ||
"scripts": { | ||
"lint": "eslint src", | ||
"pretest": "npm run lint", | ||
"start": "node src/app.js" | ||
}, | ||
"engineStrict": true, | ||
"author": "Hyperledger", | ||
"license": "Apache-2.0", | ||
"dependencies": { | ||
"@grpc/grpc-js": "^1.10", | ||
"@hyperledger/fabric-gateway": "^1.5" | ||
}, | ||
"devDependencies": { | ||
"@eslint/js": "^9.5.0", | ||
"eslint": "^9.5.0", | ||
"globals": "^15.6.0" | ||
} | ||
} |
Oops, something went wrong.