Skip to content

Commit 9db0d53

Browse files
Merge pull request #81 from ellemouton/subservers
cmd+example: update with Status server access
2 parents 3a4572e + fc9e012 commit 9db0d53

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

example/index.html

+10
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@
147147
window[namespace].wasmClientInvokeRPC('lnrpc.Lightning.' + rpcName, req, setResult);
148148
}
149149

150+
async function callWASMStatus(rpcName, req) {
151+
window[namespace].wasmClientInvokeRPC('litrpc.Status.' + rpcName, req, setResult);
152+
}
153+
150154
async function callWASMLoop(rpcName, req) {
151155
window[namespace].wasmClientInvokeRPC('looprpc.SwapClient.' + rpcName, req, setResult);
152156
}
@@ -265,6 +269,9 @@
265269
if (window[namespace].wasmClientHasPerms("wtclientrpc.WatchtowerClient.ListTowers")) {
266270
document.getElementById('wtclientrpc').disabled = false;
267271
}
272+
if (window[namespace].wasmClientHasPerms("litrpc.Status.SubServerStatus")) {
273+
document.getElementById('getstatus').disabled = false;
274+
}
268275
if (window[namespace].wasmClientHasPerms("looprpc.SwapClient.LoopOutTerms")) {
269276
document.getElementById('loopoutterms').disabled = false;
270277
}
@@ -352,6 +359,9 @@ <h2>LND</h2>
352359
<button id="watchtowerrpc" onClick="callWASMDirect('watchtowerrpc.Watchtower.GetInfo', '{}');" disabled>GetInfo</button>
353360
<button id="wtclientrpc" onClick="callWASMDirect('wtclientrpc.WatchtowerClient.ListTowers', '{}');" disabled>ListTowers</button>
354361

362+
<h2>Status</h2>
363+
<button id="getstatus" onClick="callWASMStatus('SubServerStatus', '{}');" disabled>SubServerStatus</button>
364+
355365
<h2>Loop</h2>
356366
<button id="loopoutterms" onClick="callWASMLoop('LoopOutTerms', '{}');" disabled>LoopOutTerms</button>
357367

0 commit comments

Comments
 (0)