{"id":28891910,"url":"https://github.com/jd-opensource/jdchain-samples","last_synced_at":"2025-09-02T16:50:38.320Z","repository":{"id":42073259,"uuid":"429664546","full_name":"jd-opensource/jdchain-samples","owner":"jd-opensource","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-21T10:31:27.000Z","size":46,"stargazers_count":10,"open_issues_count":6,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-21T01:47:13.367Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/jd-opensource.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-19T04:01:56.000Z","updated_at":"2024-09-26T05:39:57.000Z","dependencies_parsed_at":"2023-01-20T01:04:26.356Z","dependency_job_id":null,"html_url":"https://github.com/jd-opensource/jdchain-samples","commit_stats":null,"previous_names":["jd-opensource/jdchain-samples"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jd-opensource/jdchain-samples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-opensource%2Fjdchain-samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-opensource%2Fjdchain-samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-opensource%2Fjdchain-samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-opensource%2Fjdchain-samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jd-opensource","download_url":"https://codeload.github.com/jd-opensource/jdchain-samples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-opensource%2Fjdchain-samples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273317753,"owners_count":25084038,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-06-21T01:43:58.604Z","updated_at":"2025-09-02T16:50:38.302Z","avatar_url":"https://github.com/jd-opensource.png","language":"Java","readme":"## JD Chain Samples\n\n本项目为`JD Chain SDK`的使用样例，开发者可以参考此项目快速上手`JD Chain SDK`，主要包括[交易发送查询](#交易发送查询)，[合约开发部署](#合约开发部署)两部分。\n\n\u003e 请将依赖修改为与连接的JD Chain网络对应的版本\n```xml\n\u003cproperties\u003e\n    \u003cframework.version\u003e1.6.5.RELEASE\u003c/framework.version\u003e\n\u003c/properties\u003e\n```\n\n### 交易发送查询\n\n相关代码放在[sdk-sample](sdk-samples/src)下。\n\n\u003e 开发者在运行本样例前，请根据实际环境修改[config.properties](sdk-samples/src/test/resources/config.properties)中的网关配置，用户配置等信息。\n\n#### 交易发送\n\n参照[UserSample](sdk-samples/src/test/java/com/jdchain/samples/sdk/UserSample.java)实现注册用户，配置用户角色权限功能；\n\n参照[DataAccountSample](sdk-samples/src/test/java/com/jdchain/samples/sdk/DataAccountSample.java)实现注册数据账户，存储`KV`数据功能；\n\n参照[EventSample](sdk-samples/src/test/java/com/jdchain/samples/sdk/EventSample.java)实现注册事件账户，发布事件，事件监听功能；\n\n参照[ContractSample](sdk-samples/src/test/java/com/jdchain/samples/sdk/ContractSample.java)实现合约调用，非插件方式合约部署功能。\n\n#### 数据查询\n\n参照[QuerySample](sdk-samples/src/test/java/com/jdchain/samples/sdk/QuerySample.java)实现对于区块链上数据查询功能。\n\n### 合约开发部署\n\n[contract-samples](contract-samples/src)提供了通过合约注册用户，注册数据账户，注册事件账户，设置`KV`，发布事件的简单合约样例。\n\n\u003e 开发者在运行本样例前，请根据实际环境修改[pom.xml](contract-samples/pom.xml)中的网关配置，用户配置等信息。\n\n修改相关代码，确认配置正确，`contract-samples`项目目录下命令行执行：\n\n- 合约打包\n```bash\nmvn clean package\n```\n\u003e 可忽略打包过程中的`DEBUG`级别错误信息\n可以生成`car`包，可以用于`SDK`方式合约部署。\n\n- 合约部署\n```bash\nmvn clean deploy\n```\n可以直接部署合约上链。\n\n### 了解更多\n\n访问[JD Chain官网](http://ledger.jd.com/)查阅设计及文档。\n访问[github主页](https://github.com/blockchain-jd-com)阅读`JD Chain`源码并参与社区建设。\n\nThanks~","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjd-opensource%2Fjdchain-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjd-opensource%2Fjdchain-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjd-opensource%2Fjdchain-samples/lists"}