From 68d49eee882923866a6ffd9e08349412f842deaf Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 6 Mar 2019 15:53:17 -0800 Subject: [PATCH] multi: update import paths to point to new looprpc pacakge --- client/swap_server_client.go | 10 +- cmd/swapcli/main.go | 20 ++-- cmd/swapd/daemon.go | 4 +- cmd/swapd/swapclient_server.go | 38 ++++---- looprpc/client.pb.go | 164 ++++++++++++++++----------------- looprpc/client.proto | 2 +- looprpc/server.pb.go | 96 +++++++++---------- looprpc/server.proto | 4 +- utils/config.go | 8 +- 9 files changed, 173 insertions(+), 173 deletions(-) diff --git a/client/swap_server_client.go b/client/swap_server_client.go index 70bed1e..0e695f0 100644 --- a/client/swap_server_client.go +++ b/client/swap_server_client.go @@ -7,11 +7,11 @@ import ( "errors" "fmt" + "github.com/lightninglabs/loop/looprpc" "github.com/lightningnetwork/lnd/lntypes" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcutil" - "github.com/lightninglabs/loop/rpc" "google.golang.org/grpc" "google.golang.org/grpc/credentials" ) @@ -27,7 +27,7 @@ type swapServerClient interface { } type grpcSwapServerClient struct { - server rpc.SwapServerClient + server looprpc.SwapServerClient conn *grpc.ClientConn } @@ -37,7 +37,7 @@ func newSwapServerClient(address string, insecure bool) (*grpcSwapServerClient, return nil, err } - server := rpc.NewSwapServerClient(serverConn) + server := looprpc.NewSwapServerClient(serverConn) return &grpcSwapServerClient{ conn: serverConn, @@ -51,7 +51,7 @@ func (s *grpcSwapServerClient) GetUnchargeTerms(ctx context.Context) ( rpcCtx, rpcCancel := context.WithTimeout(ctx, serverRPCTimeout) defer rpcCancel() quoteResp, err := s.server.UnchargeQuote(rpcCtx, - &rpc.ServerUnchargeQuoteRequest{}, + &looprpc.ServerUnchargeQuoteRequest{}, ) if err != nil { return nil, err @@ -85,7 +85,7 @@ func (s *grpcSwapServerClient) NewUnchargeSwap(ctx context.Context, rpcCtx, rpcCancel := context.WithTimeout(ctx, serverRPCTimeout) defer rpcCancel() swapResp, err := s.server.NewUnchargeSwap(rpcCtx, - &rpc.ServerUnchargeSwapRequest{ + &looprpc.ServerUnchargeSwapRequest{ SwapHash: swapHash[:], Amt: uint64(amount), ReceiverKey: receiverKey[:], diff --git a/cmd/swapcli/main.go b/cmd/swapcli/main.go index ccac54a..2f88a4c 100644 --- a/cmd/swapcli/main.go +++ b/cmd/swapcli/main.go @@ -8,11 +8,11 @@ import ( "strconv" "time" + "github.com/lightninglabs/loop/looprpc" "github.com/lightninglabs/loop/utils" "github.com/btcsuite/btcutil" - "github.com/lightninglabs/loop/cmd/swapd/rpc" "github.com/urfave/cli" "google.golang.org/grpc" ) @@ -73,7 +73,7 @@ func terms(ctx *cli.Context) error { defer cleanup() terms, err := client.GetUnchargeTerms( - context.Background(), &rpc.TermsRequest{}, + context.Background(), &looprpc.TermsRequest{}, ) if err != nil { return err @@ -87,7 +87,7 @@ func terms(ctx *cli.Context) error { return err } - printTerms := func(terms *rpc.TermsResponse) { + printTerms := func(terms *looprpc.TermsResponse) { fmt.Printf("Amount: %d - %d\n", btcutil.Amount(terms.MinSwapAmount), btcutil.Amount(terms.MaxSwapAmount), @@ -116,7 +116,7 @@ func monitor(ctx *cli.Context) error { defer cleanup() stream, err := client.Monitor( - context.Background(), &rpc.MonitorRequest{}) + context.Background(), &looprpc.MonitorRequest{}) if err != nil { return err } @@ -130,14 +130,14 @@ func monitor(ctx *cli.Context) error { } } -func getClient(ctx *cli.Context) (rpc.SwapClientClient, func(), error) { +func getClient(ctx *cli.Context) (looprpc.SwapClientClient, func(), error) { conn, err := getSwapCliConn(swapdAddress) if err != nil { return nil, nil, err } cleanup := func() { conn.Close() } - swapCliClient := rpc.NewSwapClientClient(conn) + swapCliClient := looprpc.NewSwapClientClient(conn) return swapCliClient, cleanup, nil } @@ -153,7 +153,7 @@ type limits struct { maxPrepayAmt btcutil.Amount } -func getLimits(amt btcutil.Amount, quote *rpc.QuoteResponse) *limits { +func getLimits(amt btcutil.Amount, quote *looprpc.QuoteResponse) *limits { return &limits{ maxSwapRoutingFee: getMaxRoutingFee(btcutil.Amount(amt)), maxPrepayRoutingFee: getMaxRoutingFee(btcutil.Amount( @@ -239,7 +239,7 @@ func uncharge(ctx *cli.Context) error { quote, err := client.GetUnchargeQuote( context.Background(), - &rpc.QuoteRequest{ + &looprpc.QuoteRequest{ Amt: int64(amt), }, ) @@ -258,7 +258,7 @@ func uncharge(ctx *cli.Context) error { unchargeChannel = ctx.Uint64("channel") } - resp, err := client.Uncharge(context.Background(), &rpc.UnchargeRequest{ + resp, err := client.Uncharge(context.Background(), &looprpc.UnchargeRequest{ Amt: int64(amt), Dest: destAddr, MaxMinerFee: int64(limits.maxMinerFee), @@ -278,7 +278,7 @@ func uncharge(ctx *cli.Context) error { return nil } -func logSwap(swap *rpc.SwapStatus) { +func logSwap(swap *looprpc.SwapStatus) { fmt.Printf("%v %v %v %v - %v\n", time.Unix(0, swap.LastUpdateTime).Format(time.RFC3339), swap.Type, swap.State, btcutil.Amount(swap.Amt), diff --git a/cmd/swapd/daemon.go b/cmd/swapd/daemon.go index a336b0f..3da6658 100644 --- a/cmd/swapd/daemon.go +++ b/cmd/swapd/daemon.go @@ -11,7 +11,7 @@ import ( "time" "github.com/lightninglabs/loop/client" - clientrpc "github.com/lightninglabs/loop/cmd/swapd/rpc" + "github.com/lightninglabs/loop/looprpc" "github.com/urfave/cli" "google.golang.org/grpc" ) @@ -56,7 +56,7 @@ func daemon(ctx *cli.Context) error { serverOpts := []grpc.ServerOption{} grpcServer := grpc.NewServer(serverOpts...) - clientrpc.RegisterSwapClientServer(grpcServer, &server) + looprpc.RegisterSwapClientServer(grpcServer, &server) // Next, Start the gRPC server listening for HTTP/2 connections. logger.Infof("Starting RPC listener") diff --git a/cmd/swapd/swapclient_server.go b/cmd/swapd/swapclient_server.go index 9feede7..406404f 100644 --- a/cmd/swapd/swapclient_server.go +++ b/cmd/swapd/swapclient_server.go @@ -12,7 +12,7 @@ import ( "github.com/btcsuite/btcutil" "github.com/lightninglabs/loop/client" - clientrpc "github.com/lightninglabs/loop/cmd/swapd/rpc" + "github.com/lightninglabs/loop/looprpc" ) const completedSwapsCount = 5 @@ -28,8 +28,8 @@ type swapClientServer struct { // onwards, progress can be tracked via the UnchargeStatus stream that is // returned from Monitor(). func (s *swapClientServer) Uncharge(ctx context.Context, - in *clientrpc.UnchargeRequest) ( - *clientrpc.SwapResponse, error) { + in *looprpc.UnchargeRequest) ( + *looprpc.SwapResponse, error) { logger.Infof("Uncharge request received") @@ -68,25 +68,25 @@ func (s *swapClientServer) Uncharge(ctx context.Context, return nil, err } - return &clientrpc.SwapResponse{ + return &looprpc.SwapResponse{ Id: hash.String(), }, nil } func (s *swapClientServer) marshallSwap(swap *client.SwapInfo) ( - *clientrpc.SwapStatus, error) { + *looprpc.SwapStatus, error) { - var state clientrpc.SwapState + var state looprpc.SwapState switch swap.State { case client.StateInitiated: - state = clientrpc.SwapState_INITIATED + state = looprpc.SwapState_INITIATED case client.StatePreimageRevealed: - state = clientrpc.SwapState_PREIMAGE_REVEALED + state = looprpc.SwapState_PREIMAGE_REVEALED case client.StateSuccess: - state = clientrpc.SwapState_SUCCESS + state = looprpc.SwapState_SUCCESS default: // Return less granular status over rpc. - state = clientrpc.SwapState_FAILED + state = looprpc.SwapState_FAILED } htlc, err := utils.NewHtlc(swap.CltvExpiry, swap.SenderKey, @@ -101,20 +101,20 @@ func (s *swapClientServer) marshallSwap(swap *client.SwapInfo) ( return nil, err } - return &clientrpc.SwapStatus{ + return &looprpc.SwapStatus{ Amt: int64(swap.AmountRequested), Id: swap.SwapHash.String(), State: state, InitiationTime: swap.InitiationTime.UnixNano(), LastUpdateTime: swap.LastUpdate.UnixNano(), HtlcAddress: address.EncodeAddress(), - Type: clientrpc.SwapType_UNCHARGE, + Type: looprpc.SwapType_UNCHARGE, }, nil } // Monitor will return a stream of swap updates for currently active swaps. -func (s *swapClientServer) Monitor(in *clientrpc.MonitorRequest, - server clientrpc.SwapClient_MonitorServer) error { +func (s *swapClientServer) Monitor(in *looprpc.MonitorRequest, + server looprpc.SwapClient_MonitorServer) error { logger.Infof("Monitor request received") @@ -207,8 +207,8 @@ func (s *swapClientServer) Monitor(in *clientrpc.MonitorRequest, } // GetTerms returns the terms that the server enforces for swaps. -func (s *swapClientServer) GetUnchargeTerms(ctx context.Context, req *clientrpc.TermsRequest) ( - *clientrpc.TermsResponse, error) { +func (s *swapClientServer) GetUnchargeTerms(ctx context.Context, req *looprpc.TermsRequest) ( + *looprpc.TermsResponse, error) { logger.Infof("Terms request received") @@ -218,7 +218,7 @@ func (s *swapClientServer) GetUnchargeTerms(ctx context.Context, req *clientrpc. return nil, err } - return &clientrpc.TermsResponse{ + return &looprpc.TermsResponse{ MinSwapAmount: int64(terms.MinSwapAmount), MaxSwapAmount: int64(terms.MaxSwapAmount), PrepayAmt: int64(terms.PrepayAmt), @@ -230,7 +230,7 @@ func (s *swapClientServer) GetUnchargeTerms(ctx context.Context, req *clientrpc. // GetQuote returns a quote for a swap with the provided parameters. func (s *swapClientServer) GetUnchargeQuote(ctx context.Context, - req *clientrpc.QuoteRequest) (*clientrpc.QuoteResponse, error) { + req *looprpc.QuoteRequest) (*looprpc.QuoteResponse, error) { quote, err := s.impl.UnchargeQuote(ctx, &client.UnchargeQuoteRequest{ Amount: btcutil.Amount(req.Amt), @@ -239,7 +239,7 @@ func (s *swapClientServer) GetUnchargeQuote(ctx context.Context, if err != nil { return nil, err } - return &clientrpc.QuoteResponse{ + return &looprpc.QuoteResponse{ MinerFee: int64(quote.MinerFee), PrepayAmt: int64(quote.PrepayAmount), SwapFee: int64(quote.SwapFee), diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index b3fb77b..c8b1347 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: client.proto -package rpc +package looprpc import proto "github.com/golang/protobuf/proto" import fmt "fmt" @@ -41,7 +41,7 @@ func (x SwapType) String() string { return proto.EnumName(SwapType_name, int32(x)) } func (SwapType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_client_72cc8471063847a6, []int{0} + return fileDescriptor_client_55d0482164e13e67, []int{0} } type SwapState int32 @@ -86,7 +86,7 @@ func (x SwapState) String() string { return proto.EnumName(SwapState_name, int32(x)) } func (SwapState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_client_72cc8471063847a6, []int{1} + return fileDescriptor_client_55d0482164e13e67, []int{1} } type UnchargeRequest struct { @@ -145,7 +145,7 @@ func (m *UnchargeRequest) Reset() { *m = UnchargeRequest{} } func (m *UnchargeRequest) String() string { return proto.CompactTextString(m) } func (*UnchargeRequest) ProtoMessage() {} func (*UnchargeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_client_72cc8471063847a6, []int{0} + return fileDescriptor_client_55d0482164e13e67, []int{0} } func (m *UnchargeRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UnchargeRequest.Unmarshal(m, b) @@ -235,7 +235,7 @@ func (m *SwapResponse) Reset() { *m = SwapResponse{} } func (m *SwapResponse) String() string { return proto.CompactTextString(m) } func (*SwapResponse) ProtoMessage() {} func (*SwapResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_client_72cc8471063847a6, []int{1} + return fileDescriptor_client_55d0482164e13e67, []int{1} } func (m *SwapResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SwapResponse.Unmarshal(m, b) @@ -272,7 +272,7 @@ func (m *MonitorRequest) Reset() { *m = MonitorRequest{} } func (m *MonitorRequest) String() string { return proto.CompactTextString(m) } func (*MonitorRequest) ProtoMessage() {} func (*MonitorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_client_72cc8471063847a6, []int{2} + return fileDescriptor_client_55d0482164e13e67, []int{2} } func (m *MonitorRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MonitorRequest.Unmarshal(m, b) @@ -303,10 +303,10 @@ type SwapStatus struct { Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // * // Swap type - Type SwapType `protobuf:"varint,3,opt,name=type,proto3,enum=rpc.SwapType" json:"type,omitempty"` + Type SwapType `protobuf:"varint,3,opt,name=type,proto3,enum=looprpc.SwapType" json:"type,omitempty"` // * // State the swap is currently in, see State enum. - State SwapState `protobuf:"varint,4,opt,name=state,proto3,enum=rpc.SwapState" json:"state,omitempty"` + State SwapState `protobuf:"varint,4,opt,name=state,proto3,enum=looprpc.SwapState" json:"state,omitempty"` // * // Initiation time of the swap. InitiationTime int64 `protobuf:"varint,5,opt,name=initiation_time,json=initiationTime,proto3" json:"initiation_time,omitempty"` @@ -325,7 +325,7 @@ func (m *SwapStatus) Reset() { *m = SwapStatus{} } func (m *SwapStatus) String() string { return proto.CompactTextString(m) } func (*SwapStatus) ProtoMessage() {} func (*SwapStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_client_72cc8471063847a6, []int{3} + return fileDescriptor_client_55d0482164e13e67, []int{3} } func (m *SwapStatus) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SwapStatus.Unmarshal(m, b) @@ -404,7 +404,7 @@ func (m *TermsRequest) Reset() { *m = TermsRequest{} } func (m *TermsRequest) String() string { return proto.CompactTextString(m) } func (*TermsRequest) ProtoMessage() {} func (*TermsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_client_72cc8471063847a6, []int{4} + return fileDescriptor_client_55d0482164e13e67, []int{4} } func (m *TermsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TermsRequest.Unmarshal(m, b) @@ -459,7 +459,7 @@ func (m *TermsResponse) Reset() { *m = TermsResponse{} } func (m *TermsResponse) String() string { return proto.CompactTextString(m) } func (*TermsResponse) ProtoMessage() {} func (*TermsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_client_72cc8471063847a6, []int{5} + return fileDescriptor_client_55d0482164e13e67, []int{5} } func (m *TermsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TermsResponse.Unmarshal(m, b) @@ -548,7 +548,7 @@ func (m *QuoteRequest) Reset() { *m = QuoteRequest{} } func (m *QuoteRequest) String() string { return proto.CompactTextString(m) } func (*QuoteRequest) ProtoMessage() {} func (*QuoteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_client_72cc8471063847a6, []int{6} + return fileDescriptor_client_55d0482164e13e67, []int{6} } func (m *QuoteRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuoteRequest.Unmarshal(m, b) @@ -596,7 +596,7 @@ func (m *QuoteResponse) Reset() { *m = QuoteResponse{} } func (m *QuoteResponse) String() string { return proto.CompactTextString(m) } func (*QuoteResponse) ProtoMessage() {} func (*QuoteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_client_72cc8471063847a6, []int{7} + return fileDescriptor_client_55d0482164e13e67, []int{7} } func (m *QuoteResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuoteResponse.Unmarshal(m, b) @@ -638,16 +638,16 @@ func (m *QuoteResponse) GetMinerFee() int64 { } func init() { - proto.RegisterType((*UnchargeRequest)(nil), "rpc.UnchargeRequest") - proto.RegisterType((*SwapResponse)(nil), "rpc.SwapResponse") - proto.RegisterType((*MonitorRequest)(nil), "rpc.MonitorRequest") - proto.RegisterType((*SwapStatus)(nil), "rpc.SwapStatus") - proto.RegisterType((*TermsRequest)(nil), "rpc.TermsRequest") - proto.RegisterType((*TermsResponse)(nil), "rpc.TermsResponse") - proto.RegisterType((*QuoteRequest)(nil), "rpc.QuoteRequest") - proto.RegisterType((*QuoteResponse)(nil), "rpc.QuoteResponse") - proto.RegisterEnum("rpc.SwapType", SwapType_name, SwapType_value) - proto.RegisterEnum("rpc.SwapState", SwapState_name, SwapState_value) + proto.RegisterType((*UnchargeRequest)(nil), "looprpc.UnchargeRequest") + proto.RegisterType((*SwapResponse)(nil), "looprpc.SwapResponse") + proto.RegisterType((*MonitorRequest)(nil), "looprpc.MonitorRequest") + proto.RegisterType((*SwapStatus)(nil), "looprpc.SwapStatus") + proto.RegisterType((*TermsRequest)(nil), "looprpc.TermsRequest") + proto.RegisterType((*TermsResponse)(nil), "looprpc.TermsResponse") + proto.RegisterType((*QuoteRequest)(nil), "looprpc.QuoteRequest") + proto.RegisterType((*QuoteResponse)(nil), "looprpc.QuoteResponse") + proto.RegisterEnum("looprpc.SwapType", SwapType_name, SwapType_value) + proto.RegisterEnum("looprpc.SwapState", SwapState_name, SwapState_value) } // Reference imports to suppress errors if they are not otherwise used. @@ -689,7 +689,7 @@ func NewSwapClientClient(cc *grpc.ClientConn) SwapClientClient { func (c *swapClientClient) Uncharge(ctx context.Context, in *UnchargeRequest, opts ...grpc.CallOption) (*SwapResponse, error) { out := new(SwapResponse) - err := c.cc.Invoke(ctx, "/rpc.SwapClient/Uncharge", in, out, opts...) + err := c.cc.Invoke(ctx, "/looprpc.SwapClient/Uncharge", in, out, opts...) if err != nil { return nil, err } @@ -697,7 +697,7 @@ func (c *swapClientClient) Uncharge(ctx context.Context, in *UnchargeRequest, op } func (c *swapClientClient) Monitor(ctx context.Context, in *MonitorRequest, opts ...grpc.CallOption) (SwapClient_MonitorClient, error) { - stream, err := c.cc.NewStream(ctx, &_SwapClient_serviceDesc.Streams[0], "/rpc.SwapClient/Monitor", opts...) + stream, err := c.cc.NewStream(ctx, &_SwapClient_serviceDesc.Streams[0], "/looprpc.SwapClient/Monitor", opts...) if err != nil { return nil, err } @@ -730,7 +730,7 @@ func (x *swapClientMonitorClient) Recv() (*SwapStatus, error) { func (c *swapClientClient) GetUnchargeTerms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*TermsResponse, error) { out := new(TermsResponse) - err := c.cc.Invoke(ctx, "/rpc.SwapClient/GetUnchargeTerms", in, out, opts...) + err := c.cc.Invoke(ctx, "/looprpc.SwapClient/GetUnchargeTerms", in, out, opts...) if err != nil { return nil, err } @@ -739,7 +739,7 @@ func (c *swapClientClient) GetUnchargeTerms(ctx context.Context, in *TermsReques func (c *swapClientClient) GetUnchargeQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*QuoteResponse, error) { out := new(QuoteResponse) - err := c.cc.Invoke(ctx, "/rpc.SwapClient/GetUnchargeQuote", in, out, opts...) + err := c.cc.Invoke(ctx, "/looprpc.SwapClient/GetUnchargeQuote", in, out, opts...) if err != nil { return nil, err } @@ -779,7 +779,7 @@ func _SwapClient_Uncharge_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rpc.SwapClient/Uncharge", + FullMethod: "/looprpc.SwapClient/Uncharge", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SwapClientServer).Uncharge(ctx, req.(*UnchargeRequest)) @@ -818,7 +818,7 @@ func _SwapClient_GetUnchargeTerms_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rpc.SwapClient/GetUnchargeTerms", + FullMethod: "/looprpc.SwapClient/GetUnchargeTerms", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SwapClientServer).GetUnchargeTerms(ctx, req.(*TermsRequest)) @@ -836,7 +836,7 @@ func _SwapClient_GetUnchargeQuote_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rpc.SwapClient/GetUnchargeQuote", + FullMethod: "/looprpc.SwapClient/GetUnchargeQuote", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SwapClientServer).GetUnchargeQuote(ctx, req.(*QuoteRequest)) @@ -845,7 +845,7 @@ func _SwapClient_GetUnchargeQuote_Handler(srv interface{}, ctx context.Context, } var _SwapClient_serviceDesc = grpc.ServiceDesc{ - ServiceName: "rpc.SwapClient", + ServiceName: "looprpc.SwapClient", HandlerType: (*SwapClientServer)(nil), Methods: []grpc.MethodDesc{ { @@ -871,55 +871,55 @@ var _SwapClient_serviceDesc = grpc.ServiceDesc{ Metadata: "client.proto", } -func init() { proto.RegisterFile("client.proto", fileDescriptor_client_72cc8471063847a6) } - -var fileDescriptor_client_72cc8471063847a6 = []byte{ - // 742 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0x4d, 0x4f, 0xdb, 0x4a, - 0x14, 0x25, 0xdf, 0xf1, 0x8d, 0xe3, 0x38, 0x03, 0xef, 0x29, 0xf0, 0xc4, 0x53, 0xb0, 0xd0, 0x7b, - 0x29, 0x0b, 0xda, 0xc2, 0xaa, 0x4b, 0x37, 0x31, 0x34, 0x55, 0x41, 0x74, 0x92, 0x74, 0x6b, 0x0d, - 0xc9, 0x00, 0x96, 0x32, 0xb6, 0x6b, 0x8f, 0x21, 0xf9, 0x4f, 0x5d, 0xf6, 0x57, 0x55, 0xea, 0x7f, - 0xa8, 0xe6, 0xc3, 0x26, 0x41, 0xed, 0xce, 0x3a, 0xf7, 0xdc, 0x33, 0xbe, 0x67, 0xce, 0x1d, 0x30, - 0xe7, 0xcb, 0x80, 0x86, 0xfc, 0x34, 0x4e, 0x22, 0x1e, 0xa1, 0x4a, 0x12, 0xcf, 0x9d, 0xef, 0x65, - 0xe8, 0xcc, 0xc2, 0xf9, 0x03, 0x49, 0xee, 0x29, 0xa6, 0x5f, 0x33, 0x9a, 0x72, 0x64, 0x43, 0x85, - 0x30, 0xde, 0x2b, 0xf5, 0x4b, 0x83, 0x0a, 0x16, 0x9f, 0x08, 0x41, 0x75, 0x41, 0x53, 0xde, 0x2b, - 0xf7, 0x4b, 0x03, 0x03, 0xcb, 0x6f, 0xf4, 0x1a, 0xf6, 0x18, 0x59, 0xf9, 0xe9, 0x13, 0x89, 0xfd, - 0x24, 0xca, 0x78, 0x10, 0xde, 0xfb, 0x77, 0x94, 0xf6, 0x2a, 0xb2, 0xad, 0xcb, 0xc8, 0x6a, 0xf2, - 0x44, 0x62, 0xac, 0x2a, 0x17, 0x94, 0xa2, 0x73, 0xf8, 0x5b, 0x34, 0xc4, 0x09, 0x8d, 0xc9, 0x7a, - 0xab, 0xa5, 0x2a, 0x5b, 0x76, 0x19, 0x59, 0xdd, 0xc8, 0xe2, 0x46, 0x53, 0x1f, 0xcc, 0xe2, 0x14, - 0x41, 0xad, 0x49, 0x2a, 0x68, 0x75, 0xc1, 0x38, 0x06, 0x6b, 0x43, 0x56, 0xfc, 0x78, 0x5d, 0x72, - 0xcc, 0x42, 0xce, 0x65, 0x1c, 0x39, 0xd0, 0x16, 0x2c, 0x16, 0x84, 0x34, 0x91, 0x42, 0x0d, 0x49, - 0x6a, 0x31, 0xb2, 0xba, 0x12, 0x98, 0x50, 0x7a, 0x05, 0x76, 0xa6, 0xad, 0xf0, 0xe7, 0x0f, 0x24, - 0x0c, 0xe9, 0xb2, 0xd7, 0xec, 0x97, 0x06, 0x55, 0xdc, 0xc9, 0xf1, 0xa1, 0x82, 0x9d, 0x7f, 0xc1, - 0x94, 0xd3, 0xd1, 0x34, 0x8e, 0xc2, 0x94, 0x22, 0x0b, 0xca, 0xc1, 0x42, 0x3a, 0x66, 0xe0, 0x72, - 0xb0, 0x70, 0x6c, 0xb0, 0xae, 0xa2, 0x30, 0xe0, 0x51, 0xa2, 0x4d, 0x75, 0x7e, 0x96, 0x00, 0x44, - 0xcb, 0x84, 0x13, 0x9e, 0xa5, 0xbf, 0xf1, 0x58, 0x49, 0x94, 0x73, 0x09, 0x74, 0x04, 0x55, 0xbe, - 0x8e, 0x95, 0x9f, 0xd6, 0x59, 0xfb, 0x34, 0x89, 0xe7, 0xa7, 0x42, 0x60, 0xba, 0x8e, 0x29, 0x96, - 0x25, 0x74, 0x0c, 0xb5, 0x94, 0x13, 0xae, 0x0c, 0xb4, 0xce, 0xac, 0x82, 0x23, 0x0e, 0xa1, 0x58, - 0x15, 0xd1, 0xff, 0xd0, 0x09, 0xc2, 0x80, 0x07, 0x84, 0x07, 0x51, 0xe8, 0xf3, 0x80, 0xe5, 0x2e, - 0x5a, 0xcf, 0xf0, 0x34, 0x60, 0x14, 0x0d, 0xc0, 0x5e, 0x92, 0x94, 0xfb, 0x59, 0xbc, 0x20, 0x9c, - 0x2a, 0xa6, 0xf2, 0xd2, 0x12, 0xf8, 0x4c, 0xc2, 0x92, 0x79, 0x04, 0xe6, 0x03, 0x5f, 0xce, 0x7d, - 0xb2, 0x58, 0x24, 0x34, 0x4d, 0xa5, 0x99, 0x06, 0x6e, 0x09, 0xcc, 0x55, 0x90, 0x63, 0x81, 0x39, - 0xa5, 0x09, 0x4b, 0xf3, 0xf9, 0xbf, 0x95, 0xa1, 0xad, 0x01, 0xed, 0xd9, 0x09, 0x74, 0xe5, 0xb5, - 0xc6, 0x64, 0xcd, 0x68, 0xc8, 0x7d, 0x99, 0x30, 0x65, 0x61, 0x47, 0x14, 0x6e, 0x14, 0x3e, 0x12, - 0x61, 0x73, 0xa0, 0x9d, 0x47, 0xc0, 0xbf, 0x25, 0x29, 0x95, 0x3e, 0x55, 0x70, 0x2b, 0x55, 0x21, - 0x78, 0x4f, 0x52, 0xba, 0xc5, 0x49, 0x84, 0x2b, 0x95, 0x2d, 0x0e, 0x16, 0x5e, 0x1c, 0x02, 0x6c, - 0x04, 0x45, 0xe5, 0xce, 0x88, 0x8b, 0x94, 0xfc, 0x07, 0x1d, 0x16, 0x84, 0x2a, 0x6d, 0x84, 0x45, - 0x59, 0xc8, 0xb5, 0x55, 0x6d, 0x16, 0x84, 0xc2, 0x58, 0x57, 0x82, 0x92, 0x97, 0xa7, 0x52, 0xf3, - 0xea, 0x9a, 0xa7, 0x82, 0xa9, 0x79, 0x87, 0x00, 0xf3, 0x25, 0x7f, 0xf4, 0x17, 0x74, 0xc9, 0x89, - 0x74, 0xa9, 0x86, 0x0d, 0x81, 0x8c, 0x04, 0x80, 0xf6, 0xa1, 0x29, 0x64, 0x04, 0x20, 0x83, 0x56, - 0xc3, 0x0d, 0x46, 0x56, 0xc3, 0x25, 0x7f, 0x74, 0xfa, 0x60, 0x7e, 0xce, 0x22, 0xfe, 0xe7, 0x9d, - 0x74, 0xee, 0xa0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x00, 0x00, 0x00, 0xff, 0xff, 0xd1, 0xd5, - 0xba, 0xca, 0x90, 0x05, 0x00, 0x00, +func init() { proto.RegisterFile("client.proto", fileDescriptor_client_55d0482164e13e67) } + +var fileDescriptor_client_55d0482164e13e67 = []byte{ + // 749 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0x4d, 0x6f, 0xeb, 0x44, + 0x14, 0x7d, 0x71, 0x3e, 0x7d, 0xe3, 0x38, 0xce, 0x3c, 0xde, 0x23, 0xaf, 0xa8, 0x28, 0x58, 0x7c, + 0x84, 0x2e, 0x0a, 0x6a, 0x57, 0x88, 0x95, 0x49, 0xdc, 0x12, 0x44, 0xab, 0x32, 0x49, 0xd8, 0x5a, + 0xd3, 0x64, 0xda, 0x5a, 0xf2, 0xd8, 0xc6, 0x1e, 0xb7, 0xc9, 0x5f, 0xe0, 0xb7, 0xb0, 0xe4, 0xaf, + 0xb1, 0x47, 0xf3, 0x61, 0x37, 0x0e, 0xbc, 0x9d, 0x75, 0xe6, 0xdc, 0x73, 0x3d, 0xe7, 0x9e, 0x3b, + 0x60, 0x6d, 0xa2, 0x90, 0xc6, 0xfc, 0x3c, 0xcd, 0x12, 0x9e, 0xa0, 0x6e, 0x94, 0x24, 0x69, 0x96, + 0x6e, 0xdc, 0xbf, 0x0d, 0x18, 0xae, 0xe3, 0xcd, 0x13, 0xc9, 0x1e, 0x29, 0xa6, 0x7f, 0x14, 0x34, + 0xe7, 0xc8, 0x81, 0x26, 0x61, 0x7c, 0xdc, 0x98, 0x34, 0xa6, 0x4d, 0x2c, 0x3e, 0x11, 0x82, 0xd6, + 0x96, 0xe6, 0x7c, 0x6c, 0x4c, 0x1a, 0x53, 0x13, 0xcb, 0x6f, 0xf4, 0x1d, 0x7c, 0xc2, 0xc8, 0x2e, + 0xc8, 0x5f, 0x48, 0x1a, 0x64, 0x49, 0xc1, 0xc3, 0xf8, 0x31, 0x78, 0xa0, 0x74, 0xdc, 0x94, 0x65, + 0x23, 0x46, 0x76, 0xcb, 0x17, 0x92, 0x62, 0x75, 0x72, 0x45, 0x29, 0xba, 0x84, 0xf7, 0xa2, 0x20, + 0xcd, 0x68, 0x4a, 0xf6, 0xb5, 0x92, 0x96, 0x2c, 0x79, 0xcb, 0xc8, 0xee, 0x4e, 0x1e, 0x1e, 0x14, + 0x4d, 0xc0, 0xaa, 0xba, 0x08, 0x6a, 0x5b, 0x52, 0x41, 0xab, 0x0b, 0xc6, 0x97, 0x60, 0x1f, 0xc8, + 0x8a, 0x1f, 0xef, 0x48, 0x8e, 0x55, 0xc9, 0x79, 0x8c, 0x23, 0x17, 0x06, 0x82, 0xc5, 0xc2, 0x98, + 0x66, 0x52, 0xa8, 0x2b, 0x49, 0x7d, 0x46, 0x76, 0x37, 0x02, 0x13, 0x4a, 0xdf, 0x82, 0x53, 0x68, + 0x2b, 0x82, 0xcd, 0x13, 0x89, 0x63, 0x1a, 0x8d, 0x7b, 0x93, 0xc6, 0xb4, 0x85, 0x87, 0x25, 0x3e, + 0x53, 0xb0, 0xfb, 0x39, 0x58, 0xf2, 0x76, 0x34, 0x4f, 0x93, 0x38, 0xa7, 0xc8, 0x06, 0x23, 0xdc, + 0x4a, 0xc7, 0x4c, 0x6c, 0x84, 0x5b, 0xd7, 0x01, 0xfb, 0x26, 0x89, 0x43, 0x9e, 0x64, 0xda, 0x54, + 0xf7, 0x9f, 0x06, 0x80, 0x28, 0x59, 0x72, 0xc2, 0x8b, 0xfc, 0x7f, 0x3c, 0x56, 0x12, 0x46, 0x29, + 0x81, 0xbe, 0x82, 0x16, 0xdf, 0xa7, 0xca, 0x4f, 0xfb, 0x62, 0x74, 0xae, 0x27, 0x76, 0x2e, 0x44, + 0x56, 0xfb, 0x94, 0x62, 0x79, 0x8c, 0xa6, 0xd0, 0xce, 0x39, 0xe1, 0xca, 0x44, 0xfb, 0x02, 0xd5, + 0x78, 0xa2, 0x19, 0xc5, 0x8a, 0x80, 0xbe, 0x81, 0x61, 0x18, 0x87, 0x3c, 0x24, 0x3c, 0x4c, 0xe2, + 0x80, 0x87, 0xac, 0x74, 0xd3, 0x7e, 0x85, 0x57, 0x21, 0x13, 0x92, 0x4e, 0x44, 0x72, 0x1e, 0x14, + 0xe9, 0x96, 0x70, 0xaa, 0x98, 0xca, 0x53, 0x5b, 0xe0, 0x6b, 0x09, 0x4b, 0xe6, 0x17, 0x60, 0x3d, + 0xf1, 0x68, 0x13, 0x90, 0xed, 0x36, 0xa3, 0x79, 0x2e, 0x4d, 0x35, 0x71, 0x5f, 0x60, 0x9e, 0x82, + 0x5c, 0x1b, 0xac, 0x15, 0xcd, 0x58, 0x5e, 0xfa, 0xf0, 0x97, 0x01, 0x03, 0x0d, 0x68, 0xef, 0xce, + 0x60, 0x24, 0xc7, 0x9b, 0x92, 0x3d, 0xa3, 0x31, 0x0f, 0x64, 0xd2, 0x94, 0x95, 0x43, 0x71, 0x70, + 0xa7, 0xf0, 0xb9, 0x08, 0x9d, 0x0b, 0x83, 0x32, 0x0a, 0xc1, 0x3d, 0xc9, 0xa9, 0xf4, 0xab, 0x89, + 0xfb, 0xb9, 0x0a, 0xc3, 0x4f, 0x24, 0xa7, 0x35, 0x4e, 0x26, 0x9c, 0x69, 0xd6, 0x38, 0x58, 0x78, + 0x71, 0x0a, 0x70, 0x10, 0x18, 0x95, 0x3f, 0x33, 0xad, 0xd2, 0xf2, 0x35, 0x0c, 0x59, 0x18, 0xab, + 0xd4, 0x11, 0x96, 0x14, 0x31, 0xd7, 0x56, 0x0d, 0x58, 0x18, 0x0b, 0x63, 0x3d, 0x09, 0x4a, 0x5e, + 0x99, 0x4e, 0xcd, 0xeb, 0x68, 0x9e, 0x0a, 0xa8, 0xe6, 0x9d, 0x02, 0x6c, 0x22, 0xfe, 0x1c, 0x6c, + 0x69, 0xc4, 0x89, 0x74, 0xa9, 0x8d, 0x4d, 0x81, 0xcc, 0x05, 0x80, 0x3e, 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, 0x8a, 0x5e, 0xbb, 0x1c, 0x06, 0xfa, 0xe4, 0xfd, 0x31, 0xac, 0xbb, 0xd7, 0x25, 0xe4, + 0x88, 0x0e, 0x24, 0x0e, 0x87, 0x7a, 0x20, 0x51, 0x9b, 0xe4, 0x7d, 0x47, 0x3e, 0xd6, 0x97, 0xff, + 0x06, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x03, 0x9d, 0x1d, 0xbc, 0x05, 0x00, 0x00, } diff --git a/looprpc/client.proto b/looprpc/client.proto index ce3b79a..eba5530 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package rpc; +package looprpc; message UnchargeRequest { /** diff --git a/looprpc/server.pb.go b/looprpc/server.pb.go index f057eac..17d59a2 100644 --- a/looprpc/server.pb.go +++ b/looprpc/server.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: server.proto -package rpc // import "github.com/lightninglabs/loop/rpc" +package looprpc // import "github.com/lightninglabs/loop/looprpc" import proto "github.com/golang/protobuf/proto" import fmt "fmt" @@ -37,7 +37,7 @@ func (m *ServerUnchargeSwapRequest) Reset() { *m = ServerUnchargeSwapReq func (m *ServerUnchargeSwapRequest) String() string { return proto.CompactTextString(m) } func (*ServerUnchargeSwapRequest) ProtoMessage() {} func (*ServerUnchargeSwapRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_server_1e67d8b2f65fb149, []int{0} + return fileDescriptor_server_9aa9f93bbf0053c2, []int{0} } func (m *ServerUnchargeSwapRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ServerUnchargeSwapRequest.Unmarshal(m, b) @@ -92,7 +92,7 @@ func (m *ServerUnchargeSwapResponse) Reset() { *m = ServerUnchargeSwapRe func (m *ServerUnchargeSwapResponse) String() string { return proto.CompactTextString(m) } func (*ServerUnchargeSwapResponse) ProtoMessage() {} func (*ServerUnchargeSwapResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_server_1e67d8b2f65fb149, []int{1} + return fileDescriptor_server_9aa9f93bbf0053c2, []int{1} } func (m *ServerUnchargeSwapResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ServerUnchargeSwapResponse.Unmarshal(m, b) @@ -150,7 +150,7 @@ func (m *ServerUnchargeQuoteRequest) Reset() { *m = ServerUnchargeQuoteR func (m *ServerUnchargeQuoteRequest) String() string { return proto.CompactTextString(m) } func (*ServerUnchargeQuoteRequest) ProtoMessage() {} func (*ServerUnchargeQuoteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_server_1e67d8b2f65fb149, []int{2} + return fileDescriptor_server_9aa9f93bbf0053c2, []int{2} } func (m *ServerUnchargeQuoteRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ServerUnchargeQuoteRequest.Unmarshal(m, b) @@ -187,7 +187,7 @@ func (m *ServerUnchargeQuoteResponse) Reset() { *m = ServerUnchargeQuote func (m *ServerUnchargeQuoteResponse) String() string { return proto.CompactTextString(m) } func (*ServerUnchargeQuoteResponse) ProtoMessage() {} func (*ServerUnchargeQuoteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_server_1e67d8b2f65fb149, []int{3} + return fileDescriptor_server_9aa9f93bbf0053c2, []int{3} } func (m *ServerUnchargeQuoteResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ServerUnchargeQuoteResponse.Unmarshal(m, b) @@ -257,10 +257,10 @@ func (m *ServerUnchargeQuoteResponse) GetCltvDelta() int32 { } func init() { - proto.RegisterType((*ServerUnchargeSwapRequest)(nil), "rpc.ServerUnchargeSwapRequest") - proto.RegisterType((*ServerUnchargeSwapResponse)(nil), "rpc.ServerUnchargeSwapResponse") - proto.RegisterType((*ServerUnchargeQuoteRequest)(nil), "rpc.ServerUnchargeQuoteRequest") - proto.RegisterType((*ServerUnchargeQuoteResponse)(nil), "rpc.ServerUnchargeQuoteResponse") + proto.RegisterType((*ServerUnchargeSwapRequest)(nil), "looprpc.ServerUnchargeSwapRequest") + proto.RegisterType((*ServerUnchargeSwapResponse)(nil), "looprpc.ServerUnchargeSwapResponse") + proto.RegisterType((*ServerUnchargeQuoteRequest)(nil), "looprpc.ServerUnchargeQuoteRequest") + proto.RegisterType((*ServerUnchargeQuoteResponse)(nil), "looprpc.ServerUnchargeQuoteResponse") } // Reference imports to suppress errors if they are not otherwise used. @@ -289,7 +289,7 @@ func NewSwapServerClient(cc *grpc.ClientConn) SwapServerClient { func (c *swapServerClient) NewUnchargeSwap(ctx context.Context, in *ServerUnchargeSwapRequest, opts ...grpc.CallOption) (*ServerUnchargeSwapResponse, error) { out := new(ServerUnchargeSwapResponse) - err := c.cc.Invoke(ctx, "/rpc.SwapServer/NewUnchargeSwap", in, out, opts...) + err := c.cc.Invoke(ctx, "/looprpc.SwapServer/NewUnchargeSwap", in, out, opts...) if err != nil { return nil, err } @@ -298,7 +298,7 @@ func (c *swapServerClient) NewUnchargeSwap(ctx context.Context, in *ServerUnchar func (c *swapServerClient) UnchargeQuote(ctx context.Context, in *ServerUnchargeQuoteRequest, opts ...grpc.CallOption) (*ServerUnchargeQuoteResponse, error) { out := new(ServerUnchargeQuoteResponse) - err := c.cc.Invoke(ctx, "/rpc.SwapServer/UnchargeQuote", in, out, opts...) + err := c.cc.Invoke(ctx, "/looprpc.SwapServer/UnchargeQuote", in, out, opts...) if err != nil { return nil, err } @@ -325,7 +325,7 @@ func _SwapServer_NewUnchargeSwap_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rpc.SwapServer/NewUnchargeSwap", + FullMethod: "/looprpc.SwapServer/NewUnchargeSwap", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SwapServerServer).NewUnchargeSwap(ctx, req.(*ServerUnchargeSwapRequest)) @@ -343,7 +343,7 @@ func _SwapServer_UnchargeQuote_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rpc.SwapServer/UnchargeQuote", + FullMethod: "/looprpc.SwapServer/UnchargeQuote", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SwapServerServer).UnchargeQuote(ctx, req.(*ServerUnchargeQuoteRequest)) @@ -352,7 +352,7 @@ func _SwapServer_UnchargeQuote_Handler(srv interface{}, ctx context.Context, dec } var _SwapServer_serviceDesc = grpc.ServiceDesc{ - ServiceName: "rpc.SwapServer", + ServiceName: "looprpc.SwapServer", HandlerType: (*SwapServerServer)(nil), Methods: []grpc.MethodDesc{ { @@ -368,38 +368,38 @@ var _SwapServer_serviceDesc = grpc.ServiceDesc{ Metadata: "server.proto", } -func init() { proto.RegisterFile("server.proto", fileDescriptor_server_1e67d8b2f65fb149) } - -var fileDescriptor_server_1e67d8b2f65fb149 = []byte{ - // 468 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0xcf, 0x8e, 0xd3, 0x30, - 0x10, 0xc6, 0x95, 0xb6, 0x5b, 0xe8, 0x6c, 0x4b, 0x21, 0x07, 0x14, 0xba, 0xbb, 0xd0, 0x0d, 0x02, - 0x55, 0x1c, 0x1a, 0x09, 0x9e, 0x60, 0x57, 0x2b, 0x04, 0x42, 0x42, 0x90, 0x15, 0x17, 0x2e, 0xd1, - 0x34, 0x1d, 0x12, 0x8b, 0xc4, 0x36, 0xb6, 0xfb, 0x27, 0x0f, 0x83, 0x78, 0x09, 0x1e, 0x10, 0xd9, - 0xce, 0x42, 0x8b, 0xda, 0x5b, 0xf2, 0xcd, 0xcf, 0x33, 0xdf, 0x7c, 0x4e, 0x60, 0xa8, 0x49, 0xad, - 0x49, 0xcd, 0xa5, 0x12, 0x46, 0x84, 0x5d, 0x25, 0xf3, 0xc9, 0x79, 0x21, 0x44, 0x51, 0x51, 0x82, - 0x92, 0x25, 0xc8, 0xb9, 0x30, 0x68, 0x98, 0xe0, 0xda, 0x23, 0x71, 0x0d, 0x4f, 0x6e, 0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88, 0xb2, 0x05, 0x6a, 0xbf, 0x46, 0xd7, 0xef, 0xfa, 0x96, 0xe8, 0x1a, 0x35, - 0xed, 0x31, 0x0a, 0x0d, 0xb9, 0x3d, 0xfe, 0x31, 0x29, 0x1a, 0xb7, 0x68, 0x9b, 0x87, 0x8d, 0xba, - 0xe7, 0xa2, 0x1e, 0x78, 0xe5, 0xaa, 0x36, 0xe1, 0x4b, 0x18, 0xd7, 0x8c, 0x67, 0xae, 0x0d, 0xd6, - 0x62, 0xc5, 0x4d, 0x74, 0xe2, 0x98, 0x51, 0xcd, 0xb8, 0xcd, 0xfe, 0xca, 0x89, 0x8e, 0xc3, 0xed, - 0x1e, 0xd7, 0x6f, 0x39, 0xdc, 0xee, 0x70, 0x17, 0x00, 0x79, 0x65, 0xd6, 0xd9, 0x92, 0x2a, 0x83, - 0xd1, 0x3d, 0x17, 0xde, 0xc0, 0x2a, 0x37, 0x56, 0x78, 0xfd, 0x3b, 0x00, 0xb0, 0xb4, 0x4f, 0x29, - 0x4c, 0x61, 0xfc, 0x91, 0x36, 0xbb, 0x57, 0x1d, 0x3e, 0x9d, 0x2b, 0x99, 0xcf, 0x8f, 0x7e, 0x73, - 0x93, 0x67, 0x47, 0xeb, 0x6d, 0xc8, 0x29, 0x8c, 0xf6, 0xd2, 0x0f, 0x0f, 0x9d, 0xd8, 0xbd, 0xb6, - 0xc9, 0xf4, 0x38, 0xe0, 0x7b, 0x5e, 0x3f, 0xff, 0x7a, 0x59, 0x30, 0x53, 0xae, 0x16, 0xf3, 0x5c, - 0xd4, 0x49, 0xc5, 0x8a, 0xd2, 0x70, 0xc6, 0x8b, 0x0a, 0x17, 0x3a, 0xa9, 0x84, 0x90, 0x89, 0x92, - 0xf9, 0xa2, 0xef, 0xfe, 0x98, 0x37, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x34, 0xc9, 0xa8, 0xbf, - 0x64, 0x03, 0x00, 0x00, +func init() { proto.RegisterFile("server.proto", fileDescriptor_server_9aa9f93bbf0053c2) } + +var fileDescriptor_server_9aa9f93bbf0053c2 = []byte{ + // 471 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0xdd, 0x6e, 0xd3, 0x40, + 0x10, 0x85, 0xe5, 0x26, 0x4d, 0xc9, 0x34, 0x21, 0xe0, 0x0b, 0x64, 0xd2, 0x56, 0x0a, 0x86, 0x42, + 0xc4, 0x45, 0x22, 0xc1, 0x13, 0xb4, 0xaa, 0x10, 0x08, 0x09, 0x81, 0x2b, 0x6e, 0x72, 0x63, 0x4d, + 0x9c, 0xc1, 0x5e, 0x61, 0xef, 0x2e, 0xbb, 0x9b, 0xbf, 0x87, 0x41, 0xbc, 0x0c, 0x0f, 0x86, 0xf6, + 0xa7, 0x90, 0xa0, 0xb6, 0x77, 0xc9, 0xd9, 0x6f, 0x67, 0xce, 0x9c, 0x59, 0x43, 0x4f, 0x93, 0x5a, + 0x91, 0x9a, 0x48, 0x25, 0x8c, 0x88, 0x8f, 0x6a, 0x21, 0xa4, 0x92, 0xc5, 0xf0, 0xb4, 0x14, 0xa2, + 0xac, 0x69, 0x8a, 0x92, 0x4d, 0x91, 0x73, 0x61, 0xd0, 0x30, 0xc1, 0xb5, 0xc7, 0xd2, 0x06, 0x9e, + 0x5e, 0xbb, 0x6b, 0x5f, 0x79, 0x51, 0xa1, 0x2a, 0xe9, 0x7a, 0x8d, 0x32, 0xa3, 0x1f, 0x4b, 0xd2, + 0x26, 0x7e, 0x06, 0x3d, 0x45, 0x05, 0xb1, 0x15, 0xa9, 0xfc, 0x3b, 0x6d, 0x93, 0x68, 0x14, 0x8d, + 0x7b, 0xd9, 0xf1, 0x8d, 0xf6, 0x91, 0xb6, 0xf1, 0x09, 0x74, 0xf5, 0x1a, 0x65, 0x5e, 0xa1, 0xae, + 0x92, 0x03, 0x77, 0xfe, 0xc0, 0x0a, 0xef, 0x51, 0x57, 0xf1, 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x0b, + 0x27, 0x3a, 0x0e, 0x37, 0x7b, 0x5c, 0x27, 0x70, 0xb8, 0xd9, 0xe1, 0xce, 0x00, 0x8a, 0xda, 0xac, + 0xf2, 0x05, 0xd5, 0x06, 0x93, 0x23, 0x17, 0x5e, 0xd7, 0x2a, 0x57, 0x56, 0x78, 0xf3, 0x3b, 0x02, + 0xb0, 0xb4, 0x4f, 0x29, 0x9e, 0xc1, 0xe0, 0x13, 0xad, 0x77, 0x57, 0x1d, 0xa7, 0x93, 0xf0, 0x30, + 0x27, 0x77, 0xbe, 0xbb, 0xe1, 0xf3, 0x7b, 0x99, 0x10, 0xf6, 0x0c, 0xfa, 0x7b, 0x5b, 0x88, 0xef, + 0xba, 0xb5, 0xbb, 0xc2, 0xe1, 0x8b, 0xfb, 0x21, 0x5f, 0xfb, 0xf2, 0xd5, 0xec, 0xbc, 0x64, 0xa6, + 0x5a, 0xce, 0x27, 0x85, 0x68, 0xa6, 0x35, 0x2b, 0x2b, 0xc3, 0x19, 0x2f, 0x6b, 0x9c, 0xeb, 0xa9, + 0xbd, 0x3f, 0x0d, 0x45, 0xe6, 0x1d, 0xf7, 0x15, 0xbd, 0xfd, 0x13, 0x00, 0x00, 0xff, 0xff, 0x55, + 0xfc, 0x38, 0x76, 0x7c, 0x03, 0x00, 0x00, } diff --git a/looprpc/server.proto b/looprpc/server.proto index 03971c0..54c41f9 100644 --- a/looprpc/server.proto +++ b/looprpc/server.proto @@ -2,9 +2,9 @@ syntax = "proto3"; import "google/api/annotations.proto"; -package rpc; +package looprpc; -option go_package = "github.com/lightninglabs/loop/rpc"; +option go_package = "github.com/lightninglabs/loop/looprpc"; service SwapServer { rpc NewUnchargeSwap(ServerUnchargeSwapRequest) returns (ServerUnchargeSwapResponse); diff --git a/utils/config.go b/utils/config.go index 3c1024d..82d3794 100644 --- a/utils/config.go +++ b/utils/config.go @@ -1,9 +1,9 @@ package utils -// SwapKeyFamily is the key family used to generate keys that allow spending -// of the htlc. -// -// TODO: Decide on actual value. var ( + // SwapKeyFamily is the key family used to generate keys that allow + // spending of the htlc. + // + // TODO(joost): decide on actual value SwapKeyFamily = int32(99) )