{"_id":"@hyperledger/cactus-plugin-ledger-connector-iroha","_rev":"51-19029b4849ba6d14be9958ea401a8eb6","name":"@hyperledger/cactus-plugin-ledger-connector-iroha","dist-tags":{"vaultTransitKeychain":"0.8.1-vaultTransitKeychain.5ad9cac4.17","docs-1312":"0.9.1-docs-1312.bcfd3c31.6","web-socket-identity-provider":"0.9.1-web-socket-identity-provider.845e2a3e.23","add-bluebird-dependency":"0.9.1-add-bluebird-dependency.a8944f63.33","ci-942":"0.9.1-ci-942.cbb849c6.35","fix-quorum-no-keychain-endpoints":"0.10.1-fix-quorum-no-keychain-endpoints.bf5e0403.1","fix-quorum-api-server":"0.10.1-fix-quorum-api-server.0677a0e6.4","pr-brioux-1333":"0.8.1-pr-brioux-1333.92b26c3a.36","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","dev":"2.0.0-dev.197","lfx-connector":"2.0.0-lfx-connector.208","main":"2.0.0-main.214","2945-supply-chain-app-build-failed":"2.0.0-2945-supply-chain-app-build-failed.241"},"versions":{"0.8.1-vaultTransitKeychain.5ad9cac4.17":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"0.8.1-vaultTransitKeychain.5ad9cac4.17","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@0.8.1-vaultTransitKeychain.5ad9cac4.17","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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"fb39ea070c1b66c9a81d59b36318b174196bce9a","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-0.8.1-vaultTransitKeychain.5ad9cac4.17.tgz","fileCount":48,"integrity":"sha512-gM+IByHavpQqkiqZsO7ZbZwzyRT+tzsTHc2QxXUFKxS/OrCUIhXvn753Nh1by7gDCHE+ku74m4IUTaQbxL+QHQ==","signatures":[{"sig":"MEQCIGRIUYIzX2rl0wXWV07l1NW96xcyzC65QjMWrw9lfbGHAiAgGokz3Y2tnzUKFuUDoSBP9m3L0Z+p0umbzcJ25Azq/w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":288035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLPudCRA9TVsSAnZWagAA3poP/RhnNrqRIaIeqAkpwWQ3\nRTSI2VYpgdRVlrrwr5EwYGLBoK6c3b3RIeFPE6vrrj2r7jpqBc1hnQzR4n1M\nsVGm4yGCTlIdx9DRYr+WR8JeQ5CCrQ7Zpbw6nXyFCykCaDSzyd5QC3Ww8T0O\npHd/heeE/L6owBIceHt1k5JeZxarFf5xGlBIwnwzF6rwGwLmwDjNaap6zTDD\nTFdOFXNxHAZwYi/C9xzwicLnrlkNbpmh9dNw7YdlmOD2xuGkl88SZFUo94sg\nko5Pm3BITuTcHikZVg9BuBvzhnO7+SAziuIqLoxpg9ODut8znXCHiHR51qBG\nabYkUAcGAZPTg6sOGIQ1z9vODvf9dWu7xh3g7gvw7zcSd2Kfo5a3U5ofcqcr\ng0Tj/c2my+GrieJL1abBogyvfVniiSXV0MfLjCG7y9enepB3BQGSp/acVBnT\nLZ4ZZzgE59zx/FDZsFlP/l9+NDKF09OE1KS/zg9YwviocTk1iR39JaFk0z9O\nL4RWdU82OyTPZ1UQSIXG2HFmI1DqKLpe6g7n09FkQMWQYFpQPsFvkWLXN85m\nIR2Q2xJj85hVVNsG0bPRNIuTc+gBzy43MgOkptlN4iN1THowHykOT/8lC2FF\nY+dFXUtz/2RPuZvHe+2AS2oUkzE42+jez+p/86vp9/3UHj00YvaqJWJoaJtV\nPRej\r\n=amDp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"5ad9cac40807d2fae77e8a8759abd5b9fc4fa87a","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev webpack:prod","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:prod":"npm-run-all webpack:prod:node webpack:prod:web","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","webpack:prod:web":"webpack --env=prod --target=web --config ../../webpack.config.js","webpack:prod:node":"webpack --env=prod --target=node --config ../../webpack.config.js"},"_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.8.0+x64 (linux)","description":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.8.0","dependencies":{"grpc":"1.24.11","axios":"0.21.1","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.3","@hyperledger/cactus-core":"^0.8.1-vaultTransitKeychain.5ad9cac4.17+5ad9cac4","@hyperledger/cactus-common":"^0.8.1-vaultTransitKeychain.5ad9cac4.17+5ad9cac4","@hyperledger/cactus-core-api":"^0.8.1-vaultTransitKeychain.5ad9cac4.17+5ad9cac4"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"^0.8.1-vaultTransitKeychain.5ad9cac4.17+5ad9cac4","@hyperledger/cactus-plugin-keychain-memory":"^0.8.1-vaultTransitKeychain.5ad9cac4.17+5ad9cac4"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_0.8.1-vaultTransitKeychain.5ad9cac4.17_1630337949267_0.19368936115018087","host":"s3://npm-registry-packages"}},"0.9.0":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"0.9.0","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@0.9.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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"1d223e4c7bafb8e154d8dde6e58d74f9f427e810","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-0.9.0.tgz","fileCount":54,"integrity":"sha512-D7kSpCW8vKYiUg22z8Nwi5GzhnZWOyxzDiklx5q/ROhE0ThiF0f3a0koU1okJx8u++hNJXN0dPMfSLgbxXBodw==","signatures":[{"sig":"MEUCIQDEZRfomBUV/7jwKhlHwv43WdwkunVoFm4WtbhgCXyZBgIgbjr7yAU9oeqr6lLNLjS7SrNLvsrP+hghGZNWgZftrOg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5315950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOQsvCRA9TVsSAnZWagAAEi8P/1Wri5lIK2kuQqZemi/7\n07Vaur48lcWO00z5MsEppWNRNEyHstiTXlN/WGP5tnj43DYlaaph43pVZ951\nwUUW3y/VEF2ON5tJj9f0b9VE7/rbutVjSgfFAxdw3whWFa0wM90zrKwD1oJC\nItP2fCGPRNATEXNlSwCh/KhwOXwQ2vF9v9HCrGKZRhNW/pTK3jPTM88WKlj/\nkSE672HDCBlkmGiLiAcnWaYVsQDqfcImkrtSYrsAefDiCjuywwOQgIGLcGhq\nVqM+Q+FJUmoIhBQIfjEVFN8LDP9xaa3yHiBC+TjBJqZhtvGXWOMpxjxT4iCw\nyg9PQvH+I7jT24o27+s73q1VHFHhFjQS59NRJNOA5lUBnQEu7lcIX3aLiAO3\nQaAnqoVCzps5VdINLhqojEtI6CJcZrzbdendtRXKsh/PYZg5FXZOkVJV3yN0\nb6VCUvaIswnb5UNpuMM/mM5KYf5o6lZH9OAnm17zrsBL38sOuYZCHtTDt2hi\nrVVBavl7B6DMYHVCFinoEzvcMcjrQykg+ioUgPGoACD0xJmIgikD+M+uzPeq\nuBguEILVes68WCJ0dyLSacRMXzgZTzZeHg592Z5neKbCNwDTNnN6EJ/u+it6\ntEgDUYpLGZVMIAZ/0TNFhb9B4vsTPymUKpjY0YNWkkfZ0mhQQarvXf7TA4Xv\nHD3B\r\n=BFu9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"e7b60a04051d0590203482430e5161d5f6a31d24","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev webpack:prod","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:prod":"npm-run-all webpack:prod:node webpack:prod:web","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","webpack:prod:web":"webpack --env=prod --target=web --config ../../webpack.config.js","webpack:prod:node":"webpack --env=prod --target=node --config ../../webpack.config.js"},"_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.1.0+x64 (linux)","description":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.1.0","dependencies":{"grpc":"1.24.11","axios":"0.21.1","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.3","@hyperledger/cactus-core":"0.9.0","@hyperledger/cactus-common":"0.9.0","@hyperledger/cactus-core-api":"0.9.0"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"0.9.0","@hyperledger/cactus-plugin-keychain-memory":"0.9.0"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_0.9.0_1631128367015_0.8536083296886128","host":"s3://npm-registry-packages"}},"0.9.1-docs-1312.94850924.6":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"0.9.1-docs-1312.94850924.6","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@0.9.1-docs-1312.94850924.6","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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"7b9fb65eb49bdc2919816a291deef9aee6ec6642","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-0.9.1-docs-1312.94850924.6.tgz","fileCount":48,"integrity":"sha512-Arc1O0lSHHAB54Dry6FH+gz6mesm4GrYZT33pKww7U46cTkU23Ox7m8TPOBovRbNhALfhB7pD3rpI1Hrt42g7Q==","signatures":[{"sig":"MEUCICH1uar9mFdLK+ONGp+Ub6LYdP5KTGvcKyotfPsyK1m5AiEArbAbosGGDu6yE88q0hidumjjOABWfQieNOVBHBezX3A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287963,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOQ++CRA9TVsSAnZWagAAZEMP/Atr8R8wMkLhtu4IjhWA\nAZF08fSVi8TJgshTQpX4aW++INwzwAtcnXADonR9PhBTxpiTn6fx59n1E3eF\naVX4hyFwD7YztttJXg/s/kTXNTs/7VDoX73+SMJDH9mTXu1PEoe8jISqVO+T\nhzQ+A3XiPoSvk6XmOZy9H1FZPxAcViYWIrrCJQO1RF2Bo+R4pXnhcc6rf1Xg\ngkWpjKSJafocHwJnbN8l1yk26LGS/3DKpXM1WK1EKRuU4ZgSK75dKgfE6R3S\nMuKba3NdOdBfU1Nu3SYViwE1jsAdN7OZW1KJ8HC1ruMztnsH0XH0CviaJdCS\nm3fdV4AqsfO+oJueCoVnqji9wMoyAxbvU0XjL7AzoWip5UlnEqU/u2/MQ3FX\nYsMMu9NFn7vt+BRpCk4XnNmsiTfyWfB7nscJVWGFpTG36IwxDQg7rodjhhCG\nTOQ8rS3qognWVzWlBi6sqnNllkwe6Sfkh9FOsGeDZaxV/TmhFb/feTKzWgFk\n0QAsTcudVsXHNKHXzSqDOatR93kgl/7Qen7ZkUlsSm0yYkp/pavfjWZmcU13\n3tx7ZrO+vCjCJOL88lWhiJegLxuT6Y3yUFIMCXAJUhkB40lXifIPlowMZ4qp\njNFGe5XUekG6UGoE6Ax/A0KbYRH9G0b0eT3Alk1uiVxvJTORb406wjfP0FlM\nQxRZ\r\n=H1Lo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"94850924d420a26335a577a1802d2b5681158123","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev webpack:prod","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:prod":"npm-run-all webpack:prod:node webpack:prod:web","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","webpack:prod:web":"webpack --env=prod --target=web --config ../../webpack.config.js","webpack:prod:node":"webpack --env=prod --target=node --config ../../webpack.config.js"},"_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.1.0+x64 (linux)","description":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.1.0","dependencies":{"grpc":"1.24.11","axios":"0.21.1","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.3","@hyperledger/cactus-core":"^0.9.1-docs-1312.94850924.6+94850924","@hyperledger/cactus-common":"^0.9.1-docs-1312.94850924.6+94850924","@hyperledger/cactus-core-api":"^0.9.1-docs-1312.94850924.6+94850924"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"^0.9.1-docs-1312.94850924.6+94850924","@hyperledger/cactus-plugin-keychain-memory":"^0.9.1-docs-1312.94850924.6+94850924"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_0.9.1-docs-1312.94850924.6_1631129534688_0.6154175755685098","host":"s3://npm-registry-packages"}},"0.9.1-docs-1312.bcfd3c31.6":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"0.9.1-docs-1312.bcfd3c31.6","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@0.9.1-docs-1312.bcfd3c31.6","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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"23ffb4ba3872920b1c087a39a7fff3295a7dfda2","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-0.9.1-docs-1312.bcfd3c31.6.tgz","fileCount":49,"integrity":"sha512-7u9NSV8AqswnKbRG/jg3L/yifv0k8kMgGAHFNdKEeHdDLqRz+Krm0Nyt7y5HJNAXtdSMCcZ31oryCZmsXFus+Q==","signatures":[{"sig":"MEUCIHQP7IvlDkc3EsdoXcL0n4OuPqAa2FIMEONDQZPizqXlAiEAs1nF6J0qp6jVxYWQ7c9VeJANsgxP3Azc++BLCtTfDMA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546319,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOXX/CRA9TVsSAnZWagAAv0EP/2C5w6ZqpWJcIuSWUhYh\nASPcV/7r5lXMinwVqTOMMmaBLklqO36d1KQklQ8xFDXvdF+VCnBdsdLJusI9\nAov5tIWvG6QmLe5LOVR0mzbAwJYE+PDvVKHP261bUMGgauhkqEXf433rEcYl\nlIaebuldyaa0nrXOiAiYFO9sUcN1lcjvdS7Cd+kjDbtihmg8m79n+DhK4kVV\nM8ZIe+W9fH2ZLufIRMAqhghugyDlWpw/9tpO5w7CECLIhdTOyD3s5EyTHBhU\nMgA986c51sOrI12XUkY5CtuLWRIgsmMqZsB4qUi3vrpn43Jm3Xnf0FRHk7Kw\n+OTLm3uTZAhkUqe3Y5tzrGSukOHsaYj1mpofhOTa4NIlfxsX5XNIwYDnaU18\nL7S0AX+EzMYtcauN10z7CxtQM8z3Io/s/6EYWEHaDQ3jfu5TxbJGDJy75rmr\nGa3MBv/iOFcdHn3NauxqXTT/n/dl7RUQgMohv4fYKRWEKokqhcFpqXNZrsB7\n9L5IU/hi+FuzJ7wAtYLP8qXeixlb8CaZccbPmv8MuXqrl1+WVissSne4/Bff\nzNsqJuOmt7eK7mPWNGoAN15d5f+nDUZCmBv7xfYWGswEVoRy1qYcpKlfenf7\nPzB+a2+ktHVy3RmZr5AKH96hFrssWhwJCzN+UjflneRwUN9CWhD6z5X5nLQ2\ntQ2G\r\n=poLp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"bcfd3c3113ef63bae0d83a81a855efb5254b91fb","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev webpack:prod","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:prod":"npm-run-all webpack:prod:node webpack:prod:web","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","webpack:prod:web":"webpack --env=prod --target=web --config ../../webpack.config.js","webpack:prod:node":"webpack --env=prod --target=node --config ../../webpack.config.js"},"_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.1.0+x64 (linux)","description":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.1.0","dependencies":{"grpc":"1.24.11","axios":"0.21.1","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.3","@hyperledger/cactus-core":"^0.9.1-docs-1312.bcfd3c31.6+bcfd3c31","@hyperledger/cactus-common":"^0.9.1-docs-1312.bcfd3c31.6+bcfd3c31","@hyperledger/cactus-core-api":"^0.9.1-docs-1312.bcfd3c31.6+bcfd3c31"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"^0.9.1-docs-1312.bcfd3c31.6+bcfd3c31","@hyperledger/cactus-plugin-keychain-memory":"^0.9.1-docs-1312.bcfd3c31.6+bcfd3c31"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_0.9.1-docs-1312.bcfd3c31.6_1631155711171_0.5467602030764962","host":"s3://npm-registry-packages"}},"0.9.1-web-socket-identity-provider.845e2a3e.23":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"0.9.1-web-socket-identity-provider.845e2a3e.23","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@0.9.1-web-socket-identity-provider.845e2a3e.23","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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"4b5f6b55452f186a11de3e93f85b497b6de1a072","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-0.9.1-web-socket-identity-provider.845e2a3e.23.tgz","fileCount":54,"integrity":"sha512-5CQk6nKHlVLZRZDMgdQbyJaRuuput4+wVhLcRd00NW3SQKjDI/kHZ3BChtv9A7iDV1uR3aIt/9QTrG8XFXuVEQ==","signatures":[{"sig":"MEYCIQDkAxBrw44Qpo9+4YDSjC0dS2EJEwzOy01jxr4tyGbCewIhALwIie2Q1iVaV5FpJEedngWtGnrItHXwHnwJIzAugHxD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10387302,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQ4U+CRA9TVsSAnZWagAAcfAP/1eOX+9wfy8ImSITcSm9\nspp8XBHnTJzxpIIWFlIuy2oUbj19ljHfqjGscvFQFT9+JzYQd3rOCBYBYPIX\nyio5uKpCI6fBvgpkWhIxCk82ZV2dAV6Ofv1fZRakLPgkwpQgCkt52szRbBXf\nq/8GMGYuZiL4zxHIsJRL0UWx0+YubU6nrb8uKigEnbOo2DuNmzvloz3pLlEz\nqLGexXVevYUmdv8aMm+cMRwVNAYYvFtLW60ZkpKereISqoDZKRlzXkK+nBec\nmGEw75xW7C68WLtcNAp9d+sPn2Izf+xKNpOiqAyqK/yjbT/FlMRaatOwg7R8\nJaU2Znhso0kPlF3xRor29WU3S/f1RECtJZWVIr6jMPasX7KWm66N0JjVIDvs\njMDBQ8h26tbVNzfEsZ5tUUSn0NsnKHefZ8qCmUWVtsQDuhdeDG0e//eBvJ0w\nHwzIVuulJfHvLIyc4cRtK0FYgecCK+xup4/t2bdt5KhyFuaYDF30+K656dto\nJtx+iIxt18y14IdTrwGSw3qZmDLvScWg7HdubHZelnChp/023RCqgP/o0yVF\n6hG7A9aTxVFOY1aJsvHDthpsPcUJXk+6zZ8YjJ9/jpNXFfjeDnFHNBUYVJll\nnhOPQkafv6z9sSP6JR5tHHBK5ldhPdQaow2/c0VT4vrmDoMf02OPSvZx9UIw\nJJzG\r\n=wy+s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"845e2a3ed547c1ed8046e33ba55e365605fd6058","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev webpack:prod","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:prod":"npm-run-all webpack:prod:node webpack:prod:web","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","webpack:prod:web":"webpack --env=prod --target=web --config ../../webpack.config.js","webpack:prod:node":"webpack --env=prod --target=node --config ../../webpack.config.js"},"_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.8.0+x64 (linux)","description":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.8.0","dependencies":{"grpc":"1.24.11","axios":"0.21.1","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.3","@hyperledger/cactus-core":"^0.9.1-web-socket-identity-provider.845e2a3e.23+845e2a3e","@hyperledger/cactus-common":"^0.9.1-web-socket-identity-provider.845e2a3e.23+845e2a3e","@hyperledger/cactus-core-api":"^0.9.1-web-socket-identity-provider.845e2a3e.23+845e2a3e"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"^0.9.1-web-socket-identity-provider.845e2a3e.23+845e2a3e","@hyperledger/cactus-plugin-keychain-memory":"^0.9.1-web-socket-identity-provider.845e2a3e.23+845e2a3e"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_0.9.1-web-socket-identity-provider.845e2a3e.23_1631814974222_0.1677221721632578","host":"s3://npm-registry-packages"}},"0.9.1-add-bluebird-dependency.a8944f63.33":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"0.9.1-add-bluebird-dependency.a8944f63.33","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@0.9.1-add-bluebird-dependency.a8944f63.33","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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"77c4e084f1ed635570c0c16934f5848e691cbc65","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-0.9.1-add-bluebird-dependency.a8944f63.33.tgz","fileCount":48,"integrity":"sha512-VIoiSWkT5TQMP858sDfN5YtVpIlhbDlo/292M0h8nvttvXsgSN5WMv4Z0+tBQCLJhKdrT18FetMznmp5JG6FYw==","signatures":[{"sig":"MEYCIQCxOQ61S396SSVeg9/HcTa696Jau5FhI4h4Tuz+aSm4sQIhAILcgIK2rVpXj2qTTlYEYDzFjhG+5A1AZQk1sxTkDu52","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":288018},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"a8944f63a62bd254be94503e5d795fe8c7d7e309","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev webpack:prod","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:prod":"npm-run-all webpack:prod:node webpack:prod:web","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","webpack:prod:web":"webpack --env=prod --target=web --config ../../webpack.config.js","webpack:prod:node":"webpack --env=prod --target=node --config ../../webpack.config.js"},"_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.8.0+x64 (linux)","description":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.8.0","dependencies":{"grpc":"1.24.11","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.3","@hyperledger/cactus-core":"^0.9.1-add-bluebird-dependency.a8944f63.33+a8944f63","@hyperledger/cactus-common":"^0.9.1-add-bluebird-dependency.a8944f63.33+a8944f63","@hyperledger/cactus-core-api":"^0.9.1-add-bluebird-dependency.a8944f63.33+a8944f63"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"^0.9.1-add-bluebird-dependency.a8944f63.33+a8944f63","@hyperledger/cactus-plugin-keychain-memory":"^0.9.1-add-bluebird-dependency.a8944f63.33+a8944f63"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_0.9.1-add-bluebird-dependency.a8944f63.33_1632438735980_0.34222484377189644","host":"s3://npm-registry-packages"}},"0.9.1-fix-quorum-no-keychain-endpoints.e1eba3a4.33":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"0.9.1-fix-quorum-no-keychain-endpoints.e1eba3a4.33","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@0.9.1-fix-quorum-no-keychain-endpoints.e1eba3a4.33","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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"1c193e4332d1ff1482d1bd69ca1b8c4799661daf","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-0.9.1-fix-quorum-no-keychain-endpoints.e1eba3a4.33.tgz","fileCount":48,"integrity":"sha512-1ahik+9WFN81U6CyMj5xjc44xS5CRGtOf2XiMio+rbwdTnufly757OI56fngSHDqJ2i0upUqjhZkUPMN973ynw==","signatures":[{"sig":"MEYCIQDKjWj5pqT4IxFCMU7HxMdkCprQt3C5/BqZkSNzwHCc/gIhAI/66IlKZchDZkJQmTu5tq8RDcfAQdXeNemF/IQ84e1U","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":288072},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"e1eba3a46e9c66662c2db3f07f1d68ec76a2a62d","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev webpack:prod","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:prod":"npm-run-all webpack:prod:node webpack:prod:web","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","webpack:prod:web":"webpack --env=prod --target=web --config ../../webpack.config.js","webpack:prod:node":"webpack --env=prod --target=node --config ../../webpack.config.js"},"_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.8.0+x64 (linux)","description":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.8.0","dependencies":{"grpc":"1.24.11","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.3","@hyperledger/cactus-core":"^0.9.1-fix-quorum-no-keychain-endpoints.e1eba3a4.33+e1eba3a4","@hyperledger/cactus-common":"^0.9.1-fix-quorum-no-keychain-endpoints.e1eba3a4.33+e1eba3a4","@hyperledger/cactus-core-api":"^0.9.1-fix-quorum-no-keychain-endpoints.e1eba3a4.33+e1eba3a4"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"^0.9.1-fix-quorum-no-keychain-endpoints.e1eba3a4.33+e1eba3a4","@hyperledger/cactus-plugin-keychain-memory":"^0.9.1-fix-quorum-no-keychain-endpoints.e1eba3a4.33+e1eba3a4"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_0.9.1-fix-quorum-no-keychain-endpoints.e1eba3a4.33_1632519003200_0.5154981472078863","host":"s3://npm-registry-packages"}},"0.9.1-ci-942.cbb849c6.35":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"0.9.1-ci-942.cbb849c6.35","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@0.9.1-ci-942.cbb849c6.35","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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"f9d13689beb016dab38072dec192cbce86607599","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-0.9.1-ci-942.cbb849c6.35.tgz","fileCount":48,"integrity":"sha512-pdQykJ4FCwntGcSB3LkZqFe9xIbjoCjZ2NguPG2NwF9u2oqtt/OhmLAH3JScxoBETF3hL8HBkw8OD1r2o5xduA==","signatures":[{"sig":"MEQCIC5o0gWFU/6AqlepS+1/jq9kQytRifIVaL57Gt1ReZx6AiAeWJ5YDWwLQzXi3oxiEATVFeQky3UdDAlSNABryaQCnw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287916},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"cbb849c65f8addd6cbca1cebd247988744c4588c","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev webpack:prod","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:prod":"npm-run-all webpack:prod:node webpack:prod:web","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","webpack:prod:web":"webpack --env=prod --target=web --config ../../webpack.config.js","webpack:prod:node":"webpack --env=prod --target=node --config ../../webpack.config.js"},"_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.8.0+x64 (linux)","description":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.8.0","dependencies":{"grpc":"1.24.11","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.3","@hyperledger/cactus-core":"^0.9.1-ci-942.cbb849c6.35+cbb849c6","@hyperledger/cactus-common":"^0.9.1-ci-942.cbb849c6.35+cbb849c6","@hyperledger/cactus-core-api":"^0.9.1-ci-942.cbb849c6.35+cbb849c6"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"^0.9.1-ci-942.cbb849c6.35+cbb849c6","@hyperledger/cactus-plugin-keychain-memory":"^0.9.1-ci-942.cbb849c6.35+cbb849c6"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_0.9.1-ci-942.cbb849c6.35_1632701683302_0.6237813848239848","host":"s3://npm-registry-packages"}},"0.10.0":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"0.10.0","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@0.10.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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"754965e3d89128fe534d15b5de0259f840a8925d","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-0.10.0.tgz","fileCount":55,"integrity":"sha512-+/0j73SsHfD+Z/TVyCZFRUVS+T1dpYNvA8nY4umgSu3uLRGKjsTIrS/QnV/Sbb9YshOxdG2pC7dPtRsR3kMzwA==","signatures":[{"sig":"MEUCIQC588/MlQjkOlAvuPs5T1YYU80jFQ0Qa9clyp9ZtyGz3AIgF7m5hlrut3A7jZkmX0lGJ+ZGiIGAc4pu6fm42WJK6eU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11077814},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"a298592dc8b0408c2b46619e37fdb97d90f4f2ce","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev webpack:prod","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:prod":"npm-run-all webpack:prod:node webpack:prod:web","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","webpack:prod:web":"webpack --env=prod --target=web --config ../../webpack.config.js","webpack:prod:node":"webpack --env=prod --target=node --config ../../webpack.config.js"},"_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.8.0+x64 (linux)","description":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.8.0","dependencies":{"grpc":"1.24.11","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.3","@hyperledger/cactus-core":"0.10.0","@hyperledger/cactus-common":"0.10.0","@hyperledger/cactus-core-api":"0.10.0"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"0.10.0","@hyperledger/cactus-plugin-keychain-memory":"0.10.0"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_0.10.0_1632801579969_0.21596378157027774","host":"s3://npm-registry-packages"}},"0.10.1-fix-quorum-no-keychain-endpoints.bf5e0403.1":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"0.10.1-fix-quorum-no-keychain-endpoints.bf5e0403.1","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@0.10.1-fix-quorum-no-keychain-endpoints.bf5e0403.1","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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"306c82accf15a50b050f893e524f048005689a97","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-0.10.1-fix-quorum-no-keychain-endpoints.bf5e0403.1.tgz","fileCount":48,"integrity":"sha512-v3OKXDcnn+2uW3x4D0e9nE0b85415APhUeDNzgbkJmK+E3qUUJZOY5DIEQohyJpIuBi68GFjzP3GTH1QJXTlEA==","signatures":[{"sig":"MEUCIBSf0dC33oakWeb1srjOCmC/i1sGvgKKHzp5WNqEphtOAiEAzGF4F1HlZNbeaGZ4a16WH0o5HblZ8kcauztPcFp0ub4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287194},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"bf5e0403907bef8d84e52eb945a71713f4c8385f","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev webpack:prod","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:prod":"npm-run-all webpack:prod:node webpack:prod:web","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","webpack:prod:web":"webpack --env=prod --target=web --config ../../webpack.config.js","webpack:prod:node":"webpack --env=prod --target=node --config ../../webpack.config.js"},"_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.8.0+x64 (linux)","description":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.8.0","dependencies":{"grpc":"1.24.11","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.3","@hyperledger/cactus-core":"^0.10.1-fix-quorum-no-keychain-endpoints.bf5e0403.1+bf5e0403","@hyperledger/cactus-common":"^0.10.1-fix-quorum-no-keychain-endpoints.bf5e0403.1+bf5e0403","@hyperledger/cactus-core-api":"^0.10.1-fix-quorum-no-keychain-endpoints.bf5e0403.1+bf5e0403"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"^0.10.1-fix-quorum-no-keychain-endpoints.bf5e0403.1+bf5e0403","@hyperledger/cactus-plugin-keychain-memory":"^0.10.1-fix-quorum-no-keychain-endpoints.bf5e0403.1+bf5e0403"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_0.10.1-fix-quorum-no-keychain-endpoints.bf5e0403.1_1632851116453_0.7306528035932367","host":"s3://npm-registry-packages"}},"0.10.1-fix-quorum-api-server.0677a0e6.4":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"0.10.1-fix-quorum-api-server.0677a0e6.4","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@0.10.1-fix-quorum-api-server.0677a0e6.4","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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"75b2e91d8d12205a97f595effae45eaad85b4e55","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-0.10.1-fix-quorum-api-server.0677a0e6.4.tgz","fileCount":50,"integrity":"sha512-8YuH51J6YcCOAlqtn6aGX1HGEDbpKnIcgHb6WgauVpzjD3M/RaMt97Jx/LDl8/L2HURXPPGJjN/aQO6eT9Tzxg==","signatures":[{"sig":"MEUCIQDcpmvFSVyHjbEbRdtyVVaJP4ZeHJR6FfRlZIKvQVb/EgIgTCitlcdEPo78/aLkd4DumVXzGXYp8NKvNi5zMBoH2Ww=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":302909},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"0677a0e61c21eb4851628a1897684e6c4bf92d48","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev webpack:prod","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:prod":"npm-run-all webpack:prod:node webpack:prod:web","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","webpack:prod:web":"webpack --env=prod --target=web --config ../../webpack.config.js","webpack:prod:node":"webpack --env=prod --target=node --config ../../webpack.config.js"},"_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.8.0+x64 (linux)","description":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.8.0","dependencies":{"grpc":"1.24.11","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.3","@hyperledger/cactus-core":"^0.10.1-fix-quorum-api-server.0677a0e6.4+0677a0e6","@hyperledger/cactus-common":"^0.10.1-fix-quorum-api-server.0677a0e6.4+0677a0e6","@hyperledger/cactus-core-api":"^0.10.1-fix-quorum-api-server.0677a0e6.4+0677a0e6"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"^0.10.1-fix-quorum-api-server.0677a0e6.4+0677a0e6","@hyperledger/cactus-plugin-keychain-memory":"^0.10.1-fix-quorum-api-server.0677a0e6.4+0677a0e6"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_0.10.1-fix-quorum-api-server.0677a0e6.4_1632927770024_0.6133253704174684","host":"s3://npm-registry-packages"}},"0.8.1-pr-brioux-1333.92b26c3a.36":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"0.8.1-pr-brioux-1333.92b26c3a.36","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@0.8.1-pr-brioux-1333.92b26c3a.36","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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"79ec4b21c51d561375af38967a7a17eac9fddd43","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-0.8.1-pr-brioux-1333.92b26c3a.36.tgz","fileCount":48,"integrity":"sha512-C7AKmsXL0dyz7dZw2nQO3EXKK6i+CoO+4um6kUwepfBksYCPtExF7IkOgMK8VYxedAsIEIix21cV/MeNs6PMfA==","signatures":[{"sig":"MEQCIE4HyYrmVoZjCxXlkAD4BCuh3LdcI8hKwD9cwPjiepn4AiBYE2ecrW6VX/tH9MXS6qzImHdAzdzUPwdx5gfj75tJQQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287964},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"92b26c3aec03f2be25f130c762a2fd162f265579","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev webpack:prod","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:prod":"npm-run-all webpack:prod:node webpack:prod:web","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","webpack:prod:web":"webpack --env=prod --target=web --config ../../webpack.config.js","webpack:prod:node":"webpack --env=prod --target=node --config ../../webpack.config.js"},"_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.9.1+x64 (linux)","description":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.9.1","dependencies":{"grpc":"1.24.11","axios":"0.21.1","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.3","@hyperledger/cactus-core":"^0.8.1-pr-brioux-1333.92b26c3a.36+92b26c3a","@hyperledger/cactus-common":"^0.8.1-pr-brioux-1333.92b26c3a.36+92b26c3a","@hyperledger/cactus-core-api":"^0.8.1-pr-brioux-1333.92b26c3a.36+92b26c3a"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"^0.8.1-pr-brioux-1333.92b26c3a.36+92b26c3a","@hyperledger/cactus-plugin-keychain-memory":"^0.8.1-pr-brioux-1333.92b26c3a.36+92b26c3a"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_0.8.1-pr-brioux-1333.92b26c3a.36_1633546279859_0.029902355841676886","host":"s3://npm-registry-packages"}},"1.0.0-rc.1":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"1.0.0-rc.1","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@1.0.0-rc.1","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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"d0ec94b960632b6f1ac8972219fcab10c5a5d192","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-1.0.0-rc.1.tgz","fileCount":51,"integrity":"sha512-wkxPXH3qoitY/ccv3ofv01toin/uASLiNc0aUNPAv7thUGd22WjBwvb12P7n0tZEbnKr2nnkcQs1JzhjMWhXoQ==","signatures":[{"sig":"MEUCIQDBcyUE3KFlYUJDkTa7SJF+dq+kYRamIONmHn5ivk9qegIgbLxi+lMCz3Gk0mJkDtqlfceCOTxhZd84Qc3Z1MWcwkE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":959382},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"bfe342e9f443737a3bc083e0d9697024021229ae","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js"},"_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.8.0+x64 (linux)","description":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.8.0","dependencies":{"grpc":"1.24.11","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.3","@hyperledger/cactus-core":"1.0.0-rc.1","@hyperledger/cactus-common":"1.0.0-rc.1","@hyperledger/cactus-core-api":"1.0.0-rc.1"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"1.0.0-rc.1","@hyperledger/cactus-plugin-keychain-memory":"1.0.0-rc.1"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_1.0.0-rc.1_1634001072160_0.9888176875796872","host":"s3://npm-registry-packages"}},"1.0.0-rc.2":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"1.0.0-rc.2","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@1.0.0-rc.2","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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"5851fbfcd1b7bee2cd646d1cf0cd0c04fe6dbbfd","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-1.0.0-rc.2.tgz","fileCount":51,"integrity":"sha512-aZC4d5NPr/w66w7uDS8E5D8COjG0esqP7L+gAj73Ps+2URoFssLsl4DA+IWTEdJZMx+IbWyKuN4FGR0T9UXDiQ==","signatures":[{"sig":"MEUCIFTLTe7fNgacbeh9vAFyS1YVGECJ6QMf+pblV6aX6THkAiEAov/uLtTVZuy6JRYvOEGttDgU5WqkrqyCTzStTewcyhE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":959382},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"b673fbe019554b6f946d14a7e928f92d3d4126ee","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js"},"_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.8.0+x64 (linux)","description":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.8.0","dependencies":{"grpc":"1.24.11","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.3","@hyperledger/cactus-core":"1.0.0-rc.2","@hyperledger/cactus-common":"1.0.0-rc.2","@hyperledger/cactus-core-api":"1.0.0-rc.2"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"1.0.0-rc.2","@hyperledger/cactus-plugin-keychain-memory":"1.0.0-rc.2"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_1.0.0-rc.2_1635876125586_0.4827843842053645","host":"s3://npm-registry-packages"}},"1.0.0-rc.3":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"1.0.0-rc.3","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"548b8282356371097784f6adaf0f55590b44d6fc","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-1.0.0-rc.3.tgz","fileCount":51,"integrity":"sha512-ScXs2wS2OYhteNjxTl+i6SSBfdRLdjEMMty/Gb2VgdyjOMpGteeTShNiak9N4MxUztIPFUGljaOvLK0lr9TbZA==","signatures":[{"sig":"MEUCIQCZpZdSaqhMGW+iNiItYL9kF5eaHVI2FFgR43RY1fYDkwIgYVSyntSOXAM9qiNO594Mk/F4DgaReo2/Tt5oBy0wMQM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":959142,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsCB8CRA9TVsSAnZWagAAaJwP/3iv3c3Qye+e7kKIvB38\nA71gr3km68gCP3oLkcwCQGEjiIp8PCWV9RNqmQdPyn2OM5cR2cnA1REr1BZZ\nq0AE+Ig4Qb0fB1o4dV9S3YHyEucf/d5Sa54V5Ij0Ov/SXa2n4JIw/usNd2MO\nd2iAVh/KQIB86yOMC5d3V0QeDQnBrZ3GEQ+2G9Z955lOEvczK5IzB5YuCL0F\nQqcnXI06uqLD864qdTSWM7aMgcKZPHfhtIzZjoUHqmvosJjyJliuEUzo7jjS\n1/CjhdEFcf6F3c2DmsAd+rxv3tg1WYlZuIIImHAkow0RMVCzJAF/N9YTZqo3\nm5kIENkXuLwQDlvMwOVKUlLV8cYGcKXW3Y3DLrpN6sjq9OKb8rfvIxmf0kLK\nBKstzZzBREZevtk9dDTWB4br7/eVh0yIewi9p4TLpx5r/m4rc3X3ooQm81xs\nyj29ZbkKBx0wN+1BEWNFpofPx4uDZTRahNGANPfl0BDeF3/EjzM9V/TsBVJ5\ns5AzGl7li7fRqxZDCLMkG4StzwN7jFWpJu0y4jESsWndkk3E/uKfQ7pMvyno\nGVzJiTnsTFOb066BPhZ3wZWLK/LO+g+asHMKZZ1PfdyFpdGEs6IIJFsyIzOd\nXU0qvWB8JFy1O6QIx3Ao7LM3jUC/5UcavFkglC821yajOkHY3YkHJ6cJUVMa\ncJAC\r\n=vpgE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"fdd888396d6727ee225b6729a2aac6d6d05b802c","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js"},"_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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.7.0","dependencies":{"grpc":"1.24.11","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@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"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"1.0.0-rc.3","@hyperledger/cactus-plugin-keychain-memory":"1.0.0-rc.3"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_1.0.0-rc.3_1638932604538_0.6593228881045525","host":"s3://npm-registry-packages"}},"1.0.0-main.334593a7.46":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"1.0.0-main.334593a7.46","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"9c11ef66cdb5abe78d5dd4792f830a7213fbfa1c","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-1.0.0-main.334593a7.46.tgz","fileCount":50,"integrity":"sha512-gOn5B/TQVU8YqEYC1X4pvGIkpo3tOVwqod/tW97ROzdNaSiB/7WSrUdBe/4bDaUvm5OAwiYXhHfZAaWkpLQdKg==","signatures":[{"sig":"MEUCIEQ+gERNUHHhXlLeYQjaWQMZFqXnMNSSrbbKoHfy9mipAiEA+vwY+VM9MVmcqHnBCUeFYN2VRxOi2ee+FDjp3+cwgR0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":302296,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5hESCRA9TVsSAnZWagAAbHUQAJ/r+1SDeavqszWoBFJ9\nj0oYxmxHE59WtYq8k+klU7BDhohqKommYz5zsVryuxC5TGFA9DmddiwdSLB0\n4ZZZYR84zopN1IW9uSP6U1zV3GmZ23r1elxsu5Rwj7F8yEqkIuUKu0oKVtot\nmpdplxf8LkvnaS6apy05bdE5v7a+7+6Vhd6xPz5nvY3Ixx9nfcuk8BFgMsZd\nK/bhM9bTnmV9bvf0c9SGdihW+GahB+xsOkYY6vMdysWmRLM5NpdDFINN38wj\nH7/IKOVcLglFpi8gmh6LfctSnLQNlOubl57WegMhpLsduHCXGcWCQ7Q0JKwH\nV5p6x5TQ2y0U2Z1eI09in5LUfoUHzel8Nq/gQ+Xw/ewxyamJ7U9XMvOeL3Ci\nkcaOmGT8Wo58mGmeayA84k1+DZrytuaov/GNyatBhwvofFMlKZB2CU+BZghQ\nKHO2FelW6+ZeyH72NGniLNxihtPDE0yDs1uT2TDyvoEHsbFLQXKwb3ufE3ts\nJqF2m9ONU9PuE1U8+zrEG3Qzrm781xgXbn/pOrmBeISpiGzIbpPhIwRYRvCf\n+KEHxYCs3LtmeJyweyaN6r8MmmAbZiplFU8SfiFYkHvvTiwa2srEJQHEGr/l\nj2CtBYiHozzv1ggfsfhzV695z+gh+nlmXeES7D/P7ydl3LOO3Zwfffg1FsHD\nOBZ5\r\n=DkvI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"334593a74e9ba454a5e5b2511f1784a569564aaa","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js"},"_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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.13.1","dependencies":{"grpc":"1.24.11","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@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"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"^1.0.0-main.334593a7.46+334593a7","@hyperledger/cactus-plugin-keychain-memory":"^1.0.0-main.334593a7.46+334593a7"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_1.0.0-main.334593a7.46_1642467602001_0.18875645853835366","host":"s3://npm-registry-packages"}},"1.0.0-jwt-supply-chain.62c7e930.0":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"1.0.0-jwt-supply-chain.62c7e930.0","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"9824f23bdfcdbac363cefbf95255dca23dd27102","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-1.0.0-jwt-supply-chain.62c7e930.0.tgz","fileCount":51,"integrity":"sha512-aIW1zGVb8hTC/VdYbNTrkMa9cHCvwmidvLCPhPDjZVaVU9kv5mao+4ASYN6tkLQ41BsFntNr5CbhTw6JdEtKAg==","signatures":[{"sig":"MEUCIQD8ndIHLbC0cP7wD4yXWV7qLjeRWUfCo5FowrhEkMuI6gIgDcjI3lmSJfMQnCkdTirJcFP1MW3t3y+bPWHc7RoDqik=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":959339,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+yDrCRA9TVsSAnZWagAAlDgP/RZg9t3ug9ds2wJBq4UQ\ntA7Pl5zBudy/MXBxt5FC+JJwGX+Ohx/m4DXnJklmoABTf3OhJoO6K07yto+x\n/mo91bf6Dgsl1bde0+4f3lvLI7vm6drmoIswFp2vpFxDAnB2WC/jL1FURuov\nDV/vzCbHJz6QNu9K+qzbBocdifNFUU/12QDDsFQnXppO2cI3pC8KLGir/m70\nlzQw8xIihZAllMA8TEyfC9FWUNusShz3qd6Km8CkU/uxpCMt7KRNiXK2b1SG\nBUFKuJRMtjI3ZrH6ekaNlOpIUO2iYJCNTNO+1OCqN+c4L29mvmVH9L4G+rdt\nEDHMtK3gNGJENRdPkEYNRtV93w2nNUdxYPrFZcO9lrRoqkXD5tP98adnT1UD\nZpZlDF7iAIxZJtRB1vEBvX7kSg2VYg74Z+l7cVAXK49zLVmddMgz/wCL+FcA\n+2B+/BVDZWRzEp9RLi5ndcZsnzlT2X7bbAfwg0Zz9z2Yvbkwf+LPPdrZmUde\nKpPLIzIWk7mejEnhmF8GxLB+2Pl8wN1gQ6ZvytUN7LBZ8FSvA6faDqUUiGt9\nPlf2PC3BDYmxydLfWPkodUAykz/FCNH5X+9mGy3kG7rf6boknMmyqfblyQig\njwXeGIoGUnfg05+ypc6pAcjx9Pi/fAipVEdSxdzsCo7m667M3AYrK6lO3Vww\nKkOh\r\n=6uMT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"62c7e9301a806f7dbdd300247b692dbaa3abf570","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js"},"_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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.13.1","dependencies":{"grpc":"1.24.11","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@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"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"^1.0.0-jwt-supply-chain.62c7e930.0+62c7e930","@hyperledger/cactus-plugin-keychain-memory":"^1.0.0-jwt-supply-chain.62c7e930.0+62c7e930"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_1.0.0-jwt-supply-chain.62c7e930.0_1643847915209_0.5255791377315493","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"1.0.0","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"a4db2a677894f5299a98c6e05b32ace2bc3ba128","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-1.0.0.tgz","fileCount":51,"integrity":"sha512-AdQ+nlV0XNv9G+WxOeEVWQLsQ8E1a1cVF8m0FOhO9lZavJ/TjMaRD0GoQYj66PY7d8JWKhX3P4JI+CmKoOJqUA==","signatures":[{"sig":"MEUCIBcsBjc+wbda3J3VtiRAq5ZgqkaPn3KhgEh9PMmpG3YrAiEAqg2N/H/aZ7Ujn9kwr1uYFs/lnlALjVPV1pBRu134nOE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":959120,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMnvCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRog//TKjuyEJizqt3JaQCYvh3W0BvrpBSMATr4MUfKF0jTvxD0K7I\r\nVd52bXS0y+ZLj9mvINiuxYYfJGIJdWTVmgNKGWWqRLPxPANbRx22mQvUApLL\r\nKg/d6EHA5xIdO4heFQ2P18k9QvaTvOC1dM42pTIkVwPmDAbfu8Jd4PAXwGxQ\r\nijjh94LnkspldhjMazf7qgViaHzEVjjiPHpwEkrcM9ECRZIio45KRpTM06QC\r\nmucop8TQ87KlQuCenHpreoEA/bR5QseeI6Hx1WhwWeUK21pzbSkGBUxrp/r/\r\n2kihgbq977Z2mMia96Y6qzF3Q9Vz9UHA0imFA9pOLO1VOQCMJeVDkH9XwU4I\r\nibkVF7fXcJsigdorIU9oAJc7XiO/5uyyUrMp0dZ2iWOwf5+9rsmVhQDRgLWD\r\n6QKZHRMCpzuOdVGVhCDZj3DYef28bH8cvRedVBc77Izamb66IW8n2a6O3Jnz\r\nunk2PNJgVQ9l+SWJKfYE4Q7WCimYGQgwqQWqCDuiwsDEotBOShhIPs2tp2JO\r\nmiOjHYX65ZMWNqwsBE101W3Xrp6wvg02mtfmsjIbFT0ngBUHT7EFqkpSlgMR\r\n/poiwJSxWMBjhuCBZ1/pF+w7d11ddxloOBgUffU0WytwWwtgpCdMGoC1u7jH\r\nGNaSvdlprh65wMrGdXHkZkEoU52AsuH3C6w=\r\n=rRNI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"864449fb96c39e4605d5df4d51465af765b3d10f","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js"},"_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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.13.1","dependencies":{"grpc":"1.24.11","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@hyperledger/cactus-core":"1.0.0","@hyperledger/cactus-common":"1.0.0","@hyperledger/cactus-core-api":"1.0.0"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"1.0.0","@hyperledger/cactus-plugin-keychain-memory":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_1.0.0_1647475649794_0.8775517244406732","host":"s3://npm-registry-packages"}},"1.0.1-jwt-supply-chain.9df3fe79.16":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"1.0.1-jwt-supply-chain.9df3fe79.16","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@1.0.1-jwt-supply-chain.9df3fe79.16","maintainers":[{"name":"peter.somogyvari","email":"peter.somogyvari@accenture.com"}],"contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"47e4f04ae409efb8ffab210b8f6ce6da9f60bdfd","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-1.0.1-jwt-supply-chain.9df3fe79.16.tgz","fileCount":51,"integrity":"sha512-fl05Nxz+8q3nHrbVInPcOzwveSmyyEE3AXU75Mk3h+tnFVS2n1NPrSqOo8VEakwxt6DbksG0jbluuGxOW/tcpg==","signatures":[{"sig":"MEUCIQCbX1VvVjLRlLwg1SjV3Yw4DdZVupOhJ74+ldjsf/4HzAIgDkkwqCeniJhWFziHHSfhFfbZaTlCobMf0ol2QhfLoDc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":959353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTHYfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpK9A/+M4GsHECBc6Ac9bCGYjqCOQY4NmyWGdTDg0BygFZhA69+htFu\r\nn1u2cYjpuFECYntsi5lOGdktRuJ1/98ziNT4JPkVRuxVOyIcXxKGlgLIRwIi\r\n0Q/TT+T/yXKLuOjfyR/8W6MZp0iSPoGfv9vCi+THGjQDNLzzBIzfYg+pg3Ml\r\nNt/9pv5g3lrOxT8sXs1IRvTHA3tu0wDzwgBnB2y3vPCIo976wf18vSCx2pke\r\n43/OJJVyVHB9RA7Lu2gE7sbmDlgYVFhjk0rIoP8HhjdVrp3RkrZJcqb2uye5\r\n/Z0f9Ctc2R0++RhRsaq/O2k9RXNW1NA8f7U556F4IcwVd7lbmVNcSqt3KKmT\r\nRG372ZX4KXeOU7w0Phlq+nWyLYFMg/ogU5aogiFBLVcMsQYlyYIV/PkShYYM\r\nb04fWlm836iavWHdsl4RXLlHbGAJQCk1tZVLox8j/eeeyVcyxWLqg0qcFpjn\r\nelNp50yHJuej/AGkaLptTbeSfGwyRuDfedt4kHaCw5eMlBgmbJyxibd/bJmY\r\nw/XoBvbEjDyAt4Zpw/SsbxCTyImOP/c88WdVo8ekI3/uxVGANUa6mvgTw+1t\r\noosFIHxpyA9xZApuCDIgdWgtBAPxn/pujB0dTg2n9iFXz+yK7fy9ibHyDwDv\r\n/Z3f1My47KZt5/zA33M5C1S91YKgJ+05byQ=\r\n=aLZA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"9df3fe79252a78893e746a303e4f30d3a725a559","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js"},"_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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.13.1","dependencies":{"grpc":"1.24.11","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","iroha-helpers-ts":"0.9.25-ss","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@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"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@hyperledger/cactus-test-tooling":"^1.0.1-jwt-supply-chain.9df3fe79.16+9df3fe79","@hyperledger/cactus-plugin-keychain-memory":"^1.0.1-jwt-supply-chain.9df3fe79.16+9df3fe79"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_1.0.1-jwt-supply-chain.9df3fe79.16_1649178143689_0.40062291218146795","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"1.1.2","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"ca3dfbb987cbb8959141ac5675a0264f3f3c6528","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-1.1.2.tgz","fileCount":56,"integrity":"sha512-506xNEPGIGuAxZZlhB/DfTKcPdD+dMMTLvnCiy8TMtqf/L1P92sF94Mlp3uQ/EC1vEVRC31M2UTbJnHEWiyl7g==","signatures":[{"sig":"MEUCIQCDQUlscNkvMkH4WR98Dr5sIcLGimF/HhZOO/M4QxB3bgIgCRRt6imaP4FWNFUL8TvLXU6e/RruG11ZqhSQCYQAOvI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1155570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbuTjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1AA/+JIvqbYYbs8YZb+9NJ6lkeoQVQ8Cd119ySdTga8AziBoHbDC9\r\ncnu8c1oKHqR5mco75AZDgs6Bzd+qRLJoFQ13gVVUh3UoydKHM+ccqOqOHRoQ\r\n2Zh/f7RpG2LjjoPOCrYBBD9W0rcYUjFcEgn9UKXNMfmqdkdJT0iGS/6Q4ASb\r\nzuyuawwgDxlHMnHObduIQo3dC8kiW08Bzjc2QM3o9IbII90vzGySKJYEQ1Ex\r\nVAwffdGrsg6yLh+WLrSW5F6rDy+dlLAHUuB/yWwNusSK90+n63RzFJBGeEk6\r\nPZ0pPPJ9AdPBR2sP6W/Pkq5v8sBsU5sa+pZzsZPeBwkehgSmrxnhrnbDPSFR\r\nbDaTufRfKaJzKq9oBwIoOx9bLa0nX6GgcKAHiL7qBH/fCWtYbrBdbjX8yQLv\r\ngvrtrtwCFhMg51Aw7K1TcyNak24UUcBTrZ8Q4DzTCRHYfG4Adq6uZpY/FgIw\r\nYuU1TEMG7T8rYdpiHzznvOiSFctYnY38he8MmjQwWTDpnKQKX04YmVIJQ/HS\r\nqcp+cnE2fRKYEd1L2QcnOxtzxFnaav0LRhm07jIuWAT+dcp1Q6QKeXhff9sM\r\nOVqRKpXtGhCx1tzwEsCWtuH6l7RwHzUSSe/JgFm0iLizMh7fWjk/55msy1Ev\r\nbCts6mvpc6FFghw3yMBeDqdGVAZmi4w9spw=\r\n=THBx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"c339075fbcda8a26521c0414c9334d49d569dfe4","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js"},"_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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"grpc":"1.24.11","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","sanitize-html":"2.7.0","iroha-helpers-ts":"0.9.25-ss","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@hyperledger/cactus-core":"1.1.2","@hyperledger/cactus-common":"1.1.2","@hyperledger/cactus-core-api":"1.1.2"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@types/sanitize-html":"2.6.2","@hyperledger/cactus-test-tooling":"1.1.2","@hyperledger/cactus-plugin-keychain-memory":"1.1.2"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_1.1.2_1668211939460_0.4083783819304867","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"1.1.1","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"336527cda1e6788e37ac61f7d9194b630413ff00","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-1.1.1.tgz","fileCount":57,"integrity":"sha512-R/akwMOwVwO0MzynKQhbOCXIJjrmGL1peT/CrkPBuNNgIoo/DU7D7qBDCeHVNz/xfSbNm9GLNaeHsEMqBPQ3lA==","signatures":[{"sig":"MEQCICJa1/7a5DMHK9o8182q+MJat3r/fLE93opqxlK7L1syAiBuffneorcggie7vBFU4hkNtTgg9jVjkan9uKqiLeLBZg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1166927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjc/YCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqTYBAAjuwu1wWT0SA7mHcxIokSlcpxBpvIy5zOzJg9uO/VL8ZIGULU\r\nN3SAts/+azdYXH9lJUV265ACdSVaCG4EXbhzbrsM4CZokmF2xVlzEDUVbj3L\r\nelV4lO3MXmllY3nYmcHlivq1htCgnugmF934ks2cRKMH2cI8OnH5eTbXDUIt\r\nN/3dvWhCBR+KkT+hVsIiBfgA66nZmtsnLgArCXvYJlrYSARtrNgcvnG4YFXx\r\ngGttWQehnxKZLMOFSZsv66lOcBL5uptL1xlyKLgyMo2ccgKPv+Gx/86mIQ8Y\r\nDjvAB0786lUVYTXWYgaXfd0E1IGcVuyebKJjle28ohBAYoCf69JCf3wIvUT4\r\n7W4Arp6WUTu8kT1D/EoFxDik7yGJ7Y7YevbQeG23waqvuKJu6iVjz+soMUrg\r\n6g0oqEEDYlwU8ICb8+iswtH1d8SsUVAKR0DrTccZY4lzQ392yMXZ72EIEfvP\r\nVNQ8DsqcotT6MCBj/Z4wcLYFHvWp1uzAhSuq/89LQYY54dP5JKHbNUPSXGxC\r\nwLOCDzXG5Ea1Jqm48vbpWJnnIGkkL55ZDS+z6tzmQcQ8otA4/zYAuFrrrprv\r\ngqdQVSR/vL+fWxLFhKd7VYD90+f9lXDumhqEnvRLydv59eXTImxTfak4c8jc\r\n6nex3Ko1C1LuC3mQGdPFvrP6u9wlO0vJ0Vw=\r\n=atK0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"d7cb611aaa5c278b0d2fba544f60f645be31e7bd","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js"},"_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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"grpc":"1.24.11","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","sanitize-html":"2.7.0","iroha-helpers-ts":"0.9.25-ss","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@hyperledger/cactus-core":"1.1.1","@hyperledger/cactus-common":"1.1.1","@hyperledger/cactus-core-api":"1.1.1"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@types/sanitize-html":"2.6.2","@hyperledger/cactus-test-tooling":"1.1.1","@hyperledger/cactus-plugin-keychain-memory":"1.1.1"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_1.1.1_1668544001776_0.9328124998396619","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"1.1.0","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"085bb9f0d7ae2e3b280a485339a21bd4210bb642","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-1.1.0.tgz","fileCount":57,"integrity":"sha512-LWLWs9fJtFgbZbqolD892ElvmVEu/HPGZ0puJtMpzDPMB2lXZ7MD4rziZ3NTrUmb+vIfGn7SklQjpJC5aC6s2g==","signatures":[{"sig":"MEYCIQD57Ms6HrCNcbFcP5VaM1A9eL6sgN4DZh95Rx0VbuuvswIhAKolx37tQhoCaUE9rwzvpYPI+Ip1LYqmIhZZSpp5RFPy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1059257,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjc/gtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr13g//XYCxdHEbHdeeWc7kj3jzTq4vHfOORcu1qyMTwrDNRfYR8XCX\r\n896EyQbtY0Iro9aa9lsFRtYR1jUsmG7etAJSVxl8aYj9Rw6YqN8Rcbt29Gqk\r\nIhPxt4IHJQ9TrA/+pobh/APsMBGn3CHDhG/EDN+mjb0/qbsbHqNDtK2KQ8qy\r\nYxZqQnkM5zaief0ypdiO4sIcgPSnzpqS4YuOfPZhn/1jp5ineB76poTvesGP\r\nFpljWnqRRRjV0YUaRJgzcVZf8SA9iC8hvMvFqbimQO8cXBoktUZfj3cGX8K5\r\nYwQCTCvwj6orpO9MZxnC7HqTxoxu22YNlC+ydHfrUSDyi6OOGNDWVyDq0hKF\r\nKPST8FNF2DmVrbW8Ib8pv4cb78nYf4ojAfBh45+UprBA6nIgtSpCC8cuSSkf\r\n3WwnH53DXe9Jvp0dVbyiYX9U06cyfCLJfC0Zgj3MfsgGp1gk2RERteoIds1E\r\nzvTsHQaE4cyPuol6Kt6MbCr5Cyv/BipqWNIoZIm/EYHz9B5q0BcR3DY6KQTG\r\neQ4R1KmThd5+ClfDkOt+MaPuwJMT2o1WjbgtPNW36vE3iBeebYd8AGjPzp4H\r\nl44wZ6YH/oZEo8DE1zLrKMS/TAhiIP2xxzLw9GFZZ7Ga3QPR+k0pBmVx+baV\r\nQ+cthOQXek/nvSsLLtwqN3MZB6FiYCfNmy0=\r\n=Wdnz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"cc8deb8167ec485d7bc1e7145d8573b112775e31","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js"},"_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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"grpc":"1.24.11","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","openapi-types":"7.0.1","sanitize-html":"2.7.0","iroha-helpers-ts":"0.9.25-ss","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@hyperledger/cactus-core":"1.1.0","@hyperledger/cactus-common":"1.1.0","@hyperledger/cactus-core-api":"1.1.0"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@types/sanitize-html":"2.6.2","@hyperledger/cactus-test-tooling":"1.1.0","@hyperledger/cactus-plugin-keychain-memory":"1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_1.1.0_1668544557234_0.019404585407007735","host":"s3://npm-registry-packages"}},"1.1.3":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"1.1.3","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cactus#readme","bugs":{"url":"https://github.com/hyperledger/cactus/issues"},"dist":{"shasum":"72f25efb160cc9ab59cf070616f9d918d231893f","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-1.1.3.tgz","fileCount":65,"integrity":"sha512-EL0k490UV0/cAuuipQFQc7dQvwvbPNsxm1iru/jlDze5w4yWJXT+S4H/1l7greCGr0Nn4VpxmFU7MZtX+Xd70Q==","signatures":[{"sig":"MEUCIQDp1MCCuKaKaJy6RFvXlo5DUARf2O15kHVkxLTSvlgGMAIgGD8Pj0Cv5YkTGod2bS8PaJF6iHt/aW5XJodbXL2vrwQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1258966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmm8rACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoXUw//XUtyS9UpKnjbGXbqTAoAlNbxiA2h4Sv0osfFN+4f2m0wgGEC\r\nrw1sdxG3ffcHrmmtnN6mEDUhlMCYXz9O3xcSb7ixlsKR5R10PCXes5Axo7MF\r\nVVgPcmsOLf7z39b6A7Ms1wWN0dBJoCduvbMFIayjoR0KoTb4EwkDwo23aqJt\r\nzzmbYW0m9TrMr5Y1wNMGaAAl/p+GvoHZ79u0kzp7BH4YJD+r2yj1VCw+ovnF\r\nzagqC4Njopzgs91ByClu3SAkupKCMwbOwlfx9q7MPCevLFK51GDmS0RGxlbS\r\nFPPzhYgKmW9zsyUR2jKkGKh6saUloaciKNPWDI7DLjoTvtyAwKWSJmvE28t2\r\n0Rgot2xmSlGXhPjACmgOAu4a6d/aV6hcoSYPtf9p4EYKVO0r9qvaWjj+WjMM\r\n3k8CHWBQXxLnLXvFdTQB3ToMKL+x5WwR/ryekhocCc73cX7eOU32lr9bBrXg\r\nK7ufm4CasuZ+OmPKv/CkDoLbYESm/bq1icM7fEoXfHVFp5fqJksNBzLwvBjR\r\nK/BRw4VFsvyvNMYGln0sfLt4vJ6JB+XrP14CpxQq62YPhOxBLN2HaeQJnCtE\r\ndN9J5Ov1asvzCKNo21eO3bjbNuNwwGpnMtfoa+lYBSIM9AC85Xb5LCMajsl5\r\num1eWjekG3dc3pb8Opmgj9md+uD4iqelr94=\r\n=gPuF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"795ee6bbd9637c2259fe92d0f56780d36121c538","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","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","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js"},"_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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"grpc":"1.24.11","rxjs":"7.3.0","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","iroha-helpers":"1.5.0","openapi-types":"7.0.1","sanitize-html":"2.7.0","run-time-error":"1.4.0","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@hyperledger/cactus-core":"1.1.3","@hyperledger/cactus-common":"1.1.3","@hyperledger/cactus-core-api":"1.1.3"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@types/sanitize-html":"2.6.2","@hyperledger/cactus-test-tooling":"1.1.3","@hyperledger/cactus-plugin-keychain-memory":"1.1.3"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_1.1.3_1671065387003_0.2838846869825564","host":"s3://npm-registry-packages"}},"2.0.0-alpha.1":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"2.0.0-alpha.1","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"eedc3e321fa1ab4eac0548db2bcc70605da88b2a","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-2.0.0-alpha.1.tgz","fileCount":64,"integrity":"sha512-KCk2D+MONoLpKkGwIGKLHhoDt3iyNfqVhpHimVFa4cjyedQIegpWgPBOI3qYG0fRcErGDSsePnWjcf8TQM6ESQ==","signatures":[{"sig":"MEQCIDnXQltNgFvW8o+DvAFuYeB2Bt0rk7AyA4Vl8PP3b9XaAiBBQcnBvnxT2lmv5ZOyWvEt3rn0J4bK21DVc4shGBRISQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":553452},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"e54842d168be78a3cd327ca07c24b75ea43043f8","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","generate-sdk":"run-p generate-sdk:*","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"16.20.2","dependencies":{"grpc":"1.24.11","rxjs":"7.3.0","axios":"0.21.4","express":"4.17.1","prom-client":"13.1.0","iroha-helpers":"1.5.0","openapi-types":"7.0.1","sanitize-html":"2.7.0","run-time-error":"1.4.0","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@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"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"@types/express":"4.17.8","@types/sanitize-html":"2.6.2","@hyperledger/cactus-test-tooling":"2.0.0-alpha.1","@hyperledger/cactus-plugin-keychain-memory":"2.0.0-alpha.1"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_2.0.0-alpha.1_1694280551522_0.3862687287760509","host":"s3://npm-registry-packages"}},"2.0.0-alpha.2":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"2.0.0-alpha.2","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"86f6462f5caab499cf9c677ec4678cdc80cd12a3","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-2.0.0-alpha.2.tgz","fileCount":65,"integrity":"sha512-o+HrdXBwP4/vU6MoF0yIjH8Q9lNfhXqeyQSGpMuqESr0RraE7jEktUV3LXtZIWeXZWy1EsJYtBjqgLipY7IHBQ==","signatures":[{"sig":"MEQCIAFUqNAGUHjyWBXalAunpyJniGkFS4NybtyPbAbiogfTAiAiBVTUForqffiU0rwqm1vXPf5vnKAth2X9kt+zjZM7Xg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1267605},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"e5c7bd9c302d4addf07dd0bbb24361199940e7f4","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"18.12.1","dependencies":{"grpc":"1.24.11","rxjs":"7.8.1","axios":"0.21.4","express":"4.17.1","key-encoder":"2.0.3","prom-client":"13.1.0","iroha-helpers":"1.5.0","openapi-types":"7.0.1","sanitize-html":"2.7.0","run-time-error":"1.4.0","socket.io-client":"4.5.4","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@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"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"socket.io":"4.5.4","internal-ip":"6.2.0","@types/express":"4.17.8","@types/sanitize-html":"2.6.2","@hyperledger/cactus-test-tooling":"2.0.0-alpha.2","@hyperledger/cactus-plugin-keychain-memory":"2.0.0-alpha.2"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_2.0.0-alpha.2_1696402060124_0.25374601355690984","host":"s3://npm-registry-packages"}},"2.0.0-dev.93":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"2.0.0-dev.93","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"36a8bf790cce5ef09dce805ad4ad18dba2616266","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-2.0.0-dev.93.tgz","fileCount":65,"integrity":"sha512-moIZCKLkVOuJlLLO6G/UpVxgaLGs6DgPP5VCxfpQxXZCNS/VfzN6nWP3BPDAqtEVKm+xm47fNSypbNIL0fCEkQ==","signatures":[{"sig":"MEQCIGziF+WMfrrBpuq1IEs9OkbueMIzyrWK915/MALx71dOAiAvD1UVDo+PnaNQX7DcTtbKXzUHs0tuZo0QDmpeSP0g7Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1516600},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"df265e0b97b7c2b52587d0bcc923b9917c5c00c5","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"20.9.0","dependencies":{"rxjs":"7.8.1","axios":"1.5.1","express":"4.18.2","key-encoder":"2.0.3","prom-client":"13.1.0","@grpc/grpc-js":"1.9.5","iroha-helpers":"1.5.0","openapi-types":"7.0.1","sanitize-html":"2.7.0","run-time-error-cjs":"1.4.0","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@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","socket.io-client-fixed-types":"4.5.4"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"uuid":"9.0.1","socket.io":"4.5.4","@types/uuid":"9.0.6","body-parser":"1.20.2","internal-ip":"6.2.0","@types/express":"4.17.19","@types/body-parser":"1.19.4","@types/sanitize-html":"2.6.2","@hyperledger/cactus-test-tooling":"^2.0.0-dev.93+df265e0b9","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-dev.93+df265e0b9"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_2.0.0-dev.93_1700104490055_0.9189446832149568","host":"s3://npm-registry-packages"}},"2.0.0-dev.94":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"2.0.0-dev.94","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"17e213133d71298e0b6624ea8bf9c84a11de2760","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-2.0.0-dev.94.tgz","fileCount":65,"integrity":"sha512-5zttOx7gJjItcEC3PEYpSmVM5jx8dpu7VY2oD36CLroEc94hAh8Y7KOYGvRWEDclmKfGVuJn4oqgsOToPsC9aA==","signatures":[{"sig":"MEUCIQDBFDvTcPUN3wAOOBsia1IbhU52rxvUuvp20zND7wDdDwIgJGN072WuxNfuOCpvfbDELiuhaY6SPTIa6LDDqvQpDo8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1516600},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"50f45779e3ad1198123b24bd2013c7eb24fb2ff2","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"20.9.0","dependencies":{"rxjs":"7.8.1","axios":"1.5.1","express":"4.18.2","key-encoder":"2.0.3","prom-client":"13.1.0","@grpc/grpc-js":"1.9.5","iroha-helpers":"1.5.0","openapi-types":"7.0.1","sanitize-html":"2.7.0","run-time-error-cjs":"1.4.0","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@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","socket.io-client-fixed-types":"4.5.4"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"uuid":"9.0.1","socket.io":"4.5.4","@types/uuid":"9.0.6","body-parser":"1.20.2","internal-ip":"6.2.0","@types/express":"4.17.19","@types/body-parser":"1.19.4","@types/sanitize-html":"2.6.2","@hyperledger/cactus-test-tooling":"^2.0.0-dev.94+50f45779e","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-dev.94+50f45779e"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_2.0.0-dev.94_1700110368465_0.22965205818735757","host":"s3://npm-registry-packages"}},"2.0.0-main.91":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"2.0.0-main.91","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"8dac7a5ff4863c2e6f25fea08266a3949fd91e77","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-2.0.0-main.91.tgz","fileCount":65,"integrity":"sha512-BwfQFLc5TKyLbLDREd4gDSi/JLcaW/EyCyANWSe6gx36E48E9FNEot7hhX0Chdn7ULVCnPqyUy06g+nj28Az6g==","signatures":[{"sig":"MEUCIQDGe8MnsGlwZO05t5V/oUzo6puawg7sWfpgiDd/qonU0gIgIwx9yKvfqpaA90HeAFv/lqYsB+vZHvsZD9eIDYKFm64=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1516606},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"89d9b93b7380477c10d8da78fcd259c95b495fa9","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"20.9.0","dependencies":{"rxjs":"7.8.1","axios":"1.5.1","express":"4.18.2","key-encoder":"2.0.3","prom-client":"13.1.0","@grpc/grpc-js":"1.9.5","iroha-helpers":"1.5.0","openapi-types":"7.0.1","sanitize-html":"2.7.0","run-time-error-cjs":"1.4.0","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@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","socket.io-client-fixed-types":"4.5.4"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"uuid":"9.0.1","socket.io":"4.5.4","@types/uuid":"9.0.6","body-parser":"1.20.2","internal-ip":"6.2.0","@types/express":"4.17.19","@types/body-parser":"1.19.4","@types/sanitize-html":"2.6.2","@hyperledger/cactus-test-tooling":"^2.0.0-main.91+89d9b93b7","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-main.91+89d9b93b7"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_2.0.0-main.91_1700111002422_0.42607333726006336","host":"s3://npm-registry-packages"}},"2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"c78b04d7ae260cc048610cb6f85144f0d0dce785","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126.tgz","fileCount":65,"integrity":"sha512-EqPzf0kQEbB1A10TcvcHyk1EgacLWrPvV1GhVcLrcoIC/2CIlvCYmUKaXzjNqPrgyEkQJ4zIxETVYDttqAV3lQ==","signatures":[{"sig":"MEQCIC3BQ7DNFOCQy4v5JJYhH41tTf+Potp9+jSoK4ZQUYnQAiBQn0CRMfVSVPY9DSajiaH/mV4hECvy3LC93vLJ1u4HZg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1648658},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=6","node":">=10"},"gitHead":"dae98b30c3e825e8a63f9ed5d09bc7d67c451890","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"20.9.0","dependencies":{"rxjs":"7.8.1","axios":"1.6.0","express":"4.18.2","key-encoder":"2.0.3","prom-client":"13.1.0","@grpc/grpc-js":"1.9.5","iroha-helpers":"1.5.0","openapi-types":"7.0.1","sanitize-html":"2.7.0","run-time-error-cjs":"1.4.0","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@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","socket.io-client-fixed-types":"4.5.4"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"uuid":"9.0.1","socket.io":"4.5.4","@types/uuid":"9.0.6","body-parser":"1.20.2","internal-ip":"6.2.0","@types/express":"4.17.19","@types/body-parser":"1.19.4","@types/sanitize-html":"2.6.2","@hyperledger/cactus-test-tooling":"^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"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126_1702001049821_0.5063964962534855","host":"s3://npm-registry-packages"}},"2.0.0-main.159":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"2.0.0-main.159","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"7962399e3d7849a6f0ad22d1446d2054b53cc897","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-2.0.0-main.159.tgz","fileCount":65,"integrity":"sha512-kKonzI4wu9uN1Iae2uWL+RDIYEu+lpQ6mOMtxGql08vtz9RdaSoFobce1khL25NlEymHSGHr9ZashacohF9NcQ==","signatures":[{"sig":"MEYCIQCNrYHG28aF1sQijUpnFwZGX2GaRizZmBYTVMygKl1MWQIhAIEClIy26G3uMG1kIockCxbrfH8veFyFdG5LjEAj7vZ8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1648382},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=8","node":">=18"},"gitHead":"1fb2551a055daf202d2def0fcb3de990a44cfb03","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"20.10.0","dependencies":{"rxjs":"7.8.1","axios":"1.6.0","express":"4.18.2","key-encoder":"2.0.3","prom-client":"13.1.0","@grpc/grpc-js":"1.9.5","iroha-helpers":"1.5.0","openapi-types":"7.0.1","sanitize-html":"2.7.0","run-time-error-cjs":"1.4.0","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@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","socket.io-client-fixed-types":"4.5.4"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"uuid":"9.0.1","socket.io":"4.5.4","@types/uuid":"9.0.6","body-parser":"1.20.2","internal-ip":"6.2.0","@types/express":"4.17.19","@types/body-parser":"1.19.4","@types/sanitize-html":"2.6.2","@hyperledger/cactus-test-tooling":"^2.0.0-main.159+1fb2551a0","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-main.159+1fb2551a0"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_2.0.0-main.159_1704759658712_0.24307258289690004","host":"s3://npm-registry-packages"}},"2.0.0-lfx-connector.163":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"2.0.0-lfx-connector.163","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"ca2b1618a8730714cb7244bcf1542c0736bdf583","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-2.0.0-lfx-connector.163.tgz","fileCount":65,"integrity":"sha512-6nYyfEucqGrztYck5d2O5RS2MBaEvN2X9V2KAIWa5zvLtAeY6RsuysYBe9cuD6wM9KlRvsHw93idTTZLmDob5g==","signatures":[{"sig":"MEUCICc8Utn47+HPaz+msJrXbY7/km4u6MRryL3JMngnoFoyAiEAheEX/FTwVdpdbLz8N5lNoeHQkue+Ss1OS2GhHwFsYoA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1648436},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=8","node":">=18"},"gitHead":"f7e7a2a1cd9694327e4d323650bd3fad9b3b80dd","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"18.16.0","dependencies":{"rxjs":"7.8.1","axios":"1.6.0","express":"4.18.2","key-encoder":"2.0.3","prom-client":"13.1.0","@grpc/grpc-js":"1.9.5","iroha-helpers":"1.5.0","openapi-types":"7.0.1","sanitize-html":"2.7.0","run-time-error-cjs":"1.4.0","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@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","socket.io-client-fixed-types":"4.5.4"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"uuid":"9.0.1","socket.io":"4.5.4","@types/uuid":"9.0.6","body-parser":"1.20.2","internal-ip":"6.2.0","@types/express":"4.17.19","@types/body-parser":"1.19.4","@types/sanitize-html":"2.6.2","@hyperledger/cactus-test-tooling":"^2.0.0-lfx-connector.163+f7e7a2a1c","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-lfx-connector.163+f7e7a2a1c"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_2.0.0-lfx-connector.163_1705430838238_0.3397579542184126","host":"s3://npm-registry-packages"}},"2.0.0-lfx-connector.164":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"2.0.0-lfx-connector.164","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"3eadeb21696c8c7a73f298731172b12dc6d039c3","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-2.0.0-lfx-connector.164.tgz","fileCount":65,"integrity":"sha512-Trh9iXxpz/f835DJgTEJboAa6VBLDXx3/YMvlEfkuWCNjZFU0TOhqhLK3nIsvINrDgiBnILirWmw+LuiJbpDkg==","signatures":[{"sig":"MEYCIQDkYExxEWGYiT4g7tniDHkuYUb87MQ9C+OzlBSH7xptFgIhALFeE1y5WaqpqMHbp+VyaFHkUXZunUul7oqp1/O4m005","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1648436},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=8","node":">=18"},"gitHead":"8355399ea266cf10724036d03a914186a4fd6000","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"18.16.0","dependencies":{"rxjs":"7.8.1","axios":"1.6.0","express":"4.18.2","key-encoder":"2.0.3","prom-client":"13.1.0","@grpc/grpc-js":"1.9.5","iroha-helpers":"1.5.0","openapi-types":"7.0.1","sanitize-html":"2.7.0","run-time-error-cjs":"1.4.0","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@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","socket.io-client-fixed-types":"4.5.4"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"uuid":"9.0.1","socket.io":"4.5.4","@types/uuid":"9.0.6","body-parser":"1.20.2","internal-ip":"6.2.0","@types/express":"4.17.19","@types/body-parser":"1.19.4","@types/sanitize-html":"2.6.2","@hyperledger/cactus-test-tooling":"^2.0.0-lfx-connector.164+8355399ea","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-lfx-connector.164+8355399ea"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_2.0.0-lfx-connector.164_1705431759581_0.7560115161954866","host":"s3://npm-registry-packages"}},"2.0.0-dev.195":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"2.0.0-dev.195","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"132dcb513440eef023bd011f5a990472aa137365","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-2.0.0-dev.195.tgz","fileCount":65,"integrity":"sha512-ip7+bKMWCds7z+GBOXl24F+v4CN/rFLi9rLZ3TQZ0dBYxeeUnc0Mktr6SG32KkFgL3U64xA8XH5JOT5ucD3urQ==","signatures":[{"sig":"MEUCIQDyerHoUFuDQ4SsPOI90TEDYLkhS6OMiDncS1ZN2FZo2wIgb3tkNkJcrIC9AC3NcA0NevQa0ss9cUmuIW2FaQGqTuI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1653649},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=8","node":">=18"},"gitHead":"065250d9bfd0a6bf735277677c4ef0f2d01b4932","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"20.11.0","dependencies":{"rxjs":"7.8.1","axios":"1.6.0","express":"4.18.2","key-encoder":"2.0.3","prom-client":"13.1.0","@grpc/grpc-js":"1.9.5","iroha-helpers":"1.5.0","openapi-types":"7.0.1","sanitize-html":"2.11.0","run-time-error-cjs":"1.4.0","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@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","socket.io-client-fixed-types":"4.5.4"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"uuid":"9.0.1","socket.io":"4.5.4","@types/uuid":"9.0.6","body-parser":"1.20.2","internal-ip":"6.2.0","@types/express":"4.17.19","@types/body-parser":"1.19.4","@types/sanitize-html":"2.9.5","@hyperledger/cactus-test-tooling":"^2.0.0-dev.195+065250d9b","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-dev.195+065250d9b"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_2.0.0-dev.195_1706137208437_0.9379083994795505","host":"s3://npm-registry-packages"}},"2.0.0-dev.196":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"2.0.0-dev.196","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"0fd736c613e4a91891f23ee240a3e4eec8aef83e","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-2.0.0-dev.196.tgz","fileCount":65,"integrity":"sha512-Ue6/1NZyB9wZo2ETGPhoPLHwD9uEz9WDdA/mp8pILrlq/LejImOIrl5PWmNxMr+uIEr6HdvAvrsck8wvq+scuw==","signatures":[{"sig":"MEUCICzcP0oSdObKzpNAEZ0A6hsQwxELuibfVbCKLNYPw/LHAiEAgWSafpce3Brxd2/BrY8abpT7BNDbbD+rflzel0J2VSA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1653649},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=8","node":">=18"},"gitHead":"1b9a3c27634eb1327b83b901d440d258a693dd53","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"20.11.0","dependencies":{"rxjs":"7.8.1","axios":"1.6.0","express":"4.18.2","key-encoder":"2.0.3","prom-client":"13.1.0","@grpc/grpc-js":"1.9.5","iroha-helpers":"1.5.0","openapi-types":"7.0.1","sanitize-html":"2.11.0","run-time-error-cjs":"1.4.0","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@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","socket.io-client-fixed-types":"4.5.4"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"uuid":"9.0.1","socket.io":"4.5.4","@types/uuid":"9.0.6","body-parser":"1.20.2","internal-ip":"6.2.0","@types/express":"4.17.19","@types/body-parser":"1.19.4","@types/sanitize-html":"2.9.5","@hyperledger/cactus-test-tooling":"^2.0.0-dev.196+1b9a3c276","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-dev.196+1b9a3c276"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_2.0.0-dev.196_1706141000100_0.4085650335651949","host":"s3://npm-registry-packages"}},"2.0.0-dev.197":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"2.0.0-dev.197","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"757d6f9487349918d990f0defdb49b9433fec4fd","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-2.0.0-dev.197.tgz","fileCount":65,"integrity":"sha512-xRiYqrncI4sQgnIBiIVr9BZx9e+LU1KByqWk3uDThjLqvKtVlKhbFGyTsqaqfzhKuRM0OJWndd7DNp1eP1yfNA==","signatures":[{"sig":"MEUCIQDAMORXQGg1mX+JpA00DbWy/Uv0SjoEa6jMCPQGJm2Z+QIgAWUs3SEe0Doobv695giuDqWQhSqkyDVApvZEDojzxK4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1653649},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=8","node":">=18"},"gitHead":"a9a16d0c877edd2dffd81765be5ccbeb826a266f","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"20.11.0","dependencies":{"rxjs":"7.8.1","axios":"1.6.0","express":"4.18.2","key-encoder":"2.0.3","prom-client":"13.1.0","@grpc/grpc-js":"1.9.5","iroha-helpers":"1.5.0","openapi-types":"7.0.1","sanitize-html":"2.11.0","run-time-error-cjs":"1.4.0","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@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","socket.io-client-fixed-types":"4.5.4"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"uuid":"9.0.1","socket.io":"4.5.4","@types/uuid":"9.0.6","body-parser":"1.20.2","internal-ip":"6.2.0","@types/express":"4.17.19","@types/body-parser":"1.19.4","@types/sanitize-html":"2.9.5","@hyperledger/cactus-test-tooling":"^2.0.0-dev.197+a9a16d0c8","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-dev.197+a9a16d0c8"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_2.0.0-dev.197_1706143675403_0.2568789739428192","host":"s3://npm-registry-packages"}},"2.0.0-lfx-connector.208":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"2.0.0-lfx-connector.208","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@2.0.0-lfx-connector.208","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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"d1ba2f880fea686945d96239fa0dee42f87d3b94","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-2.0.0-lfx-connector.208.tgz","fileCount":65,"integrity":"sha512-Q4aX9Wkl6XJXa5ZhhwzzwtcHHEAL+lLIneA2gOdCsBJ3yCcdx9RWIBkyAFEMFMu2yvksB1yHK+yXplsryNgV5g==","signatures":[{"sig":"MEUCIQC3bmgcarVcqRblk/VtsI2f+lSoEGM9Ywr+bfSbzrh+pAIgKvpqDEAXtP80fpGWpaMKYWXv1MwC/QAMsy5AmMZewWc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1653708},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=8","node":">=18"},"gitHead":"73bd58231e4e890851cb6d20c103dde76894e5d4","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"20.11.0","dependencies":{"rxjs":"7.8.1","axios":"1.6.0","express":"4.18.2","key-encoder":"2.0.3","prom-client":"13.1.0","@grpc/grpc-js":"1.9.5","iroha-helpers":"1.5.0","openapi-types":"7.0.1","sanitize-html":"2.7.0","run-time-error-cjs":"1.4.0","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@hyperledger/cactus-core":"^2.0.0-lfx-connector.208+73bd58231","@hyperledger/cactus-common":"^2.0.0-lfx-connector.208+73bd58231","@hyperledger/cactus-core-api":"^2.0.0-lfx-connector.208+73bd58231","socket.io-client-fixed-types":"4.5.4"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"uuid":"9.0.1","socket.io":"4.5.4","@types/uuid":"9.0.6","body-parser":"1.20.2","internal-ip":"6.2.0","@types/express":"4.17.19","@types/body-parser":"1.19.4","@types/sanitize-html":"2.6.2","@hyperledger/cactus-test-tooling":"^2.0.0-lfx-connector.208+73bd58231","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-lfx-connector.208+73bd58231"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_2.0.0-lfx-connector.208_1707323875639_0.5233390867450449","host":"s3://npm-registry-packages"}},"2.0.0-main.214":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"2.0.0-main.214","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@2.0.0-main.214","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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"1c996d66069c9c3101e86a573e49698abda0187d","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-2.0.0-main.214.tgz","fileCount":65,"integrity":"sha512-s7c/RIj/iRgRELbDX5O7d0W6O0H/oC7yWGpBAqgejv1Gp5YeS/2crbtIqC6kSZA/LFoLddcdsAJl1YOWFm9XAA==","signatures":[{"sig":"MEQCIGFuMAnthdlWA6EYT2BduKAKdyYfK38Z6A18Fp+DwDifAiBRFldEGOvL+dSFv8GIo1KxXIHIjmAKJKhC+CeWpgWEkg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1653655},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=8","node":">=18"},"gitHead":"28e1f9b7b0bf17f880292ce8b0b7725ff521785a","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"20.11.0","dependencies":{"rxjs":"7.8.1","axios":"1.6.0","express":"4.18.2","key-encoder":"2.0.3","prom-client":"13.1.0","@grpc/grpc-js":"1.9.5","iroha-helpers":"1.5.0","openapi-types":"7.0.1","sanitize-html":"2.11.0","run-time-error-cjs":"1.4.0","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@hyperledger/cactus-core":"^2.0.0-main.214+28e1f9b7b","@hyperledger/cactus-common":"^2.0.0-main.214+28e1f9b7b","@hyperledger/cactus-core-api":"^2.0.0-main.214+28e1f9b7b","socket.io-client-fixed-types":"4.5.4"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"uuid":"9.0.1","socket.io":"4.5.4","@types/uuid":"9.0.6","body-parser":"1.20.2","internal-ip":"6.2.0","@types/express":"4.17.19","@types/body-parser":"1.19.4","@types/sanitize-html":"2.9.5","@hyperledger/cactus-test-tooling":"^2.0.0-main.214+28e1f9b7b","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-main.214+28e1f9b7b"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_2.0.0-main.214_1708021448540_0.3853698702437476","host":"s3://npm-registry-packages"}},"2.0.0-2945-supply-chain-app-build-failed.241":{"name":"@hyperledger/cactus-plugin-ledger-connector-iroha","version":"2.0.0-2945-supply-chain-app-build-failed.241","keywords":["Hyperledger","Cactus","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"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-ledger-connector-iroha@2.0.0-2945-supply-chain-app-build-failed.241","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://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"homepage":"https://github.com/hyperledger/cacti#readme","bugs":{"url":"https://github.com/hyperledger/cacti/issues"},"dist":{"shasum":"d5b635277c3f605b33ff6bb2fdcf7c1299e92413","tarball":"https://registry.npmjs.org/@hyperledger/cactus-plugin-ledger-connector-iroha/-/cactus-plugin-ledger-connector-iroha-2.0.0-2945-supply-chain-app-build-failed.241.tgz","fileCount":65,"integrity":"sha512-7M+52gnecxQe4MdDG6UoL6CrauAAF3sYUvayVQYPZIGavOsuFGPLCDGmzxqa1IC60LV1q43IyLqqQmEG90YOnw==","signatures":[{"sig":"MEUCIQClcRJTLw6E3NCaAXv6It4+qFCx5hKsJTiereUC1VW+DAIgcI8bb9wVbJ55M/P9Mx02jmjtDf1GJOoKAfazU3dTDc4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1653836},"main":"dist/lib/main/typescript/index.js","types":"dist/types/main/typescript/index.d.ts","watch":{"codegen:openapi":{"patterns":["./src/main/json/openapi.json"]}},"module":"dist/lib/main/typescript/index.js","readme":"# `@hyperledger/cactus-plugin-ledger-connector-iroha`\n\nThis plugin provides `Cactus` a way to interact with Iroha networks. Using this we can perform:\n* Run various Iroha leger commands and queries.\n* Build and sign transactions using any arbitrary credential.\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Architecture](#architecture)\n  - [Usage](#usage)\n  - [Runing the tests](#running-the-tests)\n  - [Built With](#built-with)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Acknowledgments](#acknowledgments)\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 your local machine for development and testing purposes.\n\n### Prerequisites\n\nIn the root of the project, execute the command to install the dependencies:\n```sh\nyarn run configure\n```\n\n### Compiling\n\nIn the project root folder, run this command to compile the plugin and create the dist directory:\n```sh\n# For one off builds:\nyarn run build:dev:backend\n```\n\n```sh\n# For continuous watching of the source code with \n# automatic recompilation (more convenient) \nyarn run watch\n```\n\n### Architecture\nThe sequence diagrams for various endpoints are mentioned below\n\n#### run-transaction-endpoint\n![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png)\n\nThe above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. The API server then executes `transact()` method which is explained in detailed in the subsequent diagrams.\n\n![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png)\n\nThe above diagram shows the sequence diagram of `transact()` method of the `PluginLedgerConnectorIroha` class. The caller to this function, which in reference to the above sequence diagram is API server, sends `RunTransactionRequestV1` object as an argument to the `transact()` method. Based on the exact command name of the request, corresponsing response `RunTransactionResponse` is sent back to the caller.  \n\n### Usage\n\nTo use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector.\n```typescript\n  const factory = new PluginFactoryLedgerConnector({\n    pluginImportType: PluginImportType.Local,\n  });\n\n  const connector: PluginLedgerConnectorIroha = await factory.create({\n    rpcToriiPortHost,\n    instanceId: uuidv4(),\n    pluginRegistry: new PluginRegistry(),\n  });\n```\nYou can make calls through the connector to the plugin API:\n\n```typescript\nasync transact(req: RunTransactionRequestV1):Promise<RunTransactionResponse>;\n```\n\nCall example to run an Iroha execute account command:\n```typescript\n    const req = {\n      commandName: IrohaCommand.CreateAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n    const res = await apiClient.runTransactionV1(req);\n```\nCall example to run an Iroha get account query:\n```typescript\n    const req = {\n      commandName: IrohaQuery.GetAccount,\n      baseConfig: {\n        irohaHost: \"localhost\",\n        irohaPort: 50051,\n        creatorAccountId: \"admin@test\",\n        privKey: [\"f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70\"],\n        quorum: 1,\n        timeoutLimit: 5000,\n      },\n      params: [\"admin@test\"],\n    };\n    const res = await apiClient.runTransactionV1(req);\n```\n> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) \n\n\n### Building/running the container image locally\n\nIn the Cactus project root say:\n\n```sh\nDOCKER_BUILDKIT=1 docker build -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\nBuild with a specific version of the npm package:\n```sh\nDOCKER_BUILDKIT=1 docker build --build-arg NPM_PKG_VERSION=latest -f ./packages/cactus-plugin-ledger-connector-iroha/Dockerfile . -t cplcb\n```\n\n#### Running the container\n\nLaunch container with plugin configuration as an **environment variable**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\nLaunch container with plugin configuration as a **CLI argument**:\n```sh\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --plugins='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\",  \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]'\n```\n\nLaunch container with **configuration file** mounted from host machine:\n```sh\n\necho '[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' > cactus.json\n\ndocker run \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --mount type=bind,source=\"$(pwd)\"/cactus.json,target=/cactus.json \\\n  cplcb \\\n    ./node_modules/.bin/cactusapi \\\n    --config-file=/cactus.json\n```\n\n#### Testing API calls with the container\n\nDon't have an Iroha network on hand to test with? Test or develop against our Iroha All-In-One dockerfile!\n\n**Terminal Window 1 (Ledger)**\n```sh\ndocker run -p 0.0.0.0:8545:8545/tcp  -p 0.0.0.0:8546:8546/tcp  -p 0.0.0.0:8888:8888/tcp  -p 0.0.0.0:9001:9001/tcp  -p 0.0.0.0:9545:9545/tcp hyperledger/cactus-iroha-all-in-one:latest\n```\n\n**Terminal Window 2 (Cactus API Server)**\n```sh\ndocker run \\\n  --network host \\\n  --rm \\\n  --publish 3000:3000 \\\n  --publish 4000:4000 \\\n  --publish 5000:5000 \\\n  --env AUTHORIZATION_PROTOCOL='NONE' \\\n  --env AUTHORIZATION_CONFIG_JSON='{}' \\\n  --env GRPC_TLS_ENABLED=false \\\n  --env PLUGINS='[{\"packageName\": \"@hyperledger/cactus-plugin-ledger-connector-iroha\", \"type\": \"org.hyperledger.cactus.plugin_import_type.LOCAL\", \"action\": \"org.hyperledger.cactus.plugin_import_action.INSTALL\", \"options\": {\"rpcApiHttpHost\": \"http://localhost:8545\", \"rpcToriiPortHost\": \"http://localhost:8545\", \"instanceId\": \"some-unique-iroha-connector-instance-id\"}}]' \\\n  cplcb\n```\n\n**Terminal Window 3 (curl - replace transaction request as needed)**\n```sh\ncurl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha/run-transaction' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  commandName: 'createAsset',\n  baseConfig: {\n    irohaHost: 'localhost',\n    irohaPort: 50051,\n    creatorAccountId: 'admin@test',\n    privKey: [\n      'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70'\n    ],\n    quorum: 1,\n    timeoutLimit: 5000\n  },\n  params: [ 'coolcoin', 'test', 3]\n}'\n```\n\nThe above should produce a response that looks similar to this:\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"transactionReceipt\": {\n            \"txHash\": \"c3ffd772f26950243aa357ab4f21b9703d5172490b66ddc285355230d6df60b8\",\n            \"status\": \"COMMITTED\"\n        }\n    }\n}\n```\n\n## Running the tests\n\nTo check that all has been installed correctly and that the plugin has no errors run the tests:\n\n* Run this command at the project's root:\n```sh\nyarn run test:plugin-ledger-connector-iroha\n```\n\n## Contributing\n\nWe welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!\n\nPlease review [CONTIRBUTING.md](../../CONTRIBUTING.md) to get started.\n\n## License\n\nThis distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file.\n\n## Acknowledgments \n","browser":"dist/cactus-plugin-ledger-connector-iroha.web.umd.js","engines":{"npm":">=8","node":">=18"},"gitHead":"b2c306ea0c2029d6de14dd3c9c046b498b90a129","scripts":{"watch":"npm-watch","codegen":"run-p 'codegen:*'","webpack":"npm-run-all webpack:dev","webpack:dev":"npm-run-all webpack:dev:node webpack:dev:web","generate-sdk":"run-p 'generate-sdk:*'","codegen:openapi":"npm run generate-sdk","webpack:dev:web":"webpack --env=dev --target=web --config ../../webpack.config.js","webpack:dev:node":"webpack --env=dev --target=node --config ../../webpack.config.js","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":"Allows Cactus nodes to connect to an Iroha ledger.","directories":{},"_nodeVersion":"20.10.0","dependencies":{"rxjs":"7.8.1","axios":"1.6.0","express":"4.18.2","key-encoder":"2.0.3","prom-client":"13.1.0","@grpc/grpc-js":"1.9.5","iroha-helpers":"1.5.0","openapi-types":"12.1.3","sanitize-html":"2.12.1","run-time-error-cjs":"1.4.0","fast-safe-stringify":"2.1.1","typescript-optional":"2.0.1","@types/google-protobuf":"3.15.5","@hyperledger/cactus-core":"^2.0.0-2945-supply-chain-app-build-failed.241+b2c306ea0","@hyperledger/cactus-common":"^2.0.0-2945-supply-chain-app-build-failed.241+b2c306ea0","@hyperledger/cactus-core-api":"^2.0.0-2945-supply-chain-app-build-failed.241+b2c306ea0","socket.io-client-fixed-types":"4.5.4"},"mainMinified":"dist/cactus-plugin-ledger-connector-iroha.node.umd.min.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","browserMinified":"dist/cactus-plugin-ledger-connector-iroha.web.umd.min.js","devDependencies":{"uuid":"9.0.1","socket.io":"4.5.4","@types/uuid":"9.0.8","body-parser":"1.20.2","internal-ip":"6.2.0","@types/express":"4.17.19","@types/body-parser":"1.19.4","@types/sanitize-html":"2.9.5","@hyperledger/cactus-test-tooling":"^2.0.0-2945-supply-chain-app-build-failed.241+b2c306ea0","@hyperledger/cactus-plugin-keychain-memory":"^2.0.0-2945-supply-chain-app-build-failed.241+b2c306ea0"},"_npmOperationalInternal":{"tmp":"tmp/cactus-plugin-ledger-connector-iroha_2.0.0-2945-supply-chain-app-build-failed.241_1709870191831_0.46936172377562335","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-08-30T15:39:09.188Z","modified":"2025-10-02T09:58:30.670Z","0.8.1-vaultTransitKeychain.5ad9cac4.17":"2021-08-30T15:39:09.438Z","0.9.0":"2021-09-08T19:12:47.251Z","0.9.1-docs-1312.94850924.6":"2021-09-08T19:32:14.858Z","0.9.1-docs-1312.bcfd3c31.6":"2021-09-09T02:48:31.379Z","0.9.1-web-socket-identity-provider.845e2a3e.23":"2021-09-16T17:56:14.434Z","0.9.1-add-bluebird-dependency.a8944f63.33":"2021-09-23T23:12:16.184Z","0.9.1-fix-quorum-no-keychain-endpoints.e1eba3a4.33":"2021-09-24T21:30:03.403Z","0.9.1-ci-942.cbb849c6.35":"2021-09-27T00:14:43.475Z","0.10.0":"2021-09-28T03:59:40.264Z","0.10.1-fix-quorum-no-keychain-endpoints.bf5e0403.1":"2021-09-28T17:45:16.618Z","0.10.1-fix-quorum-api-server.0677a0e6.4":"2021-09-29T15:02:50.196Z","0.8.1-pr-brioux-1333.92b26c3a.36":"2021-10-06T18:51:20.012Z","1.0.0-rc.1":"2021-10-12T01:11:12.324Z","1.0.0-rc.2":"2021-11-02T18:02:05.810Z","1.0.0-rc.3":"2021-12-08T03:03:24.727Z","1.0.0-main.334593a7.46":"2022-01-18T01:00:02.444Z","1.0.0-jwt-supply-chain.62c7e930.0":"2022-02-03T00:25:15.594Z","1.0.0":"2022-03-17T00:07:30.020Z","1.0.1-jwt-supply-chain.9df3fe79.16":"2022-04-05T17:02:23.828Z","1.1.2":"2022-11-12T00:12:19.673Z","1.1.1":"2022-11-15T20:26:42.032Z","1.1.0":"2022-11-15T20:35:57.423Z","1.1.3":"2022-12-15T00:49:47.203Z","2.0.0-alpha.1":"2023-09-09T17:29:11.701Z","2.0.0-alpha.2":"2023-10-04T06:47:40.423Z","2.0.0-dev.93":"2023-11-16T03:14:50.319Z","2.0.0-dev.94":"2023-11-16T04:52:48.747Z","2.0.0-main.91":"2023-11-16T05:03:22.739Z","2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126":"2023-12-08T02:04:10.041Z","2.0.0-main.159":"2024-01-09T00:20:58.940Z","2.0.0-lfx-connector.163":"2024-01-16T18:47:18.434Z","2.0.0-lfx-connector.164":"2024-01-16T19:02:39.811Z","2.0.0-dev.195":"2024-01-24T23:00:08.646Z","2.0.0-dev.196":"2024-01-25T00:03:20.369Z","2.0.0-dev.197":"2024-01-25T00:47:55.676Z","2.0.0-lfx-connector.208":"2024-02-07T16:37:55.857Z","2.0.0-main.214":"2024-02-15T18:24:09.003Z","2.0.0-2945-supply-chain-app-build-failed.241":"2024-03-08T03:56:32.045Z"},"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","Iroha","Integration","Blockchain","Distributed Ledger Technology"],"repository":{"url":"git+https://github.com/hyperledger/cacti.git","type":"git"},"description":"Allows Cactus nodes to connect to an Iroha ledger.","contributors":[{"url":"https://accenture.com","name":"Peter Somogyvari","email":"peter.somogyvari@accenture.com"},{"url":"https://github.com/hxlaf","name":"Han Xu","email":"hanxu8@illinois.edu"}],"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":""}