mirror of
https://github.com/aljazceru/BitcoinAndLightningLayerSpecs.github.io.git
synced 2025-12-17 22:14:24 +01:00
Initial github pages site
This commit is contained in:
227
docs/extendability/extending/index.html
Normal file
227
docs/extendability/extending/index.html
Normal file
@@ -0,0 +1,227 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="shortcut icon" href="../../img/favicon.ico" />
|
||||
<title>Extending - WebBTC Specification</title>
|
||||
<link rel="stylesheet" href="../../css/theme.css" />
|
||||
<link rel="stylesheet" href="../../css/theme_extra.css" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css" />
|
||||
<link href="../../css/custom.css" rel="stylesheet" />
|
||||
|
||||
<script>
|
||||
// Current page data
|
||||
var mkdocs_page_name = "Extending";
|
||||
var mkdocs_page_input_path = "extendability/extending.md";
|
||||
var mkdocs_page_url = null;
|
||||
</script>
|
||||
|
||||
<script src="../../js/jquery-3.6.0.min.js" defer></script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../../js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/languages/javascript.min.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav" role="document">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="../.." class="icon icon-home"> WebBTC Specification
|
||||
</a><div role="search">
|
||||
<form id ="rtd-search-form" class="wy-form" action="../../search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../..">Overview</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">API Reference</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="#">Enable</a>
|
||||
<ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../../enable/">Enabling</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#">Information</a>
|
||||
<ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../../info/">info</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#">Signatures</a>
|
||||
<ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../../signatures/sign/">Signing</a>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../../signatures/verify/">Verification</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#">Invoices</a>
|
||||
<ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../../invoices/makeInvoice/">makeInvoice</a>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../../transactions/send/">sendPayment</a>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../../transactions/sendTransaction/">sendTransaction</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#">Addresses</a>
|
||||
<ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../../addresses/getAddress/">getAddress</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current"><a class="reference internal current" href="./">Extending</a>
|
||||
<ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="#syntax">Syntax</a>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#parameters">Parameters</a>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#returns">Returns</a>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#example">Example</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../squatting/">Namespace Squatting</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../references/">Resources</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../..">WebBTC Specification</a>
|
||||
|
||||
</nav>
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="../.." class="icon icon-home" alt="Docs"></a> »</li>
|
||||
<li>API Reference »</li><li>Extending</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
</li>
|
||||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div class="section" itemprop="articleBody">
|
||||
|
||||
<h1 id="extendability">Extendability</h1>
|
||||
<p>There is room for extending this API through a request method. This method might also be useful as a base from which all the other methods in the specification might have wrapper methods. </p>
|
||||
<h2 id="syntax">Syntax</h2>
|
||||
<pre><code>window.webbtc.request(method, params)
|
||||
</code></pre>
|
||||
<h2 id="parameters">Parameters</h2>
|
||||
<ul>
|
||||
<li>method: String <span class="badge">Required</span></li>
|
||||
<li>params: Array <span class="badge">Required</span></li>
|
||||
</ul>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<ul>
|
||||
<li>Promise | Object</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p><strong><em>NOTE:</em></strong><br />
|
||||
This call might be asynchronous is would return a promise based on wether or not the payment has been broadcast <span class="badge">Onchain</span> and or processed successfully </p>
|
||||
</blockquote>
|
||||
<h2 id="example">Example</h2>
|
||||
<pre><code>// Example of calling an existing method
|
||||
window.webbtc.request('getInfo',[])
|
||||
{
|
||||
"version" : 1,
|
||||
"supports" : [
|
||||
"bip39",
|
||||
"bip32"
|
||||
],
|
||||
"methods": [ // schema for available methods
|
||||
"enable",
|
||||
"getInfo",
|
||||
"getAddress",
|
||||
"signMessage",
|
||||
"verifyMessage",
|
||||
"makeInvoice",
|
||||
"sendPayment"
|
||||
]
|
||||
}
|
||||
</code></pre>
|
||||
<pre><code>// Example for calling an arbitrary message not covered in the specification
|
||||
|
||||
// Custom method might be
|
||||
// hello(name) {
|
||||
// return "Hello ${name}"
|
||||
//}
|
||||
|
||||
> await window.webbtc.request('hello',['Alice'])
|
||||
|
||||
Hello Alice
|
||||
</code></pre>
|
||||
|
||||
</div>
|
||||
</div><footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
|
||||
<a href="../../addresses/getAddress/" class="btn btn-neutral float-left" title="getAddress"><span class="icon icon-circle-arrow-left"></span> Previous</a>
|
||||
<a href="../../squatting/" class="btn btn-neutral float-right" title="Namespace Squatting">Next <span class="icon icon-circle-arrow-right"></span></a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<!-- Copyright etc -->
|
||||
</div>
|
||||
|
||||
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="rst-versions" role="note" aria-label="Versions">
|
||||
<span class="rst-current-version" data-toggle="rst-current-version">
|
||||
|
||||
|
||||
<span><a href="../../addresses/getAddress/" style="color: #fcfcfc">« Previous</a></span>
|
||||
|
||||
|
||||
<span><a href="../../squatting/" style="color: #fcfcfc">Next »</a></span>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
<script>var base_url = '../..';</script>
|
||||
<script src="../../js/theme_extra.js" defer></script>
|
||||
<script src="../../js/theme.js" defer></script>
|
||||
<script src="../../search/main.js" defer></script>
|
||||
<script defer>
|
||||
window.onload = function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
};
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user