scripted-diff: replace ⛰ emoji with $ [skip ci]
-BEGIN VERIFY SCRIPT- sed -i 's/⛰/$/g' $(git grep -l '⛰') -END VERIFY SCRIPT-
This commit is contained in:
36 files changed
+239
-239
No files matched your search
+7
-7
@@ -22,16 +22,16 @@ Create a new `.net core` console application called `lndclient` at your root dir
|
||||
Create a folder `Grpc` in the root of your project and fetch the lnd proto files
|
||||
|
||||
```shell
|
||||
⛰ mkdir Grpc
|
||||
⛰ curl -o Grpc/lightning.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/lightning.proto
|
||||
$ mkdir Grpc
|
||||
$ curl -o Grpc/lightning.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/lightning.proto
|
||||
```
|
||||
|
||||
Install `Grpc.Tools`, `Google.Protobuf`, `Grpc.Net.Client` using NuGet or manually with `dotnet add`:
|
||||
|
||||
```shell
|
||||
⛰ dotnet add package Grpc.Tools
|
||||
⛰ dotnet add package Google.Protobuf
|
||||
⛰ dotnet add package Grpc.Net.Client
|
||||
$ dotnet add package Grpc.Tools
|
||||
$ dotnet add package Google.Protobuf
|
||||
$ dotnet add package Grpc.Net.Client
|
||||
```
|
||||
|
||||
Add the `lightning.proto` file to the `.csproj` file in an ItemGroup. (In Visual Studio you can do this by unloading the project, editing the `.csproj` file and then reloading it)
|
||||
@@ -122,12 +122,12 @@ using (var call = client.SubscribeInvoices(request))
|
||||
|
||||
Now, create an invoice for your node at `localhost:10009` and send a payment to it from another node.
|
||||
```shell
|
||||
⛰ lncli addinvoice --amt=100
|
||||
$ lncli addinvoice --amt=100
|
||||
{
|
||||
"r_hash": <R_HASH>,
|
||||
"pay_req": <PAY_REQ>
|
||||
}
|
||||
⛰ lncli sendpayment --pay_req=<PAY_REQ>
|
||||
$ lncli sendpayment --pay_req=<PAY_REQ>
|
||||
```
|
||||
|
||||
Your console should now display the details of the recently satisfied invoice.
|
||||
|
||||
+1
-1
@@ -177,7 +177,7 @@ public class Main {
|
||||
#### Running the example
|
||||
Execute the following command in the directory where the **pom.xml** file is located.
|
||||
```shell
|
||||
⛰ mvn compile exec:java -Dexec.mainClass="Main" -Dexec.cleanupDaemonThreads=false
|
||||
$ mvn compile exec:java -Dexec.mainClass="Main" -Dexec.cleanupDaemonThreads=false
|
||||
```
|
||||
##### Sample output
|
||||
```text
|
||||
|
||||
@@ -123,7 +123,7 @@ invoice.
|
||||
|
||||
This example has a few dependencies:
|
||||
```shell
|
||||
⛰ npm install --save async lodash bytebuffer
|
||||
$ npm install --save async lodash bytebuffer
|
||||
```
|
||||
|
||||
You can run the following in your shell or put it in a program and run it like
|
||||
|
||||
+10
-10
@@ -11,31 +11,31 @@ file in Python before you can use it to communicate with lnd.
|
||||
|
||||
1. Create a virtual environment for your project
|
||||
```shell
|
||||
⛰ virtualenv lnd
|
||||
$ virtualenv lnd
|
||||
```
|
||||
2. Activate the virtual environment
|
||||
```shell
|
||||
⛰ source lnd/bin/activate
|
||||
$ source lnd/bin/activate
|
||||
```
|
||||
3. Install dependencies (googleapis-common-protos is required due to the use of
|
||||
google/api/annotations.proto)
|
||||
```shell
|
||||
lnd ⛰ pip install grpcio grpcio-tools googleapis-common-protos
|
||||
lnd $ pip install grpcio grpcio-tools googleapis-common-protos
|
||||
```
|
||||
4. Clone the google api's repository (required due to the use of
|
||||
google/api/annotations.proto)
|
||||
```shell
|
||||
lnd ⛰ git clone https://github.com/googleapis/googleapis.git
|
||||
lnd $ git clone https://github.com/googleapis/googleapis.git
|
||||
```
|
||||
5. Copy the lnd lightning.proto file (you'll find this at
|
||||
[lnrpc/lightning.proto](https://github.com/lightningnetwork/lnd/blob/master/lnrpc/lightning.proto))
|
||||
or just download it
|
||||
```shell
|
||||
lnd ⛰ curl -o lightning.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/lightning.proto
|
||||
lnd $ curl -o lightning.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/lightning.proto
|
||||
```
|
||||
6. Compile the proto file
|
||||
```shell
|
||||
lnd ⛰ python -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. lightning.proto
|
||||
lnd $ python -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. lightning.proto
|
||||
```
|
||||
|
||||
After following these steps, two files `lightning_pb2.py` and
|
||||
@@ -53,8 +53,8 @@ extra steps (after completing all 6 step described above) to get the
|
||||
`router_pb2.py` and `router_pb2_grpc.py`:
|
||||
|
||||
```shell
|
||||
lnd ⛰ curl -o router.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/routerrpc/router.proto
|
||||
lnd ⛰ python -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. router.proto
|
||||
lnd $ curl -o router.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/routerrpc/router.proto
|
||||
lnd $ python -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. router.proto
|
||||
```
|
||||
|
||||
### Imports and Client
|
||||
@@ -108,12 +108,12 @@ for invoice in stub.SubscribeInvoices(request):
|
||||
Now, create an invoice for your node at `localhost:10009`and send a payment to
|
||||
it from another node.
|
||||
```shell
|
||||
lnd ⛰ lncli addinvoice --amt=100
|
||||
lnd $ lncli addinvoice --amt=100
|
||||
{
|
||||
"r_hash": <R_HASH>,
|
||||
"pay_req": <PAY_REQ>
|
||||
}
|
||||
lnd ⛰ lncli sendpayment --pay_req=<PAY_REQ>
|
||||
lnd $ lncli sendpayment --pay_req=<PAY_REQ>
|
||||
```
|
||||
|
||||
Your Python console should now display the details of the recently satisfied
|
||||
|
||||
+7
-7
@@ -15,26 +15,26 @@ the `lnd` proto file in Ruby before you can use it to communicate with `lnd`.
|
||||
Install gRPC rubygems:
|
||||
|
||||
```shell
|
||||
⛰ gem install grpc
|
||||
⛰ gem install grpc-tools
|
||||
$ gem install grpc
|
||||
$ gem install grpc-tools
|
||||
```
|
||||
|
||||
Clone the Google APIs repository:
|
||||
|
||||
```shell
|
||||
⛰ git clone https://github.com/googleapis/googleapis.git
|
||||
$ git clone https://github.com/googleapis/googleapis.git
|
||||
```
|
||||
|
||||
Fetch the `lightning.proto` file (or copy it from your local source directory):
|
||||
|
||||
```shell
|
||||
⛰ curl -o lightning.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/lightning.proto
|
||||
$ curl -o lightning.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/lightning.proto
|
||||
```
|
||||
|
||||
Compile the proto file:
|
||||
|
||||
```shell
|
||||
⛰ grpc_tools_ruby_protoc --proto_path googleapis:. --ruby_out=. --grpc_out=. lightning.proto
|
||||
$ grpc_tools_ruby_protoc --proto_path googleapis:. --ruby_out=. --grpc_out=. lightning.proto
|
||||
```
|
||||
|
||||
Two files will be generated in the current directory:
|
||||
@@ -101,7 +101,7 @@ end
|
||||
Now, create an invoice on your node:
|
||||
|
||||
```shell
|
||||
⛰ lncli addinvoice --amt=590
|
||||
$ lncli addinvoice --amt=590
|
||||
{
|
||||
"r_hash": <R_HASH>,
|
||||
"pay_req": <PAY_REQ>
|
||||
@@ -111,7 +111,7 @@ Now, create an invoice on your node:
|
||||
Next send a payment to it from another node:
|
||||
|
||||
```shell
|
||||
⛰ lncli sendpayment --pay_req=<PAY_REQ>
|
||||
$ lncli sendpayment --pay_req=<PAY_REQ>
|
||||
```
|
||||
|
||||
You should now see the details of the settled invoice appear.
|
||||
|
||||
Reference in new issue
Block a user