bdcontract-web-ide/doc/markdown_BDWare/ContractAPI.html

6371 lines
339 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BDware SDK &mdash; 北大数瑞大数据区块链 V1.0 文档</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="索引" href="../genindex.html" />
<link rel="search" title="搜索" href="../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html">
<img src="../_static/logo.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="在文档中搜索" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">目录</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Introduction.html">BDContract介绍</a></li>
<li class="toctree-l1"><a class="reference internal" href="../InstallTips.html">BDContract安装说明</a></li>
<li class="toctree-l1"><a class="reference internal" href="../IDEUsage.html">BDContract管理界面</a></li>
<li class="toctree-l1"><a class="reference internal" href="../ContractAPI.html">BDContract SDK</a></li>
<li class="toctree-l1"><a class="reference internal" href="../YJSInDepth.html">YJS语法</a></li>
<li class="toctree-l1"><a class="reference internal" href="../YJSAPI.html">YJS SDK</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">北大数瑞大数据区块链</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>BDware SDK</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/markdown_BDWare/ContractAPI.md.txt" rel="nofollow"> 查看页面源码</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="bdware-sdk">
<h1>BDware SDK<a class="headerlink" href="#bdware-sdk" title="永久链接至标题"></a></h1>
<p>除使用可视化的智能合约在线IDE外,用户还可使用WebSocket接口、Http接口、Bash接口来启动和运行合约.</p>
<hr class="docutils" />
<div class="section" id="websocketsdk">
<h2>WebSocketSDK下载与安装<a class="headerlink" href="#websocketsdk" title="永久链接至标题"></a></h2>
<p>合约SDK提供javascript版本与java版本的客户端。</p>
<p>java客户端的下载链接为:<a class="reference external" href="./_static/BDWareJavaClient.zip">java source</a><a class="reference external" href="./_static/BDWareConfigTool.zip">jar</a>
可参考java_source下的README.md及测试用例。</p>
<p>javascript的下载链接为:<a class="reference external" href="./_static/js/createWS.js">js SDK</a>
内置的SM2加密库链接:<a class="reference external" href="./_static/js/sm2.js">sm2 SDK</a></p>
<div class="section" id="id1">
<h3>建立连接<a class="headerlink" href="#id1" title="永久链接至标题"></a></h3>
<p>建立与节点服务器之间的WebSocket连接.</p>
<div class="section" id="id2">
<h4>参数<a class="headerlink" href="#id2" title="永久链接至标题"></a></h4>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>url</td>
<td>建立WebSocket的服务器URL. 使用<code>http</code>协议时, 前缀为<code>ws://</code>, 如<code>"ws://localhost:1717/SCIDE/SCExecutor"</code>; 使用<code>https</code>协议时, 前缀为<code>wss://</code></td>
</tr>
<tr>
<td>msgHandler</td>
<td>收到服务器WebSocket回复后的回调函数, 用户可自行编写, 也可参考下面提供的示例</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id3">
<h4>请求示例<a class="headerlink" href="#id3" title="永久链接至标题"></a></h4>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">var</span> <span class="nx">url</span> <span class="o">=</span> <span class="s2">&quot;ws://127.0.0.1:1717/SCIDE/SCExecutor&quot;</span><span class="p">;</span><span class="c1">//与Slave节点建立连接</span>
<span class="c1">//var url = &quot;ws://127.0.0.1:1718/NodeCenterWS&quot;;//与Manager节点建立连接</span>
<span class="kd">var</span> <span class="nx">msgHandler</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">m</span><span class="p">){</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&quot;recmsg:&quot;</span><span class="p">);</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">m</span><span class="p">);</span>
<span class="p">};</span>
<span class="kd">var</span> <span class="nx">onOpenHandler</span><span class="o">=</span><span class="kc">undefined</span><span class="p">;</span>
<span class="nx">wssocket</span> <span class="o">=</span> <span class="nx">createWssocket</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span><span class="nx">onOpenHandler</span><span class="p">,</span><span class="nx">msgHandler</span><span class="p">);</span>
</pre></div>
</div>
</div>
<div class="section" id="id4">
<h4>返回结果示例<a class="headerlink" href="#id4" title="永久链接至标题"></a></h4>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="n">receiveSeg</span><span class="p">:</span> <span class="p">[</span><span class="n">Function</span> <span class="p">(</span><span class="n">anonymous</span><span class="p">)],</span>
<span class="n">isSending</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span>
<span class="n">sendList</span><span class="p">:</span> <span class="p">[],</span>
<span class="n">monitor</span><span class="p">:</span> <span class="p">[</span><span class="n">Function</span> <span class="p">(</span><span class="n">anonymous</span><span class="p">)],</span>
<span class="n">send</span><span class="p">:</span> <span class="p">[</span><span class="n">Function</span> <span class="p">(</span><span class="n">anonymous</span><span class="p">)],</span>
<span class="n">sendNextSegment</span><span class="p">:</span> <span class="p">[</span><span class="n">Function</span> <span class="p">(</span><span class="n">anonymous</span><span class="p">)],</span>
<span class="n">isOpen</span><span class="p">:</span> <span class="p">[</span><span class="n">Function</span> <span class="p">(</span><span class="n">anonymous</span><span class="p">)]</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="ping">
<h3>ping<a class="headerlink" href="#ping" title="永久链接至标题"></a></h3>
<p><code class="docutils literal notranslate"><span class="pre">ping</span></code>服务器测试</p>
<div class="section" id="id5">
<h4>参数<a class="headerlink" href="#id5" title="永久链接至标题"></a></h4>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>ping</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id6">
<h4>请求示例<a class="headerlink" href="#id6" title="永久链接至标题"></a></h4>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">request</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">request</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;ping&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id7">
<h4>返回结果示例<a class="headerlink" href="#id7" title="永久链接至标题"></a></h4>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="s2">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;pong&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id8">
<h3>登录<a class="headerlink" href="#id8" title="永久链接至标题"></a></h3>
<p>使用Websocket接口调用需要权限的接口时不论是连接CenterPortal还是NodePortal必须先<strong>登录</strong>
登录的流程有3步</p>
<ul class="simple">
<li><p>客户端向服务端建立连接,连接建立完成后发送{“action”:”getSessionID”}可在onOpenHandler中实现</p></li>
<li><p>服务端收到请求后,会向客户端返回类似{“action”:”onGetSessionID”,”session”:”-4959947809200104526_session”}的结果</p></li>
<li><p>客户端收到onGetSessionID后,会使用本地的公私钥对sessionID进行签名并调用login接口</p></li>
<li><p>服务端会返回onLogin的结果data字段返回的是该公钥对应的角色。</p></li>
</ul>
</div>
</div>
<hr class="docutils" />
<div class="section" id="id9">
<h2>用户角色划分<a class="headerlink" href="#id9" title="永久链接至标题"></a></h2>
<div class="section" id="id10">
<h3>合约节点的角色划分<a class="headerlink" href="#id10" title="永久链接至标题"></a></h3>
<p>在合约节点(NodePortal.html)中分为NodeManager/ContractProvider/ContractInstanceManager/ContractUser四类角色。</p>
<table border="1" class="docutils">
<thead>
<tr>
<th>角色</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>NodeManager</td>
<td>该节点的管理者,拥有用户管理、节点配置等权限</td>
</tr>
<tr>
<td>ContractProvider</td>
<td>拥有编辑合约、开发合约代码、运行调试等权限</td>
</tr>
<tr>
<td>ContractInstanceManager</td>
<td>拥有启、停合约实例、配置合约实例IO等权限</td>
</tr>
<tr>
<td>ContractUser</td>
<td>拥有查看合约实例列表、调用合约等权限</td>
</tr>
<tr>
<td>Anonymous</td>
<td>匿名用户可以调用合约可以申请成为ContractProvider/InstanceManager等角色</td>
</tr>
</tbody>
</table><table border="1" class="docutils">
<thead>
<tr>
<th>接口</th>
<th>说明</th>
<th>角色</th>
</tr>
</thead>
<tbody>
<tr>
<td>changeDumpPeriod</td>
<td>设置备份周期</td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>createLedger</td>
<td>创建账本</td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>dumpContract</td>
<td>手动备份</td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>deleteMemoryFile</td>
<td>删除镜像</td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>forkContract</td>
<td>迁移合约</td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>getDumpPeriod</td>
<td>获取备份周期</td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>killAllContract</td>
<td>停止全部实例</td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>killContractProcess</td>
<td>停止某一实例</td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>listMemoryFiles</td>
<td>列取某一实例的镜像</td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>loadMemory</td>
<td>加载镜像</td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>queryContractInstanceDOI</td>
<td>查询合约实例信息</td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>rebuildHashIndex</td>
<td></td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>setPermission</td>
<td></td>
<td>ContractProvider;ContractInstanceManager;</td>
</tr>
<tr>
<td>startContract</td>
<td>启动合约</td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>startContractBatched</td>
<td>废弃</td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>startContractByYPK</td>
<td>启动合约</td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>startContractInTempZips</td>
<td>废弃</td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>startContractP2PTrustfully</td>
<td>启动合约(集群模式)</td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>updateContract</td>
<td></td>
<td>ContractInstanceManager;</td>
</tr>
<tr>
<td>connectTo</td>
<td>连接合约实例输出流</td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>countContractLogGroupByAction</td>
<td></td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>countContractLogGroupByCategory</td>
<td></td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>getLastLog</td>
<td>查询日志</td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>getLog</td>
<td>查询日志</td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>getLogSize</td>
<td>查询日志</td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>listAllContractProcess</td>
<td></td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>listContractProcess</td>
<td>查询合约实例列表</td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>listLeakContractProcess</td>
<td></td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>queryContractLogByDate</td>
<td></td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>queryContractLogByKey</td>
<td></td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>queryContractLogByOffset</td>
<td></td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>queryContractLogDetail</td>
<td></td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>queryContractLogSize</td>
<td></td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>queryNodeLogByDate</td>
<td></td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>queryNodeLogByOffset</td>
<td></td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>queryNodeLogSize</td>
<td></td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>rebuildContractLogIndex</td>
<td></td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>rebuildNodeLogIndex</td>
<td></td>
<td>ContractInstanceManager;ContractUser;</td>
</tr>
<tr>
<td>changePublic</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>createFile</td>
<td>新建文件</td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>deleteFile</td>
<td>删除文件</td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>distributeContract</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>downloadContract</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>downloadContractFromOtherHost</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateAnnotationSample</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateAppDataAnalysis</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateAppDataSource</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateBDCoinEventProject</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateBDCoinProject</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateBiddingExample</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateCSVProject</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateContractExecutor</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateDAC4BDOA</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateDAC4BDOA_persist</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateDACSample</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateEmptyProject</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateEventPublisher</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateEventSubscriber</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateGasExample</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateHello</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateHttpExample</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateIncentives</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateJSONExample</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateLedgerExample</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateLedgerProject</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateLicenceManager</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateLoggerExample</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateMySQLExample</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateMySQLProject</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generatePostgreSQLSample</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateReadme</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateRenderSample</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateRocksDBSample</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateSM2Example</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateStaticResource</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generateTFLinux</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>generategenerateTFMac</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>getProject</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>getTemplateList</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>importContractInstanceCodeByDOI</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>listFile</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>listProject</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>listProjectPermission</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>listProjects</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>renameFile</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>saveFile</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>startContractAsDebug</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>uploadFile</td>
<td></td>
<td>ContractProvider;</td>
</tr>
<tr>
<td>compile</td>
<td></td>
<td>ContractProvider;ContractInstanceManager;</td>
</tr>
<tr>
<td>evaluates</td>
<td></td>
<td>ContractProvider;ContractInstanceManager;</td>
</tr>
<tr>
<td>executeContractP2PTrustfully</td>
<td></td>
<td>ContractProvider;ContractInstanceManager;</td>
</tr>
<tr>
<td>getCodeByID</td>
<td>查询代码</td>
<td>ContractProvider;ContractInstanceManager;</td>
</tr>
<tr>
<td>getControlFlowByFileName</td>
<td></td>
<td>ContractProvider;ContractInstanceManager;</td>
</tr>
<tr>
<td>getGasValue</td>
<td></td>
<td>ContractProvider;ContractInstanceManager;</td>
</tr>
<tr>
<td>listCompiledFiles</td>
<td></td>
<td>ContractProvider;ContractInstanceManager;</td>
</tr>
<tr>
<td>queryContractResourceInfo</td>
<td></td>
<td>ContractProvider;ContractInstanceManager;</td>
</tr>
<tr>
<td>queryFreeResourceInfo</td>
<td></td>
<td>ContractProvider;ContractInstanceManager;</td>
</tr>
<tr>
<td>staticVerifyContract</td>
<td></td>
<td>ContractProvider;ContractInstanceManager;</td>
</tr>
<tr>
<td>writeDyjs</td>
<td></td>
<td>ContractProvider;ContractInstanceManager;</td>
</tr>
<tr>
<td>authNodeRole</td>
<td>授权角色</td>
<td>NodeManager;</td>
</tr>
<tr>
<td>changeBDledger</td>
<td>修改账本配置</td>
<td>NodeManager;</td>
</tr>
<tr>
<td>changeIpPort</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>changeNodeCenter</td>
<td>修改集群地址</td>
<td>NodeManager;</td>
</tr>
<tr>
<td>changeNodeName</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>changeIpPort</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>changeDOIPConfig</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>changeYJSPath</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>countNodeLogGroupByCategory</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>countRole</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>deleteRole</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>downloadUUID</td>
<td>废弃</td>
<td>NodeManager;</td>
</tr>
<tr>
<td>getEncodedUUID</td>
<td>废弃</td>
<td>NodeManager;</td>
</tr>
<tr>
<td>getPeerID</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>listAllAuthRole</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>listNodeInfos</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>listUnAuthRole</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>loadConfig</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>loadNodeConfig</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>lockEdit</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>unlockEdit</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>updateConfig</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>uploadLicence</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>applyNodeRole</td>
<td>申请角色</td>
<td>任意角色</td>
</tr>
<tr>
<td>executeContract</td>
<td>调用合约</td>
<td>任意角色</td>
</tr>
<tr>
<td>getConnCount</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>getHashAbstractLocally</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>getHashLocally</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>getNodeRoleDeprecated</td>
<td>查询当前角色</td>
<td>任意角色</td>
</tr>
<tr>
<td>getSessionID</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>listAdapters</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>listTheContractProcess</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>login</td>
<td>登录</td>
<td>任意角色</td>
</tr>
<tr>
<td>longStr</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>ping</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>queryDataByHash</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>queryDataByHashLocally</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>queryHashByOffset</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>queryHashByRequestID</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>queryHashSize</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>queryLedgers</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>queryRole</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>queryTransactionByHash</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>sendTransaction</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>setLogStage</td>
<td></td>
<td>任意角色</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id11">
<h3>合约准入中心角色划分<a class="headerlink" href="#id11" title="永久链接至标题"></a></h3>
<p>共分为两类角色CenterManager和NodeManager。其中CenterManager拥有对集群设置的权限。
NodeManager可以增加、删除节点等操作。</p>
<table border="1" class="docutils">
<thead>
<tr>
<th>接口</th>
<th>说明</th>
<th>角色</th>
</tr>
</thead>
<tbody>
<tr>
<td>authNodeManager</td>
<td></td>
<td>CenterManager;</td>
</tr>
<tr>
<td>countActionLogByCategory</td>
<td></td>
<td>CenterManager;</td>
</tr>
<tr>
<td>countCMLogByCategory</td>
<td></td>
<td>CenterManager;</td>
</tr>
<tr>
<td>delete</td>
<td></td>
<td>CenterManager;</td>
</tr>
<tr>
<td>listAllUsers</td>
<td></td>
<td>CenterManager;</td>
</tr>
<tr>
<td>listApplyList</td>
<td></td>
<td>CenterManager;</td>
</tr>
<tr>
<td>listLicence</td>
<td></td>
<td>CenterManager;</td>
</tr>
<tr>
<td>queryActionLog</td>
<td></td>
<td>CenterManager;</td>
</tr>
<tr>
<td>queryCMLog</td>
<td></td>
<td>CenterManager;</td>
</tr>
<tr>
<td>updateLicence</td>
<td></td>
<td>CenterManager;</td>
</tr>
<tr>
<td>addNode</td>
<td></td>
<td>CenterManager;NodeManager;</td>
</tr>
<tr>
<td>changeNCFile</td>
<td></td>
<td>CenterManager;NodeManager;</td>
</tr>
<tr>
<td>changeOtherNC</td>
<td></td>
<td>CenterManager;NodeManager;</td>
</tr>
<tr>
<td>createTrustUnit</td>
<td>创建可信集群</td>
<td>CenterManager;NodeManager;</td>
</tr>
<tr>
<td>deleteTrustUnit</td>
<td></td>
<td>CenterManager;NodeManager;</td>
</tr>
<tr>
<td>getNCFile</td>
<td></td>
<td>CenterManager;NodeManager;</td>
</tr>
<tr>
<td>getNodeTrustUnits</td>
<td></td>
<td>CenterManager;NodeManager;</td>
</tr>
<tr>
<td>getOtherNC</td>
<td></td>
<td>CenterManager;NodeManager;</td>
</tr>
<tr>
<td>listContractProcess</td>
<td></td>
<td>CenterManager;NodeManager;</td>
</tr>
<tr>
<td>listMultiPointContractProcess</td>
<td></td>
<td>CenterManager;NodeManager;</td>
</tr>
<tr>
<td>listNodes</td>
<td></td>
<td>CenterManager;NodeManager;</td>
</tr>
<tr>
<td>listTrustUnits</td>
<td></td>
<td>CenterManager;NodeManager;</td>
</tr>
<tr>
<td>queryUserStat</td>
<td></td>
<td>CenterManager;NodeManager;</td>
</tr>
<tr>
<td>stopMultiPointContractProcess</td>
<td></td>
<td>CenterManager;NodeManager;</td>
</tr>
<tr>
<td>applyRole</td>
<td></td>
<td>NodeManager;</td>
</tr>
<tr>
<td>executeContract</td>
<td>调用合约</td>
<td>任意角色</td>
</tr>
<tr>
<td>executeContractTrustfully</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>getManagerPubkey</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>getNodeRole</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>getNodeSessionID</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>getRole</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>getSessionID</td>
<td></td>
<td>任意角色</td>
</tr>
<tr>
<td>login</td>
<td>登录</td>
<td>任意角色</td>
</tr>
</tbody>
</table></div>
</div>
<hr class="docutils" />
<div class="section" id="http">
<h2>合约节点Http接口<a class="headerlink" href="#http" title="永久链接至标题"></a></h2>
<p><code class="docutils literal notranslate"><span class="pre">http://xxx.xxx.xxx.xxx:1717/SCIDE/SCManager</span></code>为提供Http接口服务的服务器 URL(<code class="docutils literal notranslate"><span class="pre">xxx.xxx.xxx.xxx:1717</span></code>为BDWare SCIDE运行的IP和端口号) , 用户可通过在URL后附加字段参数, 完成以下功能.
<code class="docutils literal notranslate"><span class="pre">http://xxx.xxx.xxx.xxx:18000/SCIDE/SCManager</span></code> 为提供Http接口服务的服务器</p>
<p>URL<code class="docutils literal notranslate"><span class="pre">xxx.xxx.xxx.xxx:1717</span></code> 为BDWare SCIDE运行的IP和端口号用户可通过在URL后附加字段参数完成以下功能</p>
<div class="section" id="id12">
<h3>用户管理类<a class="headerlink" href="#id12" title="永久链接至标题"></a></h3>
<div class="section" id="id13">
<h4>ping<a class="headerlink" href="#id13" title="永久链接至标题"></a></h4>
<p><code class="docutils literal notranslate"><span class="pre">ping</span></code>服务器测试</p>
<div class="section" id="id14">
<h5>方法<a class="headerlink" href="#id14" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id15">
<h5>参数<a class="headerlink" href="#id15" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>ping</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id16">
<h5>请求示例<a class="headerlink" href="#id16" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=ping
</pre></div>
</div>
</div>
<div class="section" id="id17">
<h5>返回结果示例<a class="headerlink" href="#id17" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;pong&quot;</span><span class="p">}</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="id18">
<h3>合约代码管理类<a class="headerlink" href="#id18" title="永久链接至标题"></a></h3>
<div class="section" id="id19">
<h4>下载合约项目<a class="headerlink" href="#id19" title="永久链接至标题"></a></h4>
<div class="section" id="id20">
<h5>方法<a class="headerlink" href="#id20" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id21">
<h5>参数<a class="headerlink" href="#id21" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>downloadContract</td>
</tr>
<tr>
<td>projectName</td>
<td>合约项目名</td>
</tr>
<tr>
<td>isPrivate</td>
<td>是否在私有目录下</td>
</tr>
<tr>
<td>pubKey</td>
<td>用户公钥</td>
</tr>
<tr>
<td>timestamp</td>
<td>时间戳</td>
</tr>
<tr>
<td>sign</td>
<td>签名</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id22">
<h5>请求示例<a class="headerlink" href="#id22" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=downloadContract&amp;projectName=BDCoin&amp;isPrivate=false&amp;pubKey=0480204f4ef341359a5f64fcb11baf9ca2e6706ac20cba3
8b7ff78aa631e97346086e2d48fac2ba7f5b75ccbd19ebf495c0e6f9934d69e3b083da4d42e46c991e0c2ea8bb45d59f31f46d0ec700fb01f2fdd275
</pre></div>
</div>
</div>
</div>
<div class="section" id="id23">
<h4>上传文件<a class="headerlink" href="#id23" title="永久链接至标题"></a></h4>
<div class="section" id="id24">
<h5>方法<a class="headerlink" href="#id24" title="永久链接至标题"></a></h5>
<p>POST</p>
</div>
<div class="section" id="id25">
<h5>参数<a class="headerlink" href="#id25" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>path</td>
<td>文件上传路径</td>
</tr>
<tr>
<td>fileName</td>
<td>待上传文件名</td>
</tr>
<tr>
<td>isPrivate</td>
<td>是否在私有目录下</td>
</tr>
<tr>
<td>order</td>
<td>第几个数据包</td>
</tr>
<tr>
<td>count</td>
<td>数据包总数</td>
</tr>
<tr>
<td>timestamp</td>
<td>时间戳</td>
</tr>
<tr>
<td>sign</td>
<td>签名</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id26">
<h5>请求示例<a class="headerlink" href="#id26" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/Upload?path=/TEST/TEST.yjs&amp;fileName=WechatIMG15.jpeg&amp;isPrivate=true&amp;order=0&amp;count=3&amp;pubKey=0480204f4ef341359a5f64fcb11baf9ca2e6706ac20cba36ca83066870cf2c1d5de6df67e24e68dde7934af9b31d94a6084281db3d32d5ce42ab8f75bf799aca05&amp;sign=dd867469f5adf9986e4ea6215febeae50c7d4c3836d002cf8c17050dfca031fd2595ffa8646e9eeae53150d2cbaea690e27d818eaf5cea3632ee1b69c3307a4b631e97346086e2d48fac2ba7f5b75ccbd19ebf495c0e6f9934d69e3b083da4d42e46c991e0c2ea8bb45d59f31f46d0ec700fb01f2fdd275
</pre></div>
</div>
</div>
<div class="section" id="id27">
<h5>返回结果示例<a class="headerlink" href="#id27" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">&quot;status&quot;</span><span class="p">:</span><span class="s2">&quot;true&quot;</span><span class="p">,</span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;success&quot;</span><span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id28">
<h4>保存合约脚本<a class="headerlink" href="#id28" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 向服务器本地保存合约脚本内容.</p>
<div class="section" id="id29">
<h5>方法<a class="headerlink" href="#id29" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id30">
<h5>参数<a class="headerlink" href="#id30" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>writeDyjs</td>
</tr>
<tr>
<td>target</td>
<td>合约脚本文件名</td>
</tr>
<tr>
<td>content</td>
<td>合约脚本内容</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id31">
<h5>请求示例<a class="headerlink" href="#id31" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=writeDyjs&amp;target=testyjs.yjs&amp;content=contract%20shortc%7B%0A%09export%20function%20main(arg)%7B%0A%09%09return%20arg.length%3B%09%0A%09%7D%0A%7D
</pre></div>
</div>
</div>
<div class="section" id="id32">
<h5>返回结果示例<a class="headerlink" href="#id32" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onWriteDyjs&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;success&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>后续用户可启动并调用该合约.</p>
</div>
</div>
</div>
<div class="section" id="id33">
<h3>合约实例管理类<a class="headerlink" href="#id33" title="永久链接至标题"></a></h3>
<div class="section" id="id34">
<h4>查询合约进程<a class="headerlink" href="#id34" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 查询服务器上已经启动的所有合约进程.</p>
<div class="section" id="id35">
<h5>方法<a class="headerlink" href="#id35" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id36">
<h5>参数<a class="headerlink" href="#id36" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>listContractProcess</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id37">
<h5>请求示例<a class="headerlink" href="#id37" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=listContractProcess
</pre></div>
</div>
</div>
<div class="section" id="id38">
<h5>返回结果示例<a class="headerlink" href="#id38" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onListContractProcess&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;[\n {\n \&quot;id\&quot;: \&quot;-562752842\&quot;,\n \&quot;name\&quot;: \&quot;shortc\&quot;,\n \&quot;port\&quot;: \&quot;1626\&quot;,\n \&quot;times\&quot;: \&quot;0 \&quot;,\n \&quot;traffic\&quot;: \&quot;32.00 B\&quot;,\n \&quot;storage\&quot;: \&quot;0.00 B\&quot;,\n \&quot;contractStatus\&quot;: \&quot;Ready\&quot;\n }\n]&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id39">
<h4>启动合约<a class="headerlink" href="#id39" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 启动某个合约.</p>
<div class="section" id="id40">
<h5>方法<a class="headerlink" href="#id40" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id41">
<h5>参数<a class="headerlink" href="#id41" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>startContract</td>
</tr>
<tr>
<td>script</td>
<td>合约脚本内容, 需进行进行URIEncode</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id42">
<h5>请求示例<a class="headerlink" href="#id42" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=startContract&amp;script=contract%20shortc%7B%0A%09export%20function%20main(arg)%7B%0A%09%09return%20arg.length%3B%09%0A%09%7D%0A%7D
</pre></div>
</div>
</div>
<div class="section" id="id43">
<h5>返回结果示例<a class="headerlink" href="#id43" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;{\&quot;status\&quot;:\&quot;Success\&quot;,\&quot;result\&quot;:\&quot;\&quot;}&quot;</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onStartContract&quot;</span><span class="p">,</span>
<span class="nt">&quot;cid&quot;</span><span class="p">:</span> <span class="s2">&quot;-562752842&quot;</span><span class="p">,</span>
<span class="nt">&quot;executeTime&quot;</span><span class="p">:</span> <span class="mi">1187</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id44">
<h4>调用合约<a class="headerlink" href="#id44" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 调用某个合约.</p>
<div class="section" id="id45">
<h5>方法<a class="headerlink" href="#id45" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id46">
<h5>参数<a class="headerlink" href="#id46" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>executeContract</td>
</tr>
<tr>
<td>contractID</td>
<td>合约ID</td>
</tr>
<tr>
<td>withDynamicAnalysis</td>
<td>true/false 是否进行动态分析</td>
</tr>
<tr>
<td>operation</td>
<td>调用合约的方法名</td>
</tr>
<tr>
<td>arg</td>
<td>调用合约的参数</td>
</tr>
<tr>
<td>pubkey</td>
<td>可选,调用者公钥</td>
</tr>
<tr>
<td>signature</td>
<td>可选,签名</td>
</tr>
</tbody>
</table><p>其中pubkey为sm2的公钥计算方式如下</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="c1">//sm2 可从sm2.js中加载获得。</span>
<span class="nx">signature</span> <span class="o">=</span> <span class="nx">sm2</span><span class="p">.</span><span class="nx">doSignature</span><span class="p">(</span><span class="nx">contractID</span><span class="o">+</span><span class="s2">&quot;|&quot;</span><span class="o">+</span><span class="nx">operation</span><span class="o">+</span><span class="s2">&quot;|&quot;</span><span class="o">+</span><span class="nx">arg</span><span class="o">+</span><span class="s2">&quot;|&quot;</span><span class="o">+</span><span class="nx">pubkey</span><span class="p">,</span><span class="nx">privateKey</span><span class="p">);</span>
</pre></div>
</div>
</div>
<div class="section" id="id47">
<h5>请求示例<a class="headerlink" href="#id47" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=executeContract&amp;contractID=-620602333&amp;operation=main&amp;arg=hhh
</pre></div>
</div>
</div>
<div class="section" id="id48">
<h5>返回结果示例<a class="headerlink" href="#id48" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;{\&quot;status\&quot;:\&quot;Success\&quot;,\&quot;result\&quot;:\&quot;3\&quot;}&quot;</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onExecuteResult&quot;</span><span class="p">,</span>
<span class="nt">&quot;executeTime&quot;</span><span class="p">:</span> <span class="s2">&quot;13&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id49">
<h4>批量启动合约<a class="headerlink" href="#id49" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 启动服务器中保存有合约脚本的一系列合约.</p>
<div class="section" id="id50">
<h5>方法<a class="headerlink" href="#id50" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id51">
<h5>参数<a class="headerlink" href="#id51" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>startContractBatched</td>
</tr>
<tr>
<td>fileList</td>
<td>合约脚本文件列表(Json数组,URLEncode)</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id52">
<h5>请求示例<a class="headerlink" href="#id52" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=startContractBatched&amp;fileList=%5B%20%22EventPuber.yjs%22%2C%20%22EventSuber.yjs%22%2C%20%22LicenceManager.yjs%22%20%5D
</pre></div>
</div>
</div>
<div class="section" id="id53">
<h5>返回结果示例<a class="headerlink" href="#id53" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">&quot;EventPuber.yjs&quot;</span><span class="p">:</span><span class="s2">&quot;{\&quot;status\&quot;:\&quot;Success\&quot;,\&quot;result\&quot;:\&quot;\&quot;}&quot;</span><span class="p">,</span><span class="nt">&quot;LicenceManager.yjs&quot;</span><span class="p">:</span><span class="s2">&quot;{\&quot;status\&quot;:\&quot;Success\&quot;,\&quot;result\&quot;:\&quot;\&quot;}&quot;</span><span class="p">,</span><span class="nt">&quot;EventSuber.yjs&quot;</span><span class="p">:</span><span class="s2">&quot;{\&quot;status\&quot;:\&quot;Success\&quot;,\&quot;result\&quot;:\&quot;\&quot;}&quot;</span><span class="p">,</span><span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onStartContract&quot;</span><span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="zip">
<h4>启动Zip包合约<a class="headerlink" href="#zip" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 启动服务器中包装为<code class="docutils literal notranslate"><span class="pre">zip</span></code>格式的合约.</p>
<div class="section" id="id54">
<h5>方法<a class="headerlink" href="#id54" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id55">
<h5>参数<a class="headerlink" href="#id55" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>startContractInTempZips</td>
</tr>
<tr>
<td>owner</td>
<td>调用者公钥</td>
</tr>
<tr>
<td>path</td>
<td>zip合约(路径及)文件名</td>
</tr>
<tr>
<td>signature</td>
<td>调用者签名</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id56">
<h5>请求示例<a class="headerlink" href="#id56" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=startContractInTempZips&amp;owner=0475c7b061f32477c1e228dd04143daf58a5574dc3f6b02bd2857cc794eb92bfe98606dc314049e77fd8714f57a5a481cb470cc759e688fe60d40fc87092165e55&amp;path=traceTest.zip&amp;signature=650d3cad50509682937c253d84da99230e8ea1bcfb9b10f6d18f8888c7c4b6b4%2C72231a6daa078a3ce657c0a2ed38251b7db56cf725beaf86780d4c240b19ccc2
</pre></div>
</div>
</div>
<div class="section" id="id57">
<h5>返回结果示例<a class="headerlink" href="#id57" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;verify failed&quot;</span><span class="p">,</span><span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onStartContract&quot;</span><span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id58">
<h4>获取合约代码<a class="headerlink" href="#id58" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 获取某个ID合约的脚本代码.</p>
<div class="section" id="id59">
<h5>方法<a class="headerlink" href="#id59" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id60">
<h5>参数<a class="headerlink" href="#id60" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>getCodeByID</td>
</tr>
<tr>
<td>contractID</td>
<td>合约ID</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id61">
<h5>请求示例<a class="headerlink" href="#id61" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=getCodeByID&amp;contractID=814046805
</pre></div>
</div>
</div>
<div class="section" id="id62">
<h5>返回结果示例<a class="headerlink" href="#id62" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">&quot;status&quot;</span><span class="p">:</span><span class="kc">true</span><span class="p">,</span><span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onCodeResult&quot;</span><span class="p">,</span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;@LogType(\&quot;Arg\&quot;)\ncontract EventSuberAtCHQ{\n\t\n \texport function init(arg){\n\t\tvar result \u003d YancloudUtil.subscribe(\&quot;EventPuberAt3966\&quot;,\&quot;abc\&quot;,handler);\n // print(\&quot;Handler:\&quot;+handler);\n \t \n \t\treturn result;\n\t}\n \texport function handler(e){\n var ret \u003d \&quot;ReceiveEvent:\&quot;;\n\t\tret+\u003d\&quot;\\n\&quot;;\n \tprint(ret);\n \tret+\u003dYancloudUtil.executeContract(\&quot;EventPuberAt3966\&quot;,\&quot;notify\&quot;,\&quot;success\&quot;);\n \tprint(ret);\n return ret;\n\t}\n}\n&quot;</span><span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id63">
<h4>保存合约状态<a class="headerlink" href="#id63" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 获取节点服务器的状态转移日志.</p>
<div class="section" id="id64">
<h5>方法<a class="headerlink" href="#id64" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id65">
<h5>参数<a class="headerlink" href="#id65" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>dumpContract</td>
</tr>
<tr>
<td>contractID</td>
<td>合约ID 或 合约Name=</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id66">
<h5>请求示例<a class="headerlink" href="#id66" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/SCManager?action=dumpContract&amp;contractID=counter&amp;pubKey=040461417efe01423ba603f71c689387e8aac4aa2a6f7cddfaf22c1d22c40222f7669a054e7ec2e8533b04ccbc7a0e6655ac4ae4acef81a2b1822ec6cabcaf6c1f&amp;sign=3045022004ffd1346b936196f5b13953d2f3e11823a0d0a2d2f6fecea258cef8e20d99c0022100bbc219ed1f56799ba28a763b9e9e47063164e7ceecfbfa752de42f44551ffb83
</pre></div>
</div>
</div>
<div class="section" id="id67">
<h5>返回结果示例<a class="headerlink" href="#id67" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;success&quot;</span><span class="p">,</span><span class="nt">&quot;size&quot;</span><span class="p">:</span><span class="s2">&quot;3.76 KB&quot;</span><span class="p">,</span><span class="nt">&quot;time&quot;</span><span class="p">:</span><span class="s2">&quot;0.03s&quot;</span><span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id68">
<h4>获取合约内存文件列表<a class="headerlink" href="#id68" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 获取某子文件夹中的所有内存文件列表.</p>
<div class="section" id="id69">
<h5>方法<a class="headerlink" href="#id69" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id70">
<h5>参数<a class="headerlink" href="#id70" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>listMemoryFiles</td>
</tr>
<tr>
<td>contractID</td>
<td>合约Id 或 合约Name</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id71">
<h5>请求示例<a class="headerlink" href="#id71" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/SCManager?action=listMemoryFiles&amp;contractID=-247468535&amp;pubKey=040461417efe01423ba603f71c689387e8aac4aa2a6f7cddfaf22c1d22c40222f7669a054e7ec2e8533b04ccbc7a0e6655ac4ae4acef81a2b1822ec6cabcaf6c1f&amp;sign=3045022075c7268e888b0efdef167a3f4dfc6589d771c6be41b3c0a1dc12d057e811f395022100d44f460d0cc3643e169ef08231e75a1e895646c53295c0ef1d15c3b462a53d6b
</pre></div>
</div>
</div>
<div class="section" id="id72">
<h5>返回结果示例<a class="headerlink" href="#id72" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">&quot;data&quot;</span><span class="p">:[</span><span class="s2">&quot;2020-09-23.18:40:38&quot;</span><span class="p">,</span><span class="s2">&quot;2020-09-24.16:03:41&quot;</span><span class="p">,</span><span class="s2">&quot;2020-09-24.16:58:39&quot;</span><span class="p">,</span><span class="s2">&quot;2020-09-24.18:25:47&quot;</span><span class="p">,</span><span class="s2">&quot;2020-09-24.18:32:37&quot;</span><span class="p">,</span><span class="s2">&quot;2020-09-24.20:54:41&quot;</span><span class="p">,</span><span class="s2">&quot;2020-09-24.20:57:39&quot;</span><span class="p">,</span><span class="s2">&quot;2020-09-24.21:31:07&quot;</span><span class="p">,</span><span class="s2">&quot;2020-09-24.21:32:09&quot;</span><span class="p">,</span><span class="s2">&quot;2020-09-24.21:36:11&quot;</span><span class="p">,</span><span class="s2">&quot;2020-09-28.15:29:15&quot;</span><span class="p">,</span><span class="s2">&quot;2020-09-28.20:28:29&quot;</span><span class="p">,</span><span class="s2">&quot;2020-09-28.20:39:46&quot;</span><span class="p">,</span><span class="s2">&quot;2020-09-28.21:45:31&quot;</span><span class="p">,</span><span class="s2">&quot;2020-09-28.21:49:18&quot;</span><span class="p">,</span><span class="s2">&quot;2020-09-28.22:27:34&quot;</span><span class="p">,</span><span class="s2">&quot;2020-09-28.22:31:09&quot;</span><span class="p">,</span><span class="s2">&quot;2020-09-28.22:32:49&quot;</span><span class="p">,</span><span class="s2">&quot;2020-10-07.16:51:06&quot;</span><span class="p">,</span><span class="s2">&quot;2020-10-07.16:51:23&quot;</span><span class="p">,</span><span class="s2">&quot;2020-10-25.21:09:10&quot;</span><span class="p">,</span><span class="s2">&quot;2020-12-14.19:06:53&quot;</span><span class="p">,</span><span class="s2">&quot;2021-02-02.10:28:56&quot;</span><span class="p">,</span><span class="s2">&quot;2021-02-02.10:31:13&quot;</span><span class="p">],</span><span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onListMemoryFiles&quot;</span><span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id73">
<h4>停止合约<a class="headerlink" href="#id73" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 停止某个合约.</p>
<div class="section" id="id74">
<h5>方法<a class="headerlink" href="#id74" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id75">
<h5>参数<a class="headerlink" href="#id75" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>killContractProcess</td>
</tr>
<tr>
<td>id</td>
<td>合约ID</td>
</tr>
<tr>
<td>*requestID</td>
<td>请求ID, String类型</td>
</tr>
</tbody>
</table><p><code class="docutils literal notranslate"><span class="pre">*</span></code>表示可选参数</p>
</div>
<div class="section" id="id76">
<h5>请求示例<a class="headerlink" href="#id76" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=killContractProcess&amp;id=-1759263594
</pre></div>
</div>
</div>
<div class="section" id="id77">
<h5>返回结果示例<a class="headerlink" href="#id77" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">&quot;status&quot;</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onListContractProcess&quot;</span><span class="p">,</span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;[\n {\n \&quot;id\&quot;: \&quot;-65051856\&quot;,\n \&quot;name\&quot;: \&quot;EventSuber\&quot;,\n \&quot;port\&quot;: \&quot;1631\&quot;,\n \&quot;times\&quot;: \&quot;0 \&quot;,\n \&quot;traffic\&quot;: \&quot;32.00 B\&quot;,\n \&quot;storage\&quot;: \&quot;0.00 B\&quot;,\n \&quot;contractStatus\&quot;: \&quot;Ready\&quot;\n },\n {\n \&quot;id\&quot;: \&quot;814046805\&quot;,\n \&quot;name\&quot;: \&quot;EventSuberAtCHQ\&quot;,\n \&quot;port\&quot;: \&quot;1630\&quot;,\n \&quot;times\&quot;: \&quot;0 \&quot;,\n \&quot;traffic\&quot;: \&quot;32.00 B\&quot;,\n \&quot;storage\&quot;: \&quot;0.00 B\&quot;,\n \&quot;contractStatus\&quot;: \&quot;Ready\&quot;\n },\n {\n \&quot;id\&quot;: \&quot;2023975189\&quot;,\n \&quot;name\&quot;: \&quot;LicenceService\&quot;,\n \&quot;port\&quot;: \&quot;1632\&quot;,\n \&quot;times\&quot;: \&quot;0 \&quot;,\n \&quot;traffic\&quot;: \&quot;32.00 B\&quot;,\n \&quot;storage\&quot;: \&quot;0.00 B\&quot;,\n \&quot;contractStatus\&quot;: \&quot;Ready\&quot;\n },\n {\n \&quot;id\&quot;: \&quot;-620602333\&quot;,\n \&quot;name\&quot;: \&quot;shortc\&quot;,\n \&quot;port\&quot;: \&quot;1627\&quot;,\n \&quot;times\&quot;: \&quot;0 \&quot;,\n \&quot;traffic\&quot;: \&quot;0.00 B\&quot;,\n \&quot;storage\&quot;: \&quot;0.00 B\&quot;,\n \&quot;contractStatus\&quot;: \&quot;Ready\&quot;\n }\n]&quot;</span><span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id78">
<h4>停止所有合约<a class="headerlink" href="#id78" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 停止服务器上启动的所有合约.</p>
<div class="section" id="id79">
<h5>方法<a class="headerlink" href="#id79" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id80">
<h5>参数<a class="headerlink" href="#id80" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>killAllContract</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id81">
<h5>请求示例<a class="headerlink" href="#id81" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=killAllContract
</pre></div>
</div>
</div>
<div class="section" id="id82">
<h5>返回结果示例<a class="headerlink" href="#id82" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">&quot;status&quot;</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onKillAllContract&quot;</span><span class="p">,</span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;Kill:7357,7541,7548,7555,7584,7585,7591,7598,7609,7612,8440,8442,8444,8521,&quot;</span><span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id83">
<h4>静态分析合约<a class="headerlink" href="#id83" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 静态分析合约脚本.</p>
<div class="section" id="id84">
<h5>方法<a class="headerlink" href="#id84" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id85">
<h5>参数<a class="headerlink" href="#id85" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>staticVerifyContract</td>
</tr>
<tr>
<td>contractid</td>
<td>合约ID</td>
</tr>
<tr>
<td>script</td>
<td>请求ID, String类型</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id86">
<h5>请求示例<a class="headerlink" href="#id86" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=staticVerifyContract&amp;contractid=943728900&amp;script=contract%20shortc%7B%0A%09export%20function%20main(arg)%7B%0A%09%09return%20arg.length%3B%09%0A%09%7D%0A%7D&amp;path=static.yjs
</pre></div>
</div>
</div>
<div class="section" id="id87">
<h5>返回结果示例<a class="headerlink" href="#id87" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;{\&quot;status\&quot;:\&quot;Success\&quot;,\&quot;result\&quot;:\&quot;{\\\&quot;main\\\&quot;:\\\&quot;Ret:arg \\\&quot;}\&quot;}&quot;</span><span class="p">,</span><span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onExecuteResult&quot;</span><span class="p">,</span><span class="nt">&quot;cid&quot;</span><span class="p">:</span><span class="s2">&quot;943728900&quot;</span><span class="p">,</span><span class="nt">&quot;executeTime&quot;</span><span class="p">:</span><span class="mi">54</span><span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id88">
<h4>获取合约静态分析流<a class="headerlink" href="#id88" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 获取某个合约的静态分析Control Flow.</p>
<div class="section" id="id89">
<h5>方法<a class="headerlink" href="#id89" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id90">
<h5>参数<a class="headerlink" href="#id90" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>getControlFlowByFileName</td>
</tr>
<tr>
<td>path</td>
<td>合约ID</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id91">
<h5>请求示例<a class="headerlink" href="#id91" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=getControlFlowByFileName&amp;path=EventSuber.yjs
</pre></div>
</div>
</div>
<div class="section" id="id92">
<h5>返回结果示例<a class="headerlink" href="#id92" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">&quot;init&quot;</span><span class="p">:{</span><span class="nt">&quot;blocks&quot;</span><span class="p">:[{</span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;Continuous&quot;</span><span class="p">,</span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;B0&quot;</span><span class="p">,</span><span class="nt">&quot;stmts&quot;</span><span class="p">:[</span><span class="s2">&quot;\u003dL0\u003d&quot;</span><span class="p">,</span><span class="s2">&quot;aload 0&quot;</span><span class="p">,</span><span class="s2">&quot;invokevirtual wrp/jdk/nashorn/internal/runtime/ScriptFunction getScope ()Lwrp/jdk/nashorn/internal/runtime/ScriptObject;&quot;</span><span class="p">],</span><span class="nt">&quot;original&quot;</span><span class="p">:</span><span class="s2">&quot;&quot;</span><span class="p">},{</span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;Continuous&quot;</span><span class="p">,</span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;B1&quot;</span><span class="p">,</span><span class="nt">&quot;stmts&quot;</span><span class="p">:[</span><span class="s2">&quot;\u003dL1\u003d&quot;</span><span class="p">,</span><span class="s2">&quot;astore 4&quot;</span><span class="p">],</span><span class="nt">&quot;original&quot;</span><span class="p">:</span><span class="s2">&quot;&quot;</span><span class="p">},{</span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;Continuous&quot;</span><span class="p">,</span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;B2&quot;</span><span class="p">,</span><span class="nt">&quot;stmts&quot;</span><span class="p">:[</span><span class="s2">&quot;\u003dL2\u003d&quot;</span><span class="p">,</span><span class="s2">&quot;aload 4&quot;</span><span class="p">,</span><span class="s2">&quot;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 &quot;</span><span class="p">],</span><span class="nt">&quot;original&quot;</span><span class="p">:</span><span class="s2">&quot;\t\tvar result \u003d YancloudUtil.subscribe(\&quot;XiaomiSmartHomeAtPKU\&quot;,\&quot;onAirPurifierModeChange\&quot;,handler);&quot;</span><span class="p">},{</span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;Continuous&quot;</span><span class="p">,</span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;B3&quot;</span><span class="p">,</span><span class="nt">&quot;stmts&quot;</span><span class="p">:[</span><span class="s2">&quot;dup&quot;</span><span class="p">,</span><span class="s2">&quot;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 &quot;</span><span class="p">],</span><span class="nt">&quot;original&quot;</span><span class="p">:</span><span class="s2">&quot;\t\tvar result \u003d YancloudUtil.subscribe(\&quot;XiaomiSmartHomeAtPKU\&quot;,\&quot;onAirPurifierModeChange\&quot;,handler);&quot;</span><span class="p">},{</span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;Continuous&quot;</span><span class="p">,</span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;B4&quot;</span><span class="p">,</span><span class="nt">&quot;stmts&quot;</span><span class="p">:[</span><span class="s2">&quot;swap&quot;</span><span class="p">,</span><span class="s2">&quot;ldc Xiao
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="id93">
<h3>日志查看类<a class="headerlink" href="#id93" title="永久链接至标题"></a></h3>
<div class="section" id="id94">
<h4>合约日志-查询数量<a class="headerlink" href="#id94" title="永久链接至标题"></a></h4>
<div class="section" id="id95">
<h5>方法<a class="headerlink" href="#id95" title="永久链接至标题"></a></h5>
<p>GET</p>
<p>contractName为空或是不传入时则为查询全部合约的条数</p>
</div>
<div class="section" id="id96">
<h5>参数<a class="headerlink" href="#id96" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>queryContractLogSize</td>
</tr>
<tr>
<td>contractName</td>
<td>字符串,非必须,合约名称</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id97">
<h5>请求示例<a class="headerlink" href="#id97" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogSize&amp;contractName=NanningDataSource
</pre></div>
</div>
</div>
<div class="section" id="id98">
<h5>返回结果示例<a class="headerlink" href="#id98" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;size&quot;</span><span class="p">:</span> <span class="mi">12</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onQueryContractLogSize&quot;</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;success&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id99">
<h4>合约日志-根据日期查询<a class="headerlink" href="#id99" title="永久链接至标题"></a></h4>
<div class="section" id="id100">
<h5>方法<a class="headerlink" href="#id100" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id101">
<h5>参数<a class="headerlink" href="#id101" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>queryContractLogByDate</td>
</tr>
<tr>
<td>start</td>
<td>long必须起始时间</td>
</tr>
<tr>
<td>end</td>
<td>long非必须若无end默认为当前时间</td>
</tr>
<tr>
<td>contractName</td>
<td>字符串,非必须,合约名称</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id102">
<h5>请求示例<a class="headerlink" href="#id102" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogByDate&amp;start=1597296300272&amp;end=1597296305747
</pre></div>
</div>
</div>
<div class="section" id="id103">
<h5>返回结果<a class="headerlink" href="#id103" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;executeContract&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractID&quot;</span><span class="p">:</span> <span class="s2">&quot;-1382208250&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractName&quot;</span><span class="p">:</span> <span class="s2">&quot;NanningDataSource&quot;</span><span class="p">,</span>
<span class="nt">&quot;function&quot;</span><span class="p">:</span> <span class="s2">&quot;getMainFrame&quot;</span><span class="p">,</span>
<span class="nt">&quot;costTime&quot;</span><span class="p">:</span> <span class="s2">&quot;2493&quot;</span><span class="p">,</span>
<span class="nt">&quot;totalGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;executionGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;extraGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597296300272</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;-8590335427581967208&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;executeContract&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractID&quot;</span><span class="p">:</span> <span class="s2">&quot;-1382208250&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractName&quot;</span><span class="p">:</span> <span class="s2">&quot;NanningDataSource&quot;</span><span class="p">,</span>
<span class="nt">&quot;function&quot;</span><span class="p">:</span> <span class="s2">&quot;loadResource&quot;</span><span class="p">,</span>
<span class="nt">&quot;costTime&quot;</span><span class="p">:</span> <span class="s2">&quot;732&quot;</span><span class="p">,</span>
<span class="nt">&quot;totalGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;executionGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;extraGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597296301030</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;849660532962309239&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;executeContract&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractID&quot;</span><span class="p">:</span> <span class="s2">&quot;-1382208250&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractName&quot;</span><span class="p">:</span> <span class="s2">&quot;NanningDataSource&quot;</span><span class="p">,</span>
<span class="nt">&quot;function&quot;</span><span class="p">:</span> <span class="s2">&quot;loadResource&quot;</span><span class="p">,</span>
<span class="nt">&quot;costTime&quot;</span><span class="p">:</span> <span class="s2">&quot;4580&quot;</span><span class="p">,</span>
<span class="nt">&quot;totalGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;executionGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;extraGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597296305745</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;-8003529429500512736&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;executeContract&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractID&quot;</span><span class="p">:</span> <span class="s2">&quot;-1382208250&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractName&quot;</span><span class="p">:</span> <span class="s2">&quot;NanningDataSource&quot;</span><span class="p">,</span>
<span class="nt">&quot;function&quot;</span><span class="p">:</span> <span class="s2">&quot;loadResource&quot;</span><span class="p">,</span>
<span class="nt">&quot;costTime&quot;</span><span class="p">:</span> <span class="s2">&quot;4551&quot;</span><span class="p">,</span>
<span class="nt">&quot;totalGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;executionGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;extraGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597296305746</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;7604666709899222357&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;executeContract&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractID&quot;</span><span class="p">:</span> <span class="s2">&quot;-1382208250&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractName&quot;</span><span class="p">:</span> <span class="s2">&quot;NanningDataSource&quot;</span><span class="p">,</span>
<span class="nt">&quot;function&quot;</span><span class="p">:</span> <span class="s2">&quot;loadResource&quot;</span><span class="p">,</span>
<span class="nt">&quot;costTime&quot;</span><span class="p">:</span> <span class="s2">&quot;6&quot;</span><span class="p">,</span>
<span class="nt">&quot;totalGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;executionGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;extraGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597296305751</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;-7561786202695627022&quot;</span>
<span class="p">}</span>
<span class="p">],</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onQueryRecentContractLog&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id104">
<h4>合约日志-根据偏移量查询<a class="headerlink" href="#id104" title="永久链接至标题"></a></h4>
<div class="section" id="id105">
<h5>方法<a class="headerlink" href="#id105" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id106">
<h5>参数<a class="headerlink" href="#id106" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>queryContractLogByOffset</td>
</tr>
<tr>
<td>count</td>
<td>long必须获取日志条数</td>
</tr>
<tr>
<td>offset</td>
<td>long非必须若无offset默认返回最新count条</td>
</tr>
<tr>
<td>contractName</td>
<td>字符串,非必须,合约名称</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id107">
<h5>请求示例<a class="headerlink" href="#id107" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogByOffset&amp;count=5&amp;contractName=NanningDataSource
</pre></div>
</div>
</div>
<div class="section" id="id108">
<h5>返回结果<a class="headerlink" href="#id108" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;executeContract&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractID&quot;</span><span class="p">:</span> <span class="s2">&quot;-1382208250&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractName&quot;</span><span class="p">:</span> <span class="s2">&quot;NanningDataSource&quot;</span><span class="p">,</span>
<span class="nt">&quot;function&quot;</span><span class="p">:</span> <span class="s2">&quot;loadResource&quot;</span><span class="p">,</span>
<span class="nt">&quot;costTime&quot;</span><span class="p">:</span> <span class="s2">&quot;4&quot;</span><span class="p">,</span>
<span class="nt">&quot;totalGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;executionGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;extraGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597296305842</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;-2390672423847654148&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;executeContract&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractID&quot;</span><span class="p">:</span> <span class="s2">&quot;-1382208250&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractName&quot;</span><span class="p">:</span> <span class="s2">&quot;NanningDataSource&quot;</span><span class="p">,</span>
<span class="nt">&quot;function&quot;</span><span class="p">:</span> <span class="s2">&quot;isOwner&quot;</span><span class="p">,</span>
<span class="nt">&quot;costTime&quot;</span><span class="p">:</span> <span class="s2">&quot;4&quot;</span><span class="p">,</span>
<span class="nt">&quot;totalGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;executionGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;extraGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597296305868</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;6056586201629372511&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;executeContract&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractID&quot;</span><span class="p">:</span> <span class="s2">&quot;-1382208250&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractName&quot;</span><span class="p">:</span> <span class="s2">&quot;NanningDataSource&quot;</span><span class="p">,</span>
<span class="nt">&quot;function&quot;</span><span class="p">:</span> <span class="s2">&quot;getApplyList&quot;</span><span class="p">,</span>
<span class="nt">&quot;costTime&quot;</span><span class="p">:</span> <span class="s2">&quot;6&quot;</span><span class="p">,</span>
<span class="nt">&quot;totalGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;executionGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;extraGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597296305893</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;3882409580676458151&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;executeContract&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractID&quot;</span><span class="p">:</span> <span class="s2">&quot;-1382208250&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractName&quot;</span><span class="p">:</span> <span class="s2">&quot;NanningDataSource&quot;</span><span class="p">,</span>
<span class="nt">&quot;function&quot;</span><span class="p">:</span> <span class="s2">&quot;getAcceptList&quot;</span><span class="p">,</span>
<span class="nt">&quot;costTime&quot;</span><span class="p">:</span> <span class="s2">&quot;4&quot;</span><span class="p">,</span>
<span class="nt">&quot;totalGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;executionGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;extraGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597296305908</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;-3437513873417136535&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;executeContract&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractID&quot;</span><span class="p">:</span> <span class="s2">&quot;-1382208250&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractName&quot;</span><span class="p">:</span> <span class="s2">&quot;NanningDataSource&quot;</span><span class="p">,</span>
<span class="nt">&quot;function&quot;</span><span class="p">:</span> <span class="s2">&quot;analysisByIndustry&quot;</span><span class="p">,</span>
<span class="nt">&quot;costTime&quot;</span><span class="p">:</span> <span class="s2">&quot;6&quot;</span><span class="p">,</span>
<span class="nt">&quot;totalGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;executionGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;extraGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;signature&quot;</span><span class="p">:</span> <span class="s2">&quot;4c2cef1756b2b591ab7eead19d67331e2294c7ba765c72298733c306ada0b6e84afbb6c7b9dba48b9843236ebe67aecb4af09fe58a51eef0e2e89b9f3e5cad02&quot;</span><span class="p">,</span>
<span class="nt">&quot;arg&quot;</span><span class="p">:</span> <span class="s2">&quot; {\&quot;year\&quot;:2018,\&quot;category\&quot;:\&quot;工业\&quot;,\&quot;indexType\&quot;:\&quot;营业额\&quot;}&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597296314654</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;203156239086062402&quot;</span>
<span class="p">}</span>
<span class="p">],</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onQueryRecentContractLog&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="key">
<h4>合约日志-根据key查询<a class="headerlink" href="#key" title="永久链接至标题"></a></h4>
<div class="section" id="id109">
<h5>方法<a class="headerlink" href="#id109" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id110">
<h5>参数<a class="headerlink" href="#id110" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>queryContractLogByKey</td>
</tr>
<tr>
<td>key</td>
<td>long必须该日志对应的key</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id111">
<h5>请求示例<a class="headerlink" href="#id111" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogByKey&amp;key=203156239086062402
</pre></div>
</div>
</div>
<div class="section" id="id112">
<h5>返回结果<a class="headerlink" href="#id112" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;executeContract&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractID&quot;</span><span class="p">:</span> <span class="s2">&quot;-1382208250&quot;</span><span class="p">,</span>
<span class="nt">&quot;contractName&quot;</span><span class="p">:</span> <span class="s2">&quot;NanningDataSource&quot;</span><span class="p">,</span>
<span class="nt">&quot;function&quot;</span><span class="p">:</span> <span class="s2">&quot;analysisByIndustry&quot;</span><span class="p">,</span>
<span class="nt">&quot;costTime&quot;</span><span class="p">:</span> <span class="s2">&quot;6&quot;</span><span class="p">,</span>
<span class="nt">&quot;totalGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;executionGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;extraGas&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
<span class="nt">&quot;signature&quot;</span><span class="p">:</span> <span class="s2">&quot;4c2cef1756b2b591ab7eead19d67331e2294c7ba765c72298733c306ada0b6e84afbb6c7b9dba48b9843236ebe67aecb4af09fe58a51eef0e2e89b9f3e5cad02&quot;</span><span class="p">,</span>
<span class="nt">&quot;arg&quot;</span><span class="p">:</span> <span class="s2">&quot; {\&quot;year\&quot;:2018,\&quot;category\&quot;:\&quot;工业\&quot;,\&quot;indexType\&quot;:\&quot;营业额\&quot;}&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597296314654</span>
<span class="p">},</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onQueryContractLogByKey&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id113">
<h4>合约日志-按时间段统计调用次数<a class="headerlink" href="#id113" title="永久链接至标题"></a></h4>
<div class="section" id="id114">
<h5>方法<a class="headerlink" href="#id114" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id115">
<h5>参数<a class="headerlink" href="#id115" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>countContractLogGroupByCategory</td>
</tr>
<tr>
<td>start</td>
<td>long必须起始时间</td>
</tr>
<tr>
<td>end</td>
<td>非必须,终止时间,默认为当前</td>
</tr>
<tr>
<td>interval</td>
<td>long非必须统计间隔</td>
</tr>
<tr>
<td>category</td>
<td>非必须,合约名称以逗号连接,不传入时统计全部合约调用情况</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id116">
<h5>请求示例<a class="headerlink" href="#id116" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=countContractLogGroupByCategory&amp;start=1596758400000&amp;interval=86400000
</pre></div>
</div>
</div>
<div class="section" id="id117">
<h5>返回结果<a class="headerlink" href="#id117" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;start&quot;</span><span class="p">:</span> <span class="mi">1596758400000</span><span class="p">,</span>
<span class="nt">&quot;interval&quot;</span><span class="p">:</span> <span class="mi">86400000</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onCountContractLogGroupByCategory&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="mi">0</span><span class="p">,</span>
<span class="mi">0</span><span class="p">,</span>
<span class="mi">0</span><span class="p">,</span>
<span class="mi">0</span><span class="p">,</span>
<span class="mi">0</span><span class="p">,</span>
<span class="mi">0</span><span class="p">,</span>
<span class="mi">43</span><span class="p">,</span>
<span class="mi">14</span>
<span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id118">
<h4>账本日志-查询数量<a class="headerlink" href="#id118" title="永久链接至标题"></a></h4>
<p>查询通过本节点去账本上记录的日志数量</p>
<div class="section" id="id119">
<h5>方法<a class="headerlink" href="#id119" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id120">
<h5>参数<a class="headerlink" href="#id120" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>queryHashSize</td>
</tr>
<tr>
<td>contractName</td>
<td>非必须,合约名称</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id121">
<h5>请求示例<a class="headerlink" href="#id121" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryHashSize&amp;contractName=NanningDataSource
</pre></div>
</div>
</div>
<div class="section" id="id122">
<h5>返回结果<a class="headerlink" href="#id122" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;count&quot;</span><span class="p">:</span> <span class="s2">&quot;2&quot;</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onQueryHashSize&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id123">
<h4>账本日志-根据偏移量查询<a class="headerlink" href="#id123" title="永久链接至标题"></a></h4>
<p>查询x条通过本节点去账本上记录的日志的哈希列表</p>
<div class="section" id="id124">
<h5>方法<a class="headerlink" href="#id124" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id125">
<h5>参数<a class="headerlink" href="#id125" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>queryHashByOffset</td>
</tr>
<tr>
<td>count</td>
<td>整数,必须,表示条数</td>
</tr>
<tr>
<td>offset</td>
<td>整数非必须表示偏移量不传入offset则默认返回最新count条</td>
</tr>
<tr>
<td>contractName</td>
<td>字符串,非必须,表示合约名称</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id126">
<h5>请求示例<a class="headerlink" href="#id126" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryHashByOffset&amp;count=1&amp;contractName=NanningDataSource
</pre></div>
</div>
</div>
<div class="section" id="id127">
<h5>返回结果<a class="headerlink" href="#id127" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span>
<span class="nt">&quot;hash&quot;</span><span class="p">:</span> <span class="s2">&quot;3a6c60621907146b77146c1f2d48700e47520173&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597296314658</span>
<span class="p">}</span>
<span class="p">],</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onQueryHash&quot;</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;success&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="hash">
<h4>账本日志-根据hash查询详情<a class="headerlink" href="#hash" title="永久链接至标题"></a></h4>
<p>根据hash来查询日志内容</p>
<div class="section" id="id128">
<h5>方法<a class="headerlink" href="#id128" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id129">
<h5>参数<a class="headerlink" href="#id129" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>queryDataByHash</td>
</tr>
<tr>
<td>hash</td>
<td>字符串可通过queryHashByOffset</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id130">
<h5>请求示例<a class="headerlink" href="#id130" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryDataByHash&amp;count=1&amp;contractName=NanningDataSource&amp;hash=3a6c60621907146b77146c1f2d48700e47520173
</pre></div>
</div>
</div>
<div class="section" id="id131">
<h5>返回结果<a class="headerlink" href="#id131" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;from&quot;</span><span class="p">:</span> <span class="s2">&quot;0x3034643139323433323966373263656431343866&quot;</span><span class="p">,</span>
<span class="nt">&quot;to&quot;</span><span class="p">:</span> <span class="s2">&quot;0x65786563757465436f6e74726163740000000000&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;1597296314655 --&gt; {\&quot;extraGas\&quot;:\&quot;0\&quot;,\&quot;totalGas\&quot;:\&quot;0\&quot;,\&quot;executionGas\&quot;:\&quot;0\&quot;,\&quot;signature\&quot;:\&quot;4c2cef1756b2b591ab7eead19d67331e2294c7ba765c72298733c306ada0b6e84afbb6c7b9dba48b9843236ebe67aecb4af09fe58a51eef0e2e89b9f3e5cad02\&quot;,\&quot;costTime\&quot;:\&quot;6\&quot;,\&quot;arg\&quot;:\&quot; {\\\\\\\&quot;year\\\\\\\&quot;:2018,\\\\\\\&quot;category\\\\\\\&quot;:\\\\\\\&quot;工业\\\\\\\&quot;,\\\\\\\&quot;indexType\\\\\\\&quot;:\\\\\\\&quot;营业额\\\\\\\&quot;}\&quot;,\&quot;contractID\&quot;:\&quot;-1382208250\&quot;,\&quot;action\&quot;:\&quot;analysisByIndustry\&quot;,\&quot;pubKey\&quot;:\&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd\&quot;}&quot;</span><span class="p">,</span>
<span class="nt">&quot;requestID&quot;</span><span class="p">:</span> <span class="s2">&quot;1597296314629_6067&quot;</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onQueryDataByHash&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="requestidhash">
<h4>账本日志-根据requestID查询Hash<a class="headerlink" href="#requestidhash" title="永久链接至标题"></a></h4>
<p>根据requestID来查询日志内容需由开发者保证requestID的唯一性</p>
<div class="section" id="id132">
<h5>方法<a class="headerlink" href="#id132" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id133">
<h5>参数<a class="headerlink" href="#id133" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>queryHashByRequestID</td>
</tr>
<tr>
<td>requestID</td>
<td>字符串,在发起调用时生成</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id134">
<h5>请求示例<a class="headerlink" href="#id134" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=queryHashByRequestID&amp;requestID=0987654321ab
</pre></div>
</div>
</div>
</div>
<div class="section" id="id135">
<h4>节点日志-查询数量<a class="headerlink" href="#id135" title="永久链接至标题"></a></h4>
<div class="section" id="id136">
<h5>方法<a class="headerlink" href="#id136" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id137">
<h5>参数<a class="headerlink" href="#id137" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>queryNodeLogSize</td>
</tr>
<tr>
<td>category</td>
<td>非必须,不传入时查询全部情况</td>
</tr>
</tbody>
</table><p>其中包括ping、startContract、saveFile等。</p>
</div>
<div class="section" id="id138">
<h5>请求示例<a class="headerlink" href="#id138" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogSize
http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogSize&amp;category=login
</pre></div>
</div>
</div>
<div class="section" id="id139">
<h5>返回结果<a class="headerlink" href="#id139" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;size&quot;</span><span class="p">:</span> <span class="mi">177</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onQueryNodeLogSize&quot;</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;success&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id140">
<h4>节点日志-按日期查询<a class="headerlink" href="#id140" title="永久链接至标题"></a></h4>
<div class="section" id="id141">
<h5>方法<a class="headerlink" href="#id141" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id142">
<h5>参数<a class="headerlink" href="#id142" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>queryNodeLogByDate</td>
</tr>
<tr>
<td>start</td>
<td>long必须起始日期</td>
</tr>
<tr>
<td>end</td>
<td>long非必须</td>
</tr>
<tr>
<td>category</td>
<td>非必须,不传入时查询全部情况</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id143">
<h5>请求示例<a class="headerlink" href="#id143" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogByDate&amp;start=1597376006441
http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogByDate&amp;start=1596758400000&amp;category=login
</pre></div>
</div>
</div>
<div class="section" id="id144">
<h5>返回结果<a class="headerlink" href="#id144" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;listAllAuthRole&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;accept&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597376006438</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;387355870552374748&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;listUnAuthRole&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;accept&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597376006441</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;4772693258708933626&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;countRole&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;accept&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597376006444</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;-6425375229108830572&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;loadNodeConfig&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;accept&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597376006448</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;-6602401010405792959&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;getPeerID&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;accept&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597376006449</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;-7006776427870311552&quot;</span>
<span class="p">}</span>
<span class="p">],</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onQueryNodeLogByDate&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id145">
<h4>节点日志-按偏移量查询<a class="headerlink" href="#id145" title="永久链接至标题"></a></h4>
<div class="section" id="id146">
<h5>方法<a class="headerlink" href="#id146" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id147">
<h5>参数<a class="headerlink" href="#id147" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>queryNodeLogByOffset</td>
</tr>
<tr>
<td>count</td>
<td>long必须获取日志条数</td>
</tr>
<tr>
<td>offset</td>
<td>long非必须若无offset默认返回最新count条</td>
</tr>
<tr>
<td>contractName</td>
<td>字符串,非必须,合约名称</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id148">
<h5>请求示例<a class="headerlink" href="#id148" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogByOffset&amp;count=5
</pre></div>
</div>
</div>
<div class="section" id="id149">
<h5>返回结果<a class="headerlink" href="#id149" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;listAllAuthRole&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;accept&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597376006438</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;387355870552374748&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;listUnAuthRole&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;accept&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597376006441</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;4772693258708933626&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;countRole&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;accept&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597376006444</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;-6425375229108830572&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;loadNodeConfig&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;accept&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597376006448</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;-6602401010405792959&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;getPeerID&quot;</span><span class="p">,</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd&quot;</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;accept&quot;</span><span class="p">,</span>
<span class="nt">&quot;date&quot;</span><span class="p">:</span> <span class="mi">1597376006449</span><span class="p">,</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;-7006776427870311552&quot;</span>
<span class="p">}</span>
<span class="p">],</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onQueryNodeLogByOffset&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id150">
<h4>节点日志-按时间段统计调用次数<a class="headerlink" href="#id150" title="永久链接至标题"></a></h4>
<div class="section" id="id151">
<h5>方法<a class="headerlink" href="#id151" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id152">
<h5>参数<a class="headerlink" href="#id152" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>countLogGroupByCategory</td>
</tr>
<tr>
<td>start</td>
<td>long必须起始时间</td>
</tr>
<tr>
<td>end</td>
<td>非必须,终止时间,默认为当前</td>
</tr>
<tr>
<td>interval</td>
<td>long非必须统计间隔</td>
</tr>
<tr>
<td>category</td>
<td>非必须action以逗号连接不传入时统计全部调用情况</td>
</tr>
</tbody>
</table><p>其中category中的action为NodePortal的接口的action集合。
包括ping、startContract、saveFile等。</p>
</div>
<div class="section" id="id153">
<h5>请求示例<a class="headerlink" href="#id153" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=countNodeLogGroupByCategory&amp;start=1596758400000&amp;interval=86400000
http://127.0.0.1:18000/SCIDE/CMManager?action=countNodeLogGroupByCategory&amp;start=1596758400000&amp;interval=86400000&amp;category=ping,startContract
</pre></div>
</div>
</div>
<div class="section" id="id154">
<h5>返回结果<a class="headerlink" href="#id154" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;start&quot;</span><span class="p">:</span> <span class="mi">1596758400000</span><span class="p">,</span>
<span class="nt">&quot;interval&quot;</span><span class="p">:</span> <span class="mi">86400000</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onCountNodeLogGroupByCategory&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="mi">0</span><span class="p">,</span>
<span class="mi">0</span><span class="p">,</span>
<span class="mi">0</span><span class="p">,</span>
<span class="mi">0</span><span class="p">,</span>
<span class="mi">0</span><span class="p">,</span>
<span class="mi">0</span><span class="p">,</span>
<span class="mi">912</span><span class="p">,</span>
<span class="mi">761</span>
<span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id155">
<h4>输出历史记录日志<a class="headerlink" href="#id155" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 获取节点服务器上合约的TimeTravel日志.</p>
<div class="section" id="id156">
<h5>方法<a class="headerlink" href="#id156" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id157">
<h5>参数<a class="headerlink" href="#id157" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>printTimeTravelLog</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id158">
<h5>请求示例<a class="headerlink" href="#id158" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=printTimeTravelLog
</pre></div>
</div>
</div>
<div class="section" id="id159">
<h5>返回结果示例<a class="headerlink" href="#id159" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">&quot;status&quot;</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;[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&quot;</span><span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id160">
<h4>输出节点转移日志<a class="headerlink" href="#id160" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 获取节点服务器的状态转移日志.</p>
<div class="section" id="id161">
<h5>方法<a class="headerlink" href="#id161" title="永久链接至标题"></a></h5>
<p>GET</p>
</div>
<div class="section" id="id162">
<h5>参数<a class="headerlink" href="#id162" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>printTransferLog</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id163">
<h5>请求示例<a class="headerlink" href="#id163" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=printTransferLog
</pre></div>
</div>
</div>
<div class="section" id="id164">
<h5>返回结果示例<a class="headerlink" href="#id164" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">&quot;status&quot;</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;&quot;</span><span class="p">}</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="id165">
<h3>模板生成类<a class="headerlink" href="#id165" title="永久链接至标题"></a></h3>
</div>
</div>
<div class="section" id="id166">
<h2>账本Http接口<a class="headerlink" href="#id166" title="永久链接至标题"></a></h2>
<div class="highlight-{.yaml} notranslate"><div class="highlight"><pre><span></span>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: &quot;*&quot;
- selector: bdware.bdledger.api.Ledger.GetLedgers
get: /v0/ledgers
- selector: bdware.bdledger.api.Ledger.SendTransaction
post: /v0/ledgers/{ledger}/transactions
body: &quot;*&quot;
- selector: bdware.bdledger.api.Query.GetBlockByHash
get: /v0/ledgers/{ledger}/block
- selector: bdware.bdledger.api.Query.GetBlocks
post: /v0/ledgers/{ledger}/blocks/query
body: &quot;*&quot;
- selector: bdware.bdledger.api.Query.CountBlocks
post: /v0/ledgers/{ledger}/blocks/count
body: &quot;*&quot;
- 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: &quot;*&quot;
- selector: bdware.bdledger.api.Query.CountTransactions
post: /v0/ledgers/{ledger}/transactions/count
body: &quot;*&quot;
</pre></div>
</div>
<blockquote>
<div><p><strong>Note</strong></p>
<p>Request/Response data of <strong>bytes</strong> type should/will be encoded with
<a class="reference external" href="https://tools.ietf.org/html/rfc4648#section-4">Base64</a>.</p>
</div></blockquote>
<blockquote>
<div><p><strong>Note</strong></p>
<p>When using hash strings in URL, they need to be encoded with
<a class="reference external" href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent">encodeURIComponent</a>.</p>
</div></blockquote>
<div class="section" id="id167">
<h3>账本信息类<a class="headerlink" href="#id167" title="永久链接至标题"></a></h3>
<div class="section" id="node-clientversion-node-clientversion">
<h4>Node.ClientVersion {#_node_clientversion}<a class="headerlink" href="#node-clientversion-node-clientversion" title="永久链接至标题"></a></h4>
<p>Get BDLedger node version</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">GET</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="p">{{</span><span class="n">IP</span><span class="p">}}:{{</span><span class="n">PORT</span><span class="p">}}</span><span class="o">/</span><span class="n">v0</span><span class="o">/</span><span class="n">node</span><span class="o">/</span><span class="n">version</span>
</pre></div>
</div>
<div class="section" id="id168">
<h5>返回示例<a class="headerlink" href="#id168" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;version&quot;: &quot;dev-210119.a88bf4eb&quot;
}
</pre></div>
</div>
</div>
</div>
<div class="section" id="ledger-createledger-ledger-createledger">
<h4>Ledger.CreateLedger {#_ledger_createledger}<a class="headerlink" href="#ledger-createledger-ledger-createledger" title="永久链接至标题"></a></h4>
<p>Create a new ledger</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">POST</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="p">{{</span><span class="n">IP</span><span class="p">}}:{{</span><span class="n">PORT</span><span class="p">}}</span><span class="o">/</span><span class="n">v0</span><span class="o">/</span><span class="n">ledgers</span>
</pre></div>
</div>
<div class="section" id="id169">
<h5>请求示例<a class="headerlink" href="#id169" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;name&quot;: &quot;test&quot;
}
</pre></div>
</div>
</div>
<div class="section" id="id170">
<h5>返回示例<a class="headerlink" href="#id170" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;ok&quot;: true
}
</pre></div>
</div>
</div>
</div>
<div class="section" id="ledger-getledgers-ledger-getledgers">
<h4>Ledger.GetLedgers {#_ledger_getledgers}<a class="headerlink" href="#ledger-getledgers-ledger-getledgers" title="永久链接至标题"></a></h4>
<p>Get all ledgers</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">GET</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="p">{{</span><span class="n">IP</span><span class="p">}}:{{</span><span class="n">PORT</span><span class="p">}}</span><span class="o">/</span><span class="n">v0</span><span class="o">/</span><span class="n">ledgers</span>
</pre></div>
</div>
<div class="section" id="id171">
<h5>返回示例<a class="headerlink" href="#id171" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;ledgers&quot;: [
&quot;default&quot;,
&quot;test&quot;
]
}
</pre></div>
</div>
</div>
</div>
<div class="section" id="ledger-sendtransaction-ledger-sendtransaction">
<h4>Ledger.SendTransaction {#_ledger_sendtransaction}<a class="headerlink" href="#ledger-sendtransaction-ledger-sendtransaction" title="永久链接至标题"></a></h4>
<p>Send a new transaction</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">POST</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="p">{{</span><span class="n">IP</span><span class="p">}}:{{</span><span class="n">PORT</span><span class="p">}}</span><span class="o">/</span><span class="n">v0</span><span class="o">/</span><span class="n">ledgers</span><span class="o">/</span><span class="n">test</span><span class="o">/</span><span class="n">transactions</span>
</pre></div>
</div>
<div class="section" id="id172">
<h5>请求示例<a class="headerlink" href="#id172" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;transaction&quot;: {
&quot;type&quot;: 0,
&quot;from&quot;: &quot;8A3K/vANyv7wDcr+8A3K/vANyv4=&quot;,
&quot;nonce&quot;: 52,
&quot;data&quot;: &quot;lQItWZKS5hlUn6V/DMKKwvZXxvM=&quot;
}
}
</pre></div>
</div>
</div>
<div class="section" id="id173">
<h5>返回示例<a class="headerlink" href="#id173" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;hash&quot;: &quot;VQBeA5Ee0Y5hqEileoQuYMHbOSE=&quot;
}
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="id174">
<h3>查询类<a class="headerlink" href="#id174" title="永久链接至标题"></a></h3>
<div class="section" id="query-getblockbyhash-query-getblockbyhash">
<h4>Query.GetBlockByHash {#_query_getblockbyhash}<a class="headerlink" href="#query-getblockbyhash-query-getblockbyhash" title="永久链接至标题"></a></h4>
<p>Get a block identified by its hash</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>GET http://{{IP}}:{{PORT}}/v0/ledgers/test/block?hash=LSKr%2BK079Ax%2BrKdlyYN5ze2YGzo%3D
</pre></div>
</div>
<p><strong>hash</strong> has to be encoded with
<a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent">encodeURIComponent</a></p>
<div class="section" id="id175">
<h5>返回示例<a class="headerlink" href="#id175" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;block&quot;: {
&quot;hash&quot;: &quot;LSKr+K079Ax+rKdlyYN5ze2YGzo=&quot;,
&quot;creator&quot;: &quot;&quot;,
&quot;nonce&quot;: &quot;0&quot;,
&quot;parentHashes&quot;: [
&quot;fLX5pMY8M1qSAGZdKT1rWBkdEMo=&quot;,
&quot;rk0DWMaUpRG82yVX+cFhbfhPFdw=&quot;,
&quot;3XkwkuMBearq8uavN76Te7Zdpl8=&quot;
],
&quot;witnesses&quot;: [],
&quot;timestamp&quot;: &quot;1611038043&quot;,
&quot;size&quot;: &quot;0&quot;,
&quot;transactionCount&quot;: 1,
&quot;transactionsRoot&quot;: &quot;VQBeA5Ee0Y5hqEileoQuYMHbOSE=&quot;,
&quot;transactions&quot;: [
{
&quot;blockHash&quot;: &quot;&quot;,
&quot;blockTimestamp&quot;: &quot;0&quot;,
&quot;index&quot;: 0,
&quot;hash&quot;: &quot;VQBeA5Ee0Y5hqEileoQuYMHbOSE=&quot;,
&quot;type&quot;: &quot;RECORD&quot;,
&quot;from&quot;: &quot;8A3K/vANyv7wDcr+8A3K/vANyv4=&quot;,
&quot;nonce&quot;: &quot;0&quot;,
&quot;to&quot;: &quot;AAAAAAAAAAAAAAAAAAAAAAAAAAA=&quot;,
&quot;data&quot;: &quot;lQItWZKS5hlUn6V/DMKKwvZXxvM=&quot;
}
],
&quot;transactionHashes&quot;: [
&quot;VQBeA5Ee0Y5hqEileoQuYMHbOSE=&quot;
]
}
}
</pre></div>
</div>
</div>
</div>
<div class="section" id="query-getblocks-query-getblocks">
<h4>Query.GetBlocks {#_query_getblocks}<a class="headerlink" href="#query-getblocks-query-getblocks" title="永久链接至标题"></a></h4>
<p>Get blocks in a timestamp range</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">POST</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="p">{{</span><span class="n">IP</span><span class="p">}}:{{</span><span class="n">PORT</span><span class="p">}}</span><span class="o">/</span><span class="n">v0</span><span class="o">/</span><span class="n">ledgers</span><span class="o">/</span><span class="n">test</span><span class="o">/</span><span class="n">blocks</span><span class="o">/</span><span class="n">query</span>
</pre></div>
</div>
<div class="highlight-{.protobuf} notranslate"><div class="highlight"><pre><span></span>enum IncludeTransactions {
NONE = 0; // Don&#39;t include transaction data
HASH = 1; // Include transactions hashes
FULL = 2; // Include full transactions
}
</pre></div>
</div>
<p>Requirement: asciimath:[“start_timestamp”⇐”end_timestamp”]</p>
<p>If only <strong>end_timestamp</strong> is not specified, or
asciimath:[“end_timestamp”-“start_timestamp”&gt;”query.maxDuration”],
then <strong>end_timestamp</strong> will be set to
asciimath:[“start_timestamp”+”query.maxDuration”].</p>
<p>If only <strong>start_timestamp</strong> is not specified, then <strong>start_timestamp</strong>
will be set to asciimath:[“end_timestamp”-“query.maxDuration”].</p>
<p>In all cases, <strong>start_timestamp</strong> will never be earlier than the
genesis blocks timestamp, and <strong>end_timestamp</strong> will never be later
than the current timestamp when the node process the query request.</p>
<div class="section" id="id176">
<h5>请求示例<a class="headerlink" href="#id176" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;start_timestamp&quot;: 1611038000,
&quot;end_timestamp&quot;: 1611039000,
&quot;include_transactions&quot;: 0
}
</pre></div>
</div>
</div>
<div class="section" id="id177">
<h5>返回示例<a class="headerlink" href="#id177" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;blocks&quot;: [
{
&quot;hash&quot;: &quot;LSKr+K079Ax+rKdlyYN5ze2YGzo=&quot;,
&quot;creator&quot;: &quot;&quot;,
&quot;nonce&quot;: &quot;0&quot;,
&quot;parentHashes&quot;: [
&quot;fLX5pMY8M1qSAGZdKT1rWBkdEMo=&quot;,
&quot;rk0DWMaUpRG82yVX+cFhbfhPFdw=&quot;,
&quot;3XkwkuMBearq8uavN76Te7Zdpl8=&quot;
],
&quot;witnesses&quot;: [],
&quot;timestamp&quot;: &quot;1611038043&quot;,
&quot;size&quot;: &quot;0&quot;,
&quot;transactionCount&quot;: 1,
&quot;transactionsRoot&quot;: &quot;VQBeA5Ee0Y5hqEileoQuYMHbOSE=&quot;,
&quot;transactions&quot;: [],
&quot;transactionHashes&quot;: []
}
],
&quot;startTimestamp&quot;: &quot;1611038043&quot;,
&quot;endTimestamp&quot;: &quot;1611038043&quot;
}
</pre></div>
</div>
</div>
<div class="section" id="id178">
<h5>请求示例2<a class="headerlink" href="#id178" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;start_timestamp&quot;: 1611038000,
&quot;end_timestamp&quot;: 1611039000,
&quot;include_transactions&quot;: 1
}
</pre></div>
</div>
</div>
<div class="section" id="id179">
<h5>返回示例2<a class="headerlink" href="#id179" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;blocks&quot;: [
{
&quot;hash&quot;: &quot;LSKr+K079Ax+rKdlyYN5ze2YGzo=&quot;,
&quot;creator&quot;: &quot;&quot;,
&quot;nonce&quot;: &quot;0&quot;,
&quot;parentHashes&quot;: [
&quot;fLX5pMY8M1qSAGZdKT1rWBkdEMo=&quot;,
&quot;rk0DWMaUpRG82yVX+cFhbfhPFdw=&quot;,
&quot;3XkwkuMBearq8uavN76Te7Zdpl8=&quot;
],
&quot;witnesses&quot;: [],
&quot;timestamp&quot;: &quot;1611038043&quot;,
&quot;size&quot;: &quot;0&quot;,
&quot;transactionCount&quot;: 1,
&quot;transactionsRoot&quot;: &quot;VQBeA5Ee0Y5hqEileoQuYMHbOSE=&quot;,
&quot;transactions&quot;: [],
&quot;transactionHashes&quot;: [
&quot;VQBeA5Ee0Y5hqEileoQuYMHbOSE=&quot;
]
}
],
&quot;startTimestamp&quot;: &quot;1611038043&quot;,
&quot;endTimestamp&quot;: &quot;1611038043&quot;
}
</pre></div>
</div>
<p><strong>Request body 3.</strong></p>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;start_timestamp&quot;: 1611038000,
&quot;end_timestamp&quot;: 1611039000,
&quot;include_transactions&quot;: 2
}
</pre></div>
</div>
<p><strong>Response 3.</strong></p>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;blocks&quot;: [
{
&quot;hash&quot;: &quot;LSKr+K079Ax+rKdlyYN5ze2YGzo=&quot;,
&quot;creator&quot;: &quot;&quot;,
&quot;nonce&quot;: &quot;0&quot;,
&quot;parentHashes&quot;: [
&quot;fLX5pMY8M1qSAGZdKT1rWBkdEMo=&quot;,
&quot;rk0DWMaUpRG82yVX+cFhbfhPFdw=&quot;,
&quot;3XkwkuMBearq8uavN76Te7Zdpl8=&quot;
],
&quot;witnesses&quot;: [],
&quot;timestamp&quot;: &quot;1611038043&quot;,
&quot;size&quot;: &quot;0&quot;,
&quot;transactionCount&quot;: 1,
&quot;transactionsRoot&quot;: &quot;VQBeA5Ee0Y5hqEileoQuYMHbOSE=&quot;,
&quot;transactions&quot;: [
{
&quot;blockHash&quot;: &quot;&quot;,
&quot;blockTimestamp&quot;: &quot;0&quot;,
&quot;index&quot;: 0,
&quot;hash&quot;: &quot;VQBeA5Ee0Y5hqEileoQuYMHbOSE=&quot;,
&quot;type&quot;: &quot;RECORD&quot;,
&quot;from&quot;: &quot;8A3K/vANyv7wDcr+8A3K/vANyv4=&quot;,
&quot;nonce&quot;: &quot;0&quot;,
&quot;to&quot;: &quot;AAAAAAAAAAAAAAAAAAAAAAAAAAA=&quot;,
&quot;data&quot;: &quot;lQItWZKS5hlUn6V/DMKKwvZXxvM=&quot;
}
],
&quot;transactionHashes&quot;: [
&quot;VQBeA5Ee0Y5hqEileoQuYMHbOSE=&quot;
]
}
],
&quot;startTimestamp&quot;: &quot;1611038043&quot;,
&quot;endTimestamp&quot;: &quot;1611038043&quot;
}
</pre></div>
</div>
</div>
</div>
<div class="section" id="query-countblocks-query-countblocks">
<h4>Query.CountBlocks {#_query_countblocks}<a class="headerlink" href="#query-countblocks-query-countblocks" title="永久链接至标题"></a></h4>
<p>Count all blocks in a ledger, or blocks in a timestamp range</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">POST</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="p">{{</span><span class="n">IP</span><span class="p">}}:{{</span><span class="n">PORT</span><span class="p">}}</span><span class="o">/</span><span class="n">v0</span><span class="o">/</span><span class="n">ledgers</span><span class="o">/</span><span class="n">test</span><span class="o">/</span><span class="n">blocks</span><span class="o">/</span><span class="n">count</span>
</pre></div>
</div>
<p>Requirement: asciimath:[“start_timestamp”⇐”end_timestamp”]</p>
<p>If neither <strong>start_timestamp</strong> nor <strong>end_timestamp</strong> is specified,
then count all blocks in the specified ledger.</p>
<p>If only <strong>end_timestamp</strong> is not specified, then count all blocks with
timestamps later than <strong>start_timestamp</strong>.</p>
<p>If only <strong>start_timestamp</strong> is not specified, then count all blocks
with timestamps earlier than <strong>end_timestamp</strong>.</p>
<p>In all cases, <strong>start_timestamp</strong> will never be earlier than the
genesis blocks timestamp, and <strong>end_timestamp</strong> will never be later
than the current timestamp when the node process the query request.</p>
<div class="section" id="id180">
<h5>请求示例<a class="headerlink" href="#id180" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{}
</pre></div>
</div>
</div>
<div class="section" id="id181">
<h5>返回示例<a class="headerlink" href="#id181" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;count&quot;: &quot;5&quot;,
&quot;startTimestamp&quot;: &quot;0&quot;,
&quot;endTimestamp&quot;: &quot;1611039957&quot;
}
</pre></div>
</div>
</div>
<div class="section" id="id182">
<h5>请求示例2<a class="headerlink" href="#id182" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;start_timestamp&quot;: 1611038000,
&quot;end_timestamp&quot;: 1611039000
}
</pre></div>
</div>
</div>
<div class="section" id="id183">
<h5>返回示例2<a class="headerlink" href="#id183" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;count&quot;: &quot;1&quot;,
&quot;startTimestamp&quot;: &quot;1611038000&quot;,
&quot;endTimestamp&quot;: &quot;1611039000&quot;
}
</pre></div>
</div>
</div>
</div>
<div class="section" id="query-getrecentblocks-query-getrecentblocks">
<h4>Query.GetRecentBlocks {#_query_getrecentblocks}<a class="headerlink" href="#query-getrecentblocks-query-getrecentblocks" title="永久链接至标题"></a></h4>
<p>Get recent <strong>count</strong> blocks (Only support IncludeTransactions=NONE for
now)</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>GET http://{{IP}}:{{PORT}}/v0/ledgers/test/blocks/recent?count=2
</pre></div>
</div>
<div class="section" id="id184">
<h5>返回示例<a class="headerlink" href="#id184" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;blocks&quot;: [
{
&quot;hash&quot;: &quot;LSKr+K079Ax+rKdlyYN5ze2YGzo=&quot;,
&quot;creator&quot;: &quot;&quot;,
&quot;nonce&quot;: &quot;0&quot;,
&quot;parentHashes&quot;: [
&quot;fLX5pMY8M1qSAGZdKT1rWBkdEMo=&quot;,
&quot;rk0DWMaUpRG82yVX+cFhbfhPFdw=&quot;,
&quot;3XkwkuMBearq8uavN76Te7Zdpl8=&quot;
],
&quot;witnesses&quot;: [],
&quot;timestamp&quot;: &quot;1611038043&quot;,
&quot;size&quot;: &quot;0&quot;,
&quot;transactionCount&quot;: 1,
&quot;transactionsRoot&quot;: &quot;VQBeA5Ee0Y5hqEileoQuYMHbOSE=&quot;,
&quot;transactions&quot;: [],
&quot;transactionHashes&quot;: []
},
{
&quot;hash&quot;: &quot;rk0DWMaUpRG82yVX+cFhbfhPFdw=&quot;,
&quot;creator&quot;: &quot;&quot;,
&quot;nonce&quot;: &quot;0&quot;,
&quot;parentHashes&quot;: [
&quot;fLX5pMY8M1qSAGZdKT1rWBkdEMo=&quot;,
&quot;3XkwkuMBearq8uavN76Te7Zdpl8=&quot;,
&quot;8pZPR74OALIbps5XFb4dL/s0j0M=&quot;
],
&quot;witnesses&quot;: [],
&quot;timestamp&quot;: &quot;1610968019&quot;,
&quot;size&quot;: &quot;0&quot;,
&quot;transactionCount&quot;: 1,
&quot;transactionsRoot&quot;: &quot;LuxttCm/pSHVMOKF0sJExk+DJXc=&quot;,
&quot;transactions&quot;: [],
&quot;transactionHashes&quot;: []
}
],
&quot;startTimestamp&quot;: &quot;1610968019&quot;,
&quot;endTimestamp&quot;: &quot;1611038043&quot;
}
</pre></div>
</div>
</div>
</div>
<div class="section" id="query-gettransactionbyhash-query-gettransactionbyhash">
<h4>Query.GetTransactionByHash {#_query_gettransactionbyhash}<a class="headerlink" href="#query-gettransactionbyhash-query-gettransactionbyhash" title="永久链接至标题"></a></h4>
<p>Get a transaction identified by its hash</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>GET http://{{IP}}:{{PORT}}/v0/ledgers/test/transaction?hash=VQBeA5Ee0Y5hqEileoQuYMHbOSE%3D
</pre></div>
</div>
<p><strong>hash</strong> has to be encoded with
<a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent">encodeURIComponent</a></p>
</div>
<div class="section" id="id185">
<h4>返回示例<a class="headerlink" href="#id185" title="永久链接至标题"></a></h4>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;transaction&quot;: {
&quot;blockHash&quot;: &quot;LSKr+K079Ax+rKdlyYN5ze2YGzo=&quot;,
&quot;blockTimestamp&quot;: &quot;1611038043&quot;,
&quot;index&quot;: 0,
&quot;hash&quot;: &quot;VQBeA5Ee0Y5hqEileoQuYMHbOSE=&quot;,
&quot;type&quot;: &quot;RECORD&quot;,
&quot;from&quot;: &quot;8A3K/vANyv7wDcr+8A3K/vANyv4=&quot;,
&quot;nonce&quot;: &quot;0&quot;,
&quot;to&quot;: &quot;AAAAAAAAAAAAAAAAAAAAAAAAAAA=&quot;,
&quot;data&quot;: &quot;lQItWZKS5hlUn6V/DMKKwvZXxvM=&quot;
}
}
</pre></div>
</div>
</div>
<div class="section" id="query-gettransactionbyblockhashandindex-query-gettransactionbyblockhashandindex">
<h4>Query.GetTransactionByBlockHashAndIndex {#_query_gettransactionbyblockhashandindex}<a class="headerlink" href="#query-gettransactionbyblockhashandindex-query-gettransactionbyblockhashandindex" title="永久链接至标题"></a></h4>
<p>Get a transaction identified by hash of the block it belongs to and its
index inside the block</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>GET http://{{IP}}:{{PORT}}/v0/ledgers/test/block/transaction?blockHash=LSKr%2BK079Ax%2BrKdlyYN5ze2YGzo%3D&amp;index=0
</pre></div>
</div>
<p><strong>blockHash</strong> has to be encoded with
<a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent">encodeURIComponent</a></p>
</div>
<div class="section" id="id186">
<h4>返回示例<a class="headerlink" href="#id186" title="永久链接至标题"></a></h4>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;transaction&quot;: {
&quot;blockHash&quot;: &quot;LSKr+K079Ax+rKdlyYN5ze2YGzo=&quot;,
&quot;blockTimestamp&quot;: &quot;1611038043&quot;,
&quot;index&quot;: 0,
&quot;hash&quot;: &quot;VQBeA5Ee0Y5hqEileoQuYMHbOSE=&quot;,
&quot;type&quot;: &quot;RECORD&quot;,
&quot;from&quot;: &quot;8A3K/vANyv7wDcr+8A3K/vANyv4=&quot;,
&quot;nonce&quot;: &quot;0&quot;,
&quot;to&quot;: &quot;AAAAAAAAAAAAAAAAAAAAAAAAAAA=&quot;,
&quot;data&quot;: &quot;lQItWZKS5hlUn6V/DMKKwvZXxvM=&quot;
}
}
</pre></div>
</div>
</div>
<div class="section" id="query-gettransactions-query-gettransactions">
<h4>Query.GetTransactions {#_query_gettransactions}<a class="headerlink" href="#query-gettransactions-query-gettransactions" title="永久链接至标题"></a></h4>
<p>Get transactions in a timestamp range</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">POST</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="p">{{</span><span class="n">IP</span><span class="p">}}:{{</span><span class="n">PORT</span><span class="p">}}</span><span class="o">/</span><span class="n">v0</span><span class="o">/</span><span class="n">ledgers</span><span class="o">/</span><span class="n">test</span><span class="o">/</span><span class="n">transactions</span><span class="o">/</span><span class="n">query</span>
</pre></div>
</div>
<p><strong>start_timestamp</strong> and <strong>end_timestamp</strong> follow the same requirements
and rules as in <a class="reference external" href="#Query.GetBlocks">???</a>.</p>
<div class="section" id="id187">
<h5>请求示例<a class="headerlink" href="#id187" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;start_timestamp&quot;: 1611038000,
&quot;end_timestamp&quot;: 1611039000
}
</pre></div>
</div>
</div>
<div class="section" id="id188">
<h5>返回示例<a class="headerlink" href="#id188" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;transactions&quot;: [
{
&quot;blockHash&quot;: &quot;&quot;,
&quot;blockTimestamp&quot;: &quot;0&quot;,
&quot;index&quot;: 0,
&quot;hash&quot;: &quot;VQBeA5Ee0Y5hqEileoQuYMHbOSE=&quot;,
&quot;type&quot;: &quot;RECORD&quot;,
&quot;from&quot;: &quot;8A3K/vANyv7wDcr+8A3K/vANyv4=&quot;,
&quot;nonce&quot;: &quot;0&quot;,
&quot;to&quot;: &quot;AAAAAAAAAAAAAAAAAAAAAAAAAAA=&quot;,
&quot;data&quot;: &quot;lQItWZKS5hlUn6V/DMKKwvZXxvM=&quot;
}
],
&quot;startTimestamp&quot;: &quot;1611038043&quot;,
&quot;endTimestamp&quot;: &quot;1611038043&quot;
}
</pre></div>
</div>
</div>
</div>
<div class="section" id="query-counttransactions-query-counttransactions">
<h4>Query.CountTransactions {#_query_counttransactions}<a class="headerlink" href="#query-counttransactions-query-counttransactions" title="永久链接至标题"></a></h4>
<p>Count all transactions in a ledger, or transactions in a timestamp range</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">POST</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="p">{{</span><span class="n">IP</span><span class="p">}}:{{</span><span class="n">PORT</span><span class="p">}}</span><span class="o">/</span><span class="n">v0</span><span class="o">/</span><span class="n">ledgers</span><span class="o">/</span><span class="n">test</span><span class="o">/</span><span class="n">transactions</span><span class="o">/</span><span class="n">count</span>
</pre></div>
</div>
<p><strong>start_timestamp</strong> and <strong>end_timestamp</strong> follow the same requirements
and rules as in <a class="reference external" href="#Query.CountBlocks">???</a>.</p>
<div class="section" id="id189">
<h5>请求示例<a class="headerlink" href="#id189" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{}
</pre></div>
</div>
</div>
<div class="section" id="id190">
<h5>返回示例<a class="headerlink" href="#id190" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;count&quot;: &quot;4&quot;,
&quot;startTimestamp&quot;: &quot;0&quot;,
&quot;endTimestamp&quot;: &quot;1611039957&quot;
}
</pre></div>
</div>
</div>
<div class="section" id="id191">
<h5>请求示例2<a class="headerlink" href="#id191" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;start_timestamp&quot;: 1611038000,
&quot;end_timestamp&quot;: 1611039000
}
</pre></div>
</div>
</div>
<div class="section" id="id192">
<h5>返回示例2<a class="headerlink" href="#id192" title="永久链接至标题"></a></h5>
<div class="highlight-{.json} notranslate"><div class="highlight"><pre><span></span>{
&quot;count&quot;: &quot;1&quot;,
&quot;startTimestamp&quot;: &quot;1611038000&quot;,
&quot;endTimestamp&quot;: &quot;1611039000&quot;
}
</pre></div>
</div>
</div>
</div>
</div>
</div>
<hr class="docutils" />
<div class="section" id="websocket">
<h2>合约节点WebSocket接口<a class="headerlink" href="#websocket" title="永久链接至标题"></a></h2>
<div class="section" id="id193">
<h3>用户管理类<a class="headerlink" href="#id193" title="永久链接至标题"></a></h3>
<div class="section" id="session">
<h4>获取Session<a class="headerlink" href="#session" title="永久链接至标题"></a></h4>
<p>登录前获取session以便进行签名。</p>
<div class="section" id="id194">
<h5>参数<a class="headerlink" href="#id194" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>getSessionID</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id195">
<h5>请求示例<a class="headerlink" href="#id195" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">req</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">req</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;getSessionID&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">req</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id196">
<h5>返回结果<a class="headerlink" href="#id196" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onSessionID&quot;</span><span class="p">,</span>
<span class="nt">&quot;session&quot;</span><span class="p">:</span> <span class="s2">&quot;9782323_session&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id197">
<h4>用户登录<a class="headerlink" href="#id197" title="永久链接至标题"></a></h4>
<p>用户进行公私钥身份验证</p>
<div class="section" id="id198">
<h5>参数<a class="headerlink" href="#id198" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>login</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id199">
<h5>请求示例<a class="headerlink" href="#id199" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">loginParam</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">loginParam</span><span class="o">.</span><span class="n">pubKey</span> <span class="o">=</span> <span class="k">global</span><span class="o">.</span><span class="n">sm2Key</span><span class="o">.</span><span class="n">publicKey</span><span class="p">;</span>
<span class="n">loginParam</span><span class="o">.</span><span class="n">signature</span> <span class="o">=</span> <span class="n">sm2</span><span class="o">.</span><span class="n">doSignature</span><span class="p">(</span><span class="k">global</span><span class="o">.</span><span class="n">session</span><span class="p">,</span>
<span class="k">global</span><span class="o">.</span><span class="n">sm2Key</span><span class="o">.</span><span class="n">privateKey</span><span class="p">);</span>
<span class="n">loginParam</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;login&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">loginParam</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id200">
<h5>返回结果<a class="headerlink" href="#id200" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onLogin&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;NodeManager,ContractProvider&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id201">
<h4>申请角色<a class="headerlink" href="#id201" title="永久链接至标题"></a></h4>
<p>在节点管理员界面申请可以申请称为合约管理员(ContractInstanceManager)、合约使用者(ContractUser)、合约提供者ContractProvider)</p>
<div class="section" id="id202">
<h5>参数<a class="headerlink" href="#id202" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>applyNodeRole</td>
</tr>
<tr>
<td>role</td>
<td>申请角色名称</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id203">
<h5>请求示例<a class="headerlink" href="#id203" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;applyNodeRole&quot;</span><span class="p">;</span>
<span class="n">param</span><span class="o">.</span><span class="n">role</span> <span class="o">=</span> <span class="s2">&quot;ContractUser&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id204">
<h5>返回结果<a class="headerlink" href="#id204" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onApplyRole&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;success&quot;</span>
<span class="p">}</span>
<span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onApplyRole&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;already has!&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id205">
<h4>授权角色<a class="headerlink" href="#id205" title="永久链接至标题"></a></h4>
<div class="section" id="id206">
<h5>参数<a class="headerlink" href="#id206" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>authNodeRole</td>
</tr>
<tr>
<td>isAccept</td>
<td>bool类型表示否授权</td>
</tr>
<tr>
<td>pubKey</td>
<td>授权用户公钥</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id207">
<h5>请求示例<a class="headerlink" href="#id207" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;authNodeRole&quot;</span><span class="p">;</span>
<span class="n">param</span><span class="o">.</span><span class="n">isAccept</span> <span class="o">=</span> <span class="n">true</span><span class="p">;</span>
<span class="n">param</span><span class="o">.</span><span class="n">pubKey</span> <span class="o">=</span> <span class="s2">&quot;xxxxx&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id208">
<h5>返回结果<a class="headerlink" href="#id208" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onAuthNodeRole&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;success&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id209">
<h4>删除用户角色<a class="headerlink" href="#id209" title="永久链接至标题"></a></h4>
<div class="section" id="id210">
<h5>参数<a class="headerlink" href="#id210" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>deleteRole</td>
</tr>
<tr>
<td>role</td>
<td>删除角色名称</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id211">
<h5>请求示例<a class="headerlink" href="#id211" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">deleteInfo</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">deleteInfo</span><span class="o">.</span><span class="n">pubKey</span> <span class="o">=</span> <span class="k">global</span><span class="o">.</span><span class="n">authorizedUsers</span><span class="o">.</span><span class="p">[</span><span class="n">publicKey</span><span class="p">];</span>
<span class="n">deleteInfo</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;deleteRole&quot;</span><span class="p">;</span>
<span class="n">deleteInfo</span><span class="o">.</span><span class="n">role</span><span class="o">=</span><span class="s2">&quot;ContractUser&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">deleteInfo</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id212">
<h5>返回结果<a class="headerlink" href="#id212" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onDeleteRole&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;success&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id213">
<h4>查看授权用户列表<a class="headerlink" href="#id213" title="永久链接至标题"></a></h4>
<p>查看准入管理员当前组网中已经授权的节点管理员</p>
<div class="section" id="id214">
<h5>参数<a class="headerlink" href="#id214" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>listAllAuthRole</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id215">
<h5>请求示例<a class="headerlink" href="#id215" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;listAllAuthRole&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id216">
<h5>返回结果<a class="headerlink" href="#id216" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onListAllAuthRole&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span>
<span class="p">{</span>
<span class="nt">&quot;kv&quot;</span><span class="p">:[{</span><span class="nt">&quot;key&quot;</span><span class="p">:</span><span class="s2">&quot;04eafad549d0757cf67f360815e15e157c7428c9ea9fb933f31a5d45bfb6edd9809c5bf6a5f37d7b817207f19fb2d76b7dbdefe38084cd3282e37b9ac39959dfab&quot;</span><span class="p">,</span>
<span class="nt">&quot;value&quot;</span><span class="p">:</span><span class="s2">&quot;NodeManager,ContractProvider,ContractUser,ContractInstanceManager&quot;</span><span class="p">}],</span>
<span class="nt">&quot;time&quot;</span><span class="p">:[{</span><span class="nt">&quot;key&quot;</span><span class="p">:</span><span class="s2">&quot;04eafad549d0757cf67f360815e15e157c7428c9ea9fb933f31a5d45bfb6edd9809c5bf6a5f37d7b817207f19fb2d76b7dbdefe38084cd3282e37b9ac39959dfab&quot;</span><span class="p">,</span>
<span class="nt">&quot;value&quot;</span><span class="p">:</span><span class="s2">&quot;1617178709933&quot;</span><span class="p">}]</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id217">
<h4>查看申请用户列表<a class="headerlink" href="#id217" title="永久链接至标题"></a></h4>
<div class="section" id="id218">
<h5>参数<a class="headerlink" href="#id218" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>listUnAuthRole</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id219">
<h5>请求示例<a class="headerlink" href="#id219" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;listUnAuthRole&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id220">
<h5>返回结果<a class="headerlink" href="#id220" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onListUnAuthRole&quot;</span><span class="p">,</span>
<span class="nt">&quot;kv&quot;</span><span class="p">:</span> <span class="p">[{</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7&quot;</span><span class="p">,</span>
<span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;ContractProvider,ContractUser&quot;</span>
<span class="p">}],</span>
<span class="nt">&quot;time&quot;</span><span class="p">:</span> <span class="p">[{</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7&quot;</span><span class="p">,</span>
<span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;1587398989914&quot;</span>
<span class="p">}]</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="id221">
<h5>参数(删除)<a class="headerlink" href="#id221" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>queryUserStat</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id222">
<h5>请求示例<a class="headerlink" href="#id222" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;queryUserStat&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id223">
<h5>返回结果<a class="headerlink" href="#id223" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onQueryUserStat&quot;</span><span class="p">,</span>
<span class="nt">&quot;userListCount&quot;</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span>
<span class="nt">&quot;applyListCount&quot;</span><span class="p">:</span><span class="mi">0</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="id224">
<h3>合约代码管理类<a class="headerlink" href="#id224" title="永久链接至标题"></a></h3>
<div class="section" id="id225">
<h4>获取公共合约文件列表<a class="headerlink" href="#id225" title="永久链接至标题"></a></h4>
<div class="section" id="id226">
<h5>参数<a class="headerlink" href="#id226" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>listProjects</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id227">
<h5>请求示例<a class="headerlink" href="#id227" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">request</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">request</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;listProjects&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id228">
<h5>返回结果<a class="headerlink" href="#id228" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onListProjects&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;[\&quot;AnnotationSample\&quot;,\&quot;AppDataAnalysis\&quot;,\&quot;AppDataSource\&quot;,\&quot;BiddingExample\&quot;,\&quot;ContractExecutor\&quot;]&quot;</span><span class="p">,</span>
<span class="nt">&quot;executeTime&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
<span class="nt">&quot;isPrivate&quot;</span><span class="p">:</span><span class="kc">false</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id229">
<h4>获取私有合约文件列表<a class="headerlink" href="#id229" title="永久链接至标题"></a></h4>
<div class="section" id="id230">
<h5>参数<a class="headerlink" href="#id230" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>listProjects</td>
</tr>
<tr>
<td>pubKey</td>
<td>该用户的公钥</td>
</tr>
<tr>
<td>isPrivate</td>
<td>true</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id231">
<h5>请求示例<a class="headerlink" href="#id231" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">var</span> <span class="nx">request</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">action</span> <span class="o">=</span> <span class="s2">&quot;listProjects&quot;</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">pubKey</span> <span class="o">=</span> <span class="s2">&quot;global.sm2.publicKey&quot;</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">isPrivate</span><span class="o">=</span><span class="kc">true</span><span class="p">;</span>
<span class="nx">wssocket</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id232">
<h5>返回结果<a class="headerlink" href="#id232" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onListProjects&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;[\&quot;CSVFromTemplate\&quot;,\&quot;Empty22\&quot;,\&quot;MySQLFromTemplate\&quot;,\&quot;test\&quot;]&quot;</span><span class="p">,</span>
<span class="nt">&quot;executeTime&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
<span class="nt">&quot;isPrivate&quot;</span><span class="p">:</span><span class="kc">true</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id233">
<h4>获取合约实例<a class="headerlink" href="#id233" title="永久链接至标题"></a></h4>
<div class="section" id="id234">
<h5>参数<a class="headerlink" href="#id234" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>listContractProcess</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id235">
<h5>请求示例<a class="headerlink" href="#id235" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">request</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">request</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;listContractProcess&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id236">
<h5>返回结果<a class="headerlink" href="#id236" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onListContractProcess&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;[{\&quot;id\&quot;: \&quot;1658407837\&quot;,\&quot;name\&quot;: \&quot;BDCoin\&quot;,\&quot;port\&quot;: \&quot;1617\&quot;}]&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id237">
<h4>启动合约<a class="headerlink" href="#id237" title="永久链接至标题"></a></h4>
<div class="section" id="id238">
<h5>参数<a class="headerlink" href="#id238" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>startContract</td>
</tr>
<tr>
<td>owner</td>
<td>pubkey</td>
</tr>
<tr>
<td>requestID</td>
<td>当前时间</td>
</tr>
<tr>
<td>script</td>
<td>脚本内容</td>
</tr>
<tr>
<td>signature</td>
<td>签名</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id239">
<h5>请求示例<a class="headerlink" href="#id239" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">request</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;startContract&quot;</span><span class="p">;</span>
<span class="n">request</span><span class="o">.</span><span class="n">owner</span> <span class="o">=</span> <span class="k">global</span><span class="o">.</span><span class="n">sm2Key</span><span class="o">.</span><span class="n">publicKey</span><span class="p">;</span>
<span class="n">request</span><span class="o">.</span><span class="n">requestID</span> <span class="o">=</span> <span class="n">new</span> <span class="n">Date</span><span class="p">()</span><span class="o">.</span><span class="n">getTime</span><span class="p">()</span> <span class="o">+</span> <span class="s2">&quot;&quot;</span><span class="p">;</span>
<span class="n">request</span><span class="o">.</span><span class="n">script</span> <span class="o">=</span> <span class="k">global</span><span class="o">.</span><span class="n">projectScript</span><span class="p">;</span>
<span class="n">request</span><span class="o">.</span><span class="n">signature</span> <span class="o">=</span> <span class="n">sm2</span><span class="o">.</span><span class="n">doSignature</span><span class="p">(</span><span class="s2">&quot;Algorithm|&quot;</span> <span class="o">+</span> <span class="n">request</span><span class="o">.</span><span class="n">script</span> <span class="o">+</span> <span class="s2">&quot;|&quot;</span> <span class="o">+</span> <span class="k">global</span><span class="o">.</span><span class="n">sm2Key</span><span class="o">.</span><span class="n">publicKey</span><span class="p">,</span> <span class="k">global</span><span class="o">.</span><span class="n">sm2Key</span><span class="o">.</span><span class="n">privateKey</span><span class="p">);</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id240">
<h5>返回结果<a class="headerlink" href="#id240" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;{\&quot;needSeq\&quot;:false,\&quot;seq\&quot;:0,\&quot;status\&quot;:\&quot;Success\&quot;,\&quot;result\&quot;:\&quot;\&quot;,\&quot;isInsnLimit\&quot;:false,\&quot;totalGas\&quot;:0,\&quot;executionGas\&quot;:0,\&quot;extraGas\&quot;:0,\&quot;size\&quot;:0,\&quot;eventRelated\&quot;:false}&quot;</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onStartContract&quot;</span><span class="p">,</span>
<span class="nt">&quot;cid&quot;</span><span class="p">:</span><span class="s2">&quot;-506393888&quot;</span><span class="p">,</span>
<span class="nt">&quot;executeTime&quot;</span><span class="p">:</span><span class="mi">2496</span><span class="p">,</span>
<span class="nt">&quot;responseID&quot;</span><span class="p">:</span><span class="s2">&quot;1617206735696&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id241">
<h4>启动可信集群合约<a class="headerlink" href="#id241" title="永久链接至标题"></a></h4>
<div class="section" id="id242">
<h5>参数<a class="headerlink" href="#id242" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>startContractP2PTrustfully</td>
</tr>
<tr>
<td>owner</td>
<td>pubkey</td>
</tr>
<tr>
<td>isPrivate</td>
<td>当前时间</td>
</tr>
<tr>
<td>path</td>
<td>脚本所在路径</td>
</tr>
<tr>
<td>signature</td>
<td>签名</td>
</tr>
<tr>
<td>peersID</td>
<td>可信执行集群中的节点peerID组成的数组</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</tbody>
</table></div>
<div class="section" id="id243">
<h5>请求示例<a class="headerlink" href="#id243" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">var</span> <span class="nx">request</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">action</span> <span class="o">=</span> <span class="s2">&quot;startContractP2PTrustfully&quot;</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">peersID</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;3r729hf2ehf982&quot;</span><span class="p">,</span><span class="s2">&quot;sjdfiwoehfwoi34&quot;</span><span class="p">,</span><span class="s2">&quot;wnfnwoeifnwenef&quot;</span><span class="p">];</span>
<span class="kd">var</span> <span class="nx">project</span> <span class="o">=</span> <span class="s2">&quot;JsonTest&quot;</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">path</span> <span class="o">=</span> <span class="s2">&quot;/&quot;</span> <span class="o">+</span> <span class="nx">project</span> <span class="o">+</span> <span class="s2">&quot;/mainfest.json&quot;</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">isPrivate</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">signature</span> <span class="o">=</span> <span class="nx">sm2</span><span class="p">.</span><span class="nx">doSignature</span><span class="p">(</span><span class="s2">&quot;Trusted|&quot;</span> <span class="o">+</span> <span class="nx">request</span><span class="p">.</span><span class="nx">path</span> <span class="o">+</span> <span class="s2">&quot;|&quot;</span>
<span class="o">+</span> <span class="nx">global</span><span class="p">.</span><span class="nx">sm2Key</span><span class="p">.</span><span class="nx">publicKey</span><span class="p">,</span> <span class="nx">global</span><span class="p">.</span><span class="nx">sm2Key</span><span class="p">.</span><span class="nx">privateKey</span><span class="p">);</span> <span class="c1">//合约的签名</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">resultcheck</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="s2">&quot;#resultcheck&quot;</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">value</span><span class="p">;</span>
<span class="nx">wssocket</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id244">
<h5>返回结果<a class="headerlink" href="#id244" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;{\&quot;status\&quot;:\&quot;Success\&quot;,\&quot;result\&quot;:\&quot;\&quot;}&quot;</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onStartContractP2PTrustfully&quot;</span><span class="p">,</span>
<span class="nt">&quot;cid&quot;</span><span class="p">:</span><span class="s2">&quot;-1543583350&quot;</span><span class="p">,</span>
<span class="nt">&quot;executeTime&quot;</span><span class="p">:</span><span class="mi">1544</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id245">
<h4>分发合约项目<a class="headerlink" href="#id245" title="永久链接至标题"></a></h4>
<div class="section" id="id246">
<h5>参数<a class="headerlink" href="#id246" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>distributeContract</td>
</tr>
<tr>
<td>peersID</td>
<td>集群中节点peer</td>
</tr>
<tr>
<td>projectName</td>
<td>合约名</td>
</tr>
<tr>
<td>isPrivate</td>
<td>是否在私有目录</td>
</tr>
<tr>
<td>sponsorPeerID</td>
<td>发起者ID</td>
</tr>
<tr>
<td>signature</td>
<td>签名</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id247">
<h5>请求示例<a class="headerlink" href="#id247" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="nx">request</span><span class="p">.</span><span class="nx">action</span> <span class="o">=</span> <span class="s2">&quot;distributeContract&quot;</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">peersID</span> <span class="o">=</span> <span class="nx">peersID</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">projectName</span> <span class="o">=</span> <span class="nx">global</span><span class="p">.</span><span class="nx">projects</span><span class="p">[</span><span class="nx">global</span><span class="p">.</span><span class="nx">lastClickedProjectId</span><span class="p">];</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">isPrivate</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="s2">&quot;#privateDir-tab&quot;</span><span class="p">).</span><span class="nx">hasClass</span><span class="p">(</span><span class="s2">&quot;active&quot;</span><span class="p">);</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">sponsorPeerID</span> <span class="o">=</span> <span class="nx">global</span><span class="p">.</span><span class="nx">peerID</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">signature</span> <span class="o">=</span> <span class="nx">sm2</span><span class="p">.</span><span class="nx">doSignature</span><span class="p">(</span><span class="s2">&quot;DistributeContract|&quot;</span> <span class="o">+</span> <span class="nx">request</span><span class="p">.</span><span class="nx">projectName</span> <span class="o">+</span> <span class="s2">&quot;|&quot;</span> <span class="o">+</span> <span class="nx">global</span><span class="p">.</span><span class="nx">sm2Key</span><span class="p">.</span><span class="nx">publicKey</span><span class="p">,</span> <span class="nx">global</span><span class="p">.</span><span class="nx">sm2Key</span><span class="p">.</span><span class="nx">privateKey</span><span class="p">);</span>
<span class="nx">wssocket</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id248">
<h5>返回结果<a class="headerlink" href="#id248" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onDistributeContract&quot;</span><span class="p">,</span>
<span class="nt">&quot;progress&quot;</span><span class="p">:</span><span class="s2">&quot;100.00%&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id249">
<h4>终止合约<a class="headerlink" href="#id249" title="永久链接至标题"></a></h4>
<div class="section" id="id250">
<h5>参数<a class="headerlink" href="#id250" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>killContractProcess</td>
</tr>
<tr>
<td>id</td>
<td>合约id</td>
</tr>
<tr>
<td>requestID</td>
<td>请求ID</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id251">
<h5>请求示例<a class="headerlink" href="#id251" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">request</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;killContractProcess&quot;</span><span class="p">;</span>
<span class="n">request</span><span class="o">.</span><span class="n">id</span> <span class="o">=</span> <span class="n">contractid</span><span class="p">;</span>
<span class="n">request</span><span class="o">.</span><span class="n">requestID</span> <span class="o">=</span> <span class="n">new</span> <span class="n">Date</span><span class="p">()</span><span class="o">.</span><span class="n">getTime</span><span class="p">()</span> <span class="o">+</span> <span class="s2">&quot;&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id252">
<h5>返回结果<a class="headerlink" href="#id252" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;ContractHandler: exit in 3 seconds!&quot;</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onOutputStream&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id253">
<h4>终止所有合约<a class="headerlink" href="#id253" title="永久链接至标题"></a></h4>
<div class="section" id="id254">
<h5>参数<a class="headerlink" href="#id254" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>killAllContract</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id255">
<h5>请求示例<a class="headerlink" href="#id255" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">request</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;killAllContract&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id256">
<h5>返回结果<a class="headerlink" href="#id256" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onKillAllContract&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;Kill:7241,7245,&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id257">
<h4>静态分析合约<a class="headerlink" href="#id257" title="永久链接至标题"></a></h4>
<div class="section" id="id258">
<h5>参数<a class="headerlink" href="#id258" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>staticVerifyContract</td>
</tr>
<tr>
<td>owner</td>
<td>用户私钥</td>
</tr>
<tr>
<td>isPartial</td>
<td>是否是部分</td>
</tr>
<tr>
<td>contractid</td>
<td>contractid</td>
</tr>
<tr>
<td>script</td>
<td>脚本内容</td>
</tr>
<tr>
<td>path</td>
<td>合约文件名</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id259">
<h5>请求示例<a class="headerlink" href="#id259" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="nx">request</span><span class="p">.</span><span class="nx">action</span> <span class="o">=</span> <span class="s2">&quot;staticVerifyContract&quot;</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">owner</span> <span class="o">=</span> <span class="nx">global</span><span class="p">.</span><span class="nx">sm2Key</span><span class="p">.</span><span class="nx">privateKey</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">isPartial</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">contractid</span> <span class="o">=</span> <span class="nx">contractid</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">script</span> <span class="o">=</span> <span class="nx">global</span><span class="p">.</span><span class="nx">projectScript</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">path</span> <span class="o">=</span> <span class="nx">global</span><span class="p">.</span><span class="nx">projectName</span><span class="p">;</span>
<span class="nx">wssocket</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id260">
<h5>返回结果<a class="headerlink" href="#id260" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;{\&quot;needSeq\&quot;:false,\&quot;seq\&quot;:0,\&quot;status\&quot;:\&quot;Success\&quot;,\&quot;result\&quot;:{\&quot;hello\&quot;:\&quot;Ret:\&quot;},\&quot;isInsnLimit\&quot;:false,\&quot;totalGas\&quot;:0,\&quot;executionGas\&quot;:0,\&quot;extraGas\&quot;:0,\&quot;size\&quot;:0,\&quot;eventRelated\&quot;:false}&quot;</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onStaticVerifyResult&quot;</span><span class="p">,</span>
<span class="nt">&quot;cid&quot;</span><span class="p">:</span><span class="s2">&quot;verify&quot;</span><span class="p">,</span>
<span class="nt">&quot;executeTime&quot;</span><span class="p">:</span><span class="mi">83</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id261">
<h4>删除合约<a class="headerlink" href="#id261" title="永久链接至标题"></a></h4>
<div class="section" id="id262">
<h5>参数<a class="headerlink" href="#id262" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>deleteFile</td>
</tr>
<tr>
<td>file</td>
<td>fileName</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id263">
<h5>请求示例<a class="headerlink" href="#id263" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="nx">request</span><span class="p">.</span><span class="nx">action</span> <span class="o">=</span> <span class="s2">&quot;deleteFile&quot;</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">file</span> <span class="o">=</span> <span class="nx">fileName</span><span class="p">;</span>
<span class="nx">wssocket</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id264">
<h5>返回结果<a class="headerlink" href="#id264" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onDeleteFile&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;success&quot;</span><span class="p">,</span>
<span class="nt">&quot;executeTime&quot;</span><span class="p">:</span><span class="mi">0</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id265">
<h4>私有合约传至公共目录<a class="headerlink" href="#id265" title="永久链接至标题"></a></h4>
<div class="section" id="id266">
<h5>参数<a class="headerlink" href="#id266" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>changePublic</td>
</tr>
<tr>
<td>pubkey</td>
<td>用户公钥</td>
</tr>
<tr>
<td>fileName</td>
<td>fileName</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id267">
<h5>请求示例<a class="headerlink" href="#id267" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="nx">request</span><span class="p">.</span><span class="nx">action</span> <span class="o">=</span> <span class="s2">&quot;changePublic&quot;</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">pubkey</span> <span class="o">=</span> <span class="nx">pubkey</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">fileName</span> <span class="o">=</span> <span class="nx">fileName</span><span class="p">;</span>
<span class="nx">wssocket</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id268">
<h5>返回结果<a class="headerlink" href="#id268" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onChangePublic&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;success&quot;</span><span class="p">,</span>
<span class="nt">&quot;executeTime&quot;</span><span class="p">:</span><span class="mi">0</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id269">
<h4>上传合约<a class="headerlink" href="#id269" title="永久链接至标题"></a></h4>
<div class="section" id="id270">
<h5>参数<a class="headerlink" href="#id270" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>UploadFile</td>
</tr>
<tr>
<td>isAppend</td>
<td>false</td>
</tr>
<tr>
<td>fileName</td>
<td>fileName</td>
</tr>
<tr>
<td>path</td>
<td>path</td>
</tr>
<tr>
<td>isPrivate</td>
<td>true/false</td>
</tr>
<tr>
<td>content</td>
<td>fileContent(base64编码</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id271">
<h5>请求示例<a class="headerlink" href="#id271" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">request</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;uploadFile&quot;</span><span class="p">;</span>
<span class="n">request</span><span class="o">.</span><span class="n">isAppend</span> <span class="o">=</span> <span class="n">false</span><span class="p">;</span>
<span class="n">request</span><span class="o">.</span><span class="n">fileName</span> <span class="o">=</span> <span class="s2">&quot;test1.yjs&quot;</span><span class="p">;</span>
<span class="n">request</span><span class="o">.</span><span class="n">path</span> <span class="o">=</span> <span class="s2">&quot;test1&quot;</span><span class="p">;</span>
<span class="n">text</span><span class="o">=</span><span class="s2">&quot;Y29udHJhY3QgdGVzdDF7CglleHBvcnQgZnVuY3Rpb24gaGVsbG8oYXJnKXsgCiAgICAgICAgcmV0dXJuICJ3b3JsZCI7ICAKICAgIH0gICAKfQ==&quot;</span>
<span class="n">request</span><span class="o">.</span><span class="n">content</span> <span class="o">=</span> <span class="n">text</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id272">
<h5>返回结果<a class="headerlink" href="#id272" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onUploadFile&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;success&quot;</span><span class="p">,</span>
<span class="nt">&quot;executeTime&quot;</span><span class="p">:</span><span class="mi">0</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id273">
<h4>编译合约<a class="headerlink" href="#id273" title="永久链接至标题"></a></h4>
<div class="section" id="id274">
<h5>参数<a class="headerlink" href="#id274" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>compile</td>
</tr>
<tr>
<td>path</td>
<td>string, 待编译的项目名称</td>
</tr>
<tr>
<td>privateTab</td>
<td>bool, 是否为私有目录的项目</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id275">
<h5>请求示例<a class="headerlink" href="#id275" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">var</span> <span class="nx">req</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;action&quot;</span><span class="o">:</span><span class="s2">&quot;compile&quot;</span><span class="p">,</span><span class="s2">&quot;path&quot;</span><span class="o">:</span><span class="s2">&quot;Hello&quot;</span><span class="p">,</span><span class="s2">&quot;privateTab&quot;</span><span class="o">:</span><span class="kc">true</span><span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="id276">
<h5>返回结果<a class="headerlink" href="#id276" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">&quot;result&quot;</span><span class="p">:</span><span class="s2">&quot;Hello_2020-08-17-09:09:40.ypk&quot;</span><span class="p">,</span><span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onCompile&quot;</span><span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id277">
<h4>锁定私有目录<a class="headerlink" href="#id277" title="永久链接至标题"></a></h4>
<p>锁定某个用户的的私有目录编辑功能</p>
<div class="section" id="id278">
<h5>参数<a class="headerlink" href="#id278" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>lockEdit</td>
</tr>
<tr>
<td>pubKey</td>
<td>string, 要被锁定的公钥</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id279">
<h5>请求示例<a class="headerlink" href="#id279" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">var</span> <span class="nx">req</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">action</span> <span class="o">=</span> <span class="s2">&quot;lockEdit&quot;</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">pubKey</span> <span class="o">=</span> <span class="s2">&quot;xxxxxx&quot;</span><span class="p">;</span>
<span class="nx">wssocket</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">req</span><span class="p">));</span>
</pre></div>
</div>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onLockEdit&quot;</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span><span class="s2">&quot;success&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;04c4c855862b53f323e077ccfcc744ecc2c0a04645ed16d99ede8fd5866b38c0670a97ad22c6260d1a4672aba2a5fe229a2d4eba34627c054aab102620afa288c1&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id280">
<h4>解锁私有目录<a class="headerlink" href="#id280" title="永久链接至标题"></a></h4>
<p>解锁某个用户的的私有目录编辑功能</p>
<div class="section" id="id281">
<h5>参数<a class="headerlink" href="#id281" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>unLockEdit</td>
</tr>
<tr>
<td>pubKey</td>
<td>string, 要被锁定的公钥</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id282">
<h5>请求示例<a class="headerlink" href="#id282" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">var</span> <span class="nx">req</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">action</span> <span class="o">=</span> <span class="nx">unlockEdit</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">pubKey</span> <span class="o">=</span> <span class="s2">&quot;xxxxxx&quot;</span><span class="p">;</span>
<span class="nx">wssocket</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">req</span><span class="p">));</span>
</pre></div>
</div>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onUnlockEdit&quot;</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span><span class="s2">&quot;success&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;04c4c855862b53f323e077ccfcc744ecc2c0a04645ed16d99ede8fd5866b38c0670a97ad22c6260d1a4672aba2a5fe229a2d4eba34627c054aab102620afa288c1&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="id283">
<h3>合约实例管理类<a class="headerlink" href="#id283" title="永久链接至标题"></a></h3>
<div class="section" id="id284">
<h4>查询合约进程<a class="headerlink" href="#id284" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 查询服务器上已经启动的所有合约进程.</p>
<div class="section" id="id285">
<h5>参数<a class="headerlink" href="#id285" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>listContractProcess</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id286">
<h5>请求示例<a class="headerlink" href="#id286" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">var</span> <span class="nx">request</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">action</span> <span class="o">=</span> <span class="s2">&quot;listContractProcess&quot;</span><span class="p">;</span>
<span class="nx">wssocket</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id287">
<h5>返回结果示例<a class="headerlink" href="#id287" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onListContractProcess&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;[...]&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id288">
<h4>调用合约<a class="headerlink" href="#id288" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 调用某个合约.</p>
<div class="section" id="id289">
<h5>参数<a class="headerlink" href="#id289" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>executeContract</td>
</tr>
<tr>
<td>contractID</td>
<td>合约ID</td>
</tr>
<tr>
<td>withDynamicAnalysis</td>
<td>true/false 是否进行动态分析,可选</td>
</tr>
<tr>
<td>operation</td>
<td>调用合约的方法名</td>
</tr>
<tr>
<td>arg</td>
<td>调用合约的参数</td>
</tr>
<tr>
<td>pubkey</td>
<td>调用者公钥,可选</td>
</tr>
<tr>
<td>signature</td>
<td>调用者签名 ,可选</td>
</tr>
</tbody>
</table><p><code class="docutils literal notranslate"><span class="pre">*</span></code>表示可选参数</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="c1">//sm2 可从sm2.js中加载获得。</span>
<span class="nx">signature</span> <span class="o">=</span> <span class="nx">sm2</span><span class="p">.</span><span class="nx">doSignature</span><span class="p">(</span><span class="nx">contractID</span><span class="o">+</span><span class="s2">&quot;|&quot;</span><span class="o">+</span><span class="nx">operation</span><span class="o">+</span><span class="s2">&quot;|&quot;</span><span class="o">+</span><span class="nx">arg</span><span class="o">+</span><span class="s2">&quot;|&quot;</span><span class="o">+</span><span class="nx">pubkey</span><span class="p">,</span><span class="nx">privateKey</span><span class="p">);</span>
</pre></div>
</div>
</div>
<div class="section" id="id290">
<h5>请求示例<a class="headerlink" href="#id290" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">var</span> <span class="nx">request</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">action</span> <span class="o">=</span> <span class="s2">&quot;executeContract&quot;</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">contractID</span> <span class="o">=</span> <span class="s2">&quot;2073401446&quot;</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">operation</span> <span class="o">=</span> <span class="s2">&quot;main&quot;</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">arg</span> <span class="o">=</span> <span class="s2">&quot;hhhhh&quot;</span><span class="p">;</span>
<span class="nx">wssocket</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id291">
<h5>返回结果示例<a class="headerlink" href="#id291" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;needSeq&quot;</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span>
<span class="nt">&quot;seq&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span><span class="s2">&quot;Success&quot;</span><span class="p">,</span>
<span class="nt">&quot;result&quot;</span><span class="p">:</span><span class="s2">&quot;world&quot;</span><span class="p">,</span>
<span class="nt">&quot;isInsnLimit&quot;</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span>
<span class="nt">&quot;totalGas&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
<span class="nt">&quot;executionGas&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
<span class="nt">&quot;extraGas&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
<span class="nt">&quot;size&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
<span class="nt">&quot;eventRelated&quot;</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span>
<span class="nt">&quot;responseID&quot;</span><span class="p">:</span><span class="s2">&quot;1617211077264_223&quot;</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onExecuteResult&quot;</span><span class="p">,</span>
<span class="nt">&quot;executeTime&quot;</span><span class="p">:</span><span class="s2">&quot;5&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id292">
<h4>输出历史记录日志(删除)<a class="headerlink" href="#id292" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 获取节点服务器上合约的TimeTravel日志.</p>
<div class="section" id="id293">
<h5>参数<a class="headerlink" href="#id293" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>printTimeTravelLog</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id294">
<h5>请求示例<a class="headerlink" href="#id294" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">var</span> <span class="nx">request</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">action</span> <span class="o">=</span> <span class="s2">&quot;printTimeTravelLog&quot;</span><span class="p">;</span>
<span class="nx">wssocket</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id295">
<h5>返回结果示例<a class="headerlink" href="#id295" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;[CMActions] dumpContract :…t/contractExamples/memoryDumps/LicenceManager\n&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id296">
<h4>输出节点转移日志(删除)<a class="headerlink" href="#id296" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 获取节点服务器的状态转移日志.</p>
<div class="section" id="id297">
<h5>参数<a class="headerlink" href="#id297" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>printTransferLog</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id298">
<h5>请求示例<a class="headerlink" href="#id298" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">var</span> <span class="nx">request</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">action</span> <span class="o">=</span> <span class="s2">&quot;printTransferLog&quot;</span><span class="p">;</span>
<span class="nx">wssocket</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id299">
<h5>返回结果示例<a class="headerlink" href="#id299" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span> <span class="p">{</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id300">
<h4>合约状态迁移<a class="headerlink" href="#id300" title="永久链接至标题"></a></h4>
<p>向服务器发送请求, 获取节点服务器的状态转移日志.</p>
<div class="section" id="id301">
<h5>参数<a class="headerlink" href="#id301" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>loadMemory</td>
</tr>
<tr>
<td>contractName</td>
<td>合约名称</td>
</tr>
<tr>
<td>memoryFile</td>
<td>合约文件名称</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id302">
<h5>请求示例<a class="headerlink" href="#id302" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">var</span> <span class="nx">request</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">action</span> <span class="o">=</span> <span class="s2">&quot;loadMemory&quot;</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">contractName</span> <span class="o">=</span> <span class="s2">&quot;JsonContract&quot;</span><span class="p">;</span>
<span class="nx">request</span><span class="p">.</span><span class="nx">memoryFile</span> <span class="o">=</span> <span class="s2">&quot;2020-03-17.20/42/55&quot;</span><span class="p">;</span>
<span class="nx">wssocket</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id303">
<h5>返回结果示例<a class="headerlink" href="#id303" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;success&quot;</span><span class="p">,</span>
<span class="nt">&quot;size&quot;</span><span class="p">:</span><span class="s2">&quot;0.00 B&quot;</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onTransferTo&quot;</span><span class="p">,</span>
<span class="nt">&quot;time&quot;</span><span class="p">:</span><span class="s2">&quot;0.01s&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="id304">
<h3>日志查看类<a class="headerlink" href="#id304" title="永久链接至标题"></a></h3>
<div class="section" id="n">
<h4>查看本地近n日节点日志删除<a class="headerlink" href="#n" title="永久链接至标题"></a></h4>
<div class="section" id="id305">
<h5>参数<a class="headerlink" href="#id305" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>listLocalNodeLog</td>
</tr>
<tr>
<td>date</td>
<td>当前时间</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id306">
<h5>请求示例<a class="headerlink" href="#id306" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">request</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;listLocalNodeLog&quot;</span><span class="p">;</span>
<span class="n">request</span><span class="o">.</span><span class="n">date</span> <span class="o">=</span> <span class="n">new</span> <span class="n">Date</span><span class="p">()</span><span class="o">.</span><span class="n">getTime</span><span class="p">()</span> <span class="o">-</span> <span class="mi">24</span> <span class="o">*</span> <span class="mi">3600</span> <span class="o">*</span> <span class="mi">1000</span> <span class="o">*</span> <span class="n">n</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id307">
<h5>返回结果<a class="headerlink" href="#id307" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;[{\&quot;action\&quot;:\&quot;login\&quot;,\&quot;pubKey\&quot;:\&quot;null\&quot;,\&quot;status\&quot;:\&quot;accept\&quot;,\&quot;date\&quot;:1583139323822}\&quot;,]&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id308">
<h4>查看本地近n日合约日志删除<a class="headerlink" href="#id308" title="永久链接至标题"></a></h4>
<div class="section" id="id309">
<h5>参数<a class="headerlink" href="#id309" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>listLocalContractLog</td>
</tr>
<tr>
<td>date</td>
<td>当前时间</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id310">
<h5>请求示例<a class="headerlink" href="#id310" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">request</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;listLocalContractLog&quot;</span><span class="p">;</span>
<span class="n">request</span><span class="o">.</span><span class="n">date</span> <span class="o">=</span> <span class="n">new</span> <span class="n">Date</span><span class="p">()</span><span class="o">.</span><span class="n">getTime</span><span class="p">()</span> <span class="o">-</span> <span class="mi">24</span> <span class="o">*</span> <span class="mi">3600</span> <span class="o">*</span> <span class="mi">1000</span> <span class="o">*</span> <span class="n">n</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id311">
<h5>返回结果<a class="headerlink" href="#id311" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;[\&quot;{\&quot;action\&quot;:\&quot;startContract\&quot;,\&quot;pubKey\&quot;:\&quot;04405d7ba358d9234939623ab51ea94ca685e6a1f36ed81fd9630ccba6473e632f163bb30faffd4c91f21e5bace20101d6d6e36c04ac67eea14cc24b4962b84f57\&quot;,\&quot;contractID\&quot;:\&quot;845581788\&quot;,\&quot;contractName\&quot;:\&quot;null\&quot;,\&quot;date\&quot;:1583141525539}\&quot;]&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="id312">
<h3>节点配置类<a class="headerlink" href="#id312" title="永久链接至标题"></a></h3>
<div class="section" id="id313">
<h4>获取节点配置信息<a class="headerlink" href="#id313" title="永久链接至标题"></a></h4>
<div class="section" id="id314">
<h5>参数<a class="headerlink" href="#id314" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>loadNodeConfig</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id315">
<h5>请求示例<a class="headerlink" href="#id315" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;loadNodeConfig&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id316">
<h5>返回结果<a class="headerlink" href="#id316" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="s2">&quot;status&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onLoadNodeConfig&quot;</span><span class="p">,</span>
<span class="s2">&quot;data&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;nodeName&quot;</span><span class="p">:</span> <span class="s2">&quot;04BF52213343C147E631B877BCEB17B794230EE551E85F58FA429C4BA03D690778CC384C6916C63DF36CB9E35C7E274FDB4E18491DFE3D611D347856D441CACC5AF9090B515F02AFC2DFBF56461EC83B5A4CD342466360D6CF82E6E40B637430AC4A329CCBC798DAF7D526AF9E3B3600E0BEA1BFAB8C160EF90128FAF67B19E45F37664F1E4B&quot;</span><span class="p">,</span>
<span class="s2">&quot;licence&quot;</span><span class="p">:</span> <span class="s2">&quot;04AADCC7103CD02626D228AFFBEF53F8242ECA4DDD6F179D30B622440666715CFBB6FD1D3678A2B25812DEA9917073E79A65F7ADE517F784DC76288EFCEB37ECAA1025E6903540702F729DA1C2ECCD93F4E6FAFCE40DF443E7FD74387169D0C6D927C7BB12882D0471C8D3E6F31B0316A42FC38F6DD9978D4351B23B2AD63E2244909E98F51185D32CB99B4AE4E22D3AB4C04027BB&quot;</span><span class="p">,</span>
<span class="s2">&quot;expireTime&quot;</span><span class="p">:</span> <span class="s2">&quot;Wed Aug 26 09:43:08 CST 2020&quot;</span><span class="p">,</span>
<span class="s2">&quot;nodes&quot;</span><span class="p">:</span> <span class="s2">&quot;[</span><span class="se">\&quot;</span><span class="s2">node1</span><span class="se">\&quot;</span><span class="s2">,</span><span class="se">\&quot;</span><span class="s2">node2</span><span class="se">\&quot;</span><span class="s2">,</span><span class="se">\&quot;</span><span class="s2">node3</span><span class="se">\&quot;</span><span class="s2">]&quot;</span><span class="p">,</span>
<span class="s2">&quot;yjsPath&quot;</span><span class="p">:</span> <span class="s2">&quot;/Users/xxx/docs/BDWareHttp/generatedlib/yjs.jar&quot;</span><span class="p">,</span>
<span class="s2">&quot;nodeCenter&quot;</span><span class="p">:</span> <span class="s2">&quot;ws://127.0.0.1:1719/SCIDE/NodeCenter&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">{</span>
<span class="s2">&quot;status&quot;</span><span class="p">:</span><span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onLoadNodeConfig&quot;</span><span class="p">,</span>
<span class="s2">&quot;data&quot;</span><span class="p">:{</span>
<span class="s2">&quot;nodeName&quot;</span><span class="p">:</span><span class="s2">&quot;Node_180&quot;</span><span class="p">,</span>
<span class="s2">&quot;peerID&quot;</span><span class="p">:</span><span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="s2">&quot;masterAddress&quot;</span><span class="p">:</span><span class="s2">&quot;39.104.201.40:21031&quot;</span><span class="p">,</span>
<span class="s2">&quot;licence&quot;</span><span class="p">:</span><span class="s2">&quot;04AADCC7103C&quot;</span><span class="p">,</span>
<span class="s2">&quot;doipConfig&quot;</span><span class="p">:</span><span class="s2">&quot;{</span><span class="se">\\</span><span class="s2">&quot;</span><span class="n">LHSProxyAddress</span>\\<span class="s2">&quot;:</span><span class="se">\\</span><span class="s2">&quot;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="mf">39.104</span><span class="o">.</span><span class="mf">201.40</span><span class="p">:</span><span class="mi">21042</span><span class="o">/</span>\\<span class="s2">&quot;,</span><span class="se">\\</span><span class="s2">&quot;</span><span class="n">ownerHandle</span>\\<span class="s2">&quot;:</span><span class="se">\\</span><span class="s2">&quot;</span><span class="mf">86.5000</span><span class="o">.</span><span class="mi">470</span><span class="o">/</span><span class="n">dou</span><span class="o">.</span><span class="n">TEST</span>\\<span class="s2">&quot;,</span><span class="se">\\</span><span class="s2">&quot;</span><span class="n">certPath</span>\\<span class="s2">&quot;:</span><span class="se">\\</span><span class="s2">&quot;</span><span class="n">keys</span><span class="o">/</span><span class="n">dou</span><span class="o">.</span><span class="n">TEST</span><span class="o">.</span><span class="n">keystore</span>\\<span class="s2">&quot;,</span><span class="se">\\</span><span class="s2">&quot;</span><span class="n">certPassword</span>\\<span class="s2">&quot;:</span><span class="se">\\</span><span class="s2">&quot;</span><span class="mi">123456</span>\\<span class="s2">&quot;,</span><span class="se">\\</span><span class="s2">&quot;</span><span class="n">repoID</span>\\<span class="s2">&quot;:</span><span class="se">\\</span><span class="s2">&quot;</span><span class="mf">86.5000</span><span class="o">.</span><span class="mi">470</span><span class="o">/</span><span class="n">doip</span><span class="o">.</span><span class="n">vcg9Mu1gSq_bdw</span>\\<span class="s2">&quot;,</span><span class="se">\\</span><span class="s2">&quot;</span><span class="n">listeners</span>\\<span class="s2">&quot;:</span><span class="se">\\</span><span class="s2">&quot;</span><span class="p">[{</span>\\\\\\<span class="s2">&quot;url</span><span class="se">\\\\\\</span><span class="s2">&quot;</span><span class="p">:</span>\\\\\\<span class="s2">&quot;tcp://39.104.201.40:21032</span><span class="se">\\\\\\</span><span class="s2">&quot;</span><span class="p">,</span>\\\\\\<span class="s2">&quot;protocolVersion</span><span class="se">\\\\\\</span><span class="s2">&quot;</span><span class="p">:</span>\\\\\\<span class="s2">&quot;2.1</span><span class="se">\\\\\\</span><span class="s2">&quot;</span><span class="p">,</span>\\\\\\<span class="s2">&quot;messageFormat</span><span class="se">\\\\\\</span><span class="s2">&quot;</span><span class="p">:</span>\\\\\\<span class="s2">&quot;packet</span><span class="se">\\\\\\</span><span class="s2">&quot;</span><span class="p">}]</span>\\<span class="s2">&quot;,</span><span class="se">\\</span><span class="s2">&quot;</span><span class="n">serviceDescription</span>\\<span class="s2">&quot;:</span><span class="se">\\</span><span class="s2">&quot;</span><span class="n">test</span> <span class="n">local</span> <span class="n">Contract</span> <span class="n">Repository</span>\\<span class="s2">&quot;,</span><span class="se">\\</span><span class="s2">&quot;</span><span class="n">serviceName</span>\\<span class="s2">&quot;:</span><span class="se">\\</span><span class="s2">&quot;</span><span class="n">ContractEngine021</span>\\<span class="s2">&quot;}&quot;</span><span class="p">,</span>
<span class="s2">&quot;clusterConnected&quot;</span><span class="p">:</span><span class="s2">&quot;false&quot;</span><span class="p">,</span>
<span class="s2">&quot;nodePubKey&quot;</span><span class="p">:</span><span class="s2">&quot;0492d974b8a5b473d0ed2c81800917f76e2a1ec3666067888c85fe6922a672223f2083f95402ae13a744df58deabbe7206c4a317dd14296b0d3941a26ca4e34dc5&quot;</span><span class="p">,</span>
<span class="s2">&quot;ipPort&quot;</span><span class="p">:</span><span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="s2">&quot;bdledger&quot;</span><span class="p">:</span><span class="s2">&quot;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&quot;</span><span class="p">,</span>
<span class="s2">&quot;yjsPath&quot;</span><span class="p">:</span><span class="s2">&quot;/data/bdwaas/bdcontract/yjs.jar&quot;</span><span class="p">,</span>
<span class="s2">&quot;nodeCenter&quot;</span><span class="p">:</span><span class="s2">&quot;ws://39.104.201.21040/SCIDE/NodeCenter&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id317">
<h4>修改节点配置<a class="headerlink" href="#id317" title="永久链接至标题"></a></h4>
<div class="section" id="id318">
<h5>参数<a class="headerlink" href="#id318" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>updateConfig</td>
</tr>
<tr>
<td>key</td>
<td>要改的配置项</td>
</tr>
<tr>
<td>val</td>
<td>要更改的目标值</td>
</tr>
</tbody>
</table><p>其中key的可选项包括</p>
<table border="1" class="docutils">
<thead>
<tr>
<th>key的示</th>
<th>val示例</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>yjsPath</td>
<td>/User/xxx/cp/yjs.jar</td>
<td>合约进程启动所需的jar</td>
</tr>
<tr>
<td>dataChain</td>
<td>192.168.1.8:18090,182.173.2.3:18091</td>
<td>账本节点的ip与端口</td>
</tr>
<tr>
<td>nodeCenter</td>
<td>ws://127.0.0.1:18002</td>
<td>CenterPortal所在的ip/端口</td>
</tr>
<tr>
<td>nodeName</td>
<td>Node_180</td>
<td>字符串类型</td>
</tr>
<tr>
<td>masterAddress</td>
<td>192.168.3.2:18001</td>
<td>该NodePortal节点的ip和的TCP端口</td>
</tr>
</tbody>
</table><p>其中NodePortal的TCP端口为Node的http/ws端口号+1。</p>
</div>
</div>
<div class="section" id="id319">
<h4>修改节点名称<a class="headerlink" href="#id319" title="永久链接至标题"></a></h4>
<div class="section" id="id320">
<h5>参数<a class="headerlink" href="#id320" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>changeNodeName</td>
</tr>
<tr>
<td>data</td>
<td>新的节点名称</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id321">
<h5>请求示例<a class="headerlink" href="#id321" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;changeNodeName&quot;</span><span class="p">;</span>
<span class="n">param</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="s2">&quot;NewNodeName&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id322">
<h5>返回结果<a class="headerlink" href="#id322" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onChangeNodeName&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="kc">true</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="yjs">
<h4>修改节点YJS路径<a class="headerlink" href="#yjs" title="永久链接至标题"></a></h4>
<div class="section" id="id323">
<h5>参数<a class="headerlink" href="#id323" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>changeYJSPath</td>
</tr>
<tr>
<td>data</td>
<td>节点服务器yjs.jar路径</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id324">
<h5>请求示例<a class="headerlink" href="#id324" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;changeYJSPath&quot;</span><span class="p">;</span>
<span class="n">param</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="s2">&quot;/Users/xxx/docs/BDWareHttp/generatedlib/yjs.jar&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id325">
<h5>返回结果<a class="headerlink" href="#id325" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onChangeYJSPath&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="kc">true</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="nodecenter">
<h4>修改NodeCenter<a class="headerlink" href="#nodecenter" title="永久链接至标题"></a></h4>
<div class="section" id="id326">
<h5>参数<a class="headerlink" href="#id326" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>changeNodeCenter</td>
</tr>
<tr>
<td>data</td>
<td>节点服务器要连接的NodeCenterWebSocket路径</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id327">
<h5>请求示例<a class="headerlink" href="#id327" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;changeNodeCenter&quot;</span><span class="p">;</span>
<span class="n">param</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="s2">&quot;ws://127.0.0.1:1719/SCIDE/NodeCenter&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id328">
<h5>返回结果<a class="headerlink" href="#id328" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onChangeNodeCenter&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="kc">true</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id329">
<h4>修改账本节点<a class="headerlink" href="#id329" title="永久链接至标题"></a></h4>
<div class="section" id="id330">
<h5>参数<a class="headerlink" href="#id330" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>changeBDledger</td>
</tr>
<tr>
<td>data</td>
<td>数链节点的IP:port,用","隔开</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id331">
<h5>请求示例<a class="headerlink" href="#id331" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;changeBDledger&quot;</span><span class="p">;</span>
<span class="n">param</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="s2">&quot;39.108.56.240:18091,39.108.56.12:18091&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id332">
<h5>返回结果<a class="headerlink" href="#id332" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onChangeBDledger&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="kc">true</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="licence">
<h4>上传节点Licence<a class="headerlink" href="#licence" title="永久链接至标题"></a></h4>
<div class="section" id="id333">
<h5>参数<a class="headerlink" href="#id333" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>uploadLicence</td>
</tr>
<tr>
<td>data</td>
<td>节点服务器的Licence内容</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id334">
<h5>请求示例<a class="headerlink" href="#id334" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;uploadLicence&quot;</span><span class="p">;</span>
<span class="n">param</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="s2">&quot;04AADCC7103C&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id335">
<h5>返回结果<a class="headerlink" href="#id335" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onUploadLicence&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="kc">true</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id">
<h4>获取节点ID<a class="headerlink" href="#id" title="永久链接至标题"></a></h4>
<div class="section" id="id336">
<h5>参数<a class="headerlink" href="#id336" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>getNodeID</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id337">
<h5>请求示例<a class="headerlink" href="#id337" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;getNodeID&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id338">
<h5>返回结果<a class="headerlink" href="#id338" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onGetNodeID&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;0431…d3a92e1184bbc5817ebda5c2ad498e4ff1d240009b4f06d&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id339">
<h4>获取节点所在的可信执行集群<a class="headerlink" href="#id339" title="永久链接至标题"></a></h4>
<div class="section" id="id340">
<h5>参数<a class="headerlink" href="#id340" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>getNodeTrustUnits</td>
</tr>
<tr>
<td>data</td>
<td>节点ID</td>
</tr>
<tr>
<td>msgHandler</td>
<td>收到回复的回调函数, 可使用"建立连接"的msgHandler</td>
</tr>
<tr>
<td>ws</td>
<td>节点所属的NodeCenter的WebSocket地址</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id341">
<h5>请求示例<a class="headerlink" href="#id341" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">centerportalws</span> <span class="o">=</span> <span class="n">createWssocket</span><span class="p">(</span><span class="s2">&quot;ws://127.0.0.1:1718/NodeCenterWS&quot;</span><span class="p">,</span><span class="n">function</span><span class="p">()</span> <span class="p">{</span>
<span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;getNodeTrustUnits&quot;</span><span class="p">;</span>
<span class="n">param</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="s2">&quot;0431e311bd70840fe69965e2cabea97fafe99f2133953c01abb9bd7cb62af42f8283f474d203051e920d3a92e1184bbc5817ebda5c2ad498e4ff1d240009b4f06d&quot;</span><span class="p">;</span>
<span class="n">centerportalws</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
<span class="p">},</span> <span class="n">msgHandler</span><span class="p">);</span>
</pre></div>
</div>
</div>
<div class="section" id="id342">
<h5>返回结果<a class="headerlink" href="#id342" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="p">[{</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;0475c7b061...65e55_4063665700873624164&quot;</span><span class="p">,</span>
<span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;[\&quot;04541429c11b094…40009b4f06d\&quot;]&quot;</span>
<span class="p">}],</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onGetNodeTrustUnits&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="id343">
<h3>模板生成类<a class="headerlink" href="#id343" title="永久链接至标题"></a></h3>
<div class="section" id="id344">
<h4>获取合约模板列表<a class="headerlink" href="#id344" title="永久链接至标题"></a></h4>
<div class="section" id="id345">
<h5>参数<a class="headerlink" href="#id345" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>getTemplateList</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id346">
<h5>请求示例<a class="headerlink" href="#id346" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="nx">req</span><span class="o">=</span><span class="p">{};</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">action</span> <span class="o">=</span> <span class="s2">&quot;getTemplateList&quot;</span><span class="p">;</span>
<span class="nx">wssocket</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">req</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id347">
<h5>返回结果<a class="headerlink" href="#id347" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span>
<span class="nt">&quot;formDesc&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;dbPWD&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;label&quot;</span><span class="p">:</span> <span class="s2">&quot;密码&quot;</span><span class="p">,</span>
<span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;input&quot;</span>
<span class="p">},</span>
<span class="nt">&quot;contractName&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;label&quot;</span><span class="p">:</span> <span class="s2">&quot;合约名称&quot;</span><span class="p">,</span>
<span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;input&quot;</span>
<span class="p">},</span>
<span class="nt">&quot;accessPolicy&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;label&quot;</span><span class="p">:</span> <span class="s2">&quot;访问控制策略&quot;</span><span class="p">,</span>
<span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;input&quot;</span><span class="p">,</span>
<span class="nt">&quot;option&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span>
<span class="nt">&quot;text&quot;</span><span class="p">:</span> <span class="s2">&quot;无访问控制&quot;</span><span class="p">,</span>
<span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;NAC&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;text&quot;</span><span class="p">:</span> <span class="s2">&quot;直接访问控制&quot;</span><span class="p">,</span>
<span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;DAC&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;text&quot;</span><span class="p">:</span> <span class="s2">&quot;基于角色的访问控制&quot;</span><span class="p">,</span>
<span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;RBAC&quot;</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="nt">&quot;dbUserName&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;label&quot;</span><span class="p">:</span> <span class="s2">&quot;用户名&quot;</span><span class="p">,</span>
<span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;input&quot;</span>
<span class="p">},</span>
<span class="nt">&quot;fieldList&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;label&quot;</span><span class="p">:</span> <span class="s2">&quot;字段名&quot;</span><span class="p">,</span>
<span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;tag&quot;</span>
<span class="p">},</span>
<span class="nt">&quot;dbUrl&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;label&quot;</span><span class="p">:</span> <span class="s2">&quot;数据库链接&quot;</span><span class="p">,</span>
<span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;input&quot;</span>
<span class="p">},</span>
<span class="nt">&quot;tableName&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;label&quot;</span><span class="p">:</span> <span class="s2">&quot;表名&quot;</span><span class="p">,</span>
<span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;input&quot;</span>
<span class="p">}</span>
<span class="p">},</span>
<span class="nt">&quot;apiName&quot;</span><span class="p">:</span> <span class="s2">&quot;generateMySQLProject&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;formDesc&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;contractName&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;label&quot;</span><span class="p">:</span> <span class="s2">&quot;合约名称&quot;</span><span class="p">,</span>
<span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;input&quot;</span>
<span class="p">},</span>
<span class="nt">&quot;accessPolicy&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;label&quot;</span><span class="p">:</span> <span class="s2">&quot;访问控制策略&quot;</span><span class="p">,</span>
<span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;input&quot;</span><span class="p">,</span>
<span class="nt">&quot;option&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span>
<span class="nt">&quot;text&quot;</span><span class="p">:</span> <span class="s2">&quot;无访问控制&quot;</span><span class="p">,</span>
<span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;NAC&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;text&quot;</span><span class="p">:</span> <span class="s2">&quot;直接访问控制&quot;</span><span class="p">,</span>
<span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;DAC&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;text&quot;</span><span class="p">:</span> <span class="s2">&quot;基于角色的访问控制&quot;</span><span class="p">,</span>
<span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;RBAC&quot;</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">}</span>
<span class="p">},</span>
<span class="nt">&quot;apiName&quot;</span><span class="p">:</span> <span class="s2">&quot;generateEmptyProject&quot;</span>
<span class="p">}</span>
<span class="p">],</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onTemplateList&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id348">
<h4>空白合约模板<a class="headerlink" href="#id348" title="永久链接至标题"></a></h4>
<div class="section" id="id349">
<h5>参数<a class="headerlink" href="#id349" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>generateEmptyProject</td>
</tr>
<tr>
<td>contractName</td>
<td>字符串类型,合约名称</td>
</tr>
<tr>
<td>isPrivate</td>
<td>布尔类型,是否为私有项目</td>
</tr>
<tr>
<td>accessPolicy</td>
<td>若为"DAC",则实现直接访问控制</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id350">
<h5>请求示例<a class="headerlink" href="#id350" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">var</span> <span class="nx">req</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">contractName</span> <span class="o">=</span> <span class="s2">&quot;Empty22&quot;</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">action</span> <span class="o">=</span> <span class="s2">&quot;generateEmptyProject&quot;</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">accessPolicy</span> <span class="o">=</span> <span class="s2">&quot;DAC&quot;</span><span class="p">;</span>
<span class="c1">//wssocket为建立好的连接</span>
<span class="nx">wssocket</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">req</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id351">
<h5>返回结果<a class="headerlink" href="#id351" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onListProjects&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;[\&quot;AnnotationSample\&quot;,\&quot;AppDataAnalysis\&quot;,\&quot;AppDataSource\&quot;]&quot;</span><span class="p">,</span>
<span class="nt">&quot;executeTime&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
<span class="nt">&quot;isPrivate&quot;</span><span class="p">:</span><span class="kc">false</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="mysql">
<h4>MySQL接入合约<a class="headerlink" href="#mysql" title="永久链接至标题"></a></h4>
<div class="section" id="id352">
<h5>参数<a class="headerlink" href="#id352" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>generateMySQLProject</td>
</tr>
<tr>
<td>contractName</td>
<td>字符串类型,合约名称</td>
</tr>
<tr>
<td>isPrivate</td>
<td>布尔类型,是否为私有项目</td>
</tr>
<tr>
<td>dbUrl</td>
<td>字符串类型数据库的URI</td>
</tr>
<tr>
<td>dbUserName</td>
<td>字符串类型,数据库的用户名</td>
</tr>
<tr>
<td>dbPWD</td>
<td>字符串类型,数据库密码</td>
</tr>
<tr>
<td>accessPolicy</td>
<td>若为"DAC",则实现直接访问控制,若为"NAC"则没有访问控制</td>
</tr>
<tr>
<td>tableName</td>
<td>字符串类型,数据库的表名</td>
</tr>
<tr>
<td>fieldList</td>
<td>字符串列表,数据库的字段列表</td>
</tr>
<tr>
<td>defaultAccept</td>
<td>布尔值,表示申请时是否默认有权</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id353">
<h5>请求示例<a class="headerlink" href="#id353" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">var</span> <span class="nx">req</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">contractName</span> <span class="o">=</span> <span class="s2">&quot;MySQLFromTemplate&quot;</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">action</span> <span class="o">=</span> <span class="s2">&quot;generateMySQLProject&quot;</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">pubKey</span> <span class="o">=</span> <span class="nx">global</span><span class="p">.</span><span class="nx">sm2Key</span><span class="p">.</span><span class="nx">publicKey</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">isPrivate</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">tableName</span> <span class="o">=</span> <span class="s2">&quot;data&quot;</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">dbUrl</span> <span class="o">=</span> <span class="s2">&quot;jdbc:mysql://xxx:xxx/xxx&quot;</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">dbUserName</span> <span class="o">=</span> <span class="s2">&quot;loushuai&quot;</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">dbPWD</span> <span class="o">=</span> <span class="s2">&quot;loushuai&quot;</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">fieldList</span> <span class="o">=</span> <span class="p">[{</span><span class="s2">&quot;name&quot;</span><span class="o">:</span><span class="s2">&quot;名字&quot;</span><span class="p">,</span><span class="s2">&quot;code&quot;</span><span class="o">:</span><span class="s2">&quot;*&quot;</span><span class="p">}];</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">basicInfo</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="s2">&quot;所属分类&quot;</span><span class="p">,</span><span class="s2">&quot;name&quot;</span><span class="o">:</span><span class="s2">&quot;资源名称&quot;</span><span class="p">};</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">accessPolicy</span> <span class="o">=</span> <span class="s2">&quot;DAC&quot;</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">defaultAccept</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
<span class="c1">//global.wssocket为建立好的连接</span>
<span class="nx">global</span><span class="p">.</span><span class="nx">wssocket</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">req</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id354">
<h5>返回结果<a class="headerlink" href="#id354" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onListProjects&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;[\&quot;CSVFromTemplate\&quot;,\&quot;Empty22\&quot;,\&quot;Hello\&quot;,\&quot;MySQLFromTemplate\&quot;,\&quot;test\&quot;]&quot;</span><span class="p">,</span>
<span class="nt">&quot;executeTime&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
<span class="nt">&quot;isPrivate&quot;</span><span class="p">:</span><span class="kc">true</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="csv">
<h4>CSV接入合约<a class="headerlink" href="#csv" title="永久链接至标题"></a></h4>
<div class="section" id="id355">
<h5>参数<a class="headerlink" href="#id355" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>generateCSVProject</td>
</tr>
<tr>
<td>contractName</td>
<td>字符串类型,合约名称</td>
</tr>
<tr>
<td>base64EncodedData</td>
<td>字符串类型通过base64编码后的CSV文件内容</td>
</tr>
<tr>
<td>isPrivate</td>
<td>可选字段,布尔类型,是否为私有项目</td>
</tr>
<tr>
<td>accessPolicy</td>
<td>若为"DAC",则实现直接访问控制,若为"NAC"则没有访问控制</td>
</tr>
<tr>
<td>defaultAccept</td>
<td>可选字段,布尔值,表示申请时是否默认有权</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id356">
<h5>请求示例<a class="headerlink" href="#id356" title="永久链接至标题"></a></h5>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">var</span> <span class="nx">req</span> <span class="o">=</span> <span class="p">{};</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">contractName</span> <span class="o">=</span> <span class="s2">&quot;CSVFromTemplate&quot;</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">action</span> <span class="o">=</span> <span class="s2">&quot;generateCSVProject&quot;</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">pubKey</span> <span class="o">=</span> <span class="nx">global</span><span class="p">.</span><span class="nx">sm2Key</span><span class="p">.</span><span class="nx">publicKey</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">isPrivate</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">tableName</span> <span class="o">=</span> <span class="s2">&quot;data&quot;</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">accessPolicy</span> <span class="o">=</span> <span class="s2">&quot;DAC&quot;</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">defaultAccept</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
<span class="nx">req</span><span class="p">.</span><span class="nx">base64EncodedData</span> <span class="o">=</span> <span class="s2">&quot;bmFtZSwgc2NvcmUsCmphY2ssIDkwLApsdWN5LCA5MQo=&quot;</span><span class="p">;</span>
<span class="c1">//global.wssocket为建立好的连接</span>
<span class="nx">global</span><span class="p">.</span><span class="nx">wssocket</span><span class="p">.</span><span class="nx">send</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">req</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id357">
<h5>返回结果<a class="headerlink" href="#id357" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onListProjects&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;[\&quot;CSVFromTemplate\&quot;,\&quot;Empty22\&quot;,\&quot;Hello\&quot;,\&quot;MySQLFromTemplate\&quot;,\&quot;test\&quot;]&quot;</span><span class="p">,</span>
<span class="nt">&quot;executeTime&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
<span class="nt">&quot;isPrivate&quot;</span><span class="p">:</span><span class="kc">true</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
<hr class="docutils" />
<div class="section" id="id358">
<h2>路由节点WebSocket接口<a class="headerlink" href="#id358" title="永久链接至标题"></a></h2>
<div class="section" id="id359">
<h3>用户管理类<a class="headerlink" href="#id359" title="永久链接至标题"></a></h3>
<div class="section" id="id360">
<h4>获取Session<a class="headerlink" href="#id360" title="永久链接至标题"></a></h4>
<p>登录前获取session以便进行签名。</p>
<div class="section" id="id361">
<h5>参数<a class="headerlink" href="#id361" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>getSessionID</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id362">
<h5>请求示例<a class="headerlink" href="#id362" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">req</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">req</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;getSessionID&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">req</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id363">
<h5>返回结果<a class="headerlink" href="#id363" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onSessionID&quot;</span><span class="p">,</span>
<span class="nt">&quot;session&quot;</span><span class="p">:</span> <span class="s2">&quot;9782323_session&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id364">
<h4>用户登录<a class="headerlink" href="#id364" title="永久链接至标题"></a></h4>
<p>用户进行公私钥身份验证需先调用”getSessionID”获取sessionID以便于签名。</p>
<div class="section" id="id365">
<h5>参数<a class="headerlink" href="#id365" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>login</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id366">
<h5>请求示例<a class="headerlink" href="#id366" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">loginParam</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">loginParam</span><span class="o">.</span><span class="n">pubKey</span> <span class="o">=</span> <span class="k">global</span><span class="o">.</span><span class="n">sm2Key</span><span class="o">.</span><span class="n">publicKey</span><span class="p">;</span>
<span class="n">loginParam</span><span class="o">.</span><span class="n">signature</span> <span class="o">=</span> <span class="n">sm2</span><span class="o">.</span><span class="n">doSignature</span><span class="p">(</span><span class="k">global</span><span class="o">.</span><span class="n">session</span><span class="p">,</span>
<span class="k">global</span><span class="o">.</span><span class="n">sm2Key</span><span class="o">.</span><span class="n">privateKey</span><span class="p">);</span>
<span class="n">loginParam</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;login&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">loginParam</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id367">
<h5>返回结果示例<a class="headerlink" href="#id367" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onLogin&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;CenterManager&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id368">
<h4>用户获取当前角色(删除)<a class="headerlink" href="#id368" title="永久链接至标题"></a></h4>
<p>用户根据登录时的公钥获取对应的角色,如果是第一次登录则此时的公钥默认称为准入管理员</p>
<div class="section" id="id369">
<h5>参数<a class="headerlink" href="#id369" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>getRole</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id370">
<h5>请求示例<a class="headerlink" href="#id370" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;getRole&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id371">
<h5>返回结果示例<a class="headerlink" href="#id371" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onGetRole&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;CenterManager&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id372">
<h4>申请角色<a class="headerlink" href="#id372" title="永久链接至标题"></a></h4>
<p>在准入管理员界面可以申请称为组网中某个节点的节点管理员</p>
<div class="section" id="id373">
<h5>参数<a class="headerlink" href="#id373" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>applyRole</td>
</tr>
<tr>
<td>role</td>
<td>申请的角色名称</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id374">
<h5>请求示例<a class="headerlink" href="#id374" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;applyRole&quot;</span><span class="p">;</span>
<span class="n">param</span><span class="o">.</span><span class="n">role</span><span class="o">=</span><span class="s2">&quot;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id375">
<h5>返回结果示例<a class="headerlink" href="#id375" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onApplyRole&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;failed&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id376">
<h4>添加节点<a class="headerlink" href="#id376" title="永久链接至标题"></a></h4>
<div class="section" id="id377">
<h5>参数<a class="headerlink" href="#id377" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>addNode</td>
</tr>
<tr>
<td>nodePubKey</td>
<td>要添加的节点公钥</td>
</tr>
</tbody>
</table></div>
</div>
<div class="section" id="id378">
<h4>请求示例<a class="headerlink" href="#id378" title="永久链接至标题"></a></h4>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>var req = {};
//某节点的publicKey可通过连接该节点并通过&quot;获取节点配置信息&quot;接口获取
req.nodePubKey = publicKey;
req.action = &quot;addNode&quot;;
wssocket.send(JSON.stringify(req));
</pre></div>
</div>
</div>
<div class="section" id="id379">
<h4>删除用户角色<a class="headerlink" href="#id379" title="永久链接至标题"></a></h4>
<div class="section" id="id380">
<h5>参数<a class="headerlink" href="#id380" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>delete</td>
</tr>
<tr>
<td>pubKey</td>
<td>对应用户的公钥</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id381">
<h5>请求示例<a class="headerlink" href="#id381" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">deleteInfo</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">deleteInfo</span><span class="o">.</span><span class="n">pubKey</span> <span class="o">=</span> <span class="n">user</span><span class="o">.</span><span class="n">publicKey</span><span class="p">;</span>
<span class="n">deleteInfo</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;delete&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">deleteInfo</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id382">
<h5>返回结果示例<a class="headerlink" href="#id382" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onDelete&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="s2">&quot;success&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id383">
<h4>查看授权用户列表<a class="headerlink" href="#id383" title="永久链接至标题"></a></h4>
<p>查看准入管理员当前组网中已经授权的节点管理员</p>
<div class="section" id="id384">
<h5>参数<a class="headerlink" href="#id384" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>listAllUsers</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id385">
<h5>请求示例<a class="headerlink" href="#id385" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;onListAllUsers&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id386">
<h5>返回结果示例<a class="headerlink" href="#id386" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onListAllUsers&quot;</span><span class="p">,</span>
<span class="nt">&quot;kv&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7&quot;</span><span class="p">,</span>
<span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot; NodeManager&quot;</span>
<span class="p">},</span>
<span class="nt">&quot;time&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7&quot;</span><span class="p">,</span>
<span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="mi">1587398989914</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id387">
<h4>查看申请用户列表<a class="headerlink" href="#id387" title="永久链接至标题"></a></h4>
<div class="section" id="id388">
<h5>参数<a class="headerlink" href="#id388" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>listApplyList</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id389">
<h5>请求示例<a class="headerlink" href="#id389" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;onListApplyList&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id390">
<h5>返回结果<a class="headerlink" href="#id390" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onListApplyList&quot;</span><span class="p">,</span>
<span class="nt">&quot;kv&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;04b00f32eab70c78d1b43738f190d326d36c021af2124acefe6d057016b11ea31c750bb473e565c9d89e4993a44f4d30adf447d3026a21ff4b3b64cef523074ef7&quot;</span><span class="p">,</span>
<span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot; NodeManager&quot;</span>
<span class="p">},</span>
<span class="nt">&quot;time&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;04b00f32eab70c78d1b43738f190d326d36c021af2124acefe6d057016b11ea31c750bb473e565c9d89e4993a44f4d30adf447d3026a21ff4b3b64cef523074ef7&quot;</span><span class="p">,</span>
<span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="mi">1587398989914</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id391">
<h4>查看用户类型分布<a class="headerlink" href="#id391" title="永久链接至标题"></a></h4>
<div class="section" id="id392">
<h5>参数<a class="headerlink" href="#id392" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>queryUserStat</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id393">
<h5>请求示例<a class="headerlink" href="#id393" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;onQueryUserStat&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id394">
<h5>返回结果示例<a class="headerlink" href="#id394" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onQueryUserStat&quot;</span><span class="p">,</span>
<span class="nt">&quot;userListCount&quot;</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span>
<span class="nt">&quot;applyListCount&quot;</span><span class="p">:</span><span class="mi">0</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="id395">
<h3>节点管理类<a class="headerlink" href="#id395" title="永久链接至标题"></a></h3>
<div class="section" id="id396">
<h4>查看节点列表<a class="headerlink" href="#id396" title="永久链接至标题"></a></h4>
<p>查看该用户有权限查看的节点列表(仅准入管理员及合约管理者可用)</p>
<div class="section" id="id397">
<h5>参数<a class="headerlink" href="#id397" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>listNodes</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id398">
<h5>请求示例<a class="headerlink" href="#id398" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;listNodes&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id399">
<h5>返回结果<a class="headerlink" href="#id399" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;offline&quot;</span><span class="p">:</span> <span class="p">[{</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;0431e31...40009b4f06d&quot;</span><span class="p">,</span>
<span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;0431e311bd708...b4f06d&quot;</span>
<span class="p">}],</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onListNodes&quot;</span><span class="p">,</span>
<span class="nt">&quot;online&quot;</span><span class="p">:</span> <span class="p">[{</span>
<span class="nt">&quot;contracts&quot;</span><span class="p">:</span> <span class="p">[],</span>
<span class="nt">&quot;pubKey&quot;</span><span class="p">:</span> <span class="s2">&quot;0431e311...09b4f06d&quot;</span><span class="p">,</span>
<span class="nt">&quot;nodeName&quot;</span><span class="p">:</span> <span class="s2">&quot;NewNodeName&quot;</span><span class="p">,</span>
<span class="nt">&quot;udpID&quot;</span><span class="p">:</span> <span class="s2">&quot;528822126&quot;</span><span class="p">,</span>
<span class="nt">&quot;cimanager&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span>
<span class="p">}]</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id400">
<h4>查看可信执行集群列表<a class="headerlink" href="#id400" title="永久链接至标题"></a></h4>
<p>查看该用户有权限查看的节点列表(仅中心管理员及合约管理者可用)</p>
<div class="section" id="id401">
<h5>参数<a class="headerlink" href="#id401" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>listTrustUnits</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id402">
<h5>请求示例<a class="headerlink" href="#id402" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;listTrustUnits&quot;</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id403">
<h5>返回结果<a class="headerlink" href="#id403" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span> <span class="p">[{</span>
<span class="nt">&quot;key&quot;</span><span class="p">:</span> <span class="s2">&quot;0470b2f27f4f6…1cb855f1ecec11&quot;</span><span class="p">,</span>
<span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;[...]&quot;</span>
<span class="p">}],</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onListTrustUnits&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id404">
<h4>建立可信执行集群<a class="headerlink" href="#id404" title="永久链接至标题"></a></h4>
<div class="section" id="id405">
<h5>参数<a class="headerlink" href="#id405" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>createTrustUnit</td>
</tr>
<tr>
<td>data</td>
<td>节点公钥组成的Json数组</td>
</tr>
<tr>
<td>Msg</td>
<td>集群名称</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id406">
<h5>请求示例<a class="headerlink" href="#id406" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;createTrustUnit&quot;</span><span class="p">;</span>
<span class="n">param</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="s2">&quot;[</span><span class="se">\&quot;</span><span class="s2">382r0934309t...</span><span class="se">\&quot;</span><span class="s2">,</span><span class="se">\&quot;</span><span class="s2">345343rr3f34...</span><span class="se">\&quot;</span><span class="s2">]&quot;</span><span class="p">;</span>
<span class="n">param</span><span class="o">.</span><span class="n">msg</span> <span class="o">=</span> <span class="s2">&quot;newUnit1&quot;</span><span class="p">;</span>
<span class="k">global</span><span class="o">.</span><span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id407">
<h5>返回结果<a class="headerlink" href="#id407" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onCreateTrustUnit&quot;</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;Success&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id408">
<h4>删除可信执行集群<a class="headerlink" href="#id408" title="永久链接至标题"></a></h4>
<div class="section" id="id409">
<h5>参数<a class="headerlink" href="#id409" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>deleteTrustUnit</td>
</tr>
<tr>
<td>data</td>
<td>可信执行集群ID</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id410">
<h5>请求示例<a class="headerlink" href="#id410" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="n">param</span> <span class="o">=</span> <span class="p">{};</span>
<span class="n">param</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;deleteTrustUnit&quot;</span><span class="p">;</span>
<span class="n">param</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="s2">&quot;0475d34rf3434..._1583410158761&quot;</span><span class="p">;</span>
<span class="k">global</span><span class="o">.</span><span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">param</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id411">
<h5>返回结果<a class="headerlink" href="#id411" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;action&quot;</span><span class="p">:</span> <span class="s2">&quot;onDeleteTrustUnit&quot;</span><span class="p">,</span>
<span class="nt">&quot;status&quot;</span><span class="p">:</span> <span class="s2">&quot;Success&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="id412">
<h3>日志查看类<a class="headerlink" href="#id412" title="永久链接至标题"></a></h3>
<div class="section" id="id413">
<h4>查看组网管理操作的统计<a class="headerlink" href="#id413" title="永久链接至标题"></a></h4>
<div class="section" id="id414">
<h5>参数<a class="headerlink" href="#id414" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>queryActionLog</td>
</tr>
<tr>
<td>date</td>
<td>当前时间</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id415">
<h5>请求示例<a class="headerlink" href="#id415" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">request</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;onQueryActionLog&quot;</span><span class="p">;</span>
<span class="n">request</span><span class="o">.</span><span class="n">date</span> <span class="o">=</span> <span class="n">new</span> <span class="n">Date</span><span class="p">()</span><span class="o">.</span><span class="n">getTime</span><span class="p">()</span> <span class="o">-</span> <span class="mi">24</span> <span class="o">*</span> <span class="mi">3600</span> <span class="o">*</span> <span class="mi">1000</span> <span class="o">*</span> <span class="n">n</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id416">
<h5>返回结果<a class="headerlink" href="#id416" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> <span class="nt">&quot;action&quot;</span><span class="p">:</span><span class="s2">&quot;onQueryActionLog&quot;</span><span class="p">,</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;[{\&quot;action\&quot;:\&quot;login\&quot;,\&quot;pubKey\&quot;:\&quot;null\&quot;,\&quot;status\&quot;:\&quot;accept\&quot;,\&quot;date\&quot;:1583139323822}\&quot;,]&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id417">
<h4>查看本地近n日合约日志<a class="headerlink" href="#id417" title="永久链接至标题"></a></h4>
<div class="section" id="id418">
<h5>参数<a class="headerlink" href="#id418" title="永久链接至标题"></a></h5>
<table border="1" class="docutils">
<thead>
<tr>
<th>字段</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>listLocalContractLog</td>
</tr>
<tr>
<td>date</td>
<td>当前时间</td>
</tr>
</tbody>
</table></div>
<div class="section" id="id419">
<h5>请求示例<a class="headerlink" href="#id419" title="永久链接至标题"></a></h5>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">request</span><span class="o">.</span><span class="n">action</span> <span class="o">=</span> <span class="s2">&quot;listLocalContractLog&quot;</span><span class="p">;</span>
<span class="n">request</span><span class="o">.</span><span class="n">date</span> <span class="o">=</span> <span class="n">new</span> <span class="n">Date</span><span class="p">()</span><span class="o">.</span><span class="n">getTime</span><span class="p">()</span> <span class="o">-</span> <span class="mi">24</span> <span class="o">*</span> <span class="mi">3600</span> <span class="o">*</span> <span class="mi">1000</span> <span class="o">*</span> <span class="n">n</span><span class="p">;</span>
<span class="n">wssocket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">JSON</span><span class="o">.</span><span class="n">stringify</span><span class="p">(</span><span class="n">request</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id420">
<h5>返回结果<a class="headerlink" href="#id420" title="永久链接至标题"></a></h5>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="s2">&quot;[\&quot;{\&quot;action\&quot;:\&quot;startContract\&quot;,\&quot;pubKey\&quot;:\&quot;04405d7b...\&quot;,\&quot;contractID\&quot;:\&quot;845581788\&quot;,\&quot;contractName\&quot;:\&quot;null\&quot;,\&quot;date\&quot;:1583141525539}\&quot;]&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
<hr class="docutils" />
<div class="section" id="bash">
<h2>Bash接口<a class="headerlink" href="#bash" title="永久链接至标题"></a></h2>
<p>已废弃。可使用BDWareConfigTool代替。
通过命令行发送Socket指令, 执行调用<code class="docutils literal notranslate"><span class="pre">ContractController</span></code>类中方法, 完成以下功能. (需要在本机的<code class="docutils literal notranslate"><span class="pre">1615</span></code>端口运行<code class="docutils literal notranslate"><span class="pre">ContractManager</span></code>实例)</p>
<p><img alt="Bash接口功能示意图" src="markdown_BDWare/_static/imgs/bash-api.png" /></p>
<div class="section" id="id421">
<h3>指令<a class="headerlink" href="#id421" title="永久链接至标题"></a></h3>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>java -jar yjs.jar function_name arguments
</pre></div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">function_name</span></code>为调用的方法名;</p>
<p><code class="docutils literal notranslate"><span class="pre">arguments</span></code>为方法参数.</p>
</div>
<div class="section" id="id422">
<h3>启动合约<a class="headerlink" href="#id422" title="永久链接至标题"></a></h3>
<div class="section" id="id423">
<h4>参数<a class="headerlink" href="#id423" title="永久链接至标题"></a></h4>
<p><code class="docutils literal notranslate"><span class="pre">function_name</span></code><code class="docutils literal notranslate"><span class="pre">startContract</span></code>;</p>
<p><code class="docutils literal notranslate"><span class="pre">arguments</span></code>为启动合约需要的参数, 包括合约类型<code class="docutils literal notranslate"><span class="pre">type</span></code>, 合约ID<code class="docutils literal notranslate"><span class="pre">id</span></code>, 合约脚本<code class="docutils literal notranslate"><span class="pre">script</span></code>.</p>
</div>
<div class="section" id="id424">
<h4>指令示例<a class="headerlink" href="#id424" title="永久链接至标题"></a></h4>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>java -jar yjs.jar startContract <span class="s2">&quot;{\&quot;type\&quot;:\&quot;Algorigthm\&quot;,\&quot;id\&quot;:\&quot;656565\&quot;,\&quot;script\&quot;:\&quot;contract c{function main(arg){return arg/1.0+1;}}\&quot;}&quot;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id425">
<h3>调用合约<a class="headerlink" href="#id425" title="永久链接至标题"></a></h3>
<div class="section" id="id426">
<h4>参数<a class="headerlink" href="#id426" title="永久链接至标题"></a></h4>
<p><code class="docutils literal notranslate"><span class="pre">function_name</span></code><code class="docutils literal notranslate"><span class="pre">executeContract</span></code>;</p>
<p><code class="docutils literal notranslate"><span class="pre">arguments</span></code>为调用合约需要的参数, 包括调用参数<code class="docutils literal notranslate"><span class="pre">arg</span></code>, 合约ID<code class="docutils literal notranslate"><span class="pre">contractID</span></code>.</p>
</div>
<div class="section" id="id427">
<h4>指令示例<a class="headerlink" href="#id427" title="永久链接至标题"></a></h4>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>java -jar yjs.jar executeContract <span class="s2">&quot;{\&quot;arg\&quot;:\&quot;http://www.baidu.com\&quot;,\&quot;contractID\&quot;:\&quot;656564\&quot;}&quot;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id428">
<h3>停止合约<a class="headerlink" href="#id428" title="永久链接至标题"></a></h3>
<div class="section" id="id429">
<h4>参数<a class="headerlink" href="#id429" title="永久链接至标题"></a></h4>
<p><code class="docutils literal notranslate"><span class="pre">function_name</span></code><code class="docutils literal notranslate"><span class="pre">stopContract</span></code>;</p>
<p><code class="docutils literal notranslate"><span class="pre">arguments</span></code>为调用合约需要的参数, 即合约ID<code class="docutils literal notranslate"><span class="pre">contractID</span></code>.</p>
</div>
<div class="section" id="id430">
<h4>指令示例<a class="headerlink" href="#id430" title="永久链接至标题"></a></h4>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>java -jar yjs.jar stopContract <span class="s2">&quot;{\&quot;arg\&quot;:\&quot;http://www.baidu.com\&quot;,\&quot;contractID\&quot;:\&quot;656564\&quot;}&quot;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="id431">
<h3>停止全部合约<a class="headerlink" href="#id431" title="永久链接至标题"></a></h3>
<div class="section" id="id432">
<h4>参数<a class="headerlink" href="#id432" title="永久链接至标题"></a></h4>
<p><code class="docutils literal notranslate"><span class="pre">function_name</span></code><code class="docutils literal notranslate"><span class="pre">stopAllContracts</span></code>.</p>
</div>
<div class="section" id="id433">
<h4>指令示例<a class="headerlink" href="#id433" title="永久链接至标题"></a></h4>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>java -jar yjs.jar stopAllContracts
</pre></div>
</div>
</div>
</div>
<div class="section" id="id434">
<h3>查询全部合约<a class="headerlink" href="#id434" title="永久链接至标题"></a></h3>
<div class="section" id="id435">
<h4>参数<a class="headerlink" href="#id435" title="永久链接至标题"></a></h4>
<p><code class="docutils literal notranslate"><span class="pre">function_name</span></code><code class="docutils literal notranslate"><span class="pre">listContracts</span></code>.</p>
</div>
<div class="section" id="id436">
<h4>指令示例<a class="headerlink" href="#id436" title="永久链接至标题"></a></h4>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>java -jar yjs.jar listContracts
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; 版权所有 2021, Peking University.
</p>
</div>
利用 <a href="https://www.sphinx-doc.org/">Sphinx</a> 构建,使用了
<a href="https://github.com/readthedocs/sphinx_rtd_theme">主题</a>
<a href="https://readthedocs.org">Read the Docs</a>开发.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>