Skip to content

Commit

Permalink
cmd+example: update with Status server access
Browse files Browse the repository at this point in the history
  • Loading branch information
ellemouton authored and ViktorTigerstrom committed Oct 23, 2023
1 parent 3a4572e commit c7b3656
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@
window[namespace].wasmClientInvokeRPC('lnrpc.Lightning.' + rpcName, req, setResult);
}

async function callWASMStatus(rpcName, req) {
window[namespace].wasmClientInvokeRPC('litrpc.Status.' + rpcName, req, setResult);
}

async function callWASMLoop(rpcName, req) {
window[namespace].wasmClientInvokeRPC('looprpc.SwapClient.' + rpcName, req, setResult);
}
Expand Down Expand Up @@ -265,6 +269,9 @@
if (window[namespace].wasmClientHasPerms("wtclientrpc.WatchtowerClient.ListTowers")) {
document.getElementById('wtclientrpc').disabled = false;
}
if (window[namespace].wasmClientHasPerms("litrpc.Status.SubServerStatus")) {
document.getElementById('getstatus').disabled = false;
}
if (window[namespace].wasmClientHasPerms("looprpc.SwapClient.LoopOutTerms")) {
document.getElementById('loopoutterms').disabled = false;
}
Expand Down Expand Up @@ -352,6 +359,9 @@ <h2>LND</h2>
<button id="watchtowerrpc" onClick="callWASMDirect('watchtowerrpc.Watchtower.GetInfo', '{}');" disabled>GetInfo</button>
<button id="wtclientrpc" onClick="callWASMDirect('wtclientrpc.WatchtowerClient.ListTowers', '{}');" disabled>ListTowers</button>

<h2>Status</h2>
<button id="getstatus" onClick="callWASMStatus('SubServerStatus', '{}');" disabled>SubServerStatus</button>

<h2>Loop</h2>
<button id="loopoutterms" onClick="callWASMLoop('LoopOutTerms', '{}');" disabled>LoopOutTerms</button>

Expand Down

0 comments on commit c7b3656

Please sign in to comment.