Skip to content

Commit

Permalink
Merge pull request #85 from logicalmechanism/candidate-for-v0.4.8
Browse files Browse the repository at this point in the history
candidate v0.4.8; massive changes but required for better use and flo…
  • Loading branch information
logicalmechanism authored Apr 8, 2024
2 parents 021dee2 + e2664c5 commit 73b2652
Show file tree
Hide file tree
Showing 27 changed files with 123 additions and 131 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# v0.x.y

# v0.4.8

*This version is contains breaking changes.*

- Updating documentation
- Functions should be curryable, f |> g |> h. An updated list of functions are below.
- values.contains
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To start using the library, follow these steps:
```toml
[[dependencies]]
name = "logicalmechanism/assist"
version = "v0.4.7"
version = "v0.4.8"
source = "github"
```

Expand Down
2 changes: 1 addition & 1 deletion aiken.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "logicalmechanism/assist"
version = "0.4.7"
version = "0.4.8"
license = "Apache-2.0"
description = "Aiken Assist Library"

Expand Down
25 changes: 17 additions & 8 deletions docs/assist/addresses.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@
<h2>
<a href="../">assist</a>
<span id="project-version">
<span>v0.4.7 </span>
<span>v0.4.8 </span>
</span>
<script>
"use strict";

if ("undefined" !== typeof versionNodes) {
const currentVersion = "v0.4.7";
const currentVersion = "v0.4.8";
if (! versionNodes.find(element => element.version === currentVersion)) {
versionNodes.unshift({ version: currentVersion, url: "#" });
}
Expand Down Expand Up @@ -353,7 +353,9 @@ <h1 id="module-name" class="module-name">
</h1>
<p>This module incorporates code for generating valid wallet and script
addresses, ensuring their correctness. Empty keys are treated as
intentional, and address subtypes are not combined nor mixed.</p>
intentional, and address subtypes are not combined nor mixed. The key
lengths must be validated on their own as these functions are used to
just generate Address types assuming valid key lengths.</p>



Expand All @@ -379,7 +381,10 @@ <h2 id="create_address"><pre class="hljs language-aiken">create_address(pkh: Pub
</div>
<div class="rendered-markdown"><p>Creates a enterprise or base address from the public key hash and stake
credential. An empty sc means enterpise address by default. This function
assumes proper key lengths for <code>pkh</code> and <code>sc</code>.</p>
assumes proper key lengths for <code>pkh</code> and <code>sc</code>. Again, this function does not
check if the stake credential has a proper length. Address
types should be generated from the Wallet type so proper length checks are
done with the <code>wallet.is_valid</code> function.</p>
<pre><code class="language-aiken">addresses.create_address(datum.wallet.pkh, datum.wallet.sc)
</code></pre>
</div>
Expand All @@ -399,7 +404,9 @@ <h2 id="create_script_address"><pre class="hljs language-aiken">create_script_ad
<div class="rendered-markdown"><p>Creates a script address for a smart contract. The type does not mix address
types. Staked smart contracts are contracts as well. An empty sc is
assumed to be not staked. This function assumes proper key lengths for <code>vkh</code>
and <code>sc</code>.</p>
and <code>sc</code>. Again, this function does not check if the stake credential has a
proper length. Address types should be generated from the Wallet type so
proper length checks are done with the <code>wallet.is_valid</code> function.</p>
<pre><code class="language-aiken">addresses.create_script_address(datum.script.vkh, datum.script.sc)
</code></pre>
</div>
Expand All @@ -416,7 +423,9 @@ <h2 id="from_wallet"><pre class="hljs language-aiken">from_wallet(wallet: Wallet
-->

</div>
<div class="rendered-markdown"><p>Creates an address from the wallet type.</p>
<div class="rendered-markdown"><p>Creates an address from the Wallet type. This should be used primairly for
creating an address as the Wallet type has a <code>is_valid</code> function that should
be used in the same validaiton.</p>
<pre><code class="language-aiken">let addr: Address = types.from_wallet(this_wallet)
</code></pre>
</div>
Expand Down Expand Up @@ -495,8 +504,8 @@ <h2 id="from_wallet"><pre class="hljs language-aiken">from_wallet(wallet: Wallet
});
</script>
<script src="../js/lunr.min.js?v=1.0.26-alpha"></script>
<script src="../js/index.js?v=1712004235"></script>
<script src="../js/index.js?v=1712611119"></script>
<!-- Load the search index using JSONP to avoid CORS issues -->
<script src="../search-data.js?v=1712004235"></script>
<script src="../search-data.js?v=1712611119"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions docs/assist/boolean.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@
<h2>
<a href="../">assist</a>
<span id="project-version">
<span>v0.4.7 </span>
<span>v0.4.8 </span>
</span>
<script>
"use strict";

if ("undefined" !== typeof versionNodes) {
const currentVersion = "v0.4.7";
const currentVersion = "v0.4.8";
if (! versionNodes.find(element => element.version === currentVersion)) {
versionNodes.unshift({ version: currentVersion, url: "#" });
}
Expand Down Expand Up @@ -592,8 +592,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.26-alpha"></script>
<script src="../js/index.js?v=1712004235"></script>
<script src="../js/index.js?v=1712611119"></script>
<!-- Load the search index using JSONP to avoid CORS issues -->
<script src="../search-data.js?v=1712004235"></script>
<script src="../search-data.js?v=1712611119"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions docs/assist/certificates.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@
<h2>
<a href="../">assist</a>
<span id="project-version">
<span>v0.4.7 </span>
<span>v0.4.8 </span>
</span>
<script>
"use strict";

if ("undefined" !== typeof versionNodes) {
const currentVersion = "v0.4.7";
const currentVersion = "v0.4.8";
if (! versionNodes.find(element => element.version === currentVersion)) {
versionNodes.unshift({ version: currentVersion, url: "#" });
}
Expand Down Expand Up @@ -453,8 +453,8 @@ <h2 id="create_credential_delegation"><pre class="hljs language-aiken">create_cr
});
</script>
<script src="../js/lunr.min.js?v=1.0.26-alpha"></script>
<script src="../js/index.js?v=1712004235"></script>
<script src="../js/index.js?v=1712611119"></script>
<!-- Load the search index using JSONP to avoid CORS issues -->
<script src="../search-data.js?v=1712004235"></script>
<script src="../search-data.js?v=1712611119"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions docs/assist/circuits.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@
<h2>
<a href="../">assist</a>
<span id="project-version">
<span>v0.4.7 </span>
<span>v0.4.8 </span>
</span>
<script>
"use strict";

if ("undefined" !== typeof versionNodes) {
const currentVersion = "v0.4.7";
const currentVersion = "v0.4.8";
if (! versionNodes.find(element => element.version === currentVersion)) {
versionNodes.unshift({ version: currentVersion, url: "#" });
}
Expand Down Expand Up @@ -584,8 +584,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.26-alpha"></script>
<script src="../js/index.js?v=1712004235"></script>
<script src="../js/index.js?v=1712611119"></script>
<!-- Load the search index using JSONP to avoid CORS issues -->
<script src="../search-data.js?v=1712004235"></script>
<script src="../search-data.js?v=1712611119"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions docs/assist/count.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@
<h2>
<a href="../">assist</a>
<span id="project-version">
<span>v0.4.7 </span>
<span>v0.4.8 </span>
</span>
<script>
"use strict";

if ("undefined" !== typeof versionNodes) {
const currentVersion = "v0.4.7";
const currentVersion = "v0.4.8";
if (! versionNodes.find(element => element.version === currentVersion)) {
versionNodes.unshift({ version: currentVersion, url: "#" });
}
Expand Down Expand Up @@ -579,8 +579,8 @@ <h2 id="single_input_with_bypass"><pre class="hljs language-aiken">single_input_
});
</script>
<script src="../js/lunr.min.js?v=1.0.26-alpha"></script>
<script src="../js/index.js?v=1712004235"></script>
<script src="../js/index.js?v=1712611119"></script>
<!-- Load the search index using JSONP to avoid CORS issues -->
<script src="../search-data.js?v=1712004235"></script>
<script src="../search-data.js?v=1712611119"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions docs/assist/credentials.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@
<h2>
<a href="../">assist</a>
<span id="project-version">
<span>v0.4.7 </span>
<span>v0.4.8 </span>
</span>
<script>
"use strict";

if ("undefined" !== typeof versionNodes) {
const currentVersion = "v0.4.7";
const currentVersion = "v0.4.8";
if (! versionNodes.find(element => element.version === currentVersion)) {
versionNodes.unshift({ version: currentVersion, url: "#" });
}
Expand Down Expand Up @@ -453,8 +453,8 @@ <h2 id="create_stake_credential"><pre class="hljs language-aiken">create_stake_c
});
</script>
<script src="../js/lunr.min.js?v=1.0.26-alpha"></script>
<script src="../js/index.js?v=1712004235"></script>
<script src="../js/index.js?v=1712611119"></script>
<!-- Load the search index using JSONP to avoid CORS issues -->
<script src="../search-data.js?v=1712004235"></script>
<script src="../search-data.js?v=1712611119"></script>
</body>
</html>
29 changes: 4 additions & 25 deletions docs/assist/data.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@
<h2>
<a href="../">assist</a>
<span id="project-version">
<span>v0.4.7 </span>
<span>v0.4.8 </span>
</span>
<script>
"use strict";

if ("undefined" !== typeof versionNodes) {
const currentVersion = "v0.4.7";
const currentVersion = "v0.4.8";
if (! versionNodes.find(element => element.version === currentVersion)) {
versionNodes.unshift({ version: currentVersion, url: "#" });
}
Expand Down Expand Up @@ -339,8 +339,6 @@ <h2>Functions</h2>

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

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

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

<li><a href="#output_datum_by_hash">output_datum_by_hash</a></li>
Expand Down Expand Up @@ -409,25 +407,6 @@ <h2 id="input_datum_by_hash"><pre class="hljs language-aiken">input_datum_by_has
</div>
</div>

<div class="member">
<div class="member-name">
<h2 id="metadata"><pre class="hljs language-aiken">metadata(metadata: Dict&lt;Data, Data&gt;, key: Data) -&gt; Data</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>Find some data from the metadata or fail. The key and value can be
arbitrary data. This function is designed to work on the CIP68 generic
type.</p>
<pre><code class="language-aiken">expect datum: Data = data.metadata(cip68.metadatum, datum.data_key)
</code></pre>
</div>
</div>

<div class="member">
<div class="member-name">
<h2 id="output_datum"><pre class="hljs language-aiken">output_datum(possible_output: Output) -&gt; Data</pre></h2>
Expand Down Expand Up @@ -540,8 +519,8 @@ <h2 id="output_datum_by_hash"><pre class="hljs language-aiken">output_datum_by_h
});
</script>
<script src="../js/lunr.min.js?v=1.0.26-alpha"></script>
<script src="../js/index.js?v=1712004235"></script>
<script src="../js/index.js?v=1712611119"></script>
<!-- Load the search index using JSONP to avoid CORS issues -->
<script src="../search-data.js?v=1712004235"></script>
<script src="../search-data.js?v=1712611119"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions docs/assist/find.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@
<h2>
<a href="../">assist</a>
<span id="project-version">
<span>v0.4.7 </span>
<span>v0.4.8 </span>
</span>
<script>
"use strict";

if ("undefined" !== typeof versionNodes) {
const currentVersion = "v0.4.7";
const currentVersion = "v0.4.8";
if (! versionNodes.find(element => element.version === currentVersion)) {
versionNodes.unshift({ version: currentVersion, url: "#" });
}
Expand Down Expand Up @@ -711,8 +711,8 @@ <h2 id="stake_reward_by_sc"><pre class="hljs language-aiken">stake_reward_by_sc(
});
</script>
<script src="../js/lunr.min.js?v=1.0.26-alpha"></script>
<script src="../js/index.js?v=1712004235"></script>
<script src="../js/index.js?v=1712611119"></script>
<!-- Load the search index using JSONP to avoid CORS issues -->
<script src="../search-data.js?v=1712004235"></script>
<script src="../search-data.js?v=1712611119"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions docs/assist/maths.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@
<h2>
<a href="../">assist</a>
<span id="project-version">
<span>v0.4.7 </span>
<span>v0.4.8 </span>
</span>
<script>
"use strict";

if ("undefined" !== typeof versionNodes) {
const currentVersion = "v0.4.7";
const currentVersion = "v0.4.8";
if (! versionNodes.find(element => element.version === currentVersion)) {
versionNodes.unshift({ version: currentVersion, url: "#" });
}
Expand Down Expand Up @@ -746,8 +746,8 @@ <h2 id="to_int"><pre class="hljs language-aiken">to_int(self: ByteArray) -&gt; I
});
</script>
<script src="../js/lunr.min.js?v=1.0.26-alpha"></script>
<script src="../js/index.js?v=1712004235"></script>
<script src="../js/index.js?v=1712611119"></script>
<!-- Load the search index using JSONP to avoid CORS issues -->
<script src="../search-data.js?v=1712004235"></script>
<script src="../search-data.js?v=1712611119"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions docs/assist/minting.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@
<h2>
<a href="../">assist</a>
<span id="project-version">
<span>v0.4.7 </span>
<span>v0.4.8 </span>
</span>
<script>
"use strict";

if ("undefined" !== typeof versionNodes) {
const currentVersion = "v0.4.7";
const currentVersion = "v0.4.8";
if (! versionNodes.find(element => element.version === currentVersion)) {
versionNodes.unshift({ version: currentVersion, url: "#" });
}
Expand Down Expand Up @@ -512,8 +512,8 @@ <h2 id="is_occurring"><pre class="hljs language-aiken">is_occurring(
});
</script>
<script src="../js/lunr.min.js?v=1.0.26-alpha"></script>
<script src="../js/index.js?v=1712004235"></script>
<script src="../js/index.js?v=1712611119"></script>
<!-- Load the search index using JSONP to avoid CORS issues -->
<script src="../search-data.js?v=1712004235"></script>
<script src="../search-data.js?v=1712611119"></script>
</body>
</html>
Loading

0 comments on commit 73b2652

Please sign in to comment.