|
151 | 151 | async function callWASMFaraday(rpcName, req) {
|
152 | 152 | window[namespace].wasmClientInvokeRPC('frdrpc.FaradayServer.' + rpcName, req, setResult);
|
153 | 153 | }
|
| 154 | + |
| 155 | + async function callWASMDirect(rpcName, req) { |
| 156 | + window[namespace].wasmClientInvokeRPC(rpcName, req, setResult); |
| 157 | + } |
154 | 158 |
|
155 | 159 | function setResult(result) {
|
156 | 160 | $('#output').text(result);
|
|
212 | 216 | if (window[namespace].wasmClientHasPerms("lnrpc.Lightning.SubscribeTransactions")) {
|
213 | 217 | document.getElementById('subscribetx').disabled = false;
|
214 | 218 | }
|
| 219 | + if (window[namespace].wasmClientHasPerms("autopilotrpc.Autopilot.Status")) { |
| 220 | + document.getElementById('autopilotrpc').disabled = false; |
| 221 | + } |
| 222 | + if (window[namespace].wasmClientHasPerms("chainrpc.ChainNotifier.RegisterBlockEpochNtfn")) { |
| 223 | + document.getElementById('chainrpc').disabled = false; |
| 224 | + } |
| 225 | + if (window[namespace].wasmClientHasPerms("invoicesrpc.Invoices.AddHoldInvoice")) { |
| 226 | + document.getElementById('invoicesrpc').disabled = false; |
| 227 | + } |
| 228 | + if (window[namespace].wasmClientHasPerms("routerrpc.Router.GetMissionControlConfig")) { |
| 229 | + document.getElementById('routerrpc').disabled = false; |
| 230 | + } |
| 231 | + if (window[namespace].wasmClientHasPerms("signrpc.Signer.SignMessage")) { |
| 232 | + document.getElementById('signrpc').disabled = false; |
| 233 | + } |
| 234 | + if (window[namespace].wasmClientHasPerms("lnrpc.State.GetState")) { |
| 235 | + document.getElementById('lnrpc').disabled = false; |
| 236 | + } |
| 237 | + if (window[namespace].wasmClientHasPerms("walletrpc.WalletKit.ListUnspent")) { |
| 238 | + document.getElementById('walletrpc').disabled = false; |
| 239 | + } |
| 240 | + if (window[namespace].wasmClientHasPerms("watchtowerrpc.Watchtower.GetInfo")) { |
| 241 | + document.getElementById('watchtowerrpc').disabled = false; |
| 242 | + } |
| 243 | + if (window[namespace].wasmClientHasPerms("wtclientrpc.WatchtowerClient.ListTowers")) { |
| 244 | + document.getElementById('wtclientrpc').disabled = false; |
| 245 | + } |
215 | 246 | if (window[namespace].wasmClientHasPerms("looprpc.SwapClient.LoopOutTerms")) {
|
216 | 247 | document.getElementById('loopoutterms').disabled = false;
|
217 | 248 | }
|
@@ -276,6 +307,16 @@ <h2>LND</h2>
|
276 | 307 | <button id="subscribetx" onClick="callWASM('SubscribeTransactions', '{}');" disabled>
|
277 | 308 | SubscribeTransactions
|
278 | 309 | </button>
|
| 310 | + <p>Sub-servers</p> |
| 311 | + <button id="autopilotrpc" onClick="callWASMDirect('autopilotrpc.Autopilot.Status', '{}');" disabled>Status</button> |
| 312 | + <button id="chainrpc" onClick="callWASMDirect('chainrpc.ChainNotifier.RegisterBlockEpochNtfn', '{}');" disabled>RegisterBlockEpochNtfn</button> |
| 313 | + <button id="invoicesrpc" onClick="callWASMDirect('invoicesrpc.Invoices.AddHoldInvoice', '{}');" disabled>AddHoldInvoice</button> |
| 314 | + <button id="routerrpc" onClick="callWASMDirect('routerrpc.Router.GetMissionControlConfig', '{}');" disabled>GetMissionControlConfig</button> |
| 315 | + <button id="signrpc" onClick="callWASMDirect('signrpc.Signer.SignMessage', '{}');" disabled>SignMessage</button> |
| 316 | + <button id="lnrpc" onClick="callWASMDirect('lnrpc.State.GetState', '{}');" disabled>GetState</button> |
| 317 | + <button id="walletrpc" onClick="callWASMDirect('walletrpc.WalletKit.ListUnspent', '{}');" disabled>ListUnspent</button> |
| 318 | + <button id="watchtowerrpc" onClick="callWASMDirect('watchtowerrpc.Watchtower.GetInfo', '{}');" disabled>GetInfo</button> |
| 319 | + <button id="wtclientrpc" onClick="callWASMDirect('wtclientrpc.WatchtowerClient.ListTowers', '{}');" disabled>ListTowers</button> |
279 | 320 |
|
280 | 321 | <h2>Loop</h2>
|
281 | 322 | <button id="loopoutterms" onClick="callWASMLoop('LoopOutTerms', '{}');" disabled>LoopOutTerms</button>
|
|
0 commit comments