Skip to content

Commit cd8c42d

Browse files
committed
cmd+example: update with Status server access
1 parent a4a8bd6 commit cd8c42d

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

cmd/wasm-client/go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,6 @@ replace github.com/lightninglabs/lightning-node-connect => ../../
191191

192192
replace github.com/lightninglabs/lightning-node-connect/hashmailrpc => ../../hashmailrpc
193193

194+
replace github.com/lightninglabs/lightning-terminal => github.com/ellemouton/lightning-terminal f34139c610015d632754d1bd00f341e0b7bb2dad
195+
194196
go 1.19

cmd/wasm-client/go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,6 @@ github.com/lightninglabs/faraday v0.2.11-alpha h1:c6oa8p+QUiQ1SeYhx6jZ2jo+lmjk9f
466466
github.com/lightninglabs/faraday v0.2.11-alpha/go.mod h1:O+SNG4Op0vPwDzpM7yhNKOd8Z0MhbVzuq0VzIy2HekM=
467467
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf h1:HZKvJUHlcXI/f/O0Avg7t8sqkPo78HFzjmeYFl6DPnc=
468468
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf/go.mod h1:vxmQPeIQxPf6Jf9rM8R+B4rKBqLA2AjttNxkFBL2Plk=
469-
github.com/lightninglabs/lightning-terminal v0.10.1-alpha.0.20230612093826-ee04747e4a34 h1:bTn1s3zTIGs2tgU24+fMZBTpXKtu1l7HPOoG0ijQn8I=
470-
github.com/lightninglabs/lightning-terminal v0.10.1-alpha.0.20230612093826-ee04747e4a34/go.mod h1:wYu5xQ/ubiPSwMDSXI2j5AQClxxh4n8fSq0bvfgvHh4=
471469
github.com/lightninglabs/loop v0.24.1-beta h1:SkcN5c79hWM1RBlgilwJK61hPNiBDP3IoaBLqBzb0sk=
472470
github.com/lightninglabs/loop v0.24.1-beta/go.mod h1:rh5c7KZMNV/GOJ79n3x5qrO9h6FZT7ZZ54b6/FPIhQI=
473471
github.com/lightninglabs/loop/swapserverrpc v1.0.4 h1:cEX+mt7xmQlEbmuQ52vOBT7l+a471v94ofdJbB6MmXs=

example/index.html

Lines changed: 10 additions & 0 deletions
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)