http://opentransactions.org/wiki/index.php?title=Client-side_scripting&feed=atom&action=historyClient-side scripting - Revision history2024-03-29T12:10:00ZRevision history for this page on the wikiMediaWiki 1.32.2http://opentransactions.org/wiki/index.php?title=Client-side_scripting&diff=155&oldid=prevFellowTraveler: fixed API link2013-06-15T11:43:44Z<p>fixed API link</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 11:43, 15 June 2013</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l3" >Line 3:</td>
<td colspan="2" class="diff-lineno">Line 3:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>To make your own OT script, create a text file, and <code>chmod u+x filename</code> in order to be able to run it as an executable. Then put this shebang at the top of the file: <code>#!/usr/bin/env ot</code></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>To make your own OT script, create a text file, and <code>chmod u+x filename</code> in order to be able to run it as an executable. Then put this shebang at the top of the file: <code>#!/usr/bin/env ot</code></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Now you can run that file like any other executable, just type: <code>./filename</code> and the script will execute as an OT client, with full access to the <del class="diffchange diffchange-inline">OT </del>[[API|<del class="diffchange diffchange-inline">low-level API]] as well as the </del>OT <del class="diffchange diffchange-inline">[[Use Cases|high-level </del>API]].</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Now you can run that file like any other executable, just type: <code>./filename</code> and the script will execute as an OT client, with full access to the [[API|OT API]].</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>OT is easy! Even a trained monkey can write OT-based scripts and client applications! If you want to see how the high-level API is used, check out the [https://github.com/FellowTraveler/Open-Transactions/blob/master/scripts/ot/ot_commands.ot code for the opentxs CLI tool] for example functions demonstrating all of the OT functionality. (In fact, you can actually CALL all those functions from your own OT scripts.)</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>OT is easy! Even a trained monkey can write OT-based scripts and client applications! If you want to see how the high-level API is used, check out the [https://github.com/FellowTraveler/Open-Transactions/blob/master/scripts/ot/ot_commands.ot code for the opentxs CLI tool] for example functions demonstrating all of the OT functionality. (In fact, you can actually CALL all those functions from your own OT scripts.)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>See also: [[Smart contracts]]</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>See also: [[Smart contracts]]</div></td></tr>
</table>FellowTravelerhttp://opentransactions.org/wiki/index.php?title=Client-side_scripting&diff=93&oldid=prevCryptoman: Created page with "The ot script interpreter ("ot") has access to the entire OT Client API, including the low-level ''and'' high-level APIs. In fact, the opentxs command-li..."2013-06-11T19:52:45Z<p>Created page with "The ot script interpreter ("ot") has access to the entire OT Client API, including the low-level ''and'' high-level APIs. In fact, the <a href="/wiki/Opentxs" title="Opentxs">opentxs</a> command-li..."</p>
<p><b>New page</b></p><div>The ot script interpreter (&quot;ot&quot;) has access to the entire OT Client API, including the low-level ''and'' high-level APIs. In fact, the [[Opentxs|opentxs]] command-line tool itself is written in ot script, just like any other script.<br />
<br />
To make your own OT script, create a text file, and <code>chmod u+x filename</code> in order to be able to run it as an executable. Then put this shebang at the top of the file: <code>#!/usr/bin/env ot</code><br />
<br />
Now you can run that file like any other executable, just type: <code>./filename</code> and the script will execute as an OT client, with full access to the OT [[API|low-level API]] as well as the OT [[Use Cases|high-level API]].<br />
<br />
OT is easy! Even a trained monkey can write OT-based scripts and client applications! If you want to see how the high-level API is used, check out the [https://github.com/FellowTraveler/Open-Transactions/blob/master/scripts/ot/ot_commands.ot code for the opentxs CLI tool] for example functions demonstrating all of the OT functionality. (In fact, you can actually CALL all those functions from your own OT scripts.)<br />
<br />
See also: [[Smart contracts]]</div>Cryptoman