{"id":21151168,"url":"https://github.com/web3j/web3j-corda","last_synced_at":"2025-07-09T09:31:56.082Z","repository":{"id":53470710,"uuid":"216038060","full_name":"web3j/web3j-corda","owner":"web3j","description":"Lightweight JVM library for integrating with Corda","archived":false,"fork":false,"pushed_at":"2023-07-22T19:09:23.000Z","size":111986,"stargazers_count":14,"open_issues_count":7,"forks_count":6,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-05-01T09:43:04.396Z","etag":null,"topics":["corda","dlt","kotlin","web3j"],"latest_commit_sha":null,"homepage":"https://corda.web3j.io","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/web3j.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-18T14:07:05.000Z","updated_at":"2024-05-01T09:43:04.397Z","dependencies_parsed_at":"2022-09-06T23:31:19.110Z","dependency_job_id":null,"html_url":"https://github.com/web3j/web3j-corda","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3j%2Fweb3j-corda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3j%2Fweb3j-corda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3j%2Fweb3j-corda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3j%2Fweb3j-corda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/web3j","download_url":"https://codeload.github.com/web3j/web3j-corda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225531383,"owners_count":17483793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["corda","dlt","kotlin","web3j"],"created_at":"2024-11-20T10:14:10.637Z","updated_at":"2024-11-20T10:14:11.275Z","avatar_url":"https://github.com/web3j.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"web3j Integration for Corda\n===========================\n\n## Introduction\n\nweb3j-corda is a lightweight client library for working with CorDapps and interacting with different nodes on Corda networks.\n\n![web3j-corda Network](docs/img/web3j-corda.png)\n\n## Features\n- Connect to a Corda node\n- Query the available CorDapps on the node\n- Generate CorDapp client wrappers to interact with the deployed CorDapps\n- Generate integration tests using Docker containers to verify CorDapps in real Corda networks\n- Generate sample projects with a CorDapp contract, workflow and client modules\n\n## Requirements\n\n* Java SDK 1.8\n* Docker (for integration tests)\n\n## Quick start\n\n### Using the web3j-corda CLI\n\nThere is a web3j-corda binary that allows you to easily:\n\n* Generate a template CorDapp project and the respective client wrappers\n* Generate client wrappers for existing CorDapps\n\nYou can install web3j-corda by running the following command in your terminal:\n\n```shell\ncurl -L https://raw.githubusercontent.com/web3j/corda/master/scripts/installer.sh | bash\n```\n\n### Create a template CorDapp project\n\nTo generate a template CorDapp project with the client wrappers: \n\n```shell\nweb3j-corda new --name=\u003ccorDappName\u003e --output-dir=\u003coutput-dir\u003e --package-name=\u003cpackageName\u003e\n```\n### Create CorDapp client wrappers\n\nTo generate a web3j-corda client wrappers to existing CorDapps: \n\n```shell\nweb3j-corda generate (--url=\u003copenApiUrl\u003e | --cordapps-dir=\u003ccorDapps-dir\u003e) --output-dir=\u003coutput-dir\u003e --package-name=\u003cpackageName\u003e\n```\n\nFor further instructions, head to the [Examples](https://corda.web3j.io) section in the docs.\n\n## Getting started\n\nAdd the relevant dependency to your project:\n\n### Maven\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.web3j.corda\u003c/groupId\u003e\n    \u003cartifactId\u003eweb3j-corda-core\u003c/artifactId\u003e\n    \u003cversion\u003e0.2.8\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle\n\n```groovy\ndependencies {\n    implementation 'org.web3j.corda:web3j-corda-core:0.2.8'\n}\n```\n\n## Connect to a Corda Node\n\nInitialise a connection, and create our Corda client service:\n\n```kotlin\nval service = CordaService(\"http://localhost:9000/\") // URL exposed by Corda OpenAPI connector\nval corda = Corda.build(service)\n```\n\nObtain all the nodes connected to the current node:\n\n```kotlin\nval nodes = corda.api.network.nodes.findAll()\n```\n\nTo query the list of all running CorDapps:\n\n```kotlin\nval corDapps = corda.api.corDapps.findAll()\n```\n\nTo start a flow there are two option depending on whether you want to use a generated CorDapp wrapper\nor just the Corda API directly:\n\n### Using Corda API\n\nThis way works but is not type-safe, so can lead to runtime exceptions:\n\n```kotlin\n// Initialise the parameters of the flow \nval params = InitiatorParameters(\"$1\", \"O=PartyA, L=London, C=GB\", false)\n\nval issue = corda.api\n    .corDapps.findById(\"obligation-cordapp\")\n    .flows.findById(\"issue-obligation\")\n\n// Type-conversions with potential runtime exception!\nvar signedTx = issue.start(parameters).convert\u003cSignedTransaction\u003e()\n```\n\n### Using the Web3j CorDapp wrapper\n\nBy using a wrapper generated by the `web3j-corda` Command-Line Tool, \nyou can interact with your CorDapp in a type-safe way:\n```kotlin\n// Initialise the parameters of the flow \nval params = InitiatorParameters(\"$1\", \"O=PartyA, L=London, C=GB\", false)\n\n// Start the flow with typed parameters and response\nval signedTx = Obligation.load(corda.service).flows.issue.start(parameters)\n```\n\n## Documentation\n\nThe project documentation portal is available [here](https://corda.web3j.io).\n\nTo build and serve the docs locally, you will need to have [Pipenv](https://pipenv.readthedocs.io/en/latest/) installed. Then simply run:\n\n```shell\npipenv install\npipenv run mkdocs serve\n```\n\n## Support\n\n[Web3 Labs](https://www.web3labs.com) maintain web3j-corda. If you'd like to get in touch, please [email us](mailto:hi@web3labs.com?subject=web3j-corda).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3j%2Fweb3j-corda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb3j%2Fweb3j-corda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3j%2Fweb3j-corda/lists"}