channel rpc
This commit is contained in:
parent
11860d099f
commit
b5bd1a74d9
24 changed files with 35275 additions and 33084 deletions
|
|
@ -38,6 +38,11 @@ The nostr server will send back a message response, and inside the body there wi
|
|||
- This methods has an __empty__ __request__ body
|
||||
- output: [LndSeed](#LndSeed)
|
||||
|
||||
- ListChannels
|
||||
- auth type: __Admin__
|
||||
- This methods has an __empty__ __request__ body
|
||||
- output: [LndChannels](#LndChannels)
|
||||
|
||||
- GetUsageMetrics
|
||||
- auth type: __Metrics__
|
||||
- This methods has an __empty__ __request__ body
|
||||
|
|
@ -185,9 +190,9 @@ The nostr server will send back a message response, and inside the body there wi
|
|||
|
||||
- __User__:
|
||||
- expected context content
|
||||
- __user_id__: _string_
|
||||
- __app_id__: _string_
|
||||
- __app_user_id__: _string_
|
||||
- __user_id__: _string_
|
||||
|
||||
- __Admin__:
|
||||
- expected context content
|
||||
|
|
@ -244,6 +249,13 @@ The nostr server will send back a message response, and inside the body there wi
|
|||
- This methods has an __empty__ __request__ body
|
||||
- output: [LndSeed](#LndSeed)
|
||||
|
||||
- ListChannels
|
||||
- auth type: __Admin__
|
||||
- http method: __get__
|
||||
- http route: __/api/admin/channels__
|
||||
- This methods has an __empty__ __request__ body
|
||||
- output: [LndChannels](#LndChannels)
|
||||
|
||||
- GetUsageMetrics
|
||||
- auth type: __Metrics__
|
||||
- http method: __post__
|
||||
|
|
@ -601,131 +613,305 @@ The nostr server will send back a message response, and inside the body there wi
|
|||
## Messages
|
||||
### The content of requests and response from the methods
|
||||
|
||||
### AppsMetricsRequest
|
||||
- __from_unix__: _number_ *this field is optional
|
||||
- __to_unix__: _number_ *this field is optional
|
||||
- __include_operations__: _boolean_ *this field is optional
|
||||
### AuthAppRequest
|
||||
- __name__: _string_
|
||||
- __allow_user_creation__: _boolean_ *this field is optional
|
||||
|
||||
### SetMockAppBalanceRequest
|
||||
- __amount__: _number_
|
||||
### Application
|
||||
- __name__: _string_
|
||||
- __id__: _string_
|
||||
- __balance__: _number_
|
||||
- __npub__: _string_
|
||||
|
||||
### NewAddressResponse
|
||||
- __address__: _string_
|
||||
### DecodeInvoiceRequest
|
||||
- __invoice__: _string_
|
||||
|
||||
### PayAddressResponse
|
||||
- __txId__: _string_
|
||||
- __operation_id__: _string_
|
||||
- __service_fee__: _number_
|
||||
- __network_fee__: _number_
|
||||
### OpenChannel
|
||||
- __channel_id__: _string_
|
||||
- __capacity__: _number_
|
||||
- __active__: _boolean_
|
||||
- __lifetime__: _number_
|
||||
- __local_balance__: _number_
|
||||
- __remote_balance__: _number_
|
||||
- __label__: _string_
|
||||
|
||||
### ChannelRouting
|
||||
- __send_errors__: _number_
|
||||
- __receive_errors__: _number_
|
||||
- __missed_forward_fee_as_output__: _number_
|
||||
- __events_number__: _number_
|
||||
- __channel_id__: _string_
|
||||
- __forward_errors_as_input__: _number_
|
||||
- __forward_errors_as_output__: _number_
|
||||
- __missed_forward_fee_as_input__: _number_
|
||||
- __forward_fee_as_input__: _number_
|
||||
- __forward_fee_as_output__: _number_
|
||||
|
||||
### ChainBalanceEvent
|
||||
- __block_height__: _number_
|
||||
- __confirmed_balance__: _number_
|
||||
- __unconfirmed_balance__: _number_
|
||||
- __total_balance__: _number_
|
||||
|
||||
### GetPaymentStateRequest
|
||||
- __invoice__: _string_
|
||||
|
||||
### EncryptionExchangeRequest
|
||||
- __deviceId__: _string_
|
||||
- __publicKey__: _string_
|
||||
|
||||
### ChannelBalanceEvent
|
||||
- __block_height__: _number_
|
||||
- __channel_id__: _string_
|
||||
- __local_balance_sats__: _number_
|
||||
- __remote_balance_sats__: _number_
|
||||
|
||||
### HandleLnurlPayResponse
|
||||
- __pr__: _string_
|
||||
- __routes__: ARRAY of: _[Empty](#Empty)_
|
||||
|
||||
### GetProductBuyLinkResponse
|
||||
- __link__: _string_
|
||||
### LiveUserOperation
|
||||
- __operation__: _[UserOperation](#UserOperation)_
|
||||
|
||||
### UsageMetric
|
||||
- __parsed_in_nano__: _number_
|
||||
- __validate_in_nano__: _number_
|
||||
- __handle_in_nano__: _number_
|
||||
- __batch__: _boolean_
|
||||
- __nostr__: _boolean_
|
||||
- __batch_size__: _number_
|
||||
- __processed_at_ms__: _number_
|
||||
- __auth_in_nano__: _number_
|
||||
- __rpc_name__: _string_
|
||||
### RequestNPubLinkingTokenRequest
|
||||
- __user_identifier__: _string_
|
||||
|
||||
### AppMetrics
|
||||
- __app__: _[Application](#Application)_
|
||||
- __users__: _[UsersInfo](#UsersInfo)_
|
||||
- __received__: _number_
|
||||
- __total_fees__: _number_
|
||||
- __operations__: ARRAY of: _[UserOperation](#UserOperation)_
|
||||
- __spent__: _number_
|
||||
- __available__: _number_
|
||||
- __fees__: _number_
|
||||
- __invoices__: _number_
|
||||
### HttpCreds
|
||||
- __url__: _string_
|
||||
- __token__: _string_
|
||||
|
||||
### LndMetrics
|
||||
- __nodes__: ARRAY of: _[LndNodeMetrics](#LndNodeMetrics)_
|
||||
### AppsMetricsRequest
|
||||
- __from_unix__: _number_ *this field is optional
|
||||
- __to_unix__: _number_ *this field is optional
|
||||
- __include_operations__: _boolean_ *this field is optional
|
||||
|
||||
### Application
|
||||
### LnurlWithdrawInfoResponse
|
||||
- __balanceCheck__: _string_
|
||||
- __payLink__: _string_
|
||||
- __tag__: _string_
|
||||
- __callback__: _string_
|
||||
- __k1__: _string_
|
||||
- __defaultDescription__: _string_
|
||||
- __minWithdrawable__: _number_
|
||||
- __maxWithdrawable__: _number_
|
||||
|
||||
### NewInvoiceRequest
|
||||
- __memo__: _string_
|
||||
- __amountSats__: _number_
|
||||
|
||||
### DecodeInvoiceResponse
|
||||
- __amount__: _number_
|
||||
|
||||
### UserInfo
|
||||
- __service_fee_bps__: _number_
|
||||
- __network_max_fee_bps__: _number_
|
||||
- __network_max_fee_fixed__: _number_
|
||||
- __userId__: _string_
|
||||
- __balance__: _number_
|
||||
- __npub__: _string_
|
||||
- __name__: _string_
|
||||
- __id__: _string_
|
||||
- __max_withdrawable__: _number_
|
||||
- __user_identifier__: _string_
|
||||
|
||||
### AddAppInvoiceRequest
|
||||
- __invoice_req__: _[NewInvoiceRequest](#NewInvoiceRequest)_
|
||||
- __payer_identifier__: _string_
|
||||
- __http_callback_url__: _string_
|
||||
### SetMockInvoiceAsPaidRequest
|
||||
- __invoice__: _string_
|
||||
- __amount__: _number_
|
||||
|
||||
### SendAppUserToAppPaymentRequest
|
||||
- __from_user_identifier__: _string_
|
||||
- __amount__: _number_
|
||||
|
||||
### GetAppUserLNURLInfoRequest
|
||||
- __user_identifier__: _string_
|
||||
- __base_url_override__: _string_
|
||||
|
||||
### GetPaymentStateRequest
|
||||
- __invoice__: _string_
|
||||
### GetProductBuyLinkResponse
|
||||
- __link__: _string_
|
||||
|
||||
### ChannelRouting
|
||||
- __forward_fee_as_output__: _number_
|
||||
- __events_number__: _number_
|
||||
- __send_errors__: _number_
|
||||
- __forward_errors_as_output__: _number_
|
||||
- __forward_fee_as_input__: _number_
|
||||
- __missed_forward_fee_as_input__: _number_
|
||||
- __missed_forward_fee_as_output__: _number_
|
||||
- __channel_id__: _string_
|
||||
- __receive_errors__: _number_
|
||||
- __forward_errors_as_input__: _number_
|
||||
### LndMetrics
|
||||
- __nodes__: ARRAY of: _[LndNodeMetrics](#LndNodeMetrics)_
|
||||
|
||||
### PayAppUserInvoiceRequest
|
||||
- __user_identifier__: _string_
|
||||
- __invoice__: _string_
|
||||
- __amount__: _number_
|
||||
### AddAppUserRequest
|
||||
- __balance__: _number_
|
||||
- __identifier__: _string_
|
||||
- __fail_if_exists__: _boolean_
|
||||
|
||||
### SetMockAppUserBalanceRequest
|
||||
- __user_identifier__: _string_
|
||||
- __amount__: _number_
|
||||
|
||||
### PayAddressRequest
|
||||
- __address__: _string_
|
||||
- __amoutSats__: _number_
|
||||
- __satsPerVByte__: _number_
|
||||
### BanUserResponse
|
||||
- __balance_sats__: _number_
|
||||
- __banned_app_users__: ARRAY of: _[BannedAppUser](#BannedAppUser)_
|
||||
|
||||
### GetUserOperationsRequest
|
||||
- __max_size__: _number_
|
||||
- __latestIncomingInvoice__: _number_
|
||||
- __latestOutgoingInvoice__: _number_
|
||||
- __latestIncomingTx__: _number_
|
||||
- __latestOutgoingTx__: _number_
|
||||
- __latestIncomingUserToUserPayment__: _number_
|
||||
- __latestOutgoingUserToUserPayment__: _number_
|
||||
- __max_size__: _number_
|
||||
|
||||
### MigrationUpdate
|
||||
- __closure__: _[ClosureMigration](#ClosureMigration)_ *this field is optional
|
||||
- __relays__: _[RelaysMigration](#RelaysMigration)_ *this field is optional
|
||||
|
||||
### LinkNPubThroughTokenRequest
|
||||
- __token__: _string_
|
||||
|
||||
### LndGetInfoRequest
|
||||
- __nodeId__: _number_
|
||||
|
||||
### BannedAppUser
|
||||
- __app_name__: _string_
|
||||
- __app_id__: _string_
|
||||
- __user_identifier__: _string_
|
||||
- __nostr_pub__: _string_
|
||||
|
||||
### Product
|
||||
- __id__: _string_
|
||||
- __name__: _string_
|
||||
- __price_sats__: _number_
|
||||
|
||||
### UseInviteLinkRequest
|
||||
- __invite_token__: _string_
|
||||
### GetInviteTokenStateResponse
|
||||
- __used__: _boolean_
|
||||
|
||||
### AppsMetrics
|
||||
- __apps__: ARRAY of: _[AppMetrics](#AppMetrics)_
|
||||
### PayInvoiceResponse
|
||||
- __preimage__: _string_
|
||||
- __amount_paid__: _number_
|
||||
- __operation_id__: _string_
|
||||
- __service_fee__: _number_
|
||||
- __network_fee__: _number_
|
||||
|
||||
### SetMockInvoiceAsPaidRequest
|
||||
- __invoice__: _string_
|
||||
### OpenChannelResponse
|
||||
- __channelId__: _string_
|
||||
|
||||
### PayAddressResponse
|
||||
- __service_fee__: _number_
|
||||
- __network_fee__: _number_
|
||||
- __txId__: _string_
|
||||
- __operation_id__: _string_
|
||||
|
||||
### PaymentState
|
||||
- __network_fee__: _number_
|
||||
- __paid_at_unix__: _number_
|
||||
- __amount__: _number_
|
||||
- __service_fee__: _number_
|
||||
|
||||
### UsersInfo
|
||||
- __no_balance__: _number_
|
||||
- __negative_balance__: _number_
|
||||
- __always_been_inactive__: _number_
|
||||
- __balance_avg__: _number_
|
||||
- __balance_median__: _number_
|
||||
- __total__: _number_
|
||||
|
||||
### LndGetInfoResponse
|
||||
- __alias__: _string_
|
||||
|
||||
### LndMetricsRequest
|
||||
- __to_unix__: _number_ *this field is optional
|
||||
- __from_unix__: _number_ *this field is optional
|
||||
|
||||
### SetMockAppUserBalanceRequest
|
||||
- __amount__: _number_
|
||||
- __user_identifier__: _string_
|
||||
|
||||
### RelaysMigration
|
||||
- __relays__: ARRAY of: _string_
|
||||
|
||||
### UsageMetric
|
||||
- __rpc_name__: _string_
|
||||
- __batch__: _boolean_
|
||||
- __nostr__: _boolean_
|
||||
- __processed_at_ms__: _number_
|
||||
- __auth_in_nano__: _number_
|
||||
- __handle_in_nano__: _number_
|
||||
- __batch_size__: _number_
|
||||
- __parsed_in_nano__: _number_
|
||||
- __validate_in_nano__: _number_
|
||||
|
||||
### AppUser
|
||||
- __identifier__: _string_
|
||||
- __info__: _[UserInfo](#UserInfo)_
|
||||
- __max_withdrawable__: _number_
|
||||
|
||||
### PayAddressRequest
|
||||
- __address__: _string_
|
||||
- __amoutSats__: _number_
|
||||
- __satsPerVByte__: _number_
|
||||
|
||||
### LnurlLinkResponse
|
||||
- __lnurl__: _string_
|
||||
- __k1__: _string_
|
||||
|
||||
### CreateOneTimeInviteLinkResponse
|
||||
- __invitation_link__: _string_
|
||||
|
||||
### LndSeed
|
||||
- __seed__: ARRAY of: _string_
|
||||
|
||||
### LndChannels
|
||||
- __open_channels__: ARRAY of: _[OpenChannel](#OpenChannel)_
|
||||
|
||||
### OpenChannelRequest
|
||||
- __pushAmount__: _number_
|
||||
- __closeAddress__: _string_
|
||||
- __destination__: _string_
|
||||
- __fundingAmount__: _number_
|
||||
|
||||
### UserOperations
|
||||
- __fromIndex__: _number_
|
||||
- __toIndex__: _number_
|
||||
- __operations__: ARRAY of: _[UserOperation](#UserOperation)_
|
||||
|
||||
### Empty
|
||||
|
||||
### SendAppUserToAppUserPaymentRequest
|
||||
- __from_user_identifier__: _string_
|
||||
- __to_user_identifier__: _string_
|
||||
- __amount__: _number_
|
||||
|
||||
### BanUserRequest
|
||||
- __user_id__: _string_
|
||||
### LnurlPayInfoResponse
|
||||
- __maxSendable__: _number_
|
||||
- __minSendable__: _number_
|
||||
- __metadata__: _string_
|
||||
- __allowsNostr__: _boolean_
|
||||
- __nostrPubkey__: _string_
|
||||
- __tag__: _string_
|
||||
- __callback__: _string_
|
||||
|
||||
### AddProductRequest
|
||||
- __name__: _string_
|
||||
- __price_sats__: _number_
|
||||
|
||||
### RequestNPubLinkingTokenResponse
|
||||
- __token__: _string_
|
||||
|
||||
### EnrollAdminTokenRequest
|
||||
- __admin_token__: _string_
|
||||
|
||||
### CreateOneTimeInviteLinkRequest
|
||||
- __sats__: _number_ *this field is optional
|
||||
|
||||
### GetInviteTokenStateRequest
|
||||
- __invite_token__: _string_
|
||||
|
||||
### RoutingEvent
|
||||
- __forward_fail_event__: _boolean_
|
||||
- __incoming_channel_id__: _number_
|
||||
- __incoming_htlc_id__: _number_
|
||||
- __event_type__: _string_
|
||||
- __incoming_amt_msat__: _number_
|
||||
- __failure_string__: _string_
|
||||
- __settled__: _boolean_
|
||||
- __offchain__: _boolean_
|
||||
- __outgoing_channel_id__: _number_
|
||||
- __outgoing_htlc_id__: _number_
|
||||
- __timestamp_ns__: _number_
|
||||
- __outgoing_amt_msat__: _number_
|
||||
|
||||
### GetAppUserRequest
|
||||
- __user_identifier__: _string_
|
||||
|
||||
### NewInvoiceResponse
|
||||
### PayInvoiceRequest
|
||||
- __invoice__: _string_
|
||||
- __amount__: _number_
|
||||
|
||||
### GetUserOperationsResponse
|
||||
- __latestIncomingTxOperations__: _[UserOperations](#UserOperations)_
|
||||
|
|
@ -735,266 +921,96 @@ The nostr server will send back a message response, and inside the body there wi
|
|||
- __latestIncomingInvoiceOperations__: _[UserOperations](#UserOperations)_
|
||||
- __latestOutgoingTxOperations__: _[UserOperations](#UserOperations)_
|
||||
|
||||
### LndMetricsRequest
|
||||
- __from_unix__: _number_ *this field is optional
|
||||
- __to_unix__: _number_ *this field is optional
|
||||
### UsageMetrics
|
||||
- __metrics__: ARRAY of: _[UsageMetric](#UsageMetric)_
|
||||
|
||||
### AuthApp
|
||||
- __app__: _[Application](#Application)_
|
||||
- __auth_token__: _string_
|
||||
### NewAddressRequest
|
||||
- __addressType__: _[AddressType](#AddressType)_
|
||||
|
||||
### DecodeInvoiceRequest
|
||||
- __invoice__: _string_
|
||||
### ClosedChannel
|
||||
- __channel_id__: _string_
|
||||
- __capacity__: _number_
|
||||
- __closed_height__: _number_
|
||||
|
||||
### LnurlLinkResponse
|
||||
- __lnurl__: _string_
|
||||
- __k1__: _string_
|
||||
### LndNodeMetrics
|
||||
- __channels_balance_events__: ARRAY of: _[ChannelBalanceEvent](#ChannelBalanceEvent)_
|
||||
- __chain_balance_events__: ARRAY of: _[ChainBalanceEvent](#ChainBalanceEvent)_
|
||||
- __closed_channels__: ARRAY of: _[ClosedChannel](#ClosedChannel)_
|
||||
- __channel_routing__: ARRAY of: _[ChannelRouting](#ChannelRouting)_
|
||||
- __offline_channels__: _number_
|
||||
- __online_channels__: _number_
|
||||
- __pending_channels__: _number_
|
||||
- __closing_channels__: _number_
|
||||
- __open_channels__: ARRAY of: _[OpenChannel](#OpenChannel)_
|
||||
|
||||
### RequestNPubLinkingTokenResponse
|
||||
- __token__: _string_
|
||||
|
||||
### CreateOneTimeInviteLinkResponse
|
||||
- __invitation_link__: _string_
|
||||
|
||||
### UsersInfo
|
||||
- __total__: _number_
|
||||
- __no_balance__: _number_
|
||||
- __negative_balance__: _number_
|
||||
- __always_been_inactive__: _number_
|
||||
- __balance_avg__: _number_
|
||||
- __balance_median__: _number_
|
||||
|
||||
### RoutingEvent
|
||||
- __outgoing_channel_id__: _number_
|
||||
- __incoming_amt_msat__: _number_
|
||||
- __settled__: _boolean_
|
||||
- __outgoing_amt_msat__: _number_
|
||||
- __failure_string__: _string_
|
||||
- __offchain__: _boolean_
|
||||
- __incoming_channel_id__: _number_
|
||||
- __incoming_htlc_id__: _number_
|
||||
- __outgoing_htlc_id__: _number_
|
||||
- __timestamp_ns__: _number_
|
||||
- __event_type__: _string_
|
||||
- __forward_fail_event__: _boolean_
|
||||
|
||||
### UserInfo
|
||||
- __user_identifier__: _string_
|
||||
- __service_fee_bps__: _number_
|
||||
- __network_max_fee_bps__: _number_
|
||||
- __network_max_fee_fixed__: _number_
|
||||
- __userId__: _string_
|
||||
- __balance__: _number_
|
||||
- __max_withdrawable__: _number_
|
||||
|
||||
### LndGetInfoRequest
|
||||
- __nodeId__: _number_
|
||||
### BanUserRequest
|
||||
- __user_id__: _string_
|
||||
|
||||
### AddAppRequest
|
||||
- __name__: _string_
|
||||
- __allow_user_creation__: _boolean_
|
||||
|
||||
### AddAppUserInvoiceRequest
|
||||
- __receiver_identifier__: _string_
|
||||
- __payer_identifier__: _string_
|
||||
- __http_callback_url__: _string_
|
||||
- __invoice_req__: _[NewInvoiceRequest](#NewInvoiceRequest)_
|
||||
- __receiver_identifier__: _string_
|
||||
|
||||
### LinkNPubThroughTokenRequest
|
||||
- __token__: _string_
|
||||
### SetMockAppBalanceRequest
|
||||
- __amount__: _number_
|
||||
|
||||
### PayInvoiceResponse
|
||||
- __network_fee__: _number_
|
||||
- __preimage__: _string_
|
||||
- __amount_paid__: _number_
|
||||
- __operation_id__: _string_
|
||||
- __service_fee__: _number_
|
||||
### AppMetrics
|
||||
- __spent__: _number_
|
||||
- __available__: _number_
|
||||
- __fees__: _number_
|
||||
- __invoices__: _number_
|
||||
- __operations__: ARRAY of: _[UserOperation](#UserOperation)_
|
||||
- __app__: _[Application](#Application)_
|
||||
- __users__: _[UsersInfo](#UsersInfo)_
|
||||
- __received__: _number_
|
||||
- __total_fees__: _number_
|
||||
|
||||
### LnurlPayInfoResponse
|
||||
- __allowsNostr__: _boolean_
|
||||
- __nostrPubkey__: _string_
|
||||
- __tag__: _string_
|
||||
- __callback__: _string_
|
||||
- __maxSendable__: _number_
|
||||
- __minSendable__: _number_
|
||||
- __metadata__: _string_
|
||||
### AppsMetrics
|
||||
- __apps__: ARRAY of: _[AppMetrics](#AppMetrics)_
|
||||
|
||||
### ClosureMigration
|
||||
- __closes_at_unix__: _number_
|
||||
|
||||
### ChainBalanceEvent
|
||||
- __block_height__: _number_
|
||||
- __confirmed_balance__: _number_
|
||||
- __unconfirmed_balance__: _number_
|
||||
- __total_balance__: _number_
|
||||
|
||||
### LndNodeMetrics
|
||||
- __channels_balance_events__: ARRAY of: _[ChannelBalanceEvent](#ChannelBalanceEvent)_
|
||||
- __channel_routing__: ARRAY of: _[ChannelRouting](#ChannelRouting)_
|
||||
- __closing_channels__: _number_
|
||||
- __open_channels__: ARRAY of: _[OpenChannel](#OpenChannel)_
|
||||
- __closed_channels__: ARRAY of: _[ClosedChannel](#ClosedChannel)_
|
||||
- __chain_balance_events__: ARRAY of: _[ChainBalanceEvent](#ChainBalanceEvent)_
|
||||
- __offline_channels__: _number_
|
||||
- __online_channels__: _number_
|
||||
- __pending_channels__: _number_
|
||||
|
||||
### UserOperation
|
||||
- __network_fee__: _number_
|
||||
- __type__: _[UserOperationType](#UserOperationType)_
|
||||
- __identifier__: _string_
|
||||
- __service_fee__: _number_
|
||||
- __operationId__: _string_
|
||||
- __confirmed__: _boolean_
|
||||
- __tx_hash__: _string_
|
||||
- __internal__: _boolean_
|
||||
- __paidAtUnix__: _number_
|
||||
- __inbound__: _boolean_
|
||||
- __amount__: _number_
|
||||
|
||||
### GetInviteTokenStateRequest
|
||||
- __invite_token__: _string_
|
||||
|
||||
### ChannelBalanceEvent
|
||||
- __block_height__: _number_
|
||||
- __channel_id__: _string_
|
||||
- __local_balance_sats__: _number_
|
||||
- __remote_balance_sats__: _number_
|
||||
|
||||
### OpenChannel
|
||||
- __channel_id__: _string_
|
||||
- __capacity__: _number_
|
||||
- __active__: _boolean_
|
||||
- __lifetime__: _number_
|
||||
- __local_balance__: _number_
|
||||
- __remote_balance__: _number_
|
||||
|
||||
### BanUserResponse
|
||||
- __balance_sats__: _number_
|
||||
- __banned_app_users__: ARRAY of: _[BannedAppUser](#BannedAppUser)_
|
||||
|
||||
### AppUser
|
||||
- __identifier__: _string_
|
||||
- __info__: _[UserInfo](#UserInfo)_
|
||||
- __max_withdrawable__: _number_
|
||||
|
||||
### PaymentState
|
||||
- __amount__: _number_
|
||||
- __service_fee__: _number_
|
||||
- __network_fee__: _number_
|
||||
- __paid_at_unix__: _number_
|
||||
|
||||
### MigrationUpdate
|
||||
- __closure__: _[ClosureMigration](#ClosureMigration)_ *this field is optional
|
||||
- __relays__: _[RelaysMigration](#RelaysMigration)_ *this field is optional
|
||||
|
||||
### HttpCreds
|
||||
- __url__: _string_
|
||||
- __token__: _string_
|
||||
|
||||
### ClosedChannel
|
||||
- __capacity__: _number_
|
||||
- __closed_height__: _number_
|
||||
- __channel_id__: _string_
|
||||
|
||||
### LndGetInfoResponse
|
||||
- __alias__: _string_
|
||||
|
||||
### PayInvoiceRequest
|
||||
### PayAppUserInvoiceRequest
|
||||
- __user_identifier__: _string_
|
||||
- __invoice__: _string_
|
||||
- __amount__: _number_
|
||||
|
||||
### SendAppUserToAppPaymentRequest
|
||||
- __from_user_identifier__: _string_
|
||||
- __amount__: _number_
|
||||
### NewAddressResponse
|
||||
- __address__: _string_
|
||||
|
||||
### OpenChannelRequest
|
||||
- __closeAddress__: _string_
|
||||
- __destination__: _string_
|
||||
- __fundingAmount__: _number_
|
||||
- __pushAmount__: _number_
|
||||
### NewInvoiceResponse
|
||||
- __invoice__: _string_
|
||||
|
||||
### EnrollAdminTokenRequest
|
||||
- __admin_token__: _string_
|
||||
|
||||
### Empty
|
||||
|
||||
### NewAddressRequest
|
||||
- __addressType__: _[AddressType](#AddressType)_
|
||||
|
||||
### AddProductRequest
|
||||
- __name__: _string_
|
||||
- __price_sats__: _number_
|
||||
|
||||
### GetInviteTokenStateResponse
|
||||
- __used__: _boolean_
|
||||
|
||||
### EncryptionExchangeRequest
|
||||
- __publicKey__: _string_
|
||||
- __deviceId__: _string_
|
||||
|
||||
### UsageMetrics
|
||||
- __metrics__: ARRAY of: _[UsageMetric](#UsageMetric)_
|
||||
|
||||
### AuthAppRequest
|
||||
- __name__: _string_
|
||||
- __allow_user_creation__: _boolean_ *this field is optional
|
||||
|
||||
### AddAppUserRequest
|
||||
### UserOperation
|
||||
- __identifier__: _string_
|
||||
- __fail_if_exists__: _boolean_
|
||||
- __balance__: _number_
|
||||
|
||||
### DecodeInvoiceResponse
|
||||
- __operationId__: _string_
|
||||
- __network_fee__: _number_
|
||||
- __confirmed__: _boolean_
|
||||
- __tx_hash__: _string_
|
||||
- __paidAtUnix__: _number_
|
||||
- __type__: _[UserOperationType](#UserOperationType)_
|
||||
- __amount__: _number_
|
||||
- __internal__: _boolean_
|
||||
- __inbound__: _boolean_
|
||||
- __service_fee__: _number_
|
||||
|
||||
### RelaysMigration
|
||||
- __relays__: ARRAY of: _string_
|
||||
### UseInviteLinkRequest
|
||||
- __invite_token__: _string_
|
||||
|
||||
### CreateOneTimeInviteLinkRequest
|
||||
- __sats__: _number_ *this field is optional
|
||||
### AuthApp
|
||||
- __app__: _[Application](#Application)_
|
||||
- __auth_token__: _string_
|
||||
|
||||
### BannedAppUser
|
||||
- __app_name__: _string_
|
||||
- __app_id__: _string_
|
||||
- __user_identifier__: _string_
|
||||
- __nostr_pub__: _string_
|
||||
|
||||
### SendAppUserToAppUserPaymentRequest
|
||||
- __from_user_identifier__: _string_
|
||||
- __to_user_identifier__: _string_
|
||||
- __amount__: _number_
|
||||
|
||||
### NewInvoiceRequest
|
||||
- __amountSats__: _number_
|
||||
- __memo__: _string_
|
||||
|
||||
### OpenChannelResponse
|
||||
- __channelId__: _string_
|
||||
|
||||
### LiveUserOperation
|
||||
- __operation__: _[UserOperation](#UserOperation)_
|
||||
|
||||
### LndSeed
|
||||
- __seed__: ARRAY of: _string_
|
||||
|
||||
### LnurlWithdrawInfoResponse
|
||||
- __maxWithdrawable__: _number_
|
||||
- __balanceCheck__: _string_
|
||||
- __payLink__: _string_
|
||||
- __tag__: _string_
|
||||
- __callback__: _string_
|
||||
- __k1__: _string_
|
||||
- __defaultDescription__: _string_
|
||||
- __minWithdrawable__: _number_
|
||||
|
||||
### UserOperations
|
||||
- __toIndex__: _number_
|
||||
- __operations__: ARRAY of: _[UserOperation](#UserOperation)_
|
||||
- __fromIndex__: _number_
|
||||
|
||||
### RequestNPubLinkingTokenRequest
|
||||
- __user_identifier__: _string_
|
||||
### AddAppInvoiceRequest
|
||||
- __payer_identifier__: _string_
|
||||
- __http_callback_url__: _string_
|
||||
- __invoice_req__: _[NewInvoiceRequest](#NewInvoiceRequest)_
|
||||
## Enums
|
||||
### The enumerators used in the messages
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -141,6 +141,25 @@ export default (methods: Types.ServerMethods, opts: ServerOptions) => {
|
|||
opts.metricsCallback([{ ...info, ...stats, ...authContext }])
|
||||
} catch (ex) { const e = ex as any; logErrorAndReturnResponse(e, e.message || e, res, logger, { ...info, ...stats, ...authCtx }, opts.metricsCallback); if (opts.throwErrors) throw e }
|
||||
})
|
||||
if (!opts.allowNotImplementedMethods && !methods.ListChannels) throw new Error('method: ListChannels is not implemented')
|
||||
app.get('/api/admin/channels', async (req, res) => {
|
||||
const info: Types.RequestInfo = { rpcName: 'ListChannels', batch: false, nostr: false, batchSize: 0}
|
||||
const stats: Types.RequestStats = { startMs:req.startTimeMs || 0, start:req.startTime || 0n, parse: process.hrtime.bigint(), guard: 0n, validate: 0n, handle: 0n }
|
||||
let authCtx: Types.AuthContext = {}
|
||||
try {
|
||||
if (!methods.ListChannels) throw new Error('method: ListChannels is not implemented')
|
||||
const authContext = await opts.AdminAuthGuard(req.headers['authorization'])
|
||||
authCtx = authContext
|
||||
stats.guard = process.hrtime.bigint()
|
||||
stats.validate = stats.guard
|
||||
const query = req.query
|
||||
const params = req.params
|
||||
const response = await methods.ListChannels({rpcName:'ListChannels', ctx:authContext })
|
||||
stats.handle = process.hrtime.bigint()
|
||||
res.json({status: 'OK', ...response})
|
||||
opts.metricsCallback([{ ...info, ...stats, ...authContext }])
|
||||
} catch (ex) { const e = ex as any; logErrorAndReturnResponse(e, e.message || e, res, logger, { ...info, ...stats, ...authCtx }, opts.metricsCallback); if (opts.throwErrors) throw e }
|
||||
})
|
||||
if (!opts.allowNotImplementedMethods && !methods.GetUsageMetrics) throw new Error('method: GetUsageMetrics is not implemented')
|
||||
app.post('/api/reports/usage', async (req, res) => {
|
||||
const info: Types.RequestInfo = { rpcName: 'GetUsageMetrics', batch: false, nostr: false, batchSize: 0}
|
||||
|
|
|
|||
|
|
@ -87,6 +87,20 @@ export default (params: ClientParams) => ({
|
|||
}
|
||||
return { status: 'ERROR', reason: 'invalid response' }
|
||||
},
|
||||
ListChannels: async (): Promise<ResultError | ({ status: 'OK' }& Types.LndChannels)> => {
|
||||
const auth = await params.retrieveAdminAuth()
|
||||
if (auth === null) throw new Error('retrieveAdminAuth() returned null')
|
||||
let finalRoute = '/api/admin/channels'
|
||||
const { data } = await axios.get(params.baseUrl + finalRoute, { headers: { 'authorization': auth } })
|
||||
if (data.status === 'ERROR' && typeof data.reason === 'string') return data
|
||||
if (data.status === 'OK') {
|
||||
const result = data
|
||||
if(!params.checkResult) return { status: 'OK', ...result }
|
||||
const error = Types.LndChannelsValidate(result)
|
||||
if (error === null) { return { status: 'OK', ...result } } else return { status: 'ERROR', reason: error.message }
|
||||
}
|
||||
return { status: 'ERROR', reason: 'invalid response' }
|
||||
},
|
||||
GetUsageMetrics: async (): Promise<ResultError | ({ status: 'OK' }& Types.UsageMetrics)> => {
|
||||
const auth = await params.retrieveMetricsAuth()
|
||||
if (auth === null) throw new Error('retrieveMetricsAuth() returned null')
|
||||
|
|
|
|||
|
|
@ -86,6 +86,20 @@ export default (params: NostrClientParams, send: (to:string, message: NostrRequ
|
|||
}
|
||||
return { status: 'ERROR', reason: 'invalid response' }
|
||||
},
|
||||
ListChannels: async (): Promise<ResultError | ({ status: 'OK' }& Types.LndChannels)> => {
|
||||
const auth = await params.retrieveNostrAdminAuth()
|
||||
if (auth === null) throw new Error('retrieveNostrAdminAuth() returned null')
|
||||
const nostrRequest: NostrRequest = {}
|
||||
const data = await send(params.pubDestination, {rpcName:'ListChannels',authIdentifier:auth, ...nostrRequest })
|
||||
if (data.status === 'ERROR' && typeof data.reason === 'string') return data
|
||||
if (data.status === 'OK') {
|
||||
const result = data
|
||||
if(!params.checkResult) return { status: 'OK', ...result }
|
||||
const error = Types.LndChannelsValidate(result)
|
||||
if (error === null) { return { status: 'OK', ...result } } else return { status: 'ERROR', reason: error.message }
|
||||
}
|
||||
return { status: 'ERROR', reason: 'invalid response' }
|
||||
},
|
||||
GetUsageMetrics: async (): Promise<ResultError | ({ status: 'OK' }& Types.UsageMetrics)> => {
|
||||
const auth = await params.retrieveNostrMetricsAuth()
|
||||
if (auth === null) throw new Error('retrieveNostrMetricsAuth() returned null')
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ export type NostrOptions = {
|
|||
logger?: Logger
|
||||
throwErrors?: true
|
||||
metricsCallback: (metrics: Types.RequestMetric[]) => void
|
||||
NostrAdminAuthGuard: (appId?:string, identifier?: string) => Promise<Types.AdminContext>
|
||||
NostrMetricsAuthGuard: (appId?:string, identifier?: string) => Promise<Types.MetricsContext>
|
||||
NostrUserAuthGuard: (appId?:string, identifier?: string) => Promise<Types.UserContext>
|
||||
NostrGuestWithPubAuthGuard: (appId?:string, identifier?: string) => Promise<Types.GuestWithPubContext>
|
||||
NostrAdminAuthGuard: (appId?:string, identifier?: string) => Promise<Types.AdminContext>
|
||||
NostrMetricsAuthGuard: (appId?:string, identifier?: string) => Promise<Types.MetricsContext>
|
||||
}
|
||||
const logErrorAndReturnResponse = (error: Error, response: string, res: NostrResponse, logger: Logger, metric: Types.RequestMetric, metricsCallback: (metrics: Types.RequestMetric[]) => void) => {
|
||||
logger.error(error.message || error); metricsCallback([{ ...metric, error: response }]); res({ status: 'ERROR', reason: response })
|
||||
|
|
@ -109,6 +109,19 @@ export default (methods: Types.ServerMethods, opts: NostrOptions) => {
|
|||
opts.metricsCallback([{ ...info, ...stats, ...authContext }])
|
||||
}catch(ex){ const e = ex as any; logErrorAndReturnResponse(e, e.message || e, res, logger, { ...info, ...stats, ...authCtx }, opts.metricsCallback); if (opts.throwErrors) throw e }
|
||||
break
|
||||
case 'ListChannels':
|
||||
try {
|
||||
if (!methods.ListChannels) throw new Error('method: ListChannels is not implemented')
|
||||
const authContext = await opts.NostrAdminAuthGuard(req.appId, req.authIdentifier)
|
||||
stats.guard = process.hrtime.bigint()
|
||||
authCtx = authContext
|
||||
stats.validate = stats.guard
|
||||
const response = await methods.ListChannels({rpcName:'ListChannels', ctx:authContext })
|
||||
stats.handle = process.hrtime.bigint()
|
||||
res({status: 'OK', ...response})
|
||||
opts.metricsCallback([{ ...info, ...stats, ...authContext }])
|
||||
}catch(ex){ const e = ex as any; logErrorAndReturnResponse(e, e.message || e, res, logger, { ...info, ...stats, ...authCtx }, opts.metricsCallback); if (opts.throwErrors) throw e }
|
||||
break
|
||||
case 'GetUsageMetrics':
|
||||
try {
|
||||
if (!methods.GetUsageMetrics) throw new Error('method: GetUsageMetrics is not implemented')
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,128 +1,128 @@
|
|||
// @generated by protobuf-ts 2.8.1
|
||||
// @generated from protobuf file "chainnotifier.proto" (package "chainrpc", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
||||
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
||||
import { ChainNotifier } from "./chainnotifier.js";
|
||||
import type { BlockEpoch } from "./chainnotifier.js";
|
||||
import type { SpendEvent } from "./chainnotifier.js";
|
||||
import type { SpendRequest } from "./chainnotifier.js";
|
||||
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
||||
import type { ConfEvent } from "./chainnotifier.js";
|
||||
import type { ConfRequest } from "./chainnotifier.js";
|
||||
import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc";
|
||||
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
||||
/**
|
||||
* ChainNotifier is a service that can be used to get information about the
|
||||
* chain backend by registering notifiers for chain events.
|
||||
*
|
||||
* @generated from protobuf service chainrpc.ChainNotifier
|
||||
*/
|
||||
export interface IChainNotifierClient {
|
||||
/**
|
||||
*
|
||||
* RegisterConfirmationsNtfn is a synchronous response-streaming RPC that
|
||||
* registers an intent for a client to be notified once a confirmation request
|
||||
* has reached its required number of confirmations on-chain.
|
||||
*
|
||||
* A confirmation request must have a valid output script. It is also possible
|
||||
* to give a transaction ID. If the transaction ID is not set, a notification
|
||||
* is sent once the output script confirms. If the transaction ID is also set,
|
||||
* a notification is sent once the output script confirms in the given
|
||||
* transaction.
|
||||
*
|
||||
* @generated from protobuf rpc: RegisterConfirmationsNtfn(chainrpc.ConfRequest) returns (stream chainrpc.ConfEvent);
|
||||
*/
|
||||
registerConfirmationsNtfn(input: ConfRequest, options?: RpcOptions): ServerStreamingCall<ConfRequest, ConfEvent>;
|
||||
/**
|
||||
*
|
||||
* RegisterSpendNtfn is a synchronous response-streaming RPC that registers an
|
||||
* intent for a client to be notification once a spend request has been spent
|
||||
* by a transaction that has confirmed on-chain.
|
||||
*
|
||||
* A client can specify whether the spend request should be for a particular
|
||||
* outpoint or for an output script by specifying a zero outpoint.
|
||||
*
|
||||
* @generated from protobuf rpc: RegisterSpendNtfn(chainrpc.SpendRequest) returns (stream chainrpc.SpendEvent);
|
||||
*/
|
||||
registerSpendNtfn(input: SpendRequest, options?: RpcOptions): ServerStreamingCall<SpendRequest, SpendEvent>;
|
||||
/**
|
||||
*
|
||||
* RegisterBlockEpochNtfn is a synchronous response-streaming RPC that
|
||||
* registers an intent for a client to be notified of blocks in the chain. The
|
||||
* stream will return a hash and height tuple of a block for each new/stale
|
||||
* block in the chain. It is the client's responsibility to determine whether
|
||||
* the tuple returned is for a new or stale block in the chain.
|
||||
*
|
||||
* A client can also request a historical backlog of blocks from a particular
|
||||
* point. This allows clients to be idempotent by ensuring that they do not
|
||||
* missing processing a single block within the chain.
|
||||
*
|
||||
* @generated from protobuf rpc: RegisterBlockEpochNtfn(chainrpc.BlockEpoch) returns (stream chainrpc.BlockEpoch);
|
||||
*/
|
||||
registerBlockEpochNtfn(input: BlockEpoch, options?: RpcOptions): ServerStreamingCall<BlockEpoch, BlockEpoch>;
|
||||
}
|
||||
/**
|
||||
* ChainNotifier is a service that can be used to get information about the
|
||||
* chain backend by registering notifiers for chain events.
|
||||
*
|
||||
* @generated from protobuf service chainrpc.ChainNotifier
|
||||
*/
|
||||
export class ChainNotifierClient implements IChainNotifierClient, ServiceInfo {
|
||||
typeName = ChainNotifier.typeName;
|
||||
methods = ChainNotifier.methods;
|
||||
options = ChainNotifier.options;
|
||||
constructor(private readonly _transport: RpcTransport) {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* RegisterConfirmationsNtfn is a synchronous response-streaming RPC that
|
||||
* registers an intent for a client to be notified once a confirmation request
|
||||
* has reached its required number of confirmations on-chain.
|
||||
*
|
||||
* A confirmation request must have a valid output script. It is also possible
|
||||
* to give a transaction ID. If the transaction ID is not set, a notification
|
||||
* is sent once the output script confirms. If the transaction ID is also set,
|
||||
* a notification is sent once the output script confirms in the given
|
||||
* transaction.
|
||||
*
|
||||
* @generated from protobuf rpc: RegisterConfirmationsNtfn(chainrpc.ConfRequest) returns (stream chainrpc.ConfEvent);
|
||||
*/
|
||||
registerConfirmationsNtfn(input: ConfRequest, options?: RpcOptions): ServerStreamingCall<ConfRequest, ConfEvent> {
|
||||
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ConfRequest, ConfEvent>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* RegisterSpendNtfn is a synchronous response-streaming RPC that registers an
|
||||
* intent for a client to be notification once a spend request has been spent
|
||||
* by a transaction that has confirmed on-chain.
|
||||
*
|
||||
* A client can specify whether the spend request should be for a particular
|
||||
* outpoint or for an output script by specifying a zero outpoint.
|
||||
*
|
||||
* @generated from protobuf rpc: RegisterSpendNtfn(chainrpc.SpendRequest) returns (stream chainrpc.SpendEvent);
|
||||
*/
|
||||
registerSpendNtfn(input: SpendRequest, options?: RpcOptions): ServerStreamingCall<SpendRequest, SpendEvent> {
|
||||
const method = this.methods[1], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SpendRequest, SpendEvent>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* RegisterBlockEpochNtfn is a synchronous response-streaming RPC that
|
||||
* registers an intent for a client to be notified of blocks in the chain. The
|
||||
* stream will return a hash and height tuple of a block for each new/stale
|
||||
* block in the chain. It is the client's responsibility to determine whether
|
||||
* the tuple returned is for a new or stale block in the chain.
|
||||
*
|
||||
* A client can also request a historical backlog of blocks from a particular
|
||||
* point. This allows clients to be idempotent by ensuring that they do not
|
||||
* missing processing a single block within the chain.
|
||||
*
|
||||
* @generated from protobuf rpc: RegisterBlockEpochNtfn(chainrpc.BlockEpoch) returns (stream chainrpc.BlockEpoch);
|
||||
*/
|
||||
registerBlockEpochNtfn(input: BlockEpoch, options?: RpcOptions): ServerStreamingCall<BlockEpoch, BlockEpoch> {
|
||||
const method = this.methods[2], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<BlockEpoch, BlockEpoch>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
}
|
||||
// @generated by protobuf-ts 2.8.1
|
||||
// @generated from protobuf file "chainnotifier.proto" (package "chainrpc", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
||||
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
||||
import { ChainNotifier } from "./chainnotifier.js";
|
||||
import type { BlockEpoch } from "./chainnotifier.js";
|
||||
import type { SpendEvent } from "./chainnotifier.js";
|
||||
import type { SpendRequest } from "./chainnotifier.js";
|
||||
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
||||
import type { ConfEvent } from "./chainnotifier";
|
||||
import type { ConfRequest } from "./chainnotifier";
|
||||
import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc";
|
||||
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
||||
/**
|
||||
* ChainNotifier is a service that can be used to get information about the
|
||||
* chain backend by registering notifiers for chain events.
|
||||
*
|
||||
* @generated from protobuf service chainrpc.ChainNotifier
|
||||
*/
|
||||
export interface IChainNotifierClient {
|
||||
/**
|
||||
*
|
||||
* RegisterConfirmationsNtfn is a synchronous response-streaming RPC that
|
||||
* registers an intent for a client to be notified once a confirmation request
|
||||
* has reached its required number of confirmations on-chain.
|
||||
*
|
||||
* A confirmation request must have a valid output script. It is also possible
|
||||
* to give a transaction ID. If the transaction ID is not set, a notification
|
||||
* is sent once the output script confirms. If the transaction ID is also set,
|
||||
* a notification is sent once the output script confirms in the given
|
||||
* transaction.
|
||||
*
|
||||
* @generated from protobuf rpc: RegisterConfirmationsNtfn(chainrpc.ConfRequest) returns (stream chainrpc.ConfEvent);
|
||||
*/
|
||||
registerConfirmationsNtfn(input: ConfRequest, options?: RpcOptions): ServerStreamingCall<ConfRequest, ConfEvent>;
|
||||
/**
|
||||
*
|
||||
* RegisterSpendNtfn is a synchronous response-streaming RPC that registers an
|
||||
* intent for a client to be notification once a spend request has been spent
|
||||
* by a transaction that has confirmed on-chain.
|
||||
*
|
||||
* A client can specify whether the spend request should be for a particular
|
||||
* outpoint or for an output script by specifying a zero outpoint.
|
||||
*
|
||||
* @generated from protobuf rpc: RegisterSpendNtfn(chainrpc.SpendRequest) returns (stream chainrpc.SpendEvent);
|
||||
*/
|
||||
registerSpendNtfn(input: SpendRequest, options?: RpcOptions): ServerStreamingCall<SpendRequest, SpendEvent>;
|
||||
/**
|
||||
*
|
||||
* RegisterBlockEpochNtfn is a synchronous response-streaming RPC that
|
||||
* registers an intent for a client to be notified of blocks in the chain. The
|
||||
* stream will return a hash and height tuple of a block for each new/stale
|
||||
* block in the chain. It is the client's responsibility to determine whether
|
||||
* the tuple returned is for a new or stale block in the chain.
|
||||
*
|
||||
* A client can also request a historical backlog of blocks from a particular
|
||||
* point. This allows clients to be idempotent by ensuring that they do not
|
||||
* missing processing a single block within the chain.
|
||||
*
|
||||
* @generated from protobuf rpc: RegisterBlockEpochNtfn(chainrpc.BlockEpoch) returns (stream chainrpc.BlockEpoch);
|
||||
*/
|
||||
registerBlockEpochNtfn(input: BlockEpoch, options?: RpcOptions): ServerStreamingCall<BlockEpoch, BlockEpoch>;
|
||||
}
|
||||
/**
|
||||
* ChainNotifier is a service that can be used to get information about the
|
||||
* chain backend by registering notifiers for chain events.
|
||||
*
|
||||
* @generated from protobuf service chainrpc.ChainNotifier
|
||||
*/
|
||||
export class ChainNotifierClient implements IChainNotifierClient, ServiceInfo {
|
||||
typeName = ChainNotifier.typeName;
|
||||
methods = ChainNotifier.methods;
|
||||
options = ChainNotifier.options;
|
||||
constructor(private readonly _transport: RpcTransport) {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* RegisterConfirmationsNtfn is a synchronous response-streaming RPC that
|
||||
* registers an intent for a client to be notified once a confirmation request
|
||||
* has reached its required number of confirmations on-chain.
|
||||
*
|
||||
* A confirmation request must have a valid output script. It is also possible
|
||||
* to give a transaction ID. If the transaction ID is not set, a notification
|
||||
* is sent once the output script confirms. If the transaction ID is also set,
|
||||
* a notification is sent once the output script confirms in the given
|
||||
* transaction.
|
||||
*
|
||||
* @generated from protobuf rpc: RegisterConfirmationsNtfn(chainrpc.ConfRequest) returns (stream chainrpc.ConfEvent);
|
||||
*/
|
||||
registerConfirmationsNtfn(input: ConfRequest, options?: RpcOptions): ServerStreamingCall<ConfRequest, ConfEvent> {
|
||||
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ConfRequest, ConfEvent>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* RegisterSpendNtfn is a synchronous response-streaming RPC that registers an
|
||||
* intent for a client to be notification once a spend request has been spent
|
||||
* by a transaction that has confirmed on-chain.
|
||||
*
|
||||
* A client can specify whether the spend request should be for a particular
|
||||
* outpoint or for an output script by specifying a zero outpoint.
|
||||
*
|
||||
* @generated from protobuf rpc: RegisterSpendNtfn(chainrpc.SpendRequest) returns (stream chainrpc.SpendEvent);
|
||||
*/
|
||||
registerSpendNtfn(input: SpendRequest, options?: RpcOptions): ServerStreamingCall<SpendRequest, SpendEvent> {
|
||||
const method = this.methods[1], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SpendRequest, SpendEvent>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* RegisterBlockEpochNtfn is a synchronous response-streaming RPC that
|
||||
* registers an intent for a client to be notified of blocks in the chain. The
|
||||
* stream will return a hash and height tuple of a block for each new/stale
|
||||
* block in the chain. It is the client's responsibility to determine whether
|
||||
* the tuple returned is for a new or stale block in the chain.
|
||||
*
|
||||
* A client can also request a historical backlog of blocks from a particular
|
||||
* point. This allows clients to be idempotent by ensuring that they do not
|
||||
* missing processing a single block within the chain.
|
||||
*
|
||||
* @generated from protobuf rpc: RegisterBlockEpochNtfn(chainrpc.BlockEpoch) returns (stream chainrpc.BlockEpoch);
|
||||
*/
|
||||
registerBlockEpochNtfn(input: BlockEpoch, options?: RpcOptions): ServerStreamingCall<BlockEpoch, BlockEpoch> {
|
||||
const method = this.methods[2], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<BlockEpoch, BlockEpoch>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,139 +1,139 @@
|
|||
// @generated by protobuf-ts 2.8.1
|
||||
// @generated from protobuf file "invoices.proto" (package "invoicesrpc", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
||||
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
||||
import { Invoices } from "./invoices.js";
|
||||
import type { LookupInvoiceMsg } from "./invoices.js";
|
||||
import type { SettleInvoiceResp } from "./invoices.js";
|
||||
import type { SettleInvoiceMsg } from "./invoices.js";
|
||||
import type { AddHoldInvoiceResp } from "./invoices.js";
|
||||
import type { AddHoldInvoiceRequest } from "./invoices.js";
|
||||
import type { CancelInvoiceResp } from "./invoices.js";
|
||||
import type { CancelInvoiceMsg } from "./invoices.js";
|
||||
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
|
||||
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
||||
import type { Invoice } from "./lightning.js";
|
||||
import type { SubscribeSingleInvoiceRequest } from "./invoices.js";
|
||||
import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc";
|
||||
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
||||
/**
|
||||
* Invoices is a service that can be used to create, accept, settle and cancel
|
||||
* invoices.
|
||||
*
|
||||
* @generated from protobuf service invoicesrpc.Invoices
|
||||
*/
|
||||
export interface IInvoicesClient {
|
||||
/**
|
||||
*
|
||||
* SubscribeSingleInvoice returns a uni-directional stream (server -> client)
|
||||
* to notify the client of state transitions of the specified invoice.
|
||||
* Initially the current invoice state is always sent out.
|
||||
*
|
||||
* @generated from protobuf rpc: SubscribeSingleInvoice(invoicesrpc.SubscribeSingleInvoiceRequest) returns (stream lnrpc.Invoice);
|
||||
*/
|
||||
subscribeSingleInvoice(input: SubscribeSingleInvoiceRequest, options?: RpcOptions): ServerStreamingCall<SubscribeSingleInvoiceRequest, Invoice>;
|
||||
/**
|
||||
*
|
||||
* CancelInvoice cancels a currently open invoice. If the invoice is already
|
||||
* canceled, this call will succeed. If the invoice is already settled, it will
|
||||
* fail.
|
||||
*
|
||||
* @generated from protobuf rpc: CancelInvoice(invoicesrpc.CancelInvoiceMsg) returns (invoicesrpc.CancelInvoiceResp);
|
||||
*/
|
||||
cancelInvoice(input: CancelInvoiceMsg, options?: RpcOptions): UnaryCall<CancelInvoiceMsg, CancelInvoiceResp>;
|
||||
/**
|
||||
*
|
||||
* AddHoldInvoice creates a hold invoice. It ties the invoice to the hash
|
||||
* supplied in the request.
|
||||
*
|
||||
* @generated from protobuf rpc: AddHoldInvoice(invoicesrpc.AddHoldInvoiceRequest) returns (invoicesrpc.AddHoldInvoiceResp);
|
||||
*/
|
||||
addHoldInvoice(input: AddHoldInvoiceRequest, options?: RpcOptions): UnaryCall<AddHoldInvoiceRequest, AddHoldInvoiceResp>;
|
||||
/**
|
||||
*
|
||||
* SettleInvoice settles an accepted invoice. If the invoice is already
|
||||
* settled, this call will succeed.
|
||||
*
|
||||
* @generated from protobuf rpc: SettleInvoice(invoicesrpc.SettleInvoiceMsg) returns (invoicesrpc.SettleInvoiceResp);
|
||||
*/
|
||||
settleInvoice(input: SettleInvoiceMsg, options?: RpcOptions): UnaryCall<SettleInvoiceMsg, SettleInvoiceResp>;
|
||||
/**
|
||||
*
|
||||
* LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced
|
||||
* using either its payment hash, payment address, or set ID.
|
||||
*
|
||||
* @generated from protobuf rpc: LookupInvoiceV2(invoicesrpc.LookupInvoiceMsg) returns (lnrpc.Invoice);
|
||||
*/
|
||||
lookupInvoiceV2(input: LookupInvoiceMsg, options?: RpcOptions): UnaryCall<LookupInvoiceMsg, Invoice>;
|
||||
}
|
||||
/**
|
||||
* Invoices is a service that can be used to create, accept, settle and cancel
|
||||
* invoices.
|
||||
*
|
||||
* @generated from protobuf service invoicesrpc.Invoices
|
||||
*/
|
||||
export class InvoicesClient implements IInvoicesClient, ServiceInfo {
|
||||
typeName = Invoices.typeName;
|
||||
methods = Invoices.methods;
|
||||
options = Invoices.options;
|
||||
constructor(private readonly _transport: RpcTransport) {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* SubscribeSingleInvoice returns a uni-directional stream (server -> client)
|
||||
* to notify the client of state transitions of the specified invoice.
|
||||
* Initially the current invoice state is always sent out.
|
||||
*
|
||||
* @generated from protobuf rpc: SubscribeSingleInvoice(invoicesrpc.SubscribeSingleInvoiceRequest) returns (stream lnrpc.Invoice);
|
||||
*/
|
||||
subscribeSingleInvoice(input: SubscribeSingleInvoiceRequest, options?: RpcOptions): ServerStreamingCall<SubscribeSingleInvoiceRequest, Invoice> {
|
||||
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SubscribeSingleInvoiceRequest, Invoice>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* CancelInvoice cancels a currently open invoice. If the invoice is already
|
||||
* canceled, this call will succeed. If the invoice is already settled, it will
|
||||
* fail.
|
||||
*
|
||||
* @generated from protobuf rpc: CancelInvoice(invoicesrpc.CancelInvoiceMsg) returns (invoicesrpc.CancelInvoiceResp);
|
||||
*/
|
||||
cancelInvoice(input: CancelInvoiceMsg, options?: RpcOptions): UnaryCall<CancelInvoiceMsg, CancelInvoiceResp> {
|
||||
const method = this.methods[1], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<CancelInvoiceMsg, CancelInvoiceResp>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* AddHoldInvoice creates a hold invoice. It ties the invoice to the hash
|
||||
* supplied in the request.
|
||||
*
|
||||
* @generated from protobuf rpc: AddHoldInvoice(invoicesrpc.AddHoldInvoiceRequest) returns (invoicesrpc.AddHoldInvoiceResp);
|
||||
*/
|
||||
addHoldInvoice(input: AddHoldInvoiceRequest, options?: RpcOptions): UnaryCall<AddHoldInvoiceRequest, AddHoldInvoiceResp> {
|
||||
const method = this.methods[2], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<AddHoldInvoiceRequest, AddHoldInvoiceResp>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* SettleInvoice settles an accepted invoice. If the invoice is already
|
||||
* settled, this call will succeed.
|
||||
*
|
||||
* @generated from protobuf rpc: SettleInvoice(invoicesrpc.SettleInvoiceMsg) returns (invoicesrpc.SettleInvoiceResp);
|
||||
*/
|
||||
settleInvoice(input: SettleInvoiceMsg, options?: RpcOptions): UnaryCall<SettleInvoiceMsg, SettleInvoiceResp> {
|
||||
const method = this.methods[3], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SettleInvoiceMsg, SettleInvoiceResp>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced
|
||||
* using either its payment hash, payment address, or set ID.
|
||||
*
|
||||
* @generated from protobuf rpc: LookupInvoiceV2(invoicesrpc.LookupInvoiceMsg) returns (lnrpc.Invoice);
|
||||
*/
|
||||
lookupInvoiceV2(input: LookupInvoiceMsg, options?: RpcOptions): UnaryCall<LookupInvoiceMsg, Invoice> {
|
||||
const method = this.methods[4], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<LookupInvoiceMsg, Invoice>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
}
|
||||
// @generated by protobuf-ts 2.8.1
|
||||
// @generated from protobuf file "invoices.proto" (package "invoicesrpc", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
||||
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
||||
import { Invoices } from "./invoices.js";
|
||||
import type { LookupInvoiceMsg } from "./invoices.js";
|
||||
import type { SettleInvoiceResp } from "./invoices.js";
|
||||
import type { SettleInvoiceMsg } from "./invoices.js";
|
||||
import type { AddHoldInvoiceResp } from "./invoices.js";
|
||||
import type { AddHoldInvoiceRequest } from "./invoices.js";
|
||||
import type { CancelInvoiceResp } from "./invoices.js";
|
||||
import type { CancelInvoiceMsg } from "./invoices.js";
|
||||
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
|
||||
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
||||
import type { Invoice } from "./lightning.js";
|
||||
import type { SubscribeSingleInvoiceRequest } from "./invoices.js";
|
||||
import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc";
|
||||
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
||||
/**
|
||||
* Invoices is a service that can be used to create, accept, settle and cancel
|
||||
* invoices.
|
||||
*
|
||||
* @generated from protobuf service invoicesrpc.Invoices
|
||||
*/
|
||||
export interface IInvoicesClient {
|
||||
/**
|
||||
*
|
||||
* SubscribeSingleInvoice returns a uni-directional stream (server -> client)
|
||||
* to notify the client of state transitions of the specified invoice.
|
||||
* Initially the current invoice state is always sent out.
|
||||
*
|
||||
* @generated from protobuf rpc: SubscribeSingleInvoice(invoicesrpc.SubscribeSingleInvoiceRequest) returns (stream lnrpc.Invoice);
|
||||
*/
|
||||
subscribeSingleInvoice(input: SubscribeSingleInvoiceRequest, options?: RpcOptions): ServerStreamingCall<SubscribeSingleInvoiceRequest, Invoice>;
|
||||
/**
|
||||
*
|
||||
* CancelInvoice cancels a currently open invoice. If the invoice is already
|
||||
* canceled, this call will succeed. If the invoice is already settled, it will
|
||||
* fail.
|
||||
*
|
||||
* @generated from protobuf rpc: CancelInvoice(invoicesrpc.CancelInvoiceMsg) returns (invoicesrpc.CancelInvoiceResp);
|
||||
*/
|
||||
cancelInvoice(input: CancelInvoiceMsg, options?: RpcOptions): UnaryCall<CancelInvoiceMsg, CancelInvoiceResp>;
|
||||
/**
|
||||
*
|
||||
* AddHoldInvoice creates a hold invoice. It ties the invoice to the hash
|
||||
* supplied in the request.
|
||||
*
|
||||
* @generated from protobuf rpc: AddHoldInvoice(invoicesrpc.AddHoldInvoiceRequest) returns (invoicesrpc.AddHoldInvoiceResp);
|
||||
*/
|
||||
addHoldInvoice(input: AddHoldInvoiceRequest, options?: RpcOptions): UnaryCall<AddHoldInvoiceRequest, AddHoldInvoiceResp>;
|
||||
/**
|
||||
*
|
||||
* SettleInvoice settles an accepted invoice. If the invoice is already
|
||||
* settled, this call will succeed.
|
||||
*
|
||||
* @generated from protobuf rpc: SettleInvoice(invoicesrpc.SettleInvoiceMsg) returns (invoicesrpc.SettleInvoiceResp);
|
||||
*/
|
||||
settleInvoice(input: SettleInvoiceMsg, options?: RpcOptions): UnaryCall<SettleInvoiceMsg, SettleInvoiceResp>;
|
||||
/**
|
||||
*
|
||||
* LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced
|
||||
* using either its payment hash, payment address, or set ID.
|
||||
*
|
||||
* @generated from protobuf rpc: LookupInvoiceV2(invoicesrpc.LookupInvoiceMsg) returns (lnrpc.Invoice);
|
||||
*/
|
||||
lookupInvoiceV2(input: LookupInvoiceMsg, options?: RpcOptions): UnaryCall<LookupInvoiceMsg, Invoice>;
|
||||
}
|
||||
/**
|
||||
* Invoices is a service that can be used to create, accept, settle and cancel
|
||||
* invoices.
|
||||
*
|
||||
* @generated from protobuf service invoicesrpc.Invoices
|
||||
*/
|
||||
export class InvoicesClient implements IInvoicesClient, ServiceInfo {
|
||||
typeName = Invoices.typeName;
|
||||
methods = Invoices.methods;
|
||||
options = Invoices.options;
|
||||
constructor(private readonly _transport: RpcTransport) {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* SubscribeSingleInvoice returns a uni-directional stream (server -> client)
|
||||
* to notify the client of state transitions of the specified invoice.
|
||||
* Initially the current invoice state is always sent out.
|
||||
*
|
||||
* @generated from protobuf rpc: SubscribeSingleInvoice(invoicesrpc.SubscribeSingleInvoiceRequest) returns (stream lnrpc.Invoice);
|
||||
*/
|
||||
subscribeSingleInvoice(input: SubscribeSingleInvoiceRequest, options?: RpcOptions): ServerStreamingCall<SubscribeSingleInvoiceRequest, Invoice> {
|
||||
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SubscribeSingleInvoiceRequest, Invoice>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* CancelInvoice cancels a currently open invoice. If the invoice is already
|
||||
* canceled, this call will succeed. If the invoice is already settled, it will
|
||||
* fail.
|
||||
*
|
||||
* @generated from protobuf rpc: CancelInvoice(invoicesrpc.CancelInvoiceMsg) returns (invoicesrpc.CancelInvoiceResp);
|
||||
*/
|
||||
cancelInvoice(input: CancelInvoiceMsg, options?: RpcOptions): UnaryCall<CancelInvoiceMsg, CancelInvoiceResp> {
|
||||
const method = this.methods[1], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<CancelInvoiceMsg, CancelInvoiceResp>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* AddHoldInvoice creates a hold invoice. It ties the invoice to the hash
|
||||
* supplied in the request.
|
||||
*
|
||||
* @generated from protobuf rpc: AddHoldInvoice(invoicesrpc.AddHoldInvoiceRequest) returns (invoicesrpc.AddHoldInvoiceResp);
|
||||
*/
|
||||
addHoldInvoice(input: AddHoldInvoiceRequest, options?: RpcOptions): UnaryCall<AddHoldInvoiceRequest, AddHoldInvoiceResp> {
|
||||
const method = this.methods[2], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<AddHoldInvoiceRequest, AddHoldInvoiceResp>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* SettleInvoice settles an accepted invoice. If the invoice is already
|
||||
* settled, this call will succeed.
|
||||
*
|
||||
* @generated from protobuf rpc: SettleInvoice(invoicesrpc.SettleInvoiceMsg) returns (invoicesrpc.SettleInvoiceResp);
|
||||
*/
|
||||
settleInvoice(input: SettleInvoiceMsg, options?: RpcOptions): UnaryCall<SettleInvoiceMsg, SettleInvoiceResp> {
|
||||
const method = this.methods[3], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SettleInvoiceMsg, SettleInvoiceResp>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced
|
||||
* using either its payment hash, payment address, or set ID.
|
||||
*
|
||||
* @generated from protobuf rpc: LookupInvoiceV2(invoicesrpc.LookupInvoiceMsg) returns (lnrpc.Invoice);
|
||||
*/
|
||||
lookupInvoiceV2(input: LookupInvoiceMsg, options?: RpcOptions): UnaryCall<LookupInvoiceMsg, Invoice> {
|
||||
const method = this.methods[4], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<LookupInvoiceMsg, Invoice>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
43491
proto/lnd/lightning.ts
43491
proto/lnd/lightning.ts
File diff suppressed because it is too large
Load diff
|
|
@ -1,446 +1,446 @@
|
|||
// @generated by protobuf-ts 2.8.1
|
||||
// @generated from protobuf file "router.proto" (package "routerrpc", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
||||
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
||||
import { Router } from "./router.js";
|
||||
import type { UpdateChanStatusResponse } from "./router.js";
|
||||
import type { UpdateChanStatusRequest } from "./router.js";
|
||||
import type { ForwardHtlcInterceptRequest } from "./router.js";
|
||||
import type { ForwardHtlcInterceptResponse } from "./router.js";
|
||||
import type { DuplexStreamingCall } from "@protobuf-ts/runtime-rpc";
|
||||
import type { PaymentStatus } from "./router.js";
|
||||
import type { HtlcEvent } from "./router.js";
|
||||
import type { SubscribeHtlcEventsRequest } from "./router.js";
|
||||
import type { BuildRouteResponse } from "./router.js";
|
||||
import type { BuildRouteRequest } from "./router.js";
|
||||
import type { QueryProbabilityResponse } from "./router.js";
|
||||
import type { QueryProbabilityRequest } from "./router.js";
|
||||
import type { SetMissionControlConfigResponse } from "./router.js";
|
||||
import type { SetMissionControlConfigRequest } from "./router.js";
|
||||
import type { GetMissionControlConfigResponse } from "./router.js";
|
||||
import type { GetMissionControlConfigRequest } from "./router.js";
|
||||
import type { XImportMissionControlResponse } from "./router.js";
|
||||
import type { XImportMissionControlRequest } from "./router.js";
|
||||
import type { QueryMissionControlResponse } from "./router.js";
|
||||
import type { QueryMissionControlRequest } from "./router.js";
|
||||
import type { ResetMissionControlResponse } from "./router.js";
|
||||
import type { ResetMissionControlRequest } from "./router.js";
|
||||
import type { HTLCAttempt } from "./lightning.js";
|
||||
import type { SendToRouteResponse } from "./router.js";
|
||||
import type { SendToRouteRequest } from "./router.js";
|
||||
import type { RouteFeeResponse } from "./router.js";
|
||||
import type { RouteFeeRequest } from "./router.js";
|
||||
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
|
||||
import type { TrackPaymentsRequest } from "./router.js";
|
||||
import type { TrackPaymentRequest } from "./router.js";
|
||||
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
||||
import type { Payment } from "./lightning.js";
|
||||
import type { SendPaymentRequest } from "./router.js";
|
||||
import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc";
|
||||
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
||||
/**
|
||||
* Router is a service that offers advanced interaction with the router
|
||||
* subsystem of the daemon.
|
||||
*
|
||||
* @generated from protobuf service routerrpc.Router
|
||||
*/
|
||||
export interface IRouterClient {
|
||||
/**
|
||||
*
|
||||
* SendPaymentV2 attempts to route a payment described by the passed
|
||||
* PaymentRequest to the final destination. The call returns a stream of
|
||||
* payment updates.
|
||||
*
|
||||
* @generated from protobuf rpc: SendPaymentV2(routerrpc.SendPaymentRequest) returns (stream lnrpc.Payment);
|
||||
*/
|
||||
sendPaymentV2(input: SendPaymentRequest, options?: RpcOptions): ServerStreamingCall<SendPaymentRequest, Payment>;
|
||||
/**
|
||||
*
|
||||
* TrackPaymentV2 returns an update stream for the payment identified by the
|
||||
* payment hash.
|
||||
*
|
||||
* @generated from protobuf rpc: TrackPaymentV2(routerrpc.TrackPaymentRequest) returns (stream lnrpc.Payment);
|
||||
*/
|
||||
trackPaymentV2(input: TrackPaymentRequest, options?: RpcOptions): ServerStreamingCall<TrackPaymentRequest, Payment>;
|
||||
/**
|
||||
*
|
||||
* TrackPayments returns an update stream for every payment that is not in a
|
||||
* terminal state. Note that if payments are in-flight while starting a new
|
||||
* subscription, the start of the payment stream could produce out-of-order
|
||||
* and/or duplicate events. In order to get updates for every in-flight
|
||||
* payment attempt make sure to subscribe to this method before initiating any
|
||||
* payments.
|
||||
*
|
||||
* @generated from protobuf rpc: TrackPayments(routerrpc.TrackPaymentsRequest) returns (stream lnrpc.Payment);
|
||||
*/
|
||||
trackPayments(input: TrackPaymentsRequest, options?: RpcOptions): ServerStreamingCall<TrackPaymentsRequest, Payment>;
|
||||
/**
|
||||
*
|
||||
* EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
* may cost to send an HTLC to the target end destination.
|
||||
*
|
||||
* @generated from protobuf rpc: EstimateRouteFee(routerrpc.RouteFeeRequest) returns (routerrpc.RouteFeeResponse);
|
||||
*/
|
||||
estimateRouteFee(input: RouteFeeRequest, options?: RpcOptions): UnaryCall<RouteFeeRequest, RouteFeeResponse>;
|
||||
/**
|
||||
*
|
||||
* Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
|
||||
* the specified route. This method differs from SendPayment in that it
|
||||
* allows users to specify a full route manually. This can be used for
|
||||
* things like rebalancing, and atomic swaps. It differs from the newer
|
||||
* SendToRouteV2 in that it doesn't return the full HTLC information.
|
||||
*
|
||||
* @deprecated
|
||||
* @generated from protobuf rpc: SendToRoute(routerrpc.SendToRouteRequest) returns (routerrpc.SendToRouteResponse);
|
||||
*/
|
||||
sendToRoute(input: SendToRouteRequest, options?: RpcOptions): UnaryCall<SendToRouteRequest, SendToRouteResponse>;
|
||||
/**
|
||||
*
|
||||
* SendToRouteV2 attempts to make a payment via the specified route. This
|
||||
* method differs from SendPayment in that it allows users to specify a full
|
||||
* route manually. This can be used for things like rebalancing, and atomic
|
||||
* swaps.
|
||||
*
|
||||
* @generated from protobuf rpc: SendToRouteV2(routerrpc.SendToRouteRequest) returns (lnrpc.HTLCAttempt);
|
||||
*/
|
||||
sendToRouteV2(input: SendToRouteRequest, options?: RpcOptions): UnaryCall<SendToRouteRequest, HTLCAttempt>;
|
||||
/**
|
||||
*
|
||||
* ResetMissionControl clears all mission control state and starts with a clean
|
||||
* slate.
|
||||
*
|
||||
* @generated from protobuf rpc: ResetMissionControl(routerrpc.ResetMissionControlRequest) returns (routerrpc.ResetMissionControlResponse);
|
||||
*/
|
||||
resetMissionControl(input: ResetMissionControlRequest, options?: RpcOptions): UnaryCall<ResetMissionControlRequest, ResetMissionControlResponse>;
|
||||
/**
|
||||
*
|
||||
* QueryMissionControl exposes the internal mission control state to callers.
|
||||
* It is a development feature.
|
||||
*
|
||||
* @generated from protobuf rpc: QueryMissionControl(routerrpc.QueryMissionControlRequest) returns (routerrpc.QueryMissionControlResponse);
|
||||
*/
|
||||
queryMissionControl(input: QueryMissionControlRequest, options?: RpcOptions): UnaryCall<QueryMissionControlRequest, QueryMissionControlResponse>;
|
||||
/**
|
||||
*
|
||||
* XImportMissionControl is an experimental API that imports the state provided
|
||||
* to the internal mission control's state, using all results which are more
|
||||
* recent than our existing values. These values will only be imported
|
||||
* in-memory, and will not be persisted across restarts.
|
||||
*
|
||||
* @generated from protobuf rpc: XImportMissionControl(routerrpc.XImportMissionControlRequest) returns (routerrpc.XImportMissionControlResponse);
|
||||
*/
|
||||
xImportMissionControl(input: XImportMissionControlRequest, options?: RpcOptions): UnaryCall<XImportMissionControlRequest, XImportMissionControlResponse>;
|
||||
/**
|
||||
*
|
||||
* GetMissionControlConfig returns mission control's current config.
|
||||
*
|
||||
* @generated from protobuf rpc: GetMissionControlConfig(routerrpc.GetMissionControlConfigRequest) returns (routerrpc.GetMissionControlConfigResponse);
|
||||
*/
|
||||
getMissionControlConfig(input: GetMissionControlConfigRequest, options?: RpcOptions): UnaryCall<GetMissionControlConfigRequest, GetMissionControlConfigResponse>;
|
||||
/**
|
||||
*
|
||||
* SetMissionControlConfig will set mission control's config, if the config
|
||||
* provided is valid.
|
||||
*
|
||||
* @generated from protobuf rpc: SetMissionControlConfig(routerrpc.SetMissionControlConfigRequest) returns (routerrpc.SetMissionControlConfigResponse);
|
||||
*/
|
||||
setMissionControlConfig(input: SetMissionControlConfigRequest, options?: RpcOptions): UnaryCall<SetMissionControlConfigRequest, SetMissionControlConfigResponse>;
|
||||
/**
|
||||
*
|
||||
* QueryProbability returns the current success probability estimate for a
|
||||
* given node pair and amount.
|
||||
*
|
||||
* @generated from protobuf rpc: QueryProbability(routerrpc.QueryProbabilityRequest) returns (routerrpc.QueryProbabilityResponse);
|
||||
*/
|
||||
queryProbability(input: QueryProbabilityRequest, options?: RpcOptions): UnaryCall<QueryProbabilityRequest, QueryProbabilityResponse>;
|
||||
/**
|
||||
*
|
||||
* BuildRoute builds a fully specified route based on a list of hop public
|
||||
* keys. It retrieves the relevant channel policies from the graph in order to
|
||||
* calculate the correct fees and time locks.
|
||||
*
|
||||
* @generated from protobuf rpc: BuildRoute(routerrpc.BuildRouteRequest) returns (routerrpc.BuildRouteResponse);
|
||||
*/
|
||||
buildRoute(input: BuildRouteRequest, options?: RpcOptions): UnaryCall<BuildRouteRequest, BuildRouteResponse>;
|
||||
/**
|
||||
*
|
||||
* SubscribeHtlcEvents creates a uni-directional stream from the server to
|
||||
* the client which delivers a stream of htlc events.
|
||||
*
|
||||
* @generated from protobuf rpc: SubscribeHtlcEvents(routerrpc.SubscribeHtlcEventsRequest) returns (stream routerrpc.HtlcEvent);
|
||||
*/
|
||||
subscribeHtlcEvents(input: SubscribeHtlcEventsRequest, options?: RpcOptions): ServerStreamingCall<SubscribeHtlcEventsRequest, HtlcEvent>;
|
||||
/**
|
||||
*
|
||||
* Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
|
||||
* described by the passed PaymentRequest to the final destination. The call
|
||||
* returns a stream of payment status updates.
|
||||
*
|
||||
* @deprecated
|
||||
* @generated from protobuf rpc: SendPayment(routerrpc.SendPaymentRequest) returns (stream routerrpc.PaymentStatus);
|
||||
*/
|
||||
sendPayment(input: SendPaymentRequest, options?: RpcOptions): ServerStreamingCall<SendPaymentRequest, PaymentStatus>;
|
||||
/**
|
||||
*
|
||||
* Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
||||
* the payment identified by the payment hash.
|
||||
*
|
||||
* @deprecated
|
||||
* @generated from protobuf rpc: TrackPayment(routerrpc.TrackPaymentRequest) returns (stream routerrpc.PaymentStatus);
|
||||
*/
|
||||
trackPayment(input: TrackPaymentRequest, options?: RpcOptions): ServerStreamingCall<TrackPaymentRequest, PaymentStatus>;
|
||||
/**
|
||||
* *
|
||||
* HtlcInterceptor dispatches a bi-directional streaming RPC in which
|
||||
* Forwarded HTLC requests are sent to the client and the client responds with
|
||||
* a boolean that tells LND if this htlc should be intercepted.
|
||||
* In case of interception, the htlc can be either settled, cancelled or
|
||||
* resumed later by using the ResolveHoldForward endpoint.
|
||||
*
|
||||
* @generated from protobuf rpc: HtlcInterceptor(stream routerrpc.ForwardHtlcInterceptResponse) returns (stream routerrpc.ForwardHtlcInterceptRequest);
|
||||
*/
|
||||
htlcInterceptor(options?: RpcOptions): DuplexStreamingCall<ForwardHtlcInterceptResponse, ForwardHtlcInterceptRequest>;
|
||||
/**
|
||||
*
|
||||
* UpdateChanStatus attempts to manually set the state of a channel
|
||||
* (enabled, disabled, or auto). A manual "disable" request will cause the
|
||||
* channel to stay disabled until a subsequent manual request of either
|
||||
* "enable" or "auto".
|
||||
*
|
||||
* @generated from protobuf rpc: UpdateChanStatus(routerrpc.UpdateChanStatusRequest) returns (routerrpc.UpdateChanStatusResponse);
|
||||
*/
|
||||
updateChanStatus(input: UpdateChanStatusRequest, options?: RpcOptions): UnaryCall<UpdateChanStatusRequest, UpdateChanStatusResponse>;
|
||||
}
|
||||
/**
|
||||
* Router is a service that offers advanced interaction with the router
|
||||
* subsystem of the daemon.
|
||||
*
|
||||
* @generated from protobuf service routerrpc.Router
|
||||
*/
|
||||
export class RouterClient implements IRouterClient, ServiceInfo {
|
||||
typeName = Router.typeName;
|
||||
methods = Router.methods;
|
||||
options = Router.options;
|
||||
constructor(private readonly _transport: RpcTransport) {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* SendPaymentV2 attempts to route a payment described by the passed
|
||||
* PaymentRequest to the final destination. The call returns a stream of
|
||||
* payment updates.
|
||||
*
|
||||
* @generated from protobuf rpc: SendPaymentV2(routerrpc.SendPaymentRequest) returns (stream lnrpc.Payment);
|
||||
*/
|
||||
sendPaymentV2(input: SendPaymentRequest, options?: RpcOptions): ServerStreamingCall<SendPaymentRequest, Payment> {
|
||||
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SendPaymentRequest, Payment>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* TrackPaymentV2 returns an update stream for the payment identified by the
|
||||
* payment hash.
|
||||
*
|
||||
* @generated from protobuf rpc: TrackPaymentV2(routerrpc.TrackPaymentRequest) returns (stream lnrpc.Payment);
|
||||
*/
|
||||
trackPaymentV2(input: TrackPaymentRequest, options?: RpcOptions): ServerStreamingCall<TrackPaymentRequest, Payment> {
|
||||
const method = this.methods[1], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<TrackPaymentRequest, Payment>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* TrackPayments returns an update stream for every payment that is not in a
|
||||
* terminal state. Note that if payments are in-flight while starting a new
|
||||
* subscription, the start of the payment stream could produce out-of-order
|
||||
* and/or duplicate events. In order to get updates for every in-flight
|
||||
* payment attempt make sure to subscribe to this method before initiating any
|
||||
* payments.
|
||||
*
|
||||
* @generated from protobuf rpc: TrackPayments(routerrpc.TrackPaymentsRequest) returns (stream lnrpc.Payment);
|
||||
*/
|
||||
trackPayments(input: TrackPaymentsRequest, options?: RpcOptions): ServerStreamingCall<TrackPaymentsRequest, Payment> {
|
||||
const method = this.methods[2], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<TrackPaymentsRequest, Payment>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
* may cost to send an HTLC to the target end destination.
|
||||
*
|
||||
* @generated from protobuf rpc: EstimateRouteFee(routerrpc.RouteFeeRequest) returns (routerrpc.RouteFeeResponse);
|
||||
*/
|
||||
estimateRouteFee(input: RouteFeeRequest, options?: RpcOptions): UnaryCall<RouteFeeRequest, RouteFeeResponse> {
|
||||
const method = this.methods[3], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<RouteFeeRequest, RouteFeeResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
|
||||
* the specified route. This method differs from SendPayment in that it
|
||||
* allows users to specify a full route manually. This can be used for
|
||||
* things like rebalancing, and atomic swaps. It differs from the newer
|
||||
* SendToRouteV2 in that it doesn't return the full HTLC information.
|
||||
*
|
||||
* @deprecated
|
||||
* @generated from protobuf rpc: SendToRoute(routerrpc.SendToRouteRequest) returns (routerrpc.SendToRouteResponse);
|
||||
*/
|
||||
sendToRoute(input: SendToRouteRequest, options?: RpcOptions): UnaryCall<SendToRouteRequest, SendToRouteResponse> {
|
||||
const method = this.methods[4], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SendToRouteRequest, SendToRouteResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* SendToRouteV2 attempts to make a payment via the specified route. This
|
||||
* method differs from SendPayment in that it allows users to specify a full
|
||||
* route manually. This can be used for things like rebalancing, and atomic
|
||||
* swaps.
|
||||
*
|
||||
* @generated from protobuf rpc: SendToRouteV2(routerrpc.SendToRouteRequest) returns (lnrpc.HTLCAttempt);
|
||||
*/
|
||||
sendToRouteV2(input: SendToRouteRequest, options?: RpcOptions): UnaryCall<SendToRouteRequest, HTLCAttempt> {
|
||||
const method = this.methods[5], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SendToRouteRequest, HTLCAttempt>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* ResetMissionControl clears all mission control state and starts with a clean
|
||||
* slate.
|
||||
*
|
||||
* @generated from protobuf rpc: ResetMissionControl(routerrpc.ResetMissionControlRequest) returns (routerrpc.ResetMissionControlResponse);
|
||||
*/
|
||||
resetMissionControl(input: ResetMissionControlRequest, options?: RpcOptions): UnaryCall<ResetMissionControlRequest, ResetMissionControlResponse> {
|
||||
const method = this.methods[6], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ResetMissionControlRequest, ResetMissionControlResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* QueryMissionControl exposes the internal mission control state to callers.
|
||||
* It is a development feature.
|
||||
*
|
||||
* @generated from protobuf rpc: QueryMissionControl(routerrpc.QueryMissionControlRequest) returns (routerrpc.QueryMissionControlResponse);
|
||||
*/
|
||||
queryMissionControl(input: QueryMissionControlRequest, options?: RpcOptions): UnaryCall<QueryMissionControlRequest, QueryMissionControlResponse> {
|
||||
const method = this.methods[7], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<QueryMissionControlRequest, QueryMissionControlResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* XImportMissionControl is an experimental API that imports the state provided
|
||||
* to the internal mission control's state, using all results which are more
|
||||
* recent than our existing values. These values will only be imported
|
||||
* in-memory, and will not be persisted across restarts.
|
||||
*
|
||||
* @generated from protobuf rpc: XImportMissionControl(routerrpc.XImportMissionControlRequest) returns (routerrpc.XImportMissionControlResponse);
|
||||
*/
|
||||
xImportMissionControl(input: XImportMissionControlRequest, options?: RpcOptions): UnaryCall<XImportMissionControlRequest, XImportMissionControlResponse> {
|
||||
const method = this.methods[8], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<XImportMissionControlRequest, XImportMissionControlResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* GetMissionControlConfig returns mission control's current config.
|
||||
*
|
||||
* @generated from protobuf rpc: GetMissionControlConfig(routerrpc.GetMissionControlConfigRequest) returns (routerrpc.GetMissionControlConfigResponse);
|
||||
*/
|
||||
getMissionControlConfig(input: GetMissionControlConfigRequest, options?: RpcOptions): UnaryCall<GetMissionControlConfigRequest, GetMissionControlConfigResponse> {
|
||||
const method = this.methods[9], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<GetMissionControlConfigRequest, GetMissionControlConfigResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* SetMissionControlConfig will set mission control's config, if the config
|
||||
* provided is valid.
|
||||
*
|
||||
* @generated from protobuf rpc: SetMissionControlConfig(routerrpc.SetMissionControlConfigRequest) returns (routerrpc.SetMissionControlConfigResponse);
|
||||
*/
|
||||
setMissionControlConfig(input: SetMissionControlConfigRequest, options?: RpcOptions): UnaryCall<SetMissionControlConfigRequest, SetMissionControlConfigResponse> {
|
||||
const method = this.methods[10], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SetMissionControlConfigRequest, SetMissionControlConfigResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* QueryProbability returns the current success probability estimate for a
|
||||
* given node pair and amount.
|
||||
*
|
||||
* @generated from protobuf rpc: QueryProbability(routerrpc.QueryProbabilityRequest) returns (routerrpc.QueryProbabilityResponse);
|
||||
*/
|
||||
queryProbability(input: QueryProbabilityRequest, options?: RpcOptions): UnaryCall<QueryProbabilityRequest, QueryProbabilityResponse> {
|
||||
const method = this.methods[11], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<QueryProbabilityRequest, QueryProbabilityResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* BuildRoute builds a fully specified route based on a list of hop public
|
||||
* keys. It retrieves the relevant channel policies from the graph in order to
|
||||
* calculate the correct fees and time locks.
|
||||
*
|
||||
* @generated from protobuf rpc: BuildRoute(routerrpc.BuildRouteRequest) returns (routerrpc.BuildRouteResponse);
|
||||
*/
|
||||
buildRoute(input: BuildRouteRequest, options?: RpcOptions): UnaryCall<BuildRouteRequest, BuildRouteResponse> {
|
||||
const method = this.methods[12], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<BuildRouteRequest, BuildRouteResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* SubscribeHtlcEvents creates a uni-directional stream from the server to
|
||||
* the client which delivers a stream of htlc events.
|
||||
*
|
||||
* @generated from protobuf rpc: SubscribeHtlcEvents(routerrpc.SubscribeHtlcEventsRequest) returns (stream routerrpc.HtlcEvent);
|
||||
*/
|
||||
subscribeHtlcEvents(input: SubscribeHtlcEventsRequest, options?: RpcOptions): ServerStreamingCall<SubscribeHtlcEventsRequest, HtlcEvent> {
|
||||
const method = this.methods[13], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SubscribeHtlcEventsRequest, HtlcEvent>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
|
||||
* described by the passed PaymentRequest to the final destination. The call
|
||||
* returns a stream of payment status updates.
|
||||
*
|
||||
* @deprecated
|
||||
* @generated from protobuf rpc: SendPayment(routerrpc.SendPaymentRequest) returns (stream routerrpc.PaymentStatus);
|
||||
*/
|
||||
sendPayment(input: SendPaymentRequest, options?: RpcOptions): ServerStreamingCall<SendPaymentRequest, PaymentStatus> {
|
||||
const method = this.methods[14], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SendPaymentRequest, PaymentStatus>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
||||
* the payment identified by the payment hash.
|
||||
*
|
||||
* @deprecated
|
||||
* @generated from protobuf rpc: TrackPayment(routerrpc.TrackPaymentRequest) returns (stream routerrpc.PaymentStatus);
|
||||
*/
|
||||
trackPayment(input: TrackPaymentRequest, options?: RpcOptions): ServerStreamingCall<TrackPaymentRequest, PaymentStatus> {
|
||||
const method = this.methods[15], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<TrackPaymentRequest, PaymentStatus>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
* *
|
||||
* HtlcInterceptor dispatches a bi-directional streaming RPC in which
|
||||
* Forwarded HTLC requests are sent to the client and the client responds with
|
||||
* a boolean that tells LND if this htlc should be intercepted.
|
||||
* In case of interception, the htlc can be either settled, cancelled or
|
||||
* resumed later by using the ResolveHoldForward endpoint.
|
||||
*
|
||||
* @generated from protobuf rpc: HtlcInterceptor(stream routerrpc.ForwardHtlcInterceptResponse) returns (stream routerrpc.ForwardHtlcInterceptRequest);
|
||||
*/
|
||||
htlcInterceptor(options?: RpcOptions): DuplexStreamingCall<ForwardHtlcInterceptResponse, ForwardHtlcInterceptRequest> {
|
||||
const method = this.methods[16], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ForwardHtlcInterceptResponse, ForwardHtlcInterceptRequest>("duplex", this._transport, method, opt);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* UpdateChanStatus attempts to manually set the state of a channel
|
||||
* (enabled, disabled, or auto). A manual "disable" request will cause the
|
||||
* channel to stay disabled until a subsequent manual request of either
|
||||
* "enable" or "auto".
|
||||
*
|
||||
* @generated from protobuf rpc: UpdateChanStatus(routerrpc.UpdateChanStatusRequest) returns (routerrpc.UpdateChanStatusResponse);
|
||||
*/
|
||||
updateChanStatus(input: UpdateChanStatusRequest, options?: RpcOptions): UnaryCall<UpdateChanStatusRequest, UpdateChanStatusResponse> {
|
||||
const method = this.methods[17], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<UpdateChanStatusRequest, UpdateChanStatusResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
}
|
||||
// @generated by protobuf-ts 2.8.1
|
||||
// @generated from protobuf file "router.proto" (package "routerrpc", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
||||
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
||||
import { Router } from "./router.js";
|
||||
import type { UpdateChanStatusResponse } from "./router.js";
|
||||
import type { UpdateChanStatusRequest } from "./router.js";
|
||||
import type { ForwardHtlcInterceptRequest } from "./router.js";
|
||||
import type { ForwardHtlcInterceptResponse } from "./router.js";
|
||||
import type { DuplexStreamingCall } from "@protobuf-ts/runtime-rpc";
|
||||
import type { PaymentStatus } from "./router.js";
|
||||
import type { HtlcEvent } from "./router.js";
|
||||
import type { SubscribeHtlcEventsRequest } from "./router.js";
|
||||
import type { BuildRouteResponse } from "./router.js";
|
||||
import type { BuildRouteRequest } from "./router.js";
|
||||
import type { QueryProbabilityResponse } from "./router.js";
|
||||
import type { QueryProbabilityRequest } from "./router.js";
|
||||
import type { SetMissionControlConfigResponse } from "./router.js";
|
||||
import type { SetMissionControlConfigRequest } from "./router.js";
|
||||
import type { GetMissionControlConfigResponse } from "./router.js";
|
||||
import type { GetMissionControlConfigRequest } from "./router.js";
|
||||
import type { XImportMissionControlResponse } from "./router.js";
|
||||
import type { XImportMissionControlRequest } from "./router.js";
|
||||
import type { QueryMissionControlResponse } from "./router.js";
|
||||
import type { QueryMissionControlRequest } from "./router.js";
|
||||
import type { ResetMissionControlResponse } from "./router.js";
|
||||
import type { ResetMissionControlRequest } from "./router.js";
|
||||
import type { HTLCAttempt } from "./lightning.js";
|
||||
import type { SendToRouteResponse } from "./router.js";
|
||||
import type { SendToRouteRequest } from "./router.js";
|
||||
import type { RouteFeeResponse } from "./router.js";
|
||||
import type { RouteFeeRequest } from "./router.js";
|
||||
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
|
||||
import type { TrackPaymentsRequest } from "./router.js";
|
||||
import type { TrackPaymentRequest } from "./router.js";
|
||||
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
||||
import type { Payment } from "./lightning.js";
|
||||
import type { SendPaymentRequest } from "./router.js";
|
||||
import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc";
|
||||
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
||||
/**
|
||||
* Router is a service that offers advanced interaction with the router
|
||||
* subsystem of the daemon.
|
||||
*
|
||||
* @generated from protobuf service routerrpc.Router
|
||||
*/
|
||||
export interface IRouterClient {
|
||||
/**
|
||||
*
|
||||
* SendPaymentV2 attempts to route a payment described by the passed
|
||||
* PaymentRequest to the final destination. The call returns a stream of
|
||||
* payment updates.
|
||||
*
|
||||
* @generated from protobuf rpc: SendPaymentV2(routerrpc.SendPaymentRequest) returns (stream lnrpc.Payment);
|
||||
*/
|
||||
sendPaymentV2(input: SendPaymentRequest, options?: RpcOptions): ServerStreamingCall<SendPaymentRequest, Payment>;
|
||||
/**
|
||||
*
|
||||
* TrackPaymentV2 returns an update stream for the payment identified by the
|
||||
* payment hash.
|
||||
*
|
||||
* @generated from protobuf rpc: TrackPaymentV2(routerrpc.TrackPaymentRequest) returns (stream lnrpc.Payment);
|
||||
*/
|
||||
trackPaymentV2(input: TrackPaymentRequest, options?: RpcOptions): ServerStreamingCall<TrackPaymentRequest, Payment>;
|
||||
/**
|
||||
*
|
||||
* TrackPayments returns an update stream for every payment that is not in a
|
||||
* terminal state. Note that if payments are in-flight while starting a new
|
||||
* subscription, the start of the payment stream could produce out-of-order
|
||||
* and/or duplicate events. In order to get updates for every in-flight
|
||||
* payment attempt make sure to subscribe to this method before initiating any
|
||||
* payments.
|
||||
*
|
||||
* @generated from protobuf rpc: TrackPayments(routerrpc.TrackPaymentsRequest) returns (stream lnrpc.Payment);
|
||||
*/
|
||||
trackPayments(input: TrackPaymentsRequest, options?: RpcOptions): ServerStreamingCall<TrackPaymentsRequest, Payment>;
|
||||
/**
|
||||
*
|
||||
* EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
* may cost to send an HTLC to the target end destination.
|
||||
*
|
||||
* @generated from protobuf rpc: EstimateRouteFee(routerrpc.RouteFeeRequest) returns (routerrpc.RouteFeeResponse);
|
||||
*/
|
||||
estimateRouteFee(input: RouteFeeRequest, options?: RpcOptions): UnaryCall<RouteFeeRequest, RouteFeeResponse>;
|
||||
/**
|
||||
*
|
||||
* Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
|
||||
* the specified route. This method differs from SendPayment in that it
|
||||
* allows users to specify a full route manually. This can be used for
|
||||
* things like rebalancing, and atomic swaps. It differs from the newer
|
||||
* SendToRouteV2 in that it doesn't return the full HTLC information.
|
||||
*
|
||||
* @deprecated
|
||||
* @generated from protobuf rpc: SendToRoute(routerrpc.SendToRouteRequest) returns (routerrpc.SendToRouteResponse);
|
||||
*/
|
||||
sendToRoute(input: SendToRouteRequest, options?: RpcOptions): UnaryCall<SendToRouteRequest, SendToRouteResponse>;
|
||||
/**
|
||||
*
|
||||
* SendToRouteV2 attempts to make a payment via the specified route. This
|
||||
* method differs from SendPayment in that it allows users to specify a full
|
||||
* route manually. This can be used for things like rebalancing, and atomic
|
||||
* swaps.
|
||||
*
|
||||
* @generated from protobuf rpc: SendToRouteV2(routerrpc.SendToRouteRequest) returns (lnrpc.HTLCAttempt);
|
||||
*/
|
||||
sendToRouteV2(input: SendToRouteRequest, options?: RpcOptions): UnaryCall<SendToRouteRequest, HTLCAttempt>;
|
||||
/**
|
||||
*
|
||||
* ResetMissionControl clears all mission control state and starts with a clean
|
||||
* slate.
|
||||
*
|
||||
* @generated from protobuf rpc: ResetMissionControl(routerrpc.ResetMissionControlRequest) returns (routerrpc.ResetMissionControlResponse);
|
||||
*/
|
||||
resetMissionControl(input: ResetMissionControlRequest, options?: RpcOptions): UnaryCall<ResetMissionControlRequest, ResetMissionControlResponse>;
|
||||
/**
|
||||
*
|
||||
* QueryMissionControl exposes the internal mission control state to callers.
|
||||
* It is a development feature.
|
||||
*
|
||||
* @generated from protobuf rpc: QueryMissionControl(routerrpc.QueryMissionControlRequest) returns (routerrpc.QueryMissionControlResponse);
|
||||
*/
|
||||
queryMissionControl(input: QueryMissionControlRequest, options?: RpcOptions): UnaryCall<QueryMissionControlRequest, QueryMissionControlResponse>;
|
||||
/**
|
||||
*
|
||||
* XImportMissionControl is an experimental API that imports the state provided
|
||||
* to the internal mission control's state, using all results which are more
|
||||
* recent than our existing values. These values will only be imported
|
||||
* in-memory, and will not be persisted across restarts.
|
||||
*
|
||||
* @generated from protobuf rpc: XImportMissionControl(routerrpc.XImportMissionControlRequest) returns (routerrpc.XImportMissionControlResponse);
|
||||
*/
|
||||
xImportMissionControl(input: XImportMissionControlRequest, options?: RpcOptions): UnaryCall<XImportMissionControlRequest, XImportMissionControlResponse>;
|
||||
/**
|
||||
*
|
||||
* GetMissionControlConfig returns mission control's current config.
|
||||
*
|
||||
* @generated from protobuf rpc: GetMissionControlConfig(routerrpc.GetMissionControlConfigRequest) returns (routerrpc.GetMissionControlConfigResponse);
|
||||
*/
|
||||
getMissionControlConfig(input: GetMissionControlConfigRequest, options?: RpcOptions): UnaryCall<GetMissionControlConfigRequest, GetMissionControlConfigResponse>;
|
||||
/**
|
||||
*
|
||||
* SetMissionControlConfig will set mission control's config, if the config
|
||||
* provided is valid.
|
||||
*
|
||||
* @generated from protobuf rpc: SetMissionControlConfig(routerrpc.SetMissionControlConfigRequest) returns (routerrpc.SetMissionControlConfigResponse);
|
||||
*/
|
||||
setMissionControlConfig(input: SetMissionControlConfigRequest, options?: RpcOptions): UnaryCall<SetMissionControlConfigRequest, SetMissionControlConfigResponse>;
|
||||
/**
|
||||
*
|
||||
* QueryProbability returns the current success probability estimate for a
|
||||
* given node pair and amount.
|
||||
*
|
||||
* @generated from protobuf rpc: QueryProbability(routerrpc.QueryProbabilityRequest) returns (routerrpc.QueryProbabilityResponse);
|
||||
*/
|
||||
queryProbability(input: QueryProbabilityRequest, options?: RpcOptions): UnaryCall<QueryProbabilityRequest, QueryProbabilityResponse>;
|
||||
/**
|
||||
*
|
||||
* BuildRoute builds a fully specified route based on a list of hop public
|
||||
* keys. It retrieves the relevant channel policies from the graph in order to
|
||||
* calculate the correct fees and time locks.
|
||||
*
|
||||
* @generated from protobuf rpc: BuildRoute(routerrpc.BuildRouteRequest) returns (routerrpc.BuildRouteResponse);
|
||||
*/
|
||||
buildRoute(input: BuildRouteRequest, options?: RpcOptions): UnaryCall<BuildRouteRequest, BuildRouteResponse>;
|
||||
/**
|
||||
*
|
||||
* SubscribeHtlcEvents creates a uni-directional stream from the server to
|
||||
* the client which delivers a stream of htlc events.
|
||||
*
|
||||
* @generated from protobuf rpc: SubscribeHtlcEvents(routerrpc.SubscribeHtlcEventsRequest) returns (stream routerrpc.HtlcEvent);
|
||||
*/
|
||||
subscribeHtlcEvents(input: SubscribeHtlcEventsRequest, options?: RpcOptions): ServerStreamingCall<SubscribeHtlcEventsRequest, HtlcEvent>;
|
||||
/**
|
||||
*
|
||||
* Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
|
||||
* described by the passed PaymentRequest to the final destination. The call
|
||||
* returns a stream of payment status updates.
|
||||
*
|
||||
* @deprecated
|
||||
* @generated from protobuf rpc: SendPayment(routerrpc.SendPaymentRequest) returns (stream routerrpc.PaymentStatus);
|
||||
*/
|
||||
sendPayment(input: SendPaymentRequest, options?: RpcOptions): ServerStreamingCall<SendPaymentRequest, PaymentStatus>;
|
||||
/**
|
||||
*
|
||||
* Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
||||
* the payment identified by the payment hash.
|
||||
*
|
||||
* @deprecated
|
||||
* @generated from protobuf rpc: TrackPayment(routerrpc.TrackPaymentRequest) returns (stream routerrpc.PaymentStatus);
|
||||
*/
|
||||
trackPayment(input: TrackPaymentRequest, options?: RpcOptions): ServerStreamingCall<TrackPaymentRequest, PaymentStatus>;
|
||||
/**
|
||||
* *
|
||||
* HtlcInterceptor dispatches a bi-directional streaming RPC in which
|
||||
* Forwarded HTLC requests are sent to the client and the client responds with
|
||||
* a boolean that tells LND if this htlc should be intercepted.
|
||||
* In case of interception, the htlc can be either settled, cancelled or
|
||||
* resumed later by using the ResolveHoldForward endpoint.
|
||||
*
|
||||
* @generated from protobuf rpc: HtlcInterceptor(stream routerrpc.ForwardHtlcInterceptResponse) returns (stream routerrpc.ForwardHtlcInterceptRequest);
|
||||
*/
|
||||
htlcInterceptor(options?: RpcOptions): DuplexStreamingCall<ForwardHtlcInterceptResponse, ForwardHtlcInterceptRequest>;
|
||||
/**
|
||||
*
|
||||
* UpdateChanStatus attempts to manually set the state of a channel
|
||||
* (enabled, disabled, or auto). A manual "disable" request will cause the
|
||||
* channel to stay disabled until a subsequent manual request of either
|
||||
* "enable" or "auto".
|
||||
*
|
||||
* @generated from protobuf rpc: UpdateChanStatus(routerrpc.UpdateChanStatusRequest) returns (routerrpc.UpdateChanStatusResponse);
|
||||
*/
|
||||
updateChanStatus(input: UpdateChanStatusRequest, options?: RpcOptions): UnaryCall<UpdateChanStatusRequest, UpdateChanStatusResponse>;
|
||||
}
|
||||
/**
|
||||
* Router is a service that offers advanced interaction with the router
|
||||
* subsystem of the daemon.
|
||||
*
|
||||
* @generated from protobuf service routerrpc.Router
|
||||
*/
|
||||
export class RouterClient implements IRouterClient, ServiceInfo {
|
||||
typeName = Router.typeName;
|
||||
methods = Router.methods;
|
||||
options = Router.options;
|
||||
constructor(private readonly _transport: RpcTransport) {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* SendPaymentV2 attempts to route a payment described by the passed
|
||||
* PaymentRequest to the final destination. The call returns a stream of
|
||||
* payment updates.
|
||||
*
|
||||
* @generated from protobuf rpc: SendPaymentV2(routerrpc.SendPaymentRequest) returns (stream lnrpc.Payment);
|
||||
*/
|
||||
sendPaymentV2(input: SendPaymentRequest, options?: RpcOptions): ServerStreamingCall<SendPaymentRequest, Payment> {
|
||||
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SendPaymentRequest, Payment>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* TrackPaymentV2 returns an update stream for the payment identified by the
|
||||
* payment hash.
|
||||
*
|
||||
* @generated from protobuf rpc: TrackPaymentV2(routerrpc.TrackPaymentRequest) returns (stream lnrpc.Payment);
|
||||
*/
|
||||
trackPaymentV2(input: TrackPaymentRequest, options?: RpcOptions): ServerStreamingCall<TrackPaymentRequest, Payment> {
|
||||
const method = this.methods[1], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<TrackPaymentRequest, Payment>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* TrackPayments returns an update stream for every payment that is not in a
|
||||
* terminal state. Note that if payments are in-flight while starting a new
|
||||
* subscription, the start of the payment stream could produce out-of-order
|
||||
* and/or duplicate events. In order to get updates for every in-flight
|
||||
* payment attempt make sure to subscribe to this method before initiating any
|
||||
* payments.
|
||||
*
|
||||
* @generated from protobuf rpc: TrackPayments(routerrpc.TrackPaymentsRequest) returns (stream lnrpc.Payment);
|
||||
*/
|
||||
trackPayments(input: TrackPaymentsRequest, options?: RpcOptions): ServerStreamingCall<TrackPaymentsRequest, Payment> {
|
||||
const method = this.methods[2], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<TrackPaymentsRequest, Payment>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
* may cost to send an HTLC to the target end destination.
|
||||
*
|
||||
* @generated from protobuf rpc: EstimateRouteFee(routerrpc.RouteFeeRequest) returns (routerrpc.RouteFeeResponse);
|
||||
*/
|
||||
estimateRouteFee(input: RouteFeeRequest, options?: RpcOptions): UnaryCall<RouteFeeRequest, RouteFeeResponse> {
|
||||
const method = this.methods[3], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<RouteFeeRequest, RouteFeeResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
|
||||
* the specified route. This method differs from SendPayment in that it
|
||||
* allows users to specify a full route manually. This can be used for
|
||||
* things like rebalancing, and atomic swaps. It differs from the newer
|
||||
* SendToRouteV2 in that it doesn't return the full HTLC information.
|
||||
*
|
||||
* @deprecated
|
||||
* @generated from protobuf rpc: SendToRoute(routerrpc.SendToRouteRequest) returns (routerrpc.SendToRouteResponse);
|
||||
*/
|
||||
sendToRoute(input: SendToRouteRequest, options?: RpcOptions): UnaryCall<SendToRouteRequest, SendToRouteResponse> {
|
||||
const method = this.methods[4], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SendToRouteRequest, SendToRouteResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* SendToRouteV2 attempts to make a payment via the specified route. This
|
||||
* method differs from SendPayment in that it allows users to specify a full
|
||||
* route manually. This can be used for things like rebalancing, and atomic
|
||||
* swaps.
|
||||
*
|
||||
* @generated from protobuf rpc: SendToRouteV2(routerrpc.SendToRouteRequest) returns (lnrpc.HTLCAttempt);
|
||||
*/
|
||||
sendToRouteV2(input: SendToRouteRequest, options?: RpcOptions): UnaryCall<SendToRouteRequest, HTLCAttempt> {
|
||||
const method = this.methods[5], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SendToRouteRequest, HTLCAttempt>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* ResetMissionControl clears all mission control state and starts with a clean
|
||||
* slate.
|
||||
*
|
||||
* @generated from protobuf rpc: ResetMissionControl(routerrpc.ResetMissionControlRequest) returns (routerrpc.ResetMissionControlResponse);
|
||||
*/
|
||||
resetMissionControl(input: ResetMissionControlRequest, options?: RpcOptions): UnaryCall<ResetMissionControlRequest, ResetMissionControlResponse> {
|
||||
const method = this.methods[6], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ResetMissionControlRequest, ResetMissionControlResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* QueryMissionControl exposes the internal mission control state to callers.
|
||||
* It is a development feature.
|
||||
*
|
||||
* @generated from protobuf rpc: QueryMissionControl(routerrpc.QueryMissionControlRequest) returns (routerrpc.QueryMissionControlResponse);
|
||||
*/
|
||||
queryMissionControl(input: QueryMissionControlRequest, options?: RpcOptions): UnaryCall<QueryMissionControlRequest, QueryMissionControlResponse> {
|
||||
const method = this.methods[7], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<QueryMissionControlRequest, QueryMissionControlResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* XImportMissionControl is an experimental API that imports the state provided
|
||||
* to the internal mission control's state, using all results which are more
|
||||
* recent than our existing values. These values will only be imported
|
||||
* in-memory, and will not be persisted across restarts.
|
||||
*
|
||||
* @generated from protobuf rpc: XImportMissionControl(routerrpc.XImportMissionControlRequest) returns (routerrpc.XImportMissionControlResponse);
|
||||
*/
|
||||
xImportMissionControl(input: XImportMissionControlRequest, options?: RpcOptions): UnaryCall<XImportMissionControlRequest, XImportMissionControlResponse> {
|
||||
const method = this.methods[8], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<XImportMissionControlRequest, XImportMissionControlResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* GetMissionControlConfig returns mission control's current config.
|
||||
*
|
||||
* @generated from protobuf rpc: GetMissionControlConfig(routerrpc.GetMissionControlConfigRequest) returns (routerrpc.GetMissionControlConfigResponse);
|
||||
*/
|
||||
getMissionControlConfig(input: GetMissionControlConfigRequest, options?: RpcOptions): UnaryCall<GetMissionControlConfigRequest, GetMissionControlConfigResponse> {
|
||||
const method = this.methods[9], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<GetMissionControlConfigRequest, GetMissionControlConfigResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* SetMissionControlConfig will set mission control's config, if the config
|
||||
* provided is valid.
|
||||
*
|
||||
* @generated from protobuf rpc: SetMissionControlConfig(routerrpc.SetMissionControlConfigRequest) returns (routerrpc.SetMissionControlConfigResponse);
|
||||
*/
|
||||
setMissionControlConfig(input: SetMissionControlConfigRequest, options?: RpcOptions): UnaryCall<SetMissionControlConfigRequest, SetMissionControlConfigResponse> {
|
||||
const method = this.methods[10], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SetMissionControlConfigRequest, SetMissionControlConfigResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* QueryProbability returns the current success probability estimate for a
|
||||
* given node pair and amount.
|
||||
*
|
||||
* @generated from protobuf rpc: QueryProbability(routerrpc.QueryProbabilityRequest) returns (routerrpc.QueryProbabilityResponse);
|
||||
*/
|
||||
queryProbability(input: QueryProbabilityRequest, options?: RpcOptions): UnaryCall<QueryProbabilityRequest, QueryProbabilityResponse> {
|
||||
const method = this.methods[11], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<QueryProbabilityRequest, QueryProbabilityResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* BuildRoute builds a fully specified route based on a list of hop public
|
||||
* keys. It retrieves the relevant channel policies from the graph in order to
|
||||
* calculate the correct fees and time locks.
|
||||
*
|
||||
* @generated from protobuf rpc: BuildRoute(routerrpc.BuildRouteRequest) returns (routerrpc.BuildRouteResponse);
|
||||
*/
|
||||
buildRoute(input: BuildRouteRequest, options?: RpcOptions): UnaryCall<BuildRouteRequest, BuildRouteResponse> {
|
||||
const method = this.methods[12], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<BuildRouteRequest, BuildRouteResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* SubscribeHtlcEvents creates a uni-directional stream from the server to
|
||||
* the client which delivers a stream of htlc events.
|
||||
*
|
||||
* @generated from protobuf rpc: SubscribeHtlcEvents(routerrpc.SubscribeHtlcEventsRequest) returns (stream routerrpc.HtlcEvent);
|
||||
*/
|
||||
subscribeHtlcEvents(input: SubscribeHtlcEventsRequest, options?: RpcOptions): ServerStreamingCall<SubscribeHtlcEventsRequest, HtlcEvent> {
|
||||
const method = this.methods[13], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SubscribeHtlcEventsRequest, HtlcEvent>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
|
||||
* described by the passed PaymentRequest to the final destination. The call
|
||||
* returns a stream of payment status updates.
|
||||
*
|
||||
* @deprecated
|
||||
* @generated from protobuf rpc: SendPayment(routerrpc.SendPaymentRequest) returns (stream routerrpc.PaymentStatus);
|
||||
*/
|
||||
sendPayment(input: SendPaymentRequest, options?: RpcOptions): ServerStreamingCall<SendPaymentRequest, PaymentStatus> {
|
||||
const method = this.methods[14], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SendPaymentRequest, PaymentStatus>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
||||
* the payment identified by the payment hash.
|
||||
*
|
||||
* @deprecated
|
||||
* @generated from protobuf rpc: TrackPayment(routerrpc.TrackPaymentRequest) returns (stream routerrpc.PaymentStatus);
|
||||
*/
|
||||
trackPayment(input: TrackPaymentRequest, options?: RpcOptions): ServerStreamingCall<TrackPaymentRequest, PaymentStatus> {
|
||||
const method = this.methods[15], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<TrackPaymentRequest, PaymentStatus>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
* *
|
||||
* HtlcInterceptor dispatches a bi-directional streaming RPC in which
|
||||
* Forwarded HTLC requests are sent to the client and the client responds with
|
||||
* a boolean that tells LND if this htlc should be intercepted.
|
||||
* In case of interception, the htlc can be either settled, cancelled or
|
||||
* resumed later by using the ResolveHoldForward endpoint.
|
||||
*
|
||||
* @generated from protobuf rpc: HtlcInterceptor(stream routerrpc.ForwardHtlcInterceptResponse) returns (stream routerrpc.ForwardHtlcInterceptRequest);
|
||||
*/
|
||||
htlcInterceptor(options?: RpcOptions): DuplexStreamingCall<ForwardHtlcInterceptResponse, ForwardHtlcInterceptRequest> {
|
||||
const method = this.methods[16], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ForwardHtlcInterceptResponse, ForwardHtlcInterceptRequest>("duplex", this._transport, method, opt);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* UpdateChanStatus attempts to manually set the state of a channel
|
||||
* (enabled, disabled, or auto). A manual "disable" request will cause the
|
||||
* channel to stay disabled until a subsequent manual request of either
|
||||
* "enable" or "auto".
|
||||
*
|
||||
* @generated from protobuf rpc: UpdateChanStatus(routerrpc.UpdateChanStatusRequest) returns (routerrpc.UpdateChanStatusResponse);
|
||||
*/
|
||||
updateChanStatus(input: UpdateChanStatusRequest, options?: RpcOptions): UnaryCall<UpdateChanStatusRequest, UpdateChanStatusResponse> {
|
||||
const method = this.methods[17], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<UpdateChanStatusRequest, UpdateChanStatusResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
7088
proto/lnd/router.ts
7088
proto/lnd/router.ts
File diff suppressed because it is too large
Load diff
|
|
@ -3,16 +3,16 @@
|
|||
// tslint:disable
|
||||
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
||||
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
||||
import { WalletUnlocker } from "./walletunlocker.js";
|
||||
import type { ChangePasswordResponse } from "./walletunlocker.js";
|
||||
import type { ChangePasswordRequest } from "./walletunlocker.js";
|
||||
import type { UnlockWalletResponse } from "./walletunlocker.js";
|
||||
import type { UnlockWalletRequest } from "./walletunlocker.js";
|
||||
import type { InitWalletResponse } from "./walletunlocker.js";
|
||||
import type { InitWalletRequest } from "./walletunlocker.js";
|
||||
import { WalletUnlocker } from "./walletunlocker";
|
||||
import type { ChangePasswordResponse } from "./walletunlocker";
|
||||
import type { ChangePasswordRequest } from "./walletunlocker";
|
||||
import type { UnlockWalletResponse } from "./walletunlocker";
|
||||
import type { UnlockWalletRequest } from "./walletunlocker";
|
||||
import type { InitWalletResponse } from "./walletunlocker";
|
||||
import type { InitWalletRequest } from "./walletunlocker";
|
||||
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
||||
import type { GenSeedResponse } from "./walletunlocker.js";
|
||||
import type { GenSeedRequest } from "./walletunlocker.js";
|
||||
import type { GenSeedResponse } from "./walletunlocker";
|
||||
import type { GenSeedRequest } from "./walletunlocker";
|
||||
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
|
||||
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
||||
//
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import type { PartialMessage } from "@protobuf-ts/runtime";
|
|||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
import { ChanBackupSnapshot } from "./lightning.js";
|
||||
import { ChanBackupSnapshot } from "./lightning";
|
||||
/**
|
||||
* @generated from protobuf message lnrpc.GenSeedRequest
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -101,8 +101,10 @@ service Lightning {
|
|||
rpc SignMessage (SignMessageRequest) returns (SignMessageResponse);
|
||||
|
||||
/* lncli: `verifymessage`
|
||||
VerifyMessage verifies a signature over a msg. The signature must be
|
||||
zbase32 encoded and signed by an active node in the resident node's
|
||||
VerifyMessage verifies a signature over a message and recovers the signer's
|
||||
public key. The signature is only deemed valid if the recovered public key
|
||||
corresponds to a node key in the public Lightning network. The signature
|
||||
must be zbase32 encoded and signed by an active node in the resident node's
|
||||
channel database. In addition to returning the validity of the signature,
|
||||
VerifyMessage also returns the recovered pubkey from the signature.
|
||||
*/
|
||||
|
|
@ -141,6 +143,13 @@ service Lightning {
|
|||
*/
|
||||
rpc GetInfo (GetInfoRequest) returns (GetInfoResponse);
|
||||
|
||||
/* lncli: 'getdebuginfo'
|
||||
GetDebugInfo returns debug information concerning the state of the daemon
|
||||
and its subsystems. This includes the full configuration and the latest log
|
||||
entries from the log file.
|
||||
*/
|
||||
rpc GetDebugInfo (GetDebugInfoRequest) returns (GetDebugInfoResponse);
|
||||
|
||||
/** lncli: `getrecoveryinfo`
|
||||
GetRecoveryInfo returns information concerning the recovery mode including
|
||||
whether it's in a recovery mode, whether the recovery is finished, and the
|
||||
|
|
@ -320,7 +329,7 @@ service Lightning {
|
|||
optionally specify the add_index and/or the settle_index. If the add_index
|
||||
is specified, then we'll first start by sending add invoice events for all
|
||||
invoices with an add_index greater than the specified value. If the
|
||||
settle_index is specified, the next, we'll send out all settle events for
|
||||
settle_index is specified, then next, we'll send out all settle events for
|
||||
invoices with a settle_index greater than the specified value. One or both
|
||||
of these fields can be set. If no fields are set, then we'll only send out
|
||||
the latest add/settle events.
|
||||
|
|
@ -339,13 +348,13 @@ service Lightning {
|
|||
*/
|
||||
rpc ListPayments (ListPaymentsRequest) returns (ListPaymentsResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `deletepayments`
|
||||
DeletePayment deletes an outgoing payment from DB. Note that it will not
|
||||
attempt to delete an In-Flight payment, since that would be unsafe.
|
||||
*/
|
||||
rpc DeletePayment (DeletePaymentRequest) returns (DeletePaymentResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `deletepayments --all`
|
||||
DeleteAllPayments deletes all outgoing payments from DB. Note that it will
|
||||
not attempt to delete In-Flight payments, since that would be unsafe.
|
||||
*/
|
||||
|
|
@ -477,7 +486,7 @@ service Lightning {
|
|||
rpc ExportAllChannelBackups (ChanBackupExportRequest)
|
||||
returns (ChanBackupSnapshot);
|
||||
|
||||
/*
|
||||
/* lncli: `verifychanbackup`
|
||||
VerifyChanBackup allows a caller to verify the integrity of a channel backup
|
||||
snapshot. This method will accept either a packed Single or a packed Multi.
|
||||
Specifying both will result in an error.
|
||||
|
|
@ -567,6 +576,10 @@ service Lightning {
|
|||
/* lncli: `subscribecustom`
|
||||
SubscribeCustomMessages subscribes to a stream of incoming custom peer
|
||||
messages.
|
||||
|
||||
To include messages with type outside of the custom range (>= 32768) lnd
|
||||
needs to be compiled with the `dev` build tag, and the message type to
|
||||
override should be specified in lnd's experimental protocol configuration.
|
||||
*/
|
||||
rpc SubscribeCustomMessages (SubscribeCustomMessagesRequest)
|
||||
returns (stream CustomMessage);
|
||||
|
|
@ -578,18 +591,26 @@ service Lightning {
|
|||
*/
|
||||
rpc ListAliases (ListAliasesRequest) returns (ListAliasesResponse);
|
||||
|
||||
rpc LookupHtlc (LookupHtlcRequest) returns (LookupHtlcResponse);
|
||||
/*
|
||||
LookupHtlcResolution retrieves a final htlc resolution from the database.
|
||||
If the htlc has no final resolution yet, a NotFound grpc status code is
|
||||
returned.
|
||||
*/
|
||||
rpc LookupHtlcResolution (LookupHtlcResolutionRequest)
|
||||
returns (LookupHtlcResolutionResponse);
|
||||
}
|
||||
|
||||
message LookupHtlcRequest {
|
||||
message LookupHtlcResolutionRequest {
|
||||
uint64 chan_id = 1;
|
||||
|
||||
uint64 htlc_index = 2;
|
||||
}
|
||||
|
||||
message LookupHtlcResponse {
|
||||
message LookupHtlcResolutionResponse {
|
||||
// Settled is true is the htlc was settled. If false, the htlc was failed.
|
||||
bool settled = 1;
|
||||
|
||||
// Offchain indicates whether the htlc was resolved off-chain or on-chain.
|
||||
bool offchain = 2;
|
||||
}
|
||||
|
||||
|
|
@ -612,6 +633,9 @@ message SendCustomMessageRequest {
|
|||
bytes peer = 1;
|
||||
|
||||
// Message type. This value needs to be in the custom range (>= 32768).
|
||||
// To send a type < custom range, lnd needs to be compiled with the `dev`
|
||||
// build tag, and the message type to override should be specified in lnd's
|
||||
// experimental protocol configuration.
|
||||
uint32 type = 2;
|
||||
|
||||
// Raw message data.
|
||||
|
|
@ -860,7 +884,8 @@ message SendRequest {
|
|||
repeated FeatureBit dest_features = 15;
|
||||
|
||||
/*
|
||||
The payment address of the generated invoice.
|
||||
The payment address of the generated invoice. This is also called
|
||||
payment secret in specifications (e.g. BOLT 11).
|
||||
*/
|
||||
bytes payment_addr = 16;
|
||||
}
|
||||
|
|
@ -1066,6 +1091,18 @@ message LightningAddress {
|
|||
string host = 2;
|
||||
}
|
||||
|
||||
enum CoinSelectionStrategy {
|
||||
// Use the coin selection strategy defined in the global configuration
|
||||
// (lnd.conf).
|
||||
STRATEGY_USE_GLOBAL_CONFIG = 0;
|
||||
|
||||
// Select the largest available coins first during coin selection.
|
||||
STRATEGY_LARGEST = 1;
|
||||
|
||||
// Randomly select the available coins during coin selection.
|
||||
STRATEGY_RANDOM = 2;
|
||||
}
|
||||
|
||||
message EstimateFeeRequest {
|
||||
// The map from addresses to amounts for the transaction.
|
||||
map<string, int64> AddrToAmount = 1;
|
||||
|
|
@ -1080,6 +1117,9 @@ message EstimateFeeRequest {
|
|||
|
||||
// Whether unconfirmed outputs should be used as inputs for the transaction.
|
||||
bool spend_unconfirmed = 4;
|
||||
|
||||
// The strategy to use for selecting coins during fees estimation.
|
||||
CoinSelectionStrategy coin_selection_strategy = 5;
|
||||
}
|
||||
|
||||
message EstimateFeeResponse {
|
||||
|
|
@ -1120,6 +1160,9 @@ message SendManyRequest {
|
|||
|
||||
// Whether unconfirmed outputs should be used as inputs for the transaction.
|
||||
bool spend_unconfirmed = 8;
|
||||
|
||||
// The strategy to use for selecting coins during sending many requests.
|
||||
CoinSelectionStrategy coin_selection_strategy = 9;
|
||||
}
|
||||
message SendManyResponse {
|
||||
// The id of the transaction
|
||||
|
|
@ -1147,9 +1190,8 @@ message SendCoinsRequest {
|
|||
int64 sat_per_byte = 5 [deprecated = true];
|
||||
|
||||
/*
|
||||
If set, then the amount field will be ignored, and lnd will attempt to
|
||||
send all the coins under control of the internal wallet to the specified
|
||||
address.
|
||||
If set, the amount field should be unset. It indicates lnd will send all
|
||||
wallet coins or all selected coins to the specified address.
|
||||
*/
|
||||
bool send_all = 6;
|
||||
|
||||
|
|
@ -1162,6 +1204,12 @@ message SendCoinsRequest {
|
|||
|
||||
// Whether unconfirmed outputs should be used as inputs for the transaction.
|
||||
bool spend_unconfirmed = 9;
|
||||
|
||||
// The strategy to use for selecting coins.
|
||||
CoinSelectionStrategy coin_selection_strategy = 10;
|
||||
|
||||
// A list of selected outpoints as inputs for the transaction.
|
||||
repeated OutPoint outpoints = 11;
|
||||
}
|
||||
message SendCoinsResponse {
|
||||
// The transaction ID of the transaction
|
||||
|
|
@ -1335,6 +1383,13 @@ enum CommitmentType {
|
|||
channel before its maturity date.
|
||||
*/
|
||||
SCRIPT_ENFORCED_LEASE = 4;
|
||||
|
||||
/*
|
||||
A channel that uses musig2 for the funding output, and the new tapscript
|
||||
features where relevant.
|
||||
*/
|
||||
// TODO(roasbeef): need script enforce mirror type for the above as well?
|
||||
SIMPLE_TAPROOT = 5;
|
||||
}
|
||||
|
||||
message ChannelConstraints {
|
||||
|
|
@ -1524,6 +1579,19 @@ message Channel {
|
|||
|
||||
// This is the confirmed / on-chain zero-conf SCID.
|
||||
uint64 zero_conf_confirmed_scid = 33;
|
||||
|
||||
// The configured alias name of our peer.
|
||||
string peer_alias = 34;
|
||||
|
||||
// This is the peer SCID alias.
|
||||
uint64 peer_scid_alias = 35 [jstype = JS_STRING];
|
||||
|
||||
/*
|
||||
An optional note-to-self to go along with the channel containing some
|
||||
useful information. This is only ever stored locally and in no way impacts
|
||||
the channel's operation.
|
||||
*/
|
||||
string memo = 36;
|
||||
}
|
||||
|
||||
message ListChannelsRequest {
|
||||
|
|
@ -1537,6 +1605,11 @@ message ListChannelsRequest {
|
|||
empty, all channels will be returned.
|
||||
*/
|
||||
bytes peer = 5;
|
||||
|
||||
// Informs the server if the peer alias lookup per channel should be
|
||||
// enabled. It is turned off by default in order to avoid degradation of
|
||||
// performance for existing clients.
|
||||
bool peer_alias_lookup = 6;
|
||||
}
|
||||
message ListChannelsResponse {
|
||||
// The list of active channels
|
||||
|
|
@ -1884,12 +1957,16 @@ message GetInfoResponse {
|
|||
/*
|
||||
Whether the current node is connected to testnet. This field is
|
||||
deprecated and the network field should be used instead
|
||||
**/
|
||||
*/
|
||||
bool testnet = 10 [deprecated = true];
|
||||
|
||||
reserved 11;
|
||||
|
||||
// A list of active chains the node is connected to
|
||||
/*
|
||||
A list of active chains the node is connected to. This will only
|
||||
ever contain a single entry since LND will only ever have a single
|
||||
chain backend during its lifetime.
|
||||
*/
|
||||
repeated Chain chains = 16;
|
||||
|
||||
// The URIs of the current node.
|
||||
|
|
@ -1905,6 +1982,17 @@ message GetInfoResponse {
|
|||
Indicates whether the HTLC interceptor API is in always-on mode.
|
||||
*/
|
||||
bool require_htlc_interceptor = 21;
|
||||
|
||||
// Indicates whether final htlc resolutions are stored on disk.
|
||||
bool store_final_htlc_resolutions = 22;
|
||||
}
|
||||
|
||||
message GetDebugInfoRequest {
|
||||
}
|
||||
|
||||
message GetDebugInfoResponse {
|
||||
map<string, string> config = 1;
|
||||
repeated string log = 2;
|
||||
}
|
||||
|
||||
message GetRecoveryInfoRequest {
|
||||
|
|
@ -1921,8 +2009,9 @@ message GetRecoveryInfoResponse {
|
|||
}
|
||||
|
||||
message Chain {
|
||||
// The blockchain the node is on (eg bitcoin, litecoin)
|
||||
string chain = 1;
|
||||
// Deprecated. The chain is now always assumed to be bitcoin.
|
||||
// The blockchain the node is on (must be bitcoin)
|
||||
string chain = 1 [deprecated = true];
|
||||
|
||||
// The network the node is on (eg regtest, testnet, mainnet)
|
||||
string network = 2;
|
||||
|
|
@ -1982,12 +2071,18 @@ message CloseChannelRequest {
|
|||
//
|
||||
// NOTE: This field is only respected if we're the initiator of the channel.
|
||||
uint64 max_fee_per_vbyte = 7;
|
||||
|
||||
// If true, then the rpc call will not block while it awaits a closing txid.
|
||||
// Consequently this RPC call will not return a closing txid if this value
|
||||
// is set.
|
||||
bool no_wait = 8;
|
||||
}
|
||||
|
||||
message CloseStatusUpdate {
|
||||
oneof update {
|
||||
PendingUpdate close_pending = 1;
|
||||
ChannelCloseUpdate chan_close = 3;
|
||||
InstantUpdate close_instant = 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1996,6 +2091,9 @@ message PendingUpdate {
|
|||
uint32 output_index = 2;
|
||||
}
|
||||
|
||||
message InstantUpdate {
|
||||
}
|
||||
|
||||
message ReadyForPsbtFunding {
|
||||
/*
|
||||
The P2WSH address of the channel funding multisig address that the below
|
||||
|
|
@ -2040,6 +2138,9 @@ message BatchOpenChannelRequest {
|
|||
|
||||
// An optional label for the batch transaction, limited to 500 characters.
|
||||
string label = 6;
|
||||
|
||||
// The strategy to use for selecting coins during batch opening channels.
|
||||
CoinSelectionStrategy coin_selection_strategy = 7;
|
||||
}
|
||||
|
||||
message BatchOpenChannel {
|
||||
|
|
@ -2090,6 +2191,76 @@ message BatchOpenChannel {
|
|||
the remote peer supports explicit channel negotiation.
|
||||
*/
|
||||
CommitmentType commitment_type = 9;
|
||||
|
||||
/*
|
||||
The maximum amount of coins in millisatoshi that can be pending within
|
||||
the channel. It only applies to the remote party.
|
||||
*/
|
||||
uint64 remote_max_value_in_flight_msat = 10;
|
||||
|
||||
/*
|
||||
The maximum number of concurrent HTLCs we will allow the remote party to add
|
||||
to the commitment transaction.
|
||||
*/
|
||||
uint32 remote_max_htlcs = 11;
|
||||
|
||||
/*
|
||||
Max local csv is the maximum csv delay we will allow for our own commitment
|
||||
transaction.
|
||||
*/
|
||||
uint32 max_local_csv = 12;
|
||||
|
||||
/*
|
||||
If this is true, then a zero-conf channel open will be attempted.
|
||||
*/
|
||||
bool zero_conf = 13;
|
||||
|
||||
/*
|
||||
If this is true, then an option-scid-alias channel-type open will be
|
||||
attempted.
|
||||
*/
|
||||
bool scid_alias = 14;
|
||||
|
||||
/*
|
||||
The base fee charged regardless of the number of milli-satoshis sent.
|
||||
*/
|
||||
uint64 base_fee = 15;
|
||||
|
||||
/*
|
||||
The fee rate in ppm (parts per million) that will be charged in
|
||||
proportion of the value of each forwarded HTLC.
|
||||
*/
|
||||
uint64 fee_rate = 16;
|
||||
|
||||
/*
|
||||
If use_base_fee is true the open channel announcement will update the
|
||||
channel base fee with the value specified in base_fee. In the case of
|
||||
a base_fee of 0 use_base_fee is needed downstream to distinguish whether
|
||||
to use the default base fee value specified in the config or 0.
|
||||
*/
|
||||
bool use_base_fee = 17;
|
||||
|
||||
/*
|
||||
If use_fee_rate is true the open channel announcement will update the
|
||||
channel fee rate with the value specified in fee_rate. In the case of
|
||||
a fee_rate of 0 use_fee_rate is needed downstream to distinguish whether
|
||||
to use the default fee rate value specified in the config or 0.
|
||||
*/
|
||||
bool use_fee_rate = 18;
|
||||
|
||||
/*
|
||||
The number of satoshis we require the remote peer to reserve. This value,
|
||||
if specified, must be above the dust limit and below 20% of the channel
|
||||
capacity.
|
||||
*/
|
||||
uint64 remote_chan_reserve_sat = 19;
|
||||
|
||||
/*
|
||||
An optional note-to-self to go along with the channel containing some
|
||||
useful information. This is only ever stored locally and in no way impacts
|
||||
the channel's operation.
|
||||
*/
|
||||
string memo = 20;
|
||||
}
|
||||
|
||||
message BatchOpenChannelResponse {
|
||||
|
|
@ -2238,6 +2409,25 @@ message OpenChannelRequest {
|
|||
capacity.
|
||||
*/
|
||||
uint64 remote_chan_reserve_sat = 25;
|
||||
|
||||
/*
|
||||
If set, then lnd will attempt to commit all the coins under control of the
|
||||
internal wallet to open the channel, and the LocalFundingAmount field must
|
||||
be zero and is ignored.
|
||||
*/
|
||||
bool fund_max = 26;
|
||||
|
||||
/*
|
||||
An optional note-to-self to go along with the channel containing some
|
||||
useful information. This is only ever stored locally and in no way impacts
|
||||
the channel's operation.
|
||||
*/
|
||||
string memo = 27;
|
||||
|
||||
/*
|
||||
A list of selected outpoints that are allocated for channel funding.
|
||||
*/
|
||||
repeated OutPoint outpoints = 28;
|
||||
}
|
||||
message OpenStatusUpdate {
|
||||
oneof update {
|
||||
|
|
@ -2319,6 +2509,11 @@ message ChanPointShim {
|
|||
the value is less than 500,000, or as an absolute height otherwise.
|
||||
*/
|
||||
uint32 thaw_height = 6;
|
||||
|
||||
/*
|
||||
Indicates that the funding output is using a MuSig2 multi-sig output.
|
||||
*/
|
||||
bool musig2 = 7;
|
||||
}
|
||||
|
||||
message PsbtShim {
|
||||
|
|
@ -2469,6 +2664,9 @@ message PendingHTLC {
|
|||
}
|
||||
|
||||
message PendingChannelsRequest {
|
||||
// Indicates whether to include the raw transaction hex for
|
||||
// waiting_close_channels.
|
||||
bool include_raw_tx = 1;
|
||||
}
|
||||
message PendingChannelsResponse {
|
||||
message PendingChannel {
|
||||
|
|
@ -2504,6 +2702,13 @@ message PendingChannelsResponse {
|
|||
|
||||
// Whether this channel is advertised to the network or not.
|
||||
bool private = 12;
|
||||
|
||||
/*
|
||||
An optional note-to-self to go along with the channel containing some
|
||||
useful information. This is only ever stored locally and in no way
|
||||
impacts the channel's operation.
|
||||
*/
|
||||
string memo = 13;
|
||||
}
|
||||
|
||||
message PendingOpenChannel {
|
||||
|
|
@ -2531,6 +2736,17 @@ message PendingChannelsResponse {
|
|||
|
||||
// Previously used for confirmation_height. Do not reuse.
|
||||
reserved 2;
|
||||
|
||||
// The number of blocks until the funding transaction is considered
|
||||
// expired. If this value gets close to zero, there is a risk that the
|
||||
// channel funding will be canceled by the channel responder. The
|
||||
// channel should be fee bumped using CPFP (see walletrpc.BumpFee) to
|
||||
// ensure that the channel confirms in time. Otherwise a force-close
|
||||
// will be necessary if the channel confirms after the funding
|
||||
// transaction expires. A negative value means the channel responder has
|
||||
// very likely canceled the funding and the channel will never become
|
||||
// fully operational.
|
||||
int32 funding_expiry_blocks = 3;
|
||||
}
|
||||
|
||||
message WaitingCloseChannel {
|
||||
|
|
@ -2548,6 +2764,10 @@ message PendingChannelsResponse {
|
|||
|
||||
// The transaction id of the closing transaction
|
||||
string closing_txid = 4;
|
||||
|
||||
// The raw hex encoded bytes of the closing transaction. Included if
|
||||
// include_raw_tx in the request is true.
|
||||
string closing_tx_hex = 5;
|
||||
}
|
||||
|
||||
message Commitments {
|
||||
|
|
@ -2683,6 +2903,14 @@ message WalletAccountBalance {
|
|||
}
|
||||
|
||||
message WalletBalanceRequest {
|
||||
// The wallet account the balance is shown for.
|
||||
// If this is not specified, the balance of the "default" account is shown.
|
||||
string account = 1;
|
||||
|
||||
// The minimum number of confirmations each one of your outputs used for the
|
||||
// funding transaction must satisfy. If this is not specified, the default
|
||||
// value of 1 is used.
|
||||
int32 min_confs = 2;
|
||||
}
|
||||
|
||||
message WalletBalanceResponse {
|
||||
|
|
@ -2768,6 +2996,9 @@ message QueryRoutesRequest {
|
|||
not add any additional block padding on top of final_ctlv_delta. This
|
||||
padding of a few blocks needs to be added manually or otherwise failures may
|
||||
happen when a block comes in while the payment is in flight.
|
||||
|
||||
Note: must not be set if making a payment to a blinded path (delta is
|
||||
set by the aggregate parameters provided by blinded_payment_paths)
|
||||
*/
|
||||
int32 final_cltv_delta = 4;
|
||||
|
||||
|
|
@ -2841,12 +3072,21 @@ message QueryRoutesRequest {
|
|||
*/
|
||||
repeated lnrpc.RouteHint route_hints = 16;
|
||||
|
||||
/*
|
||||
An optional blinded path(s) to reach the destination. Note that the
|
||||
introduction node must be provided as the first hop in the route.
|
||||
*/
|
||||
repeated BlindedPaymentPath blinded_payment_paths = 19;
|
||||
|
||||
/*
|
||||
Features assumed to be supported by the final node. All transitive feature
|
||||
dependencies must also be set properly. For a given feature bit pair, either
|
||||
optional or remote may be set, but not both. If this field is nil or empty,
|
||||
the router will try to load destination features from the graph as a
|
||||
fallback.
|
||||
|
||||
Note: must not be set if making a payment to a blinded route (features
|
||||
are provided in blinded_payment_paths).
|
||||
*/
|
||||
repeated lnrpc.FeatureBit dest_features = 17;
|
||||
|
||||
|
|
@ -2952,6 +3192,32 @@ message Hop {
|
|||
|
||||
// The payment metadata to send along with the payment to the payee.
|
||||
bytes metadata = 13;
|
||||
|
||||
/*
|
||||
Blinding point is an optional blinding point included for introduction
|
||||
nodes in blinded paths. This field is mandatory for hops that represents
|
||||
the introduction point in a blinded path.
|
||||
*/
|
||||
bytes blinding_point = 14;
|
||||
|
||||
/*
|
||||
Encrypted data is a receiver-produced blob of data that provides hops
|
||||
in a blinded route with forwarding data. As this data is encrypted by
|
||||
the recipient, we will not be able to parse it - it is essentially an
|
||||
arbitrary blob of data from our node's perspective. This field is
|
||||
mandatory for all hops in a blinded path, including the introduction
|
||||
node.
|
||||
*/
|
||||
bytes encrypted_data = 15;
|
||||
|
||||
/*
|
||||
The total amount that is sent to the recipient (possibly across multiple
|
||||
HTLCs), as specified by the sender when making a payment to a blinded path.
|
||||
This value is only set in the final hop payload of a blinded payment. This
|
||||
value is analogous to the MPPRecord that is used for regular (non-blinded)
|
||||
MPP payments.
|
||||
*/
|
||||
uint64 total_amt_msat = 16;
|
||||
}
|
||||
|
||||
message MPPRecord {
|
||||
|
|
@ -2959,7 +3225,8 @@ message MPPRecord {
|
|||
A unique, random identifier used to authenticate the sender as the intended
|
||||
payer of a multi-path payment. The payment_addr must be the same for all
|
||||
subpayments, and match the payment_addr provided in the receiver's invoice.
|
||||
The same payment_addr must be used on all subpayments.
|
||||
The same payment_addr must be used on all subpayments. This is also called
|
||||
payment secret in specifications (e.g. BOLT 11).
|
||||
*/
|
||||
bytes payment_addr = 11;
|
||||
|
||||
|
|
@ -3089,6 +3356,9 @@ message RoutingPolicy {
|
|||
|
||||
// Custom channel update tlv records.
|
||||
map<uint64, bytes> custom_records = 8;
|
||||
|
||||
int32 inbound_fee_base_msat = 9;
|
||||
int32 inbound_fee_rate_milli_msat = 10;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -3175,6 +3445,10 @@ message ChanInfoRequest {
|
|||
output index for the channel.
|
||||
*/
|
||||
uint64 chan_id = 1 [jstype = JS_STRING];
|
||||
|
||||
// The channel point of the channel in format funding_txid:output_index. If
|
||||
// chan_id is specified, this field is ignored.
|
||||
string chan_point = 2;
|
||||
}
|
||||
|
||||
message NetworkInfoRequest {
|
||||
|
|
@ -3297,6 +3571,64 @@ message RouteHint {
|
|||
repeated HopHint hop_hints = 1;
|
||||
}
|
||||
|
||||
message BlindedPaymentPath {
|
||||
// The blinded path to send the payment to.
|
||||
BlindedPath blinded_path = 1;
|
||||
|
||||
// The base fee for the blinded path provided, expressed in msat.
|
||||
uint64 base_fee_msat = 2;
|
||||
|
||||
/*
|
||||
The proportional fee for the blinded path provided, expressed in parts
|
||||
per million.
|
||||
*/
|
||||
uint32 proportional_fee_rate = 3;
|
||||
|
||||
/*
|
||||
The total CLTV delta for the blinded path provided, including the
|
||||
final CLTV delta for the receiving node.
|
||||
*/
|
||||
uint32 total_cltv_delta = 4;
|
||||
|
||||
/*
|
||||
The minimum hltc size that may be sent over the blinded path, expressed
|
||||
in msat.
|
||||
*/
|
||||
uint64 htlc_min_msat = 5;
|
||||
|
||||
/*
|
||||
The maximum htlc size that may be sent over the blinded path, expressed
|
||||
in msat.
|
||||
*/
|
||||
uint64 htlc_max_msat = 6;
|
||||
|
||||
// The feature bits for the route.
|
||||
repeated FeatureBit features = 7;
|
||||
}
|
||||
|
||||
message BlindedPath {
|
||||
// The unblinded pubkey of the introduction node for the route.
|
||||
bytes introduction_node = 1;
|
||||
|
||||
// The ephemeral pubkey used by nodes in the blinded route.
|
||||
bytes blinding_point = 2;
|
||||
|
||||
/*
|
||||
A set of blinded node keys and data blobs for the blinded portion of the
|
||||
route. Note that the first hop is expected to be the introduction node,
|
||||
so the route is always expected to have at least one hop.
|
||||
*/
|
||||
repeated BlindedHop blinded_hops = 3;
|
||||
}
|
||||
|
||||
message BlindedHop {
|
||||
// The blinded public key of the node.
|
||||
bytes blinded_node = 1;
|
||||
|
||||
// An encrypted blob of data provided to the blinded node.
|
||||
bytes encrypted_data = 2;
|
||||
}
|
||||
|
||||
message AMPInvoiceState {
|
||||
// The state the HTLCs associated with this setID are in.
|
||||
InvoiceHTLCState state = 1;
|
||||
|
|
@ -3351,7 +3683,7 @@ message Invoice {
|
|||
int64 value_msat = 23;
|
||||
|
||||
/*
|
||||
Whether this invoice has been fulfilled
|
||||
Whether this invoice has been fulfilled.
|
||||
|
||||
The field is deprecated. Use the state field instead (compare to SETTLED).
|
||||
*/
|
||||
|
|
@ -3359,12 +3691,14 @@ message Invoice {
|
|||
|
||||
/*
|
||||
When this invoice was created.
|
||||
Measured in seconds since the unix epoch.
|
||||
Note: Output only, don't specify for creating an invoice.
|
||||
*/
|
||||
int64 creation_date = 7;
|
||||
|
||||
/*
|
||||
When this invoice was settled.
|
||||
Measured in seconds since the unix epoch.
|
||||
Note: Output only, don't specify for creating an invoice.
|
||||
*/
|
||||
int64 settle_date = 8;
|
||||
|
|
@ -3385,7 +3719,7 @@ message Invoice {
|
|||
*/
|
||||
bytes description_hash = 10;
|
||||
|
||||
// Payment request expiry time in seconds. Default is 3600 (1 hour).
|
||||
// Payment request expiry time in seconds. Default is 86400 (24 hours).
|
||||
int64 expiry = 11;
|
||||
|
||||
// Fallback on-chain address.
|
||||
|
|
@ -3401,6 +3735,8 @@ message Invoice {
|
|||
repeated RouteHint route_hints = 14;
|
||||
|
||||
// Whether this invoice should include routing hints for private channels.
|
||||
// Note: When enabled, if value and value_msat are zero, a large number of
|
||||
// hints with these channels can be included, which might not be desirable.
|
||||
bool private = 15;
|
||||
|
||||
/*
|
||||
|
|
@ -3426,22 +3762,22 @@ message Invoice {
|
|||
|
||||
/*
|
||||
The amount that was accepted for this invoice, in satoshis. This will ONLY
|
||||
be set if this invoice has been settled. We provide this field as if the
|
||||
invoice was created with a zero value, then we need to record what amount
|
||||
was ultimately accepted. Additionally, it's possible that the sender paid
|
||||
MORE that was specified in the original invoice. So we'll record that here
|
||||
as well.
|
||||
be set if this invoice has been settled or accepted. We provide this field
|
||||
as if the invoice was created with a zero value, then we need to record what
|
||||
amount was ultimately accepted. Additionally, it's possible that the sender
|
||||
paid MORE that was specified in the original invoice. So we'll record that
|
||||
here as well.
|
||||
Note: Output only, don't specify for creating an invoice.
|
||||
*/
|
||||
int64 amt_paid_sat = 19;
|
||||
|
||||
/*
|
||||
The amount that was accepted for this invoice, in millisatoshis. This will
|
||||
ONLY be set if this invoice has been settled. We provide this field as if
|
||||
the invoice was created with a zero value, then we need to record what
|
||||
amount was ultimately accepted. Additionally, it's possible that the sender
|
||||
paid MORE that was specified in the original invoice. So we'll record that
|
||||
here as well.
|
||||
ONLY be set if this invoice has been settled or accepted. We provide this
|
||||
field as if the invoice was created with a zero value, then we need to
|
||||
record what amount was ultimately accepted. Additionally, it's possible that
|
||||
the sender paid MORE that was specified in the original invoice. So we'll
|
||||
record that here as well.
|
||||
Note: Output only, don't specify for creating an invoice.
|
||||
*/
|
||||
int64 amt_paid_msat = 20;
|
||||
|
|
@ -3479,9 +3815,10 @@ message Invoice {
|
|||
bool is_keysend = 25;
|
||||
|
||||
/*
|
||||
The payment address of this invoice. This value will be used in MPP
|
||||
payments, and also for newer invoices that always require the MPP payload
|
||||
for added end-to-end security.
|
||||
The payment address of this invoice. This is also called payment secret in
|
||||
specifications (e.g. BOLT 11). This value will be used in MPP payments, and
|
||||
also for newer invoices that always require the MPP payload for added
|
||||
end-to-end security.
|
||||
Note: Output only, don't specify for creating an invoice.
|
||||
*/
|
||||
bytes payment_addr = 26;
|
||||
|
|
@ -3501,6 +3838,48 @@ message Invoice {
|
|||
Note: Output only, don't specify for creating an invoice.
|
||||
*/
|
||||
map<string, AMPInvoiceState> amp_invoice_state = 28;
|
||||
|
||||
/*
|
||||
Signals that the invoice should include blinded paths to hide the true
|
||||
identity of the recipient.
|
||||
*/
|
||||
bool is_blinded = 29;
|
||||
|
||||
/*
|
||||
Config values to use when creating blinded paths for this invoice. These
|
||||
can be used to override the defaults config values provided in by the
|
||||
global config. This field is only used if is_blinded is true.
|
||||
*/
|
||||
BlindedPathConfig blinded_path_config = 30;
|
||||
}
|
||||
|
||||
message BlindedPathConfig {
|
||||
/*
|
||||
The minimum number of real hops to include in a blinded path. This doesn't
|
||||
include our node, so if the minimum is 1, then the path will contain at
|
||||
minimum our node along with an introduction node hop. If it is zero then
|
||||
the shortest path will use our node as an introduction node.
|
||||
*/
|
||||
optional uint32 min_num_real_hops = 1;
|
||||
|
||||
/*
|
||||
The number of hops to include in a blinded path. This doesn't include our
|
||||
node, so if it is 1, then the path will contain our node along with an
|
||||
introduction node or dummy node hop. If paths shorter than NumHops is
|
||||
found, then they will be padded using dummy hops.
|
||||
*/
|
||||
optional uint32 num_hops = 2;
|
||||
|
||||
/*
|
||||
The maximum number of blinded paths to select and add to an invoice.
|
||||
*/
|
||||
optional uint32 max_num_paths = 3;
|
||||
|
||||
/*
|
||||
A list of node IDs of nodes that should not be used in any of our generated
|
||||
blinded paths.
|
||||
*/
|
||||
repeated bytes node_omission_list = 4;
|
||||
}
|
||||
|
||||
enum InvoiceHTLCState {
|
||||
|
|
@ -3586,9 +3965,9 @@ message AddInvoiceResponse {
|
|||
uint64 add_index = 16;
|
||||
|
||||
/*
|
||||
The payment address of the generated invoice. This value should be used
|
||||
in all payments for this invoice as we require it for end to end
|
||||
security.
|
||||
The payment address of the generated invoice. This is also called
|
||||
payment secret in specifications (e.g. BOLT 11). This value should be used
|
||||
in all payments for this invoice as we require it for end to end security.
|
||||
*/
|
||||
bytes payment_addr = 17;
|
||||
}
|
||||
|
|
@ -3629,7 +4008,16 @@ message ListInvoiceRequest {
|
|||
specified index offset. This can be used to paginate backwards.
|
||||
*/
|
||||
bool reversed = 6;
|
||||
|
||||
// If set, returns all invoices with a creation date greater than or equal
|
||||
// to it. Measured in seconds since the unix epoch.
|
||||
uint64 creation_date_start = 7;
|
||||
|
||||
// If set, returns all invoices with a creation date less than or equal to
|
||||
// it. Measured in seconds since the unix epoch.
|
||||
uint64 creation_date_end = 8;
|
||||
}
|
||||
|
||||
message ListInvoiceResponse {
|
||||
/*
|
||||
A list of invoices from the time slice of the time series specified in the
|
||||
|
|
@ -3700,6 +4088,11 @@ enum PaymentFailureReason {
|
|||
Insufficient local balance.
|
||||
*/
|
||||
FAILURE_REASON_INSUFFICIENT_BALANCE = 5;
|
||||
|
||||
/*
|
||||
The payment was canceled.
|
||||
*/
|
||||
FAILURE_REASON_CANCELED = 6;
|
||||
}
|
||||
|
||||
message Payment {
|
||||
|
|
@ -3730,10 +4123,20 @@ message Payment {
|
|||
string payment_request = 9;
|
||||
|
||||
enum PaymentStatus {
|
||||
UNKNOWN = 0;
|
||||
// Deprecated. This status will never be returned.
|
||||
UNKNOWN = 0 [deprecated = true];
|
||||
|
||||
// Payment has inflight HTLCs.
|
||||
IN_FLIGHT = 1;
|
||||
|
||||
// Payment is settled.
|
||||
SUCCEEDED = 2;
|
||||
|
||||
// Payment is failed.
|
||||
FAILED = 3;
|
||||
|
||||
// Payment is created and has not attempted any HTLCs.
|
||||
INITIATED = 4;
|
||||
}
|
||||
|
||||
// The status of the payment.
|
||||
|
|
@ -3828,6 +4231,14 @@ message ListPaymentsRequest {
|
|||
of payments, as all of them have to be iterated through to be counted.
|
||||
*/
|
||||
bool count_total_payments = 5;
|
||||
|
||||
// If set, returns all payments with a creation date greater than or equal
|
||||
// to it. Measured in seconds since the unix epoch.
|
||||
uint64 creation_date_start = 6;
|
||||
|
||||
// If set, returns all payments with a creation date less than or equal to
|
||||
// it. Measured in seconds since the unix epoch.
|
||||
uint64 creation_date_end = 7;
|
||||
}
|
||||
|
||||
message ListPaymentsResponse {
|
||||
|
|
@ -3873,6 +4284,10 @@ message DeleteAllPaymentsRequest {
|
|||
Only delete failed HTLCs from payments, not the payment itself.
|
||||
*/
|
||||
bool failed_htlcs_only = 2;
|
||||
|
||||
// Delete all payments. NOTE: Using this option requires careful
|
||||
// consideration as it is a destructive operation.
|
||||
bool all_payments = 3;
|
||||
}
|
||||
|
||||
message DeletePaymentResponse {
|
||||
|
|
@ -3923,6 +4338,7 @@ message PayReq {
|
|||
bytes payment_addr = 11;
|
||||
int64 num_msat = 12;
|
||||
map<uint32, Feature> features = 13;
|
||||
repeated BlindedPaymentPath blinded_paths = 14;
|
||||
}
|
||||
|
||||
enum FeatureBit {
|
||||
|
|
@ -3949,6 +4365,8 @@ enum FeatureBit {
|
|||
ANCHORS_OPT = 21;
|
||||
ANCHORS_ZERO_FEE_HTLC_REQ = 22;
|
||||
ANCHORS_ZERO_FEE_HTLC_OPT = 23;
|
||||
ROUTE_BLINDING_REQUIRED = 24;
|
||||
ROUTE_BLINDING_OPTIONAL = 25;
|
||||
AMP_REQ = 30;
|
||||
AMP_OPT = 31;
|
||||
}
|
||||
|
|
@ -3978,7 +4396,15 @@ message ChannelFeeReport {
|
|||
// The effective fee rate in milli-satoshis. Computed by dividing the
|
||||
// fee_per_mil value by 1 million.
|
||||
double fee_rate = 4;
|
||||
|
||||
// The base fee charged regardless of the number of milli-satoshis sent.
|
||||
int32 inbound_base_fee_msat = 6;
|
||||
|
||||
// The amount charged per milli-satoshis transferred expressed in
|
||||
// millionths of a satoshi.
|
||||
int32 inbound_fee_per_mil = 7;
|
||||
}
|
||||
|
||||
message FeeReportResponse {
|
||||
// An array of channel fee reports which describes the current fee schedule
|
||||
// for each channel.
|
||||
|
|
@ -3997,6 +4423,16 @@ message FeeReportResponse {
|
|||
uint64 month_fee_sum = 4;
|
||||
}
|
||||
|
||||
message InboundFee {
|
||||
// The inbound base fee charged regardless of the number of milli-satoshis
|
||||
// received in the channel. By default, only negative values are accepted.
|
||||
int32 base_fee_msat = 1;
|
||||
|
||||
// The effective inbound fee rate in micro-satoshis (parts per million).
|
||||
// By default, only negative values are accepted.
|
||||
int32 fee_rate_ppm = 2;
|
||||
}
|
||||
|
||||
message PolicyUpdateRequest {
|
||||
oneof scope {
|
||||
// If set, then this update applies to all currently active channels.
|
||||
|
|
@ -4029,7 +4465,12 @@ message PolicyUpdateRequest {
|
|||
|
||||
// If true, min_htlc_msat is applied.
|
||||
bool min_htlc_msat_specified = 8;
|
||||
|
||||
// Optional inbound fee. If unset, the previously set value will be
|
||||
// retained [EXPERIMENTAL].
|
||||
InboundFee inbound_fee = 10;
|
||||
}
|
||||
|
||||
enum UpdateFailure {
|
||||
UPDATE_FAILURE_UNKNOWN = 0;
|
||||
UPDATE_FAILURE_PENDING = 1;
|
||||
|
|
@ -4305,6 +4746,7 @@ message Failure {
|
|||
EXPIRY_TOO_FAR = 22;
|
||||
MPP_TIMEOUT = 23;
|
||||
INVALID_ONION_PAYLOAD = 24;
|
||||
INVALID_ONION_BLINDING = 25;
|
||||
|
||||
/*
|
||||
An internal error occurred.
|
||||
|
|
|
|||
|
|
@ -137,6 +137,13 @@ service LightningPub {
|
|||
option (nostr) = true;
|
||||
}
|
||||
|
||||
rpc ListChannels(structs.Empty) returns (structs.LndChannels) {
|
||||
option (auth_type) = "Admin";
|
||||
option (http_method) = "get";
|
||||
option (http_route) = "/api/admin/channels";
|
||||
option (nostr) = true;
|
||||
}
|
||||
|
||||
rpc GetUsageMetrics(structs.Empty) returns (structs.UsageMetrics) {
|
||||
option (auth_type) = "Metrics";
|
||||
option (http_method) = "post";
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ message OpenChannel {
|
|||
int64 lifetime =4 ;
|
||||
int64 local_balance=5;
|
||||
int64 remote_balance = 6;
|
||||
string label = 7;
|
||||
}
|
||||
message ClosedChannel {
|
||||
string channel_id = 1;
|
||||
|
|
@ -145,6 +146,10 @@ message LndMetrics {
|
|||
|
||||
}
|
||||
|
||||
message LndChannels {
|
||||
repeated OpenChannel open_channels = 1;
|
||||
}
|
||||
|
||||
message LndGetInfoRequest {
|
||||
int64 nodeId = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue