diff --git a/markdown_trans/markdown/ContractAPI.md b/markdown_trans/markdown/ContractAPI.md
new file mode 100644
index 0000000..a879356
--- /dev/null
+++ b/markdown_trans/markdown/ContractAPI.md
@@ -0,0 +1,3687 @@
+# BDContract SDK
+In addition to using the visual smart contract online IDE, users can also use the WebSocket interface, Http interface, Bash interface to start and run the contract.
+
+- - -
+
+## WebSocketSDK download and installation
+The contract SDK provides a javascript version and a Java version of the client.
+
+The download links of Java client are :[java source](./_static/BDWareJavaClient.zip) and [jar](./_static/BDWareConfigTool.zip) refer to Readme.md and test cases in java_Source.
+
+The javascript download link is :[js SDK](./_static/js/createWS.js) Built-in SM2 encryption library link :[sm2 SDK](./_static/js/sm2.js)
+
+### Establish a connection
+Establish a WebSocket connection to the node server.
+
+#### parameter
+
+|field |value|
+| ---------- | ------------------------------------------------------------ |
+| url |If `http` is used, the prefix is `ws://`, for example, `"ws://localhost:1717/SCIDE/SCExecutor"`. If `https` is used, the prefix is `wss://`.|
+| msgHandler |The callback function after receiving the server WebSocket reply can be written by the user, or refer to the example provided below|
+
+#### Sample request
+
+
+```javascript
+var url = "ws://127.0.0.1:1717/SCIDE/SCExecutor";//与Slave节点建立连接
+//var url = "ws://127.0.0.1:1718/NodeCenterWS";//与Manager节点建立连接
+var msgHandler = function(m){
+ console.log("recmsg:");
+ console.log(m);
+};
+var onOpenHandler=undefined;
+wssocket = createWssocket(url,onOpenHandler,msgHandler);
+```
+
+#### Result
+
+
+```
+{
+ receiveSeg: [Function (anonymous)],
+ isSending: false,
+ sendList: [],
+ monitor: [Function (anonymous)],
+ send: [Function (anonymous)],
+ sendNextSegment: [Function (anonymous)],
+ isOpen: [Function (anonymous)]
+}
+```
+
+
+
+### ping
+
+`ping` Server test
+
+#### parameter
+
+|field| 值 |
+| ------ | ---- |
+|action| ping |
+
+#### Sample request
+
+
+```
+var request = {};
+request.action = "ping";
+wssocket.send(JSON.stringify(request));
+```
+
+#### Result
+
+
+```
+{
+ "action":"pong"
+}
+```
+
+### The login
+
+When using the Websocket interface to invoke an interface that requires permission, either to connect to CenterPortal or NodePortal, you must first **The login**. The login process has 3 steps:
+
+- The client establishes a connection to the server and sends {“action”:“getSessionID”} (implemented in onOpenHandler).
+- After receiving the request, the server returns a result similar to {“action”:“onGetSessionID”,“session”:”-4959947809200104526_session”} to the client
+- After receiving the onGetSessionID, the client signs the sessionID with the local public and private keys and invokes the login interface
+- The server returns the onLogin result, and the data field returns the role corresponding to the public key.
+
+- - -
+
+## User Role Division
+
+### Role division of contract nodes
+
+In contract node (NodePortal. HTML) is divided into NodeManager/ContractProvider/ContractInstanceManager/ContractUser four types of roles.
+
+| 角色 |instructions|
+| ----------------------- | ------------------------------------------------------------ |
+| NodeManager |The administrator of the node has rights to manage users and configure nodes|
+| ContractProvider |Have the rights to edit contract, develop contract code, run debugging and so on|
+| ContractInstanceManager |Have the rights to start, stop, and configure I/O of the contract instance|
+| ContractUser |Have the rights to view the list of contract instances and call the contract|
+| Anonymous |Anonymous users, can be called the contract, can apply for to become ContractProvider/InstanceManager role|
+
+
+|interface | 说明 |role|
+| ------------------------------- | -------------------- | ----------------------------------------- |
+| changeDumpPeriod | 设置备份周期 |ContractInstanceManager;|
+| createLedger | 创建账本 |ContractInstanceManager;|
+|dumpContract | 手动备份 |ContractInstanceManager;|
+| deleteMemoryFile | 删除镜像 |ContractInstanceManager;|
+| forkContract | 迁移合约 |ContractInstanceManager;|
+| getDumpPeriod | 获取备份周期 |ContractInstanceManager;|
+|killAllContract | 停止全部实例 |ContractInstanceManager;|
+|killContractProcess | 停止某一实例 |ContractInstanceManager;|
+|listMemoryFiles | 列取某一实例的镜像 |ContractInstanceManager;|
+| loadMemory | 加载镜像 |ContractInstanceManager;|
+| queryContractInstanceDOI | 查询合约实例信息 |ContractInstanceManager;|
+| rebuildHashIndex | |ContractInstanceManager;|
+| setPermission | |ContractProvider;ContractInstanceManager;|
+| startContract | Start the contract |ContractInstanceManager;|
+| startContractBatched | 废弃 |ContractInstanceManager;|
+| startContractByYPK | 启动合约 |ContractInstanceManager;|
+|startContractInTempZips | 废弃 |ContractInstanceManager;|
+| startContractConfig | 启动合约(集群模式) |ContractInstanceManager;|
+| updateContract | |ContractInstanceManager;|
+| connectTo | 连接合约实例输出流 |ContractInstanceManager;ContractUser;|
+| countContractLogGroupByAction | |ContractInstanceManager;ContractUser;|
+| countContractLogGroupByCategory | |ContractInstanceManager;ContractUser;|
+| getLastLog | 查询日志 |ContractInstanceManager;ContractUser;|
+| getLog | 查询日志 |ContractInstanceManager;ContractUser;|
+| getLogSize | 查询日志 |ContractInstanceManager;ContractUser;|
+| listAllContractProcess | |ContractInstanceManager;ContractUser;|
+|listContractProcess | 查询合约实例列表 |ContractInstanceManager;ContractUser;|
+| listLeakContractProcess | |ContractInstanceManager;ContractUser;|
+| queryContractLogByDate | |ContractInstanceManager;ContractUser;|
+|queryContractLogByKey | |ContractInstanceManager;ContractUser;|
+| queryContractLogByOffset | |ContractInstanceManager;ContractUser;|
+| queryContractLogDetail | |ContractInstanceManager;ContractUser;|
+|queryContractLogSize | |ContractInstanceManager;ContractUser;|
+|queryNodeLogByDate | |ContractInstanceManager;ContractUser;|
+| queryNodeLogByOffset | |ContractInstanceManager;ContractUser;|
+|queryNodeLogSize | |ContractInstanceManager;ContractUser;|
+| rebuildContractLogIndex | |ContractInstanceManager;ContractUser;|
+| rebuildNodeLogIndex | |ContractInstanceManager;ContractUser;|
+| changePublic | |ContractProvider;|
+| createFile | 新建文件 |ContractProvider;|
+| deleteFile | 删除文件 |ContractProvider;|
+| distributeContract | |ContractProvider;|
+|downloadContract | |ContractProvider;|
+| downloadContractFromOtherHost | |ContractProvider;|
+| generateAnnotationSample | |ContractProvider;|
+| generateAppDataAnalysis | |ContractProvider;|
+| generateAppDataSource | |ContractProvider;|
+| generateBDCoinEventProject | |ContractProvider;|
+| generateBDCoinProject | |ContractProvider;|
+| generateBiddingExample | |ContractProvider;|
+| generateCSVProject | |ContractProvider;|
+| generateContractExecutor | |ContractProvider;|
+| generateDAC4BDOA | |ContractProvider;|
+| generateDAC4BDOA_persist | |ContractProvider;|
+| generateDACSample | |ContractProvider;|
+| generateEmptyProject | |ContractProvider;|
+| generateEventPublisher | |ContractProvider;|
+| generateEventSubscriber | |ContractProvider;|
+| generateGasExample | |ContractProvider;|
+| generateHello | |ContractProvider;|
+| generateHttpExample | |ContractProvider;|
+| generateIncentives | |ContractProvider;|
+| generateJSONExample | |ContractProvider;|
+| generateLedgerExample | |ContractProvider;|
+| generateLedgerProject | |ContractProvider;|
+| generateLicenceManager | |ContractProvider;|
+| generateLoggerExample | |ContractProvider;|
+| generateMySQLExample | |ContractProvider;|
+| generateMySQLProject | |ContractProvider;|
+| generatePostgreSQLSample | |ContractProvider;|
+| generateReadme | |ContractProvider;|
+| generateRenderSample | |ContractProvider;|
+| generateRocksDBSample | |ContractProvider;|
+| generateSM2Example | |ContractProvider;|
+| generateStaticResource | |ContractProvider;|
+| generateTFLinux | |ContractProvider;|
+| generategenerateTFMac | |ContractProvider;|
+| getProject | |ContractProvider;|
+| getTemplateList | |ContractProvider;|
+| importContractInstanceCodeByDOI | |ContractProvider;|
+| listFile | |ContractProvider;|
+| listProject | |ContractProvider;|
+| listProjectPermission | |ContractProvider;|
+| listProjects | |ContractProvider;|
+| renameFile | |ContractProvider;|
+| saveFile | |ContractProvider;|
+| startContractAsDebug | |ContractProvider;|
+| uploadFile | |ContractProvider;|
+| compile | |ContractProvider;ContractInstanceManager;|
+| evaluates | |ContractProvider;ContractInstanceManager;|
+| executeContractP2PTrustfully | |ContractProvider;ContractInstanceManager;|
+|getCodeByID | 查询代码 |ContractProvider;ContractInstanceManager;|
+|getControlFlowByFileName | |ContractProvider;ContractInstanceManager;|
+| getGasValue | |ContractProvider;ContractInstanceManager;|
+| listCompiledFiles | |ContractProvider;ContractInstanceManager;|
+| queryContractResourceInfo | |ContractProvider;ContractInstanceManager;|
+| queryFreeResourceInfo | |ContractProvider;ContractInstanceManager;|
+|staticVerifyContract | |ContractProvider;ContractInstanceManager;|
+|writeDyjs | |ContractProvider;ContractInstanceManager;|
+| authNodeRole | 授权角色 |NodeManager;|
+| changeBDledger | 修改账本配置 |NodeManager;|
+| changeIpPort | |NodeManager;|
+| changeNodeCenter | 修改集群地址 |NodeManager;|
+| changeNodeName | |NodeManager;|
+| changeIpPort | |NodeManager;|
+| changeDOIPConfig | |NodeManager;|
+| changeYJSPath | |NodeManager;|
+| countNodeLogGroupByCategory | |NodeManager;|
+| countRole | |NodeManager;|
+| deleteRole | |NodeManager;|
+| downloadUUID | 废弃 |NodeManager;|
+| getEncodedUUID | 废弃 |NodeManager;|
+| getPeerID | |NodeManager;|
+| listAllAuthRole | |NodeManager;|
+| listNodeInfos | |NodeManager;|
+| listUnAuthRole | |NodeManager;|
+| loadConfig | |NodeManager;|
+| loadNodeConfig | |NodeManager;|
+| lockEdit | |NodeManager;|
+| unlockEdit | |NodeManager;|
+| updateConfig | |NodeManager;|
+| uploadLicence | |NodeManager;|
+| applyNodeRole | 申请角色 |Any role|
+|executeContract | Call the contract |Any role|
+| getConnCount | |Any role|
+| getHashAbstractLocally | |Any role|
+| getHashLocally | |Any role|
+| getNodeRoleDeprecated | 查询当前角色 |Any role|
+|getSessionID | |Any role|
+| listAdapters | |Any role|
+| listTheContractProcess | |Any role|
+|login | 登录 |Any role|
+| longStr | |Any role|
+| ping | |Any role|
+|queryDataByHash| |Any role|
+| queryDataByHashLocally | |Any role|
+| queryHashByOffset | |Any role|
+|queryHashByRequestID | |Any role|
+|queryHashSize | |Any role|
+| queryLedgers | |Any role|
+| queryRole | |Any role|
+| queryTransactionByHash | |Any role|
+| sendTransaction | |Any role|
+| setLogStage | |Any role|
+
+### Contract access center role division
+
+There are two roles: CenterManager and NodeManager. CenterManager has permissions on cluster Settings. NodeManager can add and delete nodes.
+
+| 接口 | 说明 | 角色 |
+| ----------------------------- | ------------ | -------------------------- |
+|authNodeManager| | CenterManager; |
+|countActionLogByCategory| | CenterManager; |
+|countCMLogByCategory| | CenterManager; |
+|delete| | CenterManager; |
+|listAllUsers| | CenterManager; |
+|listApplyList| | CenterManager; |
+|listLicence| | CenterManager; |
+|queryActionLog| | CenterManager; |
+|queryCMLog| | CenterManager; |
+|updateLicence| | CenterManager; |
+|addNode| | CenterManager;NodeManager; |
+|changeNCFile| | CenterManager;NodeManager; |
+|changeOtherNC| | CenterManager;NodeManager; |
+|createTrustUnit| 创建可信集群 | CenterManager;NodeManager; |
+|deleteTrustUnit| | CenterManager;NodeManager; |
+|getNCFile| | CenterManager;NodeManager; |
+|getNodeTrustUnits| | CenterManager;NodeManager; |
+|getOtherNC| | CenterManager;NodeManager; |
+|listContractProcess | | CenterManager;NodeManager; |
+|listMultiPointContractProcess| | CenterManager;NodeManager; |
+|listNodes| | CenterManager;NodeManager; |
+|listTrustUnits| | CenterManager;NodeManager; |
+|queryUserStat| | CenterManager;NodeManager; |
+|stopMultiPointContractProcess| | CenterManager;NodeManager; |
+|applyRole| | NodeManager; |
+|executeContract | 调用合约 | 任意角色 |
+|executeContractTrustfully| | 任意角色 |
+|getManagerPubkey| | 任意角色 |
+|getNodeRole| | 任意角色 |
+|getNodeSessionID| | 任意角色 |
+|getRole| | 任意角色 |
+| getSessionID | | 任意角色 |
+| login | 登录 | 任意角色 |
+
+- - -
+
+## Contract node Http interface
+
+`http://xxx.xxx.xxx.xxx:1717/SCIDE/SCManager` is the URL of the server providing Http interface services( `xxx.xxx.xxx.xxx:1717` is the IP and port number of BDWare SCIDE operation), the user can add field parameters after the URL, Perform the following functions: `http://xxx.xxx.xxx.xxx:18000/SCIDE/SCManager` is the server that provides Http interface services
+
+URL( `xxx.xxx.xxx.xxx:1717` is the IP and port number of BDWare SCIDE operation), the user can complete the following functions by adding field parameters after the URL:
+
+
+### User Management
+
+#### ping
+
+`ping` Server test
+
+##### methods
+
+GET
+
+##### parameter
+
+
+| 字段 | 值 |
+| ------ | ---- |
+|action| ping |
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=ping
+```
+
+##### Result
+
+
+```json
+{"data":"pong"}
+```
+
+
+### Contract code management class
+
+
+#### Download Contract Item
+
+##### methods
+
+GET
+
+##### parameter
+
+
+| 字段 |value|
+| ----------- | ---------------- |
+| action | downloadContract |
+|projectName| 合约项目名 |
+|isPrivate| 是否在私有目录下 |
+| pubKey |The user’s public key|
+| timestamp |The time stamp|
+| sign |The signature|
+
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=downloadContract&projectName=BDCoin&isPrivate=false&pubKey=0480204f4ef341359a5f64fcb11baf9ca2e6706ac20cba3
+8b7ff78aa631e97346086e2d48fac2ba7f5b75ccbd19ebf495c0e6f9934d69e3b083da4d42e46c991e0c2ea8bb45d59f31f46d0ec700fb01f2fdd275
+```
+
+#### Upload a file
+
+##### methods
+
+POST
+
+
+##### parameter
+
+
+| 字段 |value|
+| --------- | ---------------- |
+| path |File upload path|
+| fileName |File name to be uploaded|
+|isPrivate| 是否在私有目录下 |
+| order |The number of packets|
+| count |Total number of packets|
+| timestamp |The time stamp|
+| sign |The signature|
+
+
+##### Sample request
+
+
+
+```
+http://127.0.0.1:18000/SCIDE/Upload?path=/TEST/TEST.yjs&fileName=WechatIMG15.jpeg&isPrivate=true&order=0&count=3&pubKey=0480204f4ef341359a5f64fcb11baf9ca2e6706ac20cba36ca83066870cf2c1d5de6df67e24e68dde7934af9b31d94a6084281db3d32d5ce42ab8f75bf799aca05&sign=dd867469f5adf9986e4ea6215febeae50c7d4c3836d002cf8c17050dfca031fd2595ffa8646e9eeae53150d2cbaea690e27d818eaf5cea3632ee1b69c3307a4b631e97346086e2d48fac2ba7f5b75ccbd19ebf495c0e6f9934d69e3b083da4d42e46c991e0c2ea8bb45d59f31f46d0ec700fb01f2fdd275
+```
+
+##### Result
+
+
+```json
+{"status":"true","data":"success"}
+```
+
+#### Save the contract script
+
+Send a request to the server to save the contract script content locally to the server.
+
+##### methods
+
+GET
+
+
+##### parameter
+
+| 字段 |value|
+| ------- | -------------- |
+| action | writeDyjs |
+|target| 合约脚本文件名 |
+| content |Contract Script Content|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=writeDyjs&target=testyjs.yjs&content=contract%20shortc%7B%0A%09export%20function%20main(arg)%7B%0A%09%09return%20arg.length%3B%09%0A%09%7D%0A%7D
+```
+
+##### Result
+
+
+```json
+{
+ "status": false,
+ "action": "onWriteDyjs",
+ "data": "success"
+}
+```
+
+Subsequent users can start and invoke the contract.
+
+
+
+
+
+
+
+### Contract instance management class
+
+#### Querying the contract process
+
+Sends a request to the server for all the contract processes that have been started on the server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------- |
+| action | listContractProcess |
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=listContractProcess
+```
+
+##### Result
+
+
+```json
+{
+ "status": false,
+ "action": "onListContractProcess",
+ "data": "[\n {\n \"id\": \"-562752842\",\n \"name\": \"shortc\",\n \"port\": \"1626\",\n \"times\": \"0 \",\n \"traffic\": \"32.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n }\n]"
+}
+```
+
+
+#### 启动合约
+
+Send a request to the server to start a contract.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------------------------- |
+| action |startContract|
+| script |Contract script content, need to do URIEncode|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=startContract&script=contract%20shortc%7B%0A%09export%20function%20main(arg)%7B%0A%09%09return%20arg.length%3B%09%0A%09%7D%0A%7D
+```
+
+##### Result
+
+
+```json
+{
+ "data": "{\"status\":\"Success\",\"result\":\"\"}",
+ "action": "onStartContract",
+ "cid": "-562752842",
+ "executeTime": 1187
+}
+```
+
+
+
+#### 调用合约
+
+Send a request to the server to invoke a contract.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------------------- | --------------------------- |
+| action | executeContract |
+|contractID |Contract ID|
+| withDynamicAnalysis |True /false Indicates whether to perform dynamic analysis|
+| operation |The name of the method that calls the contract|
+| arg |Call the parameters of the contract|
+| pubkey |Optionally, caller public key|
+| signature |Optional, sign|
+
+
+Pubkey is the public key of SM2. The calculation method is as follows:
+
+
+```javascript
+//sm2 可从sm2.js中加载获得。
+signature = sm2.doSignature(contractID+"|"+operation+"|"+arg+"|"+pubkey,privateKey);
+```
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=executeContract&contractID=-620602333&operation=main&arg=hhh
+```
+
+##### Result
+
+
+```json
+{
+ "data": "{\"status\":\"Success\",\"result\":\"3\"}",
+ "action": "onExecuteResult",
+ "executeTime": "13"
+}
+```
+
+
+
+
+#### Bulk start contract
+
+Send a request to the server to start a series of contracts that hold the contract script in the server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------- | ------------------------------------ |
+| action |startContractBatched|
+| fileList |List of contract script files (Json array,URLEncode)|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=startContractBatched&fileList=%5B%20%22EventPuber.yjs%22%2C%20%22EventSuber.yjs%22%2C%20%22LicenceManager.yjs%22%20%5D
+
+```
+
+##### Result
+
+
+```json
+{"EventPuber.yjs":"{\"status\":\"Success\",\"result\":\"\"}","LicenceManager.yjs":"{\"status\":\"Success\",\"result\":\"\"}","EventSuber.yjs":"{\"status\":\"Success\",\"result\":\"\"}","action":"onStartContract"}
+
+```
+
+
+
+
+#### Start the Zip package contract
+
+Send a request to the server to start the contract wrapped in `zip` format in the server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| --------- | ----------------------- |
+| action | startContractInTempZips |
+| owner |Caller’s public key|
+| path |Zip file name of the contract (path and)|
+| signature |Caller signature|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=startContractInTempZips&owner=0475c7b061f32477c1e228dd04143daf58a5574dc3f6b02bd2857cc794eb92bfe98606dc314049e77fd8714f57a5a481cb470cc759e688fe60d40fc87092165e55&path=traceTest.zip&signature=650d3cad50509682937c253d84da99230e8ea1bcfb9b10f6d18f8888c7c4b6b4%2C72231a6daa078a3ce657c0a2ed38251b7db56cf725beaf86780d4c240b19ccc2
+
+```
+
+##### Result
+
+
+```json
+{"data":"verify failed","action":"onStartContract"}
+
+```
+
+
+
+
+#### Get the contract code
+
+Send a request to the server for the script code for an ID contract.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ---------- | ----------- |
+| action | getCodeByID |
+| contractID | 合约ID |
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=getCodeByID&contractID=814046805
+
+```
+
+##### Result
+
+
+```json
+{"status":true,"action":"onCodeResult","data":"@LogType(\"Arg\")\ncontract EventSuberAtCHQ{\n\t\n \texport function init(arg){\n\t\tvar result \u003d YancloudUtil.subscribe(\"EventPuberAt3966\",\"abc\",handler);\n // print(\"Handler:\"+handler);\n \t \n \t\treturn result;\n\t}\n \texport function handler(e){\n var ret \u003d \"ReceiveEvent:\";\n\t\tret+\u003d\"\\n\";\n \tprint(ret);\n \tret+\u003dYancloudUtil.executeContract(\"EventPuberAt3966\",\"notify\",\"success\");\n \tprint(ret);\n return ret;\n\t}\n}\n"}
+
+```
+
+
+
+
+#### Save contract status
+
+Send a request to the server to get the state transition log of the node server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ---------- | ------------ |
+| action | dumpContract |
+| contractID |Contract ID or contract Name=|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/SCManager?action=dumpContract&contractID=counter&pubKey=040461417efe01423ba603f71c689387e8aac4aa2a6f7cddfaf22c1d22c40222f7669a054e7ec2e8533b04ccbc7a0e6655ac4ae4acef81a2b1822ec6cabcaf6c1f&sign=3045022004ffd1346b936196f5b13953d2f3e11823a0d0a2d2f6fecea258cef8e20d99c0022100bbc219ed1f56799ba28a763b9e9e47063164e7ceecfbfa752de42f44551ffb83
+
+```
+
+##### Result
+
+
+```json
+{"data":"success","size":"3.76 KB","time":"0.03s"}
+
+```
+
+
+
+
+#### Gets a list of contracted memory files
+
+Send a request to the server for a list of all memory files in a subfolder.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action | listMemoryFiles |
+| contractID |Contract Id or contract Name|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/SCManager?action=listMemoryFiles&contractID=-247468535&pubKey=040461417efe01423ba603f71c689387e8aac4aa2a6f7cddfaf22c1d22c40222f7669a054e7ec2e8533b04ccbc7a0e6655ac4ae4acef81a2b1822ec6cabcaf6c1f&sign=3045022075c7268e888b0efdef167a3f4dfc6589d771c6be41b3c0a1dc12d057e811f395022100d44f460d0cc3643e169ef08231e75a1e895646c53295c0ef1d15c3b462a53d6b
+
+```
+
+##### Result
+
+
+```json
+{"data":["2020-09-23.18:40:38","2020-09-24.16:03:41","2020-09-24.16:58:39","2020-09-24.18:25:47","2020-09-24.18:32:37","2020-09-24.20:54:41","2020-09-24.20:57:39","2020-09-24.21:31:07","2020-09-24.21:32:09","2020-09-24.21:36:11","2020-09-28.15:29:15","2020-09-28.20:28:29","2020-09-28.20:39:46","2020-09-28.21:45:31","2020-09-28.21:49:18","2020-09-28.22:27:34","2020-09-28.22:31:09","2020-09-28.22:32:49","2020-10-07.16:51:06","2020-10-07.16:51:23","2020-10-25.21:09:10","2020-12-14.19:06:53","2021-02-02.10:28:56","2021-02-02.10:31:13"],"action":"onListMemoryFiles"}
+
+```
+
+#### To stop the contract
+
+Send a request to the server to stop a contract.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ---------- | ------------------- |
+| action | killContractProcess |
+| id |Contract ID|
+| *requestID |Request ID, String type|
+
+`*` This parameter is optional
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=killContractProcess&id=-1759263594
+
+```
+
+##### Result
+
+
+```json
+{"status":false,"action":"onListContractProcess","data":"[\n {\n \"id\": \"-65051856\",\n \"name\": \"EventSuber\",\n \"port\": \"1631\",\n \"times\": \"0 \",\n \"traffic\": \"32.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n },\n {\n \"id\": \"814046805\",\n \"name\": \"EventSuberAtCHQ\",\n \"port\": \"1630\",\n \"times\": \"0 \",\n \"traffic\": \"32.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n },\n {\n \"id\": \"2023975189\",\n \"name\": \"LicenceService\",\n \"port\": \"1632\",\n \"times\": \"0 \",\n \"traffic\": \"32.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n },\n {\n \"id\": \"-620602333\",\n \"name\": \"shortc\",\n \"port\": \"1627\",\n \"times\": \"0 \",\n \"traffic\": \"0.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n }\n]"}
+
+```
+
+
+
+
+#### Termination of all contracts
+
+Send a request to the server to stop all contracts started on the server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action | killAllContract |
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=killAllContract
+
+```
+
+##### Result
+
+
+```json
+{"status":false,"action":"onKillAllContract","data":"Kill:7357,7541,7548,7555,7584,7585,7591,7598,7609,7612,8440,8442,8444,8521,"}
+
+```
+
+#### Static analysis contract
+
+Send a request to the server to statically analyze the contract script.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ---------- | -------------------- |
+| action | staticVerifyContract |
+| contractid |Contract ID|
+| script |Request ID, String type|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=staticVerifyContract&contractid=943728900&script=contract%20shortc%7B%0A%09export%20function%20main(arg)%7B%0A%09%09return%20arg.length%3B%09%0A%09%7D%0A%7D&path=static.yjs
+
+```
+
+##### Result
+
+
+```json
+{"data":"{\"status\":\"Success\",\"result\":\"{\\\"main\\\":\\\"Ret:arg \\\"}\"}","action":"onExecuteResult","cid":"943728900","executeTime":54}
+
+```
+
+
+
+#### Gets the contract static analysis flow
+
+Send a request to the server for a static analysis Control Flow of a contract.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------------ |
+| action | getControlFlowByFileName |
+| path |Contract ID|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=getControlFlowByFileName&path=EventSuber.yjs
+
+```
+
+##### Result
+
+
+```json
+{"init":{"blocks":[{"type":"Continuous","name":"B0","stmts":["\u003dL0\u003d","aload 0","invokevirtual wrp/jdk/nashorn/internal/runtime/ScriptFunction getScope ()Lwrp/jdk/nashorn/internal/runtime/ScriptObject;"],"original":""},{"type":"Continuous","name":"B1","stmts":["\u003dL1\u003d","astore 4"],"original":""},{"type":"Continuous","name":"B2","stmts":["\u003dL2\u003d","aload 4","invokedynamic dyn:getProp|getElem|getMethod:YancloudUtil (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 5 "],"original":"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"},{"type":"Continuous","name":"B3","stmts":["dup","invokedynamic dyn:getMethod|getProp|getElem:subscribe (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 0 "],"original":"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"},{"type":"Continuous","name":"B4","stmts":["swap","ldc XiaomiSmartHomeAtPKU","ldc onAirPurifierModeChange","aload 4","invokedynamic dyn:getProp|getElem|getMethod:handler (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 5 "],"original":"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"},{"type":"Continuous","name":"B5","stmts":["invokedynamic dyn:call:\\\u003dYancloudUtil\\,subscribe (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 0 "],"original":"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"},{"type":"Continuous","name":"B6","stmts":["\u003dL3\u003d","astore 5"],"original":"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"},{"type":"Continuous","name":"B7","stmts":["\u003dL4\u003d","aload 5","areturn"],"original":" \t\treturn result;"},{"type":"Continuous","name":"B8","stmts":["\u003dL5\u003d"],"original":" \t\treturn result;"},{"type":"Continuous","name":"B9","stmts":["\u003dL6\u003d"],"original":" \t\treturn result;"}],"edges":[{"from":"B0","to":"B1","label":{"label":"e"}},{"from":"B1","to":"B2","label":{"label":"e"}},{"from":"B2","to":"B3","label":{"label":"e"}},{"from":"B3","to":"B4","label":{"label":"e"}},{"from":"B4","to":"B5","label":{"label":"e"}},{"from":"B5","to":"B6","label":{"label":"e"}},{"from":"B6","to":"B7","label":{"label":"e"}},{"from":"B7","to":"B9","label":{"label":"e"}}]},"handler":{"blocks":[{"type":"Continuous","name":"B0","stmts":["\u003dL0\u003d","aload 0","invokevirtual wrp/jdk/nashorn/internal/runtime/ScriptFunction getScope ()Lwrp/jdk/nashorn/internal/runtime/ScriptObject;"],"original":""},{"type":"Continuous","name":"B1","stmts":["\u003dL1\u003d","astore 4"],"original":""},{"type":"Continuous","name":"B2","stmts":["\u003dL2\u003d","ldc ReceiveEvent:","aload 2","invokedynamic dyn:getProp|getElem|getMethod:content (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 0 "],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B3","stmts":["invokestatic wrp/jdk/nashorn/internal/runtime/ScriptRuntime ADD (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B4","stmts":["ldc ","invokestatic wrp/jdk/nashorn/internal/runtime/ScriptRuntime ADD (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B5","stmts":["aload 2","invokedynamic dyn:getProp|getElem|getMethod:type (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 0 "],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B6","stmts":["invokestatic wrp/jdk/nashorn/internal/runtime/ScriptRuntime ADD (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B7","stmts":["\u003dL3\u003d","astore 5"],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B8","stmts":["\u003dL4\u003d","aload 4","invokedynamic dyn:getMethod|getProp|getElem:print (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 5 "],"original":" \tprint(ret);"},{"type":"Continuous","name":"B9","stmts":["getstatic wrp/jdk/nashorn/internal/runtime/ScriptRuntime UNDEFINED Lwrp/jdk/nashorn/internal/runtime/Undefined;","aload 5","invokedynamic dyn:call:print (Ljava/lang/Object;Lwrp/jdk/nashorn/internal/runtime/Undefined;Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 5 "],"original":" \tprint(ret);"},{"type":"Continuous","name":"B10","stmts":["pop"],"original":" \tprint(ret);"},{"type":"Continuous","name":"B11","stmts":["\u003dL5\u003d","aload 5","areturn"],"original":" return ret;"},{"type":"Continuous","name":"B12","stmts":["\u003dL6\u003d"],"original":" return ret;"},{"type":"Continuous","name":"B13","stmts":["\u003dL7\u003d"],"original":" return ret;"}],"edges":[{"from":"B0","to":"B1","label":{"label":"e"}},{"from":"B1","to":"B2","label":{"label":"e"}},{"from":"B2","to":"B3","label":{"label":"e"}},{"from":"B3","to":"B4","label":{"label":"e"}},{"from":"B4","to":"B5","label":{"label":"e"}},{"from":"B5","to":"B6","label":{"label":"e"}},{"from":"B6","to":"B7","label":{"label":"e"}},{"from":"B7","to":"B8","label":{"label":"e"}},{"from":"B8","to":"B9","label":{"label":"e"}},{"from":"B9","to":"B10","label":{"label":"e"}},{"from":"B10","to":"B11","label":{"label":"e"}},{"from":"B11","to":"B13","label":{"label":"e"}}]}}
+
+```
+
+### Log Viewing Class
+
+#### Contract log — Number of queries
+
+##### methods
+
+GET
+
+WhencontractNameis empty or not passed in, the number of items queried for the entire contract
+
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ------------------------ |
+| action | queryContractLogSize |
+|contractName| 字符串,非必须,合约名称 |
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogSize&contractName=NanningDataSource
+```
+
+##### Result
+
+
+```json
+{
+ "size": 12,
+ "action": "onQueryContractLogSize",
+ "status": "success"
+}
+
+```
+
+#### Contract log — Query by date
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ------------------------------------- |
+| action |queryContractLogByDate|
+| start |Long, must, start time|
+| end |Long, not required. If end is not used, the current time is default|
+| contractName |String, not required, contract name|
+
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogByDate&start=1597296300272&end=1597296305747
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "getMainFrame",
+ "costTime": "2493",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296300272,
+ "key": "-8590335427581967208"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "loadResource",
+ "costTime": "732",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296301030,
+ "key": "849660532962309239"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "loadResource",
+ "costTime": "4580",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305745,
+ "key": "-8003529429500512736"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "loadResource",
+ "costTime": "4551",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305746,
+ "key": "7604666709899222357"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "loadResource",
+ "costTime": "6",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305751,
+ "key": "-7561786202695627022"
+ }
+ ],
+ "action": "onQueryRecentContractLog"
+}
+```
+
+#### Contract log — Queried by offset
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------------ | --------------------------------------------- |
+| action |queryContractLogByOffset|
+| count |Long: required. Gets the number of logs|
+| offset |Long, not required. If there is no offset, the latest count bar is returned by default|
+| contractName |String, not required, contract name|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogByOffset&count=5&contractName=NanningDataSource
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "loadResource",
+ "costTime": "4",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305842,
+ "key": "-2390672423847654148"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "isOwner",
+ "costTime": "4",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305868,
+ "key": "6056586201629372511"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "getApplyList",
+ "costTime": "6",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305893,
+ "key": "3882409580676458151"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "getAcceptList",
+ "costTime": "4",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305908,
+ "key": "-3437513873417136535"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "analysisByIndustry",
+ "costTime": "6",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "signature": "4c2cef1756b2b591ab7eead19d67331e2294c7ba765c72298733c306ada0b6e84afbb6c7b9dba48b9843236ebe67aecb4af09fe58a51eef0e2e89b9f3e5cad02",
+ "arg": " {\"year\":2018,\"category\":\"工业\",\"indexType\":\"营业额\"}",
+ "date": 1597296314654,
+ "key": "203156239086062402"
+ }
+ ],
+ "action": "onQueryRecentContractLog"
+}
+```
+
+#### Contract log — Query by key
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------------------- |
+| action | queryContractLogByKey |
+| key |Long: Must, the key corresponding to the log|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogByKey&key=203156239086062402
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "analysisByIndustry",
+ "costTime": "6",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "signature": "4c2cef1756b2b591ab7eead19d67331e2294c7ba765c72298733c306ada0b6e84afbb6c7b9dba48b9843236ebe67aecb4af09fe58a51eef0e2e89b9f3e5cad02",
+ "arg": " {\"year\":2018,\"category\":\"工业\",\"indexType\":\"营业额\"}",
+ "date": 1597296314654
+ },
+ "action": "onQueryContractLogByKey"
+}
+```
+
+#### Contract log — Counts the number of calls by time period
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------- | -------------------------------------------------------- |
+| action |countContractLogGroupByCategory|
+| start |Long, must, start time|
+| end |Not required. End time. Default is current|
+| interval |Long, not necessary, statistical interval|
+| category |If not required, the contract name is concatenated with a comma, and all contract calls are counted when not passed in|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=countContractLogGroupByCategory&start=1596758400000&interval=86400000
+```
+
+##### Returns the result
+
+
+```json
+{
+ "start": 1596758400000,
+ "interval": 86400000,
+ "action": "onCountContractLogGroupByCategory",
+ "data": [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 43,
+ 14
+ ]
+}
+```
+
+#### Ledger log — Number of queries
+
+Query the number of logs recorded in the ledger of the node
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ---------------- |
+| action | queryHashSize |
+| contractName | 非必须,合约名称 |
+
+
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryHashSize&contractName=NanningDataSource
+```
+
+##### Returns the result
+
+
+```json
+{
+ "count": "2",
+ "action": "onQueryHashSize"
+}
+```
+
+
+#### Ledger log — Query by offset
+
+Query the hash list of x logs that pass this node to the ledger
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ----------------------------------------------------------- |
+| action |queryHashByOffset|
+| count |Integer, mandatory, indicates the number of items|
+| offset |An integer, not required, representing an offset. If offset is not passed, the latest count bar is returned by default|
+| contractName |A character string, not required, indicating the contract name|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryHashByOffset&count=1&contractName=NanningDataSource
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [
+ {
+ "hash": "3a6c60621907146b77146c1f2d48700e47520173",
+ "date": 1597296314658
+ }
+ ],
+ "action": "onQueryHash",
+ "status": "success"
+}
+```
+
+#### Ledger log — Query details based on hash
+
+Query log content based on hash
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------------------- |
+| action | queryDataByHash |
+| hash |String, available by queryHashByOffset|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryDataByHash&count=1&contractName=NanningDataSource&hash=3a6c60621907146b77146c1f2d48700e47520173
+```
+
+##### Returns the result
+
+
+```json
+{
+ "from": "0x3034643139323433323966373263656431343866",
+ "to": "0x65786563757465436f6e74726163740000000000",
+ "data": "1597296314655 --> {\"extraGas\":\"0\",\"totalGas\":\"0\",\"executionGas\":\"0\",\"signature\":\"4c2cef1756b2b591ab7eead19d67331e2294c7ba765c72298733c306ada0b6e84afbb6c7b9dba48b9843236ebe67aecb4af09fe58a51eef0e2e89b9f3e5cad02\",\"costTime\":\"6\",\"arg\":\" {\\\\\\\"year\\\\\\\":2018,\\\\\\\"category\\\\\\\":\\\\\\\"工业\\\\\\\",\\\\\\\"indexType\\\\\\\":\\\\\\\"营业额\\\\\\\"}\",\"contractID\":\"-1382208250\",\"action\":\"analysisByIndustry\",\"pubKey\":\"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd\"}",
+ "requestID": "1597296314629_6067",
+ "action": "onQueryDataByHash"
+}
+```
+
+#### Ledger log — Queries the Hash according to requestID
+
+Query log contents by requestID. The developer must ensure the uniqueness of requestID
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| --------- | ------------------------ |
+| action | queryHashByRequestID |
+| requestID |A string that is generated when the call is made|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=queryHashByRequestID&requestID=0987654321ab
+```
+
+#### Node Logs — Number of queries
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------- | ---------------------------- |
+| action | queryNodeLogSize |
+| category |Not required, not passed in to query the full situation|
+
+The options include ping, startContract, and saveFile.
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogSize
+
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogSize&category=login
+```
+
+##### Returns the result
+
+
+```json
+{
+ "size": 177,
+ "action": "onQueryNodeLogSize",
+ "status": "success"
+}
+```
+
+#### Node logs — Query by date
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------- | ---------------------------- |
+| action | queryNodeLogByDate |
+| start |Long, must, start date|
+| end |Long, not necessary|
+| category |Not required, not passed in to query the full situation|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogByDate&start=1597376006441
+
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogByDate&start=1596758400000&category=login
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [
+ {
+ "action": "listAllAuthRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006438,
+ "key": "387355870552374748"
+ },
+ {
+ "action": "listUnAuthRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006441,
+ "key": "4772693258708933626"
+ },
+ {
+ "action": "countRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006444,
+ "key": "-6425375229108830572"
+ },
+ {
+ "action": "loadNodeConfig",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006448,
+ "key": "-6602401010405792959"
+ },
+ {
+ "action": "getPeerID",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006449,
+ "key": "-7006776427870311552"
+ }
+ ],
+ "action": "onQueryNodeLogByDate"
+}
+```
+
+#### Node log — Query by offset
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------------ | --------------------------------------------- |
+| action |queryNodeLogByOffset|
+| count |Long: required. Gets the number of logs|
+| offset |Long, not required. If there is no offset, the latest count bar is returned by default|
+| contractName |String, not required, contract name|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogByOffset&count=5
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [
+ {
+ "action": "listAllAuthRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006438,
+ "key": "387355870552374748"
+ },
+ {
+ "action": "listUnAuthRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006441,
+ "key": "4772693258708933626"
+ },
+ {
+ "action": "countRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006444,
+ "key": "-6425375229108830572"
+ },
+ {
+ "action": "loadNodeConfig",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006448,
+ "key": "-6602401010405792959"
+ },
+ {
+ "action": "getPeerID",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006449,
+ "key": "-7006776427870311552"
+ }
+ ],
+ "action": "onQueryNodeLogByOffset"
+}
+```
+
+#### Node Log — Collects statistics on invocation times by time range
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------- | -------------------------------------------------- |
+| action |countLogGroupByCategory|
+| start |Long, must, start time|
+| end |Not required. End time. Default is current|
+| interval |Long, not necessary, statistical interval|
+| category |Action is concatenated with commas if not required, and counts all calls when not passed|
+
+In the category, Action is the action collection of the NodePortal interface. The value can be ping, startContract, and saveFile.
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=countNodeLogGroupByCategory&start=1596758400000&interval=86400000
+
+http://127.0.0.1:18000/SCIDE/CMManager?action=countNodeLogGroupByCategory&start=1596758400000&interval=86400000&category=ping,startContract
+```
+
+##### Returns the result
+
+
+```json
+{
+ "start": 1596758400000,
+ "interval": 86400000,
+ "action": "onCountNodeLogGroupByCategory",
+ "data": [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 912,
+ 761
+ ]
+}
+```
+
+
+
+
+
+#### Example Output historical logs
+
+Send a request to the server for the TimeTravel log of the contract on the node server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------ |
+| action |printTimeTravelLog|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=printTimeTravelLog
+
+```
+
+##### Result
+
+
+```json
+{"status":false,"data":"[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps/aa\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps/aa_1572335939893.dyjs\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps/memoryDumps\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps/.\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps/.\n"}
+
+```
+
+
+
+
+
+#### Example Output node transfer logs
+
+Send a request to the server to get the state transition log of the node server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------- |
+| action |printTransferLog|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=printTransferLog
+
+```
+
+##### Result
+
+
+```json
+{"status":false,"data":""}
+
+```
+
+
+
+### Template generation class
+
+
+
+
+
+
+
+- - -
+
+## Contract node WebSocket interface
+
+### User Management
+
+#### Access to the Session
+
+Before login, obtain the session for signing.
+
+##### parameter
+
+|field|value|
+| ------ | ------------ |
+|action|getSessionID|
+
+##### Sample request
+
+
+```
+var req = {};
+req.action = "getSessionID";
+wssocket.send(JSON.stringify(req));
+```
+
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onSessionID",
+ "session": "9782323_session"
+}
+```
+
+#### The user login
+
+The user performs public-private key authentication
+
+##### parameter
+
+|field| 值 |
+| ------ | ----- |
+|action| login |
+
+##### Sample request
+
+
+```
+var loginParam = {};
+loginParam.pubKey = global.sm2Key.publicKey;
+loginParam.signature = sm2.doSignature(global.session,
+ global.sm2Key.privateKey);
+loginParam.action = "login";
+wssocket.send(JSON.stringify(loginParam));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onLogin",
+ "data": "NodeManager,ContractProvider"
+}
+```
+
+#### Apply for role
+
+In the node administrator interface, you can apply for the names contract administrator, ContractUser, ContractProvider.
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------- |
+| action |applyNodeRole|
+|role|Applying for a Role Name|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "applyNodeRole";
+param.role = "ContractUser";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+``` json
+{
+ "action": "onApplyRole",
+ "data": "success"
+}
+
+{
+ "action":"onApplyRole",
+ "data":"already has!"
+}
+```
+
+#### Authorization role
+
+##### parameter
+
+| 字段 |value|
+| -------- | -------------------- |
+| action |authNodeRole|
+| isAccept |Bool: indicates no authorization|
+| pubKey |Authorized user public key|
+
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "authNodeRole";
+param.isAccept = true;
+param.pubKey = "xxxxx";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onAuthNodeRole",
+ "data": "success"
+}
+```
+
+#### Deleting a User Role
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------- |
+| action |deleteRole|
+| role |Deleting a Role Name|
+
+##### Sample request
+
+
+```
+var deleteInfo = {};
+deleteInfo.pubKey = global.authorizedUsers.[publicKey];
+deleteInfo.action = "deleteRole";
+deleteInfo.role="ContractUser";
+wssocket.send(JSON.stringify(deleteInfo));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onDeleteRole",
+ "data": "success"
+}
+```
+
+#### View the list of authorized users
+
+View authorized node administrators in the current network
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action |listAllAuthRole|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "listAllAuthRole";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status":false,
+ "action":"onListAllAuthRole",
+ "data":
+ {
+ "kv":[{"key":"04eafad549d0757cf67f360815e15e157c7428c9ea9fb933f31a5d45bfb6edd9809c5bf6a5f37d7b817207f19fb2d76b7dbdefe38084cd3282e37b9ac39959dfab",
+ "value":"NodeManager,ContractProvider,ContractUser,ContractInstanceManager"}],
+ "time":[{"key":"04eafad549d0757cf67f360815e15e157c7428c9ea9fb933f31a5d45bfb6edd9809c5bf6a5f37d7b817207f19fb2d76b7dbdefe38084cd3282e37b9ac39959dfab",
+ "value":"1617178709933"}]
+ }
+}
+```
+
+#### View the list of applied users
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |listUnAuthRole|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "listUnAuthRole";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onListUnAuthRole",
+ "kv": [{
+ "key": "049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7",
+ "value": "ContractProvider,ContractUser"
+ }],
+ "time": [{
+ "key": "049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7",
+ "value": "1587398989914"
+ }]
+}
+```
+
+
+##### Parameter (delete)
+
+| 字段 |value|
+| ------ | ------------- |
+| action |queryUserStat|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "queryUserStat";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onQueryUserStat",
+ "userListCount": 3,
+ "applyListCount":0
+}
+```
+
+### Contract code management class
+
+#### Gets a list of public contract files
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------ |
+| action |listProjects|
+
+##### Sample request
+
+
+```
+var request = {};
+request.action = "listProjects";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+```json
+{
+ "action":"onListProjects",
+ "data":"[\"AnnotationSample\",\"AppDataAnalysis\",\"AppDataSource\",\"BiddingExample\",\"ContractExecutor\"]",
+ "executeTime":0,
+ "isPrivate":false
+}
+
+```
+
+
+#### Gets a list of private contract files
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------------- |
+| action |listProjects|
+| pubKey |The public key of the user|
+|isPrivate|true|
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "listProjects";
+request.pubKey = "global.sm2.publicKey";
+request.isPrivate=true;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action":"onListProjects",
+ "data":"[\"CSVFromTemplate\",\"Empty22\",\"MySQLFromTemplate\",\"test\"]",
+ "executeTime":0,
+ "isPrivate":true
+}
+```
+
+
+#### Get the contract instance
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------- |
+| action |listContractProcess|
+
+##### Sample request
+
+
+```
+var request = {};
+request.action = "listContractProcess";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status":false,
+ "action":"onListContractProcess",
+ "data":"[{\"id\": \"1658407837\",\"name\": \"BDCoin\",\"port\": \"1617\"}]"
+}
+```
+
+
+#### Start the contract
+
+##### parameter
+
+| 字段 |value|
+| --------- | ------------- |
+| action |startContract|
+| owner |pubkey|
+|requestID| 当前时间 |
+|script| 脚本内容 |
+| signature |The signature|
+
+##### Sample request
+
+
+```
+request.action = "startContract";
+request.owner = global.sm2Key.publicKey;
+request.requestID = new Date().getTime() + "";
+request.script = global.projectScript;
+request.signature = sm2.doSignature("Algorithm|" + request.script + "|" + global.sm2Key.publicKey, global.sm2Key.privateKey);
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data":"{\"needSeq\":false,\"seq\":0,\"status\":\"Success\",\"result\":\"\",\"isInsnLimit\":false,\"totalGas\":0,\"executionGas\":0,\"extraGas\":0,\"size\":0,\"eventRelated\":false}",
+ "action":"onStartContract",
+ "cid":"-506393888",
+ "executeTime":2496,
+ "responseID":"1617206735696"
+}
+```
+
+#### Distribution of contract items
+
+##### parameter
+
+| 字段 |value|
+| ------------- | ------------------ |
+|action |distributeContract|
+|peersID| 集群中节点peer |
+| projectName |The contract of|
+|isPrivate| 是否在私有目录 |
+| sponsorPeerID |The originators of the ID|
+| signature |The signature|
+
+##### Sample request
+
+
+```javascript
+request.action = "distributeContract";
+request.peersID = peersID;
+request.projectName = global.projects[global.lastClickedProjectId];
+request.isPrivate = $("#privateDir-tab").hasClass("active");
+request.sponsorPeerID = global.peerID;
+request.signature = sm2.doSignature("DistributeContract|" + request.projectName + "|" + global.sm2Key.publicKey, global.sm2Key.privateKey);
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action":"onDistributeContract",
+ "progress":"100.00%"
+}
+```
+
+#### Terminate the contract
+
+##### parameter
+
+| 字段 |value|
+| --------- | ------------------- |
+| action |killContractProcess|
+| id |Contract id|
+| requestID |Request ID|
+
+##### Sample request
+
+
+```
+request.action = "killContractProcess";
+request.id = contractid;
+request.requestID = new Date().getTime() + "";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": "ContractHandler: exit in 3 seconds!",
+ "action": "onOutputStream"
+}
+```
+
+#### Termination of all contracts
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action |killAllContract|
+
+##### Sample request
+
+
+```
+request.action = "killAllContract";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status":false,
+ "action":"onKillAllContract",
+ "data":"Kill:7241,7245,"
+}
+```
+
+
+
+#### Static analysis contract
+
+##### parameter
+
+| 字段 |value|
+| ---------- | -------------------- |
+| action |staticVerifyContract|
+| owner |User private key|
+| isPartial |Is it part of|
+| contractid |contractid|
+| script |The script content|
+|path |Name of contract|
+
+
+##### Sample request
+
+
+```javascript
+request.action = "staticVerifyContract";
+request.owner = global.sm2Key.privateKey
+request.isPartial = false;
+request.contractid = contractid;
+request.script = global.projectScript;
+request.path = global.projectName;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+
+{
+ "data":"{\"needSeq\":false,\"seq\":0,\"status\":\"Success\",\"result\":{\"hello\":\"Ret:\"},\"isInsnLimit\":false,\"totalGas\":0,\"executionGas\":0,\"extraGas\":0,\"size\":0,\"eventRelated\":false}",
+ "action":"onStaticVerifyResult",
+ "cid":"verify",
+ "executeTime":83
+}
+```
+
+
+
+#### Delete the contract
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------- |
+| action |deleteFile|
+| file |fileName|
+
+##### Sample request
+
+
+```javascript
+request.action = "deleteFile";
+request.file = fileName;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action":"onDeleteFile",
+ "data":"success",
+ "executeTime":0
+}
+```
+
+
+
+#### Private contracts are uploaded to public directories
+
+##### parameter
+
+| 字段 |value|
+| -------- | ------------ |
+| action |changePublic|
+|pubkey| 用户公钥 |
+| fileName |fileName|
+
+##### Sample request
+
+
+```javascript
+request.action = "changePublic";
+request.pubkey = pubkey;
+request.fileName = fileName;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action":"onChangePublic",
+ "data":"success",
+ "executeTime":0
+}
+```
+
+
+
+#### Upload the contract
+
+##### parameter
+
+| 字段 |value|
+| -------- | ----------- |
+| action |UploadFile|
+| isAppend | false |
+|fileName|fileName|
+| path | path |
+|isPrivate|true/false|
+| content |The fileContent (base64 encoding)|
+
+##### Sample request
+
+
+```
+request.action = "uploadFile";
+request.isAppend = false;
+request.fileName = "test1.yjs";
+request.path = "test1";
+text="Y29udHJhY3QgdGVzdDF7CglleHBvcnQgZnVuY3Rpb24gaGVsbG8oYXJnKXsgCiAgICAgICAgcmV0dXJuICJ3b3JsZCI7ICAKICAgIH0gICAKfQ=="
+request.content = text;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action":"onUploadFile",
+ "data":"success",
+ "executeTime":0
+}
+```
+
+#### Compile the contract
+
+##### parameter
+
+| 字段 |value|
+| ---------- | -------------------------- |
+| action |compile|
+| path |String indicates the name of the project to be compiled|
+| privateTab |Bool, indicates whether the item is a private directory|
+
+##### Sample request
+
+
+```javascript
+var req = {"action":"compile","path":"Hello","privateTab":true}
+```
+
+##### Returns the result
+
+
+```json
+{"result":"Hello_2020-08-17-09:09:40.ypk","action":"onCompile"}
+```
+
+#### Locking private directories
+
+Lock the private directory editing function for a user
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------------- |
+| action |lockEdit|
+| pubKey |String Indicates the public key to be locked|
+
+##### Sample request
+
+
+```javascript
+var req = {};
+req.action = "lockEdit";
+req.pubKey = "xxxxxx";
+wssocket.send(JSON.stringify(req));
+```
+
+```json
+{
+ "action":"onLockEdit",
+ "status":"success",
+ "data":"04c4c855862b53f323e077ccfcc744ecc2c0a04645ed16d99ede8fd5866b38c0670a97ad22c6260d1a4672aba2a5fe229a2d4eba34627c054aab102620afa288c1"
+}
+```
+
+
+#### Unlock a private directory
+
+Unlock the private directory editing function for a user
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------------- |
+| action |unLockEdit|
+| pubKey |String Indicates the public key to be locked|
+
+##### Sample request
+
+
+```javascript
+var req = {};
+req.action = unlockEdit;
+req.pubKey = "xxxxxx";
+wssocket.send(JSON.stringify(req));
+```
+
+```json
+{
+ "action":"onUnlockEdit",
+ "status":"success",
+ "data":"04c4c855862b53f323e077ccfcc744ecc2c0a04645ed16d99ede8fd5866b38c0670a97ad22c6260d1a4672aba2a5fe229a2d4eba34627c054aab102620afa288c1"
+}
+```
+
+
+### Contract instance management class
+
+#### Querying the contract process
+
+Sends a request to the server for all the contract processes that have been started on the server.
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------- |
+| action |listContractProcess|
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "listContractProcess";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Result
+
+
+```json
+{
+ "status": false,
+ "action": "onListContractProcess",
+ "data": "[...]"
+}
+```
+
+
+
+#### Call the contract
+
+Send a request to the server to invoke a contract.
+
+##### parameter
+
+| 字段 |value|
+| -------------------- | --------------------------- |
+| action |executeContract|
+| contractID |Contract ID|
+| withDynamicAnalysis |True /false Specifies whether to perform dynamic analysis. This parameter is optional|
+|operation| 调用合约的方法名 |
+|arg| 调用合约的parameter |
+| pubkey |Caller public key, optional|
+| signature |Caller signature, optional|
+
+`*` Indicates that the value is optional
+
+
+```javascript
+//sm2 可从sm2.js中加载获得。
+signature = sm2.doSignature(contractID+"|"+operation+"|"+arg+"|"+pubkey,privateKey);
+```
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "executeContract";
+request.contractID = "2073401446";
+request.operation = "main";
+request.arg = "hhhhh";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Result
+
+
+```json
+{
+ "needSeq":false,
+ "seq":0,
+ "status":"Success",
+ "result":"world",
+ "isInsnLimit":false,
+ "totalGas":0,
+ "executionGas":0,
+ "extraGas":0,
+ "size":0,
+ "eventRelated":false,
+ "responseID":"1617211077264_223",
+ "action":"onExecuteResult",
+ "executeTime":"5"
+}
+```
+
+#### Output history log (delete)
+
+Send a request to the server for the TimeTravel log of the contract on the node server.
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------ |
+| action |printTimeTravelLog|
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "printTimeTravelLog";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Result
+
+
+```json
+{
+ "status": false,
+ "data": "[CMActions] dumpContract :…t/contractExamples/memoryDumps/LicenceManager\n"
+}
+```
+
+
+
+#### Outputting node transition logs (delete)
+
+Send a request to the server to get the state transition log of the node server.
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------- |
+| action |printTransferLog|
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "printTransferLog";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Result
+
+
+```json
+ {
+ "status": false,
+ "data": ""
+}
+```
+
+
+
+#### Contract status migration
+
+Send a request to the server to get the state transition log of the node server.
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ------------ |
+| action | loadMemory |
+|contractName| 合约名称 |
+|memoryFile| 合约文件名称 |
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "loadMemory";
+request.contractName = "JsonContract";
+request.memoryFile = "2020-03-17.20/42/55";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Result
+
+
+```json
+{
+ "data":"success",
+ "size":"0.00 B",
+ "action":"onTransferTo",
+ "time":"0.01s"
+}
+```
+
+
+
+### Log Viewing Class
+
+#### Querying Local Node Logs in the last N Days (Deleted)
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------- |
+| action |listLocalNodeLog|
+| date |The current time|
+
+##### Sample request
+
+
+```
+request.action = "listLocalNodeLog";
+request.date = new Date().getTime() - 24 * 3600 * 1000 * n;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data":"[{\"action\":\"login\",\"pubKey\":\"null\",\"status\":\"accept\",\"date\":1583139323822}\",]"
+}
+```
+
+
+
+#### Querying Local Contract Logs in the last N Days (Deleted)
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------------- |
+| action |listLocalContractLog|
+| date |The current time|
+
+##### Sample request
+
+
+```
+request.action = "listLocalContractLog";
+request.date = new Date().getTime() - 24 * 3600 * 1000 * n;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data":"[\"{\"action\":\"startContract\",\"pubKey\":\"04405d7ba358d9234939623ab51ea94ca685e6a1f36ed81fd9630ccba6473e632f163bb30faffd4c91f21e5bace20101d6d6e36c04ac67eea14cc24b4962b84f57\",\"contractID\":\"845581788\",\"contractName\":\"null\",\"date\":1583141525539}\"]"
+}
+```
+
+
+
+
+### Node Configuration Class
+
+#### Obtain node configuration information
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |loadNodeConfig|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "loadNodeConfig";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```
+{
+ "status": true,
+ "action": "onLoadNodeConfig",
+ "data": {
+ "nodeName": "04BF52213343C147E631B877BCEB17B794230EE551E85F58FA429C4BA03D690778CC384C6916C63DF36CB9E35C7E274FDB4E18491DFE3D611D347856D441CACC5AF9090B515F02AFC2DFBF56461EC83B5A4CD342466360D6CF82E6E40B637430AC4A329CCBC798DAF7D526AF9E3B3600E0BEA1BFAB8C160EF90128FAF67B19E45F37664F1E4B",
+ "licence": "04AADCC7103CD02626D228AFFBEF53F8242ECA4DDD6F179D30B622440666715CFBB6FD1D3678A2B25812DEA9917073E79A65F7ADE517F784DC76288EFCEB37ECAA1025E6903540702F729DA1C2ECCD93F4E6FAFCE40DF443E7FD74387169D0C6D927C7BB12882D0471C8D3E6F31B0316A42FC38F6DD9978D4351B23B2AD63E2244909E98F51185D32CB99B4AE4E22D3AB4C04027BB",
+ "expireTime": "Wed Aug 26 09:43:08 CST 2020",
+ "nodes": "[\"node1\",\"node2\",\"node3\"]",
+ "yjsPath": "/Users/xxx/docs/BDWareHttp/generatedlib/yjs.jar",
+ "nodeCenter": "ws://127.0.0.1:1719/SCIDE/NodeCenter"
+ }
+}
+
+{
+ "status":true,
+ "action":"onLoadNodeConfig",
+ "data":{
+ "nodeName":"Node_180",
+ "peerID":"",
+ "masterAddress":"39.104.201.40:21031",
+ "licence":"04AADCC7103C",
+ "doipConfig":"{\\"LHSProxyAddress\\":\\"http://39.104.201.40:21042/\\",\\"ownerHandle\\":\\"86.5000.470/dou.TEST\\",\\"certPath\\":\\"keys/dou.TEST.keystore\\",\\"certPassword\\":\\"123456\\",\\"repoID\\":\\"86.5000.470/doip.vcg9Mu1gSq_bdw\\",\\"listeners\\":\\"[{\\\\\\"url\\\\\\":\\\\\\"tcp://39.104.201.40:21032\\\\\\",\\\\\\"protocolVersion\\\\\\":\\\\\\"2.1\\\\\\",\\\\\\"messageFormat\\\\\\":\\\\\\"packet\\\\\\"}]\\",\\"serviceDescription\\":\\"test local Contract Repository\\",\\"serviceName\\":\\"ContractEngine021\\"}",
+ "clusterConnected":"false",
+ "nodePubKey":"0492d974b8a5b473d0ed2c81800917f76e2a1ec3666067888c85fe6922a672223f2083f95402ae13a744df58deabbe7206c4a317dd14296b0d3941a26ca4e34dc5",
+ "ipPort":"",
+ "bdledger":"39.108.56.240:18091,39.108.56.12:1809139.104.70.160:18091 47.98.247.70:18091 47.98.248.208:18091 39.104.77.165:18091 47.98.249.131:18091",
+ "yjsPath":"/data/bdwaas/bdcontract/yjs.jar",
+ "nodeCenter":"ws://39.104.201.21040/SCIDE/NodeCenter"
+ }
+}
+```
+
+
+#### Modifying Node Configuration
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |updateConfig|
+| key |The configuration item to change|
+| val |The target value to change|
+
+Options for key include:
+
+| key的示 |Val sample| 说明 |
+| ------------- | ----------------------------------- | ------------------------------- |
+| yjsPath |/User/xxx/cp/yjs.jar| 合约进程启动所需的jar |
+| dataChain | 192.168.1.8:18090,182.173.2.3:18091 | 账本节点的ip与端口 |
+| nodeCenter |ws://127.0.0.1:18002| CenterPortal所在的ip/端口 |
+| nodeName |Node_180| 字符串类型 |
+| masterAddress | 192.168.3.2:18001 | 该NodePortal节点的ip和的TCP端口 |
+
+The TCP port of the NodePortal is the HTTP/WS port number +1 of the Node.
+
+
+#### Modifying a Node Name
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |changeNodeName|
+| data |New node name|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "changeNodeName";
+param.data = "NewNodeName";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onChangeNodeName",
+ "data": true
+}
+```
+
+
+
+#### Example Change the YJS path of a node
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------------- |
+| action |changeYJSPath|
+| data |Yjs.jar path of the node server|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "changeYJSPath";
+param.data = "/Users/xxx/docs/BDWareHttp/generatedlib/yjs.jar";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onChangeYJSPath",
+ "data": true
+}
+```
+
+
+
+#### Modify NodeCenter
+
+##### parameter
+
+| 字段 |value|
+| ------ | ----------------------------------------- |
+| action |changeNodeCenter|
+| data |NodeCenterWebSocket path to which the node server is to connect|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "changeNodeCenter";
+param.data = "ws://127.0.0.1:1719/SCIDE/NodeCenter";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onChangeNodeCenter",
+ "data": true
+}
+```
+
+
+
+#### Example Modify an account node
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------------------- |
+| action |changeBDledger|
+| data |The IP address of the node is port, separated by commas (,)|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "changeBDledger";
+param.data = "39.108.56.240:18091,39.108.56.12:18091";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onChangeBDledger",
+ "data": true
+}
+```
+
+
+
+#### Uploading the Node License
+
+##### parameter
+
+| 字段 |value|
+| ------ | ----------------------- |
+| action |uploadLicence|
+| data |The content of the license on the node server|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "uploadLicence";
+param.data = "04AADCC7103C";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onUploadLicence",
+ "data": true
+}
+```
+
+
+
+#### Obtaining Node ids
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------- |
+| action |getNodeID|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "getNodeID";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onGetNodeID",
+ "data": "0431…d3a92e1184bbc5817ebda5c2ad498e4ff1d240009b4f06d"
+}
+```
+
+
+
+#### Gets the trusted execution cluster where the node resides
+
+##### parameter
+
+| 字段 |value|
+| ---------- | ------------------------------------------------ |
+| action |getNodeTrustUnits|
+| data |The node ID|
+| msgHandler |MsgHandler for the callback function that receives a reply|
+| ws |WebSocket address of the NodeCenter to which the node belongs|
+
+##### Sample request
+
+
+```
+centerportalws = createWssocket("ws://127.0.0.1:1718/NodeCenterWS",function() {
+var param = {};
+param.action = "getNodeTrustUnits";
+param.data = "0431e311bd70840fe69965e2cabea97fafe99f2133953c01abb9bd7cb62af42f8283f474d203051e920d3a92e1184bbc5817ebda5c2ad498e4ff1d240009b4f06d";
+centerportalws.send(JSON.stringify(param));
+}, msgHandler);
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [{
+ "key": "0475c7b061...65e55_4063665700873624164",
+ "value": "[\"04541429c11b094…40009b4f06d\"]"
+ }],
+ "action": "onGetNodeTrustUnits"
+}
+```
+
+### Template generation class
+
+#### Gets a list of contract templates
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action |getTemplateList|
+
+##### Sample request
+
+
+``` javascript
+req={};
+req.action = "getTemplateList";
+wssocket.send(JSON.stringify(req));
+```
+
+##### Returns the result
+
+
+``` json
+{
+ "data": [
+ {
+ "formDesc": {
+ "dbPWD": {
+ "label": "密码",
+ "type": "input"
+ },
+ "contractName": {
+ "label": "合约名称",
+ "type": "input"
+ },
+ "accessPolicy": {
+ "label": "访问控制策略",
+ "type": "input",
+ "option": [
+ {
+ "text": "无访问控制",
+ "value": "NAC"
+ },
+ {
+ "text": "直接访问控制",
+ "value": "DAC"
+ },
+ {
+ "text": "基于角色的访问控制",
+ "value": "RBAC"
+ }
+ ]
+ },
+ "dbUserName": {
+ "label": "用户名",
+ "type": "input"
+ },
+ "fieldList": {
+ "label": "字段名",
+ "type": "tag"
+ },
+ "dbUrl": {
+ "label": "数据库链接",
+ "type": "input"
+ },
+ "tableName": {
+ "label": "表名",
+ "type": "input"
+ }
+ },
+ "apiName": "generateMySQLProject"
+ },
+ {
+ "formDesc": {
+ "contractName": {
+ "label": "合约名称",
+ "type": "input"
+ },
+ "accessPolicy": {
+ "label": "访问控制策略",
+ "type": "input",
+ "option": [
+ {
+ "text": "无访问控制",
+ "value": "NAC"
+ },
+ {
+ "text": "直接访问控制",
+ "value": "DAC"
+ },
+ {
+ "text": "基于角色的访问控制",
+ "value": "RBAC"
+ }
+ ]
+ }
+ },
+ "apiName": "generateEmptyProject"
+ }
+ ],
+ "action": "onTemplateList"
+}
+```
+
+#### Blank Contract Template
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ----------------------------- |
+| action |generateEmptyProject|
+| contractName |The name of the contract is a string|
+| isPrivate |Boolean type, whether it is a private project|
+| accessPolicy |If the value is “DAC”, direct access control is implemented|
+
+##### Sample request
+
+
+```javascript
+var req = {};
+req.contractName = "Empty22";
+req.action = "generateEmptyProject";
+req.accessPolicy = "DAC";
+//wssocket为建立好的连接
+wssocket.send(JSON.stringify(req));
+```
+
+##### Returns the result
+
+```json
+{
+ "action":"onListProjects",
+ "data":"[\"AnnotationSample\",\"AppDataAnalysis\",\"AppDataSource\"]",
+ "executeTime":0,
+ "isPrivate":false
+}
+```
+
+#### MySQL Access Contract
+
+##### parameter
+
+| 字段 |value|
+| ------------- | ------------------------------------------------------ |
+| action |generateMySQLProject|
+| contractName |The name of the contract is a string|
+| isPrivate |Boolean type, whether it is a private project|
+| dbUrl |The string is the URI of the database|
+| dbUserName |The value is a string of characters and the user name of the database|
+| dbPWD |The value is a string of characters and the database password|
+| accessPolicy |If it is “DAC”, direct access control is implemented; if it is “NAC”, no access control is implemented|
+| tableName |A string, the name of a database table|
+| fieldList |A list of strings, a list of database fields|
+| defaultAccept |Boolean value indicating whether the application is granted by default|
+
+##### Sample request
+
+
+```javascript
+var req = {};
+req.contractName = "MySQLFromTemplate";
+req.action = "generateMySQLProject";
+req.pubKey = global.sm2Key.publicKey;
+req.isPrivate = true;
+req.tableName = "data";
+req.dbUrl = "jdbc:mysql://xxx:xxx/xxx";
+req.dbUserName = "loushuai";
+req.dbPWD = "loushuai";
+req.fieldList = [{"name":"名字","code":"*"}];
+req.basicInfo={"type":"所属分类","name":"资源名称"};
+req.accessPolicy = "DAC";
+req.defaultAccept = true;
+//global.wssocket为建立好的连接
+global.wssocket.send(JSON.stringify(req));
+```
+
+##### Returns the result
+
+```json
+{
+ "action":"onListProjects",
+ "data":"[\"CSVFromTemplate\",\"Empty22\",\"Hello\",\"MySQLFromTemplate\",\"test\"]",
+ "executeTime":0,
+ "isPrivate":true
+}
+```
+#### CSV Access Contract
+
+##### parameter
+
+| 字段 |value|
+| ----------------- | ------------------------------------------------------ |
+| action |generateCSVProject|
+| contractName |The name of the contract is a string|
+| base64EncodedData |The value is a string of characters in a Base64-encoded CSV file|
+| isPrivate |Optional fields, Boolean type, private item or not|
+| accessPolicy |If it is “DAC”, direct access control is implemented; if it is “NAC”, no access control is implemented|
+| defaultAccept |An optional field, a Boolean value that indicates whether the application is granted by default|
+
+##### Sample request
+
+
+```javascript
+var req = {};
+req.contractName = "CSVFromTemplate";
+req.action = "generateCSVProject";
+req.pubKey = global.sm2Key.publicKey;
+req.isPrivate = true;
+req.tableName = "data";
+req.accessPolicy = "DAC";
+req.defaultAccept = true;
+req.base64EncodedData = "bmFtZSwgc2NvcmUsCmphY2ssIDkwLApsdWN5LCA5MQo=";
+//global.wssocket为建立好的连接
+global.wssocket.send(JSON.stringify(req));
+```
+##### Returns the result
+
+```json
+{
+ "action":"onListProjects",
+ "data":"[\"CSVFromTemplate\",\"Empty22\",\"Hello\",\"MySQLFromTemplate\",\"test\"]",
+ "executeTime":0,
+ "isPrivate":true
+}
+```
+
+- - -
+
+## Routing node WebSocket interface
+
+### User Management
+
+#### Access to the Session
+
+Before login, obtain the session for signing.
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------ |
+| action |getSessionID|
+
+##### Sample request
+
+
+```
+var req = {};
+req.action = "getSessionID";
+wssocket.send(JSON.stringify(req));
+```
+
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onSessionID",
+ "session": "9782323_session"
+}
+```
+
+
+#### The user login
+
+To authenticate the public key, the user needs to call “getSessionID” to obtain the sessionID for signature.
+
+##### parameter
+
+| 字段 | 值 |
+| ------ | ----- |
+| action | login |
+
+##### Sample request
+
+
+```
+var loginParam = {};
+loginParam.pubKey = global.sm2Key.publicKey;
+loginParam.signature = sm2.doSignature(global.session,
+ global.sm2Key.privateKey);
+loginParam.action = "login";
+wssocket.send(JSON.stringify(loginParam));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onLogin",
+ "data": "CenterManager"
+}
+```
+
+
+
+#### User gets the current role (Delete)
+
+A user obtains a role based on the public key used during login. If it is the first login, the public key used during login is called the access administrator by default
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------- |
+| action |getRole|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "getRole";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onGetRole",
+ "data": "CenterManager"
+}
+```
+
+#### Apply for role
+
+On the Access administrator page, you can apply for a node administrator for a node in the network
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------- |
+| action |applyRole|
+|role|Specifies the name of the applied role|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "applyRole";
+param.role="
+wssocket.send(JSON.stringify(param));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onApplyRole",
+ "data": "failed"
+}
+```
+
+
+#### Add a node
+
+##### parameter
+
+| 字段 |value|
+| ---------- | ---------------- |
+| action |addNode|
+|nodePubKey| 要添加的节点公钥 |
+
+#### Sample request
+
+
+```
+var req = {};
+//某节点的publicKey可通过连接该节点,并通过"获取节点配置信息"接口获取
+req.nodePubKey = publicKey;
+req.action = "addNode";
+wssocket.send(JSON.stringify(req));
+```
+
+
+#### Deleting a User Role
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |delete|
+| pubKey |The public key of the corresponding user|
+
+##### Sample request
+
+
+```
+var deleteInfo = {};
+deleteInfo.pubKey = user.publicKey;
+deleteInfo.action = "delete";
+wssocket.send(JSON.stringify(deleteInfo));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onDelete",
+ "data": "success"
+}
+```
+
+#### View the list of authorized users
+
+View authorized node administrators in the current network
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------ |
+| action |listAllUsers|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "onListAllUsers";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onListAllUsers",
+ "kv": {
+ "key": "049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7",
+ "value": " NodeManager"
+ },
+ "time": {
+ "key": "049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7",
+ "value": 1587398989914
+ }
+}
+```
+
+#### View the list of applied users
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------- |
+| action |listApplyList|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "onListApplyList";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onListApplyList",
+ "kv": {
+ "key": "04b00f32eab70c78d1b43738f190d326d36c021af2124acefe6d057016b11ea31c750bb473e565c9d89e4993a44f4d30adf447d3026a21ff4b3b64cef523074ef7",
+ "value": " NodeManager"
+ },
+ "time": {
+ "key": "04b00f32eab70c78d1b43738f190d326d36c021af2124acefe6d057016b11ea31c750bb473e565c9d89e4993a44f4d30adf447d3026a21ff4b3b64cef523074ef7",
+ "value": 1587398989914
+ }
+}
+```
+
+#### View the distribution of user types
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------- |
+| action |queryUserStat|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "onQueryUserStat";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onQueryUserStat",
+ "userListCount": 3,
+ "applyListCount":0
+}
+```
+
+### Node Management
+
+#### Viewing the Node List
+
+View the node list that the user has the permission to view (only available to access administrators and contract managers)
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------- |
+| action |listNodes|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "listNodes";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "offline": [{
+ "key": "0431e31...40009b4f06d",
+ "value": "0431e311bd708...b4f06d"
+ }],
+ "action": "onListNodes",
+ "online": [{
+ "contracts": [],
+ "pubKey": "0431e311...09b4f06d",
+ "nodeName": "NewNodeName",
+ "udpID": "528822126",
+ "cimanager": ""
+ }]
+}
+```
+
+
+#### View the list of trusted execution clusters
+
+View the node list that the user has permission to view (available only to the center administrator and contract manager)
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |listTrustUnits|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "listTrustUnits";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [{
+ "key": "0470b2f27f4f6…1cb855f1ecec11",
+ "value": "[...]"
+ }],
+ "action": "onListTrustUnits"
+}
+```
+
+
+#### Establish a trusted execution cluster
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------------- |
+| action |createTrustUnit|
+| data |Json array of node public keys|
+| Msg |The name of the cluster|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "createTrustUnit";
+param.data = "[\"382r0934309t...\",\"345343rr3f34...\"]";
+param.msg = "newUnit1";
+global.wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onCreateTrustUnit",
+ "status": "Success"
+}
+```
+
+
+#### Delete a trusted execution cluster
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action |deleteTrustUnit|
+| data |Trusted execution cluster ID|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "deleteTrustUnit";
+param.data = "0475d34rf3434..._1583410158761";
+global.wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onDeleteTrustUnit",
+ "status": "Success"
+}
+```
+
+
+
+### Log Viewing Class
+
+#### View the statistics of network management operations
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |queryActionLog|
+| date |The current time|
+
+##### Sample request
+
+
+```
+request.action = "onQueryActionLog";
+request.date = new Date().getTime() - 24 * 3600 * 1000 * n;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{ "action":"onQueryActionLog",
+ "data":"[{\"action\":\"login\",\"pubKey\":\"null\",\"status\":\"accept\",\"date\":1583139323822}\",]"
+}
+```
+
+
+
+#### View local contract logs in the last N days
+
+##### 参数
+
+| 字段 |value|
+| ------ | -------------------- |
+| action |listLocalContractLog|
+| date |The current time|
+
+##### Sample request
+
+
+```
+request.action = "listLocalContractLog";
+request.date = new Date().getTime() - 24 * 3600 * 1000 * n;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data":"[\"{\"action\":\"startContract\",\"pubKey\":\"04405d7b...\",\"contractID\":\"845581788\",\"contractName\":\"null\",\"date\":1583141525539}\"]"
+}
+```
+
+
+- - -
+
+## Bash interface
+
+Has been abandoned. BDWareConfigTool can be used instead. Send Socket instructions through the command line to execute the invocation of methods in the class to accomplish the following functions (need to run the instance on the local port)
+
+![Schematic diagram of Bash interface functions](./_static/imgs/bash-api.png)
+
+### instruction
+
+
+```bash
+java -jar yjs.jar function_name arguments
+
+```
+
+`function_name` is the name of the called method;
+
+`arguments` is the method parameter.
+
+### Start the contract
+
+#### parameter
+
+`function_name` is `startContract`;
+
+`arguments` to start the contract parameters, including the type of contract `type`, the contract ID `id`, contract script `script`.
+
+#### Order sample
+
+
+```bash
+java -jar yjs.jar startContract "{\"type\":\"Algorigthm\",\"id\":\"656565\",\"script\":\"contract c{function main(arg){return arg/1.0+1;}}\"}"
+```
+
+### Call the contract
+
+#### parameter
+
+`function_name` is `executeContract`;
+
+`arguments` need to invoke the contract parameters, including the call parameters `arg`, the contract ID `contractID`.
+
+#### Order sample
+
+
+```bash
+java -jar yjs.jar executeContract "{\"arg\":\"http://www.baidu.com\",\"contractID\":\"656564\"}"
+```
+
+### To stop the contract
+
+#### parameter
+
+`function_name` is `stopContract`;
+
+`arguments` is the parameter required to invoke the contract, that is, the contract ID `contractID`.
+
+#### Order sample
+
+
+```bash
+java -jar yjs.jar stopContract "{\"arg\":\"http://www.baidu.com\",\"contractID\":\"656564\"}"
+```
+
+### Termination of all contracts
+
+#### parameter
+
+`function_name` indicates that `stopAllContracts`.
+
+#### Order sample
+
+
+```bash
+java -jar yjs.jar stopAllContracts
+```
+
+### Query all contracts
+
+#### parameter
+
+`function_name` indicates that `listContracts`.
+
+#### Order sample
+
+
+```bash
+java -jar yjs.jar listContracts
+```
+
\ No newline at end of file
diff --git a/markdown_trans/markdown/IDEUsage.md b/markdown_trans/markdown/IDEUsage.md
new file mode 100644
index 0000000..3999f1f
--- /dev/null
+++ b/markdown_trans/markdown/IDEUsage.md
@@ -0,0 +1,411 @@
+# BDContract management interface
+
+- - -
+
+## Contract node management interface
+
+The address of this interface is: [NodePortal.html](/NodePortal.html)
+
+
+### User Management Menu
+User management allows login users to view the current user distribution and user active statistics.
+
+#### An overview of
+![nodeUserManager](./_static/imgs/nodeUserManager.jpg) The node user management page has four modules: user information, active user statistics, authorized user management, and unauthorized user management.
+
+#### User Type Distribution
+Calculate the number of four roles held by the current node administrator: contract provider, contract administrator, and contract user ![userList](./_static/imgs/userList.jpg)
+
+#### Active User Statistics
+![userActive](./_static/imgs/userActive.jpg) statistics 30 days **The login**, **authorization**, **To apply for** the number of times
+
+#### Current User Information
+![nodeInfo](./_static/imgs/nodeInfo.jpg)
+ * In this text box, you can view the public and private keys of the current user. If other users want to use their public and private keys to log in to the node administrator interface, they can copy their public and private keys to this text box.
+ * After copying your public and private keys, click **Import the public key** to add the public key to the local node administrator
+ * The first five public keys are displayed in **Local public key**. If you select your own public key, the role of the selected public key will be displayed in **My permission**. If the node has not been authenticated by the central administrator, the default value is **Anonymous**.
+ * If you are not a node administrator and want to join the network of a central administrator, use your own public and private keys to import the key to the user management where the central administrator resides for authentication.
+ * If you want to perform more operations on contracts, you need to authenticate different roles: contract administrator, contract consumer, contract provider, and then **Role of certification**
+
+#### List of authorized and unauthorized users
+![roleAuth](./_static/imgs/roleAuth.jpg)
+After the node administrator authenticates the role, the node administrator will see the application information with the public key in the **Role management is not authorized** form. If yes, click . If no, click . After authorization, you will see a list of authorized nodes in the **Authorized Role Management** table. If the node administrator wants to remove a role from a node, enter **delete** in the entitlement role management list.
+
+### Contract code management menu
+
+![codeManageMenu](./_static/imgs/codeManageMenu.png)
+
+
+
+#### The contract documents
+
+![codeManage1](./_static/imgs/codeManage1.png)
+
+In the Contract Code Management menu, users can see public contracts as well as individual private contracts. ![codeManage1-1](./_static/imgs/codeManage1-1.png)
+
+For public contracts, node administrators can delete and upload files, and download and delete contract items. ![codeManage1-2](./_static/imgs/codeManage1-2.png)
+
+For private contracts, the contract provider can delete and upload files, and download, delete and upload contract items to the public contract directory.
+
+The following is an example of working with a contract file.
+
+#### Upload a file
+![codeManage6](./_static/imgs/codeManage6.png)
+
+#### delete
+![codeManage5](./_static/imgs/codeManage5.png)
+
+#### To the public
+![codeManage7](./_static/imgs/codeManage7.png)
+
+#### A drop-down box
+
+![codeManage2](./_static/imgs/codeManage2.png)
+
+From the four drop-down boxes, you can select the contract status saving mode, started contract instance, cluster where the node resides, and result verification mode.
+
+
+
+#### Button action
+
+![codeManage3](./_static/imgs/codeManage3.png)
+
+#### Start the
+
+After selecting the contract file in the file list, select “Single Node Execution” in the contract operation mode and click the Start button to launch the specified file and display the return result in the result display box.
+
+
+
+#### The P2P cluster contract is started
+
+After selecting the contract file in the file list, select the contract cluster on which the trusted contract runs in the Contract Run mode and click the Start button to start the specified file on all nodes of the cluster and display the return result in the result display box.
+
+
+
+#### Start all
+
+Select “Single Node Execution” in the contract operation mode and click the “Start All” button to start all contracts in the contract file list.
+
+
+
+#### Stop the P2P cluster contract
+
+Select a contract instance from the drop-down box for started contract instances, select the contract cluster for which the trusted contract runs in Contract Run mode, and click the Stop button to terminate the contract process on all nodes in the cluster.
+
+
+
+#### stop
+
+Selecting a contract instance from the drop-down box for started contract instances and clicking the Stop button will terminate the contract process.
+
+
+
+#### Stop all
+
+Clicking the Stop All button stops all contract instances running on that node.
+
+
+
+#### Static analysis
+
+Select the contract file in the Contract file list, select the contract instance in the Contract instance drop-down box, click the static analysis button, the contract will be static analysis, and the result will be displayed in the result display box.
+
+
+
+#### Distribution of the contract
+
+Select a contract item in the contract file list, select a cluster in Contract operation mode, and click the Distribute contract button. The contract item will be packaged as YPK and distributed to all nodes in the cluster.
+
+
+
+
+#### Returns the result
+
+![codeManage4](./_static/imgs/codeManage4.png)
+
+The Return Result display displays the return results of some operations.
+
+
+
+#### Contract Permission Configuration
+
+After starting the contract, if the current user’s role can view the started contract process, the IO permissions for the current contract will be displayed in the bottom right when the process is selected. ![permissionShow](./_static/imgs/permissionShow.png)
+
+If the selected contract does not have I/O permission, the following message is displayed in the current permission display box: **The current contract does not have IO permission**![nullPermission](./_static/imgs/nullPermission.png)
+
+If the current user is a contract administrator, you can modify the existing contract I/O permissions. The system will prompt that the contract may not run normally after modification. If you still want to cancel, click , otherwise click .
+
+After clicking Close or open, the next time the process views the same contract code, it will display the IO permission after the last modification by default. ![closePermission](./_static/imgs/closePermission.png)
+
+### Contract instance management menu
+
+![nodeInstancesPage](./_static/imgs/nodeInstancesPage.png)
+
+The contract instance management menu displays all the current contract instances of this node. Users can view the status of the contract instance and execute or migrate the status of the contract instance.
+
+#### List of Contract instances
+
+![nodeInstancesList](./_static/imgs/nodeInstancesList.png)
+
+This list shows all the contract instance information of the current node, including the contract ID, contract name, contract type, contract status, contract process port, contract call times, contract traffic, and contract memory usage, and the result verification mode of the cluster contract.
+
+#### Contract instance execution
+
+![chooseInstance](./_static/imgs/chooseInstance.png)
+
+Users can select a contract instance in the contract instance selection drop-down box to operate on the contract instance.
+
+![intanceExecute](./_static/imgs/intanceExecute.png)
+
+After selecting the contract instance, the user can select the method name of the contract from the “Methods” drop-down box, enter the method parameters in the “Parameters” input box, and click “Execute ”.
+
+Users can also click on “Dynamic Analysis Execution” to perform an execution with dynamic analysis results.
+
+If the contract is a single point contract, the contract is executed at a single point; If the contract is a cluster contract, the contract is executed on all nodes in the cluster.
+
+#### Contract instance execution result
+
+![executeResult](./_static/imgs/executeResult.png)
+
+The execution result of the contract instance is displayed in the Execution Result area, including the execution ID, execution success/failure, execution time, and execution result.
+
+![analysisExecuteResult](./_static/imgs/analysisExecuteResult.png)
+
+If the execution mode of the contract is Dynamic Analysis execution, in addition to the execution result, the dynamic analysis result of the execution is displayed in the result box.
+
+#### Contract status migration
+
+![memoryDump](./_static/imgs/memoryDump.png)
+
+For the contract instances that support manual migration, users can click “Local State Save” to save the state of the contract instance, or select the saved contract instance from the TimeTravel list of the contract to migrate the contract state to the corresponding time.
+
+
+
+### Log Management Menu
+![logMenu](./_static/imgs/logMenu.png)
+
+This menu displays the statistics of local node logs and contract logs of the node.
+
+Node administrators can view node log data. The contract manager and contract user can view the local contract log data of the node.
+
+
+
+#### Log Statistics View
+
+![log1](./_static/imgs/log1.png)
+
+#### Operating percentage of various platforms
+
+By default, this chart shows the pie chart of the proportion of various platform operations in the last two days, in which platform operations are divided into six categories: login, user, log, contract, maintenance and others. You can enter the desired log time range in the upper right corner of the node log details. After the time range is changed, the operation percentage of each platform is updated.
+
+
+
+#### Operating percentage of each type of contract
+
+Contract operations are divided into four categories: start, end, static analysis and execution. The pie chart shows the proportion of each type of contract operation in the last 2 days. You can enter the desired log time range in the upper right corner of the contract log details. After the time range is modified, the operation percentage of each contract is updated.
+
+
+
+
+#### Daily platform usage statistics
+
+The figure is a broken line chart of the number of platform operations in the last 2 days. You can enter the desired log time range in the time range box in the upper right corner of node log details. After the time range is changed, the daily platform usage statistics line chart is updated.
+
+
+
+
+#### Daily contract usage statistics
+
+The figure is a broken line chart of the number of operations performed on the node in the last two days. You can enter the desired log time range in the time range box in the upper right corner of the contract log details. After modification, the daily contract usage statistics line chart will be updated.
+
+
+
+
+#### Log details
+
+
+
+#### Node Log Details
+![log2](./_static/imgs/log2.png)
+
+The node log details table displays all data in node logs. You can click the relevant button in the table to sort the log data in different ways, and enter keywords in the upper right corner of the table to search for relevant logs. You can enter the desired log time range in the time range box in the upper right corner. After the log time range is modified, the operation percentage of each platform and daily platform usage statistics are updated simultaneously.
+
+
+
+#### Contract Log Details
+![log3](./_static/imgs/log3.png)
+
+The contract log details table is a display of all the data in the contract log. You can click the relevant button in the table to sort the log data in different ways, and enter keywords in the upper right corner of the table to search for relevant logs. You can enter the desired log time range in the time range box at the upper right corner. After the change, the operation percentage of each type of contract and the daily contract usage statistics are updated simultaneously.
+
+
+
+### Node Management Menu
+
+![nodeConfig](./_static/imgs/nodeConfig.png)
+
+The node management menu displays the configuration information about the node and its trusted execution cluster.
+
+#### Node configuration
+
+![nodeConfigChange](./_static/imgs/nodeConfigChange.png)
+
+The node administrator can view the configuration information of the node, including the node name, YJS path, and network center node of the node. The node administrator can also modify the configurations.
+
+If the node administrator changes the network center of the node, the node tries to change the connection again, and the entire page is refreshed and reloaded.
+
+#### Node trusted execution cluster list
+
+![nodeUnits](./_static/imgs/nodeUnits.png)
+
+A node administrator can view information about the trusted execution cluster to which a node belongs, including the cluster creator, cluster ID, number of nodes in the cluster, and information about nodes in the cluster.
+
+- - -
+
+#### Node License Configuration
+
+![nodeLicence](./_static/imgs/nodeLicence.png)
+
+You can view the node’s license and expiration time, apply for and upload a license, and save the node UUID.
+
+## Smart Contract online editor
+
+### Users and Accounts
+
+#### Create account
+
+#### Apply for authorization
+
+
+### Create a project
+
+#### The new file
+
+#### Upload a file
+
+### Start the contract
+![contractMode](./_static/imgs/contractMode.png)
+
+#### Normal mode Click the startup button on the left to start the contract in normal mode.
+
+#### Debug mode Click the Debug button on the right to start the contract in debug mode. The current convention returns an example of the return result from the normal mode contract document when the debug mode contract is invoked via executeContract.
+
+### Call the contract
+
+### # Generate document ![genReadme](./_static/imgs/genReadme.png)
+
+After starting the contract, click the “Generate document” button to call the contract and return the Result through @description / @param / @result of each export function, so as to generate the contract Description document.
+
+- - -
+
+## Route access management interface
+
+### Permission application and authorization
+
+### The dashboard
+The dashboard provides an overview of the number of users, contracts, and nodes in the admittance node.
+
+### The overall view
+![dashboard](./_static/imgs/dashboard.jpg) It is divided into four modules. One module is the overview of the number of users, contracts and nodes, and then the detailed statistics of the three quantities.
+
+### The number of nodes
+![node](./_static/imgs/node.jpg) Collect statistics about the current online and offline nodes
+
+### User Type Distribution
+![userAll](./_static/imgs/userAll.jpg) Number of node administrators and admission administrators in the network where the current admitted node resides, and number of nodes to be applied for
+
+### Contract invocation condition
+![contract](./_static/imgs/contract.jpg) Broken line statistics of events, multi-point execution, WS call, and Http call in all contracts in the network where the current access node resides.
+
+### User management
+User management allows login users to view the current user distribution and user active statistics.
+
+### An overview of
+![centerManager](./_static/imgs/centerManager.jpg) The user management page consists of four modules.
+
+
+### User Type Distribution
+Main Statistics on the number of node administrators in the network managed by the center administrator, the number of center administrators, and the number of applied node administrators ![userList](./_static/imgs/userList.jpg)
+
+### Statistics of applications made within 30 days
+![userApplyGraph](./_static/imgs/userApplyGraph.jpg) Calculates the number of node administrators who apply for and are authorized to become node administrators within 30 days
+
+### Current User Information
+![authNodeManager](./_static/imgs/authNodeManager.jpg)
+ * In this text box, you can view the public and private keys of the current user. If other users want to use their public and private keys to log in to the center administrator interface, they can copy their public and private keys to this text box.
+ * After copying your public and private keys, click **Import the public key** to add the public key to the central administrator
+ * The first five public keys are displayed in **Local public key**. If you select your own public key, the role of the selected public key is displayed in **My permission**. If you are a central administrator, you have all the rights of the central administrator.
+ * If you are not a center administrator or node administrator and want to join the network of the current center administrator, you can select the node administrator in the following box and run **Role of certification**.
+
+### List of authorized and unauthorized users
+After applying for the current user information of the center administrator, the center administrator will see the application information with the public key in the form. If you agree, click . If you disagree, click , and the application is invalid.
+![authMan](./_static/imgs/authMan.jpg)
+After authorization, you will see a list of authorized nodes in the **Authorized User Management** table. If the central administrator wants to remove a role of a node administrator, select the role in the authorized user management list and click **delete** to delete the selected role.
+![authMana](./_static/imgs/authMana.jpg)
+
+### Node management
+
+![centerNodePage](./_static/imgs/centerNodePage.png)
+
+Node management is a page on which the Manager manages the Cluster nodes connected to it, visible only to Manager administrators and contract managers. Manager Administrators and contract managers can view node information and manage trusted execution clusters.
+
+### An overview of
+
+![centerNodePreview](./_static/imgs/centerNodePreview.png)
+
+The overview displays the statistics of all nodes managed by the Manager node, including the total number of nodes, the total number of contracts, the total number of subscription events, and the number of trusted execution clusters. The pie chart on the right shows the number of nodes that are Online and Offline respectively.
+
+### The node list
+
+![centerNodeList](./_static/imgs/centerNodeList.png)
+
+The node list shows the node information that the user has the permission to view. (The Manager administrator can view all nodes, and the contract Manager can view the Online node that he is responsible for managing.) This includes the node name, status, number of contracts, number of subscribed events, PeerID for P2P communication between nodes, UDPID for UDP communication between nodes, and the node public key.
+
+### List of trusted execution clusters
+
+![centerNodeUnits](./_static/imgs/centerNodeUnits.png)
+
+The trusted execution cluster list displays the trusted execution cluster information that the user has the permission to view. (The Manager administrator can view all the clusters, and the contract Manager can view the clusters created by himself.) This includes the creator of the cluster, the cluster ID, the number of nodes in the cluster, and information about the nodes in the cluster.
+
+You can click the “Delete” button of the column entry to delete the cluster.
+
+### Create a trusted execution cluster
+
+![centerNodeUnitCreate](./_static/imgs/centerNodeUnitCreate.png)
+
+You can create a new trusted execution cluster by selecting multiple nodes. The nodes that users can select are those they have permission to view, that is, the Manager administrator can select from all nodes, and the contract Manager can select from the Online node that they are responsible for managing). Select and click Submit. A message indicating that the cluster is created successfully will be displayed in the list of trusted execution clusters. The cluster name is selected by the creator and cannot contain double quotation marks. The cluster name is visible when the contract manager selects the cluster.
+
+### Log management
+Log management displays the log information of admission nodes and consists of six modules.
+### An overview of
+![log](./_static/imgs/log.jpg)
+
+### Classified Statistics of Management Operations (2 days)
+![operator](./_static/imgs/operator.jpg) Pie chart of all management operations in the last two days. Management operations are classified into login, log, maintenance, and user operations.
+
+### Daily Statistics of Management Operations (2 days)
+![everyLog](./_static/imgs/everyLog.jpg) Daily operation statistics of all management operations within two days
+
+### Statistics on Contract Operations by Category (2 Days)
+![contractLog](./_static/imgs/contractLog.jpg) Two day contract operation classification statistical pie chart, contract operation is mainly divided into connection class and status update class.
+
+### Daily Statistics of Contract Operation (2 days)
+![contracteveryLog](./_static/imgs/contracteveryLog.jpg) Chart of the broken line of the number of contract operations in two days.
+
+### Manage the operation log list
+![opList](./_static/imgs/opList.jpg) Manage the detailed information list of operation logs. The information includes log time, management operation name, and node public key corresponding to the operation. The default value is two days. You can customize the days for obtaining logs.
+
+### List of contract operation logs
+![contractList](./_static/imgs/contractList.jpg) Detailed information list of contract operation logs. This parameter includes log generation time, contract operation name, and public key of the contract operation node. The default value is two days. You can customize the days for obtaining logs.
+
+### Set up the
+
+The Settings page displays the status of node certificates and configures node certificates
+
+### An overview of
+![set](./_static/imgs/set.jpg)
+
+### Certificate status
+![licence](./_static/imgs/licence.jpg) The certificate status includes the license expiration time and the number of licensed nodes.
+
+### Certificate of configuration
+![plicence](./_static/imgs/plicence.jpg) Configure the certificate module. You can download the node ID file or enter the certificate information for submission.
diff --git a/markdown_trans/markdown/InstallTips.md b/markdown_trans/markdown/InstallTips.md
new file mode 100644
index 0000000..4911523
--- /dev/null
+++ b/markdown_trans/markdown/InstallTips.md
@@ -0,0 +1,188 @@
+# BDContract Installation instructions
+
+
+- - -
+
+## Environment-dependent installation
+1.Install the Java1.8 environment.
+
+For example, using apt-get to install Ubuntu:
+
+
+```bash
+apt-get install openjdk-8-jre
+```
+On Centos, install using yum:
+
+
+```bash
+yum install java-1.8.0-openjdk
+```
+
+In an offline environment, download the OpenJDK installation package and install it offline.
+
+Under the Ubuntu
+
+```bash
+dpkg -i jdk-8uxxxxx.deb
+```
+
+On Centos, use yum for offline installation:
+
+```bash
+yum localinstall jdk-8u271-linux-xxx.rpm
+```
+
+2.Install wGET and unzip. For example, using apt-get to install Ubuntu:
+
+
+```bash
+apt-get install unzip
+apt-get install wget
+```
+
+- - -
+
+## Network Topology Description
+
+Only one node is required to deploy the Surui smart contract engine, which can be used for debugging and testing. The multi-node mode cannot be used to achieve trusted computing. When a single node is deployed, the calculation of “anti-repudiation” can be implemented by configuring the ledger, but the calculation of “tamper-resistant” cannot be implemented.
+
+In multi-node deployment, the following figure shows three types of logical nodes. One to three types of nodes can be installed on a VM.
+
+1) Account node. That is, the number Rui schema ledger.
+
+2) Contract node. Run code logic and implement highly responsive modules through memory caching. Form a trusted computing network with other contract nodes.
+
+3) Routing node. Routing information of each contract node. Generally, a routing node can support a maximum of 1000 contract nodes. Deploy multiple routing nodes as required, and configure the routing nodes among them to implement a large-scale node network.
+
+Generally, **Contract node and ledger node** is deployed on the same VM.
+
+![deploytopology](_static/imgs/deploytopology.png)
+
+- - -
+
+## Smart contract node installation
+
+Open the[安装包下载链接](https://public.internetapi.cn/?dir=releases/bdcontract/newest), download `bdserver-lite.zip` or `bdserver.zip`, among them, the `bdserver.zip` contains more examples and documentation. After downloading, unzip and launch.
+
+
+```bash
+unzip -d ./bdserver bdserver-lite.zip
+cd bdserver
+chmod +x *.sh
+sh cmstart.sh
+```
+
+- - -
+
+## Route admission nodes are installed
+
+Open[安装包下载链接](https://public.internetapi.cn/?dir=releases/bdcontract/newest) Where, download `bdserver-cluster.zip`. After downloading, unzip and launch.
+
+
+```bash
+unzip -d ./bdcluster bdserver-cluster.zip
+cd bdcluster
+chmod +x *.sh
+sh ncstart.sh
+```
+
+- - -
+
+## Document describing
+
+### Smart Contract node
+
+![bdserver目录](_static/imgs/dirstructure.png)
+
+Description of files in this directory:
+
+1.Cmstart. sh This script is used to start the contract engine. The contract engine listens to port 8080 by default. You can modify the listening port by running the cmstart.sh command.
+
+2.BDWareProjectDir This directory stores all contract projects for this node.
+
+3.WebContent This directory stores the front-end code of this node.
+
+4.Cp, which holds yjs.jar, the JAR needed to start the contract instance.
+
+5.Bdserver. jar provides HTTP/webSocket server logic externally.
+
+6.Updatecontract. sh Upgrade script.
+
+### Route admission node
+
+The installation script is automatically downloaded and decompressed to the bdCluster directory. Description of files in this directory:
+
+1.Ncstart. sh This script is used to start the node access center. It listens on port 1718 by default. You can modify the listening port by modifying ncstart.sh.
+
+2.WebContent This directory houses the front-end code for the access center.
+
+3.Bdcluster. jar back-end of the access center.
+
+- - -
+
+## The upgrade process
+
+### Contract node
+
+On the command line, type:
+
+
+```bash
+sh updateContract.sh
+```
+
+Alternatively, go to [public.internetapi.cn](https://public.internetapi.cn/?dir=releases/bdcontract), download the latest file, and upgrade yjs.zip/bdserver-jar.zip/AgentWebContent separately.
+
+### Route admission node
+
+
+```bash
+sh updateCluster.sh
+```
+Through the [public.internetapi.cn](https://public.internetapi.cn/?dir=releases/bdcontract), download the latest files, separate upgrade bdserver — cluster. Zip/ClusterWebContent. Zip to upgrade.
+
+- - -
+
+## Directions for use
+
+### Use it on the reference page
+If the WebContent directory is reserved, you can configure it using the browser. For more information, see the document [BDContract refer to the interface instructions](./IDEUsage.html) on the left.
+
+#### BDWare OnlineIDE
+Open [BDWare OnlineIDE](../OnlineIDE.html).
+
+#### BDWare NodePortal
+Open [BDWare NodePortal](../NodePortal.html).
+
+If the cross-node function is required for networking, install the route access center. Perform the following steps to configure it. Two sets of public and private keys are involved. The first group of public and private keys is the public and private keys of the contract node that have NodeManager permission. The second group is the public and private keys of the route access node that have the CenterManager permission.
+
+1.Open nodeportal. HTML and copy the public and private NodeManager keys of the node.
+
+2.Open centerportal. HTML, click in the upper right corner, and import the public and private NodeManager keys. And select “NodeManager” for identity authentication.
+
+3.In centerportal. HTML, switch the public and private keys of CenterManager, click User Management on the left, and pass the NodeManager authentication request.
+
+4.Use the public and private keys of the NodeManager permission to open nodeportal. HTML, click the Node Management menu, and configure joining the network. The format of joining the network is WS :// IP address of Centerportal: port +1. ![配置示例](_static/imgs/config.png)
+
+
+### Using the SDK
+
+#### Basic knowledge of
+
+[Websocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API)
+
+[Sm2 encrypted using] (https://github.com/JuneAndGreen/sm-crypto)
+
+#### Download the SDK
+
+1. Java client download: [BDWareJavaClient](_static/BDWareJavaClient.zip). For details about how to use it, download it, decompress it, check readme.md, and see [ContractAPI](./ContractAPI.html).
+
+2.Javascript version for client download :[BDWareWebClient](_static/BDWareWebClient.zip). For details about how to use it, download it, decompress it, check readme.md, and see [ContractAPI](./ContractAPI.html).
+
+3.Configuration tool [BDWareConfigTool](_static/BDWareConfigTool.zip). For details, decompress the package and run the following command to view help information:
+
+
+``` bash
+java -jar java-client.jar -h
+```
\ No newline at end of file
diff --git a/markdown_trans/markdown/Introduction.md b/markdown_trans/markdown/Introduction.md
new file mode 100644
index 0000000..d23a9f0
--- /dev/null
+++ b/markdown_trans/markdown/Introduction.md
@@ -0,0 +1,219 @@
+# BDContract introduction
+
+- - -
+
+## What is a BDContract?
+
+ Pku is a management and scheduling platform for data resources, IoT resources and cloud resources in big data scenarios. BDContract is a trusted computing framework where the computation logic is expressed as a smart contract. Through “random” and “redundant computation” to achieve the trusted execution of smart contract. BDContract focuses on improving execution efficiency and security while ensuring the availability and reliability of smart contracts.
+
+
+- - -
+
+## The characteristics of
+
+0. Support multiple execution modes, balancing availability, reliability, correctness, and efficiency.
+1. Access to various data sources.
+2. Support for fine-grained monitoring of contracts.
+3. Support the state of the contract.
+4. Access control.
+5. Support for cross-language invocation.
+
+
+- - -
+
+## Update log
+
+* **v1.4.5** June 29, 2021
+ - Improvement of stability
+ - Optimize URIPath for the HTTP server
+ - Supports static resource file loading using Http
+
+* **v1.4.4** June 15, 2021
+ - Fixed an issue with getContractMeta that does not prioritise RUNNING/HANGED contracts
+ - The logic of HomomorphicEncrypt is implemented
+
+* **v1.4.3** June 9, 2021
+ - Fix the SSL Renegotiate Bug
+ - Implement automatic hangup-resume when memory is insufficient
+ - Implement hard disk persistence for Contract Meta
+
+* **v1.4.1** May 26, 2021
+ - Implement event semantics in event mechanism, support “at least once”, “at most once” and “only once”
+ - Optimized contract templates
+ - Example Add a template configuration file
+ - Optimized the MockTemplate annotation
+
+* **v1.4.0** May 9, 2021
+ - Optimize the ACTemplate
+ - Improved configuration linkage for DoRepo
+
+* **v1.3.9** April 22, 2021
+ - Fixed a bug where doipConfig was not supported in updateConfig
+ - Test-tool supports SUdo
+ - Optimized the ACTemplate template in Contract-Template
+
+* **v1.3.6** April 21, 2021
+ - Fixed an issue in Docker where CPUID could not be obtained
+
+* **v1.3.6** April 16, 2021
+ - Fixed some bugs
+ - Fixed a bug that caused queuing due to insufficient GRPCPool threads
+ - Fixed a bug where the requestID assignment could duplicate under stress testing
+
+* **v1.3.5** March 31, 2021
+ - Fixed some bugs
+ - Simple congestion control policies have been added to the contract invocation part of HTTP
+ - Improvement of stability
+
+* **v1.3.0** February 1, 2021
+ - Optimizing heartbeat Mechanism
+ - Fixed some bugs
+ - SM2 update/SM3 library
+ - Update the front-end signature calculation method
+
+* **v1.2.0** December 11, 2020
+ - Optimized multi-node execution mode
+ - Optimized the logic of the contract master route
+ - Fixed some bugs
+ - Fix file system related vulnerabilities
+
+* **v1.1.0** September 2020
+ - Support for HTTPS, and updated this part of the documentation
+
+
+* **v1.0.9** August 27, 2020
+ - Improve the documentation of IO related tools
+ - Optimize contract template: DAC persistence
+
+
+* **v1.0.7** August 13, 2020
+ - Optimized the contract log and ledger interfaces
+ - Optimize documentation for interfaces
+ - Provides the WebSocket interface for the contract template
+ - Automatic compilation of bug fixes
+
+* **v1.0.5** July 25, 2020
+ - Weaken the centralization of NC, and cluster point-to-point connection.
+ - Optimize bdwareclient
+ - TODO MemoryDurable
+
+* **v1.0.2** July 22, 2020
+ - Fixed Bug in CentOS7 Too Many Opened Files
+ - Fix permissions bugs
+ - Adding a Permission
+ - Fixed bugs in MySQLUtil
+ - Upgrade the BDLedger version
+
+* **v1.0.1** July 5, 2020
+ - Updated NodePortal/CenterPortal UI.
+ - The compilation process has been modified so that the compilation results can be viewed in NodePortal and compiled manually/startup in OnlineIDE
+ - Modified the contract distribution logic to use compiled YPk as the distribution file
+ - When YPK in the public directory is executed in multi-node mode, contract faults can be automatically recovered
+
+* **v0.99** June 22, 2020
+ - Billing for custom contract methods
+ - Add GasExample, Incentives examples
+ - On the client side, “check multipoint result” is implemented, and the method of result return is optimized
+ - Repair Disconnection No permission prompt after reconnection
+
+* **v0.97** May 25, 2020
+ - CPU metering: GAS mechanism
+ - Onlineide.html supports uploading multiple files
+ - Multi-point Execution in UDP Mode [Unordered messages]
+ - Bdwareclient.html, fixes a call example generation prefix error that contains only computational logic
+
+* **v0.95** May 19, 2020
+ - Fixed bug where onlineide.html could not jump to Bdwareclient correctly when the pathname was prefixed.
+ - Fixed a bug where Bdwareclient automatically extracted urls when the pathname was prefixed.
+ - Permissions for contracts are enabled
+ - Increased NodePortal. HTML/OnlineIDE. HTML and bdwareclient. HTML has no right to limit the warning
+
+* **v0.90** May 9, 2020
+ - Changed the way yjs.jar/bdserver.jar is packaged
+ - Updated the sh/update. Sh
+ - OnlineIDE post modification reminder
+ - OnlineIDE tag adaptive width
+ - File interface isolation
+
+
+* **v0.8** April 26, 2020
+ - Improve the documentation interface and optimize the way SDK is provided
+ - Rui Web client, all the data processing in the client and how to render the processed data are from the contract call, to achieve a trusted Web application.
+
+* **v0.78** April 13, 2020
+ - Contract call DAC example
+ - Supports dynamic change of I/O permissions
+ - Supports custom backup (periodic) policies for contract status
+ - Fixed some page bugs
+ - Log Display Optimization
+ - Optimized ledger log presentation
+ - Enable partial access control
+
+
+* **v0.7** March 25, 2020
+ - Support access control for multiple roles
+ - Updated the UI
+
+* **v0.6** February 14, 2020
+ - Optimized communication between contract processes
+ - Try to access a P2P network
+
+* **v0.5** December 10, 2019
+ - Improved three smart contract state record-playback strategies
+ - Supports the simplest multi-point execution algorithm (unsynchronized)
+
+* **v0.45** September 2, 2019
+ - Preliminary implementation of PBFT algorithm
+
+* **v0.4** May 10, 2019
+ - Support the memory dump
+
+* **v0.35** April 26, 2019
+ - Implement a static analysis framework for contracts
+ - Support for publish-subscribe events
+
+* **v0.3** January 8, 2019
+ - Support ledger data access
+ - Contract status on the chain
+
+* **v0.2** October 9, 2018
+ - Support for automatic Python package generation
+ - Contracts can be packaged as YPK
+ - Supports data access, such as files and databases
+
+* **v0.1** August 6, 2018
+ - Defines the syntax for smart contracts
+ - Based on Nashorn engine, smart contract execution is realized
+
+- - -
+
+## Use open source project instructions
+The BDWareContract project stands on the shoulders of many giants, thanks to these open source projects.
+
+The smart contract backend of this project uses the following open source libraries.
+
+| 名称 |Licence type| 说明 |
+| ------ | ---------- | ---- |
+| [Project Nashorn](https://openjdk.java.net/projects/nashorn/) |[GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)| 使用了该项目的编译器,可以将js函数编译为java字节码 |
+| [ASM OW2](https://projects.ow2.org/view/asm/) |[BSD](https://en.wikipedia.org/wiki/BSD_licenses#4-clause_license_(original_%22BSD_License%22)) with attribution| 基于asm的TreeAPI与VisitorAPI实现合约的静态分析框架 |
+| [Netty](https://netty.io/) |[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)| 使用netty作为Http/Websocket的服务端 |
+| [gRPC](https://grpc.io/) |[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)| 使用gRPC与BDWareLedger通讯 |
+| [RocksDB](https://github.com/facebook/rocksdb) |[GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)| 后台数据库 |
+| [ANTLR](https://github.com/antlr/antlr4) |[BSD](https://en.wikipedia.org/wiki/BSD_licenses#4-clause_license_(original_%22BSD_License%22))| 对合约脚本的词法分析与语法分析 |
+| [SM2Java](https://github.com/PopezLotado/SM2Java) |[无](https://github.com/PopezLotado/SM2Java/blob/master/README.md)| 国密SM2 Java语言实现 |
+
+
+
+The smart contract front-end of this project uses the following open source libraries.
+
+| 名称 |Licence type| 说明 |
+| ------ | ---------- | ---- |
+| [Bootstrap](https://getbootstrap.com/) |[MIT](https://github.com/twbs/bootstrap/blob/master/LICENSE)| 前端的排版、样式 |
+| [jQuery](https://jquery.org/) |[MIT](https://jquery.org/license/)| 用于操作DOM的javascript库 |
+| [jQueryUI](https://jqueryui.com/) |[MIT](https://jquery.org/license/)| 前端UI构件库 |
+| [DataTables](https://datatables.net/) |[MIT](https://datatables.net/license/mit)| 表格样式 |
+|[CodeMirror](https://codemirror.net/)| [MIT](https://codemirror.net/LICENSE) | 代码编辑框样式 |
+|[eCharts](https://echarts.apache.org/zh/index.html)| [ApacheV2](https://www.apache.org/licenses/) | 统计图表 |
+| [sm-crypto](https://github.com/JuneAndGreen/sm-crypto) |[MIT](https://github.com/JuneAndGreen/sm-crypto/blob/master/LICENCE_MIT)| 国密SM2 javascript语言实现 |
+
+The document for this project was generated using [Sphinx](https://www.sphinx-doc.org/en/master/), thanks to [readthedocs](https://readthedocs.org/) for providing the document style.
\ No newline at end of file
diff --git a/markdown_trans/markdown/YJSAPI.md b/markdown_trans/markdown/YJSAPI.md
new file mode 100644
index 0000000..cadca32
--- /dev/null
+++ b/markdown_trans/markdown/YJSAPI.md
@@ -0,0 +1,1384 @@
+# YJS SDK
+## YJS Build-in API
+
+### Built-in object Global
+
+
+### The built-in object Requester
+The built-in object will have a value in the Export Function only if the contract callsignatureis verified.
+
+
+### Execute the contract as executeContract
+
+Parameters:
+
+
+``` bash
+action:executeContract;
+contractID:合约的id或名称均可;
+operation:调用合约的方法名;
+arg: 参数;格式为JSON字符串,有action与arg两个字段。
+```
+
+Optional parameters:
+
+
+```bash
+requestID:字符串类型,自行生成,用于查询hash
+```
+
+Example:
+
+
+```javascript
+
+ function testExecutorContract(arg){
+ var ret = JSON.parse(executeContract("ElemeProvider","queryDB",arg));
+ if (ret.status == "Success"){
+ return JSON.parse(ret.result);
+ }else return null;
+ }
+```
+### Subscribe to the event subject Subscribe
+
+parameter
+
+
+``` bash
+contractID:字符串类型 合约id或名称均可。
+event:字符串类型
+handler:方法名,该方法必须接受Event(内含字段topic和content)类型的唯一变量为参数;可以不是export方法
+```
+
+Example:
+
+
+```javascript
+export function init(arg) {
+ YancloudUtil.subscribe("topic", handler);
+ print("Handler: " + handler);
+}
+
+function handler(e) {
+ print("topic: " + e.topic);
+ print("content: " + e.content);
+}
+
+```
+
+### Publish the event pubEvent
+
+parameter
+
+
+``` bash
+topic:字符串类型,发布的事件主题
+content:字符串类型,发布的事件内容
+```
+Example:
+
+
+```javascript
+export function pub1(arg) {
+ YancloudUtil.pubEvent("topic", arg);
+ return "done";
+}
+```
+
+You can also declare an event at the beginning of the contract, so the event name is the event subject, and you can publish the event directly using the event as the method name
+
+
+```javascript
+event topic;
+export function pub2(arg) {
+ topic(arg);
+ return "done";
+}
+```
+
+This is equivalent to `pub1` above.
+
+### Publish pubEventConstraint with semantic event
+
+parameter
+
+
+``` bash
+topic:字符串类型,发布的事件主题
+content:字符串类型,发布的事件内容
+semantics:枚举类型,作为字符串输入,事件语义
+```
+
+Event semantic parameters
++ AT_LEAST_ONCE: at least once. Default semantics
++ AT_MOST_ONCE: at most once
++ ONLY_ONCE: only once
+
+Example:
+
+
+```javascript
+export function pub1(arg) {
+ YancloudUtil.pubEventConstraint("topic", arg, "AT_MOST_ONCE");
+ return "done";
+}
+```
+
+You can also declare the event at the beginning of the contract, and the event name is the event subject. In this case, you can simply use the event as the method name to publish the event according to the declared semantics
+
+
+```javascript
+event AT_MOST_ONCE topic;
+export function pub2(arg) {
+ topic(arg);
+ return "done";
+}
+```
+
+This is equivalent to `pub1` above.
+
+Pre-declared events can be called with the suffix S as a method name regardless of semantics, publishing events of any semantics:
+
+
+```javascript
+event topic;
+export function pub3(arg) {
+ topics(arg, "AT_MOST_ONCE");
+ return "done";
+}
+```
+
+This is equivalent to `pub1, pub2` above.
+
+* When an event is declared without event semantics, the semantics defaults to at least once (AT_LEAST_ONCE). *
+
+### Accessing Resource Files
+
+Run the global. Resources command to load the YPK internal resource file.
+
+#### loadAsInputStream
+
+Parameters:
+
+
+ ```bash
+ path:字符串类型 需要加载文件的地址
+ ```
+Example:
+
+
+ ```javascript
+ var file = Global.Resources.loadAsInputStream("/deleteit.txt");
+ ```
+
+#### loadAsScanner
+
+Parameters:
+
+
+ ```bash
+ path:字符串类型 需要加载文件的地址
+ ```
+
+Example:
+
+
+ ```javascript
+ var scanner = Global.Resources.loadAsScanner("/local.txt");
+ ```
+### YancloudUtil
+
+Some built-in tool methods are provided.
+
+#### getKeyPair
+
+Parameters:
+
+```
+无
+```
+
+Example:
+
+
+```
+var keyPair = YancloudUtil.getKeyPair();
+//该类型为SM2KeyPair类型,
+print(keyPair.getPublicKeyStr());
+print(keyPair.getPrivateKeyStr());
+print(keyPair.toJson());
+```
+
+
+## YJS Build-in Annotation
+
+### @Access
+
+To set whether a contract call requires a signature, there are two types: signed and unsigned. Verified indicates that a signature is required. Others indicate that no signature is required.
+
+
+```
+@Access("verified")
+export function easy(arg){
+ return "true";
+}
+```
+
+### @LogType
+
+The LogType annotation declares the logging type of a contract or function as an argument.
+
+Arg indicates the contract execution parameter recorded in logs. Result indicates the return Result of recording the execution of the contract. Branch Indicates the Branch where contracts are executed.
+
+For example, declare a function with the following LogType annotation
+
+
+```
+@LogType("Arg","Result","Branch")
+export function easy(arg){
+ Global.a = "a";
+ Global.b = "b";
+ if(arg > 0)
+ return Global.a;
+ else
+ return Global.b;
+}
+```
+
+### @LogLocation
+
+This annotation can modify `contract` or `function`. Set the log storage location. Parameter“Dataware” is stored in the ledger and locally, if not, only locally. For example, use the following LogLocation to set the storage location.
+
+In the BaaS platform, you can specify the name of the ledger. The default value of the BaaS platform is default, and `@LogLocation("bdledger:default")` is used. To save to a custom ledger, for example, the“ABC” ledger, use `@LogLocation("bdledger:abc")`
+
+
+```
+@LogLocation("dataware")
+export function easy(arg){
+ Global.a = "a";
+}
+```
+
+
+### @Permission
+This annotation can only modify the permission of tool classes called in the `contract` setting contract, including File, Http, MySQL, MongoDB, RocksDB and other tool classes. If the above utility classes are used in the contract, corresponding authorization fields need to be added in the annotations. By default, only YancloudUtil is provided by YJS. An“Unauthorized utility class” exception is thrown if none is added. The six utility classes are described in detail later in this section.
+
+
+```
+@Permission("Http","File")
+contract HttpPermission {
+ export function main(args){
+ var http=HttpUtil.httpGet(args);
+ var dir="adf/adfas/";
+ var file=FileUtil.getDir(dir);
+ return YancloudUtil.currentTimeMillis();
+ }
+}
+```
+
+### @Description
+This annotation can modify `contract` or `function`. Exported a description of the contract and function can be used to generate an introduction of the exported function in the exported document.
+
+
+```
+@Description("返回数据条目,无需参数")
+export function count(args){
+ var sql = "select count(*) from data;";
+ var conn = getConn();
+ var statement = conn.createStatement();
+ var resultSet = statement.executeQuery(sql);
+ var c = {};
+ resultSet.next();
+ c.count = resultSet.getLong(1);
+ return JSON.stringify(c);
+}
+```
+
+### @Param
+This annotation can modify `function`. Provides examples of parameters to call the function, as well as default parameters to return results in the generation specification document.
+
+```
+@Param({"offset":0,"count":100})
+export function get(args){
+ var offset = args.offset;
+ var count = args.count;
+ ...
+}
+```
+### @MockTemplate
+This annotation can modify `function`. Provides a return mock data template for a function that describes the format of the return value. When invoked in debug mode with this annotation, returns simulated data generated in this format.
+
+
+#### Specifies the supported field types
+
+```
+@integer 整数
+@string 字符串
+@boolean 布尔值
+@date @time @datatime
+@word 单词 @cword 中文单词
+@first @last 英文姓,名
+@cfirst @clast @cname 中文姓,名,全名
+@url @domin @ip @email
+@region @province @city @county 地区,省,市,县
+……
+详细格式可以参考http://mockjs.com/examples.html
+```
+#### Note that the template format is {′ result ’: template}
+
+```json
+//返回一个对象包含如下字段
+@MockTemplate({'result':{'id':'@integer','email':'@email','password':'@string','name':'@name'}})
+//返回
+{"password":"3ZLc","name":"William Young","id":36097783842688,"email":"d.fuunwe@gqnr.to"}"
+
+
+//返回元素个数为1-5个之间的一个数组,数组的每个元素都是上述格式的一个对象
+{'result|1-5':[{'id':'@integer','email':'@email','password':'@string','name':'@name'}]}
+//返回
+[
+ {"password":"dO]wW","name":"Jeffrey Lopez","id":1783453207480410,"email":"a.ckokgxrga@hgiesugi.bb"},
+ {"password":"BQYRL","name":"Brian Moore","id":4310212972071102,"email":"k.lbpxocydrh@msgnjtox.na"},
+ {"password":"Gw1","name":"Susan Jackson","id":7766580783668916,"email":"h.zjgusl@htce.cr"}
+]
+```
+
+```
+@MockTemplate({'result':{'id':'@integer','email':'@email','password':'@string','name':'@name'}})
+export function count(args){
+ var sql = "select count(*) from data;";
+ var conn = getConn();
+ var statement = conn.createStatement();
+ var resultSet = statement.executeQuery(sql);
+ var c = {};
+ resultSet.next();
+ c.count = resultSet.getLong(1);
+ return JSON.stringify(c);
+}
+```
+### @Result
+This annotation can modify `function`. Provides an example of the return result of a function that, with this annotation, will be returned directly when the documentation is generated instead of calling the function with the default arguments.
+
+```
+@Result(666)
+export function count(args){
+ var sql = "select count(*) from data;";
+ var conn = getConn();
+ var statement = conn.createStatement();
+ var resultSet = statement.executeQuery(sql);
+ var c = {};
+ resultSet.next();
+ c.count = resultSet.getLong(1);
+ return JSON.stringify(c);
+}
+```
+### @Cost
+This annotation can modify `function`. Provides the CPU metering function for functions.
+
+```
+@Cost({"countGas":true})
+export function ....
+
+
+```
+
+## IO tools
+
+### An overview of
+
+|Name of the IO tool class|说明|
+|---|---|
+|[FileUtil](./YJSAPI.html#fileutil)| 文件操作相关的类 |
+|[LedgerUtil](./YJSAPI.html#ledgerutil)| 账本操作相关的类 |
+|[HttpUtil](./YJSAPI.html#httputil)| Http接口相关的类 |
+|[DOIPUtil](./YJSAPI.html#doiputil)| DoIP相关的类 |
+|[MySQLUtil](./YJSAPI.html#mysqlutil)| 连接mysql数据库 |
+|[MongoDBUtil](./YJSAPI.html#mongodbutil)| MongoDB连接相关的类 |
+|[RocksDBUtil](./YJSAPI.html#rocksdbutil)| RocksDB(基于本地文件的k-v数据库) |
+|[BDWareTimeSeriesDBUtil](./YJSAPI.html#BDWareTimeSeriesDBUtil)| 基于本地文件的时间序列数据库 |
+
+
+### FileUtil
+A FileUtil object can be introduced using @permission (“File”).
+
+
+```
+@Permission("File")
+contract FileSample {
+...
+}
+```
+
+This object supports the following methods:
+
+#### copyTo
+
+You can copy files and directories. The first parameter is source and the second parameter is destination.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | src |Type String|
+| 2 | dest |Type String|
+
+##### Use the sample
+
+
+```javascript
+var ret = FileUtil.copyTo("./source.txt","./dest.txt");
+```
+
+#### getContent
+
+If the file does not exist, ```undefined``` is returned.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+| --- | --- | --- |
+| 1 | path |Type String|
+
+##### Use the sample
+
+
+```javascript
+var ret = FileUtil.getContent("./source.txt");
+```
+#### getDir
+
+Get the name of the folder where the file resides. Enter a string as a parameter.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | path |Type String|
+
+##### Use the sample
+
+```javascript
+var ret = FileUtil.getDir("./parent/src.txt");
+// ret 为 "./parent/";
+```
+
+#### getFileName
+
+Get the file name. The input parameter is a string.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | path |Type String|
+
+##### Use the sample
+
+
+```javascript
+var ret = FileUtil.getFileName("./parent/src.txt");
+// ret 为 "src.txt"
+```
+
+
+#### openFileAsPrinter
+
+Open the file as PrintStream. The result is of type ```java.io.PrintStream```.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | path |File name. The type is String|
+| 2 | isAppend|The type is Boolean, indicating whether to add to the end of the file|
+
+##### Use the sample
+
+
+```javascript
+var ret = FileUtil.openFileAsPrinter("./parent/src.txt",true);
+ret.println("hello");
+ret.close();
+```
+
+### LedgerUtil
+
+You can use @permission (“Ledger”) to import LedgerUtil objects.
+
+```
+@Permission("Ledger")
+contract LedgerExample{
+...
+}
+```
+
+#### getClient
+
+Gets a connection client, one parameter, of the object type. The returned result is of the LedgerClient type, which is used for subsequent operations such as querying ledbooks.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | address |Contains two fields: IP and port|
+
+##### Use the sample
+
+
+```javascript
+var address = {};
+address.ip = "127.0.0.1";
+address.port = 18091;
+var ledgerClient = LedgerUtil.getClient(address);
+```
+
+#### queryByHash
+
+Queries transactions based on Hash. The returned result is an object containing from, to, type, and data, all of which are Strings. Where data is the byte array parsed according to UTF-8 encoding. If the encoding is not UTF8 when storing the certificate, garbled characters may be returned.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | client |Object obtained through the getClient method|
+| 2 | info |Object type. Two fields, ledger and hash, are strings|
+
+##### Use the sample
+
+
+```javascript
+// ... ledgerClient = LedgerUtil.getClient(...);
+var info = {};
+info.ledger = "bdcontract";
+info.hash = "4d3b75750835092a50085127702669615b602e53";
+var ret = LedgerUtil.queryByHash(ledgerClient,info);
+print(ret.from);
+print(ret.to);
+print(ret.type);
+print(ret.data);
+```
+
+#### sendTransaction
+
+Deposit data.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | client |Object obtained through the getClient method|
+| 2 | info |Object type, with from\to\data three fields, all String type|
+
+##### Use the sample
+
+
+```javascript
+// ... ledgerClient = LedgerUtil.getClient(...);
+var info = {};
+info.ledger = "bdcontract";
+info.from = "b60e8dd61c5d32be8058bb8eb970870f07233155";
+info.to = "b60e8dd61c5d32be8058bb8eb970870f07233155";
+info.data = "hello world";
+var ret = LedgerUtil.sendTransaction(ledgerClient,info);
+//ret为存证的哈希值
+print(ret);
+```
+
+### HttpUtil
+
+We can use @permission (“Http”) to import HttpUtil objects.
+
+```
+@Permission("Http")
+contract HttpExample{
+...
+}
+```
+
+#### createAPIGate
+
+It can be used with the mobile phone’s Yuan state. When the mobile phone is installed with Yuan State and the API interface is installed, it can become the data source.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | ip |The value is a string of IP. The default port number is 6161|
+
+##### Use the sample
+
+
+```javascript
+var ret = HttpUtil.createAPIGate("192.168.4.4");
+ret.get("com.tencent.mm","sendMsg","msg");
+print(ret);
+```
+
+#### createAPIGate
+
+It can be used with the mobile phone’s Yuan state. When the mobile phone is installed with Yuan State and the API interface is installed, it can become the data source.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | ip |The value is a string of type IP|
+| 2 | port |It is a string of type, port|
+
+##### Use the sample
+
+
+```javascript
+var ret = HttpUtil.createAPIGate("192.168.4.4", "6161");
+ret.get("com.tencent.mm","sendMsg","msg");
+print(ret);
+```
+
+#### get
+
+Initiate an Http GET request. The result is of object type and contains the Response and responseCode fields.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | url |A character string, indicating the URL type|
+
+##### Use the sample
+
+
+```javascript
+var ret = HttpUtil.get("https://www.baidu.com");
+print(ret.responseCode);
+print(ret.response);
+```
+
+#### post
+Make an Http POST request. The result is of object type and contains the Response and responseCode fields.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | args |Object type with URL, headers, and data fields. Args. headers is the object type.|
+
+##### Use the sample
+
+
+```javascript
+var req = {};
+req.url = "https://www.baidu.com";
+req.data = "hello";
+req.header = {};
+req.header.Accept = "application/json";
+req.header["Content-Type"] = "application/json";
+var ret = HttpUtil.post(req);
+print(ret.resposeCode);
+print(ret.response);
+```
+
+### DOIPUtil
+
+The DOIPUtil object can be introduced using @permission (“DOIP”).
+
+```
+@Permission("DOIP")
+contract DOIPExample{
+ ...
+}
+```
+
+#### call
+Call a DO
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 |arg0|The string type identifies the target DO|
+| 2 |arg1|The input parameter is a string|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.call("86.5000.470/do.hello","inputString");
+```
+#### create
+Create a string of type DO to a Repository
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | arg0 |A string that identifies the target Repo|
+| 2 |arg1|Object type, including doID,doBody field|
+
+##### Use the sample
+
+
+```javascript
+var digitalObject = JSON.parse("{\"doID\":\"86.5000.470/do.hello\",\"doBody\":\"hello world\"}");
+var ret = DOIPUtil.create("86.5000.470/repo.localTcpRepo",digitalObject);
+```
+#### delete
+Remove DO from a Repository
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | arg0 |The string type target DO identifier|
+| 2 |arg1|String type target Repo identity|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.delete("86.5000.470/do.hello","86.5000.470/repo.localTcpRepo");
+```
+#### hello
+Gets the DOIP service information of the target Repository
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | arg0 |String type target Repo identity|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.hello("86.5000.470/repo.localTcpRepo");
+```
+#### listOperation
+Gets the DOIP operations supported by the target DO
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | arg0 |The string type target DO identifier|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.listOperation("86.5000.470/do.hello");
+```
+#### register
+Register a DO with the LHS and return the assigned identity
+
+##### parameter
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | arg0 |Repo identifier of the string type DO|
+| 2 | arg1 |String type DO Format description string|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.register("86.5000.470/repo.localTcpRepo","String");
+```
+#### reregister
+Example Modify the registration information of the DO on the LHS
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | arg0 |The string type target DO identifier|
+| 2 | arg1 |Repo identifier of the string type DO|
+| 3 |arg2|String type DO Format description string|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.reregister("86.5000.470/do.hello","86.5000.470/repo.localTcpRepo","String");
+```
+#### retrieve
+Get a DO
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | arg0 |The string type target DO identifier|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.retrieve("86.5000.470/do.hello");
+```
+### test
+Tests whether DOIPUtils is available
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | arg0 |String Type Any string|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.test("hello");
+```
+#### update
+Update target DO
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | arg0 |JS object, including doID,doBody field|
+
+##### Use the sample
+
+
+```javascript
+var digitalObject = JSON.parse("{\"doID\":\"86.5000.470/do.hello\",\"doBody\":\"hello world\"}");
+var ret = DOIPUtil.update(digitalObject);
+```
+
+
+
+### SQLUtil
+
+You can use @permission (“SQL”) to import SQLUtil objects. To support MySQL/PostgreSQL/Oracle/GuassDB200 SQL database. The corresponding JDBC JAR needs to be uploaded to the project. For example, to use mysql, upload mysql-connector-java-8.0.24.jar
+
+
+```
+@Permission("SQL")
+oracle MySQLExample{
+...
+}
+```
+
+#### initDriver
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 |driverClass| 字符串类型 |
+
+##### Use the sample
+
+
+```javascript
+ //使用mysql
+ SQLUtil.initDriver("com.mysql.cj.jdbc.Driver");
+ //使用postgresql
+ SQLUtil.initDriver("org.postgresql.Driver");
+ //使用oracle
+ SQLUtil.initDriver("oracle.jdbc.OracleDriver");
+```
+
+#### getConnection
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | URL |String type, JDBC connection|
+| 2 | usrName |The value is a string of user names|
+| 3 | pwd |The value is a string of characters and a password|
+
+
+##### Use the sample
+
+
+```javascript
+var url = "jdbc:mysql://xx.xx.xx:port/tableName";
+var usrName = "xxx";
+var pwd = "xxx";
+//配置好用户名和密码,url格式为ip或域名+端口,中间以”:”隔开。
+var conn = SQLUtil.getConnection(url,usrName,pwd);
+//获取数据库连接
+var sql = "select * from newele.data";
+//创建查询语句
+var statement = conn.createStatement();
+var resultSet = statement.executeQuery(sql);
+var waimailist = [];
+//解析查询结果
+var meta = resultSet.getMetaData();
+for (;resultSet.next();){
+ var line = {};
+ for (var j=1;j<=meta.getColumnCount();j++){
+ line[meta.getColumnName(j)] = resultSet.getString(j);
+ }
+ waimailist.push(line);
+}
+```
+
+In this case, the object returned by the getConnection method is bound to a java.util.Connection object in Java through the reflection mechanism. Therefore, you can view:
+
+To learn how to operate the Mysql database.
+
+
+### MongoDBUtil
+
+The MongoDBUtil object can be introduced using @permission (“MongoDB”).
+
+```
+@Permission("MongoDB")
+contract MongoDBExample{
+...
+}
+```
+
+#### getConnection
+
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | URL |The URL of a database of string type|
+| 2 | port |Port number of an integer type|
+| 3 | dbName |The name of the database of string type|
+| 4 | usrName |The user name of a string database|
+| 5 | pwd |Password of a string database|
+
+
+##### Use the sample
+
+** Note: port is an integer and other parameters are strings **
+
+
+```javascript
+var client = MongoDBUtil.getConnection(url,port,dbName,usrName,pwd);
+//获取数据库对象
+var db = client.getDatabase("yancloud");
+var collection = db.getCollection("containers");
+var iter = collection.find().iterator();
+var ret ="";
+for (;iter.hasNext();){
+ ret+=iter.next().toJson();
+ ret+="\n";
+}
+```
+
+Here, getMongoDBClient object is bound to a com.mongodb.MongoClient object in Java via reflection mechanism. Therefore, you can view:
+
+
+To learn more about how this object works and how it can be used.
+
+### RocksDBUtil
+
+Use @permission (“RocksDB”) to import the RocksDBUtil object.
+
+
+```
+@Permission("RocksDB")
+contract RocksDBSample {
+...
+}
+```
+
+#### loadDB
+
+Load a RocksDB database with loadDB. After the load is loaded, you can perform operations such as GET, delete, and PUT.
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | path |The path where the string database is deployed|
+| 2 | readOnly |The Boolean database is read-only|
+
+##### Use the sample
+
+
+```
+@Permission("RocksDB")
+@Description("这是个使用RocksDB的参考代码")
+contract RocksDBSample{
+ function onCreate(){
+ Global.rocksdb = RocksDBUtil.loadDB("./dbdir/","false");
+ }
+ @Description("示例参数: {\"key\":\"abc\",\"value\":\"def\"}")
+ export function put(arg){
+ arg = JSON.parse(arg);
+ Global.rocksdb.put(arg.key,arg.value);
+ return "success";
+ }
+ @Description("示例参数: \"abc\"}")
+ export function get(arg){
+ return Global.rocksdb.get(arg);
+ return "failed";
+ }
+ @Description("示例参数: \"abc\"")
+ export function deleteKey(arg){
+ return Global.rocksdb.delete(arg);
+ }
+ @Description("遍历KV库,无需参数")
+ export function iter(arg){
+ var iter = Global.rocksdb.newIterator();
+ var obj = undefined;
+ var ret = {
+ };
+ for (iter.seekToFirst();(obj=Global.rocksdb.getNext(iter))!=undefined;){
+ ret[obj.key]=obj.value;
+ }
+ return JSON.stringify(ret)
+ }
+}
+```
+
+### BDWareTimeSeriesDBUtil
+
+Use the sample
+
+
+```
+@Permission("BDWareTimeSeriesDB")
+contract BDWareTimeDBExample{
+ function onCreate(arg){
+ Global.dbutil = BDWareTimeSeriesDBUtil.getConnection();
+ }
+
+ export function put(arg){
+ //第一个参数为表名,第二个参数为要放的value,时间戳自动打。
+ Global.dbutil.put("defaultTable",arg);
+ return "success";
+ }
+ @Param
+ export function getCount(arg){
+ return Global.dbutil.getCount("defaultTable");
+ }
+ @Param(1617254937373)
+ export function queryByStartTime(arg){
+ var startDate = java.lang.Long.valueOf(arg);
+ //查询从开始时刻startDate到最新的数据
+ var list = Global.dbutil.query("defaultTable",startDate);
+ var ret=[];
+ print("DBUtil"+Global.dbutil+" list:"+list+" list.size"+list.size());
+ var i=0;
+ for (i=0;i"+list.get(i));
+ ret.push(list.get(i));
+ }
+ return ret;
+ }
+
+ @Description("示例参数: {\"offset\":1,\"len\":1}")
+ @Param({"offset":1,"len":1})
+ export function queryByOffset(arg){
+ var offsetLen = JSON.parse(arg);
+ //可配合getCount使用,查询第offset至offset+len条数据
+ var list = Global.dbutil.queryByOffset("defaultTable",offsetLen.offset,offsetLen.len);
+ var ret=[];
+ print("DBUtil"+Global.dbutil+" list:"+list+" list.size"+list.size());
+ var i=0;
+ for (i=0;i"+list.get(i));
+ ret.push(list.get(i));
+ }
+ return ret;
+ }
+}
+
+```
+
+
+## Encryption and decryption tools
+
+
+### SM2
+The SM2Util object can be imported using @permission (“SM2”).
+
+
+```
+@Permission("SM2")
+contract SM2Sample {
+...
+}
+```
+
+#### generateKeyPair
+Generate public and private keys.
+
+##### 参数
+No parameters.
+
+##### Use the sample
+
+
+```javascript
+var ret = SM2Util.generateKeyPair();
+print(ret.publicKey);
+print(ret.privateKey);
+return JSON.stringify(ret);
+```
+
+#### sign
+
+The signature.
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | content |The value is a string of characters to be signed|
+| 2 |keyPair| sm2 |
+
+
+##### Use the sample
+
+
+```
+var keypair = SM2Util.generateKeyPair();
+var ret = SM2Util.sign("Hello",keypair);
+print(ret.status);
+//如果status是success
+print(ret.signature);
+//如果status是failed
+print(ret.message);
+```
+
+#### verify
+
+Attestation.
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | content |The value is a string of characters to be verified|
+| 2 | signature | 字符串类型 签名 |
+| 3 |publicKey| 字符串类型 公钥 |
+
+##### Use the sample
+
+
+```javascript
+var ret = SM2Util.verify("Hello","....签名","...公钥");
+// 验证通过时,result为true,status为success
+// 失败时,result为failed,status为failed
+print(ret.status);
+print(ret.result);
+```
+
+#### encrypt
+
+Sm2 encryption.
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | content |The value is a string of characters to be verified|
+| 3 |publicKey| 字符串类型 公钥 |
+
+##### Use the sample
+
+
+```javascript
+var ret = SM2Util.encrypt("Hello","...公钥");
+print(ret);
+```
+#### decrypt
+
+Sm2 decryption.
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | content |The value is a string of characters to be verified|
+| 3 |privateKey| 字符串类型 公钥 |
+
+##### Use the sample
+
+
+```javascript
+var ret = SM2Util.decrypt("Hello","...私钥");
+print(ret);
+```
+
+
+
+## Multithreading Tool class
+
+### AsyncUtil
+
+An AsyncUtil object can be introduced using @permission (“Async”).
+
+```
+@Permission("Async")
+contract AsyncExample{
+ export function longTimeTask(arg){
+ var a = {
+ };
+ a.count = 100;
+ AsyncUtil.postFunction(taskFun,a);
+ }
+ function taskFun(arg){
+ Global.progress = 0;
+ for (var i=0;i
+
+* Number
+
+* Math
+
+* Date
+
+* RegExp
+
+* Error
+
+* JSON
+
+## YJS application framework
+
+### Ypk project composition
+As described earlier, YPK can store static resource files (HTML/CSS /js). Declaring the loadResource method in the smart contract can return static resource files. Based on loadResource, this project provides a YJS application framework. The framework can load and display YPK’s (HTML/CSS /js) files through executeContract.
+
+### Function agreed
+
+| 序号 |Contract function name| 说明 |
+|---|---|---|
+| 1 | needRender |Will not be called, there is this function to indicate the need to render the front end|
+| 2 | getMainFrame |If no parameter is specified, String is returned, indicating the HTML file path of the home page|
+| 3 | loadResource |The value is String and returns the static resource file in the relative path in text format|
+
+### Loading process
+Arguments loaded in the front end are resolved to global.urlparam. The following parameters are included:
+
+```
+//global.urlparam对象示例
+{
+ "contract":"TrustedStorage0899", //表示合约ID或是合约的名称
+
+ "keys":{ //表示当前登录者的密钥对
+ "privateKey":"ff38dd04710...",
+ "publicKey":"04fc228..."
+ },
+ "nodeAddr":"022.node.internetapi.cn:21030" //节点的ip+端口
+}
+```
+
+A WebSocket connection to nodeAddr is established before loading. Once the connection is established, the loading process is divided into two steps: the first step is to log in with the current Publickey-privatekey. For details about the login process, see `合约节点WebSocket接口` After login, the contract information will be obtained. And stored in the global.CurrentContract object.
+
+The second step is to see if there is a needRender method in the global.CurrentContract object, and if there is, it will start loading the front-end code. Execute executeCurrentContract(“getMainFrame”) to obtain the HTML of the page. After append to mainDIV, all the `
+
+
+```
+The example resource file ”/ HTML /hello.js” is as follows:
+
+
+```javascript
+var queryDataFromContract = function(){
+ //第一个参数为函数名,第二个为参数,第三个参数为回调。
+ var data = executeCurrentContract("query","abc",function(argg){
+ $("#resultText")[0].innerHTML = argg.result;
+ });
+}
+```
+
+Reference example:
+
+
+
+
+### YJS-Python
+
+TODO
+
diff --git a/markdown_trans/markdown/conf.py b/markdown_trans/markdown/conf.py
new file mode 100644
index 0000000..8f9a4d9
--- /dev/null
+++ b/markdown_trans/markdown/conf.py
@@ -0,0 +1,100 @@
+# Configuration file for the Sphinx documentation builder.
+#
+# This file only contains a selection of the most common options. For a full
+# list see the documentation:
+# https://www.sphinx-doc.org/en/master/usage/configuration.html
+
+# -- Path setup --------------------------------------------------------------
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+# import os
+# import sys
+# sys.path.insert(0, os.path.abspath('.'))
+
+
+# -- Project information -----------------------------------------------------
+project = '北大数瑞大数据区块链'
+copyright = '2021, Peking University'
+author = 'Peking University'
+
+# The full version, including alpha/beta/rc tags
+release = 'V1.0'
+
+
+# -- General configuration ---------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+
+html_theme = "sphinx_rtd_theme"
+html_logo="_static/imgs/logo.png"
+html_theme_options = {
+'logo_only': True
+}
+
+source_parsers = {
+ '.md': 'recommonmark.parser.CommonMarkParser',
+}
+
+source_suffix = ['.rst', '.md']
+
+# source_suffix = {
+# '.rst': 'restructuredtext',
+# '.txt': 'markdown',
+# '.md': 'markdown'
+# }
+
+extensions = [
+ 'recommonmark',
+ 'sphinx_rtd_theme',
+ 'sphinx_markdown_tables'
+]
+
+html_favicon = "_static/imgs/favicon.ico"
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = 'zh_CN'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This pattern also affects html_static_path and html_extra_path.
+exclude_patterns = []
+
+
+# -- Options for HTML output -------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+#
+#html_theme = 'alabaster'
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+master_doc = 'index'
+
+
+##latex_elements = {
+## 'papersize': 'a4paper',
+ # Additional stuff for the LaTeX preamble.
+## 'preamble': '''
+##\usepackage{xeCJK}
+##\usepackage{indentfirst}
+##\setlength{\parindent}{2em}
+##\setCJKmainfont[BoldFont=STFangsong, ItalicFont=STKaiti]{STSong}
+##\setCJKsansfont[BoldFont=STHeiti]{STXihei}
+##\setCJKmonofont{STFangsong}
+##''',
+##}
\ No newline at end of file
diff --git a/markdown_trans/markdown/index.rst b/markdown_trans/markdown/index.rst
new file mode 100644
index 0000000..e52a1e1
--- /dev/null
+++ b/markdown_trans/markdown/index.rst
@@ -0,0 +1,10 @@
+.. BDContract documentation master file, created bysphinx-quickstart on Mon Nov 25 16:23:38 2019.You can adapt this file completely to your liking, but it should at leastcontain the root `toctree` directive.
+
+Zhirong Yunhe big data blockchain — Smart contract engine document
+===================================================================
+
+.. toctree::
+ :maxdepth: 3
+ :caption: directory
+
+ Introduction.rstInstallTips.rstIDEUsage.rstContractAPI.rstYJSInDepth.rstYJSAPI.rst
\ No newline at end of file
diff --git a/markdown_trans/markdown_BDWare/1_Introduction.md b/markdown_trans/markdown_BDWare/1_Introduction.md
new file mode 100644
index 0000000..c971a09
--- /dev/null
+++ b/markdown_trans/markdown_BDWare/1_Introduction.md
@@ -0,0 +1,246 @@
+# Introduction to Peking University
+
+- - -
+
+## What is a BDContract?
+
+BDContract is a trusted computing framework where the computation logic is expressed as a smart contract. Through “random” and “redundant computation” to achieve the trusted execution of smart contract. BDContract focuses on improving execution efficiency and security while ensuring the availability and reliability of smart contracts.
+
+
+- - -
+
+## The characteristics of
+
+1. Support multiple execution modes, balancing availability, reliability, correctness, and efficiency.
+2. Access to various data sources.
+3. Support for fine-grained monitoring of contracts.
+4. Support the state of the contract.
+5. Access control.
+6. Support for cross-language invocation.
+
+- - -
+
+## Update log
+
+* **v1.7.5** April 29, 2022
+ - Updated some features of nodeportal.html
+ - Supports YPK deploy Tool
+ - Optimized the view keyword
+ - Optimized the startContract log output
+ - Docker image script support
+
+* **v1.7.0** March 7, 2022
+ - The submission algorithm is plug-in
+ - Cp is stripped from the mirror image
+ - ArgSchema annotations are supported.
+
+* **v1.6.7** January 6, 2022
+ - Cp supports MultiTagTimeIndexUtil
+
+
+* **v1.6.6** January 4, 2022
+ - Update DOIP — SDK
+
+* **v1.6.0** December 20, 2021
+ - Merge feature DS branch and support PBFT algorithm.
+ - Upgrade Log4j2 to 2.1.17
+
+* **v1.5.0** October 1, 2021
+ - It is divided into two modules: cp-bundle and bdcontract-bundle
+ - Network optimization: NetworkManager is used to manage Agent-cluster/Agent-Agent connections.
+
+* **v1.4.5** June 29, 2021
+ - Improvement of stability
+ - Optimize URIPath for the HTTP server
+ - Supports static resource file loading using Http
+
+* **v1.4.4** June 15, 2021
+ - Fixed an issue with getContractMeta that does not prioritise RUNNING/HANGED contracts
+ - The logic of HomomorphicEncrypt is implemented
+
+* **v1.4.3** June 9, 2021
+ - Fix the SSL Renegotiate Bug
+ - Implement automatic hangup-resume when memory is insufficient
+ - Implement hard disk persistence for Contract Meta
+
+* **v1.4.1** May 26, 2021
+ - Implement event semantics in event mechanism, support “at least once”, “at most once” and “only once”
+ - Optimized contract templates
+ - Example Add a template configuration file
+ - Optimized the MockTemplate annotation
+
+* **v1.4.0** May 9, 2021
+ - Optimize the ACTemplate
+ - Improved configuration linkage for DoRepo
+
+* **v1.3.9** April 22, 2021
+ - Fixed a bug where doipConfig was not supported in updateConfig
+ - Test-tool supports SUdo
+ - Optimized the ACTemplate template in Contract-Template
+
+* **v1.3.6** April 21, 2021
+ - Fixed an issue in Docker where CPUID could not be obtained
+
+* **v1.3.6** April 16, 2021
+ - Fixed some bugs
+ - Fixed a bug that caused queuing due to insufficient GRPCPool threads
+ - Fixed a bug where the requestID assignment could duplicate under stress testing
+
+* **v1.3.5** March 31, 2021
+ - Fixed some bugs
+ - Simple congestion control policies have been added to the contract invocation part of HTTP
+ - Improvement of stability
+
+* **v1.3.0** February 1, 2021
+ - Optimizing heartbeat Mechanism
+ - Fixed some bugs
+ - SM2 update/SM3 library
+ - Update the front-end signature calculation method
+
+* **v1.2.0** December 11, 2020
+ - Optimized multi-node execution mode
+ - Optimized the logic of the contract master route
+ - Fixed some bugs
+ - Fix file system related vulnerabilities
+
+* **v1.1.0** September 2020
+ - Support for HTTPS, and updated this part of the documentation
+
+
+* **v1.0.9** August 27, 2020
+ - Improve the documentation of IO related tools
+ - Optimize contract template: DAC persistence
+
+
+* **v1.0.7** August 13, 2020
+ - Optimized the contract log and ledger interfaces
+ - Optimize documentation for interfaces
+ - Provides the WebSocket interface for the contract template
+ - Automatic compilation of bug fixes
+
+* **v1.0.5** July 25, 2020
+ - Weaken the centralization of NC, and cluster point-to-point connection.
+ - Optimize bdwareclient
+ - TODO MemoryDurable
+
+* **v1.0.2** July 22, 2020
+ - Fixed Bug in CentOS7 Too Many Opened Files
+ - Fix permissions bugs
+ - Adding a Permission
+ - Fixed bugs in MySQLUtil
+ - Upgrade the BDLedger version
+
+* **v1.0.1** July 5, 2020
+ - Updated NodePortal/CenterPortal UI.
+ - The compilation process has been modified so that the compilation results can be viewed in NodePortal and compiled manually/startup in OnlineIDE
+ - Modified the contract distribution logic to use compiled YPk as the distribution file
+ - When YPK in the public directory is executed in multi-node mode, contract faults can be automatically recovered
+
+* **v0.99** June 22, 2020
+ - Billing for custom contract methods
+ - Add GasExample, Incentives examples
+ - On the client side, “check multipoint result” is implemented, and the method of result return is optimized
+ - Repair Disconnection No permission prompt after reconnection
+
+* **v0.97** May 25, 2020
+ - CPU metering: GAS mechanism
+ - Onlineide.html supports uploading multiple files
+ - Multi-point Execution in UDP Mode [Unordered messages]
+ - Bdwareclient.html, fixes a call example generation prefix error that contains only computational logic
+
+* **v0.95** May 19, 2020
+ - Fixed bug where onlineide.html could not jump to Bdwareclient correctly when the pathname was prefixed.
+ - Fixed a bug where Bdwareclient automatically extracted urls when the pathname was prefixed.
+ - Permissions for contracts are enabled
+ - Increased NodePortal. HTML/OnlineIDE. HTML and bdwareclient. HTML has no right to limit the warning
+
+* **v0.90** May 9, 2020
+ - Changed the way yjs.jar/bdserver.jar is packaged
+ - Updated the sh/update. Sh
+ - OnlineIDE post modification reminder
+ - OnlineIDE tag adaptive width
+ - File interface isolation
+
+
+* **v0.8** April 26, 2020
+ - Improve the documentation interface and optimize the way SDK is provided
+ - Rui Web client, all the data processing in the client and how to render the processed data are from the contract call, to achieve a trusted Web application.
+
+* **v0.78** April 13, 2020
+ - Contract call DAC example
+ - Supports dynamic change of I/O permissions
+ - Supports custom backup (periodic) policies for contract status
+ - Fixed some page bugs
+ - Log Display Optimization
+ - Optimized ledger log presentation
+ - Enable partial access control
+
+
+* **v0.7** March 25, 2020
+ - Support access control for multiple roles
+ - Updated the UI
+
+* **v0.6** February 14, 2020
+ - Optimized communication between contract processes
+ - Try to access a P2P network
+
+* **v0.5** December 10, 2019
+ - Improved three smart contract state record-playback strategies
+ - Supports the simplest multi-point execution algorithm (unsynchronized)
+
+* **v0.45** September 2, 2019
+ - Preliminary implementation of PBFT algorithm
+
+* **v0.4** May 10, 2019
+ - Support the memory dump
+
+* **v0.35** April 26, 2019
+ - Implement a static analysis framework for contracts
+ - Support for publish-subscribe events
+
+* **v0.3** January 8, 2019
+ - Support ledger data access
+ - Contract status on the chain
+
+* **v0.2** October 9, 2018
+ - Support for automatic Python package generation
+ - Contracts can be packaged as YPK
+ - Supports data access, such as files and databases
+
+* **v0.1** August 6, 2018
+ - Defines the syntax for smart contracts
+ - Based on Nashorn engine, smart contract execution is realized
+
+- - -
+
+
+## Use open source project instructions
+The BDWare project stands on the shoulders of many giants, thanks to these open source projects.
+
+The smart contract backend of this project uses the following open source libraries.
+
+| 名称 |Licence type| 说明 |
+| ------ | ---------- | ---- |
+| [Project Nashorn](https://openjdk.java.net/projects/nashorn/) |[GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)| 使用了该项目的编译器,可以将js函数编译为java字节码 |
+| [ASM OW2](https://projects.ow2.org/view/asm/) |[BSD](https://en.wikipedia.org/wiki/BSD_licenses#4-clause_license_(original_%22BSD_License%22)) with attribution| 基于asm的TreeAPI与VisitorAPI实现合约的静态分析框架 |
+| [Netty](https://netty.io/) |[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)| 使用netty作为Http/Websocket的服务端 |
+| [gRPC](https://grpc.io/) |[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)| 使用gRPC与BDWareLedger通讯 |
+| [RocksDB](https://github.com/facebook/rocksdb) |[GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)| 后台数据库 |
+| [ANTLR](https://github.com/antlr/antlr4) |[BSD](https://en.wikipedia.org/wiki/BSD_licenses#4-clause_license_(original_%22BSD_License%22))| 对合约脚本的词法分析与语法分析 |
+| [SM2Java](https://github.com/PopezLotado/SM2Java) |[无](https://github.com/PopezLotado/SM2Java/blob/master/README.md)| 国密SM2 Java语言实现 |
+
+
+
+The smart contract front-end of this project uses the following open source libraries.
+
+| 名称 |Licence type| 说明 |
+| ------ | ---------- | ---- |
+| [Bootstrap](https://getbootstrap.com/) |[MIT](https://github.com/twbs/bootstrap/blob/master/LICENSE)| 前端的排版、样式 |
+| [jQuery](https://jquery.org/) |[MIT](https://jquery.org/license/)| 用于操作DOM的javascript库 |
+| [jQueryUI](https://jqueryui.com/) |[MIT](https://jquery.org/license/)| 前端UI构件库 |
+| [DataTables](https://datatables.net/) |[MIT](https://datatables.net/license/mit)| 表格样式 |
+|[CodeMirror](https://codemirror.net/)| [MIT](https://codemirror.net/LICENSE) | 代码编辑框样式 |
+|[eCharts](https://echarts.apache.org/zh/index.html)| [ApacheV2](https://www.apache.org/licenses/) | 统计图表 |
+| [sm-crypto](https://github.com/JuneAndGreen/sm-crypto) |[MIT](https://github.com/JuneAndGreen/sm-crypto/blob/master/LICENCE_MIT)| 国密SM2 javascript语言实现 |
+
+The document for this project was generated using [Sphinx](https://www.sphinx-doc.org/en/master/), thanks to [readthedocs](https://readthedocs.org/) for providing the document style.
\ No newline at end of file
diff --git a/markdown_trans/markdown_BDWare/2_InstallTips.md b/markdown_trans/markdown_BDWare/2_InstallTips.md
new file mode 100644
index 0000000..f603462
--- /dev/null
+++ b/markdown_trans/markdown_BDWare/2_InstallTips.md
@@ -0,0 +1,188 @@
+# Installation instructions
+
+
+- - -
+
+## Environment-dependent installation
+1.Install the Java1.8 environment.
+
+For example, using apt-get to install Ubuntu:
+
+
+```bash
+apt-get install openjdk-8-jre
+```
+On Centos, install using yum:
+
+
+```bash
+yum install java-1.8.0-openjdk
+```
+
+In an offline environment, download the OpenJDK installation package and install it offline.
+
+Under the Ubuntu
+
+```bash
+dpkg -i jdk-8uxxxxx.deb
+```
+
+On Centos, use yum for offline installation:
+
+```bash
+yum localinstall jdk-8u271-linux-xxx.rpm
+```
+
+2.Install wGET and unzip. For example, using apt-get to install Ubuntu:
+
+
+```bash
+apt-get install unzip
+apt-get install wget
+```
+
+- - -
+
+## Network Topology Description
+
+Only one node is required to deploy the Surui smart contract engine, which can be used for debugging and testing. The multi-node mode cannot be used to achieve trusted computing. When a single node is deployed, the calculation of “anti-repudiation” can be implemented by configuring the ledger, but the calculation of “tamper-resistant” cannot be implemented.
+
+In multi-node deployment, the following figure shows three types of logical nodes. One to three types of nodes can be installed on a VM.
+
+1) Account node. That is, the number Rui schema ledger.
+
+2) Contract node. Run code logic and implement highly responsive modules through memory caching. Form a trusted computing network with other contract nodes.
+
+3) Routing node. Routing information of each contract node. Generally, a routing node can support a maximum of 1000 contract nodes. Deploy multiple routing nodes as required, and configure the routing nodes among them to implement a large-scale node network.
+
+Generally, **Contract node and ledger node** is deployed on the same VM.
+
+![deploytopology](_static/imgs/deploytopology.png)
+
+- - -
+
+## Smart contract node installation
+
+Open the[安装包下载链接](https://public.internetapi.cn/?dir=releases/bdcontract/newest), download `bdserver-lite.zip` or `bdserver.zip`, among them, the `bdserver.zip` contains more examples and documentation. After downloading, unzip and launch.
+
+
+```bash
+unzip -d ./bdserver bdserver-lite.zip
+cd bdserver
+chmod +x *.sh
+sh cmstart.sh
+```
+
+- - -
+
+## Route admission nodes are installed
+
+Open[安装包下载链接](https://public.internetapi.cn/?dir=releases/bdcontract/newest) Where, download `bdserver-cluster.zip`. After downloading, unzip and launch.
+
+
+```bash
+unzip -d ./bdcluster bdserver-cluster.zip
+cd bdcluster
+chmod +x *.sh
+sh ncstart.sh
+```
+
+- - -
+
+## Document describing
+
+### Smart Contract node
+
+![bdserver目录](_static/imgs/dirstructure.png)
+
+Description of files in this directory:
+
+1.Cmstart. sh This script is used to start the contract engine. The contract engine listens to port 8080 by default. You can modify the listening port by running the cmstart.sh command.
+
+2.BDWareProjectDir This directory stores all contract projects for this node.
+
+3.WebContent This directory stores the front-end code of this node.
+
+4.Cp, which holds yjs.jar, the JAR needed to start the contract instance.
+
+5.Bdserver. jar provides HTTP/webSocket server logic externally.
+
+6.Updatecontract. sh Upgrade script.
+
+### Route admission node
+
+The installation script is automatically downloaded and decompressed to the bdCluster directory. Description of files in this directory:
+
+1.Ncstart. sh This script is used to start the node access center. It listens on port 1718 by default. You can modify the listening port by modifying ncstart.sh.
+
+2.WebContent This directory houses the front-end code for the access center.
+
+3.Bdcluster. jar back-end of the access center.
+
+- - -
+
+## The upgrade process
+
+### Contract node
+
+On the command line, type:
+
+
+```bash
+sh updateContract.sh
+```
+
+Alternatively, go to [public.internetapi.cn](https://public.internetapi.cn/?dir=releases/bdcontract), download the latest file, and upgrade yjs.zip/bdserver-jar.zip/AgentWebContent separately.
+
+### Route admission node
+
+
+```bash
+sh updateCluster.sh
+```
+Through the [public.internetapi.cn](https://public.internetapi.cn/?dir=releases/bdcontract), download the latest files, separate upgrade bdserver — cluster. Zip/ClusterWebContent. Zip to upgrade.
+
+- - -
+
+## Directions for use
+
+### Use it on the reference page
+If the WebContent directory is reserved, you can configure it using the browser. For more information, see the document [BDContract refer to the interface instructions](./IDEUsage.html) on the left.
+
+#### BDWare OnlineIDE
+Open [BDWare OnlineIDE](../OnlineIDE.html).
+
+#### BDWare NodePortal
+Open [BDWare NodePortal](../NodePortal.html).
+
+If the cross-node function is required for networking, install the route access center. Perform the following steps to configure it. Two sets of public and private keys are involved. The first group of public and private keys is the public and private keys of the contract node that have NodeManager permission. The second group is the public and private keys of the route access node that have the CenterManager permission.
+
+1.Open nodeportal. HTML and copy the public and private NodeManager keys of the node.
+
+2.Open centerportal. HTML, click in the upper right corner, and import the public and private NodeManager keys. And select “NodeManager” for identity authentication.
+
+3.In centerportal. HTML, switch the public and private keys of CenterManager, click User Management on the left, and pass the NodeManager authentication request.
+
+4.Use the public and private keys of the NodeManager permission to open nodeportal. HTML, click the Node Management menu, and configure joining the network. The format of joining the network is WS :// IP address of Centerportal: port +1. ![配置示例](_static/imgs/config.png)
+
+
+### Using the SDK
+
+#### Basic knowledge of
+
+[Websocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API)
+
+[Sm2 encrypted using] (https://github.com/JuneAndGreen/sm-crypto)
+
+#### Download the SDK
+
+1. Java client download: [BDWareJavaClient](_static/BDWareJavaClient.zip). For details about how to use it, download it, decompress it, check readme.md, and see [ContractAPI](./ContractAPI.html).
+
+2.Javascript version for client download :[BDWareWebClient](_static/BDWareWebClient.zip). For details about how to use it, download it, decompress it, check readme.md, and see [ContractAPI](./ContractAPI.html).
+
+3.Configuration tool [BDWareConfigTool](_static/BDWareConfigTool.zip). For details, decompress the package and run the following command to view help information:
+
+
+``` bash
+java -jar java-client.jar -h
+```
\ No newline at end of file
diff --git a/markdown_trans/markdown_BDWare/3_IDEUsage.md b/markdown_trans/markdown_BDWare/3_IDEUsage.md
new file mode 100644
index 0000000..14b854e
--- /dev/null
+++ b/markdown_trans/markdown_BDWare/3_IDEUsage.md
@@ -0,0 +1,411 @@
+# Management interface
+
+- - -
+
+## Contract node management interface
+
+The address of this interface is: [NodePortal.html](/NodePortal.html)
+
+
+### User Management Menu
+User management allows login users to view the current user distribution and user active statistics.
+
+#### An overview of
+![nodeUserManager](./_static/imgs/nodeUserManager.jpg) The node user management page has four modules: user information, active user statistics, authorized user management, and unauthorized user management.
+
+#### User Type Distribution
+Calculate the number of four roles held by the current node administrator: contract provider, contract administrator, and contract user ![userList](./_static/imgs/userList.jpg)
+
+#### Active User Statistics
+![userActive](./_static/imgs/userActive.jpg) statistics 30 days **The login**, **authorization**, **To apply for** the number of times
+
+#### Current User Information
+![nodeInfo](./_static/imgs/nodeInfo.jpg)
+ * In this text box, you can view the public and private keys of the current user. If other users want to use their public and private keys to log in to the node administrator interface, they can copy their public and private keys to this text box.
+ * After copying your public and private keys, click **Import the public key** to add the public key to the local node administrator
+ * The first five public keys are displayed in **Local public key**. If you select your own public key, the role of the selected public key will be displayed in **My permission**. If the node has not been authenticated by the central administrator, the default value is **Anonymous**.
+ * If you are not a node administrator and want to join the network of a central administrator, use your own public and private keys to import the key to the user management where the central administrator resides for authentication.
+ * If you want to perform more operations on contracts, you need to authenticate different roles: contract administrator, contract consumer, contract provider, and then **Role of certification**
+
+#### List of authorized and unauthorized users
+![roleAuth](./_static/imgs/roleAuth.jpg)
+After the node administrator authenticates the role, the node administrator will see the application information with the public key in the **Role management is not authorized** form. If yes, click . If no, click . After authorization, you will see a list of authorized nodes in the **Authorized Role Management** table. If the node administrator wants to remove a role from a node, enter **delete** in the entitlement role management list.
+
+### Contract code management menu
+
+![codeManageMenu](./_static/imgs/codeManageMenu.png)
+
+
+
+#### The contract documents
+
+![codeManage1](./_static/imgs/codeManage1.png)
+
+In the Contract Code Management menu, users can see public contracts as well as individual private contracts. ![codeManage1-1](./_static/imgs/codeManage1-1.png)
+
+For public contracts, node administrators can delete and upload files, and download and delete contract items. ![codeManage1-2](./_static/imgs/codeManage1-2.png)
+
+For private contracts, the contract provider can delete and upload files, and download, delete and upload contract items to the public contract directory.
+
+The following is an example of working with a contract file.
+
+#### Upload a file
+![codeManage6](./_static/imgs/codeManage6.png)
+
+#### delete
+![codeManage5](./_static/imgs/codeManage5.png)
+
+#### To the public
+![codeManage7](./_static/imgs/codeManage7.png)
+
+#### A drop-down box
+
+![codeManage2](./_static/imgs/codeManage2.png)
+
+From the four drop-down boxes, you can select the contract status saving mode, started contract instance, cluster where the node resides, and result verification mode.
+
+
+
+#### Button action
+
+![codeManage3](./_static/imgs/codeManage3.png)
+
+#### Start the
+
+After selecting the contract file in the file list, select “Single Node Execution” in the contract operation mode and click the Start button to launch the specified file and display the return result in the result display box.
+
+
+
+#### The P2P cluster contract is started
+
+After selecting the contract file in the file list, select the contract cluster on which the trusted contract runs in the Contract Run mode and click the Start button to start the specified file on all nodes of the cluster and display the return result in the result display box.
+
+
+
+#### Start all
+
+Select “Single Node Execution” in the contract operation mode and click the “Start All” button to start all contracts in the contract file list.
+
+
+
+#### Stop the P2P cluster contract
+
+Select a contract instance from the drop-down box for started contract instances, select the contract cluster for which the trusted contract runs in Contract Run mode, and click the Stop button to terminate the contract process on all nodes in the cluster.
+
+
+
+#### stop
+
+Selecting a contract instance from the drop-down box for started contract instances and clicking the Stop button will terminate the contract process.
+
+
+
+#### Stop all
+
+Clicking the Stop All button stops all contract instances running on that node.
+
+
+
+#### Static analysis
+
+Select the contract file in the Contract file list, select the contract instance in the Contract instance drop-down box, click the static analysis button, the contract will be static analysis, and the result will be displayed in the result display box.
+
+
+
+#### Distribution of the contract
+
+Select a contract item in the contract file list, select a cluster in Contract operation mode, and click the Distribute contract button. The contract item will be packaged as YPK and distributed to all nodes in the cluster.
+
+
+
+
+#### Returns the result
+
+![codeManage4](./_static/imgs/codeManage4.png)
+
+The Return Result display displays the return results of some operations.
+
+
+
+#### Contract Permission Configuration
+
+After starting the contract, if the current user’s role can view the started contract process, the IO permissions for the current contract will be displayed in the bottom right when the process is selected. ![permissionShow](./_static/imgs/permissionShow.png)
+
+If the selected contract does not have I/O permission, the following message is displayed in the current permission display box: **The current contract does not have IO permission**![nullPermission](./_static/imgs/nullPermission.png)
+
+If the current user is a contract administrator, you can modify the existing contract I/O permissions. The system will prompt that the contract may not run normally after modification. If you still want to cancel, click , otherwise click .
+
+After clicking Close or open, the next time the process views the same contract code, it will display the IO permission after the last modification by default. ![closePermission](./_static/imgs/closePermission.png)
+
+### Contract instance management menu
+
+![nodeInstancesPage](./_static/imgs/nodeInstancesPage.png)
+
+The contract instance management menu displays all the current contract instances of this node. Users can view the status of the contract instance and execute or migrate the status of the contract instance.
+
+#### List of Contract instances
+
+![nodeInstancesList](./_static/imgs/nodeInstancesList.png)
+
+This list shows all the contract instance information of the current node, including the contract ID, contract name, contract type, contract status, contract process port, contract call times, contract traffic, and contract memory usage, and the result verification mode of the cluster contract.
+
+#### Contract instance execution
+
+![chooseInstance](./_static/imgs/chooseInstance.png)
+
+Users can select a contract instance in the contract instance selection drop-down box to operate on the contract instance.
+
+![intanceExecute](./_static/imgs/intanceExecute.png)
+
+After selecting the contract instance, the user can select the method name of the contract from the “Methods” drop-down box, enter the method parameters in the “Parameters” input box, and click “Execute ”.
+
+Users can also click on “Dynamic Analysis Execution” to perform an execution with dynamic analysis results.
+
+If the contract is a single point contract, the contract is executed at a single point; If the contract is a cluster contract, the contract is executed on all nodes in the cluster.
+
+#### Contract instance execution result
+
+![executeResult](./_static/imgs/executeResult.png)
+
+The execution result of the contract instance is displayed in the Execution Result area, including the execution ID, execution success/failure, execution time, and execution result.
+
+![analysisExecuteResult](./_static/imgs/analysisExecuteResult.png)
+
+If the execution mode of the contract is Dynamic Analysis execution, in addition to the execution result, the dynamic analysis result of the execution is displayed in the result box.
+
+#### Contract status migration
+
+![memoryDump](./_static/imgs/memoryDump.png)
+
+For the contract instances that support manual migration, users can click “Local State Save” to save the state of the contract instance, or select the saved contract instance from the TimeTravel list of the contract to migrate the contract state to the corresponding time.
+
+
+
+### Log Management Menu
+![logMenu](./_static/imgs/logMenu.png)
+
+This menu displays the statistics of local node logs and contract logs of the node.
+
+Node administrators can view node log data. The contract manager and contract user can view the local contract log data of the node.
+
+
+
+#### Log Statistics View
+
+![log1](./_static/imgs/log1.png)
+
+#### Operating percentage of various platforms
+
+By default, this chart shows the pie chart of the proportion of various platform operations in the last two days, in which platform operations are divided into six categories: login, user, log, contract, maintenance and others. You can enter the desired log time range in the upper right corner of the node log details. After the time range is changed, the operation percentage of each platform is updated.
+
+
+
+#### Operating percentage of each type of contract
+
+Contract operations are divided into four categories: start, end, static analysis and execution. The pie chart shows the proportion of each type of contract operation in the last 2 days. You can enter the desired log time range in the upper right corner of the contract log details. After the time range is modified, the operation percentage of each contract is updated.
+
+
+
+
+#### Daily platform usage statistics
+
+The figure is a broken line chart of the number of platform operations in the last 2 days. You can enter the desired log time range in the time range box in the upper right corner of node log details. After the time range is changed, the daily platform usage statistics line chart is updated.
+
+
+
+
+#### Daily contract usage statistics
+
+The figure is a broken line chart of the number of operations performed on the node in the last two days. You can enter the desired log time range in the time range box in the upper right corner of the contract log details. After modification, the daily contract usage statistics line chart will be updated.
+
+
+
+
+#### Log details
+
+
+
+#### Node Log Details
+![log2](./_static/imgs/log2.png)
+
+The node log details table displays all data in node logs. You can click the relevant button in the table to sort the log data in different ways, and enter keywords in the upper right corner of the table to search for relevant logs. You can enter the desired log time range in the time range box in the upper right corner. After the log time range is modified, the operation percentage of each platform and daily platform usage statistics are updated simultaneously.
+
+
+
+#### Contract Log Details
+![log3](./_static/imgs/log3.png)
+
+The contract log details table is a display of all the data in the contract log. You can click the relevant button in the table to sort the log data in different ways, and enter keywords in the upper right corner of the table to search for relevant logs. You can enter the desired log time range in the time range box at the upper right corner. After the change, the operation percentage of each type of contract and the daily contract usage statistics are updated simultaneously.
+
+
+
+### Node Management Menu
+
+![nodeConfig](./_static/imgs/nodeConfig.png)
+
+The node management menu displays the configuration information about the node and its trusted execution cluster.
+
+#### Node configuration
+
+![nodeConfigChange](./_static/imgs/nodeConfigChange.png)
+
+The node administrator can view the configuration information of the node, including the node name, YJS path, and network center node of the node. The node administrator can also modify the configurations.
+
+If the node administrator changes the network center of the node, the node tries to change the connection again, and the entire page is refreshed and reloaded.
+
+#### Node trusted execution cluster list
+
+![nodeUnits](./_static/imgs/nodeUnits.png)
+
+A node administrator can view information about the trusted execution cluster to which a node belongs, including the cluster creator, cluster ID, number of nodes in the cluster, and information about nodes in the cluster.
+
+- - -
+
+#### Node License Configuration
+
+![nodeLicence](./_static/imgs/nodeLicence.png)
+
+You can view the node’s license and expiration time, apply for and upload a license, and save the node UUID.
+
+## Smart Contract online editor
+
+### Users and Accounts
+
+#### Create account
+
+#### Apply for authorization
+
+
+### Create a project
+
+#### The new file
+
+#### Upload a file
+
+### Start the contract
+![contractMode](./_static/imgs/contractMode.png)
+
+#### Normal mode Click the startup button on the left to start the contract in normal mode.
+
+#### Debug mode Click the Debug button on the right to start the contract in debug mode. The current convention returns an example of the return result from the normal mode contract document when the debug mode contract is invoked via executeContract.
+
+### Call the contract
+
+### # Generate document ![genReadme](./_static/imgs/genReadme.png)
+
+After starting the contract, click the “Generate document” button to call the contract and return the Result through @description / @param / @result of each export function, so as to generate the contract Description document.
+
+- - -
+
+## Route access management interface
+
+### Permission application and authorization
+
+### The dashboard
+The dashboard provides an overview of the number of users, contracts, and nodes in the admittance node.
+
+### The overall view
+![dashboard](./_static/imgs/dashboard.jpg) It is divided into four modules. One module is the overview of the number of users, contracts and nodes, and then the detailed statistics of the three quantities.
+
+### The number of nodes
+![node](./_static/imgs/node.jpg) Collect statistics about the current online and offline nodes
+
+### User Type Distribution
+![userAll](./_static/imgs/userAll.jpg) Number of node administrators and admission administrators in the network where the current admitted node resides, and number of nodes to be applied for
+
+### Contract invocation condition
+![contract](./_static/imgs/contract.jpg) Broken line statistics of events, multi-point execution, WS call, and Http call in all contracts in the network where the current access node resides.
+
+### User management
+User management allows login users to view the current user distribution and user active statistics.
+
+### An overview of
+![centerManager](./_static/imgs/centerManager.jpg) The user management page consists of four modules.
+
+
+### User Type Distribution
+Main Statistics on the number of node administrators in the network managed by the center administrator, the number of center administrators, and the number of applied node administrators ![userList](./_static/imgs/userList.jpg)
+
+### Statistics of applications made within 30 days
+![userApplyGraph](./_static/imgs/userApplyGraph.jpg) Calculates the number of node administrators who apply for and are authorized to become node administrators within 30 days
+
+### Current User Information
+![authNodeManager](./_static/imgs/authNodeManager.jpg)
+ * In this text box, you can view the public and private keys of the current user. If other users want to use their public and private keys to log in to the center administrator interface, they can copy their public and private keys to this text box.
+ * After copying your public and private keys, click **Import the public key** to add the public key to the central administrator
+ * The first five public keys are displayed in **Local public key**. If you select your own public key, the role of the selected public key is displayed in **My permission**. If you are a central administrator, you have all the rights of the central administrator.
+ * If you are not a center administrator or node administrator and want to join the network of the current center administrator, you can select the node administrator in the following box and run **Role of certification**.
+
+### List of authorized and unauthorized users
+After applying for the current user information of the center administrator, the center administrator will see the application information with the public key in the form. If you agree, click . If you disagree, click , and the application is invalid.
+![authMan](./_static/imgs/authMan.jpg)
+After authorization, you will see a list of authorized nodes in the **Authorized User Management** table. If the central administrator wants to remove a role of a node administrator, select the role in the authorized user management list and click **delete** to delete the selected role.
+![authMana](./_static/imgs/authMana.jpg)
+
+### Node management
+
+![centerNodePage](./_static/imgs/centerNodePage.png)
+
+Node management is a page on which the Manager manages the Cluster nodes connected to it, visible only to Manager administrators and contract managers. Manager Administrators and contract managers can view node information and manage trusted execution clusters.
+
+### An overview of
+
+![centerNodePreview](./_static/imgs/centerNodePreview.png)
+
+The overview displays the statistics of all nodes managed by the Manager node, including the total number of nodes, the total number of contracts, the total number of subscription events, and the number of trusted execution clusters. The pie chart on the right shows the number of nodes that are Online and Offline respectively.
+
+### The node list
+
+![centerNodeList](./_static/imgs/centerNodeList.png)
+
+The node list shows the node information that the user has the permission to view. (The Manager administrator can view all nodes, and the contract Manager can view the Online node that he is responsible for managing.) This includes the node name, status, number of contracts, number of subscribed events, PeerID for P2P communication between nodes, UDPID for UDP communication between nodes, and the node public key.
+
+### List of trusted execution clusters
+
+![centerNodeUnits](./_static/imgs/centerNodeUnits.png)
+
+The trusted execution cluster list displays the trusted execution cluster information that the user has the permission to view. (The Manager administrator can view all the clusters, and the contract Manager can view the clusters created by himself.) This includes the creator of the cluster, the cluster ID, the number of nodes in the cluster, and information about the nodes in the cluster.
+
+You can click the “Delete” button of the column entry to delete the cluster.
+
+### Create a trusted execution cluster
+
+![centerNodeUnitCreate](./_static/imgs/centerNodeUnitCreate.png)
+
+You can create a new trusted execution cluster by selecting multiple nodes. The nodes that users can select are those they have permission to view, that is, the Manager administrator can select from all nodes, and the contract Manager can select from the Online node that they are responsible for managing). Select and click Submit. A message indicating that the cluster is created successfully will be displayed in the list of trusted execution clusters. The cluster name is selected by the creator and cannot contain double quotation marks. The cluster name is visible when the contract manager selects the cluster.
+
+### Log management
+Log management displays the log information of admission nodes and consists of six modules.
+### An overview of
+![log](./_static/imgs/log.jpg)
+
+### Classified Statistics of Management Operations (2 days)
+![operator](./_static/imgs/operator.jpg) Pie chart of all management operations in the last two days. Management operations are classified into login, log, maintenance, and user operations.
+
+### Daily Statistics of Management Operations (2 days)
+![everyLog](./_static/imgs/everyLog.jpg) Daily operation statistics of all management operations within two days
+
+### Statistics on Contract Operations by Category (2 Days)
+![contractLog](./_static/imgs/contractLog.jpg) Two day contract operation classification statistical pie chart, contract operation is mainly divided into connection class and status update class.
+
+### Daily Statistics of Contract Operation (2 days)
+![contracteveryLog](./_static/imgs/contracteveryLog.jpg) Chart of the broken line of the number of contract operations in two days.
+
+### Manage the operation log list
+![opList](./_static/imgs/opList.jpg) Manage the detailed information list of operation logs. The information includes log time, management operation name, and node public key corresponding to the operation. The default value is two days. You can customize the days for obtaining logs.
+
+### List of contract operation logs
+![contractList](./_static/imgs/contractList.jpg) Detailed information list of contract operation logs. This parameter includes log generation time, contract operation name, and public key of the contract operation node. The default value is two days. You can customize the days for obtaining logs.
+
+### Set up the
+
+The Settings page displays the status of node certificates and configures node certificates
+
+### An overview of
+![set](./_static/imgs/set.jpg)
+
+### Certificate status
+![licence](./_static/imgs/licence.jpg) The certificate status includes the license expiration time and the number of licensed nodes.
+
+### Certificate of configuration
+![plicence](./_static/imgs/plicence.jpg) Configure the certificate module. You can download the node ID file or enter the certificate information for submission.
diff --git a/markdown_trans/markdown_BDWare/4_ContractAPI.md b/markdown_trans/markdown_BDWare/4_ContractAPI.md
new file mode 100644
index 0000000..c40a3c8
--- /dev/null
+++ b/markdown_trans/markdown_BDWare/4_ContractAPI.md
@@ -0,0 +1,4319 @@
+# BDware SDK
+In addition to using the visual smart contract online IDE, users can also use the WebSocket interface, Http interface, Bash interface to start and run the contract.
+
+- - -
+
+## WebSocketSDK download and installation
+The contract SDK provides a javascript version and a Java version of the client.
+
+The download links of Java client are :[java source](./_static/BDWareJavaClient.zip) and [jar](./_static/BDWareConfigTool.zip) refer to Readme.md and test cases in java_Source.
+
+The javascript download link is :[js SDK](./_static/js/createWS.js) Built-in SM2 encryption library link :[sm2 SDK](./_static/js/sm2.js)
+
+### Establish a connection
+Establish a WebSocket connection to the node server.
+
+#### parameter
+
+|field |value|
+| ---------- | ------------------------------------------------------------ |
+| url |If `http` is used, the prefix is `ws://`, for example, `"ws://localhost:1717/SCIDE/SCExecutor"`. If `https` is used, the prefix is `wss://`.|
+| msgHandler |The callback function after receiving the server WebSocket reply can be written by the user, or refer to the example provided below|
+
+#### Sample request
+
+
+```javascript
+var url = "ws://127.0.0.1:1717/SCIDE/SCExecutor";//与Slave节点建立连接
+//var url = "ws://127.0.0.1:1718/NodeCenterWS";//与Manager节点建立连接
+var msgHandler = function(m){
+ console.log("recmsg:");
+ console.log(m);
+};
+var onOpenHandler=undefined;
+wssocket = createWssocket(url,onOpenHandler,msgHandler);
+```
+
+#### Result
+
+
+```
+{
+ receiveSeg: [Function (anonymous)],
+ isSending: false,
+ sendList: [],
+ monitor: [Function (anonymous)],
+ send: [Function (anonymous)],
+ sendNextSegment: [Function (anonymous)],
+ isOpen: [Function (anonymous)]
+}
+```
+
+
+
+### ping
+
+`ping` Server test
+
+#### parameter
+
+|field| 值 |
+| ------ | ---- |
+|action| ping |
+
+#### Sample request
+
+
+```
+var request = {};
+request.action = "ping";
+wssocket.send(JSON.stringify(request));
+```
+
+#### Result
+
+
+```
+{
+ "action":"pong"
+}
+```
+
+### The login
+
+When using the Websocket interface to invoke the interface that requires permission, either to connect to CenterPortal or NodePortal, **The login** must be performed first. The login process has 3 steps:
+
+- The client establishes a connection to the server and sends {“action”:“getSessionID”} (implemented in onOpenHandler).
+- After receiving the request, the server returns a result similar to {“action”:“onGetSessionID”,“session”:”-4959947809200104526_session”} to the client
+- After receiving the onGetSessionID, the client signs the sessionID with the local public and private keys and invokes the login interface
+- The server returns the onLogin result, and the data field returns the role corresponding to the public key.
+
+- - -
+
+## User Role Division
+
+### Role division of contract nodes
+
+In contract node (NodePortal. HTML) is divided into NodeManager/ContractProvider/ContractInstanceManager/ContractUser four types of roles.
+
+| 角色 |instructions|
+| ----------------------- | ------------------------------------------------------------ |
+| NodeManager |The administrator of the node has rights to manage users and configure nodes|
+| ContractProvider |Have the rights to edit contract, develop contract code, run debugging and so on|
+| ContractInstanceManager |Have the rights to start, stop, and configure I/O of the contract instance|
+| ContractUser |Have the rights to view the list of contract instances and call the contract|
+| Anonymous |Anonymous users, can be called the contract, can apply for to become ContractProvider/InstanceManager role|
+
+
+|interface | 说明 |role|
+| ------------------------------- | -------------------- | ----------------------------------------- |
+| changeDumpPeriod | 设置备份周期 |ContractInstanceManager;|
+| createLedger | 创建账本 |ContractInstanceManager;|
+|dumpContract | 手动备份 |ContractInstanceManager;|
+| deleteMemoryFile | 删除镜像 |ContractInstanceManager;|
+| forkContract | 迁移合约 |ContractInstanceManager;|
+| getDumpPeriod | 获取备份周期 |ContractInstanceManager;|
+|killAllContract | 停止全部实例 |ContractInstanceManager;|
+|killContractProcess | 停止某一实例 |ContractInstanceManager;|
+|listMemoryFiles | 列取某一实例的镜像 |ContractInstanceManager;|
+| loadMemory | 加载镜像 |ContractInstanceManager;|
+| queryContractInstanceDOI | 查询合约实例信息 |ContractInstanceManager;|
+| rebuildHashIndex | |ContractInstanceManager;|
+| setPermission | |ContractProvider;ContractInstanceManager;|
+| startContract | Start the contract |ContractInstanceManager;|
+| startContractBatched | 废弃 |ContractInstanceManager;|
+| startContractByYPK | 启动合约 |ContractInstanceManager;|
+|startContractInTempZips | 废弃 |ContractInstanceManager;|
+| startContractP2PTrustfully | 启动合约(集群模式) |ContractInstanceManager;|
+| updateContract | |ContractInstanceManager;|
+| connectTo | 连接合约实例输出流 |ContractInstanceManager;ContractUser;|
+| countContractLogGroupByAction | |ContractInstanceManager;ContractUser;|
+| countContractLogGroupByCategory | |ContractInstanceManager;ContractUser;|
+| getLastLog | 查询日志 |ContractInstanceManager;ContractUser;|
+| getLog | 查询日志 |ContractInstanceManager;ContractUser;|
+| getLogSize | 查询日志 |ContractInstanceManager;ContractUser;|
+| listAllContractProcess | |ContractInstanceManager;ContractUser;|
+|listContractProcess | 查询合约实例列表 |ContractInstanceManager;ContractUser;|
+| listLeakContractProcess | |ContractInstanceManager;ContractUser;|
+| queryContractLogByDate | |ContractInstanceManager;ContractUser;|
+|queryContractLogByKey | |ContractInstanceManager;ContractUser;|
+| queryContractLogByOffset | |ContractInstanceManager;ContractUser;|
+| queryContractLogDetail | |ContractInstanceManager;ContractUser;|
+|queryContractLogSize | |ContractInstanceManager;ContractUser;|
+|queryNodeLogByDate | |ContractInstanceManager;ContractUser;|
+| queryNodeLogByOffset | |ContractInstanceManager;ContractUser;|
+|queryNodeLogSize | |ContractInstanceManager;ContractUser;|
+| rebuildContractLogIndex | |ContractInstanceManager;ContractUser;|
+| rebuildNodeLogIndex | |ContractInstanceManager;ContractUser;|
+| changePublic | |ContractProvider;|
+| createFile | 新建文件 |ContractProvider;|
+| deleteFile | 删除文件 |ContractProvider;|
+| distributeContract | |ContractProvider;|
+|downloadContract | |ContractProvider;|
+| downloadContractFromOtherHost | |ContractProvider;|
+| generateAnnotationSample | |ContractProvider;|
+| generateAppDataAnalysis | |ContractProvider;|
+| generateAppDataSource | |ContractProvider;|
+| generateBDCoinEventProject | |ContractProvider;|
+| generateBDCoinProject | |ContractProvider;|
+| generateBiddingExample | |ContractProvider;|
+| generateCSVProject | |ContractProvider;|
+| generateContractExecutor | |ContractProvider;|
+| generateDAC4BDOA | |ContractProvider;|
+| generateDAC4BDOA_persist | |ContractProvider;|
+| generateDACSample | |ContractProvider;|
+| generateEmptyProject | |ContractProvider;|
+| generateEventPublisher | |ContractProvider;|
+| generateEventSubscriber | |ContractProvider;|
+| generateGasExample | |ContractProvider;|
+| generateHello | |ContractProvider;|
+| generateHttpExample | |ContractProvider;|
+| generateIncentives | |ContractProvider;|
+| generateJSONExample | |ContractProvider;|
+| generateLedgerExample | |ContractProvider;|
+| generateLedgerProject | |ContractProvider;|
+| generateLicenceManager | |ContractProvider;|
+| generateLoggerExample | |ContractProvider;|
+| generateMySQLExample | |ContractProvider;|
+| generateMySQLProject | |ContractProvider;|
+| generatePostgreSQLSample | |ContractProvider;|
+| generateReadme | |ContractProvider;|
+| generateRenderSample | |ContractProvider;|
+| generateRocksDBSample | |ContractProvider;|
+| generateSM2Example | |ContractProvider;|
+| generateStaticResource | |ContractProvider;|
+| generateTFLinux | |ContractProvider;|
+| generategenerateTFMac | |ContractProvider;|
+| getProject | |ContractProvider;|
+| getTemplateList | |ContractProvider;|
+| importContractInstanceCodeByDOI | |ContractProvider;|
+| listFile | |ContractProvider;|
+| listProject | |ContractProvider;|
+| listProjectPermission | |ContractProvider;|
+| listProjects | |ContractProvider;|
+| renameFile | |ContractProvider;|
+| saveFile | |ContractProvider;|
+| startContractAsDebug | |ContractProvider;|
+| uploadFile | |ContractProvider;|
+| compile | |ContractProvider;ContractInstanceManager;|
+| evaluates | |ContractProvider;ContractInstanceManager;|
+| executeContractP2PTrustfully | |ContractProvider;ContractInstanceManager;|
+|getCodeByID | 查询代码 |ContractProvider;ContractInstanceManager;|
+|getControlFlowByFileName | |ContractProvider;ContractInstanceManager;|
+| getGasValue | |ContractProvider;ContractInstanceManager;|
+| listCompiledFiles | |ContractProvider;ContractInstanceManager;|
+| queryContractResourceInfo | |ContractProvider;ContractInstanceManager;|
+| queryFreeResourceInfo | |ContractProvider;ContractInstanceManager;|
+|staticVerifyContract | |ContractProvider;ContractInstanceManager;|
+|writeDyjs | |ContractProvider;ContractInstanceManager;|
+| authNodeRole | 授权角色 |NodeManager;|
+| changeBDledger | 修改账本配置 |NodeManager;|
+| changeIpPort | |NodeManager;|
+| changeNodeCenter | 修改集群地址 |NodeManager;|
+| changeNodeName | |NodeManager;|
+| changeIpPort | |NodeManager;|
+| changeDOIPConfig | |NodeManager;|
+| changeYJSPath | |NodeManager;|
+| countNodeLogGroupByCategory | |NodeManager;|
+| countRole | |NodeManager;|
+| deleteRole | |NodeManager;|
+| downloadUUID | 废弃 |NodeManager;|
+| getEncodedUUID | 废弃 |NodeManager;|
+| getPeerID | |NodeManager;|
+| listAllAuthRole | |NodeManager;|
+| listNodeInfos | |NodeManager;|
+| listUnAuthRole | |NodeManager;|
+| loadConfig | |NodeManager;|
+| loadNodeConfig | |NodeManager;|
+| lockEdit | |NodeManager;|
+| unlockEdit | |NodeManager;|
+| updateConfig | |NodeManager;|
+| uploadLicence | |NodeManager;|
+| applyNodeRole | 申请角色 |Any role|
+|executeContract | Call the contract |Any role|
+| getConnCount | |Any role|
+| getHashAbstractLocally | |Any role|
+| getHashLocally | |Any role|
+| getNodeRoleDeprecated | 查询当前角色 |Any role|
+|getSessionID | |Any role|
+| listAdapters | |Any role|
+| listTheContractProcess | |Any role|
+|login | 登录 |Any role|
+| longStr | |Any role|
+| ping | |Any role|
+|queryDataByHash| |Any role|
+| queryDataByHashLocally | |Any role|
+| queryHashByOffset | |Any role|
+|queryHashByRequestID | |Any role|
+|queryHashSize | |Any role|
+| queryLedgers | |Any role|
+| queryRole | |Any role|
+| queryTransactionByHash | |Any role|
+| sendTransaction | |Any role|
+| setLogStage | |Any role|
+
+### Contract access center role division
+
+There are two roles: CenterManager and NodeManager. CenterManager has permissions on cluster Settings. NodeManager can add and delete nodes.
+
+| 接口 | 说明 | 角色 |
+| ----------------------------- | ------------ | -------------------------- |
+|authNodeManager| | CenterManager; |
+|countActionLogByCategory| | CenterManager; |
+|countCMLogByCategory| | CenterManager; |
+|delete| | CenterManager; |
+|listAllUsers| | CenterManager; |
+|listApplyList| | CenterManager; |
+|listLicence| | CenterManager; |
+|queryActionLog| | CenterManager; |
+|queryCMLog| | CenterManager; |
+|updateLicence| | CenterManager; |
+|addNode| | CenterManager;NodeManager; |
+|changeNCFile| | CenterManager;NodeManager; |
+|changeOtherNC| | CenterManager;NodeManager; |
+|createTrustUnit| 创建可信集群 | CenterManager;NodeManager; |
+|deleteTrustUnit| | CenterManager;NodeManager; |
+|getNCFile| | CenterManager;NodeManager; |
+|getNodeTrustUnits| | CenterManager;NodeManager; |
+|getOtherNC| | CenterManager;NodeManager; |
+|listContractProcess | | CenterManager;NodeManager; |
+|listMultiPointContractProcess| | CenterManager;NodeManager; |
+|listNodes| | CenterManager;NodeManager; |
+|listTrustUnits| | CenterManager;NodeManager; |
+|queryUserStat| | CenterManager;NodeManager; |
+|stopMultiPointContractProcess| | CenterManager;NodeManager; |
+|applyRole| | NodeManager; |
+|executeContract | 调用合约 | 任意角色 |
+|executeContractTrustfully| | 任意角色 |
+|getManagerPubkey| | 任意角色 |
+|getNodeRole| | 任意角色 |
+|getNodeSessionID| | 任意角色 |
+|getRole| | 任意角色 |
+| getSessionID | | 任意角色 |
+| login | 登录 | 任意角色 |
+
+- - -
+
+## Contract node Http interface
+
+`http://xxx.xxx.xxx.xxx:1717/SCIDE/SCManager` is the URL of the server that provides Http interface services( `xxx.xxx.xxx.xxx:1717` is the IP and port number of the BDWare SCIDE operation), the user can add field parameters after the URL, The following functions are complete: `http://xxx.xxx.xxx.xxx:18000/SCIDE/SCManager` is the server that provides Http interface services
+
+URL ( is the IP and port number of BDWare SCIDE operation), the user can complete the following functions by adding field parameters after the URL:
+
+
+### User Management
+
+#### ping
+
+`ping` Server test
+
+##### methods
+
+GET
+
+##### parameter
+
+
+| 字段 | 值 |
+| ------ | ---- |
+|action| ping |
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=ping
+```
+
+##### Result
+
+
+```json
+{"data":"pong"}
+```
+
+
+### Contract code management class
+
+
+#### Download Contract Item
+
+##### methods
+
+GET
+
+##### parameter
+
+
+| 字段 |value|
+| ----------- | ---------------- |
+| action | downloadContract |
+|projectName| 合约项目名 |
+|isPrivate| 是否在私有目录下 |
+| pubKey |The user’s public key|
+| timestamp |The time stamp|
+| sign |The signature|
+
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=downloadContract&projectName=BDCoin&isPrivate=false&pubKey=0480204f4ef341359a5f64fcb11baf9ca2e6706ac20cba3
+8b7ff78aa631e97346086e2d48fac2ba7f5b75ccbd19ebf495c0e6f9934d69e3b083da4d42e46c991e0c2ea8bb45d59f31f46d0ec700fb01f2fdd275
+```
+
+#### Upload a file
+
+##### methods
+
+POST
+
+
+##### parameter
+
+
+| 字段 |value|
+| --------- | ---------------- |
+| path |File upload path|
+| fileName |File name to be uploaded|
+|isPrivate| 是否在私有目录下 |
+| order |The number of packets|
+| count |Total number of packets|
+| timestamp |The time stamp|
+| sign |The signature|
+
+
+##### Sample request
+
+
+
+```
+http://127.0.0.1:18000/SCIDE/Upload?path=/TEST/TEST.yjs&fileName=WechatIMG15.jpeg&isPrivate=true&order=0&count=3&pubKey=0480204f4ef341359a5f64fcb11baf9ca2e6706ac20cba36ca83066870cf2c1d5de6df67e24e68dde7934af9b31d94a6084281db3d32d5ce42ab8f75bf799aca05&sign=dd867469f5adf9986e4ea6215febeae50c7d4c3836d002cf8c17050dfca031fd2595ffa8646e9eeae53150d2cbaea690e27d818eaf5cea3632ee1b69c3307a4b631e97346086e2d48fac2ba7f5b75ccbd19ebf495c0e6f9934d69e3b083da4d42e46c991e0c2ea8bb45d59f31f46d0ec700fb01f2fdd275
+```
+
+##### Result
+
+
+```json
+{"status":"true","data":"success"}
+```
+
+#### Save the contract script
+
+Send a request to the server to save the contract script content locally to the server.
+
+##### methods
+
+GET
+
+
+##### parameter
+
+| 字段 |value|
+| ------- | -------------- |
+| action | writeDyjs |
+|target| 合约脚本文件名 |
+| content |Contract Script Content|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=writeDyjs&target=testyjs.yjs&content=contract%20shortc%7B%0A%09export%20function%20main(arg)%7B%0A%09%09return%20arg.length%3B%09%0A%09%7D%0A%7D
+```
+
+##### Result
+
+
+```json
+{
+ "status": false,
+ "action": "onWriteDyjs",
+ "data": "success"
+}
+```
+
+Subsequent users can start and invoke the contract.
+
+
+
+
+
+
+
+### Contract instance management class
+
+#### Querying the contract process
+
+Sends a request to the server for all the contract processes that have been started on the server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------- |
+| action | listContractProcess |
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=listContractProcess
+```
+
+##### Result
+
+
+```json
+{
+ "status": false,
+ "action": "onListContractProcess",
+ "data": "[\n {\n \"id\": \"-562752842\",\n \"name\": \"shortc\",\n \"port\": \"1626\",\n \"times\": \"0 \",\n \"traffic\": \"32.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n }\n]"
+}
+```
+
+
+#### 启动合约
+
+Send a request to the server to start a contract.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------------------------- |
+| action |startContract|
+| script |Contract script content, need to do URIEncode|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=startContract&script=contract%20shortc%7B%0A%09export%20function%20main(arg)%7B%0A%09%09return%20arg.length%3B%09%0A%09%7D%0A%7D
+```
+
+##### Result
+
+
+```json
+{
+ "data": "{\"status\":\"Success\",\"result\":\"\"}",
+ "action": "onStartContract",
+ "cid": "-562752842",
+ "executeTime": 1187
+}
+```
+
+
+
+#### 调用合约
+
+Send a request to the server to invoke a contract.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------------------- | --------------------------- |
+| action | executeContract |
+|contractID |Contract ID|
+| withDynamicAnalysis |True /false Indicates whether to perform dynamic analysis|
+| operation |The name of the method that calls the contract|
+| arg |Call the parameters of the contract|
+| pubkey |Optionally, caller public key|
+| signature |Optional, sign|
+
+
+Pubkey is the public key of SM2. The calculation method is as follows:
+
+
+```javascript
+//sm2 可从sm2.js中加载获得。
+signature = sm2.doSignature(contractID+"|"+operation+"|"+arg+"|"+pubkey,privateKey);
+```
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=executeContract&contractID=-620602333&operation=main&arg=hhh
+```
+
+##### Result
+
+
+```json
+{
+ "data": "{\"status\":\"Success\",\"result\":\"3\"}",
+ "action": "onExecuteResult",
+ "executeTime": "13"
+}
+```
+
+
+
+
+#### Bulk start contract
+
+Send a request to the server to start a series of contracts that hold the contract script in the server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------- | ------------------------------------ |
+| action |startContractBatched|
+| fileList |List of contract script files (Json array,URLEncode)|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=startContractBatched&fileList=%5B%20%22EventPuber.yjs%22%2C%20%22EventSuber.yjs%22%2C%20%22LicenceManager.yjs%22%20%5D
+
+```
+
+##### Result
+
+
+```json
+{"EventPuber.yjs":"{\"status\":\"Success\",\"result\":\"\"}","LicenceManager.yjs":"{\"status\":\"Success\",\"result\":\"\"}","EventSuber.yjs":"{\"status\":\"Success\",\"result\":\"\"}","action":"onStartContract"}
+
+```
+
+
+
+
+#### Start the Zip package contract
+
+Send a request to the server to start the contract wrapped in the `zip` format in the server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| --------- | ----------------------- |
+| action | startContractInTempZips |
+| owner |Caller’s public key|
+| path |Zip file name of the contract (path and)|
+| signature |Caller signature|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=startContractInTempZips&owner=0475c7b061f32477c1e228dd04143daf58a5574dc3f6b02bd2857cc794eb92bfe98606dc314049e77fd8714f57a5a481cb470cc759e688fe60d40fc87092165e55&path=traceTest.zip&signature=650d3cad50509682937c253d84da99230e8ea1bcfb9b10f6d18f8888c7c4b6b4%2C72231a6daa078a3ce657c0a2ed38251b7db56cf725beaf86780d4c240b19ccc2
+
+```
+
+##### Result
+
+
+```json
+{"data":"verify failed","action":"onStartContract"}
+
+```
+
+
+
+
+#### Get the contract code
+
+Send a request to the server for the script code for an ID contract.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ---------- | ----------- |
+| action | getCodeByID |
+| contractID | 合约ID |
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=getCodeByID&contractID=814046805
+
+```
+
+##### Result
+
+
+```json
+{"status":true,"action":"onCodeResult","data":"@LogType(\"Arg\")\ncontract EventSuberAtCHQ{\n\t\n \texport function init(arg){\n\t\tvar result \u003d YancloudUtil.subscribe(\"EventPuberAt3966\",\"abc\",handler);\n // print(\"Handler:\"+handler);\n \t \n \t\treturn result;\n\t}\n \texport function handler(e){\n var ret \u003d \"ReceiveEvent:\";\n\t\tret+\u003d\"\\n\";\n \tprint(ret);\n \tret+\u003dYancloudUtil.executeContract(\"EventPuberAt3966\",\"notify\",\"success\");\n \tprint(ret);\n return ret;\n\t}\n}\n"}
+
+```
+
+
+
+
+#### Save contract status
+
+Send a request to the server to get the state transition log of the node server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ---------- | ------------ |
+| action | dumpContract |
+| contractID |Contract ID or contract Name=|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/SCManager?action=dumpContract&contractID=counter&pubKey=040461417efe01423ba603f71c689387e8aac4aa2a6f7cddfaf22c1d22c40222f7669a054e7ec2e8533b04ccbc7a0e6655ac4ae4acef81a2b1822ec6cabcaf6c1f&sign=3045022004ffd1346b936196f5b13953d2f3e11823a0d0a2d2f6fecea258cef8e20d99c0022100bbc219ed1f56799ba28a763b9e9e47063164e7ceecfbfa752de42f44551ffb83
+
+```
+
+##### Result
+
+
+```json
+{"data":"success","size":"3.76 KB","time":"0.03s"}
+
+```
+
+
+
+
+#### Gets a list of contracted memory files
+
+Send a request to the server for a list of all memory files in a subfolder.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action | listMemoryFiles |
+| contractID |Contract Id or contract Name|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/SCManager?action=listMemoryFiles&contractID=-247468535&pubKey=040461417efe01423ba603f71c689387e8aac4aa2a6f7cddfaf22c1d22c40222f7669a054e7ec2e8533b04ccbc7a0e6655ac4ae4acef81a2b1822ec6cabcaf6c1f&sign=3045022075c7268e888b0efdef167a3f4dfc6589d771c6be41b3c0a1dc12d057e811f395022100d44f460d0cc3643e169ef08231e75a1e895646c53295c0ef1d15c3b462a53d6b
+
+```
+
+##### Result
+
+
+```json
+{"data":["2020-09-23.18:40:38","2020-09-24.16:03:41","2020-09-24.16:58:39","2020-09-24.18:25:47","2020-09-24.18:32:37","2020-09-24.20:54:41","2020-09-24.20:57:39","2020-09-24.21:31:07","2020-09-24.21:32:09","2020-09-24.21:36:11","2020-09-28.15:29:15","2020-09-28.20:28:29","2020-09-28.20:39:46","2020-09-28.21:45:31","2020-09-28.21:49:18","2020-09-28.22:27:34","2020-09-28.22:31:09","2020-09-28.22:32:49","2020-10-07.16:51:06","2020-10-07.16:51:23","2020-10-25.21:09:10","2020-12-14.19:06:53","2021-02-02.10:28:56","2021-02-02.10:31:13"],"action":"onListMemoryFiles"}
+
+```
+
+#### To stop the contract
+
+Send a request to the server to stop a contract.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ---------- | ------------------- |
+| action | killContractProcess |
+| id |Contract ID|
+| *requestID |Request ID, String type|
+
+`*` Indicates that the value is optional
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=killContractProcess&id=-1759263594
+
+```
+
+##### Result
+
+
+```json
+{"status":false,"action":"onListContractProcess","data":"[\n {\n \"id\": \"-65051856\",\n \"name\": \"EventSuber\",\n \"port\": \"1631\",\n \"times\": \"0 \",\n \"traffic\": \"32.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n },\n {\n \"id\": \"814046805\",\n \"name\": \"EventSuberAtCHQ\",\n \"port\": \"1630\",\n \"times\": \"0 \",\n \"traffic\": \"32.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n },\n {\n \"id\": \"2023975189\",\n \"name\": \"LicenceService\",\n \"port\": \"1632\",\n \"times\": \"0 \",\n \"traffic\": \"32.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n },\n {\n \"id\": \"-620602333\",\n \"name\": \"shortc\",\n \"port\": \"1627\",\n \"times\": \"0 \",\n \"traffic\": \"0.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n }\n]"}
+
+```
+
+
+
+
+#### Termination of all contracts
+
+Send a request to the server to stop all contracts started on the server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action | killAllContract |
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=killAllContract
+
+```
+
+##### Result
+
+
+```json
+{"status":false,"action":"onKillAllContract","data":"Kill:7357,7541,7548,7555,7584,7585,7591,7598,7609,7612,8440,8442,8444,8521,"}
+
+```
+
+#### Static analysis contract
+
+Send a request to the server to statically analyze the contract script.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ---------- | -------------------- |
+| action | staticVerifyContract |
+| contractid |Contract ID|
+| script |Request ID, String type|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=staticVerifyContract&contractid=943728900&script=contract%20shortc%7B%0A%09export%20function%20main(arg)%7B%0A%09%09return%20arg.length%3B%09%0A%09%7D%0A%7D&path=static.yjs
+
+```
+
+##### Result
+
+
+```json
+{"data":"{\"status\":\"Success\",\"result\":\"{\\\"main\\\":\\\"Ret:arg \\\"}\"}","action":"onExecuteResult","cid":"943728900","executeTime":54}
+
+```
+
+
+
+#### Gets the contract static analysis flow
+
+Send a request to the server for a static analysis Control Flow of a contract.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------------ |
+| action | getControlFlowByFileName |
+| path |Contract ID|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=getControlFlowByFileName&path=EventSuber.yjs
+
+```
+
+##### Result
+
+
+```json
+{"init":{"blocks":[{"type":"Continuous","name":"B0","stmts":["\u003dL0\u003d","aload 0","invokevirtual wrp/jdk/nashorn/internal/runtime/ScriptFunction getScope ()Lwrp/jdk/nashorn/internal/runtime/ScriptObject;"],"original":""},{"type":"Continuous","name":"B1","stmts":["\u003dL1\u003d","astore 4"],"original":""},{"type":"Continuous","name":"B2","stmts":["\u003dL2\u003d","aload 4","invokedynamic dyn:getProp|getElem|getMethod:YancloudUtil (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 5 "],"original":"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"},{"type":"Continuous","name":"B3","stmts":["dup","invokedynamic dyn:getMethod|getProp|getElem:subscribe (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 0 "],"original":"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"},{"type":"Continuous","name":"B4","stmts":["swap","ldc XiaomiSmartHomeAtPKU","ldc onAirPurifierModeChange","aload 4","invokedynamic dyn:getProp|getElem|getMethod:handler (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 5 "],"original":"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"},{"type":"Continuous","name":"B5","stmts":["invokedynamic dyn:call:\\\u003dYancloudUtil\\,subscribe (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 0 "],"original":"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"},{"type":"Continuous","name":"B6","stmts":["\u003dL3\u003d","astore 5"],"original":"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"},{"type":"Continuous","name":"B7","stmts":["\u003dL4\u003d","aload 5","areturn"],"original":" \t\treturn result;"},{"type":"Continuous","name":"B8","stmts":["\u003dL5\u003d"],"original":" \t\treturn result;"},{"type":"Continuous","name":"B9","stmts":["\u003dL6\u003d"],"original":" \t\treturn result;"}],"edges":[{"from":"B0","to":"B1","label":{"label":"e"}},{"from":"B1","to":"B2","label":{"label":"e"}},{"from":"B2","to":"B3","label":{"label":"e"}},{"from":"B3","to":"B4","label":{"label":"e"}},{"from":"B4","to":"B5","label":{"label":"e"}},{"from":"B5","to":"B6","label":{"label":"e"}},{"from":"B6","to":"B7","label":{"label":"e"}},{"from":"B7","to":"B9","label":{"label":"e"}}]},"handler":{"blocks":[{"type":"Continuous","name":"B0","stmts":["\u003dL0\u003d","aload 0","invokevirtual wrp/jdk/nashorn/internal/runtime/ScriptFunction getScope ()Lwrp/jdk/nashorn/internal/runtime/ScriptObject;"],"original":""},{"type":"Continuous","name":"B1","stmts":["\u003dL1\u003d","astore 4"],"original":""},{"type":"Continuous","name":"B2","stmts":["\u003dL2\u003d","ldc ReceiveEvent:","aload 2","invokedynamic dyn:getProp|getElem|getMethod:content (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 0 "],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B3","stmts":["invokestatic wrp/jdk/nashorn/internal/runtime/ScriptRuntime ADD (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B4","stmts":["ldc ","invokestatic wrp/jdk/nashorn/internal/runtime/ScriptRuntime ADD (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B5","stmts":["aload 2","invokedynamic dyn:getProp|getElem|getMethod:type (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 0 "],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B6","stmts":["invokestatic wrp/jdk/nashorn/internal/runtime/ScriptRuntime ADD (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B7","stmts":["\u003dL3\u003d","astore 5"],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B8","stmts":["\u003dL4\u003d","aload 4","invokedynamic dyn:getMethod|getProp|getElem:print (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 5 "],"original":" \tprint(ret);"},{"type":"Continuous","name":"B9","stmts":["getstatic wrp/jdk/nashorn/internal/runtime/ScriptRuntime UNDEFINED Lwrp/jdk/nashorn/internal/runtime/Undefined;","aload 5","invokedynamic dyn:call:print (Ljava/lang/Object;Lwrp/jdk/nashorn/internal/runtime/Undefined;Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 5 "],"original":" \tprint(ret);"},{"type":"Continuous","name":"B10","stmts":["pop"],"original":" \tprint(ret);"},{"type":"Continuous","name":"B11","stmts":["\u003dL5\u003d","aload 5","areturn"],"original":" return ret;"},{"type":"Continuous","name":"B12","stmts":["\u003dL6\u003d"],"original":" return ret;"},{"type":"Continuous","name":"B13","stmts":["\u003dL7\u003d"],"original":" return ret;"}],"edges":[{"from":"B0","to":"B1","label":{"label":"e"}},{"from":"B1","to":"B2","label":{"label":"e"}},{"from":"B2","to":"B3","label":{"label":"e"}},{"from":"B3","to":"B4","label":{"label":"e"}},{"from":"B4","to":"B5","label":{"label":"e"}},{"from":"B5","to":"B6","label":{"label":"e"}},{"from":"B6","to":"B7","label":{"label":"e"}},{"from":"B7","to":"B8","label":{"label":"e"}},{"from":"B8","to":"B9","label":{"label":"e"}},{"from":"B9","to":"B10","label":{"label":"e"}},{"from":"B10","to":"B11","label":{"label":"e"}},{"from":"B11","to":"B13","label":{"label":"e"}}]}}
+
+```
+
+### Log Viewing Class
+
+#### Contract log — Number of queries
+
+##### methods
+
+GET
+
+WhencontractNameis empty or not passed in, the number of items queried for the entire contract
+
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ------------------------ |
+| action | queryContractLogSize |
+|contractName| 字符串,非必须,合约名称 |
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogSize&contractName=NanningDataSource
+```
+
+##### Result
+
+
+```json
+{
+ "size": 12,
+ "action": "onQueryContractLogSize",
+ "status": "success"
+}
+
+```
+
+#### Contract log — Query by date
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ------------------------------------- |
+| action |queryContractLogByDate|
+| start |Long, must, start time|
+| end |Long, not required. If end is not used, the current time is default|
+| contractName |String, not required, contract name|
+
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogByDate&start=1597296300272&end=1597296305747
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "getMainFrame",
+ "costTime": "2493",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296300272,
+ "key": "-8590335427581967208"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "loadResource",
+ "costTime": "732",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296301030,
+ "key": "849660532962309239"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "loadResource",
+ "costTime": "4580",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305745,
+ "key": "-8003529429500512736"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "loadResource",
+ "costTime": "4551",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305746,
+ "key": "7604666709899222357"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "loadResource",
+ "costTime": "6",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305751,
+ "key": "-7561786202695627022"
+ }
+ ],
+ "action": "onQueryRecentContractLog"
+}
+```
+
+#### Contract log — Queried by offset
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------------ | --------------------------------------------- |
+| action |queryContractLogByOffset|
+| count |Long: required. Gets the number of logs|
+| offset |Long, not required. If there is no offset, the latest count bar is returned by default|
+| contractName |String, not required, contract name|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogByOffset&count=5&contractName=NanningDataSource
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "loadResource",
+ "costTime": "4",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305842,
+ "key": "-2390672423847654148"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "isOwner",
+ "costTime": "4",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305868,
+ "key": "6056586201629372511"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "getApplyList",
+ "costTime": "6",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305893,
+ "key": "3882409580676458151"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "getAcceptList",
+ "costTime": "4",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305908,
+ "key": "-3437513873417136535"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "analysisByIndustry",
+ "costTime": "6",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "signature": "4c2cef1756b2b591ab7eead19d67331e2294c7ba765c72298733c306ada0b6e84afbb6c7b9dba48b9843236ebe67aecb4af09fe58a51eef0e2e89b9f3e5cad02",
+ "arg": " {\"year\":2018,\"category\":\"工业\",\"indexType\":\"营业额\"}",
+ "date": 1597296314654,
+ "key": "203156239086062402"
+ }
+ ],
+ "action": "onQueryRecentContractLog"
+}
+```
+
+#### Contract log — Query by key
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------------------- |
+| action | queryContractLogByKey |
+| key |Long: Must, the key corresponding to the log|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogByKey&key=203156239086062402
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "analysisByIndustry",
+ "costTime": "6",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "signature": "4c2cef1756b2b591ab7eead19d67331e2294c7ba765c72298733c306ada0b6e84afbb6c7b9dba48b9843236ebe67aecb4af09fe58a51eef0e2e89b9f3e5cad02",
+ "arg": " {\"year\":2018,\"category\":\"工业\",\"indexType\":\"营业额\"}",
+ "date": 1597296314654
+ },
+ "action": "onQueryContractLogByKey"
+}
+```
+
+#### Contract log — Counts the number of calls by time period
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------- | -------------------------------------------------------- |
+| action |countContractLogGroupByCategory|
+| start |Long, must, start time|
+| end |Not required. End time. Default is current|
+| interval |Long, not necessary, statistical interval|
+| category |If not required, the contract name is concatenated with a comma, and all contract calls are counted when not passed in|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=countContractLogGroupByCategory&start=1596758400000&interval=86400000
+```
+
+##### Returns the result
+
+
+```json
+{
+ "start": 1596758400000,
+ "interval": 86400000,
+ "action": "onCountContractLogGroupByCategory",
+ "data": [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 43,
+ 14
+ ]
+}
+```
+
+#### Ledger log — Number of queries
+
+Query the number of logs recorded in the ledger of the node
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ---------------- |
+| action | queryHashSize |
+| contractName | 非必须,合约名称 |
+
+
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryHashSize&contractName=NanningDataSource
+```
+
+##### Returns the result
+
+
+```json
+{
+ "count": "2",
+ "action": "onQueryHashSize"
+}
+```
+
+
+#### Ledger log — Query by offset
+
+Query the hash list of x logs that pass this node to the ledger
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ----------------------------------------------------------- |
+| action |queryHashByOffset|
+| count |Integer, mandatory, indicates the number of items|
+| offset |An integer, not required, representing an offset. If offset is not passed, the latest count bar is returned by default|
+| contractName |A character string, not required, indicating the contract name|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryHashByOffset&count=1&contractName=NanningDataSource
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [
+ {
+ "hash": "3a6c60621907146b77146c1f2d48700e47520173",
+ "date": 1597296314658
+ }
+ ],
+ "action": "onQueryHash",
+ "status": "success"
+}
+```
+
+#### Ledger log — Query details based on hash
+
+Query log content based on hash
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------------------- |
+| action | queryDataByHash |
+| hash |String, available by queryHashByOffset|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryDataByHash&count=1&contractName=NanningDataSource&hash=3a6c60621907146b77146c1f2d48700e47520173
+```
+
+##### Returns the result
+
+
+```json
+{
+ "from": "0x3034643139323433323966373263656431343866",
+ "to": "0x65786563757465436f6e74726163740000000000",
+ "data": "1597296314655 --> {\"extraGas\":\"0\",\"totalGas\":\"0\",\"executionGas\":\"0\",\"signature\":\"4c2cef1756b2b591ab7eead19d67331e2294c7ba765c72298733c306ada0b6e84afbb6c7b9dba48b9843236ebe67aecb4af09fe58a51eef0e2e89b9f3e5cad02\",\"costTime\":\"6\",\"arg\":\" {\\\\\\\"year\\\\\\\":2018,\\\\\\\"category\\\\\\\":\\\\\\\"工业\\\\\\\",\\\\\\\"indexType\\\\\\\":\\\\\\\"营业额\\\\\\\"}\",\"contractID\":\"-1382208250\",\"action\":\"analysisByIndustry\",\"pubKey\":\"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd\"}",
+ "requestID": "1597296314629_6067",
+ "action": "onQueryDataByHash"
+}
+```
+
+#### Ledger log — Queries the Hash according to requestID
+
+Query log contents by requestID. The developer must ensure the uniqueness of requestID
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| --------- | ------------------------ |
+| action | queryHashByRequestID |
+| requestID |A string that is generated when the call is made|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=queryHashByRequestID&requestID=0987654321ab
+```
+
+#### Node Logs — Number of queries
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------- | ---------------------------- |
+| action | queryNodeLogSize |
+| category |Not required, not passed in to query the full situation|
+
+The options include ping, startContract, and saveFile.
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogSize
+
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogSize&category=login
+```
+
+##### Returns the result
+
+
+```json
+{
+ "size": 177,
+ "action": "onQueryNodeLogSize",
+ "status": "success"
+}
+```
+
+#### Node logs — Query by date
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------- | ---------------------------- |
+| action | queryNodeLogByDate |
+| start |Long, must, start date|
+| end |Long, not necessary|
+| category |Not required, not passed in to query the full situation|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogByDate&start=1597376006441
+
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogByDate&start=1596758400000&category=login
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [
+ {
+ "action": "listAllAuthRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006438,
+ "key": "387355870552374748"
+ },
+ {
+ "action": "listUnAuthRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006441,
+ "key": "4772693258708933626"
+ },
+ {
+ "action": "countRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006444,
+ "key": "-6425375229108830572"
+ },
+ {
+ "action": "loadNodeConfig",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006448,
+ "key": "-6602401010405792959"
+ },
+ {
+ "action": "getPeerID",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006449,
+ "key": "-7006776427870311552"
+ }
+ ],
+ "action": "onQueryNodeLogByDate"
+}
+```
+
+#### Node log — Query by offset
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------------ | --------------------------------------------- |
+| action |queryNodeLogByOffset|
+| count |Long: required. Gets the number of logs|
+| offset |Long, not required. If there is no offset, the latest count bar is returned by default|
+| contractName |String, not required, contract name|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogByOffset&count=5
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [
+ {
+ "action": "listAllAuthRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006438,
+ "key": "387355870552374748"
+ },
+ {
+ "action": "listUnAuthRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006441,
+ "key": "4772693258708933626"
+ },
+ {
+ "action": "countRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006444,
+ "key": "-6425375229108830572"
+ },
+ {
+ "action": "loadNodeConfig",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006448,
+ "key": "-6602401010405792959"
+ },
+ {
+ "action": "getPeerID",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006449,
+ "key": "-7006776427870311552"
+ }
+ ],
+ "action": "onQueryNodeLogByOffset"
+}
+```
+
+#### Node Log — Collects statistics on invocation times by time range
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------- | -------------------------------------------------- |
+| action |countLogGroupByCategory|
+| start |Long, must, start time|
+| end |Not required. End time. Default is current|
+| interval |Long, not necessary, statistical interval|
+| category |Action is concatenated with commas if not required, and counts all calls when not passed|
+
+In the category, Action is the action collection of the NodePortal interface. The value can be ping, startContract, and saveFile.
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=countNodeLogGroupByCategory&start=1596758400000&interval=86400000
+
+http://127.0.0.1:18000/SCIDE/CMManager?action=countNodeLogGroupByCategory&start=1596758400000&interval=86400000&category=ping,startContract
+```
+
+##### Returns the result
+
+
+```json
+{
+ "start": 1596758400000,
+ "interval": 86400000,
+ "action": "onCountNodeLogGroupByCategory",
+ "data": [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 912,
+ 761
+ ]
+}
+```
+
+
+
+
+
+#### Example Output historical logs
+
+Send a request to the server for the TimeTravel log of the contract on the node server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------ |
+| action |printTimeTravelLog|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=printTimeTravelLog
+
+```
+
+##### Result
+
+
+```json
+{"status":false,"data":"[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps/aa\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps/aa_1572335939893.dyjs\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps/memoryDumps\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps/.\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps/.\n"}
+
+```
+
+
+
+
+
+#### Example Output node transfer logs
+
+Send a request to the server to get the state transition log of the node server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------- |
+| action |printTransferLog|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=printTransferLog
+
+```
+
+##### Result
+
+
+```json
+{"status":false,"data":""}
+
+```
+
+
+
+### Template generation class
+
+
+
+
+## The ledger Http interface
+
+``` {.yaml}
+type: google.api.Service
+config_version: 3
+
+http:
+ rules:
+ - selector: bdware.bdledger.api.Node.ClientVersion
+ get: /v0/node/version
+ - selector: bdware.bdledger.api.Ledger.CreateLedger
+ post: /v0/ledgers
+ body: "*"
+ - selector: bdware.bdledger.api.Ledger.GetLedgers
+ get: /v0/ledgers
+ - selector: bdware.bdledger.api.Ledger.SendTransaction
+ post: /v0/ledgers/{ledger}/transactions
+ body: "*"
+ - selector: bdware.bdledger.api.Query.GetBlockByHash
+ get: /v0/ledgers/{ledger}/block
+ - selector: bdware.bdledger.api.Query.GetBlocks
+ post: /v0/ledgers/{ledger}/blocks/query
+ body: "*"
+ - selector: bdware.bdledger.api.Query.CountBlocks
+ post: /v0/ledgers/{ledger}/blocks/count
+ body: "*"
+ - selector: bdware.bdledger.api.Query.GetRecentBlocks
+ get: /v0/ledgers/{ledger}/blocks/recent
+ - selector: bdware.bdledger.api.Query.GetTransactionByHash
+ get: /v0/ledgers/{ledger}/transaction
+ - selector: bdware.bdledger.api.Query.GetTransactionByBlockHashAndIndex
+ get: /v0/ledgers/{ledger}/block/transaction
+ - selector: bdware.bdledger.api.Query.GetTransactions
+ post: /v0/ledgers/{ledger}/transactions/query
+ body: "*"
+ - selector: bdware.bdledger.api.Query.CountTransactions
+ post: /v0/ledgers/{ledger}/transactions/count
+ body: "*"
+```
+
+> **Note**
+>
+> Request/Response data of **bytes** type should/will be encoded with
+> [Base64](https://tools.ietf.org/html/rfc4648#section-4).
+
+> **Note**
+>
+> When using hash strings in URL, they need to be encoded with
+> [encodeURIComponent](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent).
+
+### Ledger information class
+
+#### Node.ClientVersion{#_node_clientversion}
+
+Get BDLedger node version
+
+ GET http://{{IP}}:{{PORT}}/v0/node/version
+
+##### Return the sample
+
+
+``` {.json}
+{
+ "version": "dev-210119.a88bf4eb"
+}
+```
+#### Ledger.CreateLedger{#_ledger_createledger}
+
+Create a new ledger
+
+ POST http://{{IP}}:{{PORT}}/v0/ledgers
+
+##### Sample request
+
+
+``` {.json}
+{
+ "name": "test"
+}
+```
+
+##### Return the sample
+
+
+``` {.json}
+{
+ "ok": true
+}
+```
+
+#### Ledger.GetLedgers{#_ledger_getledgers}
+
+Get all ledgers
+
+ GET http://{{IP}}:{{PORT}}/v0/ledgers
+
+##### Return the sample
+
+
+``` {.json}
+{
+ "ledgers": [
+ "default",
+ "test"
+ ]
+}
+```
+
+#### Ledger.SendTransaction{#_ledger_sendtransaction}
+
+Send a new transaction
+
+ POST http://{{IP}}:{{PORT}}/v0/ledgers/test/transactions
+
+##### Sample request
+
+
+``` {.json}
+{
+ "transaction": {
+ "type": 0,
+ "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=",
+ "nonce": 52,
+ "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM="
+ }
+}
+```
+
+##### Return the sample
+
+
+``` {.json}
+{
+ "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE="
+}
+```
+
+### Query classes
+
+#### Query.GetBlockByHash{#_query_getblockbyhash}
+
+Get a block identified by its hash
+
+ GET http://{{IP}}:{{PORT}}/v0/ledgers/test/block?hash=LSKr%2BK079Ax%2BrKdlyYN5ze2YGzo%3D
+
+**hash** has to be encoded with[encodeURIComponent](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent)
+
+##### Return the sample
+
+
+``` {.json}
+{
+ "block": {
+ "hash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=",
+ "creator": "",
+ "nonce": "0",
+ "parentHashes": [
+ "fLX5pMY8M1qSAGZdKT1rWBkdEMo=",
+ "rk0DWMaUpRG82yVX+cFhbfhPFdw=",
+ "3XkwkuMBearq8uavN76Te7Zdpl8="
+ ],
+ "witnesses": [],
+ "timestamp": "1611038043",
+ "size": "0",
+ "transactionCount": 1,
+ "transactionsRoot": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "transactions": [
+ {
+ "blockHash": "",
+ "blockTimestamp": "0",
+ "index": 0,
+ "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "type": "RECORD",
+ "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=",
+ "nonce": "0",
+ "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=",
+ "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM="
+ }
+ ],
+ "transactionHashes": [
+ "VQBeA5Ee0Y5hqEileoQuYMHbOSE="
+ ]
+ }
+}
+```
+
+#### Query.GetBlocks{#_query_getblocks}
+
+Get blocks in a timestamp range
+
+ POST http://{{IP}}:{{PORT}}/v0/ledgers/test/blocks/query
+
+
+``` {.protobuf}
+enum IncludeTransactions {
+ NONE = 0; // Don't include transaction data
+ HASH = 1; // Include transactions hashes
+ FULL = 2; // Include full transactions
+}
+```
+
+Requirement: asciimath: \ [\ “start \ _timestamp \” ⇐ \ ’end \ _timestamp \ \]”
+
+If only **end\_timestamp** is not specified, orasciimath:\[\“end\_timestamp\”-\“start\_timestamp\”\>\“query.maxDuration\”\],then **end\_timestamp** will be set toasciimath:\[\“start\_timestamp\”+\“query.maxDuration\”\].
+
+If only **start\_timestamp** is not specified, then **start\_timestamp**will be set to asciimath:\[\“end\_timestamp\”-\“query.maxDuration\”\].
+
+In all cases, **start\_timestamp** will never be earlier than thegenesis block’s timestamp, and **end\_timestamp** will never be laterthan the current timestamp when the node process the query request.
+
+##### Sample request
+
+``` {.json}
+{
+ "start_timestamp": 1611038000,
+ "end_timestamp": 1611039000,
+ "include_transactions": 0
+}
+```
+
+##### Return the sample
+
+
+``` {.json}
+{
+ "blocks": [
+ {
+ "hash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=",
+ "creator": "",
+ "nonce": "0",
+ "parentHashes": [
+ "fLX5pMY8M1qSAGZdKT1rWBkdEMo=",
+ "rk0DWMaUpRG82yVX+cFhbfhPFdw=",
+ "3XkwkuMBearq8uavN76Te7Zdpl8="
+ ],
+ "witnesses": [],
+ "timestamp": "1611038043",
+ "size": "0",
+ "transactionCount": 1,
+ "transactionsRoot": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "transactions": [],
+ "transactionHashes": []
+ }
+ ],
+ "startTimestamp": "1611038043",
+ "endTimestamp": "1611038043"
+}
+```
+
+##### Request Example 2
+
+
+``` {.json}
+{
+ "start_timestamp": 1611038000,
+ "end_timestamp": 1611039000,
+ "include_transactions": 1
+}
+```
+
+##### Return to Example 2
+
+
+``` {.json}
+{
+ "blocks": [
+ {
+ "hash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=",
+ "creator": "",
+ "nonce": "0",
+ "parentHashes": [
+ "fLX5pMY8M1qSAGZdKT1rWBkdEMo=",
+ "rk0DWMaUpRG82yVX+cFhbfhPFdw=",
+ "3XkwkuMBearq8uavN76Te7Zdpl8="
+ ],
+ "witnesses": [],
+ "timestamp": "1611038043",
+ "size": "0",
+ "transactionCount": 1,
+ "transactionsRoot": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "transactions": [],
+ "transactionHashes": [
+ "VQBeA5Ee0Y5hqEileoQuYMHbOSE="
+ ]
+ }
+ ],
+ "startTimestamp": "1611038043",
+ "endTimestamp": "1611038043"
+}
+```
+
+**Request body 3.**
+
+
+``` {.json}
+{
+ "start_timestamp": 1611038000,
+ "end_timestamp": 1611039000,
+ "include_transactions": 2
+}
+```
+
+**Response 3.**
+
+
+``` {.json}
+{
+ "blocks": [
+ {
+ "hash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=",
+ "creator": "",
+ "nonce": "0",
+ "parentHashes": [
+ "fLX5pMY8M1qSAGZdKT1rWBkdEMo=",
+ "rk0DWMaUpRG82yVX+cFhbfhPFdw=",
+ "3XkwkuMBearq8uavN76Te7Zdpl8="
+ ],
+ "witnesses": [],
+ "timestamp": "1611038043",
+ "size": "0",
+ "transactionCount": 1,
+ "transactionsRoot": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "transactions": [
+ {
+ "blockHash": "",
+ "blockTimestamp": "0",
+ "index": 0,
+ "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "type": "RECORD",
+ "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=",
+ "nonce": "0",
+ "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=",
+ "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM="
+ }
+ ],
+ "transactionHashes": [
+ "VQBeA5Ee0Y5hqEileoQuYMHbOSE="
+ ]
+ }
+ ],
+ "startTimestamp": "1611038043",
+ "endTimestamp": "1611038043"
+}
+```
+
+#### Query.CountBlocks{#_query_countblocks}
+
+Count all blocks in a ledger, or blocks in a timestamp range
+
+ POST http://{{IP}}:{{PORT}}/v0/ledgers/test/blocks/count
+
+Requirement: asciimath: \ [\ “start \ _timestamp \” ⇐ \ ’end \ _timestamp \ \]”
+
+If neither **start\_timestamp** nor **end\_timestamp** is specified,then count all blocks in the specified ledger.
+
+If only **end\_timestamp** is not specified, then count all blocks withtimestamps later than **start\_timestamp**.
+
+If only **start\_timestamp** is not specified, then count all blockswith timestamps earlier than **end\_timestamp**.
+
+In all cases, **start\_timestamp** will never be earlier than thegenesis block’s timestamp, and **end\_timestamp** will never be laterthan the current timestamp when the node process the query request.
+
+##### Sample request
+
+
+``` {.json}
+{}
+```
+
+##### Return the sample
+
+
+``` {.json}
+{
+ "count": "5",
+ "startTimestamp": "0",
+ "endTimestamp": "1611039957"
+}
+```
+
+##### Request Example 2
+
+
+``` {.json}
+{
+ "start_timestamp": 1611038000,
+ "end_timestamp": 1611039000
+}
+```
+
+##### Return to Example 2
+
+
+``` {.json}
+{
+ "count": "1",
+ "startTimestamp": "1611038000",
+ "endTimestamp": "1611039000"
+}
+```
+
+#### Query.GetRecentBlocks{#_query_getrecentblocks}
+
+Get recent **count** blocks (Only support IncludeTransactions=NONE fornow)
+
+ GET http://{{IP}}:{{PORT}}/v0/ledgers/test/blocks/recent?count=2
+
+##### Return the sample
+
+
+``` {.json}
+{
+ "blocks": [
+ {
+ "hash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=",
+ "creator": "",
+ "nonce": "0",
+ "parentHashes": [
+ "fLX5pMY8M1qSAGZdKT1rWBkdEMo=",
+ "rk0DWMaUpRG82yVX+cFhbfhPFdw=",
+ "3XkwkuMBearq8uavN76Te7Zdpl8="
+ ],
+ "witnesses": [],
+ "timestamp": "1611038043",
+ "size": "0",
+ "transactionCount": 1,
+ "transactionsRoot": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "transactions": [],
+ "transactionHashes": []
+ },
+ {
+ "hash": "rk0DWMaUpRG82yVX+cFhbfhPFdw=",
+ "creator": "",
+ "nonce": "0",
+ "parentHashes": [
+ "fLX5pMY8M1qSAGZdKT1rWBkdEMo=",
+ "3XkwkuMBearq8uavN76Te7Zdpl8=",
+ "8pZPR74OALIbps5XFb4dL/s0j0M="
+ ],
+ "witnesses": [],
+ "timestamp": "1610968019",
+ "size": "0",
+ "transactionCount": 1,
+ "transactionsRoot": "LuxttCm/pSHVMOKF0sJExk+DJXc=",
+ "transactions": [],
+ "transactionHashes": []
+ }
+ ],
+ "startTimestamp": "1610968019",
+ "endTimestamp": "1611038043"
+}
+```
+
+#### Query.GetTransactionByHash{#_query_gettransactionbyhash}
+
+Get a transaction identified by its hash
+
+ GET http://{{IP}}:{{PORT}}/v0/ledgers/test/transaction?hash=VQBeA5Ee0Y5hqEileoQuYMHbOSE%3D
+
+**hash** has to be encoded with[encodeURIComponent](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent)
+
+#### Return the sample
+
+
+``` {.json}
+{
+ "transaction": {
+ "blockHash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=",
+ "blockTimestamp": "1611038043",
+ "index": 0,
+ "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "type": "RECORD",
+ "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=",
+ "nonce": "0",
+ "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=",
+ "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM="
+ }
+}
+```
+
+#### Query.GetTransactionByBlockHashAndIndex{#_query_gettransactionbyblockhashandindex}
+
+Get a transaction identified by hash of the block it belongs to and itsindex inside the block
+
+ GET http://{{IP}}:{{PORT}}/v0/ledgers/test/block/transaction?blockHash=LSKr%2BK079Ax%2BrKdlyYN5ze2YGzo%3D&index=0
+
+**blockHash** has to be encoded with[encodeURIComponent](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent)
+
+#### Return the sample
+
+
+``` {.json}
+{
+ "transaction": {
+ "blockHash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=",
+ "blockTimestamp": "1611038043",
+ "index": 0,
+ "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "type": "RECORD",
+ "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=",
+ "nonce": "0",
+ "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=",
+ "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM="
+ }
+}
+```
+
+#### Query.GetTransactions{#_query_gettransactions}
+
+Get transactions in a timestamp range
+
+ POST http://{{IP}}:{{PORT}}/v0/ledgers/test/transactions/query
+
+**start\_timestamp** and **end\_timestamp** follow the same requirementsand rules as in [???](#Query.GetBlocks).
+
+##### Sample request
+
+``` {.json}
+{
+ "start_timestamp": 1611038000,
+ "end_timestamp": 1611039000
+}
+```
+
+##### Return the sample
+
+
+``` {.json}
+{
+ "transactions": [
+ {
+ "blockHash": "",
+ "blockTimestamp": "0",
+ "index": 0,
+ "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "type": "RECORD",
+ "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=",
+ "nonce": "0",
+ "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=",
+ "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM="
+ }
+ ],
+ "startTimestamp": "1611038043",
+ "endTimestamp": "1611038043"
+}
+```
+
+#### Query.CountTransactions{#_query_counttransactions}
+
+Count all transactions in a ledger, or transactions in a timestamp range
+
+ POST http://{{IP}}:{{PORT}}/v0/ledgers/test/transactions/count
+
+**start\_timestamp** and **end\_timestamp** follow the same requirementsand rules as in [???](#Query.CountBlocks).
+
+##### Sample request
+
+
+``` {.json}
+{}
+```
+
+##### Return the sample
+
+
+``` {.json}
+{
+ "count": "4",
+ "startTimestamp": "0",
+ "endTimestamp": "1611039957"
+}
+```
+
+##### Request Example 2
+
+
+``` {.json}
+{
+ "start_timestamp": 1611038000,
+ "end_timestamp": 1611039000
+}
+```
+
+##### Return to Example 2
+
+
+``` {.json}
+{
+ "count": "1",
+ "startTimestamp": "1611038000",
+ "endTimestamp": "1611039000"
+}
+```
+
+
+- - -
+
+## Contract node WebSocket interface
+
+### User Management
+
+#### Access to the Session
+
+Before login, obtain the session for signing.
+
+##### parameter
+
+|field|value|
+| ------ | ------------ |
+|action|getSessionID|
+
+##### Sample request
+
+
+```
+var req = {};
+req.action = "getSessionID";
+wssocket.send(JSON.stringify(req));
+```
+
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onSessionID",
+ "session": "9782323_session"
+}
+```
+
+#### The user login
+
+The user performs public-private key authentication
+
+##### parameter
+
+|field| 值 |
+| ------ | ----- |
+|action| login |
+
+##### Sample request
+
+
+```
+var loginParam = {};
+loginParam.pubKey = global.sm2Key.publicKey;
+loginParam.signature = sm2.doSignature(global.session,
+ global.sm2Key.privateKey);
+loginParam.action = "login";
+wssocket.send(JSON.stringify(loginParam));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onLogin",
+ "data": "NodeManager,ContractProvider"
+}
+```
+
+#### Apply for role
+
+In the node administrator interface, you can apply for the names contract administrator, ContractUser, ContractProvider.
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------- |
+| action |applyNodeRole|
+|role|Applying for a Role Name|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "applyNodeRole";
+param.role = "ContractUser";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+``` json
+{
+ "action": "onApplyRole",
+ "data": "success"
+}
+
+{
+ "action":"onApplyRole",
+ "data":"already has!"
+}
+```
+
+#### Authorization role
+
+##### parameter
+
+| 字段 |value|
+| -------- | -------------------- |
+| action |authNodeRole|
+| isAccept |Bool: indicates no authorization|
+| pubKey |Authorized user public key|
+
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "authNodeRole";
+param.isAccept = true;
+param.pubKey = "xxxxx";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onAuthNodeRole",
+ "data": "success"
+}
+```
+
+#### Deleting a User Role
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------- |
+| action |deleteRole|
+| role |Deleting a Role Name|
+
+##### Sample request
+
+
+```
+var deleteInfo = {};
+deleteInfo.pubKey = global.authorizedUsers.[publicKey];
+deleteInfo.action = "deleteRole";
+deleteInfo.role="ContractUser";
+wssocket.send(JSON.stringify(deleteInfo));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onDeleteRole",
+ "data": "success"
+}
+```
+
+#### View the list of authorized users
+
+View authorized node administrators in the current network
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action |listAllAuthRole|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "listAllAuthRole";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status":false,
+ "action":"onListAllAuthRole",
+ "data":
+ {
+ "kv":[{"key":"04eafad549d0757cf67f360815e15e157c7428c9ea9fb933f31a5d45bfb6edd9809c5bf6a5f37d7b817207f19fb2d76b7dbdefe38084cd3282e37b9ac39959dfab",
+ "value":"NodeManager,ContractProvider,ContractUser,ContractInstanceManager"}],
+ "time":[{"key":"04eafad549d0757cf67f360815e15e157c7428c9ea9fb933f31a5d45bfb6edd9809c5bf6a5f37d7b817207f19fb2d76b7dbdefe38084cd3282e37b9ac39959dfab",
+ "value":"1617178709933"}]
+ }
+}
+```
+
+#### View the list of applied users
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |listUnAuthRole|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "listUnAuthRole";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onListUnAuthRole",
+ "kv": [{
+ "key": "049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7",
+ "value": "ContractProvider,ContractUser"
+ }],
+ "time": [{
+ "key": "049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7",
+ "value": "1587398989914"
+ }]
+}
+```
+
+
+##### Parameter (delete)
+
+| 字段 |value|
+| ------ | ------------- |
+| action |queryUserStat|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "queryUserStat";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onQueryUserStat",
+ "userListCount": 3,
+ "applyListCount":0
+}
+```
+
+### Contract code management class
+
+#### Gets a list of public contract files
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------ |
+| action |listProjects|
+
+##### Sample request
+
+
+```
+var request = {};
+request.action = "listProjects";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+```json
+{
+ "action":"onListProjects",
+ "data":"[\"AnnotationSample\",\"AppDataAnalysis\",\"AppDataSource\",\"BiddingExample\",\"ContractExecutor\"]",
+ "executeTime":0,
+ "isPrivate":false
+}
+
+```
+
+
+#### Gets a list of private contract files
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------------- |
+| action |listProjects|
+| pubKey |The public key of the user|
+|isPrivate|true|
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "listProjects";
+request.pubKey = "global.sm2.publicKey";
+request.isPrivate=true;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action":"onListProjects",
+ "data":"[\"CSVFromTemplate\",\"Empty22\",\"MySQLFromTemplate\",\"test\"]",
+ "executeTime":0,
+ "isPrivate":true
+}
+```
+
+
+#### Get the contract instance
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------- |
+| action |listContractProcess|
+
+##### Sample request
+
+
+```
+var request = {};
+request.action = "listContractProcess";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status":false,
+ "action":"onListContractProcess",
+ "data":"[{\"id\": \"1658407837\",\"name\": \"BDCoin\",\"port\": \"1617\"}]"
+}
+```
+
+
+#### Start the contract
+
+##### parameter
+
+| 字段 |value|
+| --------- | ------------- |
+| action |startContract|
+| owner |pubkey|
+|requestID| 当前时间 |
+|script| 脚本内容 |
+| signature |The signature|
+
+##### Sample request
+
+
+```
+request.action = "startContract";
+request.owner = global.sm2Key.publicKey;
+request.requestID = new Date().getTime() + "";
+request.script = global.projectScript;
+request.signature = sm2.doSignature("Algorithm|" + request.script + "|" + global.sm2Key.publicKey, global.sm2Key.privateKey);
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data":"{\"needSeq\":false,\"seq\":0,\"status\":\"Success\",\"result\":\"\",\"isInsnLimit\":false,\"totalGas\":0,\"executionGas\":0,\"extraGas\":0,\"size\":0,\"eventRelated\":false}",
+ "action":"onStartContract",
+ "cid":"-506393888",
+ "executeTime":2496,
+ "responseID":"1617206735696"
+}
+```
+
+#### Start the trusted cluster contract
+
+##### parameter
+
+| 字段 |value|
+| --------- | ------------------------------------ |
+| action |startContractP2PTrustfully|
+| owner |pubkey|
+| isPrivate |The current time|
+|path |Path where the script resides|
+| signature |The signature|
+| peersID |An array of peerids of nodes in the trusted execution cluster|
+| | |
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "startContractP2PTrustfully";
+request.peersID = ["3r729hf2ehf982","sjdfiwoehfwoi34","wnfnwoeifnwenef"];
+var project = "JsonTest";
+request.path = "/" + project + "/mainfest.json";
+request.isPrivate = false;
+request.signature = sm2.doSignature("Trusted|" + request.path + "|"
++ global.sm2Key.publicKey, global.sm2Key.privateKey); //合约的签名
+request.resultcheck = $("#resultcheck")[0].value;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data":"{\"status\":\"Success\",\"result\":\"\"}",
+ "action":"onStartContractP2PTrustfully",
+ "cid":"-1543583350",
+ "executeTime":1544
+}
+```
+
+#### Distribution of contract items
+
+##### parameter
+
+| 字段 |value|
+| ------------- | ------------------ |
+|action |distributeContract|
+|peersID| 集群中节点peer |
+| projectName |The contract of|
+|isPrivate| 是否在私有目录 |
+| sponsorPeerID |The originators of the ID|
+| signature |The signature|
+
+##### Sample request
+
+
+```javascript
+request.action = "distributeContract";
+request.peersID = peersID;
+request.projectName = global.projects[global.lastClickedProjectId];
+request.isPrivate = $("#privateDir-tab").hasClass("active");
+request.sponsorPeerID = global.peerID;
+request.signature = sm2.doSignature("DistributeContract|" + request.projectName + "|" + global.sm2Key.publicKey, global.sm2Key.privateKey);
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action":"onDistributeContract",
+ "progress":"100.00%"
+}
+```
+
+#### Terminate the contract
+
+##### parameter
+
+| 字段 |value|
+| --------- | ------------------- |
+| action |killContractProcess|
+| id |Contract id|
+| requestID |Request ID|
+
+##### Sample request
+
+
+```
+request.action = "killContractProcess";
+request.id = contractid;
+request.requestID = new Date().getTime() + "";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": "ContractHandler: exit in 3 seconds!",
+ "action": "onOutputStream"
+}
+```
+
+#### Termination of all contracts
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action |killAllContract|
+
+##### Sample request
+
+
+```
+request.action = "killAllContract";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status":false,
+ "action":"onKillAllContract",
+ "data":"Kill:7241,7245,"
+}
+```
+
+
+
+#### Static analysis contract
+
+##### parameter
+
+| 字段 |value|
+| ---------- | -------------------- |
+| action |staticVerifyContract|
+| owner |User private key|
+| isPartial |Is it part of|
+| contractid |contractid|
+| script |The script content|
+| path |Name of contract|
+
+
+##### Sample request
+
+
+```javascript
+request.action = "staticVerifyContract";
+request.owner = global.sm2Key.privateKey
+request.isPartial = false;
+request.contractid = contractid;
+request.script = global.projectScript;
+request.path = global.projectName;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+
+{
+ "data":"{\"needSeq\":false,\"seq\":0,\"status\":\"Success\",\"result\":{\"hello\":\"Ret:\"},\"isInsnLimit\":false,\"totalGas\":0,\"executionGas\":0,\"extraGas\":0,\"size\":0,\"eventRelated\":false}",
+ "action":"onStaticVerifyResult",
+ "cid":"verify",
+ "executeTime":83
+}
+```
+
+
+
+#### Delete the contract
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------- |
+| action |deleteFile|
+| file |fileName|
+
+##### Sample request
+
+
+```javascript
+request.action = "deleteFile";
+request.file = fileName;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action":"onDeleteFile",
+ "data":"success",
+ "executeTime":0
+}
+```
+
+
+
+#### Private contracts are uploaded to public directories
+
+##### parameter
+
+| 字段 |value|
+| -------- | ------------ |
+| action |changePublic|
+|pubkey| 用户公钥 |
+| fileName |fileName|
+
+##### Sample request
+
+
+```javascript
+request.action = "changePublic";
+request.pubkey = pubkey;
+request.fileName = fileName;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action":"onChangePublic",
+ "data":"success",
+ "executeTime":0
+}
+```
+
+
+
+#### Upload the contract
+
+##### parameter
+
+| 字段 |value|
+| -------- | ----------- |
+| action |UploadFile|
+| isAppend | false |
+|fileName|fileName|
+| path | path |
+|isPrivate|true/false|
+| content |The fileContent (base64 encoding)|
+
+##### Sample request
+
+
+```
+request.action = "uploadFile";
+request.isAppend = false;
+request.fileName = "test1.yjs";
+request.path = "test1";
+text="Y29udHJhY3QgdGVzdDF7CglleHBvcnQgZnVuY3Rpb24gaGVsbG8oYXJnKXsgCiAgICAgICAgcmV0dXJuICJ3b3JsZCI7ICAKICAgIH0gICAKfQ=="
+request.content = text;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action":"onUploadFile",
+ "data":"success",
+ "executeTime":0
+}
+```
+
+#### Compile the contract
+
+##### parameter
+
+| 字段 |value|
+| ---------- | -------------------------- |
+| action |compile|
+| path |String indicates the name of the project to be compiled|
+| privateTab |Bool, indicates whether the item is a private directory|
+
+##### Sample request
+
+
+```javascript
+var req = {"action":"compile","path":"Hello","privateTab":true}
+```
+
+##### Returns the result
+
+
+```json
+{"result":"Hello_2020-08-17-09:09:40.ypk","action":"onCompile"}
+```
+
+#### Locking private directories
+
+Lock the private directory editing function for a user
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------------- |
+| action |lockEdit|
+| pubKey |String Indicates the public key to be locked|
+
+##### Sample request
+
+
+```javascript
+var req = {};
+req.action = "lockEdit";
+req.pubKey = "xxxxxx";
+wssocket.send(JSON.stringify(req));
+```
+
+```json
+{
+ "action":"onLockEdit",
+ "status":"success",
+ "data":"04c4c855862b53f323e077ccfcc744ecc2c0a04645ed16d99ede8fd5866b38c0670a97ad22c6260d1a4672aba2a5fe229a2d4eba34627c054aab102620afa288c1"
+}
+```
+
+
+#### Unlock a private directory
+
+Unlock the private directory editing function for a user
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------------- |
+| action |unLockEdit|
+| pubKey |String Indicates the public key to be locked|
+
+##### Sample request
+
+
+```javascript
+var req = {};
+req.action = unlockEdit;
+req.pubKey = "xxxxxx";
+wssocket.send(JSON.stringify(req));
+```
+
+```json
+{
+ "action":"onUnlockEdit",
+ "status":"success",
+ "data":"04c4c855862b53f323e077ccfcc744ecc2c0a04645ed16d99ede8fd5866b38c0670a97ad22c6260d1a4672aba2a5fe229a2d4eba34627c054aab102620afa288c1"
+}
+```
+
+
+### Contract instance management class
+
+#### Querying the contract process
+
+Sends a request to the server for all the contract processes that have been started on the server.
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------- |
+| action |listContractProcess|
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "listContractProcess";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Result
+
+
+```json
+{
+ "status": false,
+ "action": "onListContractProcess",
+ "data": "[...]"
+}
+```
+
+
+
+#### Call the contract
+
+Send a request to the server to invoke a contract.
+
+##### parameter
+
+| 字段 |value|
+| -------------------- | --------------------------- |
+| action |executeContract|
+| contractID |Contract ID|
+| withDynamicAnalysis |True /false Specifies whether to perform dynamic analysis. This parameter is optional|
+|operation| 调用合约的方法名 |
+|arg| 调用合约的parameter |
+| pubkey |Caller public key, optional|
+| signature |Caller signature, optional|
+
+`*` Indicates that the parameter is optional
+
+
+```javascript
+//sm2 可从sm2.js中加载获得。
+signature = sm2.doSignature(contractID+"|"+operation+"|"+arg+"|"+pubkey,privateKey);
+```
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "executeContract";
+request.contractID = "2073401446";
+request.operation = "main";
+request.arg = "hhhhh";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Result
+
+
+```json
+{
+ "needSeq":false,
+ "seq":0,
+ "status":"Success",
+ "result":"world",
+ "isInsnLimit":false,
+ "totalGas":0,
+ "executionGas":0,
+ "extraGas":0,
+ "size":0,
+ "eventRelated":false,
+ "responseID":"1617211077264_223",
+ "action":"onExecuteResult",
+ "executeTime":"5"
+}
+```
+
+#### Output history log (delete)
+
+Send a request to the server for the TimeTravel log of the contract on the node server.
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------ |
+| action |printTimeTravelLog|
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "printTimeTravelLog";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Result
+
+
+```json
+{
+ "status": false,
+ "data": "[CMActions] dumpContract :…t/contractExamples/memoryDumps/LicenceManager\n"
+}
+```
+
+
+
+#### Outputting node transition logs (delete)
+
+Send a request to the server to get the state transition log of the node server.
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------- |
+| action |printTransferLog|
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "printTransferLog";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Result
+
+
+```json
+ {
+ "status": false,
+ "data": ""
+}
+```
+
+
+
+#### Contract status migration
+
+Send a request to the server to get the state transition log of the node server.
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ------------ |
+| action | loadMemory |
+|contractName| 合约名称 |
+|memoryFile| 合约文件名称 |
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "loadMemory";
+request.contractName = "JsonContract";
+request.memoryFile = "2020-03-17.20/42/55";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Result
+
+
+```json
+{
+ "data":"success",
+ "size":"0.00 B",
+ "action":"onTransferTo",
+ "time":"0.01s"
+}
+```
+
+
+
+### Log Viewing Class
+
+#### Querying Local Node Logs in the last N Days (Deleted)
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------- |
+| action |listLocalNodeLog|
+| date |The current time|
+
+##### Sample request
+
+
+```
+request.action = "listLocalNodeLog";
+request.date = new Date().getTime() - 24 * 3600 * 1000 * n;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data":"[{\"action\":\"login\",\"pubKey\":\"null\",\"status\":\"accept\",\"date\":1583139323822}\",]"
+}
+```
+
+
+
+#### Querying Local Contract Logs in the last N Days (Deleted)
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------------- |
+| action |listLocalContractLog|
+| date |The current time|
+
+##### Sample request
+
+
+```
+request.action = "listLocalContractLog";
+request.date = new Date().getTime() - 24 * 3600 * 1000 * n;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data":"[\"{\"action\":\"startContract\",\"pubKey\":\"04405d7ba358d9234939623ab51ea94ca685e6a1f36ed81fd9630ccba6473e632f163bb30faffd4c91f21e5bace20101d6d6e36c04ac67eea14cc24b4962b84f57\",\"contractID\":\"845581788\",\"contractName\":\"null\",\"date\":1583141525539}\"]"
+}
+```
+
+
+
+
+### Node Configuration Class
+
+#### Obtain node configuration information
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |loadNodeConfig|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "loadNodeConfig";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```
+{
+ "status": true,
+ "action": "onLoadNodeConfig",
+ "data": {
+ "nodeName": "04BF52213343C147E631B877BCEB17B794230EE551E85F58FA429C4BA03D690778CC384C6916C63DF36CB9E35C7E274FDB4E18491DFE3D611D347856D441CACC5AF9090B515F02AFC2DFBF56461EC83B5A4CD342466360D6CF82E6E40B637430AC4A329CCBC798DAF7D526AF9E3B3600E0BEA1BFAB8C160EF90128FAF67B19E45F37664F1E4B",
+ "licence": "04AADCC7103CD02626D228AFFBEF53F8242ECA4DDD6F179D30B622440666715CFBB6FD1D3678A2B25812DEA9917073E79A65F7ADE517F784DC76288EFCEB37ECAA1025E6903540702F729DA1C2ECCD93F4E6FAFCE40DF443E7FD74387169D0C6D927C7BB12882D0471C8D3E6F31B0316A42FC38F6DD9978D4351B23B2AD63E2244909E98F51185D32CB99B4AE4E22D3AB4C04027BB",
+ "expireTime": "Wed Aug 26 09:43:08 CST 2020",
+ "nodes": "[\"node1\",\"node2\",\"node3\"]",
+ "yjsPath": "/Users/xxx/docs/BDWareHttp/generatedlib/yjs.jar",
+ "nodeCenter": "ws://127.0.0.1:1719/SCIDE/NodeCenter"
+ }
+}
+
+{
+ "status":true,
+ "action":"onLoadNodeConfig",
+ "data":{
+ "nodeName":"Node_180",
+ "peerID":"",
+ "masterAddress":"39.104.201.40:21031",
+ "licence":"04AADCC7103C",
+ "doipConfig":"{\\"LHSProxyAddress\\":\\"http://39.104.201.40:21042/\\",\\"ownerHandle\\":\\"86.5000.470/dou.TEST\\",\\"certPath\\":\\"keys/dou.TEST.keystore\\",\\"certPassword\\":\\"123456\\",\\"repoID\\":\\"86.5000.470/doip.vcg9Mu1gSq_bdw\\",\\"listeners\\":\\"[{\\\\\\"url\\\\\\":\\\\\\"tcp://39.104.201.40:21032\\\\\\",\\\\\\"protocolVersion\\\\\\":\\\\\\"2.1\\\\\\",\\\\\\"messageFormat\\\\\\":\\\\\\"packet\\\\\\"}]\\",\\"serviceDescription\\":\\"test local Contract Repository\\",\\"serviceName\\":\\"ContractEngine021\\"}",
+ "clusterConnected":"false",
+ "nodePubKey":"0492d974b8a5b473d0ed2c81800917f76e2a1ec3666067888c85fe6922a672223f2083f95402ae13a744df58deabbe7206c4a317dd14296b0d3941a26ca4e34dc5",
+ "ipPort":"",
+ "bdledger":"39.108.56.240:18091,39.108.56.12:1809139.104.70.160:18091 47.98.247.70:18091 47.98.248.208:18091 39.104.77.165:18091 47.98.249.131:18091",
+ "yjsPath":"/data/bdwaas/bdcontract/yjs.jar",
+ "nodeCenter":"ws://39.104.201.21040/SCIDE/NodeCenter"
+ }
+}
+```
+
+
+#### Modifying Node Configuration
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |updateConfig|
+| key |The configuration item to change|
+| val |The target value to change|
+
+Options for key include:
+
+| key的示 |Val sample| 说明 |
+| ------------- | ----------------------------------- | ------------------------------- |
+| yjsPath |/User/xxx/cp/yjs.jar| 合约进程启动所需的jar |
+| dataChain | 192.168.1.8:18090,182.173.2.3:18091 | 账本节点的ip与端口 |
+| nodeCenter |ws://127.0.0.1:18002| CenterPortal所在的ip/端口 |
+| nodeName |Node_180| 字符串类型 |
+| masterAddress | 192.168.3.2:18001 | 该NodePortal节点的ip和的TCP端口 |
+
+The TCP port of the NodePortal is the HTTP/WS port number +1 of the Node.
+
+
+#### Modifying a Node Name
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |changeNodeName|
+| data |New node name|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "changeNodeName";
+param.data = "NewNodeName";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onChangeNodeName",
+ "data": true
+}
+```
+
+
+
+#### Example Change the YJS path of a node
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------------- |
+| action |changeYJSPath|
+| data |Yjs.jar path of the node server|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "changeYJSPath";
+param.data = "/Users/xxx/docs/BDWareHttp/generatedlib/yjs.jar";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onChangeYJSPath",
+ "data": true
+}
+```
+
+
+
+#### Modify NodeCenter
+
+##### parameter
+
+| 字段 |value|
+| ------ | ----------------------------------------- |
+| action |changeNodeCenter|
+| data |NodeCenterWebSocket path to which the node server is to connect|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "changeNodeCenter";
+param.data = "ws://127.0.0.1:1719/SCIDE/NodeCenter";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onChangeNodeCenter",
+ "data": true
+}
+```
+
+
+
+#### Example Modify an account node
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------------------- |
+| action |changeBDledger|
+| data |The IP address of the node is port, separated by commas (,)|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "changeBDledger";
+param.data = "39.108.56.240:18091,39.108.56.12:18091";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onChangeBDledger",
+ "data": true
+}
+```
+
+
+
+#### Uploading the Node License
+
+##### parameter
+
+| 字段 |value|
+| ------ | ----------------------- |
+| action |uploadLicence|
+| data |The content of the license on the node server|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "uploadLicence";
+param.data = "04AADCC7103C";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onUploadLicence",
+ "data": true
+}
+```
+
+
+
+#### Obtaining Node ids
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------- |
+| action |getNodeID|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "getNodeID";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onGetNodeID",
+ "data": "0431…d3a92e1184bbc5817ebda5c2ad498e4ff1d240009b4f06d"
+}
+```
+
+
+
+#### Gets the trusted execution cluster where the node resides
+
+##### parameter
+
+| 字段 |value|
+| ---------- | ------------------------------------------------ |
+| action |getNodeTrustUnits|
+| data |The node ID|
+| msgHandler |MsgHandler for the callback function that receives a reply|
+| ws |WebSocket address of the NodeCenter to which the node belongs|
+
+##### Sample request
+
+
+```
+centerportalws = createWssocket("ws://127.0.0.1:1718/NodeCenterWS",function() {
+var param = {};
+param.action = "getNodeTrustUnits";
+param.data = "0431e311bd70840fe69965e2cabea97fafe99f2133953c01abb9bd7cb62af42f8283f474d203051e920d3a92e1184bbc5817ebda5c2ad498e4ff1d240009b4f06d";
+centerportalws.send(JSON.stringify(param));
+}, msgHandler);
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [{
+ "key": "0475c7b061...65e55_4063665700873624164",
+ "value": "[\"04541429c11b094…40009b4f06d\"]"
+ }],
+ "action": "onGetNodeTrustUnits"
+}
+```
+
+### Template generation class
+
+#### Gets a list of contract templates
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action |getTemplateList|
+
+##### Sample request
+
+
+``` javascript
+req={};
+req.action = "getTemplateList";
+wssocket.send(JSON.stringify(req));
+```
+
+##### Returns the result
+
+
+``` json
+{
+ "data": [
+ {
+ "formDesc": {
+ "dbPWD": {
+ "label": "密码",
+ "type": "input"
+ },
+ "contractName": {
+ "label": "合约名称",
+ "type": "input"
+ },
+ "accessPolicy": {
+ "label": "访问控制策略",
+ "type": "input",
+ "option": [
+ {
+ "text": "无访问控制",
+ "value": "NAC"
+ },
+ {
+ "text": "直接访问控制",
+ "value": "DAC"
+ },
+ {
+ "text": "基于角色的访问控制",
+ "value": "RBAC"
+ }
+ ]
+ },
+ "dbUserName": {
+ "label": "用户名",
+ "type": "input"
+ },
+ "fieldList": {
+ "label": "字段名",
+ "type": "tag"
+ },
+ "dbUrl": {
+ "label": "数据库链接",
+ "type": "input"
+ },
+ "tableName": {
+ "label": "表名",
+ "type": "input"
+ }
+ },
+ "apiName": "generateMySQLProject"
+ },
+ {
+ "formDesc": {
+ "contractName": {
+ "label": "合约名称",
+ "type": "input"
+ },
+ "accessPolicy": {
+ "label": "访问控制策略",
+ "type": "input",
+ "option": [
+ {
+ "text": "无访问控制",
+ "value": "NAC"
+ },
+ {
+ "text": "直接访问控制",
+ "value": "DAC"
+ },
+ {
+ "text": "基于角色的访问控制",
+ "value": "RBAC"
+ }
+ ]
+ }
+ },
+ "apiName": "generateEmptyProject"
+ }
+ ],
+ "action": "onTemplateList"
+}
+```
+
+#### Blank Contract Template
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ----------------------------- |
+| action |generateEmptyProject|
+| contractName |The name of the contract is a string|
+| isPrivate |Boolean type, whether it is a private project|
+| accessPolicy |If the value is “DAC”, direct access control is implemented|
+
+##### Sample request
+
+
+```javascript
+var req = {};
+req.contractName = "Empty22";
+req.action = "generateEmptyProject";
+req.accessPolicy = "DAC";
+//wssocket为建立好的连接
+wssocket.send(JSON.stringify(req));
+```
+
+##### Returns the result
+
+```json
+{
+ "action":"onListProjects",
+ "data":"[\"AnnotationSample\",\"AppDataAnalysis\",\"AppDataSource\"]",
+ "executeTime":0,
+ "isPrivate":false
+}
+```
+
+#### MySQL Access Contract
+
+##### parameter
+
+| 字段 |value|
+| ------------- | ------------------------------------------------------ |
+| action |generateMySQLProject|
+| contractName |The name of the contract is a string|
+| isPrivate |Boolean type, whether it is a private project|
+| dbUrl |The string is the URI of the database|
+| dbUserName |The value is a string of characters and the user name of the database|
+| dbPWD |The value is a string of characters and the database password|
+| accessPolicy |If it is “DAC”, direct access control is implemented; if it is “NAC”, no access control is implemented|
+| tableName |A string, the name of a database table|
+| fieldList |A list of strings, a list of database fields|
+| defaultAccept |Boolean value indicating whether the application is granted by default|
+
+##### Sample request
+
+
+```javascript
+var req = {};
+req.contractName = "MySQLFromTemplate";
+req.action = "generateMySQLProject";
+req.pubKey = global.sm2Key.publicKey;
+req.isPrivate = true;
+req.tableName = "data";
+req.dbUrl = "jdbc:mysql://xxx:xxx/xxx";
+req.dbUserName = "loushuai";
+req.dbPWD = "loushuai";
+req.fieldList = [{"name":"名字","code":"*"}];
+req.basicInfo={"type":"所属分类","name":"资源名称"};
+req.accessPolicy = "DAC";
+req.defaultAccept = true;
+//global.wssocket为建立好的连接
+global.wssocket.send(JSON.stringify(req));
+```
+
+##### Returns the result
+
+```json
+{
+ "action":"onListProjects",
+ "data":"[\"CSVFromTemplate\",\"Empty22\",\"Hello\",\"MySQLFromTemplate\",\"test\"]",
+ "executeTime":0,
+ "isPrivate":true
+}
+```
+#### CSV Access Contract
+
+##### parameter
+
+| 字段 |value|
+| ----------------- | ------------------------------------------------------ |
+| action |generateCSVProject|
+| contractName |The name of the contract is a string|
+| base64EncodedData |The value is a string of characters in a Base64-encoded CSV file|
+| isPrivate |Optional fields, Boolean type, private item or not|
+| accessPolicy |If it is “DAC”, direct access control is implemented; if it is “NAC”, no access control is implemented|
+| defaultAccept |An optional field, a Boolean value that indicates whether the application is granted by default|
+
+##### Sample request
+
+
+```javascript
+var req = {};
+req.contractName = "CSVFromTemplate";
+req.action = "generateCSVProject";
+req.pubKey = global.sm2Key.publicKey;
+req.isPrivate = true;
+req.tableName = "data";
+req.accessPolicy = "DAC";
+req.defaultAccept = true;
+req.base64EncodedData = "bmFtZSwgc2NvcmUsCmphY2ssIDkwLApsdWN5LCA5MQo=";
+//global.wssocket为建立好的连接
+global.wssocket.send(JSON.stringify(req));
+```
+##### Returns the result
+
+```json
+{
+ "action":"onListProjects",
+ "data":"[\"CSVFromTemplate\",\"Empty22\",\"Hello\",\"MySQLFromTemplate\",\"test\"]",
+ "executeTime":0,
+ "isPrivate":true
+}
+```
+
+- - -
+
+## Routing node WebSocket interface
+
+### User Management
+
+#### Access to the Session
+
+Before login, obtain the session for signing.
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------ |
+| action |getSessionID|
+
+##### Sample request
+
+
+```
+var req = {};
+req.action = "getSessionID";
+wssocket.send(JSON.stringify(req));
+```
+
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onSessionID",
+ "session": "9782323_session"
+}
+```
+
+
+#### The user login
+
+To authenticate the public key, the user needs to call “getSessionID” to obtain the sessionID for signature.
+
+##### 参数
+
+| 字段 | 值 |
+| ------ | ----- |
+| action | login |
+
+##### Sample request
+
+
+```
+var loginParam = {};
+loginParam.pubKey = global.sm2Key.publicKey;
+loginParam.signature = sm2.doSignature(global.session,
+ global.sm2Key.privateKey);
+loginParam.action = "login";
+wssocket.send(JSON.stringify(loginParam));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onLogin",
+ "data": "CenterManager"
+}
+```
+
+
+
+#### User gets the current role (Delete)
+
+A user obtains a role based on the public key used during login. If it is the first login, the public key used during login is called the access administrator by default
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------- |
+| action |getRole|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "getRole";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onGetRole",
+ "data": "CenterManager"
+}
+```
+
+#### Apply for role
+
+On the Access administrator page, you can apply for a node administrator for a node in the network
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------- |
+| action |applyRole|
+|role|Specifies the name of the applied role|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "applyRole";
+param.role="
+wssocket.send(JSON.stringify(param));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onApplyRole",
+ "data": "failed"
+}
+```
+
+
+#### Add a node
+
+##### parameter
+
+| 字段 |value|
+| ---------- | ---------------- |
+| action |addNode|
+|nodePubKey| 要添加的节点公钥 |
+
+#### Sample request
+
+
+```
+var req = {};
+//某节点的publicKey可通过连接该节点,并通过"获取节点配置信息"接口获取
+req.nodePubKey = publicKey;
+req.action = "addNode";
+wssocket.send(JSON.stringify(req));
+```
+
+
+#### Deleting a User Role
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |delete|
+| pubKey |The public key of the corresponding user|
+
+##### Sample request
+
+
+```
+var deleteInfo = {};
+deleteInfo.pubKey = user.publicKey;
+deleteInfo.action = "delete";
+wssocket.send(JSON.stringify(deleteInfo));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onDelete",
+ "data": "success"
+}
+```
+
+#### View the list of authorized users
+
+View authorized node administrators in the current network
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------ |
+| action |listAllUsers|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "onListAllUsers";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onListAllUsers",
+ "kv": {
+ "key": "049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7",
+ "value": " NodeManager"
+ },
+ "time": {
+ "key": "049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7",
+ "value": 1587398989914
+ }
+}
+```
+
+#### View the list of applied users
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------- |
+| action |listApplyList|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "onListApplyList";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onListApplyList",
+ "kv": {
+ "key": "04b00f32eab70c78d1b43738f190d326d36c021af2124acefe6d057016b11ea31c750bb473e565c9d89e4993a44f4d30adf447d3026a21ff4b3b64cef523074ef7",
+ "value": " NodeManager"
+ },
+ "time": {
+ "key": "04b00f32eab70c78d1b43738f190d326d36c021af2124acefe6d057016b11ea31c750bb473e565c9d89e4993a44f4d30adf447d3026a21ff4b3b64cef523074ef7",
+ "value": 1587398989914
+ }
+}
+```
+
+#### View the distribution of user types
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------- |
+| action |queryUserStat|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "onQueryUserStat";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onQueryUserStat",
+ "userListCount": 3,
+ "applyListCount":0
+}
+```
+
+### Node Management
+
+#### Viewing the Node List
+
+View the node list that the user has the permission to view (only available to access administrators and contract managers)
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------- |
+| action |listNodes|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "listNodes";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "offline": [{
+ "key": "0431e31...40009b4f06d",
+ "value": "0431e311bd708...b4f06d"
+ }],
+ "action": "onListNodes",
+ "online": [{
+ "contracts": [],
+ "pubKey": "0431e311...09b4f06d",
+ "nodeName": "NewNodeName",
+ "udpID": "528822126",
+ "cimanager": ""
+ }]
+}
+```
+
+
+#### View the list of trusted execution clusters
+
+View the node list that the user has permission to view (available only to the center administrator and contract manager)
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |listTrustUnits|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "listTrustUnits";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [{
+ "key": "0470b2f27f4f6…1cb855f1ecec11",
+ "value": "[...]"
+ }],
+ "action": "onListTrustUnits"
+}
+```
+
+
+#### Establish a trusted execution cluster
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------------- |
+| action |createTrustUnit|
+| data |Json array of node public keys|
+| Msg |The name of the cluster|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "createTrustUnit";
+param.data = "[\"382r0934309t...\",\"345343rr3f34...\"]";
+param.msg = "newUnit1";
+global.wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onCreateTrustUnit",
+ "status": "Success"
+}
+```
+
+
+#### Delete a trusted execution cluster
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action |deleteTrustUnit|
+| data |Trusted execution cluster ID|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "deleteTrustUnit";
+param.data = "0475d34rf3434..._1583410158761";
+global.wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onDeleteTrustUnit",
+ "status": "Success"
+}
+```
+
+
+
+### Log Viewing Class
+
+#### View the statistics of network management operations
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |queryActionLog|
+| date |The current time|
+
+##### Sample request
+
+
+```
+request.action = "onQueryActionLog";
+request.date = new Date().getTime() - 24 * 3600 * 1000 * n;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{ "action":"onQueryActionLog",
+ "data":"[{\"action\":\"login\",\"pubKey\":\"null\",\"status\":\"accept\",\"date\":1583139323822}\",]"
+}
+```
+
+
+
+#### View local contract logs in the last N days
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------------- |
+| action |listLocalContractLog|
+| date |The current time|
+
+##### Sample request
+
+
+```
+request.action = "listLocalContractLog";
+request.date = new Date().getTime() - 24 * 3600 * 1000 * n;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data":"[\"{\"action\":\"startContract\",\"pubKey\":\"04405d7b...\",\"contractID\":\"845581788\",\"contractName\":\"null\",\"date\":1583141525539}\"]"
+}
+```
+
+
+- - -
+
+## Bash interface
+
+Has been abandoned. BDWareConfigTool can be used instead. Send Socket instructions through the command line, execute the call `ContractController` class method, complete the following functions(need to run the `ContractManager` instance on the local `1615` port)
+
+![Schematic diagram of Bash interface functions](./_static/imgs/bash-api.png)
+
+### instruction
+
+
+```bash
+java -jar yjs.jar function_name arguments
+
+```
+
+`function_name` is the name of the called method;
+
+`arguments` is the method parameter.
+
+### Start the contract
+
+#### parameter
+
+`function_name` is `startContract`;
+
+`arguments` to start the contract parameters, including the type of contract `type`, the contract ID `id`, contract script `script`.
+
+#### Order sample
+
+
+```bash
+java -jar yjs.jar startContract "{\"type\":\"Algorigthm\",\"id\":\"656565\",\"script\":\"contract c{function main(arg){return arg/1.0+1;}}\"}"
+```
+
+### Call the contract
+
+#### parameter
+
+`function_name` is `executeContract`;
+
+`arguments` need to invoke the contract parameters, including the call parameters `arg`, the contract ID `contractID`.
+
+#### Order sample
+
+
+```bash
+java -jar yjs.jar executeContract "{\"arg\":\"http://www.baidu.com\",\"contractID\":\"656564\"}"
+```
+
+### To stop the contract
+
+#### parameter
+
+`function_name` is `stopContract`;
+
+`arguments` is the parameter required to invoke the contract, that is, the contract ID `contractID`.
+
+#### Order sample
+
+
+```bash
+java -jar yjs.jar stopContract "{\"arg\":\"http://www.baidu.com\",\"contractID\":\"656564\"}"
+```
+
+### Termination of all contracts
+
+#### parameter
+
+`function_name` indicates that `stopAllContracts`.
+
+#### Order sample
+
+
+```bash
+java -jar yjs.jar stopAllContracts
+```
+
+### Query all contracts
+
+#### parameter
+
+`function_name` is `listContracts`.
+
+#### Order sample
+
+
+```bash
+java -jar yjs.jar listContracts
+```
+
\ No newline at end of file
diff --git a/markdown_trans/markdown_BDWare/5_YJSInDepth.md b/markdown_trans/markdown_BDWare/5_YJSInDepth.md
new file mode 100644
index 0000000..f8711b4
--- /dev/null
+++ b/markdown_trans/markdown_BDWare/5_YJSInDepth.md
@@ -0,0 +1,290 @@
+# YJS grammar
+
+- - -
+
+## An overview of the
+
+YJS source files include any number of **The import declaration** and one **The contract is defined**.
+
+- - -
+
+## The import declaration
+
+Like JavaScript (ES6), YJS also supports import statements. At the global level, developers can use the following import statements to import other files.
+
+
+```
+import "filename";
+```
+
+### content
+
+The import statement imports all global symbols (units) contained in the “filename” file into the current file and is globally valid.
+
+### The path
+
+**filename** Usually **/** is used as the directory separator to indicate the file path. For example, to import the **x.yjs** file from the same directory to the current file, you can use the **import “x.yjs”** statement. Import **x.yjs** from another directory using the **import “lib/x.yjs”** statement.
+
+- - -
+
+## The Contract is defined
+
+### The sample
+
+Here is an example contract for JSON processing, with the YJS source file named after the contract name.
+
+
+```
+contract ScoreAdder{
+ //arg = {"action":"main","arg":"[{\"score\":20},{\"score\":20}]"}
+ export function main(arg){
+ //JSON is a build-in object.
+ var point = JSON.parse(arg);
+ var s = 0;
+ print(point[0].score);
+ print(point.length);
+ for (var i=0;i
+ Data from contract:
+
+
+
+
+```
+The example resource file ”/ HTML /hello.js” is as follows:
+
+
+```javascript
+var queryDataFromContract = function(){
+ //第一个参数为函数名,第二个为参数,第三个参数为回调。
+ var data = executeCurrentContract("query","abc",function(argg){
+ $("#resultText")[0].innerHTML = argg.result;
+ });
+}
+```
+
+Reference example:
+
+
+
+
+### YJS-Python
+
+TODO
+
diff --git a/markdown_trans/markdown_BDWare/6_YJSAPI.md b/markdown_trans/markdown_BDWare/6_YJSAPI.md
new file mode 100644
index 0000000..c013829
--- /dev/null
+++ b/markdown_trans/markdown_BDWare/6_YJSAPI.md
@@ -0,0 +1,1181 @@
+# YJS SDK
+## YJS Build-in API
+
+### Built-in object Global
+
+
+### The built-in object Requester
+The built-in object will have a value in the Export Function only if the contract callsignatureis verified.
+
+
+### Execute the contract as executeContract
+
+Parameters:
+
+
+``` bash
+action:executeContract;
+contractID:合约的id或名称均可;
+operation:调用合约的方法名;
+arg: 参数;格式为JSON字符串,有action与arg两个字段。
+```
+
+Optional parameters:
+
+
+```bash
+requestID:字符串类型,自行生成,用于查询hash
+```
+
+Example:
+
+
+```javascript
+
+ function testExecutorContract(arg){
+ var ret = JSON.parse(executeContract("ElemeProvider","queryDB",arg));
+ if (ret.status == "Success"){
+ return JSON.parse(ret.result);
+ }else return null;
+ }
+```
+### Subscribe to the event subject Subscribe
+
+parameter
+
+
+``` bash
+contractID:字符串类型 合约id或名称均可。
+event:字符串类型
+handler:方法名,该方法必须接受Event(内含字段topic和content)类型的唯一变量为参数;可以不是export方法
+```
+
+Example:
+
+
+```javascript
+export function init(arg) {
+ YancloudUtil.subscribe("topic", handler);
+ print("Handler: " + handler);
+}
+
+function handler(e) {
+ print("topic: " + e.topic);
+ print("content: " + e.content);
+}
+
+```
+
+## Publish the event pubEvent
+
+parameter
+
+
+``` bash
+topic:字符串类型,发布的事件主题
+content:字符串类型,发布的事件内容
+```
+Example:
+
+
+```javascript
+export function pub1(arg) {
+ YancloudUtil.pubEvent("topic", arg);
+ return "done";
+}
+```
+
+You can also define an event at the beginning of the contract, so that the event name is the event subject, and you can publish the event directly using the event as the method name
+
+
+```javascript
+event topic;
+export function pub2(arg) {
+ topic(arg);
+ return "done";
+}
+```
+
+This is equivalent to `pub1` above.
+
+
+### Accessing Resource Files
+
+Run the global. Resources command to load the YPK internal resource file.
+
+#### loadAsInputStream
+
+Parameters:
+
+
+ ```bash
+ path:字符串类型 需要加载文件的地址
+ ```
+Example:
+
+
+ ```javascript
+ var file = Global.Resources.loadAsInputStream("/deleteit.txt");
+ ```
+
+#### loadAsScanner
+
+Parameters:
+
+
+ ```bash
+ path:字符串类型 需要加载文件的地址
+ ```
+
+Example:
+
+
+ ```javascript
+ var scanner = Global.Resources.loadAsScanner("/local.txt");
+ ```
+
+
+
+## YJS Build-in Annotation
+
+### @Access
+
+To set whether a contract call requires a signature, there are two types: signed and unsigned. Verified indicates that a signature is required. Others indicate that no signature is required.
+
+
+```
+@Access("verified")
+export function easy(arg){
+ return "true";
+}
+```
+
+### @LogType
+
+The LogType annotation declares the logging type of a contract or function as an argument.
+
+Arg indicates the contract execution parameter recorded in logs. Result indicates the return Result of recording the execution of the contract. Branch Indicates the Branch where contracts are executed.
+
+For example, declare a function with the following LogType annotation
+
+
+```
+@LogType("Arg","Result","Branch")
+export function easy(arg){
+ Global.a = "a";
+ Global.b = "b";
+ if(arg > 0)
+ return Global.a;
+ else
+ return Global.b;
+}
+```
+
+### @LogLocation
+
+This annotation can modify `contract` or `function`. Set the log storage location. Parameter“Dataware” is stored in the ledger and locally, if not, only locally. For example, use the following LogLocation to set the storage location.
+
+In the BaaS platform, you can specify the name of the account book. The default account book of the BaaS platform is default, and `@LogLocation("bdledger:default")` is used. To save to a custom ledger, for example, the“ABC” ledger, use `@LogLocation("bdledger:abc")`
+
+
+```
+@LogLocation("dataware")
+export function easy(arg){
+ Global.a = "a";
+}
+```
+
+
+### @Permission
+This annotation can only modify the permission of tool classes called in the `contract` setting contract, including File, Http, MySQL, MongoDB, RocksDB and other tool classes. If the above utility classes are used in the contract, corresponding authorization fields need to be added in the annotations. By default, only YancloudUtil is provided by YJS. An“Unauthorized utility class” exception is thrown if none is added. The six utility classes are described in detail later in this section.
+
+
+```
+@Permission("Http","File")
+contract HttpPermission {
+ export function main(args){
+ var http=HttpUtil.httpGet(args);
+ var dir="adf/adfas/";
+ var file=FileUtil.getDir(dir);
+ return YancloudUtil.currentTimeMillis();
+ }
+}
+```
+
+### @Description
+This annotation can modify `contract` or `function`. Exported a description of the contract and function can be used to generate an introduction of the exported function in the exported document.
+
+
+```
+@Description("返回数据条目,无需参数")
+export function count(args){
+ var sql = "select count(*) from data;";
+ var conn = getConn();
+ var statement = conn.createStatement();
+ var resultSet = statement.executeQuery(sql);
+ var c = {};
+ resultSet.next();
+ c.count = resultSet.getLong(1);
+ return JSON.stringify(c);
+}
+```
+
+### @Param
+This annotation can modify `function`. Provides examples of parameters to call the function, as well as default parameters to return results in the generation specification document.
+
+```
+@Param({"offset":0,"count":100})
+export function get(args){
+ var offset = args.offset;
+ var count = args.count;
+ ...
+}
+```
+### @MockTemplate
+This annotation can modify `function`. Provides a return mock data template for a function that describes the format of the return value. When invoked in debug mode with this annotation, returns simulated data generated in this format.
+
+
+#### Specifies the supported field types
+
+```
+@integer
+@string
+@boolean
+@date
+@time
+@datatime
+/[a-z][A-Z][0-9]/ (正则表达式)
+……
+详细格式可以参考http://mockjs.com/examples.html
+```
+#### Note that the template format is {′ result ’: template}
+
+```json
+//返回一个1-100之间的整数
+@MockTemplate({'result|1-100':1})
+//返回
+{'result':76}
+
+//返回一个1-5个数的数组
+@MockTemplate({'result|1-5':[{'value|1-100':1}]})
+//返回
+{"result":[{"value":34},{"value":8},{"value":48},{"value":50},{"value":43}]}
+
+//返回一个对象包含如下字段
+@MockTemplate({'result':{'id':'@integer','email':'@email','password':'@string','name':'@name'}})
+//返回
+{"password":"3ZLc","name":"William Young","id":36097783842688,"email":"d.fuunwe@gqnr.to"}
+
+
+//返回元素个数为1-5个之间的一个数组,数组的每个元素都是上述格式的一个对象
+{'result|1-5':[{'id':'@integer','email':'@email','password':'@string','name':'@name'}]}
+//返回
+[
+ {"password":"dO]wW","name":"Jeffrey Lopez","id":1783453207480410,"email":"a.ckokgxrga@hgiesugi.bb"},
+ {"password":"BQYRL","name":"Brian Moore","id":4310212972071102,"email":"k.lbpxocydrh@msgnjtox.na"},
+ {"password":"Gw1","name":"Susan Jackson","id":7766580783668916,"email":"h.zjgusl@htce.cr"}
+]
+```
+
+```
+@MockTemplate({'result':{'id':'@integer','email':'@email','password':'@string','name':'@name'}})
+export function count(args){
+ var sql = "select count(*) from data;";
+ var conn = getConn();
+ var statement = conn.createStatement();
+ var resultSet = statement.executeQuery(sql);
+ var c = {};
+ resultSet.next();
+ c.count = resultSet.getLong(1);
+ return JSON.stringify(c);
+}
+```
+### @Result
+This annotation can modify `function`. If there is no simulated data template, the content of this annotation provides an example of the result returned by the function when the data is simulated. If this annotation is added, the result is returned directly when the documentation is generated without calling the function with the default parameters.
+
+```
+@Result(666)
+export function count(args){
+ var sql = "select count(*) from data;";
+ var conn = getConn();
+ var statement = conn.createStatement();
+ var resultSet = statement.executeQuery(sql);
+ var c = {};
+ resultSet.next();
+ c.count = resultSet.getLong(1);
+ return JSON.stringify(c);
+}
+```
+## IO tools
+
+### An overview of
+
+|Name of the IO tool class|说明|
+|---|---|
+|[FileUtil](./YJSAPI.html#fileutil)| 文件操作相关的类 |
+|[LedgerUtil](./YJSAPI.html#ledgerutil)| 账本操作相关的类 |
+|[HttpUtil](./YJSAPI.html#httputil)| Http接口相关的类 |
+|[DOIPUtil](./YJSAPI.html#doiputil)| DoIP相关的类 |
+|[MySQLUtil](./YJSAPI.html#mysqlutil)| 连接mysql数据库 |
+|[MongoDBUtil](./YJSAPI.html#mongodbutil)| MongoDB连接相关的类 |
+|[RocksDBUtil](./YJSAPI.html#rocksdbutil)| RocksDB(基于本地文件的k-v数据库) |
+|[BDWareTimeSeriesDBUtil](./YJSAPI.html#BDWareTimeSeriesDBUtil)| 基于本地文件的时间序列数据库 |
+
+
+### FileUtil
+A FileUtil object can be introduced using @permission (“File”).
+
+
+```
+@Permission("File")
+contract FileSample {
+...
+}
+```
+
+This object supports the following methods:
+
+#### copyTo
+
+You can copy files and directories. The first parameter is source and the second parameter is destination.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | src |Type String|
+| 2 | dest |Type String|
+
+##### Use the sample
+
+
+```javascript
+var ret = FileUtil.copyTo("./source.txt","./dest.txt");
+```
+
+#### getContent
+
+If the file does not exist, ```undefined``` is returned.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+| --- | --- | --- |
+| 1 | path |Type String|
+
+##### Use the sample
+
+
+```javascript
+var ret = FileUtil.getContent("./source.txt");
+```
+#### getDir
+
+Get the name of the folder where the file resides. Enter a string as a parameter.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | path |Type String|
+
+##### Use the sample
+
+```javascript
+var ret = FileUtil.getDir("./parent/src.txt");
+// ret 为 "./parent/";
+```
+
+#### getFileName
+
+Get the file name. The input parameter is a string.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | path |Type String|
+
+##### Use the sample
+
+
+```javascript
+var ret = FileUtil.getFileName("./parent/src.txt");
+// ret 为 "src.txt"
+```
+
+
+#### openFileAsPrinter
+
+Open the file as PrintStream. The result is of type ```java.io.PrintStream```.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | path |File name. The type is String|
+| 2 | isAppend|The type is Boolean, indicating whether to add to the end of the file|
+
+##### Use the sample
+
+
+```javascript
+var ret = FileUtil.openFileAsPrinter("./parent/src.txt",true);
+ret.println("hello");
+ret.close();
+```
+
+### LedgerUtil
+
+You can use @permission (“Ledger”) to import LedgerUtil objects.
+
+```
+@Permission("Ledger")
+contract LedgerExample{
+...
+}
+```
+
+#### getClient
+
+Gets a connection client, one parameter, of the object type. The returned result is of the LedgerClient type, which is used for subsequent operations such as querying ledbooks.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | address |Contains two fields: IP and port|
+
+##### Use the sample
+
+
+```javascript
+var address = {};
+address.ip = "127.0.0.1";
+address.port = 18091;
+var ledgerClient = LedgerUtil.getClient(address);
+```
+
+#### queryByHash
+
+Queries transactions based on Hash. The returned result is an object containing from, to, type, and data, all of which are Strings. Where data is the byte array parsed according to UTF-8 encoding. If the encoding is not UTF8 when storing the certificate, garbled characters may be returned.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | client |Object obtained through the getClient method|
+| 2 | info |Object type. Two fields, ledger and hash, are strings|
+
+##### Use the sample
+
+
+```javascript
+// ... ledgerClient = LedgerUtil.getClient(...);
+var info = {};
+info.ledger = "bdcontract";
+info.hash = "4d3b75750835092a50085127702669615b602e53";
+var ret = LedgerUtil.queryByHash(ledgerClient,info);
+print(ret.from);
+print(ret.to);
+print(ret.type);
+print(ret.data);
+```
+
+#### sendTransaction
+
+Deposit data.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | client |Object obtained through the getClient method|
+| 2 | info |Object type, with from\to\data three fields, all String type|
+
+##### Use the sample
+
+
+```javascript
+// ... ledgerClient = LedgerUtil.getClient(...);
+var info = {};
+info.ledger = "bdcontract";
+info.from = "b60e8dd61c5d32be8058bb8eb970870f07233155";
+info.to = "b60e8dd61c5d32be8058bb8eb970870f07233155";
+info.data = "hello world";
+var ret = LedgerUtil.sendTransaction(ledgerClient,info);
+//ret为存证的哈希值
+print(ret);
+```
+
+### HttpUtil
+
+We can use @permission (“Http”) to import HttpUtil objects.
+
+```
+@Permission("Http")
+contract HttpExample{
+...
+}
+```
+
+#### createAPIGate
+
+It can be used with the mobile phone’s Yuan state. When the mobile phone is installed with Yuan State and the API interface is installed, it can become the data source.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | ip |The value is a string of IP. The default port number is 6161|
+
+##### Use the sample
+
+
+```javascript
+var ret = HttpUtil.createAPIGate("192.168.4.4");
+ret.get("com.tencent.mm","sendMsg","msg");
+print(ret);
+```
+
+#### createAPIGate
+
+It can be used with the mobile phone’s Yuan state. When the mobile phone is installed with Yuan State and the API interface is installed, it can become the data source.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | ip |The value is a string of type IP|
+| 2 | port |It is a string of type, port|
+
+##### Use the sample
+
+
+```javascript
+var ret = HttpUtil.createAPIGate("192.168.4.4", "6161");
+ret.get("com.tencent.mm","sendMsg","msg");
+print(ret);
+```
+
+#### get
+
+Initiate an Http GET request. The result is of object type and contains the Response and responseCode fields.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | url |A character string, indicating the URL type|
+
+##### Use the sample
+
+
+```javascript
+var ret = HttpUtil.get("https://www.baidu.com");
+print(ret.responseCode);
+print(ret.response);
+```
+
+#### post
+Make an Http POST request. The result is of object type and contains the Response and responseCode fields.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | args |Object type with URL, headers, and data fields. Args. headers is the object type.|
+
+##### Use the sample
+
+
+```javascript
+var req = {};
+req.url = "https://www.baidu.com";
+req.data = "hello";
+req.header = {};
+req.header.Accept = "application/json";
+req.header["Content-Type"] = "application/json";
+var ret = HttpUtil.post(req);
+print(ret.resposeCode);
+print(ret.response);
+```
+
+### DOIPUtil
+
+The DOIPUtil object can be introduced using @permission (“DOIP”).
+
+```
+@Permission("DOIP")
+contract DOIPExample{
+ ...
+}
+```
+
+#### call
+Call a DO
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 |arg0|The string type identifies the target DO|
+| 2 |arg1|The input parameter is a string|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.call("86.5000.470/do.hello","inputString");
+```
+#### create
+Create a string of type DO to a Repository
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | arg0 |A string that identifies the target Repo|
+| 2 |arg1|Object type, including doID,doBody field|
+
+##### Use the sample
+
+
+```javascript
+var digitalObject = JSON.parse("{\"doID\":\"86.5000.470/do.hello\",\"doBody\":\"hello world\"}");
+var ret = DOIPUtil.create("86.5000.470/repo.localTcpRepo",digitalObject);
+```
+#### delete
+Remove DO from a Repository
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | arg0 |The string type target DO identifier|
+| 2 |arg1|String type target Repo identity|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.delete("86.5000.470/do.hello","86.5000.470/repo.localTcpRepo");
+```
+#### hello
+Gets the DOIP service information of the target Repository
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | arg0 |String type target Repo identity|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.hello("86.5000.470/repo.localTcpRepo");
+```
+#### listOperation
+Gets the DOIP operations supported by the target DO
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | arg0 |The string type target DO identifier|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.listOperation("86.5000.470/do.hello");
+```
+#### register
+Register a DO with the LHS and return the assigned identity
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | arg0 |Repo identifier of the string type DO|
+| 2 | arg1 |String type DO Format description string|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.register("86.5000.470/repo.localTcpRepo","String");
+```
+#### reregister
+Example Modify the registration information of the DO on the LHS
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | arg0 |The string type target DO identifier|
+| 2 | arg1 |Repo identifier of the string type DO|
+| 3 |arg2|String type DO Format description string|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.reregister("86.5000.470/do.hello","86.5000.470/repo.localTcpRepo","String");
+```
+#### retrieve
+Get a DO
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | arg0 |The string type target DO identifier|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.retrieve("86.5000.470/do.hello");
+```
+### test
+Tests whether DOIPUtils is available
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | arg0 |String Type Any string|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.test("hello");
+```
+#### update
+Update target DO
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | arg0 |JS object, including doID,doBody field|
+
+##### Use the sample
+
+
+```javascript
+var digitalObject = JSON.parse("{\"doID\":\"86.5000.470/do.hello\",\"doBody\":\"hello world\"}");
+var ret = DOIPUtil.update(digitalObject);
+```
+
+
+
+### MySQLUtil
+
+You can use @permission (“MySQL”) to import the MySQLUtil object.
+
+```
+@Permission("MySQL")
+contract MySQLExample{
+...
+}
+```
+
+
+#### getConnection
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | URL |String type, JDBC connection|
+| 2 | usrName |The value is a string of user names|
+| 3 | pwd |The value is a string of characters and a password|
+
+
+##### Use the sample
+
+
+```javascript
+var url = "jdbc:mysql://xx.xx.xx:port/tableName";
+var usrName = "xxx";
+var pwd = "xxx";
+//配置好用户名和密码,url格式为ip或域名+端口,中间以”:”隔开。
+var conn = MySQLUtil.getConnection(url,usrName,pwd);
+//获取数据库连接
+var sql = "select * from newele.data";
+//创建查询语句
+var statement = conn.createStatement();
+var resultSet = statement.executeQuery(sql);
+var waimailist = [];
+//解析查询结果
+var meta = resultSet.getMetaData();
+for (;resultSet.next();){
+ var line = {};
+ for (var j=1;j<=meta.getColumnCount();j++){
+ line[meta.getColumnName(j)] = resultSet.getString(j);
+ }
+ waimailist.push(line);
+}
+```
+
+In this case, the object returned by the getConnection method is bound to a java.util.Connection object in Java through the reflection mechanism. Therefore, you can view:
+
+To learn how to operate the Mysql database.
+
+
+### MongoDBUtil
+
+The MongoDBUtil object can be introduced using @permission (“MongoDB”).
+
+```
+@Permission("MongoDB")
+contract MongoDBExample{
+...
+}
+```
+
+#### getConnection
+
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | URL |The URL of a database of string type|
+| 2 | port |Port number of an integer type|
+| 3 | dbName |The name of the database of string type|
+| 4 | usrName |The user name of a string database|
+| 5 | pwd |Password of a string database|
+
+
+##### Use the sample
+
+** Note: port is an integer and other parameters are strings **
+
+
+```javascript
+var client = MongoDBUtil.getConnection(url,port,dbName,usrName,pwd);
+//获取数据库对象
+var db = client.getDatabase("yancloud");
+var collection = db.getCollection("containers");
+var iter = collection.find().iterator();
+var ret ="";
+for (;iter.hasNext();){
+ ret+=iter.next().toJson();
+ ret+="\n";
+}
+```
+
+Here, getMongoDBClient object is bound to a com.mongodb.MongoClient object in Java via reflection mechanism. Therefore, you can view:
+
+
+To learn more about how this object works and how it can be used.
+
+### RocksDBUtil
+
+Use @permission (“RocksDB”) to import the RocksDBUtil object.
+
+
+```
+@Permission("RocksDB")
+contract RocksDBSample {
+...
+}
+```
+
+#### loadDB
+
+Load a RocksDB database with loadDB. After the load is loaded, you can perform operations such as GET, delete, and PUT.
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | path |The path where the string database is deployed|
+| 2 | readOnly |The Boolean database is read-only|
+
+##### Use the sample
+
+
+```
+@Permission("RocksDB")
+@Description("这是个使用RocksDB的参考代码")
+contract RocksDBSample{
+ function onCreate(){
+ Global.rocksdb = RocksDBUtil.loadDB("./dbdir/","false");
+ }
+ @Description("示例参数: {\"key\":\"abc\",\"value\":\"def\"}")
+ export function put(arg){
+ arg = JSON.parse(arg);
+ Global.rocksdb.put(arg.key,arg.value);
+ return "success";
+ }
+ @Description("示例参数: \"abc\"}")
+ export function get(arg){
+ return Global.rocksdb.get(arg);
+ return "failed";
+ }
+ @Description("示例参数: \"abc\"")
+ export function deleteKey(arg){
+ return Global.rocksdb.delete(arg);
+ }
+ @Description("遍历KV库,无需参数")
+ export function iter(arg){
+ var iter = Global.rocksdb.newIterator();
+ var obj = undefined;
+ var ret = {
+ };
+ for (iter.seekToFirst();(obj=Global.rocksdb.getNext(iter))!=undefined;){
+ ret[obj.key]=obj.value;
+ }
+ return JSON.stringify(ret)
+ }
+}
+```
+
+### BDWareTimeSeriesDBUtil
+
+Use the sample
+
+
+```
+@Permission("BDWareTimeSeriesDB")
+contract BDWareTimeDBExample{
+ function onCreate(arg){
+ Global.dbutil = BDWareTimeSeriesDBUtil.getConnection();
+ }
+
+ export function put(arg){
+ //第一个参数为表名,第二个参数为要放的value,时间戳自动打。
+ Global.dbutil.put("defaultTable",arg);
+ return "success";
+ }
+ @Param
+ export function getCount(arg){
+ return Global.dbutil.getCount("defaultTable");
+ }
+ @Param(1617254937373)
+ export function queryByStartTime(arg){
+ var startDate = java.lang.Long.valueOf(arg);
+ //查询从开始时刻startDate到最新的数据
+ var list = Global.dbutil.query("defaultTable",startDate);
+ var ret=[];
+ print("DBUtil"+Global.dbutil+" list:"+list+" list.size"+list.size());
+ var i=0;
+ for (i=0;i"+list.get(i));
+ ret.push(list.get(i));
+ }
+ return ret;
+ }
+
+ @Description("示例参数: {\"offset\":1,\"len\":1}")
+ @Param({"offset":1,"len":1})
+ export function queryByOffset(arg){
+ var offsetLen = JSON.parse(arg);
+ //可配合getCount使用,查询第offset至offset+len条数据
+ var list = Global.dbutil.queryByOffset("defaultTable",offsetLen.offset,offsetLen.len);
+ var ret=[];
+ print("DBUtil"+Global.dbutil+" list:"+list+" list.size"+list.size());
+ var i=0;
+ for (i=0;i"+list.get(i));
+ ret.push(list.get(i));
+ }
+ return ret;
+ }
+}
+
+```
+
+
+## Encryption and decryption tools
+
+
+### SM2
+The SM2Util object can be imported using @permission (“SM2”).
+
+
+```
+@Permission("SM2")
+contract SM2Sample {
+...
+}
+```
+
+#### generateKeyPair
+Generate public and private keys.
+
+##### 参数
+No parameters.
+
+##### Use the sample
+
+
+```javascript
+var ret = SM2Util.generateKeyPair();
+print(ret.publicKey);
+print(ret.privateKey);
+return JSON.stringify(ret);
+```
+
+#### sign
+
+The signature.
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | content |The value is a string of characters to be signed|
+| 2 |keyPair| sm2 |
+
+
+##### Use the sample
+
+
+```
+var keypair = SM2Util.generateKeyPair();
+var ret = SM2Util.sign("Hello",keypair);
+print(ret.status);
+//如果status是success
+print(ret.signature);
+//如果status是failed
+print(ret.message);
+```
+
+#### verify
+
+Attestation.
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | content |The value is a string of characters to be verified|
+| 2 | signature | 字符串类型 签名 |
+| 3 |publicKey| 字符串类型 公钥 |
+
+##### Use the sample
+
+
+```javascript
+var ret = SM2Util.verify("Hello","....签名","...公钥");
+// 验证通过时,result为true,status为success
+// 失败时,result为failed,status为failed
+print(ret.status);
+print(ret.result);
+```
+
+## Multithreading Tool class
+
+### AsyncUtil
+
+An AsyncUtil object can be introduced using @permission (“Async”).
+
+```
+@Permission("Async")
+contract AsyncExample{
+ export function longTimeTask(arg){
+ var a = {
+ };
+ a.count = 100;
+ AsyncUtil.postFunction(taskFun,a);
+ }
+ function taskFun(arg){
+ Global.progress = 0;
+ for (var i=0;i
+
+* Number
+
+* Math
+
+* Date
+
+* RegExp
+
+* Error
+
+* JSON
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-横版.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-横版.png
new file mode 100644
index 0000000..ab47958
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-横版.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-横版@2x.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-横版@2x.png
new file mode 100644
index 0000000..1e47d6f
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-横版@2x.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-横版@3x.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-横版@3x.png
new file mode 100644
index 0000000..4678a9a
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-横版@3x.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-竖版.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-竖版.png
new file mode 100644
index 0000000..3b8e931
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-竖版.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-竖版@2x.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-竖版@2x.png
new file mode 100644
index 0000000..1fe4458
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-竖版@2x.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-竖版@3x.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-竖版@3x.png
new file mode 100644
index 0000000..65e3c1a
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo-镂空反白-竖版@3x.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo深色背景-横版.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo深色背景-横版.png
new file mode 100644
index 0000000..6657c8e
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo深色背景-横版.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo深色背景-横版@2x.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo深色背景-横版@2x.png
new file mode 100644
index 0000000..8f47df3
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo深色背景-横版@2x.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo深色背景-横版@3x.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo深色背景-横版@3x.png
new file mode 100644
index 0000000..a64dac0
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo深色背景-横版@3x.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版-深色背景.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版-深色背景.png
new file mode 100644
index 0000000..81e793a
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版-深色背景.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版-深色背景@2x.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版-深色背景@2x.png
new file mode 100644
index 0000000..7a6ae50
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版-深色背景@2x.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版-深色背景@3x.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版-深色背景@3x.png
new file mode 100644
index 0000000..1a4b696
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版-深色背景@3x.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版.png
new file mode 100644
index 0000000..062258b
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版@2x.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版@2x.png
new file mode 100644
index 0000000..32a5e10
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版@2x.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版@3x.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版@3x.png
new file mode 100644
index 0000000..ea02f33
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数瑞logo竖版@3x.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数睿logo横版.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数睿logo横版.png
new file mode 100644
index 0000000..b72352b
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数睿logo横版.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数睿logo横版@2x.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数睿logo横版@2x.png
new file mode 100644
index 0000000..d022b52
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数睿logo横版@2x.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/02-logos/北大数睿logo横版@3x.png b/markdown_trans/markdown_BDWare/_static/02-logos/北大数睿logo横版@3x.png
new file mode 100644
index 0000000..70c0436
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/02-logos/北大数睿logo横版@3x.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/analysis.png b/markdown_trans/markdown_BDWare/_static/imgs/analysis.png
new file mode 100644
index 0000000..88ac1d3
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/analysis.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/analysis1.png b/markdown_trans/markdown_BDWare/_static/imgs/analysis1.png
new file mode 100644
index 0000000..4e5774d
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/analysis1.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/analysis2.png b/markdown_trans/markdown_BDWare/_static/imgs/analysis2.png
new file mode 100644
index 0000000..4b0ab0d
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/analysis2.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/analysis3.png b/markdown_trans/markdown_BDWare/_static/imgs/analysis3.png
new file mode 100644
index 0000000..a1bb383
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/analysis3.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/analysisExecuteResult.png b/markdown_trans/markdown_BDWare/_static/imgs/analysisExecuteResult.png
new file mode 100644
index 0000000..80b52cd
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/analysisExecuteResult.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/authList.jpg b/markdown_trans/markdown_BDWare/_static/imgs/authList.jpg
new file mode 100644
index 0000000..741d070
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/authList.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/authMan.jpg b/markdown_trans/markdown_BDWare/_static/imgs/authMan.jpg
new file mode 100644
index 0000000..df1041e
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/authMan.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/authMana.jpg b/markdown_trans/markdown_BDWare/_static/imgs/authMana.jpg
new file mode 100644
index 0000000..1fb6be4
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/authMana.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/authNodeManager.jpg b/markdown_trans/markdown_BDWare/_static/imgs/authNodeManager.jpg
new file mode 100644
index 0000000..ce63e83
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/authNodeManager.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/authorizationOrNot.jpg b/markdown_trans/markdown_BDWare/_static/imgs/authorizationOrNot.jpg
new file mode 100644
index 0000000..7ca81fc
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/authorizationOrNot.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/bash-api.png b/markdown_trans/markdown_BDWare/_static/imgs/bash-api.png
new file mode 100644
index 0000000..3d6cc3b
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/bash-api.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/centerManager.jpg b/markdown_trans/markdown_BDWare/_static/imgs/centerManager.jpg
new file mode 100644
index 0000000..eabae32
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/centerManager.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/centerNodeList.png b/markdown_trans/markdown_BDWare/_static/imgs/centerNodeList.png
new file mode 100644
index 0000000..e8668f9
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/centerNodeList.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/centerNodePage.png b/markdown_trans/markdown_BDWare/_static/imgs/centerNodePage.png
new file mode 100644
index 0000000..07e78d8
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/centerNodePage.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/centerNodePreview.png b/markdown_trans/markdown_BDWare/_static/imgs/centerNodePreview.png
new file mode 100644
index 0000000..111c9ea
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/centerNodePreview.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/centerNodeUnitCreate.png b/markdown_trans/markdown_BDWare/_static/imgs/centerNodeUnitCreate.png
new file mode 100644
index 0000000..314f71e
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/centerNodeUnitCreate.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/centerNodeUnits.png b/markdown_trans/markdown_BDWare/_static/imgs/centerNodeUnits.png
new file mode 100644
index 0000000..fa7e86d
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/centerNodeUnits.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/checkUser.jpg b/markdown_trans/markdown_BDWare/_static/imgs/checkUser.jpg
new file mode 100644
index 0000000..9c94318
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/checkUser.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/checkUser.png b/markdown_trans/markdown_BDWare/_static/imgs/checkUser.png
new file mode 100644
index 0000000..2282d10
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/checkUser.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/chooseInstance.png b/markdown_trans/markdown_BDWare/_static/imgs/chooseInstance.png
new file mode 100644
index 0000000..dd58914
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/chooseInstance.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/clientLoadProcess.png b/markdown_trans/markdown_BDWare/_static/imgs/clientLoadProcess.png
new file mode 100644
index 0000000..df9efc1
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/clientLoadProcess.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/closePermission.png b/markdown_trans/markdown_BDWare/_static/imgs/closePermission.png
new file mode 100644
index 0000000..2df7c24
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/closePermission.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/codeManage1-1.png b/markdown_trans/markdown_BDWare/_static/imgs/codeManage1-1.png
new file mode 100644
index 0000000..2af24cb
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/codeManage1-1.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/codeManage1-2.png b/markdown_trans/markdown_BDWare/_static/imgs/codeManage1-2.png
new file mode 100644
index 0000000..57d5727
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/codeManage1-2.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/codeManage1.png b/markdown_trans/markdown_BDWare/_static/imgs/codeManage1.png
new file mode 100644
index 0000000..aff2b9a
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/codeManage1.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/codeManage2.png b/markdown_trans/markdown_BDWare/_static/imgs/codeManage2.png
new file mode 100644
index 0000000..dd4fad0
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/codeManage2.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/codeManage3.png b/markdown_trans/markdown_BDWare/_static/imgs/codeManage3.png
new file mode 100644
index 0000000..7676d76
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/codeManage3.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/codeManage4.png b/markdown_trans/markdown_BDWare/_static/imgs/codeManage4.png
new file mode 100644
index 0000000..ad0606d
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/codeManage4.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/codeManage5.png b/markdown_trans/markdown_BDWare/_static/imgs/codeManage5.png
new file mode 100644
index 0000000..8b9c382
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/codeManage5.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/codeManage6.png b/markdown_trans/markdown_BDWare/_static/imgs/codeManage6.png
new file mode 100644
index 0000000..03ade62
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/codeManage6.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/codeManage7.png b/markdown_trans/markdown_BDWare/_static/imgs/codeManage7.png
new file mode 100644
index 0000000..4a48550
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/codeManage7.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/codeManage8.png b/markdown_trans/markdown_BDWare/_static/imgs/codeManage8.png
new file mode 100644
index 0000000..57ad15e
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/codeManage8.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/codeManageMenu.png b/markdown_trans/markdown_BDWare/_static/imgs/codeManageMenu.png
new file mode 100644
index 0000000..ddaf7d1
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/codeManageMenu.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/config.png b/markdown_trans/markdown_BDWare/_static/imgs/config.png
new file mode 100644
index 0000000..111d0ca
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/config.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/contract.jpg b/markdown_trans/markdown_BDWare/_static/imgs/contract.jpg
new file mode 100644
index 0000000..a165388
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/contract.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/contractList.jpg b/markdown_trans/markdown_BDWare/_static/imgs/contractList.jpg
new file mode 100644
index 0000000..6cf8be2
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/contractList.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/contractLog.jpg b/markdown_trans/markdown_BDWare/_static/imgs/contractLog.jpg
new file mode 100644
index 0000000..de245e6
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/contractLog.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/contractMode.png b/markdown_trans/markdown_BDWare/_static/imgs/contractMode.png
new file mode 100644
index 0000000..b32397b
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/contractMode.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/contracteveryLog.jpg b/markdown_trans/markdown_BDWare/_static/imgs/contracteveryLog.jpg
new file mode 100644
index 0000000..65d683b
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/contracteveryLog.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/dashboard.jpg b/markdown_trans/markdown_BDWare/_static/imgs/dashboard.jpg
new file mode 100644
index 0000000..23c862b
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/dashboard.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/deploytopology.png b/markdown_trans/markdown_BDWare/_static/imgs/deploytopology.png
new file mode 100644
index 0000000..c326fac
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/deploytopology.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/dirstructure.png b/markdown_trans/markdown_BDWare/_static/imgs/dirstructure.png
new file mode 100644
index 0000000..e2c6098
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/dirstructure.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/docs.png b/markdown_trans/markdown_BDWare/_static/imgs/docs.png
new file mode 100644
index 0000000..828ecf9
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/docs.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/everyLog.jpg b/markdown_trans/markdown_BDWare/_static/imgs/everyLog.jpg
new file mode 100644
index 0000000..fcc7c56
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/everyLog.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/executeResult.png b/markdown_trans/markdown_BDWare/_static/imgs/executeResult.png
new file mode 100644
index 0000000..21b9e51
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/executeResult.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/favicon.ico b/markdown_trans/markdown_BDWare/_static/imgs/favicon.ico
new file mode 100644
index 0000000..56aa953
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/favicon.ico differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/fork1.png b/markdown_trans/markdown_BDWare/_static/imgs/fork1.png
new file mode 100644
index 0000000..931a43b
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/fork1.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/fork2.png b/markdown_trans/markdown_BDWare/_static/imgs/fork2.png
new file mode 100644
index 0000000..6f0d531
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/fork2.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/fork3.png b/markdown_trans/markdown_BDWare/_static/imgs/fork3.png
new file mode 100644
index 0000000..81702dc
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/fork3.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/genReadme.png b/markdown_trans/markdown_BDWare/_static/imgs/genReadme.png
new file mode 100644
index 0000000..dd3347a
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/genReadme.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/http-api.png b/markdown_trans/markdown_BDWare/_static/imgs/http-api.png
new file mode 100644
index 0000000..be7b2f9
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/http-api.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/ide_screenshots1.1.png b/markdown_trans/markdown_BDWare/_static/imgs/ide_screenshots1.1.png
new file mode 100644
index 0000000..7588fb1
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/ide_screenshots1.1.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/ide_screenshots2.2.png b/markdown_trans/markdown_BDWare/_static/imgs/ide_screenshots2.2.png
new file mode 100644
index 0000000..a4a766d
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/ide_screenshots2.2.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/index.png b/markdown_trans/markdown_BDWare/_static/imgs/index.png
new file mode 100644
index 0000000..5cc7516
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/index.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/intanceExecute.png b/markdown_trans/markdown_BDWare/_static/imgs/intanceExecute.png
new file mode 100644
index 0000000..bd66b1f
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/intanceExecute.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/licence.jpg b/markdown_trans/markdown_BDWare/_static/imgs/licence.jpg
new file mode 100644
index 0000000..22010d6
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/licence.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/licence.png b/markdown_trans/markdown_BDWare/_static/imgs/licence.png
new file mode 100644
index 0000000..cca1c2d
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/licence.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/log.jpg b/markdown_trans/markdown_BDWare/_static/imgs/log.jpg
new file mode 100644
index 0000000..075d0b0
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/log.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/log1.png b/markdown_trans/markdown_BDWare/_static/imgs/log1.png
new file mode 100644
index 0000000..04e05a0
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/log1.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/log2.png b/markdown_trans/markdown_BDWare/_static/imgs/log2.png
new file mode 100644
index 0000000..33773f7
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/log2.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/log3.png b/markdown_trans/markdown_BDWare/_static/imgs/log3.png
new file mode 100644
index 0000000..a2bde90
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/log3.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/logMenu.png b/markdown_trans/markdown_BDWare/_static/imgs/logMenu.png
new file mode 100644
index 0000000..9fd8fc5
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/logMenu.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/logo.png b/markdown_trans/markdown_BDWare/_static/imgs/logo.png
new file mode 100644
index 0000000..79d515e
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/logo.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/logo2.png b/markdown_trans/markdown_BDWare/_static/imgs/logo2.png
new file mode 100644
index 0000000..ab47958
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/logo2.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/memoryDump.png b/markdown_trans/markdown_BDWare/_static/imgs/memoryDump.png
new file mode 100644
index 0000000..44356a2
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/memoryDump.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/node.jpg b/markdown_trans/markdown_BDWare/_static/imgs/node.jpg
new file mode 100644
index 0000000..9827b89
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/node.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/nodeConfig.png b/markdown_trans/markdown_BDWare/_static/imgs/nodeConfig.png
new file mode 100644
index 0000000..1954dc2
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/nodeConfig.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/nodeConfigChange.png b/markdown_trans/markdown_BDWare/_static/imgs/nodeConfigChange.png
new file mode 100644
index 0000000..1f771a9
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/nodeConfigChange.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/nodeInfo.jpg b/markdown_trans/markdown_BDWare/_static/imgs/nodeInfo.jpg
new file mode 100644
index 0000000..2282d10
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/nodeInfo.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/nodeInstancesList.png b/markdown_trans/markdown_BDWare/_static/imgs/nodeInstancesList.png
new file mode 100644
index 0000000..e7e3fd1
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/nodeInstancesList.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/nodeInstancesPage.png b/markdown_trans/markdown_BDWare/_static/imgs/nodeInstancesPage.png
new file mode 100644
index 0000000..35e8478
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/nodeInstancesPage.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/nodeLicence.png b/markdown_trans/markdown_BDWare/_static/imgs/nodeLicence.png
new file mode 100644
index 0000000..940bab1
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/nodeLicence.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/nodeUnits.png b/markdown_trans/markdown_BDWare/_static/imgs/nodeUnits.png
new file mode 100644
index 0000000..502d271
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/nodeUnits.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/nodeUserManager.jpg b/markdown_trans/markdown_BDWare/_static/imgs/nodeUserManager.jpg
new file mode 100644
index 0000000..24a4612
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/nodeUserManager.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/nullPermission.png b/markdown_trans/markdown_BDWare/_static/imgs/nullPermission.png
new file mode 100644
index 0000000..7573bdb
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/nullPermission.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/opList.jpg b/markdown_trans/markdown_BDWare/_static/imgs/opList.jpg
new file mode 100644
index 0000000..52098d9
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/opList.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/operator.jpg b/markdown_trans/markdown_BDWare/_static/imgs/operator.jpg
new file mode 100644
index 0000000..9417d67
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/operator.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/permissionShow.png b/markdown_trans/markdown_BDWare/_static/imgs/permissionShow.png
new file mode 100644
index 0000000..34223df
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/permissionShow.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/pic1.png b/markdown_trans/markdown_BDWare/_static/imgs/pic1.png
new file mode 100644
index 0000000..804b056
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/pic1.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/pic2.png b/markdown_trans/markdown_BDWare/_static/imgs/pic2.png
new file mode 100644
index 0000000..f4b8520
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/pic2.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/plicence.jpg b/markdown_trans/markdown_BDWare/_static/imgs/plicence.jpg
new file mode 100644
index 0000000..5250e6d
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/plicence.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/projectdir.png b/markdown_trans/markdown_BDWare/_static/imgs/projectdir.png
new file mode 100644
index 0000000..4298746
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/projectdir.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/roleAuth.jpg b/markdown_trans/markdown_BDWare/_static/imgs/roleAuth.jpg
new file mode 100644
index 0000000..b00e6ce
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/roleAuth.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/set.jpg b/markdown_trans/markdown_BDWare/_static/imgs/set.jpg
new file mode 100644
index 0000000..56ddd88
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/set.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/shortcut.png b/markdown_trans/markdown_BDWare/_static/imgs/shortcut.png
new file mode 100644
index 0000000..bd940ee
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/shortcut.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/shortcut3.png b/markdown_trans/markdown_BDWare/_static/imgs/shortcut3.png
new file mode 100644
index 0000000..e000d9b
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/shortcut3.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/timeTravel.png b/markdown_trans/markdown_BDWare/_static/imgs/timeTravel.png
new file mode 100644
index 0000000..a9317a8
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/timeTravel.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/timetravel2.png b/markdown_trans/markdown_BDWare/_static/imgs/timetravel2.png
new file mode 100644
index 0000000..495ff0a
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/timetravel2.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/timetravel3.png b/markdown_trans/markdown_BDWare/_static/imgs/timetravel3.png
new file mode 100644
index 0000000..c227866
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/timetravel3.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/timetravel4.png b/markdown_trans/markdown_BDWare/_static/imgs/timetravel4.png
new file mode 100644
index 0000000..d3347cc
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/timetravel4.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/trustful.png b/markdown_trans/markdown_BDWare/_static/imgs/trustful.png
new file mode 100644
index 0000000..f09d767
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/trustful.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/updatePermission.png b/markdown_trans/markdown_BDWare/_static/imgs/updatePermission.png
new file mode 100644
index 0000000..7998271
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/updatePermission.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/userActive.jpg b/markdown_trans/markdown_BDWare/_static/imgs/userActive.jpg
new file mode 100644
index 0000000..0ea95ac
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/userActive.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/userAll.jpg b/markdown_trans/markdown_BDWare/_static/imgs/userAll.jpg
new file mode 100644
index 0000000..ef58c6d
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/userAll.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/userApplyGraph.jpg b/markdown_trans/markdown_BDWare/_static/imgs/userApplyGraph.jpg
new file mode 100644
index 0000000..343e946
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/userApplyGraph.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/userList.jpg b/markdown_trans/markdown_BDWare/_static/imgs/userList.jpg
new file mode 100644
index 0000000..927e5fd
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/userList.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/userManager.jpg b/markdown_trans/markdown_BDWare/_static/imgs/userManager.jpg
new file mode 100644
index 0000000..05903ec
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/userManager.jpg differ
diff --git a/markdown_trans/markdown_BDWare/_static/imgs/websocket-api.png b/markdown_trans/markdown_BDWare/_static/imgs/websocket-api.png
new file mode 100644
index 0000000..9e38a75
Binary files /dev/null and b/markdown_trans/markdown_BDWare/_static/imgs/websocket-api.png differ
diff --git a/markdown_trans/markdown_BDWare/_static/js/createWS.js b/markdown_trans/markdown_BDWare/_static/js/createWS.js
new file mode 100644
index 0000000..3638f73
--- /dev/null
+++ b/markdown_trans/markdown_BDWare/_static/js/createWS.js
@@ -0,0 +1,169 @@
+var createWssocket = function(wsurl, onopen, handler) {
+ console.log("[createWS.js] createWssocket : ");
+ var retsocket = {};
+ var wssocket = new WebSocket(wsurl);
+ wssocket.onerror = function(error) {
+ console.log(error);
+ };
+ wssocket.onopen = onopen;
+ var onmessage = function(event) {
+ var obj = JSON.parse(event.data);
+ switch (obj.action) {
+ case 'sendNextSegment':
+ retsocket.sendNextSegment();
+ break;
+ case 'sendSeg':
+ retsocket.receiveSeg(obj);C
+ break;
+ default:
+ handler(event, wssocket);
+ }
+ };
+ var reconnect = function(error) {
+ setTimeout(function() {
+ console.log("[createWS.js] try to reconnect");
+ wssocket = new WebSocket(wsurl);
+ wssocket.onclose = reconnect;
+ wssocket.onmessage = onmessage;
+ //wssocket.onopen = onopen;
+ }, 1000);
+ };
+ wssocket.onclose = reconnect;
+
+ retsocket.receiveSeg = function(obj) {
+ if (obj.cid == 'start') {
+ retsocket.toReceive = "";
+ }
+ retsocket.toReceive += obj.data;
+ if (obj.cid == 'done') {
+ console.log("[receiveSeg] Received AllData:" + retsocket.toReceive);
+ var event = {};
+ event.data = retsocket.toReceive;
+ retsocket.toReceive = "";
+ handler(event);
+ }
+ };
+ wssocket.onmessage = onmessage;
+
+ retsocket.isSending = false;
+ retsocket.sendList = [];
+ retsocket.monitor = function() {
+ if (!retsocket.isSending) {
+ if (retsocket.sendList.length > 0) {
+ retsocket.send(retsocket.sendList.pop());
+ }
+ }
+ setTimeout(retsocket.monitor, 1000);
+ };
+ // TODO: we don't need monitor at all?
+ retsocket.monitor();
+ retsocket.send = function(str) {
+ if (retsocket.isSending) {
+ retsocket.sendList.push(str);
+ return;
+ }
+ if (str.length > 1024) {
+ retsocket.isSending = true;
+ retsocket.toSend = str.substr(1024);
+ var obj = {};
+ obj.isSegment = true;
+ obj.data = str.substr(0, 1024);
+ wssocket.send(JSON.stringify(obj));
+ } else
+ wssocket.send(str);
+ };
+ retsocket.sendNextSegment = function() {
+ var str = retsocket.toSend;
+ if (str.length > 1024) {
+ retsocket.toSend = str.substr(1024);
+ var obj = {};
+ obj.isSegment = true;
+ obj.data = str.substr(0, 1024);
+ wssocket.send(JSON.stringify(obj));
+ } else {
+ retsocket.toSend = "";
+ var obj = {};
+ obj.isSegment = false;
+ obj.data = str;
+ wssocket.send(JSON.stringify(obj));
+ retsocket.isSending = false;
+ if (retsocket.sendList.length > 0) {
+ retsocket.send(retsocket.sendList.pop());
+ }
+ }
+ };
+ retsocket.isOpen = function() {
+ return wssocket.readyState;
+ }
+ return retsocket;
+};
+
+var aesDecrypt = function(data) {
+ data = cryptico.b64to256(data);
+ var encryptedBlocks = cryptico.string2bytes(data);
+ var exkey = global.aesKey.slice(0);
+ aes.ExpandKey(exkey);
+ aes.Decrypt(encryptedBlocks, exkey);
+ return cryptico.bytes2string(encryptedBlocks);
+
+};
+var aesEncrypt = function(data, aesKey) {
+ var key = aesKey;
+ var exkey = key.slice(0);
+ aes.ExpandKey(exkey);
+ var blocks = my.string2bytes(data);
+ blocks = my.pad16(blocks);
+ aes.Encrypt(blocks, exkey);
+ ciphertext = cryptico.bytes2string(blocks);
+ ciphertext = cryptico.b256to64(ciphertext);
+ return ciphertext;
+};
+var rsaEncrypt = function(data, rsaKey) {
+ var rsa = new RSAKey();
+ rsa.setPublic(rsaKey.n, rsaKey.e1);
+ var result = rsa.encrypt(data);
+ return result;
+};
+var loadRSAKey = function(rsaKey) {
+ var str = cryptico.b64to256(rsaKey);
+ str = str.split(",");
+ var ret = {};
+ ret.n = str[0];
+ ret.e1 = str[1];
+ ret.e2 = str[2];
+ return ret;
+};
+var testRSA = function() {
+ pubKey = loadRSAKey(global.privKey);
+ reqContent = {};
+ reqContent.action = "main";
+ reqContent.arg = "[{\"score\":20},{\"score\":20}]";
+ reqContent.contractID = "abc";
+ eReq = encryptReq(reqContent, pubKey);
+ url = "http://localhost:8080/SCIDE/SCManager?action=executeContractEncrypted&contractRequest="
+ + encodeURIComponent(JSON.stringify(eReq));
+};
+
+var encryptReq = function(reqContent, pubKey) {
+ // global.pubKey = loadRSAKey(global.privKey);
+ var aes = {};
+ aes.key = cryptico.generateAESKey();
+ var aesObj = JSON.stringify(aes);
+ var rsa = new RSAKey();
+ rsa.setPrivate(pubKey.n, pubKey.e1, pubKey.e2);
+ var encrypedReq = {};
+ encrypedReq.action = rsa.decrypt(aesObj);
+ encrypedReq.contractID = reqContent.contractID;
+ reqContent.contractID = undefined;
+ encrypedReq.arg = JSON.stringify(reqContent);
+ encrypedReq.arg = aesEncrypt(encrypedReq.arg, aes.key);
+ encrypedReq.requester = pubKey.n + "," + pubKey.e1 + "," + "0";
+ encrypedReq.requester = cryptico.b256to64(encrypedReq.requester);
+ return encrypedReq;
+};
+// global.aesKey = cryptico.generateAESKey();
+//
+// var url = "ws://" +
+// document.location.host+(document.location.pathname.replace("scide.html",
+// "SCExecutor"));
+// global.wssocket = createWssocket(url, WSHandler);
diff --git a/markdown_trans/markdown_BDWare/_static/js/sm2.js b/markdown_trans/markdown_BDWare/_static/js/sm2.js
new file mode 100644
index 0000000..6034ccc
--- /dev/null
+++ b/markdown_trans/markdown_BDWare/_static/js/sm2.js
@@ -0,0 +1,2101 @@
+window.sm2 = function(t) {
+ function i(r) {
+ if (e[r]) return e[r].exports;
+ var n = e[r] = {
+ i: r,
+ l: !1,
+ exports: {}
+ };
+ return t[r].call(n.exports, n, n.exports, i),
+ n.l = !0,
+ n.exports
+ }
+ var e = {};
+ return i.m = t,
+ i.c = e,
+ i.d = function(t, e, r) {
+ i.o(t, e) || Object.defineProperty(t, e, {
+ configurable: !1,
+ enumerable: !0,
+ get: r
+ })
+ },
+ i.n = function(t) {
+ var e = t && t.__esModule ?
+ function() {
+ return t.
+ default
+ }:
+ function() {
+ return t
+ };
+ return i.d(e, "a", e),
+ e
+ },
+ i.o = function(t, i) {
+ return Object.prototype.hasOwnProperty.call(t, i)
+ },
+ i.p = "",
+ i(i.s = 3)
+} ([function(t, i, e) { (function() {
+ function e(t, i, e) {
+ null != t && ("number" == typeof t ? this.fromNumber(t, i, e) : null == i && "string" != typeof t ? this.fromString(t, 256) : this.fromString(t, i))
+ }
+ function r() {
+ return new e(null)
+ }
+ function n(t, i, e, r, n, s) {
+ for (; --s >= 0;) {
+ var o = i * this[t++] + e[r] + n;
+ n = Math.floor(o / 67108864),
+ e[r++] = 67108863 & o
+ }
+ return n
+ }
+ function s(t, i, e, r, n, s) {
+ for (var o = 32767 & i,
+ h = i >> 15; --s >= 0;) {
+ var u = 32767 & this[t],
+ a = this[t++] >> 15,
+ f = h * u + a * o;
+ u = o * u + ((32767 & f) << 15) + e[r] + (1073741823 & n),
+ n = (u >>> 30) + (f >>> 15) + h * a + (n >>> 30),
+ e[r++] = 1073741823 & u
+ }
+ return n
+ }
+ function o(t, i, e, r, n, s) {
+ for (var o = 16383 & i,
+ h = i >> 14; --s >= 0;) {
+ var u = 16383 & this[t],
+ a = this[t++] >> 14,
+ f = h * u + a * o;
+ u = o * u + ((16383 & f) << 14) + e[r] + n,
+ n = (u >> 28) + (f >> 14) + h * a,
+ e[r++] = 268435455 & u
+ }
+ return n
+ }
+ function h(t) {
+ return pi.charAt(t)
+ }
+ function u(t, i) {
+ var e = yi[t.charCodeAt(i)];
+ return null == e ? -1 : e
+ }
+ function a(t) {
+ for (var i = this.t - 1; i >= 0; --i) t[i] = this[i];
+ t.t = this.t,
+ t.s = this.s
+ }
+ function f(t) {
+ this.t = 1,
+ this.s = t < 0 ? -1 : 0,
+ t > 0 ? this[0] = t: t < -1 ? this[0] = t + this.DV: this.t = 0
+ }
+ function l(t) {
+ var i = r();
+ return i.fromInt(t),
+ i
+ }
+ function c(t, i) {
+ var r;
+ if (16 == i) r = 4;
+ else if (8 == i) r = 3;
+ else if (256 == i) r = 8;
+ else if (2 == i) r = 1;
+ else if (32 == i) r = 5;
+ else {
+ if (4 != i) return void this.fromRadix(t, i);
+ r = 2
+ }
+ this.t = 0,
+ this.s = 0;
+ for (var n = t.length,
+ s = !1,
+ o = 0; --n >= 0;) {
+ var h = 8 == r ? 255 & t[n] : u(t, n);
+ h < 0 ? "-" == t.charAt(n) && (s = !0) : (s = !1, 0 == o ? this[this.t++] = h: o + r > this.DB ? (this[this.t - 1] |= (h & (1 << this.DB - o) - 1) << o, this[this.t++] = h >> this.DB - o) : this[this.t - 1] |= h << o, (o += r) >= this.DB && (o -= this.DB))
+ }
+ 8 == r && 0 != (128 & t[0]) && (this.s = -1, o > 0 && (this[this.t - 1] |= (1 << this.DB - o) - 1 << o)),
+ this.clamp(),
+ s && e.ZERO.subTo(this, this)
+ }
+ function p() {
+ for (var t = this.s & this.DM; this.t > 0 && this[this.t - 1] == t;)--this.t
+ }
+ function y(t) {
+ if (this.s < 0) return "-" + this.negate().toString(t);
+ var i;
+ if (16 == t) i = 4;
+ else if (8 == t) i = 3;
+ else if (2 == t) i = 1;
+ else if (32 == t) i = 5;
+ else {
+ if (4 != t) return this.toRadix(t);
+ i = 2
+ }
+ var e, r = (1 << i) - 1,
+ n = !1,
+ s = "",
+ o = this.t,
+ u = this.DB - o * this.DB % i;
+ if (o-->0) for (u < this.DB && (e = this[o] >> u) > 0 && (n = !0, s = h(e)); o >= 0;) u < i ? (e = (this[o] & (1 << u) - 1) << i - u, e |= this[--o] >> (u += this.DB - i)) : (e = this[o] >> (u -= i) & r, u <= 0 && (u += this.DB, --o)),
+ e > 0 && (n = !0),
+ n && (s += h(e));
+ return n ? s: "0"
+ }
+ function v() {
+ var t = r();
+ return e.ZERO.subTo(this, t),
+ t
+ }
+ function g() {
+ return this.s < 0 ? this.negate() : this
+ }
+ function m(t) {
+ var i = this.s - t.s;
+ if (0 != i) return i;
+ var e = this.t;
+ if (0 != (i = e - t.t)) return this.s < 0 ? -i: i;
+ for (; --e >= 0;) if (0 != (i = this[e] - t[e])) return i;
+ return 0
+ }
+ function d(t) {
+ var i, e = 1;
+ return 0 != (i = t >>> 16) && (t = i, e += 16),
+ 0 != (i = t >> 8) && (t = i, e += 8),
+ 0 != (i = t >> 4) && (t = i, e += 4),
+ 0 != (i = t >> 2) && (t = i, e += 2),
+ 0 != (i = t >> 1) && (t = i, e += 1),
+ e
+ }
+ function T() {
+ return this.t <= 0 ? 0 : this.DB * (this.t - 1) + d(this[this.t - 1] ^ this.s & this.DM)
+ }
+ function b(t, i) {
+ var e;
+ for (e = this.t - 1; e >= 0; --e) i[e + t] = this[e];
+ for (e = t - 1; e >= 0; --e) i[e] = 0;
+ i.t = this.t + t,
+ i.s = this.s
+ }
+ function F(t, i) {
+ for (var e = t; e < this.t; ++e) i[e - t] = this[e];
+ i.t = Math.max(this.t - t, 0),
+ i.s = this.s
+ }
+ function B(t, i) {
+ var e, r = t % this.DB,
+ n = this.DB - r,
+ s = (1 << n) - 1,
+ o = Math.floor(t / this.DB),
+ h = this.s << r & this.DM;
+ for (e = this.t - 1; e >= 0; --e) i[e + o + 1] = this[e] >> n | h,
+ h = (this[e] & s) << r;
+ for (e = o - 1; e >= 0; --e) i[e] = 0;
+ i[o] = h,
+ i.t = this.t + o + 1,
+ i.s = this.s,
+ i.clamp()
+ }
+ function x(t, i) {
+ i.s = this.s;
+ var e = Math.floor(t / this.DB);
+ if (e >= this.t) return void(i.t = 0);
+ var r = t % this.DB,
+ n = this.DB - r,
+ s = (1 << r) - 1;
+ i[0] = this[e] >> r;
+ for (var o = e + 1; o < this.t; ++o) i[o - e - 1] |= (this[o] & s) << n,
+ i[o - e] = this[o] >> r;
+ r > 0 && (i[this.t - e - 1] |= (this.s & s) << n),
+ i.t = this.t - e,
+ i.clamp()
+ }
+ function w(t, i) {
+ for (var e = 0,
+ r = 0,
+ n = Math.min(t.t, this.t); e < n;) r += this[e] - t[e],
+ i[e++] = r & this.DM,
+ r >>= this.DB;
+ if (t.t < this.t) {
+ for (r -= t.s; e < this.t;) r += this[e],
+ i[e++] = r & this.DM,
+ r >>= this.DB;
+ r += this.s
+ } else {
+ for (r += this.s; e < t.t;) r -= t[e],
+ i[e++] = r & this.DM,
+ r >>= this.DB;
+ r -= t.s
+ }
+ i.s = r < 0 ? -1 : 0,
+ r < -1 ? i[e++] = this.DV + r: r > 0 && (i[e++] = r),
+ i.t = e,
+ i.clamp()
+ }
+ function S(t, i) {
+ var r = this.abs(),
+ n = t.abs(),
+ s = r.t;
+ for (i.t = s + n.t; --s >= 0;) i[s] = 0;
+ for (s = 0; s < n.t; ++s) i[s + r.t] = r.am(0, n[s], i, s, 0, r.t);
+ i.s = 0,
+ i.clamp(),
+ this.s != t.s && e.ZERO.subTo(i, i)
+ }
+ function k(t) {
+ for (var i = this.abs(), e = t.t = 2 * i.t; --e >= 0;) t[e] = 0;
+ for (e = 0; e < i.t - 1; ++e) {
+ var r = i.am(e, i[e], t, 2 * e, 0, 1); (t[e + i.t] += i.am(e + 1, 2 * i[e], t, 2 * e + 1, r, i.t - e - 1)) >= i.DV && (t[e + i.t] -= i.DV, t[e + i.t + 1] = 1)
+ }
+ t.t > 0 && (t[t.t - 1] += i.am(e, i[e], t, 2 * e, 0, 1)),
+ t.s = 0,
+ t.clamp()
+ }
+ function D(t, i, n) {
+ var s = t.abs();
+ if (! (s.t <= 0)) {
+ var o = this.abs();
+ if (o.t < s.t) return null != i && i.fromInt(0),
+ void(null != n && this.copyTo(n));
+ null == n && (n = r());
+ var h = r(),
+ u = this.s,
+ a = t.s,
+ f = this.DB - d(s[s.t - 1]);
+ f > 0 ? (s.lShiftTo(f, h), o.lShiftTo(f, n)) : (s.copyTo(h), o.copyTo(n));
+ var l = h.t,
+ c = h[l - 1];
+ if (0 != c) {
+ var p = c * (1 << this.F1) + (l > 1 ? h[l - 2] >> this.F2: 0),
+ y = this.FV / p,
+ v = (1 << this.F1) / p,
+ g = 1 << this.F2,
+ m = n.t,
+ T = m - l,
+ b = null == i ? r() : i;
+ for (h.dlShiftTo(T, b), n.compareTo(b) >= 0 && (n[n.t++] = 1, n.subTo(b, n)), e.ONE.dlShiftTo(l, b), b.subTo(h, h); h.t < l;) h[h.t++] = 0;
+ for (; --T >= 0;) {
+ var F = n[--m] == c ? this.DM: Math.floor(n[m] * y + (n[m - 1] + g) * v);
+ if ((n[m] += h.am(0, F, n, T, 0, l)) < F) for (h.dlShiftTo(T, b), n.subTo(b, n); n[m] < --F;) n.subTo(b, n)
+ }
+ null != i && (n.drShiftTo(l, i), u != a && e.ZERO.subTo(i, i)),
+ n.t = l,
+ n.clamp(),
+ f > 0 && n.rShiftTo(f, n),
+ u < 0 && e.ZERO.subTo(n, n)
+ }
+ }
+ }
+ function I(t) {
+ var i = r();
+ return this.abs().divRemTo(t, null, i),
+ this.s < 0 && i.compareTo(e.ZERO) > 0 && t.subTo(i, i),
+ i
+ }
+ function E(t) {
+ this.m = t
+ }
+ function O(t) {
+ return t.s < 0 || t.compareTo(this.m) >= 0 ? t.mod(this.m) : t
+ }
+ function q(t) {
+ return t
+ }
+ function A(t) {
+ t.divRemTo(this.m, null, t)
+ }
+ function R(t, i, e) {
+ t.multiplyTo(i, e),
+ this.reduce(e)
+ }
+ function V(t, i) {
+ t.squareTo(i),
+ this.reduce(i)
+ }
+ function M() {
+ if (this.t < 1) return 0;
+ var t = this[0];
+ if (0 == (1 & t)) return 0;
+ var i = 3 & t;
+ return i = i * (2 - (15 & t) * i) & 15,
+ i = i * (2 - (255 & t) * i) & 255,
+ i = i * (2 - ((65535 & t) * i & 65535)) & 65535,
+ i = i * (2 - t * i % this.DV) % this.DV,
+ i > 0 ? this.DV - i: -i
+ }
+ function _(t) {
+ this.m = t,
+ this.mp = t.invDigit(),
+ this.mpl = 32767 & this.mp,
+ this.mph = this.mp >> 15,
+ this.um = (1 << t.DB - 15) - 1,
+ this.mt2 = 2 * t.t
+ }
+ function C(t) {
+ var i = r();
+ return t.abs().dlShiftTo(this.m.t, i),
+ i.divRemTo(this.m, null, i),
+ t.s < 0 && i.compareTo(e.ZERO) > 0 && this.m.subTo(i, i),
+ i
+ }
+ function L(t) {
+ var i = r();
+ return t.copyTo(i),
+ this.reduce(i),
+ i
+ }
+ function P(t) {
+ for (; t.t <= this.mt2;) t[t.t++] = 0;
+ for (var i = 0; i < this.m.t; ++i) {
+ var e = 32767 & t[i],
+ r = e * this.mpl + ((e * this.mph + (t[i] >> 15) * this.mpl & this.um) << 15) & t.DM;
+ for (e = i + this.m.t, t[e] += this.m.am(0, r, t, i, 0, this.m.t); t[e] >= t.DV;) t[e] -= t.DV,
+ t[++e]++
+ }
+ t.clamp(),
+ t.drShiftTo(this.m.t, t),
+ t.compareTo(this.m) >= 0 && t.subTo(this.m, t)
+ }
+ function H(t, i) {
+ t.squareTo(i),
+ this.reduce(i)
+ }
+ function N(t, i, e) {
+ t.multiplyTo(i, e),
+ this.reduce(e)
+ }
+ function U() {
+ return 0 == (this.t > 0 ? 1 & this[0] : this.s)
+ }
+ function z(t, i) {
+ if (t > 4294967295 || t < 1) return e.ONE;
+ var n = r(),
+ s = r(),
+ o = i.convert(this),
+ h = d(t) - 1;
+ for (o.copyTo(n); --h >= 0;) if (i.sqrTo(n, s), (t & 1 << h) > 0) i.mulTo(s, o, n);
+ else {
+ var u = n;
+ n = s,
+ s = u
+ }
+ return i.revert(n)
+ }
+ function j(t, i) {
+ var e;
+ return e = t < 256 || i.isEven() ? new E(i) : new _(i),
+ this.exp(t, e)
+ }
+ function X() {
+ var t = r();
+ return this.copyTo(t),
+ t
+ }
+ function Z() {
+ if (this.s < 0) {
+ if (1 == this.t) return this[0] - this.DV;
+ if (0 == this.t) return - 1
+ } else {
+ if (1 == this.t) return this[0];
+ if (0 == this.t) return 0
+ }
+ return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0]
+ }
+ function K() {
+ return 0 == this.t ? this.s: this[0] << 24 >> 24
+ }
+ function G() {
+ return 0 == this.t ? this.s: this[0] << 16 >> 16
+ }
+ function Y(t) {
+ return Math.floor(Math.LN2 * this.DB / Math.log(t))
+ }
+ function W() {
+ return this.s < 0 ? -1 : this.t <= 0 || 1 == this.t && this[0] <= 0 ? 0 : 1
+ }
+ function J(t) {
+ if (null == t && (t = 10), 0 == this.signum() || t < 2 || t > 36) return "0";
+ var i = this.chunkSize(t),
+ e = Math.pow(t, i),
+ n = l(e),
+ s = r(),
+ o = r(),
+ h = "";
+ for (this.divRemTo(n, s, o); s.signum() > 0;) h = (e + o.intValue()).toString(t).substr(1) + h,
+ s.divRemTo(n, s, o);
+ return o.intValue().toString(t) + h
+ }
+ function Q(t, i) {
+ this.fromInt(0),
+ null == i && (i = 10);
+ for (var r = this.chunkSize(i), n = Math.pow(i, r), s = !1, o = 0, h = 0, a = 0; a < t.length; ++a) {
+ var f = u(t, a);
+ f < 0 ? "-" == t.charAt(a) && 0 == this.signum() && (s = !0) : (h = i * h + f, ++o >= r && (this.dMultiply(n), this.dAddOffset(h, 0), o = 0, h = 0))
+ }
+ o > 0 && (this.dMultiply(Math.pow(i, o)), this.dAddOffset(h, 0)),
+ s && e.ZERO.subTo(this, this)
+ }
+ function $(t, i, r) {
+ if ("number" == typeof i) if (t < 2) this.fromInt(1);
+ else for (this.fromNumber(t, r), this.testBit(t - 1) || this.bitwiseTo(e.ONE.shiftLeft(t - 1), ht, this), this.isEven() && this.dAddOffset(1, 0); ! this.isProbablePrime(i);) this.dAddOffset(2, 0),
+ this.bitLength() > t && this.subTo(e.ONE.shiftLeft(t - 1), this);
+ else {
+ var n = new Array,
+ s = 7 & t;
+ n.length = 1 + (t >> 3),
+ i.nextBytes(n),
+ s > 0 ? n[0] &= (1 << s) - 1 : n[0] = 0,
+ this.fromString(n, 256)
+ }
+ }
+ function tt() {
+ var t = this.t,
+ i = new Array;
+ i[0] = this.s;
+ var e, r = this.DB - t * this.DB % 8,
+ n = 0;
+ if (t-->0) for (r < this.DB && (e = this[t] >> r) != (this.s & this.DM) >> r && (i[n++] = e | this.s << this.DB - r); t >= 0;) r < 8 ? (e = (this[t] & (1 << r) - 1) << 8 - r, e |= this[--t] >> (r += this.DB - 8)) : (e = this[t] >> (r -= 8) & 255, r <= 0 && (r += this.DB, --t)),
+ 0 != (128 & e) && (e |= -256),
+ 0 == n && (128 & this.s) != (128 & e) && ++n,
+ (n > 0 || e != this.s) && (i[n++] = e);
+ return i
+ }
+ function it(t) {
+ return 0 == this.compareTo(t)
+ }
+ function et(t) {
+ return this.compareTo(t) < 0 ? this: t
+ }
+ function rt(t) {
+ return this.compareTo(t) > 0 ? this: t
+ }
+ function nt(t, i, e) {
+ var r, n, s = Math.min(t.t, this.t);
+ for (r = 0; r < s; ++r) e[r] = i(this[r], t[r]);
+ if (t.t < this.t) {
+ for (n = t.s & this.DM, r = s; r < this.t; ++r) e[r] = i(this[r], n);
+ e.t = this.t
+ } else {
+ for (n = this.s & this.DM, r = s; r < t.t; ++r) e[r] = i(n, t[r]);
+ e.t = t.t
+ }
+ e.s = i(this.s, t.s),
+ e.clamp()
+ }
+ function st(t, i) {
+ return t & i
+ }
+ function ot(t) {
+ var i = r();
+ return this.bitwiseTo(t, st, i),
+ i
+ }
+ function ht(t, i) {
+ return t | i
+ }
+ function ut(t) {
+ var i = r();
+ return this.bitwiseTo(t, ht, i),
+ i
+ }
+ function at(t, i) {
+ return t ^ i
+ }
+ function ft(t) {
+ var i = r();
+ return this.bitwiseTo(t, at, i),
+ i
+ }
+ function lt(t, i) {
+ return t & ~i
+ }
+ function ct(t) {
+ var i = r();
+ return this.bitwiseTo(t, lt, i),
+ i
+ }
+ function pt() {
+ for (var t = r(), i = 0; i < this.t; ++i) t[i] = this.DM & ~this[i];
+ return t.t = this.t,
+ t.s = ~this.s,
+ t
+ }
+ function yt(t) {
+ var i = r();
+ return t < 0 ? this.rShiftTo( - t, i) : this.lShiftTo(t, i),
+ i
+ }
+ function vt(t) {
+ var i = r();
+ return t < 0 ? this.lShiftTo( - t, i) : this.rShiftTo(t, i),
+ i
+ }
+ function gt(t) {
+ if (0 == t) return - 1;
+ var i = 0;
+ return 0 == (65535 & t) && (t >>= 16, i += 16),
+ 0 == (255 & t) && (t >>= 8, i += 8),
+ 0 == (15 & t) && (t >>= 4, i += 4),
+ 0 == (3 & t) && (t >>= 2, i += 2),
+ 0 == (1 & t) && ++i,
+ i
+ }
+ function mt() {
+ for (var t = 0; t < this.t; ++t) if (0 != this[t]) return t * this.DB + gt(this[t]);
+ return this.s < 0 ? this.t * this.DB: -1
+ }
+ function dt(t) {
+ for (var i = 0; 0 != t;) t &= t - 1,
+ ++i;
+ return i
+ }
+ function Tt() {
+ for (var t = 0,
+ i = this.s & this.DM,
+ e = 0; e < this.t; ++e) t += dt(this[e] ^ i);
+ return t
+ }
+ function bt(t) {
+ var i = Math.floor(t / this.DB);
+ return i >= this.t ? 0 != this.s: 0 != (this[i] & 1 << t % this.DB)
+ }
+ function Ft(t, i) {
+ var r = e.ONE.shiftLeft(t);
+ return this.bitwiseTo(r, i, r),
+ r
+ }
+ function Bt(t) {
+ return this.changeBit(t, ht)
+ }
+ function xt(t) {
+ return this.changeBit(t, lt)
+ }
+ function wt(t) {
+ return this.changeBit(t, at)
+ }
+ function St(t, i) {
+ for (var e = 0,
+ r = 0,
+ n = Math.min(t.t, this.t); e < n;) r += this[e] + t[e],
+ i[e++] = r & this.DM,
+ r >>= this.DB;
+ if (t.t < this.t) {
+ for (r += t.s; e < this.t;) r += this[e],
+ i[e++] = r & this.DM,
+ r >>= this.DB;
+ r += this.s
+ } else {
+ for (r += this.s; e < t.t;) r += t[e],
+ i[e++] = r & this.DM,
+ r >>= this.DB;
+ r += t.s
+ }
+ i.s = r < 0 ? -1 : 0,
+ r > 0 ? i[e++] = r: r < -1 && (i[e++] = this.DV + r),
+ i.t = e,
+ i.clamp()
+ }
+ function kt(t) {
+ var i = r();
+ return this.addTo(t, i),
+ i
+ }
+ function Dt(t) {
+ var i = r();
+ return this.subTo(t, i),
+ i
+ }
+ function It(t) {
+ var i = r();
+ return this.multiplyTo(t, i),
+ i
+ }
+ function Et() {
+ var t = r();
+ return this.squareTo(t),
+ t
+ }
+ function Ot(t) {
+ var i = r();
+ return this.divRemTo(t, i, null),
+ i
+ }
+ function qt(t) {
+ var i = r();
+ return this.divRemTo(t, null, i),
+ i
+ }
+ function At(t) {
+ var i = r(),
+ e = r();
+ return this.divRemTo(t, i, e),
+ new Array(i, e)
+ }
+ function Rt(t) {
+ this[this.t] = this.am(0, t - 1, this, 0, 0, this.t),
+ ++this.t,
+ this.clamp()
+ }
+ function Vt(t, i) {
+ if (0 != t) {
+ for (; this.t <= i;) this[this.t++] = 0;
+ for (this[i] += t; this[i] >= this.DV;) this[i] -= this.DV,
+ ++i >= this.t && (this[this.t++] = 0),
+ ++this[i]
+ }
+ }
+ function Mt() {}
+ function _t(t) {
+ return t
+ }
+ function Ct(t, i, e) {
+ t.multiplyTo(i, e)
+ }
+ function Lt(t, i) {
+ t.squareTo(i)
+ }
+ function Pt(t) {
+ return this.exp(t, new Mt)
+ }
+ function Ht(t, i, e) {
+ var r = Math.min(this.t + t.t, i);
+ for (e.s = 0, e.t = r; r > 0;) e[--r] = 0;
+ var n;
+ for (n = e.t - this.t; r < n; ++r) e[r + this.t] = this.am(0, t[r], e, r, 0, this.t);
+ for (n = Math.min(t.t, i); r < n; ++r) this.am(0, t[r], e, r, 0, i - r);
+ e.clamp()
+ }
+ function Nt(t, i, e) {--i;
+ var r = e.t = this.t + t.t - i;
+ for (e.s = 0; --r >= 0;) e[r] = 0;
+ for (r = Math.max(i - this.t, 0); r < t.t; ++r) e[this.t + r - i] = this.am(i - r, t[r], e, 0, 0, this.t + r - i);
+ e.clamp(),
+ e.drShiftTo(1, e)
+ }
+ function Ut(t) {
+ this.r2 = r(),
+ this.q3 = r(),
+ e.ONE.dlShiftTo(2 * t.t, this.r2),
+ this.mu = this.r2.divide(t),
+ this.m = t
+ }
+ function zt(t) {
+ if (t.s < 0 || t.t > 2 * this.m.t) return t.mod(this.m);
+ if (t.compareTo(this.m) < 0) return t;
+ var i = r();
+ return t.copyTo(i),
+ this.reduce(i),
+ i
+ }
+ function jt(t) {
+ return t
+ }
+ function Xt(t) {
+ for (t.drShiftTo(this.m.t - 1, this.r2), t.t > this.m.t + 1 && (t.t = this.m.t + 1, t.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); t.compareTo(this.r2) < 0;) t.dAddOffset(1, this.m.t + 1);
+ for (t.subTo(this.r2, t); t.compareTo(this.m) >= 0;) t.subTo(this.m, t)
+ }
+ function Zt(t, i) {
+ t.squareTo(i),
+ this.reduce(i)
+ }
+ function Kt(t, i, e) {
+ t.multiplyTo(i, e),
+ this.reduce(e)
+ }
+ function Gt(t, i) {
+ var e, n, s = t.bitLength(),
+ o = l(1);
+ if (s <= 0) return o;
+ e = s < 18 ? 1 : s < 48 ? 3 : s < 144 ? 4 : s < 768 ? 5 : 6,
+ n = s < 8 ? new E(i) : i.isEven() ? new Ut(i) : new _(i);
+ var h = new Array,
+ u = 3,
+ a = e - 1,
+ f = (1 << e) - 1;
+ if (h[1] = n.convert(this), e > 1) {
+ var c = r();
+ for (n.sqrTo(h[1], c); u <= f;) h[u] = r(),
+ n.mulTo(c, h[u - 2], h[u]),
+ u += 2
+ }
+ var p, y, v = t.t - 1,
+ g = !0,
+ m = r();
+ for (s = d(t[v]) - 1; v >= 0;) {
+ for (s >= a ? p = t[v] >> s - a & f: (p = (t[v] & (1 << s + 1) - 1) << a - s, v > 0 && (p |= t[v - 1] >> this.DB + s - a)), u = e; 0 == (1 & p);) p >>= 1,
+ --u;
+ if ((s -= u) < 0 && (s += this.DB, --v), g) h[p].copyTo(o),
+ g = !1;
+ else {
+ for (; u > 1;) n.sqrTo(o, m),
+ n.sqrTo(m, o),
+ u -= 2;
+ u > 0 ? n.sqrTo(o, m) : (y = o, o = m, m = y),
+ n.mulTo(m, h[p], o)
+ }
+ for (; v >= 0 && 0 == (t[v] & 1 << s);) n.sqrTo(o, m),
+ y = o,
+ o = m,
+ m = y,
+ --s < 0 && (s = this.DB - 1, --v)
+ }
+ return n.revert(o)
+ }
+ function Yt(t) {
+ var i = this.s < 0 ? this.negate() : this.clone(),
+ e = t.s < 0 ? t.negate() : t.clone();
+ if (i.compareTo(e) < 0) {
+ var r = i;
+ i = e,
+ e = r
+ }
+ var n = i.getLowestSetBit(),
+ s = e.getLowestSetBit();
+ if (s < 0) return i;
+ for (n < s && (s = n), s > 0 && (i.rShiftTo(s, i), e.rShiftTo(s, e)); i.signum() > 0;)(n = i.getLowestSetBit()) > 0 && i.rShiftTo(n, i),
+ (n = e.getLowestSetBit()) > 0 && e.rShiftTo(n, e),
+ i.compareTo(e) >= 0 ? (i.subTo(e, i), i.rShiftTo(1, i)) : (e.subTo(i, e), e.rShiftTo(1, e));
+ return s > 0 && e.lShiftTo(s, e),
+ e
+ }
+ function Wt(t) {
+ if (t <= 0) return 0;
+ var i = this.DV % t,
+ e = this.s < 0 ? t - 1 : 0;
+ if (this.t > 0) if (0 == i) e = this[0] % t;
+ else for (var r = this.t - 1; r >= 0; --r) e = (i * e + this[r]) % t;
+ return e
+ }
+ function Jt(t) {
+ var i = t.isEven();
+ if (this.isEven() && i || 0 == t.signum()) return e.ZERO;
+ for (var r = t.clone(), n = this.clone(), s = l(1), o = l(0), h = l(0), u = l(1); 0 != r.signum();) {
+ for (; r.isEven();) r.rShiftTo(1, r),
+ i ? (s.isEven() && o.isEven() || (s.addTo(this, s), o.subTo(t, o)), s.rShiftTo(1, s)) : o.isEven() || o.subTo(t, o),
+ o.rShiftTo(1, o);
+ for (; n.isEven();) n.rShiftTo(1, n),
+ i ? (h.isEven() && u.isEven() || (h.addTo(this, h), u.subTo(t, u)), h.rShiftTo(1, h)) : u.isEven() || u.subTo(t, u),
+ u.rShiftTo(1, u);
+ r.compareTo(n) >= 0 ? (r.subTo(n, r), i && s.subTo(h, s), o.subTo(u, o)) : (n.subTo(r, n), i && h.subTo(s, h), u.subTo(o, u))
+ }
+ return 0 != n.compareTo(e.ONE) ? e.ZERO: u.compareTo(t) >= 0 ? u.subtract(t) : u.signum() < 0 ? (u.addTo(t, u), u.signum() < 0 ? u.add(t) : u) : u
+ }
+ function Qt(t) {
+ var i, e = this.abs();
+ if (1 == e.t && e[0] <= vi[vi.length - 1]) {
+ for (i = 0; i < vi.length; ++i) if (e[0] == vi[i]) return ! 0;
+ return ! 1
+ }
+ if (e.isEven()) return ! 1;
+ for (i = 1; i < vi.length;) {
+ for (var r = vi[i], n = i + 1; n < vi.length && r < gi;) r *= vi[n++];
+ for (r = e.modInt(r); i < n;) if (r % vi[i++] == 0) return ! 1
+ }
+ return e.millerRabin(t)
+ }
+ function $t(t) {
+ var i = this.subtract(e.ONE),
+ n = i.getLowestSetBit();
+ if (n <= 0) return ! 1;
+ var s = i.shiftRight(n); (t = t + 1 >> 1) > vi.length && (t = vi.length);
+ for (var o = r(), h = 0; h < t; ++h) {
+ o.fromInt(vi[Math.floor(Math.random() * vi.length)]);
+ var u = o.modPow(s, this);
+ if (0 != u.compareTo(e.ONE) && 0 != u.compareTo(i)) {
+ for (var a = 1; a++> 8 & 255,
+ di[Ti++] ^= t >> 16 & 255,
+ di[Ti++] ^= t >> 24 & 255,
+ Ti >= xi && (Ti -= xi)
+ }
+ function ii() {
+ ti((new Date).getTime())
+ }
+ function ei() {
+ if (null == mi) {
+ for (ii(), mi = ui(), mi.init(di), Ti = 0; Ti < di.length; ++Ti) di[Ti] = 0;
+ Ti = 0
+ }
+ return mi.next()
+ }
+ function ri(t) {
+ var i;
+ for (i = 0; i < t.length; ++i) t[i] = ei()
+ }
+ function ni() {}
+ function si() {
+ this.i = 0,
+ this.j = 0,
+ this.S = new Array
+ }
+ function oi(t) {
+ var i, e, r;
+ for (i = 0; i < 256; ++i) this.S[i] = i;
+ for (e = 0, i = 0; i < 256; ++i) e = e + this.S[i] + t[i % t.length] & 255,
+ r = this.S[i],
+ this.S[i] = this.S[e],
+ this.S[e] = r;
+ this.i = 0,
+ this.j = 0
+ }
+ function hi() {
+ var t;
+ return this.i = this.i + 1 & 255,
+ this.j = this.j + this.S[this.i] & 255,
+ t = this.S[this.i],
+ this.S[this.i] = this.S[this.j],
+ this.S[this.j] = t,
+ this.S[t + this.S[this.i] & 255]
+ }
+ function ui() {
+ return new si
+ }
+ var ai, fi = "undefined" != typeof navigator;
+ fi && "Microsoft Internet Explorer" == navigator.appName ? (e.prototype.am = s, ai = 30) : fi && "Netscape" != navigator.appName ? (e.prototype.am = n, ai = 26) : (e.prototype.am = o, ai = 28),
+ e.prototype.DB = ai,
+ e.prototype.DM = (1 << ai) - 1,
+ e.prototype.DV = 1 << ai;
+ e.prototype.FV = Math.pow(2, 52),
+ e.prototype.F1 = 52 - ai,
+ e.prototype.F2 = 2 * ai - 52;
+ var li, ci, pi = "0123456789abcdefghijklmnopqrstuvwxyz",
+ yi = new Array;
+ for (li = "0".charCodeAt(0), ci = 0; ci <= 9; ++ci) yi[li++] = ci;
+ for (li = "a".charCodeAt(0), ci = 10; ci < 36; ++ci) yi[li++] = ci;
+ for (li = "A".charCodeAt(0), ci = 10; ci < 36; ++ci) yi[li++] = ci;
+ E.prototype.convert = O,
+ E.prototype.revert = q,
+ E.prototype.reduce = A,
+ E.prototype.mulTo = R,
+ E.prototype.sqrTo = V,
+ _.prototype.convert = C,
+ _.prototype.revert = L,
+ _.prototype.reduce = P,
+ _.prototype.mulTo = N,
+ _.prototype.sqrTo = H,
+ e.prototype.copyTo = a,
+ e.prototype.fromInt = f,
+ e.prototype.fromString = c,
+ e.prototype.clamp = p,
+ e.prototype.dlShiftTo = b,
+ e.prototype.drShiftTo = F,
+ e.prototype.lShiftTo = B,
+ e.prototype.rShiftTo = x,
+ e.prototype.subTo = w,
+ e.prototype.multiplyTo = S,
+ e.prototype.squareTo = k,
+ e.prototype.divRemTo = D,
+ e.prototype.invDigit = M,
+ e.prototype.isEven = U,
+ e.prototype.exp = z,
+ e.prototype.toString = y,
+ e.prototype.negate = v,
+ e.prototype.abs = g,
+ e.prototype.compareTo = m,
+ e.prototype.bitLength = T,
+ e.prototype.mod = I,
+ e.prototype.modPowInt = j,
+ e.ZERO = l(0),
+ e.ONE = l(1),
+ Mt.prototype.convert = _t,
+ Mt.prototype.revert = _t,
+ Mt.prototype.mulTo = Ct,
+ Mt.prototype.sqrTo = Lt,
+ Ut.prototype.convert = zt,
+ Ut.prototype.revert = jt,
+ Ut.prototype.reduce = Xt,
+ Ut.prototype.mulTo = Kt,
+ Ut.prototype.sqrTo = Zt;
+ var vi = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997],
+ gi = (1 << 26) / vi[vi.length - 1];
+ e.prototype.chunkSize = Y,
+ e.prototype.toRadix = J,
+ e.prototype.fromRadix = Q,
+ e.prototype.fromNumber = $,
+ e.prototype.bitwiseTo = nt,
+ e.prototype.changeBit = Ft,
+ e.prototype.addTo = St,
+ e.prototype.dMultiply = Rt,
+ e.prototype.dAddOffset = Vt,
+ e.prototype.multiplyLowerTo = Ht,
+ e.prototype.multiplyUpperTo = Nt,
+ e.prototype.modInt = Wt,
+ e.prototype.millerRabin = $t,
+ e.prototype.clone = X,
+ e.prototype.intValue = Z,
+ e.prototype.byteValue = K,
+ e.prototype.shortValue = G,
+ e.prototype.signum = W,
+ e.prototype.toByteArray = tt,
+ e.prototype.equals = it,
+ e.prototype.min = et,
+ e.prototype.max = rt,
+ e.prototype.and = ot,
+ e.prototype.or = ut,
+ e.prototype.xor = ft,
+ e.prototype.andNot = ct,
+ e.prototype.not = pt,
+ e.prototype.shiftLeft = yt,
+ e.prototype.shiftRight = vt,
+ e.prototype.getLowestSetBit = mt,
+ e.prototype.bitCount = Tt,
+ e.prototype.testBit = bt,
+ e.prototype.setBit = Bt,
+ e.prototype.clearBit = xt,
+ e.prototype.flipBit = wt,
+ e.prototype.add = kt,
+ e.prototype.subtract = Dt,
+ e.prototype.multiply = It,
+ e.prototype.divide = Ot,
+ e.prototype.remainder = qt,
+ e.prototype.divideAndRemainder = At,
+ e.prototype.modPow = Gt,
+ e.prototype.modInverse = Jt,
+ e.prototype.pow = Pt,
+ e.prototype.gcd = Yt,
+ e.prototype.isProbablePrime = Qt,
+ e.prototype.square = Et,
+ e.prototype.Barrett = Ut;
+ var mi, di, Ti;
+ if (null == di) {
+ di = new Array,
+ Ti = 0;
+ var bi;
+ if ("undefined" != typeof window && window.crypto) if (window.crypto.getRandomValues) {
+ var Fi = new Uint8Array(32);
+ for (window.crypto.getRandomValues(Fi), bi = 0; bi < 32; ++bi) di[Ti++] = Fi[bi]
+ } else if ("Netscape" == navigator.appName && navigator.appVersion < "5") {
+ var Bi = window.crypto.random(32);
+ for (bi = 0; bi < Bi.length; ++bi) di[Ti++] = 255 & Bi.charCodeAt(bi)
+ }
+ for (; Ti < xi;) bi = Math.floor(65536 * Math.random()),
+ di[Ti++] = bi >>> 8,
+ di[Ti++] = 255 & bi;
+ Ti = 0,
+ ii()
+ }
+ ni.prototype.nextBytes = ri,
+ si.prototype.init = oi,
+ si.prototype.next = hi;
+ var xi = 256;
+ i = t.exports = {
+ default:
+ e,
+ BigInteger: e,
+ SecureRandom: ni
+ }
+ }).call(this)
+},
+function(t, i, e) {
+ "use strict";
+ function r() {
+ return T
+ }
+ function n() {
+ var t = new p("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF", 16),
+ i = new p("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC", 16),
+ e = new p("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93", 16),
+ r = new g(t, i, e);
+ return {
+ curve: r,
+ G: r.decodePointHex("0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0"),
+ n: new p("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123", 16)
+ }
+ }
+ function s() {
+ var t = new p(F.bitLength(), m).mod(F.subtract(p.ONE)).add(p.ONE),
+ i = u(t.toString(16), 64),
+ e = b.multiply(t);
+ return {
+ privateKey: i,
+ publicKey: "04" + u(e.getX().toBigInteger().toString(16), 64) + u(e.getY().toBigInteger().toString(16), 64)
+ }
+ }
+ function o(t) {
+ t = unescape(encodeURIComponent(t));
+ for (var i = t.length,
+ e = [], r = 0; r < i; r++) e[r >>> 2] |= (255 & t.charCodeAt(r)) << 24 - r % 4 * 8;
+ for (var n = [], s = 0; s < i; s++) {
+ var o = e[s >>> 2] >>> 24 - s % 4 * 8 & 255;
+ n.push((o >>> 4).toString(16)),
+ n.push((15 & o).toString(16))
+ }
+ return n.join("")
+ }
+ function h(t) {
+ return Array.prototype.map.call(new Uint8Array(t),
+ function(t) {
+ return ("00" + t.toString(16)).slice( - 2)
+ }).join("")
+ }
+ function u(t, i) {
+ return t.length >= i ? t: new Array(i - t.length + 1).join("0") + t
+ }
+ function a(t) {
+ for (var i = [], e = 0, r = 0; r < 2 * t.length; r += 2) i[r >>> 3] |= parseInt(t[e], 10) << 24 - r % 8 * 4,
+ e++;
+ for (var n = [], s = 0; s < t.length; s++) {
+ var o = i[s >>> 2] >>> 24 - s % 4 * 8 & 255;
+ n.push((o >>> 4).toString(16)),
+ n.push((15 & o).toString(16))
+ }
+ return n.join("")
+ }
+ function f(t) {
+ for (var i = [], e = 0, r = 0; r < 2 * t.length; r += 2) i[r >>> 3] |= parseInt(t[e], 10) << 24 - r % 8 * 4,
+ e++;
+ try {
+ for (var n = [], s = 0; s < t.length; s++) {
+ var o = i[s >>> 2] >>> 24 - s % 4 * 8 & 255;
+ n.push(String.fromCharCode(o))
+ }
+ return decodeURIComponent(escape(n.join("")))
+ } catch(t) {
+ throw new Error("Malformed UTF-8 data")
+ }
+ }
+ function l(t) {
+ var i = [],
+ e = t.length;
+ e % 2 != 0 && (t = u(t, e + 1)),
+ e = t.length;
+ for (var r = 0; r < e; r += 2) i.push(parseInt(t.substr(r, 2), 16));
+ return i
+ }
+ var c = e(0),
+ p = c.BigInteger,
+ y = c.SecureRandom,
+ v = e(5),
+ g = v.ECCurveFp,
+ m = new y,
+ d = n(),
+ T = d.curve,
+ b = d.G,
+ F = d.n;
+ t.exports = {
+ getGlobalCurve: r,
+ generateEcparam: n,
+ generateKeyPairHex: s,
+ parseUtf8StringToHex: o,
+ parseArrayBufferToHex: h,
+ leftPad: u,
+ arrayToHex: a,
+ arrayToUtf8: f,
+ hexToArray: l
+ }
+},
+function(t, i, e) {
+ "use strict";
+ function r(t, i) {
+ if (! (t instanceof i)) throw new TypeError("Cannot call a class as a function")
+ }
+ var n = function() {
+ function t(t, i) {
+ for (var e = 0; e < i.length; e++) {
+ var r = i[e];
+ r.enumerable = r.enumerable || !1,
+ r.configurable = !0,
+ "value" in r && (r.writable = !0),
+ Object.defineProperty(t, r.key, r)
+ }
+ }
+ return function(i, e, r) {
+ return e && t(i.prototype, e),
+ r && t(i, r),
+ i
+ }
+ } (),
+ s = e(0),
+ o = s.BigInteger,
+ h = e(1),
+ u = function(t, i, e, r, n) {
+ for (var s = 0; s < n; s++) e[r + s] = t[i + s]
+ },
+ a = {
+ minValue: -parseInt("10000000000000000000000000000000", 2),
+ maxValue: parseInt("1111111111111111111111111111111", 2),
+ parse: function(t) {
+ if (t < this.minValue) {
+ for (var i = new Number( - t), e = i.toString(2), r = e.substr(e.length - 31, 31), n = "", s = 0; s < r.length; s++) {
+ n += "0" == r.substr(s, 1) ? "1": "0"
+ }
+ return parseInt(n, 2) + 1
+ }
+ if (t > this.maxValue) {
+ for (var o = Number(t), h = o.toString(2), u = h.substr(h.length - 31, 31), a = "", f = 0; f < u.length; f++) {
+ a += "0" == u.substr(f, 1) ? "1": "0"
+ }
+ return - (parseInt(a, 2) + 1)
+ }
+ return t
+ },
+ parseByte: function(t) {
+ if (t < 0) {
+ for (var i = new Number( - t), e = i.toString(2), r = e.substr(e.length - 8, 8), n = "", s = 0; s < r.length; s++) {
+ n += "0" == r.substr(s, 1) ? "1": "0"
+ }
+ return parseInt(n, 2) + 1
+ }
+ if (t > 255) {
+ var o = Number(t),
+ h = o.toString(2);
+ return parseInt(h.substr(h.length - 8, 8), 2)
+ }
+ return t
+ }
+ },
+ f = function() {
+ function t() {
+ r(this, t),
+ this.xBuf = new Array,
+ this.xBufOff = 0,
+ this.byteCount = 0,
+ this.DIGEST_LENGTH = 32,
+ this.v0 = [1937774191, 1226093241, 388252375, 3666478592, 2842636476, 372324522, 3817729613, 2969243214],
+ this.v0 = [1937774191, 1226093241, 388252375, -628488704, -1452330820, 372324522, -477237683, -1325724082],
+ this.v = new Array(8),
+ this.v_ = new Array(8),
+ this.X0 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+ this.X = new Array(68),
+ this.xOff = 0,
+ this.T_00_15 = 2043430169,
+ this.T_16_63 = 2055708042,
+ arguments.length > 0 ? this.initDigest(arguments[0]) : this.init()
+ }
+ return n(t, [{
+ key: "init",
+ value: function() {
+ this.xBuf = new Array(4),
+ this.reset()
+ }
+ },
+ {
+ key: "initDigest",
+ value: function(t) {
+ this.xBuf = [].concat(t.xBuf),
+ this.xBufOff = t.xBufOff,
+ this.byteCount = t.byteCount,
+ u(t.X, 0, this.X, 0, t.X.length),
+ this.xOff = t.xOff,
+ u(t.v, 0, this.v, 0, t.v.length)
+ }
+ },
+ {
+ key: "getDigestSize",
+ value: function() {
+ return this.DIGEST_LENGTH
+ }
+ },
+ {
+ key: "reset",
+ value: function() {
+ this.byteCount = 0,
+ this.xBufOff = 0;
+ for (var t in this.xBuf) this.xBuf[t] = null;
+ u(this.v0, 0, this.v, 0, this.v0.length),
+ this.xOff = 0,
+ u(this.X0, 0, this.X, 0, this.X0.length)
+ }
+ },
+ {
+ key: "processBlock",
+ value: function() {
+ var t = void 0,
+ i = this.X,
+ e = new Array(64);
+ for (t = 16; t < 68; t++) i[t] = this.p1(i[t - 16] ^ i[t - 9] ^ this.rotate(i[t - 3], 15)) ^ this.rotate(i[t - 13], 7) ^ i[t - 6];
+ for (t = 0; t < 64; t++) e[t] = i[t] ^ i[t + 4];
+ var r = this.v,
+ n = this.v_;
+ u(r, 0, n, 0, this.v0.length);
+ var s = void 0,
+ o = void 0,
+ h = void 0,
+ f = void 0,
+ l = void 0;
+ for (t = 0; t < 16; t++) l = this.rotate(n[0], 12),
+ s = a.parse(a.parse(l + n[4]) + this.rotate(this.T_00_15, t)),
+ s = this.rotate(s, 7),
+ o = s ^ l,
+ h = a.parse(a.parse(this.ff_00_15(n[0], n[1], n[2]) + n[3]) + o) + e[t],
+ f = a.parse(a.parse(this.gg_00_15(n[4], n[5], n[6]) + n[7]) + s) + i[t],
+ n[3] = n[2],
+ n[2] = this.rotate(n[1], 9),
+ n[1] = n[0],
+ n[0] = h,
+ n[7] = n[6],
+ n[6] = this.rotate(n[5], 19),
+ n[5] = n[4],
+ n[4] = this.p0(f);
+ for (t = 16; t < 64; t++) l = this.rotate(n[0], 12),
+ s = a.parse(a.parse(l + n[4]) + this.rotate(this.T_16_63, t)),
+ s = this.rotate(s, 7),
+ o = s ^ l,
+ h = a.parse(a.parse(this.ff_16_63(n[0], n[1], n[2]) + n[3]) + o) + e[t],
+ f = a.parse(a.parse(this.gg_16_63(n[4], n[5], n[6]) + n[7]) + s) + i[t],
+ n[3] = n[2],
+ n[2] = this.rotate(n[1], 9),
+ n[1] = n[0],
+ n[0] = h,
+ n[7] = n[6],
+ n[6] = this.rotate(n[5], 19),
+ n[5] = n[4],
+ n[4] = this.p0(f);
+ for (t = 0; t < 8; t++) r[t] ^= a.parse(n[t]);
+ this.xOff = 0,
+ u(this.X0, 0, this.X, 0, this.X0.length)
+ }
+ },
+ {
+ key: "processWord",
+ value: function(t, i) {
+ var e = t[i] << 24;
+ e |= (255 & t[++i]) << 16,
+ e |= (255 & t[++i]) << 8,
+ e |= 255 & t[++i],
+ this.X[this.xOff] = e,
+ 16 == ++this.xOff && this.processBlock()
+ }
+ },
+ {
+ key: "processLength",
+ value: function(t) {
+ this.xOff > 14 && this.processBlock(),
+ this.X[14] = this.urShiftLong(t, 32),
+ this.X[15] = 4294967295 & t
+ }
+ },
+ {
+ key: "intToBigEndian",
+ value: function(t, i, e) {
+ i[e] = a.parseByte(this.urShift(t, 24)),
+ i[++e] = a.parseByte(this.urShift(t, 16)),
+ i[++e] = a.parseByte(this.urShift(t, 8)),
+ i[++e] = a.parseByte(t)
+ }
+ },
+ {
+ key: "doFinal",
+ value: function(t, i) {
+ this.finish();
+ for (var e = 0; e < 8; e++) this.intToBigEndian(this.v[e], t, i + 4 * e);
+ return this.reset(),
+ this.DIGEST_LENGTH
+ }
+ },
+ {
+ key: "update",
+ value: function(t) {
+ this.xBuf[this.xBufOff++] = t,
+ this.xBufOff == this.xBuf.length && (this.processWord(this.xBuf, 0), this.xBufOff = 0),
+ this.byteCount++
+ }
+ },
+ {
+ key: "blockUpdate",
+ value: function(t, i, e) {
+ for (; 0 != this.xBufOff && e > 0;) this.update(t[i]),
+ i++,
+ e--;
+ for (; e > this.xBuf.length;) this.processWord(t, i),
+ i += this.xBuf.length,
+ e -= this.xBuf.length,
+ this.byteCount += this.xBuf.length;
+ for (; e > 0;) this.update(t[i]),
+ i++,
+ e--
+ }
+ },
+ {
+ key: "finish",
+ value: function() {
+ var t = this.byteCount << 3;
+ for (this.update(128); 0 != this.xBufOff;) this.update(0);
+ this.processLength(t),
+ this.processBlock()
+ }
+ },
+ {
+ key: "rotate",
+ value: function(t, i) {
+ return t << i | this.urShift(t, 32 - i)
+ }
+ },
+ {
+ key: "p0",
+ value: function(t) {
+ return t ^ this.rotate(t, 9) ^ this.rotate(t, 17)
+ }
+ },
+ {
+ key: "p1",
+ value: function(t) {
+ return t ^ this.rotate(t, 15) ^ this.rotate(t, 23)
+ }
+ },
+ {
+ key: "ff_00_15",
+ value: function(t, i, e) {
+ return t ^ i ^ e
+ }
+ },
+ {
+ key: "ff_16_63",
+ value: function(t, i, e) {
+ return t & i | t & e | i & e
+ }
+ },
+ {
+ key: "gg_00_15",
+ value: function(t, i, e) {
+ return t ^ i ^ e
+ }
+ },
+ {
+ key: "gg_16_63",
+ value: function(t, i, e) {
+ return t & i | ~t & e
+ }
+ },
+ {
+ key: "urShift",
+ value: function(t, i) {
+ return (t > a.maxValue || t < a.minValue) && (t = a.parse(t)),
+ t >= 0 ? t >> i: (t >> i) + (2 << ~i)
+ }
+ },
+ {
+ key: "urShiftLong",
+ value: function(t, i) {
+ var e = void 0,
+ r = new o;
+ if (r.fromInt(t), r.signum() >= 0) e = r.shiftRight(i).intValue();
+ else {
+ var n = new o;
+ n.fromInt(2);
+ var s = ~i,
+ h = "";
+ if (s < 0) {
+ for (var u = 64 + s,
+ a = 0; a < u; a++) h += "0";
+ var f = new o;
+ f.fromInt(t >> i);
+ var l = new o("10" + h, 2);
+ h = l.toRadix(10);
+ e = l.add(f).toRadix(10)
+ } else h = n.shiftLeft(~i).intValue(),
+ e = (t >> i) + h
+ }
+ return e
+ }
+ },
+ {
+ key: "getZ",
+ value: function(t, i) {
+ var e = h.parseUtf8StringToHex("1234567812345678"),
+ r = 4 * e.length;
+ this.update(r >> 8 & 255),
+ this.update(255 & r);
+ var n = h.hexToArray(e);
+ this.blockUpdate(n, 0, n.length);
+ var s = h.hexToArray(t.curve.a.toBigInteger().toRadix(16)),
+ o = h.hexToArray(t.curve.b.toBigInteger().toRadix(16)),
+ u = h.hexToArray(t.getX().toBigInteger().toRadix(16)),
+ a = h.hexToArray(t.getY().toBigInteger().toRadix(16)),
+ f = h.hexToArray(i.substr(0, 64)),
+ l = h.hexToArray(i.substr(64, 64));
+ this.blockUpdate(s, 0, s.length),
+ this.blockUpdate(o, 0, o.length),
+ this.blockUpdate(u, 0, u.length),
+ this.blockUpdate(a, 0, a.length),
+ this.blockUpdate(f, 0, f.length),
+ this.blockUpdate(l, 0, l.length);
+ var c = new Array(this.getDigestSize());
+ return this.doFinal(c, 0),
+ c
+ }
+ }]),
+ t
+ } ();
+ t.exports = f
+},
+function(t, i, e) {
+ "use strict";
+ function r(t, i) {
+ var e = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1,
+ r = new g;
+ t = m.hexToArray(m.parseUtf8StringToHex(t)),
+ i.length > 128 && (i = i.substr(i.length - 128));
+ var n = i.substr(0, 64),
+ s = i.substr(64);
+ i = r.createPoint(n, s);
+ var o = r.initEncipher(i);
+ r.encryptBlock(t);
+ var h = m.arrayToHex(t),
+ u = new Array(32);
+ return r.doFinal(u),
+ u = m.arrayToHex(u),
+ e === B ? o + h + u: o + u + h
+ }
+ function n(t, i) {
+ var e = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1,
+ r = new g;
+ i = new l(i, 16);
+ var n = t.substr(0, 64),
+ s = t.substr(0 + n.length, 64),
+ o = n.length + s.length,
+ h = t.substr(o, 64),
+ u = t.substr(o + 64);
+ e === B && (h = t.substr(t.length - 64), u = t.substr(o, t.length - o - 64));
+ var a = m.hexToArray(u),
+ f = r.createPoint(n, s);
+ r.initDecipher(i, f),
+ r.decryptBlock(a);
+ var c = new Array(32);
+ if (r.doFinal(c), m.arrayToHex(c) === h) return m.arrayToUtf8(a);
+ return ""
+ }
+ function s(t, i) {
+ var e = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},
+ r = e.pointPool,
+ n = e.der,
+ s = e.hash,
+ o = e.publicKey,
+ f = "string" == typeof t ? m.parseUtf8StringToHex(t) : m.parseArrayBufferToHex(t);
+ s && (o = o || u(i), f = h(f, o));
+ var c = new l(i, 16),
+ y = new l(f, 16),
+ v = null,
+ g = null,
+ d = null;
+ do {
+ do {
+ var T = void 0;
+ T = r && r.length ? r.pop() : a(), v = T.k, g = y.add(T.x1).mod(F)
+ } while ( g . equals ( l . ZERO ) || g.add(v).equals(F));
+ d = c.add(l.ONE).modInverse(F).multiply(v.subtract(g.multiply(c))).mod(F)
+ } while ( d . equals ( l . ZERO ));
+ return n ? p(g, d) : m.leftPad(g.toString(16), 64) + m.leftPad(d.toString(16), 64)
+ }
+ function o(t, i, e) {
+ var r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {},
+ n = r.der,
+ s = r.hash,
+ o = "string" == typeof t ? m.parseUtf8StringToHex(t) : m.parseArrayBufferToHex(t);
+ s && (o = h(o, e));
+ var u = void 0,
+ a = void 0;
+ if (n) {
+ var f = y(i);
+ u = f.r,
+ a = f.s
+ } else u = new l(i.substring(0, 64), 16),
+ a = new l(i.substring(64), 16);
+ var c = b.decodePointHex(e),
+ p = new l(o, 16),
+ v = u.add(a).mod(F);
+ if (v.equals(l.ZERO)) return ! 1;
+ var g = T.multiply(a).add(c.multiply(v)),
+ d = p.add(g.getX().toBigInteger()).mod(F);
+ return u.equals(d)
+ }
+ function h(t, i) {
+ var e = new v,
+ r = (new v).getZ(T, i.substr(2, 128)),
+ n = m.hexToArray(m.arrayToHex(r).toString()),
+ s = t,
+ o = m.hexToArray(s),
+ h = new Array(e.getDigestSize());
+ return e.blockUpdate(n, 0, n.length),
+ e.blockUpdate(o, 0, o.length),
+ e.doFinal(h, 0),
+ m.arrayToHex(h).toString()
+ }
+ function u(t) {
+ var i = T.multiply(new l(t, 16));
+ return "04" + m.leftPad(i.getX().toBigInteger().toString(16), 64) + m.leftPad(i.getY().toBigInteger().toString(16), 64)
+ }
+ function a() {
+ var t = m.generateKeyPairHex(),
+ i = b.decodePointHex(t.publicKey);
+ return t.k = new l(t.privateKey, 16),
+ t.x1 = i.getX().toBigInteger(),
+ t
+ }
+ var f = e(0),
+ l = f.BigInteger,
+ c = e(4),
+ p = c.encodeDer,
+ y = c.decodeDer,
+ v = e(2),
+ g = e(6),
+ m = e(1),
+ d = m.generateEcparam(),
+ T = d.G,
+ b = d.curve,
+ F = d.n,
+ B = 0;
+ t.exports = {
+ generateKeyPairHex: m.generateKeyPairHex,
+ doEncrypt: r,
+ doDecrypt: n,
+ doSignature: s,
+ doVerifySignature: o,
+ getPoint: a
+ }
+},
+function(t, i, e) {
+ "use strict";
+ function r(t, i) {
+ if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ return ! i || "object" != typeof i && "function" != typeof i ? t: i
+ }
+ function n(t, i) {
+ if ("function" != typeof i && null !== i) throw new TypeError("Super expression must either be null or a function, not " + typeof i);
+ t.prototype = Object.create(i && i.prototype, {
+ constructor: {
+ value: t,
+ enumerable: !1,
+ writable: !0,
+ configurable: !0
+ }
+ }),
+ i && (Object.setPrototypeOf ? Object.setPrototypeOf(t, i) : t.__proto__ = i)
+ }
+ function s(t, i) {
+ if (! (t instanceof i)) throw new TypeError("Cannot call a class as a function")
+ }
+ function o(t) {
+ var i = t.toString(16);
+ if ("-" !== i.substr(0, 1)) i.length % 2 == 1 ? i = "0" + i: i.match(/^[0-7]/) || (i = "00" + i);
+ else {
+ var e = i.substr(1),
+ r = e.length;
+ r % 2 == 1 ? r += 1 : i.match(/^[0-7]/) || (r += 2);
+ for (var n = "",
+ s = 0; s < r; s++) n += "f";
+ i = new g(n, 16).xor(t).add(g.ONE).toString(16).replace(/^-/, "")
+ }
+ return i
+ }
+ function h(t, i) {
+ if ("8" !== t.substring(i + 2, i + 3)) return 1;
+ var e = parseInt(t.substring(i + 3, i + 4));
+ return 0 === e ? -1 : 0 < e && e < 10 ? e + 1 : -2
+ }
+ function u(t, i) {
+ var e = h(t, i);
+ return e < 1 ? "": t.substring(i + 2, i + 2 + 2 * e)
+ }
+ function a(t, i) {
+ var e = u(t, i);
+ if ("" === e) return - 1;
+ var r = void 0;
+ return r = parseInt(e.substring(0, 1)) < 8 ? new g(e, 16) : new g(e.substring(2), 16),
+ r.intValue()
+ }
+ function f(t, i) {
+ var e = h(t, i);
+ return e < 0 ? l_len: i + 2 * (e + 1)
+ }
+ function l(t, i) {
+ var e = f(t, i),
+ r = a(t, i);
+ return t.substring(e, e + 2 * r)
+ }
+ function c(t, i) {
+ return f(t, i) + 2 * a(t, i)
+ }
+ function p(t, i) {
+ var e = [],
+ r = f(t, i);
+ e.push(r);
+ for (var n = a(t, i), s = r, o = 0;;) {
+ var h = c(t, s);
+ if (null === h || h - r >= 2 * n) break;
+ if (o >= 200) break;
+ e.push(h),
+ s = h,
+ o++
+ }
+ return e
+ }
+ var y = function() {
+ function t(t, i) {
+ for (var e = 0; e < i.length; e++) {
+ var r = i[e];
+ r.enumerable = r.enumerable || !1,
+ r.configurable = !0,
+ "value" in r && (r.writable = !0),
+ Object.defineProperty(t, r.key, r)
+ }
+ }
+ return function(i, e, r) {
+ return e && t(i.prototype, e),
+ r && t(i, r),
+ i
+ }
+ } (),
+ v = e(0),
+ g = v.BigInteger,
+ m = function() {
+ function t() {
+ s(this, t),
+ this.isModified = !0,
+ this.hTLV = null,
+ this.hT = "00",
+ this.hL = "00",
+ this.hV = ""
+ }
+ return y(t, [{
+ key: "getLengthHexFromValue",
+ value: function() {
+ var t = this.hV.length / 2,
+ i = t.toString(16);
+ return i.length % 2 == 1 && (i = "0" + i),
+ t < 128 ? i: (128 + i.length / 2).toString(16) + i
+ }
+ },
+ {
+ key: "getEncodedHex",
+ value: function() {
+ return (null == this.hTLV || this.isModified) && (this.hV = this.getFreshValueHex(), this.hL = this.getLengthHexFromValue(), this.hTLV = this.hT + this.hL + this.hV, this.isModified = !1),
+ this.hTLV
+ }
+ },
+ {
+ key: "getFreshValueHex",
+ value: function() {
+ return ""
+ }
+ }]),
+ t
+ } (),
+ d = function(t) {
+ function i(t) {
+ s(this, i);
+ var e = r(this, (i.__proto__ || Object.getPrototypeOf(i)).call(this));
+ return e.hT = "02",
+ t && t.bigint && (e.hTLV = null, e.isModified = !0, e.hV = o(t.bigint)),
+ e
+ }
+ return n(i, t),
+ y(i, [{
+ key: "getFreshValueHex",
+ value: function() {
+ return this.hV
+ }
+ }]),
+ i
+ } (m),
+ T = function(t) {
+ function i(t) {
+ s(this, i);
+ var e = r(this, (i.__proto__ || Object.getPrototypeOf(i)).call(this));
+ return e.hT = "30",
+ e.asn1Array = [],
+ t && t.array && (e.asn1Array = t.array),
+ e
+ }
+ return n(i, t),
+ y(i, [{
+ key: "getFreshValueHex",
+ value: function() {
+ for (var t = "",
+ i = 0; i < this.asn1Array.length; i++) {
+ t += this.asn1Array[i].getEncodedHex()
+ }
+ return this.hV = t,
+ this.hV
+ }
+ }]),
+ i
+ } (m);
+ t.exports = {
+ encodeDer: function(t, i) {
+ var e = new d({
+ bigint: t
+ }),
+ r = new d({
+ bigint: i
+ });
+ return new T({
+ array: [e, r]
+ }).getEncodedHex()
+ },
+ decodeDer: function(t) {
+ var i = p(t, 0),
+ e = i[0],
+ r = i[1],
+ n = l(t, e),
+ s = l(t, r);
+ return {
+ r: new g(n, 16),
+ s: new g(s, 16)
+ }
+ }
+ }
+},
+function(t, i, e) {
+ "use strict";
+ function r(t, i) {
+ if (! (t instanceof i)) throw new TypeError("Cannot call a class as a function")
+ }
+ var n = function() {
+ function t(t, i) {
+ for (var e = 0; e < i.length; e++) {
+ var r = i[e];
+ r.enumerable = r.enumerable || !1,
+ r.configurable = !0,
+ "value" in r && (r.writable = !0),
+ Object.defineProperty(t, r.key, r)
+ }
+ }
+ return function(i, e, r) {
+ return e && t(i.prototype, e),
+ r && t(i, r),
+ i
+ }
+ } (),
+ s = e(0),
+ o = s.BigInteger,
+ h = new o("3"),
+ u = function() {
+ function t(i, e) {
+ r(this, t),
+ this.x = e,
+ this.q = i
+ }
+ return n(t, [{
+ key: "equals",
+ value: function(t) {
+ return t === this || this.q.equals(t.q) && this.x.equals(t.x)
+ }
+ },
+ {
+ key: "toBigInteger",
+ value: function() {
+ return this.x
+ }
+ },
+ {
+ key: "negate",
+ value: function() {
+ return new t(this.q, this.x.negate().mod(this.q))
+ }
+ },
+ {
+ key: "add",
+ value: function(i) {
+ return new t(this.q, this.x.add(i.toBigInteger()).mod(this.q))
+ }
+ },
+ {
+ key: "subtract",
+ value: function(i) {
+ return new t(this.q, this.x.subtract(i.toBigInteger()).mod(this.q))
+ }
+ },
+ {
+ key: "multiply",
+ value: function(i) {
+ return new t(this.q, this.x.multiply(i.toBigInteger()).mod(this.q))
+ }
+ },
+ {
+ key: "divide",
+ value: function(i) {
+ return new t(this.q, this.x.multiply(i.toBigInteger().modInverse(this.q)).mod(this.q))
+ }
+ },
+ {
+ key: "square",
+ value: function() {
+ return new t(this.q, this.x.square().mod(this.q))
+ }
+ }]),
+ t
+ } (),
+ a = function() {
+ function t(i, e, n, s) {
+ r(this, t),
+ this.curve = i,
+ this.x = e,
+ this.y = n,
+ this.z = void 0 === s ? o.ONE: s,
+ this.zinv = null
+ }
+ return n(t, [{
+ key: "getX",
+ value: function() {
+ return null === this.zinv && (this.zinv = this.z.modInverse(this.curve.q)),
+ this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))
+ }
+ },
+ {
+ key: "getY",
+ value: function() {
+ return null === this.zinv && (this.zinv = this.z.modInverse(this.curve.q)),
+ this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))
+ }
+ },
+ {
+ key: "equals",
+ value: function(t) {
+ return t === this || (this.isInfinity() ? t.isInfinity() : t.isInfinity() ? this.isInfinity() : !!t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(o.ZERO) && t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(o.ZERO))
+ }
+ },
+ {
+ key: "isInfinity",
+ value: function() {
+ return null === this.x && null === this.y || this.z.equals(o.ZERO) && !this.y.toBigInteger().equals(o.ZERO)
+ }
+ },
+ {
+ key: "negate",
+ value: function() {
+ return new t(this.curve, this.x, this.y.negate(), this.z)
+ }
+ },
+ {
+ key: "add",
+ value: function(i) {
+ if (this.isInfinity()) return i;
+ if (i.isInfinity()) return this;
+ var e = this.x.toBigInteger(),
+ r = this.y.toBigInteger(),
+ n = this.z,
+ s = i.x.toBigInteger(),
+ h = i.y.toBigInteger(),
+ u = i.z,
+ a = this.curve.q,
+ f = e.multiply(u).mod(a),
+ l = s.multiply(n).mod(a),
+ c = f.subtract(l),
+ p = r.multiply(u).mod(a),
+ y = h.multiply(n).mod(a),
+ v = p.subtract(y);
+ if (o.ZERO.equals(c)) return o.ZERO.equals(v) ? this.twice() : this.curve.infinity;
+ var g = f.add(l),
+ m = n.multiply(u).mod(a),
+ d = c.square().mod(a),
+ T = c.multiply(d).mod(a),
+ b = m.multiply(v.square()).subtract(g.multiply(d)).mod(a),
+ F = c.multiply(b).mod(a),
+ B = v.multiply(d.multiply(f).subtract(b)).subtract(p.multiply(T)).mod(a),
+ x = T.multiply(m).mod(a);
+ return new t(this.curve, this.curve.fromBigInteger(F), this.curve.fromBigInteger(B), x)
+ }
+ },
+ {
+ key: "twice",
+ value: function() {
+ if (this.isInfinity()) return this;
+ if (!this.y.toBigInteger().signum()) return this.curve.infinity;
+ var i = this.x.toBigInteger(),
+ e = this.y.toBigInteger(),
+ r = this.z,
+ n = this.curve.q,
+ s = this.curve.a.toBigInteger(),
+ o = i.square().multiply(h).add(s.multiply(r.square())).mod(n),
+ u = e.shiftLeft(1).multiply(r).mod(n),
+ a = e.square().mod(n),
+ f = a.multiply(i).multiply(r).mod(n),
+ l = u.square().mod(n),
+ c = o.square().subtract(f.shiftLeft(3)).mod(n),
+ p = u.multiply(c).mod(n),
+ y = o.multiply(f.shiftLeft(2).subtract(c)).subtract(l.shiftLeft(1).multiply(a)).mod(n),
+ v = u.multiply(l).mod(n);
+ return new t(this.curve, this.curve.fromBigInteger(p), this.curve.fromBigInteger(y), v)
+ }
+ },
+ {
+ key: "multiply",
+ value: function(t) {
+ if (this.isInfinity()) return this;
+ if (!t.signum()) return this.curve.infinity;
+ for (var i = t.multiply(h), e = this.negate(), r = this, n = i.bitLength() - 2; n > 0; n--) {
+ r = r.twice();
+ var s = i.testBit(n);
+ s !== t.testBit(n) && (r = r.add(s ? this: e))
+ }
+ return r
+ }
+ }]),
+ t
+ } (),
+ f = function() {
+ function t(i, e, n) {
+ r(this, t),
+ this.q = i,
+ this.a = this.fromBigInteger(e),
+ this.b = this.fromBigInteger(n),
+ this.infinity = new a(this, null, null)
+ }
+ return n(t, [{
+ key: "equals",
+ value: function(t) {
+ return t === this || this.q.equals(t.q) && this.a.equals(t.a) && this.b.equals(t.b)
+ }
+ },
+ {
+ key: "fromBigInteger",
+ value: function(t) {
+ return new u(this.q, t)
+ }
+ },
+ {
+ key: "decodePointHex",
+ value: function(t) {
+ switch (parseInt(t.substr(0, 2), 16)) {
+ case 0:
+ return this.infinity;
+ case 2:
+ case 3:
+ return null;
+ case 4:
+ case 6:
+ case 7:
+ var i = (t.length - 2) / 2,
+ e = t.substr(2, i),
+ r = t.substr(i + 2, i);
+ return new a(this, this.fromBigInteger(new o(e, 16)), this.fromBigInteger(new o(r, 16)));
+ default:
+ return null
+ }
+ }
+ }]),
+ t
+ } ();
+ t.exports = {
+ ECPointFp: a,
+ ECCurveFp: f
+ }
+},
+function(t, i, e) {
+ "use strict";
+ function r(t, i) {
+ if (! (t instanceof i)) throw new TypeError("Cannot call a class as a function")
+ }
+ var n = function() {
+ function t(t, i) {
+ for (var e = 0; e < i.length; e++) {
+ var r = i[e];
+ r.enumerable = r.enumerable || !1,
+ r.configurable = !0,
+ "value" in r && (r.writable = !0),
+ Object.defineProperty(t, r.key, r)
+ }
+ }
+ return function(i, e, r) {
+ return e && t(i.prototype, e),
+ r && t(i, r),
+ i
+ }
+ } (),
+ s = e(0),
+ o = s.BigInteger,
+ h = e(2),
+ u = e(1),
+ a = function() {
+ function t() {
+ r(this, t),
+ this.ct = 1,
+ this.p2 = null,
+ this.sm3keybase = null,
+ this.sm3c3 = null,
+ this.key = new Array(32),
+ this.keyOff = 0
+ }
+ return n(t, [{
+ key: "reset",
+ value: function() {
+ this.sm3keybase = new h,
+ this.sm3c3 = new h;
+ var t = u.hexToArray(this.p2.getX().toBigInteger().toRadix(16)),
+ i = u.hexToArray(this.p2.getY().toBigInteger().toRadix(16));
+ this.sm3keybase.blockUpdate(t, 0, t.length),
+ this.sm3c3.blockUpdate(t, 0, t.length),
+ this.sm3keybase.blockUpdate(i, 0, i.length),
+ this.ct = 1,
+ this.nextKey()
+ }
+ },
+ {
+ key: "nextKey",
+ value: function() {
+ var t = new h(this.sm3keybase);
+ t.update(this.ct >> 24 & 255),
+ t.update(this.ct >> 16 & 255),
+ t.update(this.ct >> 8 & 255),
+ t.update(255 & this.ct),
+ t.doFinal(this.key, 0),
+ this.keyOff = 0,
+ this.ct++
+ }
+ },
+ {
+ key: "initEncipher",
+ value: function(t) {
+ var i = u.generateKeyPairHex(),
+ e = new o(i.privateKey, 16),
+ r = i.publicKey;
+ return this.p2 = t.multiply(e),
+ this.reset(),
+ r.length > 128 && (r = r.substr(r.length - 128)),
+ r
+ }
+ },
+ {
+ key: "encryptBlock",
+ value: function(t) {
+ this.sm3c3.blockUpdate(t, 0, t.length);
+ for (var i = 0; i < t.length; i++) this.keyOff === this.key.length && this.nextKey(),
+ t[i] ^= 255 & this.key[this.keyOff++]
+ }
+ },
+ {
+ key: "initDecipher",
+ value: function(t, i) {
+ this.p2 = i.multiply(t),
+ this.reset()
+ }
+ },
+ {
+ key: "decryptBlock",
+ value: function(t) {
+ for (var i = 0; i < t.length; i++) this.keyOff === this.key.length && this.nextKey(),
+ t[i] ^= 255 & this.key[this.keyOff++];
+ this.sm3c3.blockUpdate(t, 0, t.length)
+ }
+ },
+ {
+ key: "doFinal",
+ value: function(t) {
+ var i = u.hexToArray(this.p2.getY().toBigInteger().toRadix(16));
+ this.sm3c3.blockUpdate(i, 0, i.length),
+ this.sm3c3.doFinal(t, 0),
+ this.reset()
+ }
+ },
+ {
+ key: "createPoint",
+ value: function(t, i) {
+ var e = "04" + t + i;
+ return u.getGlobalCurve().decodePointHex(e)
+ }
+ }]),
+ t
+ } ();
+ t.exports = a
+}]);
\ No newline at end of file
diff --git a/markdown_trans/markdown_BDWare/conf.py b/markdown_trans/markdown_BDWare/conf.py
new file mode 100644
index 0000000..a4d7a61
--- /dev/null
+++ b/markdown_trans/markdown_BDWare/conf.py
@@ -0,0 +1,108 @@
+# Configuration file for the Sphinx documentation builder.
+#
+# This file only contains a selection of the most common options. For a full
+# list see the documentation:
+# https://www.sphinx-doc.org/en/master/usage/configuration.html
+
+# -- Path setup --------------------------------------------------------------
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+# import os
+# import sys
+# sys.path.insert(0, os.path.abspath('.'))
+
+
+# -- Project information -----------------------------------------------------
+project = '北大数瑞大数据区块链'
+copyright = '2021, Peking University'
+author = 'Peking University'
+
+# The full version, including alpha/beta/rc tags
+release = 'V1.4.6'
+
+
+# -- General configuration ---------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+
+html_theme = "sphinx_rtd_theme"
+html_logo="_static/imgs/logo.png"
+html_theme_options = {
+'logo_only': True
+}
+
+source_parsers = {
+ '.md': 'recommonmark.parser.CommonMarkParser',
+}
+
+source_suffix = ['.rst', '.md']
+
+# source_suffix = {
+# '.rst': 'restructuredtext',
+# '.txt': 'markdown',
+# '.md': 'markdown'
+# }
+
+extensions = [
+ 'recommonmark',
+ 'sphinx_rtd_theme',
+ 'sphinx_markdown_tables',
+ 'sphinx_multiversion'
+]
+
+html_favicon = "_static/imgs/favicon.ico"
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = 'zh_CN'
+
+html_sidebars = {
+ '**': [
+ 'versioning.html',
+ ],
+}
+smv_latest_version = 'master'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This pattern also affects html_static_path and html_extra_path.
+exclude_patterns = []
+
+
+# -- Options for HTML output -------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+#
+#html_theme = 'alabaster'
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+master_doc = 'index'
+
+
+##latex_elements = {
+## 'papersize': 'a4paper',
+ # Additional stuff for the LaTeX preamble.
+## 'preamble': '''
+##\usepackage{xeCJK}
+##\usepackage{indentfirst}
+##\setlength{\parindent}{2em}
+##\setCJKmainfont[BoldFont=STFangsong, ItalicFont=STKaiti]{STSong}
+##\setCJKsansfont[BoldFont=STHeiti]{STXihei}
+##\setCJKmonofont{STFangsong}
+##''',
+##}
\ No newline at end of file
diff --git a/markdown_trans/markdown_BDWare/httpapi.md b/markdown_trans/markdown_BDWare/httpapi.md
new file mode 100644
index 0000000..3d265c6
--- /dev/null
+++ b/markdown_trans/markdown_BDWare/httpapi.md
@@ -0,0 +1,603 @@
+``` {.yaml}
+type: google.api.Service
+config_version: 3
+
+http:
+ rules:
+ - selector: bdware.bdledger.api.Node.ClientVersion
+ get: /v0/node/version
+ - selector: bdware.bdledger.api.Ledger.CreateLedger
+ post: /v0/ledgers
+ body: "*"
+ - selector: bdware.bdledger.api.Ledger.GetLedgers
+ get: /v0/ledgers
+ - selector: bdware.bdledger.api.Ledger.SendTransaction
+ post: /v0/ledgers/{ledger}/transactions
+ body: "*"
+ - selector: bdware.bdledger.api.Query.GetBlockByHash
+ get: /v0/ledgers/{ledger}/block
+ - selector: bdware.bdledger.api.Query.GetBlocks
+ post: /v0/ledgers/{ledger}/blocks/query
+ body: "*"
+ - selector: bdware.bdledger.api.Query.CountBlocks
+ post: /v0/ledgers/{ledger}/blocks/count
+ body: "*"
+ - selector: bdware.bdledger.api.Query.GetRecentBlocks
+ get: /v0/ledgers/{ledger}/blocks/recent
+ - selector: bdware.bdledger.api.Query.GetTransactionByHash
+ get: /v0/ledgers/{ledger}/transaction
+ - selector: bdware.bdledger.api.Query.GetTransactionByBlockHashAndIndex
+ get: /v0/ledgers/{ledger}/block/transaction
+ - selector: bdware.bdledger.api.Query.GetTransactions
+ post: /v0/ledgers/{ledger}/transactions/query
+ body: "*"
+ - selector: bdware.bdledger.api.Query.CountTransactions
+ post: /v0/ledgers/{ledger}/transactions/count
+ body: "*"
+```
+
+> **Note**
+>
+> Request/Response data of **bytes** type should/will be encoded with
+> [Base64](https://tools.ietf.org/html/rfc4648#section-4).
+
+> **Note**
+>
+> When using hash strings in URL, they need to be encoded with
+> [encodeURIComponent](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent).
+
+Request Examples{#_request_examples}
+================
+
+Node.ClientVersion{#_node_clientversion}
+------------------
+
+Get BDLedger node version
+
+ GET http://{{IP}}:{{PORT}}/v0/node/version
+
+**Response.**
+
+
+``` {.json}
+{
+ "version": "dev-210119.a88bf4eb"
+}
+```
+
+Ledger.CreateLedger{#_ledger_createledger}
+-------------------
+
+Create a new ledger
+
+ POST http://{{IP}}:{{PORT}}/v0/ledgers
+
+**Request body.**
+
+
+``` {.json}
+{
+ "name": "test"
+}
+```
+
+**Response.**
+
+
+``` {.json}
+{
+ "ok": true
+}
+```
+
+Ledger.GetLedgers{#_ledger_getledgers}
+-----------------
+
+Get all ledgers
+
+ GET http://{{IP}}:{{PORT}}/v0/ledgers
+
+**Response.**
+
+
+``` {.json}
+{
+ "ledgers": [
+ "default",
+ "test"
+ ]
+}
+```
+
+Ledger.SendTransaction{#_ledger_sendtransaction}
+----------------------
+
+Send a new transaction
+
+ POST http://{{IP}}:{{PORT}}/v0/ledgers/test/transactions
+
+**Request body.**
+
+
+``` {.json}
+{
+ "transaction": {
+ "type": 0,
+ "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=",
+ "nonce": 52,
+ "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM="
+ }
+}
+```
+
+**Response.**
+
+
+``` {.json}
+{
+ "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE="
+}
+```
+
+Query.GetBlockByHash{#_query_getblockbyhash}
+--------------------
+
+Get a block identified by its hash
+
+ GET http://{{IP}}:{{PORT}}/v0/ledgers/test/block?hash=LSKr%2BK079Ax%2BrKdlyYN5ze2YGzo%3D
+
+**hash** has to be encoded with[encodeURIComponent](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent)
+
+**Response.**
+
+
+``` {.json}
+{
+ "block": {
+ "hash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=",
+ "creator": "",
+ "nonce": "0",
+ "parentHashes": [
+ "fLX5pMY8M1qSAGZdKT1rWBkdEMo=",
+ "rk0DWMaUpRG82yVX+cFhbfhPFdw=",
+ "3XkwkuMBearq8uavN76Te7Zdpl8="
+ ],
+ "witnesses": [],
+ "timestamp": "1611038043",
+ "size": "0",
+ "transactionCount": 1,
+ "transactionsRoot": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "transactions": [
+ {
+ "blockHash": "",
+ "blockTimestamp": "0",
+ "index": 0,
+ "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "type": "RECORD",
+ "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=",
+ "nonce": "0",
+ "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=",
+ "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM="
+ }
+ ],
+ "transactionHashes": [
+ "VQBeA5Ee0Y5hqEileoQuYMHbOSE="
+ ]
+ }
+}
+```
+
+Query.GetBlocks{#_query_getblocks}
+---------------
+
+Get blocks in a timestamp range
+
+ POST http://{{IP}}:{{PORT}}/v0/ledgers/test/blocks/query
+
+
+``` {.protobuf}
+enum IncludeTransactions {
+ NONE = 0; // Don't include transaction data
+ HASH = 1; // Include transactions hashes
+ FULL = 2; // Include full transactions
+}
+```
+
+Requirement: asciimath: \ [\ “start \ _timestamp \” ⇐ \ ’end \ _timestamp \ \]”
+
+If only **end\_timestamp** is not specified, orasciimath:\[\“end\_timestamp\”-\“start\_timestamp\”\>\“query.maxDuration\”\],then **end\_timestamp** will be set toasciimath:\[\“start\_timestamp\”+\“query.maxDuration\”\].
+
+If only **start\_timestamp** is not specified, then **start\_timestamp**will be set to asciimath:\[\“end\_timestamp\”-\“query.maxDuration\”\].
+
+In all cases, **start\_timestamp** will never be earlier than thegenesis block’s timestamp, and **end\_timestamp** will never be laterthan the current timestamp when the node process the query request.
+
+**Request body 1.**
+
+
+``` {.json}
+{
+ "start_timestamp": 1611038000,
+ "end_timestamp": 1611039000,
+ "include_transactions": 0
+}
+```
+
+**Response 1.**
+
+
+``` {.json}
+{
+ "blocks": [
+ {
+ "hash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=",
+ "creator": "",
+ "nonce": "0",
+ "parentHashes": [
+ "fLX5pMY8M1qSAGZdKT1rWBkdEMo=",
+ "rk0DWMaUpRG82yVX+cFhbfhPFdw=",
+ "3XkwkuMBearq8uavN76Te7Zdpl8="
+ ],
+ "witnesses": [],
+ "timestamp": "1611038043",
+ "size": "0",
+ "transactionCount": 1,
+ "transactionsRoot": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "transactions": [],
+ "transactionHashes": []
+ }
+ ],
+ "startTimestamp": "1611038043",
+ "endTimestamp": "1611038043"
+}
+```
+
+**Request body 2.**
+
+
+``` {.json}
+{
+ "start_timestamp": 1611038000,
+ "end_timestamp": 1611039000,
+ "include_transactions": 1
+}
+```
+
+**Response 2.**
+
+
+``` {.json}
+{
+ "blocks": [
+ {
+ "hash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=",
+ "creator": "",
+ "nonce": "0",
+ "parentHashes": [
+ "fLX5pMY8M1qSAGZdKT1rWBkdEMo=",
+ "rk0DWMaUpRG82yVX+cFhbfhPFdw=",
+ "3XkwkuMBearq8uavN76Te7Zdpl8="
+ ],
+ "witnesses": [],
+ "timestamp": "1611038043",
+ "size": "0",
+ "transactionCount": 1,
+ "transactionsRoot": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "transactions": [],
+ "transactionHashes": [
+ "VQBeA5Ee0Y5hqEileoQuYMHbOSE="
+ ]
+ }
+ ],
+ "startTimestamp": "1611038043",
+ "endTimestamp": "1611038043"
+}
+```
+
+**Request body 3.**
+
+
+``` {.json}
+{
+ "start_timestamp": 1611038000,
+ "end_timestamp": 1611039000,
+ "include_transactions": 2
+}
+```
+
+**Response 3.**
+
+
+``` {.json}
+{
+ "blocks": [
+ {
+ "hash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=",
+ "creator": "",
+ "nonce": "0",
+ "parentHashes": [
+ "fLX5pMY8M1qSAGZdKT1rWBkdEMo=",
+ "rk0DWMaUpRG82yVX+cFhbfhPFdw=",
+ "3XkwkuMBearq8uavN76Te7Zdpl8="
+ ],
+ "witnesses": [],
+ "timestamp": "1611038043",
+ "size": "0",
+ "transactionCount": 1,
+ "transactionsRoot": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "transactions": [
+ {
+ "blockHash": "",
+ "blockTimestamp": "0",
+ "index": 0,
+ "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "type": "RECORD",
+ "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=",
+ "nonce": "0",
+ "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=",
+ "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM="
+ }
+ ],
+ "transactionHashes": [
+ "VQBeA5Ee0Y5hqEileoQuYMHbOSE="
+ ]
+ }
+ ],
+ "startTimestamp": "1611038043",
+ "endTimestamp": "1611038043"
+}
+```
+
+Query.CountBlocks{#_query_countblocks}
+-----------------
+
+Count all blocks in a ledger, or blocks in a timestamp range
+
+ POST http://{{IP}}:{{PORT}}/v0/ledgers/test/blocks/count
+
+Requirement: asciimath: \ [\ “start \ _timestamp \” ⇐ \ ’end \ _timestamp \ \]”
+
+If neither **start\_timestamp** nor **end\_timestamp** is specified,then count all blocks in the specified ledger.
+
+If only **end\_timestamp** is not specified, then count all blocks withtimestamps later than **start\_timestamp**.
+
+If only **start\_timestamp** is not specified, then count all blockswith timestamps earlier than **end\_timestamp**.
+
+In all cases, **start\_timestamp** will never be earlier than thegenesis block’s timestamp, and **end\_timestamp** will never be laterthan the current timestamp when the node process the query request.
+
+**Request body 1.**
+
+
+``` {.json}
+{}
+```
+
+**Response 1.**
+
+
+``` {.json}
+{
+ "count": "5",
+ "startTimestamp": "0",
+ "endTimestamp": "1611039957"
+}
+```
+
+**Request body 2.**
+
+
+``` {.json}
+{
+ "start_timestamp": 1611038000,
+ "end_timestamp": 1611039000
+}
+```
+
+**Response 2.**
+
+
+``` {.json}
+{
+ "count": "1",
+ "startTimestamp": "1611038000",
+ "endTimestamp": "1611039000"
+}
+```
+
+Query.GetRecentBlocks{#_query_getrecentblocks}
+---------------------
+
+Get recent **count** blocks (Only support IncludeTransactions=NONE fornow)
+
+ GET http://{{IP}}:{{PORT}}/v0/ledgers/test/blocks/recent?count=2
+
+**Response.**
+
+
+``` {.json}
+{
+ "blocks": [
+ {
+ "hash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=",
+ "creator": "",
+ "nonce": "0",
+ "parentHashes": [
+ "fLX5pMY8M1qSAGZdKT1rWBkdEMo=",
+ "rk0DWMaUpRG82yVX+cFhbfhPFdw=",
+ "3XkwkuMBearq8uavN76Te7Zdpl8="
+ ],
+ "witnesses": [],
+ "timestamp": "1611038043",
+ "size": "0",
+ "transactionCount": 1,
+ "transactionsRoot": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "transactions": [],
+ "transactionHashes": []
+ },
+ {
+ "hash": "rk0DWMaUpRG82yVX+cFhbfhPFdw=",
+ "creator": "",
+ "nonce": "0",
+ "parentHashes": [
+ "fLX5pMY8M1qSAGZdKT1rWBkdEMo=",
+ "3XkwkuMBearq8uavN76Te7Zdpl8=",
+ "8pZPR74OALIbps5XFb4dL/s0j0M="
+ ],
+ "witnesses": [],
+ "timestamp": "1610968019",
+ "size": "0",
+ "transactionCount": 1,
+ "transactionsRoot": "LuxttCm/pSHVMOKF0sJExk+DJXc=",
+ "transactions": [],
+ "transactionHashes": []
+ }
+ ],
+ "startTimestamp": "1610968019",
+ "endTimestamp": "1611038043"
+}
+```
+
+Query.GetTransactionByHash{#_query_gettransactionbyhash}
+--------------------------
+
+Get a transaction identified by its hash
+
+ GET http://{{IP}}:{{PORT}}/v0/ledgers/test/transaction?hash=VQBeA5Ee0Y5hqEileoQuYMHbOSE%3D
+
+**hash** has to be encoded with[encodeURIComponent](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent)
+
+**Response.**
+
+
+``` {.json}
+{
+ "transaction": {
+ "blockHash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=",
+ "blockTimestamp": "1611038043",
+ "index": 0,
+ "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "type": "RECORD",
+ "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=",
+ "nonce": "0",
+ "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=",
+ "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM="
+ }
+}
+```
+
+Query.GetTransactionByBlockHashAndIndex{#_query_gettransactionbyblockhashandindex}
+---------------------------------------
+
+Get a transaction identified by hash of the block it belongs to and itsindex inside the block
+
+ GET http://{{IP}}:{{PORT}}/v0/ledgers/test/block/transaction?blockHash=LSKr%2BK079Ax%2BrKdlyYN5ze2YGzo%3D&index=0
+
+**blockHash** has to be encoded with[encodeURIComponent](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent)
+
+**Response.**
+
+
+``` {.json}
+{
+ "transaction": {
+ "blockHash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=",
+ "blockTimestamp": "1611038043",
+ "index": 0,
+ "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "type": "RECORD",
+ "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=",
+ "nonce": "0",
+ "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=",
+ "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM="
+ }
+}
+```
+
+Query.GetTransactions{#_query_gettransactions}
+---------------------
+
+Get transactions in a timestamp range
+
+ POST http://{{IP}}:{{PORT}}/v0/ledgers/test/transactions/query
+
+**start\_timestamp** and **end\_timestamp** follow the same requirementsand rules as in [???](#Query.GetBlocks).
+
+**Request body.**
+
+
+``` {.json}
+{
+ "start_timestamp": 1611038000,
+ "end_timestamp": 1611039000
+}
+```
+
+**Response.**
+
+
+``` {.json}
+{
+ "transactions": [
+ {
+ "blockHash": "",
+ "blockTimestamp": "0",
+ "index": 0,
+ "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=",
+ "type": "RECORD",
+ "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=",
+ "nonce": "0",
+ "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=",
+ "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM="
+ }
+ ],
+ "startTimestamp": "1611038043",
+ "endTimestamp": "1611038043"
+}
+```
+
+Query.CountTransactions{#_query_counttransactions}
+-----------------------
+
+Count all transactions in a ledger, or transactions in a timestamp range
+
+ POST http://{{IP}}:{{PORT}}/v0/ledgers/test/transactions/count
+
+**start\_timestamp** and **end\_timestamp** follow the same requirementsand rules as in [???](#Query.CountBlocks).
+
+**Request body 1.**
+
+
+``` {.json}
+{}
+```
+
+**Response 1.**
+
+
+``` {.json}
+{
+ "count": "4",
+ "startTimestamp": "0",
+ "endTimestamp": "1611039957"
+}
+```
+
+**Request body 2.**
+
+
+``` {.json}
+{
+ "start_timestamp": 1611038000,
+ "end_timestamp": 1611039000
+}
+```
+
+**Response 2.**
+
+
+``` {.json}
+{
+ "count": "1",
+ "startTimestamp": "1611038000",
+ "endTimestamp": "1611039000"
+}
+```
diff --git a/markdown_trans/markdown_BDWare/index.rst b/markdown_trans/markdown_BDWare/index.rst
new file mode 100644
index 0000000..d5249b3
--- /dev/null
+++ b/markdown_trans/markdown_BDWare/index.rst
@@ -0,0 +1,10 @@
+.. BDContract documentation master file, created bysphinx-quickstart on Mon Nov 25 16:23:38 2019.You can adapt this file completely to your liking, but it should at leastcontain the root `toctree` directive.
+
+Northland -BDContract document
+==============================
+
+.. toctree::
+ :maxdepth: 3
+ :caption: directory
+
+ 1_Introduction.rst2_InstallTips.rst3_IDEUsage.rst4_ContractAPI.rst5_YJSInDepth.rst6_YJSAPI.rst
\ No newline at end of file
diff --git a/markdown_trans/markdown_ZRYH/ContractAPI.md b/markdown_trans/markdown_ZRYH/ContractAPI.md
new file mode 100644
index 0000000..a879356
--- /dev/null
+++ b/markdown_trans/markdown_ZRYH/ContractAPI.md
@@ -0,0 +1,3687 @@
+# BDContract SDK
+In addition to using the visual smart contract online IDE, users can also use the WebSocket interface, Http interface, Bash interface to start and run the contract.
+
+- - -
+
+## WebSocketSDK download and installation
+The contract SDK provides a javascript version and a Java version of the client.
+
+The download links of Java client are :[java source](./_static/BDWareJavaClient.zip) and [jar](./_static/BDWareConfigTool.zip) refer to Readme.md and test cases in java_Source.
+
+The javascript download link is :[js SDK](./_static/js/createWS.js) Built-in SM2 encryption library link :[sm2 SDK](./_static/js/sm2.js)
+
+### Establish a connection
+Establish a WebSocket connection to the node server.
+
+#### parameter
+
+|field |value|
+| ---------- | ------------------------------------------------------------ |
+| url |If `http` is used, the prefix is `ws://`, for example, `"ws://localhost:1717/SCIDE/SCExecutor"`. If `https` is used, the prefix is `wss://`.|
+| msgHandler |The callback function after receiving the server WebSocket reply can be written by the user, or refer to the example provided below|
+
+#### Sample request
+
+
+```javascript
+var url = "ws://127.0.0.1:1717/SCIDE/SCExecutor";//与Slave节点建立连接
+//var url = "ws://127.0.0.1:1718/NodeCenterWS";//与Manager节点建立连接
+var msgHandler = function(m){
+ console.log("recmsg:");
+ console.log(m);
+};
+var onOpenHandler=undefined;
+wssocket = createWssocket(url,onOpenHandler,msgHandler);
+```
+
+#### Result
+
+
+```
+{
+ receiveSeg: [Function (anonymous)],
+ isSending: false,
+ sendList: [],
+ monitor: [Function (anonymous)],
+ send: [Function (anonymous)],
+ sendNextSegment: [Function (anonymous)],
+ isOpen: [Function (anonymous)]
+}
+```
+
+
+
+### ping
+
+`ping` Server test
+
+#### parameter
+
+|field| 值 |
+| ------ | ---- |
+|action| ping |
+
+#### Sample request
+
+
+```
+var request = {};
+request.action = "ping";
+wssocket.send(JSON.stringify(request));
+```
+
+#### Result
+
+
+```
+{
+ "action":"pong"
+}
+```
+
+### The login
+
+When using the Websocket interface to invoke an interface that requires permission, either to connect to CenterPortal or NodePortal, you must first **The login**. The login process has 3 steps:
+
+- The client establishes a connection to the server and sends {“action”:“getSessionID”} (implemented in onOpenHandler).
+- After receiving the request, the server returns a result similar to {“action”:“onGetSessionID”,“session”:”-4959947809200104526_session”} to the client
+- After receiving the onGetSessionID, the client signs the sessionID with the local public and private keys and invokes the login interface
+- The server returns the onLogin result, and the data field returns the role corresponding to the public key.
+
+- - -
+
+## User Role Division
+
+### Role division of contract nodes
+
+In contract node (NodePortal. HTML) is divided into NodeManager/ContractProvider/ContractInstanceManager/ContractUser four types of roles.
+
+| 角色 |instructions|
+| ----------------------- | ------------------------------------------------------------ |
+| NodeManager |The administrator of the node has rights to manage users and configure nodes|
+| ContractProvider |Have the rights to edit contract, develop contract code, run debugging and so on|
+| ContractInstanceManager |Have the rights to start, stop, and configure I/O of the contract instance|
+| ContractUser |Have the rights to view the list of contract instances and call the contract|
+| Anonymous |Anonymous users, can be called the contract, can apply for to become ContractProvider/InstanceManager role|
+
+
+|interface | 说明 |role|
+| ------------------------------- | -------------------- | ----------------------------------------- |
+| changeDumpPeriod | 设置备份周期 |ContractInstanceManager;|
+| createLedger | 创建账本 |ContractInstanceManager;|
+|dumpContract | 手动备份 |ContractInstanceManager;|
+| deleteMemoryFile | 删除镜像 |ContractInstanceManager;|
+| forkContract | 迁移合约 |ContractInstanceManager;|
+| getDumpPeriod | 获取备份周期 |ContractInstanceManager;|
+|killAllContract | 停止全部实例 |ContractInstanceManager;|
+|killContractProcess | 停止某一实例 |ContractInstanceManager;|
+|listMemoryFiles | 列取某一实例的镜像 |ContractInstanceManager;|
+| loadMemory | 加载镜像 |ContractInstanceManager;|
+| queryContractInstanceDOI | 查询合约实例信息 |ContractInstanceManager;|
+| rebuildHashIndex | |ContractInstanceManager;|
+| setPermission | |ContractProvider;ContractInstanceManager;|
+| startContract | Start the contract |ContractInstanceManager;|
+| startContractBatched | 废弃 |ContractInstanceManager;|
+| startContractByYPK | 启动合约 |ContractInstanceManager;|
+|startContractInTempZips | 废弃 |ContractInstanceManager;|
+| startContractConfig | 启动合约(集群模式) |ContractInstanceManager;|
+| updateContract | |ContractInstanceManager;|
+| connectTo | 连接合约实例输出流 |ContractInstanceManager;ContractUser;|
+| countContractLogGroupByAction | |ContractInstanceManager;ContractUser;|
+| countContractLogGroupByCategory | |ContractInstanceManager;ContractUser;|
+| getLastLog | 查询日志 |ContractInstanceManager;ContractUser;|
+| getLog | 查询日志 |ContractInstanceManager;ContractUser;|
+| getLogSize | 查询日志 |ContractInstanceManager;ContractUser;|
+| listAllContractProcess | |ContractInstanceManager;ContractUser;|
+|listContractProcess | 查询合约实例列表 |ContractInstanceManager;ContractUser;|
+| listLeakContractProcess | |ContractInstanceManager;ContractUser;|
+| queryContractLogByDate | |ContractInstanceManager;ContractUser;|
+|queryContractLogByKey | |ContractInstanceManager;ContractUser;|
+| queryContractLogByOffset | |ContractInstanceManager;ContractUser;|
+| queryContractLogDetail | |ContractInstanceManager;ContractUser;|
+|queryContractLogSize | |ContractInstanceManager;ContractUser;|
+|queryNodeLogByDate | |ContractInstanceManager;ContractUser;|
+| queryNodeLogByOffset | |ContractInstanceManager;ContractUser;|
+|queryNodeLogSize | |ContractInstanceManager;ContractUser;|
+| rebuildContractLogIndex | |ContractInstanceManager;ContractUser;|
+| rebuildNodeLogIndex | |ContractInstanceManager;ContractUser;|
+| changePublic | |ContractProvider;|
+| createFile | 新建文件 |ContractProvider;|
+| deleteFile | 删除文件 |ContractProvider;|
+| distributeContract | |ContractProvider;|
+|downloadContract | |ContractProvider;|
+| downloadContractFromOtherHost | |ContractProvider;|
+| generateAnnotationSample | |ContractProvider;|
+| generateAppDataAnalysis | |ContractProvider;|
+| generateAppDataSource | |ContractProvider;|
+| generateBDCoinEventProject | |ContractProvider;|
+| generateBDCoinProject | |ContractProvider;|
+| generateBiddingExample | |ContractProvider;|
+| generateCSVProject | |ContractProvider;|
+| generateContractExecutor | |ContractProvider;|
+| generateDAC4BDOA | |ContractProvider;|
+| generateDAC4BDOA_persist | |ContractProvider;|
+| generateDACSample | |ContractProvider;|
+| generateEmptyProject | |ContractProvider;|
+| generateEventPublisher | |ContractProvider;|
+| generateEventSubscriber | |ContractProvider;|
+| generateGasExample | |ContractProvider;|
+| generateHello | |ContractProvider;|
+| generateHttpExample | |ContractProvider;|
+| generateIncentives | |ContractProvider;|
+| generateJSONExample | |ContractProvider;|
+| generateLedgerExample | |ContractProvider;|
+| generateLedgerProject | |ContractProvider;|
+| generateLicenceManager | |ContractProvider;|
+| generateLoggerExample | |ContractProvider;|
+| generateMySQLExample | |ContractProvider;|
+| generateMySQLProject | |ContractProvider;|
+| generatePostgreSQLSample | |ContractProvider;|
+| generateReadme | |ContractProvider;|
+| generateRenderSample | |ContractProvider;|
+| generateRocksDBSample | |ContractProvider;|
+| generateSM2Example | |ContractProvider;|
+| generateStaticResource | |ContractProvider;|
+| generateTFLinux | |ContractProvider;|
+| generategenerateTFMac | |ContractProvider;|
+| getProject | |ContractProvider;|
+| getTemplateList | |ContractProvider;|
+| importContractInstanceCodeByDOI | |ContractProvider;|
+| listFile | |ContractProvider;|
+| listProject | |ContractProvider;|
+| listProjectPermission | |ContractProvider;|
+| listProjects | |ContractProvider;|
+| renameFile | |ContractProvider;|
+| saveFile | |ContractProvider;|
+| startContractAsDebug | |ContractProvider;|
+| uploadFile | |ContractProvider;|
+| compile | |ContractProvider;ContractInstanceManager;|
+| evaluates | |ContractProvider;ContractInstanceManager;|
+| executeContractP2PTrustfully | |ContractProvider;ContractInstanceManager;|
+|getCodeByID | 查询代码 |ContractProvider;ContractInstanceManager;|
+|getControlFlowByFileName | |ContractProvider;ContractInstanceManager;|
+| getGasValue | |ContractProvider;ContractInstanceManager;|
+| listCompiledFiles | |ContractProvider;ContractInstanceManager;|
+| queryContractResourceInfo | |ContractProvider;ContractInstanceManager;|
+| queryFreeResourceInfo | |ContractProvider;ContractInstanceManager;|
+|staticVerifyContract | |ContractProvider;ContractInstanceManager;|
+|writeDyjs | |ContractProvider;ContractInstanceManager;|
+| authNodeRole | 授权角色 |NodeManager;|
+| changeBDledger | 修改账本配置 |NodeManager;|
+| changeIpPort | |NodeManager;|
+| changeNodeCenter | 修改集群地址 |NodeManager;|
+| changeNodeName | |NodeManager;|
+| changeIpPort | |NodeManager;|
+| changeDOIPConfig | |NodeManager;|
+| changeYJSPath | |NodeManager;|
+| countNodeLogGroupByCategory | |NodeManager;|
+| countRole | |NodeManager;|
+| deleteRole | |NodeManager;|
+| downloadUUID | 废弃 |NodeManager;|
+| getEncodedUUID | 废弃 |NodeManager;|
+| getPeerID | |NodeManager;|
+| listAllAuthRole | |NodeManager;|
+| listNodeInfos | |NodeManager;|
+| listUnAuthRole | |NodeManager;|
+| loadConfig | |NodeManager;|
+| loadNodeConfig | |NodeManager;|
+| lockEdit | |NodeManager;|
+| unlockEdit | |NodeManager;|
+| updateConfig | |NodeManager;|
+| uploadLicence | |NodeManager;|
+| applyNodeRole | 申请角色 |Any role|
+|executeContract | Call the contract |Any role|
+| getConnCount | |Any role|
+| getHashAbstractLocally | |Any role|
+| getHashLocally | |Any role|
+| getNodeRoleDeprecated | 查询当前角色 |Any role|
+|getSessionID | |Any role|
+| listAdapters | |Any role|
+| listTheContractProcess | |Any role|
+|login | 登录 |Any role|
+| longStr | |Any role|
+| ping | |Any role|
+|queryDataByHash| |Any role|
+| queryDataByHashLocally | |Any role|
+| queryHashByOffset | |Any role|
+|queryHashByRequestID | |Any role|
+|queryHashSize | |Any role|
+| queryLedgers | |Any role|
+| queryRole | |Any role|
+| queryTransactionByHash | |Any role|
+| sendTransaction | |Any role|
+| setLogStage | |Any role|
+
+### Contract access center role division
+
+There are two roles: CenterManager and NodeManager. CenterManager has permissions on cluster Settings. NodeManager can add and delete nodes.
+
+| 接口 | 说明 | 角色 |
+| ----------------------------- | ------------ | -------------------------- |
+|authNodeManager| | CenterManager; |
+|countActionLogByCategory| | CenterManager; |
+|countCMLogByCategory| | CenterManager; |
+|delete| | CenterManager; |
+|listAllUsers| | CenterManager; |
+|listApplyList| | CenterManager; |
+|listLicence| | CenterManager; |
+|queryActionLog| | CenterManager; |
+|queryCMLog| | CenterManager; |
+|updateLicence| | CenterManager; |
+|addNode| | CenterManager;NodeManager; |
+|changeNCFile| | CenterManager;NodeManager; |
+|changeOtherNC| | CenterManager;NodeManager; |
+|createTrustUnit| 创建可信集群 | CenterManager;NodeManager; |
+|deleteTrustUnit| | CenterManager;NodeManager; |
+|getNCFile| | CenterManager;NodeManager; |
+|getNodeTrustUnits| | CenterManager;NodeManager; |
+|getOtherNC| | CenterManager;NodeManager; |
+|listContractProcess | | CenterManager;NodeManager; |
+|listMultiPointContractProcess| | CenterManager;NodeManager; |
+|listNodes| | CenterManager;NodeManager; |
+|listTrustUnits| | CenterManager;NodeManager; |
+|queryUserStat| | CenterManager;NodeManager; |
+|stopMultiPointContractProcess| | CenterManager;NodeManager; |
+|applyRole| | NodeManager; |
+|executeContract | 调用合约 | 任意角色 |
+|executeContractTrustfully| | 任意角色 |
+|getManagerPubkey| | 任意角色 |
+|getNodeRole| | 任意角色 |
+|getNodeSessionID| | 任意角色 |
+|getRole| | 任意角色 |
+| getSessionID | | 任意角色 |
+| login | 登录 | 任意角色 |
+
+- - -
+
+## Contract node Http interface
+
+`http://xxx.xxx.xxx.xxx:1717/SCIDE/SCManager` is the URL of the server providing Http interface services( `xxx.xxx.xxx.xxx:1717` is the IP and port number of BDWare SCIDE operation), the user can add field parameters after the URL, Perform the following functions: `http://xxx.xxx.xxx.xxx:18000/SCIDE/SCManager` is the server that provides Http interface services
+
+URL( `xxx.xxx.xxx.xxx:1717` is the IP and port number of BDWare SCIDE operation), the user can complete the following functions by adding field parameters after the URL:
+
+
+### User Management
+
+#### ping
+
+`ping` Server test
+
+##### methods
+
+GET
+
+##### parameter
+
+
+| 字段 | 值 |
+| ------ | ---- |
+|action| ping |
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=ping
+```
+
+##### Result
+
+
+```json
+{"data":"pong"}
+```
+
+
+### Contract code management class
+
+
+#### Download Contract Item
+
+##### methods
+
+GET
+
+##### parameter
+
+
+| 字段 |value|
+| ----------- | ---------------- |
+| action | downloadContract |
+|projectName| 合约项目名 |
+|isPrivate| 是否在私有目录下 |
+| pubKey |The user’s public key|
+| timestamp |The time stamp|
+| sign |The signature|
+
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=downloadContract&projectName=BDCoin&isPrivate=false&pubKey=0480204f4ef341359a5f64fcb11baf9ca2e6706ac20cba3
+8b7ff78aa631e97346086e2d48fac2ba7f5b75ccbd19ebf495c0e6f9934d69e3b083da4d42e46c991e0c2ea8bb45d59f31f46d0ec700fb01f2fdd275
+```
+
+#### Upload a file
+
+##### methods
+
+POST
+
+
+##### parameter
+
+
+| 字段 |value|
+| --------- | ---------------- |
+| path |File upload path|
+| fileName |File name to be uploaded|
+|isPrivate| 是否在私有目录下 |
+| order |The number of packets|
+| count |Total number of packets|
+| timestamp |The time stamp|
+| sign |The signature|
+
+
+##### Sample request
+
+
+
+```
+http://127.0.0.1:18000/SCIDE/Upload?path=/TEST/TEST.yjs&fileName=WechatIMG15.jpeg&isPrivate=true&order=0&count=3&pubKey=0480204f4ef341359a5f64fcb11baf9ca2e6706ac20cba36ca83066870cf2c1d5de6df67e24e68dde7934af9b31d94a6084281db3d32d5ce42ab8f75bf799aca05&sign=dd867469f5adf9986e4ea6215febeae50c7d4c3836d002cf8c17050dfca031fd2595ffa8646e9eeae53150d2cbaea690e27d818eaf5cea3632ee1b69c3307a4b631e97346086e2d48fac2ba7f5b75ccbd19ebf495c0e6f9934d69e3b083da4d42e46c991e0c2ea8bb45d59f31f46d0ec700fb01f2fdd275
+```
+
+##### Result
+
+
+```json
+{"status":"true","data":"success"}
+```
+
+#### Save the contract script
+
+Send a request to the server to save the contract script content locally to the server.
+
+##### methods
+
+GET
+
+
+##### parameter
+
+| 字段 |value|
+| ------- | -------------- |
+| action | writeDyjs |
+|target| 合约脚本文件名 |
+| content |Contract Script Content|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=writeDyjs&target=testyjs.yjs&content=contract%20shortc%7B%0A%09export%20function%20main(arg)%7B%0A%09%09return%20arg.length%3B%09%0A%09%7D%0A%7D
+```
+
+##### Result
+
+
+```json
+{
+ "status": false,
+ "action": "onWriteDyjs",
+ "data": "success"
+}
+```
+
+Subsequent users can start and invoke the contract.
+
+
+
+
+
+
+
+### Contract instance management class
+
+#### Querying the contract process
+
+Sends a request to the server for all the contract processes that have been started on the server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------- |
+| action | listContractProcess |
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=listContractProcess
+```
+
+##### Result
+
+
+```json
+{
+ "status": false,
+ "action": "onListContractProcess",
+ "data": "[\n {\n \"id\": \"-562752842\",\n \"name\": \"shortc\",\n \"port\": \"1626\",\n \"times\": \"0 \",\n \"traffic\": \"32.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n }\n]"
+}
+```
+
+
+#### 启动合约
+
+Send a request to the server to start a contract.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------------------------- |
+| action |startContract|
+| script |Contract script content, need to do URIEncode|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=startContract&script=contract%20shortc%7B%0A%09export%20function%20main(arg)%7B%0A%09%09return%20arg.length%3B%09%0A%09%7D%0A%7D
+```
+
+##### Result
+
+
+```json
+{
+ "data": "{\"status\":\"Success\",\"result\":\"\"}",
+ "action": "onStartContract",
+ "cid": "-562752842",
+ "executeTime": 1187
+}
+```
+
+
+
+#### 调用合约
+
+Send a request to the server to invoke a contract.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------------------- | --------------------------- |
+| action | executeContract |
+|contractID |Contract ID|
+| withDynamicAnalysis |True /false Indicates whether to perform dynamic analysis|
+| operation |The name of the method that calls the contract|
+| arg |Call the parameters of the contract|
+| pubkey |Optionally, caller public key|
+| signature |Optional, sign|
+
+
+Pubkey is the public key of SM2. The calculation method is as follows:
+
+
+```javascript
+//sm2 可从sm2.js中加载获得。
+signature = sm2.doSignature(contractID+"|"+operation+"|"+arg+"|"+pubkey,privateKey);
+```
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=executeContract&contractID=-620602333&operation=main&arg=hhh
+```
+
+##### Result
+
+
+```json
+{
+ "data": "{\"status\":\"Success\",\"result\":\"3\"}",
+ "action": "onExecuteResult",
+ "executeTime": "13"
+}
+```
+
+
+
+
+#### Bulk start contract
+
+Send a request to the server to start a series of contracts that hold the contract script in the server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------- | ------------------------------------ |
+| action |startContractBatched|
+| fileList |List of contract script files (Json array,URLEncode)|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=startContractBatched&fileList=%5B%20%22EventPuber.yjs%22%2C%20%22EventSuber.yjs%22%2C%20%22LicenceManager.yjs%22%20%5D
+
+```
+
+##### Result
+
+
+```json
+{"EventPuber.yjs":"{\"status\":\"Success\",\"result\":\"\"}","LicenceManager.yjs":"{\"status\":\"Success\",\"result\":\"\"}","EventSuber.yjs":"{\"status\":\"Success\",\"result\":\"\"}","action":"onStartContract"}
+
+```
+
+
+
+
+#### Start the Zip package contract
+
+Send a request to the server to start the contract wrapped in `zip` format in the server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| --------- | ----------------------- |
+| action | startContractInTempZips |
+| owner |Caller’s public key|
+| path |Zip file name of the contract (path and)|
+| signature |Caller signature|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=startContractInTempZips&owner=0475c7b061f32477c1e228dd04143daf58a5574dc3f6b02bd2857cc794eb92bfe98606dc314049e77fd8714f57a5a481cb470cc759e688fe60d40fc87092165e55&path=traceTest.zip&signature=650d3cad50509682937c253d84da99230e8ea1bcfb9b10f6d18f8888c7c4b6b4%2C72231a6daa078a3ce657c0a2ed38251b7db56cf725beaf86780d4c240b19ccc2
+
+```
+
+##### Result
+
+
+```json
+{"data":"verify failed","action":"onStartContract"}
+
+```
+
+
+
+
+#### Get the contract code
+
+Send a request to the server for the script code for an ID contract.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ---------- | ----------- |
+| action | getCodeByID |
+| contractID | 合约ID |
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=getCodeByID&contractID=814046805
+
+```
+
+##### Result
+
+
+```json
+{"status":true,"action":"onCodeResult","data":"@LogType(\"Arg\")\ncontract EventSuberAtCHQ{\n\t\n \texport function init(arg){\n\t\tvar result \u003d YancloudUtil.subscribe(\"EventPuberAt3966\",\"abc\",handler);\n // print(\"Handler:\"+handler);\n \t \n \t\treturn result;\n\t}\n \texport function handler(e){\n var ret \u003d \"ReceiveEvent:\";\n\t\tret+\u003d\"\\n\";\n \tprint(ret);\n \tret+\u003dYancloudUtil.executeContract(\"EventPuberAt3966\",\"notify\",\"success\");\n \tprint(ret);\n return ret;\n\t}\n}\n"}
+
+```
+
+
+
+
+#### Save contract status
+
+Send a request to the server to get the state transition log of the node server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ---------- | ------------ |
+| action | dumpContract |
+| contractID |Contract ID or contract Name=|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/SCManager?action=dumpContract&contractID=counter&pubKey=040461417efe01423ba603f71c689387e8aac4aa2a6f7cddfaf22c1d22c40222f7669a054e7ec2e8533b04ccbc7a0e6655ac4ae4acef81a2b1822ec6cabcaf6c1f&sign=3045022004ffd1346b936196f5b13953d2f3e11823a0d0a2d2f6fecea258cef8e20d99c0022100bbc219ed1f56799ba28a763b9e9e47063164e7ceecfbfa752de42f44551ffb83
+
+```
+
+##### Result
+
+
+```json
+{"data":"success","size":"3.76 KB","time":"0.03s"}
+
+```
+
+
+
+
+#### Gets a list of contracted memory files
+
+Send a request to the server for a list of all memory files in a subfolder.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action | listMemoryFiles |
+| contractID |Contract Id or contract Name|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/SCManager?action=listMemoryFiles&contractID=-247468535&pubKey=040461417efe01423ba603f71c689387e8aac4aa2a6f7cddfaf22c1d22c40222f7669a054e7ec2e8533b04ccbc7a0e6655ac4ae4acef81a2b1822ec6cabcaf6c1f&sign=3045022075c7268e888b0efdef167a3f4dfc6589d771c6be41b3c0a1dc12d057e811f395022100d44f460d0cc3643e169ef08231e75a1e895646c53295c0ef1d15c3b462a53d6b
+
+```
+
+##### Result
+
+
+```json
+{"data":["2020-09-23.18:40:38","2020-09-24.16:03:41","2020-09-24.16:58:39","2020-09-24.18:25:47","2020-09-24.18:32:37","2020-09-24.20:54:41","2020-09-24.20:57:39","2020-09-24.21:31:07","2020-09-24.21:32:09","2020-09-24.21:36:11","2020-09-28.15:29:15","2020-09-28.20:28:29","2020-09-28.20:39:46","2020-09-28.21:45:31","2020-09-28.21:49:18","2020-09-28.22:27:34","2020-09-28.22:31:09","2020-09-28.22:32:49","2020-10-07.16:51:06","2020-10-07.16:51:23","2020-10-25.21:09:10","2020-12-14.19:06:53","2021-02-02.10:28:56","2021-02-02.10:31:13"],"action":"onListMemoryFiles"}
+
+```
+
+#### To stop the contract
+
+Send a request to the server to stop a contract.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ---------- | ------------------- |
+| action | killContractProcess |
+| id |Contract ID|
+| *requestID |Request ID, String type|
+
+`*` This parameter is optional
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=killContractProcess&id=-1759263594
+
+```
+
+##### Result
+
+
+```json
+{"status":false,"action":"onListContractProcess","data":"[\n {\n \"id\": \"-65051856\",\n \"name\": \"EventSuber\",\n \"port\": \"1631\",\n \"times\": \"0 \",\n \"traffic\": \"32.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n },\n {\n \"id\": \"814046805\",\n \"name\": \"EventSuberAtCHQ\",\n \"port\": \"1630\",\n \"times\": \"0 \",\n \"traffic\": \"32.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n },\n {\n \"id\": \"2023975189\",\n \"name\": \"LicenceService\",\n \"port\": \"1632\",\n \"times\": \"0 \",\n \"traffic\": \"32.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n },\n {\n \"id\": \"-620602333\",\n \"name\": \"shortc\",\n \"port\": \"1627\",\n \"times\": \"0 \",\n \"traffic\": \"0.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n }\n]"}
+
+```
+
+
+
+
+#### Termination of all contracts
+
+Send a request to the server to stop all contracts started on the server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action | killAllContract |
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=killAllContract
+
+```
+
+##### Result
+
+
+```json
+{"status":false,"action":"onKillAllContract","data":"Kill:7357,7541,7548,7555,7584,7585,7591,7598,7609,7612,8440,8442,8444,8521,"}
+
+```
+
+#### Static analysis contract
+
+Send a request to the server to statically analyze the contract script.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ---------- | -------------------- |
+| action | staticVerifyContract |
+| contractid |Contract ID|
+| script |Request ID, String type|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=staticVerifyContract&contractid=943728900&script=contract%20shortc%7B%0A%09export%20function%20main(arg)%7B%0A%09%09return%20arg.length%3B%09%0A%09%7D%0A%7D&path=static.yjs
+
+```
+
+##### Result
+
+
+```json
+{"data":"{\"status\":\"Success\",\"result\":\"{\\\"main\\\":\\\"Ret:arg \\\"}\"}","action":"onExecuteResult","cid":"943728900","executeTime":54}
+
+```
+
+
+
+#### Gets the contract static analysis flow
+
+Send a request to the server for a static analysis Control Flow of a contract.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------------ |
+| action | getControlFlowByFileName |
+| path |Contract ID|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=getControlFlowByFileName&path=EventSuber.yjs
+
+```
+
+##### Result
+
+
+```json
+{"init":{"blocks":[{"type":"Continuous","name":"B0","stmts":["\u003dL0\u003d","aload 0","invokevirtual wrp/jdk/nashorn/internal/runtime/ScriptFunction getScope ()Lwrp/jdk/nashorn/internal/runtime/ScriptObject;"],"original":""},{"type":"Continuous","name":"B1","stmts":["\u003dL1\u003d","astore 4"],"original":""},{"type":"Continuous","name":"B2","stmts":["\u003dL2\u003d","aload 4","invokedynamic dyn:getProp|getElem|getMethod:YancloudUtil (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 5 "],"original":"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"},{"type":"Continuous","name":"B3","stmts":["dup","invokedynamic dyn:getMethod|getProp|getElem:subscribe (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 0 "],"original":"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"},{"type":"Continuous","name":"B4","stmts":["swap","ldc XiaomiSmartHomeAtPKU","ldc onAirPurifierModeChange","aload 4","invokedynamic dyn:getProp|getElem|getMethod:handler (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 5 "],"original":"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"},{"type":"Continuous","name":"B5","stmts":["invokedynamic dyn:call:\\\u003dYancloudUtil\\,subscribe (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 0 "],"original":"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"},{"type":"Continuous","name":"B6","stmts":["\u003dL3\u003d","astore 5"],"original":"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"},{"type":"Continuous","name":"B7","stmts":["\u003dL4\u003d","aload 5","areturn"],"original":" \t\treturn result;"},{"type":"Continuous","name":"B8","stmts":["\u003dL5\u003d"],"original":" \t\treturn result;"},{"type":"Continuous","name":"B9","stmts":["\u003dL6\u003d"],"original":" \t\treturn result;"}],"edges":[{"from":"B0","to":"B1","label":{"label":"e"}},{"from":"B1","to":"B2","label":{"label":"e"}},{"from":"B2","to":"B3","label":{"label":"e"}},{"from":"B3","to":"B4","label":{"label":"e"}},{"from":"B4","to":"B5","label":{"label":"e"}},{"from":"B5","to":"B6","label":{"label":"e"}},{"from":"B6","to":"B7","label":{"label":"e"}},{"from":"B7","to":"B9","label":{"label":"e"}}]},"handler":{"blocks":[{"type":"Continuous","name":"B0","stmts":["\u003dL0\u003d","aload 0","invokevirtual wrp/jdk/nashorn/internal/runtime/ScriptFunction getScope ()Lwrp/jdk/nashorn/internal/runtime/ScriptObject;"],"original":""},{"type":"Continuous","name":"B1","stmts":["\u003dL1\u003d","astore 4"],"original":""},{"type":"Continuous","name":"B2","stmts":["\u003dL2\u003d","ldc ReceiveEvent:","aload 2","invokedynamic dyn:getProp|getElem|getMethod:content (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 0 "],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B3","stmts":["invokestatic wrp/jdk/nashorn/internal/runtime/ScriptRuntime ADD (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B4","stmts":["ldc ","invokestatic wrp/jdk/nashorn/internal/runtime/ScriptRuntime ADD (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B5","stmts":["aload 2","invokedynamic dyn:getProp|getElem|getMethod:type (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 0 "],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B6","stmts":["invokestatic wrp/jdk/nashorn/internal/runtime/ScriptRuntime ADD (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B7","stmts":["\u003dL3\u003d","astore 5"],"original":" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"},{"type":"Continuous","name":"B8","stmts":["\u003dL4\u003d","aload 4","invokedynamic dyn:getMethod|getProp|getElem:print (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 5 "],"original":" \tprint(ret);"},{"type":"Continuous","name":"B9","stmts":["getstatic wrp/jdk/nashorn/internal/runtime/ScriptRuntime UNDEFINED Lwrp/jdk/nashorn/internal/runtime/Undefined;","aload 5","invokedynamic dyn:call:print (Ljava/lang/Object;Lwrp/jdk/nashorn/internal/runtime/Undefined;Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 5 "],"original":" \tprint(ret);"},{"type":"Continuous","name":"B10","stmts":["pop"],"original":" \tprint(ret);"},{"type":"Continuous","name":"B11","stmts":["\u003dL5\u003d","aload 5","areturn"],"original":" return ret;"},{"type":"Continuous","name":"B12","stmts":["\u003dL6\u003d"],"original":" return ret;"},{"type":"Continuous","name":"B13","stmts":["\u003dL7\u003d"],"original":" return ret;"}],"edges":[{"from":"B0","to":"B1","label":{"label":"e"}},{"from":"B1","to":"B2","label":{"label":"e"}},{"from":"B2","to":"B3","label":{"label":"e"}},{"from":"B3","to":"B4","label":{"label":"e"}},{"from":"B4","to":"B5","label":{"label":"e"}},{"from":"B5","to":"B6","label":{"label":"e"}},{"from":"B6","to":"B7","label":{"label":"e"}},{"from":"B7","to":"B8","label":{"label":"e"}},{"from":"B8","to":"B9","label":{"label":"e"}},{"from":"B9","to":"B10","label":{"label":"e"}},{"from":"B10","to":"B11","label":{"label":"e"}},{"from":"B11","to":"B13","label":{"label":"e"}}]}}
+
+```
+
+### Log Viewing Class
+
+#### Contract log — Number of queries
+
+##### methods
+
+GET
+
+WhencontractNameis empty or not passed in, the number of items queried for the entire contract
+
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ------------------------ |
+| action | queryContractLogSize |
+|contractName| 字符串,非必须,合约名称 |
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogSize&contractName=NanningDataSource
+```
+
+##### Result
+
+
+```json
+{
+ "size": 12,
+ "action": "onQueryContractLogSize",
+ "status": "success"
+}
+
+```
+
+#### Contract log — Query by date
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ------------------------------------- |
+| action |queryContractLogByDate|
+| start |Long, must, start time|
+| end |Long, not required. If end is not used, the current time is default|
+| contractName |String, not required, contract name|
+
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogByDate&start=1597296300272&end=1597296305747
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "getMainFrame",
+ "costTime": "2493",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296300272,
+ "key": "-8590335427581967208"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "loadResource",
+ "costTime": "732",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296301030,
+ "key": "849660532962309239"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "loadResource",
+ "costTime": "4580",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305745,
+ "key": "-8003529429500512736"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "loadResource",
+ "costTime": "4551",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305746,
+ "key": "7604666709899222357"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "loadResource",
+ "costTime": "6",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305751,
+ "key": "-7561786202695627022"
+ }
+ ],
+ "action": "onQueryRecentContractLog"
+}
+```
+
+#### Contract log — Queried by offset
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------------ | --------------------------------------------- |
+| action |queryContractLogByOffset|
+| count |Long: required. Gets the number of logs|
+| offset |Long, not required. If there is no offset, the latest count bar is returned by default|
+| contractName |String, not required, contract name|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogByOffset&count=5&contractName=NanningDataSource
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "loadResource",
+ "costTime": "4",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305842,
+ "key": "-2390672423847654148"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "isOwner",
+ "costTime": "4",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305868,
+ "key": "6056586201629372511"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "getApplyList",
+ "costTime": "6",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305893,
+ "key": "3882409580676458151"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "getAcceptList",
+ "costTime": "4",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "date": 1597296305908,
+ "key": "-3437513873417136535"
+ },
+ {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "analysisByIndustry",
+ "costTime": "6",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "signature": "4c2cef1756b2b591ab7eead19d67331e2294c7ba765c72298733c306ada0b6e84afbb6c7b9dba48b9843236ebe67aecb4af09fe58a51eef0e2e89b9f3e5cad02",
+ "arg": " {\"year\":2018,\"category\":\"工业\",\"indexType\":\"营业额\"}",
+ "date": 1597296314654,
+ "key": "203156239086062402"
+ }
+ ],
+ "action": "onQueryRecentContractLog"
+}
+```
+
+#### Contract log — Query by key
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------------------- |
+| action | queryContractLogByKey |
+| key |Long: Must, the key corresponding to the log|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogByKey&key=203156239086062402
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": {
+ "action": "executeContract",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "contractID": "-1382208250",
+ "contractName": "NanningDataSource",
+ "function": "analysisByIndustry",
+ "costTime": "6",
+ "totalGas": "0",
+ "executionGas": "0",
+ "extraGas": "0",
+ "signature": "4c2cef1756b2b591ab7eead19d67331e2294c7ba765c72298733c306ada0b6e84afbb6c7b9dba48b9843236ebe67aecb4af09fe58a51eef0e2e89b9f3e5cad02",
+ "arg": " {\"year\":2018,\"category\":\"工业\",\"indexType\":\"营业额\"}",
+ "date": 1597296314654
+ },
+ "action": "onQueryContractLogByKey"
+}
+```
+
+#### Contract log — Counts the number of calls by time period
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------- | -------------------------------------------------------- |
+| action |countContractLogGroupByCategory|
+| start |Long, must, start time|
+| end |Not required. End time. Default is current|
+| interval |Long, not necessary, statistical interval|
+| category |If not required, the contract name is concatenated with a comma, and all contract calls are counted when not passed in|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=countContractLogGroupByCategory&start=1596758400000&interval=86400000
+```
+
+##### Returns the result
+
+
+```json
+{
+ "start": 1596758400000,
+ "interval": 86400000,
+ "action": "onCountContractLogGroupByCategory",
+ "data": [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 43,
+ 14
+ ]
+}
+```
+
+#### Ledger log — Number of queries
+
+Query the number of logs recorded in the ledger of the node
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ---------------- |
+| action | queryHashSize |
+| contractName | 非必须,合约名称 |
+
+
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryHashSize&contractName=NanningDataSource
+```
+
+##### Returns the result
+
+
+```json
+{
+ "count": "2",
+ "action": "onQueryHashSize"
+}
+```
+
+
+#### Ledger log — Query by offset
+
+Query the hash list of x logs that pass this node to the ledger
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ----------------------------------------------------------- |
+| action |queryHashByOffset|
+| count |Integer, mandatory, indicates the number of items|
+| offset |An integer, not required, representing an offset. If offset is not passed, the latest count bar is returned by default|
+| contractName |A character string, not required, indicating the contract name|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryHashByOffset&count=1&contractName=NanningDataSource
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [
+ {
+ "hash": "3a6c60621907146b77146c1f2d48700e47520173",
+ "date": 1597296314658
+ }
+ ],
+ "action": "onQueryHash",
+ "status": "success"
+}
+```
+
+#### Ledger log — Query details based on hash
+
+Query log content based on hash
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------------------- |
+| action | queryDataByHash |
+| hash |String, available by queryHashByOffset|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryDataByHash&count=1&contractName=NanningDataSource&hash=3a6c60621907146b77146c1f2d48700e47520173
+```
+
+##### Returns the result
+
+
+```json
+{
+ "from": "0x3034643139323433323966373263656431343866",
+ "to": "0x65786563757465436f6e74726163740000000000",
+ "data": "1597296314655 --> {\"extraGas\":\"0\",\"totalGas\":\"0\",\"executionGas\":\"0\",\"signature\":\"4c2cef1756b2b591ab7eead19d67331e2294c7ba765c72298733c306ada0b6e84afbb6c7b9dba48b9843236ebe67aecb4af09fe58a51eef0e2e89b9f3e5cad02\",\"costTime\":\"6\",\"arg\":\" {\\\\\\\"year\\\\\\\":2018,\\\\\\\"category\\\\\\\":\\\\\\\"工业\\\\\\\",\\\\\\\"indexType\\\\\\\":\\\\\\\"营业额\\\\\\\"}\",\"contractID\":\"-1382208250\",\"action\":\"analysisByIndustry\",\"pubKey\":\"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd\"}",
+ "requestID": "1597296314629_6067",
+ "action": "onQueryDataByHash"
+}
+```
+
+#### Ledger log — Queries the Hash according to requestID
+
+Query log contents by requestID. The developer must ensure the uniqueness of requestID
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| --------- | ------------------------ |
+| action | queryHashByRequestID |
+| requestID |A string that is generated when the call is made|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=queryHashByRequestID&requestID=0987654321ab
+```
+
+#### Node Logs — Number of queries
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------- | ---------------------------- |
+| action | queryNodeLogSize |
+| category |Not required, not passed in to query the full situation|
+
+The options include ping, startContract, and saveFile.
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogSize
+
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogSize&category=login
+```
+
+##### Returns the result
+
+
+```json
+{
+ "size": 177,
+ "action": "onQueryNodeLogSize",
+ "status": "success"
+}
+```
+
+#### Node logs — Query by date
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------- | ---------------------------- |
+| action | queryNodeLogByDate |
+| start |Long, must, start date|
+| end |Long, not necessary|
+| category |Not required, not passed in to query the full situation|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogByDate&start=1597376006441
+
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogByDate&start=1596758400000&category=login
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [
+ {
+ "action": "listAllAuthRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006438,
+ "key": "387355870552374748"
+ },
+ {
+ "action": "listUnAuthRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006441,
+ "key": "4772693258708933626"
+ },
+ {
+ "action": "countRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006444,
+ "key": "-6425375229108830572"
+ },
+ {
+ "action": "loadNodeConfig",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006448,
+ "key": "-6602401010405792959"
+ },
+ {
+ "action": "getPeerID",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006449,
+ "key": "-7006776427870311552"
+ }
+ ],
+ "action": "onQueryNodeLogByDate"
+}
+```
+
+#### Node log — Query by offset
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------------ | --------------------------------------------- |
+| action |queryNodeLogByOffset|
+| count |Long: required. Gets the number of logs|
+| offset |Long, not required. If there is no offset, the latest count bar is returned by default|
+| contractName |String, not required, contract name|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogByOffset&count=5
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [
+ {
+ "action": "listAllAuthRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006438,
+ "key": "387355870552374748"
+ },
+ {
+ "action": "listUnAuthRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006441,
+ "key": "4772693258708933626"
+ },
+ {
+ "action": "countRole",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006444,
+ "key": "-6425375229108830572"
+ },
+ {
+ "action": "loadNodeConfig",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006448,
+ "key": "-6602401010405792959"
+ },
+ {
+ "action": "getPeerID",
+ "pubKey": "04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd",
+ "status": "accept",
+ "date": 1597376006449,
+ "key": "-7006776427870311552"
+ }
+ ],
+ "action": "onQueryNodeLogByOffset"
+}
+```
+
+#### Node Log — Collects statistics on invocation times by time range
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| -------- | -------------------------------------------------- |
+| action |countLogGroupByCategory|
+| start |Long, must, start time|
+| end |Not required. End time. Default is current|
+| interval |Long, not necessary, statistical interval|
+| category |Action is concatenated with commas if not required, and counts all calls when not passed|
+
+In the category, Action is the action collection of the NodePortal interface. The value can be ping, startContract, and saveFile.
+
+##### Sample request
+
+
+```
+http://127.0.0.1:18000/SCIDE/CMManager?action=countNodeLogGroupByCategory&start=1596758400000&interval=86400000
+
+http://127.0.0.1:18000/SCIDE/CMManager?action=countNodeLogGroupByCategory&start=1596758400000&interval=86400000&category=ping,startContract
+```
+
+##### Returns the result
+
+
+```json
+{
+ "start": 1596758400000,
+ "interval": 86400000,
+ "action": "onCountNodeLogGroupByCategory",
+ "data": [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 912,
+ 761
+ ]
+}
+```
+
+
+
+
+
+#### Example Output historical logs
+
+Send a request to the server for the TimeTravel log of the contract on the node server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------ |
+| action |printTimeTravelLog|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=printTimeTravelLog
+
+```
+
+##### Result
+
+
+```json
+{"status":false,"data":"[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps/aa\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps/aa_1572335939893.dyjs\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps/memoryDumps\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps/.\n[CMActions] memory dir \u003d /Users/oliveds/docs/SmartContract/contractExamples/memoryDumps/.\n"}
+
+```
+
+
+
+
+
+#### Example Output node transfer logs
+
+Send a request to the server to get the state transition log of the node server.
+
+##### methods
+
+GET
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------- |
+| action |printTransferLog|
+
+##### Sample request
+
+
+```
+http://127.0.0.1:1717/SCIDE/SCManager?action=printTransferLog
+
+```
+
+##### Result
+
+
+```json
+{"status":false,"data":""}
+
+```
+
+
+
+### Template generation class
+
+
+
+
+
+
+
+- - -
+
+## Contract node WebSocket interface
+
+### User Management
+
+#### Access to the Session
+
+Before login, obtain the session for signing.
+
+##### parameter
+
+|field|value|
+| ------ | ------------ |
+|action|getSessionID|
+
+##### Sample request
+
+
+```
+var req = {};
+req.action = "getSessionID";
+wssocket.send(JSON.stringify(req));
+```
+
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onSessionID",
+ "session": "9782323_session"
+}
+```
+
+#### The user login
+
+The user performs public-private key authentication
+
+##### parameter
+
+|field| 值 |
+| ------ | ----- |
+|action| login |
+
+##### Sample request
+
+
+```
+var loginParam = {};
+loginParam.pubKey = global.sm2Key.publicKey;
+loginParam.signature = sm2.doSignature(global.session,
+ global.sm2Key.privateKey);
+loginParam.action = "login";
+wssocket.send(JSON.stringify(loginParam));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onLogin",
+ "data": "NodeManager,ContractProvider"
+}
+```
+
+#### Apply for role
+
+In the node administrator interface, you can apply for the names contract administrator, ContractUser, ContractProvider.
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------- |
+| action |applyNodeRole|
+|role|Applying for a Role Name|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "applyNodeRole";
+param.role = "ContractUser";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+``` json
+{
+ "action": "onApplyRole",
+ "data": "success"
+}
+
+{
+ "action":"onApplyRole",
+ "data":"already has!"
+}
+```
+
+#### Authorization role
+
+##### parameter
+
+| 字段 |value|
+| -------- | -------------------- |
+| action |authNodeRole|
+| isAccept |Bool: indicates no authorization|
+| pubKey |Authorized user public key|
+
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "authNodeRole";
+param.isAccept = true;
+param.pubKey = "xxxxx";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onAuthNodeRole",
+ "data": "success"
+}
+```
+
+#### Deleting a User Role
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------- |
+| action |deleteRole|
+| role |Deleting a Role Name|
+
+##### Sample request
+
+
+```
+var deleteInfo = {};
+deleteInfo.pubKey = global.authorizedUsers.[publicKey];
+deleteInfo.action = "deleteRole";
+deleteInfo.role="ContractUser";
+wssocket.send(JSON.stringify(deleteInfo));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onDeleteRole",
+ "data": "success"
+}
+```
+
+#### View the list of authorized users
+
+View authorized node administrators in the current network
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action |listAllAuthRole|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "listAllAuthRole";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status":false,
+ "action":"onListAllAuthRole",
+ "data":
+ {
+ "kv":[{"key":"04eafad549d0757cf67f360815e15e157c7428c9ea9fb933f31a5d45bfb6edd9809c5bf6a5f37d7b817207f19fb2d76b7dbdefe38084cd3282e37b9ac39959dfab",
+ "value":"NodeManager,ContractProvider,ContractUser,ContractInstanceManager"}],
+ "time":[{"key":"04eafad549d0757cf67f360815e15e157c7428c9ea9fb933f31a5d45bfb6edd9809c5bf6a5f37d7b817207f19fb2d76b7dbdefe38084cd3282e37b9ac39959dfab",
+ "value":"1617178709933"}]
+ }
+}
+```
+
+#### View the list of applied users
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |listUnAuthRole|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "listUnAuthRole";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onListUnAuthRole",
+ "kv": [{
+ "key": "049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7",
+ "value": "ContractProvider,ContractUser"
+ }],
+ "time": [{
+ "key": "049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7",
+ "value": "1587398989914"
+ }]
+}
+```
+
+
+##### Parameter (delete)
+
+| 字段 |value|
+| ------ | ------------- |
+| action |queryUserStat|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "queryUserStat";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onQueryUserStat",
+ "userListCount": 3,
+ "applyListCount":0
+}
+```
+
+### Contract code management class
+
+#### Gets a list of public contract files
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------ |
+| action |listProjects|
+
+##### Sample request
+
+
+```
+var request = {};
+request.action = "listProjects";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+```json
+{
+ "action":"onListProjects",
+ "data":"[\"AnnotationSample\",\"AppDataAnalysis\",\"AppDataSource\",\"BiddingExample\",\"ContractExecutor\"]",
+ "executeTime":0,
+ "isPrivate":false
+}
+
+```
+
+
+#### Gets a list of private contract files
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------------- |
+| action |listProjects|
+| pubKey |The public key of the user|
+|isPrivate|true|
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "listProjects";
+request.pubKey = "global.sm2.publicKey";
+request.isPrivate=true;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action":"onListProjects",
+ "data":"[\"CSVFromTemplate\",\"Empty22\",\"MySQLFromTemplate\",\"test\"]",
+ "executeTime":0,
+ "isPrivate":true
+}
+```
+
+
+#### Get the contract instance
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------- |
+| action |listContractProcess|
+
+##### Sample request
+
+
+```
+var request = {};
+request.action = "listContractProcess";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status":false,
+ "action":"onListContractProcess",
+ "data":"[{\"id\": \"1658407837\",\"name\": \"BDCoin\",\"port\": \"1617\"}]"
+}
+```
+
+
+#### Start the contract
+
+##### parameter
+
+| 字段 |value|
+| --------- | ------------- |
+| action |startContract|
+| owner |pubkey|
+|requestID| 当前时间 |
+|script| 脚本内容 |
+| signature |The signature|
+
+##### Sample request
+
+
+```
+request.action = "startContract";
+request.owner = global.sm2Key.publicKey;
+request.requestID = new Date().getTime() + "";
+request.script = global.projectScript;
+request.signature = sm2.doSignature("Algorithm|" + request.script + "|" + global.sm2Key.publicKey, global.sm2Key.privateKey);
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data":"{\"needSeq\":false,\"seq\":0,\"status\":\"Success\",\"result\":\"\",\"isInsnLimit\":false,\"totalGas\":0,\"executionGas\":0,\"extraGas\":0,\"size\":0,\"eventRelated\":false}",
+ "action":"onStartContract",
+ "cid":"-506393888",
+ "executeTime":2496,
+ "responseID":"1617206735696"
+}
+```
+
+#### Distribution of contract items
+
+##### parameter
+
+| 字段 |value|
+| ------------- | ------------------ |
+|action |distributeContract|
+|peersID| 集群中节点peer |
+| projectName |The contract of|
+|isPrivate| 是否在私有目录 |
+| sponsorPeerID |The originators of the ID|
+| signature |The signature|
+
+##### Sample request
+
+
+```javascript
+request.action = "distributeContract";
+request.peersID = peersID;
+request.projectName = global.projects[global.lastClickedProjectId];
+request.isPrivate = $("#privateDir-tab").hasClass("active");
+request.sponsorPeerID = global.peerID;
+request.signature = sm2.doSignature("DistributeContract|" + request.projectName + "|" + global.sm2Key.publicKey, global.sm2Key.privateKey);
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action":"onDistributeContract",
+ "progress":"100.00%"
+}
+```
+
+#### Terminate the contract
+
+##### parameter
+
+| 字段 |value|
+| --------- | ------------------- |
+| action |killContractProcess|
+| id |Contract id|
+| requestID |Request ID|
+
+##### Sample request
+
+
+```
+request.action = "killContractProcess";
+request.id = contractid;
+request.requestID = new Date().getTime() + "";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": "ContractHandler: exit in 3 seconds!",
+ "action": "onOutputStream"
+}
+```
+
+#### Termination of all contracts
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action |killAllContract|
+
+##### Sample request
+
+
+```
+request.action = "killAllContract";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status":false,
+ "action":"onKillAllContract",
+ "data":"Kill:7241,7245,"
+}
+```
+
+
+
+#### Static analysis contract
+
+##### parameter
+
+| 字段 |value|
+| ---------- | -------------------- |
+| action |staticVerifyContract|
+| owner |User private key|
+| isPartial |Is it part of|
+| contractid |contractid|
+| script |The script content|
+|path |Name of contract|
+
+
+##### Sample request
+
+
+```javascript
+request.action = "staticVerifyContract";
+request.owner = global.sm2Key.privateKey
+request.isPartial = false;
+request.contractid = contractid;
+request.script = global.projectScript;
+request.path = global.projectName;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+
+{
+ "data":"{\"needSeq\":false,\"seq\":0,\"status\":\"Success\",\"result\":{\"hello\":\"Ret:\"},\"isInsnLimit\":false,\"totalGas\":0,\"executionGas\":0,\"extraGas\":0,\"size\":0,\"eventRelated\":false}",
+ "action":"onStaticVerifyResult",
+ "cid":"verify",
+ "executeTime":83
+}
+```
+
+
+
+#### Delete the contract
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------- |
+| action |deleteFile|
+| file |fileName|
+
+##### Sample request
+
+
+```javascript
+request.action = "deleteFile";
+request.file = fileName;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action":"onDeleteFile",
+ "data":"success",
+ "executeTime":0
+}
+```
+
+
+
+#### Private contracts are uploaded to public directories
+
+##### parameter
+
+| 字段 |value|
+| -------- | ------------ |
+| action |changePublic|
+|pubkey| 用户公钥 |
+| fileName |fileName|
+
+##### Sample request
+
+
+```javascript
+request.action = "changePublic";
+request.pubkey = pubkey;
+request.fileName = fileName;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action":"onChangePublic",
+ "data":"success",
+ "executeTime":0
+}
+```
+
+
+
+#### Upload the contract
+
+##### parameter
+
+| 字段 |value|
+| -------- | ----------- |
+| action |UploadFile|
+| isAppend | false |
+|fileName|fileName|
+| path | path |
+|isPrivate|true/false|
+| content |The fileContent (base64 encoding)|
+
+##### Sample request
+
+
+```
+request.action = "uploadFile";
+request.isAppend = false;
+request.fileName = "test1.yjs";
+request.path = "test1";
+text="Y29udHJhY3QgdGVzdDF7CglleHBvcnQgZnVuY3Rpb24gaGVsbG8oYXJnKXsgCiAgICAgICAgcmV0dXJuICJ3b3JsZCI7ICAKICAgIH0gICAKfQ=="
+request.content = text;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action":"onUploadFile",
+ "data":"success",
+ "executeTime":0
+}
+```
+
+#### Compile the contract
+
+##### parameter
+
+| 字段 |value|
+| ---------- | -------------------------- |
+| action |compile|
+| path |String indicates the name of the project to be compiled|
+| privateTab |Bool, indicates whether the item is a private directory|
+
+##### Sample request
+
+
+```javascript
+var req = {"action":"compile","path":"Hello","privateTab":true}
+```
+
+##### Returns the result
+
+
+```json
+{"result":"Hello_2020-08-17-09:09:40.ypk","action":"onCompile"}
+```
+
+#### Locking private directories
+
+Lock the private directory editing function for a user
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------------- |
+| action |lockEdit|
+| pubKey |String Indicates the public key to be locked|
+
+##### Sample request
+
+
+```javascript
+var req = {};
+req.action = "lockEdit";
+req.pubKey = "xxxxxx";
+wssocket.send(JSON.stringify(req));
+```
+
+```json
+{
+ "action":"onLockEdit",
+ "status":"success",
+ "data":"04c4c855862b53f323e077ccfcc744ecc2c0a04645ed16d99ede8fd5866b38c0670a97ad22c6260d1a4672aba2a5fe229a2d4eba34627c054aab102620afa288c1"
+}
+```
+
+
+#### Unlock a private directory
+
+Unlock the private directory editing function for a user
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------------- |
+| action |unLockEdit|
+| pubKey |String Indicates the public key to be locked|
+
+##### Sample request
+
+
+```javascript
+var req = {};
+req.action = unlockEdit;
+req.pubKey = "xxxxxx";
+wssocket.send(JSON.stringify(req));
+```
+
+```json
+{
+ "action":"onUnlockEdit",
+ "status":"success",
+ "data":"04c4c855862b53f323e077ccfcc744ecc2c0a04645ed16d99ede8fd5866b38c0670a97ad22c6260d1a4672aba2a5fe229a2d4eba34627c054aab102620afa288c1"
+}
+```
+
+
+### Contract instance management class
+
+#### Querying the contract process
+
+Sends a request to the server for all the contract processes that have been started on the server.
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------- |
+| action |listContractProcess|
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "listContractProcess";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Result
+
+
+```json
+{
+ "status": false,
+ "action": "onListContractProcess",
+ "data": "[...]"
+}
+```
+
+
+
+#### Call the contract
+
+Send a request to the server to invoke a contract.
+
+##### parameter
+
+| 字段 |value|
+| -------------------- | --------------------------- |
+| action |executeContract|
+| contractID |Contract ID|
+| withDynamicAnalysis |True /false Specifies whether to perform dynamic analysis. This parameter is optional|
+|operation| 调用合约的方法名 |
+|arg| 调用合约的parameter |
+| pubkey |Caller public key, optional|
+| signature |Caller signature, optional|
+
+`*` Indicates that the value is optional
+
+
+```javascript
+//sm2 可从sm2.js中加载获得。
+signature = sm2.doSignature(contractID+"|"+operation+"|"+arg+"|"+pubkey,privateKey);
+```
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "executeContract";
+request.contractID = "2073401446";
+request.operation = "main";
+request.arg = "hhhhh";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Result
+
+
+```json
+{
+ "needSeq":false,
+ "seq":0,
+ "status":"Success",
+ "result":"world",
+ "isInsnLimit":false,
+ "totalGas":0,
+ "executionGas":0,
+ "extraGas":0,
+ "size":0,
+ "eventRelated":false,
+ "responseID":"1617211077264_223",
+ "action":"onExecuteResult",
+ "executeTime":"5"
+}
+```
+
+#### Output history log (delete)
+
+Send a request to the server for the TimeTravel log of the contract on the node server.
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------------ |
+| action |printTimeTravelLog|
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "printTimeTravelLog";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Result
+
+
+```json
+{
+ "status": false,
+ "data": "[CMActions] dumpContract :…t/contractExamples/memoryDumps/LicenceManager\n"
+}
+```
+
+
+
+#### Outputting node transition logs (delete)
+
+Send a request to the server to get the state transition log of the node server.
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------- |
+| action |printTransferLog|
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "printTransferLog";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Result
+
+
+```json
+ {
+ "status": false,
+ "data": ""
+}
+```
+
+
+
+#### Contract status migration
+
+Send a request to the server to get the state transition log of the node server.
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ------------ |
+| action | loadMemory |
+|contractName| 合约名称 |
+|memoryFile| 合约文件名称 |
+
+##### Sample request
+
+
+```javascript
+var request = {};
+request.action = "loadMemory";
+request.contractName = "JsonContract";
+request.memoryFile = "2020-03-17.20/42/55";
+wssocket.send(JSON.stringify(request));
+```
+
+##### Result
+
+
+```json
+{
+ "data":"success",
+ "size":"0.00 B",
+ "action":"onTransferTo",
+ "time":"0.01s"
+}
+```
+
+
+
+### Log Viewing Class
+
+#### Querying Local Node Logs in the last N Days (Deleted)
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------- |
+| action |listLocalNodeLog|
+| date |The current time|
+
+##### Sample request
+
+
+```
+request.action = "listLocalNodeLog";
+request.date = new Date().getTime() - 24 * 3600 * 1000 * n;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data":"[{\"action\":\"login\",\"pubKey\":\"null\",\"status\":\"accept\",\"date\":1583139323822}\",]"
+}
+```
+
+
+
+#### Querying Local Contract Logs in the last N Days (Deleted)
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------------- |
+| action |listLocalContractLog|
+| date |The current time|
+
+##### Sample request
+
+
+```
+request.action = "listLocalContractLog";
+request.date = new Date().getTime() - 24 * 3600 * 1000 * n;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data":"[\"{\"action\":\"startContract\",\"pubKey\":\"04405d7ba358d9234939623ab51ea94ca685e6a1f36ed81fd9630ccba6473e632f163bb30faffd4c91f21e5bace20101d6d6e36c04ac67eea14cc24b4962b84f57\",\"contractID\":\"845581788\",\"contractName\":\"null\",\"date\":1583141525539}\"]"
+}
+```
+
+
+
+
+### Node Configuration Class
+
+#### Obtain node configuration information
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |loadNodeConfig|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "loadNodeConfig";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```
+{
+ "status": true,
+ "action": "onLoadNodeConfig",
+ "data": {
+ "nodeName": "04BF52213343C147E631B877BCEB17B794230EE551E85F58FA429C4BA03D690778CC384C6916C63DF36CB9E35C7E274FDB4E18491DFE3D611D347856D441CACC5AF9090B515F02AFC2DFBF56461EC83B5A4CD342466360D6CF82E6E40B637430AC4A329CCBC798DAF7D526AF9E3B3600E0BEA1BFAB8C160EF90128FAF67B19E45F37664F1E4B",
+ "licence": "04AADCC7103CD02626D228AFFBEF53F8242ECA4DDD6F179D30B622440666715CFBB6FD1D3678A2B25812DEA9917073E79A65F7ADE517F784DC76288EFCEB37ECAA1025E6903540702F729DA1C2ECCD93F4E6FAFCE40DF443E7FD74387169D0C6D927C7BB12882D0471C8D3E6F31B0316A42FC38F6DD9978D4351B23B2AD63E2244909E98F51185D32CB99B4AE4E22D3AB4C04027BB",
+ "expireTime": "Wed Aug 26 09:43:08 CST 2020",
+ "nodes": "[\"node1\",\"node2\",\"node3\"]",
+ "yjsPath": "/Users/xxx/docs/BDWareHttp/generatedlib/yjs.jar",
+ "nodeCenter": "ws://127.0.0.1:1719/SCIDE/NodeCenter"
+ }
+}
+
+{
+ "status":true,
+ "action":"onLoadNodeConfig",
+ "data":{
+ "nodeName":"Node_180",
+ "peerID":"",
+ "masterAddress":"39.104.201.40:21031",
+ "licence":"04AADCC7103C",
+ "doipConfig":"{\\"LHSProxyAddress\\":\\"http://39.104.201.40:21042/\\",\\"ownerHandle\\":\\"86.5000.470/dou.TEST\\",\\"certPath\\":\\"keys/dou.TEST.keystore\\",\\"certPassword\\":\\"123456\\",\\"repoID\\":\\"86.5000.470/doip.vcg9Mu1gSq_bdw\\",\\"listeners\\":\\"[{\\\\\\"url\\\\\\":\\\\\\"tcp://39.104.201.40:21032\\\\\\",\\\\\\"protocolVersion\\\\\\":\\\\\\"2.1\\\\\\",\\\\\\"messageFormat\\\\\\":\\\\\\"packet\\\\\\"}]\\",\\"serviceDescription\\":\\"test local Contract Repository\\",\\"serviceName\\":\\"ContractEngine021\\"}",
+ "clusterConnected":"false",
+ "nodePubKey":"0492d974b8a5b473d0ed2c81800917f76e2a1ec3666067888c85fe6922a672223f2083f95402ae13a744df58deabbe7206c4a317dd14296b0d3941a26ca4e34dc5",
+ "ipPort":"",
+ "bdledger":"39.108.56.240:18091,39.108.56.12:1809139.104.70.160:18091 47.98.247.70:18091 47.98.248.208:18091 39.104.77.165:18091 47.98.249.131:18091",
+ "yjsPath":"/data/bdwaas/bdcontract/yjs.jar",
+ "nodeCenter":"ws://39.104.201.21040/SCIDE/NodeCenter"
+ }
+}
+```
+
+
+#### Modifying Node Configuration
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |updateConfig|
+| key |The configuration item to change|
+| val |The target value to change|
+
+Options for key include:
+
+| key的示 |Val sample| 说明 |
+| ------------- | ----------------------------------- | ------------------------------- |
+| yjsPath |/User/xxx/cp/yjs.jar| 合约进程启动所需的jar |
+| dataChain | 192.168.1.8:18090,182.173.2.3:18091 | 账本节点的ip与端口 |
+| nodeCenter |ws://127.0.0.1:18002| CenterPortal所在的ip/端口 |
+| nodeName |Node_180| 字符串类型 |
+| masterAddress | 192.168.3.2:18001 | 该NodePortal节点的ip和的TCP端口 |
+
+The TCP port of the NodePortal is the HTTP/WS port number +1 of the Node.
+
+
+#### Modifying a Node Name
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |changeNodeName|
+| data |New node name|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "changeNodeName";
+param.data = "NewNodeName";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onChangeNodeName",
+ "data": true
+}
+```
+
+
+
+#### Example Change the YJS path of a node
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------------- |
+| action |changeYJSPath|
+| data |Yjs.jar path of the node server|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "changeYJSPath";
+param.data = "/Users/xxx/docs/BDWareHttp/generatedlib/yjs.jar";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onChangeYJSPath",
+ "data": true
+}
+```
+
+
+
+#### Modify NodeCenter
+
+##### parameter
+
+| 字段 |value|
+| ------ | ----------------------------------------- |
+| action |changeNodeCenter|
+| data |NodeCenterWebSocket path to which the node server is to connect|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "changeNodeCenter";
+param.data = "ws://127.0.0.1:1719/SCIDE/NodeCenter";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onChangeNodeCenter",
+ "data": true
+}
+```
+
+
+
+#### Example Modify an account node
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------------------- |
+| action |changeBDledger|
+| data |The IP address of the node is port, separated by commas (,)|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "changeBDledger";
+param.data = "39.108.56.240:18091,39.108.56.12:18091";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onChangeBDledger",
+ "data": true
+}
+```
+
+
+
+#### Uploading the Node License
+
+##### parameter
+
+| 字段 |value|
+| ------ | ----------------------- |
+| action |uploadLicence|
+| data |The content of the license on the node server|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "uploadLicence";
+param.data = "04AADCC7103C";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onUploadLicence",
+ "data": true
+}
+```
+
+
+
+#### Obtaining Node ids
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------- |
+| action |getNodeID|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "getNodeID";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "status": true,
+ "action": "onGetNodeID",
+ "data": "0431…d3a92e1184bbc5817ebda5c2ad498e4ff1d240009b4f06d"
+}
+```
+
+
+
+#### Gets the trusted execution cluster where the node resides
+
+##### parameter
+
+| 字段 |value|
+| ---------- | ------------------------------------------------ |
+| action |getNodeTrustUnits|
+| data |The node ID|
+| msgHandler |MsgHandler for the callback function that receives a reply|
+| ws |WebSocket address of the NodeCenter to which the node belongs|
+
+##### Sample request
+
+
+```
+centerportalws = createWssocket("ws://127.0.0.1:1718/NodeCenterWS",function() {
+var param = {};
+param.action = "getNodeTrustUnits";
+param.data = "0431e311bd70840fe69965e2cabea97fafe99f2133953c01abb9bd7cb62af42f8283f474d203051e920d3a92e1184bbc5817ebda5c2ad498e4ff1d240009b4f06d";
+centerportalws.send(JSON.stringify(param));
+}, msgHandler);
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [{
+ "key": "0475c7b061...65e55_4063665700873624164",
+ "value": "[\"04541429c11b094…40009b4f06d\"]"
+ }],
+ "action": "onGetNodeTrustUnits"
+}
+```
+
+### Template generation class
+
+#### Gets a list of contract templates
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action |getTemplateList|
+
+##### Sample request
+
+
+``` javascript
+req={};
+req.action = "getTemplateList";
+wssocket.send(JSON.stringify(req));
+```
+
+##### Returns the result
+
+
+``` json
+{
+ "data": [
+ {
+ "formDesc": {
+ "dbPWD": {
+ "label": "密码",
+ "type": "input"
+ },
+ "contractName": {
+ "label": "合约名称",
+ "type": "input"
+ },
+ "accessPolicy": {
+ "label": "访问控制策略",
+ "type": "input",
+ "option": [
+ {
+ "text": "无访问控制",
+ "value": "NAC"
+ },
+ {
+ "text": "直接访问控制",
+ "value": "DAC"
+ },
+ {
+ "text": "基于角色的访问控制",
+ "value": "RBAC"
+ }
+ ]
+ },
+ "dbUserName": {
+ "label": "用户名",
+ "type": "input"
+ },
+ "fieldList": {
+ "label": "字段名",
+ "type": "tag"
+ },
+ "dbUrl": {
+ "label": "数据库链接",
+ "type": "input"
+ },
+ "tableName": {
+ "label": "表名",
+ "type": "input"
+ }
+ },
+ "apiName": "generateMySQLProject"
+ },
+ {
+ "formDesc": {
+ "contractName": {
+ "label": "合约名称",
+ "type": "input"
+ },
+ "accessPolicy": {
+ "label": "访问控制策略",
+ "type": "input",
+ "option": [
+ {
+ "text": "无访问控制",
+ "value": "NAC"
+ },
+ {
+ "text": "直接访问控制",
+ "value": "DAC"
+ },
+ {
+ "text": "基于角色的访问控制",
+ "value": "RBAC"
+ }
+ ]
+ }
+ },
+ "apiName": "generateEmptyProject"
+ }
+ ],
+ "action": "onTemplateList"
+}
+```
+
+#### Blank Contract Template
+
+##### parameter
+
+| 字段 |value|
+| ------------ | ----------------------------- |
+| action |generateEmptyProject|
+| contractName |The name of the contract is a string|
+| isPrivate |Boolean type, whether it is a private project|
+| accessPolicy |If the value is “DAC”, direct access control is implemented|
+
+##### Sample request
+
+
+```javascript
+var req = {};
+req.contractName = "Empty22";
+req.action = "generateEmptyProject";
+req.accessPolicy = "DAC";
+//wssocket为建立好的连接
+wssocket.send(JSON.stringify(req));
+```
+
+##### Returns the result
+
+```json
+{
+ "action":"onListProjects",
+ "data":"[\"AnnotationSample\",\"AppDataAnalysis\",\"AppDataSource\"]",
+ "executeTime":0,
+ "isPrivate":false
+}
+```
+
+#### MySQL Access Contract
+
+##### parameter
+
+| 字段 |value|
+| ------------- | ------------------------------------------------------ |
+| action |generateMySQLProject|
+| contractName |The name of the contract is a string|
+| isPrivate |Boolean type, whether it is a private project|
+| dbUrl |The string is the URI of the database|
+| dbUserName |The value is a string of characters and the user name of the database|
+| dbPWD |The value is a string of characters and the database password|
+| accessPolicy |If it is “DAC”, direct access control is implemented; if it is “NAC”, no access control is implemented|
+| tableName |A string, the name of a database table|
+| fieldList |A list of strings, a list of database fields|
+| defaultAccept |Boolean value indicating whether the application is granted by default|
+
+##### Sample request
+
+
+```javascript
+var req = {};
+req.contractName = "MySQLFromTemplate";
+req.action = "generateMySQLProject";
+req.pubKey = global.sm2Key.publicKey;
+req.isPrivate = true;
+req.tableName = "data";
+req.dbUrl = "jdbc:mysql://xxx:xxx/xxx";
+req.dbUserName = "loushuai";
+req.dbPWD = "loushuai";
+req.fieldList = [{"name":"名字","code":"*"}];
+req.basicInfo={"type":"所属分类","name":"资源名称"};
+req.accessPolicy = "DAC";
+req.defaultAccept = true;
+//global.wssocket为建立好的连接
+global.wssocket.send(JSON.stringify(req));
+```
+
+##### Returns the result
+
+```json
+{
+ "action":"onListProjects",
+ "data":"[\"CSVFromTemplate\",\"Empty22\",\"Hello\",\"MySQLFromTemplate\",\"test\"]",
+ "executeTime":0,
+ "isPrivate":true
+}
+```
+#### CSV Access Contract
+
+##### parameter
+
+| 字段 |value|
+| ----------------- | ------------------------------------------------------ |
+| action |generateCSVProject|
+| contractName |The name of the contract is a string|
+| base64EncodedData |The value is a string of characters in a Base64-encoded CSV file|
+| isPrivate |Optional fields, Boolean type, private item or not|
+| accessPolicy |If it is “DAC”, direct access control is implemented; if it is “NAC”, no access control is implemented|
+| defaultAccept |An optional field, a Boolean value that indicates whether the application is granted by default|
+
+##### Sample request
+
+
+```javascript
+var req = {};
+req.contractName = "CSVFromTemplate";
+req.action = "generateCSVProject";
+req.pubKey = global.sm2Key.publicKey;
+req.isPrivate = true;
+req.tableName = "data";
+req.accessPolicy = "DAC";
+req.defaultAccept = true;
+req.base64EncodedData = "bmFtZSwgc2NvcmUsCmphY2ssIDkwLApsdWN5LCA5MQo=";
+//global.wssocket为建立好的连接
+global.wssocket.send(JSON.stringify(req));
+```
+##### Returns the result
+
+```json
+{
+ "action":"onListProjects",
+ "data":"[\"CSVFromTemplate\",\"Empty22\",\"Hello\",\"MySQLFromTemplate\",\"test\"]",
+ "executeTime":0,
+ "isPrivate":true
+}
+```
+
+- - -
+
+## Routing node WebSocket interface
+
+### User Management
+
+#### Access to the Session
+
+Before login, obtain the session for signing.
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------ |
+| action |getSessionID|
+
+##### Sample request
+
+
+```
+var req = {};
+req.action = "getSessionID";
+wssocket.send(JSON.stringify(req));
+```
+
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onSessionID",
+ "session": "9782323_session"
+}
+```
+
+
+#### The user login
+
+To authenticate the public key, the user needs to call “getSessionID” to obtain the sessionID for signature.
+
+##### parameter
+
+| 字段 | 值 |
+| ------ | ----- |
+| action | login |
+
+##### Sample request
+
+
+```
+var loginParam = {};
+loginParam.pubKey = global.sm2Key.publicKey;
+loginParam.signature = sm2.doSignature(global.session,
+ global.sm2Key.privateKey);
+loginParam.action = "login";
+wssocket.send(JSON.stringify(loginParam));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onLogin",
+ "data": "CenterManager"
+}
+```
+
+
+
+#### User gets the current role (Delete)
+
+A user obtains a role based on the public key used during login. If it is the first login, the public key used during login is called the access administrator by default
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------- |
+| action |getRole|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "getRole";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onGetRole",
+ "data": "CenterManager"
+}
+```
+
+#### Apply for role
+
+On the Access administrator page, you can apply for a node administrator for a node in the network
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------- |
+| action |applyRole|
+|role|Specifies the name of the applied role|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "applyRole";
+param.role="
+wssocket.send(JSON.stringify(param));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onApplyRole",
+ "data": "failed"
+}
+```
+
+
+#### Add a node
+
+##### parameter
+
+| 字段 |value|
+| ---------- | ---------------- |
+| action |addNode|
+|nodePubKey| 要添加的节点公钥 |
+
+#### Sample request
+
+
+```
+var req = {};
+//某节点的publicKey可通过连接该节点,并通过"获取节点配置信息"接口获取
+req.nodePubKey = publicKey;
+req.action = "addNode";
+wssocket.send(JSON.stringify(req));
+```
+
+
+#### Deleting a User Role
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |delete|
+| pubKey |The public key of the corresponding user|
+
+##### Sample request
+
+
+```
+var deleteInfo = {};
+deleteInfo.pubKey = user.publicKey;
+deleteInfo.action = "delete";
+wssocket.send(JSON.stringify(deleteInfo));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onDelete",
+ "data": "success"
+}
+```
+
+#### View the list of authorized users
+
+View authorized node administrators in the current network
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------ |
+| action |listAllUsers|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "onListAllUsers";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onListAllUsers",
+ "kv": {
+ "key": "049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7",
+ "value": " NodeManager"
+ },
+ "time": {
+ "key": "049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7",
+ "value": 1587398989914
+ }
+}
+```
+
+#### View the list of applied users
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------- |
+| action |listApplyList|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "onListApplyList";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onListApplyList",
+ "kv": {
+ "key": "04b00f32eab70c78d1b43738f190d326d36c021af2124acefe6d057016b11ea31c750bb473e565c9d89e4993a44f4d30adf447d3026a21ff4b3b64cef523074ef7",
+ "value": " NodeManager"
+ },
+ "time": {
+ "key": "04b00f32eab70c78d1b43738f190d326d36c021af2124acefe6d057016b11ea31c750bb473e565c9d89e4993a44f4d30adf447d3026a21ff4b3b64cef523074ef7",
+ "value": 1587398989914
+ }
+}
+```
+
+#### View the distribution of user types
+
+##### parameter
+
+| 字段 |value|
+| ------ | ------------- |
+| action |queryUserStat|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "onQueryUserStat";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Result
+
+
+```json
+{
+ "action": "onQueryUserStat",
+ "userListCount": 3,
+ "applyListCount":0
+}
+```
+
+### Node Management
+
+#### Viewing the Node List
+
+View the node list that the user has the permission to view (only available to access administrators and contract managers)
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------- |
+| action |listNodes|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "listNodes";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "offline": [{
+ "key": "0431e31...40009b4f06d",
+ "value": "0431e311bd708...b4f06d"
+ }],
+ "action": "onListNodes",
+ "online": [{
+ "contracts": [],
+ "pubKey": "0431e311...09b4f06d",
+ "nodeName": "NewNodeName",
+ "udpID": "528822126",
+ "cimanager": ""
+ }]
+}
+```
+
+
+#### View the list of trusted execution clusters
+
+View the node list that the user has permission to view (available only to the center administrator and contract manager)
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |listTrustUnits|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "listTrustUnits";
+wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data": [{
+ "key": "0470b2f27f4f6…1cb855f1ecec11",
+ "value": "[...]"
+ }],
+ "action": "onListTrustUnits"
+}
+```
+
+
+#### Establish a trusted execution cluster
+
+##### parameter
+
+| 字段 |value|
+| ------ | ---------------------- |
+| action |createTrustUnit|
+| data |Json array of node public keys|
+| Msg |The name of the cluster|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "createTrustUnit";
+param.data = "[\"382r0934309t...\",\"345343rr3f34...\"]";
+param.msg = "newUnit1";
+global.wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onCreateTrustUnit",
+ "status": "Success"
+}
+```
+
+
+#### Delete a trusted execution cluster
+
+##### parameter
+
+| 字段 |value|
+| ------ | --------------- |
+| action |deleteTrustUnit|
+| data |Trusted execution cluster ID|
+
+##### Sample request
+
+
+```
+var param = {};
+param.action = "deleteTrustUnit";
+param.data = "0475d34rf3434..._1583410158761";
+global.wssocket.send(JSON.stringify(param));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "action": "onDeleteTrustUnit",
+ "status": "Success"
+}
+```
+
+
+
+### Log Viewing Class
+
+#### View the statistics of network management operations
+
+##### parameter
+
+| 字段 |value|
+| ------ | -------------- |
+| action |queryActionLog|
+| date |The current time|
+
+##### Sample request
+
+
+```
+request.action = "onQueryActionLog";
+request.date = new Date().getTime() - 24 * 3600 * 1000 * n;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{ "action":"onQueryActionLog",
+ "data":"[{\"action\":\"login\",\"pubKey\":\"null\",\"status\":\"accept\",\"date\":1583139323822}\",]"
+}
+```
+
+
+
+#### View local contract logs in the last N days
+
+##### 参数
+
+| 字段 |value|
+| ------ | -------------------- |
+| action |listLocalContractLog|
+| date |The current time|
+
+##### Sample request
+
+
+```
+request.action = "listLocalContractLog";
+request.date = new Date().getTime() - 24 * 3600 * 1000 * n;
+wssocket.send(JSON.stringify(request));
+```
+
+##### Returns the result
+
+
+```json
+{
+ "data":"[\"{\"action\":\"startContract\",\"pubKey\":\"04405d7b...\",\"contractID\":\"845581788\",\"contractName\":\"null\",\"date\":1583141525539}\"]"
+}
+```
+
+
+- - -
+
+## Bash interface
+
+Has been abandoned. BDWareConfigTool can be used instead. Send Socket instructions through the command line to execute the invocation of methods in the class to accomplish the following functions (need to run the instance on the local port)
+
+![Schematic diagram of Bash interface functions](./_static/imgs/bash-api.png)
+
+### instruction
+
+
+```bash
+java -jar yjs.jar function_name arguments
+
+```
+
+`function_name` is the name of the called method;
+
+`arguments` is the method parameter.
+
+### Start the contract
+
+#### parameter
+
+`function_name` is `startContract`;
+
+`arguments` to start the contract parameters, including the type of contract `type`, the contract ID `id`, contract script `script`.
+
+#### Order sample
+
+
+```bash
+java -jar yjs.jar startContract "{\"type\":\"Algorigthm\",\"id\":\"656565\",\"script\":\"contract c{function main(arg){return arg/1.0+1;}}\"}"
+```
+
+### Call the contract
+
+#### parameter
+
+`function_name` is `executeContract`;
+
+`arguments` need to invoke the contract parameters, including the call parameters `arg`, the contract ID `contractID`.
+
+#### Order sample
+
+
+```bash
+java -jar yjs.jar executeContract "{\"arg\":\"http://www.baidu.com\",\"contractID\":\"656564\"}"
+```
+
+### To stop the contract
+
+#### parameter
+
+`function_name` is `stopContract`;
+
+`arguments` is the parameter required to invoke the contract, that is, the contract ID `contractID`.
+
+#### Order sample
+
+
+```bash
+java -jar yjs.jar stopContract "{\"arg\":\"http://www.baidu.com\",\"contractID\":\"656564\"}"
+```
+
+### Termination of all contracts
+
+#### parameter
+
+`function_name` indicates that `stopAllContracts`.
+
+#### Order sample
+
+
+```bash
+java -jar yjs.jar stopAllContracts
+```
+
+### Query all contracts
+
+#### parameter
+
+`function_name` indicates that `listContracts`.
+
+#### Order sample
+
+
+```bash
+java -jar yjs.jar listContracts
+```
+
\ No newline at end of file
diff --git a/markdown_trans/markdown_ZRYH/IDEUsage.md b/markdown_trans/markdown_ZRYH/IDEUsage.md
new file mode 100644
index 0000000..3999f1f
--- /dev/null
+++ b/markdown_trans/markdown_ZRYH/IDEUsage.md
@@ -0,0 +1,411 @@
+# BDContract management interface
+
+- - -
+
+## Contract node management interface
+
+The address of this interface is: [NodePortal.html](/NodePortal.html)
+
+
+### User Management Menu
+User management allows login users to view the current user distribution and user active statistics.
+
+#### An overview of
+![nodeUserManager](./_static/imgs/nodeUserManager.jpg) The node user management page has four modules: user information, active user statistics, authorized user management, and unauthorized user management.
+
+#### User Type Distribution
+Calculate the number of four roles held by the current node administrator: contract provider, contract administrator, and contract user ![userList](./_static/imgs/userList.jpg)
+
+#### Active User Statistics
+![userActive](./_static/imgs/userActive.jpg) statistics 30 days **The login**, **authorization**, **To apply for** the number of times
+
+#### Current User Information
+![nodeInfo](./_static/imgs/nodeInfo.jpg)
+ * In this text box, you can view the public and private keys of the current user. If other users want to use their public and private keys to log in to the node administrator interface, they can copy their public and private keys to this text box.
+ * After copying your public and private keys, click **Import the public key** to add the public key to the local node administrator
+ * The first five public keys are displayed in **Local public key**. If you select your own public key, the role of the selected public key will be displayed in **My permission**. If the node has not been authenticated by the central administrator, the default value is **Anonymous**.
+ * If you are not a node administrator and want to join the network of a central administrator, use your own public and private keys to import the key to the user management where the central administrator resides for authentication.
+ * If you want to perform more operations on contracts, you need to authenticate different roles: contract administrator, contract consumer, contract provider, and then **Role of certification**
+
+#### List of authorized and unauthorized users
+![roleAuth](./_static/imgs/roleAuth.jpg)
+After the node administrator authenticates the role, the node administrator will see the application information with the public key in the **Role management is not authorized** form. If yes, click . If no, click . After authorization, you will see a list of authorized nodes in the **Authorized Role Management** table. If the node administrator wants to remove a role from a node, enter **delete** in the entitlement role management list.
+
+### Contract code management menu
+
+![codeManageMenu](./_static/imgs/codeManageMenu.png)
+
+
+
+#### The contract documents
+
+![codeManage1](./_static/imgs/codeManage1.png)
+
+In the Contract Code Management menu, users can see public contracts as well as individual private contracts. ![codeManage1-1](./_static/imgs/codeManage1-1.png)
+
+For public contracts, node administrators can delete and upload files, and download and delete contract items. ![codeManage1-2](./_static/imgs/codeManage1-2.png)
+
+For private contracts, the contract provider can delete and upload files, and download, delete and upload contract items to the public contract directory.
+
+The following is an example of working with a contract file.
+
+#### Upload a file
+![codeManage6](./_static/imgs/codeManage6.png)
+
+#### delete
+![codeManage5](./_static/imgs/codeManage5.png)
+
+#### To the public
+![codeManage7](./_static/imgs/codeManage7.png)
+
+#### A drop-down box
+
+![codeManage2](./_static/imgs/codeManage2.png)
+
+From the four drop-down boxes, you can select the contract status saving mode, started contract instance, cluster where the node resides, and result verification mode.
+
+
+
+#### Button action
+
+![codeManage3](./_static/imgs/codeManage3.png)
+
+#### Start the
+
+After selecting the contract file in the file list, select “Single Node Execution” in the contract operation mode and click the Start button to launch the specified file and display the return result in the result display box.
+
+
+
+#### The P2P cluster contract is started
+
+After selecting the contract file in the file list, select the contract cluster on which the trusted contract runs in the Contract Run mode and click the Start button to start the specified file on all nodes of the cluster and display the return result in the result display box.
+
+
+
+#### Start all
+
+Select “Single Node Execution” in the contract operation mode and click the “Start All” button to start all contracts in the contract file list.
+
+
+
+#### Stop the P2P cluster contract
+
+Select a contract instance from the drop-down box for started contract instances, select the contract cluster for which the trusted contract runs in Contract Run mode, and click the Stop button to terminate the contract process on all nodes in the cluster.
+
+
+
+#### stop
+
+Selecting a contract instance from the drop-down box for started contract instances and clicking the Stop button will terminate the contract process.
+
+
+
+#### Stop all
+
+Clicking the Stop All button stops all contract instances running on that node.
+
+
+
+#### Static analysis
+
+Select the contract file in the Contract file list, select the contract instance in the Contract instance drop-down box, click the static analysis button, the contract will be static analysis, and the result will be displayed in the result display box.
+
+
+
+#### Distribution of the contract
+
+Select a contract item in the contract file list, select a cluster in Contract operation mode, and click the Distribute contract button. The contract item will be packaged as YPK and distributed to all nodes in the cluster.
+
+
+
+
+#### Returns the result
+
+![codeManage4](./_static/imgs/codeManage4.png)
+
+The Return Result display displays the return results of some operations.
+
+
+
+#### Contract Permission Configuration
+
+After starting the contract, if the current user’s role can view the started contract process, the IO permissions for the current contract will be displayed in the bottom right when the process is selected. ![permissionShow](./_static/imgs/permissionShow.png)
+
+If the selected contract does not have I/O permission, the following message is displayed in the current permission display box: **The current contract does not have IO permission**![nullPermission](./_static/imgs/nullPermission.png)
+
+If the current user is a contract administrator, you can modify the existing contract I/O permissions. The system will prompt that the contract may not run normally after modification. If you still want to cancel, click , otherwise click .
+
+After clicking Close or open, the next time the process views the same contract code, it will display the IO permission after the last modification by default. ![closePermission](./_static/imgs/closePermission.png)
+
+### Contract instance management menu
+
+![nodeInstancesPage](./_static/imgs/nodeInstancesPage.png)
+
+The contract instance management menu displays all the current contract instances of this node. Users can view the status of the contract instance and execute or migrate the status of the contract instance.
+
+#### List of Contract instances
+
+![nodeInstancesList](./_static/imgs/nodeInstancesList.png)
+
+This list shows all the contract instance information of the current node, including the contract ID, contract name, contract type, contract status, contract process port, contract call times, contract traffic, and contract memory usage, and the result verification mode of the cluster contract.
+
+#### Contract instance execution
+
+![chooseInstance](./_static/imgs/chooseInstance.png)
+
+Users can select a contract instance in the contract instance selection drop-down box to operate on the contract instance.
+
+![intanceExecute](./_static/imgs/intanceExecute.png)
+
+After selecting the contract instance, the user can select the method name of the contract from the “Methods” drop-down box, enter the method parameters in the “Parameters” input box, and click “Execute ”.
+
+Users can also click on “Dynamic Analysis Execution” to perform an execution with dynamic analysis results.
+
+If the contract is a single point contract, the contract is executed at a single point; If the contract is a cluster contract, the contract is executed on all nodes in the cluster.
+
+#### Contract instance execution result
+
+![executeResult](./_static/imgs/executeResult.png)
+
+The execution result of the contract instance is displayed in the Execution Result area, including the execution ID, execution success/failure, execution time, and execution result.
+
+![analysisExecuteResult](./_static/imgs/analysisExecuteResult.png)
+
+If the execution mode of the contract is Dynamic Analysis execution, in addition to the execution result, the dynamic analysis result of the execution is displayed in the result box.
+
+#### Contract status migration
+
+![memoryDump](./_static/imgs/memoryDump.png)
+
+For the contract instances that support manual migration, users can click “Local State Save” to save the state of the contract instance, or select the saved contract instance from the TimeTravel list of the contract to migrate the contract state to the corresponding time.
+
+
+
+### Log Management Menu
+![logMenu](./_static/imgs/logMenu.png)
+
+This menu displays the statistics of local node logs and contract logs of the node.
+
+Node administrators can view node log data. The contract manager and contract user can view the local contract log data of the node.
+
+
+
+#### Log Statistics View
+
+![log1](./_static/imgs/log1.png)
+
+#### Operating percentage of various platforms
+
+By default, this chart shows the pie chart of the proportion of various platform operations in the last two days, in which platform operations are divided into six categories: login, user, log, contract, maintenance and others. You can enter the desired log time range in the upper right corner of the node log details. After the time range is changed, the operation percentage of each platform is updated.
+
+
+
+#### Operating percentage of each type of contract
+
+Contract operations are divided into four categories: start, end, static analysis and execution. The pie chart shows the proportion of each type of contract operation in the last 2 days. You can enter the desired log time range in the upper right corner of the contract log details. After the time range is modified, the operation percentage of each contract is updated.
+
+
+
+
+#### Daily platform usage statistics
+
+The figure is a broken line chart of the number of platform operations in the last 2 days. You can enter the desired log time range in the time range box in the upper right corner of node log details. After the time range is changed, the daily platform usage statistics line chart is updated.
+
+
+
+
+#### Daily contract usage statistics
+
+The figure is a broken line chart of the number of operations performed on the node in the last two days. You can enter the desired log time range in the time range box in the upper right corner of the contract log details. After modification, the daily contract usage statistics line chart will be updated.
+
+
+
+
+#### Log details
+
+
+
+#### Node Log Details
+![log2](./_static/imgs/log2.png)
+
+The node log details table displays all data in node logs. You can click the relevant button in the table to sort the log data in different ways, and enter keywords in the upper right corner of the table to search for relevant logs. You can enter the desired log time range in the time range box in the upper right corner. After the log time range is modified, the operation percentage of each platform and daily platform usage statistics are updated simultaneously.
+
+
+
+#### Contract Log Details
+![log3](./_static/imgs/log3.png)
+
+The contract log details table is a display of all the data in the contract log. You can click the relevant button in the table to sort the log data in different ways, and enter keywords in the upper right corner of the table to search for relevant logs. You can enter the desired log time range in the time range box at the upper right corner. After the change, the operation percentage of each type of contract and the daily contract usage statistics are updated simultaneously.
+
+
+
+### Node Management Menu
+
+![nodeConfig](./_static/imgs/nodeConfig.png)
+
+The node management menu displays the configuration information about the node and its trusted execution cluster.
+
+#### Node configuration
+
+![nodeConfigChange](./_static/imgs/nodeConfigChange.png)
+
+The node administrator can view the configuration information of the node, including the node name, YJS path, and network center node of the node. The node administrator can also modify the configurations.
+
+If the node administrator changes the network center of the node, the node tries to change the connection again, and the entire page is refreshed and reloaded.
+
+#### Node trusted execution cluster list
+
+![nodeUnits](./_static/imgs/nodeUnits.png)
+
+A node administrator can view information about the trusted execution cluster to which a node belongs, including the cluster creator, cluster ID, number of nodes in the cluster, and information about nodes in the cluster.
+
+- - -
+
+#### Node License Configuration
+
+![nodeLicence](./_static/imgs/nodeLicence.png)
+
+You can view the node’s license and expiration time, apply for and upload a license, and save the node UUID.
+
+## Smart Contract online editor
+
+### Users and Accounts
+
+#### Create account
+
+#### Apply for authorization
+
+
+### Create a project
+
+#### The new file
+
+#### Upload a file
+
+### Start the contract
+![contractMode](./_static/imgs/contractMode.png)
+
+#### Normal mode Click the startup button on the left to start the contract in normal mode.
+
+#### Debug mode Click the Debug button on the right to start the contract in debug mode. The current convention returns an example of the return result from the normal mode contract document when the debug mode contract is invoked via executeContract.
+
+### Call the contract
+
+### # Generate document ![genReadme](./_static/imgs/genReadme.png)
+
+After starting the contract, click the “Generate document” button to call the contract and return the Result through @description / @param / @result of each export function, so as to generate the contract Description document.
+
+- - -
+
+## Route access management interface
+
+### Permission application and authorization
+
+### The dashboard
+The dashboard provides an overview of the number of users, contracts, and nodes in the admittance node.
+
+### The overall view
+![dashboard](./_static/imgs/dashboard.jpg) It is divided into four modules. One module is the overview of the number of users, contracts and nodes, and then the detailed statistics of the three quantities.
+
+### The number of nodes
+![node](./_static/imgs/node.jpg) Collect statistics about the current online and offline nodes
+
+### User Type Distribution
+![userAll](./_static/imgs/userAll.jpg) Number of node administrators and admission administrators in the network where the current admitted node resides, and number of nodes to be applied for
+
+### Contract invocation condition
+![contract](./_static/imgs/contract.jpg) Broken line statistics of events, multi-point execution, WS call, and Http call in all contracts in the network where the current access node resides.
+
+### User management
+User management allows login users to view the current user distribution and user active statistics.
+
+### An overview of
+![centerManager](./_static/imgs/centerManager.jpg) The user management page consists of four modules.
+
+
+### User Type Distribution
+Main Statistics on the number of node administrators in the network managed by the center administrator, the number of center administrators, and the number of applied node administrators ![userList](./_static/imgs/userList.jpg)
+
+### Statistics of applications made within 30 days
+![userApplyGraph](./_static/imgs/userApplyGraph.jpg) Calculates the number of node administrators who apply for and are authorized to become node administrators within 30 days
+
+### Current User Information
+![authNodeManager](./_static/imgs/authNodeManager.jpg)
+ * In this text box, you can view the public and private keys of the current user. If other users want to use their public and private keys to log in to the center administrator interface, they can copy their public and private keys to this text box.
+ * After copying your public and private keys, click **Import the public key** to add the public key to the central administrator
+ * The first five public keys are displayed in **Local public key**. If you select your own public key, the role of the selected public key is displayed in **My permission**. If you are a central administrator, you have all the rights of the central administrator.
+ * If you are not a center administrator or node administrator and want to join the network of the current center administrator, you can select the node administrator in the following box and run **Role of certification**.
+
+### List of authorized and unauthorized users
+After applying for the current user information of the center administrator, the center administrator will see the application information with the public key in the form. If you agree, click . If you disagree, click , and the application is invalid.
+![authMan](./_static/imgs/authMan.jpg)
+After authorization, you will see a list of authorized nodes in the **Authorized User Management** table. If the central administrator wants to remove a role of a node administrator, select the role in the authorized user management list and click **delete** to delete the selected role.
+![authMana](./_static/imgs/authMana.jpg)
+
+### Node management
+
+![centerNodePage](./_static/imgs/centerNodePage.png)
+
+Node management is a page on which the Manager manages the Cluster nodes connected to it, visible only to Manager administrators and contract managers. Manager Administrators and contract managers can view node information and manage trusted execution clusters.
+
+### An overview of
+
+![centerNodePreview](./_static/imgs/centerNodePreview.png)
+
+The overview displays the statistics of all nodes managed by the Manager node, including the total number of nodes, the total number of contracts, the total number of subscription events, and the number of trusted execution clusters. The pie chart on the right shows the number of nodes that are Online and Offline respectively.
+
+### The node list
+
+![centerNodeList](./_static/imgs/centerNodeList.png)
+
+The node list shows the node information that the user has the permission to view. (The Manager administrator can view all nodes, and the contract Manager can view the Online node that he is responsible for managing.) This includes the node name, status, number of contracts, number of subscribed events, PeerID for P2P communication between nodes, UDPID for UDP communication between nodes, and the node public key.
+
+### List of trusted execution clusters
+
+![centerNodeUnits](./_static/imgs/centerNodeUnits.png)
+
+The trusted execution cluster list displays the trusted execution cluster information that the user has the permission to view. (The Manager administrator can view all the clusters, and the contract Manager can view the clusters created by himself.) This includes the creator of the cluster, the cluster ID, the number of nodes in the cluster, and information about the nodes in the cluster.
+
+You can click the “Delete” button of the column entry to delete the cluster.
+
+### Create a trusted execution cluster
+
+![centerNodeUnitCreate](./_static/imgs/centerNodeUnitCreate.png)
+
+You can create a new trusted execution cluster by selecting multiple nodes. The nodes that users can select are those they have permission to view, that is, the Manager administrator can select from all nodes, and the contract Manager can select from the Online node that they are responsible for managing). Select and click Submit. A message indicating that the cluster is created successfully will be displayed in the list of trusted execution clusters. The cluster name is selected by the creator and cannot contain double quotation marks. The cluster name is visible when the contract manager selects the cluster.
+
+### Log management
+Log management displays the log information of admission nodes and consists of six modules.
+### An overview of
+![log](./_static/imgs/log.jpg)
+
+### Classified Statistics of Management Operations (2 days)
+![operator](./_static/imgs/operator.jpg) Pie chart of all management operations in the last two days. Management operations are classified into login, log, maintenance, and user operations.
+
+### Daily Statistics of Management Operations (2 days)
+![everyLog](./_static/imgs/everyLog.jpg) Daily operation statistics of all management operations within two days
+
+### Statistics on Contract Operations by Category (2 Days)
+![contractLog](./_static/imgs/contractLog.jpg) Two day contract operation classification statistical pie chart, contract operation is mainly divided into connection class and status update class.
+
+### Daily Statistics of Contract Operation (2 days)
+![contracteveryLog](./_static/imgs/contracteveryLog.jpg) Chart of the broken line of the number of contract operations in two days.
+
+### Manage the operation log list
+![opList](./_static/imgs/opList.jpg) Manage the detailed information list of operation logs. The information includes log time, management operation name, and node public key corresponding to the operation. The default value is two days. You can customize the days for obtaining logs.
+
+### List of contract operation logs
+![contractList](./_static/imgs/contractList.jpg) Detailed information list of contract operation logs. This parameter includes log generation time, contract operation name, and public key of the contract operation node. The default value is two days. You can customize the days for obtaining logs.
+
+### Set up the
+
+The Settings page displays the status of node certificates and configures node certificates
+
+### An overview of
+![set](./_static/imgs/set.jpg)
+
+### Certificate status
+![licence](./_static/imgs/licence.jpg) The certificate status includes the license expiration time and the number of licensed nodes.
+
+### Certificate of configuration
+![plicence](./_static/imgs/plicence.jpg) Configure the certificate module. You can download the node ID file or enter the certificate information for submission.
diff --git a/markdown_trans/markdown_ZRYH/InstallTips.md b/markdown_trans/markdown_ZRYH/InstallTips.md
new file mode 100644
index 0000000..4911523
--- /dev/null
+++ b/markdown_trans/markdown_ZRYH/InstallTips.md
@@ -0,0 +1,188 @@
+# BDContract Installation instructions
+
+
+- - -
+
+## Environment-dependent installation
+1.Install the Java1.8 environment.
+
+For example, using apt-get to install Ubuntu:
+
+
+```bash
+apt-get install openjdk-8-jre
+```
+On Centos, install using yum:
+
+
+```bash
+yum install java-1.8.0-openjdk
+```
+
+In an offline environment, download the OpenJDK installation package and install it offline.
+
+Under the Ubuntu
+
+```bash
+dpkg -i jdk-8uxxxxx.deb
+```
+
+On Centos, use yum for offline installation:
+
+```bash
+yum localinstall jdk-8u271-linux-xxx.rpm
+```
+
+2.Install wGET and unzip. For example, using apt-get to install Ubuntu:
+
+
+```bash
+apt-get install unzip
+apt-get install wget
+```
+
+- - -
+
+## Network Topology Description
+
+Only one node is required to deploy the Surui smart contract engine, which can be used for debugging and testing. The multi-node mode cannot be used to achieve trusted computing. When a single node is deployed, the calculation of “anti-repudiation” can be implemented by configuring the ledger, but the calculation of “tamper-resistant” cannot be implemented.
+
+In multi-node deployment, the following figure shows three types of logical nodes. One to three types of nodes can be installed on a VM.
+
+1) Account node. That is, the number Rui schema ledger.
+
+2) Contract node. Run code logic and implement highly responsive modules through memory caching. Form a trusted computing network with other contract nodes.
+
+3) Routing node. Routing information of each contract node. Generally, a routing node can support a maximum of 1000 contract nodes. Deploy multiple routing nodes as required, and configure the routing nodes among them to implement a large-scale node network.
+
+Generally, **Contract node and ledger node** is deployed on the same VM.
+
+![deploytopology](_static/imgs/deploytopology.png)
+
+- - -
+
+## Smart contract node installation
+
+Open the[安装包下载链接](https://public.internetapi.cn/?dir=releases/bdcontract/newest), download `bdserver-lite.zip` or `bdserver.zip`, among them, the `bdserver.zip` contains more examples and documentation. After downloading, unzip and launch.
+
+
+```bash
+unzip -d ./bdserver bdserver-lite.zip
+cd bdserver
+chmod +x *.sh
+sh cmstart.sh
+```
+
+- - -
+
+## Route admission nodes are installed
+
+Open[安装包下载链接](https://public.internetapi.cn/?dir=releases/bdcontract/newest) Where, download `bdserver-cluster.zip`. After downloading, unzip and launch.
+
+
+```bash
+unzip -d ./bdcluster bdserver-cluster.zip
+cd bdcluster
+chmod +x *.sh
+sh ncstart.sh
+```
+
+- - -
+
+## Document describing
+
+### Smart Contract node
+
+![bdserver目录](_static/imgs/dirstructure.png)
+
+Description of files in this directory:
+
+1.Cmstart. sh This script is used to start the contract engine. The contract engine listens to port 8080 by default. You can modify the listening port by running the cmstart.sh command.
+
+2.BDWareProjectDir This directory stores all contract projects for this node.
+
+3.WebContent This directory stores the front-end code of this node.
+
+4.Cp, which holds yjs.jar, the JAR needed to start the contract instance.
+
+5.Bdserver. jar provides HTTP/webSocket server logic externally.
+
+6.Updatecontract. sh Upgrade script.
+
+### Route admission node
+
+The installation script is automatically downloaded and decompressed to the bdCluster directory. Description of files in this directory:
+
+1.Ncstart. sh This script is used to start the node access center. It listens on port 1718 by default. You can modify the listening port by modifying ncstart.sh.
+
+2.WebContent This directory houses the front-end code for the access center.
+
+3.Bdcluster. jar back-end of the access center.
+
+- - -
+
+## The upgrade process
+
+### Contract node
+
+On the command line, type:
+
+
+```bash
+sh updateContract.sh
+```
+
+Alternatively, go to [public.internetapi.cn](https://public.internetapi.cn/?dir=releases/bdcontract), download the latest file, and upgrade yjs.zip/bdserver-jar.zip/AgentWebContent separately.
+
+### Route admission node
+
+
+```bash
+sh updateCluster.sh
+```
+Through the [public.internetapi.cn](https://public.internetapi.cn/?dir=releases/bdcontract), download the latest files, separate upgrade bdserver — cluster. Zip/ClusterWebContent. Zip to upgrade.
+
+- - -
+
+## Directions for use
+
+### Use it on the reference page
+If the WebContent directory is reserved, you can configure it using the browser. For more information, see the document [BDContract refer to the interface instructions](./IDEUsage.html) on the left.
+
+#### BDWare OnlineIDE
+Open [BDWare OnlineIDE](../OnlineIDE.html).
+
+#### BDWare NodePortal
+Open [BDWare NodePortal](../NodePortal.html).
+
+If the cross-node function is required for networking, install the route access center. Perform the following steps to configure it. Two sets of public and private keys are involved. The first group of public and private keys is the public and private keys of the contract node that have NodeManager permission. The second group is the public and private keys of the route access node that have the CenterManager permission.
+
+1.Open nodeportal. HTML and copy the public and private NodeManager keys of the node.
+
+2.Open centerportal. HTML, click in the upper right corner, and import the public and private NodeManager keys. And select “NodeManager” for identity authentication.
+
+3.In centerportal. HTML, switch the public and private keys of CenterManager, click User Management on the left, and pass the NodeManager authentication request.
+
+4.Use the public and private keys of the NodeManager permission to open nodeportal. HTML, click the Node Management menu, and configure joining the network. The format of joining the network is WS :// IP address of Centerportal: port +1. ![配置示例](_static/imgs/config.png)
+
+
+### Using the SDK
+
+#### Basic knowledge of
+
+[Websocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API)
+
+[Sm2 encrypted using] (https://github.com/JuneAndGreen/sm-crypto)
+
+#### Download the SDK
+
+1. Java client download: [BDWareJavaClient](_static/BDWareJavaClient.zip). For details about how to use it, download it, decompress it, check readme.md, and see [ContractAPI](./ContractAPI.html).
+
+2.Javascript version for client download :[BDWareWebClient](_static/BDWareWebClient.zip). For details about how to use it, download it, decompress it, check readme.md, and see [ContractAPI](./ContractAPI.html).
+
+3.Configuration tool [BDWareConfigTool](_static/BDWareConfigTool.zip). For details, decompress the package and run the following command to view help information:
+
+
+``` bash
+java -jar java-client.jar -h
+```
\ No newline at end of file
diff --git a/markdown_trans/markdown_ZRYH/Introduction.md b/markdown_trans/markdown_ZRYH/Introduction.md
new file mode 100644
index 0000000..fd5d9f6
--- /dev/null
+++ b/markdown_trans/markdown_ZRYH/Introduction.md
@@ -0,0 +1,218 @@
+# BDContract introduction
+
+- - -
+
+## What is a BDContract?
+BDContract is a set of software encapsulated in Zhirong Yunhe big data blockchain, based on the smart contract engine of Beida Sgrui open source. It is a management and scheduling platform for data resources, IoT resources and cloud resources in big data scenarios. BDContract is a trusted computing framework where the computation logic is expressed as a smart contract. Through “random” and “redundant computation” to achieve the trusted execution of smart contract. BDContract focuses on improving execution efficiency and security while ensuring the availability and reliability of smart contracts.
+
+
+- - -
+
+## The characteristics of
+
+0. Support multiple execution modes, balancing availability, reliability, correctness, and efficiency.
+1. Access to various data sources.
+2. Support for fine-grained monitoring of contracts.
+3. Support the state of the contract.
+4. Access control.
+5. Support for cross-language invocation.
+
+
+- - -
+
+## Update log
+
+* **v1.4.5** June 29, 2021
+ - Improvement of stability
+ - Optimize URIPath for the HTTP server
+ - Supports static resource file loading using Http
+
+* **v1.4.4** June 15, 2021
+ - Fixed an issue with getContractMeta that does not prioritise RUNNING/HANGED contracts
+ - The logic of HomomorphicEncrypt is implemented
+
+* **v1.4.3** June 9, 2021
+ - Fix the SSL Renegotiate Bug
+ - Implement automatic hangup-resume when memory is insufficient
+ - Implement hard disk persistence for Contract Meta
+
+* **v1.4.1** May 26, 2021
+ - Implement event semantics in event mechanism, support “at least once”, “at most once” and “only once”
+ - Optimized contract templates
+ - Example Add a template configuration file
+ - Optimized the MockTemplate annotation
+
+* **v1.4.0** May 9, 2021
+ - Optimize the ACTemplate
+ - Improved configuration linkage for DoRepo
+
+* **v1.3.9** April 22, 2021
+ - Fixed a bug where doipConfig was not supported in updateConfig
+ - Test-tool supports SUdo
+ - Optimized the ACTemplate template in Contract-Template
+
+* **v1.3.6** April 21, 2021
+ - Fixed an issue in Docker where CPUID could not be obtained
+
+* **v1.3.6** April 16, 2021
+ - Fixed some bugs
+ - Fixed a bug that caused queuing due to insufficient GRPCPool threads
+ - Fixed a bug where the requestID assignment could duplicate under stress testing
+
+* **v1.3.5** March 31, 2021
+ - Fixed some bugs
+ - Simple congestion control policies have been added to the contract invocation part of HTTP
+ - Improvement of stability
+
+* **v1.3.0** February 1, 2021
+ - Optimizing heartbeat Mechanism
+ - Fixed some bugs
+ - SM2 update/SM3 library
+ - Update the front-end signature calculation method
+
+* **v1.2.0** December 11, 2020
+ - Optimized multi-node execution mode
+ - Optimized the logic of the contract master route
+ - Fixed some bugs
+ - Fix file system related vulnerabilities
+
+* **v1.1.0** September 2020
+ - Support for HTTPS, and updated this part of the documentation
+
+
+* **v1.0.9** August 27, 2020
+ - Improve the documentation of IO related tools
+ - Optimize contract template: DAC persistence
+
+
+* **v1.0.7** August 13, 2020
+ - Optimized the contract log and ledger interfaces
+ - Optimize documentation for interfaces
+ - Provides the WebSocket interface for the contract template
+ - Automatic compilation of bug fixes
+
+* **v1.0.5** July 25, 2020
+ - Weaken the centralization of NC, and cluster point-to-point connection.
+ - Optimize bdwareclient
+ - TODO MemoryDurable
+
+* **v1.0.2** July 22, 2020
+ - Fixed Bug in CentOS7 Too Many Opened Files
+ - Fix permissions bugs
+ - Adding a Permission
+ - Fixed bugs in MySQLUtil
+ - Upgrade the BDLedger version
+
+* **v1.0.1** July 5, 2020
+ - Updated NodePortal/CenterPortal UI.
+ - The compilation process has been modified so that the compilation results can be viewed in NodePortal and compiled manually/startup in OnlineIDE
+ - Modified the contract distribution logic to use compiled YPk as the distribution file
+ - When YPK in the public directory is executed in multi-node mode, contract faults can be automatically recovered
+
+* **v0.99** June 22, 2020
+ - Billing for custom contract methods
+ - Add GasExample, Incentives examples
+ - On the client side, “check multipoint result” is implemented, and the method of result return is optimized
+ - Repair Disconnection No permission prompt after reconnection
+
+* **v0.97** May 25, 2020
+ - CPU metering: GAS mechanism
+ - Onlineide.html supports uploading multiple files
+ - Multi-point Execution in UDP Mode [Unordered messages]
+ - Bdwareclient.html, fixes a call example generation prefix error that contains only computational logic
+
+* **v0.95** May 19, 2020
+ - Fixed bug where onlineide.html could not jump to Bdwareclient correctly when the pathname was prefixed.
+ - Fixed a bug where Bdwareclient automatically extracted urls when the pathname was prefixed.
+ - Permissions for contracts are enabled
+ - Increased NodePortal. HTML/OnlineIDE. HTML and bdwareclient. HTML has no right to limit the warning
+
+* **v0.90** May 9, 2020
+ - Changed the way yjs.jar/bdserver.jar is packaged
+ - Updated the sh/update. Sh
+ - OnlineIDE post modification reminder
+ - OnlineIDE tag adaptive width
+ - File interface isolation
+
+
+* **v0.8** April 26, 2020
+ - Improve the documentation interface and optimize the way SDK is provided
+ - Rui Web client, all the data processing in the client and how to render the processed data are from the contract call, to achieve a trusted Web application.
+
+* **v0.78** April 13, 2020
+ - Contract call DAC example
+ - Supports dynamic change of I/O permissions
+ - Supports custom backup (periodic) policies for contract status
+ - Fixed some page bugs
+ - Log Display Optimization
+ - Optimized ledger log presentation
+ - Enable partial access control
+
+
+* **v0.7** March 25, 2020
+ - Support access control for multiple roles
+ - Updated the UI
+
+* **v0.6** February 14, 2020
+ - Optimized communication between contract processes
+ - Try to access a P2P network
+
+* **v0.5** December 10, 2019
+ - Improved three smart contract state record-playback strategies
+ - Supports the simplest multi-point execution algorithm (unsynchronized)
+
+* **v0.45** September 2, 2019
+ - Preliminary implementation of PBFT algorithm
+
+* **v0.4** May 10, 2019
+ - Support the memory dump
+
+* **v0.35** April 26, 2019
+ - Implement a static analysis framework for contracts
+ - Support for publish-subscribe events
+
+* **v0.3** January 8, 2019
+ - Support ledger data access
+ - Contract status on the chain
+
+* **v0.2** October 9, 2018
+ - Support for automatic Python package generation
+ - Contracts can be packaged as YPK
+ - Supports data access, such as files and databases
+
+* **v0.1** August 6, 2018
+ - Defines the syntax for smart contracts
+ - Based on Nashorn engine, smart contract execution is realized
+
+- - -
+
+## Use open source project instructions
+The BDWareContract project stands on the shoulders of many giants, thanks to these open source projects.
+
+The smart contract backend of this project uses the following open source libraries.
+
+| 名称 |Licence type| 说明 |
+| ------ | ---------- | ---- |
+| [Project Nashorn](https://openjdk.java.net/projects/nashorn/) |[GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)| 使用了该项目的编译器,可以将js函数编译为java字节码 |
+| [ASM OW2](https://projects.ow2.org/view/asm/) |[BSD](https://en.wikipedia.org/wiki/BSD_licenses#4-clause_license_(original_%22BSD_License%22)) with attribution| 基于asm的TreeAPI与VisitorAPI实现合约的静态分析框架 |
+| [Netty](https://netty.io/) |[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)| 使用netty作为Http/Websocket的服务端 |
+| [gRPC](https://grpc.io/) |[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)| 使用gRPC与BDWareLedger通讯 |
+| [RocksDB](https://github.com/facebook/rocksdb) |[GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)| 后台数据库 |
+| [ANTLR](https://github.com/antlr/antlr4) |[BSD](https://en.wikipedia.org/wiki/BSD_licenses#4-clause_license_(original_%22BSD_License%22))| 对合约脚本的词法分析与语法分析 |
+| [SM2Java](https://github.com/PopezLotado/SM2Java) |[无](https://github.com/PopezLotado/SM2Java/blob/master/README.md)| 国密SM2 Java语言实现 |
+
+
+
+The smart contract front-end of this project uses the following open source libraries.
+
+| 名称 |Licence type| 说明 |
+| ------ | ---------- | ---- |
+| [Bootstrap](https://getbootstrap.com/) |[MIT](https://github.com/twbs/bootstrap/blob/master/LICENSE)| 前端的排版、样式 |
+| [jQuery](https://jquery.org/) |[MIT](https://jquery.org/license/)| 用于操作DOM的javascript库 |
+| [jQueryUI](https://jqueryui.com/) |[MIT](https://jquery.org/license/)| 前端UI构件库 |
+| [DataTables](https://datatables.net/) |[MIT](https://datatables.net/license/mit)| 表格样式 |
+|[CodeMirror](https://codemirror.net/)| [MIT](https://codemirror.net/LICENSE) | 代码编辑框样式 |
+|[eCharts](https://echarts.apache.org/zh/index.html)| [ApacheV2](https://www.apache.org/licenses/) | 统计图表 |
+| [sm-crypto](https://github.com/JuneAndGreen/sm-crypto) |[MIT](https://github.com/JuneAndGreen/sm-crypto/blob/master/LICENCE_MIT)| 国密SM2 javascript语言实现 |
+
+The document for this project was generated using [Sphinx](https://www.sphinx-doc.org/en/master/), thanks to [readthedocs](https://readthedocs.org/) for providing the document style.
\ No newline at end of file
diff --git a/markdown_trans/markdown_ZRYH/YJSAPI.md b/markdown_trans/markdown_ZRYH/YJSAPI.md
new file mode 100644
index 0000000..cadca32
--- /dev/null
+++ b/markdown_trans/markdown_ZRYH/YJSAPI.md
@@ -0,0 +1,1384 @@
+# YJS SDK
+## YJS Build-in API
+
+### Built-in object Global
+
+
+### The built-in object Requester
+The built-in object will have a value in the Export Function only if the contract callsignatureis verified.
+
+
+### Execute the contract as executeContract
+
+Parameters:
+
+
+``` bash
+action:executeContract;
+contractID:合约的id或名称均可;
+operation:调用合约的方法名;
+arg: 参数;格式为JSON字符串,有action与arg两个字段。
+```
+
+Optional parameters:
+
+
+```bash
+requestID:字符串类型,自行生成,用于查询hash
+```
+
+Example:
+
+
+```javascript
+
+ function testExecutorContract(arg){
+ var ret = JSON.parse(executeContract("ElemeProvider","queryDB",arg));
+ if (ret.status == "Success"){
+ return JSON.parse(ret.result);
+ }else return null;
+ }
+```
+### Subscribe to the event subject Subscribe
+
+parameter
+
+
+``` bash
+contractID:字符串类型 合约id或名称均可。
+event:字符串类型
+handler:方法名,该方法必须接受Event(内含字段topic和content)类型的唯一变量为参数;可以不是export方法
+```
+
+Example:
+
+
+```javascript
+export function init(arg) {
+ YancloudUtil.subscribe("topic", handler);
+ print("Handler: " + handler);
+}
+
+function handler(e) {
+ print("topic: " + e.topic);
+ print("content: " + e.content);
+}
+
+```
+
+### Publish the event pubEvent
+
+parameter
+
+
+``` bash
+topic:字符串类型,发布的事件主题
+content:字符串类型,发布的事件内容
+```
+Example:
+
+
+```javascript
+export function pub1(arg) {
+ YancloudUtil.pubEvent("topic", arg);
+ return "done";
+}
+```
+
+You can also declare an event at the beginning of the contract, so the event name is the event subject, and you can publish the event directly using the event as the method name
+
+
+```javascript
+event topic;
+export function pub2(arg) {
+ topic(arg);
+ return "done";
+}
+```
+
+This is equivalent to `pub1` above.
+
+### Publish pubEventConstraint with semantic event
+
+parameter
+
+
+``` bash
+topic:字符串类型,发布的事件主题
+content:字符串类型,发布的事件内容
+semantics:枚举类型,作为字符串输入,事件语义
+```
+
+Event semantic parameters
++ AT_LEAST_ONCE: at least once. Default semantics
++ AT_MOST_ONCE: at most once
++ ONLY_ONCE: only once
+
+Example:
+
+
+```javascript
+export function pub1(arg) {
+ YancloudUtil.pubEventConstraint("topic", arg, "AT_MOST_ONCE");
+ return "done";
+}
+```
+
+You can also declare the event at the beginning of the contract, and the event name is the event subject. In this case, you can simply use the event as the method name to publish the event according to the declared semantics
+
+
+```javascript
+event AT_MOST_ONCE topic;
+export function pub2(arg) {
+ topic(arg);
+ return "done";
+}
+```
+
+This is equivalent to `pub1` above.
+
+Pre-declared events can be called with the suffix S as a method name regardless of semantics, publishing events of any semantics:
+
+
+```javascript
+event topic;
+export function pub3(arg) {
+ topics(arg, "AT_MOST_ONCE");
+ return "done";
+}
+```
+
+This is equivalent to `pub1, pub2` above.
+
+* When an event is declared without event semantics, the semantics defaults to at least once (AT_LEAST_ONCE). *
+
+### Accessing Resource Files
+
+Run the global. Resources command to load the YPK internal resource file.
+
+#### loadAsInputStream
+
+Parameters:
+
+
+ ```bash
+ path:字符串类型 需要加载文件的地址
+ ```
+Example:
+
+
+ ```javascript
+ var file = Global.Resources.loadAsInputStream("/deleteit.txt");
+ ```
+
+#### loadAsScanner
+
+Parameters:
+
+
+ ```bash
+ path:字符串类型 需要加载文件的地址
+ ```
+
+Example:
+
+
+ ```javascript
+ var scanner = Global.Resources.loadAsScanner("/local.txt");
+ ```
+### YancloudUtil
+
+Some built-in tool methods are provided.
+
+#### getKeyPair
+
+Parameters:
+
+```
+无
+```
+
+Example:
+
+
+```
+var keyPair = YancloudUtil.getKeyPair();
+//该类型为SM2KeyPair类型,
+print(keyPair.getPublicKeyStr());
+print(keyPair.getPrivateKeyStr());
+print(keyPair.toJson());
+```
+
+
+## YJS Build-in Annotation
+
+### @Access
+
+To set whether a contract call requires a signature, there are two types: signed and unsigned. Verified indicates that a signature is required. Others indicate that no signature is required.
+
+
+```
+@Access("verified")
+export function easy(arg){
+ return "true";
+}
+```
+
+### @LogType
+
+The LogType annotation declares the logging type of a contract or function as an argument.
+
+Arg indicates the contract execution parameter recorded in logs. Result indicates the return Result of recording the execution of the contract. Branch Indicates the Branch where contracts are executed.
+
+For example, declare a function with the following LogType annotation
+
+
+```
+@LogType("Arg","Result","Branch")
+export function easy(arg){
+ Global.a = "a";
+ Global.b = "b";
+ if(arg > 0)
+ return Global.a;
+ else
+ return Global.b;
+}
+```
+
+### @LogLocation
+
+This annotation can modify `contract` or `function`. Set the log storage location. Parameter“Dataware” is stored in the ledger and locally, if not, only locally. For example, use the following LogLocation to set the storage location.
+
+In the BaaS platform, you can specify the name of the ledger. The default value of the BaaS platform is default, and `@LogLocation("bdledger:default")` is used. To save to a custom ledger, for example, the“ABC” ledger, use `@LogLocation("bdledger:abc")`
+
+
+```
+@LogLocation("dataware")
+export function easy(arg){
+ Global.a = "a";
+}
+```
+
+
+### @Permission
+This annotation can only modify the permission of tool classes called in the `contract` setting contract, including File, Http, MySQL, MongoDB, RocksDB and other tool classes. If the above utility classes are used in the contract, corresponding authorization fields need to be added in the annotations. By default, only YancloudUtil is provided by YJS. An“Unauthorized utility class” exception is thrown if none is added. The six utility classes are described in detail later in this section.
+
+
+```
+@Permission("Http","File")
+contract HttpPermission {
+ export function main(args){
+ var http=HttpUtil.httpGet(args);
+ var dir="adf/adfas/";
+ var file=FileUtil.getDir(dir);
+ return YancloudUtil.currentTimeMillis();
+ }
+}
+```
+
+### @Description
+This annotation can modify `contract` or `function`. Exported a description of the contract and function can be used to generate an introduction of the exported function in the exported document.
+
+
+```
+@Description("返回数据条目,无需参数")
+export function count(args){
+ var sql = "select count(*) from data;";
+ var conn = getConn();
+ var statement = conn.createStatement();
+ var resultSet = statement.executeQuery(sql);
+ var c = {};
+ resultSet.next();
+ c.count = resultSet.getLong(1);
+ return JSON.stringify(c);
+}
+```
+
+### @Param
+This annotation can modify `function`. Provides examples of parameters to call the function, as well as default parameters to return results in the generation specification document.
+
+```
+@Param({"offset":0,"count":100})
+export function get(args){
+ var offset = args.offset;
+ var count = args.count;
+ ...
+}
+```
+### @MockTemplate
+This annotation can modify `function`. Provides a return mock data template for a function that describes the format of the return value. When invoked in debug mode with this annotation, returns simulated data generated in this format.
+
+
+#### Specifies the supported field types
+
+```
+@integer 整数
+@string 字符串
+@boolean 布尔值
+@date @time @datatime
+@word 单词 @cword 中文单词
+@first @last 英文姓,名
+@cfirst @clast @cname 中文姓,名,全名
+@url @domin @ip @email
+@region @province @city @county 地区,省,市,县
+……
+详细格式可以参考http://mockjs.com/examples.html
+```
+#### Note that the template format is {′ result ’: template}
+
+```json
+//返回一个对象包含如下字段
+@MockTemplate({'result':{'id':'@integer','email':'@email','password':'@string','name':'@name'}})
+//返回
+{"password":"3ZLc","name":"William Young","id":36097783842688,"email":"d.fuunwe@gqnr.to"}"
+
+
+//返回元素个数为1-5个之间的一个数组,数组的每个元素都是上述格式的一个对象
+{'result|1-5':[{'id':'@integer','email':'@email','password':'@string','name':'@name'}]}
+//返回
+[
+ {"password":"dO]wW","name":"Jeffrey Lopez","id":1783453207480410,"email":"a.ckokgxrga@hgiesugi.bb"},
+ {"password":"BQYRL","name":"Brian Moore","id":4310212972071102,"email":"k.lbpxocydrh@msgnjtox.na"},
+ {"password":"Gw1","name":"Susan Jackson","id":7766580783668916,"email":"h.zjgusl@htce.cr"}
+]
+```
+
+```
+@MockTemplate({'result':{'id':'@integer','email':'@email','password':'@string','name':'@name'}})
+export function count(args){
+ var sql = "select count(*) from data;";
+ var conn = getConn();
+ var statement = conn.createStatement();
+ var resultSet = statement.executeQuery(sql);
+ var c = {};
+ resultSet.next();
+ c.count = resultSet.getLong(1);
+ return JSON.stringify(c);
+}
+```
+### @Result
+This annotation can modify `function`. Provides an example of the return result of a function that, with this annotation, will be returned directly when the documentation is generated instead of calling the function with the default arguments.
+
+```
+@Result(666)
+export function count(args){
+ var sql = "select count(*) from data;";
+ var conn = getConn();
+ var statement = conn.createStatement();
+ var resultSet = statement.executeQuery(sql);
+ var c = {};
+ resultSet.next();
+ c.count = resultSet.getLong(1);
+ return JSON.stringify(c);
+}
+```
+### @Cost
+This annotation can modify `function`. Provides the CPU metering function for functions.
+
+```
+@Cost({"countGas":true})
+export function ....
+
+
+```
+
+## IO tools
+
+### An overview of
+
+|Name of the IO tool class|说明|
+|---|---|
+|[FileUtil](./YJSAPI.html#fileutil)| 文件操作相关的类 |
+|[LedgerUtil](./YJSAPI.html#ledgerutil)| 账本操作相关的类 |
+|[HttpUtil](./YJSAPI.html#httputil)| Http接口相关的类 |
+|[DOIPUtil](./YJSAPI.html#doiputil)| DoIP相关的类 |
+|[MySQLUtil](./YJSAPI.html#mysqlutil)| 连接mysql数据库 |
+|[MongoDBUtil](./YJSAPI.html#mongodbutil)| MongoDB连接相关的类 |
+|[RocksDBUtil](./YJSAPI.html#rocksdbutil)| RocksDB(基于本地文件的k-v数据库) |
+|[BDWareTimeSeriesDBUtil](./YJSAPI.html#BDWareTimeSeriesDBUtil)| 基于本地文件的时间序列数据库 |
+
+
+### FileUtil
+A FileUtil object can be introduced using @permission (“File”).
+
+
+```
+@Permission("File")
+contract FileSample {
+...
+}
+```
+
+This object supports the following methods:
+
+#### copyTo
+
+You can copy files and directories. The first parameter is source and the second parameter is destination.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | src |Type String|
+| 2 | dest |Type String|
+
+##### Use the sample
+
+
+```javascript
+var ret = FileUtil.copyTo("./source.txt","./dest.txt");
+```
+
+#### getContent
+
+If the file does not exist, ```undefined``` is returned.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+| --- | --- | --- |
+| 1 | path |Type String|
+
+##### Use the sample
+
+
+```javascript
+var ret = FileUtil.getContent("./source.txt");
+```
+#### getDir
+
+Get the name of the folder where the file resides. Enter a string as a parameter.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | path |Type String|
+
+##### Use the sample
+
+```javascript
+var ret = FileUtil.getDir("./parent/src.txt");
+// ret 为 "./parent/";
+```
+
+#### getFileName
+
+Get the file name. The input parameter is a string.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | path |Type String|
+
+##### Use the sample
+
+
+```javascript
+var ret = FileUtil.getFileName("./parent/src.txt");
+// ret 为 "src.txt"
+```
+
+
+#### openFileAsPrinter
+
+Open the file as PrintStream. The result is of type ```java.io.PrintStream```.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | path |File name. The type is String|
+| 2 | isAppend|The type is Boolean, indicating whether to add to the end of the file|
+
+##### Use the sample
+
+
+```javascript
+var ret = FileUtil.openFileAsPrinter("./parent/src.txt",true);
+ret.println("hello");
+ret.close();
+```
+
+### LedgerUtil
+
+You can use @permission (“Ledger”) to import LedgerUtil objects.
+
+```
+@Permission("Ledger")
+contract LedgerExample{
+...
+}
+```
+
+#### getClient
+
+Gets a connection client, one parameter, of the object type. The returned result is of the LedgerClient type, which is used for subsequent operations such as querying ledbooks.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | address |Contains two fields: IP and port|
+
+##### Use the sample
+
+
+```javascript
+var address = {};
+address.ip = "127.0.0.1";
+address.port = 18091;
+var ledgerClient = LedgerUtil.getClient(address);
+```
+
+#### queryByHash
+
+Queries transactions based on Hash. The returned result is an object containing from, to, type, and data, all of which are Strings. Where data is the byte array parsed according to UTF-8 encoding. If the encoding is not UTF8 when storing the certificate, garbled characters may be returned.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | client |Object obtained through the getClient method|
+| 2 | info |Object type. Two fields, ledger and hash, are strings|
+
+##### Use the sample
+
+
+```javascript
+// ... ledgerClient = LedgerUtil.getClient(...);
+var info = {};
+info.ledger = "bdcontract";
+info.hash = "4d3b75750835092a50085127702669615b602e53";
+var ret = LedgerUtil.queryByHash(ledgerClient,info);
+print(ret.from);
+print(ret.to);
+print(ret.type);
+print(ret.data);
+```
+
+#### sendTransaction
+
+Deposit data.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | client |Object obtained through the getClient method|
+| 2 | info |Object type, with from\to\data three fields, all String type|
+
+##### Use the sample
+
+
+```javascript
+// ... ledgerClient = LedgerUtil.getClient(...);
+var info = {};
+info.ledger = "bdcontract";
+info.from = "b60e8dd61c5d32be8058bb8eb970870f07233155";
+info.to = "b60e8dd61c5d32be8058bb8eb970870f07233155";
+info.data = "hello world";
+var ret = LedgerUtil.sendTransaction(ledgerClient,info);
+//ret为存证的哈希值
+print(ret);
+```
+
+### HttpUtil
+
+We can use @permission (“Http”) to import HttpUtil objects.
+
+```
+@Permission("Http")
+contract HttpExample{
+...
+}
+```
+
+#### createAPIGate
+
+It can be used with the mobile phone’s Yuan state. When the mobile phone is installed with Yuan State and the API interface is installed, it can become the data source.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | ip |The value is a string of IP. The default port number is 6161|
+
+##### Use the sample
+
+
+```javascript
+var ret = HttpUtil.createAPIGate("192.168.4.4");
+ret.get("com.tencent.mm","sendMsg","msg");
+print(ret);
+```
+
+#### createAPIGate
+
+It can be used with the mobile phone’s Yuan state. When the mobile phone is installed with Yuan State and the API interface is installed, it can become the data source.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | ip |The value is a string of type IP|
+| 2 | port |It is a string of type, port|
+
+##### Use the sample
+
+
+```javascript
+var ret = HttpUtil.createAPIGate("192.168.4.4", "6161");
+ret.get("com.tencent.mm","sendMsg","msg");
+print(ret);
+```
+
+#### get
+
+Initiate an Http GET request. The result is of object type and contains the Response and responseCode fields.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | url |A character string, indicating the URL type|
+
+##### Use the sample
+
+
+```javascript
+var ret = HttpUtil.get("https://www.baidu.com");
+print(ret.responseCode);
+print(ret.response);
+```
+
+#### post
+Make an Http POST request. The result is of object type and contains the Response and responseCode fields.
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | args |Object type with URL, headers, and data fields. Args. headers is the object type.|
+
+##### Use the sample
+
+
+```javascript
+var req = {};
+req.url = "https://www.baidu.com";
+req.data = "hello";
+req.header = {};
+req.header.Accept = "application/json";
+req.header["Content-Type"] = "application/json";
+var ret = HttpUtil.post(req);
+print(ret.resposeCode);
+print(ret.response);
+```
+
+### DOIPUtil
+
+The DOIPUtil object can be introduced using @permission (“DOIP”).
+
+```
+@Permission("DOIP")
+contract DOIPExample{
+ ...
+}
+```
+
+#### call
+Call a DO
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 |arg0|The string type identifies the target DO|
+| 2 |arg1|The input parameter is a string|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.call("86.5000.470/do.hello","inputString");
+```
+#### create
+Create a string of type DO to a Repository
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | arg0 |A string that identifies the target Repo|
+| 2 |arg1|Object type, including doID,doBody field|
+
+##### Use the sample
+
+
+```javascript
+var digitalObject = JSON.parse("{\"doID\":\"86.5000.470/do.hello\",\"doBody\":\"hello world\"}");
+var ret = DOIPUtil.create("86.5000.470/repo.localTcpRepo",digitalObject);
+```
+#### delete
+Remove DO from a Repository
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | arg0 |The string type target DO identifier|
+| 2 |arg1|String type target Repo identity|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.delete("86.5000.470/do.hello","86.5000.470/repo.localTcpRepo");
+```
+#### hello
+Gets the DOIP service information of the target Repository
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | arg0 |String type target Repo identity|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.hello("86.5000.470/repo.localTcpRepo");
+```
+#### listOperation
+Gets the DOIP operations supported by the target DO
+
+##### parameter
+
+|The serial number| parameter | 说明 |
+|---|---|---|
+| 1 | arg0 |The string type target DO identifier|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.listOperation("86.5000.470/do.hello");
+```
+#### register
+Register a DO with the LHS and return the assigned identity
+
+##### parameter
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | arg0 |Repo identifier of the string type DO|
+| 2 | arg1 |String type DO Format description string|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.register("86.5000.470/repo.localTcpRepo","String");
+```
+#### reregister
+Example Modify the registration information of the DO on the LHS
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | arg0 |The string type target DO identifier|
+| 2 | arg1 |Repo identifier of the string type DO|
+| 3 |arg2|String type DO Format description string|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.reregister("86.5000.470/do.hello","86.5000.470/repo.localTcpRepo","String");
+```
+#### retrieve
+Get a DO
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | arg0 |The string type target DO identifier|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.retrieve("86.5000.470/do.hello");
+```
+### test
+Tests whether DOIPUtils is available
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | arg0 |String Type Any string|
+
+##### Use the sample
+
+
+```javascript
+var ret = DOIPUtil.test("hello");
+```
+#### update
+Update target DO
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | arg0 |JS object, including doID,doBody field|
+
+##### Use the sample
+
+
+```javascript
+var digitalObject = JSON.parse("{\"doID\":\"86.5000.470/do.hello\",\"doBody\":\"hello world\"}");
+var ret = DOIPUtil.update(digitalObject);
+```
+
+
+
+### SQLUtil
+
+You can use @permission (“SQL”) to import SQLUtil objects. To support MySQL/PostgreSQL/Oracle/GuassDB200 SQL database. The corresponding JDBC JAR needs to be uploaded to the project. For example, to use mysql, upload mysql-connector-java-8.0.24.jar
+
+
+```
+@Permission("SQL")
+oracle MySQLExample{
+...
+}
+```
+
+#### initDriver
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 |driverClass| 字符串类型 |
+
+##### Use the sample
+
+
+```javascript
+ //使用mysql
+ SQLUtil.initDriver("com.mysql.cj.jdbc.Driver");
+ //使用postgresql
+ SQLUtil.initDriver("org.postgresql.Driver");
+ //使用oracle
+ SQLUtil.initDriver("oracle.jdbc.OracleDriver");
+```
+
+#### getConnection
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | URL |String type, JDBC connection|
+| 2 | usrName |The value is a string of user names|
+| 3 | pwd |The value is a string of characters and a password|
+
+
+##### Use the sample
+
+
+```javascript
+var url = "jdbc:mysql://xx.xx.xx:port/tableName";
+var usrName = "xxx";
+var pwd = "xxx";
+//配置好用户名和密码,url格式为ip或域名+端口,中间以”:”隔开。
+var conn = SQLUtil.getConnection(url,usrName,pwd);
+//获取数据库连接
+var sql = "select * from newele.data";
+//创建查询语句
+var statement = conn.createStatement();
+var resultSet = statement.executeQuery(sql);
+var waimailist = [];
+//解析查询结果
+var meta = resultSet.getMetaData();
+for (;resultSet.next();){
+ var line = {};
+ for (var j=1;j<=meta.getColumnCount();j++){
+ line[meta.getColumnName(j)] = resultSet.getString(j);
+ }
+ waimailist.push(line);
+}
+```
+
+In this case, the object returned by the getConnection method is bound to a java.util.Connection object in Java through the reflection mechanism. Therefore, you can view:
+
+To learn how to operate the Mysql database.
+
+
+### MongoDBUtil
+
+The MongoDBUtil object can be introduced using @permission (“MongoDB”).
+
+```
+@Permission("MongoDB")
+contract MongoDBExample{
+...
+}
+```
+
+#### getConnection
+
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | URL |The URL of a database of string type|
+| 2 | port |Port number of an integer type|
+| 3 | dbName |The name of the database of string type|
+| 4 | usrName |The user name of a string database|
+| 5 | pwd |Password of a string database|
+
+
+##### Use the sample
+
+** Note: port is an integer and other parameters are strings **
+
+
+```javascript
+var client = MongoDBUtil.getConnection(url,port,dbName,usrName,pwd);
+//获取数据库对象
+var db = client.getDatabase("yancloud");
+var collection = db.getCollection("containers");
+var iter = collection.find().iterator();
+var ret ="";
+for (;iter.hasNext();){
+ ret+=iter.next().toJson();
+ ret+="\n";
+}
+```
+
+Here, getMongoDBClient object is bound to a com.mongodb.MongoClient object in Java via reflection mechanism. Therefore, you can view:
+
+
+To learn more about how this object works and how it can be used.
+
+### RocksDBUtil
+
+Use @permission (“RocksDB”) to import the RocksDBUtil object.
+
+
+```
+@Permission("RocksDB")
+contract RocksDBSample {
+...
+}
+```
+
+#### loadDB
+
+Load a RocksDB database with loadDB. After the load is loaded, you can perform operations such as GET, delete, and PUT.
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | path |The path where the string database is deployed|
+| 2 | readOnly |The Boolean database is read-only|
+
+##### Use the sample
+
+
+```
+@Permission("RocksDB")
+@Description("这是个使用RocksDB的参考代码")
+contract RocksDBSample{
+ function onCreate(){
+ Global.rocksdb = RocksDBUtil.loadDB("./dbdir/","false");
+ }
+ @Description("示例参数: {\"key\":\"abc\",\"value\":\"def\"}")
+ export function put(arg){
+ arg = JSON.parse(arg);
+ Global.rocksdb.put(arg.key,arg.value);
+ return "success";
+ }
+ @Description("示例参数: \"abc\"}")
+ export function get(arg){
+ return Global.rocksdb.get(arg);
+ return "failed";
+ }
+ @Description("示例参数: \"abc\"")
+ export function deleteKey(arg){
+ return Global.rocksdb.delete(arg);
+ }
+ @Description("遍历KV库,无需参数")
+ export function iter(arg){
+ var iter = Global.rocksdb.newIterator();
+ var obj = undefined;
+ var ret = {
+ };
+ for (iter.seekToFirst();(obj=Global.rocksdb.getNext(iter))!=undefined;){
+ ret[obj.key]=obj.value;
+ }
+ return JSON.stringify(ret)
+ }
+}
+```
+
+### BDWareTimeSeriesDBUtil
+
+Use the sample
+
+
+```
+@Permission("BDWareTimeSeriesDB")
+contract BDWareTimeDBExample{
+ function onCreate(arg){
+ Global.dbutil = BDWareTimeSeriesDBUtil.getConnection();
+ }
+
+ export function put(arg){
+ //第一个参数为表名,第二个参数为要放的value,时间戳自动打。
+ Global.dbutil.put("defaultTable",arg);
+ return "success";
+ }
+ @Param
+ export function getCount(arg){
+ return Global.dbutil.getCount("defaultTable");
+ }
+ @Param(1617254937373)
+ export function queryByStartTime(arg){
+ var startDate = java.lang.Long.valueOf(arg);
+ //查询从开始时刻startDate到最新的数据
+ var list = Global.dbutil.query("defaultTable",startDate);
+ var ret=[];
+ print("DBUtil"+Global.dbutil+" list:"+list+" list.size"+list.size());
+ var i=0;
+ for (i=0;i"+list.get(i));
+ ret.push(list.get(i));
+ }
+ return ret;
+ }
+
+ @Description("示例参数: {\"offset\":1,\"len\":1}")
+ @Param({"offset":1,"len":1})
+ export function queryByOffset(arg){
+ var offsetLen = JSON.parse(arg);
+ //可配合getCount使用,查询第offset至offset+len条数据
+ var list = Global.dbutil.queryByOffset("defaultTable",offsetLen.offset,offsetLen.len);
+ var ret=[];
+ print("DBUtil"+Global.dbutil+" list:"+list+" list.size"+list.size());
+ var i=0;
+ for (i=0;i"+list.get(i));
+ ret.push(list.get(i));
+ }
+ return ret;
+ }
+}
+
+```
+
+
+## Encryption and decryption tools
+
+
+### SM2
+The SM2Util object can be imported using @permission (“SM2”).
+
+
+```
+@Permission("SM2")
+contract SM2Sample {
+...
+}
+```
+
+#### generateKeyPair
+Generate public and private keys.
+
+##### 参数
+No parameters.
+
+##### Use the sample
+
+
+```javascript
+var ret = SM2Util.generateKeyPair();
+print(ret.publicKey);
+print(ret.privateKey);
+return JSON.stringify(ret);
+```
+
+#### sign
+
+The signature.
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | content |The value is a string of characters to be signed|
+| 2 |keyPair| sm2 |
+
+
+##### Use the sample
+
+
+```
+var keypair = SM2Util.generateKeyPair();
+var ret = SM2Util.sign("Hello",keypair);
+print(ret.status);
+//如果status是success
+print(ret.signature);
+//如果status是failed
+print(ret.message);
+```
+
+#### verify
+
+Attestation.
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | content |The value is a string of characters to be verified|
+| 2 | signature | 字符串类型 签名 |
+| 3 |publicKey| 字符串类型 公钥 |
+
+##### Use the sample
+
+
+```javascript
+var ret = SM2Util.verify("Hello","....签名","...公钥");
+// 验证通过时,result为true,status为success
+// 失败时,result为failed,status为failed
+print(ret.status);
+print(ret.result);
+```
+
+#### encrypt
+
+Sm2 encryption.
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | content |The value is a string of characters to be verified|
+| 3 |publicKey| 字符串类型 公钥 |
+
+##### Use the sample
+
+
+```javascript
+var ret = SM2Util.encrypt("Hello","...公钥");
+print(ret);
+```
+#### decrypt
+
+Sm2 decryption.
+
+##### 参数
+
+|The serial number| 参数 | 说明 |
+|---|---|---|
+| 1 | content |The value is a string of characters to be verified|
+| 3 |privateKey| 字符串类型 公钥 |
+
+##### Use the sample
+
+
+```javascript
+var ret = SM2Util.decrypt("Hello","...私钥");
+print(ret);
+```
+
+
+
+## Multithreading Tool class
+
+### AsyncUtil
+
+An AsyncUtil object can be introduced using @permission (“Async”).
+
+```
+@Permission("Async")
+contract AsyncExample{
+ export function longTimeTask(arg){
+ var a = {
+ };
+ a.count = 100;
+ AsyncUtil.postFunction(taskFun,a);
+ }
+ function taskFun(arg){
+ Global.progress = 0;
+ for (var i=0;i
+
+* Number
+
+* Math
+
+* Date
+
+* RegExp
+
+* Error
+
+* JSON
+
+## YJS application framework
+
+### Ypk project composition
+As described earlier, YPK can store static resource files (HTML/CSS /js). Declaring the loadResource method in the smart contract can return static resource files. Based on loadResource, this project provides a YJS application framework. The framework can load and display YPK’s (HTML/CSS /js) files through executeContract.
+
+### Function agreed
+
+| 序号 |Contract function name| 说明 |
+|---|---|---|
+| 1 | needRender |Will not be called, there is this function to indicate the need to render the front end|
+| 2 | getMainFrame |If no parameter is specified, String is returned, indicating the HTML file path of the home page|
+| 3 | loadResource |The value is String and returns the static resource file in the relative path in text format|
+
+### Loading process
+Arguments loaded in the front end are resolved to global.urlparam. The following parameters are included:
+
+```
+//global.urlparam对象示例
+{
+ "contract":"TrustedStorage0899", //表示合约ID或是合约的名称
+
+ "keys":{ //表示当前登录者的密钥对
+ "privateKey":"ff38dd04710...",
+ "publicKey":"04fc228..."
+ },
+ "nodeAddr":"022.node.internetapi.cn:21030" //节点的ip+端口
+}
+```
+
+A WebSocket connection to nodeAddr is established before loading. Once the connection is established, the loading process is divided into two steps: the first step is to log in with the current Publickey-privatekey. For details about the login process, see `合约节点WebSocket接口` After login, the contract information will be obtained. And stored in the global.CurrentContract object.
+
+The second step is to see if there is a needRender method in the global.CurrentContract object, and if there is, it will start loading the front-end code. Execute executeCurrentContract(“getMainFrame”) to obtain the HTML of the page. After append to mainDIV, all the `
+
+
+```
+The example resource file ”/ HTML /hello.js” is as follows:
+
+
+```javascript
+var queryDataFromContract = function(){
+ //第一个参数为函数名,第二个为参数,第三个参数为回调。
+ var data = executeCurrentContract("query","abc",function(argg){
+ $("#resultText")[0].innerHTML = argg.result;
+ });
+}
+```
+
+Reference example:
+
+
+
+
+### YJS-Python
+
+TODO
+
diff --git a/markdown_trans/markdown_ZRYH/conf.py b/markdown_trans/markdown_ZRYH/conf.py
new file mode 100644
index 0000000..27683b6
--- /dev/null
+++ b/markdown_trans/markdown_ZRYH/conf.py
@@ -0,0 +1,100 @@
+# Configuration file for the Sphinx documentation builder.
+#
+# This file only contains a selection of the most common options. For a full
+# list see the documentation:
+# https://www.sphinx-doc.org/en/master/usage/configuration.html
+
+# -- Path setup --------------------------------------------------------------
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+# import os
+# import sys
+# sys.path.insert(0, os.path.abspath('.'))
+
+
+# -- Project information -----------------------------------------------------
+project = '智融云河大数据区块链'
+copyright = '2021, ZRYH'
+author = 'ZRYH'
+
+# The full version, including alpha/beta/rc tags
+release = 'V1.0'
+
+
+# -- General configuration ---------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+
+html_theme = "sphinx_rtd_theme"
+html_logo="_static/imgs/logo.png"
+html_theme_options = {
+'logo_only': True
+}
+
+source_parsers = {
+ '.md': 'recommonmark.parser.CommonMarkParser',
+}
+
+source_suffix = ['.rst', '.md']
+
+# source_suffix = {
+# '.rst': 'restructuredtext',
+# '.txt': 'markdown',
+# '.md': 'markdown'
+# }
+
+extensions = [
+ 'recommonmark',
+ 'sphinx_rtd_theme',
+ 'sphinx_markdown_tables'
+]
+
+html_favicon = "_static/imgs/favicon.ico"
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = 'zh_CN'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This pattern also affects html_static_path and html_extra_path.
+exclude_patterns = []
+
+
+# -- Options for HTML output -------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+#
+#html_theme = 'alabaster'
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+master_doc = 'index'
+
+
+##latex_elements = {
+## 'papersize': 'a4paper',
+ # Additional stuff for the LaTeX preamble.
+## 'preamble': '''
+##\usepackage{xeCJK}
+##\usepackage{indentfirst}
+##\setlength{\parindent}{2em}
+##\setCJKmainfont[BoldFont=STFangsong, ItalicFont=STKaiti]{STSong}
+##\setCJKsansfont[BoldFont=STHeiti]{STXihei}
+##\setCJKmonofont{STFangsong}
+##''',
+##}
\ No newline at end of file
diff --git a/markdown_trans/markdown_ZRYH/index.rst b/markdown_trans/markdown_ZRYH/index.rst
new file mode 100644
index 0000000..e52a1e1
--- /dev/null
+++ b/markdown_trans/markdown_ZRYH/index.rst
@@ -0,0 +1,10 @@
+.. BDContract documentation master file, created bysphinx-quickstart on Mon Nov 25 16:23:38 2019.You can adapt this file completely to your liking, but it should at leastcontain the root `toctree` directive.
+
+Zhirong Yunhe big data blockchain — Smart contract engine document
+===================================================================
+
+.. toctree::
+ :maxdepth: 3
+ :caption: directory
+
+ Introduction.rstInstallTips.rstIDEUsage.rstContractAPI.rstYJSInDepth.rstYJSAPI.rst
\ No newline at end of file