Skip to content

Commit

Permalink
Merge pull request #44 from logicalmechanism/candidate-for-v0.4.0
Browse files Browse the repository at this point in the history
candidate for v0.4.0
  • Loading branch information
logicalmechanism authored Dec 28, 2023
2 parents ca49d0e + f359e90 commit 4dcec81
Show file tree
Hide file tree
Showing 38 changed files with 1,840 additions and 295 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# v0.4.0

*This version is contains breaking changes.*

- General data types from assist are now used in function definitions. See `types.ak`.
- Refactored how assist types are used in functions.
- `from_wallet` and `from_token` are now in addresses and values respectively.
- Added `is_spending_input` to check if an output reference is being spent.
- `total_token_amount` is moved to `tx.ak` and refactored.
- Fail messages are more specific to the function.
- All `&&` and `||` are now `and` and `or`.
- Added `metadata` to find data from a cip68 metadatum type.

# v0.3.4

- Improved the counting functions to account for datum hashes.
Expand Down
4 changes: 2 additions & 2 deletions aiken.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "aiken-lang/assist"
version = "0.3.4"
name = "logicalmechanism/assist"
version = "0.4.0"
license = "Apache-2.0"
description = "Aiken Assist Library"

Expand Down
51 changes: 38 additions & 13 deletions docs/assist/addresses.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>assist/addresses - aiken-lang/assist</title>
<title>assist/addresses - logicalmechanism/assist</title>
<meta name="theme-color" content="#eff1f5" media="(prefers-color-scheme: light)"/>
<meta name="theme-color" content="#1e1e2e" media="(prefers-color-scheme: dark)"/>
<link rel="icon" type="image/svg+xml" sizes="any" href="../favicon.svg"/>
Expand Down Expand Up @@ -120,13 +120,13 @@
<h2>
<a href="../">assist</a>
<span id="project-version">
<span>v0.3.4 </span>
<span>v0.4.0 </span>
</span>
<script>
"use strict";

if ("undefined" !== typeof versionNodes) {
const currentVersion = "v0.3.4";
const currentVersion = "v0.4.0";
if (! versionNodes.find(element => element.version === currentVersion)) {
versionNodes.unshift({ version: currentVersion, url: "#" });
}
Expand Down Expand Up @@ -274,6 +274,18 @@ <h2>Modules</h2>

</a></li>

<li><a href="../assist/tx.html">

assist/tx

</a></li>

<li><a href="../assist/types.html">

assist/types

</a></li>

<li><a href="../assist/values.html">

assist/values
Expand Down Expand Up @@ -301,6 +313,8 @@ <h2>Functions</h2>

<li><a href="#create_script_address">create_script_address</a></li>

<li><a href="#from_wallet">from_wallet</a></li>

</ul>


Expand Down Expand Up @@ -328,10 +342,7 @@ <h1 id="module-functions" class="module-member-kind">

<div class="member">
<div class="member-name">
<h2 id="create_address"><pre class="hljs language-aiken">create_address(
pkh: Hash&lt;Blake2b_224, VerificationKey&gt;,
sc: Hash&lt;Blake2b_224, VerificationKey&gt;,
) -&gt; Address</pre></h2>
<h2 id="create_address"><pre class="hljs language-aiken">create_address(pkh: PublicKeyHash, sc: PublicKeyHash) -&gt; Address</pre></h2>

<!-- TODO: support source linking
<a class="member-source" alt="View Source" title="View Source" href="#todo">
Expand All @@ -349,10 +360,7 @@ <h2 id="create_address"><pre class="hljs language-aiken">create_address(

<div class="member">
<div class="member-name">
<h2 id="create_script_address"><pre class="hljs language-aiken">create_script_address(
pkh: Hash&lt;Blake2b_224, Script&gt;,
sc: Hash&lt;Blake2b_224, Script&gt;,
) -&gt; Address</pre></h2>
<h2 id="create_script_address"><pre class="hljs language-aiken">create_script_address(pkh: ValidatorHash, sc: ValidatorHash) -&gt; Address</pre></h2>

<!-- TODO: support source linking
<a class="member-source" alt="View Source" title="View Source" href="#todo">
Expand All @@ -366,6 +374,23 @@ <h2 id="create_script_address"><pre class="hljs language-aiken">create_script_ad
assumed to be not staked.</p>
<pre><code class="language-aiken">addresses.create_script_address(datum.script.pkh, datum.script.sc)
</code></pre>
</div>
</div>

<div class="member">
<div class="member-name">
<h2 id="from_wallet"><pre class="hljs language-aiken">from_wallet(wallet: Wallet) -&gt; Address</pre></h2>

<!-- TODO: support source linking
<a class="member-source" alt="View Source" title="View Source" href="#todo">
&lt;/&gt;
</a>
-->

</div>
<div class="rendered-markdown"><p>Creates an address from the wallet type.</p>
<pre><code class="language-aiken">let addr: Address = types.from_wallet(this_wallet)
</code></pre>
</div>
</div>

Expand Down Expand Up @@ -442,8 +467,8 @@ <h2 id="create_script_address"><pre class="hljs language-aiken">create_script_ad
});
</script>
<script src="../js/lunr.min.js?v=1.0.21-alpha"></script>
<script src="../js/index.js?v=1702994576"></script>
<script src="../js/index.js?v=1703789625"></script>
<!-- Load the search index using JSONP to avoid CORS issues -->
<script src="../search-data.js?v=1702994576"></script>
<script src="../search-data.js?v=1703789625"></script>
</body>
</html>
22 changes: 17 additions & 5 deletions docs/assist/boolean.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>assist/boolean - aiken-lang/assist</title>
<title>assist/boolean - logicalmechanism/assist</title>
<meta name="theme-color" content="#eff1f5" media="(prefers-color-scheme: light)"/>
<meta name="theme-color" content="#1e1e2e" media="(prefers-color-scheme: dark)"/>
<link rel="icon" type="image/svg+xml" sizes="any" href="../favicon.svg"/>
Expand Down Expand Up @@ -120,13 +120,13 @@
<h2>
<a href="../">assist</a>
<span id="project-version">
<span>v0.3.4 </span>
<span>v0.4.0 </span>
</span>
<script>
"use strict";

if ("undefined" !== typeof versionNodes) {
const currentVersion = "v0.3.4";
const currentVersion = "v0.4.0";
if (! versionNodes.find(element => element.version === currentVersion)) {
versionNodes.unshift({ version: currentVersion, url: "#" });
}
Expand Down Expand Up @@ -274,6 +274,18 @@ <h2>Modules</h2>

</a></li>

<li><a href="../assist/tx.html">

assist/tx

</a></li>

<li><a href="../assist/types.html">

assist/types

</a></li>

<li><a href="../assist/values.html">

assist/values
Expand Down Expand Up @@ -554,8 +566,8 @@ <h2 id="xor_"><pre class="hljs language-aiken">xor_(x: Int, y: Int) -&gt; Int</p
});
</script>
<script src="../js/lunr.min.js?v=1.0.21-alpha"></script>
<script src="../js/index.js?v=1702994576"></script>
<script src="../js/index.js?v=1703789625"></script>
<!-- Load the search index using JSONP to avoid CORS issues -->
<script src="../search-data.js?v=1702994576"></script>
<script src="../search-data.js?v=1703789625"></script>
</body>
</html>
27 changes: 18 additions & 9 deletions docs/assist/certificates.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>assist/certificates - aiken-lang/assist</title>
<title>assist/certificates - logicalmechanism/assist</title>
<meta name="theme-color" content="#eff1f5" media="(prefers-color-scheme: light)"/>
<meta name="theme-color" content="#1e1e2e" media="(prefers-color-scheme: dark)"/>
<link rel="icon" type="image/svg+xml" sizes="any" href="../favicon.svg"/>
Expand Down Expand Up @@ -120,13 +120,13 @@
<h2>
<a href="../">assist</a>
<span id="project-version">
<span>v0.3.4 </span>
<span>v0.4.0 </span>
</span>
<script>
"use strict";

if ("undefined" !== typeof versionNodes) {
const currentVersion = "v0.3.4";
const currentVersion = "v0.4.0";
if (! versionNodes.find(element => element.version === currentVersion)) {
versionNodes.unshift({ version: currentVersion, url: "#" });
}
Expand Down Expand Up @@ -274,6 +274,18 @@ <h2>Modules</h2>

</a></li>

<li><a href="../assist/tx.html">

assist/tx

</a></li>

<li><a href="../assist/types.html">

assist/types

</a></li>

<li><a href="../assist/values.html">

assist/values
Expand Down Expand Up @@ -325,10 +337,7 @@ <h1 id="module-functions" class="module-member-kind">

<div class="member">
<div class="member-name">
<h2 id="create_credential_delegation"><pre class="hljs language-aiken">create_credential_delegation(
sc: Hash&lt;Blake2b_224, Script&gt;,
pool_id: PoolId,
) -&gt; Certificate</pre></h2>
<h2 id="create_credential_delegation"><pre class="hljs language-aiken">create_credential_delegation(sc: ValidatorHash, pool_id: PoolId) -&gt; Certificate</pre></h2>

<!-- TODO: support source linking
<a class="member-source" alt="View Source" title="View Source" href="#todo">
Expand Down Expand Up @@ -418,8 +427,8 @@ <h2 id="create_credential_delegation"><pre class="hljs language-aiken">create_cr
});
</script>
<script src="../js/lunr.min.js?v=1.0.21-alpha"></script>
<script src="../js/index.js?v=1702994576"></script>
<script src="../js/index.js?v=1703789625"></script>
<!-- Load the search index using JSONP to avoid CORS issues -->
<script src="../search-data.js?v=1702994576"></script>
<script src="../search-data.js?v=1703789625"></script>
</body>
</html>
22 changes: 17 additions & 5 deletions docs/assist/circuits.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>assist/circuits - aiken-lang/assist</title>
<title>assist/circuits - logicalmechanism/assist</title>
<meta name="theme-color" content="#eff1f5" media="(prefers-color-scheme: light)"/>
<meta name="theme-color" content="#1e1e2e" media="(prefers-color-scheme: dark)"/>
<link rel="icon" type="image/svg+xml" sizes="any" href="../favicon.svg"/>
Expand Down Expand Up @@ -120,13 +120,13 @@
<h2>
<a href="../">assist</a>
<span id="project-version">
<span>v0.3.4 </span>
<span>v0.4.0 </span>
</span>
<script>
"use strict";

if ("undefined" !== typeof versionNodes) {
const currentVersion = "v0.3.4";
const currentVersion = "v0.4.0";
if (! versionNodes.find(element => element.version === currentVersion)) {
versionNodes.unshift({ version: currentVersion, url: "#" });
}
Expand Down Expand Up @@ -274,6 +274,18 @@ <h2>Modules</h2>

</a></li>

<li><a href="../assist/tx.html">

assist/tx

</a></li>

<li><a href="../assist/types.html">

assist/types

</a></li>

<li><a href="../assist/values.html">

assist/values
Expand Down Expand Up @@ -546,8 +558,8 @@ <h2 id="xor_"><pre class="hljs language-aiken">xor_(x: Int, y: Int, p: Int) -&gt
});
</script>
<script src="../js/lunr.min.js?v=1.0.21-alpha"></script>
<script src="../js/index.js?v=1702994576"></script>
<script src="../js/index.js?v=1703789625"></script>
<!-- Load the search index using JSONP to avoid CORS issues -->
<script src="../search-data.js?v=1702994576"></script>
<script src="../search-data.js?v=1703789625"></script>
</body>
</html>
22 changes: 17 additions & 5 deletions docs/assist/count.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>assist/count - aiken-lang/assist</title>
<title>assist/count - logicalmechanism/assist</title>
<meta name="theme-color" content="#eff1f5" media="(prefers-color-scheme: light)"/>
<meta name="theme-color" content="#1e1e2e" media="(prefers-color-scheme: dark)"/>
<link rel="icon" type="image/svg+xml" sizes="any" href="../favicon.svg"/>
Expand Down Expand Up @@ -120,13 +120,13 @@
<h2>
<a href="../">assist</a>
<span id="project-version">
<span>v0.3.4 </span>
<span>v0.4.0 </span>
</span>
<script>
"use strict";

if ("undefined" !== typeof versionNodes) {
const currentVersion = "v0.3.4";
const currentVersion = "v0.4.0";
if (! versionNodes.find(element => element.version === currentVersion)) {
versionNodes.unshift({ version: currentVersion, url: "#" });
}
Expand Down Expand Up @@ -274,6 +274,18 @@ <h2>Modules</h2>

</a></li>

<li><a href="../assist/tx.html">

assist/tx

</a></li>

<li><a href="../assist/types.html">

assist/types

</a></li>

<li><a href="../assist/values.html">

assist/values
Expand Down Expand Up @@ -474,8 +486,8 @@ <h2 id="outputs_by_datum"><pre class="hljs language-aiken">outputs_by_datum(outp
});
</script>
<script src="../js/lunr.min.js?v=1.0.21-alpha"></script>
<script src="../js/index.js?v=1702994576"></script>
<script src="../js/index.js?v=1703789625"></script>
<!-- Load the search index using JSONP to avoid CORS issues -->
<script src="../search-data.js?v=1702994576"></script>
<script src="../search-data.js?v=1703789625"></script>
</body>
</html>
Loading

0 comments on commit 4dcec81

Please sign in to comment.