mirror of
https://github.com/aljazceru/BitcoinAndLightningLayerSpecs.github.io.git
synced 2025-12-17 05:54:22 +01:00
233 lines
9.1 KiB
HTML
233 lines
9.1 KiB
HTML
<!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>info - 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 = "info";
|
|
var mkdocs_page_input_path = "info.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 current"><a class="reference internal current" href="#">Information</a>
|
|
<ul class="current">
|
|
<li class="toctree-l2 current"><a class="reference internal current" href="./">info</a>
|
|
<ul class="current">
|
|
<li class="toctree-l3"><a class="reference internal" href="#syntax">Syntax</a>
|
|
</li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a>
|
|
</li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#returns">Returns</a>
|
|
</li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#example">Example</a>
|
|
</li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#additional-notes">Additional notes</a>
|
|
</li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#concerns-and-security-observations">Concerns and security observations</a>
|
|
</li>
|
|
</ul>
|
|
</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"><a class="reference internal" href="../extendability/extending/">Extending</a>
|
|
</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>Information »</li><li>info</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="get-wallet-information">Get wallet information</h1>
|
|
<p>The <code>getInfo</code> method is called to obtain supported features and capabilities of the wallet. </p>
|
|
<h2 id="syntax">Syntax</h2>
|
|
<pre><code>getInfo()
|
|
</code></pre>
|
|
<h2 id="parameters">Parameters</h2>
|
|
<p>None</p>
|
|
<h2 id="returns">Returns</h2>
|
|
<ul>
|
|
<li>Object<ul>
|
|
<li>version : Number | String <span class="badge">Required</span></li>
|
|
<li>methods : Array <span class="badge">Optional</span></li>
|
|
<li>supports : Array <span class="badge">Optional</span></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h2 id="example">Example</h2>
|
|
<pre><code>window.webbtc.getInfo()
|
|
|
|
{
|
|
"version" : 1,
|
|
"supports" : [
|
|
"bip39",
|
|
"bip32"
|
|
],
|
|
"methods": [ // schema for available methods
|
|
"enable",
|
|
"getInfo",
|
|
"getAddress",
|
|
"signMessage",
|
|
"verifyMessage",
|
|
"makeInvoice",
|
|
"sendPayment"
|
|
]
|
|
}
|
|
</code></pre>
|
|
<h2 id="additional-notes">Additional notes</h2>
|
|
<p>The above method might be extended to include helper methods which include. </p>
|
|
<ul>
|
|
<li><code>window.webbtc.getMethods()</code></li>
|
|
<li><code>window.webbtc.getVersion()</code></li>
|
|
<li><code>window.webbtc.getServices()</code></li>
|
|
</ul>
|
|
<blockquote>
|
|
<p><strong><em>NOTE:</em></strong>
|
|
Method for obtaining existing supported permissions that the user could approve when enabling the wallet. Application specific implementation details can vary based on the security preference. </p>
|
|
</blockquote>
|
|
<h2 id="concerns-and-security-observations">Concerns and security observations</h2>
|
|
<p>Possible finger printing of users if this method is accessible without enabling it first.</p>
|
|
|
|
</div>
|
|
</div><footer>
|
|
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
|
|
<a href="../enable/" class="btn btn-neutral float-left" title="Enabling"><span class="icon icon-circle-arrow-left"></span> Previous</a>
|
|
<a href="../signatures/sign/" class="btn btn-neutral float-right" title="Signing">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="../enable/" style="color: #fcfcfc">« Previous</a></span>
|
|
|
|
|
|
<span><a href="../signatures/sign/" 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>
|