// NOTE TO REACT-NATIVE-TURBO-LND CONTRIBUTORS: // This file is automatically generated by the protoc plugin inside the // protoc-generator folder. // Any changes to this file should be made there instead. /* eslint-disable */ import type { OnErrorCallback, OnResponseCallback, ProtobufBase64, Spec, UnsubscribeFromStream, WriteableStream, } from "../core/NativeTurboLnd"; import type { TurboLndElectrobunRpcSchema } from "./rpc-schema"; import { ensureElectrobunRpc } from "./rpc-runtime"; type StreamEvent = TurboLndElectrobunRpcSchema["webview"]["messages"]["__TurboLndStreamEvent"]; type UnaryMethod = TurboLndElectrobunRpcSchema["bun"]["requests"]["__TurboLndUnary"]["params"]["method"]; type ServerStreamMethod = TurboLndElectrobunRpcSchema["bun"]["requests"]["__TurboLndOpenServerStream"]["params"]["method"]; type BidiStreamMethod = TurboLndElectrobunRpcSchema["bun"]["requests"]["__TurboLndOpenBidiStream"]["params"]["method"]; type StreamSubscription = { remoteId: string | null; cancelled: boolean; onResponse: OnResponseCallback; onError: OnErrorCallback; }; let streamListenerAttached = false; let nextServerLocalId = 1; let nextBidiLocalId = 1; const serverSubscriptions = new Map(); const bidiSubscriptions = new Map(); function hasSubscriptions(): boolean { return serverSubscriptions.size > 0 || bidiSubscriptions.size > 0; } function ensureStreamListener() { if (streamListenerAttached) { return; } const rpc = ensureElectrobunRpc(); rpc.addMessageListener("__TurboLndStreamEvent", onStreamEvent); streamListenerAttached = true; } function maybeDetachStreamListener() { if (!streamListenerAttached || hasSubscriptions()) { return; } const rpc = ensureElectrobunRpc(); rpc.removeMessageListener("__TurboLndStreamEvent", onStreamEvent); streamListenerAttached = false; } function handleStreamEventForMap( event: StreamEvent, subscriptions: Map ) { for (const [id, subscription] of subscriptions) { if (subscription.remoteId !== event.subscriptionId) { continue; } if (event.type === "data") { subscription.onResponse(event.data ?? ""); continue; } const error = event.type === "error" ? (event.error ?? "Unknown Electrobun stream error.") : "Electrobun stream ended."; subscription.onError(error); subscriptions.delete(id); } } function onStreamEvent(event: StreamEvent) { handleStreamEventForMap(event, serverSubscriptions); handleStreamEventForMap(event, bidiSubscriptions); maybeDetachStreamListener(); } async function invokeUnary(method: UnaryMethod, data: ProtobufBase64) { const rpc = ensureElectrobunRpc(); const response = await rpc.request.__TurboLndUnary({ method, data }); return response.data; } function openServerStream( method: ServerStreamMethod, data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback ): UnsubscribeFromStream { const rpc = ensureElectrobunRpc(); const localId = nextServerLocalId++; serverSubscriptions.set(localId, { remoteId: null, cancelled: false, onResponse, onError, }); ensureStreamListener(); rpc.request .__TurboLndOpenServerStream({ method, data }) .then(({ subscriptionId }: { subscriptionId: string }) => { const subscription = serverSubscriptions.get(localId); if (!subscription) { return; } subscription.remoteId = subscriptionId; if (!subscription.cancelled) { return; } serverSubscriptions.delete(localId); rpc.request.__TurboLndCloseServerStream({ subscriptionId }); maybeDetachStreamListener(); }) .catch((error: unknown) => { const subscription = serverSubscriptions.get(localId); if (!subscription) { return; } serverSubscriptions.delete(localId); subscription.onError(error instanceof Error ? error.message : String(error)); maybeDetachStreamListener(); }); return () => { const subscription = serverSubscriptions.get(localId); if (!subscription) { return; } subscription.cancelled = true; if (!subscription.remoteId) { return; } const remoteId = subscription.remoteId; serverSubscriptions.delete(localId); rpc.request.__TurboLndCloseServerStream({ subscriptionId: remoteId }); maybeDetachStreamListener(); }; } function openBidiStream( method: BidiStreamMethod, onResponse: OnResponseCallback, onError: OnErrorCallback ): WriteableStream { const rpc = ensureElectrobunRpc(); const localId = nextBidiLocalId++; bidiSubscriptions.set(localId, { remoteId: null, cancelled: false, onResponse, onError, }); ensureStreamListener(); rpc.request .__TurboLndOpenBidiStream({ method }) .then(({ subscriptionId }: { subscriptionId: string }) => { const subscription = bidiSubscriptions.get(localId); if (!subscription) { return; } subscription.remoteId = subscriptionId; if (!subscription.cancelled) { return; } bidiSubscriptions.delete(localId); rpc.request.__TurboLndStopBidiStream({ subscriptionId }); maybeDetachStreamListener(); }) .catch((error: unknown) => { const subscription = bidiSubscriptions.get(localId); if (!subscription) { return; } bidiSubscriptions.delete(localId); subscription.onError(error instanceof Error ? error.message : String(error)); maybeDetachStreamListener(); }); return { send(dataB64: ProtobufBase64): boolean { const subscription = bidiSubscriptions.get(localId); if (!subscription || subscription.cancelled || !subscription.remoteId) { return false; } rpc.request .__TurboLndSendBidiStream({ subscriptionId: subscription.remoteId, data: dataB64, }) .then(({ sent }: { sent: boolean }) => { if (!sent) { subscription.onError(`${method} send rejected by Electrobun backend.`); } }) .catch((error: unknown) => { subscription.onError(error instanceof Error ? error.message : String(error)); }); return true; }, stop(): boolean { const subscription = bidiSubscriptions.get(localId); if (!subscription) { return false; } subscription.cancelled = true; if (!subscription.remoteId) { return true; } const remoteId = subscription.remoteId; bidiSubscriptions.delete(localId); rpc.request.__TurboLndStopBidiStream({ subscriptionId: remoteId }); maybeDetachStreamListener(); return true; }, }; } const TurboLndElectrobunView = { async start(args: string) { const rpc = ensureElectrobunRpc(); return rpc.request.__TurboLndStart(args); }, async walletBalance(data: ProtobufBase64) { return invokeUnary("walletBalance", data); }, async channelBalance(data: ProtobufBase64) { return invokeUnary("channelBalance", data); }, async getTransactions(data: ProtobufBase64) { return invokeUnary("getTransactions", data); }, async estimateFee(data: ProtobufBase64) { return invokeUnary("estimateFee", data); }, async sendCoins(data: ProtobufBase64) { return invokeUnary("sendCoins", data); }, async listUnspent(data: ProtobufBase64) { return invokeUnary("listUnspent", data); }, async sendMany(data: ProtobufBase64) { return invokeUnary("sendMany", data); }, async newAddress(data: ProtobufBase64) { return invokeUnary("newAddress", data); }, async signMessage(data: ProtobufBase64) { return invokeUnary("signMessage", data); }, async verifyMessage(data: ProtobufBase64) { return invokeUnary("verifyMessage", data); }, async connectPeer(data: ProtobufBase64) { return invokeUnary("connectPeer", data); }, async disconnectPeer(data: ProtobufBase64) { return invokeUnary("disconnectPeer", data); }, async listPeers(data: ProtobufBase64) { return invokeUnary("listPeers", data); }, async getInfo(data: ProtobufBase64) { return invokeUnary("getInfo", data); }, async getDebugInfo(data: ProtobufBase64) { return invokeUnary("getDebugInfo", data); }, async getRecoveryInfo(data: ProtobufBase64) { return invokeUnary("getRecoveryInfo", data); }, async pendingChannels(data: ProtobufBase64) { return invokeUnary("pendingChannels", data); }, async listChannels(data: ProtobufBase64) { return invokeUnary("listChannels", data); }, async closedChannels(data: ProtobufBase64) { return invokeUnary("closedChannels", data); }, async openChannelSync(data: ProtobufBase64) { return invokeUnary("openChannelSync", data); }, async batchOpenChannel(data: ProtobufBase64) { return invokeUnary("batchOpenChannel", data); }, async fundingStateStep(data: ProtobufBase64) { return invokeUnary("fundingStateStep", data); }, async abandonChannel(data: ProtobufBase64) { return invokeUnary("abandonChannel", data); }, async addInvoice(data: ProtobufBase64) { return invokeUnary("addInvoice", data); }, async listInvoices(data: ProtobufBase64) { return invokeUnary("listInvoices", data); }, async lookupInvoice(data: ProtobufBase64) { return invokeUnary("lookupInvoice", data); }, async deleteCanceledInvoice(data: ProtobufBase64) { return invokeUnary("deleteCanceledInvoice", data); }, async decodePayReq(data: ProtobufBase64) { return invokeUnary("decodePayReq", data); }, async listPayments(data: ProtobufBase64) { return invokeUnary("listPayments", data); }, async deletePayment(data: ProtobufBase64) { return invokeUnary("deletePayment", data); }, async deleteAllPayments(data: ProtobufBase64) { return invokeUnary("deleteAllPayments", data); }, async describeGraph(data: ProtobufBase64) { return invokeUnary("describeGraph", data); }, async getNodeMetrics(data: ProtobufBase64) { return invokeUnary("getNodeMetrics", data); }, async getChanInfo(data: ProtobufBase64) { return invokeUnary("getChanInfo", data); }, async getNodeInfo(data: ProtobufBase64) { return invokeUnary("getNodeInfo", data); }, async queryRoutes(data: ProtobufBase64) { return invokeUnary("queryRoutes", data); }, async getNetworkInfo(data: ProtobufBase64) { return invokeUnary("getNetworkInfo", data); }, async stopDaemon(data: ProtobufBase64) { return invokeUnary("stopDaemon", data); }, async debugLevel(data: ProtobufBase64) { return invokeUnary("debugLevel", data); }, async feeReport(data: ProtobufBase64) { return invokeUnary("feeReport", data); }, async updateChannelPolicy(data: ProtobufBase64) { return invokeUnary("updateChannelPolicy", data); }, async forwardingHistory(data: ProtobufBase64) { return invokeUnary("forwardingHistory", data); }, async exportChannelBackup(data: ProtobufBase64) { return invokeUnary("exportChannelBackup", data); }, async exportAllChannelBackups(data: ProtobufBase64) { return invokeUnary("exportAllChannelBackups", data); }, async verifyChanBackup(data: ProtobufBase64) { return invokeUnary("verifyChanBackup", data); }, async restoreChannelBackups(data: ProtobufBase64) { return invokeUnary("restoreChannelBackups", data); }, async bakeMacaroon(data: ProtobufBase64) { return invokeUnary("bakeMacaroon", data); }, async listMacaroonIDs(data: ProtobufBase64) { return invokeUnary("listMacaroonIDs", data); }, async deleteMacaroonID(data: ProtobufBase64) { return invokeUnary("deleteMacaroonID", data); }, async listPermissions(data: ProtobufBase64) { return invokeUnary("listPermissions", data); }, async checkMacaroonPermissions(data: ProtobufBase64) { return invokeUnary("checkMacaroonPermissions", data); }, async sendCustomMessage(data: ProtobufBase64) { return invokeUnary("sendCustomMessage", data); }, async sendOnionMessage(data: ProtobufBase64) { return invokeUnary("sendOnionMessage", data); }, async listAliases(data: ProtobufBase64) { return invokeUnary("listAliases", data); }, async lookupHtlcResolution(data: ProtobufBase64) { return invokeUnary("lookupHtlcResolution", data); }, async genSeed(data: ProtobufBase64) { return invokeUnary("genSeed", data); }, async initWallet(data: ProtobufBase64) { return invokeUnary("initWallet", data); }, async unlockWallet(data: ProtobufBase64) { return invokeUnary("unlockWallet", data); }, async changePassword(data: ProtobufBase64) { return invokeUnary("changePassword", data); }, async getState(data: ProtobufBase64) { return invokeUnary("getState", data); }, async autopilotStatus(data: ProtobufBase64) { return invokeUnary("autopilotStatus", data); }, async autopilotModifyStatus(data: ProtobufBase64) { return invokeUnary("autopilotModifyStatus", data); }, async autopilotQueryScores(data: ProtobufBase64) { return invokeUnary("autopilotQueryScores", data); }, async autopilotSetScores(data: ProtobufBase64) { return invokeUnary("autopilotSetScores", data); }, async invoicesCancelInvoice(data: ProtobufBase64) { return invokeUnary("invoicesCancelInvoice", data); }, async invoicesAddHoldInvoice(data: ProtobufBase64) { return invokeUnary("invoicesAddHoldInvoice", data); }, async invoicesSettleInvoice(data: ProtobufBase64) { return invokeUnary("invoicesSettleInvoice", data); }, async invoicesLookupInvoiceV2(data: ProtobufBase64) { return invokeUnary("invoicesLookupInvoiceV2", data); }, async neutrinoKitStatus(data: ProtobufBase64) { return invokeUnary("neutrinoKitStatus", data); }, async neutrinoKitAddPeer(data: ProtobufBase64) { return invokeUnary("neutrinoKitAddPeer", data); }, async neutrinoKitDisconnectPeer(data: ProtobufBase64) { return invokeUnary("neutrinoKitDisconnectPeer", data); }, async neutrinoKitIsBanned(data: ProtobufBase64) { return invokeUnary("neutrinoKitIsBanned", data); }, async neutrinoKitGetBlockHeader(data: ProtobufBase64) { return invokeUnary("neutrinoKitGetBlockHeader", data); }, async neutrinoKitGetBlock(data: ProtobufBase64) { return invokeUnary("neutrinoKitGetBlock", data); }, async neutrinoKitGetCFilter(data: ProtobufBase64) { return invokeUnary("neutrinoKitGetCFilter", data); }, async neutrinoKitGetBlockHash(data: ProtobufBase64) { return invokeUnary("neutrinoKitGetBlockHash", data); }, async peersUpdateNodeAnnouncement(data: ProtobufBase64) { return invokeUnary("peersUpdateNodeAnnouncement", data); }, async routerEstimateRouteFee(data: ProtobufBase64) { return invokeUnary("routerEstimateRouteFee", data); }, async routerSendToRouteV2(data: ProtobufBase64) { return invokeUnary("routerSendToRouteV2", data); }, async routerResetMissionControl(data: ProtobufBase64) { return invokeUnary("routerResetMissionControl", data); }, async routerQueryMissionControl(data: ProtobufBase64) { return invokeUnary("routerQueryMissionControl", data); }, async routerXImportMissionControl(data: ProtobufBase64) { return invokeUnary("routerXImportMissionControl", data); }, async routerGetMissionControlConfig(data: ProtobufBase64) { return invokeUnary("routerGetMissionControlConfig", data); }, async routerSetMissionControlConfig(data: ProtobufBase64) { return invokeUnary("routerSetMissionControlConfig", data); }, async routerQueryProbability(data: ProtobufBase64) { return invokeUnary("routerQueryProbability", data); }, async routerBuildRoute(data: ProtobufBase64) { return invokeUnary("routerBuildRoute", data); }, async routerUpdateChanStatus(data: ProtobufBase64) { return invokeUnary("routerUpdateChanStatus", data); }, async routerXAddLocalChanAliases(data: ProtobufBase64) { return invokeUnary("routerXAddLocalChanAliases", data); }, async routerXDeleteLocalChanAliases(data: ProtobufBase64) { return invokeUnary("routerXDeleteLocalChanAliases", data); }, async routerXFindBaseLocalChanAlias(data: ProtobufBase64) { return invokeUnary("routerXFindBaseLocalChanAlias", data); }, async routerDeleteForwardingHistory(data: ProtobufBase64) { return invokeUnary("routerDeleteForwardingHistory", data); }, async signerSignOutputRaw(data: ProtobufBase64) { return invokeUnary("signerSignOutputRaw", data); }, async signerComputeInputScript(data: ProtobufBase64) { return invokeUnary("signerComputeInputScript", data); }, async signerSignMessage(data: ProtobufBase64) { return invokeUnary("signerSignMessage", data); }, async signerVerifyMessage(data: ProtobufBase64) { return invokeUnary("signerVerifyMessage", data); }, async signerDeriveSharedKey(data: ProtobufBase64) { return invokeUnary("signerDeriveSharedKey", data); }, async signerMuSig2CombineKeys(data: ProtobufBase64) { return invokeUnary("signerMuSig2CombineKeys", data); }, async signerMuSig2CreateSession(data: ProtobufBase64) { return invokeUnary("signerMuSig2CreateSession", data); }, async signerMuSig2RegisterNonces(data: ProtobufBase64) { return invokeUnary("signerMuSig2RegisterNonces", data); }, async signerMuSig2RegisterCombinedNonce(data: ProtobufBase64) { return invokeUnary("signerMuSig2RegisterCombinedNonce", data); }, async signerMuSig2GetCombinedNonce(data: ProtobufBase64) { return invokeUnary("signerMuSig2GetCombinedNonce", data); }, async signerMuSig2Sign(data: ProtobufBase64) { return invokeUnary("signerMuSig2Sign", data); }, async signerMuSig2CombineSig(data: ProtobufBase64) { return invokeUnary("signerMuSig2CombineSig", data); }, async signerMuSig2Cleanup(data: ProtobufBase64) { return invokeUnary("signerMuSig2Cleanup", data); }, async versionerGetVersion(data: ProtobufBase64) { return invokeUnary("versionerGetVersion", data); }, async walletKitListUnspent(data: ProtobufBase64) { return invokeUnary("walletKitListUnspent", data); }, async walletKitLeaseOutput(data: ProtobufBase64) { return invokeUnary("walletKitLeaseOutput", data); }, async walletKitReleaseOutput(data: ProtobufBase64) { return invokeUnary("walletKitReleaseOutput", data); }, async walletKitListLeases(data: ProtobufBase64) { return invokeUnary("walletKitListLeases", data); }, async walletKitDeriveNextKey(data: ProtobufBase64) { return invokeUnary("walletKitDeriveNextKey", data); }, async walletKitDeriveKey(data: ProtobufBase64) { return invokeUnary("walletKitDeriveKey", data); }, async walletKitNextAddr(data: ProtobufBase64) { return invokeUnary("walletKitNextAddr", data); }, async walletKitGetTransaction(data: ProtobufBase64) { return invokeUnary("walletKitGetTransaction", data); }, async walletKitListAccounts(data: ProtobufBase64) { return invokeUnary("walletKitListAccounts", data); }, async walletKitRequiredReserve(data: ProtobufBase64) { return invokeUnary("walletKitRequiredReserve", data); }, async walletKitListAddresses(data: ProtobufBase64) { return invokeUnary("walletKitListAddresses", data); }, async walletKitSignMessageWithAddr(data: ProtobufBase64) { return invokeUnary("walletKitSignMessageWithAddr", data); }, async walletKitVerifyMessageWithAddr(data: ProtobufBase64) { return invokeUnary("walletKitVerifyMessageWithAddr", data); }, async walletKitImportAccount(data: ProtobufBase64) { return invokeUnary("walletKitImportAccount", data); }, async walletKitImportPublicKey(data: ProtobufBase64) { return invokeUnary("walletKitImportPublicKey", data); }, async walletKitImportTapscript(data: ProtobufBase64) { return invokeUnary("walletKitImportTapscript", data); }, async walletKitPublishTransaction(data: ProtobufBase64) { return invokeUnary("walletKitPublishTransaction", data); }, async walletKitSubmitPackage(data: ProtobufBase64) { return invokeUnary("walletKitSubmitPackage", data); }, async walletKitRemoveTransaction(data: ProtobufBase64) { return invokeUnary("walletKitRemoveTransaction", data); }, async walletKitSendOutputs(data: ProtobufBase64) { return invokeUnary("walletKitSendOutputs", data); }, async walletKitEstimateFee(data: ProtobufBase64) { return invokeUnary("walletKitEstimateFee", data); }, async walletKitPendingSweeps(data: ProtobufBase64) { return invokeUnary("walletKitPendingSweeps", data); }, async walletKitBumpFee(data: ProtobufBase64) { return invokeUnary("walletKitBumpFee", data); }, async walletKitBumpForceCloseFee(data: ProtobufBase64) { return invokeUnary("walletKitBumpForceCloseFee", data); }, async walletKitListSweeps(data: ProtobufBase64) { return invokeUnary("walletKitListSweeps", data); }, async walletKitLabelTransaction(data: ProtobufBase64) { return invokeUnary("walletKitLabelTransaction", data); }, async walletKitFundPsbt(data: ProtobufBase64) { return invokeUnary("walletKitFundPsbt", data); }, async walletKitSignPsbt(data: ProtobufBase64) { return invokeUnary("walletKitSignPsbt", data); }, async walletKitFinalizePsbt(data: ProtobufBase64) { return invokeUnary("walletKitFinalizePsbt", data); }, async watchtowerGetInfo(data: ProtobufBase64) { return invokeUnary("watchtowerGetInfo", data); }, async watchtowerClientAddTower(data: ProtobufBase64) { return invokeUnary("watchtowerClientAddTower", data); }, async watchtowerClientRemoveTower(data: ProtobufBase64) { return invokeUnary("watchtowerClientRemoveTower", data); }, async watchtowerClientDeactivateTower(data: ProtobufBase64) { return invokeUnary("watchtowerClientDeactivateTower", data); }, async watchtowerClientTerminateSession(data: ProtobufBase64) { return invokeUnary("watchtowerClientTerminateSession", data); }, async watchtowerClientListTowers(data: ProtobufBase64) { return invokeUnary("watchtowerClientListTowers", data); }, async watchtowerClientGetTowerInfo(data: ProtobufBase64) { return invokeUnary("watchtowerClientGetTowerInfo", data); }, async watchtowerClientStats(data: ProtobufBase64) { return invokeUnary("watchtowerClientStats", data); }, async watchtowerClientPolicy(data: ProtobufBase64) { return invokeUnary("watchtowerClientPolicy", data); }, subscribeTransactions(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("subscribeTransactions", data, onResponse, onError); }, subscribePeerEvents(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("subscribePeerEvents", data, onResponse, onError); }, subscribeChannelEvents(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("subscribeChannelEvents", data, onResponse, onError); }, openChannel(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("openChannel", data, onResponse, onError); }, closeChannel(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("closeChannel", data, onResponse, onError); }, subscribeInvoices(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("subscribeInvoices", data, onResponse, onError); }, subscribeChannelGraph(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("subscribeChannelGraph", data, onResponse, onError); }, subscribeChannelBackups(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("subscribeChannelBackups", data, onResponse, onError); }, subscribeCustomMessages(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("subscribeCustomMessages", data, onResponse, onError); }, subscribeOnionMessages(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("subscribeOnionMessages", data, onResponse, onError); }, subscribeState(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("subscribeState", data, onResponse, onError); }, chainNotifierRegisterConfirmationsNtfn(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("chainNotifierRegisterConfirmationsNtfn", data, onResponse, onError); }, chainNotifierRegisterSpendNtfn(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("chainNotifierRegisterSpendNtfn", data, onResponse, onError); }, chainNotifierRegisterBlockEpochNtfn(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("chainNotifierRegisterBlockEpochNtfn", data, onResponse, onError); }, invoicesSubscribeSingleInvoice(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("invoicesSubscribeSingleInvoice", data, onResponse, onError); }, routerSendPaymentV2(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("routerSendPaymentV2", data, onResponse, onError); }, routerTrackPaymentV2(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("routerTrackPaymentV2", data, onResponse, onError); }, routerTrackPayments(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("routerTrackPayments", data, onResponse, onError); }, routerSubscribeHtlcEvents(data: ProtobufBase64, onResponse: OnResponseCallback, onError: OnErrorCallback) { return openServerStream("routerSubscribeHtlcEvents", data, onResponse, onError); }, channelAcceptor(onResponse: OnResponseCallback, onError: OnErrorCallback) { return openBidiStream("channelAcceptor", onResponse, onError); }, registerRPCMiddleware(onResponse: OnResponseCallback, onError: OnErrorCallback) { return openBidiStream("registerRPCMiddleware", onResponse, onError); }, invoicesHtlcModifier(onResponse: OnResponseCallback, onError: OnErrorCallback) { return openBidiStream("invoicesHtlcModifier", onResponse, onError); }, routerHtlcInterceptor(onResponse: OnResponseCallback, onError: OnErrorCallback) { return openBidiStream("routerHtlcInterceptor", onResponse, onError); }, } satisfies Spec; export default TurboLndElectrobunView;