Skip to content

Commit

Permalink
deploy: 05f8644
Browse files Browse the repository at this point in the history
  • Loading branch information
bitzoic committed Oct 25, 2024
1 parent 0f04f55 commit 2c05655
Show file tree
Hide file tree
Showing 27 changed files with 269 additions and 38 deletions.
2 changes: 1 addition & 1 deletion master/search.js

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions master/std/all.html

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions master/std/auth/fn.caller_addresses.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="swaydoc"><meta name="description" content="API documentation for the Sway `caller_addresses` function in `auth`."><meta name="keywords" content="sway, swaylang, sway-lang, caller_addresses"><link rel="icon" href="../../static.files/sway-logo.svg"><title>caller_addresses in auth - Sway</title><link rel="stylesheet" type="text/css" href="../../static.files/normalize.css"><link rel="stylesheet" type="text/css" href="../../static.files/swaydoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../static.files/ayu.css"><link rel="stylesheet" href="../../static.files/ayu.min.css"></head><body class="swaydoc fn"><nav class="sidebar"><a class="sidebar-logo" href="../../std/index.html"><div class="logo-container"><img class="sway-logo" src="../../static.files/sway-logo.svg" alt="logo"></div></a><h2 class="location">Function caller_addresses</h2><div class="sidebar-elems"></div></nav><main><div class="width-limiter"><script src="../../search.js" type="text/javascript"></script><script>function onSearchFormSubmit(event){event.preventDefault();const searchQuery=document.getElementById("search-input").value;const url=new URL(window.location.href);if(searchQuery){url.searchParams.set('search',searchQuery)}else{url.searchParams.delete('search')}history.pushState({search:searchQuery},"",url);window.dispatchEvent(new HashChangeEvent("hashchange"))}document.addEventListener('DOMContentLoaded',()=>{const searchbar=document.getElementById("search-input");const searchForm=document.getElementById("search-form");searchbar.addEventListener("keyup",function(event){onSearchFormSubmit(event)});searchbar.addEventListener("search",function(event){onSearchFormSubmit(event)});function onQueryParamsChange(){const searchParams=new URLSearchParams(window.location.search);const query=searchParams.get("search");const searchSection=document.getElementById('search');const mainSection=document.getElementById('main-content');const searchInput=document.getElementById('search-input');if(query){searchInput.value=query;const results=Object.values(SEARCH_INDEX).flat().filter(item=>{const lowerQuery=query.toLowerCase();return item.name.toLowerCase().includes(lowerQuery)});const header=`<h1>Results for ${query}</h1>`;if(results.length>0){const resultList=results.map(item=>{const formattedName=`<span class="type ${item.type_name}">${item.name}</span>`;const name=[...item.module_info,formattedName].join("::");const path=["../..",...item.module_info,item.html_filename].join("/");const left=`<td><span>${name}</span></td>`;const right=`<td><p>${item.preview}</p></td>`;return`<tr onclick="window.location='${path}';">${left}${right}</tr>`}).join('');searchSection.innerHTML=`${header}<table>${resultList}</table>`}else{searchSection.innerHTML=`${header}<p>No results found.</p>`}searchSection.setAttribute("class","search-results");mainSection.setAttribute("class","content hidden")}else{searchSection.setAttribute("class","search-results hidden");mainSection.setAttribute("class","content")}}window.addEventListener('hashchange',onQueryParamsChange);onQueryParamsChange()})</script><nav class="sub"><form id="search-form" class="search-form" onsubmit="onSearchFormSubmit(event)"><div class="search-container"><input id="search-input" class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Search the docs..." type="search"></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a class="mod" href="../index.html">std</a><span>::</span><a class="mod" href="index.html">auth</a><span>::</span><a class="fn" href="#">caller_addresses</a></span></h1></div><div class="docblock item-decl"><pre class="sway fn"><code>pub fn caller_addresses() -&gt; Vec&lt;Address&gt; </code></pre></div><details class="swaydoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Get the owners of the inputs (of type <code>Input::Coin</code> or <code>Input::Message</code>) to a<br />
<code>TransactionScript</code>.</p>
<h1>Additional Information</h1>
<p>The list is not deduplicated, so there may be repeated addresses in the returned vector.</p>
<h1>Returns</h1>
<ul>
<li>[Vec<!-- raw HTML omitted -->] - The addresses of the owners of the inputs.</li>
</ul>
<h1>Examples</h1>
<pre><code class="language-sway">use std::auth::caller_addresses;

