-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
invoicesrpc: add SubscribeSingleInvoice rpc
- Loading branch information
1 parent
4c4536a
commit 70c874b
Showing
7 changed files
with
243 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package lnrpc | ||
|
||
import ( | ||
"os" | ||
) | ||
|
||
// FileExists reports whether the named file or directory exists. | ||
func FileExists(name string) bool { | ||
if _, err := os.Stat(name); err != nil { | ||
if os.IsNotExist(err) { | ||
return false | ||
} | ||
} | ||
return true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
syntax = "proto3"; | ||
|
||
import "google/api/annotations.proto"; | ||
import "rpc.proto"; | ||
|
||
package invoicesrpc; | ||
|
||
option go_package = "github.com/lightningnetwork/lnd/lnrpc/invoicesrpc"; | ||
|
||
// Invoices is a service that can be used to create, accept, settle and cancel | ||
// invoices. | ||
service Invoices { | ||
/** | ||
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. | ||
*/ | ||
rpc SubscribeSingleInvoice (lnrpc.PaymentHash) returns (stream lnrpc.Invoice); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.