Created
February 15, 2018 08:53
-
-
Save anonymous/29378c4be6f383dd45ea342c49a186fe to your computer and use it in GitHub Desktop.
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
require "grpc" | |
require "json" | |
require "helloworld_services_pb" | |
class LightningRPCServer < Lnservice::Lnd::Service | |
# get_wallet_balance implements the SayHello rpc method. | |
def get_wallet_balance(wallet_req, _unused_call) | |
walletbalance = JSON.parse(`/home/user/.go/bin/lncli walletbalance`) | |
puts walletbalance | |
Lnservice::WalletBalanceReply.new(wallet_balance: walletbalance) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment