Skip to content

Commit 6318f35

Browse files
committed
feat(weaver): weaver fabric driver connector implementation
Signed-off-by: Carlos Amaro <[email protected]>
1 parent 5fb3635 commit 6318f35

File tree

36 files changed

+542
-407
lines changed

36 files changed

+542
-407
lines changed

packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/plugin-ccmodel-hephaestus.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,11 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService {
260260
private createReceiptFromRunTxReqWithTxId(
261261
data: IRunTxReqWithTxId,
262262
): FabricV2TxReceipt {
263+
if (!data.request.signingCredential) {
264+
throw new Error(
265+
`Cannot create FabricV2TxReceipt if signingCredential is missing in IRunTxReqWithTxId`,
266+
);
267+
}
263268
return {
264269
caseID: this.caseID,
265270
blockchainID: LedgerType.Fabric2,
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
CONNECTION_PROFILE=path_to_connection_profile
2+
RELAY_ENDPOINT=localhost:9080
3+
RELAY_TLS=false
4+
RELAY_TLSCA_CERT_PATH=path_to_tls_ca_cert_pem_for_relay
5+
DRIVER_ENDPOINT=localhost:9090
6+
DRIVER_TLS=false
7+
DRIVER_TLS_CERT_PATH=path_to_tls_cert_pem_for_driver
8+
DRIVER_TLS_KEY_PATH=path_to_tls_key_pem_for_driver
9+
NETWORK_NAME=network1
10+
DRIVER_CONFIG=
11+
INTEROP_CHAINCODE=interop
12+
MOCK=false
13+
DB_PATH=driverdbs
14+
WALLET_PATH=
15+
DEBUG=true
16+
LEVELDB_LOCKED_MAX_RETRIES=
17+
LEVELDB_LOCKED_RETRY_BACKOFF_MSEC=
18+
ENABLE_MONITOR=false
19+
MONITOR_SYNC_PERIOD=
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.env
2+
wallet-network1/*.id
3+
!wallet-network1/relay.id
4+
wallet-network2/*.id
5+
!wallet-network2/relay.id
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"admin":{
3+
"name":"admin",
4+
"secret":"adminpw"
5+
},
6+
"relay": {
7+
"name":"relay",
8+
"affiliation":"org1.department1",
9+
"role": "client",
10+
"attrs": [{ "name": "relay", "value": "true", "ecert": true }]
11+
},
12+
"mspId":"Org1MSP",
13+
"caUrl":""
14+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
MANIFEST-000028

packages/cactus-plugin-ledger-connector-fabric/driverdbs/driverdb/LOCK

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2025/10/14-14:41:24.838540 7f1584bfd6c0 Recovering log #27
2+
2025/10/14-14:41:24.852550 7f1584bfd6c0 Delete type=3 #26
3+
2025/10/14-14:41:24.852598 7f1584bfd6c0 Delete type=0 #27
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2025/10/14-14:12:28.921786 7db9e2ffd6c0 Recovering log #25
2+
2025/10/14-14:12:28.936163 7db9e2ffd6c0 Delete type=3 #24
3+
2025/10/14-14:12:28.936223 7db9e2ffd6c0 Delete type=0 #25
Binary file not shown.

packages/cactus-plugin-ledger-connector-fabric/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"dist/*"
4444
],
4545
"scripts": {
46+
"start-fabric-weaver-driver": "node ./dist/lib/main/typescript/plugin-ledger-connector-fabric-cli.js",
4647
"codegen": "yarn run --top-level run-s 'codegen:*'",
4748
"codegen:openapi": "npm run generate-sdk",
4849
"codegen:proto": "buf generate --verbose",
@@ -71,6 +72,7 @@
7172
"bl": "6.1.0",
7273
"bn.js": "4.12.0",
7374
"dockerode": "3.3.0",
75+
"dotenv": "17.2.3",
7476
"elliptic": "6.6.1",
7577
"express": "5.1.0",
7678
"fabric-ca-client": "2.5.0-snapshot.23",
@@ -82,11 +84,12 @@
8284
"google-protobuf": "3.21.2",
8385
"http-errors": "2.0.0",
8486
"http-status-codes": "2.1.4",
87+
"http2": "^3.3.7",
8588
"joi": "17.13.3",
8689
"json5": "2.2.3",
8790
"jsrsasign": "11.0.0",
88-
"lodash": "4.17.21",
8991
"level": "8.0.0",
92+
"lodash": "4.17.21",
9093
"long": "5.2.3",
9194
"multer": "1.4.5-lts.1",
9295
"ngo": "2.7.0",

0 commit comments

Comments
 (0)