diff --git a/Dockerfile b/Dockerfile index e5f0ded53..cdd97e52b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM node:20-alpine AS frontend +ARG BUILDPLATFORM + +FROM --platform=$BUILDPLATFORM node:20-alpine AS frontend # Set the base path for the frontend build # This can be overridden at build time with --build-arg BASE_PATH= e.g. --build-arg BASE_PATH=/hub diff --git a/README.md b/README.md index c92fc752f..4d0fe0170 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ Go to the [Deploy it yourself](#deploy-it-yourself) section below. By default Alby Hub uses the embedded LDK based lightning node. Optionally it can be configured to use an external node: - LND +- LDK Server - Phoenixd - Cashu - CLN @@ -236,6 +237,58 @@ _To configure via env, the following parameters must be provided:_ - `LND_CERT_FILE`: the location where LND's `tls.cert` file can be found (used with the LND backend) - `LND_MACAROON_FILE`: the location where LND's `admin.macaroon` file can be found (used with the LND backend) +### LDK Server backend parameters + +LDK Server can be configured via env or the UI. + +To configure via env, provide: + +- `LN_BACKEND_TYPE`: `LDK_SERVER` +- `LDK_SERVER_GRPC_ADDRESS`: the `ldk-server` gRPC address, e.g. `127.0.0.1:3536` +- `LDK_SERVER_TLS_CERT_FILE`: path to the `ldk-server` TLS certificate, usually `/tls.crt` +- `LDK_SERVER_API_KEY`: the hex-encoded API key used by `ldk-server` + +```bash +xxd -p -c 64 /var/lib/ldk-server/bitcoin/api_key +``` + +If Alby Hub runs on a different machine than `ldk-server`: + +- set `grpc_service_address` in `ldk-server` to a reachable bind address such as `0.0.0.0:3536` +- add the public hostname or IP to `[tls].hosts` +- copy `tls.crt` to the Hub machine +- keep clocks reasonably in sync, because `ldk-server` rejects stale HMAC timestamps + +Troubleshooting remote auth: + +- `LDK_SERVER_API_KEY` must be the 64-character hex string derived from the raw `api_key` file, not the raw file bytes themselves +- if you use `ldk-server-cli`, pass the hex string directly or inline the `xxd` call +- do not use `KEY="$(xxd -p -c 64 /path/to/api_key)" ldk-server-cli ... --api-key "$KEY"` because Bash expands `"$KEY"` before that temporary assignment is applied + +Working examples: + +```bash +KEY="$(xxd -p -c 64 /var/lib/ldk-server/bitcoin/api_key)" +ldk-server-cli --base-url 141.95.84.44:3536 --api-key "$KEY" --tls-cert /path/to/tls.crt get-node-info +``` + +```bash +ldk-server-cli --base-url 141.95.84.44:3536 --api-key "$(xxd -p -c 64 /var/lib/ldk-server/bitcoin/api_key)" --tls-cert /path/to/tls.crt get-node-info +``` + +#### Optional: JIT receiving over LSPS2 + +If you want Hub to receive via `ldk-server` without pre-existing inbound liquidity, configure an LSPS2 client in `ldk-server`: + +```toml +[liquidity.lsps2_client] +node_pubkey = "" +address = ":9735" +# token = "" +``` + +With that in place, Hub can use `ldk-server`'s JIT invoice RPCs for receiving through the remote node. + ### LDK Backend parameters - `LDK_ESPLORA_SERVER`: By default the optimized Alby esplora is used. You can configure your own esplora server (note: the public blockstream one is slow and can cause onchain syncing and issues with opening channels) diff --git a/api/api.go b/api/api.go index da75b8180..3b61b91d5 100644 --- a/api/api.go +++ b/api/api.go @@ -1470,6 +1470,14 @@ func (api *api) RequestMempoolApi(ctx context.Context, endpoint string) (interfa } if res.StatusCode != http.StatusOK { + if strings.HasPrefix(endpoint, "/v1/lightning/nodes/") && strings.Contains(string(body), `"error":"Failed to get node"`) { + logger.Logger.WithFields(logrus.Fields{ + "endpoint": endpoint, + "status_code": res.StatusCode, + }).Debug("Mempool node details unavailable") + return map[string]interface{}{}, nil + } + logger.Logger.WithFields(logrus.Fields{ "endpoint": endpoint, "status_code": res.StatusCode, @@ -1519,7 +1527,7 @@ func (api *api) GetInfo(ctx context.Context) (*InfoResponse, error) { info.LdkVssEnabled = ldkVssEnabled == "true" info.JitChannelsEnabled = jitChannelsEnabled != "false" info.VssSupported = backendType == config.LDKBackendType && api.cfg.GetEnv().LDKVssUrl != "" - info.SupportsBolt12 = backendType == config.LDKBackendType || backendType == config.CLNBackendType + info.SupportsBolt12 = backendType == config.LDKBackendType || backendType == config.CLNBackendType || backendType == config.LDKServerBackendType info.AutoUnlockPasswordEnabled = autoUnlockPassword != "" info.AutoUnlockPasswordSupported = api.cfg.GetEnv().IsDefaultClientId() info.Relays = []InfoResponseRelay{} @@ -1816,6 +1824,33 @@ func (api *api) Setup(ctx context.Context, setupRequest *SetupRequest) error { } } + if setupRequest.LDKServerAddress != "" { + err = api.cfg.SetUpdate("LDKServerAddress", setupRequest.LDKServerAddress, setupRequest.UnlockPassword) + if err != nil { + logger.Logger.WithError(err).Error("Failed to save ldk-server address") + return err + } + } + if setupRequest.LDKServerTlsCertFile != "" { + certBytes, err := os.ReadFile(setupRequest.LDKServerTlsCertFile) + if err != nil { + logger.Logger.WithError(err).Error("Failed to read ldk-server TLS cert file") + return err + } + err = api.cfg.SetUpdate("LDKServerTlsCertPem", string(certBytes), setupRequest.UnlockPassword) + if err != nil { + logger.Logger.WithError(err).Error("Failed to save ldk-server TLS cert") + return err + } + } + if setupRequest.LDKServerApiKey != "" { + err = api.cfg.SetUpdate("LDKServerApiKey", setupRequest.LDKServerApiKey, setupRequest.UnlockPassword) + if err != nil { + logger.Logger.WithError(err).Error("Failed to save ldk-server API key") + return err + } + } + if setupRequest.CashuMintUrl != "" { err = api.cfg.SetUpdate("CashuMintUrl", setupRequest.CashuMintUrl, setupRequest.UnlockPassword) if err != nil { diff --git a/api/models.go b/api/models.go index 5448465dc..0be41b1d1 100644 --- a/api/models.go +++ b/api/models.go @@ -273,6 +273,11 @@ type SetupRequest struct { PhoenixdAddress string `json:"phoenixdAddress"` PhoenixdAuthorization string `json:"phoenixdAuthorization"` + // ldk-server fields + LDKServerAddress string `json:"ldkServerAddress"` + LDKServerTlsCertFile string `json:"ldkServerTlsCertFile"` + LDKServerApiKey string `json:"ldkServerApiKey"` + // Cashu fields CashuMintUrl string `json:"cashuMintUrl"` @@ -304,38 +309,38 @@ type InfoResponseRelay struct { } type InfoResponse struct { - BackendType string `json:"backendType"` - SetupCompleted bool `json:"setupCompleted"` - OAuthRedirect bool `json:"oauthRedirect"` - Running bool `json:"running"` - Unlocked bool `json:"unlocked"` - AlbyAuthUrl string `json:"albyAuthUrl"` - NextBackupReminder string `json:"nextBackupReminder"` - AlbyUserIdentifier string `json:"albyUserIdentifier"` - AlbyAccountConnected bool `json:"albyAccountConnected"` - Version string `json:"version"` - Network string `json:"network"` - EnableAdvancedSetup bool `json:"enableAdvancedSetup"` - LdkVssEnabled bool `json:"ldkVssEnabled"` - VssSupported bool `json:"vssSupported"` - StartupState string `json:"startupState"` - StartupError string `json:"startupError"` - StartupErrorTime time.Time `json:"startupErrorTime"` - AutoUnlockPasswordSupported bool `json:"autoUnlockPasswordSupported"` - AutoUnlockPasswordEnabled bool `json:"autoUnlockPasswordEnabled"` - Currency string `json:"currency"` - BitcoinDisplayFormat string `json:"bitcoinDisplayFormat"` - Relays []InfoResponseRelay `json:"relays"` - NodeAlias string `json:"nodeAlias"` - MempoolUrl string `json:"mempoolUrl"` - ChainDataSourceType string `json:"chainDataSourceType,omitempty"` - ChainDataSourceAddress string `json:"chainDataSourceAddress,omitempty"` - JitChannelsLiquiditySource string `json:"jitChannelsLiquiditySource,omitempty"` - JitChannelsMinPaymentSizeMsat *uint64 `json:"jitChannelsMinPaymentSizeMsat,omitempty"` - JitChannelsMaxPaymentSizeMsat *uint64 `json:"jitChannelsMaxPaymentSizeMsat,omitempty"` - JitChannelsEnabled bool `json:"jitChannelsEnabled"` - HideUpdateBanner bool `json:"hideUpdateBanner"` - SupportsBolt12 bool `json:"supportsBolt12"` + BackendType string `json:"backendType"` + SetupCompleted bool `json:"setupCompleted"` + OAuthRedirect bool `json:"oauthRedirect"` + Running bool `json:"running"` + Unlocked bool `json:"unlocked"` + AlbyAuthUrl string `json:"albyAuthUrl"` + NextBackupReminder string `json:"nextBackupReminder"` + AlbyUserIdentifier string `json:"albyUserIdentifier"` + AlbyAccountConnected bool `json:"albyAccountConnected"` + Version string `json:"version"` + Network string `json:"network"` + EnableAdvancedSetup bool `json:"enableAdvancedSetup"` + LdkVssEnabled bool `json:"ldkVssEnabled"` + VssSupported bool `json:"vssSupported"` + StartupState string `json:"startupState"` + StartupError string `json:"startupError"` + StartupErrorTime time.Time `json:"startupErrorTime"` + AutoUnlockPasswordSupported bool `json:"autoUnlockPasswordSupported"` + AutoUnlockPasswordEnabled bool `json:"autoUnlockPasswordEnabled"` + Currency string `json:"currency"` + BitcoinDisplayFormat string `json:"bitcoinDisplayFormat"` + Relays []InfoResponseRelay `json:"relays"` + NodeAlias string `json:"nodeAlias"` + MempoolUrl string `json:"mempoolUrl"` + ChainDataSourceType string `json:"chainDataSourceType,omitempty"` + ChainDataSourceAddress string `json:"chainDataSourceAddress,omitempty"` + JitChannelsLiquiditySource string `json:"jitChannelsLiquiditySource,omitempty"` + JitChannelsMinPaymentSizeMsat *uint64 `json:"jitChannelsMinPaymentSizeMsat,omitempty"` + JitChannelsMaxPaymentSizeMsat *uint64 `json:"jitChannelsMaxPaymentSizeMsat,omitempty"` + JitChannelsEnabled bool `json:"jitChannelsEnabled"` + HideUpdateBanner bool `json:"hideUpdateBanner"` + SupportsBolt12 bool `json:"supportsBolt12"` } type UpdateSettingsRequest struct { diff --git a/config/config.go b/config/config.go index 57a176858..e9096778f 100644 --- a/config/config.go +++ b/config/config.go @@ -112,6 +112,31 @@ func (cfg *config) init(env *AppConfig) error { } } + // ldk-server specific to support env variables + if cfg.Env.LDKServerAddress != "" { + err := cfg.SetUpdate("LDKServerAddress", cfg.Env.LDKServerAddress, "") + if err != nil { + return err + } + } + if cfg.Env.LDKServerTlsCertFile != "" { + certBytes, err := os.ReadFile(cfg.Env.LDKServerTlsCertFile) + if err != nil { + logger.Logger.WithError(err).Error("Failed to read ldk-server TLS cert file") + return err + } + err = cfg.SetUpdate("LDKServerTlsCertPem", string(certBytes), "") + if err != nil { + return err + } + } + if cfg.Env.LDKServerApiKey != "" { + err := cfg.SetUpdate("LDKServerApiKey", cfg.Env.LDKServerApiKey, "") + if err != nil { + return err + } + } + // CLN specific to support env variables if cfg.Env.CLNAddress != "" { err := cfg.SetUpdate("CLNAddress", cfg.Env.CLNAddress, "") diff --git a/config/models.go b/config/models.go index 0fb887097..00c8e65b0 100644 --- a/config/models.go +++ b/config/models.go @@ -1,12 +1,13 @@ package config const ( - LNDBackendType = "LND" - LDKBackendType = "LDK" - PhoenixBackendType = "PHOENIX" - CashuBackendType = "CASHU" - CLNBackendType = "CLN" - BarkBackendType = "BARK" + LNDBackendType = "LND" + LDKBackendType = "LDK" + LDKServerBackendType = "LDK_SERVER" + PhoenixBackendType = "PHOENIX" + CashuBackendType = "CASHU" + CLNBackendType = "CLN" + BarkBackendType = "BARK" ) const ( @@ -47,6 +48,9 @@ type AppConfig struct { LDKBitcoindRpcPort string `envconfig:"LDK_BITCOIND_RPC_PORT"` LDKBitcoindRpcUser string `envconfig:"LDK_BITCOIND_RPC_USER"` LDKBitcoindRpcPassword string `envconfig:"LDK_BITCOIND_RPC_PASSWORD"` + LDKServerAddress string `envconfig:"LDK_SERVER_GRPC_ADDRESS"` + LDKServerTlsCertFile string `envconfig:"LDK_SERVER_TLS_CERT_FILE"` + LDKServerApiKey string `envconfig:"LDK_SERVER_API_KEY"` MempoolApi string `envconfig:"MEMPOOL_API" default:"https://mempool.space/api"` AlbyClientId string `envconfig:"ALBY_OAUTH_CLIENT_ID" default:"J2PbXS1yOf"` AlbyClientSecret string `envconfig:"ALBY_OAUTH_CLIENT_SECRET" default:"rABK2n16IWjLTZ9M1uKU"` diff --git a/frontend/src/components/PendingClosedChannelsAlert.tsx b/frontend/src/components/PendingClosedChannelsAlert.tsx index db48b3ac3..c35220485 100644 --- a/frontend/src/components/PendingClosedChannelsAlert.tsx +++ b/frontend/src/components/PendingClosedChannelsAlert.tsx @@ -18,8 +18,8 @@ export function PendingClosedChannelsAlert({ } const pendingDetails = [ - ...balance.pendingBalancesDetails, - ...balance.pendingSweepBalancesDetails, + ...(balance.pendingBalancesDetails ?? []), + ...(balance.pendingSweepBalancesDetails ?? []), ]; return ( diff --git a/frontend/src/lib/backendType.ts b/frontend/src/lib/backendType.ts index 026a4d620..32700c4ba 100644 --- a/frontend/src/lib/backendType.ts +++ b/frontend/src/lib/backendType.ts @@ -17,6 +17,11 @@ export const backendTypeConfigs: Record = { hasChannelManagement: true, hasNodeBackup: true, }, + LDK_SERVER: { + hasMnemonic: false, + hasChannelManagement: true, + hasNodeBackup: false, + }, PHOENIX: { hasMnemonic: false, hasChannelManagement: false, diff --git a/frontend/src/routes.tsx b/frontend/src/routes.tsx index 9cffc14f6..368b3ca3b 100644 --- a/frontend/src/routes.tsx +++ b/frontend/src/routes.tsx @@ -67,6 +67,7 @@ import { BarkForm } from "src/screens/setup/node/BarkForm"; import { CLNForm } from "src/screens/setup/node/CLNForm"; import { CashuForm } from "src/screens/setup/node/CashuForm"; import { LDKForm } from "src/screens/setup/node/LDKForm"; +import { LDKServerForm } from "src/screens/setup/node/LDKServerForm"; import { LNDForm } from "src/screens/setup/node/LNDForm"; import { PhoenixdForm } from "src/screens/setup/node/PhoenixdForm"; import { PresetNodeForm } from "src/screens/setup/node/PresetNodeForm"; @@ -558,6 +559,10 @@ const routes: RouteObject[] = [ path: "ldk", element: , }, + { + path: "ldk_server", + element: , + }, { path: "cln", element: , diff --git a/frontend/src/screens/setup/SetupNode.tsx b/frontend/src/screens/setup/SetupNode.tsx index c6b484be6..c468a0263 100644 --- a/frontend/src/screens/setup/SetupNode.tsx +++ b/frontend/src/screens/setup/SetupNode.tsx @@ -27,6 +27,10 @@ const backendTypeDisplayConfigs: Partial< title: "LDK", icon: , }, + LDK_SERVER: { + title: "LDK Server", + icon: , + }, PHOENIX: { title: "phoenixd", icon: , diff --git a/frontend/src/screens/setup/SetupSecurity.tsx b/frontend/src/screens/setup/SetupSecurity.tsx index 77fcd719a..e67ae1f37 100644 --- a/frontend/src/screens/setup/SetupSecurity.tsx +++ b/frontend/src/screens/setup/SetupSecurity.tsx @@ -96,6 +96,7 @@ export function SetupSecurity() { {store.nodeInfo.backendType === "LND" || + store.nodeInfo.backendType === "LDK_SERVER" || store.nodeInfo.backendType === "CLN" || store.nodeInfo.backendType === "PHOENIX" ? (
diff --git a/frontend/src/screens/setup/node/LDKServerForm.tsx b/frontend/src/screens/setup/node/LDKServerForm.tsx new file mode 100644 index 000000000..75ae46d27 --- /dev/null +++ b/frontend/src/screens/setup/node/LDKServerForm.tsx @@ -0,0 +1,72 @@ +import React from "react"; +import { useNavigate } from "react-router"; +import Container from "src/components/Container"; +import TwoColumnLayoutHeader from "src/components/TwoColumnLayoutHeader"; +import { Button } from "src/components/ui/button"; +import { Input } from "src/components/ui/input"; +import { Label } from "src/components/ui/label"; +import useSetupStore from "src/state/SetupStore"; + +export function LDKServerForm() { + const navigate = useNavigate(); + const setupStore = useSetupStore(); + const [ldkServerAddress, setLdkServerAddress] = React.useState( + setupStore.nodeInfo.ldkServerAddress || "127.0.0.1:3536" + ); + const [ldkServerTlsCertFile, setLdkServerTlsCertFile] = React.useState( + setupStore.nodeInfo.ldkServerTlsCertFile || "" + ); + const [ldkServerApiKey, setLdkServerApiKey] = React.useState( + setupStore.nodeInfo.ldkServerApiKey || "" + ); + + function onSubmit(e: React.FormEvent) { + e.preventDefault(); + setupStore.updateNodeInfo({ + backendType: "LDK_SERVER", + ldkServerAddress, + ldkServerTlsCertFile, + ldkServerApiKey, + }); + navigate("/setup/security"); + } + + return ( + + +
+
+ + setLdkServerAddress(e.target.value)} + /> +
+
+ + setLdkServerTlsCertFile(e.target.value)} + /> +
+
+ + setLdkServerApiKey(e.target.value)} + /> +
+ +
+
+ ); +} diff --git a/frontend/src/types.ts b/frontend/src/types.ts index d05867904..e752e9600 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -11,7 +11,14 @@ import { WalletMinimalIcon, } from "lucide-react"; -export type BackendType = "LND" | "LDK" | "PHOENIX" | "CASHU" | "CLN" | "BARK"; +export type BackendType = + | "LND" + | "LDK" + | "LDK_SERVER" + | "PHOENIX" + | "CASHU" + | "CLN" + | "BARK"; export type Nip47RequestMethod = | "get_info" @@ -474,6 +481,10 @@ export type SetupNodeInfo = Partial<{ phoenixdAddress?: string; phoenixdAuthorization?: string; + ldkServerAddress?: string; + ldkServerTlsCertFile?: string; + ldkServerApiKey?: string; + clnAddress?: string; clnLightningDir?: string; clnAddressHold?: string; diff --git a/lnclient/ldk-server/grpc/api/api.pb.go b/lnclient/ldk-server/grpc/api/api.pb.go new file mode 100644 index 000000000..3898644ee --- /dev/null +++ b/lnclient/ldk-server/grpc/api/api.pb.go @@ -0,0 +1,5048 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v3.21.12 +// source: api.proto + +package api + +import ( + events "github.com/getAlby/hub/lnclient/ldk-server/grpc/events" + types "github.com/getAlby/hub/lnclient/ldk-server/grpc/types" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Retrieve the latest node info like `node_id`, `current_best_block` etc. +// See more: +// - https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.node_id +// - https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.status +type GetNodeInfoRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetNodeInfoRequest) Reset() { + *x = GetNodeInfoRequest{} + mi := &file_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNodeInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeInfoRequest) ProtoMessage() {} + +func (x *GetNodeInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNodeInfoRequest.ProtoReflect.Descriptor instead. +func (*GetNodeInfoRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{0} +} + +// The response for the `GetNodeInfo` RPC. On failure, a gRPC error status is returned. +type GetNodeInfoResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The hex-encoded `node-id` or public key for our own lightning node. + NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + // The best block to which our Lightning wallet is currently synced. + // + // Should be always set, will never be `None`. + CurrentBestBlock *types.BestBlock `protobuf:"bytes,3,opt,name=current_best_block,json=currentBestBlock,proto3" json:"current_best_block,omitempty"` + // The timestamp, in seconds since start of the UNIX epoch, when we last successfully synced our Lightning wallet to + // the chain tip. + // + // Will be `None` if the wallet hasn't been synced yet. + LatestLightningWalletSyncTimestamp *uint64 `protobuf:"varint,4,opt,name=latest_lightning_wallet_sync_timestamp,json=latestLightningWalletSyncTimestamp,proto3,oneof" json:"latest_lightning_wallet_sync_timestamp,omitempty"` + // The timestamp, in seconds since start of the UNIX epoch, when we last successfully synced our on-chain + // wallet to the chain tip. + // + // Will be `None` if the wallet hasn’t been synced since the node was initialized. + LatestOnchainWalletSyncTimestamp *uint64 `protobuf:"varint,5,opt,name=latest_onchain_wallet_sync_timestamp,json=latestOnchainWalletSyncTimestamp,proto3,oneof" json:"latest_onchain_wallet_sync_timestamp,omitempty"` + // The timestamp, in seconds since start of the UNIX epoch, when we last successfully update our fee rate cache. + // + // Will be `None` if the cache hasn’t been updated since the node was initialized. + LatestFeeRateCacheUpdateTimestamp *uint64 `protobuf:"varint,6,opt,name=latest_fee_rate_cache_update_timestamp,json=latestFeeRateCacheUpdateTimestamp,proto3,oneof" json:"latest_fee_rate_cache_update_timestamp,omitempty"` + // The timestamp, in seconds since start of the UNIX epoch, when the last rapid gossip sync (RGS) snapshot we + // successfully applied was generated. + // + // Will be `None` if RGS isn’t configured or the snapshot hasn’t been updated since the node was initialized. + LatestRgsSnapshotTimestamp *uint64 `protobuf:"varint,7,opt,name=latest_rgs_snapshot_timestamp,json=latestRgsSnapshotTimestamp,proto3,oneof" json:"latest_rgs_snapshot_timestamp,omitempty"` + // The timestamp, in seconds since start of the UNIX epoch, when we last broadcasted a node announcement. + // + // Will be `None` if we have no public channels or we haven’t broadcasted since the node was initialized. + LatestNodeAnnouncementBroadcastTimestamp *uint64 `protobuf:"varint,8,opt,name=latest_node_announcement_broadcast_timestamp,json=latestNodeAnnouncementBroadcastTimestamp,proto3,oneof" json:"latest_node_announcement_broadcast_timestamp,omitempty"` + // The addresses the node is currently listening on for incoming connections. + // + // Will be empty if the node is not listening on any addresses. + ListeningAddresses []string `protobuf:"bytes,9,rep,name=listening_addresses,json=listeningAddresses,proto3" json:"listening_addresses,omitempty"` + // The addresses the node announces to the network. + // + // Will be empty if no announcement addresses are configured. + AnnouncementAddresses []string `protobuf:"bytes,10,rep,name=announcement_addresses,json=announcementAddresses,proto3" json:"announcement_addresses,omitempty"` + // The node alias, if configured. + // + // Will be `None` if no alias is configured. + NodeAlias *string `protobuf:"bytes,11,opt,name=node_alias,json=nodeAlias,proto3,oneof" json:"node_alias,omitempty"` + // The node URIs that can be used to connect to this node, in the format `node_id@address`. + // + // These are constructed from the announcement addresses and the node's public key. + // Will be empty if no announcement addresses are configured. + NodeUris []string `protobuf:"bytes,12,rep,name=node_uris,json=nodeUris,proto3" json:"node_uris,omitempty"` + // The Bitcoin network the node is running on (e.g., "bitcoin", "testnet", "signet", "regtest"). + Network types.Network `protobuf:"varint,13,opt,name=network,proto3,enum=types.Network" json:"network,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetNodeInfoResponse) Reset() { + *x = GetNodeInfoResponse{} + mi := &file_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNodeInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeInfoResponse) ProtoMessage() {} + +func (x *GetNodeInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNodeInfoResponse.ProtoReflect.Descriptor instead. +func (*GetNodeInfoResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{1} +} + +func (x *GetNodeInfoResponse) GetNodeId() string { + if x != nil { + return x.NodeId + } + return "" +} + +func (x *GetNodeInfoResponse) GetCurrentBestBlock() *types.BestBlock { + if x != nil { + return x.CurrentBestBlock + } + return nil +} + +func (x *GetNodeInfoResponse) GetLatestLightningWalletSyncTimestamp() uint64 { + if x != nil && x.LatestLightningWalletSyncTimestamp != nil { + return *x.LatestLightningWalletSyncTimestamp + } + return 0 +} + +func (x *GetNodeInfoResponse) GetLatestOnchainWalletSyncTimestamp() uint64 { + if x != nil && x.LatestOnchainWalletSyncTimestamp != nil { + return *x.LatestOnchainWalletSyncTimestamp + } + return 0 +} + +func (x *GetNodeInfoResponse) GetLatestFeeRateCacheUpdateTimestamp() uint64 { + if x != nil && x.LatestFeeRateCacheUpdateTimestamp != nil { + return *x.LatestFeeRateCacheUpdateTimestamp + } + return 0 +} + +func (x *GetNodeInfoResponse) GetLatestRgsSnapshotTimestamp() uint64 { + if x != nil && x.LatestRgsSnapshotTimestamp != nil { + return *x.LatestRgsSnapshotTimestamp + } + return 0 +} + +func (x *GetNodeInfoResponse) GetLatestNodeAnnouncementBroadcastTimestamp() uint64 { + if x != nil && x.LatestNodeAnnouncementBroadcastTimestamp != nil { + return *x.LatestNodeAnnouncementBroadcastTimestamp + } + return 0 +} + +func (x *GetNodeInfoResponse) GetListeningAddresses() []string { + if x != nil { + return x.ListeningAddresses + } + return nil +} + +func (x *GetNodeInfoResponse) GetAnnouncementAddresses() []string { + if x != nil { + return x.AnnouncementAddresses + } + return nil +} + +func (x *GetNodeInfoResponse) GetNodeAlias() string { + if x != nil && x.NodeAlias != nil { + return *x.NodeAlias + } + return "" +} + +func (x *GetNodeInfoResponse) GetNodeUris() []string { + if x != nil { + return x.NodeUris + } + return nil +} + +func (x *GetNodeInfoResponse) GetNetwork() types.Network { + if x != nil { + return x.Network + } + return types.Network(0) +} + +// Retrieve a new on-chain funding address. +// See more: https://docs.rs/ldk-node/latest/ldk_node/payment/struct.OnchainPayment.html#method.new_address +type OnchainReceiveRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OnchainReceiveRequest) Reset() { + *x = OnchainReceiveRequest{} + mi := &file_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OnchainReceiveRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnchainReceiveRequest) ProtoMessage() {} + +func (x *OnchainReceiveRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnchainReceiveRequest.ProtoReflect.Descriptor instead. +func (*OnchainReceiveRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{2} +} + +// The response for the `OnchainReceive` RPC. On failure, a gRPC error status is returned. +type OnchainReceiveResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A Bitcoin on-chain address. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OnchainReceiveResponse) Reset() { + *x = OnchainReceiveResponse{} + mi := &file_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OnchainReceiveResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnchainReceiveResponse) ProtoMessage() {} + +func (x *OnchainReceiveResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnchainReceiveResponse.ProtoReflect.Descriptor instead. +func (*OnchainReceiveResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{3} +} + +func (x *OnchainReceiveResponse) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +// Send an on-chain payment to the given address. +type OnchainSendRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The address to send coins to. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // The amount in satoshis to send. + // While sending the specified amount, we will respect any on-chain reserve we need to keep, + // i.e., won't allow to cut into `total_anchor_channels_reserve_sats`. + // See more: https://docs.rs/ldk-node/latest/ldk_node/payment/struct.OnchainPayment.html#method.send_to_address + AmountSats *uint64 `protobuf:"varint,2,opt,name=amount_sats,json=amountSats,proto3,oneof" json:"amount_sats,omitempty"` + // If set, the amount_sats field should be unset. + // It indicates that node will send full balance to the specified address. + // + // Please note that when send_all is used this operation will **not** retain any on-chain reserves, + // which might be potentially dangerous if you have open Anchor channels for which you can't trust + // the counterparty to spend the Anchor output after channel closure. + // See more: https://docs.rs/ldk-node/latest/ldk_node/payment/struct.OnchainPayment.html#method.send_all_to_address + SendAll *bool `protobuf:"varint,3,opt,name=send_all,json=sendAll,proto3,oneof" json:"send_all,omitempty"` + // If `fee_rate_sat_per_vb` is set it will be used on the resulting transaction. Otherwise we'll retrieve + // a reasonable estimate from BitcoinD. + FeeRateSatPerVb *uint64 `protobuf:"varint,4,opt,name=fee_rate_sat_per_vb,json=feeRateSatPerVb,proto3,oneof" json:"fee_rate_sat_per_vb,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OnchainSendRequest) Reset() { + *x = OnchainSendRequest{} + mi := &file_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OnchainSendRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnchainSendRequest) ProtoMessage() {} + +func (x *OnchainSendRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnchainSendRequest.ProtoReflect.Descriptor instead. +func (*OnchainSendRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{4} +} + +func (x *OnchainSendRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *OnchainSendRequest) GetAmountSats() uint64 { + if x != nil && x.AmountSats != nil { + return *x.AmountSats + } + return 0 +} + +func (x *OnchainSendRequest) GetSendAll() bool { + if x != nil && x.SendAll != nil { + return *x.SendAll + } + return false +} + +func (x *OnchainSendRequest) GetFeeRateSatPerVb() uint64 { + if x != nil && x.FeeRateSatPerVb != nil { + return *x.FeeRateSatPerVb + } + return 0 +} + +// The response for the `OnchainSend` RPC. On failure, a gRPC error status is returned. +type OnchainSendResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The transaction ID of the broadcasted transaction. + Txid string `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OnchainSendResponse) Reset() { + *x = OnchainSendResponse{} + mi := &file_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OnchainSendResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnchainSendResponse) ProtoMessage() {} + +func (x *OnchainSendResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnchainSendResponse.ProtoReflect.Descriptor instead. +func (*OnchainSendResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{5} +} + +func (x *OnchainSendResponse) GetTxid() string { + if x != nil { + return x.Txid + } + return "" +} + +// Return a BOLT11 payable invoice that can be used to request and receive a payment +// for the given amount, if specified. +// The inbound payment will be automatically claimed upon arrival. +// See more: +// - https://docs.rs/ldk-node/latest/ldk_node/payment/struct.Bolt11Payment.html#method.receive +// - https://docs.rs/ldk-node/latest/ldk_node/payment/struct.Bolt11Payment.html#method.receive_variable_amount +type Bolt11ReceiveRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The amount in millisatoshi to send. If unset, a "zero-amount" or variable-amount invoice is returned. + AmountMsat *uint64 `protobuf:"varint,1,opt,name=amount_msat,json=amountMsat,proto3,oneof" json:"amount_msat,omitempty"` + // An optional description to attach along with the invoice. + // Will be set in the description field of the encoded payment request. + Description *types.Bolt11InvoiceDescription `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Invoice expiry time in seconds. + ExpirySecs uint32 `protobuf:"varint,3,opt,name=expiry_secs,json=expirySecs,proto3" json:"expiry_secs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11ReceiveRequest) Reset() { + *x = Bolt11ReceiveRequest{} + mi := &file_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11ReceiveRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11ReceiveRequest) ProtoMessage() {} + +func (x *Bolt11ReceiveRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11ReceiveRequest.ProtoReflect.Descriptor instead. +func (*Bolt11ReceiveRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{6} +} + +func (x *Bolt11ReceiveRequest) GetAmountMsat() uint64 { + if x != nil && x.AmountMsat != nil { + return *x.AmountMsat + } + return 0 +} + +func (x *Bolt11ReceiveRequest) GetDescription() *types.Bolt11InvoiceDescription { + if x != nil { + return x.Description + } + return nil +} + +func (x *Bolt11ReceiveRequest) GetExpirySecs() uint32 { + if x != nil { + return x.ExpirySecs + } + return 0 +} + +// The response for the `Bolt11Receive` RPC. On failure, a gRPC error status is returned. +type Bolt11ReceiveResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An invoice for a payment within the Lightning Network. + // With the details of the invoice, the sender has all the data necessary to send a payment + // to the recipient. + Invoice string `protobuf:"bytes,1,opt,name=invoice,proto3" json:"invoice,omitempty"` + // The hex-encoded 32-byte payment hash. + PaymentHash string `protobuf:"bytes,2,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"` + // The hex-encoded 32-byte payment secret. + PaymentSecret string `protobuf:"bytes,3,opt,name=payment_secret,json=paymentSecret,proto3" json:"payment_secret,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11ReceiveResponse) Reset() { + *x = Bolt11ReceiveResponse{} + mi := &file_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11ReceiveResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11ReceiveResponse) ProtoMessage() {} + +func (x *Bolt11ReceiveResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11ReceiveResponse.ProtoReflect.Descriptor instead. +func (*Bolt11ReceiveResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{7} +} + +func (x *Bolt11ReceiveResponse) GetInvoice() string { + if x != nil { + return x.Invoice + } + return "" +} + +func (x *Bolt11ReceiveResponse) GetPaymentHash() string { + if x != nil { + return x.PaymentHash + } + return "" +} + +func (x *Bolt11ReceiveResponse) GetPaymentSecret() string { + if x != nil { + return x.PaymentSecret + } + return "" +} + +// Return a BOLT11 payable invoice for a given payment hash. +// The inbound payment will NOT be automatically claimed upon arrival. +// Instead, the payment will need to be manually claimed by calling `Bolt11ClaimForHash` +// or manually failed by calling `Bolt11FailForHash`. +// See more: +// - https://docs.rs/ldk-node/latest/ldk_node/payment/struct.Bolt11Payment.html#method.receive_for_hash +// - https://docs.rs/ldk-node/latest/ldk_node/payment/struct.Bolt11Payment.html#method.receive_variable_amount_for_hash +type Bolt11ReceiveForHashRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The amount in millisatoshi to receive. If unset, a "zero-amount" or variable-amount invoice is returned. + AmountMsat *uint64 `protobuf:"varint,1,opt,name=amount_msat,json=amountMsat,proto3,oneof" json:"amount_msat,omitempty"` + // An optional description to attach along with the invoice. + // Will be set in the description field of the encoded payment request. + Description *types.Bolt11InvoiceDescription `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Invoice expiry time in seconds. + ExpirySecs uint32 `protobuf:"varint,3,opt,name=expiry_secs,json=expirySecs,proto3" json:"expiry_secs,omitempty"` + // The hex-encoded 32-byte payment hash to use for the invoice. + PaymentHash string `protobuf:"bytes,4,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11ReceiveForHashRequest) Reset() { + *x = Bolt11ReceiveForHashRequest{} + mi := &file_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11ReceiveForHashRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11ReceiveForHashRequest) ProtoMessage() {} + +func (x *Bolt11ReceiveForHashRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11ReceiveForHashRequest.ProtoReflect.Descriptor instead. +func (*Bolt11ReceiveForHashRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{8} +} + +func (x *Bolt11ReceiveForHashRequest) GetAmountMsat() uint64 { + if x != nil && x.AmountMsat != nil { + return *x.AmountMsat + } + return 0 +} + +func (x *Bolt11ReceiveForHashRequest) GetDescription() *types.Bolt11InvoiceDescription { + if x != nil { + return x.Description + } + return nil +} + +func (x *Bolt11ReceiveForHashRequest) GetExpirySecs() uint32 { + if x != nil { + return x.ExpirySecs + } + return 0 +} + +func (x *Bolt11ReceiveForHashRequest) GetPaymentHash() string { + if x != nil { + return x.PaymentHash + } + return "" +} + +// The response for the `Bolt11ReceiveForHash` RPC. On failure, a gRPC error status is returned. +type Bolt11ReceiveForHashResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An invoice for a payment within the Lightning Network. + // With the details of the invoice, the sender has all the data necessary to send a payment + // to the recipient. + Invoice string `protobuf:"bytes,1,opt,name=invoice,proto3" json:"invoice,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11ReceiveForHashResponse) Reset() { + *x = Bolt11ReceiveForHashResponse{} + mi := &file_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11ReceiveForHashResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11ReceiveForHashResponse) ProtoMessage() {} + +func (x *Bolt11ReceiveForHashResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11ReceiveForHashResponse.ProtoReflect.Descriptor instead. +func (*Bolt11ReceiveForHashResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{9} +} + +func (x *Bolt11ReceiveForHashResponse) GetInvoice() string { + if x != nil { + return x.Invoice + } + return "" +} + +// Manually claim a payment for a given payment hash with the corresponding preimage. +// This should be used to claim payments created via `Bolt11ReceiveForHash`. +// See more: https://docs.rs/ldk-node/latest/ldk_node/payment/struct.Bolt11Payment.html#method.claim_for_hash +type Bolt11ClaimForHashRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The hex-encoded 32-byte payment hash. + // If provided, it will be used to verify that the preimage matches. + PaymentHash *string `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3,oneof" json:"payment_hash,omitempty"` + // The amount in millisatoshi that is claimable. + // If not provided, skips amount verification. + ClaimableAmountMsat *uint64 `protobuf:"varint,2,opt,name=claimable_amount_msat,json=claimableAmountMsat,proto3,oneof" json:"claimable_amount_msat,omitempty"` + // The hex-encoded 32-byte payment preimage. + Preimage string `protobuf:"bytes,3,opt,name=preimage,proto3" json:"preimage,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11ClaimForHashRequest) Reset() { + *x = Bolt11ClaimForHashRequest{} + mi := &file_api_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11ClaimForHashRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11ClaimForHashRequest) ProtoMessage() {} + +func (x *Bolt11ClaimForHashRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11ClaimForHashRequest.ProtoReflect.Descriptor instead. +func (*Bolt11ClaimForHashRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{10} +} + +func (x *Bolt11ClaimForHashRequest) GetPaymentHash() string { + if x != nil && x.PaymentHash != nil { + return *x.PaymentHash + } + return "" +} + +func (x *Bolt11ClaimForHashRequest) GetClaimableAmountMsat() uint64 { + if x != nil && x.ClaimableAmountMsat != nil { + return *x.ClaimableAmountMsat + } + return 0 +} + +func (x *Bolt11ClaimForHashRequest) GetPreimage() string { + if x != nil { + return x.Preimage + } + return "" +} + +// The response for the `Bolt11ClaimForHash` RPC. On failure, a gRPC error status is returned. +type Bolt11ClaimForHashResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11ClaimForHashResponse) Reset() { + *x = Bolt11ClaimForHashResponse{} + mi := &file_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11ClaimForHashResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11ClaimForHashResponse) ProtoMessage() {} + +func (x *Bolt11ClaimForHashResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11ClaimForHashResponse.ProtoReflect.Descriptor instead. +func (*Bolt11ClaimForHashResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{11} +} + +// Manually fail a payment for a given payment hash. +// This should be used to reject payments created via `Bolt11ReceiveForHash`. +// See more: https://docs.rs/ldk-node/latest/ldk_node/payment/struct.Bolt11Payment.html#method.fail_for_hash +type Bolt11FailForHashRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The hex-encoded 32-byte payment hash. + PaymentHash string `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11FailForHashRequest) Reset() { + *x = Bolt11FailForHashRequest{} + mi := &file_api_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11FailForHashRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11FailForHashRequest) ProtoMessage() {} + +func (x *Bolt11FailForHashRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11FailForHashRequest.ProtoReflect.Descriptor instead. +func (*Bolt11FailForHashRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{12} +} + +func (x *Bolt11FailForHashRequest) GetPaymentHash() string { + if x != nil { + return x.PaymentHash + } + return "" +} + +// The response for the `Bolt11FailForHash` RPC. On failure, a gRPC error status is returned. +type Bolt11FailForHashResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11FailForHashResponse) Reset() { + *x = Bolt11FailForHashResponse{} + mi := &file_api_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11FailForHashResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11FailForHashResponse) ProtoMessage() {} + +func (x *Bolt11FailForHashResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11FailForHashResponse.ProtoReflect.Descriptor instead. +func (*Bolt11FailForHashResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{13} +} + +// Return a BOLT11 payable invoice that can be used to request and receive a payment via an +// LSPS2 just-in-time channel. +// See more: https://docs.rs/ldk-node/latest/ldk_node/payment/struct.Bolt11Payment.html#method.receive_via_jit_channel +type Bolt11ReceiveViaJitChannelRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The amount in millisatoshi to request. + AmountMsat uint64 `protobuf:"varint,1,opt,name=amount_msat,json=amountMsat,proto3" json:"amount_msat,omitempty"` + // An optional description to attach along with the invoice. + // Will be set in the description field of the encoded payment request. + Description *types.Bolt11InvoiceDescription `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Invoice expiry time in seconds. + ExpirySecs uint32 `protobuf:"varint,3,opt,name=expiry_secs,json=expirySecs,proto3" json:"expiry_secs,omitempty"` + // Optional upper bound for the total fee an LSP may deduct when opening the JIT channel. + MaxTotalLspFeeLimitMsat *uint64 `protobuf:"varint,4,opt,name=max_total_lsp_fee_limit_msat,json=maxTotalLspFeeLimitMsat,proto3,oneof" json:"max_total_lsp_fee_limit_msat,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11ReceiveViaJitChannelRequest) Reset() { + *x = Bolt11ReceiveViaJitChannelRequest{} + mi := &file_api_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11ReceiveViaJitChannelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11ReceiveViaJitChannelRequest) ProtoMessage() {} + +func (x *Bolt11ReceiveViaJitChannelRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11ReceiveViaJitChannelRequest.ProtoReflect.Descriptor instead. +func (*Bolt11ReceiveViaJitChannelRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{14} +} + +func (x *Bolt11ReceiveViaJitChannelRequest) GetAmountMsat() uint64 { + if x != nil { + return x.AmountMsat + } + return 0 +} + +func (x *Bolt11ReceiveViaJitChannelRequest) GetDescription() *types.Bolt11InvoiceDescription { + if x != nil { + return x.Description + } + return nil +} + +func (x *Bolt11ReceiveViaJitChannelRequest) GetExpirySecs() uint32 { + if x != nil { + return x.ExpirySecs + } + return 0 +} + +func (x *Bolt11ReceiveViaJitChannelRequest) GetMaxTotalLspFeeLimitMsat() uint64 { + if x != nil && x.MaxTotalLspFeeLimitMsat != nil { + return *x.MaxTotalLspFeeLimitMsat + } + return 0 +} + +// The response for the `Bolt11ReceiveViaJitChannel` RPC. On failure, a gRPC error status is returned. +type Bolt11ReceiveViaJitChannelResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An invoice for a payment within the Lightning Network. + Invoice string `protobuf:"bytes,1,opt,name=invoice,proto3" json:"invoice,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11ReceiveViaJitChannelResponse) Reset() { + *x = Bolt11ReceiveViaJitChannelResponse{} + mi := &file_api_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11ReceiveViaJitChannelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11ReceiveViaJitChannelResponse) ProtoMessage() {} + +func (x *Bolt11ReceiveViaJitChannelResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11ReceiveViaJitChannelResponse.ProtoReflect.Descriptor instead. +func (*Bolt11ReceiveViaJitChannelResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{15} +} + +func (x *Bolt11ReceiveViaJitChannelResponse) GetInvoice() string { + if x != nil { + return x.Invoice + } + return "" +} + +// Return a variable-amount BOLT11 invoice that can be used to receive a payment via an LSPS2 +// just-in-time channel. +// See more: https://docs.rs/ldk-node/latest/ldk_node/payment/struct.Bolt11Payment.html#method.receive_variable_amount_via_jit_channel +type Bolt11ReceiveVariableAmountViaJitChannelRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An optional description to attach along with the invoice. + // Will be set in the description field of the encoded payment request. + Description *types.Bolt11InvoiceDescription `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // Invoice expiry time in seconds. + ExpirySecs uint32 `protobuf:"varint,2,opt,name=expiry_secs,json=expirySecs,proto3" json:"expiry_secs,omitempty"` + // Optional upper bound for the proportional fee, in parts-per-million millisatoshis, that an + // LSP may deduct when opening the JIT channel. + MaxProportionalLspFeeLimitPpmMsat *uint64 `protobuf:"varint,3,opt,name=max_proportional_lsp_fee_limit_ppm_msat,json=maxProportionalLspFeeLimitPpmMsat,proto3,oneof" json:"max_proportional_lsp_fee_limit_ppm_msat,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11ReceiveVariableAmountViaJitChannelRequest) Reset() { + *x = Bolt11ReceiveVariableAmountViaJitChannelRequest{} + mi := &file_api_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11ReceiveVariableAmountViaJitChannelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11ReceiveVariableAmountViaJitChannelRequest) ProtoMessage() {} + +func (x *Bolt11ReceiveVariableAmountViaJitChannelRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11ReceiveVariableAmountViaJitChannelRequest.ProtoReflect.Descriptor instead. +func (*Bolt11ReceiveVariableAmountViaJitChannelRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{16} +} + +func (x *Bolt11ReceiveVariableAmountViaJitChannelRequest) GetDescription() *types.Bolt11InvoiceDescription { + if x != nil { + return x.Description + } + return nil +} + +func (x *Bolt11ReceiveVariableAmountViaJitChannelRequest) GetExpirySecs() uint32 { + if x != nil { + return x.ExpirySecs + } + return 0 +} + +func (x *Bolt11ReceiveVariableAmountViaJitChannelRequest) GetMaxProportionalLspFeeLimitPpmMsat() uint64 { + if x != nil && x.MaxProportionalLspFeeLimitPpmMsat != nil { + return *x.MaxProportionalLspFeeLimitPpmMsat + } + return 0 +} + +// The response for the `Bolt11ReceiveVariableAmountViaJitChannel` RPC. On failure, a gRPC error status is returned. +type Bolt11ReceiveVariableAmountViaJitChannelResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An invoice for a payment within the Lightning Network. + Invoice string `protobuf:"bytes,1,opt,name=invoice,proto3" json:"invoice,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11ReceiveVariableAmountViaJitChannelResponse) Reset() { + *x = Bolt11ReceiveVariableAmountViaJitChannelResponse{} + mi := &file_api_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11ReceiveVariableAmountViaJitChannelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11ReceiveVariableAmountViaJitChannelResponse) ProtoMessage() {} + +func (x *Bolt11ReceiveVariableAmountViaJitChannelResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11ReceiveVariableAmountViaJitChannelResponse.ProtoReflect.Descriptor instead. +func (*Bolt11ReceiveVariableAmountViaJitChannelResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{17} +} + +func (x *Bolt11ReceiveVariableAmountViaJitChannelResponse) GetInvoice() string { + if x != nil { + return x.Invoice + } + return "" +} + +// Send a payment for a BOLT11 invoice. +// See more: https://docs.rs/ldk-node/latest/ldk_node/payment/struct.Bolt11Payment.html#method.send +type Bolt11SendRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An invoice for a payment within the Lightning Network. + Invoice string `protobuf:"bytes,1,opt,name=invoice,proto3" json:"invoice,omitempty"` + // Set this field when paying a so-called "zero-amount" invoice, i.e., an invoice that leaves the + // amount paid to be determined by the user. + // This operation will fail if the amount specified is less than the value required by the given invoice. + AmountMsat *uint64 `protobuf:"varint,2,opt,name=amount_msat,json=amountMsat,proto3,oneof" json:"amount_msat,omitempty"` + // Configuration options for payment routing and pathfinding. + RouteParameters *types.RouteParametersConfig `protobuf:"bytes,3,opt,name=route_parameters,json=routeParameters,proto3,oneof" json:"route_parameters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11SendRequest) Reset() { + *x = Bolt11SendRequest{} + mi := &file_api_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11SendRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11SendRequest) ProtoMessage() {} + +func (x *Bolt11SendRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11SendRequest.ProtoReflect.Descriptor instead. +func (*Bolt11SendRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{18} +} + +func (x *Bolt11SendRequest) GetInvoice() string { + if x != nil { + return x.Invoice + } + return "" +} + +func (x *Bolt11SendRequest) GetAmountMsat() uint64 { + if x != nil && x.AmountMsat != nil { + return *x.AmountMsat + } + return 0 +} + +func (x *Bolt11SendRequest) GetRouteParameters() *types.RouteParametersConfig { + if x != nil { + return x.RouteParameters + } + return nil +} + +// The response for the `Bolt11Send` RPC. On failure, a gRPC error status is returned. +type Bolt11SendResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An identifier used to uniquely identify a payment in hex-encoded form. + PaymentId string `protobuf:"bytes,1,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11SendResponse) Reset() { + *x = Bolt11SendResponse{} + mi := &file_api_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11SendResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11SendResponse) ProtoMessage() {} + +func (x *Bolt11SendResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11SendResponse.ProtoReflect.Descriptor instead. +func (*Bolt11SendResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{19} +} + +func (x *Bolt11SendResponse) GetPaymentId() string { + if x != nil { + return x.PaymentId + } + return "" +} + +// Returns a BOLT12 offer for the given amount, if specified. +// +// See more: +// - https://docs.rs/ldk-node/latest/ldk_node/payment/struct.Bolt12Payment.html#method.receive +// - https://docs.rs/ldk-node/latest/ldk_node/payment/struct.Bolt12Payment.html#method.receive_variable_amount +type Bolt12ReceiveRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An optional description to attach along with the offer. + // Will be set in the description field of the encoded offer. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // The amount in millisatoshi to send. If unset, a "zero-amount" or variable-amount offer is returned. + AmountMsat *uint64 `protobuf:"varint,2,opt,name=amount_msat,json=amountMsat,proto3,oneof" json:"amount_msat,omitempty"` + // Offer expiry time in seconds. + ExpirySecs *uint32 `protobuf:"varint,3,opt,name=expiry_secs,json=expirySecs,proto3,oneof" json:"expiry_secs,omitempty"` + // If set, it represents the number of items requested, can only be set for fixed-amount offers. + Quantity *uint64 `protobuf:"varint,4,opt,name=quantity,proto3,oneof" json:"quantity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt12ReceiveRequest) Reset() { + *x = Bolt12ReceiveRequest{} + mi := &file_api_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt12ReceiveRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt12ReceiveRequest) ProtoMessage() {} + +func (x *Bolt12ReceiveRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt12ReceiveRequest.ProtoReflect.Descriptor instead. +func (*Bolt12ReceiveRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{20} +} + +func (x *Bolt12ReceiveRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Bolt12ReceiveRequest) GetAmountMsat() uint64 { + if x != nil && x.AmountMsat != nil { + return *x.AmountMsat + } + return 0 +} + +func (x *Bolt12ReceiveRequest) GetExpirySecs() uint32 { + if x != nil && x.ExpirySecs != nil { + return *x.ExpirySecs + } + return 0 +} + +func (x *Bolt12ReceiveRequest) GetQuantity() uint64 { + if x != nil && x.Quantity != nil { + return *x.Quantity + } + return 0 +} + +// The response for the `Bolt12Receive` RPC. On failure, a gRPC error status is returned. +type Bolt12ReceiveResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An offer for a payment within the Lightning Network. + // With the details of the offer, the sender has all the data necessary to send a payment + // to the recipient. + Offer string `protobuf:"bytes,1,opt,name=offer,proto3" json:"offer,omitempty"` + // The hex-encoded offer id. + OfferId string `protobuf:"bytes,2,opt,name=offer_id,json=offerId,proto3" json:"offer_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt12ReceiveResponse) Reset() { + *x = Bolt12ReceiveResponse{} + mi := &file_api_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt12ReceiveResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt12ReceiveResponse) ProtoMessage() {} + +func (x *Bolt12ReceiveResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt12ReceiveResponse.ProtoReflect.Descriptor instead. +func (*Bolt12ReceiveResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{21} +} + +func (x *Bolt12ReceiveResponse) GetOffer() string { + if x != nil { + return x.Offer + } + return "" +} + +func (x *Bolt12ReceiveResponse) GetOfferId() string { + if x != nil { + return x.OfferId + } + return "" +} + +// Send a payment for a BOLT12 offer. +// See more: +// - https://docs.rs/ldk-node/latest/ldk_node/payment/struct.Bolt12Payment.html#method.send +// - https://docs.rs/ldk-node/latest/ldk_node/payment/struct.Bolt12Payment.html#method.send_using_amount +type Bolt12SendRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An offer for a payment within the Lightning Network. + Offer string `protobuf:"bytes,1,opt,name=offer,proto3" json:"offer,omitempty"` + // Set this field when paying a so-called "zero-amount" offer, i.e., an offer that leaves the + // amount paid to be determined by the user. + // This operation will fail if the amount specified is less than the value required by the given offer. + AmountMsat *uint64 `protobuf:"varint,2,opt,name=amount_msat,json=amountMsat,proto3,oneof" json:"amount_msat,omitempty"` + // If set, it represents the number of items requested. + Quantity *uint64 `protobuf:"varint,3,opt,name=quantity,proto3,oneof" json:"quantity,omitempty"` + // If set, it will be seen by the recipient and reflected back in the invoice. + PayerNote *string `protobuf:"bytes,4,opt,name=payer_note,json=payerNote,proto3,oneof" json:"payer_note,omitempty"` + // Configuration options for payment routing and pathfinding. + RouteParameters *types.RouteParametersConfig `protobuf:"bytes,5,opt,name=route_parameters,json=routeParameters,proto3,oneof" json:"route_parameters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt12SendRequest) Reset() { + *x = Bolt12SendRequest{} + mi := &file_api_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt12SendRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt12SendRequest) ProtoMessage() {} + +func (x *Bolt12SendRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt12SendRequest.ProtoReflect.Descriptor instead. +func (*Bolt12SendRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{22} +} + +func (x *Bolt12SendRequest) GetOffer() string { + if x != nil { + return x.Offer + } + return "" +} + +func (x *Bolt12SendRequest) GetAmountMsat() uint64 { + if x != nil && x.AmountMsat != nil { + return *x.AmountMsat + } + return 0 +} + +func (x *Bolt12SendRequest) GetQuantity() uint64 { + if x != nil && x.Quantity != nil { + return *x.Quantity + } + return 0 +} + +func (x *Bolt12SendRequest) GetPayerNote() string { + if x != nil && x.PayerNote != nil { + return *x.PayerNote + } + return "" +} + +func (x *Bolt12SendRequest) GetRouteParameters() *types.RouteParametersConfig { + if x != nil { + return x.RouteParameters + } + return nil +} + +// The response for the `Bolt12Send` RPC. On failure, a gRPC error status is returned. +type Bolt12SendResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An identifier used to uniquely identify a payment in hex-encoded form. + PaymentId string `protobuf:"bytes,1,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt12SendResponse) Reset() { + *x = Bolt12SendResponse{} + mi := &file_api_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt12SendResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt12SendResponse) ProtoMessage() {} + +func (x *Bolt12SendResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt12SendResponse.ProtoReflect.Descriptor instead. +func (*Bolt12SendResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{23} +} + +func (x *Bolt12SendResponse) GetPaymentId() string { + if x != nil { + return x.PaymentId + } + return "" +} + +// Send a spontaneous payment, also known as "keysend", to a node. +// See more: https://docs.rs/ldk-node/latest/ldk_node/payment/struct.SpontaneousPayment.html#method.send +type SpontaneousSendRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The amount in millisatoshis to send. + AmountMsat uint64 `protobuf:"varint,1,opt,name=amount_msat,json=amountMsat,proto3" json:"amount_msat,omitempty"` + // The hex-encoded public key of the node to send the payment to. + NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + // Configuration options for payment routing and pathfinding. + RouteParameters *types.RouteParametersConfig `protobuf:"bytes,3,opt,name=route_parameters,json=routeParameters,proto3,oneof" json:"route_parameters,omitempty"` + // Custom TLV records to attach to the outgoing payment. + CustomTlvs []*types.CustomTlvRecord `protobuf:"bytes,4,rep,name=custom_tlvs,json=customTlvs,proto3" json:"custom_tlvs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SpontaneousSendRequest) Reset() { + *x = SpontaneousSendRequest{} + mi := &file_api_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SpontaneousSendRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpontaneousSendRequest) ProtoMessage() {} + +func (x *SpontaneousSendRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpontaneousSendRequest.ProtoReflect.Descriptor instead. +func (*SpontaneousSendRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{24} +} + +func (x *SpontaneousSendRequest) GetAmountMsat() uint64 { + if x != nil { + return x.AmountMsat + } + return 0 +} + +func (x *SpontaneousSendRequest) GetNodeId() string { + if x != nil { + return x.NodeId + } + return "" +} + +func (x *SpontaneousSendRequest) GetRouteParameters() *types.RouteParametersConfig { + if x != nil { + return x.RouteParameters + } + return nil +} + +func (x *SpontaneousSendRequest) GetCustomTlvs() []*types.CustomTlvRecord { + if x != nil { + return x.CustomTlvs + } + return nil +} + +// The response for the `SpontaneousSend` RPC. On failure, a gRPC error status is returned. +type SpontaneousSendResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An identifier used to uniquely identify a payment in hex-encoded form. + PaymentId string `protobuf:"bytes,1,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SpontaneousSendResponse) Reset() { + *x = SpontaneousSendResponse{} + mi := &file_api_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SpontaneousSendResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpontaneousSendResponse) ProtoMessage() {} + +func (x *SpontaneousSendResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpontaneousSendResponse.ProtoReflect.Descriptor instead. +func (*SpontaneousSendResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{25} +} + +func (x *SpontaneousSendResponse) GetPaymentId() string { + if x != nil { + return x.PaymentId + } + return "" +} + +// Creates a new outbound channel to the given remote node. +// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.connect_open_channel +type OpenChannelRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The hex-encoded public key of the node to open a channel with. + NodePubkey string `protobuf:"bytes,1,opt,name=node_pubkey,json=nodePubkey,proto3" json:"node_pubkey,omitempty"` + // An address which can be used to connect to a remote peer. + // It can be of type IPv4:port, IPv6:port, OnionV3:port or hostname:port + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // The amount of satoshis the caller is willing to commit to the channel. + ChannelAmountSats uint64 `protobuf:"varint,3,opt,name=channel_amount_sats,json=channelAmountSats,proto3" json:"channel_amount_sats,omitempty"` + // The amount of satoshis to push to the remote side as part of the initial commitment state. + PushToCounterpartyMsat *uint64 `protobuf:"varint,4,opt,name=push_to_counterparty_msat,json=pushToCounterpartyMsat,proto3,oneof" json:"push_to_counterparty_msat,omitempty"` + // The channel configuration to be used for opening this channel. If unset, default ChannelConfig is used. + ChannelConfig *types.ChannelConfig `protobuf:"bytes,5,opt,name=channel_config,json=channelConfig,proto3,oneof" json:"channel_config,omitempty"` + // Whether the channel should be public. + AnnounceChannel bool `protobuf:"varint,6,opt,name=announce_channel,json=announceChannel,proto3" json:"announce_channel,omitempty"` + // Allow the counterparty to spend all its channel balance. This cannot be set together with `announce_channel`. + DisableCounterpartyReserve bool `protobuf:"varint,7,opt,name=disable_counterparty_reserve,json=disableCounterpartyReserve,proto3" json:"disable_counterparty_reserve,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OpenChannelRequest) Reset() { + *x = OpenChannelRequest{} + mi := &file_api_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OpenChannelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenChannelRequest) ProtoMessage() {} + +func (x *OpenChannelRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenChannelRequest.ProtoReflect.Descriptor instead. +func (*OpenChannelRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{26} +} + +func (x *OpenChannelRequest) GetNodePubkey() string { + if x != nil { + return x.NodePubkey + } + return "" +} + +func (x *OpenChannelRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *OpenChannelRequest) GetChannelAmountSats() uint64 { + if x != nil { + return x.ChannelAmountSats + } + return 0 +} + +func (x *OpenChannelRequest) GetPushToCounterpartyMsat() uint64 { + if x != nil && x.PushToCounterpartyMsat != nil { + return *x.PushToCounterpartyMsat + } + return 0 +} + +func (x *OpenChannelRequest) GetChannelConfig() *types.ChannelConfig { + if x != nil { + return x.ChannelConfig + } + return nil +} + +func (x *OpenChannelRequest) GetAnnounceChannel() bool { + if x != nil { + return x.AnnounceChannel + } + return false +} + +func (x *OpenChannelRequest) GetDisableCounterpartyReserve() bool { + if x != nil { + return x.DisableCounterpartyReserve + } + return false +} + +// The response for the `OpenChannel` RPC. On failure, a gRPC error status is returned. +type OpenChannelResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The local channel id of the created channel that user can use to refer to channel. + UserChannelId string `protobuf:"bytes,1,opt,name=user_channel_id,json=userChannelId,proto3" json:"user_channel_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OpenChannelResponse) Reset() { + *x = OpenChannelResponse{} + mi := &file_api_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OpenChannelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenChannelResponse) ProtoMessage() {} + +func (x *OpenChannelResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenChannelResponse.ProtoReflect.Descriptor instead. +func (*OpenChannelResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{27} +} + +func (x *OpenChannelResponse) GetUserChannelId() string { + if x != nil { + return x.UserChannelId + } + return "" +} + +// Increases the channel balance by the given amount. +// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.splice_in +type SpliceInRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The local `user_channel_id` of the channel. + UserChannelId string `protobuf:"bytes,1,opt,name=user_channel_id,json=userChannelId,proto3" json:"user_channel_id,omitempty"` + // The hex-encoded public key of the channel's counterparty node. + CounterpartyNodeId string `protobuf:"bytes,2,opt,name=counterparty_node_id,json=counterpartyNodeId,proto3" json:"counterparty_node_id,omitempty"` + // The amount of sats to splice into the channel. + SpliceAmountSats uint64 `protobuf:"varint,3,opt,name=splice_amount_sats,json=spliceAmountSats,proto3" json:"splice_amount_sats,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SpliceInRequest) Reset() { + *x = SpliceInRequest{} + mi := &file_api_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SpliceInRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpliceInRequest) ProtoMessage() {} + +func (x *SpliceInRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpliceInRequest.ProtoReflect.Descriptor instead. +func (*SpliceInRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{28} +} + +func (x *SpliceInRequest) GetUserChannelId() string { + if x != nil { + return x.UserChannelId + } + return "" +} + +func (x *SpliceInRequest) GetCounterpartyNodeId() string { + if x != nil { + return x.CounterpartyNodeId + } + return "" +} + +func (x *SpliceInRequest) GetSpliceAmountSats() uint64 { + if x != nil { + return x.SpliceAmountSats + } + return 0 +} + +// The response for the `SpliceIn` RPC. On failure, a gRPC error status is returned. +type SpliceInResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SpliceInResponse) Reset() { + *x = SpliceInResponse{} + mi := &file_api_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SpliceInResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpliceInResponse) ProtoMessage() {} + +func (x *SpliceInResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpliceInResponse.ProtoReflect.Descriptor instead. +func (*SpliceInResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{29} +} + +// Decreases the channel balance by the given amount. +// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.splice_out +type SpliceOutRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The local `user_channel_id` of this channel. + UserChannelId string `protobuf:"bytes,1,opt,name=user_channel_id,json=userChannelId,proto3" json:"user_channel_id,omitempty"` + // The hex-encoded public key of the channel's counterparty node. + CounterpartyNodeId string `protobuf:"bytes,2,opt,name=counterparty_node_id,json=counterpartyNodeId,proto3" json:"counterparty_node_id,omitempty"` + // A Bitcoin on-chain address to send the spliced-out funds. + // + // If not set, an address from the node's on-chain wallet will be used. + Address *string `protobuf:"bytes,3,opt,name=address,proto3,oneof" json:"address,omitempty"` + // The amount of sats to splice out of the channel. + SpliceAmountSats uint64 `protobuf:"varint,4,opt,name=splice_amount_sats,json=spliceAmountSats,proto3" json:"splice_amount_sats,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SpliceOutRequest) Reset() { + *x = SpliceOutRequest{} + mi := &file_api_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SpliceOutRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpliceOutRequest) ProtoMessage() {} + +func (x *SpliceOutRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpliceOutRequest.ProtoReflect.Descriptor instead. +func (*SpliceOutRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{30} +} + +func (x *SpliceOutRequest) GetUserChannelId() string { + if x != nil { + return x.UserChannelId + } + return "" +} + +func (x *SpliceOutRequest) GetCounterpartyNodeId() string { + if x != nil { + return x.CounterpartyNodeId + } + return "" +} + +func (x *SpliceOutRequest) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address + } + return "" +} + +func (x *SpliceOutRequest) GetSpliceAmountSats() uint64 { + if x != nil { + return x.SpliceAmountSats + } + return 0 +} + +// The response for the `SpliceOut` RPC. On failure, a gRPC error status is returned. +type SpliceOutResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The Bitcoin on-chain address where the funds will be sent. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SpliceOutResponse) Reset() { + *x = SpliceOutResponse{} + mi := &file_api_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SpliceOutResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpliceOutResponse) ProtoMessage() {} + +func (x *SpliceOutResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpliceOutResponse.ProtoReflect.Descriptor instead. +func (*SpliceOutResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{31} +} + +func (x *SpliceOutResponse) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +// Update the config for a previously opened channel. +// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.update_channel_config +type UpdateChannelConfigRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The local `user_channel_id` of this channel. + UserChannelId string `protobuf:"bytes,1,opt,name=user_channel_id,json=userChannelId,proto3" json:"user_channel_id,omitempty"` + // The hex-encoded public key of the counterparty node to update channel config with. + CounterpartyNodeId string `protobuf:"bytes,2,opt,name=counterparty_node_id,json=counterpartyNodeId,proto3" json:"counterparty_node_id,omitempty"` + // The updated channel configuration settings for a channel. + ChannelConfig *types.ChannelConfig `protobuf:"bytes,3,opt,name=channel_config,json=channelConfig,proto3" json:"channel_config,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateChannelConfigRequest) Reset() { + *x = UpdateChannelConfigRequest{} + mi := &file_api_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateChannelConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateChannelConfigRequest) ProtoMessage() {} + +func (x *UpdateChannelConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateChannelConfigRequest.ProtoReflect.Descriptor instead. +func (*UpdateChannelConfigRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{32} +} + +func (x *UpdateChannelConfigRequest) GetUserChannelId() string { + if x != nil { + return x.UserChannelId + } + return "" +} + +func (x *UpdateChannelConfigRequest) GetCounterpartyNodeId() string { + if x != nil { + return x.CounterpartyNodeId + } + return "" +} + +func (x *UpdateChannelConfigRequest) GetChannelConfig() *types.ChannelConfig { + if x != nil { + return x.ChannelConfig + } + return nil +} + +// The response for the `UpdateChannelConfig` RPC. On failure, a gRPC error status is returned. +type UpdateChannelConfigResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateChannelConfigResponse) Reset() { + *x = UpdateChannelConfigResponse{} + mi := &file_api_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateChannelConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateChannelConfigResponse) ProtoMessage() {} + +func (x *UpdateChannelConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateChannelConfigResponse.ProtoReflect.Descriptor instead. +func (*UpdateChannelConfigResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{33} +} + +// Closes the channel specified by given request. +// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.close_channel +type CloseChannelRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The local `user_channel_id` of this channel. + UserChannelId string `protobuf:"bytes,1,opt,name=user_channel_id,json=userChannelId,proto3" json:"user_channel_id,omitempty"` + // The hex-encoded public key of the node to close a channel with. + CounterpartyNodeId string `protobuf:"bytes,2,opt,name=counterparty_node_id,json=counterpartyNodeId,proto3" json:"counterparty_node_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CloseChannelRequest) Reset() { + *x = CloseChannelRequest{} + mi := &file_api_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CloseChannelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CloseChannelRequest) ProtoMessage() {} + +func (x *CloseChannelRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CloseChannelRequest.ProtoReflect.Descriptor instead. +func (*CloseChannelRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{34} +} + +func (x *CloseChannelRequest) GetUserChannelId() string { + if x != nil { + return x.UserChannelId + } + return "" +} + +func (x *CloseChannelRequest) GetCounterpartyNodeId() string { + if x != nil { + return x.CounterpartyNodeId + } + return "" +} + +// The response for the `CloseChannel` RPC. On failure, a gRPC error status is returned. +type CloseChannelResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CloseChannelResponse) Reset() { + *x = CloseChannelResponse{} + mi := &file_api_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CloseChannelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CloseChannelResponse) ProtoMessage() {} + +func (x *CloseChannelResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CloseChannelResponse.ProtoReflect.Descriptor instead. +func (*CloseChannelResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{35} +} + +// Force closes the channel specified by given request. +// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.force_close_channel +type ForceCloseChannelRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The local `user_channel_id` of this channel. + UserChannelId string `protobuf:"bytes,1,opt,name=user_channel_id,json=userChannelId,proto3" json:"user_channel_id,omitempty"` + // The hex-encoded public key of the node to close a channel with. + CounterpartyNodeId string `protobuf:"bytes,2,opt,name=counterparty_node_id,json=counterpartyNodeId,proto3" json:"counterparty_node_id,omitempty"` + // The reason for force-closing. + ForceCloseReason *string `protobuf:"bytes,3,opt,name=force_close_reason,json=forceCloseReason,proto3,oneof" json:"force_close_reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ForceCloseChannelRequest) Reset() { + *x = ForceCloseChannelRequest{} + mi := &file_api_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ForceCloseChannelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ForceCloseChannelRequest) ProtoMessage() {} + +func (x *ForceCloseChannelRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ForceCloseChannelRequest.ProtoReflect.Descriptor instead. +func (*ForceCloseChannelRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{36} +} + +func (x *ForceCloseChannelRequest) GetUserChannelId() string { + if x != nil { + return x.UserChannelId + } + return "" +} + +func (x *ForceCloseChannelRequest) GetCounterpartyNodeId() string { + if x != nil { + return x.CounterpartyNodeId + } + return "" +} + +func (x *ForceCloseChannelRequest) GetForceCloseReason() string { + if x != nil && x.ForceCloseReason != nil { + return *x.ForceCloseReason + } + return "" +} + +// The response for the `ForceCloseChannel` RPC. On failure, a gRPC error status is returned. +type ForceCloseChannelResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ForceCloseChannelResponse) Reset() { + *x = ForceCloseChannelResponse{} + mi := &file_api_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ForceCloseChannelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ForceCloseChannelResponse) ProtoMessage() {} + +func (x *ForceCloseChannelResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ForceCloseChannelResponse.ProtoReflect.Descriptor instead. +func (*ForceCloseChannelResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{37} +} + +// Returns a list of known channels. +// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.list_channels +type ListChannelsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListChannelsRequest) Reset() { + *x = ListChannelsRequest{} + mi := &file_api_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListChannelsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListChannelsRequest) ProtoMessage() {} + +func (x *ListChannelsRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListChannelsRequest.ProtoReflect.Descriptor instead. +func (*ListChannelsRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{38} +} + +// The response for the `ListChannels` RPC. On failure, a gRPC error status is returned. +type ListChannelsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // List of channels. + Channels []*types.Channel `protobuf:"bytes,1,rep,name=channels,proto3" json:"channels,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListChannelsResponse) Reset() { + *x = ListChannelsResponse{} + mi := &file_api_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListChannelsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListChannelsResponse) ProtoMessage() {} + +func (x *ListChannelsResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListChannelsResponse.ProtoReflect.Descriptor instead. +func (*ListChannelsResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{39} +} + +func (x *ListChannelsResponse) GetChannels() []*types.Channel { + if x != nil { + return x.Channels + } + return nil +} + +// Returns payment details for a given payment_id. +// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.payment +type GetPaymentDetailsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An identifier used to uniquely identify a payment in hex-encoded form. + PaymentId string `protobuf:"bytes,1,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPaymentDetailsRequest) Reset() { + *x = GetPaymentDetailsRequest{} + mi := &file_api_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPaymentDetailsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPaymentDetailsRequest) ProtoMessage() {} + +func (x *GetPaymentDetailsRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPaymentDetailsRequest.ProtoReflect.Descriptor instead. +func (*GetPaymentDetailsRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{40} +} + +func (x *GetPaymentDetailsRequest) GetPaymentId() string { + if x != nil { + return x.PaymentId + } + return "" +} + +// The response for the `GetPaymentDetails` RPC. On failure, a gRPC error status is returned. +type GetPaymentDetailsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Represents a payment. + // Will be `None` if payment doesn't exist. + Payment *types.Payment `protobuf:"bytes,1,opt,name=payment,proto3" json:"payment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPaymentDetailsResponse) Reset() { + *x = GetPaymentDetailsResponse{} + mi := &file_api_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPaymentDetailsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPaymentDetailsResponse) ProtoMessage() {} + +func (x *GetPaymentDetailsResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPaymentDetailsResponse.ProtoReflect.Descriptor instead. +func (*GetPaymentDetailsResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{41} +} + +func (x *GetPaymentDetailsResponse) GetPayment() *types.Payment { + if x != nil { + return x.Payment + } + return nil +} + +// Retrieves list of all payments. +// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.list_payments +type ListPaymentsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `page_token` is a pagination token. + // + // To query for the first page, `page_token` must not be specified. + // + // For subsequent pages, use the value that was returned as `next_page_token` in the previous + // page's response. + PageToken *types.PageToken `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3,oneof" json:"page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPaymentsRequest) Reset() { + *x = ListPaymentsRequest{} + mi := &file_api_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPaymentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPaymentsRequest) ProtoMessage() {} + +func (x *ListPaymentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[42] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPaymentsRequest.ProtoReflect.Descriptor instead. +func (*ListPaymentsRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{42} +} + +func (x *ListPaymentsRequest) GetPageToken() *types.PageToken { + if x != nil { + return x.PageToken + } + return nil +} + +// The response for the `ListPayments` RPC. On failure, a gRPC error status is returned. +type ListPaymentsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // List of payments. + Payments []*types.Payment `protobuf:"bytes,1,rep,name=payments,proto3" json:"payments,omitempty"` + // `next_page_token` is a pagination token, used to retrieve the next page of results. + // Use this value to query for next-page of paginated operation, by specifying + // this value as the `page_token` in the next request. + // + // If `next_page_token` is `None`, then the "last page" of results has been processed and + // there is no more data to be retrieved. + // + // If `next_page_token` is not `None`, it does not necessarily mean that there is more data in the + // result set. The only way to know when you have reached the end of the result set is when + // `next_page_token` is `None`. + // + // **Caution**: Clients must not assume a specific number of records to be present in a page for + // paginated response. + NextPageToken *types.PageToken `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3,oneof" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPaymentsResponse) Reset() { + *x = ListPaymentsResponse{} + mi := &file_api_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPaymentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPaymentsResponse) ProtoMessage() {} + +func (x *ListPaymentsResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPaymentsResponse.ProtoReflect.Descriptor instead. +func (*ListPaymentsResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{43} +} + +func (x *ListPaymentsResponse) GetPayments() []*types.Payment { + if x != nil { + return x.Payments + } + return nil +} + +func (x *ListPaymentsResponse) GetNextPageToken() *types.PageToken { + if x != nil { + return x.NextPageToken + } + return nil +} + +// Retrieves list of all forwarded payments. +// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.Event.html#variant.PaymentForwarded +type ListForwardedPaymentsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `page_token` is a pagination token. + // + // To query for the first page, `page_token` must not be specified. + // + // For subsequent pages, use the value that was returned as `next_page_token` in the previous + // page's response. + PageToken *types.PageToken `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3,oneof" json:"page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListForwardedPaymentsRequest) Reset() { + *x = ListForwardedPaymentsRequest{} + mi := &file_api_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListForwardedPaymentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListForwardedPaymentsRequest) ProtoMessage() {} + +func (x *ListForwardedPaymentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListForwardedPaymentsRequest.ProtoReflect.Descriptor instead. +func (*ListForwardedPaymentsRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{44} +} + +func (x *ListForwardedPaymentsRequest) GetPageToken() *types.PageToken { + if x != nil { + return x.PageToken + } + return nil +} + +// The response for the `ListForwardedPayments` RPC. On failure, a gRPC error status is returned. +type ListForwardedPaymentsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // List of forwarded payments. + ForwardedPayments []*types.ForwardedPayment `protobuf:"bytes,1,rep,name=forwarded_payments,json=forwardedPayments,proto3" json:"forwarded_payments,omitempty"` + // `next_page_token` is a pagination token, used to retrieve the next page of results. + // Use this value to query for next-page of paginated operation, by specifying + // this value as the `page_token` in the next request. + // + // If `next_page_token` is `None`, then the "last page" of results has been processed and + // there is no more data to be retrieved. + // + // If `next_page_token` is not `None`, it does not necessarily mean that there is more data in the + // result set. The only way to know when you have reached the end of the result set is when + // `next_page_token` is `None`. + // + // **Caution**: Clients must not assume a specific number of records to be present in a page for + // paginated response. + NextPageToken *types.PageToken `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3,oneof" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListForwardedPaymentsResponse) Reset() { + *x = ListForwardedPaymentsResponse{} + mi := &file_api_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListForwardedPaymentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListForwardedPaymentsResponse) ProtoMessage() {} + +func (x *ListForwardedPaymentsResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListForwardedPaymentsResponse.ProtoReflect.Descriptor instead. +func (*ListForwardedPaymentsResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{45} +} + +func (x *ListForwardedPaymentsResponse) GetForwardedPayments() []*types.ForwardedPayment { + if x != nil { + return x.ForwardedPayments + } + return nil +} + +func (x *ListForwardedPaymentsResponse) GetNextPageToken() *types.PageToken { + if x != nil { + return x.NextPageToken + } + return nil +} + +// Sign a message with the node's secret key. +// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.sign_message +type SignMessageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The message to sign, as raw bytes. + Message []byte `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SignMessageRequest) Reset() { + *x = SignMessageRequest{} + mi := &file_api_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SignMessageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignMessageRequest) ProtoMessage() {} + +func (x *SignMessageRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[46] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignMessageRequest.ProtoReflect.Descriptor instead. +func (*SignMessageRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{46} +} + +func (x *SignMessageRequest) GetMessage() []byte { + if x != nil { + return x.Message + } + return nil +} + +// The response for the `SignMessage` RPC. On failure, a gRPC error status is returned. +type SignMessageResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The signature of the message, as a zbase32-encoded string. + Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SignMessageResponse) Reset() { + *x = SignMessageResponse{} + mi := &file_api_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SignMessageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignMessageResponse) ProtoMessage() {} + +func (x *SignMessageResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[47] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignMessageResponse.ProtoReflect.Descriptor instead. +func (*SignMessageResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{47} +} + +func (x *SignMessageResponse) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +// Verify a signature against a message and public key. +// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.verify_signature +type VerifySignatureRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The message that was signed, as raw bytes. + Message []byte `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + // The signature to verify, as a zbase32-encoded string. + Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + // The hex-encoded public key of the signer. + PublicKey string `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VerifySignatureRequest) Reset() { + *x = VerifySignatureRequest{} + mi := &file_api_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VerifySignatureRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerifySignatureRequest) ProtoMessage() {} + +func (x *VerifySignatureRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[48] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VerifySignatureRequest.ProtoReflect.Descriptor instead. +func (*VerifySignatureRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{48} +} + +func (x *VerifySignatureRequest) GetMessage() []byte { + if x != nil { + return x.Message + } + return nil +} + +func (x *VerifySignatureRequest) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +func (x *VerifySignatureRequest) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +// The response for the `VerifySignature` RPC. On failure, a gRPC error status is returned. +type VerifySignatureResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Whether the signature is valid. + Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VerifySignatureResponse) Reset() { + *x = VerifySignatureResponse{} + mi := &file_api_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VerifySignatureResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerifySignatureResponse) ProtoMessage() {} + +func (x *VerifySignatureResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[49] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VerifySignatureResponse.ProtoReflect.Descriptor instead. +func (*VerifySignatureResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{49} +} + +func (x *VerifySignatureResponse) GetValid() bool { + if x != nil { + return x.Valid + } + return false +} + +// Export the pathfinding scores used by the router. +// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.export_pathfinding_scores +type ExportPathfindingScoresRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExportPathfindingScoresRequest) Reset() { + *x = ExportPathfindingScoresRequest{} + mi := &file_api_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExportPathfindingScoresRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportPathfindingScoresRequest) ProtoMessage() {} + +func (x *ExportPathfindingScoresRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[50] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportPathfindingScoresRequest.ProtoReflect.Descriptor instead. +func (*ExportPathfindingScoresRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{50} +} + +// The response for the `ExportPathfindingScores` RPC. On failure, a gRPC error status is returned. +type ExportPathfindingScoresResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The serialized pathfinding scores data. + Scores []byte `protobuf:"bytes,1,opt,name=scores,proto3" json:"scores,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExportPathfindingScoresResponse) Reset() { + *x = ExportPathfindingScoresResponse{} + mi := &file_api_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExportPathfindingScoresResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportPathfindingScoresResponse) ProtoMessage() {} + +func (x *ExportPathfindingScoresResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[51] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportPathfindingScoresResponse.ProtoReflect.Descriptor instead. +func (*ExportPathfindingScoresResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{51} +} + +func (x *ExportPathfindingScoresResponse) GetScores() []byte { + if x != nil { + return x.Scores + } + return nil +} + +// Retrieves an overview of all known balances. +// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.list_balances +type GetBalancesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBalancesRequest) Reset() { + *x = GetBalancesRequest{} + mi := &file_api_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBalancesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBalancesRequest) ProtoMessage() {} + +func (x *GetBalancesRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[52] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBalancesRequest.ProtoReflect.Descriptor instead. +func (*GetBalancesRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{52} +} + +// The response for the `GetBalances` RPC. On failure, a gRPC error status is returned. +type GetBalancesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The total balance of our on-chain wallet. + TotalOnchainBalanceSats uint64 `protobuf:"varint,1,opt,name=total_onchain_balance_sats,json=totalOnchainBalanceSats,proto3" json:"total_onchain_balance_sats,omitempty"` + // The currently spendable balance of our on-chain wallet. + // + // This includes any sufficiently confirmed funds, minus `total_anchor_channels_reserve_sats`. + SpendableOnchainBalanceSats uint64 `protobuf:"varint,2,opt,name=spendable_onchain_balance_sats,json=spendableOnchainBalanceSats,proto3" json:"spendable_onchain_balance_sats,omitempty"` + // The share of our total balance that we retain as an emergency reserve to (hopefully) be + // able to spend the Anchor outputs when one of our channels is closed. + TotalAnchorChannelsReserveSats uint64 `protobuf:"varint,3,opt,name=total_anchor_channels_reserve_sats,json=totalAnchorChannelsReserveSats,proto3" json:"total_anchor_channels_reserve_sats,omitempty"` + // The total balance that we would be able to claim across all our Lightning channels. + // + // Note this excludes balances that we are unsure if we are able to claim (e.g., as we are + // waiting for a preimage or for a timeout to expire). These balances will however be included + // as `MaybePreimageClaimableHTLC` and `MaybeTimeoutClaimableHTLC` in `lightning_balances`. + TotalLightningBalanceSats uint64 `protobuf:"varint,4,opt,name=total_lightning_balance_sats,json=totalLightningBalanceSats,proto3" json:"total_lightning_balance_sats,omitempty"` + // A detailed list of all known Lightning balances that would be claimable on channel closure. + // + // Note that less than the listed amounts are spendable over lightning as further reserve + // restrictions apply. Please refer to `Channel::outbound_capacity_msat` and + // Channel::next_outbound_htlc_limit_msat as returned by `ListChannels` + // for a better approximation of the spendable amounts. + LightningBalances []*types.LightningBalance `protobuf:"bytes,5,rep,name=lightning_balances,json=lightningBalances,proto3" json:"lightning_balances,omitempty"` + // A detailed list of balances currently being swept from the Lightning to the on-chain + // wallet. + // + // These are balances resulting from channel closures that may have been encumbered by a + // delay, but are now being claimed and useable once sufficiently confirmed on-chain. + // + // Note that, depending on the sync status of the wallets, swept balances listed here might or + // might not already be accounted for in `total_onchain_balance_sats`. + PendingBalancesFromChannelClosures []*types.PendingSweepBalance `protobuf:"bytes,6,rep,name=pending_balances_from_channel_closures,json=pendingBalancesFromChannelClosures,proto3" json:"pending_balances_from_channel_closures,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBalancesResponse) Reset() { + *x = GetBalancesResponse{} + mi := &file_api_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBalancesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBalancesResponse) ProtoMessage() {} + +func (x *GetBalancesResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[53] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBalancesResponse.ProtoReflect.Descriptor instead. +func (*GetBalancesResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{53} +} + +func (x *GetBalancesResponse) GetTotalOnchainBalanceSats() uint64 { + if x != nil { + return x.TotalOnchainBalanceSats + } + return 0 +} + +func (x *GetBalancesResponse) GetSpendableOnchainBalanceSats() uint64 { + if x != nil { + return x.SpendableOnchainBalanceSats + } + return 0 +} + +func (x *GetBalancesResponse) GetTotalAnchorChannelsReserveSats() uint64 { + if x != nil { + return x.TotalAnchorChannelsReserveSats + } + return 0 +} + +func (x *GetBalancesResponse) GetTotalLightningBalanceSats() uint64 { + if x != nil { + return x.TotalLightningBalanceSats + } + return 0 +} + +func (x *GetBalancesResponse) GetLightningBalances() []*types.LightningBalance { + if x != nil { + return x.LightningBalances + } + return nil +} + +func (x *GetBalancesResponse) GetPendingBalancesFromChannelClosures() []*types.PendingSweepBalance { + if x != nil { + return x.PendingBalancesFromChannelClosures + } + return nil +} + +// Connect to a peer on the Lightning Network. +// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.connect +type ConnectPeerRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The hex-encoded public key of the node to connect to. + NodePubkey string `protobuf:"bytes,1,opt,name=node_pubkey,json=nodePubkey,proto3" json:"node_pubkey,omitempty"` + // An address which can be used to connect to a remote peer. + // It can be of type IPv4:port, IPv6:port, OnionV3:port or hostname:port + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // Whether to persist the peer connection, i.e., whether the peer will be re-connected on + // restart. + Persist bool `protobuf:"varint,3,opt,name=persist,proto3" json:"persist,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConnectPeerRequest) Reset() { + *x = ConnectPeerRequest{} + mi := &file_api_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConnectPeerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectPeerRequest) ProtoMessage() {} + +func (x *ConnectPeerRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[54] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConnectPeerRequest.ProtoReflect.Descriptor instead. +func (*ConnectPeerRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{54} +} + +func (x *ConnectPeerRequest) GetNodePubkey() string { + if x != nil { + return x.NodePubkey + } + return "" +} + +func (x *ConnectPeerRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *ConnectPeerRequest) GetPersist() bool { + if x != nil { + return x.Persist + } + return false +} + +// The response for the `ConnectPeer` RPC. On failure, a gRPC error status is returned. +type ConnectPeerResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConnectPeerResponse) Reset() { + *x = ConnectPeerResponse{} + mi := &file_api_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConnectPeerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectPeerResponse) ProtoMessage() {} + +func (x *ConnectPeerResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[55] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConnectPeerResponse.ProtoReflect.Descriptor instead. +func (*ConnectPeerResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{55} +} + +// Disconnect from a peer and remove it from the peer store. +// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.disconnect +type DisconnectPeerRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The hex-encoded public key of the node to disconnect from. + NodePubkey string `protobuf:"bytes,1,opt,name=node_pubkey,json=nodePubkey,proto3" json:"node_pubkey,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DisconnectPeerRequest) Reset() { + *x = DisconnectPeerRequest{} + mi := &file_api_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DisconnectPeerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DisconnectPeerRequest) ProtoMessage() {} + +func (x *DisconnectPeerRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[56] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DisconnectPeerRequest.ProtoReflect.Descriptor instead. +func (*DisconnectPeerRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{56} +} + +func (x *DisconnectPeerRequest) GetNodePubkey() string { + if x != nil { + return x.NodePubkey + } + return "" +} + +// The response for the `DisconnectPeer` RPC. On failure, a gRPC error status is returned. +type DisconnectPeerResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DisconnectPeerResponse) Reset() { + *x = DisconnectPeerResponse{} + mi := &file_api_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DisconnectPeerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DisconnectPeerResponse) ProtoMessage() {} + +func (x *DisconnectPeerResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[57] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DisconnectPeerResponse.ProtoReflect.Descriptor instead. +func (*DisconnectPeerResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{57} +} + +// Returns a list of peers. +// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.list_peers +type ListPeersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPeersRequest) Reset() { + *x = ListPeersRequest{} + mi := &file_api_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPeersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPeersRequest) ProtoMessage() {} + +func (x *ListPeersRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[58] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPeersRequest.ProtoReflect.Descriptor instead. +func (*ListPeersRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{58} +} + +// The response for the `ListPeers` RPC. On failure, a gRPC error status is returned. +type ListPeersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // List of peers. + Peers []*types.Peer `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPeersResponse) Reset() { + *x = ListPeersResponse{} + mi := &file_api_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPeersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPeersResponse) ProtoMessage() {} + +func (x *ListPeersResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[59] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPeersResponse.ProtoReflect.Descriptor instead. +func (*ListPeersResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{59} +} + +func (x *ListPeersResponse) GetPeers() []*types.Peer { + if x != nil { + return x.Peers + } + return nil +} + +// Returns a list of all known short channel IDs in the network graph. +// See more: https://docs.rs/ldk-node/latest/ldk_node/graph/struct.NetworkGraph.html#method.list_channels +type GraphListChannelsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GraphListChannelsRequest) Reset() { + *x = GraphListChannelsRequest{} + mi := &file_api_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GraphListChannelsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphListChannelsRequest) ProtoMessage() {} + +func (x *GraphListChannelsRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[60] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GraphListChannelsRequest.ProtoReflect.Descriptor instead. +func (*GraphListChannelsRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{60} +} + +// The response for the `GraphListChannels` RPC. On failure, a gRPC error status is returned. +type GraphListChannelsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // List of short channel IDs known to the network graph. + ShortChannelIds []uint64 `protobuf:"varint,1,rep,packed,name=short_channel_ids,json=shortChannelIds,proto3" json:"short_channel_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GraphListChannelsResponse) Reset() { + *x = GraphListChannelsResponse{} + mi := &file_api_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GraphListChannelsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphListChannelsResponse) ProtoMessage() {} + +func (x *GraphListChannelsResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[61] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GraphListChannelsResponse.ProtoReflect.Descriptor instead. +func (*GraphListChannelsResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{61} +} + +func (x *GraphListChannelsResponse) GetShortChannelIds() []uint64 { + if x != nil { + return x.ShortChannelIds + } + return nil +} + +// Returns information on a channel with the given short channel ID from the network graph. +// See more: https://docs.rs/ldk-node/latest/ldk_node/graph/struct.NetworkGraph.html#method.channel +type GraphGetChannelRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The short channel ID to look up. + ShortChannelId uint64 `protobuf:"varint,1,opt,name=short_channel_id,json=shortChannelId,proto3" json:"short_channel_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GraphGetChannelRequest) Reset() { + *x = GraphGetChannelRequest{} + mi := &file_api_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GraphGetChannelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphGetChannelRequest) ProtoMessage() {} + +func (x *GraphGetChannelRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[62] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GraphGetChannelRequest.ProtoReflect.Descriptor instead. +func (*GraphGetChannelRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{62} +} + +func (x *GraphGetChannelRequest) GetShortChannelId() uint64 { + if x != nil { + return x.ShortChannelId + } + return 0 +} + +// The response for the `GraphGetChannel` RPC. On failure, a gRPC error status is returned. +type GraphGetChannelResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The channel information. + Channel *types.GraphChannel `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GraphGetChannelResponse) Reset() { + *x = GraphGetChannelResponse{} + mi := &file_api_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GraphGetChannelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphGetChannelResponse) ProtoMessage() {} + +func (x *GraphGetChannelResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[63] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GraphGetChannelResponse.ProtoReflect.Descriptor instead. +func (*GraphGetChannelResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{63} +} + +func (x *GraphGetChannelResponse) GetChannel() *types.GraphChannel { + if x != nil { + return x.Channel + } + return nil +} + +// Returns a list of all known node IDs in the network graph. +// See more: https://docs.rs/ldk-node/latest/ldk_node/graph/struct.NetworkGraph.html#method.list_nodes +type GraphListNodesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GraphListNodesRequest) Reset() { + *x = GraphListNodesRequest{} + mi := &file_api_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GraphListNodesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphListNodesRequest) ProtoMessage() {} + +func (x *GraphListNodesRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[64] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GraphListNodesRequest.ProtoReflect.Descriptor instead. +func (*GraphListNodesRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{64} +} + +// The response for the `GraphListNodes` RPC. On failure, a gRPC error status is returned. +type GraphListNodesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // List of hex-encoded node IDs known to the network graph. + NodeIds []string `protobuf:"bytes,1,rep,name=node_ids,json=nodeIds,proto3" json:"node_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GraphListNodesResponse) Reset() { + *x = GraphListNodesResponse{} + mi := &file_api_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GraphListNodesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphListNodesResponse) ProtoMessage() {} + +func (x *GraphListNodesResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[65] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GraphListNodesResponse.ProtoReflect.Descriptor instead. +func (*GraphListNodesResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{65} +} + +func (x *GraphListNodesResponse) GetNodeIds() []string { + if x != nil { + return x.NodeIds + } + return nil +} + +// Send a payment given a BIP 21 URI or BIP 353 Human-Readable Name. +// +// This method parses the provided URI string and attempts to send the payment. If the URI +// has an offer and/or invoice, it will try to pay the offer first followed by the invoice. +// If they both fail, the on-chain payment will be paid. +// See more: https://docs.rs/ldk-node/latest/ldk_node/payment/struct.UnifiedPayment.html#method.send +type UnifiedSendRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A BIP 21 URI or BIP 353 Human-Readable Name to pay. + Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` + // The amount in millisatoshis to send. Required for "zero-amount" or variable-amount URIs. + AmountMsat *uint64 `protobuf:"varint,2,opt,name=amount_msat,json=amountMsat,proto3,oneof" json:"amount_msat,omitempty"` + // Configuration options for payment routing and pathfinding. + RouteParameters *types.RouteParametersConfig `protobuf:"bytes,3,opt,name=route_parameters,json=routeParameters,proto3,oneof" json:"route_parameters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnifiedSendRequest) Reset() { + *x = UnifiedSendRequest{} + mi := &file_api_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnifiedSendRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnifiedSendRequest) ProtoMessage() {} + +func (x *UnifiedSendRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[66] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnifiedSendRequest.ProtoReflect.Descriptor instead. +func (*UnifiedSendRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{66} +} + +func (x *UnifiedSendRequest) GetUri() string { + if x != nil { + return x.Uri + } + return "" +} + +func (x *UnifiedSendRequest) GetAmountMsat() uint64 { + if x != nil && x.AmountMsat != nil { + return *x.AmountMsat + } + return 0 +} + +func (x *UnifiedSendRequest) GetRouteParameters() *types.RouteParametersConfig { + if x != nil { + return x.RouteParameters + } + return nil +} + +// The response for the `UnifiedSend` RPC. On failure, a gRPC error status is returned. +type UnifiedSendResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to PaymentResult: + // + // *UnifiedSendResponse_Txid + // *UnifiedSendResponse_Bolt11PaymentId + // *UnifiedSendResponse_Bolt12PaymentId + PaymentResult isUnifiedSendResponse_PaymentResult `protobuf_oneof:"payment_result"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnifiedSendResponse) Reset() { + *x = UnifiedSendResponse{} + mi := &file_api_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnifiedSendResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnifiedSendResponse) ProtoMessage() {} + +func (x *UnifiedSendResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[67] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnifiedSendResponse.ProtoReflect.Descriptor instead. +func (*UnifiedSendResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{67} +} + +func (x *UnifiedSendResponse) GetPaymentResult() isUnifiedSendResponse_PaymentResult { + if x != nil { + return x.PaymentResult + } + return nil +} + +func (x *UnifiedSendResponse) GetTxid() string { + if x != nil { + if x, ok := x.PaymentResult.(*UnifiedSendResponse_Txid); ok { + return x.Txid + } + } + return "" +} + +func (x *UnifiedSendResponse) GetBolt11PaymentId() string { + if x != nil { + if x, ok := x.PaymentResult.(*UnifiedSendResponse_Bolt11PaymentId); ok { + return x.Bolt11PaymentId + } + } + return "" +} + +func (x *UnifiedSendResponse) GetBolt12PaymentId() string { + if x != nil { + if x, ok := x.PaymentResult.(*UnifiedSendResponse_Bolt12PaymentId); ok { + return x.Bolt12PaymentId + } + } + return "" +} + +type isUnifiedSendResponse_PaymentResult interface { + isUnifiedSendResponse_PaymentResult() +} + +type UnifiedSendResponse_Txid struct { + // An on-chain payment was made. Contains the transaction ID. + Txid string `protobuf:"bytes,1,opt,name=txid,proto3,oneof"` +} + +type UnifiedSendResponse_Bolt11PaymentId struct { + // A BOLT11 payment was made. Contains the payment ID in hex-encoded form. + Bolt11PaymentId string `protobuf:"bytes,2,opt,name=bolt11_payment_id,json=bolt11PaymentId,proto3,oneof"` +} + +type UnifiedSendResponse_Bolt12PaymentId struct { + // A BOLT12 payment was made. Contains the payment ID in hex-encoded form. + Bolt12PaymentId string `protobuf:"bytes,3,opt,name=bolt12_payment_id,json=bolt12PaymentId,proto3,oneof"` +} + +func (*UnifiedSendResponse_Txid) isUnifiedSendResponse_PaymentResult() {} + +func (*UnifiedSendResponse_Bolt11PaymentId) isUnifiedSendResponse_PaymentResult() {} + +func (*UnifiedSendResponse_Bolt12PaymentId) isUnifiedSendResponse_PaymentResult() {} + +// Returns information on a node with the given ID from the network graph. +// See more: https://docs.rs/ldk-node/latest/ldk_node/graph/struct.NetworkGraph.html#method.node +type GraphGetNodeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The hex-encoded node ID to look up. + NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GraphGetNodeRequest) Reset() { + *x = GraphGetNodeRequest{} + mi := &file_api_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GraphGetNodeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphGetNodeRequest) ProtoMessage() {} + +func (x *GraphGetNodeRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[68] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GraphGetNodeRequest.ProtoReflect.Descriptor instead. +func (*GraphGetNodeRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{68} +} + +func (x *GraphGetNodeRequest) GetNodeId() string { + if x != nil { + return x.NodeId + } + return "" +} + +// The response for the `GraphGetNode` RPC. On failure, a gRPC error status is returned. +type GraphGetNodeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The node information. + Node *types.GraphNode `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GraphGetNodeResponse) Reset() { + *x = GraphGetNodeResponse{} + mi := &file_api_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GraphGetNodeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphGetNodeResponse) ProtoMessage() {} + +func (x *GraphGetNodeResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[69] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GraphGetNodeResponse.ProtoReflect.Descriptor instead. +func (*GraphGetNodeResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{69} +} + +func (x *GraphGetNodeResponse) GetNode() *types.GraphNode { + if x != nil { + return x.Node + } + return nil +} + +// Decode a BOLT11 invoice and return its parsed fields. +// This does not require a running node — it only parses the invoice string. +type DecodeInvoiceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The BOLT11 invoice string to decode. + Invoice string `protobuf:"bytes,1,opt,name=invoice,proto3" json:"invoice,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DecodeInvoiceRequest) Reset() { + *x = DecodeInvoiceRequest{} + mi := &file_api_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DecodeInvoiceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecodeInvoiceRequest) ProtoMessage() {} + +func (x *DecodeInvoiceRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[70] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DecodeInvoiceRequest.ProtoReflect.Descriptor instead. +func (*DecodeInvoiceRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{70} +} + +func (x *DecodeInvoiceRequest) GetInvoice() string { + if x != nil { + return x.Invoice + } + return "" +} + +// The response for the `DecodeInvoice` RPC. On failure, a gRPC error status is returned. +type DecodeInvoiceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The hex-encoded public key of the destination node. + Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` + // The hex-encoded 32-byte payment hash. + PaymentHash string `protobuf:"bytes,2,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"` + // The amount in millisatoshis, if specified in the invoice. + AmountMsat *uint64 `protobuf:"varint,3,opt,name=amount_msat,json=amountMsat,proto3,oneof" json:"amount_msat,omitempty"` + // The creation timestamp in seconds since the UNIX epoch. + Timestamp uint64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // The invoice expiry time in seconds. + Expiry uint64 `protobuf:"varint,5,opt,name=expiry,proto3" json:"expiry,omitempty"` + // The invoice description, if a direct description was provided. + Description *string `protobuf:"bytes,6,opt,name=description,proto3,oneof" json:"description,omitempty"` + // The hex-encoded SHA-256 hash of the description, if a description hash was used. + DescriptionHash *string `protobuf:"bytes,14,opt,name=description_hash,json=descriptionHash,proto3,oneof" json:"description_hash,omitempty"` + // The fallback on-chain address, if any. + FallbackAddress *string `protobuf:"bytes,7,opt,name=fallback_address,json=fallbackAddress,proto3,oneof" json:"fallback_address,omitempty"` + // The minimum final CLTV expiry delta. + MinFinalCltvExpiryDelta uint64 `protobuf:"varint,8,opt,name=min_final_cltv_expiry_delta,json=minFinalCltvExpiryDelta,proto3" json:"min_final_cltv_expiry_delta,omitempty"` + // The hex-encoded 32-byte payment secret. + PaymentSecret string `protobuf:"bytes,9,opt,name=payment_secret,json=paymentSecret,proto3" json:"payment_secret,omitempty"` + // Route hints for finding a path to the payee. + RouteHints []*types.Bolt11RouteHint `protobuf:"bytes,10,rep,name=route_hints,json=routeHints,proto3" json:"route_hints,omitempty"` + // Feature bits advertised in the invoice, keyed by bit number. + Features map[uint32]*types.Bolt11Feature `protobuf:"bytes,11,rep,name=features,proto3" json:"features,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // The currency or network (e.g., "bitcoin", "testnet", "signet", "regtest"). + Currency string `protobuf:"bytes,12,opt,name=currency,proto3" json:"currency,omitempty"` + // The payment metadata, hex-encoded. Only present if the invoice includes payment metadata. + PaymentMetadata *string `protobuf:"bytes,13,opt,name=payment_metadata,json=paymentMetadata,proto3,oneof" json:"payment_metadata,omitempty"` + // Whether the invoice has expired. + IsExpired bool `protobuf:"varint,15,opt,name=is_expired,json=isExpired,proto3" json:"is_expired,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DecodeInvoiceResponse) Reset() { + *x = DecodeInvoiceResponse{} + mi := &file_api_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DecodeInvoiceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecodeInvoiceResponse) ProtoMessage() {} + +func (x *DecodeInvoiceResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[71] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DecodeInvoiceResponse.ProtoReflect.Descriptor instead. +func (*DecodeInvoiceResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{71} +} + +func (x *DecodeInvoiceResponse) GetDestination() string { + if x != nil { + return x.Destination + } + return "" +} + +func (x *DecodeInvoiceResponse) GetPaymentHash() string { + if x != nil { + return x.PaymentHash + } + return "" +} + +func (x *DecodeInvoiceResponse) GetAmountMsat() uint64 { + if x != nil && x.AmountMsat != nil { + return *x.AmountMsat + } + return 0 +} + +func (x *DecodeInvoiceResponse) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *DecodeInvoiceResponse) GetExpiry() uint64 { + if x != nil { + return x.Expiry + } + return 0 +} + +func (x *DecodeInvoiceResponse) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +func (x *DecodeInvoiceResponse) GetDescriptionHash() string { + if x != nil && x.DescriptionHash != nil { + return *x.DescriptionHash + } + return "" +} + +func (x *DecodeInvoiceResponse) GetFallbackAddress() string { + if x != nil && x.FallbackAddress != nil { + return *x.FallbackAddress + } + return "" +} + +func (x *DecodeInvoiceResponse) GetMinFinalCltvExpiryDelta() uint64 { + if x != nil { + return x.MinFinalCltvExpiryDelta + } + return 0 +} + +func (x *DecodeInvoiceResponse) GetPaymentSecret() string { + if x != nil { + return x.PaymentSecret + } + return "" +} + +func (x *DecodeInvoiceResponse) GetRouteHints() []*types.Bolt11RouteHint { + if x != nil { + return x.RouteHints + } + return nil +} + +func (x *DecodeInvoiceResponse) GetFeatures() map[uint32]*types.Bolt11Feature { + if x != nil { + return x.Features + } + return nil +} + +func (x *DecodeInvoiceResponse) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *DecodeInvoiceResponse) GetPaymentMetadata() string { + if x != nil && x.PaymentMetadata != nil { + return *x.PaymentMetadata + } + return "" +} + +func (x *DecodeInvoiceResponse) GetIsExpired() bool { + if x != nil { + return x.IsExpired + } + return false +} + +// Decode a BOLT12 offer and return its parsed fields. +// This does not require a running node — it only parses the offer string. +type DecodeOfferRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The BOLT12 offer string to decode. + Offer string `protobuf:"bytes,1,opt,name=offer,proto3" json:"offer,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DecodeOfferRequest) Reset() { + *x = DecodeOfferRequest{} + mi := &file_api_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DecodeOfferRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecodeOfferRequest) ProtoMessage() {} + +func (x *DecodeOfferRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[72] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DecodeOfferRequest.ProtoReflect.Descriptor instead. +func (*DecodeOfferRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{72} +} + +func (x *DecodeOfferRequest) GetOffer() string { + if x != nil { + return x.Offer + } + return "" +} + +// The response for the `DecodeOffer` RPC. On failure, a gRPC error status is returned. +type DecodeOfferResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The hex-encoded offer ID. + OfferId string `protobuf:"bytes,1,opt,name=offer_id,json=offerId,proto3" json:"offer_id,omitempty"` + // The description of the offer, if any. + Description *string `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"` + // The issuer of the offer, if any. + Issuer *string `protobuf:"bytes,3,opt,name=issuer,proto3,oneof" json:"issuer,omitempty"` + // The amount, if specified. + Amount *types.OfferAmount `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + // The hex-encoded public key used by the issuer to sign invoices, if any. + IssuerSigningPubkey *string `protobuf:"bytes,5,opt,name=issuer_signing_pubkey,json=issuerSigningPubkey,proto3,oneof" json:"issuer_signing_pubkey,omitempty"` + // The absolute expiry time in seconds since the UNIX epoch, if any. + AbsoluteExpiry *uint64 `protobuf:"varint,6,opt,name=absolute_expiry,json=absoluteExpiry,proto3,oneof" json:"absolute_expiry,omitempty"` + // The supported quantity of items. + Quantity *types.OfferQuantity `protobuf:"bytes,7,opt,name=quantity,proto3" json:"quantity,omitempty"` + // Blinded paths to the offer recipient. + Paths []*types.BlindedPath `protobuf:"bytes,8,rep,name=paths,proto3" json:"paths,omitempty"` + // Feature bits advertised in the offer, keyed by bit number. + Features map[uint32]*types.Bolt11Feature `protobuf:"bytes,9,rep,name=features,proto3" json:"features,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Supported blockchain networks (e.g., "bitcoin", "testnet", "signet", "regtest"). + Chains []string `protobuf:"bytes,10,rep,name=chains,proto3" json:"chains,omitempty"` + // The metadata, hex-encoded, if any. + Metadata *string `protobuf:"bytes,11,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"` + // Whether the offer has expired. + IsExpired bool `protobuf:"varint,12,opt,name=is_expired,json=isExpired,proto3" json:"is_expired,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DecodeOfferResponse) Reset() { + *x = DecodeOfferResponse{} + mi := &file_api_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DecodeOfferResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecodeOfferResponse) ProtoMessage() {} + +func (x *DecodeOfferResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[73] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DecodeOfferResponse.ProtoReflect.Descriptor instead. +func (*DecodeOfferResponse) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{73} +} + +func (x *DecodeOfferResponse) GetOfferId() string { + if x != nil { + return x.OfferId + } + return "" +} + +func (x *DecodeOfferResponse) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +func (x *DecodeOfferResponse) GetIssuer() string { + if x != nil && x.Issuer != nil { + return *x.Issuer + } + return "" +} + +func (x *DecodeOfferResponse) GetAmount() *types.OfferAmount { + if x != nil { + return x.Amount + } + return nil +} + +func (x *DecodeOfferResponse) GetIssuerSigningPubkey() string { + if x != nil && x.IssuerSigningPubkey != nil { + return *x.IssuerSigningPubkey + } + return "" +} + +func (x *DecodeOfferResponse) GetAbsoluteExpiry() uint64 { + if x != nil && x.AbsoluteExpiry != nil { + return *x.AbsoluteExpiry + } + return 0 +} + +func (x *DecodeOfferResponse) GetQuantity() *types.OfferQuantity { + if x != nil { + return x.Quantity + } + return nil +} + +func (x *DecodeOfferResponse) GetPaths() []*types.BlindedPath { + if x != nil { + return x.Paths + } + return nil +} + +func (x *DecodeOfferResponse) GetFeatures() map[uint32]*types.Bolt11Feature { + if x != nil { + return x.Features + } + return nil +} + +func (x *DecodeOfferResponse) GetChains() []string { + if x != nil { + return x.Chains + } + return nil +} + +func (x *DecodeOfferResponse) GetMetadata() string { + if x != nil && x.Metadata != nil { + return *x.Metadata + } + return "" +} + +func (x *DecodeOfferResponse) GetIsExpired() bool { + if x != nil { + return x.IsExpired + } + return false +} + +// Subscribe to a stream of server events. +type SubscribeEventsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SubscribeEventsRequest) Reset() { + *x = SubscribeEventsRequest{} + mi := &file_api_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SubscribeEventsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubscribeEventsRequest) ProtoMessage() {} + +func (x *SubscribeEventsRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[74] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubscribeEventsRequest.ProtoReflect.Descriptor instead. +func (*SubscribeEventsRequest) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{74} +} + +var File_api_proto protoreflect.FileDescriptor + +const file_api_proto_rawDesc = "" + + "\n" + + "\tapi.proto\x12\x03api\x1a\vtypes.proto\x1a\fevents.proto\"\x14\n" + + "\x12GetNodeInfoRequest\"\xd5\a\n" + + "\x13GetNodeInfoResponse\x12\x17\n" + + "\anode_id\x18\x01 \x01(\tR\x06nodeId\x12>\n" + + "\x12current_best_block\x18\x03 \x01(\v2\x10.types.BestBlockR\x10currentBestBlock\x12W\n" + + "&latest_lightning_wallet_sync_timestamp\x18\x04 \x01(\x04H\x00R\"latestLightningWalletSyncTimestamp\x88\x01\x01\x12S\n" + + "$latest_onchain_wallet_sync_timestamp\x18\x05 \x01(\x04H\x01R latestOnchainWalletSyncTimestamp\x88\x01\x01\x12V\n" + + "&latest_fee_rate_cache_update_timestamp\x18\x06 \x01(\x04H\x02R!latestFeeRateCacheUpdateTimestamp\x88\x01\x01\x12F\n" + + "\x1dlatest_rgs_snapshot_timestamp\x18\a \x01(\x04H\x03R\x1alatestRgsSnapshotTimestamp\x88\x01\x01\x12c\n" + + ",latest_node_announcement_broadcast_timestamp\x18\b \x01(\x04H\x04R(latestNodeAnnouncementBroadcastTimestamp\x88\x01\x01\x12/\n" + + "\x13listening_addresses\x18\t \x03(\tR\x12listeningAddresses\x125\n" + + "\x16announcement_addresses\x18\n" + + " \x03(\tR\x15announcementAddresses\x12\"\n" + + "\n" + + "node_alias\x18\v \x01(\tH\x05R\tnodeAlias\x88\x01\x01\x12\x1b\n" + + "\tnode_uris\x18\f \x03(\tR\bnodeUris\x12(\n" + + "\anetwork\x18\r \x01(\x0e2\x0e.types.NetworkR\anetworkB)\n" + + "'_latest_lightning_wallet_sync_timestampB'\n" + + "%_latest_onchain_wallet_sync_timestampB)\n" + + "'_latest_fee_rate_cache_update_timestampB \n" + + "\x1e_latest_rgs_snapshot_timestampB/\n" + + "-_latest_node_announcement_broadcast_timestampB\r\n" + + "\v_node_alias\"\x17\n" + + "\x15OnchainReceiveRequest\"2\n" + + "\x16OnchainReceiveResponse\x12\x18\n" + + "\aaddress\x18\x01 \x01(\tR\aaddress\"\xdc\x01\n" + + "\x12OnchainSendRequest\x12\x18\n" + + "\aaddress\x18\x01 \x01(\tR\aaddress\x12$\n" + + "\vamount_sats\x18\x02 \x01(\x04H\x00R\n" + + "amountSats\x88\x01\x01\x12\x1e\n" + + "\bsend_all\x18\x03 \x01(\bH\x01R\asendAll\x88\x01\x01\x121\n" + + "\x13fee_rate_sat_per_vb\x18\x04 \x01(\x04H\x02R\x0ffeeRateSatPerVb\x88\x01\x01B\x0e\n" + + "\f_amount_satsB\v\n" + + "\t_send_allB\x16\n" + + "\x14_fee_rate_sat_per_vb\")\n" + + "\x13OnchainSendResponse\x12\x12\n" + + "\x04txid\x18\x01 \x01(\tR\x04txid\"\xb0\x01\n" + + "\x14Bolt11ReceiveRequest\x12$\n" + + "\vamount_msat\x18\x01 \x01(\x04H\x00R\n" + + "amountMsat\x88\x01\x01\x12A\n" + + "\vdescription\x18\x02 \x01(\v2\x1f.types.Bolt11InvoiceDescriptionR\vdescription\x12\x1f\n" + + "\vexpiry_secs\x18\x03 \x01(\rR\n" + + "expirySecsB\x0e\n" + + "\f_amount_msat\"{\n" + + "\x15Bolt11ReceiveResponse\x12\x18\n" + + "\ainvoice\x18\x01 \x01(\tR\ainvoice\x12!\n" + + "\fpayment_hash\x18\x02 \x01(\tR\vpaymentHash\x12%\n" + + "\x0epayment_secret\x18\x03 \x01(\tR\rpaymentSecret\"\xda\x01\n" + + "\x1bBolt11ReceiveForHashRequest\x12$\n" + + "\vamount_msat\x18\x01 \x01(\x04H\x00R\n" + + "amountMsat\x88\x01\x01\x12A\n" + + "\vdescription\x18\x02 \x01(\v2\x1f.types.Bolt11InvoiceDescriptionR\vdescription\x12\x1f\n" + + "\vexpiry_secs\x18\x03 \x01(\rR\n" + + "expirySecs\x12!\n" + + "\fpayment_hash\x18\x04 \x01(\tR\vpaymentHashB\x0e\n" + + "\f_amount_msat\"8\n" + + "\x1cBolt11ReceiveForHashResponse\x12\x18\n" + + "\ainvoice\x18\x01 \x01(\tR\ainvoice\"\xc3\x01\n" + + "\x19Bolt11ClaimForHashRequest\x12&\n" + + "\fpayment_hash\x18\x01 \x01(\tH\x00R\vpaymentHash\x88\x01\x01\x127\n" + + "\x15claimable_amount_msat\x18\x02 \x01(\x04H\x01R\x13claimableAmountMsat\x88\x01\x01\x12\x1a\n" + + "\bpreimage\x18\x03 \x01(\tR\bpreimageB\x0f\n" + + "\r_payment_hashB\x18\n" + + "\x16_claimable_amount_msat\"\x1c\n" + + "\x1aBolt11ClaimForHashResponse\"=\n" + + "\x18Bolt11FailForHashRequest\x12!\n" + + "\fpayment_hash\x18\x01 \x01(\tR\vpaymentHash\"\x1b\n" + + "\x19Bolt11FailForHashResponse\"\x8d\x02\n" + + "!Bolt11ReceiveViaJitChannelRequest\x12\x1f\n" + + "\vamount_msat\x18\x01 \x01(\x04R\n" + + "amountMsat\x12A\n" + + "\vdescription\x18\x02 \x01(\v2\x1f.types.Bolt11InvoiceDescriptionR\vdescription\x12\x1f\n" + + "\vexpiry_secs\x18\x03 \x01(\rR\n" + + "expirySecs\x12B\n" + + "\x1cmax_total_lsp_fee_limit_msat\x18\x04 \x01(\x04H\x00R\x17maxTotalLspFeeLimitMsat\x88\x01\x01B\x1f\n" + + "\x1d_max_total_lsp_fee_limit_msat\">\n" + + "\"Bolt11ReceiveViaJitChannelResponse\x12\x18\n" + + "\ainvoice\x18\x01 \x01(\tR\ainvoice\"\x9a\x02\n" + + "/Bolt11ReceiveVariableAmountViaJitChannelRequest\x12A\n" + + "\vdescription\x18\x01 \x01(\v2\x1f.types.Bolt11InvoiceDescriptionR\vdescription\x12\x1f\n" + + "\vexpiry_secs\x18\x02 \x01(\rR\n" + + "expirySecs\x12W\n" + + "'max_proportional_lsp_fee_limit_ppm_msat\x18\x03 \x01(\x04H\x00R!maxProportionalLspFeeLimitPpmMsat\x88\x01\x01B*\n" + + "(_max_proportional_lsp_fee_limit_ppm_msat\"L\n" + + "0Bolt11ReceiveVariableAmountViaJitChannelResponse\x12\x18\n" + + "\ainvoice\x18\x01 \x01(\tR\ainvoice\"\xc6\x01\n" + + "\x11Bolt11SendRequest\x12\x18\n" + + "\ainvoice\x18\x01 \x01(\tR\ainvoice\x12$\n" + + "\vamount_msat\x18\x02 \x01(\x04H\x00R\n" + + "amountMsat\x88\x01\x01\x12L\n" + + "\x10route_parameters\x18\x03 \x01(\v2\x1c.types.RouteParametersConfigH\x01R\x0frouteParameters\x88\x01\x01B\x0e\n" + + "\f_amount_msatB\x13\n" + + "\x11_route_parameters\"3\n" + + "\x12Bolt11SendResponse\x12\x1d\n" + + "\n" + + "payment_id\x18\x01 \x01(\tR\tpaymentId\"\xd2\x01\n" + + "\x14Bolt12ReceiveRequest\x12 \n" + + "\vdescription\x18\x01 \x01(\tR\vdescription\x12$\n" + + "\vamount_msat\x18\x02 \x01(\x04H\x00R\n" + + "amountMsat\x88\x01\x01\x12$\n" + + "\vexpiry_secs\x18\x03 \x01(\rH\x01R\n" + + "expirySecs\x88\x01\x01\x12\x1f\n" + + "\bquantity\x18\x04 \x01(\x04H\x02R\bquantity\x88\x01\x01B\x0e\n" + + "\f_amount_msatB\x0e\n" + + "\f_expiry_secsB\v\n" + + "\t_quantity\"H\n" + + "\x15Bolt12ReceiveResponse\x12\x14\n" + + "\x05offer\x18\x01 \x01(\tR\x05offer\x12\x19\n" + + "\boffer_id\x18\x02 \x01(\tR\aofferId\"\xa3\x02\n" + + "\x11Bolt12SendRequest\x12\x14\n" + + "\x05offer\x18\x01 \x01(\tR\x05offer\x12$\n" + + "\vamount_msat\x18\x02 \x01(\x04H\x00R\n" + + "amountMsat\x88\x01\x01\x12\x1f\n" + + "\bquantity\x18\x03 \x01(\x04H\x01R\bquantity\x88\x01\x01\x12\"\n" + + "\n" + + "payer_note\x18\x04 \x01(\tH\x02R\tpayerNote\x88\x01\x01\x12L\n" + + "\x10route_parameters\x18\x05 \x01(\v2\x1c.types.RouteParametersConfigH\x03R\x0frouteParameters\x88\x01\x01B\x0e\n" + + "\f_amount_msatB\v\n" + + "\t_quantityB\r\n" + + "\v_payer_noteB\x13\n" + + "\x11_route_parameters\"3\n" + + "\x12Bolt12SendResponse\x12\x1d\n" + + "\n" + + "payment_id\x18\x01 \x01(\tR\tpaymentId\"\xee\x01\n" + + "\x16SpontaneousSendRequest\x12\x1f\n" + + "\vamount_msat\x18\x01 \x01(\x04R\n" + + "amountMsat\x12\x17\n" + + "\anode_id\x18\x02 \x01(\tR\x06nodeId\x12L\n" + + "\x10route_parameters\x18\x03 \x01(\v2\x1c.types.RouteParametersConfigH\x00R\x0frouteParameters\x88\x01\x01\x127\n" + + "\vcustom_tlvs\x18\x04 \x03(\v2\x16.types.CustomTlvRecordR\n" + + "customTlvsB\x13\n" + + "\x11_route_parameters\"8\n" + + "\x17SpontaneousSendResponse\x12\x1d\n" + + "\n" + + "payment_id\x18\x01 \x01(\tR\tpaymentId\"\x9f\x03\n" + + "\x12OpenChannelRequest\x12\x1f\n" + + "\vnode_pubkey\x18\x01 \x01(\tR\n" + + "nodePubkey\x12\x18\n" + + "\aaddress\x18\x02 \x01(\tR\aaddress\x12.\n" + + "\x13channel_amount_sats\x18\x03 \x01(\x04R\x11channelAmountSats\x12>\n" + + "\x19push_to_counterparty_msat\x18\x04 \x01(\x04H\x00R\x16pushToCounterpartyMsat\x88\x01\x01\x12@\n" + + "\x0echannel_config\x18\x05 \x01(\v2\x14.types.ChannelConfigH\x01R\rchannelConfig\x88\x01\x01\x12)\n" + + "\x10announce_channel\x18\x06 \x01(\bR\x0fannounceChannel\x12@\n" + + "\x1cdisable_counterparty_reserve\x18\a \x01(\bR\x1adisableCounterpartyReserveB\x1c\n" + + "\x1a_push_to_counterparty_msatB\x11\n" + + "\x0f_channel_config\"=\n" + + "\x13OpenChannelResponse\x12&\n" + + "\x0fuser_channel_id\x18\x01 \x01(\tR\ruserChannelId\"\x99\x01\n" + + "\x0fSpliceInRequest\x12&\n" + + "\x0fuser_channel_id\x18\x01 \x01(\tR\ruserChannelId\x120\n" + + "\x14counterparty_node_id\x18\x02 \x01(\tR\x12counterpartyNodeId\x12,\n" + + "\x12splice_amount_sats\x18\x03 \x01(\x04R\x10spliceAmountSats\"\x12\n" + + "\x10SpliceInResponse\"\xc5\x01\n" + + "\x10SpliceOutRequest\x12&\n" + + "\x0fuser_channel_id\x18\x01 \x01(\tR\ruserChannelId\x120\n" + + "\x14counterparty_node_id\x18\x02 \x01(\tR\x12counterpartyNodeId\x12\x1d\n" + + "\aaddress\x18\x03 \x01(\tH\x00R\aaddress\x88\x01\x01\x12,\n" + + "\x12splice_amount_sats\x18\x04 \x01(\x04R\x10spliceAmountSatsB\n" + + "\n" + + "\b_address\"-\n" + + "\x11SpliceOutResponse\x12\x18\n" + + "\aaddress\x18\x01 \x01(\tR\aaddress\"\xb3\x01\n" + + "\x1aUpdateChannelConfigRequest\x12&\n" + + "\x0fuser_channel_id\x18\x01 \x01(\tR\ruserChannelId\x120\n" + + "\x14counterparty_node_id\x18\x02 \x01(\tR\x12counterpartyNodeId\x12;\n" + + "\x0echannel_config\x18\x03 \x01(\v2\x14.types.ChannelConfigR\rchannelConfig\"\x1d\n" + + "\x1bUpdateChannelConfigResponse\"o\n" + + "\x13CloseChannelRequest\x12&\n" + + "\x0fuser_channel_id\x18\x01 \x01(\tR\ruserChannelId\x120\n" + + "\x14counterparty_node_id\x18\x02 \x01(\tR\x12counterpartyNodeId\"\x16\n" + + "\x14CloseChannelResponse\"\xbe\x01\n" + + "\x18ForceCloseChannelRequest\x12&\n" + + "\x0fuser_channel_id\x18\x01 \x01(\tR\ruserChannelId\x120\n" + + "\x14counterparty_node_id\x18\x02 \x01(\tR\x12counterpartyNodeId\x121\n" + + "\x12force_close_reason\x18\x03 \x01(\tH\x00R\x10forceCloseReason\x88\x01\x01B\x15\n" + + "\x13_force_close_reason\"\x1b\n" + + "\x19ForceCloseChannelResponse\"\x15\n" + + "\x13ListChannelsRequest\"B\n" + + "\x14ListChannelsResponse\x12*\n" + + "\bchannels\x18\x01 \x03(\v2\x0e.types.ChannelR\bchannels\"9\n" + + "\x18GetPaymentDetailsRequest\x12\x1d\n" + + "\n" + + "payment_id\x18\x01 \x01(\tR\tpaymentId\"E\n" + + "\x19GetPaymentDetailsResponse\x12(\n" + + "\apayment\x18\x01 \x01(\v2\x0e.types.PaymentR\apayment\"Z\n" + + "\x13ListPaymentsRequest\x124\n" + + "\n" + + "page_token\x18\x01 \x01(\v2\x10.types.PageTokenH\x00R\tpageToken\x88\x01\x01B\r\n" + + "\v_page_token\"\x95\x01\n" + + "\x14ListPaymentsResponse\x12*\n" + + "\bpayments\x18\x01 \x03(\v2\x0e.types.PaymentR\bpayments\x12=\n" + + "\x0fnext_page_token\x18\x02 \x01(\v2\x10.types.PageTokenH\x00R\rnextPageToken\x88\x01\x01B\x12\n" + + "\x10_next_page_token\"c\n" + + "\x1cListForwardedPaymentsRequest\x124\n" + + "\n" + + "page_token\x18\x01 \x01(\v2\x10.types.PageTokenH\x00R\tpageToken\x88\x01\x01B\r\n" + + "\v_page_token\"\xba\x01\n" + + "\x1dListForwardedPaymentsResponse\x12F\n" + + "\x12forwarded_payments\x18\x01 \x03(\v2\x17.types.ForwardedPaymentR\x11forwardedPayments\x12=\n" + + "\x0fnext_page_token\x18\x02 \x01(\v2\x10.types.PageTokenH\x00R\rnextPageToken\x88\x01\x01B\x12\n" + + "\x10_next_page_token\".\n" + + "\x12SignMessageRequest\x12\x18\n" + + "\amessage\x18\x01 \x01(\fR\amessage\"3\n" + + "\x13SignMessageResponse\x12\x1c\n" + + "\tsignature\x18\x01 \x01(\tR\tsignature\"o\n" + + "\x16VerifySignatureRequest\x12\x18\n" + + "\amessage\x18\x01 \x01(\fR\amessage\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\tR\tsignature\x12\x1d\n" + + "\n" + + "public_key\x18\x03 \x01(\tR\tpublicKey\"/\n" + + "\x17VerifySignatureResponse\x12\x14\n" + + "\x05valid\x18\x01 \x01(\bR\x05valid\" \n" + + "\x1eExportPathfindingScoresRequest\"9\n" + + "\x1fExportPathfindingScoresResponse\x12\x16\n" + + "\x06scores\x18\x01 \x01(\fR\x06scores\"\x14\n" + + "\x12GetBalancesRequest\"\xdc\x03\n" + + "\x13GetBalancesResponse\x12;\n" + + "\x1atotal_onchain_balance_sats\x18\x01 \x01(\x04R\x17totalOnchainBalanceSats\x12C\n" + + "\x1espendable_onchain_balance_sats\x18\x02 \x01(\x04R\x1bspendableOnchainBalanceSats\x12J\n" + + "\"total_anchor_channels_reserve_sats\x18\x03 \x01(\x04R\x1etotalAnchorChannelsReserveSats\x12?\n" + + "\x1ctotal_lightning_balance_sats\x18\x04 \x01(\x04R\x19totalLightningBalanceSats\x12F\n" + + "\x12lightning_balances\x18\x05 \x03(\v2\x17.types.LightningBalanceR\x11lightningBalances\x12n\n" + + "&pending_balances_from_channel_closures\x18\x06 \x03(\v2\x1a.types.PendingSweepBalanceR\"pendingBalancesFromChannelClosures\"i\n" + + "\x12ConnectPeerRequest\x12\x1f\n" + + "\vnode_pubkey\x18\x01 \x01(\tR\n" + + "nodePubkey\x12\x18\n" + + "\aaddress\x18\x02 \x01(\tR\aaddress\x12\x18\n" + + "\apersist\x18\x03 \x01(\bR\apersist\"\x15\n" + + "\x13ConnectPeerResponse\"8\n" + + "\x15DisconnectPeerRequest\x12\x1f\n" + + "\vnode_pubkey\x18\x01 \x01(\tR\n" + + "nodePubkey\"\x18\n" + + "\x16DisconnectPeerResponse\"\x12\n" + + "\x10ListPeersRequest\"6\n" + + "\x11ListPeersResponse\x12!\n" + + "\x05peers\x18\x01 \x03(\v2\v.types.PeerR\x05peers\"\x1a\n" + + "\x18GraphListChannelsRequest\"G\n" + + "\x19GraphListChannelsResponse\x12*\n" + + "\x11short_channel_ids\x18\x01 \x03(\x04R\x0fshortChannelIds\"B\n" + + "\x16GraphGetChannelRequest\x12(\n" + + "\x10short_channel_id\x18\x01 \x01(\x04R\x0eshortChannelId\"H\n" + + "\x17GraphGetChannelResponse\x12-\n" + + "\achannel\x18\x01 \x01(\v2\x13.types.GraphChannelR\achannel\"\x17\n" + + "\x15GraphListNodesRequest\"3\n" + + "\x16GraphListNodesResponse\x12\x19\n" + + "\bnode_ids\x18\x01 \x03(\tR\anodeIds\"\xbf\x01\n" + + "\x12UnifiedSendRequest\x12\x10\n" + + "\x03uri\x18\x01 \x01(\tR\x03uri\x12$\n" + + "\vamount_msat\x18\x02 \x01(\x04H\x00R\n" + + "amountMsat\x88\x01\x01\x12L\n" + + "\x10route_parameters\x18\x03 \x01(\v2\x1c.types.RouteParametersConfigH\x01R\x0frouteParameters\x88\x01\x01B\x0e\n" + + "\f_amount_msatB\x13\n" + + "\x11_route_parameters\"\x99\x01\n" + + "\x13UnifiedSendResponse\x12\x14\n" + + "\x04txid\x18\x01 \x01(\tH\x00R\x04txid\x12,\n" + + "\x11bolt11_payment_id\x18\x02 \x01(\tH\x00R\x0fbolt11PaymentId\x12,\n" + + "\x11bolt12_payment_id\x18\x03 \x01(\tH\x00R\x0fbolt12PaymentIdB\x10\n" + + "\x0epayment_result\".\n" + + "\x13GraphGetNodeRequest\x12\x17\n" + + "\anode_id\x18\x01 \x01(\tR\x06nodeId\"<\n" + + "\x14GraphGetNodeResponse\x12$\n" + + "\x04node\x18\x01 \x01(\v2\x10.types.GraphNodeR\x04node\"0\n" + + "\x14DecodeInvoiceRequest\x12\x18\n" + + "\ainvoice\x18\x01 \x01(\tR\ainvoice\"\xc0\x06\n" + + "\x15DecodeInvoiceResponse\x12 \n" + + "\vdestination\x18\x01 \x01(\tR\vdestination\x12!\n" + + "\fpayment_hash\x18\x02 \x01(\tR\vpaymentHash\x12$\n" + + "\vamount_msat\x18\x03 \x01(\x04H\x00R\n" + + "amountMsat\x88\x01\x01\x12\x1c\n" + + "\ttimestamp\x18\x04 \x01(\x04R\ttimestamp\x12\x16\n" + + "\x06expiry\x18\x05 \x01(\x04R\x06expiry\x12%\n" + + "\vdescription\x18\x06 \x01(\tH\x01R\vdescription\x88\x01\x01\x12.\n" + + "\x10description_hash\x18\x0e \x01(\tH\x02R\x0fdescriptionHash\x88\x01\x01\x12.\n" + + "\x10fallback_address\x18\a \x01(\tH\x03R\x0ffallbackAddress\x88\x01\x01\x12<\n" + + "\x1bmin_final_cltv_expiry_delta\x18\b \x01(\x04R\x17minFinalCltvExpiryDelta\x12%\n" + + "\x0epayment_secret\x18\t \x01(\tR\rpaymentSecret\x127\n" + + "\vroute_hints\x18\n" + + " \x03(\v2\x16.types.Bolt11RouteHintR\n" + + "routeHints\x12D\n" + + "\bfeatures\x18\v \x03(\v2(.api.DecodeInvoiceResponse.FeaturesEntryR\bfeatures\x12\x1a\n" + + "\bcurrency\x18\f \x01(\tR\bcurrency\x12.\n" + + "\x10payment_metadata\x18\r \x01(\tH\x04R\x0fpaymentMetadata\x88\x01\x01\x12\x1d\n" + + "\n" + + "is_expired\x18\x0f \x01(\bR\tisExpired\x1aQ\n" + + "\rFeaturesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12*\n" + + "\x05value\x18\x02 \x01(\v2\x14.types.Bolt11FeatureR\x05value:\x028\x01B\x0e\n" + + "\f_amount_msatB\x0e\n" + + "\f_descriptionB\x13\n" + + "\x11_description_hashB\x13\n" + + "\x11_fallback_addressB\x13\n" + + "\x11_payment_metadata\"*\n" + + "\x12DecodeOfferRequest\x12\x14\n" + + "\x05offer\x18\x01 \x01(\tR\x05offer\"\xa8\x05\n" + + "\x13DecodeOfferResponse\x12\x19\n" + + "\boffer_id\x18\x01 \x01(\tR\aofferId\x12%\n" + + "\vdescription\x18\x02 \x01(\tH\x00R\vdescription\x88\x01\x01\x12\x1b\n" + + "\x06issuer\x18\x03 \x01(\tH\x01R\x06issuer\x88\x01\x01\x12*\n" + + "\x06amount\x18\x04 \x01(\v2\x12.types.OfferAmountR\x06amount\x127\n" + + "\x15issuer_signing_pubkey\x18\x05 \x01(\tH\x02R\x13issuerSigningPubkey\x88\x01\x01\x12,\n" + + "\x0fabsolute_expiry\x18\x06 \x01(\x04H\x03R\x0eabsoluteExpiry\x88\x01\x01\x120\n" + + "\bquantity\x18\a \x01(\v2\x14.types.OfferQuantityR\bquantity\x12(\n" + + "\x05paths\x18\b \x03(\v2\x12.types.BlindedPathR\x05paths\x12B\n" + + "\bfeatures\x18\t \x03(\v2&.api.DecodeOfferResponse.FeaturesEntryR\bfeatures\x12\x16\n" + + "\x06chains\x18\n" + + " \x03(\tR\x06chains\x12\x1f\n" + + "\bmetadata\x18\v \x01(\tH\x04R\bmetadata\x88\x01\x01\x12\x1d\n" + + "\n" + + "is_expired\x18\f \x01(\bR\tisExpired\x1aQ\n" + + "\rFeaturesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12*\n" + + "\x05value\x18\x02 \x01(\v2\x14.types.Bolt11FeatureR\x05value:\x028\x01B\x0e\n" + + "\f_descriptionB\t\n" + + "\a_issuerB\x18\n" + + "\x16_issuer_signing_pubkeyB\x12\n" + + "\x10_absolute_expiryB\v\n" + + "\t_metadata\"\x18\n" + + "\x16SubscribeEventsRequest2\xfb\x16\n" + + "\rLightningNode\x12@\n" + + "\vGetNodeInfo\x12\x17.api.GetNodeInfoRequest\x1a\x18.api.GetNodeInfoResponse\x12@\n" + + "\vGetBalances\x12\x17.api.GetBalancesRequest\x1a\x18.api.GetBalancesResponse\x12I\n" + + "\x0eOnchainReceive\x12\x1a.api.OnchainReceiveRequest\x1a\x1b.api.OnchainReceiveResponse\x12@\n" + + "\vOnchainSend\x12\x17.api.OnchainSendRequest\x1a\x18.api.OnchainSendResponse\x12F\n" + + "\rBolt11Receive\x12\x19.api.Bolt11ReceiveRequest\x1a\x1a.api.Bolt11ReceiveResponse\x12[\n" + + "\x14Bolt11ReceiveForHash\x12 .api.Bolt11ReceiveForHashRequest\x1a!.api.Bolt11ReceiveForHashResponse\x12U\n" + + "\x12Bolt11ClaimForHash\x12\x1e.api.Bolt11ClaimForHashRequest\x1a\x1f.api.Bolt11ClaimForHashResponse\x12R\n" + + "\x11Bolt11FailForHash\x12\x1d.api.Bolt11FailForHashRequest\x1a\x1e.api.Bolt11FailForHashResponse\x12m\n" + + "\x1aBolt11ReceiveViaJitChannel\x12&.api.Bolt11ReceiveViaJitChannelRequest\x1a'.api.Bolt11ReceiveViaJitChannelResponse\x12\x97\x01\n" + + "(Bolt11ReceiveVariableAmountViaJitChannel\x124.api.Bolt11ReceiveVariableAmountViaJitChannelRequest\x1a5.api.Bolt11ReceiveVariableAmountViaJitChannelResponse\x12=\n" + + "\n" + + "Bolt11Send\x12\x16.api.Bolt11SendRequest\x1a\x17.api.Bolt11SendResponse\x12F\n" + + "\rBolt12Receive\x12\x19.api.Bolt12ReceiveRequest\x1a\x1a.api.Bolt12ReceiveResponse\x12=\n" + + "\n" + + "Bolt12Send\x12\x16.api.Bolt12SendRequest\x1a\x17.api.Bolt12SendResponse\x12L\n" + + "\x0fSpontaneousSend\x12\x1b.api.SpontaneousSendRequest\x1a\x1c.api.SpontaneousSendResponse\x12@\n" + + "\vOpenChannel\x12\x17.api.OpenChannelRequest\x1a\x18.api.OpenChannelResponse\x127\n" + + "\bSpliceIn\x12\x14.api.SpliceInRequest\x1a\x15.api.SpliceInResponse\x12:\n" + + "\tSpliceOut\x12\x15.api.SpliceOutRequest\x1a\x16.api.SpliceOutResponse\x12X\n" + + "\x13UpdateChannelConfig\x12\x1f.api.UpdateChannelConfigRequest\x1a .api.UpdateChannelConfigResponse\x12C\n" + + "\fCloseChannel\x12\x18.api.CloseChannelRequest\x1a\x19.api.CloseChannelResponse\x12R\n" + + "\x11ForceCloseChannel\x12\x1d.api.ForceCloseChannelRequest\x1a\x1e.api.ForceCloseChannelResponse\x12C\n" + + "\fListChannels\x12\x18.api.ListChannelsRequest\x1a\x19.api.ListChannelsResponse\x12R\n" + + "\x11GetPaymentDetails\x12\x1d.api.GetPaymentDetailsRequest\x1a\x1e.api.GetPaymentDetailsResponse\x12C\n" + + "\fListPayments\x12\x18.api.ListPaymentsRequest\x1a\x19.api.ListPaymentsResponse\x12^\n" + + "\x15ListForwardedPayments\x12!.api.ListForwardedPaymentsRequest\x1a\".api.ListForwardedPaymentsResponse\x12@\n" + + "\vConnectPeer\x12\x17.api.ConnectPeerRequest\x1a\x18.api.ConnectPeerResponse\x12I\n" + + "\x0eDisconnectPeer\x12\x1a.api.DisconnectPeerRequest\x1a\x1b.api.DisconnectPeerResponse\x12:\n" + + "\tListPeers\x12\x15.api.ListPeersRequest\x1a\x16.api.ListPeersResponse\x12@\n" + + "\vSignMessage\x12\x17.api.SignMessageRequest\x1a\x18.api.SignMessageResponse\x12L\n" + + "\x0fVerifySignature\x12\x1b.api.VerifySignatureRequest\x1a\x1c.api.VerifySignatureResponse\x12d\n" + + "\x17ExportPathfindingScores\x12#.api.ExportPathfindingScoresRequest\x1a$.api.ExportPathfindingScoresResponse\x12@\n" + + "\vUnifiedSend\x12\x17.api.UnifiedSendRequest\x1a\x18.api.UnifiedSendResponse\x12F\n" + + "\rDecodeInvoice\x12\x19.api.DecodeInvoiceRequest\x1a\x1a.api.DecodeInvoiceResponse\x12@\n" + + "\vDecodeOffer\x12\x17.api.DecodeOfferRequest\x1a\x18.api.DecodeOfferResponse\x12R\n" + + "\x11GraphListChannels\x12\x1d.api.GraphListChannelsRequest\x1a\x1e.api.GraphListChannelsResponse\x12L\n" + + "\x0fGraphGetChannel\x12\x1b.api.GraphGetChannelRequest\x1a\x1c.api.GraphGetChannelResponse\x12I\n" + + "\x0eGraphListNodes\x12\x1a.api.GraphListNodesRequest\x1a\x1b.api.GraphListNodesResponse\x12C\n" + + "\fGraphGetNode\x12\x18.api.GraphGetNodeRequest\x1a\x19.api.GraphGetNodeResponse\x12G\n" + + "\x0fSubscribeEvents\x12\x1b.api.SubscribeEventsRequest\x1a\x15.events.EventEnvelope0\x01b\x06proto3" + +var ( + file_api_proto_rawDescOnce sync.Once + file_api_proto_rawDescData []byte +) + +func file_api_proto_rawDescGZIP() []byte { + file_api_proto_rawDescOnce.Do(func() { + file_api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_api_proto_rawDesc), len(file_api_proto_rawDesc))) + }) + return file_api_proto_rawDescData +} + +var file_api_proto_msgTypes = make([]protoimpl.MessageInfo, 77) +var file_api_proto_goTypes = []any{ + (*GetNodeInfoRequest)(nil), // 0: api.GetNodeInfoRequest + (*GetNodeInfoResponse)(nil), // 1: api.GetNodeInfoResponse + (*OnchainReceiveRequest)(nil), // 2: api.OnchainReceiveRequest + (*OnchainReceiveResponse)(nil), // 3: api.OnchainReceiveResponse + (*OnchainSendRequest)(nil), // 4: api.OnchainSendRequest + (*OnchainSendResponse)(nil), // 5: api.OnchainSendResponse + (*Bolt11ReceiveRequest)(nil), // 6: api.Bolt11ReceiveRequest + (*Bolt11ReceiveResponse)(nil), // 7: api.Bolt11ReceiveResponse + (*Bolt11ReceiveForHashRequest)(nil), // 8: api.Bolt11ReceiveForHashRequest + (*Bolt11ReceiveForHashResponse)(nil), // 9: api.Bolt11ReceiveForHashResponse + (*Bolt11ClaimForHashRequest)(nil), // 10: api.Bolt11ClaimForHashRequest + (*Bolt11ClaimForHashResponse)(nil), // 11: api.Bolt11ClaimForHashResponse + (*Bolt11FailForHashRequest)(nil), // 12: api.Bolt11FailForHashRequest + (*Bolt11FailForHashResponse)(nil), // 13: api.Bolt11FailForHashResponse + (*Bolt11ReceiveViaJitChannelRequest)(nil), // 14: api.Bolt11ReceiveViaJitChannelRequest + (*Bolt11ReceiveViaJitChannelResponse)(nil), // 15: api.Bolt11ReceiveViaJitChannelResponse + (*Bolt11ReceiveVariableAmountViaJitChannelRequest)(nil), // 16: api.Bolt11ReceiveVariableAmountViaJitChannelRequest + (*Bolt11ReceiveVariableAmountViaJitChannelResponse)(nil), // 17: api.Bolt11ReceiveVariableAmountViaJitChannelResponse + (*Bolt11SendRequest)(nil), // 18: api.Bolt11SendRequest + (*Bolt11SendResponse)(nil), // 19: api.Bolt11SendResponse + (*Bolt12ReceiveRequest)(nil), // 20: api.Bolt12ReceiveRequest + (*Bolt12ReceiveResponse)(nil), // 21: api.Bolt12ReceiveResponse + (*Bolt12SendRequest)(nil), // 22: api.Bolt12SendRequest + (*Bolt12SendResponse)(nil), // 23: api.Bolt12SendResponse + (*SpontaneousSendRequest)(nil), // 24: api.SpontaneousSendRequest + (*SpontaneousSendResponse)(nil), // 25: api.SpontaneousSendResponse + (*OpenChannelRequest)(nil), // 26: api.OpenChannelRequest + (*OpenChannelResponse)(nil), // 27: api.OpenChannelResponse + (*SpliceInRequest)(nil), // 28: api.SpliceInRequest + (*SpliceInResponse)(nil), // 29: api.SpliceInResponse + (*SpliceOutRequest)(nil), // 30: api.SpliceOutRequest + (*SpliceOutResponse)(nil), // 31: api.SpliceOutResponse + (*UpdateChannelConfigRequest)(nil), // 32: api.UpdateChannelConfigRequest + (*UpdateChannelConfigResponse)(nil), // 33: api.UpdateChannelConfigResponse + (*CloseChannelRequest)(nil), // 34: api.CloseChannelRequest + (*CloseChannelResponse)(nil), // 35: api.CloseChannelResponse + (*ForceCloseChannelRequest)(nil), // 36: api.ForceCloseChannelRequest + (*ForceCloseChannelResponse)(nil), // 37: api.ForceCloseChannelResponse + (*ListChannelsRequest)(nil), // 38: api.ListChannelsRequest + (*ListChannelsResponse)(nil), // 39: api.ListChannelsResponse + (*GetPaymentDetailsRequest)(nil), // 40: api.GetPaymentDetailsRequest + (*GetPaymentDetailsResponse)(nil), // 41: api.GetPaymentDetailsResponse + (*ListPaymentsRequest)(nil), // 42: api.ListPaymentsRequest + (*ListPaymentsResponse)(nil), // 43: api.ListPaymentsResponse + (*ListForwardedPaymentsRequest)(nil), // 44: api.ListForwardedPaymentsRequest + (*ListForwardedPaymentsResponse)(nil), // 45: api.ListForwardedPaymentsResponse + (*SignMessageRequest)(nil), // 46: api.SignMessageRequest + (*SignMessageResponse)(nil), // 47: api.SignMessageResponse + (*VerifySignatureRequest)(nil), // 48: api.VerifySignatureRequest + (*VerifySignatureResponse)(nil), // 49: api.VerifySignatureResponse + (*ExportPathfindingScoresRequest)(nil), // 50: api.ExportPathfindingScoresRequest + (*ExportPathfindingScoresResponse)(nil), // 51: api.ExportPathfindingScoresResponse + (*GetBalancesRequest)(nil), // 52: api.GetBalancesRequest + (*GetBalancesResponse)(nil), // 53: api.GetBalancesResponse + (*ConnectPeerRequest)(nil), // 54: api.ConnectPeerRequest + (*ConnectPeerResponse)(nil), // 55: api.ConnectPeerResponse + (*DisconnectPeerRequest)(nil), // 56: api.DisconnectPeerRequest + (*DisconnectPeerResponse)(nil), // 57: api.DisconnectPeerResponse + (*ListPeersRequest)(nil), // 58: api.ListPeersRequest + (*ListPeersResponse)(nil), // 59: api.ListPeersResponse + (*GraphListChannelsRequest)(nil), // 60: api.GraphListChannelsRequest + (*GraphListChannelsResponse)(nil), // 61: api.GraphListChannelsResponse + (*GraphGetChannelRequest)(nil), // 62: api.GraphGetChannelRequest + (*GraphGetChannelResponse)(nil), // 63: api.GraphGetChannelResponse + (*GraphListNodesRequest)(nil), // 64: api.GraphListNodesRequest + (*GraphListNodesResponse)(nil), // 65: api.GraphListNodesResponse + (*UnifiedSendRequest)(nil), // 66: api.UnifiedSendRequest + (*UnifiedSendResponse)(nil), // 67: api.UnifiedSendResponse + (*GraphGetNodeRequest)(nil), // 68: api.GraphGetNodeRequest + (*GraphGetNodeResponse)(nil), // 69: api.GraphGetNodeResponse + (*DecodeInvoiceRequest)(nil), // 70: api.DecodeInvoiceRequest + (*DecodeInvoiceResponse)(nil), // 71: api.DecodeInvoiceResponse + (*DecodeOfferRequest)(nil), // 72: api.DecodeOfferRequest + (*DecodeOfferResponse)(nil), // 73: api.DecodeOfferResponse + (*SubscribeEventsRequest)(nil), // 74: api.SubscribeEventsRequest + nil, // 75: api.DecodeInvoiceResponse.FeaturesEntry + nil, // 76: api.DecodeOfferResponse.FeaturesEntry + (*types.BestBlock)(nil), // 77: types.BestBlock + (types.Network)(0), // 78: types.Network + (*types.Bolt11InvoiceDescription)(nil), // 79: types.Bolt11InvoiceDescription + (*types.RouteParametersConfig)(nil), // 80: types.RouteParametersConfig + (*types.CustomTlvRecord)(nil), // 81: types.CustomTlvRecord + (*types.ChannelConfig)(nil), // 82: types.ChannelConfig + (*types.Channel)(nil), // 83: types.Channel + (*types.Payment)(nil), // 84: types.Payment + (*types.PageToken)(nil), // 85: types.PageToken + (*types.ForwardedPayment)(nil), // 86: types.ForwardedPayment + (*types.LightningBalance)(nil), // 87: types.LightningBalance + (*types.PendingSweepBalance)(nil), // 88: types.PendingSweepBalance + (*types.Peer)(nil), // 89: types.Peer + (*types.GraphChannel)(nil), // 90: types.GraphChannel + (*types.GraphNode)(nil), // 91: types.GraphNode + (*types.Bolt11RouteHint)(nil), // 92: types.Bolt11RouteHint + (*types.OfferAmount)(nil), // 93: types.OfferAmount + (*types.OfferQuantity)(nil), // 94: types.OfferQuantity + (*types.BlindedPath)(nil), // 95: types.BlindedPath + (*types.Bolt11Feature)(nil), // 96: types.Bolt11Feature + (*events.EventEnvelope)(nil), // 97: events.EventEnvelope +} +var file_api_proto_depIdxs = []int32{ + 77, // 0: api.GetNodeInfoResponse.current_best_block:type_name -> types.BestBlock + 78, // 1: api.GetNodeInfoResponse.network:type_name -> types.Network + 79, // 2: api.Bolt11ReceiveRequest.description:type_name -> types.Bolt11InvoiceDescription + 79, // 3: api.Bolt11ReceiveForHashRequest.description:type_name -> types.Bolt11InvoiceDescription + 79, // 4: api.Bolt11ReceiveViaJitChannelRequest.description:type_name -> types.Bolt11InvoiceDescription + 79, // 5: api.Bolt11ReceiveVariableAmountViaJitChannelRequest.description:type_name -> types.Bolt11InvoiceDescription + 80, // 6: api.Bolt11SendRequest.route_parameters:type_name -> types.RouteParametersConfig + 80, // 7: api.Bolt12SendRequest.route_parameters:type_name -> types.RouteParametersConfig + 80, // 8: api.SpontaneousSendRequest.route_parameters:type_name -> types.RouteParametersConfig + 81, // 9: api.SpontaneousSendRequest.custom_tlvs:type_name -> types.CustomTlvRecord + 82, // 10: api.OpenChannelRequest.channel_config:type_name -> types.ChannelConfig + 82, // 11: api.UpdateChannelConfigRequest.channel_config:type_name -> types.ChannelConfig + 83, // 12: api.ListChannelsResponse.channels:type_name -> types.Channel + 84, // 13: api.GetPaymentDetailsResponse.payment:type_name -> types.Payment + 85, // 14: api.ListPaymentsRequest.page_token:type_name -> types.PageToken + 84, // 15: api.ListPaymentsResponse.payments:type_name -> types.Payment + 85, // 16: api.ListPaymentsResponse.next_page_token:type_name -> types.PageToken + 85, // 17: api.ListForwardedPaymentsRequest.page_token:type_name -> types.PageToken + 86, // 18: api.ListForwardedPaymentsResponse.forwarded_payments:type_name -> types.ForwardedPayment + 85, // 19: api.ListForwardedPaymentsResponse.next_page_token:type_name -> types.PageToken + 87, // 20: api.GetBalancesResponse.lightning_balances:type_name -> types.LightningBalance + 88, // 21: api.GetBalancesResponse.pending_balances_from_channel_closures:type_name -> types.PendingSweepBalance + 89, // 22: api.ListPeersResponse.peers:type_name -> types.Peer + 90, // 23: api.GraphGetChannelResponse.channel:type_name -> types.GraphChannel + 80, // 24: api.UnifiedSendRequest.route_parameters:type_name -> types.RouteParametersConfig + 91, // 25: api.GraphGetNodeResponse.node:type_name -> types.GraphNode + 92, // 26: api.DecodeInvoiceResponse.route_hints:type_name -> types.Bolt11RouteHint + 75, // 27: api.DecodeInvoiceResponse.features:type_name -> api.DecodeInvoiceResponse.FeaturesEntry + 93, // 28: api.DecodeOfferResponse.amount:type_name -> types.OfferAmount + 94, // 29: api.DecodeOfferResponse.quantity:type_name -> types.OfferQuantity + 95, // 30: api.DecodeOfferResponse.paths:type_name -> types.BlindedPath + 76, // 31: api.DecodeOfferResponse.features:type_name -> api.DecodeOfferResponse.FeaturesEntry + 96, // 32: api.DecodeInvoiceResponse.FeaturesEntry.value:type_name -> types.Bolt11Feature + 96, // 33: api.DecodeOfferResponse.FeaturesEntry.value:type_name -> types.Bolt11Feature + 0, // 34: api.LightningNode.GetNodeInfo:input_type -> api.GetNodeInfoRequest + 52, // 35: api.LightningNode.GetBalances:input_type -> api.GetBalancesRequest + 2, // 36: api.LightningNode.OnchainReceive:input_type -> api.OnchainReceiveRequest + 4, // 37: api.LightningNode.OnchainSend:input_type -> api.OnchainSendRequest + 6, // 38: api.LightningNode.Bolt11Receive:input_type -> api.Bolt11ReceiveRequest + 8, // 39: api.LightningNode.Bolt11ReceiveForHash:input_type -> api.Bolt11ReceiveForHashRequest + 10, // 40: api.LightningNode.Bolt11ClaimForHash:input_type -> api.Bolt11ClaimForHashRequest + 12, // 41: api.LightningNode.Bolt11FailForHash:input_type -> api.Bolt11FailForHashRequest + 14, // 42: api.LightningNode.Bolt11ReceiveViaJitChannel:input_type -> api.Bolt11ReceiveViaJitChannelRequest + 16, // 43: api.LightningNode.Bolt11ReceiveVariableAmountViaJitChannel:input_type -> api.Bolt11ReceiveVariableAmountViaJitChannelRequest + 18, // 44: api.LightningNode.Bolt11Send:input_type -> api.Bolt11SendRequest + 20, // 45: api.LightningNode.Bolt12Receive:input_type -> api.Bolt12ReceiveRequest + 22, // 46: api.LightningNode.Bolt12Send:input_type -> api.Bolt12SendRequest + 24, // 47: api.LightningNode.SpontaneousSend:input_type -> api.SpontaneousSendRequest + 26, // 48: api.LightningNode.OpenChannel:input_type -> api.OpenChannelRequest + 28, // 49: api.LightningNode.SpliceIn:input_type -> api.SpliceInRequest + 30, // 50: api.LightningNode.SpliceOut:input_type -> api.SpliceOutRequest + 32, // 51: api.LightningNode.UpdateChannelConfig:input_type -> api.UpdateChannelConfigRequest + 34, // 52: api.LightningNode.CloseChannel:input_type -> api.CloseChannelRequest + 36, // 53: api.LightningNode.ForceCloseChannel:input_type -> api.ForceCloseChannelRequest + 38, // 54: api.LightningNode.ListChannels:input_type -> api.ListChannelsRequest + 40, // 55: api.LightningNode.GetPaymentDetails:input_type -> api.GetPaymentDetailsRequest + 42, // 56: api.LightningNode.ListPayments:input_type -> api.ListPaymentsRequest + 44, // 57: api.LightningNode.ListForwardedPayments:input_type -> api.ListForwardedPaymentsRequest + 54, // 58: api.LightningNode.ConnectPeer:input_type -> api.ConnectPeerRequest + 56, // 59: api.LightningNode.DisconnectPeer:input_type -> api.DisconnectPeerRequest + 58, // 60: api.LightningNode.ListPeers:input_type -> api.ListPeersRequest + 46, // 61: api.LightningNode.SignMessage:input_type -> api.SignMessageRequest + 48, // 62: api.LightningNode.VerifySignature:input_type -> api.VerifySignatureRequest + 50, // 63: api.LightningNode.ExportPathfindingScores:input_type -> api.ExportPathfindingScoresRequest + 66, // 64: api.LightningNode.UnifiedSend:input_type -> api.UnifiedSendRequest + 70, // 65: api.LightningNode.DecodeInvoice:input_type -> api.DecodeInvoiceRequest + 72, // 66: api.LightningNode.DecodeOffer:input_type -> api.DecodeOfferRequest + 60, // 67: api.LightningNode.GraphListChannels:input_type -> api.GraphListChannelsRequest + 62, // 68: api.LightningNode.GraphGetChannel:input_type -> api.GraphGetChannelRequest + 64, // 69: api.LightningNode.GraphListNodes:input_type -> api.GraphListNodesRequest + 68, // 70: api.LightningNode.GraphGetNode:input_type -> api.GraphGetNodeRequest + 74, // 71: api.LightningNode.SubscribeEvents:input_type -> api.SubscribeEventsRequest + 1, // 72: api.LightningNode.GetNodeInfo:output_type -> api.GetNodeInfoResponse + 53, // 73: api.LightningNode.GetBalances:output_type -> api.GetBalancesResponse + 3, // 74: api.LightningNode.OnchainReceive:output_type -> api.OnchainReceiveResponse + 5, // 75: api.LightningNode.OnchainSend:output_type -> api.OnchainSendResponse + 7, // 76: api.LightningNode.Bolt11Receive:output_type -> api.Bolt11ReceiveResponse + 9, // 77: api.LightningNode.Bolt11ReceiveForHash:output_type -> api.Bolt11ReceiveForHashResponse + 11, // 78: api.LightningNode.Bolt11ClaimForHash:output_type -> api.Bolt11ClaimForHashResponse + 13, // 79: api.LightningNode.Bolt11FailForHash:output_type -> api.Bolt11FailForHashResponse + 15, // 80: api.LightningNode.Bolt11ReceiveViaJitChannel:output_type -> api.Bolt11ReceiveViaJitChannelResponse + 17, // 81: api.LightningNode.Bolt11ReceiveVariableAmountViaJitChannel:output_type -> api.Bolt11ReceiveVariableAmountViaJitChannelResponse + 19, // 82: api.LightningNode.Bolt11Send:output_type -> api.Bolt11SendResponse + 21, // 83: api.LightningNode.Bolt12Receive:output_type -> api.Bolt12ReceiveResponse + 23, // 84: api.LightningNode.Bolt12Send:output_type -> api.Bolt12SendResponse + 25, // 85: api.LightningNode.SpontaneousSend:output_type -> api.SpontaneousSendResponse + 27, // 86: api.LightningNode.OpenChannel:output_type -> api.OpenChannelResponse + 29, // 87: api.LightningNode.SpliceIn:output_type -> api.SpliceInResponse + 31, // 88: api.LightningNode.SpliceOut:output_type -> api.SpliceOutResponse + 33, // 89: api.LightningNode.UpdateChannelConfig:output_type -> api.UpdateChannelConfigResponse + 35, // 90: api.LightningNode.CloseChannel:output_type -> api.CloseChannelResponse + 37, // 91: api.LightningNode.ForceCloseChannel:output_type -> api.ForceCloseChannelResponse + 39, // 92: api.LightningNode.ListChannels:output_type -> api.ListChannelsResponse + 41, // 93: api.LightningNode.GetPaymentDetails:output_type -> api.GetPaymentDetailsResponse + 43, // 94: api.LightningNode.ListPayments:output_type -> api.ListPaymentsResponse + 45, // 95: api.LightningNode.ListForwardedPayments:output_type -> api.ListForwardedPaymentsResponse + 55, // 96: api.LightningNode.ConnectPeer:output_type -> api.ConnectPeerResponse + 57, // 97: api.LightningNode.DisconnectPeer:output_type -> api.DisconnectPeerResponse + 59, // 98: api.LightningNode.ListPeers:output_type -> api.ListPeersResponse + 47, // 99: api.LightningNode.SignMessage:output_type -> api.SignMessageResponse + 49, // 100: api.LightningNode.VerifySignature:output_type -> api.VerifySignatureResponse + 51, // 101: api.LightningNode.ExportPathfindingScores:output_type -> api.ExportPathfindingScoresResponse + 67, // 102: api.LightningNode.UnifiedSend:output_type -> api.UnifiedSendResponse + 71, // 103: api.LightningNode.DecodeInvoice:output_type -> api.DecodeInvoiceResponse + 73, // 104: api.LightningNode.DecodeOffer:output_type -> api.DecodeOfferResponse + 61, // 105: api.LightningNode.GraphListChannels:output_type -> api.GraphListChannelsResponse + 63, // 106: api.LightningNode.GraphGetChannel:output_type -> api.GraphGetChannelResponse + 65, // 107: api.LightningNode.GraphListNodes:output_type -> api.GraphListNodesResponse + 69, // 108: api.LightningNode.GraphGetNode:output_type -> api.GraphGetNodeResponse + 97, // 109: api.LightningNode.SubscribeEvents:output_type -> events.EventEnvelope + 72, // [72:110] is the sub-list for method output_type + 34, // [34:72] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name +} + +func init() { file_api_proto_init() } +func file_api_proto_init() { + if File_api_proto != nil { + return + } + file_api_proto_msgTypes[1].OneofWrappers = []any{} + file_api_proto_msgTypes[4].OneofWrappers = []any{} + file_api_proto_msgTypes[6].OneofWrappers = []any{} + file_api_proto_msgTypes[8].OneofWrappers = []any{} + file_api_proto_msgTypes[10].OneofWrappers = []any{} + file_api_proto_msgTypes[14].OneofWrappers = []any{} + file_api_proto_msgTypes[16].OneofWrappers = []any{} + file_api_proto_msgTypes[18].OneofWrappers = []any{} + file_api_proto_msgTypes[20].OneofWrappers = []any{} + file_api_proto_msgTypes[22].OneofWrappers = []any{} + file_api_proto_msgTypes[24].OneofWrappers = []any{} + file_api_proto_msgTypes[26].OneofWrappers = []any{} + file_api_proto_msgTypes[30].OneofWrappers = []any{} + file_api_proto_msgTypes[36].OneofWrappers = []any{} + file_api_proto_msgTypes[42].OneofWrappers = []any{} + file_api_proto_msgTypes[43].OneofWrappers = []any{} + file_api_proto_msgTypes[44].OneofWrappers = []any{} + file_api_proto_msgTypes[45].OneofWrappers = []any{} + file_api_proto_msgTypes[66].OneofWrappers = []any{} + file_api_proto_msgTypes[67].OneofWrappers = []any{ + (*UnifiedSendResponse_Txid)(nil), + (*UnifiedSendResponse_Bolt11PaymentId)(nil), + (*UnifiedSendResponse_Bolt12PaymentId)(nil), + } + file_api_proto_msgTypes[71].OneofWrappers = []any{} + file_api_proto_msgTypes[73].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_proto_rawDesc), len(file_api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 77, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_api_proto_goTypes, + DependencyIndexes: file_api_proto_depIdxs, + MessageInfos: file_api_proto_msgTypes, + }.Build() + File_api_proto = out.File + file_api_proto_goTypes = nil + file_api_proto_depIdxs = nil +} diff --git a/lnclient/ldk-server/grpc/api/api_grpc.pb.go b/lnclient/ldk-server/grpc/api/api_grpc.pb.go new file mode 100644 index 000000000..0173c558a --- /dev/null +++ b/lnclient/ldk-server/grpc/api/api_grpc.pb.go @@ -0,0 +1,1608 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v3.21.12 +// source: api.proto + +package api + +import ( + context "context" + events "github.com/getAlby/hub/lnclient/ldk-server/grpc/events" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + LightningNode_GetNodeInfo_FullMethodName = "/api.LightningNode/GetNodeInfo" + LightningNode_GetBalances_FullMethodName = "/api.LightningNode/GetBalances" + LightningNode_OnchainReceive_FullMethodName = "/api.LightningNode/OnchainReceive" + LightningNode_OnchainSend_FullMethodName = "/api.LightningNode/OnchainSend" + LightningNode_Bolt11Receive_FullMethodName = "/api.LightningNode/Bolt11Receive" + LightningNode_Bolt11ReceiveForHash_FullMethodName = "/api.LightningNode/Bolt11ReceiveForHash" + LightningNode_Bolt11ClaimForHash_FullMethodName = "/api.LightningNode/Bolt11ClaimForHash" + LightningNode_Bolt11FailForHash_FullMethodName = "/api.LightningNode/Bolt11FailForHash" + LightningNode_Bolt11ReceiveViaJitChannel_FullMethodName = "/api.LightningNode/Bolt11ReceiveViaJitChannel" + LightningNode_Bolt11ReceiveVariableAmountViaJitChannel_FullMethodName = "/api.LightningNode/Bolt11ReceiveVariableAmountViaJitChannel" + LightningNode_Bolt11Send_FullMethodName = "/api.LightningNode/Bolt11Send" + LightningNode_Bolt12Receive_FullMethodName = "/api.LightningNode/Bolt12Receive" + LightningNode_Bolt12Send_FullMethodName = "/api.LightningNode/Bolt12Send" + LightningNode_SpontaneousSend_FullMethodName = "/api.LightningNode/SpontaneousSend" + LightningNode_OpenChannel_FullMethodName = "/api.LightningNode/OpenChannel" + LightningNode_SpliceIn_FullMethodName = "/api.LightningNode/SpliceIn" + LightningNode_SpliceOut_FullMethodName = "/api.LightningNode/SpliceOut" + LightningNode_UpdateChannelConfig_FullMethodName = "/api.LightningNode/UpdateChannelConfig" + LightningNode_CloseChannel_FullMethodName = "/api.LightningNode/CloseChannel" + LightningNode_ForceCloseChannel_FullMethodName = "/api.LightningNode/ForceCloseChannel" + LightningNode_ListChannels_FullMethodName = "/api.LightningNode/ListChannels" + LightningNode_GetPaymentDetails_FullMethodName = "/api.LightningNode/GetPaymentDetails" + LightningNode_ListPayments_FullMethodName = "/api.LightningNode/ListPayments" + LightningNode_ListForwardedPayments_FullMethodName = "/api.LightningNode/ListForwardedPayments" + LightningNode_ConnectPeer_FullMethodName = "/api.LightningNode/ConnectPeer" + LightningNode_DisconnectPeer_FullMethodName = "/api.LightningNode/DisconnectPeer" + LightningNode_ListPeers_FullMethodName = "/api.LightningNode/ListPeers" + LightningNode_SignMessage_FullMethodName = "/api.LightningNode/SignMessage" + LightningNode_VerifySignature_FullMethodName = "/api.LightningNode/VerifySignature" + LightningNode_ExportPathfindingScores_FullMethodName = "/api.LightningNode/ExportPathfindingScores" + LightningNode_UnifiedSend_FullMethodName = "/api.LightningNode/UnifiedSend" + LightningNode_DecodeInvoice_FullMethodName = "/api.LightningNode/DecodeInvoice" + LightningNode_DecodeOffer_FullMethodName = "/api.LightningNode/DecodeOffer" + LightningNode_GraphListChannels_FullMethodName = "/api.LightningNode/GraphListChannels" + LightningNode_GraphGetChannel_FullMethodName = "/api.LightningNode/GraphGetChannel" + LightningNode_GraphListNodes_FullMethodName = "/api.LightningNode/GraphListNodes" + LightningNode_GraphGetNode_FullMethodName = "/api.LightningNode/GraphGetNode" + LightningNode_SubscribeEvents_FullMethodName = "/api.LightningNode/SubscribeEvents" +) + +// LightningNodeClient is the client API for LightningNode service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type LightningNodeClient interface { + // Retrieve the latest node info. + GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) + // Retrieve an overview of all known balances. + GetBalances(ctx context.Context, in *GetBalancesRequest, opts ...grpc.CallOption) (*GetBalancesResponse, error) + // Retrieve a new on-chain funding address. + OnchainReceive(ctx context.Context, in *OnchainReceiveRequest, opts ...grpc.CallOption) (*OnchainReceiveResponse, error) + // Send an on-chain payment to the given address. + OnchainSend(ctx context.Context, in *OnchainSendRequest, opts ...grpc.CallOption) (*OnchainSendResponse, error) + // Return a BOLT11 payable invoice. + Bolt11Receive(ctx context.Context, in *Bolt11ReceiveRequest, opts ...grpc.CallOption) (*Bolt11ReceiveResponse, error) + // Return a BOLT11 payable invoice for a given payment hash. + Bolt11ReceiveForHash(ctx context.Context, in *Bolt11ReceiveForHashRequest, opts ...grpc.CallOption) (*Bolt11ReceiveForHashResponse, error) + // Manually claim a payment for a given payment hash. + Bolt11ClaimForHash(ctx context.Context, in *Bolt11ClaimForHashRequest, opts ...grpc.CallOption) (*Bolt11ClaimForHashResponse, error) + // Manually fail a payment for a given payment hash. + Bolt11FailForHash(ctx context.Context, in *Bolt11FailForHashRequest, opts ...grpc.CallOption) (*Bolt11FailForHashResponse, error) + // Return a BOLT11 invoice for receiving via a JIT channel. + Bolt11ReceiveViaJitChannel(ctx context.Context, in *Bolt11ReceiveViaJitChannelRequest, opts ...grpc.CallOption) (*Bolt11ReceiveViaJitChannelResponse, error) + // Return a variable-amount BOLT11 invoice for receiving via a JIT channel. + Bolt11ReceiveVariableAmountViaJitChannel(ctx context.Context, in *Bolt11ReceiveVariableAmountViaJitChannelRequest, opts ...grpc.CallOption) (*Bolt11ReceiveVariableAmountViaJitChannelResponse, error) + // Send a payment for a BOLT11 invoice. + Bolt11Send(ctx context.Context, in *Bolt11SendRequest, opts ...grpc.CallOption) (*Bolt11SendResponse, error) + // Return a BOLT12 offer. + Bolt12Receive(ctx context.Context, in *Bolt12ReceiveRequest, opts ...grpc.CallOption) (*Bolt12ReceiveResponse, error) + // Send a payment for a BOLT12 offer. + Bolt12Send(ctx context.Context, in *Bolt12SendRequest, opts ...grpc.CallOption) (*Bolt12SendResponse, error) + // Send a spontaneous payment (keysend). + SpontaneousSend(ctx context.Context, in *SpontaneousSendRequest, opts ...grpc.CallOption) (*SpontaneousSendResponse, error) + // Create a new outbound channel. + OpenChannel(ctx context.Context, in *OpenChannelRequest, opts ...grpc.CallOption) (*OpenChannelResponse, error) + // Splice funds into a channel. + SpliceIn(ctx context.Context, in *SpliceInRequest, opts ...grpc.CallOption) (*SpliceInResponse, error) + // Splice funds out of a channel. + SpliceOut(ctx context.Context, in *SpliceOutRequest, opts ...grpc.CallOption) (*SpliceOutResponse, error) + // Update the config for a channel. + UpdateChannelConfig(ctx context.Context, in *UpdateChannelConfigRequest, opts ...grpc.CallOption) (*UpdateChannelConfigResponse, error) + // Close a channel cooperatively. + CloseChannel(ctx context.Context, in *CloseChannelRequest, opts ...grpc.CallOption) (*CloseChannelResponse, error) + // Force close a channel. + ForceCloseChannel(ctx context.Context, in *ForceCloseChannelRequest, opts ...grpc.CallOption) (*ForceCloseChannelResponse, error) + // List known channels. + ListChannels(ctx context.Context, in *ListChannelsRequest, opts ...grpc.CallOption) (*ListChannelsResponse, error) + // Get payment details by payment ID. + GetPaymentDetails(ctx context.Context, in *GetPaymentDetailsRequest, opts ...grpc.CallOption) (*GetPaymentDetailsResponse, error) + // List all payments. + ListPayments(ctx context.Context, in *ListPaymentsRequest, opts ...grpc.CallOption) (*ListPaymentsResponse, error) + // List all forwarded payments. + ListForwardedPayments(ctx context.Context, in *ListForwardedPaymentsRequest, opts ...grpc.CallOption) (*ListForwardedPaymentsResponse, error) + // Connect to a peer. + ConnectPeer(ctx context.Context, in *ConnectPeerRequest, opts ...grpc.CallOption) (*ConnectPeerResponse, error) + // Disconnect from a peer. + DisconnectPeer(ctx context.Context, in *DisconnectPeerRequest, opts ...grpc.CallOption) (*DisconnectPeerResponse, error) + // List peers. + ListPeers(ctx context.Context, in *ListPeersRequest, opts ...grpc.CallOption) (*ListPeersResponse, error) + // Sign a message with the node's secret key. + SignMessage(ctx context.Context, in *SignMessageRequest, opts ...grpc.CallOption) (*SignMessageResponse, error) + // Verify a signature against a message and public key. + VerifySignature(ctx context.Context, in *VerifySignatureRequest, opts ...grpc.CallOption) (*VerifySignatureResponse, error) + // Export the pathfinding scores used by the router. + ExportPathfindingScores(ctx context.Context, in *ExportPathfindingScoresRequest, opts ...grpc.CallOption) (*ExportPathfindingScoresResponse, error) + // Send a payment given a BIP 21 URI or BIP 353 Human-Readable Name. + UnifiedSend(ctx context.Context, in *UnifiedSendRequest, opts ...grpc.CallOption) (*UnifiedSendResponse, error) + // Decode a BOLT11 invoice and return its parsed fields. + DecodeInvoice(ctx context.Context, in *DecodeInvoiceRequest, opts ...grpc.CallOption) (*DecodeInvoiceResponse, error) + // Decode a BOLT12 offer and return its parsed fields. + DecodeOffer(ctx context.Context, in *DecodeOfferRequest, opts ...grpc.CallOption) (*DecodeOfferResponse, error) + // List all known short channel IDs in the network graph. + GraphListChannels(ctx context.Context, in *GraphListChannelsRequest, opts ...grpc.CallOption) (*GraphListChannelsResponse, error) + // Get channel info from the network graph by short channel ID. + GraphGetChannel(ctx context.Context, in *GraphGetChannelRequest, opts ...grpc.CallOption) (*GraphGetChannelResponse, error) + // List all known node IDs in the network graph. + GraphListNodes(ctx context.Context, in *GraphListNodesRequest, opts ...grpc.CallOption) (*GraphListNodesResponse, error) + // Get node info from the network graph by node ID. + GraphGetNode(ctx context.Context, in *GraphGetNodeRequest, opts ...grpc.CallOption) (*GraphGetNodeResponse, error) + // Subscribe to a stream of server events. + SubscribeEvents(ctx context.Context, in *SubscribeEventsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[events.EventEnvelope], error) +} + +type lightningNodeClient struct { + cc grpc.ClientConnInterface +} + +func NewLightningNodeClient(cc grpc.ClientConnInterface) LightningNodeClient { + return &lightningNodeClient{cc} +} + +func (c *lightningNodeClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetNodeInfoResponse) + err := c.cc.Invoke(ctx, LightningNode_GetNodeInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) GetBalances(ctx context.Context, in *GetBalancesRequest, opts ...grpc.CallOption) (*GetBalancesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetBalancesResponse) + err := c.cc.Invoke(ctx, LightningNode_GetBalances_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) OnchainReceive(ctx context.Context, in *OnchainReceiveRequest, opts ...grpc.CallOption) (*OnchainReceiveResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(OnchainReceiveResponse) + err := c.cc.Invoke(ctx, LightningNode_OnchainReceive_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) OnchainSend(ctx context.Context, in *OnchainSendRequest, opts ...grpc.CallOption) (*OnchainSendResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(OnchainSendResponse) + err := c.cc.Invoke(ctx, LightningNode_OnchainSend_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) Bolt11Receive(ctx context.Context, in *Bolt11ReceiveRequest, opts ...grpc.CallOption) (*Bolt11ReceiveResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Bolt11ReceiveResponse) + err := c.cc.Invoke(ctx, LightningNode_Bolt11Receive_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) Bolt11ReceiveForHash(ctx context.Context, in *Bolt11ReceiveForHashRequest, opts ...grpc.CallOption) (*Bolt11ReceiveForHashResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Bolt11ReceiveForHashResponse) + err := c.cc.Invoke(ctx, LightningNode_Bolt11ReceiveForHash_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) Bolt11ClaimForHash(ctx context.Context, in *Bolt11ClaimForHashRequest, opts ...grpc.CallOption) (*Bolt11ClaimForHashResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Bolt11ClaimForHashResponse) + err := c.cc.Invoke(ctx, LightningNode_Bolt11ClaimForHash_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) Bolt11FailForHash(ctx context.Context, in *Bolt11FailForHashRequest, opts ...grpc.CallOption) (*Bolt11FailForHashResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Bolt11FailForHashResponse) + err := c.cc.Invoke(ctx, LightningNode_Bolt11FailForHash_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) Bolt11ReceiveViaJitChannel(ctx context.Context, in *Bolt11ReceiveViaJitChannelRequest, opts ...grpc.CallOption) (*Bolt11ReceiveViaJitChannelResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Bolt11ReceiveViaJitChannelResponse) + err := c.cc.Invoke(ctx, LightningNode_Bolt11ReceiveViaJitChannel_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) Bolt11ReceiveVariableAmountViaJitChannel(ctx context.Context, in *Bolt11ReceiveVariableAmountViaJitChannelRequest, opts ...grpc.CallOption) (*Bolt11ReceiveVariableAmountViaJitChannelResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Bolt11ReceiveVariableAmountViaJitChannelResponse) + err := c.cc.Invoke(ctx, LightningNode_Bolt11ReceiveVariableAmountViaJitChannel_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) Bolt11Send(ctx context.Context, in *Bolt11SendRequest, opts ...grpc.CallOption) (*Bolt11SendResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Bolt11SendResponse) + err := c.cc.Invoke(ctx, LightningNode_Bolt11Send_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) Bolt12Receive(ctx context.Context, in *Bolt12ReceiveRequest, opts ...grpc.CallOption) (*Bolt12ReceiveResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Bolt12ReceiveResponse) + err := c.cc.Invoke(ctx, LightningNode_Bolt12Receive_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) Bolt12Send(ctx context.Context, in *Bolt12SendRequest, opts ...grpc.CallOption) (*Bolt12SendResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Bolt12SendResponse) + err := c.cc.Invoke(ctx, LightningNode_Bolt12Send_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) SpontaneousSend(ctx context.Context, in *SpontaneousSendRequest, opts ...grpc.CallOption) (*SpontaneousSendResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SpontaneousSendResponse) + err := c.cc.Invoke(ctx, LightningNode_SpontaneousSend_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) OpenChannel(ctx context.Context, in *OpenChannelRequest, opts ...grpc.CallOption) (*OpenChannelResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(OpenChannelResponse) + err := c.cc.Invoke(ctx, LightningNode_OpenChannel_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) SpliceIn(ctx context.Context, in *SpliceInRequest, opts ...grpc.CallOption) (*SpliceInResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SpliceInResponse) + err := c.cc.Invoke(ctx, LightningNode_SpliceIn_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) SpliceOut(ctx context.Context, in *SpliceOutRequest, opts ...grpc.CallOption) (*SpliceOutResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SpliceOutResponse) + err := c.cc.Invoke(ctx, LightningNode_SpliceOut_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) UpdateChannelConfig(ctx context.Context, in *UpdateChannelConfigRequest, opts ...grpc.CallOption) (*UpdateChannelConfigResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdateChannelConfigResponse) + err := c.cc.Invoke(ctx, LightningNode_UpdateChannelConfig_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) CloseChannel(ctx context.Context, in *CloseChannelRequest, opts ...grpc.CallOption) (*CloseChannelResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CloseChannelResponse) + err := c.cc.Invoke(ctx, LightningNode_CloseChannel_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) ForceCloseChannel(ctx context.Context, in *ForceCloseChannelRequest, opts ...grpc.CallOption) (*ForceCloseChannelResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ForceCloseChannelResponse) + err := c.cc.Invoke(ctx, LightningNode_ForceCloseChannel_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) ListChannels(ctx context.Context, in *ListChannelsRequest, opts ...grpc.CallOption) (*ListChannelsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListChannelsResponse) + err := c.cc.Invoke(ctx, LightningNode_ListChannels_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) GetPaymentDetails(ctx context.Context, in *GetPaymentDetailsRequest, opts ...grpc.CallOption) (*GetPaymentDetailsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPaymentDetailsResponse) + err := c.cc.Invoke(ctx, LightningNode_GetPaymentDetails_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) ListPayments(ctx context.Context, in *ListPaymentsRequest, opts ...grpc.CallOption) (*ListPaymentsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPaymentsResponse) + err := c.cc.Invoke(ctx, LightningNode_ListPayments_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) ListForwardedPayments(ctx context.Context, in *ListForwardedPaymentsRequest, opts ...grpc.CallOption) (*ListForwardedPaymentsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListForwardedPaymentsResponse) + err := c.cc.Invoke(ctx, LightningNode_ListForwardedPayments_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) ConnectPeer(ctx context.Context, in *ConnectPeerRequest, opts ...grpc.CallOption) (*ConnectPeerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ConnectPeerResponse) + err := c.cc.Invoke(ctx, LightningNode_ConnectPeer_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) DisconnectPeer(ctx context.Context, in *DisconnectPeerRequest, opts ...grpc.CallOption) (*DisconnectPeerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DisconnectPeerResponse) + err := c.cc.Invoke(ctx, LightningNode_DisconnectPeer_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) ListPeers(ctx context.Context, in *ListPeersRequest, opts ...grpc.CallOption) (*ListPeersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPeersResponse) + err := c.cc.Invoke(ctx, LightningNode_ListPeers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) SignMessage(ctx context.Context, in *SignMessageRequest, opts ...grpc.CallOption) (*SignMessageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SignMessageResponse) + err := c.cc.Invoke(ctx, LightningNode_SignMessage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) VerifySignature(ctx context.Context, in *VerifySignatureRequest, opts ...grpc.CallOption) (*VerifySignatureResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(VerifySignatureResponse) + err := c.cc.Invoke(ctx, LightningNode_VerifySignature_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) ExportPathfindingScores(ctx context.Context, in *ExportPathfindingScoresRequest, opts ...grpc.CallOption) (*ExportPathfindingScoresResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ExportPathfindingScoresResponse) + err := c.cc.Invoke(ctx, LightningNode_ExportPathfindingScores_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) UnifiedSend(ctx context.Context, in *UnifiedSendRequest, opts ...grpc.CallOption) (*UnifiedSendResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UnifiedSendResponse) + err := c.cc.Invoke(ctx, LightningNode_UnifiedSend_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) DecodeInvoice(ctx context.Context, in *DecodeInvoiceRequest, opts ...grpc.CallOption) (*DecodeInvoiceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DecodeInvoiceResponse) + err := c.cc.Invoke(ctx, LightningNode_DecodeInvoice_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) DecodeOffer(ctx context.Context, in *DecodeOfferRequest, opts ...grpc.CallOption) (*DecodeOfferResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DecodeOfferResponse) + err := c.cc.Invoke(ctx, LightningNode_DecodeOffer_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) GraphListChannels(ctx context.Context, in *GraphListChannelsRequest, opts ...grpc.CallOption) (*GraphListChannelsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GraphListChannelsResponse) + err := c.cc.Invoke(ctx, LightningNode_GraphListChannels_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) GraphGetChannel(ctx context.Context, in *GraphGetChannelRequest, opts ...grpc.CallOption) (*GraphGetChannelResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GraphGetChannelResponse) + err := c.cc.Invoke(ctx, LightningNode_GraphGetChannel_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) GraphListNodes(ctx context.Context, in *GraphListNodesRequest, opts ...grpc.CallOption) (*GraphListNodesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GraphListNodesResponse) + err := c.cc.Invoke(ctx, LightningNode_GraphListNodes_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) GraphGetNode(ctx context.Context, in *GraphGetNodeRequest, opts ...grpc.CallOption) (*GraphGetNodeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GraphGetNodeResponse) + err := c.cc.Invoke(ctx, LightningNode_GraphGetNode_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningNodeClient) SubscribeEvents(ctx context.Context, in *SubscribeEventsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[events.EventEnvelope], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &LightningNode_ServiceDesc.Streams[0], LightningNode_SubscribeEvents_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[SubscribeEventsRequest, events.EventEnvelope]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type LightningNode_SubscribeEventsClient = grpc.ServerStreamingClient[events.EventEnvelope] + +// LightningNodeServer is the server API for LightningNode service. +// All implementations must embed UnimplementedLightningNodeServer +// for forward compatibility. +type LightningNodeServer interface { + // Retrieve the latest node info. + GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) + // Retrieve an overview of all known balances. + GetBalances(context.Context, *GetBalancesRequest) (*GetBalancesResponse, error) + // Retrieve a new on-chain funding address. + OnchainReceive(context.Context, *OnchainReceiveRequest) (*OnchainReceiveResponse, error) + // Send an on-chain payment to the given address. + OnchainSend(context.Context, *OnchainSendRequest) (*OnchainSendResponse, error) + // Return a BOLT11 payable invoice. + Bolt11Receive(context.Context, *Bolt11ReceiveRequest) (*Bolt11ReceiveResponse, error) + // Return a BOLT11 payable invoice for a given payment hash. + Bolt11ReceiveForHash(context.Context, *Bolt11ReceiveForHashRequest) (*Bolt11ReceiveForHashResponse, error) + // Manually claim a payment for a given payment hash. + Bolt11ClaimForHash(context.Context, *Bolt11ClaimForHashRequest) (*Bolt11ClaimForHashResponse, error) + // Manually fail a payment for a given payment hash. + Bolt11FailForHash(context.Context, *Bolt11FailForHashRequest) (*Bolt11FailForHashResponse, error) + // Return a BOLT11 invoice for receiving via a JIT channel. + Bolt11ReceiveViaJitChannel(context.Context, *Bolt11ReceiveViaJitChannelRequest) (*Bolt11ReceiveViaJitChannelResponse, error) + // Return a variable-amount BOLT11 invoice for receiving via a JIT channel. + Bolt11ReceiveVariableAmountViaJitChannel(context.Context, *Bolt11ReceiveVariableAmountViaJitChannelRequest) (*Bolt11ReceiveVariableAmountViaJitChannelResponse, error) + // Send a payment for a BOLT11 invoice. + Bolt11Send(context.Context, *Bolt11SendRequest) (*Bolt11SendResponse, error) + // Return a BOLT12 offer. + Bolt12Receive(context.Context, *Bolt12ReceiveRequest) (*Bolt12ReceiveResponse, error) + // Send a payment for a BOLT12 offer. + Bolt12Send(context.Context, *Bolt12SendRequest) (*Bolt12SendResponse, error) + // Send a spontaneous payment (keysend). + SpontaneousSend(context.Context, *SpontaneousSendRequest) (*SpontaneousSendResponse, error) + // Create a new outbound channel. + OpenChannel(context.Context, *OpenChannelRequest) (*OpenChannelResponse, error) + // Splice funds into a channel. + SpliceIn(context.Context, *SpliceInRequest) (*SpliceInResponse, error) + // Splice funds out of a channel. + SpliceOut(context.Context, *SpliceOutRequest) (*SpliceOutResponse, error) + // Update the config for a channel. + UpdateChannelConfig(context.Context, *UpdateChannelConfigRequest) (*UpdateChannelConfigResponse, error) + // Close a channel cooperatively. + CloseChannel(context.Context, *CloseChannelRequest) (*CloseChannelResponse, error) + // Force close a channel. + ForceCloseChannel(context.Context, *ForceCloseChannelRequest) (*ForceCloseChannelResponse, error) + // List known channels. + ListChannels(context.Context, *ListChannelsRequest) (*ListChannelsResponse, error) + // Get payment details by payment ID. + GetPaymentDetails(context.Context, *GetPaymentDetailsRequest) (*GetPaymentDetailsResponse, error) + // List all payments. + ListPayments(context.Context, *ListPaymentsRequest) (*ListPaymentsResponse, error) + // List all forwarded payments. + ListForwardedPayments(context.Context, *ListForwardedPaymentsRequest) (*ListForwardedPaymentsResponse, error) + // Connect to a peer. + ConnectPeer(context.Context, *ConnectPeerRequest) (*ConnectPeerResponse, error) + // Disconnect from a peer. + DisconnectPeer(context.Context, *DisconnectPeerRequest) (*DisconnectPeerResponse, error) + // List peers. + ListPeers(context.Context, *ListPeersRequest) (*ListPeersResponse, error) + // Sign a message with the node's secret key. + SignMessage(context.Context, *SignMessageRequest) (*SignMessageResponse, error) + // Verify a signature against a message and public key. + VerifySignature(context.Context, *VerifySignatureRequest) (*VerifySignatureResponse, error) + // Export the pathfinding scores used by the router. + ExportPathfindingScores(context.Context, *ExportPathfindingScoresRequest) (*ExportPathfindingScoresResponse, error) + // Send a payment given a BIP 21 URI or BIP 353 Human-Readable Name. + UnifiedSend(context.Context, *UnifiedSendRequest) (*UnifiedSendResponse, error) + // Decode a BOLT11 invoice and return its parsed fields. + DecodeInvoice(context.Context, *DecodeInvoiceRequest) (*DecodeInvoiceResponse, error) + // Decode a BOLT12 offer and return its parsed fields. + DecodeOffer(context.Context, *DecodeOfferRequest) (*DecodeOfferResponse, error) + // List all known short channel IDs in the network graph. + GraphListChannels(context.Context, *GraphListChannelsRequest) (*GraphListChannelsResponse, error) + // Get channel info from the network graph by short channel ID. + GraphGetChannel(context.Context, *GraphGetChannelRequest) (*GraphGetChannelResponse, error) + // List all known node IDs in the network graph. + GraphListNodes(context.Context, *GraphListNodesRequest) (*GraphListNodesResponse, error) + // Get node info from the network graph by node ID. + GraphGetNode(context.Context, *GraphGetNodeRequest) (*GraphGetNodeResponse, error) + // Subscribe to a stream of server events. + SubscribeEvents(*SubscribeEventsRequest, grpc.ServerStreamingServer[events.EventEnvelope]) error + mustEmbedUnimplementedLightningNodeServer() +} + +// UnimplementedLightningNodeServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedLightningNodeServer struct{} + +func (UnimplementedLightningNodeServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented") +} +func (UnimplementedLightningNodeServer) GetBalances(context.Context, *GetBalancesRequest) (*GetBalancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBalances not implemented") +} +func (UnimplementedLightningNodeServer) OnchainReceive(context.Context, *OnchainReceiveRequest) (*OnchainReceiveResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnchainReceive not implemented") +} +func (UnimplementedLightningNodeServer) OnchainSend(context.Context, *OnchainSendRequest) (*OnchainSendResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnchainSend not implemented") +} +func (UnimplementedLightningNodeServer) Bolt11Receive(context.Context, *Bolt11ReceiveRequest) (*Bolt11ReceiveResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bolt11Receive not implemented") +} +func (UnimplementedLightningNodeServer) Bolt11ReceiveForHash(context.Context, *Bolt11ReceiveForHashRequest) (*Bolt11ReceiveForHashResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bolt11ReceiveForHash not implemented") +} +func (UnimplementedLightningNodeServer) Bolt11ClaimForHash(context.Context, *Bolt11ClaimForHashRequest) (*Bolt11ClaimForHashResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bolt11ClaimForHash not implemented") +} +func (UnimplementedLightningNodeServer) Bolt11FailForHash(context.Context, *Bolt11FailForHashRequest) (*Bolt11FailForHashResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bolt11FailForHash not implemented") +} +func (UnimplementedLightningNodeServer) Bolt11ReceiveViaJitChannel(context.Context, *Bolt11ReceiveViaJitChannelRequest) (*Bolt11ReceiveViaJitChannelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bolt11ReceiveViaJitChannel not implemented") +} +func (UnimplementedLightningNodeServer) Bolt11ReceiveVariableAmountViaJitChannel(context.Context, *Bolt11ReceiveVariableAmountViaJitChannelRequest) (*Bolt11ReceiveVariableAmountViaJitChannelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bolt11ReceiveVariableAmountViaJitChannel not implemented") +} +func (UnimplementedLightningNodeServer) Bolt11Send(context.Context, *Bolt11SendRequest) (*Bolt11SendResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bolt11Send not implemented") +} +func (UnimplementedLightningNodeServer) Bolt12Receive(context.Context, *Bolt12ReceiveRequest) (*Bolt12ReceiveResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bolt12Receive not implemented") +} +func (UnimplementedLightningNodeServer) Bolt12Send(context.Context, *Bolt12SendRequest) (*Bolt12SendResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bolt12Send not implemented") +} +func (UnimplementedLightningNodeServer) SpontaneousSend(context.Context, *SpontaneousSendRequest) (*SpontaneousSendResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SpontaneousSend not implemented") +} +func (UnimplementedLightningNodeServer) OpenChannel(context.Context, *OpenChannelRequest) (*OpenChannelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OpenChannel not implemented") +} +func (UnimplementedLightningNodeServer) SpliceIn(context.Context, *SpliceInRequest) (*SpliceInResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SpliceIn not implemented") +} +func (UnimplementedLightningNodeServer) SpliceOut(context.Context, *SpliceOutRequest) (*SpliceOutResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SpliceOut not implemented") +} +func (UnimplementedLightningNodeServer) UpdateChannelConfig(context.Context, *UpdateChannelConfigRequest) (*UpdateChannelConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateChannelConfig not implemented") +} +func (UnimplementedLightningNodeServer) CloseChannel(context.Context, *CloseChannelRequest) (*CloseChannelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CloseChannel not implemented") +} +func (UnimplementedLightningNodeServer) ForceCloseChannel(context.Context, *ForceCloseChannelRequest) (*ForceCloseChannelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ForceCloseChannel not implemented") +} +func (UnimplementedLightningNodeServer) ListChannels(context.Context, *ListChannelsRequest) (*ListChannelsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListChannels not implemented") +} +func (UnimplementedLightningNodeServer) GetPaymentDetails(context.Context, *GetPaymentDetailsRequest) (*GetPaymentDetailsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPaymentDetails not implemented") +} +func (UnimplementedLightningNodeServer) ListPayments(context.Context, *ListPaymentsRequest) (*ListPaymentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPayments not implemented") +} +func (UnimplementedLightningNodeServer) ListForwardedPayments(context.Context, *ListForwardedPaymentsRequest) (*ListForwardedPaymentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListForwardedPayments not implemented") +} +func (UnimplementedLightningNodeServer) ConnectPeer(context.Context, *ConnectPeerRequest) (*ConnectPeerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ConnectPeer not implemented") +} +func (UnimplementedLightningNodeServer) DisconnectPeer(context.Context, *DisconnectPeerRequest) (*DisconnectPeerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DisconnectPeer not implemented") +} +func (UnimplementedLightningNodeServer) ListPeers(context.Context, *ListPeersRequest) (*ListPeersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPeers not implemented") +} +func (UnimplementedLightningNodeServer) SignMessage(context.Context, *SignMessageRequest) (*SignMessageResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SignMessage not implemented") +} +func (UnimplementedLightningNodeServer) VerifySignature(context.Context, *VerifySignatureRequest) (*VerifySignatureResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VerifySignature not implemented") +} +func (UnimplementedLightningNodeServer) ExportPathfindingScores(context.Context, *ExportPathfindingScoresRequest) (*ExportPathfindingScoresResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExportPathfindingScores not implemented") +} +func (UnimplementedLightningNodeServer) UnifiedSend(context.Context, *UnifiedSendRequest) (*UnifiedSendResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnifiedSend not implemented") +} +func (UnimplementedLightningNodeServer) DecodeInvoice(context.Context, *DecodeInvoiceRequest) (*DecodeInvoiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DecodeInvoice not implemented") +} +func (UnimplementedLightningNodeServer) DecodeOffer(context.Context, *DecodeOfferRequest) (*DecodeOfferResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DecodeOffer not implemented") +} +func (UnimplementedLightningNodeServer) GraphListChannels(context.Context, *GraphListChannelsRequest) (*GraphListChannelsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GraphListChannels not implemented") +} +func (UnimplementedLightningNodeServer) GraphGetChannel(context.Context, *GraphGetChannelRequest) (*GraphGetChannelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GraphGetChannel not implemented") +} +func (UnimplementedLightningNodeServer) GraphListNodes(context.Context, *GraphListNodesRequest) (*GraphListNodesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GraphListNodes not implemented") +} +func (UnimplementedLightningNodeServer) GraphGetNode(context.Context, *GraphGetNodeRequest) (*GraphGetNodeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GraphGetNode not implemented") +} +func (UnimplementedLightningNodeServer) SubscribeEvents(*SubscribeEventsRequest, grpc.ServerStreamingServer[events.EventEnvelope]) error { + return status.Errorf(codes.Unimplemented, "method SubscribeEvents not implemented") +} +func (UnimplementedLightningNodeServer) mustEmbedUnimplementedLightningNodeServer() {} +func (UnimplementedLightningNodeServer) testEmbeddedByValue() {} + +// UnsafeLightningNodeServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to LightningNodeServer will +// result in compilation errors. +type UnsafeLightningNodeServer interface { + mustEmbedUnimplementedLightningNodeServer() +} + +func RegisterLightningNodeServer(s grpc.ServiceRegistrar, srv LightningNodeServer) { + // If the following call pancis, it indicates UnimplementedLightningNodeServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&LightningNode_ServiceDesc, srv) +} + +func _LightningNode_GetNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNodeInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).GetNodeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_GetNodeInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).GetNodeInfo(ctx, req.(*GetNodeInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_GetBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBalancesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).GetBalances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_GetBalances_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).GetBalances(ctx, req.(*GetBalancesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_OnchainReceive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OnchainReceiveRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).OnchainReceive(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_OnchainReceive_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).OnchainReceive(ctx, req.(*OnchainReceiveRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_OnchainSend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OnchainSendRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).OnchainSend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_OnchainSend_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).OnchainSend(ctx, req.(*OnchainSendRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_Bolt11Receive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Bolt11ReceiveRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).Bolt11Receive(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_Bolt11Receive_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).Bolt11Receive(ctx, req.(*Bolt11ReceiveRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_Bolt11ReceiveForHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Bolt11ReceiveForHashRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).Bolt11ReceiveForHash(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_Bolt11ReceiveForHash_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).Bolt11ReceiveForHash(ctx, req.(*Bolt11ReceiveForHashRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_Bolt11ClaimForHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Bolt11ClaimForHashRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).Bolt11ClaimForHash(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_Bolt11ClaimForHash_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).Bolt11ClaimForHash(ctx, req.(*Bolt11ClaimForHashRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_Bolt11FailForHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Bolt11FailForHashRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).Bolt11FailForHash(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_Bolt11FailForHash_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).Bolt11FailForHash(ctx, req.(*Bolt11FailForHashRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_Bolt11ReceiveViaJitChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Bolt11ReceiveViaJitChannelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).Bolt11ReceiveViaJitChannel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_Bolt11ReceiveViaJitChannel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).Bolt11ReceiveViaJitChannel(ctx, req.(*Bolt11ReceiveViaJitChannelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_Bolt11ReceiveVariableAmountViaJitChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Bolt11ReceiveVariableAmountViaJitChannelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).Bolt11ReceiveVariableAmountViaJitChannel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_Bolt11ReceiveVariableAmountViaJitChannel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).Bolt11ReceiveVariableAmountViaJitChannel(ctx, req.(*Bolt11ReceiveVariableAmountViaJitChannelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_Bolt11Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Bolt11SendRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).Bolt11Send(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_Bolt11Send_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).Bolt11Send(ctx, req.(*Bolt11SendRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_Bolt12Receive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Bolt12ReceiveRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).Bolt12Receive(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_Bolt12Receive_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).Bolt12Receive(ctx, req.(*Bolt12ReceiveRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_Bolt12Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Bolt12SendRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).Bolt12Send(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_Bolt12Send_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).Bolt12Send(ctx, req.(*Bolt12SendRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_SpontaneousSend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SpontaneousSendRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).SpontaneousSend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_SpontaneousSend_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).SpontaneousSend(ctx, req.(*SpontaneousSendRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_OpenChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OpenChannelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).OpenChannel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_OpenChannel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).OpenChannel(ctx, req.(*OpenChannelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_SpliceIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SpliceInRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).SpliceIn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_SpliceIn_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).SpliceIn(ctx, req.(*SpliceInRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_SpliceOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SpliceOutRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).SpliceOut(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_SpliceOut_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).SpliceOut(ctx, req.(*SpliceOutRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_UpdateChannelConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateChannelConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).UpdateChannelConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_UpdateChannelConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).UpdateChannelConfig(ctx, req.(*UpdateChannelConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_CloseChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CloseChannelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).CloseChannel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_CloseChannel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).CloseChannel(ctx, req.(*CloseChannelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_ForceCloseChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ForceCloseChannelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).ForceCloseChannel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_ForceCloseChannel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).ForceCloseChannel(ctx, req.(*ForceCloseChannelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_ListChannels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListChannelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).ListChannels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_ListChannels_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).ListChannels(ctx, req.(*ListChannelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_GetPaymentDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPaymentDetailsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).GetPaymentDetails(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_GetPaymentDetails_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).GetPaymentDetails(ctx, req.(*GetPaymentDetailsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_ListPayments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPaymentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).ListPayments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_ListPayments_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).ListPayments(ctx, req.(*ListPaymentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_ListForwardedPayments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListForwardedPaymentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).ListForwardedPayments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_ListForwardedPayments_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).ListForwardedPayments(ctx, req.(*ListForwardedPaymentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_ConnectPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ConnectPeerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).ConnectPeer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_ConnectPeer_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).ConnectPeer(ctx, req.(*ConnectPeerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_DisconnectPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DisconnectPeerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).DisconnectPeer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_DisconnectPeer_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).DisconnectPeer(ctx, req.(*DisconnectPeerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_ListPeers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPeersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).ListPeers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_ListPeers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).ListPeers(ctx, req.(*ListPeersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_SignMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignMessageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).SignMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_SignMessage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).SignMessage(ctx, req.(*SignMessageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_VerifySignature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VerifySignatureRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).VerifySignature(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_VerifySignature_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).VerifySignature(ctx, req.(*VerifySignatureRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_ExportPathfindingScores_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExportPathfindingScoresRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).ExportPathfindingScores(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_ExportPathfindingScores_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).ExportPathfindingScores(ctx, req.(*ExportPathfindingScoresRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_UnifiedSend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnifiedSendRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).UnifiedSend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_UnifiedSend_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).UnifiedSend(ctx, req.(*UnifiedSendRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_DecodeInvoice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DecodeInvoiceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).DecodeInvoice(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_DecodeInvoice_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).DecodeInvoice(ctx, req.(*DecodeInvoiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_DecodeOffer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DecodeOfferRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).DecodeOffer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_DecodeOffer_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).DecodeOffer(ctx, req.(*DecodeOfferRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_GraphListChannels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GraphListChannelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).GraphListChannels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_GraphListChannels_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).GraphListChannels(ctx, req.(*GraphListChannelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_GraphGetChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GraphGetChannelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).GraphGetChannel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_GraphGetChannel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).GraphGetChannel(ctx, req.(*GraphGetChannelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_GraphListNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GraphListNodesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).GraphListNodes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_GraphListNodes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).GraphListNodes(ctx, req.(*GraphListNodesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_GraphGetNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GraphGetNodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LightningNodeServer).GraphGetNode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LightningNode_GraphGetNode_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LightningNodeServer).GraphGetNode(ctx, req.(*GraphGetNodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LightningNode_SubscribeEvents_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SubscribeEventsRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(LightningNodeServer).SubscribeEvents(m, &grpc.GenericServerStream[SubscribeEventsRequest, events.EventEnvelope]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type LightningNode_SubscribeEventsServer = grpc.ServerStreamingServer[events.EventEnvelope] + +// LightningNode_ServiceDesc is the grpc.ServiceDesc for LightningNode service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var LightningNode_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.LightningNode", + HandlerType: (*LightningNodeServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetNodeInfo", + Handler: _LightningNode_GetNodeInfo_Handler, + }, + { + MethodName: "GetBalances", + Handler: _LightningNode_GetBalances_Handler, + }, + { + MethodName: "OnchainReceive", + Handler: _LightningNode_OnchainReceive_Handler, + }, + { + MethodName: "OnchainSend", + Handler: _LightningNode_OnchainSend_Handler, + }, + { + MethodName: "Bolt11Receive", + Handler: _LightningNode_Bolt11Receive_Handler, + }, + { + MethodName: "Bolt11ReceiveForHash", + Handler: _LightningNode_Bolt11ReceiveForHash_Handler, + }, + { + MethodName: "Bolt11ClaimForHash", + Handler: _LightningNode_Bolt11ClaimForHash_Handler, + }, + { + MethodName: "Bolt11FailForHash", + Handler: _LightningNode_Bolt11FailForHash_Handler, + }, + { + MethodName: "Bolt11ReceiveViaJitChannel", + Handler: _LightningNode_Bolt11ReceiveViaJitChannel_Handler, + }, + { + MethodName: "Bolt11ReceiveVariableAmountViaJitChannel", + Handler: _LightningNode_Bolt11ReceiveVariableAmountViaJitChannel_Handler, + }, + { + MethodName: "Bolt11Send", + Handler: _LightningNode_Bolt11Send_Handler, + }, + { + MethodName: "Bolt12Receive", + Handler: _LightningNode_Bolt12Receive_Handler, + }, + { + MethodName: "Bolt12Send", + Handler: _LightningNode_Bolt12Send_Handler, + }, + { + MethodName: "SpontaneousSend", + Handler: _LightningNode_SpontaneousSend_Handler, + }, + { + MethodName: "OpenChannel", + Handler: _LightningNode_OpenChannel_Handler, + }, + { + MethodName: "SpliceIn", + Handler: _LightningNode_SpliceIn_Handler, + }, + { + MethodName: "SpliceOut", + Handler: _LightningNode_SpliceOut_Handler, + }, + { + MethodName: "UpdateChannelConfig", + Handler: _LightningNode_UpdateChannelConfig_Handler, + }, + { + MethodName: "CloseChannel", + Handler: _LightningNode_CloseChannel_Handler, + }, + { + MethodName: "ForceCloseChannel", + Handler: _LightningNode_ForceCloseChannel_Handler, + }, + { + MethodName: "ListChannels", + Handler: _LightningNode_ListChannels_Handler, + }, + { + MethodName: "GetPaymentDetails", + Handler: _LightningNode_GetPaymentDetails_Handler, + }, + { + MethodName: "ListPayments", + Handler: _LightningNode_ListPayments_Handler, + }, + { + MethodName: "ListForwardedPayments", + Handler: _LightningNode_ListForwardedPayments_Handler, + }, + { + MethodName: "ConnectPeer", + Handler: _LightningNode_ConnectPeer_Handler, + }, + { + MethodName: "DisconnectPeer", + Handler: _LightningNode_DisconnectPeer_Handler, + }, + { + MethodName: "ListPeers", + Handler: _LightningNode_ListPeers_Handler, + }, + { + MethodName: "SignMessage", + Handler: _LightningNode_SignMessage_Handler, + }, + { + MethodName: "VerifySignature", + Handler: _LightningNode_VerifySignature_Handler, + }, + { + MethodName: "ExportPathfindingScores", + Handler: _LightningNode_ExportPathfindingScores_Handler, + }, + { + MethodName: "UnifiedSend", + Handler: _LightningNode_UnifiedSend_Handler, + }, + { + MethodName: "DecodeInvoice", + Handler: _LightningNode_DecodeInvoice_Handler, + }, + { + MethodName: "DecodeOffer", + Handler: _LightningNode_DecodeOffer_Handler, + }, + { + MethodName: "GraphListChannels", + Handler: _LightningNode_GraphListChannels_Handler, + }, + { + MethodName: "GraphGetChannel", + Handler: _LightningNode_GraphGetChannel_Handler, + }, + { + MethodName: "GraphListNodes", + Handler: _LightningNode_GraphListNodes_Handler, + }, + { + MethodName: "GraphGetNode", + Handler: _LightningNode_GraphGetNode_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "SubscribeEvents", + Handler: _LightningNode_SubscribeEvents_Handler, + ServerStreams: true, + }, + }, + Metadata: "api.proto", +} diff --git a/lnclient/ldk-server/grpc/events/events.pb.go b/lnclient/ldk-server/grpc/events/events.pb.go new file mode 100644 index 000000000..b60fdb345 --- /dev/null +++ b/lnclient/ldk-server/grpc/events/events.pb.go @@ -0,0 +1,1286 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v3.21.12 +// source: events.proto + +package events + +import ( + types "github.com/getAlby/hub/lnclient/ldk-server/grpc/types" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ChannelState int32 + +const ( + ChannelState_CHANNEL_STATE_UNSPECIFIED ChannelState = 0 + ChannelState_CHANNEL_STATE_PENDING ChannelState = 1 + ChannelState_CHANNEL_STATE_READY ChannelState = 2 + ChannelState_CHANNEL_STATE_OPEN_FAILED ChannelState = 3 + ChannelState_CHANNEL_STATE_CLOSED ChannelState = 4 +) + +// Enum value maps for ChannelState. +var ( + ChannelState_name = map[int32]string{ + 0: "CHANNEL_STATE_UNSPECIFIED", + 1: "CHANNEL_STATE_PENDING", + 2: "CHANNEL_STATE_READY", + 3: "CHANNEL_STATE_OPEN_FAILED", + 4: "CHANNEL_STATE_CLOSED", + } + ChannelState_value = map[string]int32{ + "CHANNEL_STATE_UNSPECIFIED": 0, + "CHANNEL_STATE_PENDING": 1, + "CHANNEL_STATE_READY": 2, + "CHANNEL_STATE_OPEN_FAILED": 3, + "CHANNEL_STATE_CLOSED": 4, + } +) + +func (x ChannelState) Enum() *ChannelState { + p := new(ChannelState) + *p = x + return p +} + +func (x ChannelState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ChannelState) Descriptor() protoreflect.EnumDescriptor { + return file_events_proto_enumTypes[0].Descriptor() +} + +func (ChannelState) Type() protoreflect.EnumType { + return &file_events_proto_enumTypes[0] +} + +func (x ChannelState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ChannelState.Descriptor instead. +func (ChannelState) EnumDescriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{0} +} + +type ChannelClosureInitiator int32 + +const ( + ChannelClosureInitiator_CHANNEL_CLOSURE_INITIATOR_UNSPECIFIED ChannelClosureInitiator = 0 + ChannelClosureInitiator_CHANNEL_CLOSURE_INITIATOR_LOCAL ChannelClosureInitiator = 1 + ChannelClosureInitiator_CHANNEL_CLOSURE_INITIATOR_REMOTE ChannelClosureInitiator = 2 + ChannelClosureInitiator_CHANNEL_CLOSURE_INITIATOR_UNKNOWN ChannelClosureInitiator = 3 +) + +// Enum value maps for ChannelClosureInitiator. +var ( + ChannelClosureInitiator_name = map[int32]string{ + 0: "CHANNEL_CLOSURE_INITIATOR_UNSPECIFIED", + 1: "CHANNEL_CLOSURE_INITIATOR_LOCAL", + 2: "CHANNEL_CLOSURE_INITIATOR_REMOTE", + 3: "CHANNEL_CLOSURE_INITIATOR_UNKNOWN", + } + ChannelClosureInitiator_value = map[string]int32{ + "CHANNEL_CLOSURE_INITIATOR_UNSPECIFIED": 0, + "CHANNEL_CLOSURE_INITIATOR_LOCAL": 1, + "CHANNEL_CLOSURE_INITIATOR_REMOTE": 2, + "CHANNEL_CLOSURE_INITIATOR_UNKNOWN": 3, + } +) + +func (x ChannelClosureInitiator) Enum() *ChannelClosureInitiator { + p := new(ChannelClosureInitiator) + *p = x + return p +} + +func (x ChannelClosureInitiator) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ChannelClosureInitiator) Descriptor() protoreflect.EnumDescriptor { + return file_events_proto_enumTypes[1].Descriptor() +} + +func (ChannelClosureInitiator) Type() protoreflect.EnumType { + return &file_events_proto_enumTypes[1] +} + +func (x ChannelClosureInitiator) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ChannelClosureInitiator.Descriptor instead. +func (ChannelClosureInitiator) EnumDescriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{1} +} + +type ChannelStateChangeReasonKind int32 + +const ( + ChannelStateChangeReasonKind_CHANNEL_STATE_CHANGE_REASON_KIND_UNSPECIFIED ChannelStateChangeReasonKind = 0 + ChannelStateChangeReasonKind_CHANNEL_STATE_CHANGE_REASON_KIND_COUNTERPARTY_FORCE_CLOSED ChannelStateChangeReasonKind = 1 + ChannelStateChangeReasonKind_CHANNEL_STATE_CHANGE_REASON_KIND_HOLDER_FORCE_CLOSED ChannelStateChangeReasonKind = 2 + ChannelStateChangeReasonKind_CHANNEL_STATE_CHANGE_REASON_KIND_LEGACY_COOPERATIVE_CLOSURE ChannelStateChangeReasonKind = 3 + ChannelStateChangeReasonKind_CHANNEL_STATE_CHANGE_REASON_KIND_COUNTERPARTY_INITIATED_COOPERATIVE_CLOSURE ChannelStateChangeReasonKind = 4 + ChannelStateChangeReasonKind_CHANNEL_STATE_CHANGE_REASON_KIND_LOCALLY_INITIATED_COOPERATIVE_CLOSURE ChannelStateChangeReasonKind = 5 + ChannelStateChangeReasonKind_CHANNEL_STATE_CHANGE_REASON_KIND_COMMITMENT_TX_CONFIRMED ChannelStateChangeReasonKind = 6 + ChannelStateChangeReasonKind_CHANNEL_STATE_CHANGE_REASON_KIND_FUNDING_TIMED_OUT ChannelStateChangeReasonKind = 7 + ChannelStateChangeReasonKind_CHANNEL_STATE_CHANGE_REASON_KIND_PROCESSING_ERROR ChannelStateChangeReasonKind = 8 + ChannelStateChangeReasonKind_CHANNEL_STATE_CHANGE_REASON_KIND_DISCONNECTED_PEER ChannelStateChangeReasonKind = 9 + ChannelStateChangeReasonKind_CHANNEL_STATE_CHANGE_REASON_KIND_OUTDATED_CHANNEL_MANAGER ChannelStateChangeReasonKind = 10 + ChannelStateChangeReasonKind_CHANNEL_STATE_CHANGE_REASON_KIND_COUNTERPARTY_COOP_CLOSED_UNFUNDED_CHANNEL ChannelStateChangeReasonKind = 11 + ChannelStateChangeReasonKind_CHANNEL_STATE_CHANGE_REASON_KIND_LOCALLY_COOP_CLOSED_UNFUNDED_CHANNEL ChannelStateChangeReasonKind = 12 + ChannelStateChangeReasonKind_CHANNEL_STATE_CHANGE_REASON_KIND_FUNDING_BATCH_CLOSURE ChannelStateChangeReasonKind = 13 + ChannelStateChangeReasonKind_CHANNEL_STATE_CHANGE_REASON_KIND_HTLCS_TIMED_OUT ChannelStateChangeReasonKind = 14 + ChannelStateChangeReasonKind_CHANNEL_STATE_CHANGE_REASON_KIND_PEER_FEERATE_TOO_LOW ChannelStateChangeReasonKind = 15 +) + +// Enum value maps for ChannelStateChangeReasonKind. +var ( + ChannelStateChangeReasonKind_name = map[int32]string{ + 0: "CHANNEL_STATE_CHANGE_REASON_KIND_UNSPECIFIED", + 1: "CHANNEL_STATE_CHANGE_REASON_KIND_COUNTERPARTY_FORCE_CLOSED", + 2: "CHANNEL_STATE_CHANGE_REASON_KIND_HOLDER_FORCE_CLOSED", + 3: "CHANNEL_STATE_CHANGE_REASON_KIND_LEGACY_COOPERATIVE_CLOSURE", + 4: "CHANNEL_STATE_CHANGE_REASON_KIND_COUNTERPARTY_INITIATED_COOPERATIVE_CLOSURE", + 5: "CHANNEL_STATE_CHANGE_REASON_KIND_LOCALLY_INITIATED_COOPERATIVE_CLOSURE", + 6: "CHANNEL_STATE_CHANGE_REASON_KIND_COMMITMENT_TX_CONFIRMED", + 7: "CHANNEL_STATE_CHANGE_REASON_KIND_FUNDING_TIMED_OUT", + 8: "CHANNEL_STATE_CHANGE_REASON_KIND_PROCESSING_ERROR", + 9: "CHANNEL_STATE_CHANGE_REASON_KIND_DISCONNECTED_PEER", + 10: "CHANNEL_STATE_CHANGE_REASON_KIND_OUTDATED_CHANNEL_MANAGER", + 11: "CHANNEL_STATE_CHANGE_REASON_KIND_COUNTERPARTY_COOP_CLOSED_UNFUNDED_CHANNEL", + 12: "CHANNEL_STATE_CHANGE_REASON_KIND_LOCALLY_COOP_CLOSED_UNFUNDED_CHANNEL", + 13: "CHANNEL_STATE_CHANGE_REASON_KIND_FUNDING_BATCH_CLOSURE", + 14: "CHANNEL_STATE_CHANGE_REASON_KIND_HTLCS_TIMED_OUT", + 15: "CHANNEL_STATE_CHANGE_REASON_KIND_PEER_FEERATE_TOO_LOW", + } + ChannelStateChangeReasonKind_value = map[string]int32{ + "CHANNEL_STATE_CHANGE_REASON_KIND_UNSPECIFIED": 0, + "CHANNEL_STATE_CHANGE_REASON_KIND_COUNTERPARTY_FORCE_CLOSED": 1, + "CHANNEL_STATE_CHANGE_REASON_KIND_HOLDER_FORCE_CLOSED": 2, + "CHANNEL_STATE_CHANGE_REASON_KIND_LEGACY_COOPERATIVE_CLOSURE": 3, + "CHANNEL_STATE_CHANGE_REASON_KIND_COUNTERPARTY_INITIATED_COOPERATIVE_CLOSURE": 4, + "CHANNEL_STATE_CHANGE_REASON_KIND_LOCALLY_INITIATED_COOPERATIVE_CLOSURE": 5, + "CHANNEL_STATE_CHANGE_REASON_KIND_COMMITMENT_TX_CONFIRMED": 6, + "CHANNEL_STATE_CHANGE_REASON_KIND_FUNDING_TIMED_OUT": 7, + "CHANNEL_STATE_CHANGE_REASON_KIND_PROCESSING_ERROR": 8, + "CHANNEL_STATE_CHANGE_REASON_KIND_DISCONNECTED_PEER": 9, + "CHANNEL_STATE_CHANGE_REASON_KIND_OUTDATED_CHANNEL_MANAGER": 10, + "CHANNEL_STATE_CHANGE_REASON_KIND_COUNTERPARTY_COOP_CLOSED_UNFUNDED_CHANNEL": 11, + "CHANNEL_STATE_CHANGE_REASON_KIND_LOCALLY_COOP_CLOSED_UNFUNDED_CHANNEL": 12, + "CHANNEL_STATE_CHANGE_REASON_KIND_FUNDING_BATCH_CLOSURE": 13, + "CHANNEL_STATE_CHANGE_REASON_KIND_HTLCS_TIMED_OUT": 14, + "CHANNEL_STATE_CHANGE_REASON_KIND_PEER_FEERATE_TOO_LOW": 15, + } +) + +func (x ChannelStateChangeReasonKind) Enum() *ChannelStateChangeReasonKind { + p := new(ChannelStateChangeReasonKind) + *p = x + return p +} + +func (x ChannelStateChangeReasonKind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ChannelStateChangeReasonKind) Descriptor() protoreflect.EnumDescriptor { + return file_events_proto_enumTypes[2].Descriptor() +} + +func (ChannelStateChangeReasonKind) Type() protoreflect.EnumType { + return &file_events_proto_enumTypes[2] +} + +func (x ChannelStateChangeReasonKind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ChannelStateChangeReasonKind.Descriptor instead. +func (ChannelStateChangeReasonKind) EnumDescriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{2} +} + +// EventEnvelope wraps different event types in a single message to be used by EventPublisher. +type EventEnvelope struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Event: + // + // *EventEnvelope_PaymentReceived + // *EventEnvelope_PaymentSuccessful + // *EventEnvelope_PaymentFailed + // *EventEnvelope_PaymentForwarded + // *EventEnvelope_PaymentClaimable + // *EventEnvelope_ChannelStateChanged + Event isEventEnvelope_Event `protobuf_oneof:"event"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EventEnvelope) Reset() { + *x = EventEnvelope{} + mi := &file_events_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EventEnvelope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventEnvelope) ProtoMessage() {} + +func (x *EventEnvelope) ProtoReflect() protoreflect.Message { + mi := &file_events_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventEnvelope.ProtoReflect.Descriptor instead. +func (*EventEnvelope) Descriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{0} +} + +func (x *EventEnvelope) GetEvent() isEventEnvelope_Event { + if x != nil { + return x.Event + } + return nil +} + +func (x *EventEnvelope) GetPaymentReceived() *PaymentReceived { + if x != nil { + if x, ok := x.Event.(*EventEnvelope_PaymentReceived); ok { + return x.PaymentReceived + } + } + return nil +} + +func (x *EventEnvelope) GetPaymentSuccessful() *PaymentSuccessful { + if x != nil { + if x, ok := x.Event.(*EventEnvelope_PaymentSuccessful); ok { + return x.PaymentSuccessful + } + } + return nil +} + +func (x *EventEnvelope) GetPaymentFailed() *PaymentFailed { + if x != nil { + if x, ok := x.Event.(*EventEnvelope_PaymentFailed); ok { + return x.PaymentFailed + } + } + return nil +} + +func (x *EventEnvelope) GetPaymentForwarded() *PaymentForwarded { + if x != nil { + if x, ok := x.Event.(*EventEnvelope_PaymentForwarded); ok { + return x.PaymentForwarded + } + } + return nil +} + +func (x *EventEnvelope) GetPaymentClaimable() *PaymentClaimable { + if x != nil { + if x, ok := x.Event.(*EventEnvelope_PaymentClaimable); ok { + return x.PaymentClaimable + } + } + return nil +} + +func (x *EventEnvelope) GetChannelStateChanged() *ChannelStateChanged { + if x != nil { + if x, ok := x.Event.(*EventEnvelope_ChannelStateChanged); ok { + return x.ChannelStateChanged + } + } + return nil +} + +type isEventEnvelope_Event interface { + isEventEnvelope_Event() +} + +type EventEnvelope_PaymentReceived struct { + PaymentReceived *PaymentReceived `protobuf:"bytes,2,opt,name=payment_received,json=paymentReceived,proto3,oneof"` +} + +type EventEnvelope_PaymentSuccessful struct { + PaymentSuccessful *PaymentSuccessful `protobuf:"bytes,3,opt,name=payment_successful,json=paymentSuccessful,proto3,oneof"` +} + +type EventEnvelope_PaymentFailed struct { + PaymentFailed *PaymentFailed `protobuf:"bytes,4,opt,name=payment_failed,json=paymentFailed,proto3,oneof"` +} + +type EventEnvelope_PaymentForwarded struct { + PaymentForwarded *PaymentForwarded `protobuf:"bytes,6,opt,name=payment_forwarded,json=paymentForwarded,proto3,oneof"` +} + +type EventEnvelope_PaymentClaimable struct { + PaymentClaimable *PaymentClaimable `protobuf:"bytes,7,opt,name=payment_claimable,json=paymentClaimable,proto3,oneof"` +} + +type EventEnvelope_ChannelStateChanged struct { + ChannelStateChanged *ChannelStateChanged `protobuf:"bytes,8,opt,name=channel_state_changed,json=channelStateChanged,proto3,oneof"` +} + +func (*EventEnvelope_PaymentReceived) isEventEnvelope_Event() {} + +func (*EventEnvelope_PaymentSuccessful) isEventEnvelope_Event() {} + +func (*EventEnvelope_PaymentFailed) isEventEnvelope_Event() {} + +func (*EventEnvelope_PaymentForwarded) isEventEnvelope_Event() {} + +func (*EventEnvelope_PaymentClaimable) isEventEnvelope_Event() {} + +func (*EventEnvelope_ChannelStateChanged) isEventEnvelope_Event() {} + +type CounterpartyForceClosedDetails struct { + state protoimpl.MessageState `protogen:"open.v1"` + PeerMsg string `protobuf:"bytes,1,opt,name=peer_msg,json=peerMsg,proto3" json:"peer_msg,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CounterpartyForceClosedDetails) Reset() { + *x = CounterpartyForceClosedDetails{} + mi := &file_events_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CounterpartyForceClosedDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CounterpartyForceClosedDetails) ProtoMessage() {} + +func (x *CounterpartyForceClosedDetails) ProtoReflect() protoreflect.Message { + mi := &file_events_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CounterpartyForceClosedDetails.ProtoReflect.Descriptor instead. +func (*CounterpartyForceClosedDetails) Descriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{1} +} + +func (x *CounterpartyForceClosedDetails) GetPeerMsg() string { + if x != nil { + return x.PeerMsg + } + return "" +} + +type HolderForceClosedDetails struct { + state protoimpl.MessageState `protogen:"open.v1"` + BroadcastedLatestTxn *bool `protobuf:"varint,1,opt,name=broadcasted_latest_txn,json=broadcastedLatestTxn,proto3,oneof" json:"broadcasted_latest_txn,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HolderForceClosedDetails) Reset() { + *x = HolderForceClosedDetails{} + mi := &file_events_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HolderForceClosedDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HolderForceClosedDetails) ProtoMessage() {} + +func (x *HolderForceClosedDetails) ProtoReflect() protoreflect.Message { + mi := &file_events_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HolderForceClosedDetails.ProtoReflect.Descriptor instead. +func (*HolderForceClosedDetails) Descriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{2} +} + +func (x *HolderForceClosedDetails) GetBroadcastedLatestTxn() bool { + if x != nil && x.BroadcastedLatestTxn != nil { + return *x.BroadcastedLatestTxn + } + return false +} + +func (x *HolderForceClosedDetails) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type ProcessingErrorDetails struct { + state protoimpl.MessageState `protogen:"open.v1"` + Err string `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ProcessingErrorDetails) Reset() { + *x = ProcessingErrorDetails{} + mi := &file_events_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProcessingErrorDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProcessingErrorDetails) ProtoMessage() {} + +func (x *ProcessingErrorDetails) ProtoReflect() protoreflect.Message { + mi := &file_events_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProcessingErrorDetails.ProtoReflect.Descriptor instead. +func (*ProcessingErrorDetails) Descriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{3} +} + +func (x *ProcessingErrorDetails) GetErr() string { + if x != nil { + return x.Err + } + return "" +} + +type HtlcsTimedOutDetails struct { + state protoimpl.MessageState `protogen:"open.v1"` + PaymentHash *string `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3,oneof" json:"payment_hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HtlcsTimedOutDetails) Reset() { + *x = HtlcsTimedOutDetails{} + mi := &file_events_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HtlcsTimedOutDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HtlcsTimedOutDetails) ProtoMessage() {} + +func (x *HtlcsTimedOutDetails) ProtoReflect() protoreflect.Message { + mi := &file_events_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HtlcsTimedOutDetails.ProtoReflect.Descriptor instead. +func (*HtlcsTimedOutDetails) Descriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{4} +} + +func (x *HtlcsTimedOutDetails) GetPaymentHash() string { + if x != nil && x.PaymentHash != nil { + return *x.PaymentHash + } + return "" +} + +type PeerFeerateTooLowDetails struct { + state protoimpl.MessageState `protogen:"open.v1"` + PeerFeerateSatPerKw uint32 `protobuf:"varint,1,opt,name=peer_feerate_sat_per_kw,json=peerFeerateSatPerKw,proto3" json:"peer_feerate_sat_per_kw,omitempty"` + RequiredFeerateSatPerKw uint32 `protobuf:"varint,2,opt,name=required_feerate_sat_per_kw,json=requiredFeerateSatPerKw,proto3" json:"required_feerate_sat_per_kw,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PeerFeerateTooLowDetails) Reset() { + *x = PeerFeerateTooLowDetails{} + mi := &file_events_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PeerFeerateTooLowDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerFeerateTooLowDetails) ProtoMessage() {} + +func (x *PeerFeerateTooLowDetails) ProtoReflect() protoreflect.Message { + mi := &file_events_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeerFeerateTooLowDetails.ProtoReflect.Descriptor instead. +func (*PeerFeerateTooLowDetails) Descriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{5} +} + +func (x *PeerFeerateTooLowDetails) GetPeerFeerateSatPerKw() uint32 { + if x != nil { + return x.PeerFeerateSatPerKw + } + return 0 +} + +func (x *PeerFeerateTooLowDetails) GetRequiredFeerateSatPerKw() uint32 { + if x != nil { + return x.RequiredFeerateSatPerKw + } + return 0 +} + +type ChannelStateChangeReason struct { + state protoimpl.MessageState `protogen:"open.v1"` + Kind ChannelStateChangeReasonKind `protobuf:"varint,1,opt,name=kind,proto3,enum=events.ChannelStateChangeReasonKind" json:"kind,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + // Types that are valid to be assigned to Details: + // + // *ChannelStateChangeReason_CounterpartyForceClosed + // *ChannelStateChangeReason_HolderForceClosed + // *ChannelStateChangeReason_ProcessingError + // *ChannelStateChangeReason_HtlcsTimedOut + // *ChannelStateChangeReason_PeerFeerateTooLow + Details isChannelStateChangeReason_Details `protobuf_oneof:"details"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChannelStateChangeReason) Reset() { + *x = ChannelStateChangeReason{} + mi := &file_events_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChannelStateChangeReason) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChannelStateChangeReason) ProtoMessage() {} + +func (x *ChannelStateChangeReason) ProtoReflect() protoreflect.Message { + mi := &file_events_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChannelStateChangeReason.ProtoReflect.Descriptor instead. +func (*ChannelStateChangeReason) Descriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{6} +} + +func (x *ChannelStateChangeReason) GetKind() ChannelStateChangeReasonKind { + if x != nil { + return x.Kind + } + return ChannelStateChangeReasonKind_CHANNEL_STATE_CHANGE_REASON_KIND_UNSPECIFIED +} + +func (x *ChannelStateChangeReason) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *ChannelStateChangeReason) GetDetails() isChannelStateChangeReason_Details { + if x != nil { + return x.Details + } + return nil +} + +func (x *ChannelStateChangeReason) GetCounterpartyForceClosed() *CounterpartyForceClosedDetails { + if x != nil { + if x, ok := x.Details.(*ChannelStateChangeReason_CounterpartyForceClosed); ok { + return x.CounterpartyForceClosed + } + } + return nil +} + +func (x *ChannelStateChangeReason) GetHolderForceClosed() *HolderForceClosedDetails { + if x != nil { + if x, ok := x.Details.(*ChannelStateChangeReason_HolderForceClosed); ok { + return x.HolderForceClosed + } + } + return nil +} + +func (x *ChannelStateChangeReason) GetProcessingError() *ProcessingErrorDetails { + if x != nil { + if x, ok := x.Details.(*ChannelStateChangeReason_ProcessingError); ok { + return x.ProcessingError + } + } + return nil +} + +func (x *ChannelStateChangeReason) GetHtlcsTimedOut() *HtlcsTimedOutDetails { + if x != nil { + if x, ok := x.Details.(*ChannelStateChangeReason_HtlcsTimedOut); ok { + return x.HtlcsTimedOut + } + } + return nil +} + +func (x *ChannelStateChangeReason) GetPeerFeerateTooLow() *PeerFeerateTooLowDetails { + if x != nil { + if x, ok := x.Details.(*ChannelStateChangeReason_PeerFeerateTooLow); ok { + return x.PeerFeerateTooLow + } + } + return nil +} + +type isChannelStateChangeReason_Details interface { + isChannelStateChangeReason_Details() +} + +type ChannelStateChangeReason_CounterpartyForceClosed struct { + CounterpartyForceClosed *CounterpartyForceClosedDetails `protobuf:"bytes,3,opt,name=counterparty_force_closed,json=counterpartyForceClosed,proto3,oneof"` +} + +type ChannelStateChangeReason_HolderForceClosed struct { + HolderForceClosed *HolderForceClosedDetails `protobuf:"bytes,4,opt,name=holder_force_closed,json=holderForceClosed,proto3,oneof"` +} + +type ChannelStateChangeReason_ProcessingError struct { + ProcessingError *ProcessingErrorDetails `protobuf:"bytes,5,opt,name=processing_error,json=processingError,proto3,oneof"` +} + +type ChannelStateChangeReason_HtlcsTimedOut struct { + HtlcsTimedOut *HtlcsTimedOutDetails `protobuf:"bytes,6,opt,name=htlcs_timed_out,json=htlcsTimedOut,proto3,oneof"` +} + +type ChannelStateChangeReason_PeerFeerateTooLow struct { + PeerFeerateTooLow *PeerFeerateTooLowDetails `protobuf:"bytes,7,opt,name=peer_feerate_too_low,json=peerFeerateTooLow,proto3,oneof"` +} + +func (*ChannelStateChangeReason_CounterpartyForceClosed) isChannelStateChangeReason_Details() {} + +func (*ChannelStateChangeReason_HolderForceClosed) isChannelStateChangeReason_Details() {} + +func (*ChannelStateChangeReason_ProcessingError) isChannelStateChangeReason_Details() {} + +func (*ChannelStateChangeReason_HtlcsTimedOut) isChannelStateChangeReason_Details() {} + +func (*ChannelStateChangeReason_PeerFeerateTooLow) isChannelStateChangeReason_Details() {} + +type ChannelStateChanged struct { + state protoimpl.MessageState `protogen:"open.v1"` + ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + UserChannelId string `protobuf:"bytes,2,opt,name=user_channel_id,json=userChannelId,proto3" json:"user_channel_id,omitempty"` + CounterpartyNodeId *string `protobuf:"bytes,3,opt,name=counterparty_node_id,json=counterpartyNodeId,proto3,oneof" json:"counterparty_node_id,omitempty"` + State ChannelState `protobuf:"varint,4,opt,name=state,proto3,enum=events.ChannelState" json:"state,omitempty"` + FundingTxo *string `protobuf:"bytes,5,opt,name=funding_txo,json=fundingTxo,proto3,oneof" json:"funding_txo,omitempty"` + Reason *ChannelStateChangeReason `protobuf:"bytes,6,opt,name=reason,proto3,oneof" json:"reason,omitempty"` + ClosureInitiator ChannelClosureInitiator `protobuf:"varint,7,opt,name=closure_initiator,json=closureInitiator,proto3,enum=events.ChannelClosureInitiator" json:"closure_initiator,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChannelStateChanged) Reset() { + *x = ChannelStateChanged{} + mi := &file_events_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChannelStateChanged) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChannelStateChanged) ProtoMessage() {} + +func (x *ChannelStateChanged) ProtoReflect() protoreflect.Message { + mi := &file_events_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChannelStateChanged.ProtoReflect.Descriptor instead. +func (*ChannelStateChanged) Descriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{7} +} + +func (x *ChannelStateChanged) GetChannelId() string { + if x != nil { + return x.ChannelId + } + return "" +} + +func (x *ChannelStateChanged) GetUserChannelId() string { + if x != nil { + return x.UserChannelId + } + return "" +} + +func (x *ChannelStateChanged) GetCounterpartyNodeId() string { + if x != nil && x.CounterpartyNodeId != nil { + return *x.CounterpartyNodeId + } + return "" +} + +func (x *ChannelStateChanged) GetState() ChannelState { + if x != nil { + return x.State + } + return ChannelState_CHANNEL_STATE_UNSPECIFIED +} + +func (x *ChannelStateChanged) GetFundingTxo() string { + if x != nil && x.FundingTxo != nil { + return *x.FundingTxo + } + return "" +} + +func (x *ChannelStateChanged) GetReason() *ChannelStateChangeReason { + if x != nil { + return x.Reason + } + return nil +} + +func (x *ChannelStateChanged) GetClosureInitiator() ChannelClosureInitiator { + if x != nil { + return x.ClosureInitiator + } + return ChannelClosureInitiator_CHANNEL_CLOSURE_INITIATOR_UNSPECIFIED +} + +// PaymentReceived indicates a payment has been received. +type PaymentReceived struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The payment details for the payment in event. + Payment *types.Payment `protobuf:"bytes,1,opt,name=payment,proto3" json:"payment,omitempty"` + // Custom TLV records attached to the incoming payment, if any. + CustomRecords []*types.CustomTlvRecord `protobuf:"bytes,2,rep,name=custom_records,json=customRecords,proto3" json:"custom_records,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PaymentReceived) Reset() { + *x = PaymentReceived{} + mi := &file_events_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PaymentReceived) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaymentReceived) ProtoMessage() {} + +func (x *PaymentReceived) ProtoReflect() protoreflect.Message { + mi := &file_events_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PaymentReceived.ProtoReflect.Descriptor instead. +func (*PaymentReceived) Descriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{8} +} + +func (x *PaymentReceived) GetPayment() *types.Payment { + if x != nil { + return x.Payment + } + return nil +} + +func (x *PaymentReceived) GetCustomRecords() []*types.CustomTlvRecord { + if x != nil { + return x.CustomRecords + } + return nil +} + +// PaymentSuccessful indicates a sent payment was successful. +type PaymentSuccessful struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The payment details for the payment in event. + Payment *types.Payment `protobuf:"bytes,1,opt,name=payment,proto3" json:"payment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PaymentSuccessful) Reset() { + *x = PaymentSuccessful{} + mi := &file_events_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PaymentSuccessful) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaymentSuccessful) ProtoMessage() {} + +func (x *PaymentSuccessful) ProtoReflect() protoreflect.Message { + mi := &file_events_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PaymentSuccessful.ProtoReflect.Descriptor instead. +func (*PaymentSuccessful) Descriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{9} +} + +func (x *PaymentSuccessful) GetPayment() *types.Payment { + if x != nil { + return x.Payment + } + return nil +} + +// PaymentFailed indicates a sent payment has failed. +type PaymentFailed struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The payment details for the payment in event. + Payment *types.Payment `protobuf:"bytes,1,opt,name=payment,proto3" json:"payment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PaymentFailed) Reset() { + *x = PaymentFailed{} + mi := &file_events_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PaymentFailed) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaymentFailed) ProtoMessage() {} + +func (x *PaymentFailed) ProtoReflect() protoreflect.Message { + mi := &file_events_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PaymentFailed.ProtoReflect.Descriptor instead. +func (*PaymentFailed) Descriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{10} +} + +func (x *PaymentFailed) GetPayment() *types.Payment { + if x != nil { + return x.Payment + } + return nil +} + +// PaymentClaimable indicates a payment has arrived and is waiting to be manually claimed or failed. +// This event is only emitted for payments created via `Bolt11ReceiveForHash`. +type PaymentClaimable struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The payment details for the claimable payment. + Payment *types.Payment `protobuf:"bytes,1,opt,name=payment,proto3" json:"payment,omitempty"` + // Custom TLV records attached to the claimable payment, if any. + CustomRecords []*types.CustomTlvRecord `protobuf:"bytes,2,rep,name=custom_records,json=customRecords,proto3" json:"custom_records,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PaymentClaimable) Reset() { + *x = PaymentClaimable{} + mi := &file_events_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PaymentClaimable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaymentClaimable) ProtoMessage() {} + +func (x *PaymentClaimable) ProtoReflect() protoreflect.Message { + mi := &file_events_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PaymentClaimable.ProtoReflect.Descriptor instead. +func (*PaymentClaimable) Descriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{11} +} + +func (x *PaymentClaimable) GetPayment() *types.Payment { + if x != nil { + return x.Payment + } + return nil +} + +func (x *PaymentClaimable) GetCustomRecords() []*types.CustomTlvRecord { + if x != nil { + return x.CustomRecords + } + return nil +} + +// PaymentForwarded indicates a payment was forwarded through the node. +type PaymentForwarded struct { + state protoimpl.MessageState `protogen:"open.v1"` + ForwardedPayment *types.ForwardedPayment `protobuf:"bytes,1,opt,name=forwarded_payment,json=forwardedPayment,proto3" json:"forwarded_payment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PaymentForwarded) Reset() { + *x = PaymentForwarded{} + mi := &file_events_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PaymentForwarded) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaymentForwarded) ProtoMessage() {} + +func (x *PaymentForwarded) ProtoReflect() protoreflect.Message { + mi := &file_events_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PaymentForwarded.ProtoReflect.Descriptor instead. +func (*PaymentForwarded) Descriptor() ([]byte, []int) { + return file_events_proto_rawDescGZIP(), []int{12} +} + +func (x *PaymentForwarded) GetForwardedPayment() *types.ForwardedPayment { + if x != nil { + return x.ForwardedPayment + } + return nil +} + +var File_events_proto protoreflect.FileDescriptor + +const file_events_proto_rawDesc = "" + + "\n" + + "\fevents.proto\x12\x06events\x1a\vtypes.proto\"\xcf\x03\n" + + "\rEventEnvelope\x12D\n" + + "\x10payment_received\x18\x02 \x01(\v2\x17.events.PaymentReceivedH\x00R\x0fpaymentReceived\x12J\n" + + "\x12payment_successful\x18\x03 \x01(\v2\x19.events.PaymentSuccessfulH\x00R\x11paymentSuccessful\x12>\n" + + "\x0epayment_failed\x18\x04 \x01(\v2\x15.events.PaymentFailedH\x00R\rpaymentFailed\x12G\n" + + "\x11payment_forwarded\x18\x06 \x01(\v2\x18.events.PaymentForwardedH\x00R\x10paymentForwarded\x12G\n" + + "\x11payment_claimable\x18\a \x01(\v2\x18.events.PaymentClaimableH\x00R\x10paymentClaimable\x12Q\n" + + "\x15channel_state_changed\x18\b \x01(\v2\x1b.events.ChannelStateChangedH\x00R\x13channelStateChangedB\a\n" + + "\x05event\";\n" + + "\x1eCounterpartyForceClosedDetails\x12\x19\n" + + "\bpeer_msg\x18\x01 \x01(\tR\apeerMsg\"\x8a\x01\n" + + "\x18HolderForceClosedDetails\x129\n" + + "\x16broadcasted_latest_txn\x18\x01 \x01(\bH\x00R\x14broadcastedLatestTxn\x88\x01\x01\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessageB\x19\n" + + "\x17_broadcasted_latest_txn\"*\n" + + "\x16ProcessingErrorDetails\x12\x10\n" + + "\x03err\x18\x01 \x01(\tR\x03err\"O\n" + + "\x14HtlcsTimedOutDetails\x12&\n" + + "\fpayment_hash\x18\x01 \x01(\tH\x00R\vpaymentHash\x88\x01\x01B\x0f\n" + + "\r_payment_hash\"\x8e\x01\n" + + "\x18PeerFeerateTooLowDetails\x124\n" + + "\x17peer_feerate_sat_per_kw\x18\x01 \x01(\rR\x13peerFeerateSatPerKw\x12<\n" + + "\x1brequired_feerate_sat_per_kw\x18\x02 \x01(\rR\x17requiredFeerateSatPerKw\"\x9d\x04\n" + + "\x18ChannelStateChangeReason\x128\n" + + "\x04kind\x18\x01 \x01(\x0e2$.events.ChannelStateChangeReasonKindR\x04kind\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\x12d\n" + + "\x19counterparty_force_closed\x18\x03 \x01(\v2&.events.CounterpartyForceClosedDetailsH\x00R\x17counterpartyForceClosed\x12R\n" + + "\x13holder_force_closed\x18\x04 \x01(\v2 .events.HolderForceClosedDetailsH\x00R\x11holderForceClosed\x12K\n" + + "\x10processing_error\x18\x05 \x01(\v2\x1e.events.ProcessingErrorDetailsH\x00R\x0fprocessingError\x12F\n" + + "\x0fhtlcs_timed_out\x18\x06 \x01(\v2\x1c.events.HtlcsTimedOutDetailsH\x00R\rhtlcsTimedOut\x12S\n" + + "\x14peer_feerate_too_low\x18\a \x01(\v2 .events.PeerFeerateTooLowDetailsH\x00R\x11peerFeerateTooLowB\t\n" + + "\adetails\"\xa6\x03\n" + + "\x13ChannelStateChanged\x12\x1d\n" + + "\n" + + "channel_id\x18\x01 \x01(\tR\tchannelId\x12&\n" + + "\x0fuser_channel_id\x18\x02 \x01(\tR\ruserChannelId\x125\n" + + "\x14counterparty_node_id\x18\x03 \x01(\tH\x00R\x12counterpartyNodeId\x88\x01\x01\x12*\n" + + "\x05state\x18\x04 \x01(\x0e2\x14.events.ChannelStateR\x05state\x12$\n" + + "\vfunding_txo\x18\x05 \x01(\tH\x01R\n" + + "fundingTxo\x88\x01\x01\x12=\n" + + "\x06reason\x18\x06 \x01(\v2 .events.ChannelStateChangeReasonH\x02R\x06reason\x88\x01\x01\x12L\n" + + "\x11closure_initiator\x18\a \x01(\x0e2\x1f.events.ChannelClosureInitiatorR\x10closureInitiatorB\x17\n" + + "\x15_counterparty_node_idB\x0e\n" + + "\f_funding_txoB\t\n" + + "\a_reason\"z\n" + + "\x0fPaymentReceived\x12(\n" + + "\apayment\x18\x01 \x01(\v2\x0e.types.PaymentR\apayment\x12=\n" + + "\x0ecustom_records\x18\x02 \x03(\v2\x16.types.CustomTlvRecordR\rcustomRecords\"=\n" + + "\x11PaymentSuccessful\x12(\n" + + "\apayment\x18\x01 \x01(\v2\x0e.types.PaymentR\apayment\"9\n" + + "\rPaymentFailed\x12(\n" + + "\apayment\x18\x01 \x01(\v2\x0e.types.PaymentR\apayment\"{\n" + + "\x10PaymentClaimable\x12(\n" + + "\apayment\x18\x01 \x01(\v2\x0e.types.PaymentR\apayment\x12=\n" + + "\x0ecustom_records\x18\x02 \x03(\v2\x16.types.CustomTlvRecordR\rcustomRecords\"X\n" + + "\x10PaymentForwarded\x12D\n" + + "\x11forwarded_payment\x18\x01 \x01(\v2\x17.types.ForwardedPaymentR\x10forwardedPayment*\x9a\x01\n" + + "\fChannelState\x12\x1d\n" + + "\x19CHANNEL_STATE_UNSPECIFIED\x10\x00\x12\x19\n" + + "\x15CHANNEL_STATE_PENDING\x10\x01\x12\x17\n" + + "\x13CHANNEL_STATE_READY\x10\x02\x12\x1d\n" + + "\x19CHANNEL_STATE_OPEN_FAILED\x10\x03\x12\x18\n" + + "\x14CHANNEL_STATE_CLOSED\x10\x04*\xb6\x01\n" + + "\x17ChannelClosureInitiator\x12)\n" + + "%CHANNEL_CLOSURE_INITIATOR_UNSPECIFIED\x10\x00\x12#\n" + + "\x1fCHANNEL_CLOSURE_INITIATOR_LOCAL\x10\x01\x12$\n" + + " CHANNEL_CLOSURE_INITIATOR_REMOTE\x10\x02\x12%\n" + + "!CHANNEL_CLOSURE_INITIATOR_UNKNOWN\x10\x03*\x94\b\n" + + "\x1cChannelStateChangeReasonKind\x120\n" + + ",CHANNEL_STATE_CHANGE_REASON_KIND_UNSPECIFIED\x10\x00\x12>\n" + + ":CHANNEL_STATE_CHANGE_REASON_KIND_COUNTERPARTY_FORCE_CLOSED\x10\x01\x128\n" + + "4CHANNEL_STATE_CHANGE_REASON_KIND_HOLDER_FORCE_CLOSED\x10\x02\x12?\n" + + ";CHANNEL_STATE_CHANGE_REASON_KIND_LEGACY_COOPERATIVE_CLOSURE\x10\x03\x12O\n" + + "KCHANNEL_STATE_CHANGE_REASON_KIND_COUNTERPARTY_INITIATED_COOPERATIVE_CLOSURE\x10\x04\x12J\n" + + "FCHANNEL_STATE_CHANGE_REASON_KIND_LOCALLY_INITIATED_COOPERATIVE_CLOSURE\x10\x05\x12<\n" + + "8CHANNEL_STATE_CHANGE_REASON_KIND_COMMITMENT_TX_CONFIRMED\x10\x06\x126\n" + + "2CHANNEL_STATE_CHANGE_REASON_KIND_FUNDING_TIMED_OUT\x10\a\x125\n" + + "1CHANNEL_STATE_CHANGE_REASON_KIND_PROCESSING_ERROR\x10\b\x126\n" + + "2CHANNEL_STATE_CHANGE_REASON_KIND_DISCONNECTED_PEER\x10\t\x12=\n" + + "9CHANNEL_STATE_CHANGE_REASON_KIND_OUTDATED_CHANNEL_MANAGER\x10\n" + + "\x12N\n" + + "JCHANNEL_STATE_CHANGE_REASON_KIND_COUNTERPARTY_COOP_CLOSED_UNFUNDED_CHANNEL\x10\v\x12I\n" + + "ECHANNEL_STATE_CHANGE_REASON_KIND_LOCALLY_COOP_CLOSED_UNFUNDED_CHANNEL\x10\f\x12:\n" + + "6CHANNEL_STATE_CHANGE_REASON_KIND_FUNDING_BATCH_CLOSURE\x10\r\x124\n" + + "0CHANNEL_STATE_CHANGE_REASON_KIND_HTLCS_TIMED_OUT\x10\x0e\x129\n" + + "5CHANNEL_STATE_CHANGE_REASON_KIND_PEER_FEERATE_TOO_LOW\x10\x0fb\x06proto3" + +var ( + file_events_proto_rawDescOnce sync.Once + file_events_proto_rawDescData []byte +) + +func file_events_proto_rawDescGZIP() []byte { + file_events_proto_rawDescOnce.Do(func() { + file_events_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_events_proto_rawDesc), len(file_events_proto_rawDesc))) + }) + return file_events_proto_rawDescData +} + +var file_events_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_events_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_events_proto_goTypes = []any{ + (ChannelState)(0), // 0: events.ChannelState + (ChannelClosureInitiator)(0), // 1: events.ChannelClosureInitiator + (ChannelStateChangeReasonKind)(0), // 2: events.ChannelStateChangeReasonKind + (*EventEnvelope)(nil), // 3: events.EventEnvelope + (*CounterpartyForceClosedDetails)(nil), // 4: events.CounterpartyForceClosedDetails + (*HolderForceClosedDetails)(nil), // 5: events.HolderForceClosedDetails + (*ProcessingErrorDetails)(nil), // 6: events.ProcessingErrorDetails + (*HtlcsTimedOutDetails)(nil), // 7: events.HtlcsTimedOutDetails + (*PeerFeerateTooLowDetails)(nil), // 8: events.PeerFeerateTooLowDetails + (*ChannelStateChangeReason)(nil), // 9: events.ChannelStateChangeReason + (*ChannelStateChanged)(nil), // 10: events.ChannelStateChanged + (*PaymentReceived)(nil), // 11: events.PaymentReceived + (*PaymentSuccessful)(nil), // 12: events.PaymentSuccessful + (*PaymentFailed)(nil), // 13: events.PaymentFailed + (*PaymentClaimable)(nil), // 14: events.PaymentClaimable + (*PaymentForwarded)(nil), // 15: events.PaymentForwarded + (*types.Payment)(nil), // 16: types.Payment + (*types.CustomTlvRecord)(nil), // 17: types.CustomTlvRecord + (*types.ForwardedPayment)(nil), // 18: types.ForwardedPayment +} +var file_events_proto_depIdxs = []int32{ + 11, // 0: events.EventEnvelope.payment_received:type_name -> events.PaymentReceived + 12, // 1: events.EventEnvelope.payment_successful:type_name -> events.PaymentSuccessful + 13, // 2: events.EventEnvelope.payment_failed:type_name -> events.PaymentFailed + 15, // 3: events.EventEnvelope.payment_forwarded:type_name -> events.PaymentForwarded + 14, // 4: events.EventEnvelope.payment_claimable:type_name -> events.PaymentClaimable + 10, // 5: events.EventEnvelope.channel_state_changed:type_name -> events.ChannelStateChanged + 2, // 6: events.ChannelStateChangeReason.kind:type_name -> events.ChannelStateChangeReasonKind + 4, // 7: events.ChannelStateChangeReason.counterparty_force_closed:type_name -> events.CounterpartyForceClosedDetails + 5, // 8: events.ChannelStateChangeReason.holder_force_closed:type_name -> events.HolderForceClosedDetails + 6, // 9: events.ChannelStateChangeReason.processing_error:type_name -> events.ProcessingErrorDetails + 7, // 10: events.ChannelStateChangeReason.htlcs_timed_out:type_name -> events.HtlcsTimedOutDetails + 8, // 11: events.ChannelStateChangeReason.peer_feerate_too_low:type_name -> events.PeerFeerateTooLowDetails + 0, // 12: events.ChannelStateChanged.state:type_name -> events.ChannelState + 9, // 13: events.ChannelStateChanged.reason:type_name -> events.ChannelStateChangeReason + 1, // 14: events.ChannelStateChanged.closure_initiator:type_name -> events.ChannelClosureInitiator + 16, // 15: events.PaymentReceived.payment:type_name -> types.Payment + 17, // 16: events.PaymentReceived.custom_records:type_name -> types.CustomTlvRecord + 16, // 17: events.PaymentSuccessful.payment:type_name -> types.Payment + 16, // 18: events.PaymentFailed.payment:type_name -> types.Payment + 16, // 19: events.PaymentClaimable.payment:type_name -> types.Payment + 17, // 20: events.PaymentClaimable.custom_records:type_name -> types.CustomTlvRecord + 18, // 21: events.PaymentForwarded.forwarded_payment:type_name -> types.ForwardedPayment + 22, // [22:22] is the sub-list for method output_type + 22, // [22:22] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name +} + +func init() { file_events_proto_init() } +func file_events_proto_init() { + if File_events_proto != nil { + return + } + file_events_proto_msgTypes[0].OneofWrappers = []any{ + (*EventEnvelope_PaymentReceived)(nil), + (*EventEnvelope_PaymentSuccessful)(nil), + (*EventEnvelope_PaymentFailed)(nil), + (*EventEnvelope_PaymentForwarded)(nil), + (*EventEnvelope_PaymentClaimable)(nil), + (*EventEnvelope_ChannelStateChanged)(nil), + } + file_events_proto_msgTypes[2].OneofWrappers = []any{} + file_events_proto_msgTypes[4].OneofWrappers = []any{} + file_events_proto_msgTypes[6].OneofWrappers = []any{ + (*ChannelStateChangeReason_CounterpartyForceClosed)(nil), + (*ChannelStateChangeReason_HolderForceClosed)(nil), + (*ChannelStateChangeReason_ProcessingError)(nil), + (*ChannelStateChangeReason_HtlcsTimedOut)(nil), + (*ChannelStateChangeReason_PeerFeerateTooLow)(nil), + } + file_events_proto_msgTypes[7].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_events_proto_rawDesc), len(file_events_proto_rawDesc)), + NumEnums: 3, + NumMessages: 13, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_events_proto_goTypes, + DependencyIndexes: file_events_proto_depIdxs, + EnumInfos: file_events_proto_enumTypes, + MessageInfos: file_events_proto_msgTypes, + }.Build() + File_events_proto = out.File + file_events_proto_goTypes = nil + file_events_proto_depIdxs = nil +} diff --git a/lnclient/ldk-server/grpc/types/types.pb.go b/lnclient/ldk-server/grpc/types/types.pb.go new file mode 100644 index 000000000..6f1c2e068 --- /dev/null +++ b/lnclient/ldk-server/grpc/types/types.pb.go @@ -0,0 +1,4759 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v3.21.12 +// source: types.proto + +package types + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents the direction of a payment. +type PaymentDirection int32 + +const ( + // The payment is inbound. + PaymentDirection_INBOUND PaymentDirection = 0 + // The payment is outbound. + PaymentDirection_OUTBOUND PaymentDirection = 1 +) + +// Enum value maps for PaymentDirection. +var ( + PaymentDirection_name = map[int32]string{ + 0: "INBOUND", + 1: "OUTBOUND", + } + PaymentDirection_value = map[string]int32{ + "INBOUND": 0, + "OUTBOUND": 1, + } +) + +func (x PaymentDirection) Enum() *PaymentDirection { + p := new(PaymentDirection) + *p = x + return p +} + +func (x PaymentDirection) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PaymentDirection) Descriptor() protoreflect.EnumDescriptor { + return file_types_proto_enumTypes[0].Descriptor() +} + +func (PaymentDirection) Type() protoreflect.EnumType { + return &file_types_proto_enumTypes[0] +} + +func (x PaymentDirection) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PaymentDirection.Descriptor instead. +func (PaymentDirection) EnumDescriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{0} +} + +// Represents the current status of a payment. +type PaymentStatus int32 + +const ( + // The payment is still pending. + PaymentStatus_PENDING PaymentStatus = 0 + // The payment succeeded. + PaymentStatus_SUCCEEDED PaymentStatus = 1 + // The payment failed. + PaymentStatus_FAILED PaymentStatus = 2 +) + +// Enum value maps for PaymentStatus. +var ( + PaymentStatus_name = map[int32]string{ + 0: "PENDING", + 1: "SUCCEEDED", + 2: "FAILED", + } + PaymentStatus_value = map[string]int32{ + "PENDING": 0, + "SUCCEEDED": 1, + "FAILED": 2, + } +) + +func (x PaymentStatus) Enum() *PaymentStatus { + p := new(PaymentStatus) + *p = x + return p +} + +func (x PaymentStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PaymentStatus) Descriptor() protoreflect.EnumDescriptor { + return file_types_proto_enumTypes[1].Descriptor() +} + +func (PaymentStatus) Type() protoreflect.EnumType { + return &file_types_proto_enumTypes[1] +} + +func (x PaymentStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PaymentStatus.Descriptor instead. +func (PaymentStatus) EnumDescriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{1} +} + +// The Bitcoin network the node is running on. +type Network int32 + +const ( + // Mainnet Bitcoin. + Network_BITCOIN Network = 0 + // Bitcoin's testnet (testnet3) network. + Network_TESTNET Network = 1 + // Bitcoin's testnet4 network. + Network_TESTNET4 Network = 2 + // Bitcoin's signet network. + Network_SIGNET Network = 3 + // Bitcoin's regtest network. + Network_REGTEST Network = 4 +) + +// Enum value maps for Network. +var ( + Network_name = map[int32]string{ + 0: "BITCOIN", + 1: "TESTNET", + 2: "TESTNET4", + 3: "SIGNET", + 4: "REGTEST", + } + Network_value = map[string]int32{ + "BITCOIN": 0, + "TESTNET": 1, + "TESTNET4": 2, + "SIGNET": 3, + "REGTEST": 4, + } +) + +func (x Network) Enum() *Network { + p := new(Network) + *p = x + return p +} + +func (x Network) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Network) Descriptor() protoreflect.EnumDescriptor { + return file_types_proto_enumTypes[2].Descriptor() +} + +func (Network) Type() protoreflect.EnumType { + return &file_types_proto_enumTypes[2] +} + +func (x Network) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Network.Descriptor instead. +func (Network) EnumDescriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{2} +} + +// Indicates whether the balance is derived from a cooperative close, a force-close (for holder or counterparty), +// or whether it is for an HTLC. +type BalanceSource int32 + +const ( + // The channel was force closed by the holder. + BalanceSource_HOLDER_FORCE_CLOSED BalanceSource = 0 + // The channel was force closed by the counterparty. + BalanceSource_COUNTERPARTY_FORCE_CLOSED BalanceSource = 1 + // The channel was cooperatively closed. + BalanceSource_COOP_CLOSE BalanceSource = 2 + // This balance is the result of an HTLC. + BalanceSource_HTLC BalanceSource = 3 +) + +// Enum value maps for BalanceSource. +var ( + BalanceSource_name = map[int32]string{ + 0: "HOLDER_FORCE_CLOSED", + 1: "COUNTERPARTY_FORCE_CLOSED", + 2: "COOP_CLOSE", + 3: "HTLC", + } + BalanceSource_value = map[string]int32{ + "HOLDER_FORCE_CLOSED": 0, + "COUNTERPARTY_FORCE_CLOSED": 1, + "COOP_CLOSE": 2, + "HTLC": 3, + } +) + +func (x BalanceSource) Enum() *BalanceSource { + p := new(BalanceSource) + *p = x + return p +} + +func (x BalanceSource) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BalanceSource) Descriptor() protoreflect.EnumDescriptor { + return file_types_proto_enumTypes[3].Descriptor() +} + +func (BalanceSource) Type() protoreflect.EnumType { + return &file_types_proto_enumTypes[3] +} + +func (x BalanceSource) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BalanceSource.Descriptor instead. +func (BalanceSource) EnumDescriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{3} +} + +// Identifies one of the two endpoints of a channel, by lexicographic order of +// node ids. +type ChannelDirection int32 + +const ( + // The endpoint whose node id is lexicographically smaller. + ChannelDirection_NODE_ONE ChannelDirection = 0 + // The endpoint whose node id is lexicographically greater. + ChannelDirection_NODE_TWO ChannelDirection = 1 +) + +// Enum value maps for ChannelDirection. +var ( + ChannelDirection_name = map[int32]string{ + 0: "NODE_ONE", + 1: "NODE_TWO", + } + ChannelDirection_value = map[string]int32{ + "NODE_ONE": 0, + "NODE_TWO": 1, + } +) + +func (x ChannelDirection) Enum() *ChannelDirection { + p := new(ChannelDirection) + *p = x + return p +} + +func (x ChannelDirection) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ChannelDirection) Descriptor() protoreflect.EnumDescriptor { + return file_types_proto_enumTypes[4].Descriptor() +} + +func (ChannelDirection) Type() protoreflect.EnumType { + return &file_types_proto_enumTypes[4] +} + +func (x ChannelDirection) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ChannelDirection.Descriptor instead. +func (ChannelDirection) EnumDescriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{4} +} + +// Represents a payment. +// See more: https://docs.rs/ldk-node/latest/ldk_node/payment/struct.PaymentDetails.html +type Payment struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An identifier used to uniquely identify a payment in hex-encoded form. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The kind of the payment. + Kind *PaymentKind `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + // The amount transferred. + AmountMsat *uint64 `protobuf:"varint,3,opt,name=amount_msat,json=amountMsat,proto3,oneof" json:"amount_msat,omitempty"` + // The fees that were paid for this payment. + // + // For Lightning payments, this will only be updated for outbound payments once they + // succeeded. + FeePaidMsat *uint64 `protobuf:"varint,7,opt,name=fee_paid_msat,json=feePaidMsat,proto3,oneof" json:"fee_paid_msat,omitempty"` + // The direction of the payment. + Direction PaymentDirection `protobuf:"varint,4,opt,name=direction,proto3,enum=types.PaymentDirection" json:"direction,omitempty"` + // The status of the payment. + Status PaymentStatus `protobuf:"varint,5,opt,name=status,proto3,enum=types.PaymentStatus" json:"status,omitempty"` + // The timestamp, in seconds since start of the UNIX epoch, when this entry was last updated. + LatestUpdateTimestamp uint64 `protobuf:"varint,6,opt,name=latest_update_timestamp,json=latestUpdateTimestamp,proto3" json:"latest_update_timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Payment) Reset() { + *x = Payment{} + mi := &file_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Payment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Payment) ProtoMessage() {} + +func (x *Payment) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Payment.ProtoReflect.Descriptor instead. +func (*Payment) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{0} +} + +func (x *Payment) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Payment) GetKind() *PaymentKind { + if x != nil { + return x.Kind + } + return nil +} + +func (x *Payment) GetAmountMsat() uint64 { + if x != nil && x.AmountMsat != nil { + return *x.AmountMsat + } + return 0 +} + +func (x *Payment) GetFeePaidMsat() uint64 { + if x != nil && x.FeePaidMsat != nil { + return *x.FeePaidMsat + } + return 0 +} + +func (x *Payment) GetDirection() PaymentDirection { + if x != nil { + return x.Direction + } + return PaymentDirection_INBOUND +} + +func (x *Payment) GetStatus() PaymentStatus { + if x != nil { + return x.Status + } + return PaymentStatus_PENDING +} + +func (x *Payment) GetLatestUpdateTimestamp() uint64 { + if x != nil { + return x.LatestUpdateTimestamp + } + return 0 +} + +type PaymentKind struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Kind: + // + // *PaymentKind_Onchain + // *PaymentKind_Bolt11 + // *PaymentKind_Bolt12Offer + // *PaymentKind_Bolt12Refund + // *PaymentKind_Spontaneous + Kind isPaymentKind_Kind `protobuf_oneof:"kind"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PaymentKind) Reset() { + *x = PaymentKind{} + mi := &file_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PaymentKind) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaymentKind) ProtoMessage() {} + +func (x *PaymentKind) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PaymentKind.ProtoReflect.Descriptor instead. +func (*PaymentKind) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{1} +} + +func (x *PaymentKind) GetKind() isPaymentKind_Kind { + if x != nil { + return x.Kind + } + return nil +} + +func (x *PaymentKind) GetOnchain() *Onchain { + if x != nil { + if x, ok := x.Kind.(*PaymentKind_Onchain); ok { + return x.Onchain + } + } + return nil +} + +func (x *PaymentKind) GetBolt11() *Bolt11 { + if x != nil { + if x, ok := x.Kind.(*PaymentKind_Bolt11); ok { + return x.Bolt11 + } + } + return nil +} + +func (x *PaymentKind) GetBolt12Offer() *Bolt12Offer { + if x != nil { + if x, ok := x.Kind.(*PaymentKind_Bolt12Offer); ok { + return x.Bolt12Offer + } + } + return nil +} + +func (x *PaymentKind) GetBolt12Refund() *Bolt12Refund { + if x != nil { + if x, ok := x.Kind.(*PaymentKind_Bolt12Refund); ok { + return x.Bolt12Refund + } + } + return nil +} + +func (x *PaymentKind) GetSpontaneous() *Spontaneous { + if x != nil { + if x, ok := x.Kind.(*PaymentKind_Spontaneous); ok { + return x.Spontaneous + } + } + return nil +} + +type isPaymentKind_Kind interface { + isPaymentKind_Kind() +} + +type PaymentKind_Onchain struct { + Onchain *Onchain `protobuf:"bytes,1,opt,name=onchain,proto3,oneof"` +} + +type PaymentKind_Bolt11 struct { + Bolt11 *Bolt11 `protobuf:"bytes,2,opt,name=bolt11,proto3,oneof"` +} + +type PaymentKind_Bolt12Offer struct { + Bolt12Offer *Bolt12Offer `protobuf:"bytes,3,opt,name=bolt12_offer,json=bolt12Offer,proto3,oneof"` +} + +type PaymentKind_Bolt12Refund struct { + Bolt12Refund *Bolt12Refund `protobuf:"bytes,4,opt,name=bolt12_refund,json=bolt12Refund,proto3,oneof"` +} + +type PaymentKind_Spontaneous struct { + Spontaneous *Spontaneous `protobuf:"bytes,5,opt,name=spontaneous,proto3,oneof"` +} + +func (*PaymentKind_Onchain) isPaymentKind_Kind() {} + +func (*PaymentKind_Bolt11) isPaymentKind_Kind() {} + +func (*PaymentKind_Bolt12Offer) isPaymentKind_Kind() {} + +func (*PaymentKind_Bolt12Refund) isPaymentKind_Kind() {} + +func (*PaymentKind_Spontaneous) isPaymentKind_Kind() {} + +// Represents an on-chain payment. +type Onchain struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The transaction identifier of this payment. + Txid string `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"` + // The confirmation status of this payment. + Status *ConfirmationStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Onchain) Reset() { + *x = Onchain{} + mi := &file_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Onchain) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Onchain) ProtoMessage() {} + +func (x *Onchain) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Onchain.ProtoReflect.Descriptor instead. +func (*Onchain) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{2} +} + +func (x *Onchain) GetTxid() string { + if x != nil { + return x.Txid + } + return "" +} + +func (x *Onchain) GetStatus() *ConfirmationStatus { + if x != nil { + return x.Status + } + return nil +} + +type ConfirmationStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Status: + // + // *ConfirmationStatus_Confirmed + // *ConfirmationStatus_Unconfirmed + Status isConfirmationStatus_Status `protobuf_oneof:"status"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfirmationStatus) Reset() { + *x = ConfirmationStatus{} + mi := &file_types_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfirmationStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfirmationStatus) ProtoMessage() {} + +func (x *ConfirmationStatus) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfirmationStatus.ProtoReflect.Descriptor instead. +func (*ConfirmationStatus) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{3} +} + +func (x *ConfirmationStatus) GetStatus() isConfirmationStatus_Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *ConfirmationStatus) GetConfirmed() *Confirmed { + if x != nil { + if x, ok := x.Status.(*ConfirmationStatus_Confirmed); ok { + return x.Confirmed + } + } + return nil +} + +func (x *ConfirmationStatus) GetUnconfirmed() *Unconfirmed { + if x != nil { + if x, ok := x.Status.(*ConfirmationStatus_Unconfirmed); ok { + return x.Unconfirmed + } + } + return nil +} + +type isConfirmationStatus_Status interface { + isConfirmationStatus_Status() +} + +type ConfirmationStatus_Confirmed struct { + Confirmed *Confirmed `protobuf:"bytes,1,opt,name=confirmed,proto3,oneof"` +} + +type ConfirmationStatus_Unconfirmed struct { + Unconfirmed *Unconfirmed `protobuf:"bytes,2,opt,name=unconfirmed,proto3,oneof"` +} + +func (*ConfirmationStatus_Confirmed) isConfirmationStatus_Status() {} + +func (*ConfirmationStatus_Unconfirmed) isConfirmationStatus_Status() {} + +// The on-chain transaction is confirmed in the best chain. +type Confirmed struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The hex representation of hash of the block in which the transaction was confirmed. + BlockHash string `protobuf:"bytes,1,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + // The height under which the block was confirmed. + Height uint32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` + // The timestamp, in seconds since start of the UNIX epoch, when this entry was last updated. + Timestamp uint64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Confirmed) Reset() { + *x = Confirmed{} + mi := &file_types_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Confirmed) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Confirmed) ProtoMessage() {} + +func (x *Confirmed) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Confirmed.ProtoReflect.Descriptor instead. +func (*Confirmed) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{4} +} + +func (x *Confirmed) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *Confirmed) GetHeight() uint32 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *Confirmed) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +// The on-chain transaction is unconfirmed. +type Unconfirmed struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Unconfirmed) Reset() { + *x = Unconfirmed{} + mi := &file_types_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Unconfirmed) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Unconfirmed) ProtoMessage() {} + +func (x *Unconfirmed) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Unconfirmed.ProtoReflect.Descriptor instead. +func (*Unconfirmed) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{5} +} + +// Represents a BOLT 11 payment. +type Bolt11 struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The payment hash, i.e., the hash of the preimage. + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // The pre-image used by the payment. + Preimage *string `protobuf:"bytes,2,opt,name=preimage,proto3,oneof" json:"preimage,omitempty"` + // The secret used by the payment. + Secret []byte `protobuf:"bytes,3,opt,name=secret,proto3,oneof" json:"secret,omitempty"` + // The value, in thousands of a satoshi, that was deducted from this payment as an extra + // fee taken by our channel counterparty. + // + // Will only ever be `Some` for inbound payments received via an [bLIP-52 / LSPS 2] + // just-in-time channel, and only after the payment is observed; `None` otherwise. + // + // [bLIP-52 / LSPS 2]: https://github.com/lightning/blips/blob/master/blip-0052.md + CounterpartySkimmedFeeMsat *uint64 `protobuf:"varint,4,opt,name=counterparty_skimmed_fee_msat,json=counterpartySkimmedFeeMsat,proto3,oneof" json:"counterparty_skimmed_fee_msat,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11) Reset() { + *x = Bolt11{} + mi := &file_types_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11) ProtoMessage() {} + +func (x *Bolt11) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11.ProtoReflect.Descriptor instead. +func (*Bolt11) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{6} +} + +func (x *Bolt11) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *Bolt11) GetPreimage() string { + if x != nil && x.Preimage != nil { + return *x.Preimage + } + return "" +} + +func (x *Bolt11) GetSecret() []byte { + if x != nil { + return x.Secret + } + return nil +} + +func (x *Bolt11) GetCounterpartySkimmedFeeMsat() uint64 { + if x != nil && x.CounterpartySkimmedFeeMsat != nil { + return *x.CounterpartySkimmedFeeMsat + } + return 0 +} + +// Represents a BOLT 12 ‘offer’ payment, i.e., a payment for an Offer. +type Bolt12Offer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The payment hash, i.e., the hash of the preimage. + Hash *string `protobuf:"bytes,1,opt,name=hash,proto3,oneof" json:"hash,omitempty"` + // The pre-image used by the payment. + Preimage *string `protobuf:"bytes,2,opt,name=preimage,proto3,oneof" json:"preimage,omitempty"` + // The secret used by the payment. + Secret []byte `protobuf:"bytes,3,opt,name=secret,proto3,oneof" json:"secret,omitempty"` + // The hex-encoded ID of the offer this payment is for. + OfferId string `protobuf:"bytes,4,opt,name=offer_id,json=offerId,proto3" json:"offer_id,omitempty"` + // The payer's note for the payment. + // Truncated to [PAYER_NOTE_LIMIT](https://docs.rs/lightning/latest/lightning/offers/invoice_request/constant.PAYER_NOTE_LIMIT.html). + // + // **Caution**: The `payer_note` field may come from an untrusted source. To prevent potential misuse, + // all non-printable characters will be sanitized and replaced with safe characters. + PayerNote *string `protobuf:"bytes,5,opt,name=payer_note,json=payerNote,proto3,oneof" json:"payer_note,omitempty"` + // The quantity of an item requested in the offer. + Quantity *uint64 `protobuf:"varint,6,opt,name=quantity,proto3,oneof" json:"quantity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt12Offer) Reset() { + *x = Bolt12Offer{} + mi := &file_types_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt12Offer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt12Offer) ProtoMessage() {} + +func (x *Bolt12Offer) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt12Offer.ProtoReflect.Descriptor instead. +func (*Bolt12Offer) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{7} +} + +func (x *Bolt12Offer) GetHash() string { + if x != nil && x.Hash != nil { + return *x.Hash + } + return "" +} + +func (x *Bolt12Offer) GetPreimage() string { + if x != nil && x.Preimage != nil { + return *x.Preimage + } + return "" +} + +func (x *Bolt12Offer) GetSecret() []byte { + if x != nil { + return x.Secret + } + return nil +} + +func (x *Bolt12Offer) GetOfferId() string { + if x != nil { + return x.OfferId + } + return "" +} + +func (x *Bolt12Offer) GetPayerNote() string { + if x != nil && x.PayerNote != nil { + return *x.PayerNote + } + return "" +} + +func (x *Bolt12Offer) GetQuantity() uint64 { + if x != nil && x.Quantity != nil { + return *x.Quantity + } + return 0 +} + +// Represents a BOLT 12 ‘refund’ payment, i.e., a payment for a Refund. +type Bolt12Refund struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The payment hash, i.e., the hash of the preimage. + Hash *string `protobuf:"bytes,1,opt,name=hash,proto3,oneof" json:"hash,omitempty"` + // The pre-image used by the payment. + Preimage *string `protobuf:"bytes,2,opt,name=preimage,proto3,oneof" json:"preimage,omitempty"` + // The secret used by the payment. + Secret []byte `protobuf:"bytes,3,opt,name=secret,proto3,oneof" json:"secret,omitempty"` + // The payer's note for the payment. + // Truncated to [PAYER_NOTE_LIMIT](https://docs.rs/lightning/latest/lightning/offers/invoice_request/constant.PAYER_NOTE_LIMIT.html). + // + // **Caution**: The `payer_note` field may come from an untrusted source. To prevent potential misuse, + // all non-printable characters will be sanitized and replaced with safe characters. + PayerNote *string `protobuf:"bytes,5,opt,name=payer_note,json=payerNote,proto3,oneof" json:"payer_note,omitempty"` + // The quantity of an item requested in the offer. + Quantity *uint64 `protobuf:"varint,6,opt,name=quantity,proto3,oneof" json:"quantity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt12Refund) Reset() { + *x = Bolt12Refund{} + mi := &file_types_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt12Refund) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt12Refund) ProtoMessage() {} + +func (x *Bolt12Refund) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt12Refund.ProtoReflect.Descriptor instead. +func (*Bolt12Refund) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{8} +} + +func (x *Bolt12Refund) GetHash() string { + if x != nil && x.Hash != nil { + return *x.Hash + } + return "" +} + +func (x *Bolt12Refund) GetPreimage() string { + if x != nil && x.Preimage != nil { + return *x.Preimage + } + return "" +} + +func (x *Bolt12Refund) GetSecret() []byte { + if x != nil { + return x.Secret + } + return nil +} + +func (x *Bolt12Refund) GetPayerNote() string { + if x != nil && x.PayerNote != nil { + return *x.PayerNote + } + return "" +} + +func (x *Bolt12Refund) GetQuantity() uint64 { + if x != nil && x.Quantity != nil { + return *x.Quantity + } + return 0 +} + +// Represents a spontaneous (“keysend”) payment. +type Spontaneous struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The payment hash, i.e., the hash of the preimage. + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // The pre-image used by the payment. + Preimage *string `protobuf:"bytes,2,opt,name=preimage,proto3,oneof" json:"preimage,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Spontaneous) Reset() { + *x = Spontaneous{} + mi := &file_types_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Spontaneous) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Spontaneous) ProtoMessage() {} + +func (x *Spontaneous) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Spontaneous.ProtoReflect.Descriptor instead. +func (*Spontaneous) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{9} +} + +func (x *Spontaneous) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *Spontaneous) GetPreimage() string { + if x != nil && x.Preimage != nil { + return *x.Preimage + } + return "" +} + +// Limits applying to how much fee we allow an LSP to deduct from the payment amount. +// See [`LdkChannelConfig::accept_underpaying_htlcs`] for more information. +// +// [`LdkChannelConfig::accept_underpaying_htlcs`]: lightning::util::config::ChannelConfig::accept_underpaying_htlcs +type LSPFeeLimits struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The maximal total amount we allow any configured LSP withhold from us when forwarding the + // payment. + MaxTotalOpeningFeeMsat *uint64 `protobuf:"varint,1,opt,name=max_total_opening_fee_msat,json=maxTotalOpeningFeeMsat,proto3,oneof" json:"max_total_opening_fee_msat,omitempty"` + // The maximal proportional fee, in parts-per-million millisatoshi, we allow any configured + // LSP withhold from us when forwarding the payment. + MaxProportionalOpeningFeePpmMsat *uint64 `protobuf:"varint,2,opt,name=max_proportional_opening_fee_ppm_msat,json=maxProportionalOpeningFeePpmMsat,proto3,oneof" json:"max_proportional_opening_fee_ppm_msat,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LSPFeeLimits) Reset() { + *x = LSPFeeLimits{} + mi := &file_types_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LSPFeeLimits) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LSPFeeLimits) ProtoMessage() {} + +func (x *LSPFeeLimits) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LSPFeeLimits.ProtoReflect.Descriptor instead. +func (*LSPFeeLimits) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{10} +} + +func (x *LSPFeeLimits) GetMaxTotalOpeningFeeMsat() uint64 { + if x != nil && x.MaxTotalOpeningFeeMsat != nil { + return *x.MaxTotalOpeningFeeMsat + } + return 0 +} + +func (x *LSPFeeLimits) GetMaxProportionalOpeningFeePpmMsat() uint64 { + if x != nil && x.MaxProportionalOpeningFeePpmMsat != nil { + return *x.MaxProportionalOpeningFeePpmMsat + } + return 0 +} + +// Identifies the channel and counterparty that an HTLC was processed with. +type HtlcLocator struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The channel that the HTLC was sent or received on. + ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + // The `user_channel_id` for the channel. + // This can be unset for older serialized events or if the payment was settled on-chain. + UserChannelId *string `protobuf:"bytes,2,opt,name=user_channel_id,json=userChannelId,proto3,oneof" json:"user_channel_id,omitempty"` + // The node id of the counterparty for this HTLC. + // This can be unset for older serialized events. + NodeId *string `protobuf:"bytes,3,opt,name=node_id,json=nodeId,proto3,oneof" json:"node_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HtlcLocator) Reset() { + *x = HtlcLocator{} + mi := &file_types_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HtlcLocator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HtlcLocator) ProtoMessage() {} + +func (x *HtlcLocator) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HtlcLocator.ProtoReflect.Descriptor instead. +func (*HtlcLocator) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{11} +} + +func (x *HtlcLocator) GetChannelId() string { + if x != nil { + return x.ChannelId + } + return "" +} + +func (x *HtlcLocator) GetUserChannelId() string { + if x != nil && x.UserChannelId != nil { + return *x.UserChannelId + } + return "" +} + +func (x *HtlcLocator) GetNodeId() string { + if x != nil && x.NodeId != nil { + return *x.NodeId + } + return "" +} + +// A forwarded payment through our node. +// +// A forwarded payment can involve multiple incoming and outgoing HTLCs, e.g. when acting as a +// trampoline router. The `prev_htlcs` and `next_htlcs` fields are the canonical representation of +// the HTLCs associated with this forwarding event. Their indices do not imply pairwise +// correspondence. +// +// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.Event.html#variant.PaymentForwarded +type ForwardedPayment struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The total fee, in milli-satoshis, which was earned as a result of the payment. + // + // Note that if we force-closed the channel over which we forwarded an HTLC while the HTLC was pending, the amount the + // next hop claimed will have been rounded down to the nearest whole satoshi. Thus, the fee calculated here may be + // higher than expected as we still claimed the full value in millisatoshis from the source. + // In this case, `claim_from_onchain_tx` will be set. + // + // If the channel which sent us the payment has been force-closed, we will claim the funds via an on-chain transaction. + // In that case we do not yet know the on-chain transaction fees which we will spend and will instead set this to `None`. + TotalFeeEarnedMsat *uint64 `protobuf:"varint,1,opt,name=total_fee_earned_msat,json=totalFeeEarnedMsat,proto3,oneof" json:"total_fee_earned_msat,omitempty"` + // The share of the total fee, in milli-satoshis, which was withheld in addition to the forwarding fee. + // This will only be set if we forwarded an intercepted HTLC with less than the expected amount. This means our + // counterparty accepted to receive less than the invoice amount. + // + // The caveat described above the `total_fee_earned_msat` field applies here as well. + SkimmedFeeMsat *uint64 `protobuf:"varint,2,opt,name=skimmed_fee_msat,json=skimmedFeeMsat,proto3,oneof" json:"skimmed_fee_msat,omitempty"` + // If this is true, the forwarded HTLC was claimed by our counterparty via an on-chain transaction. + ClaimFromOnchainTx bool `protobuf:"varint,3,opt,name=claim_from_onchain_tx,json=claimFromOnchainTx,proto3" json:"claim_from_onchain_tx,omitempty"` + // The final amount forwarded, in milli-satoshis, after the fee is deducted. + // + // The caveat described above the `total_fee_earned_msat` field applies here as well. + OutboundAmountForwardedMsat *uint64 `protobuf:"varint,4,opt,name=outbound_amount_forwarded_msat,json=outboundAmountForwardedMsat,proto3,oneof" json:"outbound_amount_forwarded_msat,omitempty"` + // The set of incoming HTLCs forwarded to our node that will be claimed by this forward. + // This is the canonical incoming HTLC representation. + PrevHtlcs []*HtlcLocator `protobuf:"bytes,5,rep,name=prev_htlcs,json=prevHtlcs,proto3" json:"prev_htlcs,omitempty"` + // The set of outgoing HTLCs forwarded by our node that have been claimed by this forward. + // This is the canonical outgoing HTLC representation. + NextHtlcs []*HtlcLocator `protobuf:"bytes,6,rep,name=next_htlcs,json=nextHtlcs,proto3" json:"next_htlcs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ForwardedPayment) Reset() { + *x = ForwardedPayment{} + mi := &file_types_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ForwardedPayment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ForwardedPayment) ProtoMessage() {} + +func (x *ForwardedPayment) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ForwardedPayment.ProtoReflect.Descriptor instead. +func (*ForwardedPayment) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{12} +} + +func (x *ForwardedPayment) GetTotalFeeEarnedMsat() uint64 { + if x != nil && x.TotalFeeEarnedMsat != nil { + return *x.TotalFeeEarnedMsat + } + return 0 +} + +func (x *ForwardedPayment) GetSkimmedFeeMsat() uint64 { + if x != nil && x.SkimmedFeeMsat != nil { + return *x.SkimmedFeeMsat + } + return 0 +} + +func (x *ForwardedPayment) GetClaimFromOnchainTx() bool { + if x != nil { + return x.ClaimFromOnchainTx + } + return false +} + +func (x *ForwardedPayment) GetOutboundAmountForwardedMsat() uint64 { + if x != nil && x.OutboundAmountForwardedMsat != nil { + return *x.OutboundAmountForwardedMsat + } + return 0 +} + +func (x *ForwardedPayment) GetPrevHtlcs() []*HtlcLocator { + if x != nil { + return x.PrevHtlcs + } + return nil +} + +func (x *ForwardedPayment) GetNextHtlcs() []*HtlcLocator { + if x != nil { + return x.NextHtlcs + } + return nil +} + +type Channel struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The channel ID (prior to funding transaction generation, this is a random 32-byte + // identifier, afterwards this is the transaction ID of the funding transaction XOR the + // funding transaction output). + // + // Note that this means this value is *not* persistent - it can change once during the + // lifetime of the channel. + ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + // The node ID of our the channel's remote counterparty. + CounterpartyNodeId string `protobuf:"bytes,2,opt,name=counterparty_node_id,json=counterpartyNodeId,proto3" json:"counterparty_node_id,omitempty"` + // The channel's funding transaction output, if we've negotiated the funding transaction with + // our counterparty already. + FundingTxo *OutPoint `protobuf:"bytes,3,opt,name=funding_txo,json=fundingTxo,proto3,oneof" json:"funding_txo,omitempty"` + // The hex-encoded local `user_channel_id` of this channel. + UserChannelId string `protobuf:"bytes,4,opt,name=user_channel_id,json=userChannelId,proto3" json:"user_channel_id,omitempty"` + // The value, in satoshis, that must always be held as a reserve in the channel for us. This + // value ensures that if we broadcast a revoked state, our counterparty can punish us by + // claiming at least this value on chain. + // + // This value is not included in [`outbound_capacity_msat`] as it can never be spent. + // + // This value will be `None` for outbound channels until the counterparty accepts the channel. + UnspendablePunishmentReserve *uint64 `protobuf:"varint,5,opt,name=unspendable_punishment_reserve,json=unspendablePunishmentReserve,proto3,oneof" json:"unspendable_punishment_reserve,omitempty"` + // The value, in satoshis, of this channel as it appears in the funding output. + ChannelValueSats uint64 `protobuf:"varint,6,opt,name=channel_value_sats,json=channelValueSats,proto3" json:"channel_value_sats,omitempty"` + // The currently negotiated fee rate denominated in satoshi per 1000 weight units, + // which is applied to commitment and HTLC transactions. + FeerateSatPer_1000Weight uint32 `protobuf:"varint,7,opt,name=feerate_sat_per_1000_weight,json=feerateSatPer1000Weight,proto3" json:"feerate_sat_per_1000_weight,omitempty"` + // The available outbound capacity for sending HTLCs to the remote peer. + // + // The amount does not include any pending HTLCs which are not yet resolved (and, thus, whose + // balance is not available for inclusion in new outbound HTLCs). This further does not include + // any pending outgoing HTLCs which are awaiting some other resolution to be sent. + OutboundCapacityMsat uint64 `protobuf:"varint,8,opt,name=outbound_capacity_msat,json=outboundCapacityMsat,proto3" json:"outbound_capacity_msat,omitempty"` + // The available outbound capacity for sending HTLCs to the remote peer. + // + // The amount does not include any pending HTLCs which are not yet resolved + // (and, thus, whose balance is not available for inclusion in new inbound HTLCs). This further + // does not include any pending outgoing HTLCs which are awaiting some other resolution to be + // sent. + InboundCapacityMsat uint64 `protobuf:"varint,9,opt,name=inbound_capacity_msat,json=inboundCapacityMsat,proto3" json:"inbound_capacity_msat,omitempty"` + // The number of required confirmations on the funding transactions before the funding is + // considered "locked". The amount is selected by the channel fundee. + // + // The value will be `None` for outbound channels until the counterparty accepts the channel. + ConfirmationsRequired *uint32 `protobuf:"varint,10,opt,name=confirmations_required,json=confirmationsRequired,proto3,oneof" json:"confirmations_required,omitempty"` + // The current number of confirmations on the funding transaction. + Confirmations *uint32 `protobuf:"varint,11,opt,name=confirmations,proto3,oneof" json:"confirmations,omitempty"` + // Is `true` if the channel was initiated (and therefore funded) by us. + IsOutbound bool `protobuf:"varint,12,opt,name=is_outbound,json=isOutbound,proto3" json:"is_outbound,omitempty"` + // Is `true` if both parties have exchanged `channel_ready` messages, and the channel is + // not currently being shut down. Both parties exchange `channel_ready` messages upon + // independently verifying that the required confirmations count provided by + // `confirmations_required` has been reached. + IsChannelReady bool `protobuf:"varint,13,opt,name=is_channel_ready,json=isChannelReady,proto3" json:"is_channel_ready,omitempty"` + // Is `true` if the channel (a) `channel_ready` messages have been exchanged, (b) the + // peer is connected, and (c) the channel is not currently negotiating shutdown. + // + // This is a strict superset of `is_channel_ready`. + IsUsable bool `protobuf:"varint,14,opt,name=is_usable,json=isUsable,proto3" json:"is_usable,omitempty"` + // Is `true` if this channel is (or will be) publicly-announced + IsAnnounced bool `protobuf:"varint,15,opt,name=is_announced,json=isAnnounced,proto3" json:"is_announced,omitempty"` + // Set of configurable parameters set by self that affect channel operation. + ChannelConfig *ChannelConfig `protobuf:"bytes,16,opt,name=channel_config,json=channelConfig,proto3" json:"channel_config,omitempty"` + // The available outbound capacity for sending a single HTLC to the remote peer. This is + // similar to `outbound_capacity_msat` but it may be further restricted by + // the current state and per-HTLC limit(s). This is intended for use when routing, allowing us + // to use a limit as close as possible to the HTLC limit we can currently send. + NextOutboundHtlcLimitMsat uint64 `protobuf:"varint,17,opt,name=next_outbound_htlc_limit_msat,json=nextOutboundHtlcLimitMsat,proto3" json:"next_outbound_htlc_limit_msat,omitempty"` + // The minimum value for sending a single HTLC to the remote peer. This is the equivalent of + // `next_outbound_htlc_limit_msat` but represents a lower-bound, rather than + // an upper-bound. This is intended for use when routing, allowing us to ensure we pick a + // route which is valid. + NextOutboundHtlcMinimumMsat uint64 `protobuf:"varint,18,opt,name=next_outbound_htlc_minimum_msat,json=nextOutboundHtlcMinimumMsat,proto3" json:"next_outbound_htlc_minimum_msat,omitempty"` + // The number of blocks (after our commitment transaction confirms) that we will need to wait + // until we can claim our funds after we force-close the channel. During this time our + // counterparty is allowed to punish us if we broadcasted a stale state. If our counterparty + // force-closes the channel and broadcasts a commitment transaction we do not have to wait any + // time to claim our non-HTLC-encumbered funds. + // + // This value will be `None` for outbound channels until the counterparty accepts the channel. + ForceCloseSpendDelay *uint32 `protobuf:"varint,19,opt,name=force_close_spend_delay,json=forceCloseSpendDelay,proto3,oneof" json:"force_close_spend_delay,omitempty"` + // The smallest value HTLC (in msat) the remote peer will accept, for this channel. + // + // This field is only `None` before we have received either the `OpenChannel` or + // `AcceptChannel` message from the remote peer. + CounterpartyOutboundHtlcMinimumMsat *uint64 `protobuf:"varint,20,opt,name=counterparty_outbound_htlc_minimum_msat,json=counterpartyOutboundHtlcMinimumMsat,proto3,oneof" json:"counterparty_outbound_htlc_minimum_msat,omitempty"` + // The largest value HTLC (in msat) the remote peer currently will accept, for this channel. + CounterpartyOutboundHtlcMaximumMsat *uint64 `protobuf:"varint,21,opt,name=counterparty_outbound_htlc_maximum_msat,json=counterpartyOutboundHtlcMaximumMsat,proto3,oneof" json:"counterparty_outbound_htlc_maximum_msat,omitempty"` + // The value, in satoshis, that must always be held in the channel for our counterparty. This + // value ensures that if our counterparty broadcasts a revoked state, we can punish them by + // claiming at least this value on chain. + // + // This value is not included in `inbound_capacity_msat` as it can never be spent. + CounterpartyUnspendablePunishmentReserve uint64 `protobuf:"varint,22,opt,name=counterparty_unspendable_punishment_reserve,json=counterpartyUnspendablePunishmentReserve,proto3" json:"counterparty_unspendable_punishment_reserve,omitempty"` + // Base routing fee in millisatoshis. + CounterpartyForwardingInfoFeeBaseMsat *uint32 `protobuf:"varint,23,opt,name=counterparty_forwarding_info_fee_base_msat,json=counterpartyForwardingInfoFeeBaseMsat,proto3,oneof" json:"counterparty_forwarding_info_fee_base_msat,omitempty"` + // Proportional fee, in millionths of a satoshi the channel will charge per transferred satoshi. + CounterpartyForwardingInfoFeeProportionalMillionths *uint32 `protobuf:"varint,24,opt,name=counterparty_forwarding_info_fee_proportional_millionths,json=counterpartyForwardingInfoFeeProportionalMillionths,proto3,oneof" json:"counterparty_forwarding_info_fee_proportional_millionths,omitempty"` + // The minimum difference in CLTV expiry between an ingoing HTLC and its outgoing counterpart, + // such that the outgoing HTLC is forwardable to this counterparty. + CounterpartyForwardingInfoCltvExpiryDelta *uint32 `protobuf:"varint,25,opt,name=counterparty_forwarding_info_cltv_expiry_delta,json=counterpartyForwardingInfoCltvExpiryDelta,proto3,oneof" json:"counterparty_forwarding_info_cltv_expiry_delta,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Channel) Reset() { + *x = Channel{} + mi := &file_types_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Channel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Channel) ProtoMessage() {} + +func (x *Channel) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Channel.ProtoReflect.Descriptor instead. +func (*Channel) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{13} +} + +func (x *Channel) GetChannelId() string { + if x != nil { + return x.ChannelId + } + return "" +} + +func (x *Channel) GetCounterpartyNodeId() string { + if x != nil { + return x.CounterpartyNodeId + } + return "" +} + +func (x *Channel) GetFundingTxo() *OutPoint { + if x != nil { + return x.FundingTxo + } + return nil +} + +func (x *Channel) GetUserChannelId() string { + if x != nil { + return x.UserChannelId + } + return "" +} + +func (x *Channel) GetUnspendablePunishmentReserve() uint64 { + if x != nil && x.UnspendablePunishmentReserve != nil { + return *x.UnspendablePunishmentReserve + } + return 0 +} + +func (x *Channel) GetChannelValueSats() uint64 { + if x != nil { + return x.ChannelValueSats + } + return 0 +} + +func (x *Channel) GetFeerateSatPer_1000Weight() uint32 { + if x != nil { + return x.FeerateSatPer_1000Weight + } + return 0 +} + +func (x *Channel) GetOutboundCapacityMsat() uint64 { + if x != nil { + return x.OutboundCapacityMsat + } + return 0 +} + +func (x *Channel) GetInboundCapacityMsat() uint64 { + if x != nil { + return x.InboundCapacityMsat + } + return 0 +} + +func (x *Channel) GetConfirmationsRequired() uint32 { + if x != nil && x.ConfirmationsRequired != nil { + return *x.ConfirmationsRequired + } + return 0 +} + +func (x *Channel) GetConfirmations() uint32 { + if x != nil && x.Confirmations != nil { + return *x.Confirmations + } + return 0 +} + +func (x *Channel) GetIsOutbound() bool { + if x != nil { + return x.IsOutbound + } + return false +} + +func (x *Channel) GetIsChannelReady() bool { + if x != nil { + return x.IsChannelReady + } + return false +} + +func (x *Channel) GetIsUsable() bool { + if x != nil { + return x.IsUsable + } + return false +} + +func (x *Channel) GetIsAnnounced() bool { + if x != nil { + return x.IsAnnounced + } + return false +} + +func (x *Channel) GetChannelConfig() *ChannelConfig { + if x != nil { + return x.ChannelConfig + } + return nil +} + +func (x *Channel) GetNextOutboundHtlcLimitMsat() uint64 { + if x != nil { + return x.NextOutboundHtlcLimitMsat + } + return 0 +} + +func (x *Channel) GetNextOutboundHtlcMinimumMsat() uint64 { + if x != nil { + return x.NextOutboundHtlcMinimumMsat + } + return 0 +} + +func (x *Channel) GetForceCloseSpendDelay() uint32 { + if x != nil && x.ForceCloseSpendDelay != nil { + return *x.ForceCloseSpendDelay + } + return 0 +} + +func (x *Channel) GetCounterpartyOutboundHtlcMinimumMsat() uint64 { + if x != nil && x.CounterpartyOutboundHtlcMinimumMsat != nil { + return *x.CounterpartyOutboundHtlcMinimumMsat + } + return 0 +} + +func (x *Channel) GetCounterpartyOutboundHtlcMaximumMsat() uint64 { + if x != nil && x.CounterpartyOutboundHtlcMaximumMsat != nil { + return *x.CounterpartyOutboundHtlcMaximumMsat + } + return 0 +} + +func (x *Channel) GetCounterpartyUnspendablePunishmentReserve() uint64 { + if x != nil { + return x.CounterpartyUnspendablePunishmentReserve + } + return 0 +} + +func (x *Channel) GetCounterpartyForwardingInfoFeeBaseMsat() uint32 { + if x != nil && x.CounterpartyForwardingInfoFeeBaseMsat != nil { + return *x.CounterpartyForwardingInfoFeeBaseMsat + } + return 0 +} + +func (x *Channel) GetCounterpartyForwardingInfoFeeProportionalMillionths() uint32 { + if x != nil && x.CounterpartyForwardingInfoFeeProportionalMillionths != nil { + return *x.CounterpartyForwardingInfoFeeProportionalMillionths + } + return 0 +} + +func (x *Channel) GetCounterpartyForwardingInfoCltvExpiryDelta() uint32 { + if x != nil && x.CounterpartyForwardingInfoCltvExpiryDelta != nil { + return *x.CounterpartyForwardingInfoCltvExpiryDelta + } + return 0 +} + +// ChannelConfig represents the configuration settings for a channel in a Lightning Network node. +// See more: https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html +type ChannelConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Amount (in millionths of a satoshi) charged per satoshi for payments forwarded outbound + // over the channel. + // See more: https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.forwarding_fee_proportional_millionths + ForwardingFeeProportionalMillionths *uint32 `protobuf:"varint,1,opt,name=forwarding_fee_proportional_millionths,json=forwardingFeeProportionalMillionths,proto3,oneof" json:"forwarding_fee_proportional_millionths,omitempty"` + // Amount (in milli-satoshi) charged for payments forwarded outbound over the channel, + // in excess of forwarding_fee_proportional_millionths. + // See more: https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.forwarding_fee_base_msat + ForwardingFeeBaseMsat *uint32 `protobuf:"varint,2,opt,name=forwarding_fee_base_msat,json=forwardingFeeBaseMsat,proto3,oneof" json:"forwarding_fee_base_msat,omitempty"` + // The difference in the CLTV value between incoming HTLCs and an outbound HTLC forwarded + // over the channel this config applies to. + // See more: https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.cltv_expiry_delta + CltvExpiryDelta *uint32 `protobuf:"varint,3,opt,name=cltv_expiry_delta,json=cltvExpiryDelta,proto3,oneof" json:"cltv_expiry_delta,omitempty"` + // The maximum additional fee we’re willing to pay to avoid waiting for the counterparty’s + // to_self_delay to reclaim funds. + // See more: https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.force_close_avoidance_max_fee_satoshis + ForceCloseAvoidanceMaxFeeSatoshis *uint64 `protobuf:"varint,4,opt,name=force_close_avoidance_max_fee_satoshis,json=forceCloseAvoidanceMaxFeeSatoshis,proto3,oneof" json:"force_close_avoidance_max_fee_satoshis,omitempty"` + // If set, allows this channel’s counterparty to skim an additional fee off this node’s + // inbound HTLCs. Useful for liquidity providers to offload on-chain channel costs to end users. + // See more: https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.accept_underpaying_htlcs + AcceptUnderpayingHtlcs *bool `protobuf:"varint,5,opt,name=accept_underpaying_htlcs,json=acceptUnderpayingHtlcs,proto3,oneof" json:"accept_underpaying_htlcs,omitempty"` + // Limit our total exposure to potential loss to on-chain fees on close, including + // in-flight HTLCs which are burned to fees as they are too small to claim on-chain + // and fees on commitment transaction(s) broadcasted by our counterparty in excess of + // our own fee estimate. + // See more: https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html#structfield.max_dust_htlc_exposure + // + // Types that are valid to be assigned to MaxDustHtlcExposure: + // + // *ChannelConfig_FixedLimitMsat + // *ChannelConfig_FeeRateMultiplier + MaxDustHtlcExposure isChannelConfig_MaxDustHtlcExposure `protobuf_oneof:"max_dust_htlc_exposure"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChannelConfig) Reset() { + *x = ChannelConfig{} + mi := &file_types_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChannelConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChannelConfig) ProtoMessage() {} + +func (x *ChannelConfig) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChannelConfig.ProtoReflect.Descriptor instead. +func (*ChannelConfig) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{14} +} + +func (x *ChannelConfig) GetForwardingFeeProportionalMillionths() uint32 { + if x != nil && x.ForwardingFeeProportionalMillionths != nil { + return *x.ForwardingFeeProportionalMillionths + } + return 0 +} + +func (x *ChannelConfig) GetForwardingFeeBaseMsat() uint32 { + if x != nil && x.ForwardingFeeBaseMsat != nil { + return *x.ForwardingFeeBaseMsat + } + return 0 +} + +func (x *ChannelConfig) GetCltvExpiryDelta() uint32 { + if x != nil && x.CltvExpiryDelta != nil { + return *x.CltvExpiryDelta + } + return 0 +} + +func (x *ChannelConfig) GetForceCloseAvoidanceMaxFeeSatoshis() uint64 { + if x != nil && x.ForceCloseAvoidanceMaxFeeSatoshis != nil { + return *x.ForceCloseAvoidanceMaxFeeSatoshis + } + return 0 +} + +func (x *ChannelConfig) GetAcceptUnderpayingHtlcs() bool { + if x != nil && x.AcceptUnderpayingHtlcs != nil { + return *x.AcceptUnderpayingHtlcs + } + return false +} + +func (x *ChannelConfig) GetMaxDustHtlcExposure() isChannelConfig_MaxDustHtlcExposure { + if x != nil { + return x.MaxDustHtlcExposure + } + return nil +} + +func (x *ChannelConfig) GetFixedLimitMsat() uint64 { + if x != nil { + if x, ok := x.MaxDustHtlcExposure.(*ChannelConfig_FixedLimitMsat); ok { + return x.FixedLimitMsat + } + } + return 0 +} + +func (x *ChannelConfig) GetFeeRateMultiplier() uint64 { + if x != nil { + if x, ok := x.MaxDustHtlcExposure.(*ChannelConfig_FeeRateMultiplier); ok { + return x.FeeRateMultiplier + } + } + return 0 +} + +type isChannelConfig_MaxDustHtlcExposure interface { + isChannelConfig_MaxDustHtlcExposure() +} + +type ChannelConfig_FixedLimitMsat struct { + // This sets a fixed limit on the total dust exposure in millisatoshis. + // See more: https://docs.rs/lightning/latest/lightning/util/config/enum.MaxDustHTLCExposure.html#variant.FixedLimitMsat + FixedLimitMsat uint64 `protobuf:"varint,6,opt,name=fixed_limit_msat,json=fixedLimitMsat,proto3,oneof"` +} + +type ChannelConfig_FeeRateMultiplier struct { + // This sets a multiplier on the ConfirmationTarget::OnChainSweep feerate (in sats/KW) to determine the maximum allowed dust exposure. + // See more: https://docs.rs/lightning/latest/lightning/util/config/enum.MaxDustHTLCExposure.html#variant.FeeRateMultiplier + FeeRateMultiplier uint64 `protobuf:"varint,7,opt,name=fee_rate_multiplier,json=feeRateMultiplier,proto3,oneof"` +} + +func (*ChannelConfig_FixedLimitMsat) isChannelConfig_MaxDustHtlcExposure() {} + +func (*ChannelConfig_FeeRateMultiplier) isChannelConfig_MaxDustHtlcExposure() {} + +// Represent a transaction outpoint. +type OutPoint struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The referenced transaction's txid. + Txid string `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"` + // The index of the referenced output in its transaction's vout. + Vout uint32 `protobuf:"varint,2,opt,name=vout,proto3" json:"vout,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OutPoint) Reset() { + *x = OutPoint{} + mi := &file_types_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OutPoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutPoint) ProtoMessage() {} + +func (x *OutPoint) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutPoint.ProtoReflect.Descriptor instead. +func (*OutPoint) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{15} +} + +func (x *OutPoint) GetTxid() string { + if x != nil { + return x.Txid + } + return "" +} + +func (x *OutPoint) GetVout() uint32 { + if x != nil { + return x.Vout + } + return 0 +} + +type BestBlock struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The block’s hash + BlockHash string `protobuf:"bytes,1,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + // The height at which the block was confirmed. + Height uint32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BestBlock) Reset() { + *x = BestBlock{} + mi := &file_types_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BestBlock) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BestBlock) ProtoMessage() {} + +func (x *BestBlock) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BestBlock.ProtoReflect.Descriptor instead. +func (*BestBlock) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{16} +} + +func (x *BestBlock) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *BestBlock) GetHeight() uint32 { + if x != nil { + return x.Height + } + return 0 +} + +// Details about the status of a known Lightning balance. +type LightningBalance struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to BalanceType: + // + // *LightningBalance_ClaimableOnChannelClose + // *LightningBalance_ClaimableAwaitingConfirmations + // *LightningBalance_ContentiousClaimable + // *LightningBalance_MaybeTimeoutClaimableHtlc + // *LightningBalance_MaybePreimageClaimableHtlc + // *LightningBalance_CounterpartyRevokedOutputClaimable + BalanceType isLightningBalance_BalanceType `protobuf_oneof:"balance_type"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LightningBalance) Reset() { + *x = LightningBalance{} + mi := &file_types_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LightningBalance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LightningBalance) ProtoMessage() {} + +func (x *LightningBalance) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LightningBalance.ProtoReflect.Descriptor instead. +func (*LightningBalance) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{17} +} + +func (x *LightningBalance) GetBalanceType() isLightningBalance_BalanceType { + if x != nil { + return x.BalanceType + } + return nil +} + +func (x *LightningBalance) GetClaimableOnChannelClose() *ClaimableOnChannelClose { + if x != nil { + if x, ok := x.BalanceType.(*LightningBalance_ClaimableOnChannelClose); ok { + return x.ClaimableOnChannelClose + } + } + return nil +} + +func (x *LightningBalance) GetClaimableAwaitingConfirmations() *ClaimableAwaitingConfirmations { + if x != nil { + if x, ok := x.BalanceType.(*LightningBalance_ClaimableAwaitingConfirmations); ok { + return x.ClaimableAwaitingConfirmations + } + } + return nil +} + +func (x *LightningBalance) GetContentiousClaimable() *ContentiousClaimable { + if x != nil { + if x, ok := x.BalanceType.(*LightningBalance_ContentiousClaimable); ok { + return x.ContentiousClaimable + } + } + return nil +} + +func (x *LightningBalance) GetMaybeTimeoutClaimableHtlc() *MaybeTimeoutClaimableHTLC { + if x != nil { + if x, ok := x.BalanceType.(*LightningBalance_MaybeTimeoutClaimableHtlc); ok { + return x.MaybeTimeoutClaimableHtlc + } + } + return nil +} + +func (x *LightningBalance) GetMaybePreimageClaimableHtlc() *MaybePreimageClaimableHTLC { + if x != nil { + if x, ok := x.BalanceType.(*LightningBalance_MaybePreimageClaimableHtlc); ok { + return x.MaybePreimageClaimableHtlc + } + } + return nil +} + +func (x *LightningBalance) GetCounterpartyRevokedOutputClaimable() *CounterpartyRevokedOutputClaimable { + if x != nil { + if x, ok := x.BalanceType.(*LightningBalance_CounterpartyRevokedOutputClaimable); ok { + return x.CounterpartyRevokedOutputClaimable + } + } + return nil +} + +type isLightningBalance_BalanceType interface { + isLightningBalance_BalanceType() +} + +type LightningBalance_ClaimableOnChannelClose struct { + ClaimableOnChannelClose *ClaimableOnChannelClose `protobuf:"bytes,1,opt,name=claimable_on_channel_close,json=claimableOnChannelClose,proto3,oneof"` +} + +type LightningBalance_ClaimableAwaitingConfirmations struct { + ClaimableAwaitingConfirmations *ClaimableAwaitingConfirmations `protobuf:"bytes,2,opt,name=claimable_awaiting_confirmations,json=claimableAwaitingConfirmations,proto3,oneof"` +} + +type LightningBalance_ContentiousClaimable struct { + ContentiousClaimable *ContentiousClaimable `protobuf:"bytes,3,opt,name=contentious_claimable,json=contentiousClaimable,proto3,oneof"` +} + +type LightningBalance_MaybeTimeoutClaimableHtlc struct { + MaybeTimeoutClaimableHtlc *MaybeTimeoutClaimableHTLC `protobuf:"bytes,4,opt,name=maybe_timeout_claimable_htlc,json=maybeTimeoutClaimableHtlc,proto3,oneof"` +} + +type LightningBalance_MaybePreimageClaimableHtlc struct { + MaybePreimageClaimableHtlc *MaybePreimageClaimableHTLC `protobuf:"bytes,5,opt,name=maybe_preimage_claimable_htlc,json=maybePreimageClaimableHtlc,proto3,oneof"` +} + +type LightningBalance_CounterpartyRevokedOutputClaimable struct { + CounterpartyRevokedOutputClaimable *CounterpartyRevokedOutputClaimable `protobuf:"bytes,6,opt,name=counterparty_revoked_output_claimable,json=counterpartyRevokedOutputClaimable,proto3,oneof"` +} + +func (*LightningBalance_ClaimableOnChannelClose) isLightningBalance_BalanceType() {} + +func (*LightningBalance_ClaimableAwaitingConfirmations) isLightningBalance_BalanceType() {} + +func (*LightningBalance_ContentiousClaimable) isLightningBalance_BalanceType() {} + +func (*LightningBalance_MaybeTimeoutClaimableHtlc) isLightningBalance_BalanceType() {} + +func (*LightningBalance_MaybePreimageClaimableHtlc) isLightningBalance_BalanceType() {} + +func (*LightningBalance_CounterpartyRevokedOutputClaimable) isLightningBalance_BalanceType() {} + +// The channel is not yet closed (or the commitment or closing transaction has not yet appeared in a block). +// The given balance is claimable (less on-chain fees) if the channel is force-closed now. +// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.LightningBalance.html#variant.ClaimableOnChannelClose +type ClaimableOnChannelClose struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifier of the channel this balance belongs to. + ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + // The identifier of our channel counterparty. + CounterpartyNodeId string `protobuf:"bytes,2,opt,name=counterparty_node_id,json=counterpartyNodeId,proto3" json:"counterparty_node_id,omitempty"` + // The amount available to claim, in satoshis, excluding the on-chain fees which will be required to do so. + AmountSatoshis uint64 `protobuf:"varint,3,opt,name=amount_satoshis,json=amountSatoshis,proto3" json:"amount_satoshis,omitempty"` + // The transaction fee we pay for the closing commitment transaction. + // This amount is not included in the `amount_satoshis` value. + // + // Note that if this channel is inbound (and thus our counterparty pays the commitment transaction fee) this value + // will be zero. + TransactionFeeSatoshis uint64 `protobuf:"varint,4,opt,name=transaction_fee_satoshis,json=transactionFeeSatoshis,proto3" json:"transaction_fee_satoshis,omitempty"` + // The amount of millisatoshis which has been burned to fees from HTLCs which are outbound from us and are related to + // a payment which was sent by us. This is the sum of the millisatoshis part of all HTLCs which are otherwise + // represented by `LightningBalance::MaybeTimeoutClaimableHTLC` with their + // `LightningBalance::MaybeTimeoutClaimableHTLC::outbound_payment` flag set, as well as any dust HTLCs which would + // otherwise be represented the same. + // + // This amount (rounded up to a whole satoshi value) will not be included in `amount_satoshis`. + OutboundPaymentHtlcRoundedMsat uint64 `protobuf:"varint,5,opt,name=outbound_payment_htlc_rounded_msat,json=outboundPaymentHtlcRoundedMsat,proto3" json:"outbound_payment_htlc_rounded_msat,omitempty"` + // The amount of millisatoshis which has been burned to fees from HTLCs which are outbound from us and are related to + // a forwarded HTLC. This is the sum of the millisatoshis part of all HTLCs which are otherwise represented by + // `LightningBalance::MaybeTimeoutClaimableHTLC` with their `LightningBalance::MaybeTimeoutClaimableHTLC::outbound_payment` + // flag not set, as well as any dust HTLCs which would otherwise be represented the same. + // + // This amount (rounded up to a whole satoshi value) will not be included in `amount_satoshis`. + OutboundForwardedHtlcRoundedMsat uint64 `protobuf:"varint,6,opt,name=outbound_forwarded_htlc_rounded_msat,json=outboundForwardedHtlcRoundedMsat,proto3" json:"outbound_forwarded_htlc_rounded_msat,omitempty"` + // The amount of millisatoshis which has been burned to fees from HTLCs which are inbound to us and for which we know + // the preimage. This is the sum of the millisatoshis part of all HTLCs which would be represented by + // `LightningBalance::ContentiousClaimable` on channel close, but whose current value is included in `amount_satoshis`, + // as well as any dust HTLCs which would otherwise be represented the same. + // + // This amount (rounded up to a whole satoshi value) will not be included in `amount_satoshis`. + InboundClaimingHtlcRoundedMsat uint64 `protobuf:"varint,7,opt,name=inbound_claiming_htlc_rounded_msat,json=inboundClaimingHtlcRoundedMsat,proto3" json:"inbound_claiming_htlc_rounded_msat,omitempty"` + // The amount of millisatoshis which has been burned to fees from HTLCs which are inbound to us and for which we do + // not know the preimage. This is the sum of the millisatoshis part of all HTLCs which would be represented by + // `LightningBalance::MaybePreimageClaimableHTLC` on channel close, as well as any dust HTLCs which would otherwise be + // represented the same. + // + // This amount (rounded up to a whole satoshi value) will not be included in the counterparty’s `amount_satoshis`. + InboundHtlcRoundedMsat uint64 `protobuf:"varint,8,opt,name=inbound_htlc_rounded_msat,json=inboundHtlcRoundedMsat,proto3" json:"inbound_htlc_rounded_msat,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClaimableOnChannelClose) Reset() { + *x = ClaimableOnChannelClose{} + mi := &file_types_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClaimableOnChannelClose) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClaimableOnChannelClose) ProtoMessage() {} + +func (x *ClaimableOnChannelClose) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClaimableOnChannelClose.ProtoReflect.Descriptor instead. +func (*ClaimableOnChannelClose) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{18} +} + +func (x *ClaimableOnChannelClose) GetChannelId() string { + if x != nil { + return x.ChannelId + } + return "" +} + +func (x *ClaimableOnChannelClose) GetCounterpartyNodeId() string { + if x != nil { + return x.CounterpartyNodeId + } + return "" +} + +func (x *ClaimableOnChannelClose) GetAmountSatoshis() uint64 { + if x != nil { + return x.AmountSatoshis + } + return 0 +} + +func (x *ClaimableOnChannelClose) GetTransactionFeeSatoshis() uint64 { + if x != nil { + return x.TransactionFeeSatoshis + } + return 0 +} + +func (x *ClaimableOnChannelClose) GetOutboundPaymentHtlcRoundedMsat() uint64 { + if x != nil { + return x.OutboundPaymentHtlcRoundedMsat + } + return 0 +} + +func (x *ClaimableOnChannelClose) GetOutboundForwardedHtlcRoundedMsat() uint64 { + if x != nil { + return x.OutboundForwardedHtlcRoundedMsat + } + return 0 +} + +func (x *ClaimableOnChannelClose) GetInboundClaimingHtlcRoundedMsat() uint64 { + if x != nil { + return x.InboundClaimingHtlcRoundedMsat + } + return 0 +} + +func (x *ClaimableOnChannelClose) GetInboundHtlcRoundedMsat() uint64 { + if x != nil { + return x.InboundHtlcRoundedMsat + } + return 0 +} + +// The channel has been closed, and the given balance is ours but awaiting confirmations until we consider it spendable. +// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.LightningBalance.html#variant.ClaimableAwaitingConfirmations +type ClaimableAwaitingConfirmations struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifier of the channel this balance belongs to. + ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + // The identifier of our channel counterparty. + CounterpartyNodeId string `protobuf:"bytes,2,opt,name=counterparty_node_id,json=counterpartyNodeId,proto3" json:"counterparty_node_id,omitempty"` + // The amount available to claim, in satoshis, possibly excluding the on-chain fees which were spent in broadcasting + // the transaction. + AmountSatoshis uint64 `protobuf:"varint,3,opt,name=amount_satoshis,json=amountSatoshis,proto3" json:"amount_satoshis,omitempty"` + // The height at which we start tracking it as `SpendableOutput`. + ConfirmationHeight uint32 `protobuf:"varint,4,opt,name=confirmation_height,json=confirmationHeight,proto3" json:"confirmation_height,omitempty"` + // Whether this balance is a result of cooperative close, a force-close, or an HTLC. + Source BalanceSource `protobuf:"varint,5,opt,name=source,proto3,enum=types.BalanceSource" json:"source,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClaimableAwaitingConfirmations) Reset() { + *x = ClaimableAwaitingConfirmations{} + mi := &file_types_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClaimableAwaitingConfirmations) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClaimableAwaitingConfirmations) ProtoMessage() {} + +func (x *ClaimableAwaitingConfirmations) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClaimableAwaitingConfirmations.ProtoReflect.Descriptor instead. +func (*ClaimableAwaitingConfirmations) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{19} +} + +func (x *ClaimableAwaitingConfirmations) GetChannelId() string { + if x != nil { + return x.ChannelId + } + return "" +} + +func (x *ClaimableAwaitingConfirmations) GetCounterpartyNodeId() string { + if x != nil { + return x.CounterpartyNodeId + } + return "" +} + +func (x *ClaimableAwaitingConfirmations) GetAmountSatoshis() uint64 { + if x != nil { + return x.AmountSatoshis + } + return 0 +} + +func (x *ClaimableAwaitingConfirmations) GetConfirmationHeight() uint32 { + if x != nil { + return x.ConfirmationHeight + } + return 0 +} + +func (x *ClaimableAwaitingConfirmations) GetSource() BalanceSource { + if x != nil { + return x.Source + } + return BalanceSource_HOLDER_FORCE_CLOSED +} + +// The channel has been closed, and the given balance should be ours but awaiting spending transaction confirmation. +// If the spending transaction does not confirm in time, it is possible our counterparty can take the funds by +// broadcasting an HTLC timeout on-chain. +// +// Once the spending transaction confirms, before it has reached enough confirmations to be considered safe from chain +// reorganizations, the balance will instead be provided via `LightningBalance::ClaimableAwaitingConfirmations`. +// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.LightningBalance.html#variant.ContentiousClaimable +type ContentiousClaimable struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifier of the channel this balance belongs to. + ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + // The identifier of our channel counterparty. + CounterpartyNodeId string `protobuf:"bytes,2,opt,name=counterparty_node_id,json=counterpartyNodeId,proto3" json:"counterparty_node_id,omitempty"` + // The amount available to claim, in satoshis, excluding the on-chain fees which were spent in broadcasting + // the transaction. + AmountSatoshis uint64 `protobuf:"varint,3,opt,name=amount_satoshis,json=amountSatoshis,proto3" json:"amount_satoshis,omitempty"` + // The height at which the counterparty may be able to claim the balance if we have not done so. + TimeoutHeight uint32 `protobuf:"varint,4,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` + // The payment hash that locks this HTLC. + PaymentHash string `protobuf:"bytes,5,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"` + // The preimage that can be used to claim this HTLC. + PaymentPreimage string `protobuf:"bytes,6,opt,name=payment_preimage,json=paymentPreimage,proto3" json:"payment_preimage,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ContentiousClaimable) Reset() { + *x = ContentiousClaimable{} + mi := &file_types_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ContentiousClaimable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContentiousClaimable) ProtoMessage() {} + +func (x *ContentiousClaimable) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContentiousClaimable.ProtoReflect.Descriptor instead. +func (*ContentiousClaimable) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{20} +} + +func (x *ContentiousClaimable) GetChannelId() string { + if x != nil { + return x.ChannelId + } + return "" +} + +func (x *ContentiousClaimable) GetCounterpartyNodeId() string { + if x != nil { + return x.CounterpartyNodeId + } + return "" +} + +func (x *ContentiousClaimable) GetAmountSatoshis() uint64 { + if x != nil { + return x.AmountSatoshis + } + return 0 +} + +func (x *ContentiousClaimable) GetTimeoutHeight() uint32 { + if x != nil { + return x.TimeoutHeight + } + return 0 +} + +func (x *ContentiousClaimable) GetPaymentHash() string { + if x != nil { + return x.PaymentHash + } + return "" +} + +func (x *ContentiousClaimable) GetPaymentPreimage() string { + if x != nil { + return x.PaymentPreimage + } + return "" +} + +// HTLCs which we sent to our counterparty which are claimable after a timeout (less on-chain fees) if the counterparty +// does not know the preimage for the HTLCs. These are somewhat likely to be claimed by our counterparty before we do. +// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.LightningBalance.html#variant.MaybeTimeoutClaimableHTLC +type MaybeTimeoutClaimableHTLC struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifier of the channel this balance belongs to. + ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + // The identifier of our channel counterparty. + CounterpartyNodeId string `protobuf:"bytes,2,opt,name=counterparty_node_id,json=counterpartyNodeId,proto3" json:"counterparty_node_id,omitempty"` + // The amount available to claim, in satoshis, excluding the on-chain fees which were spent in broadcasting + // the transaction. + AmountSatoshis uint64 `protobuf:"varint,3,opt,name=amount_satoshis,json=amountSatoshis,proto3" json:"amount_satoshis,omitempty"` + // The height at which we will be able to claim the balance if our counterparty has not done so. + ClaimableHeight uint32 `protobuf:"varint,4,opt,name=claimable_height,json=claimableHeight,proto3" json:"claimable_height,omitempty"` + // The payment hash whose preimage our counterparty needs to claim this HTLC. + PaymentHash string `protobuf:"bytes,5,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"` + // Indicates whether this HTLC represents a payment which was sent outbound from us. + OutboundPayment bool `protobuf:"varint,6,opt,name=outbound_payment,json=outboundPayment,proto3" json:"outbound_payment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MaybeTimeoutClaimableHTLC) Reset() { + *x = MaybeTimeoutClaimableHTLC{} + mi := &file_types_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MaybeTimeoutClaimableHTLC) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MaybeTimeoutClaimableHTLC) ProtoMessage() {} + +func (x *MaybeTimeoutClaimableHTLC) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MaybeTimeoutClaimableHTLC.ProtoReflect.Descriptor instead. +func (*MaybeTimeoutClaimableHTLC) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{21} +} + +func (x *MaybeTimeoutClaimableHTLC) GetChannelId() string { + if x != nil { + return x.ChannelId + } + return "" +} + +func (x *MaybeTimeoutClaimableHTLC) GetCounterpartyNodeId() string { + if x != nil { + return x.CounterpartyNodeId + } + return "" +} + +func (x *MaybeTimeoutClaimableHTLC) GetAmountSatoshis() uint64 { + if x != nil { + return x.AmountSatoshis + } + return 0 +} + +func (x *MaybeTimeoutClaimableHTLC) GetClaimableHeight() uint32 { + if x != nil { + return x.ClaimableHeight + } + return 0 +} + +func (x *MaybeTimeoutClaimableHTLC) GetPaymentHash() string { + if x != nil { + return x.PaymentHash + } + return "" +} + +func (x *MaybeTimeoutClaimableHTLC) GetOutboundPayment() bool { + if x != nil { + return x.OutboundPayment + } + return false +} + +// HTLCs which we received from our counterparty which are claimable with a preimage which we do not currently have. +// This will only be claimable if we receive the preimage from the node to which we forwarded this HTLC before the +// timeout. +// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.LightningBalance.html#variant.MaybePreimageClaimableHTLC +type MaybePreimageClaimableHTLC struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifier of the channel this balance belongs to. + ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + // The identifier of our channel counterparty. + CounterpartyNodeId string `protobuf:"bytes,2,opt,name=counterparty_node_id,json=counterpartyNodeId,proto3" json:"counterparty_node_id,omitempty"` + // The amount available to claim, in satoshis, excluding the on-chain fees which were spent in broadcasting + // the transaction. + AmountSatoshis uint64 `protobuf:"varint,3,opt,name=amount_satoshis,json=amountSatoshis,proto3" json:"amount_satoshis,omitempty"` + // The height at which our counterparty will be able to claim the balance if we have not yet received the preimage and + // claimed it ourselves. + ExpiryHeight uint32 `protobuf:"varint,4,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"` + // The payment hash whose preimage we need to claim this HTLC. + PaymentHash string `protobuf:"bytes,5,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MaybePreimageClaimableHTLC) Reset() { + *x = MaybePreimageClaimableHTLC{} + mi := &file_types_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MaybePreimageClaimableHTLC) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MaybePreimageClaimableHTLC) ProtoMessage() {} + +func (x *MaybePreimageClaimableHTLC) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MaybePreimageClaimableHTLC.ProtoReflect.Descriptor instead. +func (*MaybePreimageClaimableHTLC) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{22} +} + +func (x *MaybePreimageClaimableHTLC) GetChannelId() string { + if x != nil { + return x.ChannelId + } + return "" +} + +func (x *MaybePreimageClaimableHTLC) GetCounterpartyNodeId() string { + if x != nil { + return x.CounterpartyNodeId + } + return "" +} + +func (x *MaybePreimageClaimableHTLC) GetAmountSatoshis() uint64 { + if x != nil { + return x.AmountSatoshis + } + return 0 +} + +func (x *MaybePreimageClaimableHTLC) GetExpiryHeight() uint32 { + if x != nil { + return x.ExpiryHeight + } + return 0 +} + +func (x *MaybePreimageClaimableHTLC) GetPaymentHash() string { + if x != nil { + return x.PaymentHash + } + return "" +} + +// The channel has been closed, and our counterparty broadcasted a revoked commitment transaction. +// +// Thus, we’re able to claim all outputs in the commitment transaction, one of which has the following amount. +// +// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.LightningBalance.html#variant.CounterpartyRevokedOutputClaimable +type CounterpartyRevokedOutputClaimable struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifier of the channel this balance belongs to. + ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + // The identifier of our channel counterparty. + CounterpartyNodeId string `protobuf:"bytes,2,opt,name=counterparty_node_id,json=counterpartyNodeId,proto3" json:"counterparty_node_id,omitempty"` + // The amount, in satoshis, of the output which we can claim. + AmountSatoshis uint64 `protobuf:"varint,3,opt,name=amount_satoshis,json=amountSatoshis,proto3" json:"amount_satoshis,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CounterpartyRevokedOutputClaimable) Reset() { + *x = CounterpartyRevokedOutputClaimable{} + mi := &file_types_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CounterpartyRevokedOutputClaimable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CounterpartyRevokedOutputClaimable) ProtoMessage() {} + +func (x *CounterpartyRevokedOutputClaimable) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CounterpartyRevokedOutputClaimable.ProtoReflect.Descriptor instead. +func (*CounterpartyRevokedOutputClaimable) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{23} +} + +func (x *CounterpartyRevokedOutputClaimable) GetChannelId() string { + if x != nil { + return x.ChannelId + } + return "" +} + +func (x *CounterpartyRevokedOutputClaimable) GetCounterpartyNodeId() string { + if x != nil { + return x.CounterpartyNodeId + } + return "" +} + +func (x *CounterpartyRevokedOutputClaimable) GetAmountSatoshis() uint64 { + if x != nil { + return x.AmountSatoshis + } + return 0 +} + +// Details about the status of a known balance currently being swept to our on-chain wallet. +type PendingSweepBalance struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to BalanceType: + // + // *PendingSweepBalance_PendingBroadcast + // *PendingSweepBalance_BroadcastAwaitingConfirmation + // *PendingSweepBalance_AwaitingThresholdConfirmations + BalanceType isPendingSweepBalance_BalanceType `protobuf_oneof:"balance_type"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PendingSweepBalance) Reset() { + *x = PendingSweepBalance{} + mi := &file_types_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PendingSweepBalance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PendingSweepBalance) ProtoMessage() {} + +func (x *PendingSweepBalance) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PendingSweepBalance.ProtoReflect.Descriptor instead. +func (*PendingSweepBalance) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{24} +} + +func (x *PendingSweepBalance) GetBalanceType() isPendingSweepBalance_BalanceType { + if x != nil { + return x.BalanceType + } + return nil +} + +func (x *PendingSweepBalance) GetPendingBroadcast() *PendingBroadcast { + if x != nil { + if x, ok := x.BalanceType.(*PendingSweepBalance_PendingBroadcast); ok { + return x.PendingBroadcast + } + } + return nil +} + +func (x *PendingSweepBalance) GetBroadcastAwaitingConfirmation() *BroadcastAwaitingConfirmation { + if x != nil { + if x, ok := x.BalanceType.(*PendingSweepBalance_BroadcastAwaitingConfirmation); ok { + return x.BroadcastAwaitingConfirmation + } + } + return nil +} + +func (x *PendingSweepBalance) GetAwaitingThresholdConfirmations() *AwaitingThresholdConfirmations { + if x != nil { + if x, ok := x.BalanceType.(*PendingSweepBalance_AwaitingThresholdConfirmations); ok { + return x.AwaitingThresholdConfirmations + } + } + return nil +} + +type isPendingSweepBalance_BalanceType interface { + isPendingSweepBalance_BalanceType() +} + +type PendingSweepBalance_PendingBroadcast struct { + PendingBroadcast *PendingBroadcast `protobuf:"bytes,1,opt,name=pending_broadcast,json=pendingBroadcast,proto3,oneof"` +} + +type PendingSweepBalance_BroadcastAwaitingConfirmation struct { + BroadcastAwaitingConfirmation *BroadcastAwaitingConfirmation `protobuf:"bytes,2,opt,name=broadcast_awaiting_confirmation,json=broadcastAwaitingConfirmation,proto3,oneof"` +} + +type PendingSweepBalance_AwaitingThresholdConfirmations struct { + AwaitingThresholdConfirmations *AwaitingThresholdConfirmations `protobuf:"bytes,3,opt,name=awaiting_threshold_confirmations,json=awaitingThresholdConfirmations,proto3,oneof"` +} + +func (*PendingSweepBalance_PendingBroadcast) isPendingSweepBalance_BalanceType() {} + +func (*PendingSweepBalance_BroadcastAwaitingConfirmation) isPendingSweepBalance_BalanceType() {} + +func (*PendingSweepBalance_AwaitingThresholdConfirmations) isPendingSweepBalance_BalanceType() {} + +// The spendable output is about to be swept, but a spending transaction has yet to be generated and broadcast. +// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.PendingSweepBalance.html#variant.PendingBroadcast +type PendingBroadcast struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifier of the channel this balance belongs to. + ChannelId *string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3,oneof" json:"channel_id,omitempty"` + // The amount, in satoshis, of the output being swept. + AmountSatoshis uint64 `protobuf:"varint,2,opt,name=amount_satoshis,json=amountSatoshis,proto3" json:"amount_satoshis,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PendingBroadcast) Reset() { + *x = PendingBroadcast{} + mi := &file_types_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PendingBroadcast) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PendingBroadcast) ProtoMessage() {} + +func (x *PendingBroadcast) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PendingBroadcast.ProtoReflect.Descriptor instead. +func (*PendingBroadcast) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{25} +} + +func (x *PendingBroadcast) GetChannelId() string { + if x != nil && x.ChannelId != nil { + return *x.ChannelId + } + return "" +} + +func (x *PendingBroadcast) GetAmountSatoshis() uint64 { + if x != nil { + return x.AmountSatoshis + } + return 0 +} + +// A spending transaction has been generated and broadcast and is awaiting confirmation on-chain. +// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.PendingSweepBalance.html#variant.BroadcastAwaitingConfirmation +type BroadcastAwaitingConfirmation struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifier of the channel this balance belongs to. + ChannelId *string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3,oneof" json:"channel_id,omitempty"` + // The best height when we last broadcast a transaction spending the output being swept. + LatestBroadcastHeight uint32 `protobuf:"varint,2,opt,name=latest_broadcast_height,json=latestBroadcastHeight,proto3" json:"latest_broadcast_height,omitempty"` + // The identifier of the transaction spending the swept output we last broadcast. + LatestSpendingTxid string `protobuf:"bytes,3,opt,name=latest_spending_txid,json=latestSpendingTxid,proto3" json:"latest_spending_txid,omitempty"` + // The amount, in satoshis, of the output being swept. + AmountSatoshis uint64 `protobuf:"varint,4,opt,name=amount_satoshis,json=amountSatoshis,proto3" json:"amount_satoshis,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BroadcastAwaitingConfirmation) Reset() { + *x = BroadcastAwaitingConfirmation{} + mi := &file_types_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BroadcastAwaitingConfirmation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BroadcastAwaitingConfirmation) ProtoMessage() {} + +func (x *BroadcastAwaitingConfirmation) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BroadcastAwaitingConfirmation.ProtoReflect.Descriptor instead. +func (*BroadcastAwaitingConfirmation) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{26} +} + +func (x *BroadcastAwaitingConfirmation) GetChannelId() string { + if x != nil && x.ChannelId != nil { + return *x.ChannelId + } + return "" +} + +func (x *BroadcastAwaitingConfirmation) GetLatestBroadcastHeight() uint32 { + if x != nil { + return x.LatestBroadcastHeight + } + return 0 +} + +func (x *BroadcastAwaitingConfirmation) GetLatestSpendingTxid() string { + if x != nil { + return x.LatestSpendingTxid + } + return "" +} + +func (x *BroadcastAwaitingConfirmation) GetAmountSatoshis() uint64 { + if x != nil { + return x.AmountSatoshis + } + return 0 +} + +// A spending transaction has been confirmed on-chain and is awaiting threshold confirmations. +// +// It will be considered irrevocably confirmed after reaching `ANTI_REORG_DELAY`. +// See more: https://docs.rs/ldk-node/latest/ldk_node/enum.PendingSweepBalance.html#variant.AwaitingThresholdConfirmations +type AwaitingThresholdConfirmations struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifier of the channel this balance belongs to. + ChannelId *string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3,oneof" json:"channel_id,omitempty"` + // The identifier of the confirmed transaction spending the swept output. + LatestSpendingTxid string `protobuf:"bytes,2,opt,name=latest_spending_txid,json=latestSpendingTxid,proto3" json:"latest_spending_txid,omitempty"` + // The hash of the block in which the spending transaction was confirmed. + ConfirmationHash string `protobuf:"bytes,3,opt,name=confirmation_hash,json=confirmationHash,proto3" json:"confirmation_hash,omitempty"` + // The height at which the spending transaction was confirmed. + ConfirmationHeight uint32 `protobuf:"varint,4,opt,name=confirmation_height,json=confirmationHeight,proto3" json:"confirmation_height,omitempty"` + // The amount, in satoshis, of the output being swept. + AmountSatoshis uint64 `protobuf:"varint,5,opt,name=amount_satoshis,json=amountSatoshis,proto3" json:"amount_satoshis,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AwaitingThresholdConfirmations) Reset() { + *x = AwaitingThresholdConfirmations{} + mi := &file_types_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AwaitingThresholdConfirmations) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AwaitingThresholdConfirmations) ProtoMessage() {} + +func (x *AwaitingThresholdConfirmations) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AwaitingThresholdConfirmations.ProtoReflect.Descriptor instead. +func (*AwaitingThresholdConfirmations) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{27} +} + +func (x *AwaitingThresholdConfirmations) GetChannelId() string { + if x != nil && x.ChannelId != nil { + return *x.ChannelId + } + return "" +} + +func (x *AwaitingThresholdConfirmations) GetLatestSpendingTxid() string { + if x != nil { + return x.LatestSpendingTxid + } + return "" +} + +func (x *AwaitingThresholdConfirmations) GetConfirmationHash() string { + if x != nil { + return x.ConfirmationHash + } + return "" +} + +func (x *AwaitingThresholdConfirmations) GetConfirmationHeight() uint32 { + if x != nil { + return x.ConfirmationHeight + } + return 0 +} + +func (x *AwaitingThresholdConfirmations) GetAmountSatoshis() uint64 { + if x != nil { + return x.AmountSatoshis + } + return 0 +} + +// Token used to determine start of next page in paginated APIs. +type PageToken struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + Index int64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PageToken) Reset() { + *x = PageToken{} + mi := &file_types_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PageToken) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PageToken) ProtoMessage() {} + +func (x *PageToken) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PageToken.ProtoReflect.Descriptor instead. +func (*PageToken) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{28} +} + +func (x *PageToken) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *PageToken) GetIndex() int64 { + if x != nil { + return x.Index + } + return 0 +} + +type Bolt11InvoiceDescription struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Kind: + // + // *Bolt11InvoiceDescription_Direct + // *Bolt11InvoiceDescription_Hash + Kind isBolt11InvoiceDescription_Kind `protobuf_oneof:"kind"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11InvoiceDescription) Reset() { + *x = Bolt11InvoiceDescription{} + mi := &file_types_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11InvoiceDescription) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11InvoiceDescription) ProtoMessage() {} + +func (x *Bolt11InvoiceDescription) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11InvoiceDescription.ProtoReflect.Descriptor instead. +func (*Bolt11InvoiceDescription) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{29} +} + +func (x *Bolt11InvoiceDescription) GetKind() isBolt11InvoiceDescription_Kind { + if x != nil { + return x.Kind + } + return nil +} + +func (x *Bolt11InvoiceDescription) GetDirect() string { + if x != nil { + if x, ok := x.Kind.(*Bolt11InvoiceDescription_Direct); ok { + return x.Direct + } + } + return "" +} + +func (x *Bolt11InvoiceDescription) GetHash() string { + if x != nil { + if x, ok := x.Kind.(*Bolt11InvoiceDescription_Hash); ok { + return x.Hash + } + } + return "" +} + +type isBolt11InvoiceDescription_Kind interface { + isBolt11InvoiceDescription_Kind() +} + +type Bolt11InvoiceDescription_Direct struct { + Direct string `protobuf:"bytes,1,opt,name=direct,proto3,oneof"` +} + +type Bolt11InvoiceDescription_Hash struct { + Hash string `protobuf:"bytes,2,opt,name=hash,proto3,oneof"` +} + +func (*Bolt11InvoiceDescription_Direct) isBolt11InvoiceDescription_Kind() {} + +func (*Bolt11InvoiceDescription_Hash) isBolt11InvoiceDescription_Kind() {} + +// Configuration options for payment routing and pathfinding. +// See https://docs.rs/lightning/0.2.0/lightning/routing/router/struct.RouteParametersConfig.html for more details on each field. +type RouteParametersConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The maximum total fees, in millisatoshi, that may accrue during route finding. + // Defaults to 1% of the payment amount + 50 sats + MaxTotalRoutingFeeMsat *uint64 `protobuf:"varint,1,opt,name=max_total_routing_fee_msat,json=maxTotalRoutingFeeMsat,proto3,oneof" json:"max_total_routing_fee_msat,omitempty"` + // The maximum total CLTV delta we accept for the route. + // Defaults to 1008. + MaxTotalCltvExpiryDelta uint32 `protobuf:"varint,2,opt,name=max_total_cltv_expiry_delta,json=maxTotalCltvExpiryDelta,proto3" json:"max_total_cltv_expiry_delta,omitempty"` + // The maximum number of paths that may be used by (MPP) payments. + // Defaults to 10. + MaxPathCount uint32 `protobuf:"varint,3,opt,name=max_path_count,json=maxPathCount,proto3" json:"max_path_count,omitempty"` + // Selects the maximum share of a channel's total capacity which will be + // sent over a channel, as a power of 1/2. + // Default value: 2 + MaxChannelSaturationPowerOfHalf uint32 `protobuf:"varint,4,opt,name=max_channel_saturation_power_of_half,json=maxChannelSaturationPowerOfHalf,proto3" json:"max_channel_saturation_power_of_half,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RouteParametersConfig) Reset() { + *x = RouteParametersConfig{} + mi := &file_types_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RouteParametersConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RouteParametersConfig) ProtoMessage() {} + +func (x *RouteParametersConfig) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RouteParametersConfig.ProtoReflect.Descriptor instead. +func (*RouteParametersConfig) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{30} +} + +func (x *RouteParametersConfig) GetMaxTotalRoutingFeeMsat() uint64 { + if x != nil && x.MaxTotalRoutingFeeMsat != nil { + return *x.MaxTotalRoutingFeeMsat + } + return 0 +} + +func (x *RouteParametersConfig) GetMaxTotalCltvExpiryDelta() uint32 { + if x != nil { + return x.MaxTotalCltvExpiryDelta + } + return 0 +} + +func (x *RouteParametersConfig) GetMaxPathCount() uint32 { + if x != nil { + return x.MaxPathCount + } + return 0 +} + +func (x *RouteParametersConfig) GetMaxChannelSaturationPowerOfHalf() uint32 { + if x != nil { + return x.MaxChannelSaturationPowerOfHalf + } + return 0 +} + +// Routing fees for a channel as part of the network graph. +type GraphRoutingFees struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Flat routing fee in millisatoshis. + BaseMsat uint32 `protobuf:"varint,1,opt,name=base_msat,json=baseMsat,proto3" json:"base_msat,omitempty"` + // Liquidity-based routing fee in millionths of a routed amount. + ProportionalMillionths uint32 `protobuf:"varint,2,opt,name=proportional_millionths,json=proportionalMillionths,proto3" json:"proportional_millionths,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GraphRoutingFees) Reset() { + *x = GraphRoutingFees{} + mi := &file_types_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GraphRoutingFees) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphRoutingFees) ProtoMessage() {} + +func (x *GraphRoutingFees) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GraphRoutingFees.ProtoReflect.Descriptor instead. +func (*GraphRoutingFees) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{31} +} + +func (x *GraphRoutingFees) GetBaseMsat() uint32 { + if x != nil { + return x.BaseMsat + } + return 0 +} + +func (x *GraphRoutingFees) GetProportionalMillionths() uint32 { + if x != nil { + return x.ProportionalMillionths + } + return 0 +} + +// Details about one direction of a channel in the network graph, +// as received within a `ChannelUpdate`. +type GraphChannelUpdate struct { + state protoimpl.MessageState `protogen:"open.v1"` + // When the last update to the channel direction was issued. + // Value is opaque, as set in the announcement. + LastUpdate uint32 `protobuf:"varint,1,opt,name=last_update,json=lastUpdate,proto3" json:"last_update,omitempty"` + // Whether the channel can be currently used for payments (in this one direction). + Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` + // The difference in CLTV values that you must have when routing through this channel. + CltvExpiryDelta uint32 `protobuf:"varint,3,opt,name=cltv_expiry_delta,json=cltvExpiryDelta,proto3" json:"cltv_expiry_delta,omitempty"` + // The minimum value, which must be relayed to the next hop via the channel. + HtlcMinimumMsat uint64 `protobuf:"varint,4,opt,name=htlc_minimum_msat,json=htlcMinimumMsat,proto3" json:"htlc_minimum_msat,omitempty"` + // The maximum value which may be relayed to the next hop via the channel. + HtlcMaximumMsat uint64 `protobuf:"varint,5,opt,name=htlc_maximum_msat,json=htlcMaximumMsat,proto3" json:"htlc_maximum_msat,omitempty"` + // Fees charged when the channel is used for routing. + Fees *GraphRoutingFees `protobuf:"bytes,6,opt,name=fees,proto3" json:"fees,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GraphChannelUpdate) Reset() { + *x = GraphChannelUpdate{} + mi := &file_types_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GraphChannelUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphChannelUpdate) ProtoMessage() {} + +func (x *GraphChannelUpdate) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GraphChannelUpdate.ProtoReflect.Descriptor instead. +func (*GraphChannelUpdate) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{32} +} + +func (x *GraphChannelUpdate) GetLastUpdate() uint32 { + if x != nil { + return x.LastUpdate + } + return 0 +} + +func (x *GraphChannelUpdate) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *GraphChannelUpdate) GetCltvExpiryDelta() uint32 { + if x != nil { + return x.CltvExpiryDelta + } + return 0 +} + +func (x *GraphChannelUpdate) GetHtlcMinimumMsat() uint64 { + if x != nil { + return x.HtlcMinimumMsat + } + return 0 +} + +func (x *GraphChannelUpdate) GetHtlcMaximumMsat() uint64 { + if x != nil { + return x.HtlcMaximumMsat + } + return 0 +} + +func (x *GraphChannelUpdate) GetFees() *GraphRoutingFees { + if x != nil { + return x.Fees + } + return nil +} + +// Details about a channel in the network graph (both directions). +// Received within a channel announcement. +type GraphChannel struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Source node of the first direction of the channel (hex-encoded public key). + NodeOne string `protobuf:"bytes,1,opt,name=node_one,json=nodeOne,proto3" json:"node_one,omitempty"` + // Source node of the second direction of the channel (hex-encoded public key). + NodeTwo string `protobuf:"bytes,2,opt,name=node_two,json=nodeTwo,proto3" json:"node_two,omitempty"` + // The channel capacity as seen on-chain, if chain lookup is available. + CapacitySats *uint64 `protobuf:"varint,3,opt,name=capacity_sats,json=capacitySats,proto3,oneof" json:"capacity_sats,omitempty"` + // Details about the first direction of a channel. + OneToTwo *GraphChannelUpdate `protobuf:"bytes,4,opt,name=one_to_two,json=oneToTwo,proto3" json:"one_to_two,omitempty"` + // Details about the second direction of a channel. + TwoToOne *GraphChannelUpdate `protobuf:"bytes,5,opt,name=two_to_one,json=twoToOne,proto3" json:"two_to_one,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GraphChannel) Reset() { + *x = GraphChannel{} + mi := &file_types_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GraphChannel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphChannel) ProtoMessage() {} + +func (x *GraphChannel) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GraphChannel.ProtoReflect.Descriptor instead. +func (*GraphChannel) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{33} +} + +func (x *GraphChannel) GetNodeOne() string { + if x != nil { + return x.NodeOne + } + return "" +} + +func (x *GraphChannel) GetNodeTwo() string { + if x != nil { + return x.NodeTwo + } + return "" +} + +func (x *GraphChannel) GetCapacitySats() uint64 { + if x != nil && x.CapacitySats != nil { + return *x.CapacitySats + } + return 0 +} + +func (x *GraphChannel) GetOneToTwo() *GraphChannelUpdate { + if x != nil { + return x.OneToTwo + } + return nil +} + +func (x *GraphChannel) GetTwoToOne() *GraphChannelUpdate { + if x != nil { + return x.TwoToOne + } + return nil +} + +// Information received in the latest node_announcement from this node. +type GraphNodeAnnouncement struct { + state protoimpl.MessageState `protogen:"open.v1"` + // When the last known update to the node state was issued. + // Value is opaque, as set in the announcement. + LastUpdate uint32 `protobuf:"varint,1,opt,name=last_update,json=lastUpdate,proto3" json:"last_update,omitempty"` + // Moniker assigned to the node. + // May be invalid or malicious (eg control chars), should not be exposed to the user. + Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` + // Color assigned to the node as a hex-encoded RGB string, e.g. "ff0000". + Rgb string `protobuf:"bytes,3,opt,name=rgb,proto3" json:"rgb,omitempty"` + // List of addresses on which this node is reachable. + Addresses []string `protobuf:"bytes,4,rep,name=addresses,proto3" json:"addresses,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GraphNodeAnnouncement) Reset() { + *x = GraphNodeAnnouncement{} + mi := &file_types_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GraphNodeAnnouncement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphNodeAnnouncement) ProtoMessage() {} + +func (x *GraphNodeAnnouncement) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GraphNodeAnnouncement.ProtoReflect.Descriptor instead. +func (*GraphNodeAnnouncement) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{34} +} + +func (x *GraphNodeAnnouncement) GetLastUpdate() uint32 { + if x != nil { + return x.LastUpdate + } + return 0 +} + +func (x *GraphNodeAnnouncement) GetAlias() string { + if x != nil { + return x.Alias + } + return "" +} + +func (x *GraphNodeAnnouncement) GetRgb() string { + if x != nil { + return x.Rgb + } + return "" +} + +func (x *GraphNodeAnnouncement) GetAddresses() []string { + if x != nil { + return x.Addresses + } + return nil +} + +// Details of a known Lightning peer. +// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.list_peers +type Peer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The hex-encoded node ID of the peer. + NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + // The network address of the peer. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // Indicates whether we'll try to reconnect to this peer after restarts. + IsPersisted bool `protobuf:"varint,3,opt,name=is_persisted,json=isPersisted,proto3" json:"is_persisted,omitempty"` + // Indicates whether we currently have an active connection with the peer. + IsConnected bool `protobuf:"varint,4,opt,name=is_connected,json=isConnected,proto3" json:"is_connected,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Peer) Reset() { + *x = Peer{} + mi := &file_types_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Peer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Peer) ProtoMessage() {} + +func (x *Peer) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Peer.ProtoReflect.Descriptor instead. +func (*Peer) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{35} +} + +func (x *Peer) GetNodeId() string { + if x != nil { + return x.NodeId + } + return "" +} + +func (x *Peer) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *Peer) GetIsPersisted() bool { + if x != nil { + return x.IsPersisted + } + return false +} + +func (x *Peer) GetIsConnected() bool { + if x != nil { + return x.IsConnected + } + return false +} + +// Details about a node in the network graph, known from the network announcement. +type GraphNode struct { + state protoimpl.MessageState `protogen:"open.v1"` + // All valid channels a node has announced. + Channels []uint64 `protobuf:"varint,1,rep,packed,name=channels,proto3" json:"channels,omitempty"` + // More information about a node from node_announcement. + // Optional because we store a node entry after learning about it from + // a channel announcement, but before receiving a node announcement. + AnnouncementInfo *GraphNodeAnnouncement `protobuf:"bytes,2,opt,name=announcement_info,json=announcementInfo,proto3" json:"announcement_info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GraphNode) Reset() { + *x = GraphNode{} + mi := &file_types_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GraphNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphNode) ProtoMessage() {} + +func (x *GraphNode) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GraphNode.ProtoReflect.Descriptor instead. +func (*GraphNode) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{36} +} + +func (x *GraphNode) GetChannels() []uint64 { + if x != nil { + return x.Channels + } + return nil +} + +func (x *GraphNode) GetAnnouncementInfo() *GraphNodeAnnouncement { + if x != nil { + return x.AnnouncementInfo + } + return nil +} + +// Route hint for finding a path to the payee in a BOLT11 invoice. +type Bolt11RouteHint struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The hops in this route hint. + HopHints []*Bolt11HopHint `protobuf:"bytes,1,rep,name=hop_hints,json=hopHints,proto3" json:"hop_hints,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11RouteHint) Reset() { + *x = Bolt11RouteHint{} + mi := &file_types_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11RouteHint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11RouteHint) ProtoMessage() {} + +func (x *Bolt11RouteHint) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11RouteHint.ProtoReflect.Descriptor instead. +func (*Bolt11RouteHint) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{37} +} + +func (x *Bolt11RouteHint) GetHopHints() []*Bolt11HopHint { + if x != nil { + return x.HopHints + } + return nil +} + +// A hop in a BOLT11 route hint. +type Bolt11HopHint struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The hex-encoded public key of the node at this hop. + NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + // The short channel ID. + ShortChannelId uint64 `protobuf:"varint,2,opt,name=short_channel_id,json=shortChannelId,proto3" json:"short_channel_id,omitempty"` + // The base fee in millisatoshis charged for routing through this hop. + FeeBaseMsat uint32 `protobuf:"varint,3,opt,name=fee_base_msat,json=feeBaseMsat,proto3" json:"fee_base_msat,omitempty"` + // Fee proportional millionths charged for routing through this hop. + FeeProportionalMillionths uint32 `protobuf:"varint,4,opt,name=fee_proportional_millionths,json=feeProportionalMillionths,proto3" json:"fee_proportional_millionths,omitempty"` + // The CLTV expiry delta for this hop. + CltvExpiryDelta uint32 `protobuf:"varint,5,opt,name=cltv_expiry_delta,json=cltvExpiryDelta,proto3" json:"cltv_expiry_delta,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11HopHint) Reset() { + *x = Bolt11HopHint{} + mi := &file_types_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11HopHint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11HopHint) ProtoMessage() {} + +func (x *Bolt11HopHint) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11HopHint.ProtoReflect.Descriptor instead. +func (*Bolt11HopHint) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{38} +} + +func (x *Bolt11HopHint) GetNodeId() string { + if x != nil { + return x.NodeId + } + return "" +} + +func (x *Bolt11HopHint) GetShortChannelId() uint64 { + if x != nil { + return x.ShortChannelId + } + return 0 +} + +func (x *Bolt11HopHint) GetFeeBaseMsat() uint32 { + if x != nil { + return x.FeeBaseMsat + } + return 0 +} + +func (x *Bolt11HopHint) GetFeeProportionalMillionths() uint32 { + if x != nil { + return x.FeeProportionalMillionths + } + return 0 +} + +func (x *Bolt11HopHint) GetCltvExpiryDelta() uint32 { + if x != nil { + return x.CltvExpiryDelta + } + return 0 +} + +// The amount specified in a BOLT12 offer. +type OfferAmount struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Amount: + // + // *OfferAmount_BitcoinAmountMsats + // *OfferAmount_CurrencyAmount + Amount isOfferAmount_Amount `protobuf_oneof:"amount"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OfferAmount) Reset() { + *x = OfferAmount{} + mi := &file_types_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OfferAmount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OfferAmount) ProtoMessage() {} + +func (x *OfferAmount) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OfferAmount.ProtoReflect.Descriptor instead. +func (*OfferAmount) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{39} +} + +func (x *OfferAmount) GetAmount() isOfferAmount_Amount { + if x != nil { + return x.Amount + } + return nil +} + +func (x *OfferAmount) GetBitcoinAmountMsats() uint64 { + if x != nil { + if x, ok := x.Amount.(*OfferAmount_BitcoinAmountMsats); ok { + return x.BitcoinAmountMsats + } + } + return 0 +} + +func (x *OfferAmount) GetCurrencyAmount() *CurrencyAmount { + if x != nil { + if x, ok := x.Amount.(*OfferAmount_CurrencyAmount); ok { + return x.CurrencyAmount + } + } + return nil +} + +type isOfferAmount_Amount interface { + isOfferAmount_Amount() +} + +type OfferAmount_BitcoinAmountMsats struct { + // Amount in millisatoshis for Bitcoin payments. + BitcoinAmountMsats uint64 `protobuf:"varint,1,opt,name=bitcoin_amount_msats,json=bitcoinAmountMsats,proto3,oneof"` +} + +type OfferAmount_CurrencyAmount struct { + // Amount in a non-Bitcoin currency. + CurrencyAmount *CurrencyAmount `protobuf:"bytes,2,opt,name=currency_amount,json=currencyAmount,proto3,oneof"` +} + +func (*OfferAmount_BitcoinAmountMsats) isOfferAmount_Amount() {} + +func (*OfferAmount_CurrencyAmount) isOfferAmount_Amount() {} + +// A non-Bitcoin currency amount. +type CurrencyAmount struct { + state protoimpl.MessageState `protogen:"open.v1"` + // ISO 4217 currency code (e.g., "USD", "EUR"). + Iso4217Code string `protobuf:"bytes,1,opt,name=iso4217_code,json=iso4217Code,proto3" json:"iso4217_code,omitempty"` + // The amount in the specified currency's minor unit. + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CurrencyAmount) Reset() { + *x = CurrencyAmount{} + mi := &file_types_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CurrencyAmount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CurrencyAmount) ProtoMessage() {} + +func (x *CurrencyAmount) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CurrencyAmount.ProtoReflect.Descriptor instead. +func (*CurrencyAmount) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{40} +} + +func (x *CurrencyAmount) GetIso4217Code() string { + if x != nil { + return x.Iso4217Code + } + return "" +} + +func (x *CurrencyAmount) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +// The quantity of items supported by a BOLT12 offer. +type OfferQuantity struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Quantity: + // + // *OfferQuantity_One + // *OfferQuantity_Bounded + // *OfferQuantity_Unbounded + Quantity isOfferQuantity_Quantity `protobuf_oneof:"quantity"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OfferQuantity) Reset() { + *x = OfferQuantity{} + mi := &file_types_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OfferQuantity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OfferQuantity) ProtoMessage() {} + +func (x *OfferQuantity) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OfferQuantity.ProtoReflect.Descriptor instead. +func (*OfferQuantity) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{41} +} + +func (x *OfferQuantity) GetQuantity() isOfferQuantity_Quantity { + if x != nil { + return x.Quantity + } + return nil +} + +func (x *OfferQuantity) GetOne() bool { + if x != nil { + if x, ok := x.Quantity.(*OfferQuantity_One); ok { + return x.One + } + } + return false +} + +func (x *OfferQuantity) GetBounded() uint64 { + if x != nil { + if x, ok := x.Quantity.(*OfferQuantity_Bounded); ok { + return x.Bounded + } + } + return 0 +} + +func (x *OfferQuantity) GetUnbounded() bool { + if x != nil { + if x, ok := x.Quantity.(*OfferQuantity_Unbounded); ok { + return x.Unbounded + } + } + return false +} + +type isOfferQuantity_Quantity interface { + isOfferQuantity_Quantity() +} + +type OfferQuantity_One struct { + // Only one item may be requested. + One bool `protobuf:"varint,1,opt,name=one,proto3,oneof"` +} + +type OfferQuantity_Bounded struct { + // Up to this many items may be requested. + Bounded uint64 `protobuf:"varint,2,opt,name=bounded,proto3,oneof"` +} + +type OfferQuantity_Unbounded struct { + // Any number of items may be requested. + Unbounded bool `protobuf:"varint,3,opt,name=unbounded,proto3,oneof"` +} + +func (*OfferQuantity_One) isOfferQuantity_Quantity() {} + +func (*OfferQuantity_Bounded) isOfferQuantity_Quantity() {} + +func (*OfferQuantity_Unbounded) isOfferQuantity_Quantity() {} + +// A blinded path to the offer recipient. +type BlindedPath struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Identifies the introduction node of the blinded path, either directly by + // node id or indirectly via a directed short channel ID. + // + // Types that are valid to be assigned to IntroductionNode: + // + // *BlindedPath_NodeId + // *BlindedPath_DirectedScid + IntroductionNode isBlindedPath_IntroductionNode `protobuf_oneof:"introduction_node"` + // The hex-encoded blinding point. + BlindingPoint string `protobuf:"bytes,3,opt,name=blinding_point,json=blindingPoint,proto3" json:"blinding_point,omitempty"` + // The number of blinded hops in the path. + NumHops uint32 `protobuf:"varint,4,opt,name=num_hops,json=numHops,proto3" json:"num_hops,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BlindedPath) Reset() { + *x = BlindedPath{} + mi := &file_types_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BlindedPath) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlindedPath) ProtoMessage() {} + +func (x *BlindedPath) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[42] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlindedPath.ProtoReflect.Descriptor instead. +func (*BlindedPath) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{42} +} + +func (x *BlindedPath) GetIntroductionNode() isBlindedPath_IntroductionNode { + if x != nil { + return x.IntroductionNode + } + return nil +} + +func (x *BlindedPath) GetNodeId() string { + if x != nil { + if x, ok := x.IntroductionNode.(*BlindedPath_NodeId); ok { + return x.NodeId + } + } + return "" +} + +func (x *BlindedPath) GetDirectedScid() *DirectedShortChannelId { + if x != nil { + if x, ok := x.IntroductionNode.(*BlindedPath_DirectedScid); ok { + return x.DirectedScid + } + } + return nil +} + +func (x *BlindedPath) GetBlindingPoint() string { + if x != nil { + return x.BlindingPoint + } + return "" +} + +func (x *BlindedPath) GetNumHops() uint32 { + if x != nil { + return x.NumHops + } + return 0 +} + +type isBlindedPath_IntroductionNode interface { + isBlindedPath_IntroductionNode() +} + +type BlindedPath_NodeId struct { + // The hex-encoded public key of the introduction node. + NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3,oneof"` +} + +type BlindedPath_DirectedScid struct { + // The directed short channel ID identifying the introduction node. + DirectedScid *DirectedShortChannelId `protobuf:"bytes,2,opt,name=directed_scid,json=directedScid,proto3,oneof"` +} + +func (*BlindedPath_NodeId) isBlindedPath_IntroductionNode() {} + +func (*BlindedPath_DirectedScid) isBlindedPath_IntroductionNode() {} + +// A short channel ID together with a direction byte identifying one of the +// channel's two endpoints. +type DirectedShortChannelId struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The short channel ID. + Scid uint64 `protobuf:"varint,1,opt,name=scid,proto3" json:"scid,omitempty"` + // Which endpoint of the channel is being referred to. + Direction ChannelDirection `protobuf:"varint,2,opt,name=direction,proto3,enum=types.ChannelDirection" json:"direction,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DirectedShortChannelId) Reset() { + *x = DirectedShortChannelId{} + mi := &file_types_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DirectedShortChannelId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DirectedShortChannelId) ProtoMessage() {} + +func (x *DirectedShortChannelId) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DirectedShortChannelId.ProtoReflect.Descriptor instead. +func (*DirectedShortChannelId) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{43} +} + +func (x *DirectedShortChannelId) GetScid() uint64 { + if x != nil { + return x.Scid + } + return 0 +} + +func (x *DirectedShortChannelId) GetDirection() ChannelDirection { + if x != nil { + return x.Direction + } + return ChannelDirection_NODE_ONE +} + +// A feature bit advertised in a BOLT11 invoice. +type Bolt11Feature struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Human-readable feature name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Whether this feature is required. + IsRequired bool `protobuf:"varint,2,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"` + // Whether this feature is known. + IsKnown bool `protobuf:"varint,3,opt,name=is_known,json=isKnown,proto3" json:"is_known,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Bolt11Feature) Reset() { + *x = Bolt11Feature{} + mi := &file_types_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bolt11Feature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bolt11Feature) ProtoMessage() {} + +func (x *Bolt11Feature) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bolt11Feature.ProtoReflect.Descriptor instead. +func (*Bolt11Feature) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{44} +} + +func (x *Bolt11Feature) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Bolt11Feature) GetIsRequired() bool { + if x != nil { + return x.IsRequired + } + return false +} + +func (x *Bolt11Feature) GetIsKnown() bool { + if x != nil { + return x.IsKnown + } + return false +} + +// Custom TLV record attached to a payment. +type CustomTlvRecord struct { + state protoimpl.MessageState `protogen:"open.v1"` + // TLV type number. + TypeNum uint64 `protobuf:"varint,1,opt,name=type_num,json=typeNum,proto3" json:"type_num,omitempty"` + // Raw TLV value. + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CustomTlvRecord) Reset() { + *x = CustomTlvRecord{} + mi := &file_types_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CustomTlvRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomTlvRecord) ProtoMessage() {} + +func (x *CustomTlvRecord) ProtoReflect() protoreflect.Message { + mi := &file_types_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomTlvRecord.ProtoReflect.Descriptor instead. +func (*CustomTlvRecord) Descriptor() ([]byte, []int) { + return file_types_proto_rawDescGZIP(), []int{45} +} + +func (x *CustomTlvRecord) GetTypeNum() uint64 { + if x != nil { + return x.TypeNum + } + return 0 +} + +func (x *CustomTlvRecord) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +var File_types_proto protoreflect.FileDescriptor + +const file_types_proto_rawDesc = "" + + "\n" + + "\vtypes.proto\x12\x05types\"\xcf\x02\n" + + "\aPayment\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12&\n" + + "\x04kind\x18\x02 \x01(\v2\x12.types.PaymentKindR\x04kind\x12$\n" + + "\vamount_msat\x18\x03 \x01(\x04H\x00R\n" + + "amountMsat\x88\x01\x01\x12'\n" + + "\rfee_paid_msat\x18\a \x01(\x04H\x01R\vfeePaidMsat\x88\x01\x01\x125\n" + + "\tdirection\x18\x04 \x01(\x0e2\x17.types.PaymentDirectionR\tdirection\x12,\n" + + "\x06status\x18\x05 \x01(\x0e2\x14.types.PaymentStatusR\x06status\x126\n" + + "\x17latest_update_timestamp\x18\x06 \x01(\x04R\x15latestUpdateTimestampB\x0e\n" + + "\f_amount_msatB\x10\n" + + "\x0e_fee_paid_msat\"\x97\x02\n" + + "\vPaymentKind\x12*\n" + + "\aonchain\x18\x01 \x01(\v2\x0e.types.OnchainH\x00R\aonchain\x12'\n" + + "\x06bolt11\x18\x02 \x01(\v2\r.types.Bolt11H\x00R\x06bolt11\x127\n" + + "\fbolt12_offer\x18\x03 \x01(\v2\x12.types.Bolt12OfferH\x00R\vbolt12Offer\x12:\n" + + "\rbolt12_refund\x18\x04 \x01(\v2\x13.types.Bolt12RefundH\x00R\fbolt12Refund\x126\n" + + "\vspontaneous\x18\x05 \x01(\v2\x12.types.SpontaneousH\x00R\vspontaneousB\x06\n" + + "\x04kind\"P\n" + + "\aOnchain\x12\x12\n" + + "\x04txid\x18\x01 \x01(\tR\x04txid\x121\n" + + "\x06status\x18\x02 \x01(\v2\x19.types.ConfirmationStatusR\x06status\"\x88\x01\n" + + "\x12ConfirmationStatus\x120\n" + + "\tconfirmed\x18\x01 \x01(\v2\x10.types.ConfirmedH\x00R\tconfirmed\x126\n" + + "\vunconfirmed\x18\x02 \x01(\v2\x12.types.UnconfirmedH\x00R\vunconfirmedB\b\n" + + "\x06status\"`\n" + + "\tConfirmed\x12\x1d\n" + + "\n" + + "block_hash\x18\x01 \x01(\tR\tblockHash\x12\x16\n" + + "\x06height\x18\x02 \x01(\rR\x06height\x12\x1c\n" + + "\ttimestamp\x18\x03 \x01(\x04R\ttimestamp\"\r\n" + + "\vUnconfirmed\"\xdc\x01\n" + + "\x06Bolt11\x12\x12\n" + + "\x04hash\x18\x01 \x01(\tR\x04hash\x12\x1f\n" + + "\bpreimage\x18\x02 \x01(\tH\x00R\bpreimage\x88\x01\x01\x12\x1b\n" + + "\x06secret\x18\x03 \x01(\fH\x01R\x06secret\x88\x01\x01\x12F\n" + + "\x1dcounterparty_skimmed_fee_msat\x18\x04 \x01(\x04H\x02R\x1acounterpartySkimmedFeeMsat\x88\x01\x01B\v\n" + + "\t_preimageB\t\n" + + "\a_secretB \n" + + "\x1e_counterparty_skimmed_fee_msat\"\x81\x02\n" + + "\vBolt12Offer\x12\x17\n" + + "\x04hash\x18\x01 \x01(\tH\x00R\x04hash\x88\x01\x01\x12\x1f\n" + + "\bpreimage\x18\x02 \x01(\tH\x01R\bpreimage\x88\x01\x01\x12\x1b\n" + + "\x06secret\x18\x03 \x01(\fH\x02R\x06secret\x88\x01\x01\x12\x19\n" + + "\boffer_id\x18\x04 \x01(\tR\aofferId\x12\"\n" + + "\n" + + "payer_note\x18\x05 \x01(\tH\x03R\tpayerNote\x88\x01\x01\x12\x1f\n" + + "\bquantity\x18\x06 \x01(\x04H\x04R\bquantity\x88\x01\x01B\a\n" + + "\x05_hashB\v\n" + + "\t_preimageB\t\n" + + "\a_secretB\r\n" + + "\v_payer_noteB\v\n" + + "\t_quantity\"\xe7\x01\n" + + "\fBolt12Refund\x12\x17\n" + + "\x04hash\x18\x01 \x01(\tH\x00R\x04hash\x88\x01\x01\x12\x1f\n" + + "\bpreimage\x18\x02 \x01(\tH\x01R\bpreimage\x88\x01\x01\x12\x1b\n" + + "\x06secret\x18\x03 \x01(\fH\x02R\x06secret\x88\x01\x01\x12\"\n" + + "\n" + + "payer_note\x18\x05 \x01(\tH\x03R\tpayerNote\x88\x01\x01\x12\x1f\n" + + "\bquantity\x18\x06 \x01(\x04H\x04R\bquantity\x88\x01\x01B\a\n" + + "\x05_hashB\v\n" + + "\t_preimageB\t\n" + + "\a_secretB\r\n" + + "\v_payer_noteB\v\n" + + "\t_quantity\"O\n" + + "\vSpontaneous\x12\x12\n" + + "\x04hash\x18\x01 \x01(\tR\x04hash\x12\x1f\n" + + "\bpreimage\x18\x02 \x01(\tH\x00R\bpreimage\x88\x01\x01B\v\n" + + "\t_preimage\"\xee\x01\n" + + "\fLSPFeeLimits\x12?\n" + + "\x1amax_total_opening_fee_msat\x18\x01 \x01(\x04H\x00R\x16maxTotalOpeningFeeMsat\x88\x01\x01\x12T\n" + + "%max_proportional_opening_fee_ppm_msat\x18\x02 \x01(\x04H\x01R maxProportionalOpeningFeePpmMsat\x88\x01\x01B\x1d\n" + + "\x1b_max_total_opening_fee_msatB(\n" + + "&_max_proportional_opening_fee_ppm_msat\"\x97\x01\n" + + "\vHtlcLocator\x12\x1d\n" + + "\n" + + "channel_id\x18\x01 \x01(\tR\tchannelId\x12+\n" + + "\x0fuser_channel_id\x18\x02 \x01(\tH\x00R\ruserChannelId\x88\x01\x01\x12\x1c\n" + + "\anode_id\x18\x03 \x01(\tH\x01R\x06nodeId\x88\x01\x01B\x12\n" + + "\x10_user_channel_idB\n" + + "\n" + + "\b_node_id\"\xae\x03\n" + + "\x10ForwardedPayment\x126\n" + + "\x15total_fee_earned_msat\x18\x01 \x01(\x04H\x00R\x12totalFeeEarnedMsat\x88\x01\x01\x12-\n" + + "\x10skimmed_fee_msat\x18\x02 \x01(\x04H\x01R\x0eskimmedFeeMsat\x88\x01\x01\x121\n" + + "\x15claim_from_onchain_tx\x18\x03 \x01(\bR\x12claimFromOnchainTx\x12H\n" + + "\x1eoutbound_amount_forwarded_msat\x18\x04 \x01(\x04H\x02R\x1boutboundAmountForwardedMsat\x88\x01\x01\x121\n" + + "\n" + + "prev_htlcs\x18\x05 \x03(\v2\x12.types.HtlcLocatorR\tprevHtlcs\x121\n" + + "\n" + + "next_htlcs\x18\x06 \x03(\v2\x12.types.HtlcLocatorR\tnextHtlcsB\x18\n" + + "\x16_total_fee_earned_msatB\x13\n" + + "\x11_skimmed_fee_msatB!\n" + + "\x1f_outbound_amount_forwarded_msat\"\x99\x0f\n" + + "\aChannel\x12\x1d\n" + + "\n" + + "channel_id\x18\x01 \x01(\tR\tchannelId\x120\n" + + "\x14counterparty_node_id\x18\x02 \x01(\tR\x12counterpartyNodeId\x125\n" + + "\vfunding_txo\x18\x03 \x01(\v2\x0f.types.OutPointH\x00R\n" + + "fundingTxo\x88\x01\x01\x12&\n" + + "\x0fuser_channel_id\x18\x04 \x01(\tR\ruserChannelId\x12I\n" + + "\x1eunspendable_punishment_reserve\x18\x05 \x01(\x04H\x01R\x1cunspendablePunishmentReserve\x88\x01\x01\x12,\n" + + "\x12channel_value_sats\x18\x06 \x01(\x04R\x10channelValueSats\x12<\n" + + "\x1bfeerate_sat_per_1000_weight\x18\a \x01(\rR\x17feerateSatPer1000Weight\x124\n" + + "\x16outbound_capacity_msat\x18\b \x01(\x04R\x14outboundCapacityMsat\x122\n" + + "\x15inbound_capacity_msat\x18\t \x01(\x04R\x13inboundCapacityMsat\x12:\n" + + "\x16confirmations_required\x18\n" + + " \x01(\rH\x02R\x15confirmationsRequired\x88\x01\x01\x12)\n" + + "\rconfirmations\x18\v \x01(\rH\x03R\rconfirmations\x88\x01\x01\x12\x1f\n" + + "\vis_outbound\x18\f \x01(\bR\n" + + "isOutbound\x12(\n" + + "\x10is_channel_ready\x18\r \x01(\bR\x0eisChannelReady\x12\x1b\n" + + "\tis_usable\x18\x0e \x01(\bR\bisUsable\x12!\n" + + "\fis_announced\x18\x0f \x01(\bR\visAnnounced\x12;\n" + + "\x0echannel_config\x18\x10 \x01(\v2\x14.types.ChannelConfigR\rchannelConfig\x12@\n" + + "\x1dnext_outbound_htlc_limit_msat\x18\x11 \x01(\x04R\x19nextOutboundHtlcLimitMsat\x12D\n" + + "\x1fnext_outbound_htlc_minimum_msat\x18\x12 \x01(\x04R\x1bnextOutboundHtlcMinimumMsat\x12:\n" + + "\x17force_close_spend_delay\x18\x13 \x01(\rH\x04R\x14forceCloseSpendDelay\x88\x01\x01\x12Y\n" + + "'counterparty_outbound_htlc_minimum_msat\x18\x14 \x01(\x04H\x05R#counterpartyOutboundHtlcMinimumMsat\x88\x01\x01\x12Y\n" + + "'counterparty_outbound_htlc_maximum_msat\x18\x15 \x01(\x04H\x06R#counterpartyOutboundHtlcMaximumMsat\x88\x01\x01\x12]\n" + + "+counterparty_unspendable_punishment_reserve\x18\x16 \x01(\x04R(counterpartyUnspendablePunishmentReserve\x12^\n" + + "*counterparty_forwarding_info_fee_base_msat\x18\x17 \x01(\rH\aR%counterpartyForwardingInfoFeeBaseMsat\x88\x01\x01\x12z\n" + + "8counterparty_forwarding_info_fee_proportional_millionths\x18\x18 \x01(\rH\bR3counterpartyForwardingInfoFeeProportionalMillionths\x88\x01\x01\x12f\n" + + ".counterparty_forwarding_info_cltv_expiry_delta\x18\x19 \x01(\rH\tR)counterpartyForwardingInfoCltvExpiryDelta\x88\x01\x01B\x0e\n" + + "\f_funding_txoB!\n" + + "\x1f_unspendable_punishment_reserveB\x19\n" + + "\x17_confirmations_requiredB\x10\n" + + "\x0e_confirmationsB\x1a\n" + + "\x18_force_close_spend_delayB*\n" + + "(_counterparty_outbound_htlc_minimum_msatB*\n" + + "(_counterparty_outbound_htlc_maximum_msatB-\n" + + "+_counterparty_forwarding_info_fee_base_msatB;\n" + + "9_counterparty_forwarding_info_fee_proportional_millionthsB1\n" + + "/_counterparty_forwarding_info_cltv_expiry_delta\"\x8d\x05\n" + + "\rChannelConfig\x12X\n" + + "&forwarding_fee_proportional_millionths\x18\x01 \x01(\rH\x01R#forwardingFeeProportionalMillionths\x88\x01\x01\x12<\n" + + "\x18forwarding_fee_base_msat\x18\x02 \x01(\rH\x02R\x15forwardingFeeBaseMsat\x88\x01\x01\x12/\n" + + "\x11cltv_expiry_delta\x18\x03 \x01(\rH\x03R\x0fcltvExpiryDelta\x88\x01\x01\x12V\n" + + "&force_close_avoidance_max_fee_satoshis\x18\x04 \x01(\x04H\x04R!forceCloseAvoidanceMaxFeeSatoshis\x88\x01\x01\x12=\n" + + "\x18accept_underpaying_htlcs\x18\x05 \x01(\bH\x05R\x16acceptUnderpayingHtlcs\x88\x01\x01\x12*\n" + + "\x10fixed_limit_msat\x18\x06 \x01(\x04H\x00R\x0efixedLimitMsat\x120\n" + + "\x13fee_rate_multiplier\x18\a \x01(\x04H\x00R\x11feeRateMultiplierB\x18\n" + + "\x16max_dust_htlc_exposureB)\n" + + "'_forwarding_fee_proportional_millionthsB\x1b\n" + + "\x19_forwarding_fee_base_msatB\x14\n" + + "\x12_cltv_expiry_deltaB)\n" + + "'_force_close_avoidance_max_fee_satoshisB\x1b\n" + + "\x19_accept_underpaying_htlcs\"2\n" + + "\bOutPoint\x12\x12\n" + + "\x04txid\x18\x01 \x01(\tR\x04txid\x12\x12\n" + + "\x04vout\x18\x02 \x01(\rR\x04vout\"B\n" + + "\tBestBlock\x12\x1d\n" + + "\n" + + "block_hash\x18\x01 \x01(\tR\tblockHash\x12\x16\n" + + "\x06height\x18\x02 \x01(\rR\x06height\"\x95\x05\n" + + "\x10LightningBalance\x12]\n" + + "\x1aclaimable_on_channel_close\x18\x01 \x01(\v2\x1e.types.ClaimableOnChannelCloseH\x00R\x17claimableOnChannelClose\x12q\n" + + " claimable_awaiting_confirmations\x18\x02 \x01(\v2%.types.ClaimableAwaitingConfirmationsH\x00R\x1eclaimableAwaitingConfirmations\x12R\n" + + "\x15contentious_claimable\x18\x03 \x01(\v2\x1b.types.ContentiousClaimableH\x00R\x14contentiousClaimable\x12c\n" + + "\x1cmaybe_timeout_claimable_htlc\x18\x04 \x01(\v2 .types.MaybeTimeoutClaimableHTLCH\x00R\x19maybeTimeoutClaimableHtlc\x12f\n" + + "\x1dmaybe_preimage_claimable_htlc\x18\x05 \x01(\v2!.types.MaybePreimageClaimableHTLCH\x00R\x1amaybePreimageClaimableHtlc\x12~\n" + + "%counterparty_revoked_output_claimable\x18\x06 \x01(\v2).types.CounterpartyRevokedOutputClaimableH\x00R\"counterpartyRevokedOutputClaimableB\x0e\n" + + "\fbalance_type\"\xf0\x03\n" + + "\x17ClaimableOnChannelClose\x12\x1d\n" + + "\n" + + "channel_id\x18\x01 \x01(\tR\tchannelId\x120\n" + + "\x14counterparty_node_id\x18\x02 \x01(\tR\x12counterpartyNodeId\x12'\n" + + "\x0famount_satoshis\x18\x03 \x01(\x04R\x0eamountSatoshis\x128\n" + + "\x18transaction_fee_satoshis\x18\x04 \x01(\x04R\x16transactionFeeSatoshis\x12J\n" + + "\"outbound_payment_htlc_rounded_msat\x18\x05 \x01(\x04R\x1eoutboundPaymentHtlcRoundedMsat\x12N\n" + + "$outbound_forwarded_htlc_rounded_msat\x18\x06 \x01(\x04R outboundForwardedHtlcRoundedMsat\x12J\n" + + "\"inbound_claiming_htlc_rounded_msat\x18\a \x01(\x04R\x1einboundClaimingHtlcRoundedMsat\x129\n" + + "\x19inbound_htlc_rounded_msat\x18\b \x01(\x04R\x16inboundHtlcRoundedMsat\"\xf9\x01\n" + + "\x1eClaimableAwaitingConfirmations\x12\x1d\n" + + "\n" + + "channel_id\x18\x01 \x01(\tR\tchannelId\x120\n" + + "\x14counterparty_node_id\x18\x02 \x01(\tR\x12counterpartyNodeId\x12'\n" + + "\x0famount_satoshis\x18\x03 \x01(\x04R\x0eamountSatoshis\x12/\n" + + "\x13confirmation_height\x18\x04 \x01(\rR\x12confirmationHeight\x12,\n" + + "\x06source\x18\x05 \x01(\x0e2\x14.types.BalanceSourceR\x06source\"\x85\x02\n" + + "\x14ContentiousClaimable\x12\x1d\n" + + "\n" + + "channel_id\x18\x01 \x01(\tR\tchannelId\x120\n" + + "\x14counterparty_node_id\x18\x02 \x01(\tR\x12counterpartyNodeId\x12'\n" + + "\x0famount_satoshis\x18\x03 \x01(\x04R\x0eamountSatoshis\x12%\n" + + "\x0etimeout_height\x18\x04 \x01(\rR\rtimeoutHeight\x12!\n" + + "\fpayment_hash\x18\x05 \x01(\tR\vpaymentHash\x12)\n" + + "\x10payment_preimage\x18\x06 \x01(\tR\x0fpaymentPreimage\"\x8e\x02\n" + + "\x19MaybeTimeoutClaimableHTLC\x12\x1d\n" + + "\n" + + "channel_id\x18\x01 \x01(\tR\tchannelId\x120\n" + + "\x14counterparty_node_id\x18\x02 \x01(\tR\x12counterpartyNodeId\x12'\n" + + "\x0famount_satoshis\x18\x03 \x01(\x04R\x0eamountSatoshis\x12)\n" + + "\x10claimable_height\x18\x04 \x01(\rR\x0fclaimableHeight\x12!\n" + + "\fpayment_hash\x18\x05 \x01(\tR\vpaymentHash\x12)\n" + + "\x10outbound_payment\x18\x06 \x01(\bR\x0foutboundPayment\"\xde\x01\n" + + "\x1aMaybePreimageClaimableHTLC\x12\x1d\n" + + "\n" + + "channel_id\x18\x01 \x01(\tR\tchannelId\x120\n" + + "\x14counterparty_node_id\x18\x02 \x01(\tR\x12counterpartyNodeId\x12'\n" + + "\x0famount_satoshis\x18\x03 \x01(\x04R\x0eamountSatoshis\x12#\n" + + "\rexpiry_height\x18\x04 \x01(\rR\fexpiryHeight\x12!\n" + + "\fpayment_hash\x18\x05 \x01(\tR\vpaymentHash\"\x9e\x01\n" + + "\"CounterpartyRevokedOutputClaimable\x12\x1d\n" + + "\n" + + "channel_id\x18\x01 \x01(\tR\tchannelId\x120\n" + + "\x14counterparty_node_id\x18\x02 \x01(\tR\x12counterpartyNodeId\x12'\n" + + "\x0famount_satoshis\x18\x03 \x01(\x04R\x0eamountSatoshis\"\xd0\x02\n" + + "\x13PendingSweepBalance\x12F\n" + + "\x11pending_broadcast\x18\x01 \x01(\v2\x17.types.PendingBroadcastH\x00R\x10pendingBroadcast\x12n\n" + + "\x1fbroadcast_awaiting_confirmation\x18\x02 \x01(\v2$.types.BroadcastAwaitingConfirmationH\x00R\x1dbroadcastAwaitingConfirmation\x12q\n" + + " awaiting_threshold_confirmations\x18\x03 \x01(\v2%.types.AwaitingThresholdConfirmationsH\x00R\x1eawaitingThresholdConfirmationsB\x0e\n" + + "\fbalance_type\"n\n" + + "\x10PendingBroadcast\x12\"\n" + + "\n" + + "channel_id\x18\x01 \x01(\tH\x00R\tchannelId\x88\x01\x01\x12'\n" + + "\x0famount_satoshis\x18\x02 \x01(\x04R\x0eamountSatoshisB\r\n" + + "\v_channel_id\"\xe5\x01\n" + + "\x1dBroadcastAwaitingConfirmation\x12\"\n" + + "\n" + + "channel_id\x18\x01 \x01(\tH\x00R\tchannelId\x88\x01\x01\x126\n" + + "\x17latest_broadcast_height\x18\x02 \x01(\rR\x15latestBroadcastHeight\x120\n" + + "\x14latest_spending_txid\x18\x03 \x01(\tR\x12latestSpendingTxid\x12'\n" + + "\x0famount_satoshis\x18\x04 \x01(\x04R\x0eamountSatoshisB\r\n" + + "\v_channel_id\"\x8c\x02\n" + + "\x1eAwaitingThresholdConfirmations\x12\"\n" + + "\n" + + "channel_id\x18\x01 \x01(\tH\x00R\tchannelId\x88\x01\x01\x120\n" + + "\x14latest_spending_txid\x18\x02 \x01(\tR\x12latestSpendingTxid\x12+\n" + + "\x11confirmation_hash\x18\x03 \x01(\tR\x10confirmationHash\x12/\n" + + "\x13confirmation_height\x18\x04 \x01(\rR\x12confirmationHeight\x12'\n" + + "\x0famount_satoshis\x18\x05 \x01(\x04R\x0eamountSatoshisB\r\n" + + "\v_channel_id\"7\n" + + "\tPageToken\x12\x14\n" + + "\x05token\x18\x01 \x01(\tR\x05token\x12\x14\n" + + "\x05index\x18\x02 \x01(\x03R\x05index\"R\n" + + "\x18Bolt11InvoiceDescription\x12\x18\n" + + "\x06direct\x18\x01 \x01(\tH\x00R\x06direct\x12\x14\n" + + "\x04hash\x18\x02 \x01(\tH\x00R\x04hashB\x06\n" + + "\x04kind\"\xaa\x02\n" + + "\x15RouteParametersConfig\x12?\n" + + "\x1amax_total_routing_fee_msat\x18\x01 \x01(\x04H\x00R\x16maxTotalRoutingFeeMsat\x88\x01\x01\x12<\n" + + "\x1bmax_total_cltv_expiry_delta\x18\x02 \x01(\rR\x17maxTotalCltvExpiryDelta\x12$\n" + + "\x0emax_path_count\x18\x03 \x01(\rR\fmaxPathCount\x12M\n" + + "$max_channel_saturation_power_of_half\x18\x04 \x01(\rR\x1fmaxChannelSaturationPowerOfHalfB\x1d\n" + + "\x1b_max_total_routing_fee_msat\"h\n" + + "\x10GraphRoutingFees\x12\x1b\n" + + "\tbase_msat\x18\x01 \x01(\rR\bbaseMsat\x127\n" + + "\x17proportional_millionths\x18\x02 \x01(\rR\x16proportionalMillionths\"\x80\x02\n" + + "\x12GraphChannelUpdate\x12\x1f\n" + + "\vlast_update\x18\x01 \x01(\rR\n" + + "lastUpdate\x12\x18\n" + + "\aenabled\x18\x02 \x01(\bR\aenabled\x12*\n" + + "\x11cltv_expiry_delta\x18\x03 \x01(\rR\x0fcltvExpiryDelta\x12*\n" + + "\x11htlc_minimum_msat\x18\x04 \x01(\x04R\x0fhtlcMinimumMsat\x12*\n" + + "\x11htlc_maximum_msat\x18\x05 \x01(\x04R\x0fhtlcMaximumMsat\x12+\n" + + "\x04fees\x18\x06 \x01(\v2\x17.types.GraphRoutingFeesR\x04fees\"\xf2\x01\n" + + "\fGraphChannel\x12\x19\n" + + "\bnode_one\x18\x01 \x01(\tR\anodeOne\x12\x19\n" + + "\bnode_two\x18\x02 \x01(\tR\anodeTwo\x12(\n" + + "\rcapacity_sats\x18\x03 \x01(\x04H\x00R\fcapacitySats\x88\x01\x01\x127\n" + + "\n" + + "one_to_two\x18\x04 \x01(\v2\x19.types.GraphChannelUpdateR\boneToTwo\x127\n" + + "\n" + + "two_to_one\x18\x05 \x01(\v2\x19.types.GraphChannelUpdateR\btwoToOneB\x10\n" + + "\x0e_capacity_sats\"~\n" + + "\x15GraphNodeAnnouncement\x12\x1f\n" + + "\vlast_update\x18\x01 \x01(\rR\n" + + "lastUpdate\x12\x14\n" + + "\x05alias\x18\x02 \x01(\tR\x05alias\x12\x10\n" + + "\x03rgb\x18\x03 \x01(\tR\x03rgb\x12\x1c\n" + + "\taddresses\x18\x04 \x03(\tR\taddresses\"\x7f\n" + + "\x04Peer\x12\x17\n" + + "\anode_id\x18\x01 \x01(\tR\x06nodeId\x12\x18\n" + + "\aaddress\x18\x02 \x01(\tR\aaddress\x12!\n" + + "\fis_persisted\x18\x03 \x01(\bR\visPersisted\x12!\n" + + "\fis_connected\x18\x04 \x01(\bR\visConnected\"r\n" + + "\tGraphNode\x12\x1a\n" + + "\bchannels\x18\x01 \x03(\x04R\bchannels\x12I\n" + + "\x11announcement_info\x18\x02 \x01(\v2\x1c.types.GraphNodeAnnouncementR\x10announcementInfo\"D\n" + + "\x0fBolt11RouteHint\x121\n" + + "\thop_hints\x18\x01 \x03(\v2\x14.types.Bolt11HopHintR\bhopHints\"\xe2\x01\n" + + "\rBolt11HopHint\x12\x17\n" + + "\anode_id\x18\x01 \x01(\tR\x06nodeId\x12(\n" + + "\x10short_channel_id\x18\x02 \x01(\x04R\x0eshortChannelId\x12\"\n" + + "\rfee_base_msat\x18\x03 \x01(\rR\vfeeBaseMsat\x12>\n" + + "\x1bfee_proportional_millionths\x18\x04 \x01(\rR\x19feeProportionalMillionths\x12*\n" + + "\x11cltv_expiry_delta\x18\x05 \x01(\rR\x0fcltvExpiryDelta\"\x8d\x01\n" + + "\vOfferAmount\x122\n" + + "\x14bitcoin_amount_msats\x18\x01 \x01(\x04H\x00R\x12bitcoinAmountMsats\x12@\n" + + "\x0fcurrency_amount\x18\x02 \x01(\v2\x15.types.CurrencyAmountH\x00R\x0ecurrencyAmountB\b\n" + + "\x06amount\"K\n" + + "\x0eCurrencyAmount\x12!\n" + + "\fiso4217_code\x18\x01 \x01(\tR\viso4217Code\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x04R\x06amount\"k\n" + + "\rOfferQuantity\x12\x12\n" + + "\x03one\x18\x01 \x01(\bH\x00R\x03one\x12\x1a\n" + + "\abounded\x18\x02 \x01(\x04H\x00R\abounded\x12\x1e\n" + + "\tunbounded\x18\x03 \x01(\bH\x00R\tunboundedB\n" + + "\n" + + "\bquantity\"\xc5\x01\n" + + "\vBlindedPath\x12\x19\n" + + "\anode_id\x18\x01 \x01(\tH\x00R\x06nodeId\x12D\n" + + "\rdirected_scid\x18\x02 \x01(\v2\x1d.types.DirectedShortChannelIdH\x00R\fdirectedScid\x12%\n" + + "\x0eblinding_point\x18\x03 \x01(\tR\rblindingPoint\x12\x19\n" + + "\bnum_hops\x18\x04 \x01(\rR\anumHopsB\x13\n" + + "\x11introduction_node\"c\n" + + "\x16DirectedShortChannelId\x12\x12\n" + + "\x04scid\x18\x01 \x01(\x04R\x04scid\x125\n" + + "\tdirection\x18\x02 \x01(\x0e2\x17.types.ChannelDirectionR\tdirection\"_\n" + + "\rBolt11Feature\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x1f\n" + + "\vis_required\x18\x02 \x01(\bR\n" + + "isRequired\x12\x19\n" + + "\bis_known\x18\x03 \x01(\bR\aisKnown\"B\n" + + "\x0fCustomTlvRecord\x12\x19\n" + + "\btype_num\x18\x01 \x01(\x04R\atypeNum\x12\x14\n" + + "\x05value\x18\x02 \x01(\fR\x05value*-\n" + + "\x10PaymentDirection\x12\v\n" + + "\aINBOUND\x10\x00\x12\f\n" + + "\bOUTBOUND\x10\x01*7\n" + + "\rPaymentStatus\x12\v\n" + + "\aPENDING\x10\x00\x12\r\n" + + "\tSUCCEEDED\x10\x01\x12\n" + + "\n" + + "\x06FAILED\x10\x02*J\n" + + "\aNetwork\x12\v\n" + + "\aBITCOIN\x10\x00\x12\v\n" + + "\aTESTNET\x10\x01\x12\f\n" + + "\bTESTNET4\x10\x02\x12\n" + + "\n" + + "\x06SIGNET\x10\x03\x12\v\n" + + "\aREGTEST\x10\x04*a\n" + + "\rBalanceSource\x12\x17\n" + + "\x13HOLDER_FORCE_CLOSED\x10\x00\x12\x1d\n" + + "\x19COUNTERPARTY_FORCE_CLOSED\x10\x01\x12\x0e\n" + + "\n" + + "COOP_CLOSE\x10\x02\x12\b\n" + + "\x04HTLC\x10\x03*.\n" + + "\x10ChannelDirection\x12\f\n" + + "\bNODE_ONE\x10\x00\x12\f\n" + + "\bNODE_TWO\x10\x01b\x06proto3" + +var ( + file_types_proto_rawDescOnce sync.Once + file_types_proto_rawDescData []byte +) + +func file_types_proto_rawDescGZIP() []byte { + file_types_proto_rawDescOnce.Do(func() { + file_types_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_types_proto_rawDesc), len(file_types_proto_rawDesc))) + }) + return file_types_proto_rawDescData +} + +var file_types_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_types_proto_msgTypes = make([]protoimpl.MessageInfo, 46) +var file_types_proto_goTypes = []any{ + (PaymentDirection)(0), // 0: types.PaymentDirection + (PaymentStatus)(0), // 1: types.PaymentStatus + (Network)(0), // 2: types.Network + (BalanceSource)(0), // 3: types.BalanceSource + (ChannelDirection)(0), // 4: types.ChannelDirection + (*Payment)(nil), // 5: types.Payment + (*PaymentKind)(nil), // 6: types.PaymentKind + (*Onchain)(nil), // 7: types.Onchain + (*ConfirmationStatus)(nil), // 8: types.ConfirmationStatus + (*Confirmed)(nil), // 9: types.Confirmed + (*Unconfirmed)(nil), // 10: types.Unconfirmed + (*Bolt11)(nil), // 11: types.Bolt11 + (*Bolt12Offer)(nil), // 12: types.Bolt12Offer + (*Bolt12Refund)(nil), // 13: types.Bolt12Refund + (*Spontaneous)(nil), // 14: types.Spontaneous + (*LSPFeeLimits)(nil), // 15: types.LSPFeeLimits + (*HtlcLocator)(nil), // 16: types.HtlcLocator + (*ForwardedPayment)(nil), // 17: types.ForwardedPayment + (*Channel)(nil), // 18: types.Channel + (*ChannelConfig)(nil), // 19: types.ChannelConfig + (*OutPoint)(nil), // 20: types.OutPoint + (*BestBlock)(nil), // 21: types.BestBlock + (*LightningBalance)(nil), // 22: types.LightningBalance + (*ClaimableOnChannelClose)(nil), // 23: types.ClaimableOnChannelClose + (*ClaimableAwaitingConfirmations)(nil), // 24: types.ClaimableAwaitingConfirmations + (*ContentiousClaimable)(nil), // 25: types.ContentiousClaimable + (*MaybeTimeoutClaimableHTLC)(nil), // 26: types.MaybeTimeoutClaimableHTLC + (*MaybePreimageClaimableHTLC)(nil), // 27: types.MaybePreimageClaimableHTLC + (*CounterpartyRevokedOutputClaimable)(nil), // 28: types.CounterpartyRevokedOutputClaimable + (*PendingSweepBalance)(nil), // 29: types.PendingSweepBalance + (*PendingBroadcast)(nil), // 30: types.PendingBroadcast + (*BroadcastAwaitingConfirmation)(nil), // 31: types.BroadcastAwaitingConfirmation + (*AwaitingThresholdConfirmations)(nil), // 32: types.AwaitingThresholdConfirmations + (*PageToken)(nil), // 33: types.PageToken + (*Bolt11InvoiceDescription)(nil), // 34: types.Bolt11InvoiceDescription + (*RouteParametersConfig)(nil), // 35: types.RouteParametersConfig + (*GraphRoutingFees)(nil), // 36: types.GraphRoutingFees + (*GraphChannelUpdate)(nil), // 37: types.GraphChannelUpdate + (*GraphChannel)(nil), // 38: types.GraphChannel + (*GraphNodeAnnouncement)(nil), // 39: types.GraphNodeAnnouncement + (*Peer)(nil), // 40: types.Peer + (*GraphNode)(nil), // 41: types.GraphNode + (*Bolt11RouteHint)(nil), // 42: types.Bolt11RouteHint + (*Bolt11HopHint)(nil), // 43: types.Bolt11HopHint + (*OfferAmount)(nil), // 44: types.OfferAmount + (*CurrencyAmount)(nil), // 45: types.CurrencyAmount + (*OfferQuantity)(nil), // 46: types.OfferQuantity + (*BlindedPath)(nil), // 47: types.BlindedPath + (*DirectedShortChannelId)(nil), // 48: types.DirectedShortChannelId + (*Bolt11Feature)(nil), // 49: types.Bolt11Feature + (*CustomTlvRecord)(nil), // 50: types.CustomTlvRecord +} +var file_types_proto_depIdxs = []int32{ + 6, // 0: types.Payment.kind:type_name -> types.PaymentKind + 0, // 1: types.Payment.direction:type_name -> types.PaymentDirection + 1, // 2: types.Payment.status:type_name -> types.PaymentStatus + 7, // 3: types.PaymentKind.onchain:type_name -> types.Onchain + 11, // 4: types.PaymentKind.bolt11:type_name -> types.Bolt11 + 12, // 5: types.PaymentKind.bolt12_offer:type_name -> types.Bolt12Offer + 13, // 6: types.PaymentKind.bolt12_refund:type_name -> types.Bolt12Refund + 14, // 7: types.PaymentKind.spontaneous:type_name -> types.Spontaneous + 8, // 8: types.Onchain.status:type_name -> types.ConfirmationStatus + 9, // 9: types.ConfirmationStatus.confirmed:type_name -> types.Confirmed + 10, // 10: types.ConfirmationStatus.unconfirmed:type_name -> types.Unconfirmed + 16, // 11: types.ForwardedPayment.prev_htlcs:type_name -> types.HtlcLocator + 16, // 12: types.ForwardedPayment.next_htlcs:type_name -> types.HtlcLocator + 20, // 13: types.Channel.funding_txo:type_name -> types.OutPoint + 19, // 14: types.Channel.channel_config:type_name -> types.ChannelConfig + 23, // 15: types.LightningBalance.claimable_on_channel_close:type_name -> types.ClaimableOnChannelClose + 24, // 16: types.LightningBalance.claimable_awaiting_confirmations:type_name -> types.ClaimableAwaitingConfirmations + 25, // 17: types.LightningBalance.contentious_claimable:type_name -> types.ContentiousClaimable + 26, // 18: types.LightningBalance.maybe_timeout_claimable_htlc:type_name -> types.MaybeTimeoutClaimableHTLC + 27, // 19: types.LightningBalance.maybe_preimage_claimable_htlc:type_name -> types.MaybePreimageClaimableHTLC + 28, // 20: types.LightningBalance.counterparty_revoked_output_claimable:type_name -> types.CounterpartyRevokedOutputClaimable + 3, // 21: types.ClaimableAwaitingConfirmations.source:type_name -> types.BalanceSource + 30, // 22: types.PendingSweepBalance.pending_broadcast:type_name -> types.PendingBroadcast + 31, // 23: types.PendingSweepBalance.broadcast_awaiting_confirmation:type_name -> types.BroadcastAwaitingConfirmation + 32, // 24: types.PendingSweepBalance.awaiting_threshold_confirmations:type_name -> types.AwaitingThresholdConfirmations + 36, // 25: types.GraphChannelUpdate.fees:type_name -> types.GraphRoutingFees + 37, // 26: types.GraphChannel.one_to_two:type_name -> types.GraphChannelUpdate + 37, // 27: types.GraphChannel.two_to_one:type_name -> types.GraphChannelUpdate + 39, // 28: types.GraphNode.announcement_info:type_name -> types.GraphNodeAnnouncement + 43, // 29: types.Bolt11RouteHint.hop_hints:type_name -> types.Bolt11HopHint + 45, // 30: types.OfferAmount.currency_amount:type_name -> types.CurrencyAmount + 48, // 31: types.BlindedPath.directed_scid:type_name -> types.DirectedShortChannelId + 4, // 32: types.DirectedShortChannelId.direction:type_name -> types.ChannelDirection + 33, // [33:33] is the sub-list for method output_type + 33, // [33:33] is the sub-list for method input_type + 33, // [33:33] is the sub-list for extension type_name + 33, // [33:33] is the sub-list for extension extendee + 0, // [0:33] is the sub-list for field type_name +} + +func init() { file_types_proto_init() } +func file_types_proto_init() { + if File_types_proto != nil { + return + } + file_types_proto_msgTypes[0].OneofWrappers = []any{} + file_types_proto_msgTypes[1].OneofWrappers = []any{ + (*PaymentKind_Onchain)(nil), + (*PaymentKind_Bolt11)(nil), + (*PaymentKind_Bolt12Offer)(nil), + (*PaymentKind_Bolt12Refund)(nil), + (*PaymentKind_Spontaneous)(nil), + } + file_types_proto_msgTypes[3].OneofWrappers = []any{ + (*ConfirmationStatus_Confirmed)(nil), + (*ConfirmationStatus_Unconfirmed)(nil), + } + file_types_proto_msgTypes[6].OneofWrappers = []any{} + file_types_proto_msgTypes[7].OneofWrappers = []any{} + file_types_proto_msgTypes[8].OneofWrappers = []any{} + file_types_proto_msgTypes[9].OneofWrappers = []any{} + file_types_proto_msgTypes[10].OneofWrappers = []any{} + file_types_proto_msgTypes[11].OneofWrappers = []any{} + file_types_proto_msgTypes[12].OneofWrappers = []any{} + file_types_proto_msgTypes[13].OneofWrappers = []any{} + file_types_proto_msgTypes[14].OneofWrappers = []any{ + (*ChannelConfig_FixedLimitMsat)(nil), + (*ChannelConfig_FeeRateMultiplier)(nil), + } + file_types_proto_msgTypes[17].OneofWrappers = []any{ + (*LightningBalance_ClaimableOnChannelClose)(nil), + (*LightningBalance_ClaimableAwaitingConfirmations)(nil), + (*LightningBalance_ContentiousClaimable)(nil), + (*LightningBalance_MaybeTimeoutClaimableHtlc)(nil), + (*LightningBalance_MaybePreimageClaimableHtlc)(nil), + (*LightningBalance_CounterpartyRevokedOutputClaimable)(nil), + } + file_types_proto_msgTypes[24].OneofWrappers = []any{ + (*PendingSweepBalance_PendingBroadcast)(nil), + (*PendingSweepBalance_BroadcastAwaitingConfirmation)(nil), + (*PendingSweepBalance_AwaitingThresholdConfirmations)(nil), + } + file_types_proto_msgTypes[25].OneofWrappers = []any{} + file_types_proto_msgTypes[26].OneofWrappers = []any{} + file_types_proto_msgTypes[27].OneofWrappers = []any{} + file_types_proto_msgTypes[29].OneofWrappers = []any{ + (*Bolt11InvoiceDescription_Direct)(nil), + (*Bolt11InvoiceDescription_Hash)(nil), + } + file_types_proto_msgTypes[30].OneofWrappers = []any{} + file_types_proto_msgTypes[33].OneofWrappers = []any{} + file_types_proto_msgTypes[39].OneofWrappers = []any{ + (*OfferAmount_BitcoinAmountMsats)(nil), + (*OfferAmount_CurrencyAmount)(nil), + } + file_types_proto_msgTypes[41].OneofWrappers = []any{ + (*OfferQuantity_One)(nil), + (*OfferQuantity_Bounded)(nil), + (*OfferQuantity_Unbounded)(nil), + } + file_types_proto_msgTypes[42].OneofWrappers = []any{ + (*BlindedPath_NodeId)(nil), + (*BlindedPath_DirectedScid)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_types_proto_rawDesc), len(file_types_proto_rawDesc)), + NumEnums: 5, + NumMessages: 46, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_types_proto_goTypes, + DependencyIndexes: file_types_proto_depIdxs, + EnumInfos: file_types_proto_enumTypes, + MessageInfos: file_types_proto_msgTypes, + }.Build() + File_types_proto = out.File + file_types_proto_goTypes = nil + file_types_proto_depIdxs = nil +} diff --git a/lnclient/ldk-server/ldkserver.go b/lnclient/ldk-server/ldkserver.go new file mode 100644 index 000000000..dd42b3cec --- /dev/null +++ b/lnclient/ldk-server/ldkserver.go @@ -0,0 +1,1318 @@ +package ldkserver + +import ( + "bytes" + "context" + "crypto/hmac" + "crypto/sha256" + "crypto/tls" + "crypto/x509" + "encoding/binary" + "encoding/hex" + "errors" + "fmt" + "io" + "net" + "net/http" + "net/url" + "slices" + "strings" + "time" + + "github.com/getAlby/hub/config" + "github.com/getAlby/hub/events" + "github.com/getAlby/hub/lnclient" + ldkapi "github.com/getAlby/hub/lnclient/ldk-server/grpc/api" + ldkevents "github.com/getAlby/hub/lnclient/ldk-server/grpc/events" + ldktypes "github.com/getAlby/hub/lnclient/ldk-server/grpc/types" + "github.com/getAlby/hub/logger" + "github.com/getAlby/hub/nip47/models" + "github.com/getAlby/hub/nip47/notifications" + "github.com/sirupsen/logrus" + "golang.org/x/net/http2" + "google.golang.org/protobuf/proto" +) + +type LDKServerService struct { + ctx context.Context + cancel context.CancelFunc + client *http.Client + baseURL string + address string + apiKey string + eventPublisher events.EventPublisher + pubkey string + nodeInfo *lnclient.NodeInfo +} + +func NewLDKServerService(ctx context.Context, eventPublisher events.EventPublisher, address, tlsCertPEM, apiKey string) (lnclient.LNClient, error) { + if address == "" || tlsCertPEM == "" || apiKey == "" { + return nil, errors.New("one or more required ldk-server configuration values are missing") + } + + certPool := x509.NewCertPool() + if !certPool.AppendCertsFromPEM([]byte(tlsCertPEM)) { + return nil, errors.New("failed to parse ldk-server TLS certificate") + } + + host, _, err := net.SplitHostPort(address) + if err != nil { + return nil, fmt.Errorf("invalid ldk-server address %q: %w", address, err) + } + + serviceCtx, cancel := context.WithCancel(ctx) + svc := &LDKServerService{ + ctx: serviceCtx, + cancel: cancel, + baseURL: "https://" + address, + address: address, + apiKey: apiKey, + eventPublisher: eventPublisher, + client: &http.Client{ + Transport: &http2.Transport{ + TLSClientConfig: &tls.Config{ + MinVersion: tls.VersionTLS12, + RootCAs: certPool, + ServerName: host, + }, + }, + }, + } + + info, err := svc.GetInfo(serviceCtx) + if err != nil { + cancel() + return nil, fmt.Errorf("failed to connect to ldk-server: %w", err) + } + svc.nodeInfo = info + svc.pubkey = info.Pubkey + + go svc.subscribeEvents() + + logger.Logger.WithFields(logrus.Fields{ + "address": address, + "alias": info.Alias, + "pubkey": info.Pubkey, + }).Info("Connected to ldk-server via gRPC API") + + return svc, nil +} + +func (svc *LDKServerService) SendPaymentSync(payReq string, amountMsat *uint64) (*lnclient.PayInvoiceResponse, error) { + req := &ldkapi.Bolt11SendRequest{ + Invoice: payReq, + } + if amountMsat != nil { + req.AmountMsat = amountMsat + } + resp := &ldkapi.Bolt11SendResponse{} + if err := svc.doUnaryWithTimeout(svc.ctx, 2*time.Minute, ldkapi.LightningNode_Bolt11Send_FullMethodName, req, resp); err != nil { + return nil, err + } + + payment, err := svc.waitForPaymentTerminal(resp.PaymentId) + if err != nil { + return nil, err + } + + switch payment.Status { + case ldktypes.PaymentStatus_SUCCEEDED: + response := &lnclient.PayInvoiceResponse{} + if fee := payment.FeePaidMsat; fee != nil { + response.FeeMsat = *fee + } + if kind, ok := payment.Kind.Kind.(*ldktypes.PaymentKind_Bolt11); ok && kind.Bolt11.Preimage != nil { + response.Preimage = *kind.Bolt11.Preimage + } + return response, nil + case ldktypes.PaymentStatus_FAILED: + return nil, errors.New("ldk-server reported payment failure") + default: + return nil, fmt.Errorf("unexpected payment status: %s", payment.Status.String()) + } +} + +func (svc *LDKServerService) SendKeysend(amountMsat uint64, destination string, customRecords []lnclient.TLVRecord, preimage string) (*lnclient.PayKeysendResponse, error) { + if preimage != "" { + return nil, errors.New("ldk-server does not support custom keysend preimages") + } + + req := &ldkapi.SpontaneousSendRequest{ + AmountMsat: amountMsat, + NodeId: destination, + } + for _, record := range customRecords { + value, err := hex.DecodeString(record.Value) + if err != nil { + return nil, fmt.Errorf("failed to decode keysend TLV value: %w", err) + } + req.CustomTlvs = append(req.CustomTlvs, &ldktypes.CustomTlvRecord{ + TypeNum: record.Type, + Value: value, + }) + } + + resp := &ldkapi.SpontaneousSendResponse{} + if err := svc.doUnaryWithTimeout(svc.ctx, 2*time.Minute, ldkapi.LightningNode_SpontaneousSend_FullMethodName, req, resp); err != nil { + return nil, err + } + + payment, err := svc.waitForPaymentTerminal(resp.PaymentId) + if err != nil { + return nil, err + } + if payment.Status != ldktypes.PaymentStatus_SUCCEEDED { + return nil, errors.New("ldk-server keysend did not succeed") + } + + result := &lnclient.PayKeysendResponse{} + if fee := payment.FeePaidMsat; fee != nil { + result.FeeMsat = *fee + } + return result, nil +} + +func (svc *LDKServerService) GetPubkey() string { + return svc.pubkey +} + +func (svc *LDKServerService) GetInfo(ctx context.Context) (*lnclient.NodeInfo, error) { + resp := &ldkapi.GetNodeInfoResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_GetNodeInfo_FullMethodName, &ldkapi.GetNodeInfoRequest{}, resp); err != nil { + return nil, err + } + + info := &lnclient.NodeInfo{ + Alias: resp.GetNodeAlias(), + Pubkey: resp.NodeId, + Network: networkToString(resp.Network), + BlockHeight: resp.CurrentBestBlock.GetHeight(), + BlockHash: resp.CurrentBestBlock.GetBlockHash(), + } + svc.nodeInfo = info + svc.pubkey = info.Pubkey + return info, nil +} + +func (svc *LDKServerService) MakeInvoice(ctx context.Context, amountMsat int64, description string, descriptionHash string, expiry int64, throughNodePubkey *string) (*lnclient.Transaction, error) { + if expiry == 0 { + expiry = lnclient.DEFAULT_INVOICE_EXPIRY + } + + if throughNodePubkey != nil { + if amountMsat > 0 { + resp := &ldkapi.Bolt11ReceiveViaJitChannelResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_Bolt11ReceiveViaJitChannel_FullMethodName, &ldkapi.Bolt11ReceiveViaJitChannelRequest{ + AmountMsat: uint64(amountMsat), + Description: newInvoiceDescription(description, descriptionHash), + ExpirySecs: uint32(expiry), + }, resp); err != nil { + return nil, err + } + return svc.transactionFromCreatedInvoice(ctx, resp.Invoice, "") + } + + resp := &ldkapi.Bolt11ReceiveVariableAmountViaJitChannelResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_Bolt11ReceiveVariableAmountViaJitChannel_FullMethodName, &ldkapi.Bolt11ReceiveVariableAmountViaJitChannelRequest{ + Description: newInvoiceDescription(description, descriptionHash), + ExpirySecs: uint32(expiry), + }, resp); err != nil { + return nil, err + } + return svc.transactionFromCreatedInvoice(ctx, resp.Invoice, "") + } + + req := &ldkapi.Bolt11ReceiveRequest{ + Description: newInvoiceDescription(description, descriptionHash), + ExpirySecs: uint32(expiry), + } + if amountMsat > 0 { + req.AmountMsat = uint64Ptr(uint64(amountMsat)) + } + resp := &ldkapi.Bolt11ReceiveResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_Bolt11Receive_FullMethodName, req, resp); err != nil { + return nil, err + } + return svc.transactionFromCreatedInvoice(ctx, resp.Invoice, resp.PaymentHash) +} + +func (svc *LDKServerService) MakeHoldInvoice(ctx context.Context, amountMsat int64, description string, descriptionHash string, expiry int64, paymentHash string, minCltvExpiryDelta *uint64) (*lnclient.Transaction, error) { + if minCltvExpiryDelta != nil { + return nil, errors.New("ldk-server does not expose min_cltv_expiry_delta for hold invoices") + } + if expiry == 0 { + expiry = lnclient.DEFAULT_INVOICE_EXPIRY + } + + req := &ldkapi.Bolt11ReceiveForHashRequest{ + Description: newInvoiceDescription(description, descriptionHash), + ExpirySecs: uint32(expiry), + PaymentHash: paymentHash, + } + if amountMsat > 0 { + req.AmountMsat = uint64Ptr(uint64(amountMsat)) + } + resp := &ldkapi.Bolt11ReceiveForHashResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_Bolt11ReceiveForHash_FullMethodName, req, resp); err != nil { + return nil, err + } + transaction, err := svc.transactionFromCreatedInvoice(ctx, resp.Invoice, paymentHash) + if err != nil { + return nil, err + } + transaction.PaymentHash = paymentHash + return transaction, nil +} + +func (svc *LDKServerService) SettleHoldInvoice(ctx context.Context, preimage string) error { + if len(preimage) != 64 { + return errors.New("preimage must be a 32-byte hex string") + } + _, err := svc.doUnaryEmpty(ctx, ldkapi.LightningNode_Bolt11ClaimForHash_FullMethodName, &ldkapi.Bolt11ClaimForHashRequest{ + Preimage: preimage, + }) + return err +} + +func (svc *LDKServerService) CancelHoldInvoice(ctx context.Context, paymentHash string) error { + _, err := svc.doUnaryEmpty(ctx, ldkapi.LightningNode_Bolt11FailForHash_FullMethodName, &ldkapi.Bolt11FailForHashRequest{ + PaymentHash: paymentHash, + }) + return err +} + +func (svc *LDKServerService) LookupInvoice(ctx context.Context, paymentHash string) (*lnclient.Transaction, error) { + payment, err := svc.findPayment(ctx, func(payment *ldktypes.Payment) bool { + return paymentHashMatches(payment, paymentHash) + }) + if err != nil { + return nil, err + } + return paymentToTransaction(payment) +} + +func (svc *LDKServerService) ListOnchainTransactions(ctx context.Context) ([]lnclient.OnchainTransaction, error) { + payments, err := svc.listAllPayments(ctx) + if err != nil { + return nil, err + } + + result := make([]lnclient.OnchainTransaction, 0) + for _, payment := range payments { + onchain, ok := payment.Kind.Kind.(*ldktypes.PaymentKind_Onchain) + if !ok { + continue + } + tx := lnclient.OnchainTransaction{ + CreatedAt: payment.LatestUpdateTimestamp, + TxId: onchain.Onchain.Txid, + } + if amount := payment.AmountMsat; amount != nil { + tx.AmountSat = *amount / 1000 + } + if payment.Direction == ldktypes.PaymentDirection_OUTBOUND { + tx.Type = "outgoing" + } else { + tx.Type = "incoming" + } + switch status := onchain.Onchain.Status.Status.(type) { + case *ldktypes.ConfirmationStatus_Confirmed: + tx.State = "confirmed" + tx.NumConfirmations = uint32(max(int64(svc.nodeInfo.BlockHeight)-int64(status.Confirmed.Height)+1, 0)) + default: + tx.State = "unconfirmed" + } + result = append(result, tx) + } + return result, nil +} + +func (svc *LDKServerService) Shutdown() error { + svc.cancel() + return nil +} + +func (svc *LDKServerService) ListChannels(ctx context.Context) ([]lnclient.Channel, error) { + resp := &ldkapi.ListChannelsResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_ListChannels_FullMethodName, &ldkapi.ListChannelsRequest{}, resp); err != nil { + return nil, err + } + + channels := make([]lnclient.Channel, 0, len(resp.Channels)) + for _, channel := range resp.Channels { + var fundingTxID string + var fundingTxVout uint32 + if channel.FundingTxo != nil { + fundingTxID = channel.FundingTxo.Txid + fundingTxVout = channel.FundingTxo.Vout + } + + var errText *string + if channel.IsChannelReady && !channel.IsUsable { + msg := "channel is not currently usable" + errText = &msg + } + + localBalanceMsat := int64(channel.ChannelValueSats*1000) - int64(channel.InboundCapacityMsat) - int64(channel.CounterpartyUnspendablePunishmentReserve*1000) + channels = append(channels, lnclient.Channel{ + LocalBalanceMsat: localBalanceMsat, + LocalSpendableBalanceMsat: int64(channel.OutboundCapacityMsat), + RemoteBalanceMsat: int64(channel.InboundCapacityMsat), + Id: channel.UserChannelId, + RemotePubkey: channel.CounterpartyNodeId, + FundingTxId: fundingTxID, + FundingTxVout: fundingTxVout, + Active: channel.IsUsable, + Public: channel.IsAnnounced, + InternalChannel: channel, + Confirmations: channel.Confirmations, + ConfirmationsRequired: channel.ConfirmationsRequired, + ForwardingFeeBaseMsat: channel.ChannelConfig.GetForwardingFeeBaseMsat(), + ForwardingFeeProportionalMillionths: channel.ChannelConfig.GetForwardingFeeProportionalMillionths(), + UnspendablePunishmentReserveSat: channel.GetUnspendablePunishmentReserve(), + CounterpartyUnspendablePunishmentReserveSat: channel.CounterpartyUnspendablePunishmentReserve, + Error: errText, + IsOutbound: channel.IsOutbound, + }) + } + return channels, nil +} + +func (svc *LDKServerService) GetNodeConnectionInfo(ctx context.Context) (*lnclient.NodeConnectionInfo, error) { + resp := &ldkapi.GetNodeInfoResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_GetNodeInfo_FullMethodName, &ldkapi.GetNodeInfoRequest{}, resp); err != nil { + return nil, err + } + + for _, uri := range resp.NodeUris { + pubkey, host, port, err := parseNodeURI(uri) + if err == nil { + return &lnclient.NodeConnectionInfo{ + Pubkey: pubkey, + Address: host, + Port: port, + }, nil + } + } + + for _, addr := range resp.ListeningAddresses { + host, port, err := splitHostPort(addr) + if err == nil { + return &lnclient.NodeConnectionInfo{ + Pubkey: resp.NodeId, + Address: host, + Port: port, + }, nil + } + } + + return nil, errors.New("ldk-server did not expose a usable node connection address") +} + +func (svc *LDKServerService) GetNodeStatus(ctx context.Context) (*lnclient.NodeStatus, error) { + resp := &ldkapi.GetNodeInfoResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_GetNodeInfo_FullMethodName, &ldkapi.GetNodeInfoRequest{}, resp); err != nil { + return nil, err + } + return &lnclient.NodeStatus{ + IsReady: true, + InternalNodeStatus: map[string]interface{}{ + "latest_lightning_wallet_sync_timestamp": resp.LatestLightningWalletSyncTimestamp, + "latest_onchain_wallet_sync_timestamp": resp.LatestOnchainWalletSyncTimestamp, + "latest_fee_rate_cache_update_timestamp": resp.LatestFeeRateCacheUpdateTimestamp, + "latest_rgs_snapshot_timestamp": resp.LatestRgsSnapshotTimestamp, + "latest_node_announcement_timestamp": resp.LatestNodeAnnouncementBroadcastTimestamp, + }, + }, nil +} + +func (svc *LDKServerService) ConnectPeer(ctx context.Context, connectPeerRequest *lnclient.ConnectPeerRequest) error { + address := fmt.Sprintf("%s:%d", connectPeerRequest.Address, connectPeerRequest.Port) + _, err := svc.doUnaryEmpty(ctx, ldkapi.LightningNode_ConnectPeer_FullMethodName, &ldkapi.ConnectPeerRequest{ + NodePubkey: connectPeerRequest.Pubkey, + Address: address, + Persist: true, + }) + return err +} + +func (svc *LDKServerService) OpenChannel(ctx context.Context, openChannelRequest *lnclient.OpenChannelRequest) (*lnclient.OpenChannelResponse, error) { + peer, err := svc.findPeer(ctx, openChannelRequest.Pubkey) + if err != nil { + return nil, err + } + resp := &ldkapi.OpenChannelResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_OpenChannel_FullMethodName, &ldkapi.OpenChannelRequest{ + NodePubkey: openChannelRequest.Pubkey, + Address: peer.Address, + ChannelAmountSats: uint64(openChannelRequest.AmountSats), + AnnounceChannel: openChannelRequest.Public, + }, resp); err != nil { + return nil, err + } + fundingTxID, err := svc.waitForFundingTxID(resp.UserChannelId) + if err != nil { + return nil, err + } + return &lnclient.OpenChannelResponse{ + FundingTxId: fundingTxID, + }, nil +} + +func (svc *LDKServerService) CloseChannel(ctx context.Context, closeChannelRequest *lnclient.CloseChannelRequest) error { + method := ldkapi.LightningNode_CloseChannel_FullMethodName + request := proto.Message(&ldkapi.CloseChannelRequest{ + UserChannelId: closeChannelRequest.ChannelId, + CounterpartyNodeId: closeChannelRequest.NodeId, + }) + if closeChannelRequest.Force { + method = ldkapi.LightningNode_ForceCloseChannel_FullMethodName + request = &ldkapi.ForceCloseChannelRequest{ + UserChannelId: closeChannelRequest.ChannelId, + CounterpartyNodeId: closeChannelRequest.NodeId, + } + } + _, err := svc.doUnaryEmpty(ctx, method, request) + return err +} + +func (svc *LDKServerService) UpdateChannel(ctx context.Context, updateChannelRequest *lnclient.UpdateChannelRequest) error { + req := &ldkapi.UpdateChannelConfigRequest{ + UserChannelId: updateChannelRequest.ChannelId, + CounterpartyNodeId: updateChannelRequest.NodeId, + ChannelConfig: &ldktypes.ChannelConfig{ + ForwardingFeeBaseMsat: &updateChannelRequest.ForwardingFeeBaseMsat, + ForwardingFeeProportionalMillionths: &updateChannelRequest.ForwardingFeeProportionalMillionths, + MaxDustHtlcExposure: &ldktypes.ChannelConfig_FeeRateMultiplier{ + FeeRateMultiplier: updateChannelRequest.MaxDustHtlcExposureFromFeeRateMultiplier, + }, + }, + } + _, err := svc.doUnaryEmpty(ctx, ldkapi.LightningNode_UpdateChannelConfig_FullMethodName, req) + return err +} + +func (svc *LDKServerService) DisconnectPeer(ctx context.Context, peerID string) error { + _, err := svc.doUnaryEmpty(ctx, ldkapi.LightningNode_DisconnectPeer_FullMethodName, &ldkapi.DisconnectPeerRequest{ + NodePubkey: peerID, + }) + return err +} + +func (svc *LDKServerService) MakeOffer(ctx context.Context, description string) (string, error) { + resp := &ldkapi.Bolt12ReceiveResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_Bolt12Receive_FullMethodName, &ldkapi.Bolt12ReceiveRequest{ + Description: description, + }, resp); err != nil { + return "", err + } + return resp.Offer, nil +} + +func (svc *LDKServerService) GetNewOnchainAddress(ctx context.Context) (string, error) { + resp := &ldkapi.OnchainReceiveResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_OnchainReceive_FullMethodName, &ldkapi.OnchainReceiveRequest{}, resp); err != nil { + return "", err + } + return resp.Address, nil +} + +func (svc *LDKServerService) ResetRouter(key string) error { + return errors.New("ldk-server does not expose router reset") +} + +func (svc *LDKServerService) GetOnchainBalance(ctx context.Context) (*lnclient.OnchainBalanceResponse, error) { + resp := &ldkapi.GetBalancesResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_GetBalances_FullMethodName, &ldkapi.GetBalancesRequest{}, resp); err != nil { + return nil, err + } + + result := &lnclient.OnchainBalanceResponse{ + SpendableSat: int64(resp.SpendableOnchainBalanceSats), + TotalSat: int64(resp.TotalOnchainBalanceSats), + ReservedSat: int64(resp.TotalAnchorChannelsReserveSats), + PendingBalancesDetails: []lnclient.PendingBalanceDetails{}, + PendingSweepBalancesDetails: []lnclient.PendingBalanceDetails{}, + } + for _, balance := range resp.LightningBalances { + switch b := balance.BalanceType.(type) { + case *ldktypes.LightningBalance_ClaimableOnChannelClose: + result.PendingBalancesFromChannelClosuresSat += b.ClaimableOnChannelClose.AmountSatoshis + result.PendingBalancesDetails = append(result.PendingBalancesDetails, lnclient.PendingBalanceDetails{ + ChannelId: b.ClaimableOnChannelClose.ChannelId, + NodeId: b.ClaimableOnChannelClose.CounterpartyNodeId, + AmountSat: b.ClaimableOnChannelClose.AmountSatoshis, + }) + case *ldktypes.LightningBalance_ClaimableAwaitingConfirmations: + result.PendingBalancesFromChannelClosuresSat += b.ClaimableAwaitingConfirmations.AmountSatoshis + result.PendingBalancesDetails = append(result.PendingBalancesDetails, lnclient.PendingBalanceDetails{ + ChannelId: b.ClaimableAwaitingConfirmations.ChannelId, + NodeId: b.ClaimableAwaitingConfirmations.CounterpartyNodeId, + AmountSat: b.ClaimableAwaitingConfirmations.AmountSatoshis, + }) + case *ldktypes.LightningBalance_ContentiousClaimable: + result.PendingBalancesFromChannelClosuresSat += b.ContentiousClaimable.AmountSatoshis + result.PendingBalancesDetails = append(result.PendingBalancesDetails, lnclient.PendingBalanceDetails{ + ChannelId: b.ContentiousClaimable.ChannelId, + NodeId: b.ContentiousClaimable.CounterpartyNodeId, + AmountSat: b.ContentiousClaimable.AmountSatoshis, + }) + } + } + for _, balance := range resp.PendingBalancesFromChannelClosures { + switch b := balance.BalanceType.(type) { + case *ldktypes.PendingSweepBalance_PendingBroadcast: + result.PendingSweepBalancesDetails = append(result.PendingSweepBalancesDetails, lnclient.PendingBalanceDetails{ + ChannelId: b.PendingBroadcast.GetChannelId(), + AmountSat: b.PendingBroadcast.AmountSatoshis, + }) + case *ldktypes.PendingSweepBalance_BroadcastAwaitingConfirmation: + result.PendingSweepBalancesDetails = append(result.PendingSweepBalancesDetails, lnclient.PendingBalanceDetails{ + ChannelId: b.BroadcastAwaitingConfirmation.GetChannelId(), + AmountSat: b.BroadcastAwaitingConfirmation.AmountSatoshis, + }) + case *ldktypes.PendingSweepBalance_AwaitingThresholdConfirmations: + result.PendingSweepBalancesDetails = append(result.PendingSweepBalancesDetails, lnclient.PendingBalanceDetails{ + ChannelId: b.AwaitingThresholdConfirmations.GetChannelId(), + AmountSat: b.AwaitingThresholdConfirmations.AmountSatoshis, + }) + } + } + return result, nil +} + +func (svc *LDKServerService) GetBalances(ctx context.Context, includeInactiveChannels bool) (*lnclient.BalancesResponse, error) { + onchain, err := svc.GetOnchainBalance(ctx) + if err != nil { + return nil, err + } + channels, err := svc.ListChannels(ctx) + if err != nil { + return nil, err + } + + lightning := lnclient.LightningBalanceResponse{} + for _, channel := range channels { + if !includeInactiveChannels && !channel.Active { + continue + } + lightning.TotalSpendableMsat += channel.LocalSpendableBalanceMsat + lightning.TotalReceivableMsat += channel.RemoteBalanceMsat + lightning.NextMaxSpendableMsat = max(lightning.NextMaxSpendableMsat, channel.LocalSpendableBalanceMsat) + lightning.NextMaxReceivableMsat = max(lightning.NextMaxReceivableMsat, channel.RemoteBalanceMsat) + } + lightning.NextMaxSpendableMPPMsat = lightning.TotalSpendableMsat + lightning.NextMaxReceivableMPPMsat = lightning.TotalReceivableMsat + + return &lnclient.BalancesResponse{ + Onchain: *onchain, + Lightning: lightning, + }, nil +} + +func (svc *LDKServerService) RedeemOnchainFunds(ctx context.Context, toAddress string, amountSat uint64, feeRate *uint64, sendAll bool) (string, error) { + req := &ldkapi.OnchainSendRequest{ + Address: toAddress, + } + if sendAll { + req.SendAll = boolPtr(true) + } else { + req.AmountSats = uint64Ptr(amountSat) + } + if feeRate != nil { + req.FeeRateSatPerVb = feeRate + } + resp := &ldkapi.OnchainSendResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_OnchainSend_FullMethodName, req, resp); err != nil { + return "", err + } + return resp.Txid, nil +} + +func (svc *LDKServerService) ListPeers(ctx context.Context) ([]lnclient.PeerDetails, error) { + resp := &ldkapi.ListPeersResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_ListPeers_FullMethodName, &ldkapi.ListPeersRequest{}, resp); err != nil { + return nil, err + } + peers := make([]lnclient.PeerDetails, 0, len(resp.Peers)) + for _, peer := range resp.Peers { + peers = append(peers, lnclient.PeerDetails{ + NodeId: peer.NodeId, + Address: peer.Address, + IsPersisted: peer.IsPersisted, + IsConnected: peer.IsConnected, + }) + } + return peers, nil +} + +func (svc *LDKServerService) GetLogOutput(ctx context.Context, maxLen int) ([]byte, error) { + return nil, errors.New("ldk-server does not expose remote log output") +} + +func (svc *LDKServerService) SignMessage(ctx context.Context, message string) (string, error) { + resp := &ldkapi.SignMessageResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_SignMessage_FullMethodName, &ldkapi.SignMessageRequest{ + Message: []byte(message), + }, resp); err != nil { + return "", err + } + return resp.Signature, nil +} + +func (svc *LDKServerService) GetStorageDir() (string, error) { + return "", errors.New("ldk-server storage is managed remotely") +} + +func (svc *LDKServerService) GetNetworkGraph(ctx context.Context, nodeIDs []string) (lnclient.NetworkGraphResponse, error) { + listNodesResp := &ldkapi.GraphListNodesResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_GraphListNodes_FullMethodName, &ldkapi.GraphListNodesRequest{}, listNodesResp); err != nil { + return nil, err + } + listChannelsResp := &ldkapi.GraphListChannelsResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_GraphListChannels_FullMethodName, &ldkapi.GraphListChannelsRequest{}, listChannelsResp); err != nil { + return nil, err + } + + filteredNodeIDs := listNodesResp.NodeIds + if len(nodeIDs) > 0 { + filteredNodeIDs = filteredNodeIDs[:0] + for _, nodeID := range listNodesResp.NodeIds { + if slices.Contains(nodeIDs, nodeID) { + filteredNodeIDs = append(filteredNodeIDs, nodeID) + } + } + } + + nodes := make([]*ldkapi.GraphGetNodeResponse, 0, len(filteredNodeIDs)) + for _, nodeID := range filteredNodeIDs { + nodeResp := &ldkapi.GraphGetNodeResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_GraphGetNode_FullMethodName, &ldkapi.GraphGetNodeRequest{ + NodeId: nodeID, + }, nodeResp); err == nil { + nodes = append(nodes, nodeResp) + } + } + + channels := make([]*ldkapi.GraphGetChannelResponse, 0, len(listChannelsResp.ShortChannelIds)) + for _, shortID := range listChannelsResp.ShortChannelIds { + channelResp := &ldkapi.GraphGetChannelResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_GraphGetChannel_FullMethodName, &ldkapi.GraphGetChannelRequest{ + ShortChannelId: shortID, + }, channelResp); err == nil { + channels = append(channels, channelResp) + } + } + + return map[string]interface{}{ + "nodes": nodes, + "channels": channels, + }, nil +} + +func (svc *LDKServerService) UpdateLastWalletSyncRequest() {} + +func (svc *LDKServerService) GetSupportedNIP47Methods() []string { + return []string{ + models.PAY_INVOICE_METHOD, + models.PAY_KEYSEND_METHOD, + models.GET_BALANCE_METHOD, + models.GET_BUDGET_METHOD, + models.GET_INFO_METHOD, + models.MAKE_INVOICE_METHOD, + models.LOOKUP_INVOICE_METHOD, + models.LIST_TRANSACTIONS_METHOD, + models.MULTI_PAY_INVOICE_METHOD, + models.MULTI_PAY_KEYSEND_METHOD, + models.SIGN_MESSAGE_METHOD, + models.MAKE_HOLD_INVOICE_METHOD, + models.SETTLE_HOLD_INVOICE_METHOD, + models.CANCEL_HOLD_INVOICE_METHOD, + } +} + +func (svc *LDKServerService) GetSupportedNIP47NotificationTypes() []string { + return []string{ + notifications.PAYMENT_RECEIVED_NOTIFICATION, + notifications.PAYMENT_SENT_NOTIFICATION, + notifications.HOLD_INVOICE_ACCEPTED_NOTIFICATION, + } +} + +func (svc *LDKServerService) GetCustomNodeCommandDefinitions() []lnclient.CustomNodeCommandDef { + return nil +} + +func (svc *LDKServerService) ExecuteCustomNodeCommand(ctx context.Context, command *lnclient.CustomNodeCommandRequest) (*lnclient.CustomNodeCommandResponse, error) { + return nil, lnclient.ErrUnknownCustomNodeCommand +} + +func (svc *LDKServerService) doUnaryEmpty(ctx context.Context, path string, req proto.Message) (*struct{}, error) { + resp := &struct{}{} + return resp, svc.doUnary(ctx, path, req, nil) +} + +func (svc *LDKServerService) doUnaryWithTimeout(ctx context.Context, timeout time.Duration, path string, req proto.Message, resp proto.Message) error { + requestCtx, cancel := context.WithTimeout(ctx, timeout) + defer cancel() + return svc.doUnary(requestCtx, path, req, resp) +} + +func (svc *LDKServerService) doUnary(ctx context.Context, path string, req proto.Message, resp proto.Message) error { + reqBytes, err := proto.Marshal(req) + if err != nil { + return err + } + framedReq := grpcFrame(reqBytes) + + httpReq, err := http.NewRequestWithContext(ctx, http.MethodPost, svc.baseURL+path, bytes.NewReader(framedReq)) + if err != nil { + return err + } + httpReq.Header.Set("Content-Type", "application/grpc+proto") + httpReq.Header.Set("TE", "trailers") + httpReq.Header.Set("X-Auth", svc.authHeader(framedReq)) + + httpResp, err := svc.client.Do(httpReq) + if err != nil { + return err + } + defer httpResp.Body.Close() + + body, readErr := io.ReadAll(httpResp.Body) + if readErr != nil { + return readErr + } + if err := grpcStatusError(httpResp, body); err != nil { + return err + } + if resp == nil || len(body) == 0 { + return nil + } + messageBytes, err := decodeSingleFrame(body) + if err != nil { + return err + } + return proto.Unmarshal(messageBytes, resp) +} + +func (svc *LDKServerService) authHeader(framedReq []byte) string { + timestamp := uint64(time.Now().Unix()) + mac := hmac.New(sha256.New, []byte(svc.apiKey)) + var timestampBytes [8]byte + binary.BigEndian.PutUint64(timestampBytes[:], timestamp) + mac.Write(timestampBytes[:]) + mac.Write(framedReq) + return fmt.Sprintf("HMAC %d:%s", timestamp, hex.EncodeToString(mac.Sum(nil))) +} + +func (svc *LDKServerService) subscribeEvents() { + for { + select { + case <-svc.ctx.Done(): + return + default: + } + + framedReq := grpcFrame([]byte{0}) + reqBytes, err := proto.Marshal(&ldkapi.SubscribeEventsRequest{}) + if err == nil { + framedReq = grpcFrame(reqBytes) + } + + httpReq, err := http.NewRequestWithContext(svc.ctx, http.MethodPost, svc.baseURL+ldkapi.LightningNode_SubscribeEvents_FullMethodName, bytes.NewReader(framedReq)) + if err != nil { + logger.Logger.WithError(err).Error("Failed to build ldk-server event stream request") + return + } + httpReq.Header.Set("Content-Type", "application/grpc+proto") + httpReq.Header.Set("TE", "trailers") + httpReq.Header.Set("X-Auth", svc.authHeader(framedReq)) + + resp, err := svc.client.Do(httpReq) + if err != nil { + logger.Logger.WithError(err).Error("Failed to subscribe to ldk-server events") + select { + case <-svc.ctx.Done(): + return + case <-time.After(5 * time.Second): + continue + } + } + + reader := frameReader{reader: resp.Body} + for { + frame, err := reader.Next() + if err != nil { + resp.Body.Close() + if !errors.Is(err, io.EOF) && !errors.Is(err, context.Canceled) { + logger.Logger.WithError(err).Error("ldk-server event stream ended") + } + if statusErr := grpcStatusError(resp, nil); statusErr != nil && svc.ctx.Err() == nil { + logger.Logger.WithError(statusErr).Error("ldk-server event stream returned non-OK status") + } + select { + case <-svc.ctx.Done(): + return + case <-time.After(2 * time.Second): + goto reconnect + } + } + + event := &ldkevents.EventEnvelope{} + if err := proto.Unmarshal(frame, event); err != nil { + logger.Logger.WithError(err).Error("Failed to decode ldk-server event") + continue + } + svc.handleEvent(event) + } + + reconnect: + } +} + +func (svc *LDKServerService) handleEvent(event *ldkevents.EventEnvelope) { + switch e := event.Event.(type) { + case *ldkevents.EventEnvelope_PaymentReceived: + transaction, err := paymentToTransaction(e.PaymentReceived.Payment) + if err != nil { + logger.Logger.WithError(err).Error("Failed to convert ldk-server payment received event") + return + } + transaction.Metadata = appendCustomRecords(transaction.Metadata, e.PaymentReceived.CustomRecords) + svc.eventPublisher.Publish(&events.Event{ + Event: "nwc_lnclient_payment_received", + Properties: transaction, + }) + case *ldkevents.EventEnvelope_PaymentSuccessful: + transaction, err := paymentToTransaction(e.PaymentSuccessful.Payment) + if err != nil { + logger.Logger.WithError(err).Error("Failed to convert ldk-server payment successful event") + return + } + svc.eventPublisher.Publish(&events.Event{ + Event: "nwc_lnclient_payment_sent", + Properties: transaction, + }) + case *ldkevents.EventEnvelope_PaymentFailed: + transaction, err := paymentToTransaction(e.PaymentFailed.Payment) + if err != nil { + logger.Logger.WithError(err).Error("Failed to convert ldk-server payment failed event") + return + } + svc.eventPublisher.Publish(&events.Event{ + Event: "nwc_lnclient_payment_failed", + Properties: &lnclient.PaymentFailedEventProperties{ + Transaction: transaction, + Reason: "PaymentFailed", + }, + }) + case *ldkevents.EventEnvelope_PaymentForwarded: + forwarded := e.PaymentForwarded.ForwardedPayment + if forwarded.TotalFeeEarnedMsat == nil || forwarded.OutboundAmountForwardedMsat == nil { + return + } + svc.eventPublisher.Publish(&events.Event{ + Event: "nwc_payment_forwarded", + Properties: &lnclient.PaymentForwardedEventProperties{ + TotalFeeEarnedMsat: *forwarded.TotalFeeEarnedMsat, + OutboundAmountForwardedMsat: *forwarded.OutboundAmountForwardedMsat, + }, + }) + case *ldkevents.EventEnvelope_PaymentClaimable: + transaction, err := paymentToTransaction(e.PaymentClaimable.Payment) + if err != nil { + logger.Logger.WithError(err).Error("Failed to convert ldk-server payment claimable event") + return + } + transaction.Metadata = appendCustomRecords(transaction.Metadata, e.PaymentClaimable.CustomRecords) + svc.eventPublisher.Publish(&events.Event{ + Event: "nwc_lnclient_hold_invoice_accepted", + Properties: transaction, + }) + case *ldkevents.EventEnvelope_ChannelStateChanged: + svc.handleChannelStateChanged(e.ChannelStateChanged) + } +} + +func (svc *LDKServerService) handleChannelStateChanged(event *ldkevents.ChannelStateChanged) { + switch event.State { + case ldkevents.ChannelState_CHANNEL_STATE_READY: + svc.eventPublisher.Publish(&events.Event{ + Event: "nwc_channel_ready", + Properties: map[string]interface{}{ + "counterparty_node_id": event.GetCounterpartyNodeId(), + "node_type": config.LDKServerBackendType, + }, + }) + case ldkevents.ChannelState_CHANNEL_STATE_CLOSED, ldkevents.ChannelState_CHANNEL_STATE_OPEN_FAILED: + reason := "" + if event.Reason != nil { + reason = event.Reason.Message + } + svc.eventPublisher.Publish(&events.Event{ + Event: "nwc_channel_closed", + Properties: map[string]interface{}{ + "counterparty_node_id": event.GetCounterpartyNodeId(), + "reason": reason, + "node_type": config.LDKServerBackendType, + }, + }) + } +} + +func (svc *LDKServerService) waitForPaymentTerminal(paymentID string) (*ldktypes.Payment, error) { + ctx, cancel := context.WithTimeout(svc.ctx, 2*time.Minute) + defer cancel() + + ticker := time.NewTicker(time.Second) + defer ticker.Stop() + + for { + resp := &ldkapi.GetPaymentDetailsResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_GetPaymentDetails_FullMethodName, &ldkapi.GetPaymentDetailsRequest{ + PaymentId: paymentID, + }, resp); err != nil { + return nil, err + } + if resp.Payment != nil && resp.Payment.Status != ldktypes.PaymentStatus_PENDING { + return resp.Payment, nil + } + + select { + case <-ctx.Done(): + return nil, ctx.Err() + case <-ticker.C: + } + } +} + +func (svc *LDKServerService) waitForFundingTxID(userChannelID string) (string, error) { + ctx, cancel := context.WithTimeout(svc.ctx, 2*time.Minute) + defer cancel() + + ticker := time.NewTicker(time.Second) + defer ticker.Stop() + + for { + channels, err := svc.ListChannels(ctx) + if err != nil { + return "", err + } + for _, channel := range channels { + if channel.Id == userChannelID && channel.FundingTxId != "" { + return channel.FundingTxId, nil + } + } + + select { + case <-ctx.Done(): + return "", fmt.Errorf("timed out waiting for ldk-server funding transaction for channel %s", userChannelID) + case <-ticker.C: + } + } +} + +func (svc *LDKServerService) listAllPayments(ctx context.Context) ([]*ldktypes.Payment, error) { + var token *ldktypes.PageToken + var payments []*ldktypes.Payment + for { + resp := &ldkapi.ListPaymentsResponse{} + req := &ldkapi.ListPaymentsRequest{PageToken: token} + if err := svc.doUnary(ctx, ldkapi.LightningNode_ListPayments_FullMethodName, req, resp); err != nil { + return nil, err + } + payments = append(payments, resp.Payments...) + if resp.NextPageToken == nil { + return payments, nil + } + token = resp.NextPageToken + } +} + +func (svc *LDKServerService) findPayment(ctx context.Context, match func(*ldktypes.Payment) bool) (*ldktypes.Payment, error) { + payments, err := svc.listAllPayments(ctx) + if err != nil { + return nil, err + } + for _, payment := range payments { + if match(payment) { + return payment, nil + } + } + return nil, errors.New("payment not found") +} + +func (svc *LDKServerService) transactionFromCreatedInvoice(ctx context.Context, invoice string, paymentHash string) (*lnclient.Transaction, error) { + decodeResp := &ldkapi.DecodeInvoiceResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_DecodeInvoice_FullMethodName, &ldkapi.DecodeInvoiceRequest{ + Invoice: invoice, + }, decodeResp); err != nil { + return nil, err + } + + transaction := &lnclient.Transaction{ + Type: "incoming", + Invoice: invoice, + PaymentHash: decodeResp.PaymentHash, + AmountMsat: int64(decodeResp.GetAmountMsat()), + CreatedAt: int64(decodeResp.GetTimestamp()), + Description: decodeResp.GetDescription(), + DescriptionHash: decodeResp.GetDescriptionHash(), + Metadata: lnclient.Metadata{}, + } + if decodeResp.Expiry > 0 { + expiresAt := int64(decodeResp.GetTimestamp() + decodeResp.GetExpiry()) + transaction.ExpiresAt = &expiresAt + } + if paymentHash != "" { + transaction.PaymentHash = paymentHash + } + + lookup, err := svc.LookupInvoice(ctx, transaction.PaymentHash) + if err == nil { + lookup.Invoice = invoice + if lookup.Description == "" { + lookup.Description = transaction.Description + } + if lookup.DescriptionHash == "" { + lookup.DescriptionHash = transaction.DescriptionHash + } + if lookup.ExpiresAt == nil { + lookup.ExpiresAt = transaction.ExpiresAt + } + if lookup.Metadata == nil { + lookup.Metadata = lnclient.Metadata{} + } + return lookup, nil + } + + return transaction, nil +} + +func (svc *LDKServerService) findPeer(ctx context.Context, nodeID string) (*ldktypes.Peer, error) { + resp := &ldkapi.ListPeersResponse{} + if err := svc.doUnary(ctx, ldkapi.LightningNode_ListPeers_FullMethodName, &ldkapi.ListPeersRequest{}, resp); err != nil { + return nil, err + } + for _, peer := range resp.Peers { + if peer.NodeId == nodeID { + return peer, nil + } + } + return nil, fmt.Errorf("peer %s not found; connect it before opening a channel", nodeID) +} + +func paymentToTransaction(payment *ldktypes.Payment) (*lnclient.Transaction, error) { + if payment == nil { + return nil, errors.New("payment is nil") + } + + transaction := &lnclient.Transaction{ + AmountMsat: int64(payment.GetAmountMsat()), + FeesPaidMsat: int64(payment.GetFeePaidMsat()), + CreatedAt: int64(payment.LatestUpdateTimestamp), + Metadata: lnclient.Metadata{}, + } + if payment.Direction == ldktypes.PaymentDirection_OUTBOUND { + transaction.Type = "outgoing" + } else { + transaction.Type = "incoming" + } + if payment.Status == ldktypes.PaymentStatus_SUCCEEDED { + settledAt := int64(payment.LatestUpdateTimestamp) + transaction.SettledAt = &settledAt + } + + switch kind := payment.Kind.Kind.(type) { + case *ldktypes.PaymentKind_Bolt11: + transaction.PaymentHash = kind.Bolt11.Hash + if kind.Bolt11.Preimage != nil { + transaction.Preimage = *kind.Bolt11.Preimage + } + case *ldktypes.PaymentKind_Spontaneous: + transaction.PaymentHash = kind.Spontaneous.Hash + if kind.Spontaneous.Preimage != nil { + transaction.Preimage = *kind.Spontaneous.Preimage + } + case *ldktypes.PaymentKind_Bolt12Offer: + if kind.Bolt12Offer.Hash != nil { + transaction.PaymentHash = *kind.Bolt12Offer.Hash + } + if kind.Bolt12Offer.Preimage != nil { + transaction.Preimage = *kind.Bolt12Offer.Preimage + } + transaction.Metadata["offer"] = map[string]interface{}{ + "id": kind.Bolt12Offer.OfferId, + "payer_note": kind.Bolt12Offer.GetPayerNote(), + } + case *ldktypes.PaymentKind_Bolt12Refund: + if kind.Bolt12Refund.Hash != nil { + transaction.PaymentHash = *kind.Bolt12Refund.Hash + } + if kind.Bolt12Refund.Preimage != nil { + transaction.Preimage = *kind.Bolt12Refund.Preimage + } + case *ldktypes.PaymentKind_Onchain: + transaction.PaymentHash = kind.Onchain.Txid + } + return transaction, nil +} + +func paymentHashMatches(payment *ldktypes.Payment, paymentHash string) bool { + switch kind := payment.Kind.Kind.(type) { + case *ldktypes.PaymentKind_Bolt11: + return kind.Bolt11.Hash == paymentHash + case *ldktypes.PaymentKind_Spontaneous: + return kind.Spontaneous.Hash == paymentHash + case *ldktypes.PaymentKind_Bolt12Offer: + return kind.Bolt12Offer.Hash != nil && *kind.Bolt12Offer.Hash == paymentHash + case *ldktypes.PaymentKind_Bolt12Refund: + return kind.Bolt12Refund.Hash != nil && *kind.Bolt12Refund.Hash == paymentHash + default: + return false + } +} + +func appendCustomRecords(metadata lnclient.Metadata, records []*ldktypes.CustomTlvRecord) lnclient.Metadata { + if metadata == nil { + metadata = lnclient.Metadata{} + } + if len(records) == 0 { + return metadata + } + tlvs := make([]lnclient.TLVRecord, 0, len(records)) + for _, record := range records { + tlvs = append(tlvs, lnclient.TLVRecord{ + Type: record.TypeNum, + Value: hex.EncodeToString(record.Value), + }) + } + metadata["custom_records"] = tlvs + return metadata +} + +func newInvoiceDescription(description string, descriptionHash string) *ldktypes.Bolt11InvoiceDescription { + if descriptionHash != "" { + return &ldktypes.Bolt11InvoiceDescription{ + Kind: &ldktypes.Bolt11InvoiceDescription_Hash{Hash: descriptionHash}, + } + } + return &ldktypes.Bolt11InvoiceDescription{ + Kind: &ldktypes.Bolt11InvoiceDescription_Direct{Direct: description}, + } +} + +func networkToString(network ldktypes.Network) string { + switch network { + case ldktypes.Network_TESTNET: + return "testnet" + case ldktypes.Network_TESTNET4: + return "testnet4" + case ldktypes.Network_SIGNET: + return "signet" + case ldktypes.Network_REGTEST: + return "regtest" + default: + return "bitcoin" + } +} + +func grpcFrame(msg []byte) []byte { + frame := make([]byte, 5+len(msg)) + binary.BigEndian.PutUint32(frame[1:5], uint32(len(msg))) + copy(frame[5:], msg) + return frame +} + +func decodeSingleFrame(data []byte) ([]byte, error) { + reader := frameReader{reader: bytes.NewReader(data)} + return reader.Next() +} + +type frameReader struct { + reader io.Reader +} + +func (f *frameReader) Next() ([]byte, error) { + header := make([]byte, 5) + if _, err := io.ReadFull(f.reader, header); err != nil { + return nil, err + } + if header[0] != 0 { + return nil, errors.New("compressed gRPC frames are not supported") + } + length := binary.BigEndian.Uint32(header[1:5]) + payload := make([]byte, length) + if _, err := io.ReadFull(f.reader, payload); err != nil { + return nil, err + } + return payload, nil +} + +func grpcStatusError(resp *http.Response, body []byte) error { + if resp.StatusCode != http.StatusOK { + return fmt.Errorf("ldk-server returned HTTP %d", resp.StatusCode) + } + + statusCode := resp.Trailer.Get("grpc-status") + if statusCode == "" { + statusCode = resp.Header.Get("grpc-status") + } + if statusCode == "" || statusCode == "0" { + return nil + } + + message := resp.Trailer.Get("grpc-message") + if message == "" { + message = resp.Header.Get("grpc-message") + } + if message != "" { + if decoded, err := url.QueryUnescape(message); err == nil { + message = decoded + } + } + if message == "" { + message = strings.TrimSpace(string(body)) + } + return fmt.Errorf("ldk-server gRPC error %s: %s", statusCode, message) +} + +func parseNodeURI(uri string) (string, string, int, error) { + parts := strings.SplitN(uri, "@", 2) + if len(parts) != 2 { + return "", "", 0, fmt.Errorf("invalid node URI: %s", uri) + } + host, port, err := splitHostPort(parts[1]) + if err != nil { + return "", "", 0, err + } + return parts[0], host, port, nil +} + +func splitHostPort(address string) (string, int, error) { + host, portString, err := net.SplitHostPort(address) + if err != nil { + return "", 0, err + } + port, err := net.LookupPort("tcp", portString) + if err != nil { + return "", 0, err + } + return host, port, nil +} + +func uint64Ptr(v uint64) *uint64 { + return &v +} + +func boolPtr(v bool) *bool { + return &v +} + +func max[T ~int64 | ~uint32](a, b T) T { + if a > b { + return a + } + return b +} diff --git a/service/start.go b/service/start.go index 7ea158a97..320610f0d 100644 --- a/service/start.go +++ b/service/start.go @@ -25,6 +25,7 @@ import ( "github.com/getAlby/hub/lnclient/cashu" "github.com/getAlby/hub/lnclient/cln" "github.com/getAlby/hub/lnclient/ldk" + ldkserver "github.com/getAlby/hub/lnclient/ldk-server" "github.com/getAlby/hub/lnclient/lnd" "github.com/getAlby/hub/lnclient/phoenixd" "github.com/getAlby/hub/logger" @@ -373,6 +374,11 @@ func (svc *service) launchLNBackend(ctx context.Context, encryptionKey string) e PhoenixdAuthorization, _ := svc.cfg.Get("PhoenixdAuthorization", encryptionKey) lnClient, err = phoenixd.NewPhoenixService(ctx, PhoenixdAddress, PhoenixdAuthorization) + case config.LDKServerBackendType: + ldkServerAddress, _ := svc.cfg.Get("LDKServerAddress", encryptionKey) + ldkServerTlsCertPem, _ := svc.cfg.Get("LDKServerTlsCertPem", encryptionKey) + ldkServerApiKey, _ := svc.cfg.Get("LDKServerApiKey", encryptionKey) + lnClient, err = ldkserver.NewLDKServerService(ctx, svc.eventPublisher, ldkServerAddress, ldkServerTlsCertPem, ldkServerApiKey) case config.CashuBackendType: mnemonic, _ := svc.cfg.Get("Mnemonic", encryptionKey) cashuMintUrl, _ := svc.cfg.Get("CashuMintUrl", encryptionKey)