From e7315e7d12ff478db37e68e701ca3a9d0179b448 Mon Sep 17 00:00:00 2001 From: CaiHQ Date: Sat, 27 May 2023 16:30:12 +0800 Subject: [PATCH] add change DOIPConfig --- .../sdk/org/bdware/client/SmartContractClient.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/sdk/org/bdware/client/SmartContractClient.java b/src/main/sdk/org/bdware/client/SmartContractClient.java index c68a158..856763f 100644 --- a/src/main/sdk/org/bdware/client/SmartContractClient.java +++ b/src/main/sdk/org/bdware/client/SmartContractClient.java @@ -269,6 +269,20 @@ public class SmartContractClient extends SmartContractHandler { sendMsg(str); } + public static class DOIPConfig { + public String doipAddress; + public String lhsAddress; + public String repoDoid; + public String repoName; + } + + public void setDOIPConfig(DOIPConfig config) { + JsonObject param = new JsonObject(); + param.addProperty("action", "changeDOIPConfig"); + param.addProperty("data", new Gson().toJson(config)); + sendMsg(param.toString()); + } + public void setName(String name) { String str = "{\"action\":\"changeNodeName\",\"data\":\"" + name + "\"}"; sendMsg(str);