mirror of https://github.com/lukechilds/lnbits.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
234 lines
7.2 KiB
234 lines
7.2 KiB
<!-- @format -->
|
|
|
|
{% extends "base.html" %} {% block messages %}
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
|
<i class="fa fa-bell-o"></i>
|
|
<span class="label label-danger">!</span>
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
<li class="header"><b>Instant wallet, bookmark to save</b></li>
|
|
<li></li>
|
|
</ul>
|
|
{% endblock %} {% block menuitems %}
|
|
<li class="active treeview">
|
|
<a href="#">
|
|
<i class="fa fa-bitcoin"></i> <span>Wallets</span>
|
|
<i class="fa fa-angle-left pull-right"></i>
|
|
</a>
|
|
<ul class="treeview-menu">
|
|
{% for w in user_wallets %}
|
|
<li>
|
|
<a href="wallet?wal={{ w.id }}&usr={{ w.user }}"
|
|
><i class="fa fa-bolt"></i> {{ w.name }}</a
|
|
>
|
|
</li>
|
|
{% endfor %}
|
|
<li><a onclick="sidebarmake()">Add a wallet +</a></li>
|
|
<div id="sidebarmake"></div>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="treeview">
|
|
<a href="#">
|
|
<i class="fa fa-th"></i> <span>Extensions</span>
|
|
<small class="label pull-right bg-green">coming soon</small>
|
|
</a>
|
|
</li>
|
|
{% endblock %} {% block body %}
|
|
<!-- Right side column. Contains the navbar and content of the page -->
|
|
<div class="content-wrapper">
|
|
<!-- Content Header (Page header) -->
|
|
<section class="content-header">
|
|
<h1>
|
|
Wallet
|
|
<small
|
|
>Control panel
|
|
<div id="wonga"></div
|
|
></small>
|
|
</h1>
|
|
<ol class="breadcrumb">
|
|
<li>
|
|
<a href="#"><i class="fa fa-dashboard"></i> Home</a>
|
|
</li>
|
|
<li class="active">Wallets</li>
|
|
<li href="wallet?wal={{ wallet.id }}" class="active">
|
|
{{ wallet.name }}
|
|
</li>
|
|
</ol>
|
|
</section>
|
|
|
|
<!-- Main content -->
|
|
<section class="content">
|
|
<!-- Small boxes (Stat box) -->
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<!-- small box -->
|
|
<div class="small-box bg-aqua">
|
|
<div class="inner">
|
|
<h3><b>{{ wallet.balance }} sats</b></h3>
|
|
<h3>{{ wallet.name }}</h3>
|
|
</div>
|
|
<div class="icon">
|
|
<i class="ion ion-flash"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- ./col -->
|
|
|
|
<!-- /.row -->
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<button
|
|
onclick="sendfundsinput()"
|
|
class="btn btn-block btn-primary btn-lg"
|
|
>
|
|
Send
|
|
</button>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<button onclick="receive()" class="btn btn-block btn-primary btn-lg">
|
|
Receive
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div id="receive"></div>
|
|
<div id="sendfunds"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="box">
|
|
<div class="box-header">
|
|
<h3 class="box-title">Transactions <b id="demo"></b></h3>
|
|
</div>
|
|
<!-- /.box-header -->
|
|
<div class="box-body no-padding">
|
|
<table id="pagnation" class="table table-bordered table-striped">
|
|
<tr>
|
|
<th>Memo</th>
|
|
<th style="width: 20%">date</th>
|
|
<th style="width: 20%">amount</th>
|
|
</tr>
|
|
<tbody id="transactions"></tbody>
|
|
</table>
|
|
</div>
|
|
<!-- /.box-body -->
|
|
</div>
|
|
<!-- /.box -->
|
|
</div>
|
|
</div>
|
|
|
|
<div id="satschart"></div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="box box-solid">
|
|
<div class="box-header with-border"></div>
|
|
<!-- /.box-header -->
|
|
<div class="box-body">
|
|
<div class="box-group" id="accordion">
|
|
<!-- we are adding the .panel class so bootstrap.js collapse plugin detects it -->
|
|
<div class="panel box box-primary">
|
|
<div class="box-header with-border">
|
|
<h4 class="box-title">
|
|
<a
|
|
data-toggle="collapse"
|
|
data-parent="#accordion"
|
|
href="#collapseThree"
|
|
class="collapsed"
|
|
aria-expanded="false"
|
|
>
|
|
Wallet "{{ wallet.name }}" API info
|
|
</a>
|
|
</h4>
|
|
</div>
|
|
<div
|
|
id="collapseThree"
|
|
class="panel-collapse collapse"
|
|
aria-expanded="false"
|
|
>
|
|
<div class="box-body" style="word-wrap: break-word;">
|
|
<b>Admin key: </b><i>{{ wallet.adminkey }}</i><br />
|
|
<b>Invoice/Read key: </b><i>{{ wallet.inkey }}</i><br />
|
|
Generate an invoice:<br /><code>POST /v1/invoices</code
|
|
><br />Header
|
|
<code
|
|
>{"Grpc-Metadata-macaroon": "<i>{{ wallet.inkey }}</i
|
|
>"}</code
|
|
><br />
|
|
Body <code>{"value": "200","memo": "beer"} </code><br />
|
|
Returns
|
|
<code>{"pay_req": string,"pay_id": string} </code><br />
|
|
*payment will not register in the wallet until the "check
|
|
invoice" endpoint is used<br /><br />
|
|
|
|
Check invoice:<br />
|
|
Check an invoice:<br /><code
|
|
>GET /v1/invoice/*payment_hash*</code
|
|
><br />Header
|
|
<code
|
|
>{"Grpc-Metadata-macaroon": "<i>{{ wallet.inkey }}</i
|
|
>"}</code
|
|
><br />
|
|
|
|
Returns
|
|
<code>{"PAID": "TRUE"}/{"PAID": "FALSE"} </code><br />
|
|
*if using LNTXBOT return will hang until paid<br /><br />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel box box-danger">
|
|
<div class="box-header with-border">
|
|
<h4 class="box-title">
|
|
<a
|
|
data-toggle="collapse"
|
|
data-parent="#accordion"
|
|
href="#collapseTwo"
|
|
class="collapsed"
|
|
aria-expanded="false"
|
|
>
|
|
Delete wallet
|
|
</a>
|
|
</h4>
|
|
</div>
|
|
<div
|
|
id="collapseTwo"
|
|
class="panel-collapse collapse"
|
|
aria-expanded="false"
|
|
>
|
|
<div class="box-body">
|
|
This whole wallet will be deleted, the funds will be
|
|
UNRECOVERABLE <br /><br /><button
|
|
class="btn btn-danger"
|
|
onclick="deletewallet()"
|
|
>
|
|
Delete wallet
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.box-body -->
|
|
</div>
|
|
<!-- /.box -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- /.content -->
|
|
</section>
|
|
|
|
<script>
|
|
window.user = {{ user | megajson | safe }}
|
|
window.user_wallets = {{ user_wallets | megajson | safe }}
|
|
window.wallet = {{ wallet | megajson | safe }}
|
|
window.transactions = {{ transactions | megajson | safe }}
|
|
</script>
|
|
</div>
|
|
{% endblock %}
|
|
|