5960 lines
358 KiB
HTML
5960 lines
358 KiB
HTML
|
||
|
||
<!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>BDContract SDK — 北大数瑞大数据区块链 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" />
|
||
<link rel="next" title="YJS语法" href="YJSInDepth.html" />
|
||
<link rel="prev" title="BDContract管理界面" href="IDEUsage.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 class="current">
|
||
<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 current"><a class="current reference internal" href="#">BDContract SDK</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="#websocketsdk">WebSocketSDK下载与安装</a><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id1">建立连接</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id2">参数</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id3">请求示例</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id4">返回结果示例</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#ping">ping</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id5">参数</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id7">请求示例</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id9">返回结果示例</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id11">登录</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#id12">用户角色划分</a><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id13">合约节点的角色划分</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id14">合约准入中心角色划分</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#http">合约节点Http接口</a><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id15">用户管理类</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#ping-1">ping</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id24">合约代码管理类</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id25">下载合约项目</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id32">上传文件</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id41">保存合约脚本</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id50">合约实例管理类</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id51">查询合约进程</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id60">启动合约</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id69">调用合约</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id78">批量启动合约</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#zip">启动Zip包合约</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id95">获取合约代码</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id104">保存合约状态</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id113">获取合约内存文件列表</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id122">停止合约</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id131">停止所有合约</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id140">静态分析合约</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id149">获取合约静态分析流</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id158">日志查看类</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id159">合约日志-查询数量</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id168">合约日志-根据日期查询</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id176">合约日志-根据偏移量查询</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#key">合约日志-根据key查询</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id193">合约日志-按时间段统计调用次数</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id202">账本日志-查询数量</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id211">账本日志-根据偏移量查询</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#hash">账本日志-根据hash查询详情</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#requestidhash">账本日志-根据requestID查询Hash</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id234">节点日志-查询数量</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id243">节点日志-按日期查询</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id252">节点日志-按偏移量查询</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id261">节点日志-按时间段统计调用次数</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id270">输出历史记录日志</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id279">输出节点转移日志</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id288">模板生成类</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#websocket">合约节点WebSocket接口</a><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id289">用户管理类</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#session">获取Session</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id297">用户登录</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id304">申请角色</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id311">授权角色</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id318">删除用户角色</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id325">查看授权用户列表</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id332">查看申请用户列表</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id344">合约代码管理类</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id346">获取公共合约文件列表</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id353">获取私有合约文件列表</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id360">获取合约实例</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id367">启动合约</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id375">启动可信集群合约</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id382">分发合约项目</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id389">终止合约</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id396">终止所有合约</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id403">静态分析合约</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id411">删除合约</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id418">私有合约传至公共目录</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id425">上传合约</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id432">编译合约</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id439">锁定私有目录</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id444">解锁私有目录</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id449">合约实例管理类</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id451">查询合约进程</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id459">调用合约</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id467">输出历史记录日志(删除)</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id474">输出节点转移日志(删除)</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id481">合约状态迁移</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id488">日志查看类</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#n">查看本地近n日节点日志(删除)</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id496">查看本地近n日合约日志(删除)</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id503">节点配置类</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id504">获取节点配置信息</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id511">修改节点配置</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id514">修改节点名称</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#yjs">修改节点YJS路径</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#nodecenter">修改NodeCenter</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id533">修改账本节点</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#licence">上传节点Licence</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id">获取节点ID</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id552">获取节点所在的可信执行集群</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id559">模板生成类</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id561">获取合约模板列表</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id568">空白合约模板</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#mysql">MySQL接入合约</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#csv">CSV接入合约</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#id587">路由节点WebSocket接口</a><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id588">用户管理类</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#session-1">获取Session</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id597">用户登录</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id605">用户获取当前角色(删除)</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id612">申请角色</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id620">添加节点</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id623">请求示例</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id625">删除用户角色</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id633">查看授权用户列表</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id641">查看申请用户列表</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id649">查看用户类型分布</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id656">节点管理类</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id657">查看节点列表</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id664">查看可信执行集群列表</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id671">建立可信执行集群</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id678">删除可信执行集群</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id685">日志查看类</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id687">查看组网管理操作的统计</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id694">查看本地近n日合约日志</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#bash">Bash接口</a><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id701">指令</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id702">启动合约</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id704">参数</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id706">指令示例</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id707">调用合约</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id709">参数</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id711">指令示例</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id713">停止合约</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id715">参数</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id717">指令示例</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id719">停止全部合约</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id720">参数</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id722">指令示例</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id724">查询全部合约</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id725">参数</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#id727">指令示例</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</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> »</li>
|
||
|
||
<li>BDContract SDK</li>
|
||
|
||
|
||
<li class="wy-breadcrumbs-aside">
|
||
|
||
|
||
<a href="_sources/ContractAPI.rst.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="bdcontract-sdk">
|
||
<h1>BDContract SDK<a class="headerlink" href="#bdcontract-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 class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 13%" />
|
||
<col style="width: 87%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>url</p></td>
|
||
<td><p>建立WebSocket的服务器URL. 使用<code class="docutils literal notranslate"><span class="pre">http</span></code>协议时,
|
||
前缀为<code class="docutils literal notranslate"><span class="pre">ws://</span></code>,
|
||
如<code class="docutils literal notranslate"><span class="pre">"ws://localhost:1717/SCIDE/SCExecutor"</span></code>;
|
||
使用<code class="docutils literal notranslate"><span class="pre">https</span></code>协议时, 前缀为<code class="docutils literal notranslate"><span class="pre">wss://</span></code></p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>msgHand
|
||
ler</p></td>
|
||
<td><p>收到服务器WebSocket回复后的回调函数, 用户可自行编写,
|
||
也可参考下面提供的示例</p></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">"ws://127.0.0.1:1717/SCIDE/SCExecutor"</span><span class="p">;</span><span class="c1">//与Slave节点建立连接</span>
|
||
<span class="c1">//var url = "ws://127.0.0.1:1718/NodeCenterWS";//与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">"recmsg:"</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">
|
||
<span id="id6"></span><h4>参数<a class="headerlink" href="#id5" title="永久链接至标题">¶</a></h4>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 60%" />
|
||
<col style="width: 40%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>ping</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id7">
|
||
<span id="id8"></span><h4>请求示例<a class="headerlink" href="#id7" 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">"ping"</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="id9">
|
||
<span id="id10"></span><h4>返回结果示例<a class="headerlink" href="#id9" title="永久链接至标题">¶</a></h4>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="s2">"action"</span><span class="p">:</span><span class="s2">"pong"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id11">
|
||
<h3>登录<a class="headerlink" href="#id11" 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="id12">
|
||
<h2>用户角色划分<a class="headerlink" href="#id12" title="永久链接至标题">¶</a></h2>
|
||
<div class="section" id="id13">
|
||
<h3>合约节点的角色划分<a class="headerlink" href="#id13" title="永久链接至标题">¶</a></h3>
|
||
<p>在合约节点(NodePortal.html)中分为NodeManager/ContractProvider/ContractInstanceManager/ContractUser四类角色。</p>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 24%" />
|
||
<col style="width: 76%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>角色</p></th>
|
||
<th class="head"><p>说明</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>NodeManager</p></td>
|
||
<td><p>该节点的管理者,拥有用户管理、节点配置等权限</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>ContractProvider</p></td>
|
||
<td><p>拥有编辑合约、开发合约代码、运行调试等权限</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>ContractInstanceManager</p></td>
|
||
<td><p>拥有启、停合约实例、配置合约实例IO等权限</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>ContractUser</p></td>
|
||
<td><p>拥有查看合约实例列表、调用合约等权限</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>Anonymous</p></td>
|
||
<td><p>匿名用户,可以调用合约,可以申请成为ContractProvider/InstanceManager等角色</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 34%" />
|
||
<col style="width: 22%" />
|
||
<col style="width: 45%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>接口</p></th>
|
||
<th class="head"><p>说明</p></th>
|
||
<th class="head"><p>角色</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>changeDumpPeriod</p></td>
|
||
<td><p>设置备份周期</p></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>createLedger</p></td>
|
||
<td><p>创建账本</p></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>dumpContract</p></td>
|
||
<td><p>手动备份</p></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>deleteMemoryFile</p></td>
|
||
<td><p>删除镜像</p></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>forkContract</p></td>
|
||
<td><p>迁移合约</p></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>getDumpPeriod</p></td>
|
||
<td><p>获取备份周期</p></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>killAllContract</p></td>
|
||
<td><p>停止全部实例</p></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>killContractProcess</p></td>
|
||
<td><p>停止某一实例</p></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>listMemoryFiles</p></td>
|
||
<td><p>列取某一实例的镜像</p></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>loadMemory</p></td>
|
||
<td><p>加载镜像</p></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>queryContractInstanceDOI</p></td>
|
||
<td><p>查询合约实例信息</p></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>rebuildHashIndex</p></td>
|
||
<td></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>setPermission</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>startContract</p></td>
|
||
<td><p>启动合约</p></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>startContractBatched</p></td>
|
||
<td><p>废弃</p></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>startContractByYPK</p></td>
|
||
<td><p>启动合约</p></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>startContractInTempZips</p></td>
|
||
<td><p>废弃</p></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>startContractP2PTrustfully</p></td>
|
||
<td><p>启动合约(集群模式)</p></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>updateContract</p></td>
|
||
<td></td>
|
||
<td><p>ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>connectTo</p></td>
|
||
<td><p>连接合约实例输出流</p></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>countContractLogGroupByAction</p></td>
|
||
<td></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>countContractLogGroupByCategory</p></td>
|
||
<td></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>getLastLog</p></td>
|
||
<td><p>查询日志</p></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>getLog</p></td>
|
||
<td><p>查询日志</p></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>getLogSize</p></td>
|
||
<td><p>查询日志</p></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>listAllContractProcess</p></td>
|
||
<td></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>listContractProcess</p></td>
|
||
<td><p>查询合约实例列表</p></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>listLeakContractProcess</p></td>
|
||
<td></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>queryContractLogByDate</p></td>
|
||
<td></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>queryContractLogByKey</p></td>
|
||
<td></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>queryContractLogByOffset</p></td>
|
||
<td></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>queryContractLogDetail</p></td>
|
||
<td></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>queryContractLogSize</p></td>
|
||
<td></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>queryNodeLogByDate</p></td>
|
||
<td></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>queryNodeLogByOffset</p></td>
|
||
<td></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>queryNodeLogSize</p></td>
|
||
<td></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>rebuildContractLogIndex</p></td>
|
||
<td></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>rebuildNodeLogIndex</p></td>
|
||
<td></td>
|
||
<td><p>ContractInstanceManager;ContractUser;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>changePublic</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>createFile</p></td>
|
||
<td><p>新建文件</p></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>deleteFile</p></td>
|
||
<td><p>删除文件</p></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>distributeContract</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>downloadContract</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>downloadContractFromOtherHost</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>generateAnnotationSample</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>generateAppDataAnalysis</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>generateAppDataSource</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>generateBDCoinEventProject</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>generateBDCoinProject</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>generateBiddingExample</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>generateCSVProject</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>generateContractExecutor</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>generateDAC4BDOA</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>generateDAC4BDOA_persist</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>generateDACSample</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>generateEmptyProject</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>generateEventPublisher</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>generateEventSubscriber</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>generateGasExample</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>generateHello</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>generateHttpExample</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>generateIncentives</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>generateJSONExample</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>generateLedgerExample</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>generateLedgerProject</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>generateLicenceManager</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>generateLoggerExample</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>generateMySQLExample</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>generateMySQLProject</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>generatePostgreSQLSample</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>generateReadme</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>generateRenderSample</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>generateRocksDBSample</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>generateSM2Example</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>generateStaticResource</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>generateTFLinux</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>generategenerateTFMac</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>getProject</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>getTemplateList</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>importContractInstanceCodeByDOI</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>listFile</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>listProject</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>listProjectPermission</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>listProjects</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>renameFile</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>saveFile</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>startContractAsDebug</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>uploadFile</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>compile</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>evaluates</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>executeContractP2PTrustfully</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>getCodeByID</p></td>
|
||
<td><p>查询代码</p></td>
|
||
<td><p>ContractProvider;ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>getControlFlowByFileName</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>getGasValue</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>listCompiledFiles</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>queryContractResourceInfo</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>queryFreeResourceInfo</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>staticVerifyContract</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>writeDyjs</p></td>
|
||
<td></td>
|
||
<td><p>ContractProvider;ContractInstanceManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>authNodeRole</p></td>
|
||
<td><p>授权角色</p></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>changeBDledger</p></td>
|
||
<td><p>修改账本配置</p></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>changeIpPort</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>changeNodeCenter</p></td>
|
||
<td><p>修改集群地址</p></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>changeNodeName</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>changeIpPort</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>changeDOIPConfig</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>changeYJSPath</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>countNodeLogGroupByCategory</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>countRole</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>deleteRole</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>downloadUUID</p></td>
|
||
<td><p>废弃</p></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>getEncodedUUID</p></td>
|
||
<td><p>废弃</p></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>getPeerID</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>listAllAuthRole</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>listNodeInfos</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>listUnAuthRole</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>loadConfig</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>loadNodeConfig</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>lockEdit</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>unlockEdit</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>updateConfig</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>uploadLicence</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>applyNodeRole</p></td>
|
||
<td><p>申请角色</p></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>executeContract</p></td>
|
||
<td><p>调用合约</p></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>getConnCount</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>getHashAbstractLocally</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>getHashLocally</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>getNodeRoleDeprecated</p></td>
|
||
<td><p>查询当前角色</p></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>getSessionID</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>listAdapters</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>listTheContractProcess</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>login</p></td>
|
||
<td><p>登录</p></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>longStr</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>ping</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>queryDataByHash</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>queryDataByHashLocally</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>queryHashByOffset</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>queryHashByRequestID</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>queryHashSize</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>queryLedgers</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>queryRole</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>queryTransactionByHash</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>sendTransaction</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>setLogStage</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id14">
|
||
<h3>合约准入中心角色划分<a class="headerlink" href="#id14" title="永久链接至标题">¶</a></h3>
|
||
<p>共分为两类角色:CenterManager和NodeManager。其中,CenterManager拥有对集群设置的权限。
|
||
NodeManager可以增加、删除节点等操作。</p>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 43%" />
|
||
<col style="width: 18%" />
|
||
<col style="width: 39%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>接口</p></th>
|
||
<th class="head"><p>说明</p></th>
|
||
<th class="head"><p>角色</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>authNodeManager</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>countActionLogByCategory</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>countCMLogByCategory</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>delete</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>listAllUsers</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>listApplyList</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>listLicence</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>queryActionLog</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>queryCMLog</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>updateLicence</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>addNode</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>changeNCFile</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>changeOtherNC</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>createTrustUnit</p></td>
|
||
<td><p>创建可信集群</p></td>
|
||
<td><p>CenterManager;NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>deleteTrustUnit</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>getNCFile</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>getNodeTrustUnits</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>getOtherNC</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>listContractProcess</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>listMultiPointContractProcess</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>listNodes</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>listTrustUnits</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>queryUserStat</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>stopMultiPointContractProcess</p></td>
|
||
<td></td>
|
||
<td><p>CenterManager;NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>applyRole</p></td>
|
||
<td></td>
|
||
<td><p>NodeManager;</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>executeContract</p></td>
|
||
<td><p>调用合约</p></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>executeContractTrustfully</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>getManagerPubkey</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>getNodeRole</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>getNodeSessionID</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>getRole</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>getSessionID</p></td>
|
||
<td></td>
|
||
<td><p>任意角色</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>login</p></td>
|
||
<td><p>登录</p></td>
|
||
<td><p>任意角色</p></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="id15">
|
||
<h3>用户管理类<a class="headerlink" href="#id15" title="永久链接至标题">¶</a></h3>
|
||
<div class="section" id="ping-1">
|
||
<span id="id16"></span><h4>ping<a class="headerlink" href="#ping-1" title="永久链接至标题">¶</a></h4>
|
||
<p><code class="docutils literal notranslate"><span class="pre">ping</span></code>服务器测试</p>
|
||
<div class="section" id="id17">
|
||
<h5>方法<a class="headerlink" href="#id17" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id18">
|
||
<span id="id19"></span><h5>参数<a class="headerlink" href="#id18" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 60%" />
|
||
<col style="width: 40%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>ping</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id20">
|
||
<span id="id21"></span><h5>请求示例<a class="headerlink" href="#id20" 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="id22">
|
||
<span id="id23"></span><h5>返回结果示例<a class="headerlink" href="#id22" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"data"</span><span class="p">:</span><span class="s2">"pong"</span><span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id24">
|
||
<h3>合约代码管理类<a class="headerlink" href="#id24" title="永久链接至标题">¶</a></h3>
|
||
<div class="section" id="id25">
|
||
<h4>下载合约项目<a class="headerlink" href="#id25" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id26">
|
||
<span id="id27"></span><h5>方法<a class="headerlink" href="#id26" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id28">
|
||
<span id="id29"></span><h5>参数<a class="headerlink" href="#id28" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 41%" />
|
||
<col style="width: 59%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>downloadContract</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>projectName</p></td>
|
||
<td><p>合约项目名</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>isPrivate</p></td>
|
||
<td><p>是否在私有目录下</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>pubKey</p></td>
|
||
<td><p>用户公钥</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>timestamp</p></td>
|
||
<td><p>时间戳</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>sign</p></td>
|
||
<td><p>签名</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id30">
|
||
<span id="id31"></span><h5>请求示例<a class="headerlink" href="#id30" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=downloadContract&projectName=BDCoin&isPrivate=false&pubKey=0480204f4ef341359a5f64fcb11baf9ca2e6706ac20cba3
|
||
8b7ff78aa631e97346086e2d48fac2ba7f5b75ccbd19ebf495c0e6f9934d69e3b083da4d42e46c991e0c2ea8bb45d59f31f46d0ec700fb01f2fdd275
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id32">
|
||
<h4>上传文件<a class="headerlink" href="#id32" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id33">
|
||
<span id="id34"></span><h5>方法<a class="headerlink" href="#id33" title="永久链接至标题">¶</a></h5>
|
||
<p>POST</p>
|
||
</div>
|
||
<div class="section" id="id35">
|
||
<span id="id36"></span><h5>参数<a class="headerlink" href="#id35" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 36%" />
|
||
<col style="width: 64%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>path</p></td>
|
||
<td><p>文件上传路径</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>fileName</p></td>
|
||
<td><p>待上传文件名</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>isPrivate</p></td>
|
||
<td><p>是否在私有目录下</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>order</p></td>
|
||
<td><p>第几个数据包</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>count</p></td>
|
||
<td><p>数据包总数</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>timestamp</p></td>
|
||
<td><p>时间戳</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>sign</p></td>
|
||
<td><p>签名</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id37">
|
||
<span id="id38"></span><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:18000/SCIDE/Upload?path=/TEST/TEST.yjs&fileName=WechatIMG15.jpeg&isPrivate=true&order=0&count=3&pubKey=0480204f4ef341359a5f64fcb11baf9ca2e6706ac20cba36ca83066870cf2c1d5de6df67e24e68dde7934af9b31d94a6084281db3d32d5ce42ab8f75bf799aca05&sign=dd867469f5adf9986e4ea6215febeae50c7d4c3836d002cf8c17050dfca031fd2595ffa8646e9eeae53150d2cbaea690e27d818eaf5cea3632ee1b69c3307a4b631e97346086e2d48fac2ba7f5b75ccbd19ebf495c0e6f9934d69e3b083da4d42e46c991e0c2ea8bb45d59f31f46d0ec700fb01f2fdd275
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id39">
|
||
<span id="id40"></span><h5>返回结果示例<a class="headerlink" href="#id39" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"status"</span><span class="p">:</span><span class="s2">"true"</span><span class="p">,</span><span class="nt">"data"</span><span class="p">:</span><span class="s2">"success"</span><span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id41">
|
||
<h4>保存合约脚本<a class="headerlink" href="#id41" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 向服务器本地保存合约脚本内容.</p>
|
||
<div class="section" id="id42">
|
||
<span id="id43"></span><h5>方法<a class="headerlink" href="#id42" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id44">
|
||
<span id="id45"></span><h5>参数<a class="headerlink" href="#id44" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 33%" />
|
||
<col style="width: 67%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>writeDyjs</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>target</p></td>
|
||
<td><p>合约脚本文件名</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>content</p></td>
|
||
<td><p>合约脚本内容</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id46">
|
||
<span id="id47"></span><h5>请求示例<a class="headerlink" href="#id46" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=writeDyjs&target=testyjs.yjs&content=contract%20shortc%7B%0A%09export%20function%20main(arg)%7B%0A%09%09return%20arg.length%3B%09%0A%09%7D%0A%7D
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id48">
|
||
<span id="id49"></span><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">"status"</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onWriteDyjs"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="s2">"success"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>后续用户可启动并调用该合约.</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id50">
|
||
<h3>合约实例管理类<a class="headerlink" href="#id50" title="永久链接至标题">¶</a></h3>
|
||
<div class="section" id="id51">
|
||
<h4>查询合约进程<a class="headerlink" href="#id51" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 查询服务器上已经启动的所有合约进程.</p>
|
||
<div class="section" id="id52">
|
||
<span id="id53"></span><h5>方法<a class="headerlink" href="#id52" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id54">
|
||
<span id="id55"></span><h5>参数<a class="headerlink" href="#id54" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 24%" />
|
||
<col style="width: 76%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>listContractProcess</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id56">
|
||
<span id="id57"></span><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=listContractProcess
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id58">
|
||
<span id="id59"></span><h5>返回结果示例<a class="headerlink" href="#id58" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onListContractProcess"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="s2">"[\n {\n \"id\": \"-562752842\",\n \"name\": \"shortc\",\n \"port\": \"1626\",\n \"times\": \"0 \",\n \"traffic\": \"32.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n }\n]"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id60">
|
||
<h4>启动合约<a class="headerlink" href="#id60" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 启动某个合约.</p>
|
||
<div class="section" id="id61">
|
||
<span id="id62"></span><h5>方法<a class="headerlink" href="#id61" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id63">
|
||
<span id="id64"></span><h5>参数<a class="headerlink" href="#id63" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 15%" />
|
||
<col style="width: 85%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>startContract</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>script</p></td>
|
||
<td><p>合约脚本内容, 需进行进行URIEncode</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id65">
|
||
<span id="id66"></span><h5>请求示例<a class="headerlink" href="#id65" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=startContract&script=contract%20shortc%7B%0A%09export%20function%20main(arg)%7B%0A%09%09return%20arg.length%3B%09%0A%09%7D%0A%7D
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id67">
|
||
<span id="id68"></span><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">"data"</span><span class="p">:</span> <span class="s2">"{\"status\":\"Success\",\"result\":\"\"}"</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onStartContract"</span><span class="p">,</span>
|
||
<span class="nt">"cid"</span><span class="p">:</span> <span class="s2">"-562752842"</span><span class="p">,</span>
|
||
<span class="nt">"executeTime"</span><span class="p">:</span> <span class="mi">1187</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id69">
|
||
<h4>调用合约<a class="headerlink" href="#id69" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 调用某个合约.</p>
|
||
<div class="section" id="id70">
|
||
<span id="id71"></span><h5>方法<a class="headerlink" href="#id70" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id72">
|
||
<span id="id73"></span><h5>参数<a class="headerlink" href="#id72" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 41%" />
|
||
<col style="width: 59%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>executeContract</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>contractID</p></td>
|
||
<td><p>合约ID</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>withDynamicAnalysis</p></td>
|
||
<td><p>true/false 是否进行动态分析</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>operation</p></td>
|
||
<td><p>调用合约的方法名</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>arg</p></td>
|
||
<td><p>调用合约的参数</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>pubkey</p></td>
|
||
<td><p>可选,调用者公钥</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>signature</p></td>
|
||
<td><p>可选,签名</p></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">"|"</span><span class="o">+</span><span class="nx">operation</span><span class="o">+</span><span class="s2">"|"</span><span class="o">+</span><span class="nx">arg</span><span class="o">+</span><span class="s2">"|"</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="id74">
|
||
<span id="id75"></span><h5>请求示例<a class="headerlink" href="#id74" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=executeContract&contractID=-620602333&operation=main&arg=hhh
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id76">
|
||
<span id="id77"></span><h5>返回结果示例<a class="headerlink" href="#id76" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="s2">"{\"status\":\"Success\",\"result\":\"3\"}"</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onExecuteResult"</span><span class="p">,</span>
|
||
<span class="nt">"executeTime"</span><span class="p">:</span> <span class="s2">"13"</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">
|
||
<span id="id80"></span><h5>方法<a class="headerlink" href="#id79" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id81">
|
||
<span id="id82"></span><h5>参数<a class="headerlink" href="#id81" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 18%" />
|
||
<col style="width: 82%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>startContractBatched</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>fileList</p></td>
|
||
<td><p>合约脚本文件列表(Json数组,URLEncode)</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id83">
|
||
<span id="id84"></span><h5>请求示例<a class="headerlink" href="#id83" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=startContractBatched&fileList=%5B%20%22EventPuber.yjs%22%2C%20%22EventSuber.yjs%22%2C%20%22LicenceManager.yjs%22%20%5D
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id85">
|
||
<span id="id86"></span><h5>返回结果示例<a class="headerlink" href="#id85" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"EventPuber.yjs"</span><span class="p">:</span><span class="s2">"{\"status\":\"Success\",\"result\":\"\"}"</span><span class="p">,</span><span class="nt">"LicenceManager.yjs"</span><span class="p">:</span><span class="s2">"{\"status\":\"Success\",\"result\":\"\"}"</span><span class="p">,</span><span class="nt">"EventSuber.yjs"</span><span class="p">:</span><span class="s2">"{\"status\":\"Success\",\"result\":\"\"}"</span><span class="p">,</span><span class="nt">"action"</span><span class="p">:</span><span class="s2">"onStartContract"</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="id87">
|
||
<span id="id88"></span><h5>方法<a class="headerlink" href="#id87" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id89">
|
||
<span id="id90"></span><h5>参数<a class="headerlink" href="#id89" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 28%" />
|
||
<col style="width: 72%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>startContractInTempZips</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>owner</p></td>
|
||
<td><p>调用者公钥</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>path</p></td>
|
||
<td><p>zip合约(路径及)文件名</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>signature</p></td>
|
||
<td><p>调用者签名</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id91">
|
||
<span id="id92"></span><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=startContractInTempZips&owner=0475c7b061f32477c1e228dd04143daf58a5574dc3f6b02bd2857cc794eb92bfe98606dc314049e77fd8714f57a5a481cb470cc759e688fe60d40fc87092165e55&path=traceTest.zip&signature=650d3cad50509682937c253d84da99230e8ea1bcfb9b10f6d18f8888c7c4b6b4%2C72231a6daa078a3ce657c0a2ed38251b7db56cf725beaf86780d4c240b19ccc2
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id93">
|
||
<span id="id94"></span><h5>返回结果示例<a class="headerlink" href="#id93" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"data"</span><span class="p">:</span><span class="s2">"verify failed"</span><span class="p">,</span><span class="nt">"action"</span><span class="p">:</span><span class="s2">"onStartContract"</span><span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id95">
|
||
<h4>获取合约代码<a class="headerlink" href="#id95" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 获取某个ID合约的脚本代码.</p>
|
||
<div class="section" id="id96">
|
||
<span id="id97"></span><h5>方法<a class="headerlink" href="#id96" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id98">
|
||
<span id="id99"></span><h5>参数<a class="headerlink" href="#id98" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 48%" />
|
||
<col style="width: 52%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>getCodeByID</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>contractID</p></td>
|
||
<td><p>合约ID</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id100">
|
||
<span id="id101"></span><h5>请求示例<a class="headerlink" href="#id100" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=getCodeByID&contractID=814046805
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id102">
|
||
<span id="id103"></span><h5>返回结果示例<a class="headerlink" href="#id102" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"status"</span><span class="p">:</span><span class="kc">true</span><span class="p">,</span><span class="nt">"action"</span><span class="p">:</span><span class="s2">"onCodeResult"</span><span class="p">,</span><span class="nt">"data"</span><span class="p">:</span><span class="s2">"@LogType(\"Arg\")\ncontract EventSuberAtCHQ{\n\t\n \texport function init(arg){\n\t\tvar result \u003d YancloudUtil.subscribe(\"EventPuberAt3966\",\"abc\",handler);\n // print(\"Handler:\"+handler);\n \t \n \t\treturn result;\n\t}\n \texport function handler(e){\n var ret \u003d \"ReceiveEvent:\";\n\t\tret+\u003d\"\\n\";\n \tprint(ret);\n \tret+\u003dYancloudUtil.executeContract(\"EventPuberAt3966\",\"notify\",\"success\");\n \tprint(ret);\n return ret;\n\t}\n}\n"</span><span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id104">
|
||
<h4>保存合约状态<a class="headerlink" href="#id104" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 获取节点服务器的状态转移日志.</p>
|
||
<div class="section" id="id105">
|
||
<span id="id106"></span><h5>方法<a class="headerlink" href="#id105" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id107">
|
||
<span id="id108"></span><h5>参数<a class="headerlink" href="#id107" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 34%" />
|
||
<col style="width: 66%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>dumpContract</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>contractID</p></td>
|
||
<td><p>合约ID 或 合约Name=</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id109">
|
||
<span id="id110"></span><h5>请求示例<a class="headerlink" href="#id109" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/SCManager?action=dumpContract&contractID=counter&pubKey=040461417efe01423ba603f71c689387e8aac4aa2a6f7cddfaf22c1d22c40222f7669a054e7ec2e8533b04ccbc7a0e6655ac4ae4acef81a2b1822ec6cabcaf6c1f&sign=3045022004ffd1346b936196f5b13953d2f3e11823a0d0a2d2f6fecea258cef8e20d99c0022100bbc219ed1f56799ba28a763b9e9e47063164e7ceecfbfa752de42f44551ffb83
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id111">
|
||
<span id="id112"></span><h5>返回结果示例<a class="headerlink" href="#id111" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"data"</span><span class="p">:</span><span class="s2">"success"</span><span class="p">,</span><span class="nt">"size"</span><span class="p">:</span><span class="s2">"3.76 KB"</span><span class="p">,</span><span class="nt">"time"</span><span class="p">:</span><span class="s2">"0.03s"</span><span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id113">
|
||
<h4>获取合约内存文件列表<a class="headerlink" href="#id113" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 获取某子文件夹中的所有内存文件列表.</p>
|
||
<div class="section" id="id114">
|
||
<span id="id115"></span><h5>方法<a class="headerlink" href="#id114" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id116">
|
||
<span id="id117"></span><h5>参数<a class="headerlink" href="#id116" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 36%" />
|
||
<col style="width: 64%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>listMemoryFiles</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>contractID</p></td>
|
||
<td><p>合约Id 或 合约Name</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id118">
|
||
<span id="id119"></span><h5>请求示例<a class="headerlink" href="#id118" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/SCManager?action=listMemoryFiles&contractID=-247468535&pubKey=040461417efe01423ba603f71c689387e8aac4aa2a6f7cddfaf22c1d22c40222f7669a054e7ec2e8533b04ccbc7a0e6655ac4ae4acef81a2b1822ec6cabcaf6c1f&sign=3045022075c7268e888b0efdef167a3f4dfc6589d771c6be41b3c0a1dc12d057e811f395022100d44f460d0cc3643e169ef08231e75a1e895646c53295c0ef1d15c3b462a53d6b
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id120">
|
||
<span id="id121"></span><h5>返回结果示例<a class="headerlink" href="#id120" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"data"</span><span class="p">:[</span><span class="s2">"2020-09-23.18:40:38"</span><span class="p">,</span><span class="s2">"2020-09-24.16:03:41"</span><span class="p">,</span><span class="s2">"2020-09-24.16:58:39"</span><span class="p">,</span><span class="s2">"2020-09-24.18:25:47"</span><span class="p">,</span><span class="s2">"2020-09-24.18:32:37"</span><span class="p">,</span><span class="s2">"2020-09-24.20:54:41"</span><span class="p">,</span><span class="s2">"2020-09-24.20:57:39"</span><span class="p">,</span><span class="s2">"2020-09-24.21:31:07"</span><span class="p">,</span><span class="s2">"2020-09-24.21:32:09"</span><span class="p">,</span><span class="s2">"2020-09-24.21:36:11"</span><span class="p">,</span><span class="s2">"2020-09-28.15:29:15"</span><span class="p">,</span><span class="s2">"2020-09-28.20:28:29"</span><span class="p">,</span><span class="s2">"2020-09-28.20:39:46"</span><span class="p">,</span><span class="s2">"2020-09-28.21:45:31"</span><span class="p">,</span><span class="s2">"2020-09-28.21:49:18"</span><span class="p">,</span><span class="s2">"2020-09-28.22:27:34"</span><span class="p">,</span><span class="s2">"2020-09-28.22:31:09"</span><span class="p">,</span><span class="s2">"2020-09-28.22:32:49"</span><span class="p">,</span><span class="s2">"2020-10-07.16:51:06"</span><span class="p">,</span><span class="s2">"2020-10-07.16:51:23"</span><span class="p">,</span><span class="s2">"2020-10-25.21:09:10"</span><span class="p">,</span><span class="s2">"2020-12-14.19:06:53"</span><span class="p">,</span><span class="s2">"2021-02-02.10:28:56"</span><span class="p">,</span><span class="s2">"2021-02-02.10:31:13"</span><span class="p">],</span><span class="nt">"action"</span><span class="p">:</span><span class="s2">"onListMemoryFiles"</span><span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id122">
|
||
<h4>停止合约<a class="headerlink" href="#id122" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 停止某个合约.</p>
|
||
<div class="section" id="id123">
|
||
<span id="id124"></span><h5>方法<a class="headerlink" href="#id123" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id125">
|
||
<span id="id126"></span><h5>参数<a class="headerlink" href="#id125" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 37%" />
|
||
<col style="width: 63%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>killContractProcess</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>id</p></td>
|
||
<td><p>合约ID</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>*requestID</p></td>
|
||
<td><p>请求ID, String类型</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p><code class="docutils literal notranslate"><span class="pre">*</span></code>表示可选参数</p>
|
||
</div>
|
||
<div class="section" id="id127">
|
||
<span id="id128"></span><h5>请求示例<a class="headerlink" href="#id127" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=killContractProcess&id=-1759263594
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id129">
|
||
<span id="id130"></span><h5>返回结果示例<a class="headerlink" href="#id129" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"status"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="nt">"action"</span><span class="p">:</span><span class="s2">"onListContractProcess"</span><span class="p">,</span><span class="nt">"data"</span><span class="p">:</span><span class="s2">"[\n {\n \"id\": \"-65051856\",\n \"name\": \"EventSuber\",\n \"port\": \"1631\",\n \"times\": \"0 \",\n \"traffic\": \"32.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n },\n {\n \"id\": \"814046805\",\n \"name\": \"EventSuberAtCHQ\",\n \"port\": \"1630\",\n \"times\": \"0 \",\n \"traffic\": \"32.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n },\n {\n \"id\": \"2023975189\",\n \"name\": \"LicenceService\",\n \"port\": \"1632\",\n \"times\": \"0 \",\n \"traffic\": \"32.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n },\n {\n \"id\": \"-620602333\",\n \"name\": \"shortc\",\n \"port\": \"1627\",\n \"times\": \"0 \",\n \"traffic\": \"0.00 B\",\n \"storage\": \"0.00 B\",\n \"contractStatus\": \"Ready\"\n }\n]"</span><span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id131">
|
||
<h4>停止所有合约<a class="headerlink" href="#id131" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 停止服务器上启动的所有合约.</p>
|
||
<div class="section" id="id132">
|
||
<span id="id133"></span><h5>方法<a class="headerlink" href="#id132" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id134">
|
||
<span id="id135"></span><h5>参数<a class="headerlink" href="#id134" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 29%" />
|
||
<col style="width: 71%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>killAllContract</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id136">
|
||
<span id="id137"></span><h5>请求示例<a class="headerlink" href="#id136" 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="id138">
|
||
<span id="id139"></span><h5>返回结果示例<a class="headerlink" href="#id138" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"status"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="nt">"action"</span><span class="p">:</span><span class="s2">"onKillAllContract"</span><span class="p">,</span><span class="nt">"data"</span><span class="p">:</span><span class="s2">"Kill:7357,7541,7548,7555,7584,7585,7591,7598,7609,7612,8440,8442,8444,8521,"</span><span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id140">
|
||
<h4>静态分析合约<a class="headerlink" href="#id140" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 静态分析合约脚本.</p>
|
||
<div class="section" id="id141">
|
||
<span id="id142"></span><h5>方法<a class="headerlink" href="#id141" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id143">
|
||
<span id="id144"></span><h5>参数<a class="headerlink" href="#id143" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 33%" />
|
||
<col style="width: 67%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>staticVerifyContract</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>contractid</p></td>
|
||
<td><p>合约ID</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>script</p></td>
|
||
<td><p>请求ID, String类型</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id145">
|
||
<span id="id146"></span><h5>请求示例<a class="headerlink" href="#id145" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=staticVerifyContract&contractid=943728900&script=contract%20shortc%7B%0A%09export%20function%20main(arg)%7B%0A%09%09return%20arg.length%3B%09%0A%09%7D%0A%7D&path=static.yjs
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id147">
|
||
<span id="id148"></span><h5>返回结果示例<a class="headerlink" href="#id147" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"data"</span><span class="p">:</span><span class="s2">"{\"status\":\"Success\",\"result\":\"{\\\"main\\\":\\\"Ret:arg \\\"}\"}"</span><span class="p">,</span><span class="nt">"action"</span><span class="p">:</span><span class="s2">"onExecuteResult"</span><span class="p">,</span><span class="nt">"cid"</span><span class="p">:</span><span class="s2">"943728900"</span><span class="p">,</span><span class="nt">"executeTime"</span><span class="p">:</span><span class="mi">54</span><span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id149">
|
||
<h4>获取合约静态分析流<a class="headerlink" href="#id149" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 获取某个合约的静态分析Control Flow.</p>
|
||
<div class="section" id="id150">
|
||
<span id="id151"></span><h5>方法<a class="headerlink" href="#id150" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id152">
|
||
<span id="id153"></span><h5>参数<a class="headerlink" href="#id152" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 20%" />
|
||
<col style="width: 80%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>getControlFlowByFileName</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>path</p></td>
|
||
<td><p>合约ID</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id154">
|
||
<span id="id155"></span><h5>请求示例<a class="headerlink" href="#id154" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=getControlFlowByFileName&path=EventSuber.yjs
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id156">
|
||
<span id="id157"></span><h5>返回结果示例<a class="headerlink" href="#id156" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"init"</span><span class="p">:{</span><span class="nt">"blocks"</span><span class="p">:[{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B0"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"\u003dL0\u003d"</span><span class="p">,</span><span class="s2">"aload 0"</span><span class="p">,</span><span class="s2">"invokevirtual wrp/jdk/nashorn/internal/runtime/ScriptFunction getScope ()Lwrp/jdk/nashorn/internal/runtime/ScriptObject;"</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">""</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B1"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"\u003dL1\u003d"</span><span class="p">,</span><span class="s2">"astore 4"</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">""</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B2"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"\u003dL2\u003d"</span><span class="p">,</span><span class="s2">"aload 4"</span><span class="p">,</span><span class="s2">"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 "</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B3"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"dup"</span><span class="p">,</span><span class="s2">"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 "</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B4"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"swap"</span><span class="p">,</span><span class="s2">"ldc XiaomiSmartHomeAtPKU"</span><span class="p">,</span><span class="s2">"ldc onAirPurifierModeChange"</span><span class="p">,</span><span class="s2">"aload 4"</span><span class="p">,</span><span class="s2">"invokedynamic dyn:getProp|getElem|getMethod:handler (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 5 "</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B5"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"invokedynamic dyn:call:\\\u003dYancloudUtil\\,subscribe (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 0 "</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B6"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"\u003dL3\u003d"</span><span class="p">,</span><span class="s2">"astore 5"</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">"\t\tvar result \u003d YancloudUtil.subscribe(\"XiaomiSmartHomeAtPKU\",\"onAirPurifierModeChange\",handler);"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B7"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"\u003dL4\u003d"</span><span class="p">,</span><span class="s2">"aload 5"</span><span class="p">,</span><span class="s2">"areturn"</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">" \t\treturn result;"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B8"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"\u003dL5\u003d"</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">" \t\treturn result;"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B9"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"\u003dL6\u003d"</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">" \t\treturn result;"</span><span class="p">}],</span><span class="nt">"edges"</span><span class="p">:[{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B0"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B1"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B1"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B2"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B2"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B3"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B3"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B4"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B4"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B5"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B5"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B6"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B6"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B7"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B7"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B9"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}}]},</span><span class="nt">"handler"</span><span class="p">:{</span><span class="nt">"blocks"</span><span class="p">:[{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B0"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"\u003dL0\u003d"</span><span class="p">,</span><span class="s2">"aload 0"</span><span class="p">,</span><span class="s2">"invokevirtual wrp/jdk/nashorn/internal/runtime/ScriptFunction getScope ()Lwrp/jdk/nashorn/internal/runtime/ScriptObject;"</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">""</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B1"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"\u003dL1\u003d"</span><span class="p">,</span><span class="s2">"astore 4"</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">""</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B2"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"\u003dL2\u003d"</span><span class="p">,</span><span class="s2">"ldc ReceiveEvent:"</span><span class="p">,</span><span class="s2">"aload 2"</span><span class="p">,</span><span class="s2">"invokedynamic dyn:getProp|getElem|getMethod:content (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 0 "</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B3"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"invokestatic wrp/jdk/nashorn/internal/runtime/ScriptRuntime ADD (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B4"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"ldc "</span><span class="p">,</span><span class="s2">"invokestatic wrp/jdk/nashorn/internal/runtime/ScriptRuntime ADD (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B5"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"aload 2"</span><span class="p">,</span><span class="s2">"invokedynamic dyn:getProp|getElem|getMethod:type (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 0 "</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B6"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"invokestatic wrp/jdk/nashorn/internal/runtime/ScriptRuntime ADD (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B7"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"\u003dL3\u003d"</span><span class="p">,</span><span class="s2">"astore 5"</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">" var ret \u003d \"ReceiveEvent:\"+e.content+\" \"+e.type;"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B8"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"\u003dL4\u003d"</span><span class="p">,</span><span class="s2">"aload 4"</span><span class="p">,</span><span class="s2">"invokedynamic dyn:getMethod|getProp|getElem:print (Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 5 "</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">" \tprint(ret);"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B9"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"getstatic wrp/jdk/nashorn/internal/runtime/ScriptRuntime UNDEFINED Lwrp/jdk/nashorn/internal/runtime/Undefined;"</span><span class="p">,</span><span class="s2">"aload 5"</span><span class="p">,</span><span class="s2">"invokedynamic dyn:call:print (Ljava/lang/Object;Lwrp/jdk/nashorn/internal/runtime/Undefined;Ljava/lang/Object;)Ljava/lang/Object; HANDLE:wrp/jdk/nashorn/internal/runtime/linker/Bootstrap.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/CallSite; (6) 5 "</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">" \tprint(ret);"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B10"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"pop"</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">" \tprint(ret);"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B11"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"\u003dL5\u003d"</span><span class="p">,</span><span class="s2">"aload 5"</span><span class="p">,</span><span class="s2">"areturn"</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">" return ret;"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B12"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"\u003dL6\u003d"</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">" return ret;"</span><span class="p">},{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"Continuous"</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"B13"</span><span class="p">,</span><span class="nt">"stmts"</span><span class="p">:[</span><span class="s2">"\u003dL7\u003d"</span><span class="p">],</span><span class="nt">"original"</span><span class="p">:</span><span class="s2">" return ret;"</span><span class="p">}],</span><span class="nt">"edges"</span><span class="p">:[{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B0"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B1"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B1"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B2"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B2"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B3"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B3"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B4"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B4"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B5"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B5"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B6"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B6"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B7"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B7"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B8"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B8"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B9"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B9"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B10"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B10"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B11"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}},{</span><span class="nt">"from"</span><span class="p">:</span><span class="s2">"B11"</span><span class="p">,</span><span class="nt">"to"</span><span class="p">:</span><span class="s2">"B13"</span><span class="p">,</span><span class="nt">"label"</span><span class="p">:{</span><span class="nt">"label"</span><span class="p">:</span><span class="s2">"e"</span><span class="p">}}]}}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id158">
|
||
<h3>日志查看类<a class="headerlink" href="#id158" title="永久链接至标题">¶</a></h3>
|
||
<div class="section" id="id159">
|
||
<h4>合约日志-查询数量<a class="headerlink" href="#id159" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id160">
|
||
<span id="id161"></span><h5>方法<a class="headerlink" href="#id160" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
<p>contractName为空或是不传入时,则为查询全部合约的条数</p>
|
||
</div>
|
||
<div class="section" id="id162">
|
||
<span id="id163"></span><h5>参数<a class="headerlink" href="#id162" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 33%" />
|
||
<col style="width: 67%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>queryContractLogSize</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>contractName</p></td>
|
||
<td><p>字符串,非必须,合约名称</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id164">
|
||
<span id="id165"></span><h5>请求示例<a class="headerlink" href="#id164" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogSize&contractName=NanningDataSource
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id166">
|
||
<span id="id167"></span><h5>返回结果示例<a class="headerlink" href="#id166" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"size"</span><span class="p">:</span> <span class="mi">12</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onQueryContractLogSize"</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="s2">"success"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id168">
|
||
<h4>合约日志-根据日期查询<a class="headerlink" href="#id168" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id169">
|
||
<span id="id170"></span><h5>方法<a class="headerlink" href="#id169" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id171">
|
||
<span id="id172"></span><h5>参数<a class="headerlink" href="#id171" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 24%" />
|
||
<col style="width: 76%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>queryContractLogByDate</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>start</p></td>
|
||
<td><p>long,必须,起始时间</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>end</p></td>
|
||
<td><p>long,非必须,若无end,默认为当前时间</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>contractName</p></td>
|
||
<td><p>字符串,非必须,合约名称</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id173">
|
||
<span id="id174"></span><h5>请求示例<a class="headerlink" href="#id173" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogByDate&start=1597296300272&end=1597296305747
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<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><span class="p">{</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="p">[</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"executeContract"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"contractID"</span><span class="p">:</span> <span class="s2">"-1382208250"</span><span class="p">,</span>
|
||
<span class="nt">"contractName"</span><span class="p">:</span> <span class="s2">"NanningDataSource"</span><span class="p">,</span>
|
||
<span class="nt">"function"</span><span class="p">:</span> <span class="s2">"getMainFrame"</span><span class="p">,</span>
|
||
<span class="nt">"costTime"</span><span class="p">:</span> <span class="s2">"2493"</span><span class="p">,</span>
|
||
<span class="nt">"totalGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"executionGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"extraGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597296300272</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"-8590335427581967208"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"executeContract"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"contractID"</span><span class="p">:</span> <span class="s2">"-1382208250"</span><span class="p">,</span>
|
||
<span class="nt">"contractName"</span><span class="p">:</span> <span class="s2">"NanningDataSource"</span><span class="p">,</span>
|
||
<span class="nt">"function"</span><span class="p">:</span> <span class="s2">"loadResource"</span><span class="p">,</span>
|
||
<span class="nt">"costTime"</span><span class="p">:</span> <span class="s2">"732"</span><span class="p">,</span>
|
||
<span class="nt">"totalGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"executionGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"extraGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597296301030</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"849660532962309239"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"executeContract"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"contractID"</span><span class="p">:</span> <span class="s2">"-1382208250"</span><span class="p">,</span>
|
||
<span class="nt">"contractName"</span><span class="p">:</span> <span class="s2">"NanningDataSource"</span><span class="p">,</span>
|
||
<span class="nt">"function"</span><span class="p">:</span> <span class="s2">"loadResource"</span><span class="p">,</span>
|
||
<span class="nt">"costTime"</span><span class="p">:</span> <span class="s2">"4580"</span><span class="p">,</span>
|
||
<span class="nt">"totalGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"executionGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"extraGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597296305745</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"-8003529429500512736"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"executeContract"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"contractID"</span><span class="p">:</span> <span class="s2">"-1382208250"</span><span class="p">,</span>
|
||
<span class="nt">"contractName"</span><span class="p">:</span> <span class="s2">"NanningDataSource"</span><span class="p">,</span>
|
||
<span class="nt">"function"</span><span class="p">:</span> <span class="s2">"loadResource"</span><span class="p">,</span>
|
||
<span class="nt">"costTime"</span><span class="p">:</span> <span class="s2">"4551"</span><span class="p">,</span>
|
||
<span class="nt">"totalGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"executionGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"extraGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597296305746</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"7604666709899222357"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"executeContract"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"contractID"</span><span class="p">:</span> <span class="s2">"-1382208250"</span><span class="p">,</span>
|
||
<span class="nt">"contractName"</span><span class="p">:</span> <span class="s2">"NanningDataSource"</span><span class="p">,</span>
|
||
<span class="nt">"function"</span><span class="p">:</span> <span class="s2">"loadResource"</span><span class="p">,</span>
|
||
<span class="nt">"costTime"</span><span class="p">:</span> <span class="s2">"6"</span><span class="p">,</span>
|
||
<span class="nt">"totalGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"executionGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"extraGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597296305751</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"-7561786202695627022"</span>
|
||
<span class="p">}</span>
|
||
<span class="p">],</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onQueryRecentContractLog"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id176">
|
||
<h4>合约日志-根据偏移量查询<a class="headerlink" href="#id176" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id177">
|
||
<span id="id178"></span><h5>方法<a class="headerlink" href="#id177" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id179">
|
||
<span id="id180"></span><h5>参数<a class="headerlink" href="#id179" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 21%" />
|
||
<col style="width: 79%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>queryContractLogByOffset</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>count</p></td>
|
||
<td><p>long,必须,获取日志条数</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>offset</p></td>
|
||
<td><p>long,非必须,若无offset,默认返回最新count条</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>contractName</p></td>
|
||
<td><p>字符串,非必须,合约名称</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id181">
|
||
<span id="id182"></span><h5>请求示例<a class="headerlink" href="#id181" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogByOffset&count=5&contractName=NanningDataSource
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id183">
|
||
<span id="id184"></span><h5>返回结果<a class="headerlink" href="#id183" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="p">[</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"executeContract"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"contractID"</span><span class="p">:</span> <span class="s2">"-1382208250"</span><span class="p">,</span>
|
||
<span class="nt">"contractName"</span><span class="p">:</span> <span class="s2">"NanningDataSource"</span><span class="p">,</span>
|
||
<span class="nt">"function"</span><span class="p">:</span> <span class="s2">"loadResource"</span><span class="p">,</span>
|
||
<span class="nt">"costTime"</span><span class="p">:</span> <span class="s2">"4"</span><span class="p">,</span>
|
||
<span class="nt">"totalGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"executionGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"extraGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597296305842</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"-2390672423847654148"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"executeContract"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"contractID"</span><span class="p">:</span> <span class="s2">"-1382208250"</span><span class="p">,</span>
|
||
<span class="nt">"contractName"</span><span class="p">:</span> <span class="s2">"NanningDataSource"</span><span class="p">,</span>
|
||
<span class="nt">"function"</span><span class="p">:</span> <span class="s2">"isOwner"</span><span class="p">,</span>
|
||
<span class="nt">"costTime"</span><span class="p">:</span> <span class="s2">"4"</span><span class="p">,</span>
|
||
<span class="nt">"totalGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"executionGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"extraGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597296305868</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"6056586201629372511"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"executeContract"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"contractID"</span><span class="p">:</span> <span class="s2">"-1382208250"</span><span class="p">,</span>
|
||
<span class="nt">"contractName"</span><span class="p">:</span> <span class="s2">"NanningDataSource"</span><span class="p">,</span>
|
||
<span class="nt">"function"</span><span class="p">:</span> <span class="s2">"getApplyList"</span><span class="p">,</span>
|
||
<span class="nt">"costTime"</span><span class="p">:</span> <span class="s2">"6"</span><span class="p">,</span>
|
||
<span class="nt">"totalGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"executionGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"extraGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597296305893</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"3882409580676458151"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"executeContract"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"contractID"</span><span class="p">:</span> <span class="s2">"-1382208250"</span><span class="p">,</span>
|
||
<span class="nt">"contractName"</span><span class="p">:</span> <span class="s2">"NanningDataSource"</span><span class="p">,</span>
|
||
<span class="nt">"function"</span><span class="p">:</span> <span class="s2">"getAcceptList"</span><span class="p">,</span>
|
||
<span class="nt">"costTime"</span><span class="p">:</span> <span class="s2">"4"</span><span class="p">,</span>
|
||
<span class="nt">"totalGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"executionGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"extraGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597296305908</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"-3437513873417136535"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"executeContract"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"contractID"</span><span class="p">:</span> <span class="s2">"-1382208250"</span><span class="p">,</span>
|
||
<span class="nt">"contractName"</span><span class="p">:</span> <span class="s2">"NanningDataSource"</span><span class="p">,</span>
|
||
<span class="nt">"function"</span><span class="p">:</span> <span class="s2">"analysisByIndustry"</span><span class="p">,</span>
|
||
<span class="nt">"costTime"</span><span class="p">:</span> <span class="s2">"6"</span><span class="p">,</span>
|
||
<span class="nt">"totalGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"executionGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"extraGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"signature"</span><span class="p">:</span> <span class="s2">"4c2cef1756b2b591ab7eead19d67331e2294c7ba765c72298733c306ada0b6e84afbb6c7b9dba48b9843236ebe67aecb4af09fe58a51eef0e2e89b9f3e5cad02"</span><span class="p">,</span>
|
||
<span class="nt">"arg"</span><span class="p">:</span> <span class="s2">" {\"year\":2018,\"category\":\"工业\",\"indexType\":\"营业额\"}"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597296314654</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"203156239086062402"</span>
|
||
<span class="p">}</span>
|
||
<span class="p">],</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onQueryRecentContractLog"</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="id185">
|
||
<span id="id186"></span><h5>方法<a class="headerlink" href="#id185" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id187">
|
||
<span id="id188"></span><h5>参数<a class="headerlink" href="#id187" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 18%" />
|
||
<col style="width: 82%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>queryContractLogByKey</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>key</p></td>
|
||
<td><p>long,必须,该日志对应的key</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id189">
|
||
<span id="id190"></span><h5>请求示例<a class="headerlink" href="#id189" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryContractLogByKey&key=203156239086062402
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id191">
|
||
<span id="id192"></span><h5>返回结果<a class="headerlink" href="#id191" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"executeContract"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"contractID"</span><span class="p">:</span> <span class="s2">"-1382208250"</span><span class="p">,</span>
|
||
<span class="nt">"contractName"</span><span class="p">:</span> <span class="s2">"NanningDataSource"</span><span class="p">,</span>
|
||
<span class="nt">"function"</span><span class="p">:</span> <span class="s2">"analysisByIndustry"</span><span class="p">,</span>
|
||
<span class="nt">"costTime"</span><span class="p">:</span> <span class="s2">"6"</span><span class="p">,</span>
|
||
<span class="nt">"totalGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"executionGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"extraGas"</span><span class="p">:</span> <span class="s2">"0"</span><span class="p">,</span>
|
||
<span class="nt">"signature"</span><span class="p">:</span> <span class="s2">"4c2cef1756b2b591ab7eead19d67331e2294c7ba765c72298733c306ada0b6e84afbb6c7b9dba48b9843236ebe67aecb4af09fe58a51eef0e2e89b9f3e5cad02"</span><span class="p">,</span>
|
||
<span class="nt">"arg"</span><span class="p">:</span> <span class="s2">" {\"year\":2018,\"category\":\"工业\",\"indexType\":\"营业额\"}"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597296314654</span>
|
||
<span class="p">},</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onQueryContractLogByKey"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id193">
|
||
<h4>合约日志-按时间段统计调用次数<a class="headerlink" href="#id193" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id194">
|
||
<span id="id195"></span><h5>方法<a class="headerlink" href="#id194" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id196">
|
||
<span id="id197"></span><h5>参数<a class="headerlink" href="#id196" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 13%" />
|
||
<col style="width: 88%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>countContractLogGroupByCategory</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>start</p></td>
|
||
<td><p>long,必须,起始时间</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>end</p></td>
|
||
<td><p>非必须,终止时间,默认为当前</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>interval</p></td>
|
||
<td><p>long,非必须,统计间隔</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>category</p></td>
|
||
<td><p>非必须,合约名称以逗号连接,不传入时统计全部合约调用情况</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id198">
|
||
<span id="id199"></span><h5>请求示例<a class="headerlink" href="#id198" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=countContractLogGroupByCategory&start=1596758400000&interval=86400000
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id200">
|
||
<span id="id201"></span><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">"start"</span><span class="p">:</span> <span class="mi">1596758400000</span><span class="p">,</span>
|
||
<span class="nt">"interval"</span><span class="p">:</span> <span class="mi">86400000</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onCountContractLogGroupByCategory"</span><span class="p">,</span>
|
||
<span class="nt">"data"</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="id202">
|
||
<h4>账本日志-查询数量<a class="headerlink" href="#id202" title="永久链接至标题">¶</a></h4>
|
||
<p>查询通过本节点去账本上记录的日志数量</p>
|
||
<div class="section" id="id203">
|
||
<span id="id204"></span><h5>方法<a class="headerlink" href="#id203" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id205">
|
||
<span id="id206"></span><h5>参数<a class="headerlink" href="#id205" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 43%" />
|
||
<col style="width: 57%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>queryHashSize</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>contractName</p></td>
|
||
<td><p>非必须,合约名称</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id207">
|
||
<span id="id208"></span><h5>请求示例<a class="headerlink" href="#id207" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryHashSize&contractName=NanningDataSource
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id209">
|
||
<span id="id210"></span><h5>返回结果<a class="headerlink" href="#id209" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"count"</span><span class="p">:</span> <span class="s2">"2"</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onQueryHashSize"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id211">
|
||
<h4>账本日志-根据偏移量查询<a class="headerlink" href="#id211" title="永久链接至标题">¶</a></h4>
|
||
<p>查询x条通过本节点去账本上记录的日志的哈希列表</p>
|
||
<div class="section" id="id212">
|
||
<span id="id213"></span><h5>方法<a class="headerlink" href="#id212" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id214">
|
||
<span id="id215"></span><h5>参数<a class="headerlink" href="#id214" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 17%" />
|
||
<col style="width: 83%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>queryHashByOffset</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>count</p></td>
|
||
<td><p>整数,必须,表示条数</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>offset</p></td>
|
||
<td><p>整数,非必须,表示偏移量,不传入offset则默认返回最新count条</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>contractName</p></td>
|
||
<td><p>字符串,非必须,表示合约名称</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id216">
|
||
<span id="id217"></span><h5>请求示例<a class="headerlink" href="#id216" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryHashByOffset&count=1&contractName=NanningDataSource
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id218">
|
||
<span id="id219"></span><h5>返回结果<a class="headerlink" href="#id218" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="p">[</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"hash"</span><span class="p">:</span> <span class="s2">"3a6c60621907146b77146c1f2d48700e47520173"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597296314658</span>
|
||
<span class="p">}</span>
|
||
<span class="p">],</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onQueryHash"</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="s2">"success"</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="id220">
|
||
<span id="id221"></span><h5>方法<a class="headerlink" href="#id220" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id222">
|
||
<span id="id223"></span><h5>参数<a class="headerlink" href="#id222" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 16%" />
|
||
<col style="width: 84%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>queryDataByHash</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>hash</p></td>
|
||
<td><p>字符串,可通过queryHashByOffset</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id224">
|
||
<span id="id225"></span><h5>请求示例<a class="headerlink" href="#id224" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryDataByHash&count=1&contractName=NanningDataSource&hash=3a6c60621907146b77146c1f2d48700e47520173
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id226">
|
||
<span id="id227"></span><h5>返回结果<a class="headerlink" href="#id226" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"from"</span><span class="p">:</span> <span class="s2">"0x3034643139323433323966373263656431343866"</span><span class="p">,</span>
|
||
<span class="nt">"to"</span><span class="p">:</span> <span class="s2">"0x65786563757465436f6e74726163740000000000"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="s2">"1597296314655 --> {\"extraGas\":\"0\",\"totalGas\":\"0\",\"executionGas\":\"0\",\"signature\":\"4c2cef1756b2b591ab7eead19d67331e2294c7ba765c72298733c306ada0b6e84afbb6c7b9dba48b9843236ebe67aecb4af09fe58a51eef0e2e89b9f3e5cad02\",\"costTime\":\"6\",\"arg\":\" {\\\\\\\"year\\\\\\\":2018,\\\\\\\"category\\\\\\\":\\\\\\\"工业\\\\\\\",\\\\\\\"indexType\\\\\\\":\\\\\\\"营业额\\\\\\\"}\",\"contractID\":\"-1382208250\",\"action\":\"analysisByIndustry\",\"pubKey\":\"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd\"}"</span><span class="p">,</span>
|
||
<span class="nt">"requestID"</span><span class="p">:</span> <span class="s2">"1597296314629_6067"</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onQueryDataByHash"</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="id228">
|
||
<span id="id229"></span><h5>方法<a class="headerlink" href="#id228" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id230">
|
||
<span id="id231"></span><h5>参数<a class="headerlink" href="#id230" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 27%" />
|
||
<col style="width: 73%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>queryHashByRequestID</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>requestID</p></td>
|
||
<td><p>字符串,在发起调用时生成</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id232">
|
||
<span id="id233"></span><h5>请求示例<a class="headerlink" href="#id232" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:1717/SCIDE/SCManager?action=queryHashByRequestID&requestID=0987654321ab
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id234">
|
||
<h4>节点日志-查询数量<a class="headerlink" href="#id234" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id235">
|
||
<span id="id236"></span><h5>方法<a class="headerlink" href="#id235" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id237">
|
||
<span id="id238"></span><h5>参数<a class="headerlink" href="#id237" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 22%" />
|
||
<col style="width: 78%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>queryNodeLogSize</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>category</p></td>
|
||
<td><p>非必须,不传入时查询全部情况</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p>其中包括:ping、startContract、saveFile等。</p>
|
||
</div>
|
||
<div class="section" id="id239">
|
||
<span id="id240"></span><h5>请求示例<a class="headerlink" href="#id239" 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&category=login
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id241">
|
||
<span id="id242"></span><h5>返回结果<a class="headerlink" href="#id241" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"size"</span><span class="p">:</span> <span class="mi">177</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onQueryNodeLogSize"</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="s2">"success"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id243">
|
||
<h4>节点日志-按日期查询<a class="headerlink" href="#id243" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id244">
|
||
<span id="id245"></span><h5>方法<a class="headerlink" href="#id244" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id246">
|
||
<span id="id247"></span><h5>参数<a class="headerlink" href="#id246" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 22%" />
|
||
<col style="width: 78%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>queryNodeLogByDate</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>start</p></td>
|
||
<td><p>long,必须,起始日期</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>end</p></td>
|
||
<td><p>long,非必须</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>category</p></td>
|
||
<td><p>非必须,不传入时查询全部情况</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id248">
|
||
<span id="id249"></span><h5>请求示例<a class="headerlink" href="#id248" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogByDate&start=1597376006441
|
||
|
||
http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogByDate&start=1596758400000&category=login
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id250">
|
||
<span id="id251"></span><h5>返回结果<a class="headerlink" href="#id250" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="p">[</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"listAllAuthRole"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="s2">"accept"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597376006438</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"387355870552374748"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"listUnAuthRole"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="s2">"accept"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597376006441</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"4772693258708933626"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"countRole"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="s2">"accept"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597376006444</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"-6425375229108830572"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"loadNodeConfig"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="s2">"accept"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597376006448</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"-6602401010405792959"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"getPeerID"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="s2">"accept"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597376006449</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"-7006776427870311552"</span>
|
||
<span class="p">}</span>
|
||
<span class="p">],</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onQueryNodeLogByDate"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id252">
|
||
<h4>节点日志-按偏移量查询<a class="headerlink" href="#id252" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id253">
|
||
<span id="id254"></span><h5>方法<a class="headerlink" href="#id253" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id255">
|
||
<span id="id256"></span><h5>参数<a class="headerlink" href="#id255" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 21%" />
|
||
<col style="width: 79%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>queryNodeLogByOffset</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>count</p></td>
|
||
<td><p>long,必须,获取日志条数</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>offset</p></td>
|
||
<td><p>long,非必须,若无offset,默认返回最新count条</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>contractName</p></td>
|
||
<td><p>字符串,非必须,合约名称</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id257">
|
||
<span id="id258"></span><h5>请求示例<a class="headerlink" href="#id257" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=queryNodeLogByOffset&count=5
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id259">
|
||
<span id="id260"></span><h5>返回结果<a class="headerlink" href="#id259" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="p">[</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"listAllAuthRole"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="s2">"accept"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597376006438</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"387355870552374748"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"listUnAuthRole"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="s2">"accept"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597376006441</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"4772693258708933626"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"countRole"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="s2">"accept"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597376006444</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"-6425375229108830572"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"loadNodeConfig"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="s2">"accept"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597376006448</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"-6602401010405792959"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"getPeerID"</span><span class="p">,</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"04d1924329f72ced148f6f333fb985ccbaa31b1e3aacf10be5f43d4a4ff5ad88899a005e79e37fc06993e1d66ada8cf8b711cb36f59538bb7d3e39e70fa9360ddd"</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="s2">"accept"</span><span class="p">,</span>
|
||
<span class="nt">"date"</span><span class="p">:</span> <span class="mi">1597376006449</span><span class="p">,</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"-7006776427870311552"</span>
|
||
<span class="p">}</span>
|
||
<span class="p">],</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onQueryNodeLogByOffset"</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">
|
||
<span id="id263"></span><h5>方法<a class="headerlink" href="#id262" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id264">
|
||
<span id="id265"></span><h5>参数<a class="headerlink" href="#id264" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 14%" />
|
||
<col style="width: 86%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>countLogGroupByCategory</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>start</p></td>
|
||
<td><p>long,必须,起始时间</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>end</p></td>
|
||
<td><p>非必须,终止时间,默认为当前</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>interval</p></td>
|
||
<td><p>long,非必须,统计间隔</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>category</p></td>
|
||
<td><p>非必须,action以逗号连接,不传入时统计全部调用情况</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p>其中,category中的action为NodePortal的接口的action集合。
|
||
包括:ping、startContract、saveFile等。</p>
|
||
</div>
|
||
<div class="section" id="id266">
|
||
<span id="id267"></span><h5>请求示例<a class="headerlink" href="#id266" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>http://127.0.0.1:18000/SCIDE/CMManager?action=countNodeLogGroupByCategory&start=1596758400000&interval=86400000
|
||
|
||
http://127.0.0.1:18000/SCIDE/CMManager?action=countNodeLogGroupByCategory&start=1596758400000&interval=86400000&category=ping,startContract
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id268">
|
||
<span id="id269"></span><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">"start"</span><span class="p">:</span> <span class="mi">1596758400000</span><span class="p">,</span>
|
||
<span class="nt">"interval"</span><span class="p">:</span> <span class="mi">86400000</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onCountNodeLogGroupByCategory"</span><span class="p">,</span>
|
||
<span class="nt">"data"</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="id270">
|
||
<h4>输出历史记录日志<a class="headerlink" href="#id270" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 获取节点服务器上合约的TimeTravel日志.</p>
|
||
<div class="section" id="id271">
|
||
<span id="id272"></span><h5>方法<a class="headerlink" href="#id271" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id273">
|
||
<span id="id274"></span><h5>参数<a class="headerlink" href="#id273" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 25%" />
|
||
<col style="width: 75%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>printTimeTravelLog</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id275">
|
||
<span id="id276"></span><h5>请求示例<a class="headerlink" href="#id275" 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="id277">
|
||
<span id="id278"></span><h5>返回结果示例<a class="headerlink" href="#id277" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"status"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="nt">"data"</span><span class="p">:</span><span class="s2">"[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"</span><span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id279">
|
||
<h4>输出节点转移日志<a class="headerlink" href="#id279" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 获取节点服务器的状态转移日志.</p>
|
||
<div class="section" id="id280">
|
||
<span id="id281"></span><h5>方法<a class="headerlink" href="#id280" title="永久链接至标题">¶</a></h5>
|
||
<p>GET</p>
|
||
</div>
|
||
<div class="section" id="id282">
|
||
<span id="id283"></span><h5>参数<a class="headerlink" href="#id282" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 27%" />
|
||
<col style="width: 73%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>printTransferLog</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id284">
|
||
<span id="id285"></span><h5>请求示例<a class="headerlink" href="#id284" 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="id286">
|
||
<span id="id287"></span><h5>返回结果示例<a class="headerlink" href="#id286" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"status"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span><span class="nt">"data"</span><span class="p">:</span><span class="s2">""</span><span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id288">
|
||
<h3>模板生成类<a class="headerlink" href="#id288" title="永久链接至标题">¶</a></h3>
|
||
</div>
|
||
</div>
|
||
<hr class="docutils" />
|
||
<div class="section" id="websocket">
|
||
<h2>合约节点WebSocket接口<a class="headerlink" href="#websocket" title="永久链接至标题">¶</a></h2>
|
||
<div class="section" id="id289">
|
||
<span id="id290"></span><h3>用户管理类<a class="headerlink" href="#id289" 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="id291">
|
||
<span id="id292"></span><h5>参数<a class="headerlink" href="#id291" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 33%" />
|
||
<col style="width: 67%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>getSessionID</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id293">
|
||
<span id="id294"></span><h5>请求示例<a class="headerlink" href="#id293" 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">"getSessionID"</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="id295">
|
||
<span id="id296"></span><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">"action"</span><span class="p">:</span> <span class="s2">"onSessionID"</span><span class="p">,</span>
|
||
<span class="nt">"session"</span><span class="p">:</span> <span class="s2">"9782323_session"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id297">
|
||
<h4>用户登录<a class="headerlink" href="#id297" title="永久链接至标题">¶</a></h4>
|
||
<p>用户进行公私钥身份验证</p>
|
||
<div class="section" id="id298">
|
||
<span id="id299"></span><h5>参数<a class="headerlink" href="#id298" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 55%" />
|
||
<col style="width: 45%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>login</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id300">
|
||
<span id="id301"></span><h5>请求示例<a class="headerlink" href="#id300" 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">"login"</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="id302">
|
||
<span id="id303"></span><h5>返回结果<a class="headerlink" href="#id302" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onLogin"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="s2">"NodeManager,ContractProvider"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id304">
|
||
<h4>申请角色<a class="headerlink" href="#id304" title="永久链接至标题">¶</a></h4>
|
||
<p>在节点管理员界面申请可以申请称为合约管理员(ContractInstanceManager)、合约使用者(ContractUser)、合约提供者(ContractProvider)</p>
|
||
<div class="section" id="id305">
|
||
<span id="id306"></span><h5>参数<a class="headerlink" href="#id305" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 32%" />
|
||
<col style="width: 68%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>applyNodeRole</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>role</p></td>
|
||
<td><p>申请角色名称</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id307">
|
||
<span id="id308"></span><h5>请求示例<a class="headerlink" href="#id307" 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">"applyNodeRole"</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">"ContractUser"</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="id309">
|
||
<span id="id310"></span><h5>返回结果<a class="headerlink" href="#id309" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onApplyRole"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="s2">"success"</span>
|
||
<span class="p">}</span>
|
||
|
||
<span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span><span class="s2">"onApplyRole"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"already has!"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id311">
|
||
<h4>授权角色<a class="headerlink" href="#id311" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id312">
|
||
<span id="id313"></span><h5>参数<a class="headerlink" href="#id312" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 29%" />
|
||
<col style="width: 71%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>authNodeRole</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>isAccept</p></td>
|
||
<td><p>bool类型,表示否授权</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>pubKey</p></td>
|
||
<td><p>授权用户公钥</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id314">
|
||
<span id="id315"></span><h5>请求示例<a class="headerlink" href="#id314" 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">"authNodeRole"</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">"xxxxx"</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">
|
||
<span id="id317"></span><h5>返回结果<a class="headerlink" href="#id316" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onAuthNodeRole"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="s2">"success"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id318">
|
||
<h4>删除用户角色<a class="headerlink" href="#id318" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id319">
|
||
<span id="id320"></span><h5>参数<a class="headerlink" href="#id319" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 33%" />
|
||
<col style="width: 67%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>deleteRole</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>role</p></td>
|
||
<td><p>删除角色名称</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id321">
|
||
<span id="id322"></span><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">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">"deleteRole"</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">"ContractUser"</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="id323">
|
||
<span id="id324"></span><h5>返回结果<a class="headerlink" href="#id323" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onDeleteRole"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="s2">"success"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id325">
|
||
<h4>查看授权用户列表<a class="headerlink" href="#id325" title="永久链接至标题">¶</a></h4>
|
||
<p>查看准入管理员当前组网中已经授权的节点管理员</p>
|
||
<div class="section" id="id326">
|
||
<span id="id327"></span><h5>参数<a class="headerlink" href="#id326" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 29%" />
|
||
<col style="width: 71%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>listAllAuthRole</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id328">
|
||
<span id="id329"></span><h5>请求示例<a class="headerlink" href="#id328" 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">"listAllAuthRole"</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="id330">
|
||
<span id="id331"></span><h5>返回结果<a class="headerlink" href="#id330" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"status"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span><span class="s2">"onListAllAuthRole"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"kv"</span><span class="p">:[{</span><span class="nt">"key"</span><span class="p">:</span><span class="s2">"04eafad549d0757cf67f360815e15e157c7428c9ea9fb933f31a5d45bfb6edd9809c5bf6a5f37d7b817207f19fb2d76b7dbdefe38084cd3282e37b9ac39959dfab"</span><span class="p">,</span>
|
||
<span class="nt">"value"</span><span class="p">:</span><span class="s2">"NodeManager,ContractProvider,ContractUser,ContractInstanceManager"</span><span class="p">}],</span>
|
||
<span class="nt">"time"</span><span class="p">:[{</span><span class="nt">"key"</span><span class="p">:</span><span class="s2">"04eafad549d0757cf67f360815e15e157c7428c9ea9fb933f31a5d45bfb6edd9809c5bf6a5f37d7b817207f19fb2d76b7dbdefe38084cd3282e37b9ac39959dfab"</span><span class="p">,</span>
|
||
<span class="nt">"value"</span><span class="p">:</span><span class="s2">"1617178709933"</span><span class="p">}]</span>
|
||
<span class="p">}</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id332">
|
||
<h4>查看申请用户列表<a class="headerlink" href="#id332" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id333">
|
||
<span id="id334"></span><h5>参数<a class="headerlink" href="#id333" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 30%" />
|
||
<col style="width: 70%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>listUnAuthRole</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id335">
|
||
<span id="id336"></span><h5>请求示例<a class="headerlink" href="#id335" 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">"listUnAuthRole"</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="id337">
|
||
<span id="id338"></span><h5>返回结果<a class="headerlink" href="#id337" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onListUnAuthRole"</span><span class="p">,</span>
|
||
<span class="nt">"kv"</span><span class="p">:</span> <span class="p">[{</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7"</span><span class="p">,</span>
|
||
<span class="nt">"value"</span><span class="p">:</span> <span class="s2">"ContractProvider,ContractUser"</span>
|
||
<span class="p">}],</span>
|
||
<span class="nt">"time"</span><span class="p">:</span> <span class="p">[{</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7"</span><span class="p">,</span>
|
||
<span class="nt">"value"</span><span class="p">:</span> <span class="s2">"1587398989914"</span>
|
||
<span class="p">}]</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id339">
|
||
<h5>参数(删除)<a class="headerlink" href="#id339" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 32%" />
|
||
<col style="width: 68%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>queryUserStat</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id340">
|
||
<span id="id341"></span><h5>请求示例<a class="headerlink" href="#id340" 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">"queryUserStat"</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="id342">
|
||
<span id="id343"></span><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">"action"</span><span class="p">:</span> <span class="s2">"onQueryUserStat"</span><span class="p">,</span>
|
||
<span class="nt">"userListCount"</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span>
|
||
<span class="nt">"applyListCount"</span><span class="p">:</span><span class="mi">0</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id344">
|
||
<span id="id345"></span><h3>合约代码管理类<a class="headerlink" href="#id344" title="永久链接至标题">¶</a></h3>
|
||
<div class="section" id="id346">
|
||
<h4>获取公共合约文件列表<a class="headerlink" href="#id346" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id347">
|
||
<span id="id348"></span><h5>参数<a class="headerlink" href="#id347" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 33%" />
|
||
<col style="width: 67%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>listProjects</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id349">
|
||
<span id="id350"></span><h5>请求示例<a class="headerlink" href="#id349" 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">"listProjects"</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="id351">
|
||
<span id="id352"></span><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">"action"</span><span class="p">:</span><span class="s2">"onListProjects"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"[\"AnnotationSample\",\"AppDataAnalysis\",\"AppDataSource\",\"BiddingExample\",\"ContractExecutor\"]"</span><span class="p">,</span>
|
||
<span class="nt">"executeTime"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
|
||
<span class="nt">"isPrivate"</span><span class="p">:</span><span class="kc">false</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id353">
|
||
<h4>获取私有合约文件列表<a class="headerlink" href="#id353" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id354">
|
||
<span id="id355"></span><h5>参数<a class="headerlink" href="#id354" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 43%" />
|
||
<col style="width: 57%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>listProjects</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>pubKey</p></td>
|
||
<td><p>该用户的公钥</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>isPrivate</p></td>
|
||
<td><p>true</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id356">
|
||
<span id="id357"></span><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">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">"listProjects"</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">"global.sm2.publicKey"</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="id358">
|
||
<span id="id359"></span><h5>返回结果<a class="headerlink" href="#id358" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span><span class="s2">"onListProjects"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"[\"CSVFromTemplate\",\"Empty22\",\"MySQLFromTemplate\",\"test\"]"</span><span class="p">,</span>
|
||
<span class="nt">"executeTime"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
|
||
<span class="nt">"isPrivate"</span><span class="p">:</span><span class="kc">true</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id360">
|
||
<h4>获取合约实例<a class="headerlink" href="#id360" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id361">
|
||
<span id="id362"></span><h5>参数<a class="headerlink" href="#id361" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 24%" />
|
||
<col style="width: 76%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>listContractProcess</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id363">
|
||
<span id="id364"></span><h5>请求示例<a class="headerlink" href="#id363" 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">"listContractProcess"</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="id365">
|
||
<span id="id366"></span><h5>返回结果<a class="headerlink" href="#id365" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"status"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span><span class="s2">"onListContractProcess"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"[{\"id\": \"1658407837\",\"name\": \"BDCoin\",\"port\": \"1617\"}]"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id367">
|
||
<span id="id368"></span><h4>启动合约<a class="headerlink" href="#id367" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id369">
|
||
<span id="id370"></span><h5>参数<a class="headerlink" href="#id369" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 41%" />
|
||
<col style="width: 59%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>startContract</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>owner</p></td>
|
||
<td><p>pubkey</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>requestID</p></td>
|
||
<td><p>当前时间</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>script</p></td>
|
||
<td><p>脚本内容</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>signature</p></td>
|
||
<td><p>签名</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id371">
|
||
<span id="id372"></span><h5>请求示例<a class="headerlink" href="#id371" 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">"startContract"</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">""</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">"Algorithm|"</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">"|"</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="id373">
|
||
<span id="id374"></span><h5>返回结果<a class="headerlink" href="#id373" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"{\"needSeq\":false,\"seq\":0,\"status\":\"Success\",\"result\":\"\",\"isInsnLimit\":false,\"totalGas\":0,\"executionGas\":0,\"extraGas\":0,\"size\":0,\"eventRelated\":false}"</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span><span class="s2">"onStartContract"</span><span class="p">,</span>
|
||
<span class="nt">"cid"</span><span class="p">:</span><span class="s2">"-506393888"</span><span class="p">,</span>
|
||
<span class="nt">"executeTime"</span><span class="p">:</span><span class="mi">2496</span><span class="p">,</span>
|
||
<span class="nt">"responseID"</span><span class="p">:</span><span class="s2">"1617206735696"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id375">
|
||
<h4>启动可信集群合约<a class="headerlink" href="#id375" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id376">
|
||
<span id="id377"></span><h5>参数<a class="headerlink" href="#id376" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 20%" />
|
||
<col style="width: 80%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>startContractP2PTrustfully</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>owner</p></td>
|
||
<td><p>pubkey</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>isPrivate</p></td>
|
||
<td><p>当前时间</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>path</p></td>
|
||
<td><p>脚本所在路径</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>signature</p></td>
|
||
<td><p>签名</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>peersID</p></td>
|
||
<td><p>可信执行集群中的节点peerID组成的数组</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p></p></td>
|
||
<td></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id378">
|
||
<span id="id379"></span><h5>请求示例<a class="headerlink" href="#id378" 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">"startContractP2PTrustfully"</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">"3r729hf2ehf982"</span><span class="p">,</span><span class="s2">"sjdfiwoehfwoi34"</span><span class="p">,</span><span class="s2">"wnfnwoeifnwenef"</span><span class="p">];</span>
|
||
<span class="kd">var</span> <span class="nx">project</span> <span class="o">=</span> <span class="s2">"JsonTest"</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">"/"</span> <span class="o">+</span> <span class="nx">project</span> <span class="o">+</span> <span class="s2">"/mainfest.json"</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">"Trusted|"</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">"|"</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">"#resultcheck"</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="id380">
|
||
<span id="id381"></span><h5>返回结果<a class="headerlink" href="#id380" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"{\"status\":\"Success\",\"result\":\"\"}"</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span><span class="s2">"onStartContractP2PTrustfully"</span><span class="p">,</span>
|
||
<span class="nt">"cid"</span><span class="p">:</span><span class="s2">"-1543583350"</span><span class="p">,</span>
|
||
<span class="nt">"executeTime"</span><span class="p">:</span><span class="mi">1544</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id382">
|
||
<h4>分发合约项目<a class="headerlink" href="#id382" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id383">
|
||
<span id="id384"></span><h5>参数<a class="headerlink" href="#id383" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 42%" />
|
||
<col style="width: 58%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>distributeContract</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>peersID</p></td>
|
||
<td><p>集群中节点peer</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>projectName</p></td>
|
||
<td><p>合约名</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>isPrivate</p></td>
|
||
<td><p>是否在私有目录</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>sponsorPeerID</p></td>
|
||
<td><p>发起者ID</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>signature</p></td>
|
||
<td><p>签名</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id385">
|
||
<span id="id386"></span><h5>请求示例<a class="headerlink" href="#id385" 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">"distributeContract"</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">"#privateDir-tab"</span><span class="p">).</span><span class="nx">hasClass</span><span class="p">(</span><span class="s2">"active"</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">"DistributeContract|"</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">"|"</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="id387">
|
||
<span id="id388"></span><h5>返回结果<a class="headerlink" href="#id387" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span><span class="s2">"onDistributeContract"</span><span class="p">,</span>
|
||
<span class="nt">"progress"</span><span class="p">:</span><span class="s2">"100.00%"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id389">
|
||
<h4>终止合约<a class="headerlink" href="#id389" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id390">
|
||
<span id="id391"></span><h5>参数<a class="headerlink" href="#id390" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 32%" />
|
||
<col style="width: 68%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>killContractProcess</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>id</p></td>
|
||
<td><p>合约id</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>requestID</p></td>
|
||
<td><p>请求ID</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id392">
|
||
<span id="id393"></span><h5>请求示例<a class="headerlink" href="#id392" 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">"killContractProcess"</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">""</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="id394">
|
||
<span id="id395"></span><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">"data"</span><span class="p">:</span> <span class="s2">"ContractHandler: exit in 3 seconds!"</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onOutputStream"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id396">
|
||
<h4>终止所有合约<a class="headerlink" href="#id396" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id397">
|
||
<span id="id398"></span><h5>参数<a class="headerlink" href="#id397" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 29%" />
|
||
<col style="width: 71%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>killAllContract</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id399">
|
||
<span id="id400"></span><h5>请求示例<a class="headerlink" href="#id399" 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">"killAllContract"</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="id401">
|
||
<span id="id402"></span><h5>返回结果<a class="headerlink" href="#id401" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"status"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span><span class="s2">"onKillAllContract"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"Kill:7241,7245,"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id403">
|
||
<span id="id404"></span><h4>静态分析合约<a class="headerlink" href="#id403" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id405">
|
||
<span id="id406"></span><h5>参数<a class="headerlink" href="#id405" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 33%" />
|
||
<col style="width: 67%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>staticVerifyContract</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>owner</p></td>
|
||
<td><p>用户私钥</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>isPartial</p></td>
|
||
<td><p>是否是部分</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>contractid</p></td>
|
||
<td><p>contractid</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>script</p></td>
|
||
<td><p>脚本内容</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>path</p></td>
|
||
<td><p>合约文件名</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id407">
|
||
<span id="id408"></span><h5>请求示例<a class="headerlink" href="#id407" 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">"staticVerifyContract"</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="id409">
|
||
<span id="id410"></span><h5>返回结果<a class="headerlink" href="#id409" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"{\"needSeq\":false,\"seq\":0,\"status\":\"Success\",\"result\":{\"hello\":\"Ret:\"},\"isInsnLimit\":false,\"totalGas\":0,\"executionGas\":0,\"extraGas\":0,\"size\":0,\"eventRelated\":false}"</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span><span class="s2">"onStaticVerifyResult"</span><span class="p">,</span>
|
||
<span class="nt">"cid"</span><span class="p">:</span><span class="s2">"verify"</span><span class="p">,</span>
|
||
<span class="nt">"executeTime"</span><span class="p">:</span><span class="mi">83</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id411">
|
||
<h4>删除合约<a class="headerlink" href="#id411" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id412">
|
||
<span id="id413"></span><h5>参数<a class="headerlink" href="#id412" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 38%" />
|
||
<col style="width: 63%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>deleteFile</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>file</p></td>
|
||
<td><p>fileName</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id414">
|
||
<span id="id415"></span><h5>请求示例<a class="headerlink" href="#id414" 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">"deleteFile"</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="id416">
|
||
<span id="id417"></span><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">"action"</span><span class="p">:</span><span class="s2">"onDeleteFile"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"success"</span><span class="p">,</span>
|
||
<span class="nt">"executeTime"</span><span class="p">:</span><span class="mi">0</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id418">
|
||
<h4>私有合约传至公共目录<a class="headerlink" href="#id418" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id419">
|
||
<span id="id420"></span><h5>参数<a class="headerlink" href="#id419" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 40%" />
|
||
<col style="width: 60%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>changePublic</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>pubkey</p></td>
|
||
<td><p>用户公钥</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>fileName</p></td>
|
||
<td><p>fileName</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id421">
|
||
<span id="id422"></span><h5>请求示例<a class="headerlink" href="#id421" 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">"changePublic"</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="id423">
|
||
<span id="id424"></span><h5>返回结果<a class="headerlink" href="#id423" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span><span class="s2">"onChangePublic"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"success"</span><span class="p">,</span>
|
||
<span class="nt">"executeTime"</span><span class="p">:</span><span class="mi">0</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id425">
|
||
<h4>上传合约<a class="headerlink" href="#id425" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id426">
|
||
<span id="id427"></span><h5>参数<a class="headerlink" href="#id426" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 27%" />
|
||
<col style="width: 73%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>UploadFile</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>isAppend</p></td>
|
||
<td><p>false</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>fileName</p></td>
|
||
<td><p>fileName</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>path</p></td>
|
||
<td><p>path</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>isPrivate</p></td>
|
||
<td><p>true/false</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>content</p></td>
|
||
<td><p>fileContent(base64编码)</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id428">
|
||
<span id="id429"></span><h5>请求示例<a class="headerlink" href="#id428" 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">"uploadFile"</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">"test1.yjs"</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">"test1"</span><span class="p">;</span>
|
||
<span class="n">text</span><span class="o">=</span><span class="s2">"Y29udHJhY3QgdGVzdDF7CglleHBvcnQgZnVuY3Rpb24gaGVsbG8oYXJnKXsgCiAgICAgICAgcmV0dXJuICJ3b3JsZCI7ICAKICAgIH0gICAKfQ=="</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="id430">
|
||
<span id="id431"></span><h5>返回结果<a class="headerlink" href="#id430" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span><span class="s2">"onUploadFile"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"success"</span><span class="p">,</span>
|
||
<span class="nt">"executeTime"</span><span class="p">:</span><span class="mi">0</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id432">
|
||
<h4>编译合约<a class="headerlink" href="#id432" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id433">
|
||
<span id="id434"></span><h5>参数<a class="headerlink" href="#id433" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 28%" />
|
||
<col style="width: 72%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>compile</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>path</p></td>
|
||
<td><p>string, 待编译的项目名称</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>privateTab</p></td>
|
||
<td><p>bool, 是否为私有目录的项目</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id435">
|
||
<span id="id436"></span><h5>请求示例<a class="headerlink" href="#id435" 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">"action"</span><span class="o">:</span><span class="s2">"compile"</span><span class="p">,</span><span class="s2">"path"</span><span class="o">:</span><span class="s2">"Hello"</span><span class="p">,</span><span class="s2">"privateTab"</span><span class="o">:</span><span class="kc">true</span><span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id437">
|
||
<span id="id438"></span><h5>返回结果<a class="headerlink" href="#id437" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"result"</span><span class="p">:</span><span class="s2">"Hello_2020-08-17-09:09:40.ypk"</span><span class="p">,</span><span class="nt">"action"</span><span class="p">:</span><span class="s2">"onCompile"</span><span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id439">
|
||
<h4>锁定私有目录<a class="headerlink" href="#id439" title="永久链接至标题">¶</a></h4>
|
||
<p>锁定某个用户的的私有目录编辑功能</p>
|
||
<div class="section" id="id440">
|
||
<span id="id441"></span><h5>参数<a class="headerlink" href="#id440" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 21%" />
|
||
<col style="width: 79%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>lockEdit</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>pubKey</p></td>
|
||
<td><p>string, 要被锁定的公钥</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id442">
|
||
<span id="id443"></span><h5>请求示例<a class="headerlink" href="#id442" 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">"lockEdit"</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">"xxxxxx"</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">"action"</span><span class="p">:</span><span class="s2">"onLockEdit"</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span><span class="s2">"success"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"04c4c855862b53f323e077ccfcc744ecc2c0a04645ed16d99ede8fd5866b38c0670a97ad22c6260d1a4672aba2a5fe229a2d4eba34627c054aab102620afa288c1"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id444">
|
||
<h4>解锁私有目录<a class="headerlink" href="#id444" title="永久链接至标题">¶</a></h4>
|
||
<p>解锁某个用户的的私有目录编辑功能</p>
|
||
<div class="section" id="id445">
|
||
<span id="id446"></span><h5>参数<a class="headerlink" href="#id445" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 21%" />
|
||
<col style="width: 79%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>unLockEdit</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>pubKey</p></td>
|
||
<td><p>string, 要被锁定的公钥</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id447">
|
||
<span id="id448"></span><h5>请求示例<a class="headerlink" href="#id447" 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">"xxxxxx"</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">"action"</span><span class="p">:</span><span class="s2">"onUnlockEdit"</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span><span class="s2">"success"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"04c4c855862b53f323e077ccfcc744ecc2c0a04645ed16d99ede8fd5866b38c0670a97ad22c6260d1a4672aba2a5fe229a2d4eba34627c054aab102620afa288c1"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id449">
|
||
<span id="id450"></span><h3>合约实例管理类<a class="headerlink" href="#id449" title="永久链接至标题">¶</a></h3>
|
||
<div class="section" id="id451">
|
||
<span id="id452"></span><h4>查询合约进程<a class="headerlink" href="#id451" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 查询服务器上已经启动的所有合约进程.</p>
|
||
<div class="section" id="id453">
|
||
<span id="id454"></span><h5>参数<a class="headerlink" href="#id453" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 24%" />
|
||
<col style="width: 76%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>listContractProcess</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id455">
|
||
<span id="id456"></span><h5>请求示例<a class="headerlink" href="#id455" 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">"listContractProcess"</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="id457">
|
||
<span id="id458"></span><h5>返回结果示例<a class="headerlink" href="#id457" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onListContractProcess"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="s2">"[...]"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id459">
|
||
<span id="id460"></span><h4>调用合约<a class="headerlink" href="#id459" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 调用某个合约.</p>
|
||
<div class="section" id="id461">
|
||
<span id="id462"></span><h5>参数<a class="headerlink" href="#id461" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 37%" />
|
||
<col style="width: 63%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>executeContract</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>contractID</p></td>
|
||
<td><p>合约ID</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>withDynamicAnalysis</p></td>
|
||
<td><p>true/false 是否进行动态分析,可选</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>operation</p></td>
|
||
<td><p>调用合约的方法名</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>arg</p></td>
|
||
<td><p>调用合约的参数</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>pubkey</p></td>
|
||
<td><p>调用者公钥,可选</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>signature</p></td>
|
||
<td><p>调用者签名 ,可选</p></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">"|"</span><span class="o">+</span><span class="nx">operation</span><span class="o">+</span><span class="s2">"|"</span><span class="o">+</span><span class="nx">arg</span><span class="o">+</span><span class="s2">"|"</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="id463">
|
||
<span id="id464"></span><h5>请求示例<a class="headerlink" href="#id463" 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">"executeContract"</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">"2073401446"</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">"main"</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">"hhhhh"</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="id465">
|
||
<span id="id466"></span><h5>返回结果示例<a class="headerlink" href="#id465" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"needSeq"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span>
|
||
<span class="nt">"seq"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span><span class="s2">"Success"</span><span class="p">,</span>
|
||
<span class="nt">"result"</span><span class="p">:</span><span class="s2">"world"</span><span class="p">,</span>
|
||
<span class="nt">"isInsnLimit"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span>
|
||
<span class="nt">"totalGas"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
|
||
<span class="nt">"executionGas"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
|
||
<span class="nt">"extraGas"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
|
||
<span class="nt">"size"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
|
||
<span class="nt">"eventRelated"</span><span class="p">:</span><span class="kc">false</span><span class="p">,</span>
|
||
<span class="nt">"responseID"</span><span class="p">:</span><span class="s2">"1617211077264_223"</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span><span class="s2">"onExecuteResult"</span><span class="p">,</span>
|
||
<span class="nt">"executeTime"</span><span class="p">:</span><span class="s2">"5"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id467">
|
||
<h4>输出历史记录日志(删除)<a class="headerlink" href="#id467" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 获取节点服务器上合约的TimeTravel日志.</p>
|
||
<div class="section" id="id468">
|
||
<span id="id469"></span><h5>参数<a class="headerlink" href="#id468" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 25%" />
|
||
<col style="width: 75%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>printTimeTravelLog</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id470">
|
||
<span id="id471"></span><h5>请求示例<a class="headerlink" href="#id470" 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">"printTimeTravelLog"</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="id472">
|
||
<span id="id473"></span><h5>返回结果示例<a class="headerlink" href="#id472" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="s2">"[CMActions] dumpContract :…t/contractExamples/memoryDumps/LicenceManager\n"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id474">
|
||
<h4>输出节点转移日志(删除)<a class="headerlink" href="#id474" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 获取节点服务器的状态转移日志.</p>
|
||
<div class="section" id="id475">
|
||
<span id="id476"></span><h5>参数<a class="headerlink" href="#id475" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 27%" />
|
||
<col style="width: 73%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>printTransferLog</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id477">
|
||
<span id="id478"></span><h5>请求示例<a class="headerlink" href="#id477" 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">"printTransferLog"</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="id479">
|
||
<span id="id480"></span><h5>返回结果示例<a class="headerlink" href="#id479" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span> <span class="p">{</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="s2">""</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id481">
|
||
<h4>合约状态迁移<a class="headerlink" href="#id481" title="永久链接至标题">¶</a></h4>
|
||
<p>向服务器发送请求, 获取节点服务器的状态转移日志.</p>
|
||
<div class="section" id="id482">
|
||
<span id="id483"></span><h5>参数<a class="headerlink" href="#id482" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 50%" />
|
||
<col style="width: 50%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>loadMemory</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>contractName</p></td>
|
||
<td><p>合约名称</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>memoryFile</p></td>
|
||
<td><p>合约文件名称</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id484">
|
||
<span id="id485"></span><h5>请求示例<a class="headerlink" href="#id484" 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">"loadMemory"</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">"JsonContract"</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">"2020-03-17.20/42/55"</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="id486">
|
||
<span id="id487"></span><h5>返回结果示例<a class="headerlink" href="#id486" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"success"</span><span class="p">,</span>
|
||
<span class="nt">"size"</span><span class="p">:</span><span class="s2">"0.00 B"</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span><span class="s2">"onTransferTo"</span><span class="p">,</span>
|
||
<span class="nt">"time"</span><span class="p">:</span><span class="s2">"0.01s"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id488">
|
||
<span id="id489"></span><h3>日志查看类<a class="headerlink" href="#id488" title="永久链接至标题">¶</a></h3>
|
||
<div class="section" id="n">
|
||
<h4>查看本地近n日节点日志(删除)<a class="headerlink" href="#n" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id490">
|
||
<span id="id491"></span><h5>参数<a class="headerlink" href="#id490" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 27%" />
|
||
<col style="width: 73%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>listLocalNodeLog</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>date</p></td>
|
||
<td><p>当前时间</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id492">
|
||
<span id="id493"></span><h5>请求示例<a class="headerlink" href="#id492" 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">"listLocalNodeLog"</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="id494">
|
||
<span id="id495"></span><h5>返回结果<a class="headerlink" href="#id494" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"[{\"action\":\"login\",\"pubKey\":\"null\",\"status\":\"accept\",\"date\":1583139323822}\",]"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id496">
|
||
<h4>查看本地近n日合约日志(删除)<a class="headerlink" href="#id496" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id497">
|
||
<span id="id498"></span><h5>参数<a class="headerlink" href="#id497" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 23%" />
|
||
<col style="width: 77%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>listLocalContractLog</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>date</p></td>
|
||
<td><p>当前时间</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id499">
|
||
<span id="id500"></span><h5>请求示例<a class="headerlink" href="#id499" 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">"listLocalContractLog"</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="id501">
|
||
<span id="id502"></span><h5>返回结果<a class="headerlink" href="#id501" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"[\"{\"action\":\"startContract\",\"pubKey\":\"04405d7ba358d9234939623ab51ea94ca685e6a1f36ed81fd9630ccba6473e632f163bb30faffd4c91f21e5bace20101d6d6e36c04ac67eea14cc24b4962b84f57\",\"contractID\":\"845581788\",\"contractName\":\"null\",\"date\":1583141525539}\"]"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id503">
|
||
<h3>节点配置类<a class="headerlink" href="#id503" title="永久链接至标题">¶</a></h3>
|
||
<div class="section" id="id504">
|
||
<h4>获取节点配置信息<a class="headerlink" href="#id504" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id505">
|
||
<span id="id506"></span><h5>参数<a class="headerlink" href="#id505" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 30%" />
|
||
<col style="width: 70%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>loadNodeConfig</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id507">
|
||
<span id="id508"></span><h5>请求示例<a class="headerlink" href="#id507" 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">"loadNodeConfig"</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="id509">
|
||
<span id="id510"></span><h5>返回结果<a class="headerlink" href="#id509" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="s2">"status"</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
|
||
<span class="s2">"action"</span><span class="p">:</span> <span class="s2">"onLoadNodeConfig"</span><span class="p">,</span>
|
||
<span class="s2">"data"</span><span class="p">:</span> <span class="p">{</span>
|
||
<span class="s2">"nodeName"</span><span class="p">:</span> <span class="s2">"04BF52213343C147E631B877BCEB17B794230EE551E85F58FA429C4BA03D690778CC384C6916C63DF36CB9E35C7E274FDB4E18491DFE3D611D347856D441CACC5AF9090B515F02AFC2DFBF56461EC83B5A4CD342466360D6CF82E6E40B637430AC4A329CCBC798DAF7D526AF9E3B3600E0BEA1BFAB8C160EF90128FAF67B19E45F37664F1E4B"</span><span class="p">,</span>
|
||
<span class="s2">"licence"</span><span class="p">:</span> <span class="s2">"04AADCC7103CD02626D228AFFBEF53F8242ECA4DDD6F179D30B622440666715CFBB6FD1D3678A2B25812DEA9917073E79A65F7ADE517F784DC76288EFCEB37ECAA1025E6903540702F729DA1C2ECCD93F4E6FAFCE40DF443E7FD74387169D0C6D927C7BB12882D0471C8D3E6F31B0316A42FC38F6DD9978D4351B23B2AD63E2244909E98F51185D32CB99B4AE4E22D3AB4C04027BB"</span><span class="p">,</span>
|
||
<span class="s2">"expireTime"</span><span class="p">:</span> <span class="s2">"Wed Aug 26 09:43:08 CST 2020"</span><span class="p">,</span>
|
||
<span class="s2">"nodes"</span><span class="p">:</span> <span class="s2">"[</span><span class="se">\"</span><span class="s2">node1</span><span class="se">\"</span><span class="s2">,</span><span class="se">\"</span><span class="s2">node2</span><span class="se">\"</span><span class="s2">,</span><span class="se">\"</span><span class="s2">node3</span><span class="se">\"</span><span class="s2">]"</span><span class="p">,</span>
|
||
<span class="s2">"yjsPath"</span><span class="p">:</span> <span class="s2">"/Users/xxx/docs/BDWareHttp/generatedlib/yjs.jar"</span><span class="p">,</span>
|
||
<span class="s2">"nodeCenter"</span><span class="p">:</span> <span class="s2">"ws://127.0.0.1:1719/SCIDE/NodeCenter"</span>
|
||
<span class="p">}</span>
|
||
<span class="p">}</span>
|
||
|
||
<span class="p">{</span>
|
||
<span class="s2">"status"</span><span class="p">:</span><span class="n">true</span><span class="p">,</span>
|
||
<span class="s2">"action"</span><span class="p">:</span><span class="s2">"onLoadNodeConfig"</span><span class="p">,</span>
|
||
<span class="s2">"data"</span><span class="p">:{</span>
|
||
<span class="s2">"nodeName"</span><span class="p">:</span><span class="s2">"Node_180"</span><span class="p">,</span>
|
||
<span class="s2">"peerID"</span><span class="p">:</span><span class="s2">""</span><span class="p">,</span>
|
||
<span class="s2">"masterAddress"</span><span class="p">:</span><span class="s2">"39.104.201.40:21031"</span><span class="p">,</span>
|
||
<span class="s2">"licence"</span><span class="p">:</span><span class="s2">"04AADCC7103C"</span><span class="p">,</span>
|
||
<span class="s2">"doipConfig"</span><span class="p">:</span><span class="s2">"{</span><span class="se">\\</span><span class="s2">"</span><span class="n">LHSProxyAddress</span>\\<span class="s2">":</span><span class="se">\\</span><span class="s2">"</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">",</span><span class="se">\\</span><span class="s2">"</span><span class="n">ownerHandle</span>\\<span class="s2">":</span><span class="se">\\</span><span class="s2">"</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">",</span><span class="se">\\</span><span class="s2">"</span><span class="n">certPath</span>\\<span class="s2">":</span><span class="se">\\</span><span class="s2">"</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">",</span><span class="se">\\</span><span class="s2">"</span><span class="n">certPassword</span>\\<span class="s2">":</span><span class="se">\\</span><span class="s2">"</span><span class="mi">123456</span>\\<span class="s2">",</span><span class="se">\\</span><span class="s2">"</span><span class="n">repoID</span>\\<span class="s2">":</span><span class="se">\\</span><span class="s2">"</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">",</span><span class="se">\\</span><span class="s2">"</span><span class="n">listeners</span>\\<span class="s2">":</span><span class="se">\\</span><span class="s2">"</span><span class="p">[{</span>\\\\\\<span class="s2">"url</span><span class="se">\\\\\\</span><span class="s2">"</span><span class="p">:</span>\\\\\\<span class="s2">"tcp://39.104.201.40:21032</span><span class="se">\\\\\\</span><span class="s2">"</span><span class="p">,</span>\\\\\\<span class="s2">"protocolVersion</span><span class="se">\\\\\\</span><span class="s2">"</span><span class="p">:</span>\\\\\\<span class="s2">"2.1</span><span class="se">\\\\\\</span><span class="s2">"</span><span class="p">,</span>\\\\\\<span class="s2">"messageFormat</span><span class="se">\\\\\\</span><span class="s2">"</span><span class="p">:</span>\\\\\\<span class="s2">"packet</span><span class="se">\\\\\\</span><span class="s2">"</span><span class="p">}]</span>\\<span class="s2">",</span><span class="se">\\</span><span class="s2">"</span><span class="n">serviceDescription</span>\\<span class="s2">":</span><span class="se">\\</span><span class="s2">"</span><span class="n">test</span> <span class="n">local</span> <span class="n">Contract</span> <span class="n">Repository</span>\\<span class="s2">",</span><span class="se">\\</span><span class="s2">"</span><span class="n">serviceName</span>\\<span class="s2">":</span><span class="se">\\</span><span class="s2">"</span><span class="n">ContractEngine021</span>\\<span class="s2">"}"</span><span class="p">,</span>
|
||
<span class="s2">"clusterConnected"</span><span class="p">:</span><span class="s2">"false"</span><span class="p">,</span>
|
||
<span class="s2">"nodePubKey"</span><span class="p">:</span><span class="s2">"0492d974b8a5b473d0ed2c81800917f76e2a1ec3666067888c85fe6922a672223f2083f95402ae13a744df58deabbe7206c4a317dd14296b0d3941a26ca4e34dc5"</span><span class="p">,</span>
|
||
<span class="s2">"ipPort"</span><span class="p">:</span><span class="s2">""</span><span class="p">,</span>
|
||
<span class="s2">"bdledger"</span><span class="p">:</span><span class="s2">"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"</span><span class="p">,</span>
|
||
<span class="s2">"yjsPath"</span><span class="p">:</span><span class="s2">"/data/bdwaas/bdcontract/yjs.jar"</span><span class="p">,</span>
|
||
<span class="s2">"nodeCenter"</span><span class="p">:</span><span class="s2">"ws://39.104.201.21040/SCIDE/NodeCenter"</span>
|
||
<span class="p">}</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id511">
|
||
<h4>修改节点配置<a class="headerlink" href="#id511" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id512">
|
||
<span id="id513"></span><h5>参数<a class="headerlink" href="#id512" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 30%" />
|
||
<col style="width: 70%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>updateConfig</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>key</p></td>
|
||
<td><p>要改的配置项</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>val</p></td>
|
||
<td><p>要更改的目标值</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p>其中,key的可选项包括:</p>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 16%" />
|
||
<col style="width: 44%" />
|
||
<col style="width: 39%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>key的示</p></th>
|
||
<th class="head"><p>val示例</p></th>
|
||
<th class="head"><p>说明</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>yjsPath</p></td>
|
||
<td><p>/User/xxx/cp/yjs.jar</p></td>
|
||
<td><p>合约进程启动所需的jar</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>dataChain</p></td>
|
||
<td><p>192.168.1.8:18090,182.173.2.3:18091</p></td>
|
||
<td><p>账本节点的ip与端口</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>nodeCenter</p></td>
|
||
<td><p>ws://127.0.0.1:18002</p></td>
|
||
<td><p>CenterPortal所在的ip/端口</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>nodeName</p></td>
|
||
<td><p>Node_180</p></td>
|
||
<td><p>字符串类型</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>masterAddress</p></td>
|
||
<td><p>192.168.3.2:18001</p></td>
|
||
<td><p>该NodePortal节点的ip和的TCP端口</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p>其中NodePortal的TCP端口为Node的http/ws端口号+1。</p>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id514">
|
||
<h4>修改节点名称<a class="headerlink" href="#id514" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id515">
|
||
<span id="id516"></span><h5>参数<a class="headerlink" href="#id515" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 30%" />
|
||
<col style="width: 70%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>changeNodeName</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>data</p></td>
|
||
<td><p>新的节点名称</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id517">
|
||
<span id="id518"></span><h5>请求示例<a class="headerlink" href="#id517" 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">"changeNodeName"</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">"NewNodeName"</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="id519">
|
||
<span id="id520"></span><h5>返回结果<a class="headerlink" href="#id519" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onChangeNodeName"</span><span class="p">,</span>
|
||
<span class="nt">"data"</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="id521">
|
||
<span id="id522"></span><h5>参数<a class="headerlink" href="#id521" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 22%" />
|
||
<col style="width: 78%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>changeYJSPath</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>data</p></td>
|
||
<td><p>节点服务器yjs.jar路径</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id523">
|
||
<span id="id524"></span><h5>请求示例<a class="headerlink" href="#id523" 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">"changeYJSPath"</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">"/Users/xxx/docs/BDWareHttp/generatedlib/yjs.jar"</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="id525">
|
||
<span id="id526"></span><h5>返回结果<a class="headerlink" href="#id525" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onChangeYJSPath"</span><span class="p">,</span>
|
||
<span class="nt">"data"</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="id527">
|
||
<span id="id528"></span><h5>参数<a class="headerlink" href="#id527" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 13%" />
|
||
<col style="width: 87%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>changeNodeCenter</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>data</p></td>
|
||
<td><p>节点服务器要连接的NodeCenterWebSocket路径</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id529">
|
||
<span id="id530"></span><h5>请求示例<a class="headerlink" href="#id529" 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">"changeNodeCenter"</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">"ws://127.0.0.1:1719/SCIDE/NodeCenter"</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="id531">
|
||
<span id="id532"></span><h5>返回结果<a class="headerlink" href="#id531" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onChangeNodeCenter"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="kc">true</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id533">
|
||
<h4>修改账本节点<a class="headerlink" href="#id533" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id534">
|
||
<span id="id535"></span><h5>参数<a class="headerlink" href="#id534" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 18%" />
|
||
<col style="width: 82%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>changeBDledger</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>data</p></td>
|
||
<td><p>数链节点的IP:port,用“,”隔开</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id536">
|
||
<span id="id537"></span><h5>请求示例<a class="headerlink" href="#id536" 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">"changeBDledger"</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">"39.108.56.240:18091,39.108.56.12:18091"</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="id538">
|
||
<span id="id539"></span><h5>返回结果<a class="headerlink" href="#id538" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onChangeBDledger"</span><span class="p">,</span>
|
||
<span class="nt">"data"</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="id540">
|
||
<span id="id541"></span><h5>参数<a class="headerlink" href="#id540" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 21%" />
|
||
<col style="width: 79%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>uploadLicence</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>data</p></td>
|
||
<td><p>节点服务器的Licence内容</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id542">
|
||
<span id="id543"></span><h5>请求示例<a class="headerlink" href="#id542" 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">"uploadLicence"</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">"04AADCC7103C"</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="id544">
|
||
<span id="id545"></span><h5>返回结果<a class="headerlink" href="#id544" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onUploadLicence"</span><span class="p">,</span>
|
||
<span class="nt">"data"</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="id546">
|
||
<span id="id547"></span><h5>参数<a class="headerlink" href="#id546" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 40%" />
|
||
<col style="width: 60%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>getNodeID</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id548">
|
||
<span id="id549"></span><h5>请求示例<a class="headerlink" href="#id548" 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">"getNodeID"</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="id550">
|
||
<span id="id551"></span><h5>返回结果<a class="headerlink" href="#id550" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onGetNodeID"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="s2">"0431…d3a92e1184bbc5817ebda5c2ad498e4ff1d240009b4f06d"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id552">
|
||
<h4>获取节点所在的可信执行集群<a class="headerlink" href="#id552" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id553">
|
||
<span id="id554"></span><h5>参数<a class="headerlink" href="#id553" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 17%" />
|
||
<col style="width: 83%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>getNodeTrustUnits</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>data</p></td>
|
||
<td><p>节点ID</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>msgHandler</p></td>
|
||
<td><p>收到回复的回调函数, 可使用“建立连接”的msgHandler</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>ws</p></td>
|
||
<td><p>节点所属的NodeCenter的WebSocket地址</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id555">
|
||
<span id="id556"></span><h5>请求示例<a class="headerlink" href="#id555" 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">"ws://127.0.0.1:1718/NodeCenterWS"</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">"getNodeTrustUnits"</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">"0431e311bd70840fe69965e2cabea97fafe99f2133953c01abb9bd7cb62af42f8283f474d203051e920d3a92e1184bbc5817ebda5c2ad498e4ff1d240009b4f06d"</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="id557">
|
||
<span id="id558"></span><h5>返回结果<a class="headerlink" href="#id557" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="p">[{</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"0475c7b061...65e55_4063665700873624164"</span><span class="p">,</span>
|
||
<span class="nt">"value"</span><span class="p">:</span> <span class="s2">"[\"04541429c11b094…40009b4f06d\"]"</span>
|
||
<span class="p">}],</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onGetNodeTrustUnits"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id559">
|
||
<span id="id560"></span><h3>模板生成类<a class="headerlink" href="#id559" title="永久链接至标题">¶</a></h3>
|
||
<div class="section" id="id561">
|
||
<h4>获取合约模板列表<a class="headerlink" href="#id561" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id562">
|
||
<span id="id563"></span><h5>参数<a class="headerlink" href="#id562" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 29%" />
|
||
<col style="width: 71%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>getTemplateList</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id564">
|
||
<span id="id565"></span><h5>请求示例<a class="headerlink" href="#id564" 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">"getTemplateList"</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="id566">
|
||
<span id="id567"></span><h5>返回结果<a class="headerlink" href="#id566" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="p">[</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"formDesc"</span><span class="p">:</span> <span class="p">{</span>
|
||
<span class="nt">"dbPWD"</span><span class="p">:</span> <span class="p">{</span>
|
||
<span class="nt">"label"</span><span class="p">:</span> <span class="s2">"密码"</span><span class="p">,</span>
|
||
<span class="nt">"type"</span><span class="p">:</span> <span class="s2">"input"</span>
|
||
<span class="p">},</span>
|
||
<span class="nt">"contractName"</span><span class="p">:</span> <span class="p">{</span>
|
||
<span class="nt">"label"</span><span class="p">:</span> <span class="s2">"合约名称"</span><span class="p">,</span>
|
||
<span class="nt">"type"</span><span class="p">:</span> <span class="s2">"input"</span>
|
||
<span class="p">},</span>
|
||
<span class="nt">"accessPolicy"</span><span class="p">:</span> <span class="p">{</span>
|
||
<span class="nt">"label"</span><span class="p">:</span> <span class="s2">"访问控制策略"</span><span class="p">,</span>
|
||
<span class="nt">"type"</span><span class="p">:</span> <span class="s2">"input"</span><span class="p">,</span>
|
||
<span class="nt">"option"</span><span class="p">:</span> <span class="p">[</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"text"</span><span class="p">:</span> <span class="s2">"无访问控制"</span><span class="p">,</span>
|
||
<span class="nt">"value"</span><span class="p">:</span> <span class="s2">"NAC"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"text"</span><span class="p">:</span> <span class="s2">"直接访问控制"</span><span class="p">,</span>
|
||
<span class="nt">"value"</span><span class="p">:</span> <span class="s2">"DAC"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"text"</span><span class="p">:</span> <span class="s2">"基于角色的访问控制"</span><span class="p">,</span>
|
||
<span class="nt">"value"</span><span class="p">:</span> <span class="s2">"RBAC"</span>
|
||
<span class="p">}</span>
|
||
<span class="p">]</span>
|
||
<span class="p">},</span>
|
||
<span class="nt">"dbUserName"</span><span class="p">:</span> <span class="p">{</span>
|
||
<span class="nt">"label"</span><span class="p">:</span> <span class="s2">"用户名"</span><span class="p">,</span>
|
||
<span class="nt">"type"</span><span class="p">:</span> <span class="s2">"input"</span>
|
||
<span class="p">},</span>
|
||
<span class="nt">"fieldList"</span><span class="p">:</span> <span class="p">{</span>
|
||
<span class="nt">"label"</span><span class="p">:</span> <span class="s2">"字段名"</span><span class="p">,</span>
|
||
<span class="nt">"type"</span><span class="p">:</span> <span class="s2">"tag"</span>
|
||
<span class="p">},</span>
|
||
<span class="nt">"dbUrl"</span><span class="p">:</span> <span class="p">{</span>
|
||
<span class="nt">"label"</span><span class="p">:</span> <span class="s2">"数据库链接"</span><span class="p">,</span>
|
||
<span class="nt">"type"</span><span class="p">:</span> <span class="s2">"input"</span>
|
||
<span class="p">},</span>
|
||
<span class="nt">"tableName"</span><span class="p">:</span> <span class="p">{</span>
|
||
<span class="nt">"label"</span><span class="p">:</span> <span class="s2">"表名"</span><span class="p">,</span>
|
||
<span class="nt">"type"</span><span class="p">:</span> <span class="s2">"input"</span>
|
||
<span class="p">}</span>
|
||
<span class="p">},</span>
|
||
<span class="nt">"apiName"</span><span class="p">:</span> <span class="s2">"generateMySQLProject"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"formDesc"</span><span class="p">:</span> <span class="p">{</span>
|
||
<span class="nt">"contractName"</span><span class="p">:</span> <span class="p">{</span>
|
||
<span class="nt">"label"</span><span class="p">:</span> <span class="s2">"合约名称"</span><span class="p">,</span>
|
||
<span class="nt">"type"</span><span class="p">:</span> <span class="s2">"input"</span>
|
||
<span class="p">},</span>
|
||
<span class="nt">"accessPolicy"</span><span class="p">:</span> <span class="p">{</span>
|
||
<span class="nt">"label"</span><span class="p">:</span> <span class="s2">"访问控制策略"</span><span class="p">,</span>
|
||
<span class="nt">"type"</span><span class="p">:</span> <span class="s2">"input"</span><span class="p">,</span>
|
||
<span class="nt">"option"</span><span class="p">:</span> <span class="p">[</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"text"</span><span class="p">:</span> <span class="s2">"无访问控制"</span><span class="p">,</span>
|
||
<span class="nt">"value"</span><span class="p">:</span> <span class="s2">"NAC"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"text"</span><span class="p">:</span> <span class="s2">"直接访问控制"</span><span class="p">,</span>
|
||
<span class="nt">"value"</span><span class="p">:</span> <span class="s2">"DAC"</span>
|
||
<span class="p">},</span>
|
||
<span class="p">{</span>
|
||
<span class="nt">"text"</span><span class="p">:</span> <span class="s2">"基于角色的访问控制"</span><span class="p">,</span>
|
||
<span class="nt">"value"</span><span class="p">:</span> <span class="s2">"RBAC"</span>
|
||
<span class="p">}</span>
|
||
<span class="p">]</span>
|
||
<span class="p">}</span>
|
||
<span class="p">},</span>
|
||
<span class="nt">"apiName"</span><span class="p">:</span> <span class="s2">"generateEmptyProject"</span>
|
||
<span class="p">}</span>
|
||
<span class="p">],</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onTemplateList"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id568">
|
||
<h4>空白合约模板<a class="headerlink" href="#id568" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id569">
|
||
<span id="id570"></span><h5>参数<a class="headerlink" href="#id569" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 29%" />
|
||
<col style="width: 71%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>generateEmptyProject</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>contractName</p></td>
|
||
<td><p>字符串类型,合约名称</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>isPrivate</p></td>
|
||
<td><p>布尔类型,是否为私有项目</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>accessPolicy</p></td>
|
||
<td><p>若为“DAC”,则实现直接访问控制</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id571">
|
||
<span id="id572"></span><h5>请求示例<a class="headerlink" href="#id571" 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">"Empty22"</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">"generateEmptyProject"</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">"DAC"</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="id573">
|
||
<span id="id574"></span><h5>返回结果<a class="headerlink" href="#id573" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span><span class="s2">"onListProjects"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"[\"AnnotationSample\",\"AppDataAnalysis\",\"AppDataSource\"]"</span><span class="p">,</span>
|
||
<span class="nt">"executeTime"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
|
||
<span class="nt">"isPrivate"</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="id575">
|
||
<span id="id576"></span><h5>参数<a class="headerlink" href="#id575" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 19%" />
|
||
<col style="width: 81%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>generateMySQLProject</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>contractName</p></td>
|
||
<td><p>字符串类型,合约名称</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>isPrivate</p></td>
|
||
<td><p>布尔类型,是否为私有项目</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>dbUrl</p></td>
|
||
<td><p>字符串类型,数据库的URI</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>dbUserName</p></td>
|
||
<td><p>字符串类型,数据库的用户名</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>dbPWD</p></td>
|
||
<td><p>字符串类型,数据库密码</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>accessPolicy</p></td>
|
||
<td><p>若为“DAC”,则实现直接访问控制,若为“NAC”则没有访问控制</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>tableName</p></td>
|
||
<td><p>字符串类型,数据库的表名</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>fieldList</p></td>
|
||
<td><p>字符串列表,数据库的字段列表</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>defaultAccept</p></td>
|
||
<td><p>布尔值,表示申请时是否默认有权</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id577">
|
||
<span id="id578"></span><h5>请求示例<a class="headerlink" href="#id577" 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">"MySQLFromTemplate"</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">"generateMySQLProject"</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">"data"</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">"jdbc:mysql://xxx:xxx/xxx"</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">"loushuai"</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">"loushuai"</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">"name"</span><span class="o">:</span><span class="s2">"名字"</span><span class="p">,</span><span class="s2">"code"</span><span class="o">:</span><span class="s2">"*"</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">"type"</span><span class="o">:</span><span class="s2">"所属分类"</span><span class="p">,</span><span class="s2">"name"</span><span class="o">:</span><span class="s2">"资源名称"</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">"DAC"</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="id579">
|
||
<span id="id580"></span><h5>返回结果<a class="headerlink" href="#id579" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span><span class="s2">"onListProjects"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"[\"CSVFromTemplate\",\"Empty22\",\"Hello\",\"MySQLFromTemplate\",\"test\"]"</span><span class="p">,</span>
|
||
<span class="nt">"executeTime"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
|
||
<span class="nt">"isPrivate"</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="id581">
|
||
<span id="id582"></span><h5>参数<a class="headerlink" href="#id581" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 24%" />
|
||
<col style="width: 76%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>generateCSVProject</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>contractName</p></td>
|
||
<td><p>字符串类型,合约名称</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>base64EncodedData</p></td>
|
||
<td><p>字符串类型,通过base64编码后的CSV文件内容</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>isPrivate</p></td>
|
||
<td><p>可选字段,布尔类型,是否为私有项目</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>accessPolicy</p></td>
|
||
<td><p>若为“DAC”,则实现直接访问控制,若为“NAC”则没有访问控制</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>defaultAccept</p></td>
|
||
<td><p>可选字段,布尔值,表示申请时是否默认有权</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id583">
|
||
<span id="id584"></span><h5>请求示例<a class="headerlink" href="#id583" 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">"CSVFromTemplate"</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">"generateCSVProject"</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">"data"</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">"DAC"</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">"bmFtZSwgc2NvcmUsCmphY2ssIDkwLApsdWN5LCA5MQo="</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="id585">
|
||
<span id="id586"></span><h5>返回结果<a class="headerlink" href="#id585" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span><span class="s2">"onListProjects"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"[\"CSVFromTemplate\",\"Empty22\",\"Hello\",\"MySQLFromTemplate\",\"test\"]"</span><span class="p">,</span>
|
||
<span class="nt">"executeTime"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
|
||
<span class="nt">"isPrivate"</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="id587">
|
||
<h2>路由节点WebSocket接口<a class="headerlink" href="#id587" title="永久链接至标题">¶</a></h2>
|
||
<div class="section" id="id588">
|
||
<span id="id589"></span><h3>用户管理类<a class="headerlink" href="#id588" title="永久链接至标题">¶</a></h3>
|
||
<div class="section" id="session-1">
|
||
<span id="id590"></span><h4>获取Session<a class="headerlink" href="#session-1" title="永久链接至标题">¶</a></h4>
|
||
<p>登录前获取session以便进行签名。</p>
|
||
<div class="section" id="id591">
|
||
<span id="id592"></span><h5>参数<a class="headerlink" href="#id591" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 33%" />
|
||
<col style="width: 67%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>getSessionID</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id593">
|
||
<span id="id594"></span><h5>请求示例<a class="headerlink" href="#id593" 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">"getSessionID"</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="id595">
|
||
<span id="id596"></span><h5>返回结果<a class="headerlink" href="#id595" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onSessionID"</span><span class="p">,</span>
|
||
<span class="nt">"session"</span><span class="p">:</span> <span class="s2">"9782323_session"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id597">
|
||
<span id="id598"></span><h4>用户登录<a class="headerlink" href="#id597" title="永久链接至标题">¶</a></h4>
|
||
<p>用户进行公私钥身份验证,需先调用“getSessionID”获取sessionID以便于签名。</p>
|
||
<div class="section" id="id599">
|
||
<span id="id600"></span><h5>参数<a class="headerlink" href="#id599" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 55%" />
|
||
<col style="width: 45%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>login</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id601">
|
||
<span id="id602"></span><h5>请求示例<a class="headerlink" href="#id601" 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">"login"</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="id603">
|
||
<span id="id604"></span><h5>返回结果示例<a class="headerlink" href="#id603" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onLogin"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="s2">"CenterManager"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id605">
|
||
<h4>用户获取当前角色(删除)<a class="headerlink" href="#id605" title="永久链接至标题">¶</a></h4>
|
||
<p>用户根据登录时的公钥获取对应的角色,如果是第一次登录则此时的公钥默认称为准入管理员</p>
|
||
<div class="section" id="id606">
|
||
<span id="id607"></span><h5>参数<a class="headerlink" href="#id606" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 46%" />
|
||
<col style="width: 54%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>getRole</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id608">
|
||
<span id="id609"></span><h5>请求示例<a class="headerlink" href="#id608" 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">"getRole"</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="id610">
|
||
<span id="id611"></span><h5>返回结果示例<a class="headerlink" href="#id610" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onGetRole"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="s2">"CenterManager"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id612">
|
||
<span id="id613"></span><h4>申请角色<a class="headerlink" href="#id612" title="永久链接至标题">¶</a></h4>
|
||
<p>在准入管理员界面可以申请称为组网中某个节点的节点管理员</p>
|
||
<div class="section" id="id614">
|
||
<span id="id615"></span><h5>参数<a class="headerlink" href="#id614" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 30%" />
|
||
<col style="width: 70%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>applyRole</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>role</p></td>
|
||
<td><p>申请的角色名称</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id616">
|
||
<span id="id617"></span><h5>请求示例<a class="headerlink" href="#id616" 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">"applyRole"</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">"</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="id618">
|
||
<span id="id619"></span><h5>返回结果示例<a class="headerlink" href="#id618" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onApplyRole"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="s2">"failed"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id620">
|
||
<h4>添加节点<a class="headerlink" href="#id620" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id621">
|
||
<span id="id622"></span><h5>参数<a class="headerlink" href="#id621" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 38%" />
|
||
<col style="width: 62%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>addNode</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>nodePubKey</p></td>
|
||
<td><p>要添加的节点公钥</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id623">
|
||
<span id="id624"></span><h4>请求示例<a class="headerlink" href="#id623" title="永久链接至标题">¶</a></h4>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>var req = {};
|
||
//某节点的publicKey可通过连接该节点,并通过"获取节点配置信息"接口获取
|
||
req.nodePubKey = publicKey;
|
||
req.action = "addNode";
|
||
wssocket.send(JSON.stringify(req));
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id625">
|
||
<span id="id626"></span><h4>删除用户角色<a class="headerlink" href="#id625" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id627">
|
||
<span id="id628"></span><h5>参数<a class="headerlink" href="#id627" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 30%" />
|
||
<col style="width: 70%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>delete</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>pubKey</p></td>
|
||
<td><p>对应用户的公钥</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id629">
|
||
<span id="id630"></span><h5>请求示例<a class="headerlink" href="#id629" 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">"delete"</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="id631">
|
||
<span id="id632"></span><h5>返回结果示例<a class="headerlink" href="#id631" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onDelete"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="s2">"success"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id633">
|
||
<span id="id634"></span><h4>查看授权用户列表<a class="headerlink" href="#id633" title="永久链接至标题">¶</a></h4>
|
||
<p>查看准入管理员当前组网中已经授权的节点管理员</p>
|
||
<div class="section" id="id635">
|
||
<span id="id636"></span><h5>参数<a class="headerlink" href="#id635" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 33%" />
|
||
<col style="width: 67%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>listAllUsers</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id637">
|
||
<span id="id638"></span><h5>请求示例<a class="headerlink" href="#id637" 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">"onListAllUsers"</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="id639">
|
||
<span id="id640"></span><h5>返回结果示例<a class="headerlink" href="#id639" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onListAllUsers"</span><span class="p">,</span>
|
||
<span class="nt">"kv"</span><span class="p">:</span> <span class="p">{</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7"</span><span class="p">,</span>
|
||
<span class="nt">"value"</span><span class="p">:</span> <span class="s2">" NodeManager"</span>
|
||
<span class="p">},</span>
|
||
<span class="nt">"time"</span><span class="p">:</span> <span class="p">{</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"049999ebd14ff3b96ebf7f7325e1da94a1c4c376573a1dc1cec2b4f7a3b09ed7b07252134e93b6ac2e1853268b82f4b541d34fb42b0182cd61043e99d3489e2cf7"</span><span class="p">,</span>
|
||
<span class="nt">"value"</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="id641">
|
||
<span id="id642"></span><h4>查看申请用户列表<a class="headerlink" href="#id641" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id643">
|
||
<span id="id644"></span><h5>参数<a class="headerlink" href="#id643" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 32%" />
|
||
<col style="width: 68%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>listApplyList</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id645">
|
||
<span id="id646"></span><h5>请求示例<a class="headerlink" href="#id645" 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">"onListApplyList"</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="id647">
|
||
<span id="id648"></span><h5>返回结果<a class="headerlink" href="#id647" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onListApplyList"</span><span class="p">,</span>
|
||
<span class="nt">"kv"</span><span class="p">:</span> <span class="p">{</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"04b00f32eab70c78d1b43738f190d326d36c021af2124acefe6d057016b11ea31c750bb473e565c9d89e4993a44f4d30adf447d3026a21ff4b3b64cef523074ef7"</span><span class="p">,</span>
|
||
<span class="nt">"value"</span><span class="p">:</span> <span class="s2">" NodeManager"</span>
|
||
<span class="p">},</span>
|
||
<span class="nt">"time"</span><span class="p">:</span> <span class="p">{</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"04b00f32eab70c78d1b43738f190d326d36c021af2124acefe6d057016b11ea31c750bb473e565c9d89e4993a44f4d30adf447d3026a21ff4b3b64cef523074ef7"</span><span class="p">,</span>
|
||
<span class="nt">"value"</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="id649">
|
||
<h4>查看用户类型分布<a class="headerlink" href="#id649" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id650">
|
||
<span id="id651"></span><h5>参数<a class="headerlink" href="#id650" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 32%" />
|
||
<col style="width: 68%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>queryUserStat</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id652">
|
||
<span id="id653"></span><h5>请求示例<a class="headerlink" href="#id652" 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">"onQueryUserStat"</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="id654">
|
||
<span id="id655"></span><h5>返回结果示例<a class="headerlink" href="#id654" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onQueryUserStat"</span><span class="p">,</span>
|
||
<span class="nt">"userListCount"</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span>
|
||
<span class="nt">"applyListCount"</span><span class="p">:</span><span class="mi">0</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id656">
|
||
<h3>节点管理类<a class="headerlink" href="#id656" title="永久链接至标题">¶</a></h3>
|
||
<div class="section" id="id657">
|
||
<h4>查看节点列表<a class="headerlink" href="#id657" title="永久链接至标题">¶</a></h4>
|
||
<p>查看该用户有权限查看的节点列表(仅准入管理员及合约管理者可用)</p>
|
||
<div class="section" id="id658">
|
||
<span id="id659"></span><h5>参数<a class="headerlink" href="#id658" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 40%" />
|
||
<col style="width: 60%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>listNodes</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id660">
|
||
<span id="id661"></span><h5>请求示例<a class="headerlink" href="#id660" 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">"listNodes"</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="id662">
|
||
<span id="id663"></span><h5>返回结果<a class="headerlink" href="#id662" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"offline"</span><span class="p">:</span> <span class="p">[{</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"0431e31...40009b4f06d"</span><span class="p">,</span>
|
||
<span class="nt">"value"</span><span class="p">:</span> <span class="s2">"0431e311bd708...b4f06d"</span>
|
||
<span class="p">}],</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onListNodes"</span><span class="p">,</span>
|
||
<span class="nt">"online"</span><span class="p">:</span> <span class="p">[{</span>
|
||
<span class="nt">"contracts"</span><span class="p">:</span> <span class="p">[],</span>
|
||
<span class="nt">"pubKey"</span><span class="p">:</span> <span class="s2">"0431e311...09b4f06d"</span><span class="p">,</span>
|
||
<span class="nt">"nodeName"</span><span class="p">:</span> <span class="s2">"NewNodeName"</span><span class="p">,</span>
|
||
<span class="nt">"udpID"</span><span class="p">:</span> <span class="s2">"528822126"</span><span class="p">,</span>
|
||
<span class="nt">"cimanager"</span><span class="p">:</span> <span class="s2">""</span>
|
||
<span class="p">}]</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id664">
|
||
<h4>查看可信执行集群列表<a class="headerlink" href="#id664" title="永久链接至标题">¶</a></h4>
|
||
<p>查看该用户有权限查看的节点列表(仅中心管理员及合约管理者可用)</p>
|
||
<div class="section" id="id665">
|
||
<span id="id666"></span><h5>参数<a class="headerlink" href="#id665" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 30%" />
|
||
<col style="width: 70%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>listTrustUnits</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id667">
|
||
<span id="id668"></span><h5>请求示例<a class="headerlink" href="#id667" 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">"listTrustUnits"</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="id669">
|
||
<span id="id670"></span><h5>返回结果<a class="headerlink" href="#id669" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"data"</span><span class="p">:</span> <span class="p">[{</span>
|
||
<span class="nt">"key"</span><span class="p">:</span> <span class="s2">"0470b2f27f4f6…1cb855f1ecec11"</span><span class="p">,</span>
|
||
<span class="nt">"value"</span><span class="p">:</span> <span class="s2">"[...]"</span>
|
||
<span class="p">}],</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onListTrustUnits"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id671">
|
||
<h4>建立可信执行集群<a class="headerlink" href="#id671" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id672">
|
||
<span id="id673"></span><h5>参数<a class="headerlink" href="#id672" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 21%" />
|
||
<col style="width: 79%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>createTrustUnit</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>data</p></td>
|
||
<td><p>节点公钥组成的Json数组</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>Msg</p></td>
|
||
<td><p>集群名称</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id674">
|
||
<span id="id675"></span><h5>请求示例<a class="headerlink" href="#id674" 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">"createTrustUnit"</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">"[</span><span class="se">\"</span><span class="s2">382r0934309t...</span><span class="se">\"</span><span class="s2">,</span><span class="se">\"</span><span class="s2">345343rr3f34...</span><span class="se">\"</span><span class="s2">]"</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">"newUnit1"</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="id676">
|
||
<span id="id677"></span><h5>返回结果<a class="headerlink" href="#id676" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onCreateTrustUnit"</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="s2">"Success"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id678">
|
||
<h4>删除可信执行集群<a class="headerlink" href="#id678" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id679">
|
||
<span id="id680"></span><h5>参数<a class="headerlink" href="#id679" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 29%" />
|
||
<col style="width: 71%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>deleteTrustUnit</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>data</p></td>
|
||
<td><p>可信执行集群ID</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id681">
|
||
<span id="id682"></span><h5>请求示例<a class="headerlink" href="#id681" 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">"deleteTrustUnit"</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">"0475d34rf3434..._1583410158761"</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="id683">
|
||
<span id="id684"></span><h5>返回结果<a class="headerlink" href="#id683" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"action"</span><span class="p">:</span> <span class="s2">"onDeleteTrustUnit"</span><span class="p">,</span>
|
||
<span class="nt">"status"</span><span class="p">:</span> <span class="s2">"Success"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id685">
|
||
<span id="id686"></span><h3>日志查看类<a class="headerlink" href="#id685" title="永久链接至标题">¶</a></h3>
|
||
<div class="section" id="id687">
|
||
<h4>查看组网管理操作的统计<a class="headerlink" href="#id687" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id688">
|
||
<span id="id689"></span><h5>参数<a class="headerlink" href="#id688" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 30%" />
|
||
<col style="width: 70%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>queryActionLog</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>date</p></td>
|
||
<td><p>当前时间</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id690">
|
||
<span id="id691"></span><h5>请求示例<a class="headerlink" href="#id690" 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">"onQueryActionLog"</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="id692">
|
||
<span id="id693"></span><h5>返回结果<a class="headerlink" href="#id692" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> <span class="nt">"action"</span><span class="p">:</span><span class="s2">"onQueryActionLog"</span><span class="p">,</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"[{\"action\":\"login\",\"pubKey\":\"null\",\"status\":\"accept\",\"date\":1583139323822}\",]"</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id694">
|
||
<h4>查看本地近n日合约日志<a class="headerlink" href="#id694" title="永久链接至标题">¶</a></h4>
|
||
<div class="section" id="id695">
|
||
<span id="id696"></span><h5>参数<a class="headerlink" href="#id695" title="永久链接至标题">¶</a></h5>
|
||
<table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 23%" />
|
||
<col style="width: 77%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>字段</p></th>
|
||
<th class="head"><p>值</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>action</p></td>
|
||
<td><p>listLocalContractLog</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>date</p></td>
|
||
<td><p>当前时间</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id697">
|
||
<span id="id698"></span><h5>请求示例<a class="headerlink" href="#id697" 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">"listLocalContractLog"</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="id699">
|
||
<span id="id700"></span><h5>返回结果<a class="headerlink" href="#id699" title="永久链接至标题">¶</a></h5>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="nt">"data"</span><span class="p">:</span><span class="s2">"[\"{\"action\":\"startContract\",\"pubKey\":\"04405d7b...\",\"contractID\":\"845581788\",\"contractName\":\"null\",\"date\":1583141525539}\"]"</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>类中方法, 完成以下功能.
|
||
(需要在本机的``1615``端口运行<code class="docutils literal notranslate"><span class="pre">ContractManager</span></code>实例)</p>
|
||
<div class="figure align-default" id="id729">
|
||
<img alt="Bash接口功能示意图" src="_images/bash-api.png" />
|
||
<p class="caption"><span class="caption-text">Bash接口功能示意图</span><a class="headerlink" href="#id729" title="永久链接至图片">¶</a></p>
|
||
</div>
|
||
<div class="section" id="id701">
|
||
<h3>指令<a class="headerlink" href="#id701" 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="id702">
|
||
<span id="id703"></span><h3>启动合约<a class="headerlink" href="#id702" title="永久链接至标题">¶</a></h3>
|
||
<div class="section" id="id704">
|
||
<span id="id705"></span><h4>参数<a class="headerlink" href="#id704" 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="id706">
|
||
<h4>指令示例<a class="headerlink" href="#id706" title="永久链接至标题">¶</a></h4>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>java -jar yjs.jar startContract <span class="s2">"{\"type\":\"Algorigthm\",\"id\":\"656565\",\"script\":\"contract c{function main(arg){return arg/1.0+1;}}\"}"</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id707">
|
||
<span id="id708"></span><h3>调用合约<a class="headerlink" href="#id707" title="永久链接至标题">¶</a></h3>
|
||
<div class="section" id="id709">
|
||
<span id="id710"></span><h4>参数<a class="headerlink" href="#id709" 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="id711">
|
||
<span id="id712"></span><h4>指令示例<a class="headerlink" href="#id711" title="永久链接至标题">¶</a></h4>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>java -jar yjs.jar executeContract <span class="s2">"{\"arg\":\"http://www.baidu.com\",\"contractID\":\"656564\"}"</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id713">
|
||
<span id="id714"></span><h3>停止合约<a class="headerlink" href="#id713" title="永久链接至标题">¶</a></h3>
|
||
<div class="section" id="id715">
|
||
<span id="id716"></span><h4>参数<a class="headerlink" href="#id715" 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="id717">
|
||
<span id="id718"></span><h4>指令示例<a class="headerlink" href="#id717" title="永久链接至标题">¶</a></h4>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>java -jar yjs.jar stopContract <span class="s2">"{\"arg\":\"http://www.baidu.com\",\"contractID\":\"656564\"}"</span>
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id719">
|
||
<h3>停止全部合约<a class="headerlink" href="#id719" title="永久链接至标题">¶</a></h3>
|
||
<div class="section" id="id720">
|
||
<span id="id721"></span><h4>参数<a class="headerlink" href="#id720" 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="id722">
|
||
<span id="id723"></span><h4>指令示例<a class="headerlink" href="#id722" 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="id724">
|
||
<h3>查询全部合约<a class="headerlink" href="#id724" title="永久链接至标题">¶</a></h3>
|
||
<div class="section" id="id725">
|
||
<span id="id726"></span><h4>参数<a class="headerlink" href="#id725" 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="id727">
|
||
<span id="id728"></span><h4>指令示例<a class="headerlink" href="#id727" 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>
|
||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||
<a href="YJSInDepth.html" class="btn btn-neutral float-right" title="YJS语法" accesskey="n" rel="next">下一页 <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||
<a href="IDEUsage.html" class="btn btn-neutral float-left" title="BDContract管理界面" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> 上一页</a>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<div role="contentinfo">
|
||
<p>
|
||
© 版权所有 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> |