UNPKG

ontology-ts-sdk

Version:

Comprehensive TypeScript library for the Ontology blockchain.

719 lines 41.9 kB
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>&quot;smartcontract/nativevm/authContractTxBuilder&quot; | ontology-ts-sdk</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../assets/css/main.css"> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../index.html" class="title">ontology-ts-sdk</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> <input type="checkbox" id="tsd-filter-externals" checked /> <label class="tsd-widget" for="tsd-filter-externals">Externals</label> <input type="checkbox" id="tsd-filter-only-exported" /> <label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../globals.html">Globals</a> </li> <li> <a href="_smartcontract_nativevm_authcontracttxbuilder_.html">&quot;smartcontract/nativevm/authContractTxBuilder&quot;</a> </li> </ul> <h1>External module &quot;smartcontract/nativevm/authContractTxBuilder&quot;</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section "> <h3>Variables</h3> <ul class="tsd-index-list"> <li class="tsd-kind-variable tsd-parent-kind-external-module"><a href="_smartcontract_nativevm_authcontracttxbuilder_.html#auth_contract" class="tsd-kind-icon">AUTH_<wbr>CONTRACT</a></li> <li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_smartcontract_nativevm_authcontracttxbuilder_.html#contractaddress" class="tsd-kind-icon">contract<wbr>Address</a></li> </ul> </section> <section class="tsd-index-section "> <h3>Functions</h3> <ul class="tsd-index-list"> <li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_smartcontract_nativevm_authcontracttxbuilder_.html#makeassignfuncstoroletx" class="tsd-kind-icon">make<wbr>Assign<wbr>Funcs<wbr>ToRole<wbr>Tx</a></li> <li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_smartcontract_nativevm_authcontracttxbuilder_.html#makeassignontidstoroletx" class="tsd-kind-icon">make<wbr>Assign<wbr>Ont<wbr>Ids<wbr>ToRole<wbr>Tx</a></li> <li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_smartcontract_nativevm_authcontracttxbuilder_.html#makedelegateroletx" class="tsd-kind-icon">make<wbr>Delegate<wbr>Role<wbr>Tx</a></li> <li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_smartcontract_nativevm_authcontracttxbuilder_.html#makeinitcontractadmintx" class="tsd-kind-icon">make<wbr>Init<wbr>Contract<wbr>Admin<wbr>Tx</a></li> <li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_smartcontract_nativevm_authcontracttxbuilder_.html#maketransferauthtx" class="tsd-kind-icon">make<wbr>Transfer<wbr>Auth<wbr>Tx</a></li> <li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_smartcontract_nativevm_authcontracttxbuilder_.html#makeverifytokentx" class="tsd-kind-icon">make<wbr>Verify<wbr>Token<wbr>Tx</a></li> <li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_smartcontract_nativevm_authcontracttxbuilder_.html#makewithdrawroletx" class="tsd-kind-icon">make<wbr>Withdraw<wbr>Role<wbr>Tx</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Variables</h2> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module"> <a name="auth_contract" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagConst">Const</span> AUTH_<wbr>CONTRACT</h3> <div class="tsd-signature tsd-kind-icon">AUTH_<wbr>CONTRACT<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"0000000000000000000000000000000000000006"</span><span class="tsd-signature-symbol"> =&nbsp;&quot;0000000000000000000000000000000000000006&quot;</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/MickWang/ontology-ts-sdk/blob/f203ee8/src/smartcontract/nativevm/authContractTxBuilder.ts#L30">smartcontract/nativevm/authContractTxBuilder.ts:30</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Address of auth contract.</p> </div> </div> </section> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"> <a name="contractaddress" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagConst">Const</span> contract<wbr>Address</h3> <div class="tsd-signature tsd-kind-icon">contract<wbr>Address<span class="tsd-signature-symbol">:</span> <a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a><span class="tsd-signature-symbol"> =&nbsp;new Address(AUTH_CONTRACT)</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/MickWang/ontology-ts-sdk/blob/f203ee8/src/smartcontract/nativevm/authContractTxBuilder.ts#L31">smartcontract/nativevm/authContractTxBuilder.ts:31</a></li> </ul> </aside> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Functions</h2> <section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module"> <a name="makeassignfuncstoroletx" class="tsd-anchor"></a> <h3>make<wbr>Assign<wbr>Funcs<wbr>ToRole<wbr>Tx</h3> <ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module"> <li class="tsd-signature tsd-kind-icon">make<wbr>Assign<wbr>Funcs<wbr>ToRole<wbr>Tx<span class="tsd-signature-symbol">(</span>contractAddr<span class="tsd-signature-symbol">: </span><a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a>, adminOntId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, role<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, funcNames<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span>, keyNo<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, payer<span class="tsd-signature-symbol">: </span><a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a>, gasPrice<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, gasLimit<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../classes/_transaction_transaction_.transaction.html" class="tsd-signature-type">Transaction</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/MickWang/ontology-ts-sdk/blob/f203ee8/src/smartcontract/nativevm/authContractTxBuilder.ts#L126">smartcontract/nativevm/authContractTxBuilder.ts:126</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>assign functions to role. must be called by contract&#39;s admin</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>contractAddr: <a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a></h5> <div class="tsd-comment tsd-typography"> <p>target contract&#39;s address</p> </div> </li> <li> <h5>adminOntId: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>admin&#39;s ONT ID.This id must be registered.</p> </div> </li> <li> <h5>role: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>role name</p> </div> </li> <li> <h5>funcNames: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5> <div class="tsd-comment tsd-typography"> <p>array of function name</p> </div> </li> <li> <h5>keyNo: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>publicKey&#39;s id, use the pk to varify tx</p> </div> </li> <li> <h5>payer: <a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a></h5> <div class="tsd-comment tsd-typography"> <p>Address to pay for the gas.</p> </div> </li> <li> <h5>gasPrice: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Gas price</p> </div> </li> <li> <h5>gasLimit: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Gas limit</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="../classes/_transaction_transaction_.transaction.html" class="tsd-signature-type">Transaction</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module"> <a name="makeassignontidstoroletx" class="tsd-anchor"></a> <h3>make<wbr>Assign<wbr>Ont<wbr>Ids<wbr>ToRole<wbr>Tx</h3> <ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module"> <li class="tsd-signature tsd-kind-icon">make<wbr>Assign<wbr>Ont<wbr>Ids<wbr>ToRole<wbr>Tx<span class="tsd-signature-symbol">(</span>contractAddr<span class="tsd-signature-symbol">: </span><a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a>, adminOntId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, role<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, ontIds<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span>, keyNo<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, payer<span class="tsd-signature-symbol">: </span><a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a>, gasPrice<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, gasLimit<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../classes/_transaction_transaction_.transaction.html" class="tsd-signature-type">Transaction</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/MickWang/ontology-ts-sdk/blob/f203ee8/src/smartcontract/nativevm/authContractTxBuilder.ts#L163">smartcontract/nativevm/authContractTxBuilder.ts:163</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>assign role to ONT IDs. must be called by contract&#39;s admin</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>contractAddr: <a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a></h5> <div class="tsd-comment tsd-typography"> <p>target contract&#39;s address</p> </div> </li> <li> <h5>adminOntId: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>admin&#39;s ONT ID.This id must be registered.</p> </div> </li> <li> <h5>role: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>role&#39;s name</p> </div> </li> <li> <h5>ontIds: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5> <div class="tsd-comment tsd-typography"> <p>array of ONT ID</p> </div> </li> <li> <h5>keyNo: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>admin&#39;s pk id.use to varify tx.</p> </div> </li> <li> <h5>payer: <a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a></h5> <div class="tsd-comment tsd-typography"> <p>Address to pay for the gas.</p> </div> </li> <li> <h5>gasPrice: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Gas price</p> </div> </li> <li> <h5>gasLimit: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Gas limit</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="../classes/_transaction_transaction_.transaction.html" class="tsd-signature-type">Transaction</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module"> <a name="makedelegateroletx" class="tsd-anchor"></a> <h3>make<wbr>Delegate<wbr>Role<wbr>Tx</h3> <ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module"> <li class="tsd-signature tsd-kind-icon">make<wbr>Delegate<wbr>Role<wbr>Tx<span class="tsd-signature-symbol">(</span>contractAddr<span class="tsd-signature-symbol">: </span><a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a>, from<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, to<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, role<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, period<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, level<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, keyNo<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, payer<span class="tsd-signature-symbol">: </span><a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a>, gasPrice<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, gasLimit<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../classes/_transaction_transaction_.transaction.html" class="tsd-signature-type">Transaction</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/MickWang/ontology-ts-sdk/blob/f203ee8/src/smartcontract/nativevm/authContractTxBuilder.ts#L206">smartcontract/nativevm/authContractTxBuilder.ts:206</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>delegate role to others. Can&#39;t delegate repeatedly。</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>contractAddr: <a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a></h5> <div class="tsd-comment tsd-typography"> <p>target contract&#39;s address</p> </div> </li> <li> <h5>from: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>ONT ID of user that wants to delegate role.This id must be registered.</p> </div> </li> <li> <h5>to: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>ONT ID of user that will receive role.This id must be registered.</p> </div> </li> <li> <h5>role: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>role name</p> </div> </li> <li> <h5>period: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>time of delegate period in second</p> </div> </li> <li> <h5><span class="tsd-flag ts-flagDefault value">Default value</span> level: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> =&nbsp;1</span></h5> <div class="tsd-comment tsd-typography"> <p>= 1 for now.</p> </div> </li> <li> <h5>keyNo: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>The number of user&#39;s publick in the DDO.</p> </div> </li> <li> <h5>payer: <a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a></h5> <div class="tsd-comment tsd-typography"> <p>Address to pay for the gas.</p> </div> </li> <li> <h5>gasPrice: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Gas price</p> </div> </li> <li> <h5>gasLimit: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Gas limit</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="../classes/_transaction_transaction_.transaction.html" class="tsd-signature-type">Transaction</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module"> <a name="makeinitcontractadmintx" class="tsd-anchor"></a> <h3>make<wbr>Init<wbr>Contract<wbr>Admin<wbr>Tx</h3> <ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module"> <li class="tsd-signature tsd-kind-icon">make<wbr>Init<wbr>Contract<wbr>Admin<wbr>Tx<span class="tsd-signature-symbol">(</span>adminOntId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, payer<span class="tsd-signature-symbol">: </span><a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a>, gasPrice<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, gasLimit<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../classes/_transaction_transaction_.transaction.html" class="tsd-signature-type">Transaction</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/MickWang/ontology-ts-sdk/blob/f203ee8/src/smartcontract/nativevm/authContractTxBuilder.ts#L40">smartcontract/nativevm/authContractTxBuilder.ts:40</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Creates transaction that initialize the admin of some contract.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>adminOntId: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Admin&#39;s ONT ID</p> </div> </li> <li> <h5>payer: <a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a></h5> <div class="tsd-comment tsd-typography"> <p>Address to pay for the gas.</p> </div> </li> <li> <h5>gasPrice: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Gas price</p> </div> </li> <li> <h5>gasLimit: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Gas limit</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="../classes/_transaction_transaction_.transaction.html" class="tsd-signature-type">Transaction</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module"> <a name="maketransferauthtx" class="tsd-anchor"></a> <h3>make<wbr>Transfer<wbr>Auth<wbr>Tx</h3> <ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module"> <li class="tsd-signature tsd-kind-icon">make<wbr>Transfer<wbr>Auth<wbr>Tx<span class="tsd-signature-symbol">(</span>contractAddr<span class="tsd-signature-symbol">: </span><a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a>, newAdminOntid<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, keyNo<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, payer<span class="tsd-signature-symbol">: </span><a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a>, gasPrice<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, gasLimit<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../classes/_transaction_transaction_.transaction.html" class="tsd-signature-type">Transaction</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/MickWang/ontology-ts-sdk/blob/f203ee8/src/smartcontract/nativevm/authContractTxBuilder.ts#L63">smartcontract/nativevm/authContractTxBuilder.ts:63</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Transfer the authority to new admin</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>contractAddr: <a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a></h5> <div class="tsd-comment tsd-typography"> <p>Uer&#39;s contract address</p> </div> </li> <li> <h5>newAdminOntid: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>New admin&#39;s ONT ID. This id must be registered.</p> </div> </li> <li> <h5>keyNo: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>Original admin&#39;s public key id. Use this pk to varify tx.</p> </div> </li> <li> <h5>payer: <a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a></h5> <div class="tsd-comment tsd-typography"> <p>Address to pay for the gas.</p> </div> </li> <li> <h5>gasPrice: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Gas price</p> </div> </li> <li> <h5>gasLimit: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Gas limit</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="../classes/_transaction_transaction_.transaction.html" class="tsd-signature-type">Transaction</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module"> <a name="makeverifytokentx" class="tsd-anchor"></a> <h3>make<wbr>Verify<wbr>Token<wbr>Tx</h3> <ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module"> <li class="tsd-signature tsd-kind-icon">make<wbr>Verify<wbr>Token<wbr>Tx<span class="tsd-signature-symbol">(</span>contractAddr<span class="tsd-signature-symbol">: </span><a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a>, callerOntId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, funcName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, keyNo<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, payer<span class="tsd-signature-symbol">: </span><a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a>, gasPrice<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, gasLimit<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../classes/_transaction_transaction_.transaction.html" class="tsd-signature-type">Transaction</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/MickWang/ontology-ts-sdk/blob/f203ee8/src/smartcontract/nativevm/authContractTxBuilder.ts#L94">smartcontract/nativevm/authContractTxBuilder.ts:94</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>verify the user&#39;s token of target contract</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>contractAddr: <a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a></h5> <div class="tsd-comment tsd-typography"> <p>user&#39;s target contract address</p> </div> </li> <li> <h5>callerOntId: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>caller&#39;s ONT ID.This id must be registered.</p> </div> </li> <li> <h5>funcName: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>the function to call</p> </div> </li> <li> <h5>keyNo: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>publicKey&#39;s id, use this pk to varify tx</p> </div> </li> <li> <h5>payer: <a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a></h5> <div class="tsd-comment tsd-typography"> <p>Address to pay for the gas.</p> </div> </li> <li> <h5>gasPrice: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Gas price</p> </div> </li> <li> <h5>gasLimit: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Gas limit</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="../classes/_transaction_transaction_.transaction.html" class="tsd-signature-type">Transaction</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module"> <a name="makewithdrawroletx" class="tsd-anchor"></a> <h3>make<wbr>Withdraw<wbr>Role<wbr>Tx</h3> <ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module"> <li class="tsd-signature tsd-kind-icon">make<wbr>Withdraw<wbr>Role<wbr>Tx<span class="tsd-signature-symbol">(</span>contractAddr<span class="tsd-signature-symbol">: </span><a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a>, initiator<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, delegate<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, role<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, keyNo<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, payer<span class="tsd-signature-symbol">: </span><a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a>, gasPrice<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, gasLimit<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../classes/_transaction_transaction_.transaction.html" class="tsd-signature-type">Transaction</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/MickWang/ontology-ts-sdk/blob/f203ee8/src/smartcontract/nativevm/authContractTxBuilder.ts#L245">smartcontract/nativevm/authContractTxBuilder.ts:245</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>role&#39;s owner can withdraw the delegate in advance</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>contractAddr: <a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a></h5> <div class="tsd-comment tsd-typography"> <p>target contract&#39;s address</p> </div> </li> <li> <h5>initiator: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>ONT ID of role&#39;s owner.This id must be registered.</p> </div> </li> <li> <h5>delegate: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>ONT ID of role&#39;s agent.This id must be registered.</p> </div> </li> <li> <h5>role: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>role&#39;s name</p> </div> </li> <li> <h5>keyNo: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>The number of user&#39;s public key in the DDO</p> </div> </li> <li> <h5>payer: <a href="../classes/_crypto_address_.address.html" class="tsd-signature-type">Address</a></h5> <div class="tsd-comment tsd-typography"> <p>Address to pay for the gas.</p> </div> </li> <li> <h5>gasPrice: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Gas price</p> </div> </li> <li> <h5>gasLimit: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Gas limit</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="../classes/_transaction_transaction_.transaction.html" class="tsd-signature-type">Transaction</a></h4> </li> </ul> </section> </section> </div> <div class="col-4 col-menu menu-sticky-wrap menu-highlight"> <nav class="tsd-navigation primary"> <ul> <li class="globals "> <a href="../globals.html"><em>Globals</em></a> </li> <li class="current tsd-kind-external-module"> <a href="_smartcontract_nativevm_authcontracttxbuilder_.html">"smartcontract/nativevm/auth<wbr>Contract<wbr>TxBuilder"</a> </li> </ul> </nav> <nav class="tsd-navigation secondary menu-sticky"> <ul class="before-current"> <li class=" tsd-kind-variable tsd-parent-kind-external-module"> <a href="_smartcontract_nativevm_authcontracttxbuilder_.html#auth_contract" class="tsd-kind-icon">AUTH_<wbr>CONTRACT</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"> <a href="_smartcontract_nativevm_authcontracttxbuilder_.html#contractaddress" class="tsd-kind-icon">contract<wbr>Address</a> </li> <li class=" tsd-kind-function tsd-parent-kind-external-module"> <a href="_smartcontract_nativevm_authcontracttxbuilder_.html#makeassignfuncstoroletx" class="tsd-kind-icon">make<wbr>Assign<wbr>Funcs<wbr>ToRole<wbr>Tx</a> </li> <li class=" tsd-kind-function tsd-parent-kind-external-module"> <a href="_smartcontract_nativevm_authcontracttxbuilder_.html#makeassignontidstoroletx" class="tsd-kind-icon">make<wbr>Assign<wbr>Ont<wbr>Ids<wbr>ToRole<wbr>Tx</a> </li> <li class=" tsd-kind-function tsd-parent-kind-external-module"> <a href="_smartcontract_nativevm_authcontracttxbuilder_.html#makedelegateroletx" class="tsd-kind-icon">make<wbr>Delegate<wbr>Role<wbr>Tx</a> </li> <li class=" tsd-kind-function tsd-parent-kind-external-module"> <a href="_smartcontract_nativevm_authcontracttxbuilder_.html#makeinitcontractadmintx" class="tsd-kind-icon">make<wbr>Init<wbr>Contract<wbr>Admin<wbr>Tx</a> </li> <li class=" tsd-kind-function tsd-parent-kind-external-module"> <a href="_smartcontract_nativevm_authcontracttxbuilder_.html#maketransferauthtx" class="tsd-kind-icon">make<wbr>Transfer<wbr>Auth<wbr>Tx</a> </li> <li class=" tsd-kind-function tsd-parent-kind-external-module"> <a href="_smartcontract_nativevm_authcontracttxbuilder_.html#makeverifytokentx" class="tsd-kind-icon">make<wbr>Verify<wbr>Token<wbr>Tx</a> </li> <li class=" tsd-kind-function tsd-parent-kind-external-module"> <a href="_smartcontract_nativevm_authcontracttxbuilder_.html#makewithdrawroletx" class="tsd-kind-icon">make<wbr>Withdraw<wbr>Role<wbr>Tx</a> </li> </ul> </nav> </div> </div> </div> <footer class="with-border-bottom"> <div class="container"> <h2>Legend</h2> <div class="tsd-legend-group"> <ul class="tsd-legend"> <li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li> <li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li> <li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li> <li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li> <li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li> <li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li> <li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li> <li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li> <li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li> <li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li> <li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li> <li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li> <li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li> <li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li> <li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li> <li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li> </ul> </div> </div> </footer> <div class="container tsd-generator"> <p>Generated using <a href="http://typedoc.org/" target="_blank">TypeDoc</a></p> </div> <div class="overlay"></div> <script src="../assets/js/main.js"></script> <script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script> </body> </html>