UNPKG

blockstack

Version:

The Blockstack Javascript library for authentication, identity, and storage.

751 lines 102 kB
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>LocalRegtest | blockstack</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">blockstack</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-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="localregtest.html">LocalRegtest</a> </li> </ul> <h1>Class LocalRegtest</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel tsd-hierarchy"> <h3>Hierarchy</h3> <ul class="tsd-hierarchy"> <li> <a href="blockstacknetwork.html" class="tsd-signature-type">BlockstackNetwork</a> <ul class="tsd-hierarchy"> <li> <span class="target">LocalRegtest</span> </li> </ul> </li> </ul> </section> <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>Constructors</h3> <ul class="tsd-index-list"> <li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="localregtest.html#constructor" class="tsd-kind-icon">constructor</a></li> </ul> </section> <section class="tsd-index-section tsd-is-inherited"> <h3>Properties</h3> <ul class="tsd-index-list"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#dust_minimum" class="tsd-kind-icon">DUST_<wbr>MINIMUM</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#magic_bytes" class="tsd-kind-icon">MAGIC_<wbr>BYTES</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#blockstackapiurl" class="tsd-kind-icon">blockstackAPIUrl</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#broadcastserviceurl" class="tsd-kind-icon">broadcast<wbr>Service<wbr>Url</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#btc" class="tsd-kind-icon">btc</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#excludeutxoset" class="tsd-kind-icon">exclude<wbr>Utxo<wbr>Set</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#includeutxomap" class="tsd-kind-icon">include<wbr>Utxo<wbr>Map</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#layer1" class="tsd-kind-icon">layer1</a></li> </ul> </section> <section class="tsd-index-section "> <h3>Methods</h3> <ul class="tsd-index-list"> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-private"><a href="localregtest.html#broadcastnameregistration" class="tsd-kind-icon">broadcast<wbr>Name<wbr>Registration</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-private"><a href="localregtest.html#broadcastservicefetchhelper" class="tsd-kind-icon">broadcast<wbr>Service<wbr>Fetch<wbr>Helper</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-private"><a href="localregtest.html#broadcasttransaction" class="tsd-kind-icon">broadcast<wbr>Transaction</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-private"><a href="localregtest.html#broadcastzonefile" class="tsd-kind-icon">broadcast<wbr>Zone<wbr>File</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#coerceaddress" class="tsd-kind-icon">coerce<wbr>Address</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#countdustoutputs" class="tsd-kind-icon">count<wbr>Dust<wbr>Outputs</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getaccountat" class="tsd-kind-icon">get<wbr>Account<wbr>At</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getaccountbalance" class="tsd-kind-icon">get<wbr>Account<wbr>Balance</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getaccounthistorypage" class="tsd-kind-icon">get<wbr>Account<wbr>History<wbr>Page</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getaccountstatus" class="tsd-kind-icon">get<wbr>Account<wbr>Status</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getaccounttokens" class="tsd-kind-icon">get<wbr>Account<wbr>Tokens</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getblockheight" class="tsd-kind-icon">get<wbr>Block<wbr>Height</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getconsensushash" class="tsd-kind-icon">get<wbr>Consensus<wbr>Hash</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getdefaultburnaddress" class="tsd-kind-icon">get<wbr>Default<wbr>Burn<wbr>Address</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="localregtest.html#getfeerate" class="tsd-kind-icon">get<wbr>Fee<wbr>Rate</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getgraceperiod" class="tsd-kind-icon">get<wbr>Grace<wbr>Period</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getnameinfo" class="tsd-kind-icon">get<wbr>Name<wbr>Info</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getnameprice" class="tsd-kind-icon">get<wbr>Name<wbr>Price</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-private"><a href="localregtest.html#getnamepricev1" class="tsd-kind-icon">get<wbr>Name<wbr>Price<wbr>V1</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-private"><a href="localregtest.html#getnamepricev2" class="tsd-kind-icon">get<wbr>Name<wbr>Price<wbr>V2</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getnamesowned" class="tsd-kind-icon">get<wbr>Names<wbr>Owned</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getnamespaceburnaddress" class="tsd-kind-icon">get<wbr>Namespace<wbr>Burn<wbr>Address</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getnamespaceinfo" class="tsd-kind-icon">get<wbr>Namespace<wbr>Info</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getnamespaceprice" class="tsd-kind-icon">get<wbr>Namespace<wbr>Price</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-private"><a href="localregtest.html#getnamespacepricev1" class="tsd-kind-icon">get<wbr>Namespace<wbr>Price<wbr>V1</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-private"><a href="localregtest.html#getnamespacepricev2" class="tsd-kind-icon">get<wbr>Namespace<wbr>Price<wbr>V2</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getnetworkedutxos" class="tsd-kind-icon">get<wbr>NetworkedUTXOs</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#gettransactioninfo" class="tsd-kind-icon">get<wbr>Transaction<wbr>Info</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getutxos" class="tsd-kind-icon">getUTXOs</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#getzonefile" class="tsd-kind-icon">get<wbr>Zonefile</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-private"><a href="localregtest.html#modifyutxosetfrom" class="tsd-kind-icon">modifyUTXOSet<wbr>From</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="localregtest.html#resetutxos" class="tsd-kind-icon">resetUTXOs</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Constructors</h2> <section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"> <a name="constructor" class="tsd-anchor"></a> <h3>constructor</h3> <ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"> <li class="tsd-signature tsd-kind-icon">new <wbr>Local<wbr>Regtest<span class="tsd-signature-symbol">(</span>apiUrl<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, broadcastServiceUrl<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, bitcoinAPI<span class="tsd-signature-symbol">: </span><a href="bitcoinnetwork.html" class="tsd-signature-type">BitcoinNetwork</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="localregtest.html" class="tsd-signature-type">LocalRegtest</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Overrides <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#constructor">constructor</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L902">network.ts:902</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>apiUrl: <span class="tsd-signature-type">string</span></h5> </li> <li> <h5>broadcastServiceUrl: <span class="tsd-signature-type">string</span></h5> </li> <li> <h5>bitcoinAPI: <a href="bitcoinnetwork.html" class="tsd-signature-type">BitcoinNetwork</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="localregtest.html" class="tsd-signature-type">LocalRegtest</a></h4> </li> </ul> </section> </section> <section class="tsd-panel-group tsd-member-group tsd-is-inherited"> <h2>Properties</h2> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="dust_minimum" class="tsd-anchor"></a> <h3>DUST_<wbr>MINIMUM</h3> <div class="tsd-signature tsd-kind-icon">DUST_<wbr>MINIMUM<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#dust_minimum">DUST_MINIMUM</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L46">network.ts:46</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="magic_bytes" class="tsd-anchor"></a> <h3>MAGIC_<wbr>BYTES</h3> <div class="tsd-signature tsd-kind-icon">MAGIC_<wbr>BYTES<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#magic_bytes">MAGIC_BYTES</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L54">network.ts:54</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="blockstackapiurl" class="tsd-anchor"></a> <h3>blockstackAPIUrl</h3> <div class="tsd-signature tsd-kind-icon">blockstackAPIUrl<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#blockstackapiurl">blockstackAPIUrl</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L40">network.ts:40</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="broadcastserviceurl" class="tsd-anchor"></a> <h3>broadcast<wbr>Service<wbr>Url</h3> <div class="tsd-signature tsd-kind-icon">broadcast<wbr>Service<wbr>Url<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#broadcastserviceurl">broadcastServiceUrl</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L42">network.ts:42</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="btc" class="tsd-anchor"></a> <h3>btc</h3> <div class="tsd-signature tsd-kind-icon">btc<span class="tsd-signature-symbol">:</span> <a href="bitcoinnetwork.html" class="tsd-signature-type">BitcoinNetwork</a></div> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#btc">btc</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L52">network.ts:52</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="excludeutxoset" class="tsd-anchor"></a> <h3>exclude<wbr>Utxo<wbr>Set</h3> <div class="tsd-signature tsd-kind-icon">exclude<wbr>Utxo<wbr>Set<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Array</span><span class="tsd-signature-symbol">&lt;</span><a href="../globals.html#utxo" class="tsd-signature-type">UTXO</a><span class="tsd-signature-symbol">&gt;</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#excludeutxoset">excludeUtxoSet</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L50">network.ts:50</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="includeutxomap" class="tsd-anchor"></a> <h3>include<wbr>Utxo<wbr>Map</h3> <div class="tsd-signature tsd-kind-icon">include<wbr>Utxo<wbr>Map<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#includeutxomap">includeUtxoMap</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L48">network.ts:48</a></li> </ul> </aside> <div class="tsd-type-declaration"> <h4>Type declaration</h4> <ul class="tsd-parameters"> <li class="tsd-parameter-index-signature"> <h5><span class="tsd-signature-symbol">[</span>address: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><a href="../globals.html#utxo" class="tsd-signature-type">UTXO</a><span class="tsd-signature-symbol">[]</span></h5> </li> </ul> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="layer1" class="tsd-anchor"></a> <h3>layer1</h3> <div class="tsd-signature tsd-kind-icon">layer1<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#layer1">layer1</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L44">network.ts:44</a></li> </ul> </aside> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Methods</h2> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-private"> <a name="broadcastnameregistration" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagPrivate">Private</span> broadcast<wbr>Name<wbr>Registration</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-private"> <li class="tsd-signature tsd-kind-icon">broadcast<wbr>Name<wbr>Registration<span class="tsd-signature-symbol">(</span>preorderTransaction<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, registerTransaction<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, zoneFile<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><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#broadcastnameregistration">broadcastNameRegistration</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L748">network.ts:748</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Sends the preorder and registration transactions and zone file for a Blockstack name registration along with the to the transaction broadcast service.</p> </div> <p>The transaction broadcast:</p> <ul> <li>immediately broadcasts the preorder transaction</li> <li>broadcasts the register transactions after the preorder transaction has an appropriate number of confirmations</li> <li>broadcasts the zone file to the Atlas network after the register transaction has an appropriate number of confirmations</li> </ul> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>preorderTransaction: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>the hex-encoded, signed preorder transaction generated using the <code>makePreorder</code> function</p> </div> </li> <li> <h5>registerTransaction: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>the hex-encoded, signed register transaction generated using the <code>makeRegister</code> function</p> </div> </li> <li> <h5>zoneFile: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>the zone file to be broadcast to the Atlas network</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>Returns a Promise that resolves to an object with a <code>transaction_hash</code> key containing the transaction hash of the broadcasted transaction.</p> <p>In the event of an error, it rejects with:</p> <ul> <li>a <code>RemoteServiceError</code> if there is a problem with the transaction broadcast service</li> <li><code>MissingParameterError</code> if you call the function without a required parameter</li> </ul> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-private"> <a name="broadcastservicefetchhelper" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagPrivate">Private</span> broadcast<wbr>Service<wbr>Fetch<wbr>Helper</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-private"> <li class="tsd-signature tsd-kind-icon">broadcast<wbr>Service<wbr>Fetch<wbr>Helper<span class="tsd-signature-symbol">(</span>endpoint<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, body<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Error</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#broadcastservicefetchhelper">broadcastServiceFetchHelper</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L570">network.ts:570</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Performs a POST request to the given URL</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>endpoint: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>the name of</p> </div> </li> <li> <h5>body: <span class="tsd-signature-type">any</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Error</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>Returns a <code>Promise</code> that resolves to the object requested. In the event of an error, it rejects with:</p> <ul> <li>a <code>RemoteServiceError</code> if there is a problem with the transaction broadcast service</li> <li><code>MissingParameterError</code> if you call the function without a required parameter</li> </ul> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-private"> <a name="broadcasttransaction" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagPrivate">Private</span> broadcast<wbr>Transaction</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-private"> <li class="tsd-signature tsd-kind-icon">broadcast<wbr>Transaction<span class="tsd-signature-symbol">(</span>transaction<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, transactionToWatch<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, confirmations<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#broadcasttransaction">broadcastTransaction</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L612">network.ts:612</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Broadcasts a signed bitcoin transaction to the network optionally waiting to broadcast the transaction until a second transaction has a certain number of confirmations.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>transaction: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>the hex-encoded transaction to broadcast</p> </div> </li> <li> <h5><span class="tsd-flag ts-flagDefault value">Default value</span> transactionToWatch: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> =&nbsp;null</span></h5> <div class="tsd-comment tsd-typography"> <p>the hex transaction id of the transaction to watch for the specified number of confirmations before broadcasting the <code>transaction</code></p> </div> </li> <li> <h5><span class="tsd-flag ts-flagDefault value">Default value</span> confirmations: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> =&nbsp;6</span></h5> <div class="tsd-comment tsd-typography"> <p>the number of confirmations <code>transactionToWatch</code> must have before broadcasting <code>transaction</code>.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>Returns a Promise that resolves to an object with a <code>transaction_hash</code> key containing the transaction hash of the broadcasted transaction.</p> <p>In the event of an error, it rejects with:</p> <ul> <li>a <code>RemoteServiceError</code> if there is a problem with the transaction broadcast service</li> <li><code>MissingParameterError</code> if you call the function without a required parameter</li> </ul> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-private"> <a name="broadcastzonefile" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagPrivate">Private</span> broadcast<wbr>Zone<wbr>File</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-private"> <li class="tsd-signature tsd-kind-icon">broadcast<wbr>Zone<wbr>File<span class="tsd-signature-symbol">(</span>zoneFile<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, transactionToWatch<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><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#broadcastzonefile">broadcastZoneFile</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L665">network.ts:665</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Broadcasts a zone file to the Atlas network via the transaction broadcast service.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> zoneFile: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>the zone file to be broadcast to the Atlas network</p> </div> </li> <li> <h5><span class="tsd-flag ts-flagDefault value">Default value</span> transactionToWatch: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> =&nbsp;null</span></h5> <div class="tsd-comment tsd-typography"> <p>the hex transaction id of the transaction to watch for confirmation before broadcasting the zone file to the Atlas network</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>Returns a Promise that resolves to an object with a <code>transaction_hash</code> key containing the transaction hash of the broadcasted transaction.</p> <p>In the event of an error, it rejects with:</p> <ul> <li>a <code>RemoteServiceError</code> if there is a problem with the transaction broadcast service</li> <li><code>MissingParameterError</code> if you call the function without a required parameter</li> </ul> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="coerceaddress" class="tsd-anchor"></a> <h3>coerce<wbr>Address</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">coerce<wbr>Address<span class="tsd-signature-symbol">(</span>address<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><span class="tsd-signature-type">string</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#coerceaddress">coerceAddress</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L70">network.ts:70</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>address: <span class="tsd-signature-type">string</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="countdustoutputs" class="tsd-anchor"></a> <h3>count<wbr>Dust<wbr>Outputs</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">count<wbr>Dust<wbr>Outputs<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#countdustoutputs">countDustOutputs</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L793">network.ts:793</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="getaccountat" class="tsd-anchor"></a> <h3>get<wbr>Account<wbr>At</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">get<wbr>Account<wbr>At<span class="tsd-signature-symbol">(</span>address<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, blockHeight<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#getaccountat">getAccountAt</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L473">network.ts:473</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Get the state(s) of an account at a particular block height. This includes the state of the account beginning with this block&#39;s transactions, as well as all of the states the account passed through when this block was processed (if any).</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>address: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>the account&#39;s address</p> </div> </li> <li> <h5>blockHeight: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>the block to query</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>a promise that resolves to an Array of Objects, where each Object encodes states of the account at this block.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="getaccountbalance" class="tsd-anchor"></a> <h3>get<wbr>Account<wbr>Balance</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">get<wbr>Account<wbr>Balance<span class="tsd-signature-symbol">(</span>address<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, tokenType<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><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">BN</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#getaccountbalance">getAccountBalance</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L532">network.ts:532</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Get the number of tokens owned by an account. If the account does not exist or has no tokens of this type, then 0 will be returned.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>address: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>the account&#39;s address</p> </div> </li> <li> <h5>tokenType: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>the type of token to query.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">BN</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>a promise that resolves to a BigInteger that encodes the number of tokens held by this account.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="getaccounthistorypage" class="tsd-anchor"></a> <h3>get<wbr>Account<wbr>History<wbr>Page</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">get<wbr>Account<wbr>History<wbr>Page<span class="tsd-signature-symbol">(</span>address<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, page<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#getaccounthistorypage">getAccountHistoryPage</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L437">network.ts:437</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Get a page of an account&#39;s transaction history.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>address: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>the account&#39;s address</p> </div> </li> <li> <h5>page: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>the page number. Page 0 is the most recent transactions</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>a promise that resolves to an Array of Objects, where each Object encodes states of the account at various block heights (e.g. prior balances, txids, etc)</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="getaccountstatus" class="tsd-anchor"></a> <h3>get<wbr>Account<wbr>Status</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">get<wbr>Account<wbr>Status<span class="tsd-signature-symbol">(</span>address<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, tokenType<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><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#getaccountstatus">getAccountStatus</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L408">network.ts:408</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Get the status of an account for a particular token holding. This includes its total number of expenditures and credits, lockup times, last txid, and so on.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>address: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>the account</p> </div> </li> <li> <h5>tokenType: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>the token type to query</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>a promise that resolves to an object representing the state of the account for this token</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="getaccounttokens" class="tsd-anchor"></a> <h3>get<wbr>Account<wbr>Tokens</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">get<wbr>Account<wbr>Tokens<span class="tsd-signature-symbol">(</span>address<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><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#getaccounttokens">getAccountTokens</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L505">network.ts:505</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Get the set of token types that this account owns</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>address: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>the account&#39;s address</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>a promise that resolves to an Array of Strings, where each item encodes the type of token this account holds (excluding the underlying blockchain&#39;s tokens)</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="getblockheight" class="tsd-anchor"></a> <h3>get<wbr>Block<wbr>Height</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">get<wbr>Block<wbr>Height<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="blockstacknetwork.html">BlockstackNetwork</a>.<a href="blockstacknetwork.html#getblockheight">getBlockHeight</a></p> <ul> <li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/master/src/network.ts#L893">network.ts:893</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="getconsensushash" class="tsd-anchor"></a> <h3>get<wbr>Consensus<wbr>Hash</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">get<wbr>Consensus<wbr>Hash<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-