在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:hyperledger/fabric-sdk-java开源软件地址:https://github.com/hyperledger/fabric-sdk-java开源编程语言:Java 97.5%开源软件介绍:Hyperledger Fabric SDK for JavaThis project provides a low-level API for interacting with Hyperledger Fabric blockchain networks, and is used by the high-level Hyperledger Fabric Gateway SDK for Java:
For building Hyperledger Fabric blockchain client applications, you are strongly encouraged to use the high level API. The information below is intended for contributors to this repository. Introduction for contributorsThe SDK provides a layer of abstraction on top of the wire-level protobuf based communication protocol used by client applications to interact with a Hyperledger Fabric blockchain network. It allows Java applications to manage the lifecycle of Hyperledger channels and user chaincode. The SDK also provides a means to execute user chaincode, query blocks and transactions on the channel, and monitor events on the channel. The SDK acts on behalf of a particular User which is defined by the embedding application through the implementation
of the SDK's Note, the SDK does not provide a means of persistence for the application defined channels and user artifacts on the client. This is left for the embedding application to best manage. Channels may be serialized via Java serialization in the context of a client. Channels deserialized are not in an initialized state. Applications need to handle migration of serialized files between versions. The SDK also provides a client for Hyperledger's certificate authority. The SDK is however not dependent on this
particular implementation of a certificate authority. Other Certificate authority's maybe used by implementing the
SDK's This provides a summary of steps required to get you started with building and using the Java SDK. Please note that this is not the API documentation or a tutorial for the SDK, this will only help you familiarize to get started with the SDK if you are new in this domain. Release notes
Checkout SDK from Github
Production Java applicationsFor Java applications use the latest released version of the SDK v1.4.x releases:
For v2.0 work in progress use 2.0.0-SNAPSHOT buildsWork in progress 2.0.0 SNAPSHOT builds can be used by adding the following to your application's pom.xml
Java and Node Chaincode environmentYou may also need to on your v2.1 Fabric network docker deployment explicitly pull the Java and Node chaincode environments for now.
Known limitations and restrictions
SDK dependenciesSDK depends on few third party libraries that must be included in your classpath when using the JAR file. To get a list of dependencies, refer to pom.xml file or run
To build this project, the following dependencies must be met
To run the integration tests Fabric and Fabric CA is needed which require
Using the SDKSetting Up EclipseIf you want to get started using the Fabric Java SDK with Eclipse, refer to the instructions at: ./docs/EclipseSetup.md CompilingOnce your JAVA_HOME points to your installation of JDK 1.8 (or above) and JAVA_HOME/bin and Apache maven are in your PATH, issue the following command to build the jar file:
Running the unit testsTo run the unit tests, please use Many unit tests will test failure condition's resulting in exceptions and stack traces being displayed. This is not an indication of failure! [INFO] BUILD SUCCESS At the end is usually a very reliable indication that all tests have passed successfully! Running the integration testsThe script below both sets up the test environment and runs the tests. ./scripts/run-integration-tests.sh End to end test scenarioFollowing the below integration tests/example code shows almost all that the SDK can do. To learn the SDK you must have some understanding first of Fabric Hyperledger. Then it's best to study the integrations tests and better yet work with them in a debugger to follow the code ( a live demo ). Start first with End2endIT.java and then End2endAndBackAgainIT.java samples before exploring the other samples. Then once you understand them you can cut and paste from there to your own application. ( the code is done for you! ) Note These samples are for testing, validating your environment and showing how to use the APIs. Most show a simple balance transfer. They are not meant to represent best practices in design or use of chaincode or the use of the SDK.
全部评论
专题导读
上一篇:goitacademy/javascript-homework: GoIT JavaScript course homework发布时间:2022-06-22下一篇:kennymkchan/interview-questions-in-javascript: A mostly reasonable collection of ...发布时间:2022-06-22热门推荐
热门话题
阅读排行榜
|
请发表评论