parent
f6254c01d8
commit
85b639629f
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
!function(e){function r(r){for(var n,a,i=r[0],c=r[1],l=r[2],p=0,s=[];p<i.length;p++)a=i[p],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,l||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++)0!==o[t[i]]&&(n=!1);n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={0:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({}[e]||e)+"."+{1:"454a80537ee5d2127464",6:"a8aaac1c40edefc2e998",7:"111462271a145f4492a0"}[e]+".js"}(e);var c=new Error;u=function(r){i.onerror=i.onload=null,clearTimeout(l);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(r)},a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,(function(r){return e[r]}).bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],c=i.push.bind(i);i.push=r,i=i.slice();for(var l=0;l<i.length;l++)r(i[l]);var f=c;t()}([]);
|
||||
!function(e){function r(r){for(var n,a,i=r[0],c=r[1],l=r[2],p=0,s=[];p<i.length;p++)a=i[p],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,l||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++)0!==o[t[i]]&&(n=!1);n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={0:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({}[e]||e)+"."+{1:"454a80537ee5d2127464",6:"f7ed5a1aaa268c58d3c2",7:"b6519acc9e1e1431ca4d"}[e]+".js"}(e);var c=new Error;u=function(r){i.onerror=i.onload=null,clearTimeout(l);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(r)},a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,(function(r){return e[r]}).bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],c=i.push.bind(i);i.push=r,i=i.slice();for(var l=0;l<i.length;l++)r(i[l]);var f=c;t()}([]);
|
@ -1,88 +1,141 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { faQuestion } from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
export class HelpTopic {
|
||||
question: string;
|
||||
answer: string;
|
||||
import { HelpTopic, LightningNode } from '../../models/RTLconfig';
|
||||
import { SessionService } from '../../services/session.service';
|
||||
|
||||
constructor(ques: string, ans: string) {
|
||||
this.question = ques;
|
||||
this.answer = ans;
|
||||
}
|
||||
}
|
||||
import * as fromRTLReducer from '../../../store/rtl.reducers';
|
||||
|
||||
@Component({
|
||||
selector: 'rtl-help',
|
||||
templateUrl: './help.component.html',
|
||||
styleUrls: ['./help.component.scss']
|
||||
})
|
||||
export class HelpComponent implements OnInit {
|
||||
export class HelpComponent implements OnInit, OnDestroy {
|
||||
public helpTopics: Array<HelpTopic> = [];
|
||||
public faQuestion = faQuestion;
|
||||
public selNode: LightningNode;
|
||||
public LNPLink = '/lnd/';
|
||||
public flgLoggedIn = false;
|
||||
private unSubs = [new Subject(), new Subject(), new Subject(), new Subject()];
|
||||
|
||||
constructor() {}
|
||||
constructor(private store: Store<fromRTLReducer.RTLState>, private sessionService: SessionService) {
|
||||
this.helpTopics.push(new HelpTopic({
|
||||
question: 'Getting started',
|
||||
answer: 'Funding your node is the first step to get started.\n' +
|
||||
'Go to the "On-chain" page of the app:\n' +
|
||||
'1. Generate a new address on the "Recieve" tab.\n'+
|
||||
'2. Send funds to the address.\n' +
|
||||
'3. Wait for the balance to be confirmed on-chain before proceeding further.\n' +
|
||||
'3. Connecting with network peers and opening channels is next.\n',
|
||||
link: 'onchain',
|
||||
linkCaption: 'On-Chain page'
|
||||
}));
|
||||
this.helpTopics.push(new HelpTopic({
|
||||
question: 'Connect with peers',
|
||||
answer: 'Connect with network peers to open channels with them.\n' +
|
||||
'Go to "Peer/Channels" page under the "Lightning" menu :\n' +
|
||||
'1. Get the peer pubkey and host address in the pubkey@ip:port format.\n' +
|
||||
'2. On the "Peers" enter the peer address and connect.\n' +
|
||||
'3. Once the peer is connected, you can open channel with the peer.\n'+
|
||||
'4. A variety of actions can be performed on the connected peers page for each peer:\n'+
|
||||
' a. View Info - View the peer details.\n' +
|
||||
' b. Open Channel - Open channel with the peer.\n' +
|
||||
' c. Disconnect - Disconnect from the peer.\n',
|
||||
link: 'peerschannels',
|
||||
linkCaption: 'Peers/Channels page'
|
||||
}));
|
||||
this.helpTopics.push(new HelpTopic({
|
||||
question: 'Opening Channels',
|
||||
answer: 'Open channels with a connected network peer.\n' +
|
||||
'Go to "Peer/Channels" page under the "Lightning" menu:\n' +
|
||||
'1. On the "Channels" section, select the alias of the connected peer from the drop-down\n' +
|
||||
'2. Specify the amount to commit to the channel and click on "Open Channel".\n' +
|
||||
'3. There are a variety of options available while opening a channel. \n' +
|
||||
' a. Private Channel - When this option is selected, a private channel is opened with the peer. \n' +
|
||||
' b. Priority (advanced option) - Specify either Target confirmation Block or Fee in Sat/Byte. \n' +
|
||||
' c. Spend Unconfirmd Output (advanced option) - Allow channels to be opened with unconfirmed UTXOs.\n' +
|
||||
'4. Track the pending open channels under the "Pending" tab . \n' +
|
||||
'5. Wait for the channel to be confirmed. Only a confimed channel can be used for payments or routing. \n',
|
||||
link: 'peerschannels',
|
||||
linkCaption: 'Peers/Channels page'}));
|
||||
this.helpTopics.push(new HelpTopic({
|
||||
question: 'Channel Management',
|
||||
answer: 'Channel maintenance and balance score.\n' +
|
||||
'Go to "Peer/Channels" page under the "Lightning" menu:\n' +
|
||||
'1. A variety of actions can be perfomed on the open channels under the "Open" tab, with the "Actions" button:\n' +
|
||||
' a. View Info - View the channel details.\n' +
|
||||
' b. View Remote Fee - View the fee policy on the channel of the remote peer.\n' +
|
||||
' c. Update Fee Policy - Modify the fee policy on the channel.\n' +
|
||||
' d. Close Channel - Close the channel.\n' +
|
||||
'2. Balance Score is balancedness metric score for the channel:\n' +
|
||||
' a. It helps measure how balanced the remote and local balance on a channel is.\n' +
|
||||
' b. A perfectly balanced channel has a score of one, where a completely lopsided one has a score of zero.\n' +
|
||||
' c. The formular for calculating the score is "1 - abs((local bal - remote bal)/total bal)".\n',
|
||||
link: 'peerschannels',
|
||||
linkCaption: 'Peers/Channels page'
|
||||
}));
|
||||
this.helpTopics.push(new HelpTopic({
|
||||
question: 'Lightning Transactions - Payments',
|
||||
answer: 'Sending Payments from your node.\n' +
|
||||
'Go to "Transactions" page under the "Lightning" menu :\n' +
|
||||
'Payments - Payments tab is for making payments via your node\n' +
|
||||
' 1. Input a non-expired lightning invoice (Bolt11 format) in the "Payment request" field and click on "Send Payment" to send.\n' +
|
||||
' 2. Advanced option # 1 - Specify a limit on the routing fee you are willing to pay for the payment.\n' +
|
||||
' 3. Advanced option # 2 - Specify the outgoing channel through which you want the payment to go out.\n',
|
||||
link: 'transactions',
|
||||
linkCaption: 'Transactions page'
|
||||
}));
|
||||
this.helpTopics.push(new HelpTopic({
|
||||
question: 'Lightning Transactions - Invoices',
|
||||
answer: 'Receiving Payments on your node.\n' +
|
||||
'Go to "Transactions" page under the "Lightning" menu :\n' +
|
||||
'Invoices - Invoices tab is for receiving payments on your node.\n' +
|
||||
' 1. Memo - Description you want to provide on the invoice.\n' +
|
||||
' 2. Expiry - The time period, after which the invoice will be invalid.\n' +
|
||||
' 3. Private Routing Hints - Generate an invoice with routing hints for private channels.\n',
|
||||
link: 'transactions',
|
||||
linkCaption: 'Transactions page'
|
||||
}));
|
||||
this.helpTopics.push(new HelpTopic({
|
||||
question: 'Lightning Transactions - Query Route',
|
||||
answer: 'Querying Payment Routes.\n' +
|
||||
'Go to "Transactions" page under the "Lightning" menu :\n' +
|
||||
'Query Routes - Query Routes tab is for querying a potential path to a node and a routing fee estimate for a payment amount.\n'+
|
||||
' 1. Destination Pubkey - Pubkey of the node, you want to send the payment to.\n' +
|
||||
' 2. Amount - Amount in Sats, which you want to send to the node.\n',
|
||||
link: 'transactions',
|
||||
linkCaption: 'Transactions page'
|
||||
}));
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.helpTopics.push(new HelpTopic('Getting started', 'Funding your node is the first step to get started.\n' +
|
||||
'Go to the "On-chain" page of the app:\n' +
|
||||
'1. Generate a new address on the "Recieve" tab.\n'+
|
||||
'2. Send funds to the address.\n' +
|
||||
'3. Wait for the balance to be confirmed on-chain before proceeding further.\n' +
|
||||
'3. Connecting with network peers and opening channels is next.\n' +
|
||||
'<a href="http://localhost:3000/rtl/lnd/onchain">On-Chain page</a>'));
|
||||
this.helpTopics.push(new HelpTopic('Connect with peers', 'Connect with network peers to open channels with them.\n' +
|
||||
'Go to "Peer/Channels" page under the "Lightning" menu :\n' +
|
||||
'1. Get the peer pubkey and host address in the pubkey@ip:port format.\n' +
|
||||
'2. On the "Peers" enter the peer address and connect.\n' +
|
||||
'3. Once the peer is connected, you can open channel with the peer.\n'+
|
||||
'4. A variety of actions can be performed on the connected peers page for each peer:\n'+
|
||||
' a. View Info - View the peer details.\n' +
|
||||
' b. Open Channel - Open channel with the peer.\n' +
|
||||
' c. Disconnect - Disconnect from the peer.\n' +
|
||||
'<a href="http://localhost:3000/rtl/lnd/peerschannels">Peers/Channels page</a>'));
|
||||
this.helpTopics.push(new HelpTopic('Opening Channels', 'Open channels with a connected network peer.\n' +
|
||||
'Go to "Peer/Channels" page under the "Lightning" menu:\n' +
|
||||
'1. On the "Channels" section, select the alias of the connected peer from the drop-down\n' +
|
||||
'2. Specify the amount to commit to the channel and click on "Open Channel".\n' +
|
||||
'3. There are a variety of options available while opening a channel. \n' +
|
||||
' a. Private Channel - When this option is selected, a private channel is opened with the peer. \n' +
|
||||
' b. Priority (advanced option) - Specify either Target confirmation Block or Fee in Sat/Byte. \n' +
|
||||
' c. Spend Unconfirmd Output (advanced option) - Allow channels to be opened with unconfirmed UTXOs.\n' +
|
||||
'4. Track the pending open channels under the "Pending" tab . \n' +
|
||||
'5. Wait for the channel to be confirmed. Only a confimed channel can be used for payments or routing. \n' +
|
||||
'<a href="http://localhost:3000/rtl/lnd/peerschannels">Peers/Channels page</a>'));
|
||||
this.helpTopics.push(new HelpTopic('Channel Management', 'Channel maintenance and balance score.\n' +
|
||||
'Go to "Peer/Channels" page under the "Lightning" menu:\n' +
|
||||
'1. A variety of actions can be perfomed on the open channels under the "Open" tab, with the "Actions" button:\n' +
|
||||
' a. View Info - View the channel details.\n' +
|
||||
' b. View Remote Fee - View the fee policy on the channel of the remote peer.\n' +
|
||||
' c. Update Fee Policy - Modify the fee policy on the channel.\n' +
|
||||
' d. Close Channel - Close the channel.\n' +
|
||||
'2. Balance Score is balancedness metric score for the channel:\n' +
|
||||
' a. It helps measure how balanced the remote and local balance on a channel is.\n' +
|
||||
' b. A perfectly balanced channel has a score of one, where a completely lopsided one has a score of zero.\n' +
|
||||
' c. The formular for calculating the score is "1 - abs((local bal - remote bal)/total bal)".\n' +
|
||||
'<a href="http://localhost:3000/rtl/lnd/peerschannels">Peers/Channels page</a>'));
|
||||
this.helpTopics.push(new HelpTopic('Lightning Transactions - Payments', 'Sending Payments from your node.\n' +
|
||||
'Go to "Transactions" page under the "Lightning" menu :\n' +
|
||||
'Payments - Payments tab is for making payments via your node\n' +
|
||||
' 1. Input a non-expired lightning invoice (Bolt11 format) in the "Payment request" field and click on "Send Payment" to send.\n' +
|
||||
' 2. Advanced option # 1 - Specify a limit on the routing fee you are willing to pay for the payment.\n' +
|
||||
' 3. Advanced option # 2 - Specify the outgoing channel through which you want the payment to go out.\n' +
|
||||
'<a href="http://localhost:3000/rtl/lnd/transactions">Transactions page</a>'));
|
||||
this.helpTopics.push(new HelpTopic('Lightning Transactions - Invoices', 'Receiving Payments on your node.\n' +
|
||||
'Go to "Transactions" page under the "Lightning" menu :\n' +
|
||||
'Invoices - Invoices tab is for receiving payments on your node.\n' +
|
||||
' 1. Memo - Description you want to provide on the invoice.\n' +
|
||||
' 2. Expiry - The time period, after which the invoice will be invalid.\n' +
|
||||
' 3. Private Routing Hints - Generate an invoice with routing hints for private channels.\n' +
|
||||
'<a href="http://localhost:3000/rtl/lnd/transactions">Transactions page</a>'));
|
||||
this.helpTopics.push(new HelpTopic('Lightning Transactions - Query Route', 'Querying Payment Routes.\n' +
|
||||
'Go to "Transactions" page under the "Lightning" menu :\n' +
|
||||
'Query Routes - Query Routes tab is for querying a potential path to a node and a routing fee estimate for a payment amount.\n'+
|
||||
' 1. Destination Pubkey - Pubkey of the node, you want to send the payment to.\n' +
|
||||
' 2. Amount - Amount in Sats, which you want to send to the node.\n' +
|
||||
'<a href="http://localhost:3000/rtl/lnd/transactions">Transactions page</a>'));
|
||||
this.store.select('root')
|
||||
.pipe(takeUntil(this.unSubs[0]))
|
||||
.subscribe(rtlStore => {
|
||||
this.selNode = rtlStore.selNode;
|
||||
if(this.selNode.lnImplementation.toUpperCase() === 'CLT') {
|
||||
this.LNPLink = '/cl/';
|
||||
} else {
|
||||
this.LNPLink = '/lnd/';
|
||||
}
|
||||
});
|
||||
this.sessionService.watchSession()
|
||||
.pipe(takeUntil(this.unSubs[1]))
|
||||
.subscribe(session => {
|
||||
this.flgLoggedIn = (session.token) ? true : false;
|
||||
});
|
||||
if (this.sessionService.getItem('token')) { this.flgLoggedIn = true; }
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.unSubs.forEach(completeSub => {
|
||||
completeSub.next();
|
||||
completeSub.complete();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue