auctioneer: extend Client to implement account.Auctioneer interface

The auctioneer.Client to satisfy the account.Auctioneer dependency
required by the account.Manager. It provides wrappers around the
server-related RPCs with better type usage.
This commit is contained in:
Wilmer Paulino 2019-12-11 18:43:49 -08:00
parent dca3f2717e
commit f96cfe7162
6 changed files with 297 additions and 165 deletions

View file

@ -1,9 +1,11 @@
package auctioneer
import (
"context"
"crypto/tls"
"fmt"
"github.com/lightninglabs/agora/client/account"
"github.com/lightninglabs/agora/client/clmrpc"
"github.com/lightninglabs/loop/lndclient"
"google.golang.org/grpc"
@ -13,13 +15,13 @@ import (
// Client performs the client side part of auctions. This interface exists to be
// able to implement a stub.
type Client struct {
clmrpc.ChannelAuctioneerServerClient
client clmrpc.ChannelAuctioneerServerClient
wallet lndclient.WalletKitClient
}
// NewClient returns a new instance to initiate auctions with.
func NewClient(dbDir string, serverAddress string, insecure bool,
tlsPathServer string, lnd *lndclient.LndServices) (*Client, func(),
error) {
func NewClient(serverAddress string, insecure bool, tlsPathServer string,
wallet lndclient.WalletKitClient) (*Client, func(), error) {
serverConn, err := getAuctionServerConn(
serverAddress, insecure, tlsPathServer,
@ -28,17 +30,14 @@ func NewClient(dbDir string, serverAddress string, insecure bool,
return nil, nil, err
}
server := clmrpc.NewChannelAuctioneerServerClient(serverConn)
client := &Client{
ChannelAuctioneerServerClient: server,
}
cleanup := func() {
serverConn.Close()
}
return client, cleanup, nil
return &Client{
client: clmrpc.NewChannelAuctioneerServerClient(serverConn),
wallet: wallet,
}, cleanup, nil
}
// getAuctionServerConn returns a connection to the auction server.
@ -77,3 +76,41 @@ func getAuctionServerConn(address string, insecure bool, tlsPath string) (
return conn, nil
}
// ReserveAccount reserves an account with the auctioneer. It returns a the
// public key we should use for them in our 2-of-2 multi-sig construction.
func (c *Client) ReserveAccount(ctx context.Context,
traderKey [33]byte) ([33]byte, error) {
resp, err := c.client.ReserveAccount(ctx, &clmrpc.ReserveAccountRequest{
UserSubKey: traderKey[:],
})
if err != nil {
return [33]byte{}, err
}
var auctioneerKey [33]byte
copy(auctioneerKey[:], resp.AuctioneerKey)
return auctioneerKey, nil
}
// InitAccount initializes an account with the auctioneer such that it can be
// used once fully confirmed.
func (c *Client) InitAccount(ctx context.Context, account *account.Account) error {
accountOutput, err := account.Output()
if err != nil {
return fmt.Errorf("unable to construct account output: %v", err)
}
_, err = c.client.InitAccount(ctx, &clmrpc.ServerInitAccountRequest{
AccountPoint: &clmrpc.OutPoint{
Txid: account.OutPoint.Hash[:],
OutputIndex: account.OutPoint.Index,
},
AccountScript: accountOutput.PkScript,
AccountValue: uint32(account.Value),
AccountExpiry: account.Expiry,
UserSubKey: account.TraderKey[:],
})
return err
}

View file

@ -42,7 +42,85 @@ func (x InvalidOrder_FailReason) String() string {
}
func (InvalidOrder_FailReason) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{15, 0}
return fileDescriptor_ad098daeda4239f7, []int{17, 0}
}
type ReserveAccountRequest struct {
UserSubKey []byte `protobuf:"bytes,1,opt,name=user_sub_key,json=userSubKey,proto3" json:"user_sub_key,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReserveAccountRequest) Reset() { *m = ReserveAccountRequest{} }
func (m *ReserveAccountRequest) String() string { return proto.CompactTextString(m) }
func (*ReserveAccountRequest) ProtoMessage() {}
func (*ReserveAccountRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{0}
}
func (m *ReserveAccountRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReserveAccountRequest.Unmarshal(m, b)
}
func (m *ReserveAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReserveAccountRequest.Marshal(b, m, deterministic)
}
func (m *ReserveAccountRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReserveAccountRequest.Merge(m, src)
}
func (m *ReserveAccountRequest) XXX_Size() int {
return xxx_messageInfo_ReserveAccountRequest.Size(m)
}
func (m *ReserveAccountRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ReserveAccountRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ReserveAccountRequest proto.InternalMessageInfo
func (m *ReserveAccountRequest) GetUserSubKey() []byte {
if m != nil {
return m.UserSubKey
}
return nil
}
type ReserveAccountResponse struct {
AuctioneerKey []byte `protobuf:"bytes,1,opt,name=auctioneer_key,json=auctioneerKey,proto3" json:"auctioneer_key,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReserveAccountResponse) Reset() { *m = ReserveAccountResponse{} }
func (m *ReserveAccountResponse) String() string { return proto.CompactTextString(m) }
func (*ReserveAccountResponse) ProtoMessage() {}
func (*ReserveAccountResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{1}
}
func (m *ReserveAccountResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReserveAccountResponse.Unmarshal(m, b)
}
func (m *ReserveAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReserveAccountResponse.Marshal(b, m, deterministic)
}
func (m *ReserveAccountResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReserveAccountResponse.Merge(m, src)
}
func (m *ReserveAccountResponse) XXX_Size() int {
return xxx_messageInfo_ReserveAccountResponse.Size(m)
}
func (m *ReserveAccountResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ReserveAccountResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ReserveAccountResponse proto.InternalMessageInfo
func (m *ReserveAccountResponse) GetAuctioneerKey() []byte {
if m != nil {
return m.AuctioneerKey
}
return nil
}
type ServerInitAccountRequest struct {
@ -57,13 +135,13 @@ type ServerInitAccountRequest struct {
//*
//The value of the account in satoshis. Must match the amount of the
//account_point output.
AccountValue int64 `protobuf:"varint,3,opt,name=account_value,json=accountValue,proto3" json:"account_value,omitempty"`
AccountValue uint32 `protobuf:"varint,3,opt,name=account_value,json=accountValue,proto3" json:"account_value,omitempty"`
//*
//Validity of the account in seconds.
AccountDuration int64 `protobuf:"varint,4,opt,name=account_duration,json=accountDuration,proto3" json:"account_duration,omitempty"`
//The block height at which the account should expire.
AccountExpiry uint32 `protobuf:"varint,4,opt,name=account_expiry,json=accountExpiry,proto3" json:"account_expiry,omitempty"`
//*
//The user's sub account key.
AccountSubKey []byte `protobuf:"bytes,5,opt,name=account_sub_key,json=accountSubKey,proto3" json:"account_sub_key,omitempty"`
UserSubKey []byte `protobuf:"bytes,5,opt,name=user_sub_key,json=userSubKey,proto3" json:"user_sub_key,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -73,7 +151,7 @@ func (m *ServerInitAccountRequest) Reset() { *m = ServerInitAccountReque
func (m *ServerInitAccountRequest) String() string { return proto.CompactTextString(m) }
func (*ServerInitAccountRequest) ProtoMessage() {}
func (*ServerInitAccountRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{0}
return fileDescriptor_ad098daeda4239f7, []int{2}
}
func (m *ServerInitAccountRequest) XXX_Unmarshal(b []byte) error {
@ -108,23 +186,23 @@ func (m *ServerInitAccountRequest) GetAccountScript() []byte {
return nil
}
func (m *ServerInitAccountRequest) GetAccountValue() int64 {
func (m *ServerInitAccountRequest) GetAccountValue() uint32 {
if m != nil {
return m.AccountValue
}
return 0
}
func (m *ServerInitAccountRequest) GetAccountDuration() int64 {
func (m *ServerInitAccountRequest) GetAccountExpiry() uint32 {
if m != nil {
return m.AccountDuration
return m.AccountExpiry
}
return 0
}
func (m *ServerInitAccountRequest) GetAccountSubKey() []byte {
func (m *ServerInitAccountRequest) GetUserSubKey() []byte {
if m != nil {
return m.AccountSubKey
return m.UserSubKey
}
return nil
}
@ -139,7 +217,7 @@ func (m *ServerInitAccountResponse) Reset() { *m = ServerInitAccountResp
func (m *ServerInitAccountResponse) String() string { return proto.CompactTextString(m) }
func (*ServerInitAccountResponse) ProtoMessage() {}
func (*ServerInitAccountResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{1}
return fileDescriptor_ad098daeda4239f7, []int{3}
}
func (m *ServerInitAccountResponse) XXX_Unmarshal(b []byte) error {
@ -163,7 +241,7 @@ var xxx_messageInfo_ServerInitAccountResponse proto.InternalMessageInfo
type ServerCloseAccountRequest struct {
//*
//The user's sub account key.
AccountSubKey []byte `protobuf:"bytes,1,opt,name=account_sub_key,json=accountSubKey,proto3" json:"account_sub_key,omitempty"`
UserSubKey []byte `protobuf:"bytes,1,opt,name=user_sub_key,json=userSubKey,proto3" json:"user_sub_key,omitempty"`
//*
//Specifies where the money from the account should be sent to.
CloseOutputs map[int64][]byte `protobuf:"bytes,2,rep,name=close_outputs,json=closeOutputs,proto3" json:"close_outputs,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
@ -176,7 +254,7 @@ func (m *ServerCloseAccountRequest) Reset() { *m = ServerCloseAccountReq
func (m *ServerCloseAccountRequest) String() string { return proto.CompactTextString(m) }
func (*ServerCloseAccountRequest) ProtoMessage() {}
func (*ServerCloseAccountRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{2}
return fileDescriptor_ad098daeda4239f7, []int{4}
}
func (m *ServerCloseAccountRequest) XXX_Unmarshal(b []byte) error {
@ -197,9 +275,9 @@ func (m *ServerCloseAccountRequest) XXX_DiscardUnknown() {
var xxx_messageInfo_ServerCloseAccountRequest proto.InternalMessageInfo
func (m *ServerCloseAccountRequest) GetAccountSubKey() []byte {
func (m *ServerCloseAccountRequest) GetUserSubKey() []byte {
if m != nil {
return m.AccountSubKey
return m.UserSubKey
}
return nil
}
@ -225,7 +303,7 @@ func (m *ServerCloseAccountResponse) Reset() { *m = ServerCloseAccountRe
func (m *ServerCloseAccountResponse) String() string { return proto.CompactTextString(m) }
func (*ServerCloseAccountResponse) ProtoMessage() {}
func (*ServerCloseAccountResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{3}
return fileDescriptor_ad098daeda4239f7, []int{5}
}
func (m *ServerCloseAccountResponse) XXX_Unmarshal(b []byte) error {
@ -267,7 +345,7 @@ func (m *ServerOrderRequest) Reset() { *m = ServerOrderRequest{} }
func (m *ServerOrderRequest) String() string { return proto.CompactTextString(m) }
func (*ServerOrderRequest) ProtoMessage() {}
func (*ServerOrderRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{4}
return fileDescriptor_ad098daeda4239f7, []int{6}
}
func (m *ServerOrderRequest) XXX_Unmarshal(b []byte) error {
@ -347,7 +425,7 @@ func (m *ServerOrderResponse) Reset() { *m = ServerOrderResponse{} }
func (m *ServerOrderResponse) String() string { return proto.CompactTextString(m) }
func (*ServerOrderResponse) ProtoMessage() {}
func (*ServerOrderResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{5}
return fileDescriptor_ad098daeda4239f7, []int{7}
}
func (m *ServerOrderResponse) XXX_Unmarshal(b []byte) error {
@ -429,7 +507,7 @@ func (m *ClientAuctionMessage) Reset() { *m = ClientAuctionMessage{} }
func (m *ClientAuctionMessage) String() string { return proto.CompactTextString(m) }
func (*ClientAuctionMessage) ProtoMessage() {}
func (*ClientAuctionMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{6}
return fileDescriptor_ad098daeda4239f7, []int{8}
}
func (m *ClientAuctionMessage) XXX_Unmarshal(b []byte) error {
@ -533,7 +611,7 @@ func (m *OrderMatchPrepare) Reset() { *m = OrderMatchPrepare{} }
func (m *OrderMatchPrepare) String() string { return proto.CompactTextString(m) }
func (*OrderMatchPrepare) ProtoMessage() {}
func (*OrderMatchPrepare) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{7}
return fileDescriptor_ad098daeda4239f7, []int{9}
}
func (m *OrderMatchPrepare) XXX_Unmarshal(b []byte) error {
@ -564,7 +642,7 @@ func (m *OrderMatchAccept) Reset() { *m = OrderMatchAccept{} }
func (m *OrderMatchAccept) String() string { return proto.CompactTextString(m) }
func (*OrderMatchAccept) ProtoMessage() {}
func (*OrderMatchAccept) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{8}
return fileDescriptor_ad098daeda4239f7, []int{10}
}
func (m *OrderMatchAccept) XXX_Unmarshal(b []byte) error {
@ -595,7 +673,7 @@ func (m *OrderMatchSign) Reset() { *m = OrderMatchSign{} }
func (m *OrderMatchSign) String() string { return proto.CompactTextString(m) }
func (*OrderMatchSign) ProtoMessage() {}
func (*OrderMatchSign) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{9}
return fileDescriptor_ad098daeda4239f7, []int{11}
}
func (m *OrderMatchSign) XXX_Unmarshal(b []byte) error {
@ -626,7 +704,7 @@ func (m *OrderMatchFinalize) Reset() { *m = OrderMatchFinalize{} }
func (m *OrderMatchFinalize) String() string { return proto.CompactTextString(m) }
func (*OrderMatchFinalize) ProtoMessage() {}
func (*OrderMatchFinalize) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{10}
return fileDescriptor_ad098daeda4239f7, []int{12}
}
func (m *OrderMatchFinalize) XXX_Unmarshal(b []byte) error {
@ -657,7 +735,7 @@ func (m *ServerAuctionMessage) Reset() { *m = ServerAuctionMessage{} }
func (m *ServerAuctionMessage) String() string { return proto.CompactTextString(m) }
func (*ServerAuctionMessage) ProtoMessage() {}
func (*ServerAuctionMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{11}
return fileDescriptor_ad098daeda4239f7, []int{13}
}
func (m *ServerAuctionMessage) XXX_Unmarshal(b []byte) error {
@ -708,7 +786,7 @@ func (m *ServerBid) Reset() { *m = ServerBid{} }
func (m *ServerBid) String() string { return proto.CompactTextString(m) }
func (*ServerBid) ProtoMessage() {}
func (*ServerBid) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{12}
return fileDescriptor_ad098daeda4239f7, []int{14}
}
func (m *ServerBid) XXX_Unmarshal(b []byte) error {
@ -829,7 +907,7 @@ func (m *ServerAsk) Reset() { *m = ServerAsk{} }
func (m *ServerAsk) String() string { return proto.CompactTextString(m) }
func (*ServerAsk) ProtoMessage() {}
func (*ServerAsk) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{13}
return fileDescriptor_ad098daeda4239f7, []int{15}
}
func (m *ServerAsk) XXX_Unmarshal(b []byte) error {
@ -931,7 +1009,7 @@ func (m *CancelOrder) Reset() { *m = CancelOrder{} }
func (m *CancelOrder) String() string { return proto.CompactTextString(m) }
func (*CancelOrder) ProtoMessage() {}
func (*CancelOrder) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{14}
return fileDescriptor_ad098daeda4239f7, []int{16}
}
func (m *CancelOrder) XXX_Unmarshal(b []byte) error {
@ -972,7 +1050,7 @@ func (m *InvalidOrder) Reset() { *m = InvalidOrder{} }
func (m *InvalidOrder) String() string { return proto.CompactTextString(m) }
func (*InvalidOrder) ProtoMessage() {}
func (*InvalidOrder) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{15}
return fileDescriptor_ad098daeda4239f7, []int{17}
}
func (m *InvalidOrder) XXX_Unmarshal(b []byte) error {
@ -1026,7 +1104,7 @@ func (m *Input) Reset() { *m = Input{} }
func (m *Input) String() string { return proto.CompactTextString(m) }
func (*Input) ProtoMessage() {}
func (*Input) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{16}
return fileDescriptor_ad098daeda4239f7, []int{18}
}
func (m *Input) XXX_Unmarshal(b []byte) error {
@ -1076,7 +1154,7 @@ func (m *ServerModifyAccountRequest) Reset() { *m = ServerModifyAccountR
func (m *ServerModifyAccountRequest) String() string { return proto.CompactTextString(m) }
func (*ServerModifyAccountRequest) ProtoMessage() {}
func (*ServerModifyAccountRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{17}
return fileDescriptor_ad098daeda4239f7, []int{19}
}
func (m *ServerModifyAccountRequest) XXX_Unmarshal(b []byte) error {
@ -1144,7 +1222,7 @@ func (m *ServerModifyAccountResponse) Reset() { *m = ServerModifyAccount
func (m *ServerModifyAccountResponse) String() string { return proto.CompactTextString(m) }
func (*ServerModifyAccountResponse) ProtoMessage() {}
func (*ServerModifyAccountResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{18}
return fileDescriptor_ad098daeda4239f7, []int{20}
}
func (m *ServerModifyAccountResponse) XXX_Unmarshal(b []byte) error {
@ -1191,7 +1269,7 @@ func (m *NodeAddress) Reset() { *m = NodeAddress{} }
func (m *NodeAddress) String() string { return proto.CompactTextString(m) }
func (*NodeAddress) ProtoMessage() {}
func (*NodeAddress) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{19}
return fileDescriptor_ad098daeda4239f7, []int{21}
}
func (m *NodeAddress) XXX_Unmarshal(b []byte) error {
@ -1242,7 +1320,7 @@ func (m *OutPoint) Reset() { *m = OutPoint{} }
func (m *OutPoint) String() string { return proto.CompactTextString(m) }
func (*OutPoint) ProtoMessage() {}
func (*OutPoint) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{20}
return fileDescriptor_ad098daeda4239f7, []int{22}
}
func (m *OutPoint) XXX_Unmarshal(b []byte) error {
@ -1279,6 +1357,8 @@ func (m *OutPoint) GetOutputIndex() uint32 {
func init() {
proto.RegisterEnum("clmrpc.InvalidOrder_FailReason", InvalidOrder_FailReason_name, InvalidOrder_FailReason_value)
proto.RegisterType((*ReserveAccountRequest)(nil), "clmrpc.ReserveAccountRequest")
proto.RegisterType((*ReserveAccountResponse)(nil), "clmrpc.ReserveAccountResponse")
proto.RegisterType((*ServerInitAccountRequest)(nil), "clmrpc.ServerInitAccountRequest")
proto.RegisterType((*ServerInitAccountResponse)(nil), "clmrpc.ServerInitAccountResponse")
proto.RegisterType((*ServerCloseAccountRequest)(nil), "clmrpc.ServerCloseAccountRequest")
@ -1307,87 +1387,90 @@ func init() {
func init() { proto.RegisterFile("server.proto", fileDescriptor_ad098daeda4239f7) }
var fileDescriptor_ad098daeda4239f7 = []byte{
// 1273 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x4f, 0x6f, 0xdb, 0x36,
0x14, 0xb7, 0x6c, 0x27, 0x96, 0x9f, 0xec, 0xc4, 0x61, 0xb2, 0x4e, 0x75, 0x52, 0x34, 0x55, 0xd1,
0xc2, 0x03, 0x0a, 0xb7, 0x70, 0x51, 0xa0, 0x6b, 0x07, 0x6c, 0x76, 0xba, 0x20, 0xc9, 0x96, 0xb6,
0x90, 0xbb, 0xae, 0x37, 0x81, 0x96, 0x68, 0x97, 0x88, 0x4c, 0x69, 0x12, 0xd5, 0xc4, 0xdb, 0x71,
0x87, 0x7d, 0x9e, 0x7d, 0xa1, 0x7d, 0x86, 0x9e, 0xb7, 0xcb, 0x40, 0x52, 0xb2, 0xa5, 0xd8, 0x4d,
0x80, 0x62, 0xc7, 0xdd, 0xc4, 0xdf, 0xfb, 0xbd, 0x3f, 0x7c, 0xef, 0x91, 0x7c, 0x82, 0x46, 0x4c,
0xa2, 0x0f, 0x24, 0xea, 0x86, 0x51, 0xc0, 0x03, 0xb4, 0xee, 0xfa, 0xd3, 0x28, 0x74, 0xdb, 0x7b,
0x93, 0x20, 0x98, 0xf8, 0xe4, 0x21, 0x0e, 0xe9, 0x43, 0xcc, 0x58, 0xc0, 0x31, 0xa7, 0x01, 0x8b,
0x15, 0xcb, 0xfa, 0xa8, 0x81, 0x39, 0x94, 0x6a, 0xc7, 0x8c, 0xf2, 0xbe, 0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 0xa4, 0x1d, 0xed, 0x91, 0x36, 0x5a, 0x97, 0xff, 0x4f, 0x8f, 0xff, 0x0d, 0x00, 0x00, 0xff,
0xff, 0xf7, 0xda, 0xe8, 0x6a, 0x75, 0x0d, 0x00, 0x00,
// 1320 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x4d, 0x6f, 0xdb, 0x46,
0x13, 0xd6, 0x97, 0x2d, 0x69, 0x28, 0x39, 0xf2, 0xda, 0xc9, 0xab, 0xc8, 0xce, 0x1b, 0x87, 0x41,
0x5e, 0xf8, 0x10, 0x28, 0x81, 0x82, 0x00, 0xf9, 0x78, 0x81, 0x54, 0x72, 0x62, 0xd8, 0x6e, 0x1d,
0x07, 0x54, 0x9a, 0xe6, 0x46, 0xac, 0xc8, 0x95, 0xb2, 0x30, 0xb5, 0x64, 0xb9, 0x64, 0x6c, 0xb5,
0xc7, 0xfe, 0xa2, 0xfe, 0x9b, 0xfc, 0x82, 0x9e, 0x7b, 0x6e, 0x2f, 0xc5, 0xce, 0x92, 0x12, 0x65,
0xc9, 0x36, 0x1a, 0xf4, 0xd8, 0x1b, 0xf7, 0x99, 0x67, 0x3e, 0x76, 0x76, 0x66, 0x77, 0x08, 0x35,
0xc9, 0xc2, 0xcf, 0x2c, 0x6c, 0x07, 0xa1, 0x1f, 0xf9, 0x64, 0xd5, 0xf1, 0xc6, 0x61, 0xe0, 0xb4,
0xb6, 0x47, 0xbe, 0x3f, 0xf2, 0xd8, 0x23, 0x1a, 0xf0, 0x47, 0x54, 0x08, 0x3f, 0xa2, 0x11, 0xf7,
0x85, 0xd4, 0x2c, 0xf3, 0x39, 0xdc, 0xb4, 0x18, 0xea, 0x75, 0x1d, 0xc7, 0x8f, 0x45, 0x64, 0xb1,
0x1f, 0x63, 0x26, 0x23, 0xb2, 0x03, 0xb5, 0x58, 0xb2, 0xd0, 0x96, 0xf1, 0xc0, 0x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, 0x65, 0x33, 0x3b,
0xd9, 0xab, 0xf7, 0xab, 0xed, 0xfc, 0x00, 0x37, 0xfb, 0xf1, 0x40, 0xfd, 0xc7, 0x0c, 0x58, 0x0f,
0x87, 0x22, 0x5d, 0x07, 0x64, 0x3b, 0xd5, 0x5a, 0x36, 0x36, 0xb6, 0xb6, 0x2f, 0x0c, 0xc6, 0x73,
0xd2, 0xdd, 0xfc, 0xe3, 0xfc, 0x60, 0x15, 0x7f, 0xfe, 0x9e, 0xfc, 0x15, 0x00, 0x00, 0xff, 0xff,
0xc6, 0x19, 0xdf, 0x24, 0x32, 0x0e, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -1402,6 +1485,7 @@ const _ = grpc.SupportPackageIsVersion4
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ChannelAuctioneerServerClient interface {
ReserveAccount(ctx context.Context, in *ReserveAccountRequest, opts ...grpc.CallOption) (*ReserveAccountResponse, error)
InitAccount(ctx context.Context, in *ServerInitAccountRequest, opts ...grpc.CallOption) (*ServerInitAccountResponse, error)
CloseAccount(ctx context.Context, in *ServerCloseAccountRequest, opts ...grpc.CallOption) (*ServerCloseAccountResponse, error)
ModifyAccount(ctx context.Context, in *ServerModifyAccountRequest, opts ...grpc.CallOption) (*ServerModifyAccountResponse, error)
@ -1418,6 +1502,15 @@ func NewChannelAuctioneerServerClient(cc *grpc.ClientConn) ChannelAuctioneerServ
return &channelAuctioneerServerClient{cc}
}
func (c *channelAuctioneerServerClient) ReserveAccount(ctx context.Context, in *ReserveAccountRequest, opts ...grpc.CallOption) (*ReserveAccountResponse, error) {
out := new(ReserveAccountResponse)
err := c.cc.Invoke(ctx, "/clmrpc.ChannelAuctioneerServer/ReserveAccount", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *channelAuctioneerServerClient) InitAccount(ctx context.Context, in *ServerInitAccountRequest, opts ...grpc.CallOption) (*ServerInitAccountResponse, error) {
out := new(ServerInitAccountResponse)
err := c.cc.Invoke(ctx, "/clmrpc.ChannelAuctioneerServer/InitAccount", in, out, opts...)
@ -1496,6 +1589,7 @@ func (x *channelAuctioneerServerSubscribeBatchAuctionClient) Recv() (*ServerAuct
// ChannelAuctioneerServerServer is the server API for ChannelAuctioneerServer service.
type ChannelAuctioneerServerServer interface {
ReserveAccount(context.Context, *ReserveAccountRequest) (*ReserveAccountResponse, error)
InitAccount(context.Context, *ServerInitAccountRequest) (*ServerInitAccountResponse, error)
CloseAccount(context.Context, *ServerCloseAccountRequest) (*ServerCloseAccountResponse, error)
ModifyAccount(context.Context, *ServerModifyAccountRequest) (*ServerModifyAccountResponse, error)
@ -1508,6 +1602,24 @@ func RegisterChannelAuctioneerServerServer(s *grpc.Server, srv ChannelAuctioneer
s.RegisterService(&_ChannelAuctioneerServer_serviceDesc, srv)
}
func _ChannelAuctioneerServer_ReserveAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReserveAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ChannelAuctioneerServerServer).ReserveAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/clmrpc.ChannelAuctioneerServer/ReserveAccount",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ChannelAuctioneerServerServer).ReserveAccount(ctx, req.(*ReserveAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ChannelAuctioneerServer_InitAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ServerInitAccountRequest)
if err := dec(in); err != nil {
@ -1628,6 +1740,10 @@ var _ChannelAuctioneerServer_serviceDesc = grpc.ServiceDesc{
ServiceName: "clmrpc.ChannelAuctioneerServer",
HandlerType: (*ChannelAuctioneerServerServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ReserveAccount",
Handler: _ChannelAuctioneerServer_ReserveAccount_Handler,
},
{
MethodName: "InitAccount",
Handler: _ChannelAuctioneerServer_InitAccount_Handler,

View file

@ -5,6 +5,7 @@ import "google/api/annotations.proto";
package clmrpc;
service ChannelAuctioneerServer {
rpc ReserveAccount (ReserveAccountRequest) returns (ReserveAccountResponse);
rpc InitAccount (ServerInitAccountRequest) returns (ServerInitAccountResponse);
rpc CloseAccount (ServerCloseAccountRequest) returns (ServerCloseAccountResponse);
rpc ModifyAccount (ServerModifyAccountRequest) returns (ServerModifyAccountResponse);
@ -13,6 +14,13 @@ service ChannelAuctioneerServer {
rpc SubscribeBatchAuction (stream ClientAuctionMessage) returns (stream ServerAuctionMessage);
}
message ReserveAccountRequest {
bytes user_sub_key = 1;
}
message ReserveAccountResponse {
bytes auctioneer_key = 1;
}
message ServerInitAccountRequest {
/**
Transaction output of the account. Has to be unspent and be a P2WSH of
@ -30,17 +38,17 @@ message ServerInitAccountRequest {
The value of the account in satoshis. Must match the amount of the
account_point output.
*/
int64 account_value = 3;
uint32 account_value = 3;
/**
Validity of the account in seconds.
The block height at which the account should expire.
*/
int64 account_duration = 4;
uint32 account_expiry = 4;
/**
The user's sub account key.
*/
bytes account_sub_key = 5;
bytes user_sub_key = 5;
}
message ServerInitAccountResponse {}
@ -48,7 +56,7 @@ message ServerCloseAccountRequest {
/**
The user's sub account key.
*/
bytes account_sub_key = 1;
bytes user_sub_key = 1;
/**
Specifies where the money from the account should be sent to.

View file

@ -9,6 +9,7 @@ import (
"sync"
proxy "github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/lightninglabs/agora/client/auctioneer"
"github.com/lightninglabs/agora/client/clmrpc"
"github.com/lightninglabs/agora/client/trader"
"github.com/lightningnetwork/lnd/signal"
@ -40,9 +41,9 @@ func daemon(config *config) error {
log.Infof("Auction server address: %v", config.AuctionServer)
// Create an instance of the auctioneer client library.
auctioneerClient, cleanup, err := getAuctioneerClient(
config.Network, config.AuctionServer, config.Insecure,
config.TLSPathAuctSrv, &lnd.LndServices,
auctioneerClient, cleanup, err := auctioneer.NewClient(
config.AuctionServer, config.Insecure, config.TLSPathAuctSrv,
lnd.WalletKit,
)
if err != nil {
return err

View file

@ -4,7 +4,6 @@ import (
"os"
"path/filepath"
"github.com/lightninglabs/agora/client/auctioneer"
"github.com/lightninglabs/loop/lndclient"
)
@ -15,26 +14,6 @@ func getLnd(network string, cfg *lndConfig) (*lndclient.GrpcLndServices, error)
)
}
// getAuctioneerClient returns an instance of the auction client.
func getAuctioneerClient(network, auctionServer string, insecure bool,
tlsPathServer string, lnd *lndclient.LndServices) (*auctioneer.Client,
func(), error) {
storeDir, err := getStoreDir(network)
if err != nil {
return nil, nil, err
}
auctioneerClient, cleanUp, err := auctioneer.NewClient(
storeDir, auctionServer, insecure, tlsPathServer, lnd,
)
if err != nil {
return nil, nil, err
}
return auctioneerClient, cleanUp, nil
}
func getStoreDir(network string) (string, error) {
dir := filepath.Join(agoraDirBase, network)
if err := os.MkdirAll(dir, os.ModePerm); err != nil {

View file

@ -105,16 +105,7 @@ func (s *Server) serverHandler() {
func (s *Server) InitAccount(ctx context.Context,
req *clmrpc.InitAccountRequest) (*clmrpc.InitAccountResponse, error) {
serverReq := &clmrpc.ServerInitAccountRequest{
AccountValue: req.AccountValue,
}
_, err := s.auctioneer.InitAccount(ctx, serverReq)
if err != nil {
return nil, err
}
return &clmrpc.InitAccountResponse{
AccountSubKeyHex: "beef",
}, nil
return nil, fmt.Errorf("unimplemented")
}
func (s *Server) ListAccounts(ctx context.Context,