Web3j Open API – Web3j开放式API区块链毕设代写

区块链毕设代写本文提供国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,Web3j Open API – Web3j开放式API区块链毕设代写 是一篇很好的国外资料

Web3j Open API

Web3j Open API - Web3j开放式API

The Web3j Open API project allows you to easily generated OpenAPI services for integrating with Ethereum.

It builds on top of Web3j’s smart contract wrappers to provide a fully typesafe integration from the client through to the blockchain.

Modules

  • openapi: JAX-RS, Web3j Core (only interfaces), Swagger annotations
  • core: openapi, Jersey Core, Swager UI
  • server: core, Jersey Server, Jetty, integration tests
  • codegen: Mustache, Kotlinpoet?, openapi (Based on CorDappGenerator for Gradle project)
  • client: core, Jersey Client
  • console: Command-line tools command epirus-openapi, sub-commands generate, run
  • helloworld:
    • openapi
    • server: web3j-openapi-server (org.web3j.openapi.server.MainKt or generated main)

Use cases

$ epirus generate openapi Greeter.sol -p com.helloworld -o helloworld 

Creates Gradle project with one module to run a server (with application plugin) and another with interfaces.

$ cd /home/rachid/helloworld $ ./gradle run // Starts the server exposing Greeter.sol ... 

Also start the server with:

$ ./gradle shadowJar // Create an executable JAR that starts the server $ java -jar helloworld-0.1.0-all.jar ... 

Or using the CLI:

$ epirus openapi generate/run 

To interact via Java/Kotlin with this API:

dependencies {     implementation "web3j-openapi:web3j-openapi-client:0.1.0" }

And within a client application:

val service = ClientService("http://localhost:8080") val helloWorld = ClientBuilder.build(HelloWorldApi::class.java, service)  val receipt = helloWorldApi.contracts.greeter.deploy(     GreeterDeployParameters("Test greeter") )  val greeter = helloWorldApi.contracts.greeter.load(receipt.contractAddress) 

#73


Web3j openapi

Web3j Open API - Web3j开放式API

Web3j Open API项目允许您轻松生成OpenAPI服务,以便与以太坊eth集成。

它构建在Web3j智能合约包装器之上,提供从客户端到区块链blockchain的完全类型安全集成。

模块

  • openapi:JAX-RS、Web3j核心(仅接口)、Swagger注释
  • 核心:openapi、Jersey Core,Swager UI
  • 服务器:核心、Jersey服务器、Jetty、集成测试?,openapi(基于CorDappGenerator for Gradle项目)
  • 客户端:核心,Jersey客户端
  • 控制台:命令行工具命令epirus openapi,子命令生成,运行
  • helloworld:openapi服务器:web3j openapi服务器(网址:org.web3j.openapi.server.MainKt或生成的main)
  • openapi

用例

$ epirus generate openapi Greeter.sol -p com.helloworld -o helloworld 

创建Gradle project,其中一个模块运行服务器(使用应用程序插件),另一个模块使用接口。

$ cd /home/rachid/helloworld $ ./gradle run // Starts the server exposing Greeter.sol ... 

还可以使用以下命令启动服务器:

$ ./gradle shadowJar // Create an executable JAR that starts the server $ java -jar helloworld-0.1.0-all.jar ... 

或使用CLI:

$ epirus openapi generate/run 

通过Java/Kotlin与此API进行交互:

dependencies {     implementation "web3j-openapi:web3j-openapi-client:0.1.0" }

并且在客户端应用程序中:

val service = ClientService("http://localhost:8080") val helloWorld = ClientBuilder.build(HelloWorldApi::class.java, service)  val receipt = helloWorldApi.contracts.greeter.deploy(     GreeterDeployParameters("Test greeter") )  val greeter = helloWorldApi.contracts.greeter.load(receipt.contractAddress) 

#73

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/16741.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 !
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » Web3j Open API – Web3j开放式API区块链毕设代写

提供最优质的资源集合

立即查看 了解详情