{"id":29076995,"url":"https://github.com/lfdt-web3j/web3j-openapi","last_synced_at":"2025-06-27T16:34:15.001Z","repository":{"id":41872607,"uuid":"251553522","full_name":"LFDT-web3j/web3j-openapi","owner":"LFDT-web3j","description":"OpenAPI compliant service generator for Solidity Smart contracts","archived":false,"fork":false,"pushed_at":"2025-03-07T17:13:47.000Z","size":1383,"stargazers_count":37,"open_issues_count":1,"forks_count":11,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-04T21:23:35.129Z","etag":null,"topics":["ethereum","openapi","solidity","swagger","web3j"],"latest_commit_sha":null,"homepage":"https://www.web3labs.com/epirus","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LFDT-web3j.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["web3j"]}},"created_at":"2020-03-31T09:12:05.000Z","updated_at":"2025-03-27T15:26:46.000Z","dependencies_parsed_at":"2024-11-20T11:27:33.533Z","dependency_job_id":"26a34b9b-39e2-40a0-8671-2b80358c8ed6","html_url":"https://github.com/LFDT-web3j/web3j-openapi","commit_stats":{"total_commits":566,"total_committers":8,"mean_commits":70.75,"dds":"0.34982332155477036","last_synced_commit":"19bcef7bd4ac6b8b84e63860e5fe192f24e2b0e6"},"previous_names":["hyperledger-web3j/web3j-openapi","web3j/web3j-openapi","lfdt-web3j/web3j-openapi"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/LFDT-web3j/web3j-openapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LFDT-web3j%2Fweb3j-openapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LFDT-web3j%2Fweb3j-openapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LFDT-web3j%2Fweb3j-openapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LFDT-web3j%2Fweb3j-openapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LFDT-web3j","download_url":"https://codeload.github.com/LFDT-web3j/web3j-openapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LFDT-web3j%2Fweb3j-openapi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262293897,"owners_count":23288839,"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":["ethereum","openapi","solidity","swagger","web3j"],"created_at":"2025-06-27T16:34:11.041Z","updated_at":"2025-06-27T16:34:14.993Z","avatar_url":"https://github.com/LFDT-web3j.png","language":"Solidity","funding_links":["https://github.com/sponsors/web3j"],"categories":[],"sub_categories":[],"readme":"Web3j Open API\n==============\n\n[![Build Status](https://travis-ci.org/web3j/web3j-openapi.svg?branch=master)](https://travis-ci.org/web3j/web3j-openapi)\n\nWeb3j-OpenAPI is a [OpenAPI](https://swagger.io/specification/) client and server generator from \n[Solidity](https://solidity.readthedocs.io/) smart contracts. it provides a way to interact with the Ethereum blockchain via simple and intuitive \nHTTP requests, abstracting the coding layer. These interactions can be done using :\n- Plain HTTP requests\n- Via the `Swagger-UI`, which is generated with every project\n- A client application using the [`webj3-openapi-client`](/client) implementation\n\nThe workflow can be summed in the following steps:\n- Writing a Solidity smart contract\n- Generating the corresponding **OpenAPI** project using **Web3j-OpenAPI**\n- Running the generated project as a standalone server\n- Sending HTTP requests using `Swagger-UI`, client application or `Curl` request.\n\n# Getting started with Web3j-OpenAPI\nTo generate an OpenAPI project using the [Web3j-OpenAPI](https://github.com/hyperledger/web3j-openapi) generator, \nyou need to have the [Web3j-CLI](https://docs.web3j.io/latest/command_line_tools/) installed on your machine. \nIt’s easy to do (for Windows instructions head [here](https://github.com/hyperledger/web3j-cli/)):\n\t\n```ssh\n$ curl -L get.web3j.io | sh\n```\n\n### Create a Hello World project\nTo create a base OpenAPI project using a `Hello World` contract, run the following :\n\n```ssh\n$ web3j openapi new\n```\n\nYou can also generate a `Web3j-OpenAPI` project using the [Web3j-OpenAPI-gradle-plugin](https://github.com/web3j/web3j-openapi-gradle-plugin).\n\n### Configure the project\nAfter having the generated project, you can configure your application with the following environment variables:\n\n```ssh\n$ export WEB3J_ENDPOINT=\u003clink_to_your_Ethereum_node\u003e\n$ export WEB3J_PRIVATE_KEY=\u003cyour_private_key\u003e\n$ export WEB3J_OPENAPI_HOST=localhost\n$ export WEB3J_OPENAPI_PORT=9090\n```\n\n### Run the project\nIf you aren't using the Web3j-CLI you may run the project using the following Gradle target:\n\n```ssh\n$ cd \u003cproject_folder\u003e\n$ ./gradlew run\n```\n\nThen, you should be seeing the server logs.\n\n### Interact with the project\n\n#### SwaggerUI\nThe easiest way to interact with the generated project is via the generated `Swagger-UI` which can be found on `http://\u003chost\u003e:\u003cport\u003e/swagger-ui`.\n\n![image](https://github.com/web3j/web3j-docs/blob/master/docs/img/Web3j-OpenAPI/SwaggerUI_1.png)\n\n#### Web3j-OpenAPI client\nAlso, you can use our client implementation via adding the following dependency to your project:\n```groovy\ndependencies {\n    implementation \"org.web3j.openapi:web3j-openapi-client:4.14.0\"\n}\n```\n\nThen, within the application:\n\n```kotlin\nval service = ClientService(\"http://localhost:9090\")\nval app = ClientFactory.create(\u003cAppNameApi\u003e::class.java, service)\n\n// Then you have access to all the API resources\nval receipt = app.contracts.contractName.deploy()\n\nprintln(\"Deployment receipt: ${receipt.contractAddress}\")\n\n// ...\n```\n\n#### **For more information**, please refer to the [documentation](https://docs.web3j.io/web3j_openapi).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfdt-web3j%2Fweb3j-openapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flfdt-web3j%2Fweb3j-openapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfdt-web3j%2Fweb3j-openapi/lists"}