
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
该镜像包含一个Express Node.js应用,用于将供应链前端React应用的API请求转换为Corda REST服务器所需的格式,支持供应链中的产品和容器管理、追踪及账本交互。
Docker部署已简化,提供的Dockerfile可创建可运行的镜像。以下命令将创建名为express_corda_app的镜像,并在端口3000上运行制造商服务:
bashdocker build -t express_corda_app . docker run -p 3000:3000 -e "API_URL=https://partyaapi.blockchaincloudpoc.com/api/v1 PORT=3000" express_corda_app
GET /api/v1/{trackingID}/history
返回格式:
json[ { "party": "O=PartyA,OU=Manufacturer,L=47.38/8.54/Zurich,C=CH", "time": 1549565435354 }, {...} ]
用途:将账本上的保管方变更映射为包含变更时间戳和新保管方的对象列表。 其他:trackingID必须是有效的UUID(java.util.uuid)。
GET /api/v1/{trackingID}/scan
返回格式:
json{ "status":"owned" }
用途:检查追踪ID对应的状态是否存在,并返回当前是否为所有者。
其他:trackingID必须是有效的UUID;状态包括owned(已拥有)、unowned(未拥有)、new(新创建)。
GET /api/v1/node-organization
返回格式:
json{ "organization":"PartyA" }
用途:查询节点的组织名称。 其他:无。
GET /api/v1/node-organizationUnit
返回格式:
json{ "organizationUnit":"Manufacturer" }
用途:查询节点的组织单元名称,前端可据此访问不同API。 其他:无。
GET /api/v1/product
返回格式:
json[{ "productName": "Insulin", "health": null, "sold": false, "recalled": false, "misc": { "name": "Expensive Insulin" }, "custodian": "OU=Store, O=PartyD, L=40.73/-74/New York, C=US", "trackingID": "53116d75-e884-4d21-bbd8-057a144a30c5", "timestamp": 1552583510960, "containerID": "17219ad9-3e8b-4c79-ab55-79f6ada4a2d6", "linearId": { "externalId": null, "id": "af9efb7f-d13b-4b68-a10b-e680b5d2b2b0" }, "participants": [ "OU=Carrier, O=PartyB, L=51.50/-0.13/London, C=US", "OU=Warehouse, O=PartyC, L=42.36/-71.06/Boston, C=US", "OU=Store, O=PartyD, L=40.73/-74/New York, C=US", "OU=Manufacturer, O=PartyA, L=47.38/8.54/Zurich, C=CH" ] }]
用途:获取节点可用的所有产品列表。 其他:无。
GET /api/v1/product/{trackingID}
返回格式:
json{ "productName": "Insulin", "health": null, "sold": false, "recalled": false, "misc": { "name": "Expensive Insulin" }, "custodian": "OU=Store, O=PartyD, L=40.73/-74/New York, C=US", "trackingID": "53116d75-e884-4d21-bbd8-057a144a30c5", "timestamp": 1552583510960, "containerID": "17219ad9-3e8b-4c79-ab55-79f6ada4a2d6", "linearId": { "externalId": null, "id": "af9efb7f-d13b-4b68-a10b-e680b5d2b2b0" }, "participants": [ "OU=Carrier, O=PartyB, L=51.50/-0.13/London, C=US", "OU=Warehouse, O=PartyC, L=42.36/-71.06/Boston, C=US", "OU=Store, O=PartyD, L=40.73/-74/New York, C=US", "OU=Manufacturer, O=PartyA, L=47.38/8.54/Zurich, C=CH" ] }
用途:根据URL参数中的trackingID获取单个产品详情。 其他:无。
POST /api/v1/product
请求格式:
json{ "productName":"Dextrose", "misc": {"name":"Expensive Dextrose"}, "trackingID": "0d15d7b8-caaa-468d-8b83-aae049b40f46", "counterparties": ["PartyB","PartyC","PartyD"] }
返回格式:
json{ "generatedID": "0d15d7b8-caaa-468d-8b83-aae049b40f46" }
用途:将产品添加到账本并返回trackingID,同时向所有允许查看和处理该产品的交易对手发送副本。 其他:数据来自前端QR码解析;misc字段可自定义,用于存储元数据。
PUT /api/v1/product/{trackingID}/custodian
返回格式: "0d15d7b8-caaa-468d-8b83-aae049b40f46" 用途:更新产品的保管方为调用该接口的节点。 其他:无。
GET /api/v1/product/containerless
返回格式:
json[{ "productName": "Insulin", "health": null, "sold": false, "recalled": false, "misc": { "name": "Expensive Insulin" }, "custodian": "OU=Store, O=PartyD, L=40.73/-74/New York, C=US", "trackingID": "53116d75-e884-4d21-bbd8-057a144a30c5", "timestamp": 1552583510960, "containerID": "", "linearId": { "externalId": null, "id": "af9efb7f-d13b-4b68-a10b-e680b5d2b2b0" }, "participants": [ "OU=Carrier, O=PartyB, L=51.50/-0.13/London, C=US", "OU=Warehouse, O=PartyC, L=42.36/-71.06/Boston, C=US", "OU=Store, O=PartyD, L=40.73/-74/New York, C=US", "OU=Manufacturer, O=PartyA, L=47.38/8.54/Zurich, C=CH" ] }]
用途:获取节点可用的所有无容器产品列表。 其他:无。
GET /api/v1/container
返回格式:
json[{ "health": null, "sold": false, "recalled": false, "misc": { "name": "Pharma Insulin container" }, "custodian": "OU=Store, O=PartyD, L=40.73/-74/New York, C=US", "trackingID": "17219ad9-3e8b-4c79-ab55-79f6ada4a2d6", "timestamp": 1552583510960, "containerID": null, "contents": [ "53116d75-e884-4d21-bbd8-057a144a30c5", "0d15d7b8-caaa-468d-8b83-aae049b40f46" ], "linearId": { "externalId": null, "id": "2059484c-0c3b-43a7-9604-4a61d3039639" }, "participants": [ "OU=Carrier, O=PartyB, L=51.50/-0.13/London, C=US", "OU=Warehouse, O=PartyC, L=42.36/-71.06/Boston, C=US", "OU=Store, O=PartyD, L=40.73/-74/New York, C=US", "OU=Manufacturer, O=PartyA, L=47.38/8.54/Zurich, C=CH" ] }]
用途:获取节点可用的所有容器列表。 其他:无。
POST /api/v1/container
请求格式:
json{ "misc": {"name": "Pharma Insulin container"}, "trackingID": "17219ad9-3e8b-4c79-ab55-79f6ada4a2d6", "counterparties": ["PartyB","PartyC","PartyD"] }
返回格式:
json{ "generatedID": "17219ad9-3e8b-4c79-ab55-79f6ada4a2d6" }
用途:将容器添加到账本并返回trackingID,同时向所有允许查看和处理该容器的交易对手发送副本。 其他:数据来自前端QR码解析;misc字段可自定义,用于存储元数据。
GET /api/v1/container/{trackingID}
返回格式:
json{ "health": null, "sold": false, "recalled": false, "misc": { "name": "Pharma Insulin container" }, "custodian": "OU=Store, O=PartyD, L=40.73/-74/New York, C=US", "trackingID": "17219ad9-3e8b-4c79-ab55-79f6ada4a2d6", "timestamp": 1552583510960, "containerID": null, "contents": [ "53116d75-e884-4d21-bbd8-057a144a30c5", "0d15d7b8-caaa-468d-8b83-aae049b40f46" ], "linearId": { "externalId": null, "id": "2059484c-0c3b-43a7-9604-4a61d3039639" }, "participants": [ "OU=Carrier, O=PartyB, L=51.50/-0.13/London, C=US", "OU=Warehouse, O=PartyC, L=42.36/-71.06/Boston, C=US", "OU=Store, O=PartyD, L=40.73/-74/New York, C=US", "OU=Manufacturer, O=PartyA, L=47.38/8.54/Zurich, C=CH" ] }
用途:根据URL参数中的trackingID获取单个容器详情。 其他:无。
PUT /api/v1/container/{trackingID}/custodian
返回格式: "***ad9-3e8b-4c79-ab55-79f6ada4a2d6" 用途:更新容器的保管方为调用该接口的节点。 其他:无。
PUT /api/v1/container/{containerTrackingID}/package
请求格式:
json{ "contents":"{productTrackingID}" }
返回格式: "{containerTrackingID}" 用途:将产品添加到容器中。 其他:目前仅支持单次添加一个产品,可修改为支持批量操作。
PUT /api/v1/container/{containerTrackingID}/unpackage
请求格式:
json{ "contents":"{productTrackingID}" }
返回格式: "{containerTrackingID}" 用途:从容器中移除产品。 其他:目前仅支持单次移除一个产品,可修改为支持批量操作。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务