{"_id":"@hyperledger/cactus-plugin-odap-hermes","_rev":"34-8cfc248eba7435d4ca7a63e21a2c61b4","name":"@hyperledger/cactus-plugin-odap-hermes","dist-tags":{"jwt-supply-chain":"1.0.1-jwt-supply-chain.9df3fe79.16","latest":"2.0.0-alpha.2","build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix":"2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126","main":"2.0.0-main.159","lfx-connector":"2.0.0-lfx-connector.164","dev":"2.0.0-dev.197"},"versions":{"1.0.0-rc.3":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"1.0.0-rc.3","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology"],"author":{"name":"Tzu-Shen, Wang"},"license":"ISC","_id":"@hyperledger/cactus-plugin-odap-hermes@1.0.0-rc.3","maintainers":[{"name":"hyperledger-lf","email":"npm@hyperledger.org"},{"name":"hlfdev-azp","email":"hlfdev.azp@gmail.com"},{"name":"silasdavis","email":"npm@silasdavis.net"},{"name":"gregdhill","email":"gregorydhill@outlook.com"},{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"patrikstas","email":"patrik.stas@gmail.com"},{"name":"timoglastra","email":"timo@glastra.me"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"7e37e72d26a28c3016fa750b8c789a5fb05c8133","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-1.0.0-rc.3.tgz","fileCount":3,"integrity":"sha512-pfpzfHIsKrueM3gATCtiSZs8YPURprwudlivYIuf7B+uY43oxwQxnwVGwVmJGlS9rykbiIyoccHvf4d9En9F9Q==","signatures":[{"sig":"MEQCIHmWzMqdNiH/w40aJLXUfuPHMPkVqu6v65Xj/pUXA2EaAiAJP04Lft0KXgqogFpbA4DBWmCE5vwsD6d88jFEben2pA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsCCCCRA9TVsSAnZWagAAXvQP/2IGJ2onAtM1k5kPUt8l\nnaPffAOOJ6mRcC766x0Pp51pTV9rimN9BFfl88CBfxwLL4UMuFsd+u0AR+Qn\n/Olh9pfcpawieCi8L/VbJbvKuRkJryjMTk5E5bmvZkNB2XSv7j0aTFGq9YG4\nnkT4XWWLn+JLjxIuOFELP5V3gdhXRcSaiyew1x/39p0md9I6+ctJZ5PZ4VcR\n51C/ENJjbOjiU5UY+3EkRXIp0QfIAshDwXY8gqnxazJHEHvJr1alZwk/Nf4K\n4vDQ1BoPiC1xbKEA6Usx/CsfgzgL9QJjbU3FgAY4y1LmYNR9zbmZgvt2DX8O\nsRAPw2M1QJabjP4FYuhFHDOry+f2nTM2D3anhrQcaNpeJNvaKlTSH5uzELaE\ncFIim290sgjiSPifUX051UNzhiSoC6GIJFJoJM1jWlh5lII1IloveUwziHdG\nJKkk47mv+tlFGN5/MTWgNw2FjzkJfsLX+sCTi1nTSIK+4GBCvTisle5PdZFM\n7XZkMNUi7QsPBYnVG3xWi5ciiGBlZr8mNPY8Yo5ov43aqFSykdT7NWxYv2lk\nfHBQxry91ZKvfCg8hBC9g6WypLEZj4hhHbYMUQk2V0vU22nvfiCVl8HjKqzD\n0Vmeu01nD/v7dmiRnU0YGyhx1qty+nXcBs3+KGgw05GZNBLLiVF5IWoS1UE3\nKeUL\r\n=pi1T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","engines":{"npm":">=6","node":">=10"},"gitHead":"fdd888396d6727ee225b6729a2aac6d6d05b802c","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected","codegen:openapi":"npm run generate-sdk"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cactus.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.7.0+x64 (linux)","description":"proof of concept of odap","directories":{},"_nodeVersion":"16.7.0","dependencies":{"joi":"14.3.1","rxjs":"6.6.7","tape":"5.2.2","web3":"1.2.7","axios":"0.21.4","express":"4.17.1","ts-node":"8.9.1","crypto-js":"4.0.0","dockerode":"3.3.0","secp256k1":"4.0.2","socket.io":"4.1.3","web3-utils":"1.2.7","prom-client":"13.1.0","openapi-types":"7.0.1","socket.io-client":"4.1.3","typescript-optional":"2.0.1","@hyperledger/cactus-core":"1.0.0-rc.3","@hyperledger/cactus-common":"1.0.0-rc.3","@hyperledger/cactus-core-api":"1.0.0-rc.3","@hyperledger/cactus-test-tooling":"1.0.0-rc.3","@hyperledger/cactus-cmd-api-server":"1.0.0-rc.3","@hyperledger/cactus-plugin-keychain-memory":"1.0.0-rc.3","@hyperledger/cactus-plugin-object-store-ipfs":"1.0.0-rc.3","@hyperledger/cactus-plugin-ledger-connector-besu":"1.0.0-rc.3","@hyperledger/cactus-plugin-ledger-connector-fabric":"1.0.0-rc.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"crypto-js":"4.0.0","typescript":"4.3.2","@types/tape":"4.13.0","@types/express":"4.17.8","@types/crypto-js":"4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_1.0.0-rc.3_1638932610159_0.013141280751556295","host":"s3://npm-registry-packages"}},"1.0.0-main.334593a7.46":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"1.0.0-main.334593a7.46","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology"],"author":{"name":"Tzu-Shen, Wang"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@1.0.0-main.334593a7.46","maintainers":[{"name":"hyperledger-lf","email":"npm@hyperledger.org"},{"name":"hlfdev-azp","email":"hlfdev.azp@gmail.com"},{"name":"silasdavis","email":"npm@silasdavis.net"},{"name":"gregdhill","email":"gregorydhill@outlook.com"},{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"patrikstas","email":"patrik.stas@gmail.com"},{"name":"timoglastra","email":"timo@glastra.me"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"f62ebedad603d40f0da6a4d2ff7499cb07d7b8bd","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-1.0.0-main.334593a7.46.tgz","fileCount":3,"integrity":"sha512-0YtWCzHx6Mg4oRn3Hs0tvpDc5JTWwBRfJdLSU6WhMQINWvXcBR4U0L0MU75iOI2jAg3M6H7eI4xCOKH1Vitqkg==","signatures":[{"sig":"MEQCIBBEGmMPFBUzWJdninqNR3FgQYKXmS+uKmEH1ehYL03mAiBDyo/vDvxq65Eb0noikIs+RL2FDB+uj2nsEFzq/FaA2A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5hEWCRA9TVsSAnZWagAAHKAQAJ+T4hxWJUOPQOAD+i1f\nlg0Ig8ZpqdQZN1t2GaHYmIdDCbeUQZeK98lY624jvV2D/832A2eguN6kXcdF\nuNxIl9VkS8MXKqynsmeul4BHECo2rPlI18ppPf9gseyJWn62/YUBkS/bjzeA\n9QTA0RRqKvhKblAEaGLOM3DBB9d+3WOMQHcCU0BWeY0+SG/uZVumvTd96wB6\nHFquciMc8UMBX33Lylr/eW4IVYQ7kUAvNQ7TECjVU3Wv5VXumHBJL4wK62VI\nkMqvZuTAlmZ2uZ7hwe3JA8KnbLcIFRJEsn3Tu0/QbQJGmFNVdQy84kAa2D0U\n1CfhPtu6WzZnPUsC8h5Z7WbTJN1Q7/zS6TW/7mo458dwWvHOc8WDEQ0pOPaa\n7CyLCN/2lz74XhiwegemYQRil8Gc/rDCFYnPwtSz+21HYNMCehfnGd6vZx/Q\nBy9B8+kXz5MZkbQxntpKNHHdSUZS4iBFkqnH8v38ZGwFmwR9KfBQeCCpJpGV\nEYjJzN+e3PZQ8aOK1Ipde79aS6qdIc+Wb3Iw8+0fa5fOT2rlOTVrGLQcsj/X\nqfUEufGsIDufRrr1y2D/0+Tgw0PDamurlVXysslJ1p38meVg72pes2xOKEEO\n4ozMrTZgqQ1s9JDX3oa/N+vR2nh4Y/Ld7XPhs8KjliRxWTLRKzBqNi/WabdD\nYWUY\r\n=LFUB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","readme":"# @hyperledger/cactus-odap-hermes\nThe package provides Cactus to standardize cross chain transaction\n\n##### Using this we could perform:\n- Negotiate between 2 parties intend to transfer asset on different ledger\n- \"Delete and lock asset on a ledger\" then \"create asset on another ledger\" atomicly\n\n##### Prerequisites\nIn the root of the project to install the dependencies execute the command:\n`npm run configure`\n**Compiling**:\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n`npm run tsc`\n\n#####API Endpoints\nSimilar as Cactus, odap uses openapi to generate api paths.\nBy the file:\nhttps://github.com/jscode017/cactus/blob/odap-pr/packages/cactus-plugin-odap-hermes/src/main/json/openapi.json\nThe endpoints are:\n- Phase1TransferInitiationV1\n- Phase2TransferCommenceV1\n- Phase2LockEvidenceV1\n- Phase3CommitPreparationV1\n- Phase3CommitFinalV1\n- Phase3TransferCompleteV1\n- SendClientRequestV1\n##### Use case\nAn end user would want to operatie a cross chain transaction: lock and delete an asset on a source ledger(we use hyperledger besu in our implementation) and create a new asset on a target ledger(we use hyperledger fabric in our implementation).\nAnd the operations on source ledger is via client odap gateway; operations on target ledger is via server odap gateway.\nThe end user call the SendClientRequestV1API on client odap gateway to initiate the cross chain transaction.\nThen the client odap gateway would sequentially called\n1. Phase1TransferInitiationV1\n2.  Phase2TransferCommenceV1\n3. Phase2LockEvidenceV1\n4. Phase3CommitPreparationV1\n5. Phase3CommitFinalV1\n6. Phase3TransferCompleteV1\nThe sequence diagram:\n![odap-sequence-diagram](https://mermaid.ink/img/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtXG4gICAgcGFydGljaXBhbnQgRW5kVXNlclxuICAgIHBhcnRpY2lwYW50IENsaWVudE9EQVBHYXRld2F5XG4gICAgcGFydGljaXBhbnQgSHlwZXJsZWRnZXJGYWJyaWNcbiAgICBwYXJ0aWNpcGFudCBTZXJ2ZXJPREFQR2F0ZXdheVxuICAgIHBhcnRpY2lwYW50IEh5cGVybGVkZ2VyQmVzdVxuICAgIEVuZFVzZXItPj5DbGllbnRPREFQR2F0ZXdheTogc2VuZCBjbGllbnQgcmVxdWVzdFxuICAgIENsaWVudE9EQVBHYXRld2F5LT4-U2VydmVyT0RBUEdhdGV3YXk6ICB0cmFuc2ZlciBpbml0aWF0aW9uIHJlcXVlc3RcbiAgICBTZXJ2ZXJPREFQR2F0ZXdheS0tPj5DbGllbnRPREFQR2F0ZXdheTogdHJhbnNmZXIgaW5pdGlhdGlvbiBhY2tcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-PlNlcnZlck9EQVBHYXRld2F5OiAgdHJhbnNmZXIgY29tbWVuY2UgcmVxdWVzdFxuICAgIFNlcnZlck9EQVBHYXRld2F5LS0-PkNsaWVudE9EQVBHYXRld2F5OiB0cmFuc2ZlciBjb21tZW5jZSBhY2tcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-Pkh5cGVybGVkZ2VyRmFicmljOiBsb2NrIGFzc2V0XG4gICAgSHlwZXJsZWRnZXJGYWJyaWMtLT4-Q2xpZW50T0RBUEdhdGV3YXk6IHRyYW5zYWN0aW9uIHJlY2VpcHQgZm9yIGxvY2tpbmcgYXNzZXRcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-PlNlcnZlck9EQVBHYXRld2F5OiAgbG9jayBldmlkZW5jZSByZXF1ZXN0XG4gICAgU2VydmVyT0RBUEdhdGV3YXktPj5DbGllbnRPREFQR2F0ZXdheTogbG9jayBldmlkZW5jZSBhY2tcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-PlNlcnZlck9EQVBHYXRld2F5OiAgY29tbWl0IHByZXBhcmUgcmVxdWVzdFxuICAgIFNlcnZlck9EQVBHYXRld2F5LS0-PkNsaWVudE9EQVBHYXRld2F5OiBjb21taXQgcHJlcGFyZSBhY2tcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-Pkh5cGVybGVkZ2VyRmFicmljOiBkZWxldGUgYXNzZXRcbiAgICBIeXBlcmxlZGdlckZhYnJpYy0tPj5DbGllbnRPREFQR2F0ZXdheTogdHJhbnNhY3Rpb24gcmVjZWlwdCBmb3IgZGVsZXRpbmcgYXNzZXRcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-PlNlcnZlck9EQVBHYXRld2F5OiAgY29tbWl0IGZpbmFsIHJlcXVlc3RcbiAgICBTZXJ2ZXJPREFQR2F0ZXdheS0-Pkh5cGVybGVkZ2VyQmVzdTogY3JlYXRlIGFzc2V0XG4gICAgSHlwZXJsZWRnZXJCZXN1LS0-PlNlcnZlck9EQVBHYXRld2F5OiB0cmFuc2FjdGlvbiByZWNlaXB0IGZvciBjcmVhdGluZyBhc3NldFxuICAgIFNlcnZlck9EQVBHYXRld2F5LS0-PkNsaWVudE9EQVBHYXRld2F5OiBjb21taXQgZmluYWwgYWNrXG4gICAgQ2xpZW50T0RBUEdhdGV3YXktPj5TZXJ2ZXJPREFQR2F0ZXdheTogIHRyYW5zZmVyIGNvbXBsZXRlXG4gICAgQ2xpZW50T0RBUEdhdGV3YXktLT4-RW5kVXNlcjogIHNlbmQgY2xpZW50IGFja1xuXG4iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9LCJ1cGRhdGVFZGl0b3IiOnRydWUsImF1dG9TeW5jIjp0cnVlLCJ1cGRhdGVEaWFncmFtIjp0cnVlfQ \"odap-sequence-diagram\")\n##### How to test the files:\nTo have a full test\nWith ledger connectors:\nhttps://github.com/jscode017/cactus/blob/odap-pr/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap/odap-api-call-with-ledger-connector.test.ts\nWithout ledger connectors:\nhttps://github.com/jscode017/cactus/blob/odap-pr/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap/odap-api-call.test.ts\nFor developers who would want to test separate step of odap\nplease ref to other test files in:\nhttps://github.com/jscode017/cactus/tree/odap-pr/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap\n\n###### Some developer rules:\nHow to use the packages:\n######Create odap gateway:\nPlease first redger to cactus-plugins of\n\n- Hyperledger Fabric\n- Hyperledger Besu\n- IPFS\n\nTo know how to create fabric, besu, ipfs api clients.\nAnd suppose you have:\n-Hyperledger Fabric api client on url: http://localhost:8045\n-Hyperledger Besu api client on url: http://localhost:8046\n-IPFS api client on url: http://localhost:8047\nThen you should create odap gateway as follow:\n\n`const odapPluginOptions: OdapGatewayConstructorOptions= {\n\n     name: \"cactus-plugin#odapGateway\",\n     dltIDs: [\"supported dlts here\"],\n     instanceId: uuidV4(),    \n     ipfsPath:  http://localhost:8047,  \n     besuAssetID: \"whatever\",\n     besuPath:  http://localhost:8046,\n     besuWeb3SigningCredential:\n     besuWeb3SigningCredential,\n     besuContractName: besuContractName,\n     besuKeychainId: besuKeychainId,\n     fabricPath:  http://localhost:8045,\n     fabricSigningCredential: fabricSigningCredential,\n     fabricChannelName: fabricChannelName,\n     fabricContractName: fabricContractName,\n     abricAssetID: fabricAssetID,\n   };\n   \n   const odapGateway = new OdapGateway(odapPluginOptions);`\n   \nThe full test file: \nhttps://github.com/jscode017/cactus/blob/odap-pr/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap/odap-api-call-with-ledger-connector.test.ts\nprovide a good detailed example\n\nThen call SendClientRequestV1 to initiate the transfer from client ODAP gateway\n####Contributing\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md \"CONTIRBUTING.md\") to get started.\n\n####License\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE \"LICENSE \")file.\n\n\n\n","engines":{"npm":">=6","node":">=10"},"gitHead":"334593a74e9ba454a5e5b2511f1784a569564aaa","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected","codegen:openapi":"npm run generate-sdk"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cactus.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","description":"proof of concept of odap","directories":{},"_nodeVersion":"16.13.1","dependencies":{"web3":"1.5.2","axios":"0.21.4","crypto-js":"4.0.0","secp256k1":"4.0.2","socket.io":"4.1.3","web3-utils":"1.5.2","typescript-optional":"2.0.1","@hyperledger/cactus-core":"^1.0.0-main.334593a7.46+334593a7","@hyperledger/cactus-common":"^1.0.0-main.334593a7.46+334593a7","@hyperledger/cactus-core-api":"^1.0.0-main.334593a7.46+334593a7","@hyperledger/cactus-test-tooling":"^1.0.0-main.334593a7.46+334593a7","@hyperledger/cactus-cmd-api-server":"^1.0.0-main.334593a7.46+334593a7","@hyperledger/cactus-plugin-keychain-memory":"^1.0.0-main.334593a7.46+334593a7","@hyperledger/cactus-plugin-object-store-ipfs":"^1.0.0-main.334593a7.46+334593a7","@hyperledger/cactus-plugin-ledger-connector-besu":"^1.0.0-main.334593a7.46+334593a7","@hyperledger/cactus-plugin-ledger-connector-fabric":"^1.0.0-main.334593a7.46+334593a7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"crypto-js":"4.0.0","typescript":"4.3.2","@types/tape":"4.13.0","@types/express":"4.17.8","@types/crypto-js":"4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_1.0.0-main.334593a7.46_1642467606390_0.12731353944955615","host":"s3://npm-registry-packages"}},"1.0.0-jwt-supply-chain.62c7e930.0":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"1.0.0-jwt-supply-chain.62c7e930.0","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology"],"author":{"name":"Tzu-Shen, Wang"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@1.0.0-jwt-supply-chain.62c7e930.0","maintainers":[{"name":"hyperledger-lf","email":"npm@hyperledger.org"},{"name":"hlfdev-azp","email":"hlfdev.azp@gmail.com"},{"name":"silasdavis","email":"npm@silasdavis.net"},{"name":"gregdhill","email":"gregorydhill@outlook.com"},{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"patrikstas","email":"patrik.stas@gmail.com"},{"name":"timoglastra","email":"timo@glastra.me"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"62bf2f883eaff1f78fe8f58b033eba8620c055a7","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-1.0.0-jwt-supply-chain.62c7e930.0.tgz","fileCount":3,"integrity":"sha512-/v3hGTJqf4larNZAy9sOHYofgQhhoP03dlOfI1rf1c8WPE1EaGoDWKm04ku7I6wXJUH9puaN18YU7VO4PZ4MNg==","signatures":[{"sig":"MEYCIQD9g2Zh9PCX1rOiHy8AANkJKyU9yd8nZVdoT1wIEVJVTAIhANNkrVygwuuJDZj9Am0ooXIGBfSH3k+kXPNy5g/p/P6Y","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+yDxCRA9TVsSAnZWagAAG1MP/1eRQKnaFTavjB63e4Zv\n2VfpwuoWXlH/aw79sdwjFIOdsbPU9dK513Dt1+TcKuQALR+EMxT0Nje8iSqX\nnnP5ft37wF1A/DgcfwX6pOxGKGc4M3JVfBTH3hY9Gi8VhHKmXEi3Ai9pdmIC\n9riUHZnfA32KpL+5LRp9lre41gLdL97av+j/ftlXZ/xeLJZ77MKAJI8RbdhB\nsmCAUh7eZj15ASjbibRBbeZcemGGrDYkcuUulwMQeggMkJf9yjBo2yNatbLT\nwOgTiWU02NVhHRJXQbRWwyxsF54plG1CrqM5yrXUjCEaqcCdlq1JagwzZGSU\nXUt5/11c4i8fWA+F6USw5yqBkvV6Cocr+kaY05myDpsjhmrIJtxfLDxeDQIa\nrORMDtBST9cnnWIotfMQ1PYd3zYdKi8GZUfPqKN6dVb0hdDMbpGZ8+LNNJfb\nVVrs2bxTxcu2Q6QsWVRlXaiHuoL8VpVBnKZ02nFyzlKsFehSSugScHRBPRcG\njQP7GZlXkJMFMYveaeqU0CGj2WPRobLKafAO8755LhqWmL/5PIrNvRimOILB\n5383iw3brCoTT07d2Z7QJVJSj1BN2hyrR8m6g5dpo9S3Lx5v+PGk0Doq/NLv\nQbgbqfGvv37qJQ34KE2c7sX5uKzl3hdNVLGMCgLWgTwICK18RnaOmOfIMz94\ni31z\r\n=tQxT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","readme":"# @hyperledger/cactus-odap-hermes\nThe package provides Cactus to standardize cross chain transaction\n\n##### Using this we could perform:\n- Negotiate between 2 parties intend to transfer asset on different ledger\n- \"Delete and lock asset on a ledger\" then \"create asset on another ledger\" atomicly\n\n##### Prerequisites\nIn the root of the project to install the dependencies execute the command:\n`npm run configure`\n**Compiling**:\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n`npm run tsc`\n\n#####API Endpoints\nSimilar as Cactus, odap uses openapi to generate api paths.\nBy the file:\nhttps://github.com/jscode017/cactus/blob/odap-pr/packages/cactus-plugin-odap-hermes/src/main/json/openapi.json\nThe endpoints are:\n- Phase1TransferInitiationV1\n- Phase2TransferCommenceV1\n- Phase2LockEvidenceV1\n- Phase3CommitPreparationV1\n- Phase3CommitFinalV1\n- Phase3TransferCompleteV1\n- SendClientRequestV1\n##### Use case\nAn end user would want to operatie a cross chain transaction: lock and delete an asset on a source ledger(we use hyperledger besu in our implementation) and create a new asset on a target ledger(we use hyperledger fabric in our implementation).\nAnd the operations on source ledger is via client odap gateway; operations on target ledger is via server odap gateway.\nThe end user call the SendClientRequestV1API on client odap gateway to initiate the cross chain transaction.\nThen the client odap gateway would sequentially called\n1. Phase1TransferInitiationV1\n2.  Phase2TransferCommenceV1\n3. Phase2LockEvidenceV1\n4. Phase3CommitPreparationV1\n5. Phase3CommitFinalV1\n6. Phase3TransferCompleteV1\nThe sequence diagram:\n![odap-sequence-diagram](https://mermaid.ink/img/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtXG4gICAgcGFydGljaXBhbnQgRW5kVXNlclxuICAgIHBhcnRpY2lwYW50IENsaWVudE9EQVBHYXRld2F5XG4gICAgcGFydGljaXBhbnQgSHlwZXJsZWRnZXJGYWJyaWNcbiAgICBwYXJ0aWNpcGFudCBTZXJ2ZXJPREFQR2F0ZXdheVxuICAgIHBhcnRpY2lwYW50IEh5cGVybGVkZ2VyQmVzdVxuICAgIEVuZFVzZXItPj5DbGllbnRPREFQR2F0ZXdheTogc2VuZCBjbGllbnQgcmVxdWVzdFxuICAgIENsaWVudE9EQVBHYXRld2F5LT4-U2VydmVyT0RBUEdhdGV3YXk6ICB0cmFuc2ZlciBpbml0aWF0aW9uIHJlcXVlc3RcbiAgICBTZXJ2ZXJPREFQR2F0ZXdheS0tPj5DbGllbnRPREFQR2F0ZXdheTogdHJhbnNmZXIgaW5pdGlhdGlvbiBhY2tcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-PlNlcnZlck9EQVBHYXRld2F5OiAgdHJhbnNmZXIgY29tbWVuY2UgcmVxdWVzdFxuICAgIFNlcnZlck9EQVBHYXRld2F5LS0-PkNsaWVudE9EQVBHYXRld2F5OiB0cmFuc2ZlciBjb21tZW5jZSBhY2tcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-Pkh5cGVybGVkZ2VyRmFicmljOiBsb2NrIGFzc2V0XG4gICAgSHlwZXJsZWRnZXJGYWJyaWMtLT4-Q2xpZW50T0RBUEdhdGV3YXk6IHRyYW5zYWN0aW9uIHJlY2VpcHQgZm9yIGxvY2tpbmcgYXNzZXRcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-PlNlcnZlck9EQVBHYXRld2F5OiAgbG9jayBldmlkZW5jZSByZXF1ZXN0XG4gICAgU2VydmVyT0RBUEdhdGV3YXktPj5DbGllbnRPREFQR2F0ZXdheTogbG9jayBldmlkZW5jZSBhY2tcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-PlNlcnZlck9EQVBHYXRld2F5OiAgY29tbWl0IHByZXBhcmUgcmVxdWVzdFxuICAgIFNlcnZlck9EQVBHYXRld2F5LS0-PkNsaWVudE9EQVBHYXRld2F5OiBjb21taXQgcHJlcGFyZSBhY2tcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-Pkh5cGVybGVkZ2VyRmFicmljOiBkZWxldGUgYXNzZXRcbiAgICBIeXBlcmxlZGdlckZhYnJpYy0tPj5DbGllbnRPREFQR2F0ZXdheTogdHJhbnNhY3Rpb24gcmVjZWlwdCBmb3IgZGVsZXRpbmcgYXNzZXRcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-PlNlcnZlck9EQVBHYXRld2F5OiAgY29tbWl0IGZpbmFsIHJlcXVlc3RcbiAgICBTZXJ2ZXJPREFQR2F0ZXdheS0-Pkh5cGVybGVkZ2VyQmVzdTogY3JlYXRlIGFzc2V0XG4gICAgSHlwZXJsZWRnZXJCZXN1LS0-PlNlcnZlck9EQVBHYXRld2F5OiB0cmFuc2FjdGlvbiByZWNlaXB0IGZvciBjcmVhdGluZyBhc3NldFxuICAgIFNlcnZlck9EQVBHYXRld2F5LS0-PkNsaWVudE9EQVBHYXRld2F5OiBjb21taXQgZmluYWwgYWNrXG4gICAgQ2xpZW50T0RBUEdhdGV3YXktPj5TZXJ2ZXJPREFQR2F0ZXdheTogIHRyYW5zZmVyIGNvbXBsZXRlXG4gICAgQ2xpZW50T0RBUEdhdGV3YXktLT4-RW5kVXNlcjogIHNlbmQgY2xpZW50IGFja1xuXG4iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9LCJ1cGRhdGVFZGl0b3IiOnRydWUsImF1dG9TeW5jIjp0cnVlLCJ1cGRhdGVEaWFncmFtIjp0cnVlfQ \"odap-sequence-diagram\")\n##### How to test the files:\nTo have a full test\nWith ledger connectors:\nhttps://github.com/jscode017/cactus/blob/odap-pr/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap/odap-api-call-with-ledger-connector.test.ts\nWithout ledger connectors:\nhttps://github.com/jscode017/cactus/blob/odap-pr/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap/odap-api-call.test.ts\nFor developers who would want to test separate step of odap\nplease ref to other test files in:\nhttps://github.com/jscode017/cactus/tree/odap-pr/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap\n\n###### Some developer rules:\nHow to use the packages:\n######Create odap gateway:\nPlease first redger to cactus-plugins of\n\n- Hyperledger Fabric\n- Hyperledger Besu\n- IPFS\n\nTo know how to create fabric, besu, ipfs api clients.\nAnd suppose you have:\n-Hyperledger Fabric api client on url: http://localhost:8045\n-Hyperledger Besu api client on url: http://localhost:8046\n-IPFS api client on url: http://localhost:8047\nThen you should create odap gateway as follow:\n\n`const odapPluginOptions: OdapGatewayConstructorOptions= {\n\n     name: \"cactus-plugin#odapGateway\",\n     dltIDs: [\"supported dlts here\"],\n     instanceId: uuidV4(),    \n     ipfsPath:  http://localhost:8047,  \n     besuAssetID: \"whatever\",\n     besuPath:  http://localhost:8046,\n     besuWeb3SigningCredential:\n     besuWeb3SigningCredential,\n     besuContractName: besuContractName,\n     besuKeychainId: besuKeychainId,\n     fabricPath:  http://localhost:8045,\n     fabricSigningCredential: fabricSigningCredential,\n     fabricChannelName: fabricChannelName,\n     fabricContractName: fabricContractName,\n     abricAssetID: fabricAssetID,\n   };\n   \n   const odapGateway = new OdapGateway(odapPluginOptions);`\n   \nThe full test file: \nhttps://github.com/jscode017/cactus/blob/odap-pr/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap/odap-api-call-with-ledger-connector.test.ts\nprovide a good detailed example\n\nThen call SendClientRequestV1 to initiate the transfer from client ODAP gateway\n####Contributing\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md \"CONTIRBUTING.md\") to get started.\n\n####License\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE \"LICENSE \")file.\n\n\n\n","engines":{"npm":">=6","node":">=10"},"gitHead":"62c7e9301a806f7dbdd300247b692dbaa3abf570","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected","codegen:openapi":"npm run generate-sdk"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cactus.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","description":"proof of concept of odap","directories":{},"_nodeVersion":"16.13.1","dependencies":{"web3":"1.5.2","axios":"0.21.4","crypto-js":"4.0.0","secp256k1":"4.0.2","socket.io":"4.1.3","web3-utils":"1.5.2","typescript-optional":"2.0.1","@hyperledger/cactus-core":"^1.0.0-jwt-supply-chain.62c7e930.0+62c7e930","@hyperledger/cactus-common":"^1.0.0-jwt-supply-chain.62c7e930.0+62c7e930","@hyperledger/cactus-core-api":"^1.0.0-jwt-supply-chain.62c7e930.0+62c7e930","@hyperledger/cactus-test-tooling":"^1.0.0-jwt-supply-chain.62c7e930.0+62c7e930","@hyperledger/cactus-cmd-api-server":"^1.0.0-jwt-supply-chain.62c7e930.0+62c7e930","@hyperledger/cactus-plugin-keychain-memory":"^1.0.0-jwt-supply-chain.62c7e930.0+62c7e930","@hyperledger/cactus-plugin-object-store-ipfs":"^1.0.0-jwt-supply-chain.62c7e930.0+62c7e930","@hyperledger/cactus-plugin-ledger-connector-besu":"^1.0.0-jwt-supply-chain.62c7e930.0+62c7e930","@hyperledger/cactus-plugin-ledger-connector-fabric":"^1.0.0-jwt-supply-chain.62c7e930.0+62c7e930"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"crypto-js":"4.0.0","typescript":"4.3.2","@types/tape":"4.13.0","@types/express":"4.17.8","@types/crypto-js":"4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_1.0.0-jwt-supply-chain.62c7e930.0_1643847920975_0.6858293586662836","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"1.0.0","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology"],"author":{"name":"Tzu-Shen, Wang"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@1.0.0","maintainers":[{"name":"hyperledger-lf","email":"npm@hyperledger.org"},{"name":"hlfdev-azp","email":"hlfdev.azp@gmail.com"},{"name":"silasdavis","email":"npm@silasdavis.net"},{"name":"gregdhill","email":"gregorydhill@outlook.com"},{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"patrikstas","email":"patrik.stas@gmail.com"},{"name":"timoglastra","email":"timo@glastra.me"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"39dbce5a1198d1f479d0b648978e77fdf1bffd77","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-1.0.0.tgz","fileCount":3,"integrity":"sha512-QGGywu4TPNxrDzZMOxnBQ4p7DUJCda/hl46Scm2AUQbL95qtOeybhfg61a9uyfrEeIdskKQ57jOS9QUNaVFKJQ==","signatures":[{"sig":"MEYCIQDpIwPda7QTDdvlID/zeg3Jt6uA6swMNTajCaGQ0OdfZQIhAMMAhlU8aUXvL+3qqfHDDk9hmykH+6UdCvc5edYS6gmk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20015,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMnvDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3rA//WRVW8NAilvU5GJZnsfeKCzCAMvkly81g1YN31UH13fhgEINp\r\npYDn68goMUmsw3vPyZdYLRomhjQseifz+Uhujsb2Bhw/attPPtO0jftfyZpn\r\n1+WFyF+sSFtjNrEv37Bip9dSe6/M8Uk+07GC3junAxJO/NYnuuYQSmC5pwGe\r\nm7IjKkv113RvzaR/Ba0Pa86o0eKPQJJMNKHJ2t2fj7ZfbBMsL9F3/uyw/DZj\r\nS3OVZjXM2ApujAy51YwJAwZX/k33sWV6Z5VPNo5PCmNVbktEidYK7kvMAPuV\r\nonrtoKbBpPOIqquSEsB9mAezcRssL2QRAKrhM+mPX1rPR/PXDgNWwKmUBJwc\r\nipKq1TnvPK6vqnDoEElIpLUvmMdm0gpVQ6LKJ8JFqZ6eYpNzexBaYNojzK0J\r\nO3Szi8QYQTc9GITvm0Nv5Js4jz+zRRiwaaloK7QqHiZxJDALcboZCZfTPvPC\r\nLv1dsZbccQ50WgxEq4osDD0PrMOihYOE/eEFuID1WVc2lH6OfsP1eZ8Jj+28\r\ncrVnrNRzVlL3b+x7Kh3/Pn18nE3B1uSu2ShqkGYxLewrHeHyYoctAodgjML6\r\nJcRaXvHNksycNvJPfbuB6vZ392XjG2zRI6eXWy/y4opokWdY/OXmCy6bN0zo\r\nrg37XgQc74kFCbjXk4+o8PUqkNTzU7h3ZmY=\r\n=/W2I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","engines":{"npm":">=6","node":">=10"},"gitHead":"864449fb96c39e4605d5df4d51465af765b3d10f","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected","codegen:openapi":"npm run generate-sdk"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cactus.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","description":"proof of concept of odap","directories":{},"_nodeVersion":"16.13.1","dependencies":{"web3":"1.5.2","axios":"0.21.4","crypto-js":"4.0.0","secp256k1":"4.0.2","socket.io":"4.4.1","web3-utils":"1.5.2","typescript-optional":"2.0.1","@hyperledger/cactus-core":"1.0.0","@hyperledger/cactus-common":"1.0.0","@hyperledger/cactus-core-api":"1.0.0","@hyperledger/cactus-test-tooling":"1.0.0","@hyperledger/cactus-cmd-api-server":"1.0.0","@hyperledger/cactus-plugin-keychain-memory":"1.0.0","@hyperledger/cactus-plugin-object-store-ipfs":"1.0.0","@hyperledger/cactus-plugin-ledger-connector-besu":"1.0.0","@hyperledger/cactus-plugin-ledger-connector-fabric":"1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"crypto-js":"4.0.0","typescript":"4.3.2","@types/tape":"4.13.0","@types/express":"4.17.8","@types/crypto-js":"4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_1.0.0_1647475651153_0.07301809020722305","host":"s3://npm-registry-packages"}},"1.0.1-jwt-supply-chain.9df3fe79.16":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"1.0.1-jwt-supply-chain.9df3fe79.16","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"author":{"url":"https://www.hyperledger.org/use/cactus","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@1.0.1-jwt-supply-chain.9df3fe79.16","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"}],"contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"0e54bb9f88f3f06aa0eba3bf8556c90e5b6932f1","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-1.0.1-jwt-supply-chain.9df3fe79.16.tgz","fileCount":3,"integrity":"sha512-84PnaxeJSU//NXDdJbJEecTk/nz7qtDtGUrFDov+hDaqDSLnJlnrGCWYQ1jSpRJPUHJBIJYXtUV214vADKGNTg==","signatures":[{"sig":"MEUCIDkqQo2cAk49nWnrKgZ/Pyn9J3unvWffDvu0Y++GG5NbAiEAruxjmpEcWelVlw77781EyqdbqCIgVUcgEBrlLvIf1lw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTHYiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVVw/9GtrWZV/LKPFMtJAhWsbmqHPecUNyjls2YNPw/PgVhANXzgaL\r\nHhJMd6/cjK2vH2eObOAil9ElhXIoCiZENOuEPgetnU2YuN8cCqXhVEZocsTK\r\nAFAKQfF5RA90efjTjg4NjM8TVMHln0weNjBWfDjpBtLlnFkuHSbo5JrXNhuB\r\nS/n48FLhSnu6YUp7lwPl6F0vSPNivXmlPwVi3nj8hdgKc85UrldXURLTXFzB\r\nuSJRZNZO8Dd5xGr6cRdauH44euHCvftGJP2GCPOrDuQtT/HDxLg2GoRTY1z5\r\npOiHns6WLJGIATsLwS1oi1B5FlekauyshXMtQ0iqhkmFV91QgiAGUD9yezEh\r\na7xeRN7ZXyRpEWXPt6/yb+C/uIBRrRCkbBvFNkPUT6T3uDTCy0L+i9mI395I\r\n9dI7HcpxlERyEG6z53hC3t1/FomlQCmhDsd8U14XOtHyD3HZig7rGElwqdBh\r\n5YUKWlv7xfXzcA4eRyPtu3LlvQ85ngCn0YL6RaFtK7dA+I4KtkE+jQcZz1+D\r\nrPtR/8joWiUO99288It2Jqc7AFlnnt1Bw7P4FyMMidIjufWCskYSUpLcI7xn\r\nil8dxjOR9N1oaWvxrYWRnDAJKFsgTL8gQLkHhFKcHJGz3062b0ovw3Sq3lrj\r\n0xArzZ33Rx4r2FedgZqoEp9tsAHTqyk4vX8=\r\n=cFd/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","readme":"# @hyperledger/cactus-plugin-odap-hermes\nThe package provides `Cactus` a way to standardize cross-chain transactions between two ledgers (Fabric and Besu in this implementation). Using this we could perform:\n- Make unidirectional atomic asset transfer between 2 parties in different ledgers.\n- Lock of the asset in the source ledger and proof is sent to the counterparty.\n- Extinguishment of the asset in the source blockchain and regeneration of the asset in the recipient blockchain.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Use Case](#use-case)\n  - [Running the tests](#running-the-tests)\n  - [Usage](#usage)\n\n## Getting Started\n\nClone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on\nyour local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project to install the dependencies execute the command:\n```sh\nnpm run configure\n```\n\nKnow how to use the following plugins of the project:\n\n- [cactus-plugin-ledger-connector-fabric](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-fabric)\n- [cactus-plugin-ledger-connector-besu](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-besu)\n- [cactus-plugin-object-store-ipfs](https://github.com/hyperledger/cactus/tree/main/extensions/cactus-plugin-object-store-ipfs)\n\n## Architecture\n\nThe sequence diagram of ODAP is pictured above.\n\n![odap-sequence-diagram](https://mermaid.ink/img/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtXG4gICAgcGFydGljaXBhbnQgRW5kVXNlclxuICAgIHBhcnRpY2lwYW50IENsaWVudE9EQVBHYXRld2F5XG4gICAgcGFydGljaXBhbnQgSHlwZXJsZWRnZXJGYWJyaWNcbiAgICBwYXJ0aWNpcGFudCBTZXJ2ZXJPREFQR2F0ZXdheVxuICAgIHBhcnRpY2lwYW50IEh5cGVybGVkZ2VyQmVzdVxuICAgIEVuZFVzZXItPj5DbGllbnRPREFQR2F0ZXdheTogc2VuZCBjbGllbnQgcmVxdWVzdFxuICAgIENsaWVudE9EQVBHYXRld2F5LT4-U2VydmVyT0RBUEdhdGV3YXk6ICB0cmFuc2ZlciBpbml0aWF0aW9uIHJlcXVlc3RcbiAgICBTZXJ2ZXJPREFQR2F0ZXdheS0tPj5DbGllbnRPREFQR2F0ZXdheTogdHJhbnNmZXIgaW5pdGlhdGlvbiBhY2tcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-PlNlcnZlck9EQVBHYXRld2F5OiAgdHJhbnNmZXIgY29tbWVuY2UgcmVxdWVzdFxuICAgIFNlcnZlck9EQVBHYXRld2F5LS0-PkNsaWVudE9EQVBHYXRld2F5OiB0cmFuc2ZlciBjb21tZW5jZSBhY2tcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-Pkh5cGVybGVkZ2VyRmFicmljOiBsb2NrIGFzc2V0XG4gICAgSHlwZXJsZWRnZXJGYWJyaWMtLT4-Q2xpZW50T0RBUEdhdGV3YXk6IHRyYW5zYWN0aW9uIHJlY2VpcHQgZm9yIGxvY2tpbmcgYXNzZXRcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-PlNlcnZlck9EQVBHYXRld2F5OiAgbG9jayBldmlkZW5jZSByZXF1ZXN0XG4gICAgU2VydmVyT0RBUEdhdGV3YXktPj5DbGllbnRPREFQR2F0ZXdheTogbG9jayBldmlkZW5jZSBhY2tcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-PlNlcnZlck9EQVBHYXRld2F5OiAgY29tbWl0IHByZXBhcmUgcmVxdWVzdFxuICAgIFNlcnZlck9EQVBHYXRld2F5LS0-PkNsaWVudE9EQVBHYXRld2F5OiBjb21taXQgcHJlcGFyZSBhY2tcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-Pkh5cGVybGVkZ2VyRmFicmljOiBkZWxldGUgYXNzZXRcbiAgICBIeXBlcmxlZGdlckZhYnJpYy0tPj5DbGllbnRPREFQR2F0ZXdheTogdHJhbnNhY3Rpb24gcmVjZWlwdCBmb3IgZGVsZXRpbmcgYXNzZXRcbiAgICBDbGllbnRPREFQR2F0ZXdheS0-PlNlcnZlck9EQVBHYXRld2F5OiAgY29tbWl0IGZpbmFsIHJlcXVlc3RcbiAgICBTZXJ2ZXJPREFQR2F0ZXdheS0-Pkh5cGVybGVkZ2VyQmVzdTogY3JlYXRlIGFzc2V0XG4gICAgSHlwZXJsZWRnZXJCZXN1LS0-PlNlcnZlck9EQVBHYXRld2F5OiB0cmFuc2FjdGlvbiByZWNlaXB0IGZvciBjcmVhdGluZyBhc3NldFxuICAgIFNlcnZlck9EQVBHYXRld2F5LS0-PkNsaWVudE9EQVBHYXRld2F5OiBjb21taXQgZmluYWwgYWNrXG4gICAgQ2xpZW50T0RBUEdhdGV3YXktPj5TZXJ2ZXJPREFQR2F0ZXdheTogIHRyYW5zZmVyIGNvbXBsZXRlXG4gICAgQ2xpZW50T0RBUEdhdGV3YXktLT4-RW5kVXNlcjogIHNlbmQgY2xpZW50IGFja1xuXG4iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9LCJ1cGRhdGVFZGl0b3IiOnRydWUsImF1dG9TeW5jIjp0cnVlLCJ1cGRhdGVEaWFncmFtIjp0cnVlfQ \"odap-sequence-diagram\")\n\n### API Endpoints\nThis plugin uses OpenAPI to generate the API paths. At the moment, only the server endpoints are defined:\n\n- Phase1TransferInitiationV1\n- Phase2TransferCommenceV1\n- Phase2LockEvidenceV1\n- Phase3CommitPreparationV1\n- Phase3CommitFinalV1\n- Phase3TransferCompleteV1\n- SendClientRequestV1\n## Use case\nAlice and Bob, in blockchains A and B, respectively, want to make a transfer of an asset from one to the other. Gateway A represents the gateway connected to Alice's blockchain. Gateway B represents the gateway connected to Bob's blockchain. Alice and Bob will run ODAP, which will execute the transfer of the asset from blockchain A to blockchain B. The above endpoints will be called in sequence. Notice that the asset will first be locked on blockchain A and a proof is sent to the server-side. Afterward, the asset on the original blockchain is extinguished, followed by its regeneration on blockchain B.\n\n## Running the tests\n\nA test with ledger connectors (Fabric and Besu):\n\nhttps://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap/odap-api-call-with-ledger-connector.test.ts\n\nWithout ledger connectors:\n\nhttps://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap/odap-api-call.test.ts\n\nFor developers who would want to test separate steps of odap please refer to other test files in:\n\nhttps://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap\n\n## Usage\n\nLet us consider:\n\n- A Hyperledger Fabric API client on URL: http://localhost:8045\n- A Hyperledger Besu API client on URL: http://localhost:8046\n- An IPFS API client on URL: http://localhost:8047\n\nThen the ODAP gateway should be created as follows:\n\n```\nconst odapPluginOptions: OdapGatewayConstructorOptions = {\n     name: \"cactus-plugin#odapGateway\",\n     dltIDs: [\"supported dlts here\"],\n     instanceId: uuidV4(),    \n     ipfsPath: http://localhost:8047,  \n     besuAssetID: \"whatever\",\n     besuPath: http://localhost:8046,\n     besuWeb3SigningCredential:\n     besuWeb3SigningCredential,\n     besuContractName: besuContractName,\n     besuKeychainId: besuKeychainId,\n     fabricPath: http://localhost:8045,\n     fabricSigningCredential: fabricSigningCredential,\n     fabricChannelName: fabricChannelName,\n     fabricContractName: fabricContractName,\n     fabricAssetID: fabricAssetID,\n   };\n   \n   const odapGateway = new OdapGateway(odapPluginOptions);\n```\n\n## Contributing\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md \"CONTIRBUTING.md\") to get started.\n\n## License\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE \"LICENSE \")file.\n\n\n\n","engines":{"npm":">=6","node":">=10"},"gitHead":"9df3fe79252a78893e746a303e4f30d3a725a559","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected","codegen:openapi":"npm run generate-sdk"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cactus.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","description":"Proof of concept of ODAP","directories":{},"_nodeVersion":"16.13.1","dependencies":{"web3":"1.5.2","axios":"0.21.4","crypto-js":"4.0.0","secp256k1":"4.0.2","socket.io":"4.4.1","web3-utils":"1.5.2","typescript-optional":"2.0.1","@hyperledger/cactus-core":"^1.0.1-jwt-supply-chain.9df3fe79.16+9df3fe79","@hyperledger/cactus-common":"^1.0.1-jwt-supply-chain.9df3fe79.16+9df3fe79","@hyperledger/cactus-core-api":"^1.0.1-jwt-supply-chain.9df3fe79.16+9df3fe79","@hyperledger/cactus-test-tooling":"^1.0.1-jwt-supply-chain.9df3fe79.16+9df3fe79","@hyperledger/cactus-cmd-api-server":"^1.0.1-jwt-supply-chain.9df3fe79.16+9df3fe79","@hyperledger/cactus-plugin-keychain-memory":"^1.0.1-jwt-supply-chain.9df3fe79.16+9df3fe79","@hyperledger/cactus-plugin-object-store-ipfs":"^1.0.1-jwt-supply-chain.9df3fe79.16+9df3fe79","@hyperledger/cactus-plugin-ledger-connector-besu":"^1.0.1-jwt-supply-chain.9df3fe79.16+9df3fe79","@hyperledger/cactus-plugin-ledger-connector-fabric":"^1.0.1-jwt-supply-chain.9df3fe79.16+9df3fe79"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"crypto-js":"4.0.0","typescript":"4.3.2","@types/tape":"4.13.0","@types/express":"4.17.8","@types/crypto-js":"4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_1.0.1-jwt-supply-chain.9df3fe79.16_1649178146016_0.3987130235313854","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"1.1.2","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"author":{"url":"https://www.hyperledger.org/use/cactus","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@1.1.2","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"38b5ed001ad13ebc56645b50eeba4289dcc8cbc0","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-1.1.2.tgz","fileCount":141,"integrity":"sha512-xRnk+vB3u7jTfhaD85SjfolnttRdv5Wr8tcvV6uXVcEC0uOYM8Esq1O054OkGe4qEEDkOkt9uuJGj9+PvwL48w==","signatures":[{"sig":"MEQCIGBQro+D2ZqLYREua9VRRalh2on2f5mMhw6AtV6Qd5anAiA4kZ88E5w7hpoUUl+6gT5llDPyUedY8I3tRUZnaEJX3A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1762208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjceMpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrtLQ/5AQbVz3pVxNOgPlSeY3L67VxczZq44NFEZyrCBOqo3U2Iw0DF\r\n8OA7r76M+P5jaud1ANrXoYhJOdsq/ae0VEF5TvPJOvyxyBvgI5byYI4tq6NR\r\nFV0j13QsvPbI+GW9Mmp1vL5UJ9/N5K5UTg7zOV3D9Ga9UXXugPdDgA4x9ZtE\r\nGLykb0MS8t8y8rdPUqhGt7dS+aZbsh+fWc4GPCQNRgx2yCjGKyz2zDWQ0T54\r\nThIAR2I8WVjo9PGb+dBDlcJqlMvrliLWqrEOr7YB6//i+EZ35eTuZO1H4ba9\r\nzyY1upWULnEcgF90QcYMMH28YbqxQl1Dn2Nwv3nTYfSL7/g1lIobJZIRjitR\r\nfRHoHjNCFrkdjim8UDtpYLrcaWmW0yiUuemVh0utjI3Ga6LOm4RSj7vBQeBQ\r\n4D/jfDTzYNqSbXev7k4AGF62+SaeSgZk+5KcLFK05rvgYUWItc/xvPq0M73E\r\nvOba0/VJ+VISQLGdZRnR0vIjRWfa55VehA8Uqv7Km+xP/YvgkcVVVnOeKZJE\r\nJUBfYE/TVjK0n40ntJFJtT2bY/YJA78iWpMqUGQARfOx16cvd5217DYpNw2o\r\npIiDQ7rwH3P9vXjrbbT0fzw9SqXFB7yBGbjLILrJq0ocnonQTWKpk09itQx0\r\n52h4m1vlTOJtgZd7Ge/e429maLt7XPk8Fcs=\r\n=jEGS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","engines":{"npm":">=6","node":">=10"},"gitHead":"c339075fbcda8a26521c0414c9334d49d569dfe4","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected","codegen:openapi":"npm run generate-sdk"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cactus.git","type":"git"},"_npmVersion":"8.5.0","description":"Proof of concept of ODAP","directories":{},"_nodeVersion":"16.14.2","dependencies":{"knex":"2.0.0","web3":"1.5.2","axios":"0.21.4","sqlite3":"5.0.3","crypto-js":"4.0.0","secp256k1":"4.0.2","socket.io":"4.4.1","web3-utils":"1.5.2","typescript-optional":"2.0.1","@hyperledger/cactus-core":"1.1.2","@hyperledger/cactus-common":"1.1.2","@hyperledger/cactus-core-api":"1.1.2","@hyperledger/cactus-test-tooling":"1.1.2","@hyperledger/cactus-cmd-api-server":"1.1.2","@hyperledger/cactus-plugin-keychain-memory":"1.1.2","@hyperledger/cactus-plugin-object-store-ipfs":"1.1.2","@hyperledger/cactus-plugin-ledger-connector-besu":"1.1.2","@hyperledger/cactus-plugin-ledger-connector-fabric":"1.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"crypto-js":"4.0.0","typescript":"4.3.2","@types/tape":"4.13.0","@types/express":"4.17.8","@types/crypto-js":"4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_1.1.2_1668408104991_0.3264477786589892","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"1.1.1","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"author":{"url":"https://www.hyperledger.org/use/cactus","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@1.1.1","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"7f7478451a5163f4a17caf8086d094a7cf67b4fc","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-1.1.1.tgz","fileCount":142,"integrity":"sha512-tkczQ2cKrSOrINkjTMWqm1dW984VYu9oUu33sTClvvC94mzQtj8lsO9isro39tcVcjjb2B81ckcUpLpjDDp7QQ==","signatures":[{"sig":"MEYCIQDgrZDnOaewNYiGWUhwTUx7eLG8o1zBG1amXfkKcwFmVgIhAK+eJRumAkHb01ZI+G/9h4JhFjlGgQnCZDYhxlwRIa0n","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1773565,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjc/YGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmodXRAAgVju2r8qahHUNKkaGtI1/TTQ76Y9Wt71KFqWadA59+meVMBs\r\ntI+fu2dSNN9hT4Y6vj9d0FoFRezVAgwUh6BZpSXr8MHsN2pUcEhpycqBKj9J\r\nIBd8cai+flEzIbR8FIiyGgNJAQQE9tw1POvXhat+XhsU9RlqKqid1ODjswPI\r\n9ZGCrn9xI7+mulHRDDKU5l179B6L7OOIyue/IlGzurZerV13JvNjmhh9Jlxa\r\nYJdgiy3nusSqd4I9Zy+TiPJT9b85X9UMFzfah++d36Oio+DzwS9FKx5AWtxa\r\nahCi5EAmy8dEa++nfQaokxEyYWpQfLN/6VAIwPPN7VWlUZ1Prj3kz7YXWCv7\r\n4Jfba5ItE7Lnp39JNZtFW0RPTwcdxbPJ7FoYpiKYWPcDGFEbJ3aBl4sMJAFY\r\nTaDvzErGuB9pc0z/aBBzQ7PDFcN7vSL/mh+PMQC2TmZbSmqmu/S/iMWFpjqI\r\nfNZrEKZqCJFmtn3WZPnr+hrH9TvhoVhyXaBxCyEuqo8ui4QCCGylgFGnECcu\r\nehNtjQX63pKop1SH2CjfX00R11IQWLKIhab7wxQ2p+zBTKAzXlp/RpURPBnp\r\ndNTF8R06dNeN6/OUhbxqWZdawJtUe1NRNVVG+B8hiyGEIqD3TUC+iabPWrd7\r\ngRz8fuceSWxfROGJ0L9Uqlrf8ovZA2DMz9o=\r\n=Om2q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","engines":{"npm":">=6","node":">=10"},"gitHead":"d7cb611aaa5c278b0d2fba544f60f645be31e7bd","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected","codegen:openapi":"npm run generate-sdk"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cactus.git","type":"git"},"_npmVersion":"lerna/1.4.0/node@v16.14.2+x64 (linux)","description":"Proof of concept of ODAP","directories":{},"_nodeVersion":"16.14.2","dependencies":{"knex":"2.0.0","web3":"1.5.2","axios":"0.21.4","sqlite3":"5.0.3","crypto-js":"4.0.0","secp256k1":"4.0.2","socket.io":"4.4.1","web3-utils":"1.5.2","typescript-optional":"2.0.1","@hyperledger/cactus-core":"1.1.1","@hyperledger/cactus-common":"1.1.1","@hyperledger/cactus-core-api":"1.1.1","@hyperledger/cactus-test-tooling":"1.1.1","@hyperledger/cactus-cmd-api-server":"1.1.1","@hyperledger/cactus-plugin-keychain-memory":"1.1.1","@hyperledger/cactus-plugin-object-store-ipfs":"1.1.1","@hyperledger/cactus-plugin-ledger-connector-besu":"1.1.1","@hyperledger/cactus-plugin-ledger-connector-fabric":"1.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"crypto-js":"4.0.0","typescript":"4.3.2","@types/tape":"4.13.0","@types/express":"4.17.8","@types/crypto-js":"4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_1.1.1_1668544005769_0.6035394740507078","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"1.1.0","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"author":{"url":"https://www.hyperledger.org/use/cactus","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@1.1.0","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"fc4627ab3c1c75672138543b041a8ab7868d5d89","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-1.1.0.tgz","fileCount":3,"integrity":"sha512-Aca4eQuzCs4YtWwJ97J4+OYDFrfB8OFoUVTt7YNIvLAz0LTuzy/GML+HwTGoeVU/3Pn/ohqg/b/PveXkK8iX3Q==","signatures":[{"sig":"MEQCIBVU5erTQlOjm+0RuZE1uHPBWIkuvYREGCvMuZAzSa+yAiANC0IaDiDOz6Lzt6xIfeF+usKhvVkWoG6wWlOVBLkFRg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjc/gtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpygA//QZZuRQMEDESKDP4lv/u60IjHPXe6pkKGplPeCzlnNGrcSg3p\r\nkIrFV7l8ZbllITLZcwOC9tCEPuKeWWxNRSVUU+Xd1qMdcBZbjPCJgT7nhB3z\r\nWW8mjFMFt8xEJkEIpOcbhNl6RVc2GM7Ha7uo5/H+9HiWHd9DCHjUv3CPRdre\r\nINVIjmg1kr3UOGHE1avbtfZXvSzWU2+ffZBwHJLe+DtlnLBOidMYWDDdDqfm\r\nsOC7Tl+xS5ikVswY3ksPv48TVnE6HVCdCH4pqO6I2YLvp1rXlZXLpotWfJp1\r\nD9G9Silr7My2jIX25Urfx5Wm3Y4eLBzs9Af017WdCVp+tRdKNct+hqJAz8zI\r\nL8o+Cw1OXiHdY3PYsGfPmVVJdMNmdH7RRT5FO9wqzUxwrLJArF7Lx9wkbA0N\r\nvDu6moSXkbMT+cZ1DwQH7MofM25kQWO2ZFzLgPs0emRyNlX1zrBUF1bl8xY5\r\nH5iJhbfGtLY7kEXesEr/4x276U1sXm4497qmEW9iRweXZ/DsYk3i+MVbwEeU\r\nTcz2GuKUqM+9Chfr6oJR2gJ0pdPT/kUTn/o5SLf3u368bQYZELTE43BSUTyH\r\no+Q3NpJPK9NYsqB5Nnz0MVmpUBdplXFlk4KdAM3fi7txnwTeF+6U7Vz2gL8g\r\nPieIHwC4vhjRAimgHuxwJjwTmLOtovUU58A=\r\n=VufB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","engines":{"npm":">=6","node":">=10"},"gitHead":"cc8deb8167ec485d7bc1e7145d8573b112775e31","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected","codegen:openapi":"npm run generate-sdk"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cactus.git","type":"git"},"_npmVersion":"lerna/1.4.0/node@v16.14.2+x64 (linux)","description":"Proof of concept of ODAP","directories":{},"_nodeVersion":"16.14.2","dependencies":{"knex":"2.0.0","web3":"1.5.2","axios":"0.21.4","sqlite3":"5.0.3","crypto-js":"4.0.0","secp256k1":"4.0.2","socket.io":"4.4.1","web3-utils":"1.5.2","typescript-optional":"2.0.1","@hyperledger/cactus-core":"1.1.0","@hyperledger/cactus-common":"1.1.0","@hyperledger/cactus-core-api":"1.1.0","@hyperledger/cactus-test-tooling":"1.1.0","@hyperledger/cactus-cmd-api-server":"1.1.0","@hyperledger/cactus-plugin-keychain-memory":"1.1.0","@hyperledger/cactus-plugin-object-store-ipfs":"1.1.0","@hyperledger/cactus-plugin-ledger-connector-besu":"1.1.0","@hyperledger/cactus-plugin-ledger-connector-fabric":"1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"crypto-js":"4.0.0","typescript":"4.3.2","@types/tape":"4.13.0","@types/express":"4.17.8","@types/crypto-js":"4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_1.1.0_1668544557745_0.2170824325241243","host":"s3://npm-registry-packages"}},"1.1.3":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"1.1.3","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"author":{"url":"https://www.hyperledger.org/use/cactus","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@1.1.3","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"704130deadcdd406e09e3ac9e5b2645ee5c023aa","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-1.1.3.tgz","fileCount":142,"integrity":"sha512-o/Ak4FkMOqI1lV9khod0HywH9OhAVCqMWvAS8oH3ulStcxo672zMYDs9847KiXFoIceKoteIDGGY1I0AE1I6IQ==","signatures":[{"sig":"MEQCIBwC2lN/97s/eRRRqkhkuycasoN9eLT/7tjOZ3QFK+QQAiAcJiN7Wx76zzwmiDRs60Dfevd+LZkUvvVO5rY0xsWlfg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1777689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmm8xACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+Fw/9HeeqYdHTCdCrGm0SH0kMHEaQuNcAIaaatgCrkPGfBTN2OMrC\r\nVhA6JhN1TC3wHWrxC/aZQYVaSgXrlyBvqsuK6DurxE6//XFDP89VsWETzZNV\r\nsD2AJu18B5zlUOjqb3GmALU4NzyjQbGEMzQdpIXkLgY8zE75Vc8XSwKpaMYu\r\niDvm4w3j+FAwC5IcAo+FBIgmBsB3T8Me5MOWqPmsd4fhPHwx9xsZk+hTVtwu\r\n+F5FgfdEikEF0Yo6FjBk+Z3PqBaCCq0fOPcrCCoRHTa2xyd5yOer+gWX3wQd\r\n5rGZAnSOcxws3RUcXPcwaEOB/7ryKwk8RegUkpkL1trfB2v6xffjyG1lGpQh\r\n/GUxilQwziSe2gUbk2OUgRbnzO/JgkWSdOiOwQ6dPUYi2HkbkujVM+kMFjqS\r\nHmQN5ku8hCdt0GjCFELcGszJ8sbS2/CQ4xssjZS5kvMag2XvWbAg8dFKdsqa\r\nvDKxME2TYEj/DayxUStZzuYjdS/7nzKjnDx1Iq0nuRBCpcQOAguJf9VzxufL\r\nNaEWxXSwySiRR4Pcx5s3Gko/W0xzX80NXi7VKwi5Nm42Q1Ca9rWbNIm8btFD\r\n813xrgGaymWcyPqMaPMEJSQYcufDXBUWJbG2gZxoy2fmulfpxi5+R9X/M8W7\r\nUCu2a4P/vqoxUlPUmYiE9AeiOMrDUU8xWwE=\r\n=1twa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","engines":{"npm":">=6","node":">=10"},"gitHead":"795ee6bbd9637c2259fe92d0f56780d36121c538","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected","codegen:openapi":"npm run generate-sdk"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cactus.git","type":"git"},"_npmVersion":"lerna/1.4.0/node@v16.14.2+x64 (linux)","description":"Proof of concept of ODAP","directories":{},"_nodeVersion":"16.14.2","dependencies":{"knex":"2.0.0","web3":"1.5.2","axios":"0.21.4","sqlite3":"5.0.3","crypto-js":"4.0.0","secp256k1":"4.0.2","socket.io":"4.4.1","web3-utils":"1.5.2","typescript-optional":"2.0.1","@hyperledger/cactus-core":"1.1.3","@hyperledger/cactus-common":"1.1.3","@hyperledger/cactus-core-api":"1.1.3","@hyperledger/cactus-test-tooling":"1.1.3","@hyperledger/cactus-cmd-api-server":"1.1.3","@hyperledger/cactus-plugin-keychain-memory":"1.1.3","@hyperledger/cactus-plugin-object-store-ipfs":"1.1.3","@hyperledger/cactus-plugin-ledger-connector-besu":"1.1.3","@hyperledger/cactus-plugin-ledger-connector-fabric":"1.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"crypto-js":"4.0.0","typescript":"4.3.2","@types/tape":"4.13.0","@types/express":"4.17.8","@types/crypto-js":"4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_1.1.3_1671065393250_0.3055905791546192","host":"s3://npm-registry-packages"}},"2.0.0-alpha.1":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"2.0.0-alpha.1","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"author":{"url":"https://www.hyperledger.org/use/cactus","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@2.0.0-alpha.1","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"60f9b7a9d0aefd57029f81a50085d75d4ce2973e","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-2.0.0-alpha.1.tgz","fileCount":142,"integrity":"sha512-6awp/v42hROgQZKRS9fy7XaRyPtIh5KCQ7dbRsxmj5sdvgMKehMdoSn35zdHxdo14q+No8xYVbg9ReGFdKu2xw==","signatures":[{"sig":"MEUCIQCRrEjUzXohdZg/ngBKbh7PEJiQPvpRm+nydIlSvSQhcwIgNfDd0StlOX7PHwIFVKB6/+Fl5xxbO47736DOa3/i4Qo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1780880},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","engines":{"npm":">=6","node":">=10"},"gitHead":"e54842d168be78a3cd327ca07c24b75ea43043f8","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"run-p generate-sdk:*","codegen:openapi":"npm run generate-sdk","generate-sdk:kotlin":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected","generate-sdk:typescript-axios":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cacti.git","type":"git"},"_npmVersion":"lerna/2.5.0/node@v16.20.2+x64 (linux)","description":"Proof of concept of ODAP","directories":{},"_nodeVersion":"16.20.2","dependencies":{"knex":"2.4.0","web3":"1.5.2","axios":"0.21.4","sqlite3":"5.1.5","crypto-js":"4.0.0","secp256k1":"4.0.2","socket.io":"4.4.1","web3-utils":"1.5.2","typescript-optional":"2.0.1","@hyperledger/cactus-core":"2.0.0-alpha.1","@hyperledger/cactus-common":"2.0.0-alpha.1","@hyperledger/cactus-core-api":"2.0.0-alpha.1","@hyperledger/cactus-test-tooling":"2.0.0-alpha.1","@hyperledger/cactus-cmd-api-server":"2.0.0-alpha.1","@hyperledger/cactus-plugin-keychain-memory":"2.0.0-alpha.1","@hyperledger/cactus-plugin-object-store-ipfs":"2.0.0-alpha.1","@hyperledger/cactus-plugin-ledger-connector-besu":"2.0.0-alpha.1","@hyperledger/cactus-plugin-ledger-connector-fabric":"2.0.0-alpha.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"crypto-js":"4.0.0","typescript":"4.3.2","@types/tape":"4.13.0","@types/express":"4.17.8","@types/crypto-js":"4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_2.0.0-alpha.1_1694280554986_0.22859901981043684","host":"s3://npm-registry-packages"}},"2.0.0-alpha.2":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"2.0.0-alpha.2","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"author":{"url":"https://www.hyperledger.org/use/cacti","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@2.0.0-alpha.2","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"22ae0e2aeeb710901ac13f2bbf0dc146f437b7e7","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-2.0.0-alpha.2.tgz","fileCount":280,"integrity":"sha512-OT4AbjedVFdJfBLs1Ck+p067UjYw8z5f52/rT1835Q6cNDJxwBNC0D3HzwEUP7DPVt5lcse1w8YHNwnptqptQA==","signatures":[{"sig":"MEUCIB8hS1i6HmV3fCQ0g2ZKUnvTpf3FA0KOSrC14LqfVV8+AiEAhh8yW7e8E/U+xkVin82/CBuPr3mdprQWwhWxY410WP4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3339945},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","engines":{"npm":">=6","node":">=10"},"gitHead":"e5c7bd9c302d4addf07dd0bbb24361199940e7f4","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","generate-sdk:kotlin":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected","generate-sdk:typescript-axios":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cacti.git","type":"git"},"_npmVersion":"lerna/2.5.1/node@v18.12.1+x64 (linux)","description":"Proof of concept of ODAP","directories":{},"_nodeVersion":"18.12.1","dependencies":{"knex":"2.4.0","web3":"1.6.1","axios":"0.21.4","sqlite3":"5.1.5","crypto-js":"4.0.0","secp256k1":"4.0.3","socket.io":"4.5.4","web3-utils":"1.6.1","typescript-optional":"2.0.1","@hyperledger/cactus-core":"2.0.0-alpha.2","@hyperledger/cactus-common":"2.0.0-alpha.2","@hyperledger/cactus-core-api":"2.0.0-alpha.2","@hyperledger/cactus-test-tooling":"2.0.0-alpha.2","@hyperledger/cactus-cmd-api-server":"2.0.0-alpha.2","@hyperledger/cactus-plugin-keychain-memory":"2.0.0-alpha.2","@hyperledger/cactus-plugin-object-store-ipfs":"2.0.0-alpha.2","@hyperledger/cactus-plugin-ledger-connector-besu":"2.0.0-alpha.2","@hyperledger/cactus-plugin-ledger-connector-fabric":"2.0.0-alpha.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"crypto-js":"4.0.0","typescript":"4.9.5","@types/tape":"4.13.4","@types/express":"4.17.8","fabric-network":"2.2.18","@types/crypto-js":"4.0.1","ipfs-http-client":"51.0.1"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_2.0.0-alpha.2_1696402081013_0.661919073892552","host":"s3://npm-registry-packages"}},"2.0.0-dev.93":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"2.0.0-dev.93","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"author":{"url":"https://www.hyperledger.org/use/cacti","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@2.0.0-dev.93","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"ffdf684a4a41e67b27d561753554b0224fbf096f","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-2.0.0-dev.93.tgz","fileCount":141,"integrity":"sha512-0CqFmDqiZ/n4f8mxfZn4vmOhydU54VJ/Nh0p2Cc/umE6H9axQ4ao3+B3ypoZSoYeW4nowqFZlLlLX8CaJDmqFw==","signatures":[{"sig":"MEUCIH/2hu2wB5rI50cD0FsVTu5xhkJ+q2Xy6sK3ymZ7N7OrAiEAzbV3HOwNyvyWf3Lu3EWAXq6Dc4mfNcD1j0yT3gFbam8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1602170},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","readme":"# @hyperledger/cactus-plugin-odap-hermes\nThe package provides `Cactus` a way to standardize cross-chain transactions between two ledgers (Fabric and Besu in this implementation). Using this we can perform:\n- A unidirectional atomic asset transfer between 2 parties in different ledgers.\n- Lock of the asset in the source ledger and proof is sent to the counterparty.\n- Extinguishment of the asset in the source blockchain and regeneration of the asset in the recipient blockchain.\n\nAt the moment, we assume a crash-fault environment under some assumptions detailed in section [Assumptions](#assumptions)\n## Summary\n\n  - [Assumptions](#assumptions)\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Use Case](#use-case)\n  - [Running the tests](#running-the-tests)\n  - [Usage](#usage)\n\n\n## Assumptions\nRegarding the crash recovery procedure in place, at the moment we only support crashes of gateways under certain assumptions detailed as follows:\n  - Gateways crash only after receiving a message (and before sending the next one)\n  - Gateways crash only after logging to the Log Storage the previously received message\n  - Gateways never loose their long term keys\n  - Gateways do not have byzantine behavior\n  - Gateways are assumed to always recover from a crash\n\n## Getting Started\n\nClone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on\nyour local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project to install the dependencies execute the command:\n```sh\nnpm run configure\n```\n\nKnow how to use the following plugins of the project:\n\n  - [cactus-plugin-ledger-connector-fabric](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-fabric)\n  - [cactus-plugin-ledger-connector-besu](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-besu)\n  - [cactus-plugin-object-store-ipfs](https://github.com/hyperledger/cactus/tree/main/extensions/cactus-plugin-object-store-ipfs)\n\n## Architecture\n\n### Entities\nFirstly let us identify the different entities involved in the protocol and what is their function:\n- Two gateways in each side of the protocol: they implement endpoints to exchange the messages defined in the protocol.\n- Ledgers connectors in each side (each connected to a different gateway): they expose the API so that gateways can interact the respective ledgers (e.g., locking, deleting and creating assets).\n- SQLite3 database: persistent log and proofs storage in each gateway.\n- IPFS connector: is exposed the API so that both gateways have access to the same structure. This is used to store the hashes and signatures of the logs and proofs, so that accountability is guaranteed.\n\nThe sequence diagram of ODAP is pictured below.\n\n![odap-sequence-diagram](https://i.imgur.com/SOdXFEt.png)\n\n### API Endpoints\nThis plugin uses OpenAPI to generate the API paths.\nThere are Client and Server Endpoints for each type of message detailed in the ODAP protocol:\n\n  - TransferInitializationV1Request\n  - TransferInitializationV1Response\n  - TransferCommenceV1Request\n  - TransferCommenceV1Response\n  - LockEvidenceV1Request\n  - LockEvidenceV1Response\n  - CommitPreparationV1Request\n  - CommitPreparationV1Response\n  - CommitFinalV1Request\n  - CommitFinalV1Response\n  - TransferCompleteV1Request\n  - ClientV1Request\n\nThere are also defined the endpoints for the crash recovery procedure (there is still missing the endpoint to receive the Rollback mesage):\n  - RecoverV1Message\n  - RecoverUpdateV1Message\n  - RecoverUpdateAckV1Message\n  - RecoverSuccessV1Message\n  - RollbackV1Message\n\n## Use case\nAlice and Bob, in blockchains A and B, respectively, want to make a transfer of an asset from one to the other. Gateway A represents the gateway connected to Alice's blockchain. Gateway B represents the gateway connected to Bob's blockchain. Alice and Bob will run ODAP, which will execute the transfer of the asset from blockchain A to blockchain B. The above endpoints will be called in sequence. Notice that the asset will first be locked on blockchain A and a proof is sent to the server-side. Afterward, the asset on the original blockchain is extinguished, followed by its regeneration on blockchain B.\n\n## Running the tests\n\n[A test of the entire protocol with manual calls to the methods, i.e. without ledger connectors and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts)\n\n[A test of the entire protocol using Open API but with no ledger connectors.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts)\n\n[A test of the entire protocol with ledger connectors (Fabric and Besu) and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts)\n\n[A test with a simulated crash of the client gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts)\n\n[A test with a simulated crash of the client gateway after the lock of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts)\n\n[A test with a simulated crash of the client gateway after the deletion of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the creation of the the asset in the recipient blockchain (Besu).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts)\n\n[A test with a rollback after a timeout (client crashed).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts)\n\n[A test with a backup gateway resuming the protocol after the client gateway crashed.](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts)\n\nFor developers that want to test separate steps/phases of the ODAP protocol, please refer to [these](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/) test files (client and server side along with the recovery procedure).\n\n## Usage\n\nLet us consider two gateways. The client gateway connected to Hyperledger Fabric and the server gateway connected to Hyperledger Besu. Let us also consider:\n\n  - A Hyperledger Fabric API client on URL: http://localhost:8045\n  - A Hyperledger Besu API client on URL: http://localhost:8046\n  - An IPFS API client on URL: http://localhost:8047\n  - The local databases configuration provided in the file [knex.config.ts](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/test/typescript/knex.config.ts)\n\nThen the ODAP gateways should be created as follows:\n\n```typescript\nconst clientGatewayOptions: IFabricOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#clientOdapGateway\",\n  dltIDs: [\"DLT2\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  fabricPath: \"http://localhost:8045\",\n  fabricSigningCredential: fabricSigningCredential,\n  fabricChannelName: fabricChannelName,\n  fabricContractName: fabricContractName,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n\nconst serverGatewayOptions: IBesuOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#serverOdapGateway\",\n  dltIDs: [\"DLT1\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  besuPath: \"http://localhost:8046\",\n  besuWeb3SigningCredential: besuWeb3SigningCredential,\n  besuContractName: besuContractName,\n  besuKeychainId: besuKeychainId,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n   \n  const clientGateway = new FabricOdapGateway(clientGatewayOptions);\n  const serverGateway = new BesuOdapGateway(serverGatewayOptions);\n```\n\nNote that these gateways are extensions of the [default ODAP Gateway class](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-odap-gateway.ts), that implements the gateway functionality. Each of these extensions implements ledger-specific operations.\n\n## Contributing\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md \"CONTIRBUTING.md\") to get started.\n\n## License\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE \"LICENSE \")file.\n","engines":{"npm":">=6","node":">=10"},"gitHead":"df265e0b97b7c2b52587d0bcc923b9917c5c00c5","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","generate-sdk:kotlin":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected","generate-sdk:typescript-axios":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cacti.git","type":"git"},"_npmVersion":"lerna/2.6.0/node@v20.9.0+x64 (linux)","description":"Proof of concept of ODAP","directories":{},"_nodeVersion":"20.9.0","dependencies":{"knex":"2.4.0","uuid":"9.0.1","web3":"1.6.1","axios":"1.5.1","sqlite3":"5.1.5","fs-extra":"11.1.1","crypto-js":"4.2.0","secp256k1":"4.0.3","socket.io":"4.5.4","web3-utils":"1.6.1","typescript-optional":"2.0.1","@hyperledger/cactus-core":"^2.0.0-dev.93+df265e0b9","@hyperledger/cactus-common":"^2.0.0-dev.93+df265e0b9","@hyperledger/cactus-core-api":"^2.0.0-dev.93+df265e0b9","@hyperledger/cactus-test-tooling":"^2.0.0-dev.93+df265e0b9","@hyperledger/cactus-cmd-api-server":"^2.0.0-dev.93+df265e0b9","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-dev.93+df265e0b9","@hyperledger/cactus-plugin-object-store-ipfs":"^2.0.0-dev.93+df265e0b9","@hyperledger/cactus-plugin-ledger-connector-besu":"^2.0.0-dev.93+df265e0b9","@hyperledger/cactus-plugin-ledger-connector-fabric":"^2.0.0-dev.93+df265e0b9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"express":"4.18.2","typescript":"4.9.5","@types/tape":"4.13.4","@types/uuid":"9.0.6","body-parser":"1.20.2","@types/express":"4.17.19","fabric-network":"2.2.19","@types/fs-extra":"11.0.3","kubo-rpc-client":"3.0.1","@types/crypto-js":"4.0.1","@types/body-parser":"1.19.4"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_2.0.0-dev.93_1700104493652_0.7011233204439002","host":"s3://npm-registry-packages"}},"2.0.0-dev.94":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"2.0.0-dev.94","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"author":{"url":"https://www.hyperledger.org/use/cacti","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@2.0.0-dev.94","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"b80cddb076dfddef1171fce1ee4e590cabac8fc4","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-2.0.0-dev.94.tgz","fileCount":141,"integrity":"sha512-1xXkcw4b9h3v8iCCrojF1RcFTM1meOTJDOwneoZ+ME8K/R24DiPttJm4wCPjHwn5m4XRFi8Su4ItJ8zBUP03dA==","signatures":[{"sig":"MEYCIQC9RUvAyNv8zIdUOhw2C1qEh0umLex8XaGy6ZXZK5cvKwIhAJbvlvQUdw3vhq6pZ4LySxCWYIlEOowGD1fvK/TqhBBp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1602170},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","readme":"# @hyperledger/cactus-plugin-odap-hermes\nThe package provides `Cactus` a way to standardize cross-chain transactions between two ledgers (Fabric and Besu in this implementation). Using this we can perform:\n- A unidirectional atomic asset transfer between 2 parties in different ledgers.\n- Lock of the asset in the source ledger and proof is sent to the counterparty.\n- Extinguishment of the asset in the source blockchain and regeneration of the asset in the recipient blockchain.\n\nAt the moment, we assume a crash-fault environment under some assumptions detailed in section [Assumptions](#assumptions)\n## Summary\n\n  - [Assumptions](#assumptions)\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Use Case](#use-case)\n  - [Running the tests](#running-the-tests)\n  - [Usage](#usage)\n\n\n## Assumptions\nRegarding the crash recovery procedure in place, at the moment we only support crashes of gateways under certain assumptions detailed as follows:\n  - Gateways crash only after receiving a message (and before sending the next one)\n  - Gateways crash only after logging to the Log Storage the previously received message\n  - Gateways never loose their long term keys\n  - Gateways do not have byzantine behavior\n  - Gateways are assumed to always recover from a crash\n\n## Getting Started\n\nClone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on\nyour local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project to install the dependencies execute the command:\n```sh\nnpm run configure\n```\n\nKnow how to use the following plugins of the project:\n\n  - [cactus-plugin-ledger-connector-fabric](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-fabric)\n  - [cactus-plugin-ledger-connector-besu](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-besu)\n  - [cactus-plugin-object-store-ipfs](https://github.com/hyperledger/cactus/tree/main/extensions/cactus-plugin-object-store-ipfs)\n\n## Architecture\n\n### Entities\nFirstly let us identify the different entities involved in the protocol and what is their function:\n- Two gateways in each side of the protocol: they implement endpoints to exchange the messages defined in the protocol.\n- Ledgers connectors in each side (each connected to a different gateway): they expose the API so that gateways can interact the respective ledgers (e.g., locking, deleting and creating assets).\n- SQLite3 database: persistent log and proofs storage in each gateway.\n- IPFS connector: is exposed the API so that both gateways have access to the same structure. This is used to store the hashes and signatures of the logs and proofs, so that accountability is guaranteed.\n\nThe sequence diagram of ODAP is pictured below.\n\n![odap-sequence-diagram](https://i.imgur.com/SOdXFEt.png)\n\n### API Endpoints\nThis plugin uses OpenAPI to generate the API paths.\nThere are Client and Server Endpoints for each type of message detailed in the ODAP protocol:\n\n  - TransferInitializationV1Request\n  - TransferInitializationV1Response\n  - TransferCommenceV1Request\n  - TransferCommenceV1Response\n  - LockEvidenceV1Request\n  - LockEvidenceV1Response\n  - CommitPreparationV1Request\n  - CommitPreparationV1Response\n  - CommitFinalV1Request\n  - CommitFinalV1Response\n  - TransferCompleteV1Request\n  - ClientV1Request\n\nThere are also defined the endpoints for the crash recovery procedure (there is still missing the endpoint to receive the Rollback mesage):\n  - RecoverV1Message\n  - RecoverUpdateV1Message\n  - RecoverUpdateAckV1Message\n  - RecoverSuccessV1Message\n  - RollbackV1Message\n\n## Use case\nAlice and Bob, in blockchains A and B, respectively, want to make a transfer of an asset from one to the other. Gateway A represents the gateway connected to Alice's blockchain. Gateway B represents the gateway connected to Bob's blockchain. Alice and Bob will run ODAP, which will execute the transfer of the asset from blockchain A to blockchain B. The above endpoints will be called in sequence. Notice that the asset will first be locked on blockchain A and a proof is sent to the server-side. Afterward, the asset on the original blockchain is extinguished, followed by its regeneration on blockchain B.\n\n## Running the tests\n\n[A test of the entire protocol with manual calls to the methods, i.e. without ledger connectors and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts)\n\n[A test of the entire protocol using Open API but with no ledger connectors.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts)\n\n[A test of the entire protocol with ledger connectors (Fabric and Besu) and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts)\n\n[A test with a simulated crash of the client gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts)\n\n[A test with a simulated crash of the client gateway after the lock of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts)\n\n[A test with a simulated crash of the client gateway after the deletion of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the creation of the the asset in the recipient blockchain (Besu).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts)\n\n[A test with a rollback after a timeout (client crashed).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts)\n\n[A test with a backup gateway resuming the protocol after the client gateway crashed.](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts)\n\nFor developers that want to test separate steps/phases of the ODAP protocol, please refer to [these](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/) test files (client and server side along with the recovery procedure).\n\n## Usage\n\nLet us consider two gateways. The client gateway connected to Hyperledger Fabric and the server gateway connected to Hyperledger Besu. Let us also consider:\n\n  - A Hyperledger Fabric API client on URL: http://localhost:8045\n  - A Hyperledger Besu API client on URL: http://localhost:8046\n  - An IPFS API client on URL: http://localhost:8047\n  - The local databases configuration provided in the file [knex.config.ts](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/test/typescript/knex.config.ts)\n\nThen the ODAP gateways should be created as follows:\n\n```typescript\nconst clientGatewayOptions: IFabricOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#clientOdapGateway\",\n  dltIDs: [\"DLT2\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  fabricPath: \"http://localhost:8045\",\n  fabricSigningCredential: fabricSigningCredential,\n  fabricChannelName: fabricChannelName,\n  fabricContractName: fabricContractName,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n\nconst serverGatewayOptions: IBesuOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#serverOdapGateway\",\n  dltIDs: [\"DLT1\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  besuPath: \"http://localhost:8046\",\n  besuWeb3SigningCredential: besuWeb3SigningCredential,\n  besuContractName: besuContractName,\n  besuKeychainId: besuKeychainId,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n   \n  const clientGateway = new FabricOdapGateway(clientGatewayOptions);\n  const serverGateway = new BesuOdapGateway(serverGatewayOptions);\n```\n\nNote that these gateways are extensions of the [default ODAP Gateway class](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-odap-gateway.ts), that implements the gateway functionality. Each of these extensions implements ledger-specific operations.\n\n## Contributing\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md \"CONTIRBUTING.md\") to get started.\n\n## License\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE \"LICENSE \")file.\n","engines":{"npm":">=6","node":">=10"},"gitHead":"50f45779e3ad1198123b24bd2013c7eb24fb2ff2","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","generate-sdk:kotlin":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected","generate-sdk:typescript-axios":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cacti.git","type":"git"},"_npmVersion":"lerna/2.6.0/node@v20.9.0+x64 (linux)","description":"Proof of concept of ODAP","directories":{},"_nodeVersion":"20.9.0","dependencies":{"knex":"2.4.0","uuid":"9.0.1","web3":"1.6.1","axios":"1.5.1","sqlite3":"5.1.5","fs-extra":"11.1.1","crypto-js":"4.2.0","secp256k1":"4.0.3","socket.io":"4.5.4","web3-utils":"1.6.1","typescript-optional":"2.0.1","@hyperledger/cactus-core":"^2.0.0-dev.94+50f45779e","@hyperledger/cactus-common":"^2.0.0-dev.94+50f45779e","@hyperledger/cactus-core-api":"^2.0.0-dev.94+50f45779e","@hyperledger/cactus-test-tooling":"^2.0.0-dev.94+50f45779e","@hyperledger/cactus-cmd-api-server":"^2.0.0-dev.94+50f45779e","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-dev.94+50f45779e","@hyperledger/cactus-plugin-object-store-ipfs":"^2.0.0-dev.94+50f45779e","@hyperledger/cactus-plugin-ledger-connector-besu":"^2.0.0-dev.94+50f45779e","@hyperledger/cactus-plugin-ledger-connector-fabric":"^2.0.0-dev.94+50f45779e"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"express":"4.18.2","typescript":"4.9.5","@types/tape":"4.13.4","@types/uuid":"9.0.6","body-parser":"1.20.2","@types/express":"4.17.19","fabric-network":"2.2.19","@types/fs-extra":"11.0.3","kubo-rpc-client":"3.0.1","@types/crypto-js":"4.0.1","@types/body-parser":"1.19.4"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_2.0.0-dev.94_1700110371784_0.7541981328289356","host":"s3://npm-registry-packages"}},"2.0.0-main.91":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"2.0.0-main.91","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"author":{"url":"https://www.hyperledger.org/use/cacti","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@2.0.0-main.91","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"dd792064c9908988cec6e57366221c4f5fd60afb","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-2.0.0-main.91.tgz","fileCount":141,"integrity":"sha512-dfbKyJEiMzy0vVGSRcYQspE6cutfLBAFWb8YbAIzgT4fCeyIuS9QC6OyrXPbH8RHx+e2Pe3Q4goOkcWJiwJYoA==","signatures":[{"sig":"MEYCIQCAXHvcZbuIe+ZRHc1UNnpawzoUoSGOHrqT6xlU+mehIwIhAIemUScn8lfE0ZxIeRG4dx6wSyachi/mEqAs3epeR5iF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1602180},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","readme":"# @hyperledger/cactus-plugin-odap-hermes\nThe package provides `Cactus` a way to standardize cross-chain transactions between two ledgers (Fabric and Besu in this implementation). Using this we can perform:\n- A unidirectional atomic asset transfer between 2 parties in different ledgers.\n- Lock of the asset in the source ledger and proof is sent to the counterparty.\n- Extinguishment of the asset in the source blockchain and regeneration of the asset in the recipient blockchain.\n\nAt the moment, we assume a crash-fault environment under some assumptions detailed in section [Assumptions](#assumptions)\n## Summary\n\n  - [Assumptions](#assumptions)\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Use Case](#use-case)\n  - [Running the tests](#running-the-tests)\n  - [Usage](#usage)\n\n\n## Assumptions\nRegarding the crash recovery procedure in place, at the moment we only support crashes of gateways under certain assumptions detailed as follows:\n  - Gateways crash only after receiving a message (and before sending the next one)\n  - Gateways crash only after logging to the Log Storage the previously received message\n  - Gateways never loose their long term keys\n  - Gateways do not have byzantine behavior\n  - Gateways are assumed to always recover from a crash\n\n## Getting Started\n\nClone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on\nyour local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project to install the dependencies execute the command:\n```sh\nnpm run configure\n```\n\nKnow how to use the following plugins of the project:\n\n  - [cactus-plugin-ledger-connector-fabric](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-fabric)\n  - [cactus-plugin-ledger-connector-besu](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-besu)\n  - [cactus-plugin-object-store-ipfs](https://github.com/hyperledger/cactus/tree/main/extensions/cactus-plugin-object-store-ipfs)\n\n## Architecture\n\n### Entities\nFirstly let us identify the different entities involved in the protocol and what is their function:\n- Two gateways in each side of the protocol: they implement endpoints to exchange the messages defined in the protocol.\n- Ledgers connectors in each side (each connected to a different gateway): they expose the API so that gateways can interact the respective ledgers (e.g., locking, deleting and creating assets).\n- SQLite3 database: persistent log and proofs storage in each gateway.\n- IPFS connector: is exposed the API so that both gateways have access to the same structure. This is used to store the hashes and signatures of the logs and proofs, so that accountability is guaranteed.\n\nThe sequence diagram of ODAP is pictured below.\n\n![odap-sequence-diagram](https://i.imgur.com/SOdXFEt.png)\n\n### API Endpoints\nThis plugin uses OpenAPI to generate the API paths.\nThere are Client and Server Endpoints for each type of message detailed in the ODAP protocol:\n\n  - TransferInitializationV1Request\n  - TransferInitializationV1Response\n  - TransferCommenceV1Request\n  - TransferCommenceV1Response\n  - LockEvidenceV1Request\n  - LockEvidenceV1Response\n  - CommitPreparationV1Request\n  - CommitPreparationV1Response\n  - CommitFinalV1Request\n  - CommitFinalV1Response\n  - TransferCompleteV1Request\n  - ClientV1Request\n\nThere are also defined the endpoints for the crash recovery procedure (there is still missing the endpoint to receive the Rollback mesage):\n  - RecoverV1Message\n  - RecoverUpdateV1Message\n  - RecoverUpdateAckV1Message\n  - RecoverSuccessV1Message\n  - RollbackV1Message\n\n## Use case\nAlice and Bob, in blockchains A and B, respectively, want to make a transfer of an asset from one to the other. Gateway A represents the gateway connected to Alice's blockchain. Gateway B represents the gateway connected to Bob's blockchain. Alice and Bob will run ODAP, which will execute the transfer of the asset from blockchain A to blockchain B. The above endpoints will be called in sequence. Notice that the asset will first be locked on blockchain A and a proof is sent to the server-side. Afterward, the asset on the original blockchain is extinguished, followed by its regeneration on blockchain B.\n\n## Running the tests\n\n[A test of the entire protocol with manual calls to the methods, i.e. without ledger connectors and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts)\n\n[A test of the entire protocol using Open API but with no ledger connectors.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts)\n\n[A test of the entire protocol with ledger connectors (Fabric and Besu) and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts)\n\n[A test with a simulated crash of the client gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts)\n\n[A test with a simulated crash of the client gateway after the lock of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts)\n\n[A test with a simulated crash of the client gateway after the deletion of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the creation of the the asset in the recipient blockchain (Besu).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts)\n\n[A test with a rollback after a timeout (client crashed).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts)\n\n[A test with a backup gateway resuming the protocol after the client gateway crashed.](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts)\n\nFor developers that want to test separate steps/phases of the ODAP protocol, please refer to [these](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/) test files (client and server side along with the recovery procedure).\n\n## Usage\n\nLet us consider two gateways. The client gateway connected to Hyperledger Fabric and the server gateway connected to Hyperledger Besu. Let us also consider:\n\n  - A Hyperledger Fabric API client on URL: http://localhost:8045\n  - A Hyperledger Besu API client on URL: http://localhost:8046\n  - An IPFS API client on URL: http://localhost:8047\n  - The local databases configuration provided in the file [knex.config.ts](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/test/typescript/knex.config.ts)\n\nThen the ODAP gateways should be created as follows:\n\n```typescript\nconst clientGatewayOptions: IFabricOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#clientOdapGateway\",\n  dltIDs: [\"DLT2\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  fabricPath: \"http://localhost:8045\",\n  fabricSigningCredential: fabricSigningCredential,\n  fabricChannelName: fabricChannelName,\n  fabricContractName: fabricContractName,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n\nconst serverGatewayOptions: IBesuOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#serverOdapGateway\",\n  dltIDs: [\"DLT1\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  besuPath: \"http://localhost:8046\",\n  besuWeb3SigningCredential: besuWeb3SigningCredential,\n  besuContractName: besuContractName,\n  besuKeychainId: besuKeychainId,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n   \n  const clientGateway = new FabricOdapGateway(clientGatewayOptions);\n  const serverGateway = new BesuOdapGateway(serverGatewayOptions);\n```\n\nNote that these gateways are extensions of the [default ODAP Gateway class](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-odap-gateway.ts), that implements the gateway functionality. Each of these extensions implements ledger-specific operations.\n\n## Contributing\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md \"CONTIRBUTING.md\") to get started.\n\n## License\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE \"LICENSE \")file.\n","engines":{"npm":">=6","node":">=10"},"gitHead":"89d9b93b7380477c10d8da78fcd259c95b495fa9","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","generate-sdk:kotlin":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected","generate-sdk:typescript-axios":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cacti.git","type":"git"},"_npmVersion":"lerna/2.5.1/node@v20.9.0+x64 (linux)","description":"Proof of concept of ODAP","directories":{},"_nodeVersion":"20.9.0","dependencies":{"knex":"2.4.0","uuid":"9.0.1","web3":"1.6.1","axios":"1.5.1","sqlite3":"5.1.5","fs-extra":"11.1.1","crypto-js":"4.2.0","secp256k1":"4.0.3","socket.io":"4.5.4","web3-utils":"1.6.1","typescript-optional":"2.0.1","@hyperledger/cactus-core":"^2.0.0-main.91+89d9b93b7","@hyperledger/cactus-common":"^2.0.0-main.91+89d9b93b7","@hyperledger/cactus-core-api":"^2.0.0-main.91+89d9b93b7","@hyperledger/cactus-test-tooling":"^2.0.0-main.91+89d9b93b7","@hyperledger/cactus-cmd-api-server":"^2.0.0-main.91+89d9b93b7","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-main.91+89d9b93b7","@hyperledger/cactus-plugin-object-store-ipfs":"^2.0.0-main.91+89d9b93b7","@hyperledger/cactus-plugin-ledger-connector-besu":"^2.0.0-main.91+89d9b93b7","@hyperledger/cactus-plugin-ledger-connector-fabric":"^2.0.0-main.91+89d9b93b7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"express":"4.18.2","typescript":"4.9.5","@types/tape":"4.13.4","@types/uuid":"9.0.6","body-parser":"1.20.2","@types/express":"4.17.19","fabric-network":"2.2.19","@types/fs-extra":"11.0.3","kubo-rpc-client":"3.0.1","@types/crypto-js":"4.0.1","@types/body-parser":"1.19.4"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_2.0.0-main.91_1700111010741_0.889246185859772","host":"s3://npm-registry-packages"}},"2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"author":{"url":"https://www.hyperledger.org/use/cacti","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"d8155a356dab2ecd9cb18167cb7f2d9ff773972b","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126.tgz","fileCount":141,"integrity":"sha512-lqHJTTEInw7hK1yFxm8+ss4M1PZ1yXZvBUVpy6rvtSmzQZmw1zqKerbnhvvyqz63UOcpqX4XcF3Il9DhXyY2Og==","signatures":[{"sig":"MEUCICAo+aue+w4uMWbmomSn+905hS3BGcMNzovjg4c5CBqpAiEAvYNhWjEjgRcVCnwPLTnYkkhb+x6NNfgw7vCDkhiTCNg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1603134},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","readme":"# @hyperledger/cactus-plugin-odap-hermes\nThe package provides `Cactus` a way to standardize cross-chain transactions between two ledgers (Fabric and Besu in this implementation). Using this we can perform:\n- A unidirectional atomic asset transfer between 2 parties in different ledgers.\n- Lock of the asset in the source ledger and proof is sent to the counterparty.\n- Extinguishment of the asset in the source blockchain and regeneration of the asset in the recipient blockchain.\n\nAt the moment, we assume a crash-fault environment under some assumptions detailed in section [Assumptions](#assumptions)\n## Summary\n\n  - [Assumptions](#assumptions)\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Use Case](#use-case)\n  - [Running the tests](#running-the-tests)\n  - [Usage](#usage)\n\n\n## Assumptions\nRegarding the crash recovery procedure in place, at the moment we only support crashes of gateways under certain assumptions detailed as follows:\n  - Gateways crash only after receiving a message (and before sending the next one)\n  - Gateways crash only after logging to the Log Storage the previously received message\n  - Gateways never loose their long term keys\n  - Gateways do not have byzantine behavior\n  - Gateways are assumed to always recover from a crash\n\n## Getting Started\n\nClone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on\nyour local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project to install the dependencies execute the command:\n```sh\nnpm run configure\n```\n\nKnow how to use the following plugins of the project:\n\n  - [cactus-plugin-ledger-connector-fabric](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-fabric)\n  - [cactus-plugin-ledger-connector-besu](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-besu)\n  - [cactus-plugin-object-store-ipfs](https://github.com/hyperledger/cactus/tree/main/extensions/cactus-plugin-object-store-ipfs)\n\n## Architecture\n\n### Entities\nFirstly let us identify the different entities involved in the protocol and what is their function:\n- Two gateways in each side of the protocol: they implement endpoints to exchange the messages defined in the protocol.\n- Ledgers connectors in each side (each connected to a different gateway): they expose the API so that gateways can interact the respective ledgers (e.g., locking, deleting and creating assets).\n- SQLite3 database: persistent log and proofs storage in each gateway.\n- IPFS connector: is exposed the API so that both gateways have access to the same structure. This is used to store the hashes and signatures of the logs and proofs, so that accountability is guaranteed.\n\nThe sequence diagram of ODAP is pictured below.\n\n![odap-sequence-diagram](https://i.imgur.com/SOdXFEt.png)\n\n### API Endpoints\nThis plugin uses OpenAPI to generate the API paths.\nThere are Client and Server Endpoints for each type of message detailed in the ODAP protocol:\n\n  - TransferInitializationV1Request\n  - TransferInitializationV1Response\n  - TransferCommenceV1Request\n  - TransferCommenceV1Response\n  - LockEvidenceV1Request\n  - LockEvidenceV1Response\n  - CommitPreparationV1Request\n  - CommitPreparationV1Response\n  - CommitFinalV1Request\n  - CommitFinalV1Response\n  - TransferCompleteV1Request\n  - ClientV1Request\n\nThere are also defined the endpoints for the crash recovery procedure (there is still missing the endpoint to receive the Rollback mesage):\n  - RecoverV1Message\n  - RecoverUpdateV1Message\n  - RecoverUpdateAckV1Message\n  - RecoverSuccessV1Message\n  - RollbackV1Message\n\n## Use case\nAlice and Bob, in blockchains A and B, respectively, want to make a transfer of an asset from one to the other. Gateway A represents the gateway connected to Alice's blockchain. Gateway B represents the gateway connected to Bob's blockchain. Alice and Bob will run ODAP, which will execute the transfer of the asset from blockchain A to blockchain B. The above endpoints will be called in sequence. Notice that the asset will first be locked on blockchain A and a proof is sent to the server-side. Afterward, the asset on the original blockchain is extinguished, followed by its regeneration on blockchain B.\n\n## Running the tests\n\n[A test of the entire protocol with manual calls to the methods, i.e. without ledger connectors and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts)\n\n[A test of the entire protocol using Open API but with no ledger connectors.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts)\n\n[A test of the entire protocol with ledger connectors (Fabric and Besu) and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts)\n\n[A test with a simulated crash of the client gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts)\n\n[A test with a simulated crash of the client gateway after the lock of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts)\n\n[A test with a simulated crash of the client gateway after the deletion of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the creation of the the asset in the recipient blockchain (Besu).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts)\n\n[A test with a rollback after a timeout (client crashed).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts)\n\n[A test with a backup gateway resuming the protocol after the client gateway crashed.](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts)\n\nFor developers that want to test separate steps/phases of the ODAP protocol, please refer to [these](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/) test files (client and server side along with the recovery procedure).\n\n## Usage\n\nLet us consider two gateways. The client gateway connected to Hyperledger Fabric and the server gateway connected to Hyperledger Besu. Let us also consider:\n\n  - A Hyperledger Fabric API client on URL: http://localhost:8045\n  - A Hyperledger Besu API client on URL: http://localhost:8046\n  - An IPFS API client on URL: http://localhost:8047\n  - The local databases configuration provided in the file [knex.config.ts](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/test/typescript/knex.config.ts)\n\nThen the ODAP gateways should be created as follows:\n\n```typescript\nconst clientGatewayOptions: IFabricOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#clientOdapGateway\",\n  dltIDs: [\"DLT2\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  fabricPath: \"http://localhost:8045\",\n  fabricSigningCredential: fabricSigningCredential,\n  fabricChannelName: fabricChannelName,\n  fabricContractName: fabricContractName,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n\nconst serverGatewayOptions: IBesuOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#serverOdapGateway\",\n  dltIDs: [\"DLT1\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  besuPath: \"http://localhost:8046\",\n  besuWeb3SigningCredential: besuWeb3SigningCredential,\n  besuContractName: besuContractName,\n  besuKeychainId: besuKeychainId,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n   \n  const clientGateway = new FabricOdapGateway(clientGatewayOptions);\n  const serverGateway = new BesuOdapGateway(serverGatewayOptions);\n```\n\nNote that these gateways are extensions of the [default ODAP Gateway class](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-odap-gateway.ts), that implements the gateway functionality. Each of these extensions implements ledger-specific operations.\n\n## Contributing\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md \"CONTIRBUTING.md\") to get started.\n\n## License\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE \"LICENSE \")file.\n","engines":{"npm":">=6","node":">=10"},"gitHead":"dae98b30c3e825e8a63f9ed5d09bc7d67c451890","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","generate-sdk:kotlin":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore","generate-sdk:typescript-axios":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cacti.git","type":"git"},"_npmVersion":"lerna/3.1.0/node@v20.9.0+x64 (linux)","description":"Proof of concept of ODAP","directories":{},"_nodeVersion":"20.9.0","dependencies":{"knex":"2.4.0","uuid":"9.0.1","web3":"1.6.1","axios":"1.6.0","sqlite3":"5.1.5","fs-extra":"11.1.1","crypto-js":"4.2.0","secp256k1":"4.0.3","socket.io":"4.5.4","web3-utils":"1.6.1","typescript-optional":"2.0.1","@hyperledger/cactus-core":"^2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126+dae98b30c","@hyperledger/cactus-common":"^2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126+dae98b30c","@hyperledger/cactus-core-api":"^2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126+dae98b30c","@hyperledger/cactus-test-tooling":"^2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126+dae98b30c","@hyperledger/cactus-cmd-api-server":"^2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126+dae98b30c","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126+dae98b30c","@hyperledger/cactus-plugin-object-store-ipfs":"^2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126+dae98b30c","@hyperledger/cactus-plugin-ledger-connector-besu":"^2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126+dae98b30c","@hyperledger/cactus-plugin-ledger-connector-fabric":"^2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126+dae98b30c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"express":"4.18.2","typescript":"4.9.5","@types/tape":"4.13.4","@types/uuid":"9.0.6","body-parser":"1.20.2","@types/express":"4.17.19","fabric-network":"2.2.19","@types/fs-extra":"11.0.3","kubo-rpc-client":"3.0.1","@types/crypto-js":"4.0.1","@types/body-parser":"1.19.4"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126_1702001052790_0.008171954513115587","host":"s3://npm-registry-packages"}},"2.0.0-main.159":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"2.0.0-main.159","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"author":{"url":"https://www.hyperledger.org/use/cacti","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@2.0.0-main.159","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"ccd000b665535b0ea6f4393f5722e78487988462","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-2.0.0-main.159.tgz","fileCount":141,"integrity":"sha512-UpEfWJz04etwS5ysiM3VDMXl5jXAySUEN0zn8FUKIoADCXsBfYmGhJCTmLuzwwJVD64wGVdiTcxcC3369nMIEg==","signatures":[{"sig":"MEYCIQDJrx21BjOsIZu+z1a4cMOZWItW/4G9to0v5wgQ5M0swwIhALnZyvp3g76j3BVlMJq31kt2SD0mhKLmqZjTgh4RoaAA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1602674},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","readme":"# @hyperledger/cactus-plugin-odap-hermes\nThe package provides `Cactus` a way to standardize cross-chain transactions between two ledgers (Fabric and Besu in this implementation). Using this we can perform:\n- A unidirectional atomic asset transfer between 2 parties in different ledgers.\n- Lock of the asset in the source ledger and proof is sent to the counterparty.\n- Extinguishment of the asset in the source blockchain and regeneration of the asset in the recipient blockchain.\n\nAt the moment, we assume a crash-fault environment under some assumptions detailed in section [Assumptions](#assumptions)\n## Summary\n\n  - [Assumptions](#assumptions)\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Use Case](#use-case)\n  - [Running the tests](#running-the-tests)\n  - [Usage](#usage)\n\n\n## Assumptions\nRegarding the crash recovery procedure in place, at the moment we only support crashes of gateways under certain assumptions detailed as follows:\n  - Gateways crash only after receiving a message (and before sending the next one)\n  - Gateways crash only after logging to the Log Storage the previously received message\n  - Gateways never loose their long term keys\n  - Gateways do not have byzantine behavior\n  - Gateways are assumed to always recover from a crash\n\n## Getting Started\n\nClone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on\nyour local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project to install the dependencies execute the command:\n```sh\nnpm run configure\n```\n\nKnow how to use the following plugins of the project:\n\n  - [cactus-plugin-ledger-connector-fabric](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-fabric)\n  - [cactus-plugin-ledger-connector-besu](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-besu)\n  - [cactus-plugin-object-store-ipfs](https://github.com/hyperledger/cactus/tree/main/extensions/cactus-plugin-object-store-ipfs)\n\n## Architecture\n\n### Entities\nFirstly let us identify the different entities involved in the protocol and what is their function:\n- Two gateways in each side of the protocol: they implement endpoints to exchange the messages defined in the protocol.\n- Ledgers connectors in each side (each connected to a different gateway): they expose the API so that gateways can interact the respective ledgers (e.g., locking, deleting and creating assets).\n- SQLite3 database: persistent log and proofs storage in each gateway.\n- IPFS connector: is exposed the API so that both gateways have access to the same structure. This is used to store the hashes and signatures of the logs and proofs, so that accountability is guaranteed.\n\nThe sequence diagram of ODAP is pictured below.\n\n![odap-sequence-diagram](https://i.imgur.com/SOdXFEt.png)\n\n### API Endpoints\nThis plugin uses OpenAPI to generate the API paths.\nThere are Client and Server Endpoints for each type of message detailed in the ODAP protocol:\n\n  - TransferInitializationV1Request\n  - TransferInitializationV1Response\n  - TransferCommenceV1Request\n  - TransferCommenceV1Response\n  - LockEvidenceV1Request\n  - LockEvidenceV1Response\n  - CommitPreparationV1Request\n  - CommitPreparationV1Response\n  - CommitFinalV1Request\n  - CommitFinalV1Response\n  - TransferCompleteV1Request\n  - ClientV1Request\n\nThere are also defined the endpoints for the crash recovery procedure (there is still missing the endpoint to receive the Rollback mesage):\n  - RecoverV1Message\n  - RecoverUpdateV1Message\n  - RecoverUpdateAckV1Message\n  - RecoverSuccessV1Message\n  - RollbackV1Message\n\n## Use case\nAlice and Bob, in blockchains A and B, respectively, want to make a transfer of an asset from one to the other. Gateway A represents the gateway connected to Alice's blockchain. Gateway B represents the gateway connected to Bob's blockchain. Alice and Bob will run ODAP, which will execute the transfer of the asset from blockchain A to blockchain B. The above endpoints will be called in sequence. Notice that the asset will first be locked on blockchain A and a proof is sent to the server-side. Afterward, the asset on the original blockchain is extinguished, followed by its regeneration on blockchain B.\n\n## Running the tests\n\n[A test of the entire protocol with manual calls to the methods, i.e. without ledger connectors and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts)\n\n[A test of the entire protocol using Open API but with no ledger connectors.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts)\n\n[A test of the entire protocol with ledger connectors (Fabric and Besu) and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts)\n\n[A test with a simulated crash of the client gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts)\n\n[A test with a simulated crash of the client gateway after the lock of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts)\n\n[A test with a simulated crash of the client gateway after the deletion of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the creation of the the asset in the recipient blockchain (Besu).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts)\n\n[A test with a rollback after a timeout (client crashed).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts)\n\n[A test with a backup gateway resuming the protocol after the client gateway crashed.](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts)\n\nFor developers that want to test separate steps/phases of the ODAP protocol, please refer to [these](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/) test files (client and server side along with the recovery procedure).\n\n## Usage\n\nLet us consider two gateways. The client gateway connected to Hyperledger Fabric and the server gateway connected to Hyperledger Besu. Let us also consider:\n\n  - A Hyperledger Fabric API client on URL: http://localhost:8045\n  - A Hyperledger Besu API client on URL: http://localhost:8046\n  - An IPFS API client on URL: http://localhost:8047\n  - The local databases configuration provided in the file [knex.config.ts](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/test/typescript/knex.config.ts)\n\nThen the ODAP gateways should be created as follows:\n\n```typescript\nconst clientGatewayOptions: IFabricOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#clientOdapGateway\",\n  dltIDs: [\"DLT2\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  fabricPath: \"http://localhost:8045\",\n  fabricSigningCredential: fabricSigningCredential,\n  fabricChannelName: fabricChannelName,\n  fabricContractName: fabricContractName,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n\nconst serverGatewayOptions: IBesuOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#serverOdapGateway\",\n  dltIDs: [\"DLT1\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  besuPath: \"http://localhost:8046\",\n  besuWeb3SigningCredential: besuWeb3SigningCredential,\n  besuContractName: besuContractName,\n  besuKeychainId: besuKeychainId,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n   \n  const clientGateway = new FabricOdapGateway(clientGatewayOptions);\n  const serverGateway = new BesuOdapGateway(serverGatewayOptions);\n```\n\nNote that these gateways are extensions of the [default ODAP Gateway class](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-odap-gateway.ts), that implements the gateway functionality. Each of these extensions implements ledger-specific operations.\n\n## Contributing\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md \"CONTIRBUTING.md\") to get started.\n\n## License\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE \"LICENSE \")file.\n","engines":{"npm":">=8","node":">=18"},"gitHead":"1fb2551a055daf202d2def0fcb3de990a44cfb03","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","generate-sdk:kotlin":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore","generate-sdk:typescript-axios":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cacti.git","type":"git"},"_npmVersion":"lerna/3.1.0/node@v20.10.0+x64 (linux)","description":"Proof of concept of ODAP","directories":{},"_nodeVersion":"20.10.0","dependencies":{"knex":"2.4.0","uuid":"9.0.1","web3":"1.6.1","axios":"1.6.0","sqlite3":"5.1.5","fs-extra":"11.1.1","crypto-js":"4.2.0","secp256k1":"4.0.3","socket.io":"4.5.4","web3-utils":"1.6.1","typescript-optional":"2.0.1","@hyperledger/cactus-core":"^2.0.0-main.159+1fb2551a0","@hyperledger/cactus-common":"^2.0.0-main.159+1fb2551a0","@hyperledger/cactus-core-api":"^2.0.0-main.159+1fb2551a0","@hyperledger/cactus-test-tooling":"^2.0.0-main.159+1fb2551a0","@hyperledger/cactus-cmd-api-server":"^2.0.0-main.159+1fb2551a0","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-main.159+1fb2551a0","@hyperledger/cactus-plugin-object-store-ipfs":"^2.0.0-main.159+1fb2551a0","@hyperledger/cactus-plugin-ledger-connector-besu":"^2.0.0-main.159+1fb2551a0","@hyperledger/cactus-plugin-ledger-connector-fabric":"^2.0.0-main.159+1fb2551a0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"express":"4.18.2","typescript":"4.9.5","@types/tape":"4.13.4","@types/uuid":"9.0.6","body-parser":"1.20.2","@types/express":"4.17.19","fabric-network":"2.2.19","@types/fs-extra":"11.0.3","kubo-rpc-client":"3.0.1","@types/crypto-js":"4.0.1","@types/body-parser":"1.19.4"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_2.0.0-main.159_1704759662203_0.3739621311663417","host":"s3://npm-registry-packages"}},"2.0.0-lfx-connector.163":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"2.0.0-lfx-connector.163","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"author":{"url":"https://www.hyperledger.org/use/cacti","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@2.0.0-lfx-connector.163","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"b8f744743f8e8afada537dddf7d91249a2bc9728","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-2.0.0-lfx-connector.163.tgz","fileCount":141,"integrity":"sha512-FS8zFJMLrhjDSty2wKnOLrT2k8PgxvdPN4Q1IVb/Dpuf5eRklMROFiNu5Z2mZAZfrm1EW2BiOkw84V+6smvzLQ==","signatures":[{"sig":"MEUCIQCq/6bGdcBfXnAfoOkEnIRRlEAIG9e0Kkev789AW935bgIgUnT2Nv0owHYhzFJ4AvBfJuPDFrv993GdWWnKkNutviA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1602764},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","readme":"# @hyperledger/cactus-plugin-odap-hermes\nThe package provides `Cactus` a way to standardize cross-chain transactions between two ledgers (Fabric and Besu in this implementation). Using this we can perform:\n- A unidirectional atomic asset transfer between 2 parties in different ledgers.\n- Lock of the asset in the source ledger and proof is sent to the counterparty.\n- Extinguishment of the asset in the source blockchain and regeneration of the asset in the recipient blockchain.\n\nAt the moment, we assume a crash-fault environment under some assumptions detailed in section [Assumptions](#assumptions)\n## Summary\n\n  - [Assumptions](#assumptions)\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Use Case](#use-case)\n  - [Running the tests](#running-the-tests)\n  - [Usage](#usage)\n\n\n## Assumptions\nRegarding the crash recovery procedure in place, at the moment we only support crashes of gateways under certain assumptions detailed as follows:\n  - Gateways crash only after receiving a message (and before sending the next one)\n  - Gateways crash only after logging to the Log Storage the previously received message\n  - Gateways never loose their long term keys\n  - Gateways do not have byzantine behavior\n  - Gateways are assumed to always recover from a crash\n\n## Getting Started\n\nClone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on\nyour local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project to install the dependencies execute the command:\n```sh\nnpm run configure\n```\n\nKnow how to use the following plugins of the project:\n\n  - [cactus-plugin-ledger-connector-fabric](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-fabric)\n  - [cactus-plugin-ledger-connector-besu](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-besu)\n  - [cactus-plugin-object-store-ipfs](https://github.com/hyperledger/cactus/tree/main/extensions/cactus-plugin-object-store-ipfs)\n\n## Architecture\n\n### Entities\nFirstly let us identify the different entities involved in the protocol and what is their function:\n- Two gateways in each side of the protocol: they implement endpoints to exchange the messages defined in the protocol.\n- Ledgers connectors in each side (each connected to a different gateway): they expose the API so that gateways can interact the respective ledgers (e.g., locking, deleting and creating assets).\n- SQLite3 database: persistent log and proofs storage in each gateway.\n- IPFS connector: is exposed the API so that both gateways have access to the same structure. This is used to store the hashes and signatures of the logs and proofs, so that accountability is guaranteed.\n\nThe sequence diagram of ODAP is pictured below.\n\n![odap-sequence-diagram](https://i.imgur.com/SOdXFEt.png)\n\n### API Endpoints\nThis plugin uses OpenAPI to generate the API paths.\nThere are Client and Server Endpoints for each type of message detailed in the ODAP protocol:\n\n  - TransferInitializationV1Request\n  - TransferInitializationV1Response\n  - TransferCommenceV1Request\n  - TransferCommenceV1Response\n  - LockEvidenceV1Request\n  - LockEvidenceV1Response\n  - CommitPreparationV1Request\n  - CommitPreparationV1Response\n  - CommitFinalV1Request\n  - CommitFinalV1Response\n  - TransferCompleteV1Request\n  - ClientV1Request\n\nThere are also defined the endpoints for the crash recovery procedure (there is still missing the endpoint to receive the Rollback mesage):\n  - RecoverV1Message\n  - RecoverUpdateV1Message\n  - RecoverUpdateAckV1Message\n  - RecoverSuccessV1Message\n  - RollbackV1Message\n\n## Use case\nAlice and Bob, in blockchains A and B, respectively, want to make a transfer of an asset from one to the other. Gateway A represents the gateway connected to Alice's blockchain. Gateway B represents the gateway connected to Bob's blockchain. Alice and Bob will run ODAP, which will execute the transfer of the asset from blockchain A to blockchain B. The above endpoints will be called in sequence. Notice that the asset will first be locked on blockchain A and a proof is sent to the server-side. Afterward, the asset on the original blockchain is extinguished, followed by its regeneration on blockchain B.\n\n## Running the tests\n\n[A test of the entire protocol with manual calls to the methods, i.e. without ledger connectors and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts)\n\n[A test of the entire protocol using Open API but with no ledger connectors.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts)\n\n[A test of the entire protocol with ledger connectors (Fabric and Besu) and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts)\n\n[A test with a simulated crash of the client gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts)\n\n[A test with a simulated crash of the client gateway after the lock of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts)\n\n[A test with a simulated crash of the client gateway after the deletion of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the creation of the the asset in the recipient blockchain (Besu).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts)\n\n[A test with a rollback after a timeout (client crashed).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts)\n\n[A test with a backup gateway resuming the protocol after the client gateway crashed.](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts)\n\nFor developers that want to test separate steps/phases of the ODAP protocol, please refer to [these](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/) test files (client and server side along with the recovery procedure).\n\n## Usage\n\nLet us consider two gateways. The client gateway connected to Hyperledger Fabric and the server gateway connected to Hyperledger Besu. Let us also consider:\n\n  - A Hyperledger Fabric API client on URL: http://localhost:8045\n  - A Hyperledger Besu API client on URL: http://localhost:8046\n  - An IPFS API client on URL: http://localhost:8047\n  - The local databases configuration provided in the file [knex.config.ts](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/test/typescript/knex.config.ts)\n\nThen the ODAP gateways should be created as follows:\n\n```typescript\nconst clientGatewayOptions: IFabricOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#clientOdapGateway\",\n  dltIDs: [\"DLT2\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  fabricPath: \"http://localhost:8045\",\n  fabricSigningCredential: fabricSigningCredential,\n  fabricChannelName: fabricChannelName,\n  fabricContractName: fabricContractName,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n\nconst serverGatewayOptions: IBesuOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#serverOdapGateway\",\n  dltIDs: [\"DLT1\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  besuPath: \"http://localhost:8046\",\n  besuWeb3SigningCredential: besuWeb3SigningCredential,\n  besuContractName: besuContractName,\n  besuKeychainId: besuKeychainId,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n   \n  const clientGateway = new FabricOdapGateway(clientGatewayOptions);\n  const serverGateway = new BesuOdapGateway(serverGatewayOptions);\n```\n\nNote that these gateways are extensions of the [default ODAP Gateway class](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-odap-gateway.ts), that implements the gateway functionality. Each of these extensions implements ledger-specific operations.\n\n## Contributing\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md \"CONTIRBUTING.md\") to get started.\n\n## License\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE \"LICENSE \")file.\n","engines":{"npm":">=8","node":">=18"},"gitHead":"f7e7a2a1cd9694327e4d323650bd3fad9b3b80dd","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","generate-sdk:kotlin":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore","generate-sdk:typescript-axios":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cacti.git","type":"git"},"_npmVersion":"lerna/3.1.0/node@v18.16.0+x64 (linux)","description":"Proof of concept of ODAP","directories":{},"_nodeVersion":"18.16.0","dependencies":{"knex":"2.4.0","uuid":"9.0.1","web3":"1.6.1","axios":"1.6.0","sqlite3":"5.1.5","fs-extra":"11.1.1","crypto-js":"4.2.0","secp256k1":"4.0.3","socket.io":"4.5.4","web3-utils":"1.6.1","typescript-optional":"2.0.1","@hyperledger/cactus-core":"^2.0.0-lfx-connector.163+f7e7a2a1c","@hyperledger/cactus-common":"^2.0.0-lfx-connector.163+f7e7a2a1c","@hyperledger/cactus-core-api":"^2.0.0-lfx-connector.163+f7e7a2a1c","@hyperledger/cactus-test-tooling":"^2.0.0-lfx-connector.163+f7e7a2a1c","@hyperledger/cactus-cmd-api-server":"^2.0.0-lfx-connector.163+f7e7a2a1c","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-lfx-connector.163+f7e7a2a1c","@hyperledger/cactus-plugin-object-store-ipfs":"^2.0.0-lfx-connector.163+f7e7a2a1c","@hyperledger/cactus-plugin-ledger-connector-besu":"^2.0.0-lfx-connector.163+f7e7a2a1c","@hyperledger/cactus-plugin-ledger-connector-fabric":"^2.0.0-lfx-connector.163+f7e7a2a1c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"express":"4.18.2","typescript":"4.9.5","@types/tape":"4.13.4","@types/uuid":"9.0.6","body-parser":"1.20.2","@types/express":"4.17.19","fabric-network":"2.2.19","@types/fs-extra":"11.0.3","kubo-rpc-client":"3.0.1","@types/crypto-js":"4.0.1","@types/body-parser":"1.19.4"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_2.0.0-lfx-connector.163_1705430840767_0.9721149617409803","host":"s3://npm-registry-packages"}},"2.0.0-lfx-connector.164":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"2.0.0-lfx-connector.164","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"author":{"url":"https://www.hyperledger.org/use/cacti","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@2.0.0-lfx-connector.164","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"24688aa5a771ef4830d420bde9245359e44e9832","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-2.0.0-lfx-connector.164.tgz","fileCount":141,"integrity":"sha512-r8gLmQYJMDbHNikZQCkeI6gwNA6DcEu2P4H6363ExQu21nJWEutMerhkSd3pC0xuo861sMxMP3mhx/fcJhE9ew==","signatures":[{"sig":"MEQCIFKsB3v1MZyiMsdg5cgfsOMPpYIRAp+f0jq8f9twqeMEAiBC1kOpRQtu9k/N9WhrNcEQhH5VarVm/BK894YL86/M4w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1602764},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","readme":"# @hyperledger/cactus-plugin-odap-hermes\nThe package provides `Cactus` a way to standardize cross-chain transactions between two ledgers (Fabric and Besu in this implementation). Using this we can perform:\n- A unidirectional atomic asset transfer between 2 parties in different ledgers.\n- Lock of the asset in the source ledger and proof is sent to the counterparty.\n- Extinguishment of the asset in the source blockchain and regeneration of the asset in the recipient blockchain.\n\nAt the moment, we assume a crash-fault environment under some assumptions detailed in section [Assumptions](#assumptions)\n## Summary\n\n  - [Assumptions](#assumptions)\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Use Case](#use-case)\n  - [Running the tests](#running-the-tests)\n  - [Usage](#usage)\n\n\n## Assumptions\nRegarding the crash recovery procedure in place, at the moment we only support crashes of gateways under certain assumptions detailed as follows:\n  - Gateways crash only after receiving a message (and before sending the next one)\n  - Gateways crash only after logging to the Log Storage the previously received message\n  - Gateways never loose their long term keys\n  - Gateways do not have byzantine behavior\n  - Gateways are assumed to always recover from a crash\n\n## Getting Started\n\nClone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on\nyour local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project to install the dependencies execute the command:\n```sh\nnpm run configure\n```\n\nKnow how to use the following plugins of the project:\n\n  - [cactus-plugin-ledger-connector-fabric](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-fabric)\n  - [cactus-plugin-ledger-connector-besu](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-besu)\n  - [cactus-plugin-object-store-ipfs](https://github.com/hyperledger/cactus/tree/main/extensions/cactus-plugin-object-store-ipfs)\n\n## Architecture\n\n### Entities\nFirstly let us identify the different entities involved in the protocol and what is their function:\n- Two gateways in each side of the protocol: they implement endpoints to exchange the messages defined in the protocol.\n- Ledgers connectors in each side (each connected to a different gateway): they expose the API so that gateways can interact the respective ledgers (e.g., locking, deleting and creating assets).\n- SQLite3 database: persistent log and proofs storage in each gateway.\n- IPFS connector: is exposed the API so that both gateways have access to the same structure. This is used to store the hashes and signatures of the logs and proofs, so that accountability is guaranteed.\n\nThe sequence diagram of ODAP is pictured below.\n\n![odap-sequence-diagram](https://i.imgur.com/SOdXFEt.png)\n\n### API Endpoints\nThis plugin uses OpenAPI to generate the API paths.\nThere are Client and Server Endpoints for each type of message detailed in the ODAP protocol:\n\n  - TransferInitializationV1Request\n  - TransferInitializationV1Response\n  - TransferCommenceV1Request\n  - TransferCommenceV1Response\n  - LockEvidenceV1Request\n  - LockEvidenceV1Response\n  - CommitPreparationV1Request\n  - CommitPreparationV1Response\n  - CommitFinalV1Request\n  - CommitFinalV1Response\n  - TransferCompleteV1Request\n  - ClientV1Request\n\nThere are also defined the endpoints for the crash recovery procedure (there is still missing the endpoint to receive the Rollback mesage):\n  - RecoverV1Message\n  - RecoverUpdateV1Message\n  - RecoverUpdateAckV1Message\n  - RecoverSuccessV1Message\n  - RollbackV1Message\n\n## Use case\nAlice and Bob, in blockchains A and B, respectively, want to make a transfer of an asset from one to the other. Gateway A represents the gateway connected to Alice's blockchain. Gateway B represents the gateway connected to Bob's blockchain. Alice and Bob will run ODAP, which will execute the transfer of the asset from blockchain A to blockchain B. The above endpoints will be called in sequence. Notice that the asset will first be locked on blockchain A and a proof is sent to the server-side. Afterward, the asset on the original blockchain is extinguished, followed by its regeneration on blockchain B.\n\n## Running the tests\n\n[A test of the entire protocol with manual calls to the methods, i.e. without ledger connectors and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts)\n\n[A test of the entire protocol using Open API but with no ledger connectors.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts)\n\n[A test of the entire protocol with ledger connectors (Fabric and Besu) and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts)\n\n[A test with a simulated crash of the client gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts)\n\n[A test with a simulated crash of the client gateway after the lock of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts)\n\n[A test with a simulated crash of the client gateway after the deletion of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the creation of the the asset in the recipient blockchain (Besu).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts)\n\n[A test with a rollback after a timeout (client crashed).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts)\n\n[A test with a backup gateway resuming the protocol after the client gateway crashed.](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts)\n\nFor developers that want to test separate steps/phases of the ODAP protocol, please refer to [these](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/) test files (client and server side along with the recovery procedure).\n\n## Usage\n\nLet us consider two gateways. The client gateway connected to Hyperledger Fabric and the server gateway connected to Hyperledger Besu. Let us also consider:\n\n  - A Hyperledger Fabric API client on URL: http://localhost:8045\n  - A Hyperledger Besu API client on URL: http://localhost:8046\n  - An IPFS API client on URL: http://localhost:8047\n  - The local databases configuration provided in the file [knex.config.ts](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/test/typescript/knex.config.ts)\n\nThen the ODAP gateways should be created as follows:\n\n```typescript\nconst clientGatewayOptions: IFabricOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#clientOdapGateway\",\n  dltIDs: [\"DLT2\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  fabricPath: \"http://localhost:8045\",\n  fabricSigningCredential: fabricSigningCredential,\n  fabricChannelName: fabricChannelName,\n  fabricContractName: fabricContractName,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n\nconst serverGatewayOptions: IBesuOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#serverOdapGateway\",\n  dltIDs: [\"DLT1\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  besuPath: \"http://localhost:8046\",\n  besuWeb3SigningCredential: besuWeb3SigningCredential,\n  besuContractName: besuContractName,\n  besuKeychainId: besuKeychainId,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n   \n  const clientGateway = new FabricOdapGateway(clientGatewayOptions);\n  const serverGateway = new BesuOdapGateway(serverGatewayOptions);\n```\n\nNote that these gateways are extensions of the [default ODAP Gateway class](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-odap-gateway.ts), that implements the gateway functionality. Each of these extensions implements ledger-specific operations.\n\n## Contributing\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md \"CONTIRBUTING.md\") to get started.\n\n## License\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE \"LICENSE \")file.\n","engines":{"npm":">=8","node":">=18"},"gitHead":"8355399ea266cf10724036d03a914186a4fd6000","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","generate-sdk:kotlin":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore","generate-sdk:typescript-axios":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cacti.git","type":"git"},"_npmVersion":"lerna/3.1.0/node@v18.16.0+x64 (linux)","description":"Proof of concept of ODAP","directories":{},"_nodeVersion":"18.16.0","dependencies":{"knex":"2.4.0","uuid":"9.0.1","web3":"1.6.1","axios":"1.6.0","sqlite3":"5.1.5","fs-extra":"11.1.1","crypto-js":"4.2.0","secp256k1":"4.0.3","socket.io":"4.5.4","web3-utils":"1.6.1","typescript-optional":"2.0.1","@hyperledger/cactus-core":"^2.0.0-lfx-connector.164+8355399ea","@hyperledger/cactus-common":"^2.0.0-lfx-connector.164+8355399ea","@hyperledger/cactus-core-api":"^2.0.0-lfx-connector.164+8355399ea","@hyperledger/cactus-test-tooling":"^2.0.0-lfx-connector.164+8355399ea","@hyperledger/cactus-cmd-api-server":"^2.0.0-lfx-connector.164+8355399ea","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-lfx-connector.164+8355399ea","@hyperledger/cactus-plugin-object-store-ipfs":"^2.0.0-lfx-connector.164+8355399ea","@hyperledger/cactus-plugin-ledger-connector-besu":"^2.0.0-lfx-connector.164+8355399ea","@hyperledger/cactus-plugin-ledger-connector-fabric":"^2.0.0-lfx-connector.164+8355399ea"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"express":"4.18.2","typescript":"4.9.5","@types/tape":"4.13.4","@types/uuid":"9.0.6","body-parser":"1.20.2","@types/express":"4.17.19","fabric-network":"2.2.19","@types/fs-extra":"11.0.3","kubo-rpc-client":"3.0.1","@types/crypto-js":"4.0.1","@types/body-parser":"1.19.4"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_2.0.0-lfx-connector.164_1705431762466_0.07361033089769653","host":"s3://npm-registry-packages"}},"2.0.0-dev.195":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"2.0.0-dev.195","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"author":{"url":"https://www.hyperledger.org/use/cacti","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@2.0.0-dev.195","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"b1a18b2c531fe7d584e3062bd0f1f90cac6d77ed","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-2.0.0-dev.195.tgz","fileCount":141,"integrity":"sha512-xsyMsnFigKBElF5EgUZ6+t0Wwj9a170cuY/lgEOGJaafPcZcyUwhiHxy0lmPsugNcMTJ3HpHUDdbvv29g4Zfwg==","signatures":[{"sig":"MEYCIQCAgdzzPhefupn14+xmBUaxHpBusO5V+vuR+MoUKsRzTwIhALnULbFzkd6tEdYrQnmyyRW8dI1+I2pF4RL41+PF/ZqV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1608843},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","readme":"# @hyperledger/cactus-plugin-odap-hermes\nThe package provides `Cactus` a way to standardize cross-chain transactions between two ledgers (Fabric and Besu in this implementation). Using this we can perform:\n- A unidirectional atomic asset transfer between 2 parties in different ledgers.\n- Lock of the asset in the source ledger and proof is sent to the counterparty.\n- Extinguishment of the asset in the source blockchain and regeneration of the asset in the recipient blockchain.\n\nAt the moment, we assume a crash-fault environment under some assumptions detailed in section [Assumptions](#assumptions)\n## Summary\n\n  - [Assumptions](#assumptions)\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Use Case](#use-case)\n  - [Running the tests](#running-the-tests)\n  - [Usage](#usage)\n\n\n## Assumptions\nRegarding the crash recovery procedure in place, at the moment we only support crashes of gateways under certain assumptions detailed as follows:\n  - Gateways crash only after receiving a message (and before sending the next one)\n  - Gateways crash only after logging to the Log Storage the previously received message\n  - Gateways never loose their long term keys\n  - Gateways do not have byzantine behavior\n  - Gateways are assumed to always recover from a crash\n\n## Getting Started\n\nClone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on\nyour local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project to install the dependencies execute the command:\n```sh\nnpm run configure\n```\n\nKnow how to use the following plugins of the project:\n\n  - [cactus-plugin-ledger-connector-fabric](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-fabric)\n  - [cactus-plugin-ledger-connector-besu](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-besu)\n  - [cactus-plugin-object-store-ipfs](https://github.com/hyperledger/cactus/tree/main/extensions/cactus-plugin-object-store-ipfs)\n\n## Architecture\n\n### Entities\nFirstly let us identify the different entities involved in the protocol and what is their function:\n- Two gateways in each side of the protocol: they implement endpoints to exchange the messages defined in the protocol.\n- Ledgers connectors in each side (each connected to a different gateway): they expose the API so that gateways can interact the respective ledgers (e.g., locking, deleting and creating assets).\n- SQLite3 database: persistent log and proofs storage in each gateway.\n- IPFS connector: is exposed the API so that both gateways have access to the same structure. This is used to store the hashes and signatures of the logs and proofs, so that accountability is guaranteed.\n\nThe sequence diagram of ODAP is pictured below.\n\n![odap-sequence-diagram](https://i.imgur.com/SOdXFEt.png)\n\n### API Endpoints\nThis plugin uses OpenAPI to generate the API paths.\nThere are Client and Server Endpoints for each type of message detailed in the ODAP protocol:\n\n  - TransferInitializationV1Request\n  - TransferInitializationV1Response\n  - TransferCommenceV1Request\n  - TransferCommenceV1Response\n  - LockEvidenceV1Request\n  - LockEvidenceV1Response\n  - CommitPreparationV1Request\n  - CommitPreparationV1Response\n  - CommitFinalV1Request\n  - CommitFinalV1Response\n  - TransferCompleteV1Request\n  - ClientV1Request\n\nThere are also defined the endpoints for the crash recovery procedure (there is still missing the endpoint to receive the Rollback mesage):\n  - RecoverV1Message\n  - RecoverUpdateV1Message\n  - RecoverUpdateAckV1Message\n  - RecoverSuccessV1Message\n  - RollbackV1Message\n\n## Use case\nAlice and Bob, in blockchains A and B, respectively, want to make a transfer of an asset from one to the other. Gateway A represents the gateway connected to Alice's blockchain. Gateway B represents the gateway connected to Bob's blockchain. Alice and Bob will run ODAP, which will execute the transfer of the asset from blockchain A to blockchain B. The above endpoints will be called in sequence. Notice that the asset will first be locked on blockchain A and a proof is sent to the server-side. Afterward, the asset on the original blockchain is extinguished, followed by its regeneration on blockchain B.\n\n## Running the tests\n\n[A test of the entire protocol with manual calls to the methods, i.e. without ledger connectors and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts)\n\n[A test of the entire protocol using Open API but with no ledger connectors.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts)\n\n[A test of the entire protocol with ledger connectors (Fabric and Besu) and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts)\n\n[A test with a simulated crash of the client gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts)\n\n[A test with a simulated crash of the client gateway after the lock of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts)\n\n[A test with a simulated crash of the client gateway after the deletion of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the creation of the the asset in the recipient blockchain (Besu).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts)\n\n[A test with a rollback after a timeout (client crashed).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts)\n\n[A test with a backup gateway resuming the protocol after the client gateway crashed.](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts)\n\nFor developers that want to test separate steps/phases of the ODAP protocol, please refer to [these](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/) test files (client and server side along with the recovery procedure).\n\n## Usage\n\nLet us consider two gateways. The client gateway connected to Hyperledger Fabric and the server gateway connected to Hyperledger Besu. Let us also consider:\n\n  - A Hyperledger Fabric API client on URL: http://localhost:8045\n  - A Hyperledger Besu API client on URL: http://localhost:8046\n  - An IPFS API client on URL: http://localhost:8047\n  - The local databases configuration provided in the file [knex.config.ts](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/test/typescript/knex.config.ts)\n\nThen the ODAP gateways should be created as follows:\n\n```typescript\nconst clientGatewayOptions: IFabricOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#clientOdapGateway\",\n  dltIDs: [\"DLT2\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  fabricPath: \"http://localhost:8045\",\n  fabricSigningCredential: fabricSigningCredential,\n  fabricChannelName: fabricChannelName,\n  fabricContractName: fabricContractName,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n\nconst serverGatewayOptions: IBesuOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#serverOdapGateway\",\n  dltIDs: [\"DLT1\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  besuPath: \"http://localhost:8046\",\n  besuWeb3SigningCredential: besuWeb3SigningCredential,\n  besuContractName: besuContractName,\n  besuKeychainId: besuKeychainId,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n   \n  const clientGateway = new FabricOdapGateway(clientGatewayOptions);\n  const serverGateway = new BesuOdapGateway(serverGatewayOptions);\n```\n\nNote that these gateways are extensions of the [default ODAP Gateway class](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-odap-gateway.ts), that implements the gateway functionality. Each of these extensions implements ledger-specific operations.\n\n## Contributing\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md \"CONTIRBUTING.md\") to get started.\n\n## License\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE \"LICENSE \")file.\n","engines":{"npm":">=8","node":">=18"},"gitHead":"065250d9bfd0a6bf735277677c4ef0f2d01b4932","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","generate-sdk:kotlin":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore","generate-sdk:typescript-axios":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cacti.git","type":"git"},"_npmVersion":"lerna/3.1.0/node@v20.11.0+x64 (linux)","description":"Proof of concept of ODAP","directories":{},"_nodeVersion":"20.11.0","dependencies":{"knex":"2.4.0","uuid":"9.0.1","web3":"1.6.1","axios":"1.6.0","sqlite3":"5.1.5","fs-extra":"11.1.1","crypto-js":"4.2.0","secp256k1":"4.0.3","socket.io":"4.5.4","web3-utils":"1.6.1","typescript-optional":"2.0.1","@hyperledger/cactus-core":"^2.0.0-dev.195+065250d9b","@hyperledger/cactus-common":"^2.0.0-dev.195+065250d9b","@hyperledger/cactus-core-api":"^2.0.0-dev.195+065250d9b","@hyperledger/cactus-test-tooling":"^2.0.0-dev.195+065250d9b","@hyperledger/cactus-cmd-api-server":"^2.0.0-dev.195+065250d9b","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-dev.195+065250d9b","@hyperledger/cactus-plugin-object-store-ipfs":"^2.0.0-dev.195+065250d9b","@hyperledger/cactus-plugin-ledger-connector-besu":"^2.0.0-dev.195+065250d9b","@hyperledger/cactus-plugin-ledger-connector-fabric":"^2.0.0-dev.195+065250d9b"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"express":"4.18.2","typescript":"5.3.3","@types/tape":"4.13.4","@types/uuid":"9.0.6","body-parser":"1.20.2","@types/express":"4.17.19","fabric-network":"2.2.20","@types/fs-extra":"11.0.3","kubo-rpc-client":"3.0.1","@types/crypto-js":"4.0.1","@types/body-parser":"1.19.4"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_2.0.0-dev.195_1706137211626_0.4447963754207147","host":"s3://npm-registry-packages"}},"2.0.0-dev.196":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"2.0.0-dev.196","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"author":{"url":"https://www.hyperledger.org/use/cacti","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@2.0.0-dev.196","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"6eba2e6e74d6bb43916456617bd9fc962ccc831b","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-2.0.0-dev.196.tgz","fileCount":141,"integrity":"sha512-4mFi63eJUEEZUXIuuBjKrf21NmKoNe6/1qJ++7h8b5K7vILoee52dD363t1bt3/ReNRyl/hkBFInDM9HnFN/pw==","signatures":[{"sig":"MEYCIQChKlHzO+pTgsIuvt3+OK0jqnAPC8KZI6uNoR6XI6t1dwIhAPU4V3o1QYgrjh8y3lx3KEwi1GyoBPYTk/BhuYMRerzW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1608843},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","readme":"# @hyperledger/cactus-plugin-odap-hermes\nThe package provides `Cactus` a way to standardize cross-chain transactions between two ledgers (Fabric and Besu in this implementation). Using this we can perform:\n- A unidirectional atomic asset transfer between 2 parties in different ledgers.\n- Lock of the asset in the source ledger and proof is sent to the counterparty.\n- Extinguishment of the asset in the source blockchain and regeneration of the asset in the recipient blockchain.\n\nAt the moment, we assume a crash-fault environment under some assumptions detailed in section [Assumptions](#assumptions)\n## Summary\n\n  - [Assumptions](#assumptions)\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Use Case](#use-case)\n  - [Running the tests](#running-the-tests)\n  - [Usage](#usage)\n\n\n## Assumptions\nRegarding the crash recovery procedure in place, at the moment we only support crashes of gateways under certain assumptions detailed as follows:\n  - Gateways crash only after receiving a message (and before sending the next one)\n  - Gateways crash only after logging to the Log Storage the previously received message\n  - Gateways never loose their long term keys\n  - Gateways do not have byzantine behavior\n  - Gateways are assumed to always recover from a crash\n\n## Getting Started\n\nClone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on\nyour local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project to install the dependencies execute the command:\n```sh\nnpm run configure\n```\n\nKnow how to use the following plugins of the project:\n\n  - [cactus-plugin-ledger-connector-fabric](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-fabric)\n  - [cactus-plugin-ledger-connector-besu](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-besu)\n  - [cactus-plugin-object-store-ipfs](https://github.com/hyperledger/cactus/tree/main/extensions/cactus-plugin-object-store-ipfs)\n\n## Architecture\n\n### Entities\nFirstly let us identify the different entities involved in the protocol and what is their function:\n- Two gateways in each side of the protocol: they implement endpoints to exchange the messages defined in the protocol.\n- Ledgers connectors in each side (each connected to a different gateway): they expose the API so that gateways can interact the respective ledgers (e.g., locking, deleting and creating assets).\n- SQLite3 database: persistent log and proofs storage in each gateway.\n- IPFS connector: is exposed the API so that both gateways have access to the same structure. This is used to store the hashes and signatures of the logs and proofs, so that accountability is guaranteed.\n\nThe sequence diagram of ODAP is pictured below.\n\n![odap-sequence-diagram](https://i.imgur.com/SOdXFEt.png)\n\n### API Endpoints\nThis plugin uses OpenAPI to generate the API paths.\nThere are Client and Server Endpoints for each type of message detailed in the ODAP protocol:\n\n  - TransferInitializationV1Request\n  - TransferInitializationV1Response\n  - TransferCommenceV1Request\n  - TransferCommenceV1Response\n  - LockEvidenceV1Request\n  - LockEvidenceV1Response\n  - CommitPreparationV1Request\n  - CommitPreparationV1Response\n  - CommitFinalV1Request\n  - CommitFinalV1Response\n  - TransferCompleteV1Request\n  - ClientV1Request\n\nThere are also defined the endpoints for the crash recovery procedure (there is still missing the endpoint to receive the Rollback mesage):\n  - RecoverV1Message\n  - RecoverUpdateV1Message\n  - RecoverUpdateAckV1Message\n  - RecoverSuccessV1Message\n  - RollbackV1Message\n\n## Use case\nAlice and Bob, in blockchains A and B, respectively, want to make a transfer of an asset from one to the other. Gateway A represents the gateway connected to Alice's blockchain. Gateway B represents the gateway connected to Bob's blockchain. Alice and Bob will run ODAP, which will execute the transfer of the asset from blockchain A to blockchain B. The above endpoints will be called in sequence. Notice that the asset will first be locked on blockchain A and a proof is sent to the server-side. Afterward, the asset on the original blockchain is extinguished, followed by its regeneration on blockchain B.\n\n## Running the tests\n\n[A test of the entire protocol with manual calls to the methods, i.e. without ledger connectors and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts)\n\n[A test of the entire protocol using Open API but with no ledger connectors.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts)\n\n[A test of the entire protocol with ledger connectors (Fabric and Besu) and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts)\n\n[A test with a simulated crash of the client gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts)\n\n[A test with a simulated crash of the client gateway after the lock of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts)\n\n[A test with a simulated crash of the client gateway after the deletion of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the creation of the the asset in the recipient blockchain (Besu).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts)\n\n[A test with a rollback after a timeout (client crashed).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts)\n\n[A test with a backup gateway resuming the protocol after the client gateway crashed.](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts)\n\nFor developers that want to test separate steps/phases of the ODAP protocol, please refer to [these](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/) test files (client and server side along with the recovery procedure).\n\n## Usage\n\nLet us consider two gateways. The client gateway connected to Hyperledger Fabric and the server gateway connected to Hyperledger Besu. Let us also consider:\n\n  - A Hyperledger Fabric API client on URL: http://localhost:8045\n  - A Hyperledger Besu API client on URL: http://localhost:8046\n  - An IPFS API client on URL: http://localhost:8047\n  - The local databases configuration provided in the file [knex.config.ts](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/test/typescript/knex.config.ts)\n\nThen the ODAP gateways should be created as follows:\n\n```typescript\nconst clientGatewayOptions: IFabricOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#clientOdapGateway\",\n  dltIDs: [\"DLT2\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  fabricPath: \"http://localhost:8045\",\n  fabricSigningCredential: fabricSigningCredential,\n  fabricChannelName: fabricChannelName,\n  fabricContractName: fabricContractName,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n\nconst serverGatewayOptions: IBesuOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#serverOdapGateway\",\n  dltIDs: [\"DLT1\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  besuPath: \"http://localhost:8046\",\n  besuWeb3SigningCredential: besuWeb3SigningCredential,\n  besuContractName: besuContractName,\n  besuKeychainId: besuKeychainId,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n   \n  const clientGateway = new FabricOdapGateway(clientGatewayOptions);\n  const serverGateway = new BesuOdapGateway(serverGatewayOptions);\n```\n\nNote that these gateways are extensions of the [default ODAP Gateway class](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-odap-gateway.ts), that implements the gateway functionality. Each of these extensions implements ledger-specific operations.\n\n## Contributing\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md \"CONTIRBUTING.md\") to get started.\n\n## License\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE \"LICENSE \")file.\n","engines":{"npm":">=8","node":">=18"},"gitHead":"1b9a3c27634eb1327b83b901d440d258a693dd53","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","generate-sdk:kotlin":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore","generate-sdk:typescript-axios":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cacti.git","type":"git"},"_npmVersion":"lerna/3.1.0/node@v20.11.0+x64 (linux)","description":"Proof of concept of ODAP","directories":{},"_nodeVersion":"20.11.0","dependencies":{"knex":"2.4.0","uuid":"9.0.1","web3":"1.6.1","axios":"1.6.0","sqlite3":"5.1.5","fs-extra":"11.1.1","crypto-js":"4.2.0","secp256k1":"4.0.3","socket.io":"4.5.4","web3-utils":"1.6.1","typescript-optional":"2.0.1","@hyperledger/cactus-core":"^2.0.0-dev.196+1b9a3c276","@hyperledger/cactus-common":"^2.0.0-dev.196+1b9a3c276","@hyperledger/cactus-core-api":"^2.0.0-dev.196+1b9a3c276","@hyperledger/cactus-test-tooling":"^2.0.0-dev.196+1b9a3c276","@hyperledger/cactus-cmd-api-server":"^2.0.0-dev.196+1b9a3c276","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-dev.196+1b9a3c276","@hyperledger/cactus-plugin-object-store-ipfs":"^2.0.0-dev.196+1b9a3c276","@hyperledger/cactus-plugin-ledger-connector-besu":"^2.0.0-dev.196+1b9a3c276","@hyperledger/cactus-plugin-ledger-connector-fabric":"^2.0.0-dev.196+1b9a3c276"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"express":"4.18.2","typescript":"5.3.3","@types/tape":"4.13.4","@types/uuid":"9.0.6","body-parser":"1.20.2","@types/express":"4.17.19","fabric-network":"2.2.20","@types/fs-extra":"11.0.3","kubo-rpc-client":"3.0.1","@types/crypto-js":"4.0.1","@types/body-parser":"1.19.4"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_2.0.0-dev.196_1706141002715_0.15667085887941723","host":"s3://npm-registry-packages"}},"2.0.0-dev.197":{"name":"@hyperledger/cactus-plugin-odap-hermes","version":"2.0.0-dev.197","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"author":{"url":"https://www.hyperledger.org/use/cacti","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","_id":"@hyperledger/cactus-plugin-odap-hermes@2.0.0-dev.197","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"48038acaa08d5e13c6e8f50578ccd0396266b7f6","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-odap-hermes/-/cactus-plugin-odap-hermes-2.0.0-dev.197.tgz","fileCount":141,"integrity":"sha512-dOPTa7sgHFt8SjsypRI7RlAj/kecxZIoXRnn7R3NEQVM3MlWAcySvKCtVQCyZOoGWxS9AoTZyGFw4SQMHG+BsA==","signatures":[{"sig":"MEUCIQC5V/D/7WqzHivtbAtnZ8OFFRp7VS68kZMloid+LIOALQIgcTmdpO3axiLsrDwHJjJHbctj9BP9caz2OXkQHVK8Dzw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1608843},"main":"dist/lib/main/typescript/index.js","types":"dist/lib/main/typescript/index.d.ts","watch":{"tsc":{"quiet":true,"ignore":["src/**/generated/*"],"verbose":false,"patterns":["src/","src/*/json/**/openapi*"],"extensions":["ts","json"],"runOnChangeOnly":true}},"module":"dist/lib/main/typescript/index.js","readme":"# @hyperledger/cactus-plugin-odap-hermes\nThe package provides `Cactus` a way to standardize cross-chain transactions between two ledgers (Fabric and Besu in this implementation). Using this we can perform:\n- A unidirectional atomic asset transfer between 2 parties in different ledgers.\n- Lock of the asset in the source ledger and proof is sent to the counterparty.\n- Extinguishment of the asset in the source blockchain and regeneration of the asset in the recipient blockchain.\n\nAt the moment, we assume a crash-fault environment under some assumptions detailed in section [Assumptions](#assumptions)\n## Summary\n\n  - [Assumptions](#assumptions)\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Use Case](#use-case)\n  - [Running the tests](#running-the-tests)\n  - [Usage](#usage)\n\n\n## Assumptions\nRegarding the crash recovery procedure in place, at the moment we only support crashes of gateways under certain assumptions detailed as follows:\n  - Gateways crash only after receiving a message (and before sending the next one)\n  - Gateways crash only after logging to the Log Storage the previously received message\n  - Gateways never loose their long term keys\n  - Gateways do not have byzantine behavior\n  - Gateways are assumed to always recover from a crash\n\n## Getting Started\n\nClone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on\nyour local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project to install the dependencies execute the command:\n```sh\nnpm run configure\n```\n\nKnow how to use the following plugins of the project:\n\n  - [cactus-plugin-ledger-connector-fabric](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-fabric)\n  - [cactus-plugin-ledger-connector-besu](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-besu)\n  - [cactus-plugin-object-store-ipfs](https://github.com/hyperledger/cactus/tree/main/extensions/cactus-plugin-object-store-ipfs)\n\n## Architecture\n\n### Entities\nFirstly let us identify the different entities involved in the protocol and what is their function:\n- Two gateways in each side of the protocol: they implement endpoints to exchange the messages defined in the protocol.\n- Ledgers connectors in each side (each connected to a different gateway): they expose the API so that gateways can interact the respective ledgers (e.g., locking, deleting and creating assets).\n- SQLite3 database: persistent log and proofs storage in each gateway.\n- IPFS connector: is exposed the API so that both gateways have access to the same structure. This is used to store the hashes and signatures of the logs and proofs, so that accountability is guaranteed.\n\nThe sequence diagram of ODAP is pictured below.\n\n![odap-sequence-diagram](https://i.imgur.com/SOdXFEt.png)\n\n### API Endpoints\nThis plugin uses OpenAPI to generate the API paths.\nThere are Client and Server Endpoints for each type of message detailed in the ODAP protocol:\n\n  - TransferInitializationV1Request\n  - TransferInitializationV1Response\n  - TransferCommenceV1Request\n  - TransferCommenceV1Response\n  - LockEvidenceV1Request\n  - LockEvidenceV1Response\n  - CommitPreparationV1Request\n  - CommitPreparationV1Response\n  - CommitFinalV1Request\n  - CommitFinalV1Response\n  - TransferCompleteV1Request\n  - ClientV1Request\n\nThere are also defined the endpoints for the crash recovery procedure (there is still missing the endpoint to receive the Rollback mesage):\n  - RecoverV1Message\n  - RecoverUpdateV1Message\n  - RecoverUpdateAckV1Message\n  - RecoverSuccessV1Message\n  - RollbackV1Message\n\n## Use case\nAlice and Bob, in blockchains A and B, respectively, want to make a transfer of an asset from one to the other. Gateway A represents the gateway connected to Alice's blockchain. Gateway B represents the gateway connected to Bob's blockchain. Alice and Bob will run ODAP, which will execute the transfer of the asset from blockchain A to blockchain B. The above endpoints will be called in sequence. Notice that the asset will first be locked on blockchain A and a proof is sent to the server-side. Afterward, the asset on the original blockchain is extinguished, followed by its regeneration on blockchain B.\n\n## Running the tests\n\n[A test of the entire protocol with manual calls to the methods, i.e. without ledger connectors and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts)\n\n[A test of the entire protocol using Open API but with no ledger connectors.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts)\n\n[A test of the entire protocol with ledger connectors (Fabric and Besu) and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts)\n\n[A test with a simulated crash of the client gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts)\n\n[A test with a simulated crash of the client gateway after the lock of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts)\n\n[A test with a simulated crash of the client gateway after the deletion of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the creation of the the asset in the recipient blockchain (Besu).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts)\n\n[A test with a simulated crash of the server gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts)\n\n[A test with a rollback after a timeout (client crashed).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts)\n\n[A test with a backup gateway resuming the protocol after the client gateway crashed.](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts)\n\nFor developers that want to test separate steps/phases of the ODAP protocol, please refer to [these](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/) test files (client and server side along with the recovery procedure).\n\n## Usage\n\nLet us consider two gateways. The client gateway connected to Hyperledger Fabric and the server gateway connected to Hyperledger Besu. Let us also consider:\n\n  - A Hyperledger Fabric API client on URL: http://localhost:8045\n  - A Hyperledger Besu API client on URL: http://localhost:8046\n  - An IPFS API client on URL: http://localhost:8047\n  - The local databases configuration provided in the file [knex.config.ts](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/test/typescript/knex.config.ts)\n\nThen the ODAP gateways should be created as follows:\n\n```typescript\nconst clientGatewayOptions: IFabricOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#clientOdapGateway\",\n  dltIDs: [\"DLT2\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  fabricPath: \"http://localhost:8045\",\n  fabricSigningCredential: fabricSigningCredential,\n  fabricChannelName: fabricChannelName,\n  fabricContractName: fabricContractName,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n\nconst serverGatewayOptions: IBesuOdapGatewayConstructorOptions = {\n  name: \"cactus-plugin#serverOdapGateway\",\n  dltIDs: [\"DLT1\"],\n  instanceId: uuidv4(),\n  ipfsPath: \"http://localhost:8047\",\n  besuPath: \"http://localhost:8046\",\n  besuWeb3SigningCredential: besuWeb3SigningCredential,\n  besuContractName: besuContractName,\n  besuKeychainId: besuKeychainId,\n  clientHelper: new ClientGatewayHelper(),\n  serverHelper: new ServerGatewayHelper(),\n};\n   \n  const clientGateway = new FabricOdapGateway(clientGatewayOptions);\n  const serverGateway = new BesuOdapGateway(serverGatewayOptions);\n```\n\nNote that these gateways are extensions of the [default ODAP Gateway class](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-odap-gateway.ts), that implements the gateway functionality. Each of these extensions implements ledger-specific operations.\n\n## Contributing\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md \"CONTIRBUTING.md\") to get started.\n\n## License\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE \"LICENSE \")file.\n","engines":{"npm":">=8","node":">=18"},"gitHead":"a9a16d0c877edd2dffd81765be5ccbeb826a266f","scripts":{"tsc":"tsc --project ./tsconfig.json","watch":"npm-watch","pretsc":"npm run generate-sdk","codegen":"run-p 'codegen:*'","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","generate-sdk:kotlin":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore","generate-sdk:typescript-axios":"openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore"},"_npmUser":{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"},"repository":{"url":"git+https://github.com/hyperledger/cacti.git","type":"git"},"_npmVersion":"lerna/3.1.0/node@v20.11.0+x64 (linux)","description":"Proof of concept of ODAP","directories":{},"_nodeVersion":"20.11.0","dependencies":{"knex":"2.4.0","uuid":"9.0.1","web3":"1.6.1","axios":"1.6.0","sqlite3":"5.1.5","fs-extra":"11.1.1","crypto-js":"4.2.0","secp256k1":"4.0.3","socket.io":"4.5.4","web3-utils":"1.6.1","typescript-optional":"2.0.1","@hyperledger/cactus-core":"^2.0.0-dev.197+a9a16d0c8","@hyperledger/cactus-common":"^2.0.0-dev.197+a9a16d0c8","@hyperledger/cactus-core-api":"^2.0.0-dev.197+a9a16d0c8","@hyperledger/cactus-test-tooling":"^2.0.0-dev.197+a9a16d0c8","@hyperledger/cactus-cmd-api-server":"^2.0.0-dev.197+a9a16d0c8","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-dev.197+a9a16d0c8","@hyperledger/cactus-plugin-object-store-ipfs":"^2.0.0-dev.197+a9a16d0c8","@hyperledger/cactus-plugin-ledger-connector-besu":"^2.0.0-dev.197+a9a16d0c8","@hyperledger/cactus-plugin-ledger-connector-fabric":"^2.0.0-dev.197+a9a16d0c8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"express":"4.18.2","typescript":"5.3.3","@types/tape":"4.13.4","@types/uuid":"9.0.6","body-parser":"1.20.2","@types/express":"4.17.19","fabric-network":"2.2.20","@types/fs-extra":"11.0.3","kubo-rpc-client":"3.0.1","@types/crypto-js":"4.0.1","@types/body-parser":"1.19.4"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-odap-hermes_2.0.0-dev.197_1706143913860_0.0186180656135857","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-12-08T03:03:30.116Z","modified":"2025-10-02T09:58:37.275Z","1.0.0-rc.3":"2021-12-08T03:03:30.367Z","1.0.0-main.334593a7.46":"2022-01-18T01:00:06.511Z","1.0.0-jwt-supply-chain.62c7e930.0":"2022-02-03T00:25:21.152Z","1.0.0":"2022-03-17T00:07:31.289Z","1.0.1-jwt-supply-chain.9df3fe79.16":"2022-04-05T17:02:26.173Z","1.1.2":"2022-11-14T06:41:45.127Z","1.1.1":"2022-11-15T20:26:46.017Z","1.1.0":"2022-11-15T20:35:57.943Z","1.1.3":"2022-12-15T00:49:53.541Z","2.0.0-alpha.1":"2023-09-09T17:29:15.367Z","2.0.0-alpha.2":"2023-10-04T06:48:01.327Z","2.0.0-dev.93":"2023-11-16T03:14:53.908Z","2.0.0-dev.94":"2023-11-16T04:52:52.126Z","2.0.0-main.91":"2023-11-16T05:03:31.182Z","2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126":"2023-12-08T02:04:13.036Z","2.0.0-main.159":"2024-01-09T00:21:02.597Z","2.0.0-lfx-connector.163":"2024-01-16T18:47:20.967Z","2.0.0-lfx-connector.164":"2024-01-16T19:02:42.639Z","2.0.0-dev.195":"2024-01-24T23:00:11.890Z","2.0.0-dev.196":"2024-01-25T00:03:22.988Z","2.0.0-dev.197":"2024-01-25T00:51:54.153Z"},"bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"author":{"url":"https://www.hyperledger.org/use/cacti","name":"Hyperledger Cactus Contributors","email":"cactus@lists.hyperledger.org"},"license":"Apache-2.0","homepage":"https://github.com/hyperledger/cacti#readme","keywords":["Hyperledger","Cactus","Integration","Blockchain","Distributed Ledger Technology","Open Digital Asset Protocol"],"repository":{"url":"git+https://github.com/hyperledger/cacti.git","type":"git"},"description":"Proof of concept of ODAP","contributors":[{"url":"https://github.com/AndreAugusto11","name":"André Augusto","email":"andre.augusto@tecnico.ulisboa.pt"},{"url":"https://github.com/jscode017","name":"Tzu-Shen, Wang"}],"maintainers":[{"email":"npm@hyperledger.org","name":"hyperledger-lf"},{"email":"npm-ci@hyperledger.org","name":"hyperledger-ghci"},{"email":"npm@openwallet.foundation","name":"openwalletfoundation"},{"email":"npm@lfdecentralizedtrust.org","name":"lfdt-npm"},{"email":"rafael.belchior@tecnico.ulisboa.pt","name":"rafaelapb"}],"readme":"","readmeFilename":""}