From 5d666a8d176449ea13f5daa6acda460d64ad012c Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Mon, 10 Jul 2023 11:21:58 +0200 Subject: [PATCH] cmd+example: update with Status server access --- cmd/wasm-client/go.mod | 2 ++ cmd/wasm-client/go.sum | 4 ++-- example/index.html | 10 ++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/cmd/wasm-client/go.mod b/cmd/wasm-client/go.mod index 20770ad5..283889b7 100644 --- a/cmd/wasm-client/go.mod +++ b/cmd/wasm-client/go.mod @@ -191,4 +191,6 @@ replace github.com/lightninglabs/lightning-node-connect => ../../ replace github.com/lightninglabs/lightning-node-connect/hashmailrpc => ../../hashmailrpc +replace github.com/lightninglabs/lightning-terminal => github.com/ellemouton/lightning-terminal v0.6.1-alpha.0.20230710092045-f34139c61001 + go 1.19 diff --git a/cmd/wasm-client/go.sum b/cmd/wasm-client/go.sum index dc180f9f..a895850a 100644 --- a/cmd/wasm-client/go.sum +++ b/cmd/wasm-client/go.sum @@ -179,6 +179,8 @@ github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5Jflh github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/ellemouton/lightning-terminal v0.6.1-alpha.0.20230710092045-f34139c61001 h1:/PD6I8RKtq0vSJeHf6FmM01UiQ8kInW3RqPMYu5Rjxw= +github.com/ellemouton/lightning-terminal v0.6.1-alpha.0.20230710092045-f34139c61001/go.mod h1:IcbXojNWnw0kQvnNThYXd8Rkx3qDL6HBSwifGZwfx2s= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -466,8 +468,6 @@ github.com/lightninglabs/faraday v0.2.11-alpha h1:c6oa8p+QUiQ1SeYhx6jZ2jo+lmjk9f github.com/lightninglabs/faraday v0.2.11-alpha/go.mod h1:O+SNG4Op0vPwDzpM7yhNKOd8Z0MhbVzuq0VzIy2HekM= github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf h1:HZKvJUHlcXI/f/O0Avg7t8sqkPo78HFzjmeYFl6DPnc= github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf/go.mod h1:vxmQPeIQxPf6Jf9rM8R+B4rKBqLA2AjttNxkFBL2Plk= -github.com/lightninglabs/lightning-terminal v0.10.1-alpha.0.20230612093826-ee04747e4a34 h1:bTn1s3zTIGs2tgU24+fMZBTpXKtu1l7HPOoG0ijQn8I= -github.com/lightninglabs/lightning-terminal v0.10.1-alpha.0.20230612093826-ee04747e4a34/go.mod h1:wYu5xQ/ubiPSwMDSXI2j5AQClxxh4n8fSq0bvfgvHh4= github.com/lightninglabs/loop v0.24.1-beta h1:SkcN5c79hWM1RBlgilwJK61hPNiBDP3IoaBLqBzb0sk= github.com/lightninglabs/loop v0.24.1-beta/go.mod h1:rh5c7KZMNV/GOJ79n3x5qrO9h6FZT7ZZ54b6/FPIhQI= github.com/lightninglabs/loop/swapserverrpc v1.0.4 h1:cEX+mt7xmQlEbmuQ52vOBT7l+a471v94ofdJbB6MmXs= diff --git a/example/index.html b/example/index.html index ffdf62c2..10f3f6fb 100644 --- a/example/index.html +++ b/example/index.html @@ -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); } @@ -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; } @@ -352,6 +359,9 @@

LND

+

Status

+ +

Loop