mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-27 14:40:16 +01:00
can send messages from shell over grpc. doesn't do anything yet.
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
e5e2a9a162
commit
8bd8293c8c
27
rpcserver.go
27
rpcserver.go
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"log"
|
||||
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/btcsuite/btcwallet/waddrmgr"
|
||||
@@ -55,3 +56,29 @@ func (r *rpcServer) NewAddress(ctx context.Context, in *lnrpc.NewAddressRequest)
|
||||
|
||||
return &lnrpc.NewAddressResponse{Address: addr.String()}, nil
|
||||
}
|
||||
|
||||
// LNConnect
|
||||
func (r *rpcServer) LNConnect(ctx context.Context,
|
||||
in *lnrpc.LNConnectRequest) (*lnrpc.LnConnectResponse, error) {
|
||||
|
||||
resp := new(lnrpc.LnConnectResponse)
|
||||
resp.LnID = []byte("ya")
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// TCPListen
|
||||
func (r *rpcServer) TCPListen(ctx context.Context,
|
||||
in *lnrpc.TCPListenRequest) (*lnrpc.TCPListenResponse, error) {
|
||||
|
||||
resp := new(lnrpc.TCPListenResponse)
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// LNChat
|
||||
func (r *rpcServer) LNChat(ctx context.Context,
|
||||
in *lnrpc.LnChatRequest) (*lnrpc.LnChatResponse, error) {
|
||||
log.Printf("requested to chat, message: %s\n", in.Msg)
|
||||
resp := new(lnrpc.LnChatResponse)
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user