fn foo(some_address: Address) {
let addresses = caller_addresses();

assert(addresses.get(0).unwrap() == some_address);
}
</code></pre>
</div></details></section><section id="search" class="search-results"></section></div></main><script src="../../static.files/highlight.js"></script><script>hljs.highlightAll();</script></body></html>
4 changes: 2 additions & 2 deletions master/std/auth/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="swaydoc"><meta name="description" content="API documentation for the Sway `auth` module in `std`."><meta name="keywords" content="sway, swaylang, sway-lang, auth"><link rel="icon" href="../../static.files/sway-logo.svg"><title>auth in std - Sway</title><link rel="stylesheet" type="text/css" href="../../static.files/normalize.css"><link rel="stylesheet" type="text/css" href="../../static.files/swaydoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../static.files/ayu.css"><link rel="stylesheet" href="../../static.files/ayu.min.css"></head><body class="swaydoc mod"><nav class="sidebar"><a class="sidebar-logo" href="../../std/index.html"><div class="logo-container"><img class="sway-logo" src="../../static.files/sway-logo.svg" alt="logo"></div></a><h2 class="location">Module auth</h2><div class="sidebar-elems"><section><h3><a href="#enums">Enums</a></h3><ul class="block method"><li><a href="enum.AuthError.html">AuthError</a></li></ul></section><section><h3><a href="#functions">Functions</a></h3><ul class="block method"><li><a href="fn.caller_is_external.html">caller_is_external</a></li><li><a href="fn.caller_contract_id.html">caller_contract_id</a></li><li><a href="fn.caller_address.html">caller_address</a></li><li><a href="fn.msg_sender.html">msg_sender</a></li><li><a href="fn.predicate_address.html">predicate_address</a></li></ul></section></div></nav><main><div class="width-limiter"><script src="../../search.js" type="text/javascript"></script><script>function onSearchFormSubmit(event){event.preventDefault();const searchQuery=document.getElementById("search-input").value;const url=new URL(window.location.href);if(searchQuery){url.searchParams.set('search',searchQuery)}else{url.searchParams.delete('search')}history.pushState({search:searchQuery},"",url);window.dispatchEvent(new HashChangeEvent("hashchange"))}document.addEventListener('DOMContentLoaded',()=>{const searchbar=document.getElementById("search-input");const searchForm=document.getElementById("search-form");searchbar.addEventListener("keyup",function(event){onSearchFormSubmit(event)});searchbar.addEventListener("search",function(event){onSearchFormSubmit(event)});function onQueryParamsChange(){const searchParams=new URLSearchParams(window.location.search);const query=searchParams.get("search");const searchSection=document.getElementById('search');const mainSection=document.getElementById('main-content');const searchInput=document.getElementById('search-input');if(query){searchInput.value=query;const results=Object.values(SEARCH_INDEX).flat().filter(item=>{const lowerQuery=query.toLowerCase();return item.name.toLowerCase().includes(lowerQuery)});const header=`<h1>Results for ${query}</h1>`;if(results.length>0){const resultList=results.map(item=>{const formattedName=`<span class="type ${item.type_name}">${item.name}</span>`;const name=[...item.module_info,formattedName].join("::");const path=["../..",...item.module_info,item.html_filename].join("/");const left=`<td><span>${name}</span></td>`;const right=`<td><p>${item.preview}</p></td>`;return`<tr onclick="window.location='${path}';">${left}${right}</tr>`}).join('');searchSection.innerHTML=`${header}<table>${resultList}</table>`}else{searchSection.innerHTML=`${header}<p>No results found.</p>`}searchSection.setAttribute("class","search-results");mainSection.setAttribute("class","content hidden")}else{searchSection.setAttribute("class","search-results hidden");mainSection.setAttribute("class","content")}}window.addEventListener('hashchange',onQueryParamsChange);onQueryParamsChange()})</script><nav class="sub"><form id="search-form" class="search-form" onsubmit="onSearchFormSubmit(event)"><div class="search-container"><input id="search-input" class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Search the docs..." type="search"></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Module <a class="mod" href="../index.html">std</a><span>::</span><a class="mod" href="#">auth</a></span></h1></div><details class="swaydoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Functionality for determining who is calling a contract.</p>
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="swaydoc"><meta name="description" content="API documentation for the Sway `auth` module in `std`."><meta name="keywords" content="sway, swaylang, sway-lang, auth"><link rel="icon" href="../../static.files/sway-logo.svg"><title>auth in std - Sway</title><link rel="stylesheet" type="text/css" href="../../static.files/normalize.css"><link rel="stylesheet" type="text/css" href="../../static.files/swaydoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../static.files/ayu.css"><link rel="stylesheet" href="../../static.files/ayu.min.css"></head><body class="swaydoc mod"><nav class="sidebar"><a class="sidebar-logo" href="../../std/index.html"><div class="logo-container"><img class="sway-logo" src="../../static.files/sway-logo.svg" alt="logo"></div></a><h2 class="location">Module auth</h2><div class="sidebar-elems"><section><h3><a href="#enums">Enums</a></h3><ul class="block method"><li><a href="enum.AuthError.html">AuthError</a></li></ul></section><section><h3><a href="#functions">Functions</a></h3><ul class="block method"><li><a href="fn.caller_is_external.html">caller_is_external</a></li><li><a href="fn.caller_contract_id.html">caller_contract_id</a></li><li><a href="fn.caller_address.html">caller_address</a></li><li><a href="fn.msg_sender.html">msg_sender</a></li><li><a href="fn.caller_addresses.html">caller_addresses</a></li><li><a href="fn.predicate_address.html">predicate_address</a></li></ul></section></div></nav><main><div class="width-limiter"><script src="../../search.js" type="text/javascript"></script><script>function onSearchFormSubmit(event){event.preventDefault();const searchQuery=document.getElementById("search-input").value;const url=new URL(window.location.href);if(searchQuery){url.searchParams.set('search',searchQuery)}else{url.searchParams.delete('search')}history.pushState({search:searchQuery},"",url);window.dispatchEvent(new HashChangeEvent("hashchange"))}document.addEventListener('DOMContentLoaded',()=>{const searchbar=document.getElementById("search-input");const searchForm=document.getElementById("search-form");searchbar.addEventListener("keyup",function(event){onSearchFormSubmit(event)});searchbar.addEventListener("search",function(event){onSearchFormSubmit(event)});function onQueryParamsChange(){const searchParams=new URLSearchParams(window.location.search);const query=searchParams.get("search");const searchSection=document.getElementById('search');const mainSection=document.getElementById('main-content');const searchInput=document.getElementById('search-input');if(query){searchInput.value=query;const results=Object.values(SEARCH_INDEX).flat().filter(item=>{const lowerQuery=query.toLowerCase();return item.name.toLowerCase().includes(lowerQuery)});const header=`<h1>Results for ${query}</h1>`;if(results.length>0){const resultList=results.map(item=>{const formattedName=`<span class="type ${item.type_name}">${item.name}</span>`;const name=[...item.module_info,formattedName].join("::");const path=["../..",...item.module_info,item.html_filename].join("/");const left=`<td><span>${name}</span></td>`;const right=`<td><p>${item.preview}</p></td>`;return`<tr onclick="window.location='${path}';">${left}${right}</tr>`}).join('');searchSection.innerHTML=`${header}<table>${resultList}</table>`}else{searchSection.innerHTML=`${header}<p>No results found.</p>`}searchSection.setAttribute("class","search-results");mainSection.setAttribute("class","content hidden")}else{searchSection.setAttribute("class","search-results hidden");mainSection.setAttribute("class","content")}}window.addEventListener('hashchange',onQueryParamsChange);onQueryParamsChange()})</script><nav class="sub"><form id="search-form" class="search-form" onsubmit="onSearchFormSubmit(event)"><div class="search-container"><input id="search-input" class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Search the docs..." type="search"></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Module <a class="mod" href="../index.html">std</a><span>::</span><a class="mod" href="#">auth</a></span></h1></div><details class="swaydoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Functionality for determining who is calling a contract.</p>
</div></details><h2 id="enums">Enums</h2><div class="item-table"><div class="item-row"><div class="item-left Enum-item"><a class="enum" href="enum.AuthError.html">AuthError</a></div><div class="item-right docblock-short"><p>The error type used when an <code>Identity</code> cannot be determined.</p>
</div></div></div><h2 id="functions">Functions</h2><div class="item-table"><div class="item-row"><div class="item-left Function-item"><a class="fn" href="fn.caller_address.html">caller_address</a></div><div class="item-right docblock-short"><p>Get the owner of the inputs (of type <code>Input::Coin</code> or <code>Input::Message</code>) to a<br /></div></div><div class="item-row"><div class="item-left Function-item"><a class="fn" href="fn.caller_contract_id.html">caller_contract_id</a></div><div class="item-right docblock-short"><p>If the caller is internal, returns the contract ID of the caller.</p>
</div></div></div><h2 id="functions">Functions</h2><div class="item-table"><div class="item-row"><div class="item-left Function-item"><a class="fn" href="fn.caller_address.html">caller_address</a></div><div class="item-right docblock-short"><p>Get the owner of the inputs (of type <code>Input::Coin</code> or <code>Input::Message</code>) to a<br /></div></div><div class="item-row"><div class="item-left Function-item"><a class="fn" href="fn.caller_addresses.html">caller_addresses</a></div><div class="item-right docblock-short"><p>Get the owners of the inputs (of type <code>Input::Coin</code> or <code>Input::Message</code>) to a<br /></div></div><div class="item-row"><div class="item-left Function-item"><a class="fn" href="fn.caller_contract_id.html">caller_contract_id</a></div><div class="item-right docblock-short"><p>If the caller is internal, returns the contract ID of the caller.</p>
</div></div><div class="item-row"><div class="item-left Function-item"><a class="fn" href="fn.caller_is_external.html">caller_is_external</a></div><div class="item-right docblock-short"><p>Returns <code>true</code> if the caller is external (i.e. a <code>script</code>).<br /></div></div><div class="item-row"><div class="item-left Function-item"><a class="fn" href="fn.msg_sender.html">msg_sender</a></div><div class="item-right docblock-short"><p>Get the <code>Identity</code> (i.e. <code>Address</code> or <code>ContractId</code>) from which a call was made.<br /></div></div><div class="item-row"><div class="item-left Function-item"><a class="fn" href="fn.predicate_address.html">predicate_address</a></div><div class="item-right docblock-short"><p>Get the current predicate’s address when called in an internal context.</p>
</div></div></div></section><section id="search" class="search-results"></section></div></main><script src="../../static.files/highlight.js"></script><script>hljs.highlightAll();</script></body></html>
5 changes: 4 additions & 1 deletion master/std/bytes/struct.Bytes.html
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,10 @@ <h1>Examples</h1>
assert(right.len() == 2);
}
</code></pre>
</div></details><details class="swaydoc-toggle method-toggle" open><summary><div id="method.append" class="method trait-impl"><a href="#method.append" class="anchor"></a><h4 class="code-header">fn <a class="fnname" href="#method.append">append</a>(<br> refmut self,<br> refmut other: self,<br>)</h4></div></summary><div class="docblock"><p>Moves all elements of <code>other</code> into <code>self</code>, leaving <code>other</code> empty.</p>
</div></details><details class="swaydoc-toggle method-toggle" open><summary><div id="method.append" class="method trait-impl"><a href="#method.append" class="anchor"></a><h4 class="code-header">fn <a class="fnname" href="#method.append">append</a>(<br> refmut self,<br> refmut other: self,<br>)</h4></div></summary><div class="docblock"><p>Copies all elements of <code>other</code> into <code>self</code></p>
<h1>Additional Information</h1>
<p>NOTE: Appending <code>self</code> to itself will duplicate the <code>Bytes</code>. i.e. [0, 1, 2] =&gt; [0, 1, 2, 0, 1, 2]<br />
This function differs from the rust <code>append</code> function in that it does not clear the <code>other</code> <code>Bytes</code></p>
<h1>Arguments</h1>
<ul>
<li><code>other</code>: [Bytes] - The Bytes to append to self.</li>
Expand Down
Loading

0 comments on commit 2c05655

Please sign in to comment.