参数
输入
交易 hash
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:返回交易账户;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_ GetTxAccounts ()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
hash = {0x24, 0x4f, 0xa7, 0xcf, 0x97, 0xae, 0x15, 0x85, 0xd8,
0xf8, 0x02, 0x4b, 0xa1, 0x8b, 0x8a, 0xbe, 0xce, 0x8e, 0xb9,
0xcd, 0x4d, 0x01, 0x6d, 0xd0, 0xba, 0x8c, 0xc0, 0xdc, 0x85, 0x1a,
0x9c, 0x0e}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
</font></font><font color="#000000"><font size="2" style="font-size: 9pt">accounts</font></font><font color="#000000"><font size="2" style="font-size: 9pt">
= {mylib.GetTxAccounts(Unpack(hash))}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">LogPrint(LOG_TYPE.ENUM_NUMBER,#</font></font><font color="#000000"><font size="2" style="font-size: 9pt">
accounts</font></font><font color="#000000"><font size="2" style="font-size: 9pt">,</font></font><font color="#000000"><font size="2" style="font-size: 9pt">
accounts</font></font><font color="#000000"><font size="2" style="font-size: 9pt">)</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>
原型
mylib.GetAccountPublickey(accountTbl[1],accountTbl[2],accountTbl[3],accountTbl[4],accountTbl[5],accountTbl[6])
功能
获取账户的公钥
参数
输入
local
accountTbl = {mylib.GetCurTxAccount()}
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:账户的</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">publickey</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_GetAccountPublickey()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
accountTbl = {mylib.GetCurTxAccount()}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
i</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<br/>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
result =
{mylib.GetAccountPublickey(accountTbl[1],accountTbl[2],accountTbl[3],</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000">
<font size="2" style="font-size: 9pt">accountTbl[4],accountTbl[5],accountTbl[6])}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(#result
== 33,"GetAccountPublickey err");</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">for
i = 1,#result do</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
print("Publickey",i,(result[i]))</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">end</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end </font></font></p>
</td>
</tr>
</table>
原型
mylib.QueryAccountBalance(unpack(accountTbl))
功能
获取账户的余额
参数
输入
local
accountTbl = {mylib.GetCurTxAccount()}
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:账户的余额;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_QueryAccountBalance()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
accountTbl = {mylib.GetCurTxAccount()}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
i</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
result = {mylib.QueryAccountBalance(unpack(accountTbl))}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(#result
== 8,"QueryAccountBalance err");</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">for
i = 1,#result do</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
print("Balance",i,(result[i]))</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">end</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end </font></font></p>
</td>
</tr>
</table>
原型
mylib.GetTxConFirmHeight(unpack(txhashTbl))
功能
获取指定 hash交易的确认高度
参数
输入
交易 hash
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:交易确认高度;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_GetTxConFirmHeight()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">--
"hash"
:"4a2af2d83683325e780f2b859e7421f4592e3105d01017aab45c15da3910be8e"</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
txhashTbl = {0x4a,0x2a,0xf2,0xd8,0x36,0x83,0x32,0x5e,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000">
<font size="2" style="font-size: 9pt">0x78,0x0f,0x2b,0x85,0x9e,0x74,0x21,0xf4,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000">
<font size="2" style="font-size: 9pt">0x59,0x2e,0x31,0x05,0xd0,0x10,0x17,0xaa,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000">
<font size="2" style="font-size: 9pt">0xb4,0x5c,0x15,0xda,0x39,0x10,0xbe,0x8e}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<br/>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
result = mylib.GetTxConFirmHeight(unpack(txhashTbl)) </font></font>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">assert(result
> 0,"GetTxConFirmHeight err"); </font></font>
</p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end </font></font></p>
</td>
</tr>
</table>
原型
mylib.GetBlockHash(height)
功能
获取指定块 hash
参数
输入
块的高度
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:块</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">hash</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">值;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_GetBlockHash()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
height = 47037</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
i</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
result = {mylib.GetBlockHash(height)}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">assert(#result
== 32,"GetBlockHash err");</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">for
i = 1,#result do</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
print("BlockHash",i,(result[i]))</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">end</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end </font></font></p>
</td>
</tr>
</table>
原型
mylib.GetCurRunEnvHeight()
功能
获取当前运行高度
参数
输入
</p>
</td>
<td width="278" valign="top" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:块的高度;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_GetCurRunEnvHeight()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
result = mylib.GetCurRunEnvHeight()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">assert(result
> 0,"GetCurRunEnvHeight err");</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">print("RunEnvHeight",result)</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end
</font></font>
</p>
</td>
</tr>
</table>
原型
mylib.WriteData(writeDbTbl)
功能
写脚本数据库
参数
输入
local
writeDbTbl = {
key = "config", --关键字
length = 0, -- value数据流的总长
value = {} --值
}
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:执行成功;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_WriteData() </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
writeDbTbl = {</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
key = "config", --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">关键字</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
length = 0, -- value</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">数据流的总长</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
value = {} --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">值</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> }</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> addressTbl
= {0x64,0x63,0x6D,0x43,0x62,0x4B,0x62,0x41,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> 0x66,0x4B,0x72,0x6F,0x66,0x4E,0x7A,0x33,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> 0x35,0x4D,0x53,0x46,0x75,0x70,0x78,0x72,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> 0x78,0x34,0x55,0x77,0x6E,0x33,0x76,0x67,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> 0x6A,0x4C}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">每次限额</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">,</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">每日限额</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">,</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">企业登记的账户地址</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> writeDbTbl.value
= {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x2C,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> unpack(addressTbl)} </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> writeDbTbl.length
= #writeDbTbl.value</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000">
<font size="2" style="font-size: 9pt">assert(mylib.WriteData(writeDbTbl),"WriteData
err")</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>
原型
mylib.DeleteData(key)
功能
删除脚本数据库
参数
输入
关键字 key
=“config”
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">true</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">false</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_ DeleteData () </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
writeDbTbl = {</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
key = "config", --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">关键字</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
length = 0, -- value</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">数据流的总长</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
value = {} --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">值</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> }</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(mylib.DeleteData(writeDbTbl.key),"DeleteData
err")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> print("DeleteData
return ok")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
readResult = {}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> readResult
= {mylib.ReadData(writeDbTbl.key)} </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> if(TableIsEmpty(readResult))
then</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> print("DeleteData
ok")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> end </font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>
原型
mylib.ReadData(key)
功能
根据指定的 key读取脚本数据库中的记录
参数
输入
关键字 key
=“config”
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:返回</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">value</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_ ReadData () </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
key =“config”</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
readResult = {mylib.ReadData(key)} </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">assert(#readResult
> 0,"ReadData0 err")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
i</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">for
i = 1,#readResult do</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> print("",i,(readResult[i]))</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">end
</font></font>
</p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>
原型
mylib.ModifyData(writeDbTbl)
功能
修改脚本数据库内容
参数
输入
local
writeDbTbl = {
key = "config", --关键字
length = 0, -- value数据流的总长
value = {} --值
}
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">True</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">false</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_ ModifyData () </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
writeDbTbl = {</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
key = "config", --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">关键字</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
length = 0, -- value</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">数据流的总长</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
value = {} --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">值</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> }</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> addressTbl
= {0x64,0x63,0x6D,0x43,0x62,0x4B,0x62,0x41,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> 0x66,0x4B,0x72,0x6F,0x66,0x4E,0x7A,0x33,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> 0x35,0x4D,0x53,0x46,0x75,0x70,0x78,0x72,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> 0x78,0x34,0x55,0x77,0x6E,0x33,0x76,0x67,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> 0x6A,0x4C}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">每次限额</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">,</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">每日限额</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">,</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">企业登记的账户地址</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> writeDbTbl.value
= {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x2C,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> unpack(addressTbl)} </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> writeDbTbl.length
= #writeDbTbl.value</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> writeDbTbl.value[8]
= 200</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(mylib.ModifyData(writeDbTbl),"ModifyData
err")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> print("ModifyData
ok")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> readResult
= {}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> readResult
= {mylib.ReadData(writeDbTbl.key)} </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(#readResult
> 0,"ReadData1 err")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> print("ReadData1
ok")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> for
i = 1,#readResult do</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> print("",i,(readResult[i]))</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> end </font></font>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
</table>
原型
mylib.LogPrint(LogTable)
功能
保存日志信息
参数
输入
待保存的内容
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">--</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">日志输出类型</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">LOG_TYPE
= </font></font>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">{</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">ENUM_STRING
= 0, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">字符串类型</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">ENUM_NUMBER
= 1 --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">数字类型
</font></font></span></font>
</p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">};</font></font></p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_ LogPrint ()</font></font></p>
<p class="western" style="text-indent: 0.19in; margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">local
LogTable = {</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> key
= LOG_TYPE.ENUM_STRING, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">日志类型</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> length
= 0, --value</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">数据流的总长</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> value
= nil -- </font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">字符串或数字流</font></font></span></font></p>
<p class="western" style="text-indent: 0.28in; margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">}</font></font></p>
<p style="margin-left: 0.25in; margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">--</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">保存字符串</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> LogTable.length
= 9 </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> LogTable.value
= "lua start"</font></font></p>
<p class="western" style="text-indent: 0.28in; margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">mylib.LogPrint(LogTable)</font></font></p>
<p class="western" style="text-indent: 0.28in; margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">--</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">保存数据流</font></font></span></font></p>
<p class="western" style="text-indent: 0.28in; margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">LogTable.key
= LOG_TYPE.ENUM_NUMBER</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> LogTable.length
= 20 </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
i</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> for
i = 1,20 do</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
LogTable.value [i] = i</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">end</font></font></p>
<p class="western" style="text-indent: 0.28in; margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">mylib.LogPrint(LogTable)</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end </font></font></p>
</td>
</tr>
</table>
原型
mylib.GetCurTxHash()
功能
获取当前交易 hash
参数
输入
</p>
</td>
<td width="278" valign="top" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">Hash</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">值;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_GetCurTxHash()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
result = {mylib.GetCurTxHash()}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">assert(#result
== 32,"GetCurTxHash err");</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">for
i = 1,#result do</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
print("CurTxHash",i,(result[i]))</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">end</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>
原型
mylib.WriteOutput(writeOutputTbl)
功能
操作系统账户
参数
输入
local
writeOutputTbl = {
addrType
= 1, --账户类型
REG_ID
= 0x01,BASE_58_ADDR = 0x02,
accountIdTbl
= {}, --account id
operatorType
= 0, --操作类型
outHeight
= 0, --超时高度
moneyTbl
= {} --金额
}
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">True</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">False</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
WriteWithDrawal(accTbl,moneyTbl)</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">执行系统账户提现操作</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(TableIsNotEmpty(accTbl),"WriteWithDrawal
accTbl invlaid1")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(TableIsNotEmpty
(moneyTbl),"WriteWithDrawal moneyTbl invlaid1") </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
writeOutputTbl = {</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> addrType
= 1, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">账户类型
</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">REG_ID
= 0x01,BASE_58_ADDR = 0x02,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> accountIdTbl
= {}, --account id</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> operatorType
= 0, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">操作类型</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> outHeight
= 0, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">超时高度</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> moneyTbl
= {} --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">金额</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> } </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> writeOutputTbl.accountIdTbl
= {unpack(accTbl)}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> writeOutputTbl.operatorType
= OPER_TYPE.</font></font> <font color="#000000"><font size="2" style="font-size: 9pt">ENUM_ADD_FREE</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> writeOutputTbl.moneyTbl
= {unpack(moneyTbl)}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(mylib.WriteOutput(writeOutputTbl),"WriteWithDrawal
WriteOutput err0")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">writeOutputTbl.operatorType
= OPER_TYPE.</font></font> <font color="#000000"><font size="2" style="font-size: 9pt">ENUM_MINUS_FREE</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
writeOutputTbl.accountidTbl = {mylib.GetScriptID()}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
assert(mylib.WriteOutput(writeOutputTbl),"WriteWithDrawal
WriteOutput err1")</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt"> end</font></font></p>
</td>
</tr>
</table>
原型
mylib.GetScriptData(paraTbl)
功能
获取脚本数据
参数
输入
local
paraTbl = {
id
= {0x00,0x01,0x00,0x00,0xb7,0xc4}, --6字节的脚本 id
key = "config", --关键字
}
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:脚本数据;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_GetScriptData()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> mylib_WriteData()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
paraTbl = {</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
--id = {0x00,0x01,0x00,0x00,0xb7,0xc4}, --6</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">字节的脚本</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">id</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> id
= {mylib.GetScriptID()},</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
key = "config", --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">关键字</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> }</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<br/>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
result = {mylib.GetScriptData(paraTbl)}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(#result
> 0,"GetScriptData err")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<br/>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">for
i = 1,#result do</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
print("GetScriptData",i,(result[i]))</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">end</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end </font></font></p>
</td>
</tr>
</table>
原型
mylib.GetScriptID()
功能
获取脚本 ID
参数
输入
</p>
</td>
<td width="278" valign="top" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:返回</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">6</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">字节的脚本</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">ID</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_GetScriptID() </font></font>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
result = {mylib. GetScriptID ())}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(#result
> 0," GetScriptID err")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<br/>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">for
i = 1,#result do</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
print("GetScriptID",i,(result[i]))</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">end</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">end </font></font></p>
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
</table>
原型
mylib.GetCurTxAccount()
功能
获取当前交易账户
参数
输入
</p>
</td>
<td width="278" valign="top" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:返回账户信息;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_ GetCurTxAccount ()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
i</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
result = {mylib. GetCurTxAccount ())}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(#result
== 6," GetCurTxAccount err");</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">for
i = 1,#result do</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
print("Account",i,(result[i]))</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">end</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>
原型
mylib.GetCurTxPayAmount()
功能
获取当前交易金额
参数
输入
</p>
</td>
<td width="278" valign="top" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:</font></font><font color="#000000">返回</font></span></font><font color="#000000">Int64<font face="宋体"><span lang="zh-CN">的交易金额</font><font color="#000000"><font size="2" style="font-size: 9pt">;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_ GetCurTxPayAmount ()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
i</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
paymoneyTbl = {mylib. GetCurTxPayAmount ())}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(#paymoneyTbl
== 8," GetCurTxPayAmount err");</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">for
i = 1,# paymoneyTbl do</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
print("PayAmount ",i,( paymoneyTbl [i]))</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">end</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end </font></font></p>
</td>
</tr>
</table>
原型
mylib.GetUserAppAccValue(idTbl)
功能
获取指定账户的余额
参数
输入
--
用户 id
local
idTbl = {
idlen
= 0, --id长度
idValueTbl
= {} --id值
}
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:</font></font><font color="#000000">返回</font></span></font><font color="#000000">Int64<font face="宋体"><span lang="zh-CN">的交易金额</font><font color="#000000"><font size="2" style="font-size: 9pt">;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_ GetUserAppAccValue ()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
idTbl = {</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> idlen
= 6, --id</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">长度</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> idValueTbl
= {0x01,0x02,0x03,0x04,0x05,0x06} --id</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">值</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt"> </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
i</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
money = { mylib.GetUserAppAccValue(idTbl) }</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(#money
== 8," GetUserAppAccValue err");</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">for
i = 1,# money do</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
print("money ",i,( money [i]))</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">end</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">end </font></font></p>
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
</table>
4.19 GetUserAppAccFoudWithTag
原型
mylib.GetUserAppAccFoudWithTag(app_operateTbl)
功能
获取指定账户的余额
参数
输入
--
用户 id
local
idTbl = {
idlen
= 0, --id长度
idValueTbl
= {} --id值
}
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:</font></font><font color="#000000">返回</font></span></font><font color="#000000">Int64<font face="宋体"><span lang="zh-CN">的交易金额</font><font color="#000000"><font size="2" style="font-size: 9pt">;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_ GetUserAppAccValue ()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
idTbl = {</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> idlen
= 6, --id</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">长度</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> idValueTbl
= {0x01,0x02,0x03,0x04,0x05,0x06} --id</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">值</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt"> </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
i</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
money = { mylib.GetUserAppAccValue(idTbl) }</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(#money
== 8," GetUserAppAccValue err");</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">for
i = 1,# money do</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
print("money ",i,( money [i]))</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">end</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">end </font></font></p>
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
</table>
原型
mylib.WriteOutAppOperate(app_operateTbl)
功能
操作系统应用账户
参数
输入
local
app_operateTbl = {
operatorType = 0, --操作类型
outHeight = 0, --超时高度
moneyTbl = {}, --金额
userIdLen = 0, --账户 ID长度
userIdTbl = {}, --账户 ID
fundTagLen = 0, --fund tag len
fundTagTbl = {} --fund tag
}
</p>
</td>
<td width="278" valign="top" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:</font></font></span></font><font color="#000000">True</font><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">False</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_ WriteOutAppOperate ()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
app_operateTbl = {</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
operatorType = 0, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">操作类型</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
outHeight = 0, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">超时高度</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
moneyTbl = {}, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">金额</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
userIdLen = 0, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">账户</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">ID</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">长度</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
userIdTbl = {}, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">账户</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">ID
</font></font>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
fundTagLen = 0, --fund tag len</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
fundTagTbl = {} --fund tag </font></font>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> } </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> app_operateTbl.operatorType
= AppOperatorTable.</font></font><font size="2" style="font-size: 9pt">
</font><font color="#000000"><font size="2" style="font-size: 9pt">ENUM_ADD_FREE_OP</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> app_operateTbl.moneyTbl
= {0,0,0,0,0,0,1,44}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> app_operateTbl.userIdLen
= 6</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> app_operateTbl.userIdTbl
= {0,0,0,0,2,0}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<br/>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(mylib.WriteOutAppOperate(app_operateTbl),"WriteOutAppOperate
err0")</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>
原型
mylib.GetBase58Addr(unpack(accountTbl))
功能
获取指定账户的 base58地址
参数
输入
local
accountTbl = {5,157,0,0,7,34} --6字节的账户 ID
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:</font></font></span></font><font color="#000000">base58<font face="宋体"><span lang="zh-CN">地址</font><font color="#000000"><font size="2" style="font-size: 9pt">;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_GetBase58Addr()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
accountTbl = {5,157,0,0,7,34} --6</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">字节的账户</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">ID</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
result = {mylib.GetBase58Addr(unpack(accountTbl))}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(#result
> 0,"GetBase58Addr err") </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> if(#result
> 0) then</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> LogPrint(LOG_TYPE.NUMBER,#result,result) </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> end </font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>
原型
mylib.
ByteToInteger (byteTbl[1], byteTbl [2], byteTbl [3], byteTbl [4])
功能
将字节转换成 number
参数
输入
4字节流或 8字节的字节流
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:</font></font></span></font><font color="#000000">Integer<font face="宋体"><span lang="zh-CN">高度值或金额值</font><font color="#000000"><font size="2" style="font-size: 9pt">;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_ByteToInteger()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
height = mylib.ByteToInteger(0xa0,0x05,0x00,0x00)</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(height
> 0,"ByteToInteger error0")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> print("height=",height)</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
money =
mylib.ByteToInteger(0x78,0x56,0x34,0x12,0x78,0x56,0x34,0x12)</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(money
> 0,"ByteToInteger error1")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> print("money=",money)</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>
原型
mylib.
IntegerToByte4 (height)
功能
将 Interger的高度值转换成 4字节
参数
输入
Integer高度值
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:返回</font></font></span></font><font color="#000000">4<font face="宋体"><span lang="zh-CN">个字节</font><font color="#000000"><font size="2" style="font-size: 9pt">;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_IntegerToByte()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
height = 1440</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
result = {mylib.IntegerToByte4(height)}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(#result
== 4,"IntegerToByte4 error0")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
i</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> print("height
byte") </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">for
i = 1,#result do</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
print("",i,(result[i]))</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">end</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>
原型
mylib.
IntegerToByte8 (money)
功能
将 Integer的高度值转换成 8字节
参数
输入
Integer金额值
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:返回</font></font></span></font><font color="#000000">8<font face="宋体"><span lang="zh-CN">个字节</font><font color="#000000"><font size="2" style="font-size: 9pt">;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_IntegerToByte8()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
money = 1311768465173141112</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
result = {mylib.IntegerToByte8(money)}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(#result
== 8,"IntegerToByte8 error0")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">for
i = 1,#result do</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">
print("",i,(result[i]))</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">end </font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>
原型
mylib.Sha256(string)
功能
Sha256
hash加密算法
参数
输入
待加密的内容
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">加密输出,成功返回一个</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">table</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">,否则</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_Sha256 ()</font></font></p>
<p class="western" style="text-indent: 0.19in; margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
orgContent = "123"</font></font></p>
<p class="western" style="text-indent: 0.19in; margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
content = {mylib.Sha256(orgContent)}</font></font></p>
<p class="western" style="text-indent: 0.19in; margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> LogPrint(LOG_TYPE.ENUM_NUMBER,#content,content)</font></font></p>
<p class="western" style="text-indent: 0.19in; margin-top: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>
原型
mylib.Des(desTbl)
功能
Des加密算法
参数
输入
待加密的内容
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
desTbl = </font></font>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">{</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> dataLen
= 0, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">加密数据长度</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> data
= {}, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">加密数据</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> keyLen
= 0, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">私钥长度</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> key
= {}, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">私钥数据</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> flag
= 1 --1</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">加密
</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">0</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">解密</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000">
<font size="2" style="font-size: 9pt">}</font></font></p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">加密输出,成功返回一个</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">table</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">,否则</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_Des ()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
desTbl = </font></font>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">{</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> dataLen
= 8,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> data
= {},</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> keyLen
= 8,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> key
= {},</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> flag
= 1</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<br/>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">desTbl.data
= {0xad, 0xdd, 0x1e, 0x1b, 0xeb, 0x8c, 0x10, 0x8d}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">for
i = 1,8 do</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> desTbl.key[i]
= 0x33 + i</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">end</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> </font>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">desTbl.flag
= 0</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> </font>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
content = {mylib.Des(desTbl)}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000">
<font size="2" style="font-size: 9pt">LogPrint(LOG_TYPE.ENUM_NUMBER,#content,content)</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>
原型
mylib.VerifySignature(sigTbl)
功能
验证签名
参数
输入
待验证的内容
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
sigTbl = </font></font>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">{</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> dataLen
=0, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">数据长度</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> data
= {}, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">签名数据</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> keyLen
= 0, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">签名公钥长度</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> key
= {}, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">签名公钥</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> hashLen
= 0, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">签名之前的</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">hash</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">长度</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> hash
= {} --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">签名</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">hash</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000">
<font size="2" style="font-size: 9pt">}</font></font></p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">true</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">:验证成功,</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">false</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">:失败</font></font></span></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_ VerifySignature ()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
sigTbl = </font></font>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">{</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> dataLen
= 9,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> data
= {0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39},</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> keyLen
= 33,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> key
= {0x03, 0xee, 0xf7, 0xa3, 0x80, 0xbc, 0xf9, 0xcf, 0x97, 0x5d,
0x91, 0x6f, 0xda, 0xb1, 0x8d, 0x08, 0x1c, 0x9d, 0x55, 0xba, 0x43,
0x46, 0x54, 0x35, 0xa4, 0xd1, 0xcc, 0x59, 0x86, 0x10, 0xa4, 0x44,
0x79},</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> hashLen
= 32,</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> hash
= {0x24, 0x4f, 0xa7, 0xcf, 0x97, 0xae, 0x15, 0x85, 0xd8, 0xf8,
0x02, 0x4b, 0xa1, 0x8b, 0x8a, 0xbe, 0xce, 0x8e, 0xb9, 0xcd, 0x4d,
0x01, 0x6d, 0xd0, 0xba, 0x8c, 0xc0, 0xdc, 0x85, 0x1a, 0x9c, 0x0e}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> </font>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
ret = mylib.VerifySignature(sigTbl)</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">if
ret then</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> LogPrint(LOG_TYPE.ENUM_STRING,string.len("ok"),"ok")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">else</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> LogPrint(LOG_TYPE.ENUM_STRING,string.len("bad"),"bad")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">end</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>
原型
mylib.GetTxContracts(hashTbl)
功能
获取指定 hash的合约内容
参数
输入
合约交易 hash
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:返回合约内容;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_ GetTxContracts ()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
hash = {0x24, 0x4f, 0xa7, 0xcf, 0x97, 0xae, 0x15, 0x85, 0xd8,
0xf8, 0x02, 0x4b, 0xa1, 0x8b, 0x8a, 0xbe, 0xce, 0x8e, 0xb9, 0xcd,
0x4d, 0x01, 0x6d, 0xd0, 0xba, 0x8c, 0xc0, 0xdc, 0x85, 0x1a, 0x9c,
0x0e}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
content = {mylib.GetTxContracts(Unpack(hash))}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000">
<font size="2" style="font-size: 9pt">LogPrint(LOG_TYPE.ENUM_NUMBER,#content,content)</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>
4.29 TransferContactAsset
原型
mylib.
TransferContactAsset (Unpack(addrTbl))
功能
转移全部资产
参数
输入
账户地址
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">True</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">False</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_TransferContactAsset()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
accountTbl = {5,157,0,0,7,34} --6</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">字节的账户</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">ID</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
addrTbl = {mylib.GetBase58Addr(unpack(accountTbl))}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(#addrTbl
> 0,"GetBase58Addr err") </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000">
<font size="2" style="font-size: 9pt">assert(mylib.TransferContactAsset(Unpack(addrTbl)),
"TransferContactAsset err")</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>
原型
mylib.TransferSomeAsset
(assetOperateTbl)
功能
转移部分资产
参数
输入
local
assetOperateTbl = {
toAddrTbl
= {}, --转移目的地址
outHeight
= 0, --高度
moneyTbl
= {}, --资产数
fundTagLen
= 0, --fund tag len
fundTagTbl
= {} --fund tag
}
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">True</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">False</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_TransferSomeAsset()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
accountTbl = {5,157,0,0,7,34} --6</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">字节的账户</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">ID</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> local
addrTbl = {mylib.GetBase58Addr(unpack(accountTbl))}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> assert(#addrTbl
> 0,"GetBase58Addr err") </font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<br/>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
assetOperateTbl = {</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">toAddrTbl
= {}, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">转移地址</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt"> outHeight
= 0, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">高度
</font></font></span></font>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> moneyTbl
= {}, --</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">资产数</font></font></span></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">fundTagLen
= 0, --fund tag len</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt"> fundTagTbl
= {} --fund tag </font></font>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<br/>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
money = 1311768465173141112</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
moneyTbl = {mylib.IntegerToByte8(money)}</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<br/>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<br/>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">assetOperateTbl.toAddrTbl
= addrTbl</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">assetOperateTbl.outHeight
= 1440</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">assetOperateTbl.moneyTbl
= moneyTbl</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000">
<font size="2" style="font-size: 9pt">assert(mylib.TransferSomeAsset(assetOperateTbl),
"TransferSomeAsset err")</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>
原型
mylib.GetBlockTimestamp
(height)
功能
获取块的时间戳
参数
输入
块的高度值,如果传入参数 <=0,则实际高度为 last
block 的高度
-
传入参数的绝对值;否则实际高度
=
传入参数
</p>
</td>
</tr>
<tr valign="top">
<td width="29" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">输出</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">常量</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="1" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">结构体</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td rowspan="2" colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">返回</font></b></span></font></font></font></p>
</td>
<td width="279" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><font face="宋体"><span lang="zh-CN"><font color="#000000"><font size="2" style="font-size: 9pt">成功:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">unix</font><font face="宋体"><span lang="zh-CN"><font size="2" style="font-size: 9pt">时间戳;失败:</font></font></span></font><font color="#000000"><font size="2" style="font-size: 9pt">nil</font></font></p>
</td>
<td width="278" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td width="279" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
<td width="278" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="2" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">注释</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#ffffff" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in"><br/>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="2" width="64" height="3" bgcolor="#acb9ca" style="border-top: 1px solid #00000a; border-bottom: 1px solid #00000a; border-left: 1px solid #00000a; border-right: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p align="center" style="margin-top: 0.08in; widows: 2; orphans: 2">
<font color="#244061"><font face="宋体"><font size="3" style="font-size: 12pt"><span lang="zh-CN"><b><font size="2" style="font-size: 9pt">示例</font></b></span></font></font></font></p>
</td>
<td colspan="2" width="571" bgcolor="#cccccc" style="border: 1px solid #000001; padding-top: 0in; padding-bottom: 0in; padding-left: 0.08in; padding-right: 0.08in">
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"><font size="2" style="font-size: 9pt">function
mylib_GetBlockTimestamp ()</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">local
ts = mylib.GetBlcokTimestamp(0)</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">assert(ts
~= nil,"ts is nil")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">str
= string.format("0:%d", ts)</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000">
<font size="2" style="font-size: 9pt">LogPrint(LOG_TYPE.ENUM_STRING,string.len(str),str)</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> </font>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">ts
= mylib. GetBlcokTimestamp (100)</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">assert(ts
~= nil,"ts is nil")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">str
= string.format("100:%d", ts)</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000">
<font size="2" style="font-size: 9pt">LogPrint(LOG_TYPE.ENUM_STRING,string.len(str),str)</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> </font>
</p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">ts
= mylib. GetBlcokTimestamp (-100)</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">assert(ts
~= nil,"ts is nil")</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000"> <font size="2" style="font-size: 9pt">str
= string.format("-100:%d", ts)</font></font></p>
<p class="western" style="margin-top: 0.19in; margin-bottom: 0.19in">
<font color="#000000">
<font size="2" style="font-size: 9pt">LogPrint(LOG_TYPE.ENUM_STRING,string.len(str),str)</font></font></p>
<p class="western" style="margin-top: 0.19in"><font color="#000000"><font size="2" style="font-size: 9pt">end</font></font></p>
</td>
</tr>
</table>