209 lines
10 KiB
HTML
209 lines
10 KiB
HTML
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
<title>Transactions — pybtc documentation</title>
|
||
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
|
||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
|
||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||
<link rel="index" title="Index" href="genindex.html" />
|
||
<link rel="search" title="Search" href="search.html" />
|
||
<link rel="next" title="Blocks" href="block.html" />
|
||
<link rel="prev" title="Addresses" href="address.html" />
|
||
|
||
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
|
||
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
|
||
|
||
</head><body>
|
||
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
|
||
|
||
<div class="body" role="main">
|
||
|
||
<div class="section" id="transactions">
|
||
<h1>Transactions<a class="headerlink" href="#transactions" title="Permalink to this headline">¶</a></h1>
|
||
<p>The class for creating transaction.</p>
|
||
<dl class="class">
|
||
<dt id="pybtc.Transaction">
|
||
<em class="property">class </em><code class="descclassname">pybtc.</code><code class="descname">Transaction</code><span class="sig-paren">(</span><em>raw_tx=None</em>, <em>tx_format='decoded'</em>, <em>version=1</em>, <em>lock_time=0</em>, <em>testnet=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pybtc/transaction.html#Transaction"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pybtc.Transaction" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>The class for Transaction object</p>
|
||
<table class="docutils field-list" frame="void" rules="none">
|
||
<col class="field-name" />
|
||
<col class="field-body" />
|
||
<tbody valign="top">
|
||
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
|
||
<li><strong>raw_tx</strong> – (optional) raw transaction in bytes or HEX encoded string, if no raw transaction provided
|
||
well be created new empty transaction template.</li>
|
||
<li><strong>tx_format</strong> – “raw” or “decoded” format. Raw format is mean that all transaction represented in bytes
|
||
for best performance.
|
||
Decoded transaction is represented in human readable format using base68, hex, bech32,
|
||
asm and opcodes. By default “decoded” format using.</li>
|
||
<li><strong>version</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.6)"><em>int</em></a>) – transaction version for new template, by default 1.</li>
|
||
<li><strong>lock_time</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.6)"><em>int</em></a>) – transaction lock time for new template, by default 0.</li>
|
||
<li><strong>testnet</strong> (<em>boolean</em>) – address type for “decoded” transaction representation.</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<dl class="method">
|
||
<dt id="pybtc.Transaction.decode">
|
||
<code class="descname">decode</code><span class="sig-paren">(</span><em>testnet=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pybtc/transaction.html#Transaction.decode"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pybtc.Transaction.decode" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>change Transacion object representation to “decoded” human readable format</p>
|
||
<table class="docutils field-list" frame="void" rules="none">
|
||
<col class="field-name" />
|
||
<col class="field-body" />
|
||
<tbody valign="top">
|
||
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>testnet</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.6)"><em>bool</em></a>) – (optional) address type for “decoded” transaction representation, by default None.
|
||
if None used type from transaction property “format”.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="pybtc.Transaction.encode">
|
||
<code class="descname">encode</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pybtc/transaction.html#Transaction.encode"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pybtc.Transaction.encode" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>change Transaction object representation to “raw” bytes format,
|
||
all human readable part will be stripped.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="pybtc.Transaction.json">
|
||
<code class="descname">json</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pybtc/transaction.html#Transaction.json"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pybtc.Transaction.json" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get json transaction representation</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="pybtc.Transaction.serialize">
|
||
<code class="descname">serialize</code><span class="sig-paren">(</span><em>segwit=True</em>, <em>hex=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pybtc/transaction.html#Transaction.serialize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pybtc.Transaction.serialize" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get serialized transaction</p>
|
||
<table class="docutils field-list" frame="void" rules="none">
|
||
<col class="field-name" />
|
||
<col class="field-body" />
|
||
<tbody valign="top">
|
||
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
|
||
<li><strong>segwit</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.6)"><em>bool</em></a>) – (optional) flag for segwit representation of serialized transaction, by
|
||
default True.</li>
|
||
<li><strong>hex</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.6)"><em>bool</em></a>) – (optional) if set to True return HEX encoded string, by default True.</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr class="field-even field"><th class="field-name" colspan="2">Return str,bytes:</th></tr>
|
||
<tr class="field-even field"><td> </td><td class="field-body"><p class="first last">serialized transaction in HEX or bytes.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||
<div class="sphinxsidebarwrapper">
|
||
<p class="logo">
|
||
<a href="index.html">
|
||
<img class="logo" src="_static/pybtc.png" alt="Logo"/>
|
||
|
||
</a>
|
||
</p>
|
||
|
||
|
||
|
||
<p class="blurb"> </p>
|
||
|
||
|
||
|
||
|
||
<p>
|
||
<iframe src="https://ghbtns.com/github-btn.html?user=bitaps-com&repo=pybtc&type=watch&count=true&size=large&v=2"
|
||
allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
<h3>Navigation</h3>
|
||
<ul class="current">
|
||
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
|
||
<li class="toctree-l1 current"><a class="reference internal" href="classes.html">Reference</a><ul class="current">
|
||
<li class="toctree-l2"><a class="reference internal" href="address.html">Addresses</a></li>
|
||
<li class="toctree-l2 current"><a class="current reference internal" href="#">Transactions</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="block.html">Blocks</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="functional.html">Pure functions reference</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="contributing.html">Contributing</a></li>
|
||
</ul>
|
||
|
||
<div class="relations">
|
||
<h3>Related Topics</h3>
|
||
<ul>
|
||
<li><a href="index.html">Documentation overview</a><ul>
|
||
<li><a href="classes.html">Reference</a><ul>
|
||
<li>Previous: <a href="address.html" title="previous chapter">Addresses</a></li>
|
||
<li>Next: <a href="block.html" title="next chapter">Blocks</a></li>
|
||
</ul></li>
|
||
</ul></li>
|
||
</ul>
|
||
</div>
|
||
<div id="searchbox" style="display: none" role="search">
|
||
<h3>Quick search</h3>
|
||
<div class="searchformwrapper">
|
||
<form class="search" action="search.html" method="get">
|
||
<input type="text" name="q" />
|
||
<input type="submit" value="Go" />
|
||
<input type="hidden" name="check_keywords" value="yes" />
|
||
<input type="hidden" name="area" value="default" />
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||
</div>
|
||
</div>
|
||
<div class="clearer"></div>
|
||
</div>
|
||
<div class="footer">
|
||
©2015-2018, bitaps.com.
|
||
|
||
|
|
||
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.7.5</a>
|
||
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.11</a>
|
||
|
||
|
|
||
<a href="_sources/transaction.rst.txt"
|
||
rel="nofollow">Page source</a>
|
||
</div>
|
||
|
||
|
||
<a href="https://github.com/bitaps-com/pybtc" class="github">
|
||
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" class="github"/>
|
||
</a>
|
||
|
||
|
||
|
||
</body>
|
||
</html> |