Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit b8d7845

Browse files
author
Peter Somogyvari
committed
docs(examples/harmonia): initial commit - WORK IN PROGRESS
[skip ci] Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
1 parent e0389fe commit b8d7845

66 files changed

Lines changed: 3634 additions & 17 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cspell.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"grpcwebtext",
6161
"guks",
6262
"hada",
63+
"Harmonia",
6364
"hashicorp",
6465
"Healthcheck",
6566
"htlc",
@@ -71,8 +72,8 @@
7172
"ipaddress",
7273
"ipfs",
7374
"IPFSHTTP",
74-
"IPLD",
7575
"ipld",
76+
"IPLD",
7677
"Iroha",
7778
"Irohad",
7879
"isready",

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
1010
"moby": true,
1111
"installDockerBuildx": true,
12-
"version": "20.10.24",
12+
"version": "24.0.7",
1313
"dockerDashComposeVersion": "v2"
1414
},
1515
"ghcr.io/devcontainers/features/git:1": {
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"name": "@hyperledger/cacti-example-harmonia-backend",
3+
"version": "2.0.0-alpha.2",
4+
"description": "An example application used for demonstration purposes during the 2023 November Cacti/Harmonia Labs workshop.",
5+
"keywords": [
6+
"Hyperledger",
7+
"Cacti",
8+
"Integration",
9+
"Blockchain",
10+
"Distributed Ledger Technology"
11+
],
12+
"homepage": "https://github.com/hyperledger/cacti#readme",
13+
"bugs": {
14+
"url": "https://github.com/hyperledger/cacti/issues"
15+
},
16+
"repository": {
17+
"type": "git",
18+
"url": "git+https://github.com/hyperledger/cacti.git"
19+
},
20+
"license": "Apache-2.0",
21+
"author": {
22+
"name": "Hyperledger Cacti Contributors",
23+
"email": "cacti@lists.hyperledger.org",
24+
"url": "https://www.hyperledger.org/use/cacti"
25+
},
26+
"contributors": [
27+
{
28+
"name": "Please add yourself to the list of contributors",
29+
"email": "your.name@example.com",
30+
"url": "https://example.com"
31+
},
32+
{
33+
"name": "Peter Somogyvari",
34+
"email": "peter.somogyvari@accenture.com",
35+
"url": "https://accenture.com"
36+
}
37+
],
38+
"main": "dist/lib/main/typescript/index.js",
39+
"module": "dist/lib/main/typescript/index.js",
40+
"browser": "dist/cacti-example-harmonia-backend.web.umd.js",
41+
"types": "dist/lib/main/typescript/index.d.ts",
42+
"files": [
43+
"dist/*"
44+
],
45+
"scripts": {
46+
"watch": "npm-watch",
47+
"webpack": "npm-run-all webpack:dev",
48+
"webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web",
49+
"webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js",
50+
"webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js"
51+
},
52+
"dependencies": {
53+
"@hyperledger/cacti-example-harmonia-frontend": "2.0.0-alpha.2",
54+
"@hyperledger/cacti-example-harmonia-plugin": "2.0.0-alpha.2",
55+
"@hyperledger/cactus-api-client": "2.0.0-alpha.2",
56+
"@hyperledger/cactus-cmd-api-server": "2.0.0-alpha.2",
57+
"@hyperledger/cactus-common": "2.0.0-alpha.2",
58+
"@hyperledger/cactus-core": "2.0.0-alpha.2",
59+
"@hyperledger/cactus-core-api": "2.0.0-alpha.2",
60+
"@hyperledger/cactus-plugin-keychain-memory": "2.0.0-alpha.2",
61+
"@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0-alpha.2",
62+
"@hyperledger/cactus-plugin-ledger-connector-corda": "2.0.0-alpha.2",
63+
"@hyperledger/cactus-test-tooling": "2.0.0-alpha.2",
64+
"async-exit-hook": "2.0.1",
65+
"axios": "1.6.1",
66+
"dotenv": "16.3.1",
67+
"express": "4.18.2",
68+
"express-jwt": "8.4.1",
69+
"jose": "5.1.0",
70+
"openapi-types": "12.1.3",
71+
"solc": "0.8.22",
72+
"typescript-optional": "2.0.1",
73+
"uuid": "9.0.1",
74+
"web3-eth-accounts": "4.1.0"
75+
},
76+
"devDependencies": {
77+
"@types/express": "4.17.21",
78+
"@types/uuid": "9.0.7"
79+
},
80+
"engines": {
81+
"node": ">=18.0.0",
82+
"npm": ">=9.0.0"
83+
},
84+
"publishConfig": {
85+
"access": "public"
86+
},
87+
"browserMinified": "dist/cacti-example-harmonia-backend.web.umd.min.js",
88+
"mainMinified": "dist/cacti-example-harmonia-backend.node.umd.min.js",
89+
"watch": {}
90+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env node
2+
3+
import { ConfigService } from "@hyperledger/cactus-cmd-api-server";
4+
import { LoggerProvider } from "@hyperledger/cactus-common";
5+
import { IAppOptions as IAppOptions, App } from "./app";
6+
7+
export async function launchApp(
8+
env?: NodeJS.ProcessEnv,
9+
args?: string[],
10+
): Promise<void> {
11+
const configService = new ConfigService();
12+
const config = await configService.getOrCreate({ args, env });
13+
const serverOptions = config.getProperties();
14+
LoggerProvider.setLogLevel(serverOptions.logLevel);
15+
16+
const appOptions: IAppOptions = {
17+
logLevel: serverOptions.logLevel,
18+
};
19+
const supplyChainApp = new App(appOptions);
20+
try {
21+
await supplyChainApp.start();
22+
} catch (ex) {
23+
console.error(`SupplyChainApp crashed. Existing...`, ex);
24+
await supplyChainApp?.stop();
25+
process.exit(-1);
26+
}
27+
}
28+
29+
if (require.main === module) {
30+
launchApp(process.env, process.argv);
31+
}

0 commit comments

Comments
 (0)